@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
|
@@ -172,24 +172,24 @@ export class SwirlShellLayout {
|
|
|
172
172
|
"shell-layout--mobile-navigation-active": this.mobileNavigationActive,
|
|
173
173
|
"shell-layout--navigation-collapsed": mainNavCollapsed,
|
|
174
174
|
});
|
|
175
|
-
return (h(Host, { key: '
|
|
175
|
+
return (h(Host, { key: 'ba71850ab25187477de0fd280333491e17aa507e' }, h("div", { key: '1783f51de5c40b6b58a8c351c12259dcf360eb8b', class: className }, h("header", { key: '60e343ccfcab61ac22310c7cb49a27cf545d5bd2', class: "shell-layout__header", "data-tauri-drag-region": "true" }, h("button", { key: 'add3019d8df87297e691ceadd0e9a608207a4c02', class: "shell-layout__skip-link", onClick: this.skipLinkClick.emit, type: "button" }, this.skipLinkLabel), h("div", { key: '8aeeebda57bcf6b99806896d3e77a29c577ef64b', class: "shell-layout__header-left" }, h("swirl-tooltip", { key: '8c76fce6027707fc32c50d2628a82954fc9b948c', content: this.navigationCollapsed
|
|
176
176
|
? this.expandNavigationButtonLabel
|
|
177
|
-
: this.collapseNavigationButtonLabel, delay: 100, position: "right" }, h("button", { key: '
|
|
177
|
+
: this.collapseNavigationButtonLabel, delay: 100, position: "right" }, h("button", { key: 'ac3db57bb52dd17e08e429e6a322c854367bcc63', class: "shell-layout__header-tool", onClick: this.onNavigationToggleClick, type: "button" }, this.navigationCollapsed ? (h("swirl-icon-dock-left-expand", { size: 20 })) : (h("swirl-icon-dock-left-collapse", { size: 20 })), h("swirl-visually-hidden", { key: '74a9b9f0f625c3cf1ecd4d54d6da9e7820e4fe79' }, this.navigationCollapsed
|
|
178
178
|
? this.expandNavigationButtonLabel
|
|
179
|
-
: this.collapseNavigationButtonLabel))), h("a", { key: '
|
|
179
|
+
: this.collapseNavigationButtonLabel))), h("a", { key: '3e79631fa44f47145c3d04904fd82d8c1123a5de', class: "shell-layout__header-tool", href: "javascript:history.back()" }, h("swirl-icon-arrow-back", { key: '2344d7fb3dd96d2324cc722201994441d9681554', size: 20 }), h("swirl-visually-hidden", { key: '57f42760e017b7564aef0a09c2cce29623bbb238' }, this.browserBackButtonLabel)), h("a", { key: '8d82f609f9d21ba4aabdc6f6984ef865ca13482f', class: "shell-layout__header-tool", href: "javascript:history.forward()" }, h("swirl-icon-arrow-forward", { key: '877244452295b3bc41f51393bc56660287e5f394', size: 20 }), h("swirl-visually-hidden", { key: '55053998bd6f93f168b13de4d91b8771f380db21' }, this.browserForwardButtonLabel)), h("slot", { key: 'b51a7edc15aa6fb8b86474d0f7a94f0da4b9dc66', name: "left-header-tools" })), h("div", { key: 'e3be12dfb40ad48280f5ce919cbbb03126a9b136', class: "shell-layout__logo" }, h("slot", { key: 'd6292d958c06e33b25f5b848ef1f305560b346a6', name: "logo" })), h("div", { key: '432770ab91b3fb0d6512632ca7272cc02220f93f', class: "shell-layout__header-right" }, h("slot", { key: 'ffe6e81aacc341b6617ead1191b5172779f0e6bb', name: "right-header-tools" }), h("slot", { key: '45aa7fa1d83cbc7cd25a3479247d62ba14d39839', name: "avatar" }))), h("div", { key: 'c11e952da53499494f794e1439519862580c28cf', class: "shell-layout__mobile-nav-backdrop", onClick: this.onNavigationClick }), h("nav", { key: 'e718116e58c0c9b9875d16f7b340f7b10284c407', "aria-labelledby": "main-navigation-label", class: "shell-layout__nav", onClick: this.onNavigationClick, ref: (el) => (this.navElement = el) }, h("div", { key: '9461acc9b41bebd9ab0d5a8cf2535babb18e3ec0', class: "shell-layout__mobile-header" }, h("slot", { key: 'bd90c25a4f27085037853fd96df9c04167d31413', name: "mobile-logo" }), h("div", { key: 'affad63e0ae66b9810479ff1472101bc71b1b745', class: "shell-layout__mobile-header-tools" }, h("slot", { key: '4cac99bc568ff6d345c3d8c8921cadd38e054294', name: "mobile-header-tools" }), h("button", { key: 'b6e53b7a8e5b0be7c4bc81626fced0a0b22ac807', class: "shell-layout__header-tool", type: "button" }, h("swirl-icon-double-arrow-left", { key: '52fe0309bc2ff3c988c406dcbd34ea505e602ef3', size: 20 }), h("swirl-visually-hidden", { key: '7425e4993d3c11609673d5444f197b4cce23b0b0' }, this.hideMobileNavigationButtonLabel)))), h("div", { key: '76e3108a837e780f5ba7c115d9ab9c654cee2583', class: "shell-layout__nav-body" }, h("swirl-visually-hidden", { key: '93a613134cf84890462f030007f8712f67e896ce' }, h("span", { key: '8abd0fe2b0b7dab953ff12fb4d6b23129ffee71e', id: "main-navigation-label" }, this.navigationLabel)), h("slot", { key: '493535666ed3af1401c90142654362abb4783a05', name: "nav", onSlotchange: this.collectNavItems }), h("div", { key: '70799718bc984b00f421f3dcbee1e46d131fd439', class: "shell-layout__secondary-nav" }, h("swirl-separator", { key: '0a956f25ae179002f308aa8a0e1278b18fbbd26e', color: "strong", spacing: "16" }), this.enableSecondaryNavGridLayout && (h("swirl-box", { key: 'ed807b244604feb205503ca6951240c556f2ff99', paddingBlockEnd: "16" }, h("swirl-stack", { key: '90d40a649043b463531d6614e0ba4dfd6d675006', justify: mainNavCollapsed ? "center" : "space-between", orientation: "horizontal" }, h("swirl-button", { key: 'dfdbd0a375bf32cf06fde7eee4cf9a64640d78ca', hideLabel: mainNavCollapsed, icon: this.secondaryNavCollapsed
|
|
180
180
|
? "<swirl-icon-expand-more></swirl-icon-expand-more>"
|
|
181
181
|
: "<swirl-icon-expand-less></swirl-icon-expand-less>", label: this.secondaryNavCollapsed
|
|
182
182
|
? this.secondaryNavExpandLabel
|
|
183
|
-
: this.secondaryNavCollapseLabel, onClick: this.toggleSecondaryNavCollapse, variant: "plain" }), !mainNavCollapsed && !this.secondaryNavCollapsed && (h("swirl-button", { key: '
|
|
183
|
+
: this.secondaryNavCollapseLabel, onClick: this.toggleSecondaryNavCollapse, variant: "plain" }), !mainNavCollapsed && !this.secondaryNavCollapsed && (h("swirl-button", { key: '55467b2ec7f96372bedaba657b068bf2b044bd4d', icon: this.secondaryNavView === "grid"
|
|
184
184
|
? "<swirl-icon-menu></swirl-icon-menu>"
|
|
185
185
|
: "<swirl-icon-hamburger-menu></swirl-icon-hamburger-menu>", iconPosition: "end", label: this.secondaryNavView === "grid"
|
|
186
186
|
? this.gridNavLayoutToggleLabel
|
|
187
|
-
: this.listNavLayoutToggleLabel, onClick: this.toggleSecondaryNavView, variant: "plain" }))))), h("div", { key: '
|
|
187
|
+
: this.listNavLayoutToggleLabel, onClick: this.toggleSecondaryNavView, variant: "plain" }))))), h("div", { key: '38f99681433035f63b2fcc9185d7e6b1888f4bb4', class: {
|
|
188
188
|
[`shell-layout__secondary-nav-items--${this.secondaryNavGridLayoutVariant}`]: true,
|
|
189
189
|
"shell-layout__secondary-nav-items": true,
|
|
190
190
|
"shell-layout__secondary-nav-items--grid-view": this.enableSecondaryNavGridLayout &&
|
|
191
191
|
this.secondaryNavView === "grid",
|
|
192
|
-
} }, h("slot", { key: '
|
|
192
|
+
} }, h("slot", { key: '8d49eb0021897e49b9271c5ead87cc67befe0fdc', name: "secondary-nav", onSlotchange: this.collectNavItems }))))), h("main", { key: '5e3c5fcff583838c418f4a6989b7e10b63831a4f', class: "shell-layout__main", id: "main-content" }, h("slot", { key: '688823dcc10d0b29c9a08e014ad8769b8ac22f61' })))));
|
|
193
193
|
}
|
|
194
194
|
static get is() { return "swirl-shell-layout"; }
|
|
195
195
|
static get encapsulation() { return "scoped"; }
|
package/dist/collection/components/swirl-shell-navigation-item/swirl-shell-navigation-item.js
CHANGED
|
@@ -61,9 +61,9 @@ export class SwirlShellNavigationItem {
|
|
|
61
61
|
const tooltipContent = this.description
|
|
62
62
|
? `${this.label} ${this.description}`
|
|
63
63
|
: this.label;
|
|
64
|
-
return (h(Host, { key: '
|
|
64
|
+
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", {
|
|
65
65
|
"shell-navigation-item__badge--dot": this.badgeLabel === "",
|
|
66
|
-
}), label: this.badgeLabel, size: "xs", variant: this.badgeLabel === "" ? "dot" : "default" }))), showIsNewTag && (h("swirl-tag", { key: '
|
|
66
|
+
}), 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" }))))));
|
|
67
67
|
}
|
|
68
68
|
static get is() { return "swirl-shell-navigation-item"; }
|
|
69
69
|
static get encapsulation() { return "shadow"; }
|
|
@@ -7,11 +7,11 @@ export class SwirlSkeletonBox {
|
|
|
7
7
|
}
|
|
8
8
|
render() {
|
|
9
9
|
const className = classnames("skeleton-box", `skeleton-box--border-radius-${this.borderRadius}`, { "skeleton-box--static": !this.animated });
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: '0766d24e9c6dd8b47f0cde12acc961798539a663', style: {
|
|
11
11
|
width: !Boolean(this.width) && !Boolean(this.aspectRatio)
|
|
12
12
|
? "100%"
|
|
13
13
|
: undefined,
|
|
14
|
-
} }, h("div", { key: '
|
|
14
|
+
} }, h("div", { key: '78ef731b5c403dfe74d3034ac8bcef63e0bac16c', class: className, style: {
|
|
15
15
|
aspectRatio: this.aspectRatio,
|
|
16
16
|
borderRadius: this.borderRadius !== "pill" && this.borderRadius !== "none"
|
|
17
17
|
? `var(--s-border-radius-${this.borderRadius})`
|
|
@@ -9,7 +9,7 @@ export class SwirlSkeletonText {
|
|
|
9
9
|
render() {
|
|
10
10
|
const className = classnames("skeleton-text", `skeleton-text--size-${this.size}`, { "skeleton-text--static": !this.animated });
|
|
11
11
|
const lineClassName = classnames("skeleton-text__line", `skeleton-text__line--size-${this.size}`);
|
|
12
|
-
return (h(Host, { key: '
|
|
12
|
+
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 }))))));
|
|
13
13
|
}
|
|
14
14
|
static get is() { return "swirl-skeleton-text"; }
|
|
15
15
|
static get encapsulation() { return "shadow"; }
|
|
@@ -6,7 +6,7 @@ export class SwirlSpinner {
|
|
|
6
6
|
}
|
|
7
7
|
render() {
|
|
8
8
|
const className = classnames("spinner", `spinner--size-${this.size}`);
|
|
9
|
-
return (h(Host, { key: '
|
|
9
|
+
return (h(Host, { key: '2f761771a7f8ce7e6a101e112e0ca13b28d3a395' }, h("span", { key: '6fab35299e5384a5ea83dab47f4e6cbfc5ed8334', class: className, role: Boolean(this.label) ? "status" : undefined }, h("svg", { key: '8d7450bf5fedf307a9372a28aeb61ce5d164daf6', "aria-hidden": "true", class: "spinner__indicator", focusable: "false", viewBox: "0 0 50 50" }, h("circle", { key: '80b2296b1b60e70d5b771406101d9d5e95cfdd7a', class: "spinner__background", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "4" }), h("circle", { key: 'ec3742637ae8514bbada169901575892ffd5e50f', class: "spinner__circle", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "4" })), this.label && (h("swirl-visually-hidden", { key: 'acc70969490493433e58b543b8e4db8e75e795bf' }, h("span", { key: 'a8fd095d46463f8c08fb52ac9d70ec8f670973f9', class: "spinner__label" }, this.label))))));
|
|
10
10
|
}
|
|
11
11
|
static get is() { return "swirl-spinner"; }
|
|
12
12
|
static get encapsulation() { return "shadow"; }
|
|
@@ -3,7 +3,7 @@ import classnames from "classnames";
|
|
|
3
3
|
export class SwirlStatusIndicator {
|
|
4
4
|
render() {
|
|
5
5
|
const className = classnames("status-indicator", `status-indicator--intent-${this.intent}`);
|
|
6
|
-
return (h(Host, { key: '
|
|
6
|
+
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))));
|
|
7
7
|
}
|
|
8
8
|
static get is() { return "swirl-status-indicator"; }
|
|
9
9
|
static get encapsulation() { return "shadow"; }
|
|
@@ -26,9 +26,9 @@ export class SwirlSwitch {
|
|
|
26
26
|
"switch--disabled": this.disabled,
|
|
27
27
|
"switch--hide-content": this.hideLabel && (!this.description || this.hideDescription),
|
|
28
28
|
});
|
|
29
|
-
return (h(Host, { key: '
|
|
29
|
+
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
|
|
30
30
|
? this.swirlAriaLabel
|
|
31
|
-
: 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: '
|
|
31
|
+
: 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))))));
|
|
32
32
|
}
|
|
33
33
|
static get is() { return "swirl-switch"; }
|
|
34
34
|
static get encapsulation() { return "scoped"; }
|
|
@@ -6,7 +6,7 @@ export class SwirlTab {
|
|
|
6
6
|
}
|
|
7
7
|
render() {
|
|
8
8
|
const className = classnames("tab", { "tab--active": this.active });
|
|
9
|
-
return (h(Host, { key: '
|
|
9
|
+
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' })));
|
|
10
10
|
}
|
|
11
11
|
static get is() { return "swirl-tab"; }
|
|
12
12
|
static get encapsulation() { return "shadow"; }
|
|
@@ -54,7 +54,7 @@ export class SwirlTabBar {
|
|
|
54
54
|
? `var(--s-space-${this.paddingBlockStart})`
|
|
55
55
|
: undefined,
|
|
56
56
|
};
|
|
57
|
-
return (h(Host, { key: '
|
|
57
|
+
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) => {
|
|
58
58
|
const className = classnames("tab-bar__tab", {
|
|
59
59
|
"tab-bar__tab--active": tab.active,
|
|
60
60
|
"tab-bar__tab--variant-pill": this.variant === "pill",
|
|
@@ -495,7 +495,7 @@ export class SwirlTable {
|
|
|
495
495
|
"table--show-empty-state": this.empty && !this.loading,
|
|
496
496
|
"table--keyboard-move": this.movingViaKeyboard,
|
|
497
497
|
});
|
|
498
|
-
return (h(Host, { key: '
|
|
498
|
+
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))))))))));
|
|
499
499
|
}
|
|
500
500
|
static get is() { return "swirl-table"; }
|
|
501
501
|
static get encapsulation() { return "scoped"; }
|
|
@@ -17,7 +17,7 @@ export class SwirlTableColumn {
|
|
|
17
17
|
maxWidth: this.maxWidth || "",
|
|
18
18
|
minWidth: this.minWidth || "",
|
|
19
19
|
};
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
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) && " "))));
|
|
21
21
|
}
|
|
22
22
|
static get is() { return "swirl-table-column"; }
|
|
23
23
|
static get encapsulation() { return "shadow"; }
|
|
@@ -32,7 +32,7 @@ export class SwirlTag {
|
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
34
|
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 });
|
|
35
|
-
return (h(Host, { key: '
|
|
35
|
+
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 }))))));
|
|
36
36
|
}
|
|
37
37
|
static get is() { return "swirl-tag"; }
|
|
38
38
|
static get encapsulation() { return "shadow"; }
|
|
@@ -51,7 +51,7 @@ export class SwirlText {
|
|
|
51
51
|
const styles = {
|
|
52
52
|
whiteSpace: truncate ? "nowrap" : this.whiteSpace,
|
|
53
53
|
};
|
|
54
|
-
return (h(Host, { key: '
|
|
54
|
+
return (h(Host, { key: '56f7218ef3a537fec98997d1b14ca35c2c479676' }, h(Tag, { key: 'b921b87fd42122292d4db0368a5aba72e0975f7a', class: className, ref: (el) => (this.textEl = el), style: styles }, h("slot", { key: '7e8f3315ebe21dc4e598c375d300143a519b697e' }))));
|
|
55
55
|
}
|
|
56
56
|
static get is() { return "swirl-text"; }
|
|
57
57
|
static get encapsulation() { return "scoped"; }
|
|
@@ -22,7 +22,7 @@ export class SwirlThumbnail {
|
|
|
22
22
|
"thumbnail--interactive": this.interactive,
|
|
23
23
|
"thumbnail--has-progress": this.progress !== undefined,
|
|
24
24
|
});
|
|
25
|
-
return (h(Host, { key: '
|
|
25
|
+
return (h(Host, { key: '3545b248fde36b1d127a0630cec3cecd45084d81' }, h("span", { key: 'a658cb627ad7f6e66e4d96d28431eb86e46a04d7', class: className, role: "group" }, h(ImageWrapper, { key: '006319ae923bb315143d18ae485f21d6b82dcb82', class: "thumbnail__image-wrapper", onClick: this.thumbnailClick.emit, type: this.interactive ? "button" : undefined }, h("img", { key: 'b10d7bb5ac401faedaebb13ff63efed486f6577c', alt: this.alt, class: "thumbnail__image", loading: "lazy", src: this.src })), this.progress !== undefined && (h("span", { key: '0136b7032f9b20f1ab7239ec571b1f634705b183', class: "thumbnail__progress-indicator" }, h("swirl-progress-indicator", { key: 'a50e4f6e2e0eb6f1f41c2f846fa1883a904d1671', label: this.progressLabel, value: this.progress }))), showButtonGroup && (h("swirl-button-group", { key: '2477bb687307e2167dc4005e46fd56ee393497e3', class: "thumbnail__buttons", segmented: showEditButton && showRemoveButton }, showEditButton && (h("span", { key: 'ebb5fb96bebb157f06a742515d9e98eeea1e6571' }, h("swirl-button", { key: 'c335bd576fb8664fd4d45ab3ae9b0f97ce99a130', hideLabel: true, icon: this.editButtonIcon, label: this.editButtonLabel, onClick: this.edit.emit, pill: this.size === "xl", variant: "on-image" }))), showRemoveButton && (h("span", { key: '3df296ec9f310309d17e53b4868d3f844ef9fcf1' }, h("swirl-button", { key: 'b34c70f969d794844d14a5031f96497dd58e88d8', hideLabel: true, icon: "<swirl-icon-delete></swirl-icon-delete>", label: this.removeButtonLabel, onClick: this.remove.emit, pill: this.size === "xl", variant: "on-image" }))))), showTimestamp && (h("span", { key: 'c65d48def8ed423dc9b48a32612684a86defcd99', class: "thumbnail__timestamp" }, this.timestamp)))));
|
|
26
26
|
}
|
|
27
27
|
static get is() { return "swirl-thumbnail"; }
|
|
28
28
|
static get encapsulation() { return "shadow"; }
|
|
@@ -46,7 +46,7 @@ export class SwirlToast {
|
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
48
|
const className = classnames("toast", `toast--intent-${this.intent}`);
|
|
49
|
-
return (h(Host, { key: '
|
|
49
|
+
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) }))))));
|
|
50
50
|
}
|
|
51
51
|
static get is() { return "swirl-toast"; }
|
|
52
52
|
static get encapsulation() { return "shadow"; }
|
|
@@ -41,7 +41,7 @@ export class SwirlToastProvider {
|
|
|
41
41
|
return newToastWithId;
|
|
42
42
|
}
|
|
43
43
|
render() {
|
|
44
|
-
return (h(Host, { key: '
|
|
44
|
+
return (h(Host, { key: 'ed46f2145bfb6a36b7d7e66206f92aa048b0b0ff', role: "status" }, h("swirl-stack", { key: 'd3302dba7a8f2cd47b77adacb1d6ee51d32b4b85', spacing: "12" }, this.toasts.map((toast) => {
|
|
45
45
|
const props = { ...toast, content: undefined };
|
|
46
46
|
return (h("swirl-toast", { key: toast.toastId, onDismiss: this.onDismiss, ...props }, toast.content));
|
|
47
47
|
}))));
|
|
@@ -55,7 +55,7 @@ export class SwirlToggleGroup {
|
|
|
55
55
|
const className = classnames("toggle-group", `toggle-group--variant-${this.variant}`, {
|
|
56
56
|
"toggle-group--elevated": this.elevated,
|
|
57
57
|
});
|
|
58
|
-
return (h("swirl-stack", { key: '
|
|
58
|
+
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 })));
|
|
59
59
|
}
|
|
60
60
|
static get is() { return "swirl-toggle-group"; }
|
|
61
61
|
static get encapsulation() { return "shadow"; }
|
|
@@ -65,7 +65,7 @@ export class SwirlToolbar {
|
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
render() {
|
|
68
|
-
return (h(Host, { key: '
|
|
68
|
+
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' }))));
|
|
69
69
|
}
|
|
70
70
|
static get is() { return "swirl-toolbar"; }
|
|
71
71
|
static get encapsulation() { return "shadow"; }
|
|
@@ -88,10 +88,9 @@
|
|
|
88
88
|
background-color: var(--s-surface-neutral-default);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
.tooltip--
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
91
|
+
.tooltip--intent-info .tooltip__bubble, .tooltip--intent-info .tooltip__arrow {
|
|
92
|
+
background-color: var(--s-surface-info-default);
|
|
93
|
+
}
|
|
95
94
|
|
|
96
95
|
@keyframes tooltip-fade-in {
|
|
97
96
|
from {
|
|
@@ -6,18 +6,23 @@ export class SwirlTooltip {
|
|
|
6
6
|
constructor() {
|
|
7
7
|
this.active = true;
|
|
8
8
|
this.delay = 200;
|
|
9
|
+
this.intent = "default";
|
|
9
10
|
this.position = "top";
|
|
10
11
|
this.positioning = "absolute";
|
|
11
|
-
|
|
12
|
-
* If set to true, tooltip will be initially visible.
|
|
13
|
-
* It will only be dismissible via a click and will not reappear.
|
|
14
|
-
* Tooltip will have a blue background color.
|
|
15
|
-
*/
|
|
16
|
-
this.isPromo = false;
|
|
12
|
+
this.trigger = ["focus", "hover"];
|
|
17
13
|
this.visible = false;
|
|
18
|
-
this.isPromoShown = false;
|
|
19
14
|
this.onKeydown = (event) => {
|
|
20
|
-
if (event.code === "Escape"
|
|
15
|
+
if (event.code === "Escape") {
|
|
16
|
+
this.hide();
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
this.onFocusIn = () => {
|
|
20
|
+
if (this.trigger.includes("focus")) {
|
|
21
|
+
this.show();
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
this.onFocusOut = () => {
|
|
25
|
+
if (this.trigger.includes("focus")) {
|
|
21
26
|
this.hide();
|
|
22
27
|
}
|
|
23
28
|
};
|
|
@@ -38,20 +43,6 @@ export class SwirlTooltip {
|
|
|
38
43
|
top: Boolean(arrowY) ? arrowY + "px" : undefined,
|
|
39
44
|
};
|
|
40
45
|
};
|
|
41
|
-
this.show = () => {
|
|
42
|
-
if (!this.active || (this.isPromo && this.isPromoShown)) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
this.visible = true;
|
|
46
|
-
requestAnimationFrame(() => {
|
|
47
|
-
const referenceElement = this.el.children[0];
|
|
48
|
-
if (!Boolean(referenceElement)) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
this.reposition();
|
|
52
|
-
this.disableAutoUpdate = autoUpdate(referenceElement, this.popperEl, this.reposition.bind(this));
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
46
|
this.showWithDelay = () => {
|
|
56
47
|
if (!this.active) {
|
|
57
48
|
return;
|
|
@@ -64,14 +55,6 @@ export class SwirlTooltip {
|
|
|
64
55
|
this.show();
|
|
65
56
|
}, this.delay);
|
|
66
57
|
};
|
|
67
|
-
this.hide = () => {
|
|
68
|
-
if (Boolean(this.showTimeout)) {
|
|
69
|
-
clearTimeout(this.showTimeout);
|
|
70
|
-
this.showTimeout = undefined;
|
|
71
|
-
}
|
|
72
|
-
this.visible = false;
|
|
73
|
-
this.disableAutoUpdate?.();
|
|
74
|
-
};
|
|
75
58
|
this.updateOptions = () => {
|
|
76
59
|
const margin = getPixelsFromRemToken("--s-space-12");
|
|
77
60
|
const shiftPaddingY = getPixelsFromRemToken("--s-space-8");
|
|
@@ -98,10 +81,12 @@ export class SwirlTooltip {
|
|
|
98
81
|
this.updateOptions();
|
|
99
82
|
}
|
|
100
83
|
onMouseEnter() {
|
|
101
|
-
this.
|
|
84
|
+
if (this.trigger.includes("hover")) {
|
|
85
|
+
this.showWithDelay();
|
|
86
|
+
}
|
|
102
87
|
}
|
|
103
88
|
onMouseLeave() {
|
|
104
|
-
if (
|
|
89
|
+
if (this.trigger.includes("hover")) {
|
|
105
90
|
this.hide();
|
|
106
91
|
}
|
|
107
92
|
}
|
|
@@ -122,18 +107,35 @@ export class SwirlTooltip {
|
|
|
122
107
|
}
|
|
123
108
|
componentDidLoad() {
|
|
124
109
|
this.updateOptions();
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
110
|
+
}
|
|
111
|
+
async show() {
|
|
112
|
+
if (!this.active) {
|
|
113
|
+
return;
|
|
128
114
|
}
|
|
115
|
+
this.visible = true;
|
|
116
|
+
requestAnimationFrame(() => {
|
|
117
|
+
const referenceElement = this.el.children[0];
|
|
118
|
+
if (!Boolean(referenceElement)) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
this.reposition();
|
|
122
|
+
this.disableAutoUpdate = autoUpdate(referenceElement, this.popperEl, this.reposition.bind(this));
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
async hide() {
|
|
126
|
+
if (Boolean(this.showTimeout)) {
|
|
127
|
+
clearTimeout(this.showTimeout);
|
|
128
|
+
this.showTimeout = undefined;
|
|
129
|
+
}
|
|
130
|
+
this.visible = false;
|
|
131
|
+
this.disableAutoUpdate?.();
|
|
129
132
|
}
|
|
130
133
|
render() {
|
|
131
|
-
const className = classnames("tooltip", `tooltip--actual-placement-${this.actualPosition?.placement}`, {
|
|
134
|
+
const className = classnames("tooltip", `tooltip--actual-placement-${this.actualPosition?.placement}`, `tooltip--intent-${this.intent}`, {
|
|
132
135
|
"tooltip--active": this.active,
|
|
133
136
|
"tooltip--visible": this.visible,
|
|
134
|
-
"tooltip--promo": this.isPromo,
|
|
135
137
|
});
|
|
136
|
-
return (h(Host, { key: '
|
|
138
|
+
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: {
|
|
137
139
|
top: Boolean(this.actualPosition)
|
|
138
140
|
? `${this.actualPosition?.y}px`
|
|
139
141
|
: "",
|
|
@@ -141,7 +143,7 @@ export class SwirlTooltip {
|
|
|
141
143
|
? `${this.actualPosition?.x}px`
|
|
142
144
|
: "",
|
|
143
145
|
position: this.positioning,
|
|
144
|
-
} }, this.visible && (h("span", { key: '
|
|
146
|
+
} }, 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: {
|
|
145
147
|
...this.arrowStyles,
|
|
146
148
|
visibility: this.visible ? "visible" : "hidden",
|
|
147
149
|
} })))));
|
|
@@ -219,6 +221,32 @@ export class SwirlTooltip {
|
|
|
219
221
|
"reflect": false,
|
|
220
222
|
"defaultValue": "200"
|
|
221
223
|
},
|
|
224
|
+
"intent": {
|
|
225
|
+
"type": "string",
|
|
226
|
+
"attribute": "intent",
|
|
227
|
+
"mutable": false,
|
|
228
|
+
"complexType": {
|
|
229
|
+
"original": "SwirlTooltipIntent",
|
|
230
|
+
"resolved": "\"default\" | \"info\"",
|
|
231
|
+
"references": {
|
|
232
|
+
"SwirlTooltipIntent": {
|
|
233
|
+
"location": "local",
|
|
234
|
+
"path": "/home/runner/work/swirl/swirl/packages/swirl-components/src/components/swirl-tooltip/swirl-tooltip.tsx",
|
|
235
|
+
"id": "src/components/swirl-tooltip/swirl-tooltip.tsx::SwirlTooltipIntent"
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"required": false,
|
|
240
|
+
"optional": false,
|
|
241
|
+
"docs": {
|
|
242
|
+
"tags": [],
|
|
243
|
+
"text": ""
|
|
244
|
+
},
|
|
245
|
+
"getter": false,
|
|
246
|
+
"setter": false,
|
|
247
|
+
"reflect": false,
|
|
248
|
+
"defaultValue": "\"default\""
|
|
249
|
+
},
|
|
222
250
|
"position": {
|
|
223
251
|
"type": "string",
|
|
224
252
|
"attribute": "position",
|
|
@@ -271,25 +299,30 @@ export class SwirlTooltip {
|
|
|
271
299
|
"reflect": false,
|
|
272
300
|
"defaultValue": "\"absolute\""
|
|
273
301
|
},
|
|
274
|
-
"
|
|
275
|
-
"type": "
|
|
276
|
-
"attribute": "
|
|
302
|
+
"trigger": {
|
|
303
|
+
"type": "unknown",
|
|
304
|
+
"attribute": "trigger",
|
|
277
305
|
"mutable": false,
|
|
278
306
|
"complexType": {
|
|
279
|
-
"original": "
|
|
280
|
-
"resolved": "
|
|
281
|
-
"references": {
|
|
307
|
+
"original": "SwirlTooltipTrigger[]",
|
|
308
|
+
"resolved": "SwirlTooltipTrigger[]",
|
|
309
|
+
"references": {
|
|
310
|
+
"SwirlTooltipTrigger": {
|
|
311
|
+
"location": "local",
|
|
312
|
+
"path": "/home/runner/work/swirl/swirl/packages/swirl-components/src/components/swirl-tooltip/swirl-tooltip.tsx",
|
|
313
|
+
"id": "src/components/swirl-tooltip/swirl-tooltip.tsx::SwirlTooltipTrigger"
|
|
314
|
+
}
|
|
315
|
+
}
|
|
282
316
|
},
|
|
283
317
|
"required": false,
|
|
284
318
|
"optional": false,
|
|
285
319
|
"docs": {
|
|
286
320
|
"tags": [],
|
|
287
|
-
"text": "
|
|
321
|
+
"text": ""
|
|
288
322
|
},
|
|
289
323
|
"getter": false,
|
|
290
324
|
"setter": false,
|
|
291
|
-
"
|
|
292
|
-
"defaultValue": "false"
|
|
325
|
+
"defaultValue": "[\"focus\", \"hover\"]"
|
|
293
326
|
}
|
|
294
327
|
};
|
|
295
328
|
}
|
|
@@ -297,8 +330,49 @@ export class SwirlTooltip {
|
|
|
297
330
|
return {
|
|
298
331
|
"actualPosition": {},
|
|
299
332
|
"arrowStyles": {},
|
|
300
|
-
"visible": {}
|
|
301
|
-
|
|
333
|
+
"visible": {}
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
static get methods() {
|
|
337
|
+
return {
|
|
338
|
+
"show": {
|
|
339
|
+
"complexType": {
|
|
340
|
+
"signature": "() => Promise<void>",
|
|
341
|
+
"parameters": [],
|
|
342
|
+
"references": {
|
|
343
|
+
"Promise": {
|
|
344
|
+
"location": "global",
|
|
345
|
+
"id": "global::Promise"
|
|
346
|
+
},
|
|
347
|
+
"HTMLElement": {
|
|
348
|
+
"location": "global",
|
|
349
|
+
"id": "global::HTMLElement"
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
"return": "Promise<void>"
|
|
353
|
+
},
|
|
354
|
+
"docs": {
|
|
355
|
+
"text": "",
|
|
356
|
+
"tags": []
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
"hide": {
|
|
360
|
+
"complexType": {
|
|
361
|
+
"signature": "() => Promise<void>",
|
|
362
|
+
"parameters": [],
|
|
363
|
+
"references": {
|
|
364
|
+
"Promise": {
|
|
365
|
+
"location": "global",
|
|
366
|
+
"id": "global::Promise"
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
"return": "Promise<void>"
|
|
370
|
+
},
|
|
371
|
+
"docs": {
|
|
372
|
+
"text": "",
|
|
373
|
+
"tags": []
|
|
374
|
+
}
|
|
375
|
+
}
|
|
302
376
|
};
|
|
303
377
|
}
|
|
304
378
|
static get elementRef() { return "el"; }
|