@getflip/swirl-components 0.379.4 → 0.381.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 +15 -7
- package/dist/cjs/swirl-badge.cjs.entry.js +2 -2
- package/dist/cjs/swirl-text.cjs.entry.js +2 -2
- package/dist/collection/components/swirl-badge/swirl-badge.css +5 -0
- package/dist/collection/components/swirl-badge/swirl-badge.js +2 -2
- package/dist/collection/components/swirl-text/swirl-text.css +4 -0
- package/dist/collection/components/swirl-text/swirl-text.js +2 -2
- package/dist/components/assets/pdfjs/pdf.worker.min.mjs +1 -1
- package/dist/components/swirl-badge2.js +2 -2
- package/dist/components/swirl-text2.js +2 -2
- package/dist/esm/swirl-badge.entry.js +2 -2
- package/dist/esm/swirl-text.entry.js +2 -2
- package/dist/swirl-components/{p-a9c611fd.entry.js → p-92603aaf.entry.js} +1 -1
- package/dist/swirl-components/{p-53af686f.entry.js → p-f0ec03dc.entry.js} +2 -2
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/dist/types/components/swirl-badge/swirl-badge.d.ts +1 -1
- package/dist/types/components/swirl-text/swirl-text.d.ts +1 -1
- package/package.json +1 -1
- package/vscode-data.json +6 -0
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, h, Host, Fragment } from '@stencil/cor
|
|
|
2
2
|
import { c as classNames } from './index2.js';
|
|
3
3
|
import { d as defineCustomElement$1 } from './swirl-visually-hidden2.js';
|
|
4
4
|
|
|
5
|
-
const swirlBadgeCss = ":host{display:inline-flex;min-width:0;max-width:100%;justify-content:center;align-items:center}:host *{box-sizing:border-box}.badge{display:inline-flex;max-width:100%;justify-content:center;align-items:center;border-radius:2rem;color:var(--s-text-on-status);font-size:var(--s-font-size-sm);font-weight:var(--s-font-weight-medium);box-shadow:0 0 0 0.125rem var(--swirl-badge-border-color)}.badge--size-xs{min-width:1rem;height:1rem;font-size:0.6875rem}.badge--size-xs .badge__label{padding-right:0.25rem;padding-left:0.25rem}.badge--size-xs .badge__icon>swirl-icon,.badge--size-xs .badge__icon>*::part(icon){width:0.75rem;height:0.75rem}.badge--size-s{min-width:1.25rem;height:1.25rem;font-size:0.75rem}.badge--size-s .badge__label{padding-right:0.375rem;padding-left:0.375rem}.badge--size-s .badge__icon>swirl-icon,.badge--size-s .badge__icon>*::part(icon){width:1rem;height:1rem}.badge--size-m{min-width:1.5rem;height:1.5rem}.badge--size-m .badge__label{padding-right:0.4375rem;padding-left:0.4375rem}.badge--has-icon{padding-right:0;padding-left:0}.badge--intent-critical{color:var(--s-text-on-status);background-color:var(--s-surface-critical-default)}.badge--intent-banana{color:var(--s-text-dark);background-color:var(--s-decorative-banana-surface)}.badge--intent-blueberry{color:var(--s-text-on-status);background-color:var(--s-decorative-blueberry-surface)}.badge--intent-chilli{color:var(--s-text-on-status);background-color:var(--s-decorative-chilli-surface)}.badge--intent-grape{color:var(--s-text-on-status);background-color:var(--s-decorative-grape-surface)}.badge--intent-info{color:var(--s-text-on-status);background-color:var(--s-surface-info-default)}.badge--intent-kiwi{color:var(--s-text-on-status);background-color:var(--s-decorative-kiwi-surface)}.badge--intent-neutral{color:var(--s-text-default);background-color:var(--s-surface-neutral-subdued)}.badge--intent-pumpkin{color:var(--s-text-dark);background-color:var(--s-decorative-pumpkin-surface)}.badge--intent-radish{color:var(--s-text-on-status);background-color:var(--s-decorative-radish-surface)}.badge--variant-dot{width:1.5rem;min-width:0;height:1.5rem}.badge--variant-dot.badge--size-xs{width:0.5rem;height:0.5rem}.badge--variant-dot.badge--size-s{width:0.75rem;height:0.75rem}.badge--variant-dot.badge--size-m{width:1rem;height:1rem}.badge--variant-dot .badge__label{padding-right:0;padding-left:0}.badge--variant-dot .badge__icon{display:none}.badge__icon{display:inline-flex}.badge__icon>swirl-icon,.badge__icon>*::part(icon){width:1rem;height:1rem}.badge__label{display:inline-flex;overflow:hidden;max-width:100%;white-space:nowrap;text-overflow:ellipsis}";
|
|
5
|
+
const swirlBadgeCss = ":host{display:inline-flex;min-width:0;max-width:100%;justify-content:center;align-items:center}:host *{box-sizing:border-box}.badge{display:inline-flex;max-width:100%;justify-content:center;align-items:center;border-radius:2rem;color:var(--s-text-on-status);font-size:var(--s-font-size-sm);font-weight:var(--s-font-weight-medium);box-shadow:0 0 0 0.125rem var(--swirl-badge-border-color)}.badge--size-xs{min-width:1rem;height:1rem;font-size:0.6875rem}.badge--size-xs .badge__label{padding-right:0.25rem;padding-left:0.25rem}.badge--size-xs .badge__icon>swirl-icon,.badge--size-xs .badge__icon>*::part(icon){width:0.75rem;height:0.75rem}.badge--size-s{min-width:1.25rem;height:1.25rem;font-size:0.75rem}.badge--size-s .badge__label{padding-right:0.375rem;padding-left:0.375rem}.badge--size-s .badge__icon>swirl-icon,.badge--size-s .badge__icon>*::part(icon){width:1rem;height:1rem}.badge--size-m{min-width:1.5rem;height:1.5rem}.badge--size-m .badge__label{padding-right:0.4375rem;padding-left:0.4375rem}.badge--has-icon{padding-right:0;padding-left:0}.badge--intent-critical{color:var(--s-text-on-status);background-color:var(--s-surface-critical-default)}.badge--intent-banana{color:var(--s-text-dark);background-color:var(--s-decorative-banana-surface)}.badge--intent-blueberry{color:var(--s-text-on-status);background-color:var(--s-decorative-blueberry-surface)}.badge--intent-chilli{color:var(--s-text-on-status);background-color:var(--s-decorative-chilli-surface)}.badge--intent-grape{color:var(--s-text-on-status);background-color:var(--s-decorative-grape-surface)}.badge--intent-info{color:var(--s-text-on-status);background-color:var(--s-surface-info-default)}.badge--intent-kiwi{color:var(--s-text-on-status);background-color:var(--s-decorative-kiwi-surface)}.badge--intent-neutral{color:var(--s-text-default);background-color:var(--s-surface-neutral-subdued)}.badge--intent-pumpkin{color:var(--s-text-dark);background-color:var(--s-decorative-pumpkin-surface)}.badge--intent-radish{color:var(--s-text-on-status);background-color:var(--s-decorative-radish-surface)}.badge--intent-strong{color:var(--s-text-on-status);background-color:var(--s-interactive-neutral-default)}.badge--variant-dot{width:1.5rem;min-width:0;height:1.5rem}.badge--variant-dot.badge--size-xs{width:0.5rem;height:0.5rem}.badge--variant-dot.badge--size-s{width:0.75rem;height:0.75rem}.badge--variant-dot.badge--size-m{width:1rem;height:1rem}.badge--variant-dot .badge__label{padding-right:0;padding-left:0}.badge--variant-dot .badge__icon{display:none}.badge__icon{display:inline-flex}.badge__icon>swirl-icon,.badge__icon>*::part(icon){width:1rem;height:1rem}.badge__label{display:inline-flex;overflow:hidden;max-width:100%;white-space:nowrap;text-overflow:ellipsis}";
|
|
6
6
|
|
|
7
7
|
const SwirlBadge = /*@__PURE__*/ proxyCustomElement(class SwirlBadge extends HTMLElement {
|
|
8
8
|
constructor() {
|
|
@@ -17,7 +17,7 @@ const SwirlBadge = /*@__PURE__*/ proxyCustomElement(class SwirlBadge extends HTM
|
|
|
17
17
|
const className = classNames("badge", `badge--intent-${this.intent}`, `badge--size-${this.size}`, `badge--variant-${this.variant}`, {
|
|
18
18
|
"badge--has-icon": this.icon,
|
|
19
19
|
});
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: '3d64f76fe54264451a966d8bb9aa044efd744939', role: "status" }, h("span", { key: '918618864bcfd9cd017aecb390608a8d454218a4', class: className, part: "badge" }, this.icon && h("span", { key: '5488528c85b4851f98cfb6a6f61f0030f4dfab3c', class: "badge__icon", innerHTML: this.icon }), this.icon === undefined && this.variant !== "dot" ? (h("span", { class: "badge__label" }, this.label)) : (h(Fragment, null, this.icon === undefined && (h("span", { class: "badge__label" }, "\u00A0")), h("swirl-visually-hidden", null, this.label))))));
|
|
21
21
|
}
|
|
22
22
|
static get style() { return swirlBadgeCss; }
|
|
23
23
|
}, [1, "swirl-badge", {
|
|
@@ -934,7 +934,7 @@ function shave(target, maxHeight, opts) {
|
|
|
934
934
|
}
|
|
935
935
|
}
|
|
936
936
|
|
|
937
|
-
const swirlTextCss = ".sc-swirl-text-h{display:block;max-width:100%}.sc-swirl-text-h *.sc-swirl-text{box-sizing:border-box}.text.sc-swirl-text{overflow:hidden;margin:0;padding:0}.text--align-start.sc-swirl-text{text-align:start}.text--align-center.sc-swirl-text{text-align:center}.text--align-end.sc-swirl-text{text-align:end}.text--color-default.sc-swirl-text{color:var(--s-text-default)}.text--color-highlight.sc-swirl-text{color:var(--s-text-highlight)}.text--color-on-action-primary.sc-swirl-text{color:var(--s-text-on-action-primary)}.text--color-on-image.sc-swirl-text{color:var(--s-text-on-image)}.text--color-on-status.sc-swirl-text{color:var(--s-text-on-status)}.text--color-on-surface-highlight.sc-swirl-text{color:var(--s-text-on-surface-highlight)}.text--color-on-surface-highlight-subdued.sc-swirl-text{color:var(--s-text-on-surface-highlight-subdued)}.text--color-subdued.sc-swirl-text{color:var(--s-text-subdued)}.text--color-critical.sc-swirl-text{color:var(--s-text-critical)}.text--color-success.sc-swirl-text{color:var(--s-text-success)}.text--color-warning.sc-swirl-text{color:var(--s-text-warning)}.text--size-xs.sc-swirl-text{font-size:var(--s-font-size-xs);line-height:var(--s-line-height-xs)}.text--size-sm.sc-swirl-text{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}.text--size-base.sc-swirl-text{font-size:var(--s-font-size-base);line-height:var(--s-line-height-base)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text--size-base.text--responsive.sc-swirl-text{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.text--size-lg.sc-swirl-text{font-size:var(--s-font-size-lg);line-height:var(--s-line-height-lg)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text--size-lg.text--responsive.sc-swirl-text{font-size:var(--s-font-size-base);line-height:var(--s-line-height-base)}}.text--size-xl.sc-swirl-text{font-size:var(--s-font-size-xl);line-height:var(--s-line-height-xl)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text--size-xl.text--responsive.sc-swirl-text{font-size:var(--s-font-size-lg);line-height:var(--s-line-height-lg)}}.text--size-2xl.sc-swirl-text{font-size:var(--s-font-size-2xl);line-height:var(--s-line-height-2xl)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text--size-2xl.text--responsive.sc-swirl-text{font-size:var(--s-font-size-xl);line-height:var(--s-line-height-xl)}}.text--weight-normal.sc-swirl-text{font-weight:var(--s-font-weight-normal)}.text--weight-medium.sc-swirl-text{font-weight:var(--s-font-weight-medium)}.text--weight-semibold.sc-swirl-text{font-weight:var(--s-font-weight-semibold)}.text--weight-bold.sc-swirl-text{font-weight:var(--s-font-weight-bold)}.text--font-style-normal.sc-swirl-text{font-style:normal}.text--font-style-italic.sc-swirl-text{font-style:italic}.text--font-family-code.sc-swirl-text{font-family:var(--s-font-family-code)}.text--truncate.sc-swirl-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.text--truncate-direction-start.sc-swirl-text{direction:rtl;text-align:left}";
|
|
937
|
+
const swirlTextCss = ".sc-swirl-text-h{display:block;max-width:100%}.sc-swirl-text-h *.sc-swirl-text{box-sizing:border-box}.text.sc-swirl-text{overflow:hidden;margin:0;padding:0}.text--align-start.sc-swirl-text{text-align:start}.text--align-center.sc-swirl-text{text-align:center}.text--align-end.sc-swirl-text{text-align:end}.text--color-default.sc-swirl-text{color:var(--s-text-default)}.text--color-disabled.sc-swirl-text{color:var(--s-text-disabled)}.text--color-highlight.sc-swirl-text{color:var(--s-text-highlight)}.text--color-on-action-primary.sc-swirl-text{color:var(--s-text-on-action-primary)}.text--color-on-image.sc-swirl-text{color:var(--s-text-on-image)}.text--color-on-status.sc-swirl-text{color:var(--s-text-on-status)}.text--color-on-surface-highlight.sc-swirl-text{color:var(--s-text-on-surface-highlight)}.text--color-on-surface-highlight-subdued.sc-swirl-text{color:var(--s-text-on-surface-highlight-subdued)}.text--color-subdued.sc-swirl-text{color:var(--s-text-subdued)}.text--color-critical.sc-swirl-text{color:var(--s-text-critical)}.text--color-success.sc-swirl-text{color:var(--s-text-success)}.text--color-warning.sc-swirl-text{color:var(--s-text-warning)}.text--size-xs.sc-swirl-text{font-size:var(--s-font-size-xs);line-height:var(--s-line-height-xs)}.text--size-sm.sc-swirl-text{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}.text--size-base.sc-swirl-text{font-size:var(--s-font-size-base);line-height:var(--s-line-height-base)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text--size-base.text--responsive.sc-swirl-text{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.text--size-lg.sc-swirl-text{font-size:var(--s-font-size-lg);line-height:var(--s-line-height-lg)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text--size-lg.text--responsive.sc-swirl-text{font-size:var(--s-font-size-base);line-height:var(--s-line-height-base)}}.text--size-xl.sc-swirl-text{font-size:var(--s-font-size-xl);line-height:var(--s-line-height-xl)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text--size-xl.text--responsive.sc-swirl-text{font-size:var(--s-font-size-lg);line-height:var(--s-line-height-lg)}}.text--size-2xl.sc-swirl-text{font-size:var(--s-font-size-2xl);line-height:var(--s-line-height-2xl)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text--size-2xl.text--responsive.sc-swirl-text{font-size:var(--s-font-size-xl);line-height:var(--s-line-height-xl)}}.text--weight-normal.sc-swirl-text{font-weight:var(--s-font-weight-normal)}.text--weight-medium.sc-swirl-text{font-weight:var(--s-font-weight-medium)}.text--weight-semibold.sc-swirl-text{font-weight:var(--s-font-weight-semibold)}.text--weight-bold.sc-swirl-text{font-weight:var(--s-font-weight-bold)}.text--font-style-normal.sc-swirl-text{font-style:normal}.text--font-style-italic.sc-swirl-text{font-style:italic}.text--font-family-code.sc-swirl-text{font-family:var(--s-font-family-code)}.text--truncate.sc-swirl-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.text--truncate-direction-start.sc-swirl-text{direction:rtl;text-align:left}";
|
|
938
938
|
|
|
939
939
|
const SwirlText = /*@__PURE__*/ proxyCustomElement(class SwirlText extends HTMLElement {
|
|
940
940
|
constructor() {
|
|
@@ -987,7 +987,7 @@ const SwirlText = /*@__PURE__*/ proxyCustomElement(class SwirlText extends HTMLE
|
|
|
987
987
|
const styles = {
|
|
988
988
|
whiteSpace: truncate ? "nowrap" : this.whiteSpace,
|
|
989
989
|
};
|
|
990
|
-
return (h(Host, { key: '
|
|
990
|
+
return (h(Host, { key: 'a635ca2f4d4b7afc4e4d4fceb0e995823e6cebdd' }, h(Tag, { key: 'e9cb49646443c597aa220a12ad0ce008aef9617e', class: className, ref: (el) => (this.textEl = el), style: styles }, h("slot", { key: '33a7c292355d29886765808a120f1ead1dd43ab7' }))));
|
|
991
991
|
}
|
|
992
992
|
get el() { return this; }
|
|
993
993
|
static get style() { return swirlTextCss; }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, F as Fragment, H as Host } from './index-CWOhMVtL.js';
|
|
2
2
|
import { c as classnames } from './index-orsBiyT_.js';
|
|
3
3
|
|
|
4
|
-
const swirlBadgeCss = ":host{display:inline-flex;min-width:0;max-width:100%;justify-content:center;align-items:center}:host *{box-sizing:border-box}.badge{display:inline-flex;max-width:100%;justify-content:center;align-items:center;border-radius:2rem;color:var(--s-text-on-status);font-size:var(--s-font-size-sm);font-weight:var(--s-font-weight-medium);box-shadow:0 0 0 0.125rem var(--swirl-badge-border-color)}.badge--size-xs{min-width:1rem;height:1rem;font-size:0.6875rem}.badge--size-xs .badge__label{padding-right:0.25rem;padding-left:0.25rem}.badge--size-xs .badge__icon>swirl-icon,.badge--size-xs .badge__icon>*::part(icon){width:0.75rem;height:0.75rem}.badge--size-s{min-width:1.25rem;height:1.25rem;font-size:0.75rem}.badge--size-s .badge__label{padding-right:0.375rem;padding-left:0.375rem}.badge--size-s .badge__icon>swirl-icon,.badge--size-s .badge__icon>*::part(icon){width:1rem;height:1rem}.badge--size-m{min-width:1.5rem;height:1.5rem}.badge--size-m .badge__label{padding-right:0.4375rem;padding-left:0.4375rem}.badge--has-icon{padding-right:0;padding-left:0}.badge--intent-critical{color:var(--s-text-on-status);background-color:var(--s-surface-critical-default)}.badge--intent-banana{color:var(--s-text-dark);background-color:var(--s-decorative-banana-surface)}.badge--intent-blueberry{color:var(--s-text-on-status);background-color:var(--s-decorative-blueberry-surface)}.badge--intent-chilli{color:var(--s-text-on-status);background-color:var(--s-decorative-chilli-surface)}.badge--intent-grape{color:var(--s-text-on-status);background-color:var(--s-decorative-grape-surface)}.badge--intent-info{color:var(--s-text-on-status);background-color:var(--s-surface-info-default)}.badge--intent-kiwi{color:var(--s-text-on-status);background-color:var(--s-decorative-kiwi-surface)}.badge--intent-neutral{color:var(--s-text-default);background-color:var(--s-surface-neutral-subdued)}.badge--intent-pumpkin{color:var(--s-text-dark);background-color:var(--s-decorative-pumpkin-surface)}.badge--intent-radish{color:var(--s-text-on-status);background-color:var(--s-decorative-radish-surface)}.badge--variant-dot{width:1.5rem;min-width:0;height:1.5rem}.badge--variant-dot.badge--size-xs{width:0.5rem;height:0.5rem}.badge--variant-dot.badge--size-s{width:0.75rem;height:0.75rem}.badge--variant-dot.badge--size-m{width:1rem;height:1rem}.badge--variant-dot .badge__label{padding-right:0;padding-left:0}.badge--variant-dot .badge__icon{display:none}.badge__icon{display:inline-flex}.badge__icon>swirl-icon,.badge__icon>*::part(icon){width:1rem;height:1rem}.badge__label{display:inline-flex;overflow:hidden;max-width:100%;white-space:nowrap;text-overflow:ellipsis}";
|
|
4
|
+
const swirlBadgeCss = ":host{display:inline-flex;min-width:0;max-width:100%;justify-content:center;align-items:center}:host *{box-sizing:border-box}.badge{display:inline-flex;max-width:100%;justify-content:center;align-items:center;border-radius:2rem;color:var(--s-text-on-status);font-size:var(--s-font-size-sm);font-weight:var(--s-font-weight-medium);box-shadow:0 0 0 0.125rem var(--swirl-badge-border-color)}.badge--size-xs{min-width:1rem;height:1rem;font-size:0.6875rem}.badge--size-xs .badge__label{padding-right:0.25rem;padding-left:0.25rem}.badge--size-xs .badge__icon>swirl-icon,.badge--size-xs .badge__icon>*::part(icon){width:0.75rem;height:0.75rem}.badge--size-s{min-width:1.25rem;height:1.25rem;font-size:0.75rem}.badge--size-s .badge__label{padding-right:0.375rem;padding-left:0.375rem}.badge--size-s .badge__icon>swirl-icon,.badge--size-s .badge__icon>*::part(icon){width:1rem;height:1rem}.badge--size-m{min-width:1.5rem;height:1.5rem}.badge--size-m .badge__label{padding-right:0.4375rem;padding-left:0.4375rem}.badge--has-icon{padding-right:0;padding-left:0}.badge--intent-critical{color:var(--s-text-on-status);background-color:var(--s-surface-critical-default)}.badge--intent-banana{color:var(--s-text-dark);background-color:var(--s-decorative-banana-surface)}.badge--intent-blueberry{color:var(--s-text-on-status);background-color:var(--s-decorative-blueberry-surface)}.badge--intent-chilli{color:var(--s-text-on-status);background-color:var(--s-decorative-chilli-surface)}.badge--intent-grape{color:var(--s-text-on-status);background-color:var(--s-decorative-grape-surface)}.badge--intent-info{color:var(--s-text-on-status);background-color:var(--s-surface-info-default)}.badge--intent-kiwi{color:var(--s-text-on-status);background-color:var(--s-decorative-kiwi-surface)}.badge--intent-neutral{color:var(--s-text-default);background-color:var(--s-surface-neutral-subdued)}.badge--intent-pumpkin{color:var(--s-text-dark);background-color:var(--s-decorative-pumpkin-surface)}.badge--intent-radish{color:var(--s-text-on-status);background-color:var(--s-decorative-radish-surface)}.badge--intent-strong{color:var(--s-text-on-status);background-color:var(--s-interactive-neutral-default)}.badge--variant-dot{width:1.5rem;min-width:0;height:1.5rem}.badge--variant-dot.badge--size-xs{width:0.5rem;height:0.5rem}.badge--variant-dot.badge--size-s{width:0.75rem;height:0.75rem}.badge--variant-dot.badge--size-m{width:1rem;height:1rem}.badge--variant-dot .badge__label{padding-right:0;padding-left:0}.badge--variant-dot .badge__icon{display:none}.badge__icon{display:inline-flex}.badge__icon>swirl-icon,.badge__icon>*::part(icon){width:1rem;height:1rem}.badge__label{display:inline-flex;overflow:hidden;max-width:100%;white-space:nowrap;text-overflow:ellipsis}";
|
|
5
5
|
|
|
6
6
|
const SwirlBadge = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -14,7 +14,7 @@ const SwirlBadge = class {
|
|
|
14
14
|
const className = classnames("badge", `badge--intent-${this.intent}`, `badge--size-${this.size}`, `badge--variant-${this.variant}`, {
|
|
15
15
|
"badge--has-icon": this.icon,
|
|
16
16
|
});
|
|
17
|
-
return (h(Host, { key: '
|
|
17
|
+
return (h(Host, { key: '3d64f76fe54264451a966d8bb9aa044efd744939', role: "status" }, h("span", { key: '918618864bcfd9cd017aecb390608a8d454218a4', class: className, part: "badge" }, this.icon && h("span", { key: '5488528c85b4851f98cfb6a6f61f0030f4dfab3c', class: "badge__icon", innerHTML: this.icon }), this.icon === undefined && this.variant !== "dot" ? (h("span", { class: "badge__label" }, this.label)) : (h(Fragment, null, this.icon === undefined && (h("span", { class: "badge__label" }, "\u00A0")), h("swirl-visually-hidden", null, this.label))))));
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
SwirlBadge.style = swirlBadgeCss;
|
|
@@ -934,7 +934,7 @@ function shave(target, maxHeight, opts) {
|
|
|
934
934
|
}
|
|
935
935
|
}
|
|
936
936
|
|
|
937
|
-
const swirlTextCss = ".sc-swirl-text-h{display:block;max-width:100%}.sc-swirl-text-h *.sc-swirl-text{box-sizing:border-box}.text.sc-swirl-text{overflow:hidden;margin:0;padding:0}.text--align-start.sc-swirl-text{text-align:start}.text--align-center.sc-swirl-text{text-align:center}.text--align-end.sc-swirl-text{text-align:end}.text--color-default.sc-swirl-text{color:var(--s-text-default)}.text--color-highlight.sc-swirl-text{color:var(--s-text-highlight)}.text--color-on-action-primary.sc-swirl-text{color:var(--s-text-on-action-primary)}.text--color-on-image.sc-swirl-text{color:var(--s-text-on-image)}.text--color-on-status.sc-swirl-text{color:var(--s-text-on-status)}.text--color-on-surface-highlight.sc-swirl-text{color:var(--s-text-on-surface-highlight)}.text--color-on-surface-highlight-subdued.sc-swirl-text{color:var(--s-text-on-surface-highlight-subdued)}.text--color-subdued.sc-swirl-text{color:var(--s-text-subdued)}.text--color-critical.sc-swirl-text{color:var(--s-text-critical)}.text--color-success.sc-swirl-text{color:var(--s-text-success)}.text--color-warning.sc-swirl-text{color:var(--s-text-warning)}.text--size-xs.sc-swirl-text{font-size:var(--s-font-size-xs);line-height:var(--s-line-height-xs)}.text--size-sm.sc-swirl-text{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}.text--size-base.sc-swirl-text{font-size:var(--s-font-size-base);line-height:var(--s-line-height-base)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text--size-base.text--responsive.sc-swirl-text{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.text--size-lg.sc-swirl-text{font-size:var(--s-font-size-lg);line-height:var(--s-line-height-lg)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text--size-lg.text--responsive.sc-swirl-text{font-size:var(--s-font-size-base);line-height:var(--s-line-height-base)}}.text--size-xl.sc-swirl-text{font-size:var(--s-font-size-xl);line-height:var(--s-line-height-xl)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text--size-xl.text--responsive.sc-swirl-text{font-size:var(--s-font-size-lg);line-height:var(--s-line-height-lg)}}.text--size-2xl.sc-swirl-text{font-size:var(--s-font-size-2xl);line-height:var(--s-line-height-2xl)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text--size-2xl.text--responsive.sc-swirl-text{font-size:var(--s-font-size-xl);line-height:var(--s-line-height-xl)}}.text--weight-normal.sc-swirl-text{font-weight:var(--s-font-weight-normal)}.text--weight-medium.sc-swirl-text{font-weight:var(--s-font-weight-medium)}.text--weight-semibold.sc-swirl-text{font-weight:var(--s-font-weight-semibold)}.text--weight-bold.sc-swirl-text{font-weight:var(--s-font-weight-bold)}.text--font-style-normal.sc-swirl-text{font-style:normal}.text--font-style-italic.sc-swirl-text{font-style:italic}.text--font-family-code.sc-swirl-text{font-family:var(--s-font-family-code)}.text--truncate.sc-swirl-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.text--truncate-direction-start.sc-swirl-text{direction:rtl;text-align:left}";
|
|
937
|
+
const swirlTextCss = ".sc-swirl-text-h{display:block;max-width:100%}.sc-swirl-text-h *.sc-swirl-text{box-sizing:border-box}.text.sc-swirl-text{overflow:hidden;margin:0;padding:0}.text--align-start.sc-swirl-text{text-align:start}.text--align-center.sc-swirl-text{text-align:center}.text--align-end.sc-swirl-text{text-align:end}.text--color-default.sc-swirl-text{color:var(--s-text-default)}.text--color-disabled.sc-swirl-text{color:var(--s-text-disabled)}.text--color-highlight.sc-swirl-text{color:var(--s-text-highlight)}.text--color-on-action-primary.sc-swirl-text{color:var(--s-text-on-action-primary)}.text--color-on-image.sc-swirl-text{color:var(--s-text-on-image)}.text--color-on-status.sc-swirl-text{color:var(--s-text-on-status)}.text--color-on-surface-highlight.sc-swirl-text{color:var(--s-text-on-surface-highlight)}.text--color-on-surface-highlight-subdued.sc-swirl-text{color:var(--s-text-on-surface-highlight-subdued)}.text--color-subdued.sc-swirl-text{color:var(--s-text-subdued)}.text--color-critical.sc-swirl-text{color:var(--s-text-critical)}.text--color-success.sc-swirl-text{color:var(--s-text-success)}.text--color-warning.sc-swirl-text{color:var(--s-text-warning)}.text--size-xs.sc-swirl-text{font-size:var(--s-font-size-xs);line-height:var(--s-line-height-xs)}.text--size-sm.sc-swirl-text{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}.text--size-base.sc-swirl-text{font-size:var(--s-font-size-base);line-height:var(--s-line-height-base)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text--size-base.text--responsive.sc-swirl-text{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.text--size-lg.sc-swirl-text{font-size:var(--s-font-size-lg);line-height:var(--s-line-height-lg)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text--size-lg.text--responsive.sc-swirl-text{font-size:var(--s-font-size-base);line-height:var(--s-line-height-base)}}.text--size-xl.sc-swirl-text{font-size:var(--s-font-size-xl);line-height:var(--s-line-height-xl)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text--size-xl.text--responsive.sc-swirl-text{font-size:var(--s-font-size-lg);line-height:var(--s-line-height-lg)}}.text--size-2xl.sc-swirl-text{font-size:var(--s-font-size-2xl);line-height:var(--s-line-height-2xl)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text--size-2xl.text--responsive.sc-swirl-text{font-size:var(--s-font-size-xl);line-height:var(--s-line-height-xl)}}.text--weight-normal.sc-swirl-text{font-weight:var(--s-font-weight-normal)}.text--weight-medium.sc-swirl-text{font-weight:var(--s-font-weight-medium)}.text--weight-semibold.sc-swirl-text{font-weight:var(--s-font-weight-semibold)}.text--weight-bold.sc-swirl-text{font-weight:var(--s-font-weight-bold)}.text--font-style-normal.sc-swirl-text{font-style:normal}.text--font-style-italic.sc-swirl-text{font-style:italic}.text--font-family-code.sc-swirl-text{font-family:var(--s-font-family-code)}.text--truncate.sc-swirl-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.text--truncate-direction-start.sc-swirl-text{direction:rtl;text-align:left}";
|
|
938
938
|
|
|
939
939
|
const SwirlText = class {
|
|
940
940
|
constructor(hostRef) {
|
|
@@ -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: 'a635ca2f4d4b7afc4e4d4fceb0e995823e6cebdd' }, h(Tag, { key: 'e9cb49646443c597aa220a12ad0ce008aef9617e', class: className, ref: (el) => (this.textEl = el), style: styles }, h("slot", { key: '33a7c292355d29886765808a120f1ead1dd43ab7' }))));
|
|
990
990
|
}
|
|
991
991
|
get el() { return getElement(this); }
|
|
992
992
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as a,F as
|
|
1
|
+
import{r as e,h as a,F as t,H as i}from"./p-CWOhMVtL.js";import{c as r}from"./p-orsBiyT_.js";const s=class{constructor(a){e(this,a),this.intent="critical",this.size="m",this.variant="default"}render(){const e=r("badge",`badge--intent-${this.intent}`,`badge--size-${this.size}`,`badge--variant-${this.variant}`,{"badge--has-icon":this.icon});return a(i,{key:"3d64f76fe54264451a966d8bb9aa044efd744939",role:"status"},a("span",{key:"918618864bcfd9cd017aecb390608a8d454218a4",class:e,part:"badge"},this.icon&&a("span",{key:"5488528c85b4851f98cfb6a6f61f0030f4dfab3c",class:"badge__icon",innerHTML:this.icon}),void 0===this.icon&&"dot"!==this.variant?a("span",{class:"badge__label"},this.label):a(t,null,void 0===this.icon&&a("span",{class:"badge__label"}," "),a("swirl-visually-hidden",null,this.label))))}};s.style=":host{display:inline-flex;min-width:0;max-width:100%;justify-content:center;align-items:center}:host *{box-sizing:border-box}.badge{display:inline-flex;max-width:100%;justify-content:center;align-items:center;border-radius:2rem;color:var(--s-text-on-status);font-size:var(--s-font-size-sm);font-weight:var(--s-font-weight-medium);box-shadow:0 0 0 0.125rem var(--swirl-badge-border-color)}.badge--size-xs{min-width:1rem;height:1rem;font-size:0.6875rem}.badge--size-xs .badge__label{padding-right:0.25rem;padding-left:0.25rem}.badge--size-xs .badge__icon>swirl-icon,.badge--size-xs .badge__icon>*::part(icon){width:0.75rem;height:0.75rem}.badge--size-s{min-width:1.25rem;height:1.25rem;font-size:0.75rem}.badge--size-s .badge__label{padding-right:0.375rem;padding-left:0.375rem}.badge--size-s .badge__icon>swirl-icon,.badge--size-s .badge__icon>*::part(icon){width:1rem;height:1rem}.badge--size-m{min-width:1.5rem;height:1.5rem}.badge--size-m .badge__label{padding-right:0.4375rem;padding-left:0.4375rem}.badge--has-icon{padding-right:0;padding-left:0}.badge--intent-critical{color:var(--s-text-on-status);background-color:var(--s-surface-critical-default)}.badge--intent-banana{color:var(--s-text-dark);background-color:var(--s-decorative-banana-surface)}.badge--intent-blueberry{color:var(--s-text-on-status);background-color:var(--s-decorative-blueberry-surface)}.badge--intent-chilli{color:var(--s-text-on-status);background-color:var(--s-decorative-chilli-surface)}.badge--intent-grape{color:var(--s-text-on-status);background-color:var(--s-decorative-grape-surface)}.badge--intent-info{color:var(--s-text-on-status);background-color:var(--s-surface-info-default)}.badge--intent-kiwi{color:var(--s-text-on-status);background-color:var(--s-decorative-kiwi-surface)}.badge--intent-neutral{color:var(--s-text-default);background-color:var(--s-surface-neutral-subdued)}.badge--intent-pumpkin{color:var(--s-text-dark);background-color:var(--s-decorative-pumpkin-surface)}.badge--intent-radish{color:var(--s-text-on-status);background-color:var(--s-decorative-radish-surface)}.badge--intent-strong{color:var(--s-text-on-status);background-color:var(--s-interactive-neutral-default)}.badge--variant-dot{width:1.5rem;min-width:0;height:1.5rem}.badge--variant-dot.badge--size-xs{width:0.5rem;height:0.5rem}.badge--variant-dot.badge--size-s{width:0.75rem;height:0.75rem}.badge--variant-dot.badge--size-m{width:1rem;height:1rem}.badge--variant-dot .badge__label{padding-right:0;padding-left:0}.badge--variant-dot .badge__icon{display:none}.badge__icon{display:inline-flex}.badge__icon>swirl-icon,.badge__icon>*::part(icon){width:1rem;height:1rem}.badge__label{display:inline-flex;overflow:hidden;max-width:100%;white-space:nowrap;text-overflow:ellipsis}";export{s as swirl_badge}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,h as e,H as i,d as n}from"./p-CWOhMVtL.js";import{g as s,c as o}from"./p-orsBiyT_.js";var r,a,l,c={exports:{}},h=(r||(r=1,a=c.exports,l=()=>{let t,e,i;const n={sel:[],el:[]};let s=!1,o=!1;function r(){}function a(t,e){Array.prototype.forEach.call(t,e)}function l(){this.reset()}function c(t){return e.some((e=>e.start<t&&t<e.end))}function h(t,n){if(t.nodeType===t.ELEMENT_NODE)if("nowrap"===window.getComputedStyle(t).whiteSpace){const n=t.outerHTML.length;e.push({start:i,end:i+n}),i+=n}else a(t.childNodes,(t=>{h(t,!0)})),n&&(i+=t.outerHTML.length-t.innerHTML.length);else i+=t.nodeType===t.COMMENT_NODE?t.length+7:t.nodeType===t.PROCESSING_INSTRUCTION_NODE?t.length+2:t.length}function x(t,n,s){if(0===s)t.style.whiteSpace=n,i=0,e=[],h(t,!1),t.style.whiteSpace="nowrap";else{const t=[];e.forEach((e=>{e.start>s&&t.push({start:e.start-s,end:e.end-s})})),e=t}}function
|
|
1
|
+
import{r as t,h as e,H as i,d as n}from"./p-CWOhMVtL.js";import{g as s,c as o}from"./p-orsBiyT_.js";var r,a,l,c={exports:{}},h=(r||(r=1,a=c.exports,l=()=>{let t,e,i;const n={sel:[],el:[]};let s=!1,o=!1;function r(){}function a(t,e){Array.prototype.forEach.call(t,e)}function l(){this.reset()}function c(t){return e.some((e=>e.start<t&&t<e.end))}function h(t,n){if(t.nodeType===t.ELEMENT_NODE)if("nowrap"===window.getComputedStyle(t).whiteSpace){const n=t.outerHTML.length;e.push({start:i,end:i+n}),i+=n}else a(t.childNodes,(t=>{h(t,!0)})),n&&(i+=t.outerHTML.length-t.innerHTML.length);else i+=t.nodeType===t.COMMENT_NODE?t.length+7:t.nodeType===t.PROCESSING_INSTRUCTION_NODE?t.length+2:t.length}function x(t,n,s){if(0===s)t.style.whiteSpace=n,i=0,e=[],h(t,!1),t.style.whiteSpace="nowrap";else{const t=[];e.forEach((e=>{e.start>s&&t.push({start:e.start-s,end:e.end-s})})),e=t}}function d(t,e,i){const n=(e=e.trim()).split(" ").length;if(e=`${e} `,n<2)return e;const s=document.createElement("span");s.innerHTML=e,t.appendChild(s);const o=s.offsetWidth;s.parentNode.removeChild(s);const r=Math.floor((i-o)/(n-1));s.style.wordSpacing=`${r}px`,s.setAttribute("data-owner","balance-text-justify");const a=document.createElement("div");return a.appendChild(s),a.innerHTML}function f(e,i){const n=/([^\S\u00a0]|-|\u2014|\u2013|\u00ad)(?![^<]*>)/g;let s;if(!t)for(t=[],s=n.exec(e);null!==s;)c(s.index)||t.push(s.index),s=n.exec(e);return-1!==t.indexOf(i)}function u(t,e){return 0===e||e===t.length||f(t,e-1)&&!f(t,e)}function w(t,e,i,n,s,o,r){let a;if(e&&"string"==typeof e)for(;;){for(;!u(e,o);)o+=s;if(t.innerHTML=e.substr(0,o),a=t.offsetWidth,s<0){if(a<=n||a<=0||0===o)break}else if(n<=a||i<=a||o===e.length)break;o+=s}r.index=o,r.width=a}function v(t){return t?"string"==typeof t?document.querySelectorAll(t):t.tagName&&t.querySelectorAll?[t]:t:[]}function g(e){a(v(e),(e=>{!function(t){let e=t.querySelectorAll('br[data-owner="balance-text-hyphen"]');a(e,(t=>{t.outerHTML=""})),e=t.querySelectorAll('br[data-owner="balance-text"]'),a(e,(t=>{t.outerHTML=" "}));let i=t.querySelectorAll('span[data-owner="balance-text-softhyphen"]');if(i.length>0&&a(i,(t=>{const e=document.createTextNode("");t.parentNode.insertBefore(e,t),t.parentNode.removeChild(t)})),i=t.querySelectorAll('span[data-owner="balance-text-justify"]'),i.length>0){let e="";a(i,(t=>{e+=t.textContent,t.parentNode.removeChild(t)})),t.innerHTML=e}}(e);const i=e.style.whiteSpace,n=e.style.float,s=e.style.display,o=e.style.position,r=e.style.lineHeight;e.style.lineHeight="normal";const c=e.offsetWidth,h=e.offsetHeight;e.style.whiteSpace="nowrap",e.style.float="none",e.style.display="inline",e.style.position="static";let f=e.offsetWidth;const u=e.offsetHeight,v="pre-wrap"===i?0:function(t,e){const i=document.createElement("div");i.style.display="block",i.style.position="absolute",i.style.bottom=0,i.style.right=0,i.style.width=0,i.style.height=0,i.style.margin=0,i.style.padding=0,i.style.visibility="hidden",i.style.overflow="hidden";const n=document.createElement("span");n.style.fontSize="2000px",n.innerHTML=" ",i.appendChild(n),t.appendChild(i);const s=n.getBoundingClientRect();return i.parentNode.removeChild(i),e/(s.height/s.width)}(e,u);if(c>0&&f>c&&f<5e3){let n=e.innerHTML,s="",o="";const r=function(t){return"justify"===(t.currentStyle||window.getComputedStyle(t,null)).textAlign}(e);let a,g,m,p,b,y,z,$=Math.round(h/u),M=0;for(;$>1;)t=null,x(e,i,M),a=Math.round((f+v)/$-v),g=Math.round((n.length+1)/$)-1,m=new l,w(e,n,c,a,-1,g,m),p=new l,g=m.index,w(e,n,c,a,1,g,p),m.reset(),g=p.index,w(e,n,c,a,-1,g,m),b=0===m.index?p.index:c<p.width||m.index===p.index||Math.abs(a-m.width)<Math.abs(p.width-a)?m.index:p.index,o=n.substr(0,b).replace(/\s$/,""),z=Boolean(o.match(/\u00ad$/)),z&&(o=o.replace(/\u00ad$/,'<span data-owner="balance-text-softhyphen">-</span>')),r?s+=d(e,o,c):(s+=o,y=z||Boolean(o.match(/(-|\u2014|\u2013)$/)),s+=y?'<br data-owner="balance-text-hyphen" />':'<br data-owner="balance-text" aria-hidden="true" />'),n=n.substr(b),M=b,$--,e.innerHTML=n,f=e.offsetWidth;e.innerHTML=r?s+d(e,n,c):s+n}e.style.whiteSpace=i,e.style.float=n,e.style.display=s,e.style.position=o,e.style.lineHeight=r}))}function m(){const t=v(n.sel.join(","));g(Array.prototype.concat.apply(n.el,t))}function p(){var t;s||(t=m,"loading"!==document.readyState?t():document.addEventListener?document.addEventListener("DOMContentLoaded",t):document.attachEvent("onreadystatechange",(()=>{"loading"!==document.readyState&&t()})),window.addEventListener("load",m),window.addEventListener("resize",function(t,e,i,...n){let s;return function(){const e=this;s&&clearTimeout(s),s=setTimeout((function(){t.apply(e,n),s=null}),100)}}(m)),s=!0)}function b(t,e){t?e&&!0===e.watch?function(t){"string"==typeof t?n.sel.push(t):a(v(t),(t=>{n.el.push(t)})),p(),m()}(t):e&&!1===e.watch?function(t){"string"==typeof t?n.sel=n.sel.filter((e=>e!==t)):(t=v(t),n.el=n.el.filter((e=>-1===t.indexOf(e))))}(t):g(t):o||(n.sel.push(".balance-text"),p(),o=!0)}return l.prototype.reset=function(){this.index=0,this.width=0},b.updateWatched=m,function(){if("undefined"==typeof window)return!1;const{style:t}=document.documentElement;return t.textWrap||t.WebkitTextWrap||t.MozTextWrap||t.MsTextWrap}()?(r.updateWatched=r,r):b},c.exports?c.exports=l():a.balanceText=l()),c.exports),x=s(h);
|
|
2
2
|
/**
|
|
3
3
|
shave - Shave is a javascript plugin that truncates multi-line text within a html element based on set max height
|
|
4
4
|
@version v5.0.2
|
|
@@ -6,4 +6,4 @@ import{r as t,h as e,H as i,d as n}from"./p-CWOhMVtL.js";import{g as s,c as o}fr
|
|
|
6
6
|
@author Jeff Wainwright <yowainwright@gmail.com> (jeffry.in)
|
|
7
7
|
@license MIT
|
|
8
8
|
**/
|
|
9
|
-
function
|
|
9
|
+
function d(t){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var i,n,s=e.call(t),o=[];try{for(;!(i=s.next()).done;)o.push(i.value)}catch(t){n={error:t}}finally{try{i&&!i.done&&(e=s.return)&&e.call(s)}finally{if(n)throw n.error}}return o}function f(t,e,i){if(2===arguments.length)for(var n,s=0,o=e.length;s<o;s++)!n&&s in e||(n||(n=Array.prototype.slice.call(e,0,s)),n[s]=e[s]);return t.concat(n||Array.prototype.slice.call(e))}const u=class{constructor(e){t(this,e),this.align="start",this.as="p",this.color="default",this.fontFamily="text",this.fontStyle="normal",this.responsive=!0,this.size="base",this.truncateDirection="end",this.weight="normal",this.whiteSpace="normal"}componentDidRender(){this.rebalance(),this.handleTruncation()}onWindowResize(){this.rebalance(),this.handleTruncation()}handleTruncation(){if(!this.truncate||!Boolean(this.lines)||1===this.lines)return;const t=+window.getComputedStyle(this.textEl,null).getPropertyValue("line-height").replace("px","");t>0&&function(t,e,i){if(void 0===i&&(i={}),void 0===e||isNaN(e))throw Error("maxHeight is required");var n=function(t){return"string"==typeof t?f([],d(document.querySelectorAll(t)),!1):"length"in t?f([],d(t),!1):[t]}(t);if(n.length)for(var s=i.character,o=void 0===s?"…":s,r=i.classname,a=void 0===r?"js-shave":r,l=i.spaces,c=void 0===l||l,h=i.charclassname,x=void 0===h?"js-shave-char":h,u=i.link,w=void 0===u?{}:u,v="boolean"!=typeof c||c,g=w&&"{}"!==JSON.stringify(w)&&w.href,m=g?"a":"span",p=0;p<n.length;p+=1){var b=n[p],y=b.style,z=b.querySelector("."+a),$=void 0===b.textContent?"innerText":"textContent";z&&(b.removeChild(b.querySelector("."+x)),b[$]=b[$]);var M=b[$],j=v?M.split(" "):M;if(!(j.length<2)){var k=y.height;y.height="auto";var B=y.maxHeight;if(y.maxHeight="none",b.offsetHeight<=e)y.height=k,y.maxHeight=B;else{var S=g&&w.textContent?w.textContent:o,T=document.createElement(m),A={className:x,textContent:S};for(var C in A)T[C]=A[C],T.textContent=o;if(g)for(var N in w)T[N]=w[N];for(var O=j.length-1,D=0,H=void 0;D<O;)H=D+O+1>>1,b[$]=v?j.slice(0,H).join(" "):j.slice(0,H),b.insertAdjacentElement("beforeend",T),b.offsetHeight>e?O=H-1:D=H;b[$]=v?j.slice(0,O).join(" "):j.slice(0,O),b.insertAdjacentElement("beforeend",T);var L=v?" ".concat(j.slice(O).join(" ")):j.slice(O),R=document.createTextNode(L),W=document.createElement("span");W.classList.add(a),W.style.display="none",W.appendChild(R),b.insertAdjacentElement("beforeend",W),y.height=k,y.maxHeight=B}}}}(this.textEl,t*this.lines)}rebalance(){this.balance&&Boolean(this.textEl)&&x(this.textEl)}render(){const t=this.as,n=this.truncate&&(!Boolean(this.lines)||1===this.lines),s=o("text",`text--align-${this.align}`,`text--color-${this.color}`,`text--font-family-${this.fontFamily}`,`text--font-style-${this.fontStyle}`,`text--size-${this.size}`,`text--truncate-direction-${this.truncateDirection}`,`text--weight-${this.weight}`,{"text--truncate":n,"text--responsive":this.responsive});return e(i,{key:"a635ca2f4d4b7afc4e4d4fceb0e995823e6cebdd"},e(t,{key:"e9cb49646443c597aa220a12ad0ce008aef9617e",class:s,ref:t=>this.textEl=t,style:{whiteSpace:n?"nowrap":this.whiteSpace}},e("slot",{key:"33a7c292355d29886765808a120f1ead1dd43ab7"})))}get el(){return n(this)}};u.style=".sc-swirl-text-h{display:block;max-width:100%}.sc-swirl-text-h *.sc-swirl-text{box-sizing:border-box}.text.sc-swirl-text{overflow:hidden;margin:0;padding:0}.text--align-start.sc-swirl-text{text-align:start}.text--align-center.sc-swirl-text{text-align:center}.text--align-end.sc-swirl-text{text-align:end}.text--color-default.sc-swirl-text{color:var(--s-text-default)}.text--color-disabled.sc-swirl-text{color:var(--s-text-disabled)}.text--color-highlight.sc-swirl-text{color:var(--s-text-highlight)}.text--color-on-action-primary.sc-swirl-text{color:var(--s-text-on-action-primary)}.text--color-on-image.sc-swirl-text{color:var(--s-text-on-image)}.text--color-on-status.sc-swirl-text{color:var(--s-text-on-status)}.text--color-on-surface-highlight.sc-swirl-text{color:var(--s-text-on-surface-highlight)}.text--color-on-surface-highlight-subdued.sc-swirl-text{color:var(--s-text-on-surface-highlight-subdued)}.text--color-subdued.sc-swirl-text{color:var(--s-text-subdued)}.text--color-critical.sc-swirl-text{color:var(--s-text-critical)}.text--color-success.sc-swirl-text{color:var(--s-text-success)}.text--color-warning.sc-swirl-text{color:var(--s-text-warning)}.text--size-xs.sc-swirl-text{font-size:var(--s-font-size-xs);line-height:var(--s-line-height-xs)}.text--size-sm.sc-swirl-text{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}.text--size-base.sc-swirl-text{font-size:var(--s-font-size-base);line-height:var(--s-line-height-base)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text--size-base.text--responsive.sc-swirl-text{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.text--size-lg.sc-swirl-text{font-size:var(--s-font-size-lg);line-height:var(--s-line-height-lg)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text--size-lg.text--responsive.sc-swirl-text{font-size:var(--s-font-size-base);line-height:var(--s-line-height-base)}}.text--size-xl.sc-swirl-text{font-size:var(--s-font-size-xl);line-height:var(--s-line-height-xl)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text--size-xl.text--responsive.sc-swirl-text{font-size:var(--s-font-size-lg);line-height:var(--s-line-height-lg)}}.text--size-2xl.sc-swirl-text{font-size:var(--s-font-size-2xl);line-height:var(--s-line-height-2xl)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.text--size-2xl.text--responsive.sc-swirl-text{font-size:var(--s-font-size-xl);line-height:var(--s-line-height-xl)}}.text--weight-normal.sc-swirl-text{font-weight:var(--s-font-weight-normal)}.text--weight-medium.sc-swirl-text{font-weight:var(--s-font-weight-medium)}.text--weight-semibold.sc-swirl-text{font-weight:var(--s-font-weight-semibold)}.text--weight-bold.sc-swirl-text{font-weight:var(--s-font-weight-bold)}.text--font-style-normal.sc-swirl-text{font-style:normal}.text--font-style-italic.sc-swirl-text{font-style:italic}.text--font-family-code.sc-swirl-text{font-family:var(--s-font-family-code)}.text--truncate.sc-swirl-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.text--truncate-direction-start.sc-swirl-text{direction:rtl;text-align:left}";export{u as swirl_text}
|