@scania/tegel 1.37.1 → 1.38.0-handleValueChange-correct-logic-beta.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/dist/cjs/index-ca8040ad.js +4 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/tds-core-header-item_2.cjs.entry.js +1 -1
- package/dist/cjs/tds-dropdown_2.cjs.entry.js +49 -21
- package/dist/cjs/tds-folder-tab.cjs.entry.js +1 -1
- package/dist/cjs/tds-folder-tabs.cjs.entry.js +1 -1
- package/dist/cjs/tds-inline-tab.cjs.entry.js +1 -1
- package/dist/cjs/tds-message.cjs.entry.js +3 -4
- package/dist/cjs/tds-navigation-tab.cjs.entry.js +1 -1
- package/dist/cjs/tds-navigation-tabs.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu-collapse-button.cjs.entry.js +4 -6
- package/dist/cjs/tds-side-menu-dropdown-list-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-slider.cjs.entry.js +39 -10
- package/dist/cjs/tegel.cjs.js +1 -1
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +13 -3
- package/dist/collection/components/dropdown/dropdown.js +48 -18
- package/dist/collection/components/header/header-item/header-item.css +3 -3
- package/dist/collection/components/message/message.css +0 -20
- package/dist/collection/components/message/message.js +2 -3
- package/dist/collection/components/side-menu/side-menu-collapse-button/side-menu-collapse-button.js +4 -6
- package/dist/collection/components/side-menu/side-menu-dropdown-list-item/side-menu-dropdown-list-item.css +84 -6
- package/dist/collection/components/side-menu/side-menu-item/side-menu-item.css +82 -6
- package/dist/collection/components/slider/slider.css +24 -28
- package/dist/collection/components/slider/slider.js +38 -9
- package/dist/collection/components/tabs/folder-tabs/folder-tab/folder-tab.css +34 -8
- package/dist/collection/components/tabs/folder-tabs/folder-tabs.css +12 -2
- package/dist/collection/components/tabs/inline-tabs/inline-tab/inline-tab.css +14 -9
- package/dist/collection/components/tabs/navigation-tabs/navigation-tab/navigation-tab.css +16 -10
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.css +12 -2
- package/dist/components/{p-63437b77.js → p-072bf53a.js} +1 -1
- package/dist/components/{p-ea381f94.js → p-92c2da85.js} +1 -1
- package/dist/components/{p-94bfc9f4.js → p-9a47d831.js} +37 -19
- package/dist/components/p-a0c21704.js +187 -0
- package/dist/components/{p-6adb1ce3.js → p-ad6babcd.js} +1 -1
- package/dist/components/{p-d64878cb.js → p-c4318e35.js} +13 -3
- package/dist/components/tds-dropdown-option.js +1 -1
- package/dist/components/tds-dropdown.js +1 -1
- package/dist/components/tds-folder-tab.js +1 -1
- package/dist/components/tds-folder-tabs.js +1 -1
- package/dist/components/tds-header-brand-symbol.js +1 -1
- package/dist/components/tds-header-dropdown.js +1 -1
- package/dist/components/tds-header-hamburger.js +1 -1
- package/dist/components/tds-header-item.js +1 -1
- package/dist/components/tds-header-launcher-button.js +1 -1
- package/dist/components/tds-header-launcher.js +2 -2
- package/dist/components/tds-inline-tab.js +1 -1
- package/dist/components/tds-message.js +3 -4
- package/dist/components/tds-navigation-tab.js +1 -1
- package/dist/components/tds-navigation-tabs.js +1 -1
- package/dist/components/tds-side-menu-collapse-button.js +5 -7
- package/dist/components/tds-side-menu-dropdown-list-item.js +1 -1
- package/dist/components/tds-side-menu-dropdown.js +1 -1
- package/dist/components/tds-side-menu-item.js +1 -1
- package/dist/components/tds-slider.js +59 -12
- package/dist/components/tds-table-footer.js +2 -2
- package/dist/components/tds-text-field.js +1 -185
- package/dist/esm/index-51d04e39.js +4 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tds-core-header-item_2.entry.js +1 -1
- package/dist/esm/tds-dropdown_2.entry.js +49 -21
- package/dist/esm/tds-folder-tab.entry.js +1 -1
- package/dist/esm/tds-folder-tabs.entry.js +1 -1
- package/dist/esm/tds-inline-tab.entry.js +1 -1
- package/dist/esm/tds-message.entry.js +3 -4
- package/dist/esm/tds-navigation-tab.entry.js +1 -1
- package/dist/esm/tds-navigation-tabs.entry.js +1 -1
- package/dist/esm/tds-side-menu-collapse-button.entry.js +4 -6
- package/dist/esm/tds-side-menu-dropdown-list-item.entry.js +1 -1
- package/dist/esm/tds-side-menu-item.entry.js +1 -1
- package/dist/esm/tds-slider.entry.js +39 -10
- package/dist/esm/tegel.js +1 -1
- package/dist/tegel/{p-c0b26507.entry.js → p-25f4b4ca.entry.js} +1 -1
- package/dist/tegel/p-2c9ea0be.entry.js +1 -0
- package/dist/tegel/p-2f9b15f6.entry.js +1 -0
- package/dist/tegel/p-336f2de3.entry.js +1 -0
- package/dist/tegel/p-7368906f.entry.js +1 -0
- package/dist/tegel/p-8ae4e03c.entry.js +1 -0
- package/dist/tegel/p-b2b9561f.entry.js +1 -0
- package/dist/tegel/{p-52adc30c.entry.js → p-bb9445ff.entry.js} +1 -1
- package/dist/tegel/p-c465f9b8.entry.js +1 -0
- package/dist/tegel/p-c4f701f6.entry.js +1 -0
- package/dist/tegel/{p-8c841698.entry.js → p-d184a3f0.entry.js} +1 -1
- package/dist/tegel/p-db38b4f2.entry.js +1 -0
- package/dist/tegel/tegel.css +1 -1
- package/dist/tegel/tegel.esm.js +1 -1
- package/dist/types/components/dropdown/dropdown.d.ts +3 -0
- package/dist/types/components/slider/slider.d.ts +2 -0
- package/package.json +1 -1
- package/dist/tegel/p-06d3490c.entry.js +0 -1
- package/dist/tegel/p-106e048d.entry.js +0 -1
- package/dist/tegel/p-397c8969.entry.js +0 -1
- package/dist/tegel/p-5c077bb9.entry.js +0 -1
- package/dist/tegel/p-61a1dc59.entry.js +0 -1
- package/dist/tegel/p-a0591e58.entry.js +0 -1
- package/dist/tegel/p-ae438c2e.entry.js +0 -1
- package/dist/tegel/p-dc375d3e.entry.js +0 -1
- package/dist/tegel/p-e3c2b6b4.entry.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TdsHeaderLauncherButton$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { T as TdsHeaderLauncherButton$1, d as defineCustomElement$1 } from './p-072bf53a.js';
|
|
2
2
|
|
|
3
3
|
const TdsHeaderLauncherButton = TdsHeaderLauncherButton$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -2,8 +2,8 @@ import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
|
|
|
2
2
|
import { g as generateUniqueId } from './p-11648030.js';
|
|
3
3
|
import { i as inheritAriaAttributes } from './p-0bd4c19c.js';
|
|
4
4
|
import { d as defineCustomElement$7 } from './p-9ad61cb5.js';
|
|
5
|
-
import { d as defineCustomElement$6 } from './p-
|
|
6
|
-
import { d as defineCustomElement$5 } from './p-
|
|
5
|
+
import { d as defineCustomElement$6 } from './p-ad6babcd.js';
|
|
6
|
+
import { d as defineCustomElement$5 } from './p-072bf53a.js';
|
|
7
7
|
import { d as defineCustomElement$4 } from './p-b390ece5.js';
|
|
8
8
|
import { d as defineCustomElement$3 } from './p-df84759a.js';
|
|
9
9
|
import { d as defineCustomElement$2 } from './p-d3866be7.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
|
|
2
2
|
|
|
3
|
-
const inlineTabCss = ":host{box-sizing:border-box;display:block;position:relative}:host *{box-sizing:border-box}:host ::slotted(*){all:unset;font:var(--tds-headline-07) !important;letter-spacing:var(--tds-headline-07-ls) !important;color:var(--tds-navigation-tabs-tab-color);text-decoration:none;display:block;position:relative;transition:color 0.15s ease-in-out 0s;white-space:nowrap;background-color:transparent;border:0;width:100%;padding:20px 4px}:host ::slotted(*:focus-visible)::before{content:\"\";position:absolute;left:0;right:0;top:
|
|
3
|
+
const inlineTabCss = ":host{box-sizing:border-box;display:block;position:relative}:host *{box-sizing:border-box}:host ::slotted(*){all:unset;font:var(--tds-headline-07) !important;letter-spacing:var(--tds-headline-07-ls) !important;color:var(--tds-navigation-tabs-tab-color);text-decoration:none;display:block;position:relative;transition:color 0.15s ease-in-out 0s;white-space:nowrap;background-color:transparent;border:0;width:100%;padding:20px 4px}:host ::slotted(*:focus-visible)::before{outline:2px solid var(--tds-focus-outline-color);box-shadow:0 0 0 1px var(--tds-white);outline-offset:1px;z-index:1;content:\"\";position:absolute;left:0;right:0;top:3px;bottom:3px}:host .inline-tab-item:not(.selected)::after{width:0%;transition:width 0.15s ease-in-out 0s}:host .inline-tab-item{position:relative;margin-right:32px}:host .inline-tab-item:hover{cursor:pointer}:host .inline-tab-item:hover ::slotted(*){color:var(--tds-inline-tabs-tab-color-hover)}:host .inline-tab-item:hover::after{width:100%}:host .inline-tab-item::after{content:\" \";position:absolute;bottom:0;right:0;left:0;margin-left:auto;width:0%;margin-right:auto;height:2px;background-color:var(--tds-inline-tabs-tab-indicator-background-hover);z-index:1}:host .selected ::slotted(*){color:var(--tds-inline-tabs-tab-color-selected)}:host .selected::after{width:100%;background-color:var(--tds-inline-tabs-tab-indicator-background-active)}:host .disabled::after{content:none}:host .disabled ::slotted(*){color:var(--tds-inline-tabs-tab-color-disabled)}:host .disabled ::slotted(*:hover){color:var(--tds-inline-tabs-tab-color-disabled);cursor:not-allowed}:host .disabled ::slotted(*:focus-visible){outline:none;box-shadow:none}:host(.last){margin-right:32px}";
|
|
4
4
|
const TdsInlineTabStyle0 = inlineTabCss;
|
|
5
5
|
|
|
6
6
|
const TdsInlineTab$1 = /*@__PURE__*/ proxyCustomElement(class TdsInlineTab extends H {
|
|
@@ -2,7 +2,7 @@ import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
|
|
|
2
2
|
import { g as generateUniqueId } from './p-11648030.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './p-b390ece5.js';
|
|
4
4
|
|
|
5
|
-
const messageCss = ":host
|
|
5
|
+
const messageCss = ":host .wrapper{display:flex;padding:16px;background-color:var(--tds-message-background);border-radius:4px}:host .wrapper.information{border-left:4px solid var(--system-info-default)}:host .wrapper.information tds-icon{color:var(--system-info-default)}:host .wrapper.success{background-color:var(--tds-message-background-success);border-left:4px solid var(--system-success-default)}:host .wrapper.success tds-icon{color:var(--system-success-default)}:host .wrapper.error{background-color:var(--tds-message-background-error);border-left:4px solid var(--system-danger-default)}:host .wrapper.error tds-icon{color:var(--system-danger-default)}:host .wrapper.warning{background-color:var(--tds-message-background-warning);border-left:4px solid var(--system-warning-default)}:host .wrapper.warning tds-icon{color:var(--system-warning-default)}:host .wrapper.minimal{border:none;padding:0;background-color:transparent}:host .wrapper.minimal .header{font-family:var(--detail-02-font-family);font-size:var(--detail-02-font-size);line-height:var(--detail-02-line-height);font-weight:var(--detail-02-font-weight);letter-spacing:var(--detail-02-letter-spacing);text-transform:var(--detail-02-text-transform)}:host .wrapper.minimal.error .header{color:var(--system-danger-default)}:host tds-icon{padding-right:16px}:host .content{display:flex;flex-direction:column;gap:4px;color:var(--foreground-text-strong);padding:2px 0}:host .content .header{font-family:var(--headline-07-font-family);font-size:var(--headline-07-font-size);line-height:var(--headline-07-line-height);font-weight:var(--headline-07-font-weight);letter-spacing:var(--headline-07-letter-spacing);text-transform:var(--headline-07-text-transform)}:host .content .extended-message{color:var(--foreground-text-strong);font-family:var(--detail-02-font-family);font-size:var(--detail-02-font-size);line-height:var(--detail-02-line-height);font-weight:var(--detail-02-font-weight);letter-spacing:var(--detail-02-letter-spacing);text-transform:var(--detail-02-text-transform)}";
|
|
6
6
|
const TdsMessageStyle0 = messageCss;
|
|
7
7
|
|
|
8
8
|
const TdsMessage$1 = /*@__PURE__*/ proxyCustomElement(class TdsMessage extends H {
|
|
@@ -42,12 +42,11 @@ const TdsMessage$1 = /*@__PURE__*/ proxyCustomElement(class TdsMessage extends H
|
|
|
42
42
|
render() {
|
|
43
43
|
const headerId = this.header ? `tds-message-header-${generateUniqueId()}` : undefined;
|
|
44
44
|
const contentId = !this.minimal ? `tds-message-content-${generateUniqueId()}` : undefined;
|
|
45
|
-
return (h(Host, { key: '
|
|
45
|
+
return (h(Host, { key: '752eb725898add9261df7460b3043642e7e6a7ef', role: this.tdsAlertDialog, "aria-describedby": contentId, "aria-label": this.getAriaLabel(), class: { [`tds-mode-variant-${this.modeVariant}`]: this.modeVariant !== null } }, h("div", { key: 'd1346696f7f4d63d25cbacc0b3cbf60c39a54add', class: {
|
|
46
46
|
wrapper: true,
|
|
47
47
|
[this.variant]: true,
|
|
48
48
|
minimal: this.minimal,
|
|
49
|
-
|
|
50
|
-
} }, !this.noIcon && (h("tds-icon", { key: '7c95385da3ab0e887b6e955a302bc39b3aeaafe0', "aria-hidden": "true", "aria-label": `${this.variant}`, svgTitle: `${this.variant}`, name: this.getIconName(), size: "20px" })), h("div", { key: 'eed507b43c57eaafdeba40c25e9556bacbe0f166', class: `content` }, this.header && (h("div", { key: 'd6faa3f523f64f158a31e35a416f957c38bbcceb', class: "header", id: headerId }, this.header)), !this.minimal && (h("div", { key: '03c724a2bdbee954b9c48aa27a18444abfacafbb', class: "extended-message", id: contentId }, h("slot", { key: '017b634e145a514a2315880db6cfb712ddb254b0' })))))));
|
|
49
|
+
} }, !this.noIcon && (h("tds-icon", { key: '39d83a70a25d5ac07c3786f47989ce77b1a9b386', "aria-hidden": "true", "aria-label": `${this.variant}`, svgTitle: `${this.variant}`, name: this.getIconName(), size: "20px" })), h("div", { key: 'aeb139399975656ee15493dab9c2ac77e4f295a0', class: `content` }, this.header && (h("div", { key: 'd9a1e8b5d2513630ff9c0a4363d346dfe2ecfd09', class: "header", id: headerId }, this.header)), !this.minimal && (h("div", { key: 'dffbcdb31b11c4f6313609fac311991202b9f462', class: "extended-message", id: contentId }, h("slot", { key: '38578271864c5884c5a4a4c105ae44ef6d2caf07' })))))));
|
|
51
50
|
}
|
|
52
51
|
static get style() { return TdsMessageStyle0; }
|
|
53
52
|
}, [1, "tds-message", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
|
|
2
2
|
|
|
3
|
-
const navigationTabCss = ":host{box-sizing:border-box;display:block}:host *{box-sizing:border-box}:host ::slotted(*){all:unset;font:var(--tds-headline-07) !important;letter-spacing:var(--tds-headline-07-ls) !important;color:var(--tds-navigation-tabs-tab-color)
|
|
3
|
+
const navigationTabCss = ":host{box-sizing:border-box;display:block}:host *{box-sizing:border-box}:host ::slotted(*){all:unset;font:var(--tds-headline-07) !important;letter-spacing:var(--tds-headline-07-ls) !important;color:var(--tds-navigation-tabs-tab-color);text-decoration:none;display:block;position:relative;transition:color 0.15s ease-in-out 0s;white-space:nowrap;background-color:transparent;border:0;width:100%;padding:26px 0}:host ::slotted(*:focus-visible)::before{content:\"\";position:absolute;left:0;right:0;top:3px;bottom:3px;outline:2px solid var(--tds-focus-outline-color);box-shadow:0 0 0 1px var(--tds-white);outline-offset:1px;z-index:1}:host .navigation-tab-item:not(.selected)::after{width:0%;transition:width 0.15s ease-in-out 0s}:host .navigation-tab-item{position:relative}:host .navigation-tab-item:hover{cursor:pointer}:host .navigation-tab-item:hover ::slotted(*){color:var(--tds-navigation-tabs-tab-color-hover)}:host .navigation-tab-item:hover::after{width:100%}:host .navigation-tab-item::after{content:\" \";position:absolute;bottom:0;right:0;left:0;margin-left:auto;width:0%;margin-right:auto;height:2px;background-color:var(--tds-navigation-tabs-tab-indicator-background-hover);z-index:1}:host .navigation-tab-item:focus-visible::after{bottom:3px}:host .selected ::slotted(*){color:var(--tds-navigation-tabs-tab-color-selected)}:host .selected::after{width:100%;background-color:var(--tds-navigation-tabs-tab-indicator-background-active)}:host .disabled ::slotted(*){color:var(--tds-navigation-tabs-tab-color-disabled)}:host .disabled::after{content:none}:host .disabled ::slotted(*:hover){cursor:not-allowed;color:var(--tds-navigation-tabs-tab-color-disabled)}:host .disabled ::slotted(*:focus-visible){outline:none}:host(.last){margin-right:32px}";
|
|
4
4
|
const TdsNavigationTabStyle0 = navigationTabCss;
|
|
5
5
|
|
|
6
6
|
const TdsNavigationTab$1 = /*@__PURE__*/ proxyCustomElement(class TdsNavigationTab extends H {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-28ef5186.js';
|
|
2
2
|
import { d as defineCustomElement$2 } from './p-b390ece5.js';
|
|
3
3
|
|
|
4
|
-
const navigationTabsCss = ":host{box-sizing:border-box;display:flex;background-color:var(--tds-navigation-tabs-background);position:relative}:host *{box-sizing:border-box}:host::after{content:\" \";display:block;border-bottom:1px solid var(--tds-navigation-tabs-horizontal-divider-background);left:0;right:0;bottom:0;position:absolute}:host .wrapper{display:flex;flex-wrap:nowrap;white-space:nowrap;width:100%;overflow-x:scroll;scrollbar-width:none;gap:16px}:host .wrapper::-webkit-scrollbar{display:none}:host .scroll-right-button{right:0;z-index:1}:host .scroll-left-button{left:0;z-index:1}:host .scroll-right-button,:host .scroll-left-button{color:var(--tds-folder-tabs-scroll-btn-color);cursor:pointer;border:0;width:0;background-color:var(--tds-inline-tabs-scroll-btn-background);display:none;justify-content:center;align-items:center;opacity:0;pointer-events:none;position:sticky}:host .scroll-right-button.show,:host .scroll-left-button.show{min-width:48px;display:block;opacity:1;pointer-events:all}:host .scroll-right-button:hover,:host .scroll-left-button:hover{background-color:var(--tds-folder-tabs-scroll-btn-background-hover)}:host .scroll-right-button:active,:host .scroll-left-button:active{background-color:var(--tds-folder-tabs-scroll-btn-background-active)}:host .scroll-right-button:focus,:host .scroll-left-button:focus{outline:2px solid var(--tds-focus-outline-color);box-shadow:0 0 0 1px var(--tds-white);outline-offset:1px;z-index:1}:host .scroll-right-button svg,:host .scroll-left-button svg{fill:var(--tds-folder-tabs-scroll-btn-color)}";
|
|
4
|
+
const navigationTabsCss = ":host{box-sizing:border-box;display:flex;background-color:var(--tds-navigation-tabs-background);position:relative}:host *{box-sizing:border-box}:host::after{content:\" \";display:block;border-bottom:1px solid var(--tds-navigation-tabs-horizontal-divider-background);left:0;right:0;bottom:0;position:absolute}:host .wrapper{display:flex;flex-wrap:nowrap;white-space:nowrap;width:100%;overflow-x:scroll;scrollbar-width:none;gap:16px}:host .wrapper::-webkit-scrollbar{display:none}:host .scroll-right-button{right:0;z-index:1}:host .scroll-left-button{left:0;z-index:1}:host .scroll-right-button,:host .scroll-left-button{color:var(--tds-folder-tabs-scroll-btn-color);cursor:pointer;border:0;width:0;background-color:var(--tds-inline-tabs-scroll-btn-background);display:none;justify-content:center;align-items:center;opacity:0;pointer-events:none;position:sticky}:host .scroll-right-button.show,:host .scroll-left-button.show{min-width:48px;display:block;opacity:1;pointer-events:all}:host .scroll-right-button:hover,:host .scroll-left-button:hover{background-color:var(--tds-folder-tabs-scroll-btn-background-hover)}:host .scroll-right-button:active,:host .scroll-left-button:active{background-color:var(--tds-folder-tabs-scroll-btn-background-active)}:host .scroll-right-button:focus::before,:host .scroll-left-button:focus::before{content:\"\";position:absolute;left:3px;right:3px;top:3px;bottom:3px;outline:2px solid var(--tds-focus-outline-color);box-shadow:0 0 0 1px var(--tds-white);outline-offset:1px;z-index:1}:host .scroll-right-button:focus,:host .scroll-left-button:focus{outline:0}:host .scroll-right-button svg,:host .scroll-left-button svg{fill:var(--tds-folder-tabs-scroll-btn-color)}";
|
|
5
5
|
const TdsNavigationTabsStyle0 = navigationTabsCss;
|
|
6
6
|
|
|
7
7
|
const TdsNavigationTabs$1 = /*@__PURE__*/ proxyCustomElement(class TdsNavigationTabs extends H {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-28ef5186.js';
|
|
2
|
-
import { d as defineCustomElement$2 } from './p-
|
|
2
|
+
import { d as defineCustomElement$2 } from './p-92c2da85.js';
|
|
3
3
|
|
|
4
4
|
const sideMenuCollapseButtonCss = ":host{position:sticky;bottom:0;display:none;height:68px;border-top:1px solid var(--tds-sidebar-side-menu-bottom-menu-border-top)}:host .icon{transform:rotateZ(90deg);transition:all 0.2s ease-in-out;width:20px;height:20px}:host .state-collapsed .icon{transform:translateX(-50%) rotateZ(90deg) rotateX(180deg);color:var(--tds-sidebar-side-menu-single-item-color);margin-left:0;position:absolute;left:50%}@media (min-width: 992px){:host{display:block}}";
|
|
5
5
|
const TdsSideMenuCollapseButtonStyle0 = sideMenuCollapseButtonCss;
|
|
@@ -35,14 +35,12 @@ const TdsSideMenuCollapseButton$1 = /*@__PURE__*/ proxyCustomElement(class TdsSi
|
|
|
35
35
|
this.collapsed = this.sideMenuEl.collapsed;
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
|
-
return (h(Host, { key: '
|
|
39
|
-
this.handleClick();
|
|
40
|
-
} }, h("div", { key: '6d7ae7bd95d8c4c37895d06ce8d4eaebe08e91dd', class: {
|
|
38
|
+
return (h(Host, { key: '71376a20166f28551ed139362144a79a20e35213' }, h("div", { key: 'a68ff13ee66ff8866f41bd36dbd5f2a38408ed6c', class: {
|
|
41
39
|
'wrapper': true,
|
|
42
40
|
'state-collapsed': this.collapsed,
|
|
43
|
-
} }, h("tds-side-menu-item", { key: '
|
|
44
|
-
|
|
45
|
-
} }, h("
|
|
41
|
+
} }, h("tds-side-menu-item", { key: '087dae21fe6c6f7f0bb7065d5b8ea4ab1f94a759', class: { button: true } }, h("button", { key: 'fd2202b8a038728b756978fac15eaff80f425d25', type: "button", "aria-expanded": !this.collapsed ? 'true' : 'false', onClick: () => {
|
|
42
|
+
this.handleClick();
|
|
43
|
+
} }, h("svg", { key: '35c741c7fc3a9d009313cb16f6d656033f757b2f', class: "icon", slot: "icon", fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, h("path", { key: 'e9b567c3137eef6b8b309cea7606ebae227ebdf9', "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M16 1.975a1 1 0 0 1 1 1v20.3l9.311-9.312a1 1 0 0 1 1.415 1.414l-9.887 9.887a2.6 2.6 0 0 1-3.677 0l-9.887-9.887a1 1 0 1 1 1.414-1.414L15 23.274V2.975a1 1 0 0 1 1-1ZM5.188 28.001a1 1 0 0 0 0 2h21.62a1 1 0 1 0 0-2H5.188Z", fill: "currentColor" })), !this.collapsed && h("slot", { key: 'b6af5dcd3554623803af3d88243eeeef573e20aa' }))))));
|
|
46
44
|
}
|
|
47
45
|
get host() { return this; }
|
|
48
46
|
static get style() { return TdsSideMenuCollapseButtonStyle0; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
|
|
2
2
|
|
|
3
|
-
const sideMenuDropdownListItemCss = ":host{display:block;box-sizing:border-box;height:48px;width:100%}:host .component{height:100%;width:100%}:host .component ::slotted(a),:host .component ::slotted(button){all:unset;box-sizing:border-box;border-right:1px solid var(--tds-nav-item-border-color);display:flex;align-items:center;height:100%;padding:0 24px;width:100%;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);background-color:var(--tds-header-nav-item-dropdown-opened-background);color:var(--tds-header-nav-item-dropdown-opened-color);border:none}:host .component ::slotted(a:hover),:host .component ::slotted(button:hover){background-color:var(--tds-
|
|
3
|
+
const sideMenuDropdownListItemCss = ":host{display:block;box-sizing:border-box;height:48px;width:100%}:host .component{height:100%;width:100%}:host .component ::slotted(a),:host .component ::slotted(button){all:unset;box-sizing:border-box;border-right:1px solid var(--tds-nav-item-border-color);display:flex;align-items:center;height:100%;padding:0 24px;width:100%;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);background-color:var(--tds-header-nav-item-dropdown-opened-background);color:var(--tds-header-nav-item-dropdown-opened-color);border:none}:host .component ::slotted(a:hover),:host .component ::slotted(button:hover){background-color:var(--tds-sidebar-item-state-hover);cursor:pointer;position:relative}:host .component ::slotted(a:hover)::before,:host .component ::slotted(button:hover)::before{content:\"\";position:absolute;top:0;left:0;width:4px;height:100%;background-color:var(--tds-side-menu-item-hover-indicator)}:host .component ::slotted(a:hover:focus-visible),:host .component ::slotted(button:hover:focus-visible){background-color:var(--tds-sidebar-item-state-hover);cursor:pointer;position:relative}:host .component ::slotted(a:hover:focus-visible)::before,:host .component ::slotted(button:hover:focus-visible)::before{content:\"\";position:absolute;top:3px;left:3px;width:4px;height:calc(100% - 6px);background-color:var(--tds-side-menu-item-hover-indicator)}:host .component ::slotted(a:active),:host .component ::slotted(button:active){background-color:var(--tds-sidemenu-item-state-active) !important;cursor:pointer;position:relative}:host .component ::slotted(a:active)::before,:host .component ::slotted(button:active)::before{content:\"\";position:absolute;top:0;left:0;width:4px;height:100%;background-color:var(--tds-side-menu-item-pressed-indicator)}:host .component ::slotted(a:active:focus-visible),:host .component ::slotted(button:active:focus-visible){background-color:var(--tds-sidemenu-item-state-active) !important;cursor:pointer;position:relative}:host .component ::slotted(a:active:focus-visible)::before,:host .component ::slotted(button:active:focus-visible)::before{content:\"\";position:absolute;top:3px;left:3px;width:4px;height:calc(100% - 6px);background-color:var(--tds-side-menu-item-pressed-indicator)}:host .component ::slotted(a:focus-visible){outline:2px solid var(--tds-focus-outline-color);box-shadow:inset 0 0 0 3px var(--tds-white);outline-offset:-2px}:host .component.component-selected ::slotted(a),:host .component.component-selected ::slotted(button){background-color:var(--tds-header-nav-item-dropdown-opened-background-selected);position:relative}:host .component.component-selected ::slotted(a)::before,:host .component.component-selected ::slotted(button)::before{content:\"\";position:absolute;top:0;left:0;width:4px;height:100%;background-color:var(--tds-sidebar-side-menu-single-subitem-selected-border-color)}:host .component.component-selected ::slotted(a:focus-visible),:host .component.component-selected ::slotted(button:focus-visible){background-color:var(--tds-header-nav-item-dropdown-opened-background-selected);position:relative}:host .component.component-selected ::slotted(a:focus-visible)::before,:host .component.component-selected ::slotted(button:focus-visible)::before{content:\"\";position:absolute;top:3px;left:3px;width:4px;height:calc(100% - 6px);background-color:var(--tds-sidebar-side-menu-single-subitem-selected-border-color)}:host .component.component-dropdown-has-icon:not(.component-collapsed) ::slotted(a),:host .component.component-dropdown-has-icon:not(.component-collapsed) ::slotted(button){padding:16px 48px 16px 58px}:host .component.component-dropdown-has-user:not(.component-collapsed) ::slotted(a),:host .component.component-dropdown-has-user:not(.component-collapsed) ::slotted(button){padding:16px 48px 16px 64px}";
|
|
4
4
|
const TdsSideMenuDropdownListItemStyle0 = sideMenuDropdownListItemCss;
|
|
5
5
|
|
|
6
6
|
const TdsSideMenuDropdownListItem$1 = /*@__PURE__*/ proxyCustomElement(class TdsSideMenuDropdownListItem extends H {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h, F as Fragment, c as Host } from './p-28ef5186.js';
|
|
2
2
|
import { d as defineCustomElement$3 } from './p-b390ece5.js';
|
|
3
|
-
import { d as defineCustomElement$2 } from './p-
|
|
3
|
+
import { d as defineCustomElement$2 } from './p-92c2da85.js';
|
|
4
4
|
|
|
5
5
|
const sideMenuDropdownCss = ":host{display:block}:host .wrapper{display:flex;flex-direction:column}:host .dropdown-icon{margin-left:auto;transition:all 0.2s ease-in-out}:host .state-open .dropdown-icon{transform:rotateZ(180deg)}:host .state-open .menu{display:block}:host .state-collapsed .menu{--side-menu-width:69px;position:absolute;left:var(--side-menu-width);box-shadow:var(--tds-nav-dropdown-menu-box);background-color:var(--tds-sidebar-side-menu-subnav-background)}:host .state-collapsed .menu .heading-collapsed{all:unset;box-sizing:border-box;padding:16px 24px 15px;min-height:48px;display:flex;align-items:center;border-bottom:1px solid var(--tds-sidebar-side-menu-bottom-menu-border-top);font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls)}:host :not(.state-collapsed) .menu ::slotted(tds-side-menu-dropdown-list){width:100%}:host .menu{display:none;flex-direction:column}";
|
|
6
6
|
const TdsSideMenuDropdownStyle0 = sideMenuDropdownCss;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TdsSideMenuItem$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { T as TdsSideMenuItem$1, d as defineCustomElement$1 } from './p-92c2da85.js';
|
|
2
2
|
|
|
3
3
|
const TdsSideMenuItem = TdsSideMenuItem$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, d as createEvent, h } from './p-28ef5186.js';
|
|
2
2
|
import { g as generateUniqueId } from './p-11648030.js';
|
|
3
|
-
import { d as defineCustomElement$
|
|
3
|
+
import { d as defineCustomElement$5 } from './p-b390ece5.js';
|
|
4
|
+
import { d as defineCustomElement$4 } from './p-d3866be7.js';
|
|
5
|
+
import { d as defineCustomElement$3 } from './p-a0c21704.js';
|
|
6
|
+
import { d as defineCustomElement$2 } from './p-40253725.js';
|
|
4
7
|
|
|
5
|
-
const sliderCss = "tds-slider{box-sizing:border-box;width:100%}tds-slider *{box-sizing:border-box}tds-slider input[type=range].tds-slider-native-element{display:none}tds-slider .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.tds-slider-wrapper{width:100%}.tds-slider-wrapper.read-only{pointer-events:none}.tds-slider
|
|
8
|
+
const sliderCss = "tds-slider{box-sizing:border-box;width:100%}tds-slider *{box-sizing:border-box}tds-slider input[type=range].tds-slider-native-element{display:none}tds-slider .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.tds-slider-wrapper{width:100%}.tds-slider-wrapper.read-only{pointer-events:none}.tds-slider{width:100%;display:flex;flex-wrap:nowrap;padding-top:65px}.tds-slider .tds-slider-inner{width:100%;height:20px;position:relative}.tds-slider .tds-slider-inner:focus-within .tds-slider__thumb-inner{outline:var(--tds-slider-thumb-focus-outline);box-shadow:var(--tds-slider-thumb-focus-box-shadow);outline-offset:var(--tds-slider-thumb-focus-outline-offset);z-index:1}.tds-slider .tds-slider__controls{position:relative;top:-25px}.tds-slider .tds-slider__controls .tds-slider__control{cursor:pointer}.tds-slider .tds-slider__controls .tds-slider__control.tds-slider__control-minus{padding:18px 18px 18px 0}.tds-slider .tds-slider__controls .tds-slider__control.tds-slider__control-plus{padding:18px 0 18px 18px}.tds-slider .tds-slider__input-values{position:relative;top:-25px;display:flex;flex-wrap:nowrap;align-items:center}.tds-slider .tds-slider__input-values .tds-slider__input-value{user-select:none;padding:18px;color:var(--tds-slider-input-value-color);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls)}.tds-slider .tds-slider__input-values .tds-slider__input-value.min-value{padding-left:0}.tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper{background-color:var(--tds-slider-inputfield-background);display:flex;align-items:center;justify-content:center;border-radius:4px 4px 0 0}.tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper tds-text-field .text-field-input[type=number]{width:auto;padding:12px;text-align:center;appearance:textfield}.tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper tds-text-field .text-field-input[type=number]::-webkit-outer-spin-button,.tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper tds-text-field .text-field-input[type=number]::-webkit-inner-spin-button{appearance:none;margin:0}.tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper tds-text-field .text-field-input:read-only{text-align:left}.tds-slider .tds-slider__input-values .tds-slider__input-field-wrapper tds-text-field .text-field-icon__readonly{right:12px}.tds-slider label{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);user-select:none;position:absolute;color:var(--tds-slider-label-color);padding-bottom:16px;transform:translateY(-100%)}.tds-slider label.offset{padding-bottom:34px}.tds-slider .tds-slider__value{font:var(--tds-detail-01);letter-spacing:var(--tds-detail-01-ls);user-select:none;border-radius:4px;padding:8px 11px;position:absolute;transform:translate(-50%, -100%);top:-24px;background-color:var(--tds-slider-value-tooltip-background);color:var(--tds-slider-value-tooltip-color)}.tds-slider .tds-slider__value svg{color:var(--tds-slider-value-tooltip-background);position:absolute;left:50%;transform:translateX(-50%);top:34px}.tds-slider .tds-slider__thumb{position:absolute}.tds-slider .tds-slider__thumb:hover .tds-slider__value{display:block}.tds-slider .tds-slider__thumb .tds-slider__thumb-inner{width:20px;height:20px;border-radius:100%;background-color:var(--tds-slider-thumb-color);position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);cursor:pointer}.tds-slider .tds-slider__thumb .tds-slider__thumb-inner::before{content:\" \";display:none;width:48px;height:48px;background-color:var(--tds-slider-thumb-color);position:absolute;border-radius:100%;top:50%;left:50%;transform:translate(-50%, -50%)}.tds-slider .tds-slider__thumb .tds-slider__thumb-inner:hover::before{display:block;background-color:var(--tds-slider-thumb-hover)}.tds-slider .tds-slider__thumb .tds-slider__thumb-inner.pressed{width:24px;height:24px}.tds-slider .tds-slider__thumb .tds-slider__thumb-inner.pressed::before{display:block;background-color:var(--tds-slider-thumb-pressed)}.tds-slider .tds-slider__value-dividers-wrapper{position:relative;width:100%;pointer-events:none}.tds-slider .tds-slider__value-dividers{pointer-events:none;position:absolute;display:flex;justify-content:space-between;width:100%}.tds-slider .tds-slider__value-dividers .tds-slider__value-divider{transform:translateY(-50%);height:16px;background-color:var(--tds-slider-divider-color);color:var(--tds-slider-divider-values-color);width:1px}.tds-slider .tds-slider__value-dividers .tds-slider__value-divider span{display:block;user-select:none;color:var(-tds-grey-700);font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);position:relative;top:-7px;left:50%;transform:translate(-50%, -100%);width:50px;text-align:center}.tds-slider .tds-slider__track{width:100%;height:2px;border-radius:1px;background-color:var(--tds-slider-track-color);position:relative;cursor:pointer}.tds-slider .tds-slider__track::after{content:\"\";position:absolute;left:0;right:0;top:-10px;bottom:-10px;cursor:pointer;z-index:0}.tds-slider .tds-slider__track:focus{outline:0}.tds-slider .tds-slider__track:focus .tds-slider__thumb .tds-slider__thumb-inner{width:24px;height:24px}.tds-slider .tds-slider__track:focus .tds-slider__thumb .tds-slider__thumb-inner::before{display:block;opacity:0.08}.tds-slider .tds-slider__track .tds-slider__track-fill{background-color:var(--tds-slider-track-fill-color);border-radius:2px;height:4px;position:absolute;left:0;top:-1px}.tds-slider .tds-slider__track .tds-slider__thumb{z-index:1}.tds-slider.disabled{cursor:not-allowed}.tds-slider.disabled>*{pointer-events:none}.tds-slider.disabled label{color:var(--tds-slider-label-disabled)}.tds-slider.disabled .tds-slider__controls .tds-slider__control{cursor:default}.tds-slider.disabled .tds-slider__input-values .tds-slider__input-value{color:var(--tds-slider-input-value-disabled)}.tds-slider.disabled .tds-slider__input-values .tds-slider__input-field-wrapper{pointer-events:none}.tds-slider.disabled .tds-slider__input-values .tds-slider__input-field-wrapper input.tds-slider__input-field{color:var(--tds-slider-inputfield-number-disabled);box-shadow:none;pointer-events:none;background:var(--tds-slider-inputfield-background-disabled)}.tds-slider.disabled .tds-slider__value{display:none}.tds-slider.disabled .tds-slider__track{cursor:not-allowed;background-color:var(--tds-slider-track-disabled)}.tds-slider.disabled .tds-slider__track .tds-slider__track-fill{background-color:var(--tds-slider-track-disabled)}.tds-slider.disabled .tds-slider__value-dividers .tds-slider__value-divider{background-color:var(--tds-slider-divider-disabled)}.tds-slider.disabled .tds-slider__value-dividers .tds-slider__value-divider span{color:var(--tds-slider-divider-values-disabled)}.tds-slider.disabled .tds-slider__thumb{pointer-events:none}.tds-slider.disabled .tds-slider__thumb .tds-slider__thumb-inner{background-color:var(--tds-slider-thumb-disabled);cursor:default}.tds-slider.tds-slider-small .tds-slider__thumb .tds-slider__thumb-inner{width:16px;height:16px}.tds-slider.tds-slider-small .tds-slider__thumb .tds-slider__thumb-inner::before{width:40px;height:40px}.tds-slider.tds-slider-small .tds-slider__thumb .tds-slider__thumb-inner.pressed{width:20px;height:20px}.tds-slider .tds-slider__controls .tds-slider__control{cursor:pointer}.tds-slider .tds-slider__controls .tds-slider__control.tds-slider__control-minus tds-icon,.tds-slider .tds-slider__controls .tds-slider__control.tds-slider__control-plus tds-icon{color:var(--tds-slider-controls-color)}.tds-slider.disabled .tds-slider__controls .tds-slider__control{cursor:default}.tds-slider.disabled .tds-slider__controls .tds-slider__control.tds-slider__control-minus tds-icon,.tds-slider.disabled .tds-slider__controls .tds-slider__control.tds-slider__control-plus tds-icon{color:var(--tds-slider-controls-disabled)}";
|
|
6
9
|
const TdsSliderStyle0 = sliderCss;
|
|
7
10
|
|
|
8
11
|
const TdsSlider$1 = /*@__PURE__*/ proxyCustomElement(class TdsSlider extends H {
|
|
@@ -274,6 +277,25 @@ const TdsSlider$1 = /*@__PURE__*/ proxyCustomElement(class TdsSlider extends H {
|
|
|
274
277
|
const rounded = this.roundToStep(newValue);
|
|
275
278
|
this.forceValueUpdate(rounded.toString());
|
|
276
279
|
}
|
|
280
|
+
/** Updates the slider value when using tds-text-field (reads value from host element) */
|
|
281
|
+
updateSliderValueFromTextField(event) {
|
|
282
|
+
const hostEl = event.target; // tds-text-field host element exposes a value prop
|
|
283
|
+
const raw = hostEl && typeof hostEl.value !== 'undefined' ? hostEl.value : '';
|
|
284
|
+
let newValue = parseFloat(raw);
|
|
285
|
+
if (Number.isNaN(newValue)) {
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
const minNum = parseFloat(this.min);
|
|
289
|
+
const maxNum = parseFloat(this.max);
|
|
290
|
+
if (newValue < minNum) {
|
|
291
|
+
newValue = minNum;
|
|
292
|
+
}
|
|
293
|
+
else if (newValue > maxNum) {
|
|
294
|
+
newValue = maxNum;
|
|
295
|
+
}
|
|
296
|
+
const rounded = this.roundToStep(newValue);
|
|
297
|
+
this.forceValueUpdate(rounded.toString());
|
|
298
|
+
}
|
|
277
299
|
/** Updates the slider value based on the current input value when enter is pressed */
|
|
278
300
|
handleInputFieldEnterPress(event) {
|
|
279
301
|
event.stopPropagation();
|
|
@@ -294,7 +316,16 @@ const TdsSlider$1 = /*@__PURE__*/ proxyCustomElement(class TdsSlider extends H {
|
|
|
294
316
|
}
|
|
295
317
|
}
|
|
296
318
|
calculateInputSizeFromMax() {
|
|
297
|
-
|
|
319
|
+
const input = this.host.querySelector('tds-text-field input[type="number"]');
|
|
320
|
+
if (input) {
|
|
321
|
+
if (this.readOnly) {
|
|
322
|
+
// explicit size to fit suffix icon
|
|
323
|
+
input.style.width = `${52 + this.max.length * 8}px`;
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
input.setAttribute('size', `${this.max.length}`);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
298
329
|
}
|
|
299
330
|
controlsStep(delta, event) {
|
|
300
331
|
if (this.readOnly || this.disabled) {
|
|
@@ -365,6 +396,7 @@ const TdsSlider$1 = /*@__PURE__*/ proxyCustomElement(class TdsSlider extends H {
|
|
|
365
396
|
}
|
|
366
397
|
}
|
|
367
398
|
componentDidLoad() {
|
|
399
|
+
this.calculateInputSizeFromMax();
|
|
368
400
|
if (!this.resizeObserverAdded) {
|
|
369
401
|
this.resizeObserverAdded = true;
|
|
370
402
|
const resizeObserver = new ResizeObserver(() => {
|
|
@@ -408,30 +440,30 @@ const TdsSlider$1 = /*@__PURE__*/ proxyCustomElement(class TdsSlider extends H {
|
|
|
408
440
|
}
|
|
409
441
|
render() {
|
|
410
442
|
const ariaLabel = this.readOnly ? this.tdsReadOnlyAriaLabel : this.label || this.tdsAriaLabel;
|
|
411
|
-
return (h("div", { key: '
|
|
443
|
+
return (h("div", { key: '6077f356c7723ce54bdee208039af07154499684', class: {
|
|
412
444
|
'tds-slider-wrapper': true,
|
|
413
445
|
'read-only': this.readOnly,
|
|
414
|
-
} }, h("input", { key: '
|
|
446
|
+
} }, h("input", { key: '0ee6d0f1c8661bdcae6a3df5eca7b154306338eb', class: "tds-slider-native-element", type: "range", name: this.name, min: this.min, max: this.max, step: this.step, value: this.value, disabled: this.disabled }), h("div", { key: 'cfb2700cf9d16c204182a72f9f00ccd03b58ef89', class: "sr-only", "aria-live": "assertive", ref: (el) => {
|
|
415
447
|
this.ariaLiveElement = el;
|
|
416
|
-
} }), h("div", { key: '
|
|
448
|
+
} }), h("div", { key: 'b90c1d06afd96682a108b24506660e7544c4be38', class: {
|
|
417
449
|
'tds-slider': true,
|
|
418
450
|
'disabled': this.disabled,
|
|
419
451
|
'tds-slider-small': this.useSmall,
|
|
420
452
|
}, ref: (el) => {
|
|
421
453
|
this.wrapperElement = el;
|
|
422
|
-
}, "aria-disabled": this.disabled ? 'true' : 'false' }, h("label", { key: '
|
|
454
|
+
}, "aria-disabled": this.disabled ? 'true' : 'false' }, h("label", { key: '3d0bc3f42de59e4397dc8da0edf7ec29802ee8ab', id: `${this.sliderId}-label`, class: this.showTickNumbers && 'offset' }, this.label), this.useInput && (h("div", { key: 'c3868e2225cc4dacf60d23e31bdb2b106b85ce22', class: "tds-slider__input-values" }, h("div", { key: 'af100279435087101f37043ea083e5e33d930079', class: "tds-slider__input-value min-value" }, this.min))), this.useControls && (h("div", { key: '83c0078ec0ae39d29582e1ff1f4c3fc5f3a09483', class: "tds-slider__controls" }, h("div", { key: '31947e6cd76c35b8b8e7c0fb92b777e3bf8538b7', class: "tds-slider__control tds-slider__control-minus", onClick: (event) => this.stepLeft(event), role: "button", "aria-label": "Decrease value", tabindex: this.disabled || this.readOnly ? '-1' : '0' }, h("tds-icon", { key: '4c005f8c628236482eecdac51bd43a860f9e38d9', name: "minus", size: "16px" })))), h("div", { key: 'c6f21ded71244d202e255a90039f03872af09d5a', class: "tds-slider-inner", tabIndex: -1 }, this.tickValues.length > 0 && (h("div", { key: 'df1e820e1077ccec24826e38ba1b1fdd8dc0ae90', class: "tds-slider__value-dividers-wrapper" }, h("div", { key: 'f8cadf57f46068f61d1afc2bbcc30997a750705b', class: "tds-slider__value-dividers" }, this.tickValues.map((value) => (h("div", { class: "tds-slider__value-divider" }, this.showTickNumbers && h("span", null, value))))))), h("div", { key: '389ba385948b6772e803b7b9ec858061451f7534', class: "tds-slider__track", ref: (el) => {
|
|
423
455
|
this.trackElement = el;
|
|
424
456
|
}, tabindex: this.disabled ? '-1' : '0', role: "presentation", onFocus: () => {
|
|
425
457
|
if (this.thumbElement) {
|
|
426
458
|
this.thumbElement.focus();
|
|
427
459
|
}
|
|
428
|
-
} }, h("div", { key: '
|
|
460
|
+
} }, h("div", { key: '5409aec334156fc5c5ac6a2cdbcb38ee50e35259', class: "tds-slider__track-fill", ref: (el) => {
|
|
429
461
|
this.trackFillElement = el;
|
|
430
|
-
} }), h("div", { key: '
|
|
462
|
+
} }), h("div", { key: '8e0953ed9771846db11b9f79f6844065494f1b01', class: "tds-slider__thumb", ref: (el) => {
|
|
431
463
|
this.thumbElement = el;
|
|
432
|
-
}, onMouseDown: () => this.grabThumb(), onTouchStart: () => this.grabThumb(), role: "slider", "aria-valuemin": this.min, "aria-valuemax": this.max, "aria-valuenow": this.value, "aria-valuetext": `${this.value} of ${this.max}`, "aria-labelledby": `${this.sliderId}-label`, "aria-grabbed": this.thumbGrabbed ? 'true' : 'false', "aria-label": ariaLabel, tabindex: this.disabled ? '-1' : '0' }, this.tooltip && (h("div", { key: '
|
|
464
|
+
}, onMouseDown: () => this.grabThumb(), onTouchStart: () => this.grabThumb(), role: "slider", "aria-valuemin": this.min, "aria-valuemax": this.max, "aria-valuenow": this.value, "aria-valuetext": `${this.value} of ${this.max}`, "aria-labelledby": `${this.sliderId}-label`, "aria-grabbed": this.thumbGrabbed ? 'true' : 'false', "aria-label": ariaLabel, tabindex: this.disabled ? '-1' : '0' }, this.tooltip && (h("div", { key: 'ed08cca6219adff68babc9c535aff278a1b3325e', class: "tds-slider__value" }, this.value, h("svg", { key: 'dc46d041d7c123400a42ea9c9472cf0a329eb4a1', width: "18", height: "14", viewBox: "0 0 18 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '3d46edb2069bd056a2ae09efa4bfa7f6319afe3b', d: "M8.15882 12.6915L0.990487 1.54076C0.562658 0.875246 1.0405 0 1.83167 0H16.1683C16.9595 0 17.4373 0.875246 17.0095 1.54076L9.84118 12.6915C9.44754 13.3038 8.55246 13.3038 8.15882 12.6915Z", fill: "currentColor" })))), h("div", { key: '202f2b005a969cd7eb3396c14ef6f72224fcd56a', class: "tds-slider__thumb-inner", ref: (el) => {
|
|
433
465
|
this.thumbInnerElement = el;
|
|
434
|
-
} })))), this.useInput && (h("div", { key: '
|
|
466
|
+
} })))), this.useInput && (h("div", { key: 'ca2e84c4bccc24ebbc58a4915f62b5ecb77462c9', class: "tds-slider__input-values" }, h("div", { key: '58fdb8a9a25b9f15314aab8ffaee9424fbb26458', class: "tds-slider__input-value", onClick: (event) => this.stepLeft(event) }, this.max), h("div", { key: '4cba8f4c2b8a89922dbaa9eec4c2f9d12f43b62c', class: "tds-slider__input-field-wrapper" }, h("tds-text-field", { key: '65d311769aa5202134676cf9c4652132fbfc364d', noMinWidth: true, size: "sm", type: "number", value: this.value, min: this.min, max: this.max, readOnly: this.readOnly, disabled: this.disabled, onTdsChange: (e) => console.log(e), tdsAriaLabel: this.readOnly ? this.tdsReadOnlyAriaLabel : undefined, onTdsBlur: (event) => this.updateSliderValueFromTextField(event), onKeyDown: (event) => this.handleInputFieldEnterPress(event) })))), this.useControls && (h("div", { key: 'da8881158bee1aec2724a0e71af3faa88bc0eb17', class: "tds-slider__controls" }, h("div", { key: '241b11a3bee6ce8cf3e53ba77a095e2fb0cdb8a6', class: "tds-slider__control tds-slider__control-plus", onClick: (event) => this.stepRight(event), role: "button", "aria-label": "Increase value", tabindex: this.disabled || this.readOnly ? '-1' : '0' }, h("tds-icon", { key: 'c8e5466b53a1fe6abaaab77741e4adb7ec197341', name: "plus", size: "16px" })))))));
|
|
435
467
|
}
|
|
436
468
|
get host() { return this; }
|
|
437
469
|
static get watchers() { return {
|
|
@@ -465,7 +497,7 @@ function defineCustomElement$1() {
|
|
|
465
497
|
if (typeof customElements === "undefined") {
|
|
466
498
|
return;
|
|
467
499
|
}
|
|
468
|
-
const components = ["tds-slider", "tds-icon"];
|
|
500
|
+
const components = ["tds-slider", "tds-icon", "tds-popover-core", "tds-text-field", "tds-tooltip"];
|
|
469
501
|
components.forEach(tagName => { switch (tagName) {
|
|
470
502
|
case "tds-slider":
|
|
471
503
|
if (!customElements.get(tagName)) {
|
|
@@ -473,6 +505,21 @@ function defineCustomElement$1() {
|
|
|
473
505
|
}
|
|
474
506
|
break;
|
|
475
507
|
case "tds-icon":
|
|
508
|
+
if (!customElements.get(tagName)) {
|
|
509
|
+
defineCustomElement$5();
|
|
510
|
+
}
|
|
511
|
+
break;
|
|
512
|
+
case "tds-popover-core":
|
|
513
|
+
if (!customElements.get(tagName)) {
|
|
514
|
+
defineCustomElement$4();
|
|
515
|
+
}
|
|
516
|
+
break;
|
|
517
|
+
case "tds-text-field":
|
|
518
|
+
if (!customElements.get(tagName)) {
|
|
519
|
+
defineCustomElement$3();
|
|
520
|
+
}
|
|
521
|
+
break;
|
|
522
|
+
case "tds-tooltip":
|
|
476
523
|
if (!customElements.get(tagName)) {
|
|
477
524
|
defineCustomElement$2();
|
|
478
525
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-28ef5186.js';
|
|
2
2
|
import { d as defineCustomElement$5 } from './p-44f5b5e1.js';
|
|
3
|
-
import { d as defineCustomElement$4 } from './p-
|
|
4
|
-
import { d as defineCustomElement$3 } from './p-
|
|
3
|
+
import { d as defineCustomElement$4 } from './p-9a47d831.js';
|
|
4
|
+
import { d as defineCustomElement$3 } from './p-c4318e35.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './p-b390ece5.js';
|
|
6
6
|
|
|
7
7
|
const tableFooterCss = ":host{box-sizing:border-box;display:table-footer-group;height:var(--tds-spacing-element-48)}:host *{box-sizing:border-box}:host .tds-table__footer-row{background-color:var(--tds-table-footer-background);color:var(--tds-table-color)}:host .tds-table__footer-cell{padding:0 var(--tds-spacing-element-16)}:host .tds-table__footer-cell .tds-table__pagination{height:var(--tds-spacing-element-48);display:flex;align-items:center;justify-content:space-between}:host .tds-table__footer-cell .tds-table__pagination .tds-table__row-selector,:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector{display:flex;align-items:center}:host .tds-table__footer-cell .tds-table__pagination .tds-table__row-selector .rows-per-page,:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector .rows-per-page{display:flex;align-items:center;margin-right:var(--tds-spacing-element-16)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__row-selector .rows-per-page p,:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector .rows-per-page p{margin-right:var(--tds-spacing-element-8)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector-input{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);background-color:var(--tds-table-footer-page-selector-input-background);color:var(--tds-table-color);width:74px;height:30px;border:none;border-radius:var(--tds-spacing-element-4);transition:background-color 250ms ease;margin-right:var(--tds-spacing-element-4);padding-left:var(--tds-spacing-element-16)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector-input:hover{background-color:var(--tds-table-footer-page-selector-input-background-hover)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector-input:disabled{color:var(--tds-table-footer-page-selector-input-color-disabled)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector-input--shake{animation:tds-shake-animation 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;transform:translate3d(0, 0, 0);backface-visibility:hidden;perspective:1000px}:host .tds-table__footer-cell .tds-table__pagination .tds-table__footer-text{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:1px 8px 0 0}:host .tds-table__footer-cell .tds-table__pagination .tds-table__footer-btn{display:flex;justify-content:center;align-items:center;border:none;background-color:transparent;cursor:pointer;height:var(--tds-spacing-element-32);width:var(--tds-spacing-element-32);border-radius:var(--tds-spacing-element-4);transition:background-color 250ms ease;color:var(--tds-table-footer-page-selector-icon)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__footer-btn:hover{background-color:var(--tds-table-footer-btn-hover)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__footer-btn:disabled{cursor:default;color:var(--tds-table-footer-page-selector-icon-disabled)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__footer-btn:disabled:hover{background-color:transparent}:host .tds-table__footer-cell .tds-table__pagination .tds-table__footer-btn-svg{height:var(--tds-spacing-element-20);width:var(--tds-spacing-element-20);fill:var(--tds-table-color)}:host(.tds-table--compact){height:var(--tds-spacing-element-32)}:host(.tds-table--compact) .tds-table__footer-cell .tds-table__pagination{height:var(--tds-spacing-element-32)}:host(.tds-table--compact) .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector-input{height:var(--tds-spacing-element-24)}:host(.tds-table--compact) .tds-table__footer-cell .tds-table__pagination .tds-table__footer-btn{height:28px;width:28px}:host(.footer__horizontal-scroll){display:inline-table;position:absolute;margin-top:10px}@keyframes tds-shake-animation{10%,90%{transform:translate3d(-1px, 0, 0)}20%,80%{transform:translate3d(2px, 0, 0)}30%,50%,70%{transform:translate3d(-4px, 0, 0)}40%,60%{transform:translate3d(4px, 0, 0)}}";
|
|
@@ -1,188 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { h as hasSlot } from './p-ae110fc2.js';
|
|
3
|
-
import { g as generateUniqueId } from './p-11648030.js';
|
|
4
|
-
import { d as defineCustomElement$4 } from './p-b390ece5.js';
|
|
5
|
-
import { d as defineCustomElement$3 } from './p-d3866be7.js';
|
|
6
|
-
import { d as defineCustomElement$2 } from './p-40253725.js';
|
|
7
|
-
|
|
8
|
-
const textFieldCss = ".text-field-input-lg.sc-tds-text-field{all:unset;border-radius:4px 4px 0 0;width:100%;box-sizing:border-box;margin:0;border:none;outline:none;height:100%;color:var(--tds-text-field-color);background-color:var(--tds-text-field-background);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:var(--tds-spacing-element-20) var(--tds-spacing-element-16)}.text-field-input-lg.sc-tds-text-field::placeholder{color:var(--tds-text-field-placeholder)}.text-field-input-lg.sc-tds-text-field:disabled{user-select:none;pointer-events:none;background-color:var(--tds-text-field-background-disabled);color:var(--tds-text-field-color-disabled)}.text-field-input-lg.sc-tds-text-field:disabled::placeholder{color:var(--tds-text-field-placeholder-disabled)}.text-field-input-lg.sc-tds-text-field:disabled~.text-field-label-inside.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.text-field-input-md.sc-tds-text-field{all:unset;border-radius:4px 4px 0 0;width:100%;box-sizing:border-box;margin:0;border:none;outline:none;height:100%;color:var(--tds-text-field-color);background-color:var(--tds-text-field-background);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:var(--tds-spacing-element-16)}.text-field-input-md.sc-tds-text-field::placeholder{color:var(--tds-text-field-placeholder)}.text-field-input-md.sc-tds-text-field:disabled{user-select:none;pointer-events:none;background-color:var(--tds-text-field-background-disabled);color:var(--tds-text-field-color-disabled)}.text-field-input-md.sc-tds-text-field:disabled::placeholder{color:var(--tds-text-field-placeholder-disabled)}.text-field-input-md.sc-tds-text-field:disabled~.text-field-label-inside.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.text-field-input-sm.sc-tds-text-field{all:unset;border-radius:4px 4px 0 0;width:100%;box-sizing:border-box;margin:0;border:none;outline:none;height:100%;color:var(--tds-text-field-color);background-color:var(--tds-text-field-background);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:var(--tds-spacing-element-16)}.text-field-input-sm.sc-tds-text-field::placeholder{color:var(--tds-text-field-placeholder)}.text-field-input-sm.sc-tds-text-field:disabled{user-select:none;pointer-events:none;background-color:var(--tds-text-field-background-disabled);color:var(--tds-text-field-color-disabled)}.text-field-input-sm.sc-tds-text-field:disabled::placeholder{color:var(--tds-text-field-placeholder-disabled)}.text-field-input-sm.sc-tds-text-field:disabled~.text-field-label-inside.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.text-field-container.sc-tds-text-field{border-radius:4px 4px 0 0;display:flex;position:relative;height:56px;box-sizing:border-box;background-color:var(--tds-text-field-background);border-bottom:1px solid var(--tds-text-field-border-bottom);border-top:1px solid transparent;transition:border-bottom-color 200ms ease}.text-field-container.sc-tds-text-field:hover{border-bottom-color:var(--tds-text-field-border-bottom-hover)}.form-text-field-md.sc-tds-text-field .text-field-container.sc-tds-text-field{height:48px}.form-text-field-sm.sc-tds-text-field .text-field-container.sc-tds-text-field{height:40px}.text-field-container.sc-tds-text-field:focus-within{border:2px solid var(--tds-focus-outline-color);margin:0 -2px}.text-field-input-container.sc-tds-text-field{position:relative;width:100%}.text-field-data.sc-tds-text-field,.text-field-input.sc-tds-text-field{color:var(--tds-text-field-data-color)}.text-field-label-outside.sc-tds-text-field>*.sc-tds-text-field{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);display:block;margin-bottom:var(--tds-spacing-element-8);color:var(--tds-text-field-label-color)}.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);position:absolute;pointer-events:none;color:var(--tds-text-field-label-inside-color);left:16px}.form-text-field.sc-tds-text-field{display:block;min-width:208px}.form-text-field-nomin.sc-tds-text-field{min-width:auto}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field{padding-top:var(--tds-spacing-element-24);padding-bottom:15px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{top:20px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field .sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field:focus::placeholder{transition:color 0.35s ease;color:var(--tds-text-field-placeholder)}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field{padding-top:var(--tds-spacing-element-20);padding-bottom:11px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{top:16px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field .sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field:focus::placeholder{transition:color 0.35s ease;color:var(--tds-text-field-placeholder)}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field{padding-top:var(--tds-spacing-element-20);padding-bottom:11px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{top:16px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field .sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field:focus::placeholder{transition:color 0.35s ease;color:var(--tds-text-field-placeholder)}.form-text-field.text-field-container-label-inside.text-field-focus.sc-tds-text-field .text-field-input-sm.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field,.form-text-field.text-field-container-label-inside.text-field-data.sc-tds-text-field .text-field-input-sm.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:0.1s ease all;top:8px}.form-text-field.text-field-container-label-inside.text-field-focus.sc-tds-text-field .text-field-input-md.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field,.form-text-field.text-field-container-label-inside.text-field-data.sc-tds-text-field .text-field-input-md.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:0.1s ease all;top:8px}.form-text-field.text-field-container-label-inside.text-field-focus.sc-tds-text-field .text-field-input-lg.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field,.form-text-field.text-field-container-label-inside.text-field-data.sc-tds-text-field .text-field-input-lg.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:0.1s ease all;top:12px}.text-field-helper.sc-tds-text-field{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);display:flex;gap:8px;justify-content:space-between;flex-basis:100%;padding-top:var(--tds-spacing-element-4);color:var(--tds-text-field-helper)}.text-field-helper.sc-tds-text-field .text-field-textcounter.sc-tds-text-field{margin-left:auto}.form-text-field-disabled.sc-tds-text-field .text-field-container.sc-tds-text-field{cursor:not-allowed;border-bottom-color:transparent}.form-text-field-disabled.sc-tds-text-field .text-field-slot-wrap-prefix.sc-tds-text-field>*.sc-tds-text-field,.form-text-field-disabled.sc-tds-text-field .text-field-slot-wrap-suffix.sc-tds-text-field>*.sc-tds-text-field{color:var(--tds-text-field-ps-color-disabled)}.form-text-field-disabled.sc-tds-text-field .text-field-label-outside.sc-tds-text-field>*.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.form-text-field-disabled.sc-tds-text-field .text-field-helper.sc-tds-text-field{color:var(--tds-text-field-helper-disabled)}.text-field-icon__readonly.sc-tds-text-field{display:none;position:absolute;right:18px;top:50%;transform:translateY(-50%);color:var(--tds-text-field-icon-read-only-label-color)}.text-field-icon__readonly.sc-tds-text-field .tds-tooltip.sc-tds-text-field{min-width:150px}.form-text-field-readonly.sc-tds-text-field{user-select:auto;caret-color:transparent;cursor:default}.form-text-field-readonly.sc-tds-text-field .text-field-container.sc-tds-text-field{border-bottom-color:var(--tds-text-field-border-bottom-readonly)}.form-text-field-readonly.sc-tds-text-field .text-field-icon__readonly.sc-tds-text-field{display:block}.form-text-field-readonly.sc-tds-text-field .text-field-icon__readonly.sc-tds-text-field:hover~.text-field-icon__readonly-label.sc-tds-text-field{display:block}.form-text-field-readonly.sc-tds-text-field .text-field-input.sc-tds-text-field{background-color:transparent}.form-text-field-readonly.sc-tds-text-field:has(.text-field-icon__readonly) .text-field-input.sc-tds-text-field{padding-right:54px}.form-text-field-success.sc-tds-text-field:not(.form-text-field-readonly) .text-field-container.sc-tds-text-field{border-bottom-color:var(--tds-text-field-border-bottom-success)}.form-text-field-error.sc-tds-text-field:not(.form-text-field-readonly) .text-field-helper.sc-tds-text-field{color:var(--tds-text-field-helper-error)}.form-text-field-error.sc-tds-text-field:not(.form-text-field-readonly) .text-field-container.sc-tds-text-field{border-bottom-color:var(--tds-text-field-border-bottom-error)}.text-field-helper-error-state.sc-tds-text-field{display:flex;gap:8px;flex-wrap:nowrap}.text-field-textcounter-disabled.sc-tds-text-field{color:var(--tds-text-field-textcounter-disabled)}.text-field-textcounter.sc-tds-text-field{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);color:var(--tds-text-field-textcounter);float:right}.text-field-textcounter.text-field-textcounter-disabled.sc-tds-text-field{color:var(--tds-text-field-textcounter-disabled)}.text-field-textcounter.text-field-textcounter-divider.sc-tds-text-field{color:var(--tds-text-field-textcounter-divider)}.text-field-textcounter.text-field-textcounter-divider-disabled.sc-tds-text-field{color:var(--tds-text-field-textcounter-divider-disabled)}.text-field-slot-wrap-prefix.sc-tds-text-field,.text-field-slot-wrap-suffix.sc-tds-text-field{align-self:center;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);margin:0 0 0 14px;color:var(--tds-text-field-ps-color)}.text-field-slot-wrap-prefix.sc-tds-text-field-s>:not(tds-icon),.text-field-slot-wrap-suffix.sc-tds-text-field-s>:not(tds-icon){margin:0 0 0 2px}.text-field-slot-wrap-prefix.text-field-error.sc-tds-text-field,.text-field-slot-wrap-suffix.text-field-error.sc-tds-text-field{color:var(--tds-text-field-ps-color-error)}.text-field-slot-wrap-suffix.sc-tds-text-field{margin:0 14px 0 0}.text-field-slot-wrap-suffix.sc-tds-text-field-s>:not(tds-icon){margin:0 2px 0 0}";
|
|
9
|
-
const TdsTextFieldStyle0 = textFieldCss;
|
|
10
|
-
|
|
11
|
-
const TdsTextField$1 = /*@__PURE__*/ proxyCustomElement(class TdsTextField extends H {
|
|
12
|
-
constructor() {
|
|
13
|
-
super();
|
|
14
|
-
this.__registerHost();
|
|
15
|
-
this.tdsChange = createEvent(this, "tdsChange", 6);
|
|
16
|
-
this.tdsInput = createEvent(this, "tdsInput", 6);
|
|
17
|
-
this.tdsFocus = createEvent(this, "tdsFocus", 6);
|
|
18
|
-
this.tdsBlur = createEvent(this, "tdsBlur", 6);
|
|
19
|
-
this.uuid = generateUniqueId();
|
|
20
|
-
this.type = 'text';
|
|
21
|
-
this.labelPosition = 'no-label';
|
|
22
|
-
this.label = '';
|
|
23
|
-
this.min = undefined;
|
|
24
|
-
this.max = undefined;
|
|
25
|
-
this.helper = undefined;
|
|
26
|
-
this.placeholder = '';
|
|
27
|
-
this.value = '';
|
|
28
|
-
this.disabled = false;
|
|
29
|
-
this.readOnly = false;
|
|
30
|
-
this.hideReadOnlyIcon = false;
|
|
31
|
-
this.size = 'lg';
|
|
32
|
-
this.modeVariant = null;
|
|
33
|
-
this.noMinWidth = false;
|
|
34
|
-
this.name = '';
|
|
35
|
-
this.state = 'default';
|
|
36
|
-
this.maxLength = undefined;
|
|
37
|
-
this.autofocus = false;
|
|
38
|
-
this.tdsAriaLabel = undefined;
|
|
39
|
-
this.focusInput = false;
|
|
40
|
-
}
|
|
41
|
-
handleChange(event) {
|
|
42
|
-
this.tdsChange.emit(event);
|
|
43
|
-
}
|
|
44
|
-
// Data input event in value prop
|
|
45
|
-
handleInput(event) {
|
|
46
|
-
const inputEl = event.target;
|
|
47
|
-
let { value } = inputEl;
|
|
48
|
-
// Custom handling of number inputs when min/max are set
|
|
49
|
-
if (this.type === 'number') {
|
|
50
|
-
const numericValue = Number(value);
|
|
51
|
-
if (this.min !== undefined && numericValue < Number(this.min)) {
|
|
52
|
-
value = String(this.min);
|
|
53
|
-
}
|
|
54
|
-
if (this.max !== undefined && numericValue > Number(this.max)) {
|
|
55
|
-
value = String(this.max);
|
|
56
|
-
}
|
|
57
|
-
inputEl.value = value;
|
|
58
|
-
}
|
|
59
|
-
this.value = value;
|
|
60
|
-
this.tdsInput.emit(event);
|
|
61
|
-
}
|
|
62
|
-
/** Set the input as focus when clicking the whole Text Field with suffix/prefix */
|
|
63
|
-
handleFocus(event) {
|
|
64
|
-
this.textInput.focus();
|
|
65
|
-
this.focusInput = true;
|
|
66
|
-
this.tdsFocus.emit(event);
|
|
67
|
-
}
|
|
68
|
-
/** Set the input as focus when clicking the whole Text Field with suffix/prefix */
|
|
69
|
-
handleBlur(event) {
|
|
70
|
-
this.focusInput = false;
|
|
71
|
-
this.tdsBlur.emit(event);
|
|
72
|
-
}
|
|
73
|
-
/** Method to handle focus */
|
|
74
|
-
async focusElement() {
|
|
75
|
-
if (this.textInput) {
|
|
76
|
-
this.textInput.focus();
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
render() {
|
|
80
|
-
var _a;
|
|
81
|
-
const usesPrefixSlot = hasSlot('prefix', this.host);
|
|
82
|
-
const usesSuffixSlot = hasSlot('suffix', this.host);
|
|
83
|
-
return (h("div", { key: 'b9fa2b03ce2a0b196dc6083614420d6f83675e3d', class: {
|
|
84
|
-
'form-text-field': true,
|
|
85
|
-
'form-text-field-nomin': this.noMinWidth,
|
|
86
|
-
'text-field-focus': this.focusInput && !this.disabled,
|
|
87
|
-
'text-field-data': this.value !== '' && this.value !== null,
|
|
88
|
-
'text-field-container-label-inside': this.labelPosition === 'inside' && this.size !== 'sm',
|
|
89
|
-
'form-text-field-disabled': this.disabled,
|
|
90
|
-
'form-text-field-readonly': this.disabled ? false : this.readOnly,
|
|
91
|
-
'tds-mode-variant-primary': this.readOnly
|
|
92
|
-
? this.modeVariant === 'secondary'
|
|
93
|
-
: this.modeVariant === 'primary',
|
|
94
|
-
'tds-mode-variant-secondary': this.readOnly
|
|
95
|
-
? this.modeVariant === 'primary'
|
|
96
|
-
: this.modeVariant === 'secondary',
|
|
97
|
-
'form-text-field-md': this.size === 'md',
|
|
98
|
-
'form-text-field-sm': this.size === 'sm',
|
|
99
|
-
'form-text-field-error': this.state === 'error',
|
|
100
|
-
'form-text-field-success': this.state === 'success',
|
|
101
|
-
} }, this.labelPosition === 'outside' && (h("div", { key: '7110b867aba9a9ba62b796f67caeccf22a4a8060', class: "text-field-label-outside" }, h("label", { key: '6b0b6c7d17bb236f1203dfaf793ba0a3bc2d8efb', htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), h("div", { key: '5603d3e78b290a78d7c482a0dac7e1f0efb9af7f', onClick: () => this.textInput.focus(), class: "text-field-container" }, usesPrefixSlot && (h("div", { key: '9accb59dffa061d7947d4392310cb1717a395363', class: {
|
|
102
|
-
'text-field-slot-wrap-prefix': true,
|
|
103
|
-
'text-field-error': this.state === 'error',
|
|
104
|
-
'text-field-success': this.state === 'success',
|
|
105
|
-
'text-field-default': this.state === 'default',
|
|
106
|
-
} }, h("slot", { key: '739e089cdb9798dc108b68c4858c90bf75e18958', name: "prefix" }))), h("div", { key: 'e4229be4e4bf421319184e798b98afcbaa361413', class: "text-field-input-container" }, h("input", { key: 'f462b4c0d49e4e070090f6a14df52af66b87648d', ref: (inputEl) => {
|
|
107
|
-
this.textInput = inputEl;
|
|
108
|
-
}, class: {
|
|
109
|
-
'text-field-input': true,
|
|
110
|
-
'text-field-input-sm': this.size === 'sm',
|
|
111
|
-
'text-field-input-md': this.size === 'md',
|
|
112
|
-
'text-field-input-lg': this.size === 'lg',
|
|
113
|
-
}, type: this.type, disabled: this.disabled, readonly: this.disabled ? false : this.readOnly, placeholder: this.placeholder, value: this.value, autofocus: this.autofocus, maxlength: this.maxLength, name: this.name, min: this.min, max: this.max, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), onFocus: (event) => {
|
|
114
|
-
if (!this.readOnly) {
|
|
115
|
-
this.handleFocus(event);
|
|
116
|
-
}
|
|
117
|
-
}, onBlur: (event) => {
|
|
118
|
-
if (!this.readOnly) {
|
|
119
|
-
this.handleBlur(event);
|
|
120
|
-
}
|
|
121
|
-
}, "aria-label": this.tdsAriaLabel ? this.tdsAriaLabel : this.label, "aria-describedby": `text-field-helper-element-${this.uuid}`, "aria-readonly": this.readOnly, id: `text-field-input-element-${this.uuid}` }), this.labelPosition === 'inside' && this.size !== 'sm' && (h("label", { key: 'ac16cff7856d65503fa30f7eb23d2936377e72d4', class: "text-field-label-inside", htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), usesSuffixSlot && (h("div", { key: 'b70453ec36ca62f584b26b0e6dc4b3f0cde2ff54', class: {
|
|
122
|
-
'text-field-slot-wrap-suffix': true,
|
|
123
|
-
'text-field-error': this.state === 'error',
|
|
124
|
-
'text-field-success': this.state === 'success',
|
|
125
|
-
'text-field-default': this.state === 'default',
|
|
126
|
-
'tds-u-display-none': this.readOnly,
|
|
127
|
-
} }, h("slot", { key: '7e50b20d90a68f9af583b8f2ade5c742e2d52351', name: "suffix" }))), this.readOnly && !this.hideReadOnlyIcon && (h("span", { key: '72e2cf4f2872d247ac6f28e935e8185aafef6dec', class: "text-field-icon__readonly" }, h("tds-tooltip", { key: '171bdde8535c6bbd08eec60d87d9aa5bae1f98bd', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), h("tds-icon", { key: '05e7e8898ee3fcf81fb011aa2141092e8b749e37', id: "readonly-tooltip", name: "edit_inactive", size: "20px" })))), h("div", { key: '0c16d399b376d9aebed2aabf759cb7319c5745cf', "aria-live": "assertive" }, (this.helper || this.maxLength > 0) && (h("div", { key: '280eed9185c8cffa29e3cf62425f1f1f377f3abc', class: "text-field-helper", id: `text-field-helper-element-${this.uuid}` }, this.state === 'error' && (h("div", { key: 'ddf07e469173a574a848cd2ff816bcc535940340', class: "text-field-helper-error-state" }, !this.readOnly && h("tds-icon", { key: 'b5b06dba13fb8911828153341b631facfc016c88', name: "error", size: "16px" }), this.helper)), this.state !== 'error' && this.helper, !this.readOnly && this.maxLength > 0 && (h("span", { key: 'a4c41817f19b32e575423d5bbe19c28a38031e6e', class: {
|
|
128
|
-
'text-field-textcounter-divider': true,
|
|
129
|
-
'text-field-textcounter-disabled': this.disabled,
|
|
130
|
-
} }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, " / ", this.maxLength)))))));
|
|
131
|
-
}
|
|
132
|
-
get host() { return this; }
|
|
133
|
-
static get style() { return TdsTextFieldStyle0; }
|
|
134
|
-
}, [6, "tds-text-field", {
|
|
135
|
-
"type": [513],
|
|
136
|
-
"labelPosition": [1, "label-position"],
|
|
137
|
-
"label": [1],
|
|
138
|
-
"min": [8],
|
|
139
|
-
"max": [8],
|
|
140
|
-
"helper": [1],
|
|
141
|
-
"placeholder": [1],
|
|
142
|
-
"value": [513],
|
|
143
|
-
"disabled": [4],
|
|
144
|
-
"readOnly": [4, "read-only"],
|
|
145
|
-
"hideReadOnlyIcon": [4, "hide-read-only-icon"],
|
|
146
|
-
"size": [1],
|
|
147
|
-
"modeVariant": [1, "mode-variant"],
|
|
148
|
-
"noMinWidth": [4, "no-min-width"],
|
|
149
|
-
"name": [1],
|
|
150
|
-
"state": [1],
|
|
151
|
-
"maxLength": [2, "max-length"],
|
|
152
|
-
"autofocus": [4],
|
|
153
|
-
"tdsAriaLabel": [1, "tds-aria-label"],
|
|
154
|
-
"focusInput": [32],
|
|
155
|
-
"focusElement": [64]
|
|
156
|
-
}]);
|
|
157
|
-
function defineCustomElement$1() {
|
|
158
|
-
if (typeof customElements === "undefined") {
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
const components = ["tds-text-field", "tds-icon", "tds-popover-core", "tds-tooltip"];
|
|
162
|
-
components.forEach(tagName => { switch (tagName) {
|
|
163
|
-
case "tds-text-field":
|
|
164
|
-
if (!customElements.get(tagName)) {
|
|
165
|
-
customElements.define(tagName, TdsTextField$1);
|
|
166
|
-
}
|
|
167
|
-
break;
|
|
168
|
-
case "tds-icon":
|
|
169
|
-
if (!customElements.get(tagName)) {
|
|
170
|
-
defineCustomElement$4();
|
|
171
|
-
}
|
|
172
|
-
break;
|
|
173
|
-
case "tds-popover-core":
|
|
174
|
-
if (!customElements.get(tagName)) {
|
|
175
|
-
defineCustomElement$3();
|
|
176
|
-
}
|
|
177
|
-
break;
|
|
178
|
-
case "tds-tooltip":
|
|
179
|
-
if (!customElements.get(tagName)) {
|
|
180
|
-
defineCustomElement$2();
|
|
181
|
-
}
|
|
182
|
-
break;
|
|
183
|
-
} });
|
|
184
|
-
}
|
|
185
|
-
defineCustomElement$1();
|
|
1
|
+
import { T as TdsTextField$1, d as defineCustomElement$1 } from './p-a0c21704.js';
|
|
186
2
|
|
|
187
3
|
const TdsTextField = TdsTextField$1;
|
|
188
4
|
const defineCustomElement = defineCustomElement$1;
|