@aquera/nile-elements 2.0.11 → 2.0.13
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/README.md +7 -0
- package/demo/app-shell.html +21 -21
- package/dist/index.js +170 -167
- package/dist/nile-app-shell/nile-app-shell.cjs.js +1 -1
- package/dist/nile-app-shell/nile-app-shell.cjs.js.map +1 -1
- package/dist/nile-app-shell/nile-app-shell.css.cjs.js +1 -1
- package/dist/nile-app-shell/nile-app-shell.css.cjs.js.map +1 -1
- package/dist/nile-app-shell/nile-app-shell.css.esm.js +35 -32
- package/dist/nile-app-shell/nile-app-shell.esm.js +39 -34
- package/dist/nile-app-shell-panel/nile-app-shell-panel.css.cjs.js +1 -1
- package/dist/nile-app-shell-panel/nile-app-shell-panel.css.cjs.js.map +1 -1
- package/dist/nile-app-shell-panel/nile-app-shell-panel.css.esm.js +3 -1
- package/dist/nile-select/nile-select.cjs.js +2 -2
- package/dist/nile-select/nile-select.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.css.cjs.js +1 -1
- package/dist/nile-select/nile-select.css.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.css.esm.js +12 -17
- package/dist/nile-select/nile-select.esm.js +43 -42
- package/dist/nile-select/virtual-scroll-helper.cjs.js +1 -1
- package/dist/nile-select/virtual-scroll-helper.cjs.js.map +1 -1
- package/dist/nile-select/virtual-scroll-helper.esm.js +2 -0
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js +4 -4
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js.map +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js.map +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.css.esm.js +12 -17
- package/dist/nile-virtual-select/nile-virtual-select.esm.js +26 -26
- package/dist/src/nile-app-shell/nile-app-shell-regions.test.js +9 -5
- package/dist/src/nile-app-shell/nile-app-shell-regions.test.js.map +1 -1
- package/dist/src/nile-app-shell/nile-app-shell.css.js +33 -30
- package/dist/src/nile-app-shell/nile-app-shell.css.js.map +1 -1
- package/dist/src/nile-app-shell/nile-app-shell.d.ts +22 -22
- package/dist/src/nile-app-shell/nile-app-shell.js +86 -76
- package/dist/src/nile-app-shell/nile-app-shell.js.map +1 -1
- package/dist/src/nile-app-shell/nile-app-shell.test.d.ts +1 -0
- package/dist/src/nile-app-shell/nile-app-shell.test.js +307 -89
- package/dist/src/nile-app-shell/nile-app-shell.test.js.map +1 -1
- package/dist/src/nile-app-shell-panel/nile-app-shell-panel.css.js +3 -1
- package/dist/src/nile-app-shell-panel/nile-app-shell-panel.css.js.map +1 -1
- package/dist/src/nile-select/nile-select.css.js +12 -17
- package/dist/src/nile-select/nile-select.css.js.map +1 -1
- package/dist/src/nile-select/nile-select.d.ts +18 -2
- package/dist/src/nile-select/nile-select.js +226 -64
- package/dist/src/nile-select/nile-select.js.map +1 -1
- package/dist/src/nile-select/nile-select.test.d.ts +1 -0
- package/dist/src/nile-select/nile-select.test.js +896 -17
- package/dist/src/nile-select/nile-select.test.js.map +1 -1
- package/dist/src/nile-select/virtual-scroll-helper.js +2 -0
- package/dist/src/nile-select/virtual-scroll-helper.js.map +1 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.css.js +12 -17
- package/dist/src/nile-virtual-select/nile-virtual-select.css.js.map +1 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.d.ts +10 -2
- package/dist/src/nile-virtual-select/nile-virtual-select.js +142 -30
- package/dist/src/nile-virtual-select/nile-virtual-select.js.map +1 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.test.d.ts +1 -0
- package/dist/src/nile-virtual-select/nile-virtual-select.test.js +331 -16
- package/dist/src/nile-virtual-select/nile-virtual-select.test.js.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-app-shell/nile-app-shell-regions.test.ts +9 -5
- package/src/nile-app-shell/nile-app-shell.css.ts +33 -30
- package/src/nile-app-shell/nile-app-shell.test.ts +348 -105
- package/src/nile-app-shell/nile-app-shell.ts +89 -82
- package/src/nile-app-shell-panel/nile-app-shell-panel.css.ts +3 -1
- package/src/nile-select/nile-select.css.ts +12 -17
- package/src/nile-select/nile-select.test.ts +1112 -17
- package/src/nile-select/nile-select.ts +237 -67
- package/src/nile-select/virtual-scroll-helper.ts +2 -0
- package/src/nile-virtual-select/nile-virtual-select.css.ts +12 -17
- package/src/nile-virtual-select/nile-virtual-select.test.ts +404 -16
- package/src/nile-virtual-select/nile-virtual-select.ts +200 -79
- package/vscode-html-custom-data.json +36 -41
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["lit"],function(_export,_context){"use strict";var e,_templateObject,o;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){e=_lit.css;}],execute:function execute(){_export("s",o=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n box-sizing: border-box;\n --ng-nxt-gen-outline: var(--ng-border-width-1) solid var(--ng-colors-border-brand);\n --ng-nxt-gen-outline-error: var(--ng-border-width-1) solid var(--ng-colors-border-error);\n --ng-private-outline-transparent: var(--ng-border-width-1) solid transparent;\n --ng-box-shadow: 0px 12px 16px -4px var(--ng-colors-effects-shadow-lg-01, rgba(10, 13, 18, 0.08)), 0px 4px 6px -2px var(--ng-colors-effects-shadow-lg-02, rgba(10, 13, 18, 0.03)), 0px 2px 2px -1px var(--ng-colors-effects-shadow-lg-03, rgba(10, 13, 18, 0.04));\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n .virtualized{\n min-width: 110px;\n width: 100%;\n }\n\n .virtualized ::slotted(nile-option),\n .virtualized nile-option {\n width: 100%;\n display: block;\n }\n\n /* Ensure proper sizing for non-virtualized options (small datasets) */\n .virtualized:not(:has(lit-virtualizer)) {\n display: flex;\n flex-direction: column;\n }\n\n .virtualized:not(:has(lit-virtualizer)) nile-option {\n flex-shrink: 0;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n :host([disabled]) .form-control--has-label .form-control__label {\n user-select: none;\n -webkit-user-select: none;\n }\n\n [hidden] {\n display: none !important;\n }\n\n .form-control .form-control__label {\n display: none;\n }\n\n .form-control .form-control__help-text {\n display: none;\n }\n\n /* Label */\n .form-control--has-label .form-control__label {\n display: block;\n margin-bottom: var(--nile-spacing-sm, var(--ng-spacing-sm));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-secondary-700));\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-md));\n font-style: normal;\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-medium));\n line-height: var(--nile-spacing-2xl, var(--ng-line-height-text-sm));\n letter-spacing: 0.2px;\n }\n\n .form-control--has-label.form-control--medium .form-control__label {\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n }\n\n :host([required]) .form-control--has-label .form-control__label::after {\n content: '*';\n margin-inline-start: -2px;\n color: var(--nile-colors-red-700, var(--ng-colors-text-error-primary-600));\n }\n\n /* Help text */\n .form-control--has-help-text .form-control__help-text {\n display: block;\n color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n margin-top: var(--nile-spacing-lg, var(--ng-spacing-lg));\n }\n\n .form-control--has-help-text.form-control--medium .form-control__help-text {\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n }\n\n .form-control--has-help-text.form-control--radio-group\n .form-control__help-text {\n margin-top: var(--nile-spacing-xs, var(--ng-spacing-sm));\n }\n\n :host {\n display: block;\n }\n\n /** The popup */\n .select {\n flex: 1 1 auto;\n display: inline-flex;\n width: 100%;\n position: relative;\n vertical-align: middle;\n }\n\n .select::part(popup) {\n z-index: 9999;\n }\n\n .select[data-current-placement^='top']::part(popup) {\n transform-origin: bottom;\n }\n\n .select[data-current-placement^='bottom']::part(popup) {\n transform-origin: top;\n }\n\n /* Combobox */\n .select__combobox {\n flex: 1;\n display: flex;\n width: 100%;\n min-width: 0;\n position: relative;\n align-items: center;\n justify-content: start;\n font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-medium));\n letter-spacing: normal;\n vertical-align: middle;\n overflow: hidden;\n cursor: pointer;\n transition: 150ms color, 150ms border, 150ms box-shadow,\n 150ms background-color;\n }\n\n .select__display-input {\n position: relative;\n width: 100%;\n font: inherit;\n border: none;\n background: none;\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n cursor: inherit;\n overflow: hidden;\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n margin: var(--nile-spacing-none, var(--ng-spacing-none));\n -webkit-appearance: none;\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3,var(--ng-font-size-text-md));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n }\n\n .select__display-input::placeholder {\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n color: var(--nile-colors-text-placeholder, var(--ng-colors-text-placeholder));\n }\n\n .select:not(.select--disabled):hover .select__display-input {\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n }\n\n .select__display-input:focus {\n outline: none;\n }\n\n /* Visually hide the display input when multiple is enabled */\n .select--multiple:not(.select--placeholder-visible) .select__display-input {\n position: absolute;\n z-index: -1;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n }\n\n .select__value-input {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n margin: var(--nile-spacing-none, var(--ng-spacing-none));\n opacity: 0;\n z-index: -1;\n }\n\n .select__tags {\n display: flex;\n flex: 1;\n align-items: center;\n flex-wrap: nowrap;\n margin-inline-start: var(--nile-spacing-7px, var(--ng-spacing-md));\n width: 100%;\n overflow: hidden;\n }\n\n .select__tags-count {\n color: var(--nile-colors-primary-600, var(--ng-colors-text-brand-secondary-700));\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n font-style: normal;\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-medium));\n line-height: var(--nile-line-height-xsmall, var(--ng-line-height-text-sm));\n letter-spacing: 0.2px;\n margin: var(--nile-spacing-sm, var(--ng-spacing-sm));\n }\n\n .select__tags-count-clearable {\n margin-right: var(--nile-spacing-5xl, var(--ng-spacing-5xl));\n }\n\n button.select__tags-count {\n appearance: none;\n -webkit-appearance: none;\n background: none;\n text-align: inherit;\n }\n\n button.select__tags-count:disabled {\n cursor: not-allowed;\n }\n\n .select__tags--fitted {\n min-width: 0;\n }\n\n .select__tags nile-lite-tooltip.select__tag-tip {\n display: contents;\n }\n\n .select__tags nile-tag {\n flex: 0 1 auto;\n cursor: pointer;\n min-width: 0;\n }\n\n /* A chip is capped - and so truncated - only when a tooltip can reveal the\n full value. Without one it keeps its natural width and the fit pass moves\n the surplus into the +N button instead. */\n :host([showtooltip]) .select__tags nile-tag {\n max-width: var(--nile-width-180px, var(--ng-height-180px));\n }\n\n /* Only the fitted layout can move a chip into the +N button, so only there\n can a chip refuse to shrink. */\n :host(:not([showtooltip])) .select__tags--fitted nile-tag {\n flex-shrink: 0;\n }\n\n .select__tags nile-tag::part(base) {\n max-width: 100%;\n }\n\n .select__tags nile-tag::part(prefix_content_wrapper) {\n flex: 1 1 auto;\n min-width: 0;\n }\n\n .select__tags nile-tag::part(content) {\n display: block;\n flex: 1 1 auto;\n min-width: 0;\n /* The tag's line-height of 1 leaves the clip box shorter than the glyph\n box, so descenders are cut. Pad the clip box, negate it in layout. */\n padding-block: 3px;\n margin-block: -3px;\n overflow: hidden;\n white-space: nowrap;\n }\n\n :host([showtooltip]) .select__tags nile-tag::part(content) {\n text-overflow: ellipsis;\n }\n\n .select__tags nile-tag::part(remove-button) {\n flex: 0 0 auto;\n }\n\n .select__tags--fitted nile-tag:focus-visible {\n outline: 2px solid var(--nile-colors-primary-600, var(--ng-colors-border-brand));\n outline-offset: 1px;\n border-radius: var(--nile-radius-sm, var(--ng-radius-sm));\n }\n\n .select__tags--fitted .select__tags-count {\n flex: 0 0 auto;\n margin: 0;\n padding: 0 var(--nile-spacing-xsmall, var(--ng-spacing-md));\n height: var(--nile-height-26px, var(--ng-height-26px));\n display: inline-flex;\n align-items: center;\n white-space: nowrap;\n cursor: pointer;\n border: 1px dashed\n var(--nile-colors-neutral-500, var(--ng-colors-border-secondary));\n border-radius: var(--nile-radius-sm, var(--ng-radius-sm));\n }\n\n .select__tags--fitted .select__tags-count:focus-visible {\n outline: 2px solid var(--nile-colors-primary-600, var(--ng-colors-border-brand));\n outline-offset: 1px;\n }\n\n .select__tags::slotted(nile-tag) {\n cursor: pointer !important;\n }\n\n .select--disabled .select__tags,\n .select--disabled .select__tags::slotted(nile-tag) {\n cursor: not-allowed !important;\n }\n\n .select--disabled .select__display-input{\n color:var(--nile-colors-dark-500, var(--ng-colors-text-disabled));\n pointer-events:none;\n }\n\n /* Standard selects */\n .select--standard .select__combobox {\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border: solid 1px var(--nile-colors-neutral-500, var(--ng-colors-border-primary));\n outline: var(--nile-outline-none, var(--ng-private-outline-transparent));\n }\n\n .select--standard .select__combobox:hover {\n border: 1px solid var(--nile-colors-dark-900, var(--ng-colors-border-neutral));\n background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n }\n\n .select--error:hover:not(.select--disabled) .select__combobox {\n border-color: var(--nile-colors-red-500, var(--ng-colors-border-error));\n outline: var(--nile-outline-none, var(--ng-colors-border-error));\n }\n\n .select--standard.select--disabled .select__combobox {\n background-color: var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle));\n border-color: var(--nile-colors-neutral-500, var(--ng-colors-border-primary));\n color: var(--nile-colors-dark-500, var(--ng-colors-text-disabled));\n user-select:none;\n cursor: not-allowed;\n outline: none;\n }\n\n .select--standard:not(.select--disabled).select--open .select__combobox,\n .select--standard:not(.select--disabled).select--focused .select__combobox {\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));\n }\n\n .select--warning .select__combobox {\n border-color: var(--nile-colors-yellow-500, var(--ng-colors-border-warning));\n }\n\n .select--error .select__combobox {\n border-color: var(--nile-colors-red-500, var(--ng-colors-border-error));\n outline: var(--nile-outline-none, var(--ng-private-outline-transparent));\n }\n\n .select--success {\n border-color: var(--nile-colors-green-500, var(--ng-componentcolors-utility-success-500));\n }\n\n /* Filled selects */\n .select--filled .select__combobox {\n border: none;\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n }\n\n .select--filled:hover:not(.select--disabled) .select__combobox {\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));\n }\n\n .select--filled.select--disabled .select__combobox {\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-disabled-subtle));\n opacity: var(--nile-opacity-50, var(--ng-opacity-100));\n cursor: not-allowed;\n }\n\n .select--filled:not(.select--disabled).select--open .select__combobox,\n .select--filled:not(.select--disabled).select--focused .select__combobox {\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));\n outline: 3px solid rgba(0, 89, 255, 0.4);\n }\n\n .select--medium .select__combobox {\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n padding: var(--nile-spacing-lg, var(--ng-spacing-md)) var(--nile-spacing-lg, var(--ng-spacing-lg));\n height: var(--nile-height-40px, var(--ng-height-40px));\n box-sizing: border-box;\n }\n\n .select--medium .select__clear {\n margin-inline-start: var(--nile-spacing-lg, var(--ng-spacing-lg));\n }\n\n .select--medium .select__prefix::slotted(*) {\n margin-inline-end: var(--nile-spacing-md, var(--ng-spacing-md));\n }\n\n .select--medium .select__prefix.multiple::slotted(*) {\n margin-inline-start: var(--nile-spacing-lg, var(--ng-spacing-md));\n }\n\n .select--medium.select--multiple:not(.select--placeholder-visible)\n .select__combobox {\n padding-inline-start: var(--nile-spacing-none, var(--ng-spacing-none));\n }\n\n .select--medium .select__tags {\n gap: var(--nile-spacing-3px, var(--ng-spacing-sm));\n }\n\n /* Pills */\n .select--pill.select--medium .select__combobox {\n border-radius: var(--nile-radius-3xl, var(--ng-radius-3xl));\n }\n\n /* Prefix */\n .select__prefix {\n flex: 0;\n display: inline-flex;\n align-items: center;\n color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n }\n\n .select__suffix {\n flex: 0;\n display: inline-flex;\n align-items: center;\n color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n }\n\n /* Clear button */\n .select__clear {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n color: var(--nile-colors-primary-600, var(--ng-colors-text-brand-secondary-700));\n border: none;\n background: none;\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n transition: 150ms color;\n cursor: pointer;\n }\n\n .select__clear:hover {\n color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n }\n\n .select__clear:focus {\n outline: none;\n }\n\n /* Expand icon */\n .select__expand-icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n transition: 250ms rotate ease;\n rotate: 0;\n margin-inline-start: var(--nile-spacing-md, var(--ng-spacing-md));\n }\n\n .select--open .select__expand-icon {\n rotate: -180deg;\n }\n\n /* Listbox */\n .select__listbox {\n display: block;\n position: relative;\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-md));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border: solid 1px var(--nile-colors-neutral-500, var(--ng-colors-border-secondary-alt));\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n padding-block: var(--nile-spacing-none, var(--ng-spacing-xs));\n padding-inline: var(--nile-spacing-none, var(--ng-spacing-xs));\n overscroll-behavior: none;\n /* Make sure it adheres to the popup's auto size */\n max-width: var(--auto-size-available-width);\n max-height: var(--auto-size-available-height);\n box-shadow: var(--nile-box-shadow-none, var(--ng-shadow-xs));\n }\n\n .select__options {\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n color: rgb(133, 129, 129);\n width: 100%;\n }\n\n .select__options__search-enabled {\n padding-top: var(--nile-spacing-10px, var(--ng-spacing-lg));\n width: 100%;\n }\n\n .select__listbox::slotted(nile-divider) {\n --spacing: var(--nile-spacing-xs, var(--ng-spacing-sm));\n }\n\n .select__listbox::slotted(small) {\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n font-weight: var(--nile-font-weight-semi-bold, var(--ng-font-weight-semibold));\n color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n padding-block: var(--nile-spacing-xs, var(--ng-spacing-sm));\n padding-inline: var(--nile-spacing-xl, var(--ng-spacing-xl));\n }\n\n .select__search {\n position: sticky;\n top: 0px;\n z-index: 1;\n width: calc(100% - 16px);\n padding: var(--nile-spacing-md, var(--ng-spacing-md));\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n margin-bottom: -8px;\n }\n\n .select__footer {\n position: sticky;\n bottom: 0px;\n background: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));\n border-top: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));\n display: flex;\n height: 15px;\n /* Auto layout */\n display: var(--nile-display-flex, var(--ng-display-flex));\n flex-direction: row;\n align-items: center;\n padding: var(--nile-spacing-md, var(--ng-spacing-md)) var(--nile-spacing-lg, var(--ng-spacing-lg));\n gap: var(--nile-spacing-none, var(--ng-spacing-none));\n justify-content: space-between;\n box-sizing: unset;\n container-type: inline-size;\n container-name: nile-select-footer;\n }\n\n .select__footer-action,\n .select__footer .select__clear {\n display: inline-flex;\n align-items: center;\n gap: var(--nile-spacing-sm, var(--ng-spacing-sm));\n min-width: 0;\n }\n\n .select__footer-glyph {\n flex: 0 0 auto;\n display: inline-flex;\n vertical-align: middle;\n }\n\n .select__footer-label {\n white-space: nowrap;\n }\n\n @container nile-select-footer (max-width: 148px) {\n .select__clear .select__footer-label {\n display: none;\n }\n }\n\n @container nile-select-footer (max-width: 113px) {\n .select__footer-label {\n display: none;\n }\n }\n\n .tag__prefix[slot='prefix'] {\n height: 14px;\n display: inline-block;\n overflow: hidden;\n }\n\n .tag__prefix[slot='prefix'] img {\n max-height: 100%;\n }\n\n .select__loader {\n width: 100%;\n text-align: center;\n display: block;\n }\n\n .select__loader--icon {\n margin-top: var(--nile-spacing-xl, var(--ng-spacing-xl));\n animation: spin 0.6s linear infinite;\n }\n\n .select__no-results {\n padding: var(--nile-spacing-lg, var(--ng-spacing-lg));\n }\n\n @keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n .select__prefix--from-options {\n margin-inline-end: var(--nile-spacing-lg, var(--ng-spacing-md));\n }\n \n .select__hide-default{\n display: none;\n }\n\n .virtualized nile-option[selected] {\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));\n }\n\n .virtualized nile-option[selected]::part(base) {\n color: var(--nile-colors-primary-600, var(--ng-colors-text-brand-secondary-700));\n }\n\n .virtualized.no-scroll {\n overflow: hidden !important;\n }\n\n .virtual-select-loader {\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 75%;\n }\n\n .select__footer.loading, .select__options.loading {\n opacity: 0.5;\n pointer-events: none;\n }\n\n .virtual-select-loader {\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 75%;\n }\n\n .select__footer.loading, .select__options.loading {\n opacity: 0.5;\n pointer-events: none;\n }\n .select.select--open .select__combobox {\n border-color: var(--ng-colors-border-brand);\n box-shadow: 0 0 0 1px var(--ng-colors-border-brand) inset ;\n }\n\n :host([enableDescription]) .option::part(base) {\n height: 41px;\n }\n"]))));}};});
|
|
1
|
+
System.register(["lit"],function(_export,_context){"use strict";var e,_templateObject,o;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){e=_lit.css;}],execute:function execute(){_export("s",o=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n box-sizing: border-box;\n --ng-nxt-gen-outline: var(--ng-border-width-1) solid var(--ng-colors-border-brand);\n --ng-nxt-gen-outline-error: var(--ng-border-width-1) solid var(--ng-colors-border-error);\n --ng-private-outline-transparent: var(--ng-border-width-1) solid transparent;\n --ng-box-shadow: 0px 12px 16px -4px var(--ng-colors-effects-shadow-lg-01, rgba(10, 13, 18, 0.08)), 0px 4px 6px -2px var(--ng-colors-effects-shadow-lg-02, rgba(10, 13, 18, 0.03)), 0px 2px 2px -1px var(--ng-colors-effects-shadow-lg-03, rgba(10, 13, 18, 0.04));\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n .virtualized{\n min-width: 110px;\n width: 100%;\n }\n\n .virtualized ::slotted(nile-option),\n .virtualized nile-option {\n width: 100%;\n display: block;\n }\n\n /* Ensure proper sizing for non-virtualized options (small datasets) */\n .virtualized:not(:has(lit-virtualizer)) {\n display: flex;\n flex-direction: column;\n }\n\n .virtualized:not(:has(lit-virtualizer)) nile-option {\n flex-shrink: 0;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n :host([disabled]) .form-control--has-label .form-control__label {\n user-select: none;\n -webkit-user-select: none;\n }\n\n [hidden] {\n display: none !important;\n }\n\n .form-control .form-control__label {\n display: none;\n }\n\n .form-control .form-control__help-text {\n display: none;\n }\n\n /* Label */\n .form-control--has-label .form-control__label {\n display: block;\n margin-bottom: var(--nile-spacing-sm, var(--ng-spacing-sm));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-secondary-700));\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-md));\n font-style: normal;\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-medium));\n line-height: var(--nile-spacing-2xl, var(--ng-line-height-text-sm));\n letter-spacing: 0.2px;\n }\n\n .form-control--has-label.form-control--medium .form-control__label {\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n }\n\n :host([required]) .form-control--has-label .form-control__label::after {\n content: '*';\n margin-inline-start: -2px;\n color: var(--nile-colors-red-700, var(--ng-colors-text-error-primary-600));\n }\n\n /* Help text */\n .form-control--has-help-text .form-control__help-text {\n display: block;\n color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n margin-top: var(--nile-spacing-lg, var(--ng-spacing-lg));\n }\n\n .form-control--has-help-text.form-control--medium .form-control__help-text {\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n }\n\n .form-control--has-help-text.form-control--radio-group\n .form-control__help-text {\n margin-top: var(--nile-spacing-xs, var(--ng-spacing-sm));\n }\n\n :host {\n display: block;\n }\n\n /** The popup */\n .select {\n flex: 1 1 auto;\n display: inline-flex;\n width: 100%;\n position: relative;\n vertical-align: middle;\n }\n\n .select::part(popup) {\n z-index: 9999;\n }\n\n .select[data-current-placement^='top']::part(popup) {\n transform-origin: bottom;\n }\n\n .select[data-current-placement^='bottom']::part(popup) {\n transform-origin: top;\n }\n\n /* Combobox */\n .select__combobox {\n flex: 1;\n display: flex;\n width: 100%;\n min-width: 0;\n position: relative;\n align-items: center;\n justify-content: start;\n font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-medium));\n letter-spacing: normal;\n vertical-align: middle;\n overflow: hidden;\n cursor: pointer;\n transition: 150ms color, 150ms border, 150ms box-shadow,\n 150ms background-color;\n }\n\n .select__display-input {\n position: relative;\n width: 100%;\n font: inherit;\n border: none;\n background: none;\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n cursor: inherit;\n overflow: hidden;\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n margin: var(--nile-spacing-none, var(--ng-spacing-none));\n -webkit-appearance: none;\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3,var(--ng-font-size-text-md));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n }\n\n .select__display-input::placeholder {\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n color: var(--nile-colors-text-placeholder, var(--ng-colors-text-placeholder));\n }\n\n .select:not(.select--disabled):hover .select__display-input {\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n }\n\n .select__display-input:focus {\n outline: none;\n }\n\n /* Visually hide the display input when multiple is enabled */\n .select--multiple:not(.select--placeholder-visible) .select__display-input {\n position: absolute;\n z-index: -1;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n }\n\n .select__value-input {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n margin: var(--nile-spacing-none, var(--ng-spacing-none));\n opacity: 0;\n z-index: -1;\n }\n\n .select__tags {\n display: flex;\n flex: 1;\n align-items: center;\n flex-wrap: nowrap;\n margin-inline-start: var(--nile-spacing-7px, var(--ng-spacing-md));\n width: 100%;\n overflow: hidden;\n }\n\n .select__tags-count {\n color: var(--nile-colors-primary-600, var(--ng-colors-text-brand-secondary-700));\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n font-style: normal;\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-medium));\n line-height: var(--nile-line-height-xsmall, var(--ng-line-height-text-sm));\n letter-spacing: 0.2px;\n margin: var(--nile-spacing-sm, var(--ng-spacing-sm));\n }\n\n .select__tags-count-clearable {\n margin-right: var(--nile-spacing-5xl, var(--ng-spacing-5xl));\n }\n\n button.select__tags-count {\n appearance: none;\n -webkit-appearance: none;\n background: none;\n text-align: inherit;\n }\n\n button.select__tags-count:disabled {\n cursor: not-allowed;\n }\n\n .select__tags--fitted {\n min-width: 0;\n }\n\n .select__tags nile-lite-tooltip.select__tag-tip {\n display: contents;\n }\n\n :host([showtooltip]) .select__tags nile-tag {\n flex: 0 1 auto;\n cursor: pointer;\n min-width: 0;\n max-width: var(--nile-width-180px, var(--ng-height-180px));\n }\n\n :host([showtooltip]) .select__tags nile-tag::part(base) {\n max-width: 100%;\n }\n\n :host([showtooltip]) .select__tags nile-tag::part(prefix_content_wrapper) {\n flex: 1 1 auto;\n min-width: 0;\n }\n\n :host([showtooltip]) .select__tags nile-tag::part(content) {\n display: block;\n flex: 1 1 auto;\n min-width: 0;\n /* The tag's line-height of 1 leaves the clip box shorter than the glyph\n box, so descenders are cut. Pad the clip box, negate it in layout. */\n padding-block: 3px;\n margin-block: -3px;\n overflow: hidden;\n white-space: nowrap;\n }\n\n :host([showtooltip]) .select__tags nile-tag::part(content) {\n text-overflow: ellipsis;\n }\n\n :host([showtooltip]) .select__tags nile-tag::part(remove-button) {\n flex: 0 0 auto;\n }\n\n .select__tags--fitted nile-tag:focus-visible {\n outline: 2px solid var(--nile-colors-primary-600, var(--ng-colors-border-brand));\n outline-offset: 1px;\n border-radius: var(--nile-radius-sm, var(--ng-radius-sm));\n }\n\n .select__tags--fitted .select__tags-count {\n flex: 0 0 auto;\n margin: 0;\n padding: 0 var(--nile-spacing-xsmall, var(--ng-spacing-md));\n height: var(--nile-height-26px, var(--ng-height-26px));\n display: inline-flex;\n align-items: center;\n white-space: nowrap;\n cursor: pointer;\n border: 1px dashed\n var(--nile-colors-neutral-500, var(--ng-colors-border-secondary));\n border-radius: var(--nile-radius-sm, var(--ng-radius-sm));\n }\n\n .select__tags--fitted .select__tags-count:focus-visible {\n outline: 2px solid var(--nile-colors-primary-600, var(--ng-colors-border-brand));\n outline-offset: 1px;\n }\n\n .select__tags::slotted(nile-tag) {\n cursor: pointer !important;\n }\n\n .select--disabled .select__tags,\n .select--disabled .select__tags::slotted(nile-tag) {\n cursor: not-allowed !important;\n }\n\n .select--disabled .select__display-input{\n color:var(--nile-colors-dark-500, var(--ng-colors-text-disabled));\n pointer-events:none;\n }\n\n /* Standard selects */\n .select--standard .select__combobox {\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border: solid 1px var(--nile-colors-neutral-500, var(--ng-colors-border-primary));\n outline: var(--nile-outline-none, var(--ng-private-outline-transparent));\n }\n\n .select--standard .select__combobox:hover {\n border: 1px solid var(--nile-colors-dark-900, var(--ng-colors-border-neutral));\n background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n }\n\n .select--error:hover:not(.select--disabled) .select__combobox {\n border-color: var(--nile-colors-red-500, var(--ng-colors-border-error));\n outline: var(--nile-outline-none, var(--ng-colors-border-error));\n }\n\n .select--standard.select--disabled .select__combobox {\n background-color: var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle));\n border-color: var(--nile-colors-neutral-500, var(--ng-colors-border-primary));\n color: var(--nile-colors-dark-500, var(--ng-colors-text-disabled));\n user-select:none;\n cursor: not-allowed;\n outline: none;\n }\n\n .select--standard:not(.select--disabled).select--open .select__combobox,\n .select--standard:not(.select--disabled).select--focused .select__combobox {\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));\n }\n\n .select--warning .select__combobox {\n border-color: var(--nile-colors-yellow-500, var(--ng-colors-border-warning));\n }\n\n .select--error .select__combobox {\n border-color: var(--nile-colors-red-500, var(--ng-colors-border-error));\n outline: var(--nile-outline-none, var(--ng-private-outline-transparent));\n }\n\n .select--success {\n border-color: var(--nile-colors-green-500, var(--ng-componentcolors-utility-success-500));\n }\n\n /* Filled selects */\n .select--filled .select__combobox {\n border: none;\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n }\n\n .select--filled:hover:not(.select--disabled) .select__combobox {\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));\n }\n\n .select--filled.select--disabled .select__combobox {\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-disabled-subtle));\n opacity: var(--nile-opacity-50, var(--ng-opacity-100));\n cursor: not-allowed;\n }\n\n .select--filled:not(.select--disabled).select--open .select__combobox,\n .select--filled:not(.select--disabled).select--focused .select__combobox {\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));\n outline: 3px solid rgba(0, 89, 255, 0.4);\n }\n\n .select--medium .select__combobox {\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n padding: var(--nile-spacing-lg, var(--ng-spacing-md)) var(--nile-spacing-lg, var(--ng-spacing-lg));\n height: var(--nile-height-40px, var(--ng-height-40px));\n box-sizing: border-box;\n }\n\n .select--medium .select__clear {\n margin-inline-start: var(--nile-spacing-lg, var(--ng-spacing-lg));\n }\n\n .select--medium .select__prefix::slotted(*) {\n margin-inline-end: var(--nile-spacing-md, var(--ng-spacing-md));\n }\n\n .select--medium .select__prefix.multiple::slotted(*) {\n margin-inline-start: var(--nile-spacing-lg, var(--ng-spacing-md));\n }\n\n .select--medium.select--multiple:not(.select--placeholder-visible)\n .select__combobox {\n padding-inline-start: var(--nile-spacing-none, var(--ng-spacing-none));\n }\n\n .select--medium .select__tags {\n gap: var(--nile-spacing-3px, var(--ng-spacing-sm));\n }\n\n /* Pills */\n .select--pill.select--medium .select__combobox {\n border-radius: var(--nile-radius-3xl, var(--ng-radius-3xl));\n }\n\n /* Prefix */\n .select__prefix {\n flex: 0;\n display: inline-flex;\n align-items: center;\n color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n }\n\n .select__suffix {\n flex: 0;\n display: inline-flex;\n align-items: center;\n color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n }\n\n /* Clear button */\n .select__clear {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n color: var(--nile-colors-primary-600, var(--ng-colors-text-brand-secondary-700));\n border: none;\n background: none;\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n transition: 150ms color;\n cursor: pointer;\n }\n\n .select__clear:hover {\n color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n }\n\n .select__clear:focus {\n outline: none;\n }\n\n /* Expand icon */\n .select__expand-icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n transition: 250ms rotate ease;\n rotate: 0;\n margin-inline-start: var(--nile-spacing-md, var(--ng-spacing-md));\n }\n\n .select--open .select__expand-icon {\n rotate: -180deg;\n }\n\n /* Listbox */\n .select__listbox {\n display: block;\n position: relative;\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-md));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border: solid 1px var(--nile-colors-neutral-500, var(--ng-colors-border-secondary-alt));\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n padding-block: var(--nile-spacing-none, var(--ng-spacing-xs));\n padding-inline: var(--nile-spacing-none, var(--ng-spacing-xs));\n overscroll-behavior: none;\n /* Make sure it adheres to the popup's auto size */\n max-width: var(--auto-size-available-width);\n max-height: var(--auto-size-available-height);\n box-shadow: var(--nile-box-shadow-none, var(--ng-shadow-xs));\n }\n\n .select__options {\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n color: rgb(133, 129, 129);\n width: 100%;\n }\n\n .select__options__search-enabled {\n padding-top: var(--nile-spacing-10px, var(--ng-spacing-lg));\n width: 100%;\n }\n\n .select__listbox::slotted(nile-divider) {\n --spacing: var(--nile-spacing-xs, var(--ng-spacing-sm));\n }\n\n .select__listbox::slotted(small) {\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n font-weight: var(--nile-font-weight-semi-bold, var(--ng-font-weight-semibold));\n color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n padding-block: var(--nile-spacing-xs, var(--ng-spacing-sm));\n padding-inline: var(--nile-spacing-xl, var(--ng-spacing-xl));\n }\n\n .select__search {\n position: sticky;\n top: 0px;\n z-index: 1;\n width: calc(100% - 16px);\n padding: var(--nile-spacing-md, var(--ng-spacing-md));\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n margin-bottom: -8px;\n }\n\n .select__footer {\n position: sticky;\n bottom: 0px;\n background: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));\n border-top: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));\n display: flex;\n height: 15px;\n /* Auto layout */\n display: var(--nile-display-flex, var(--ng-display-flex));\n flex-direction: row;\n align-items: center;\n padding: var(--nile-spacing-md, var(--ng-spacing-md)) var(--nile-spacing-lg, var(--ng-spacing-lg));\n gap: var(--nile-spacing-none, var(--ng-spacing-none));\n justify-content: space-between;\n box-sizing: unset;\n }\n\n .select__footer--query {\n container-type: inline-size;\n container-name: nile-select-footer;\n }\n\n .select__footer-action,\n .select__footer .select__clear {\n display: inline-flex;\n align-items: center;\n gap: var(--nile-spacing-sm, var(--ng-spacing-sm));\n min-width: 0;\n }\n\n .select__footer-glyph {\n flex: 0 0 auto;\n display: inline-flex;\n vertical-align: middle;\n }\n\n .select__footer-label {\n white-space: nowrap;\n }\n\n @container nile-select-footer (max-width: 148px) {\n .select__clear .select__footer-label {\n display: none;\n }\n }\n\n @container nile-select-footer (max-width: 113px) {\n .select__footer-label {\n display: none;\n }\n }\n\n .tag__prefix[slot='prefix'] {\n height: 14px;\n display: inline-block;\n overflow: hidden;\n }\n\n .tag__prefix[slot='prefix'] img {\n max-height: 100%;\n }\n\n .select__loader {\n width: 100%;\n text-align: center;\n display: block;\n }\n\n .select__loader--icon {\n margin-top: var(--nile-spacing-xl, var(--ng-spacing-xl));\n animation: spin 0.6s linear infinite;\n }\n\n .select__no-results {\n padding: var(--nile-spacing-lg, var(--ng-spacing-lg));\n }\n\n @keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n .select__invisible {\n opacity: 0;\n }\n\n .select__prefix--from-options {\n margin-inline-end: var(--nile-spacing-lg, var(--ng-spacing-md));\n }\n \n .select__hide-default{\n display: none;\n }\n\n .virtualized nile-option[selected] {\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));\n }\n\n .virtualized nile-option[selected]::part(base) {\n color: var(--nile-colors-primary-600, var(--ng-colors-text-brand-secondary-700));\n }\n\n .virtualized.no-scroll {\n overflow: hidden !important;\n }\n\n .virtual-select-loader {\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 75%;\n }\n\n .select__footer.loading, .select__options.loading {\n opacity: 0.5;\n pointer-events: none;\n }\n\n .virtual-select-loader {\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 75%;\n }\n\n .select__footer.loading, .select__options.loading {\n opacity: 0.5;\n pointer-events: none;\n }\n .select.select--open .select__combobox {\n border-color: var(--ng-colors-border-brand);\n box-shadow: 0 0 0 1px var(--ng-colors-border-brand) inset ;\n }\n\n :host([enableDescription]) .option::part(base) {\n height: 41px;\n }\n"]))));}};});
|
|
2
2
|
//# sourceMappingURL=nile-virtual-select.css.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-virtual-select.css.cjs.js","sources":["../../../src/nile-virtual-select/nile-virtual-select.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {css} from 'lit';\n\n/**\n * Select_2 CSS\n */\nexport const styles = css`\n :host {\n box-sizing: border-box;\n --ng-nxt-gen-outline: var(--ng-border-width-1) solid var(--ng-colors-border-brand);\n --ng-nxt-gen-outline-error: var(--ng-border-width-1) solid var(--ng-colors-border-error);\n --ng-private-outline-transparent: var(--ng-border-width-1) solid transparent;\n --ng-box-shadow: 0px 12px 16px -4px var(--ng-colors-effects-shadow-lg-01, rgba(10, 13, 18, 0.08)), 0px 4px 6px -2px var(--ng-colors-effects-shadow-lg-02, rgba(10, 13, 18, 0.03)), 0px 2px 2px -1px var(--ng-colors-effects-shadow-lg-03, rgba(10, 13, 18, 0.04));\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n .virtualized{\n min-width: 110px;\n width: 100%;\n }\n\n .virtualized ::slotted(nile-option),\n .virtualized nile-option {\n width: 100%;\n display: block;\n }\n\n /* Ensure proper sizing for non-virtualized options (small datasets) */\n .virtualized:not(:has(lit-virtualizer)) {\n display: flex;\n flex-direction: column;\n }\n\n .virtualized:not(:has(lit-virtualizer)) nile-option {\n flex-shrink: 0;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n :host([disabled]) .form-control--has-label .form-control__label {\n user-select: none;\n -webkit-user-select: none;\n }\n\n [hidden] {\n display: none !important;\n }\n\n .form-control .form-control__label {\n display: none;\n }\n\n .form-control .form-control__help-text {\n display: none;\n }\n\n /* Label */\n .form-control--has-label .form-control__label {\n display: block;\n margin-bottom: var(--nile-spacing-sm, var(--ng-spacing-sm));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-secondary-700));\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-md));\n font-style: normal;\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-medium));\n line-height: var(--nile-spacing-2xl, var(--ng-line-height-text-sm));\n letter-spacing: 0.2px;\n }\n\n .form-control--has-label.form-control--medium .form-control__label {\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n }\n\n :host([required]) .form-control--has-label .form-control__label::after {\n content: '*';\n margin-inline-start: -2px;\n color: var(--nile-colors-red-700, var(--ng-colors-text-error-primary-600));\n }\n\n /* Help text */\n .form-control--has-help-text .form-control__help-text {\n display: block;\n color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n margin-top: var(--nile-spacing-lg, var(--ng-spacing-lg));\n }\n\n .form-control--has-help-text.form-control--medium .form-control__help-text {\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n }\n\n .form-control--has-help-text.form-control--radio-group\n .form-control__help-text {\n margin-top: var(--nile-spacing-xs, var(--ng-spacing-sm));\n }\n\n :host {\n display: block;\n }\n\n /** The popup */\n .select {\n flex: 1 1 auto;\n display: inline-flex;\n width: 100%;\n position: relative;\n vertical-align: middle;\n }\n\n .select::part(popup) {\n z-index: 9999;\n }\n\n .select[data-current-placement^='top']::part(popup) {\n transform-origin: bottom;\n }\n\n .select[data-current-placement^='bottom']::part(popup) {\n transform-origin: top;\n }\n\n /* Combobox */\n .select__combobox {\n flex: 1;\n display: flex;\n width: 100%;\n min-width: 0;\n position: relative;\n align-items: center;\n justify-content: start;\n font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-medium));\n letter-spacing: normal;\n vertical-align: middle;\n overflow: hidden;\n cursor: pointer;\n transition: 150ms color, 150ms border, 150ms box-shadow,\n 150ms background-color;\n }\n\n .select__display-input {\n position: relative;\n width: 100%;\n font: inherit;\n border: none;\n background: none;\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n cursor: inherit;\n overflow: hidden;\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n margin: var(--nile-spacing-none, var(--ng-spacing-none));\n -webkit-appearance: none;\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3,var(--ng-font-size-text-md));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n }\n\n .select__display-input::placeholder {\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n color: var(--nile-colors-text-placeholder, var(--ng-colors-text-placeholder));\n }\n\n .select:not(.select--disabled):hover .select__display-input {\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n }\n\n .select__display-input:focus {\n outline: none;\n }\n\n /* Visually hide the display input when multiple is enabled */\n .select--multiple:not(.select--placeholder-visible) .select__display-input {\n position: absolute;\n z-index: -1;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n }\n\n .select__value-input {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n margin: var(--nile-spacing-none, var(--ng-spacing-none));\n opacity: 0;\n z-index: -1;\n }\n\n .select__tags {\n display: flex;\n flex: 1;\n align-items: center;\n flex-wrap: nowrap;\n margin-inline-start: var(--nile-spacing-7px, var(--ng-spacing-md));\n width: 100%;\n overflow: hidden;\n }\n\n .select__tags-count {\n color: var(--nile-colors-primary-600, var(--ng-colors-text-brand-secondary-700));\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n font-style: normal;\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-medium));\n line-height: var(--nile-line-height-xsmall, var(--ng-line-height-text-sm));\n letter-spacing: 0.2px;\n margin: var(--nile-spacing-sm, var(--ng-spacing-sm));\n }\n\n .select__tags-count-clearable {\n margin-right: var(--nile-spacing-5xl, var(--ng-spacing-5xl));\n }\n\n button.select__tags-count {\n appearance: none;\n -webkit-appearance: none;\n background: none;\n text-align: inherit;\n }\n\n button.select__tags-count:disabled {\n cursor: not-allowed;\n }\n\n .select__tags--fitted {\n min-width: 0;\n }\n\n .select__tags nile-lite-tooltip.select__tag-tip {\n display: contents;\n }\n\n .select__tags nile-tag {\n flex: 0 1 auto;\n cursor: pointer;\n min-width: 0;\n }\n\n /* A chip is capped - and so truncated - only when a tooltip can reveal the\n full value. Without one it keeps its natural width and the fit pass moves\n the surplus into the +N button instead. */\n :host([showtooltip]) .select__tags nile-tag {\n max-width: var(--nile-width-180px, var(--ng-height-180px));\n }\n\n /* Only the fitted layout can move a chip into the +N button, so only there\n can a chip refuse to shrink. */\n :host(:not([showtooltip])) .select__tags--fitted nile-tag {\n flex-shrink: 0;\n }\n\n .select__tags nile-tag::part(base) {\n max-width: 100%;\n }\n\n .select__tags nile-tag::part(prefix_content_wrapper) {\n flex: 1 1 auto;\n min-width: 0;\n }\n\n .select__tags nile-tag::part(content) {\n display: block;\n flex: 1 1 auto;\n min-width: 0;\n /* The tag's line-height of 1 leaves the clip box shorter than the glyph\n box, so descenders are cut. Pad the clip box, negate it in layout. */\n padding-block: 3px;\n margin-block: -3px;\n overflow: hidden;\n white-space: nowrap;\n }\n\n :host([showtooltip]) .select__tags nile-tag::part(content) {\n text-overflow: ellipsis;\n }\n\n .select__tags nile-tag::part(remove-button) {\n flex: 0 0 auto;\n }\n\n .select__tags--fitted nile-tag:focus-visible {\n outline: 2px solid var(--nile-colors-primary-600, var(--ng-colors-border-brand));\n outline-offset: 1px;\n border-radius: var(--nile-radius-sm, var(--ng-radius-sm));\n }\n\n .select__tags--fitted .select__tags-count {\n flex: 0 0 auto;\n margin: 0;\n padding: 0 var(--nile-spacing-xsmall, var(--ng-spacing-md));\n height: var(--nile-height-26px, var(--ng-height-26px));\n display: inline-flex;\n align-items: center;\n white-space: nowrap;\n cursor: pointer;\n border: 1px dashed\n var(--nile-colors-neutral-500, var(--ng-colors-border-secondary));\n border-radius: var(--nile-radius-sm, var(--ng-radius-sm));\n }\n\n .select__tags--fitted .select__tags-count:focus-visible {\n outline: 2px solid var(--nile-colors-primary-600, var(--ng-colors-border-brand));\n outline-offset: 1px;\n }\n\n .select__tags::slotted(nile-tag) {\n cursor: pointer !important;\n }\n\n .select--disabled .select__tags,\n .select--disabled .select__tags::slotted(nile-tag) {\n cursor: not-allowed !important;\n }\n\n .select--disabled .select__display-input{\n color:var(--nile-colors-dark-500, var(--ng-colors-text-disabled));\n pointer-events:none;\n }\n\n /* Standard selects */\n .select--standard .select__combobox {\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border: solid 1px var(--nile-colors-neutral-500, var(--ng-colors-border-primary));\n outline: var(--nile-outline-none, var(--ng-private-outline-transparent));\n }\n\n .select--standard .select__combobox:hover {\n border: 1px solid var(--nile-colors-dark-900, var(--ng-colors-border-neutral));\n background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n }\n\n .select--error:hover:not(.select--disabled) .select__combobox {\n border-color: var(--nile-colors-red-500, var(--ng-colors-border-error));\n outline: var(--nile-outline-none, var(--ng-colors-border-error));\n }\n\n .select--standard.select--disabled .select__combobox {\n background-color: var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle));\n border-color: var(--nile-colors-neutral-500, var(--ng-colors-border-primary));\n color: var(--nile-colors-dark-500, var(--ng-colors-text-disabled));\n user-select:none;\n cursor: not-allowed;\n outline: none;\n }\n\n .select--standard:not(.select--disabled).select--open .select__combobox,\n .select--standard:not(.select--disabled).select--focused .select__combobox {\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));\n }\n\n .select--warning .select__combobox {\n border-color: var(--nile-colors-yellow-500, var(--ng-colors-border-warning));\n }\n\n .select--error .select__combobox {\n border-color: var(--nile-colors-red-500, var(--ng-colors-border-error));\n outline: var(--nile-outline-none, var(--ng-private-outline-transparent));\n }\n\n .select--success {\n border-color: var(--nile-colors-green-500, var(--ng-componentcolors-utility-success-500));\n }\n\n /* Filled selects */\n .select--filled .select__combobox {\n border: none;\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n }\n\n .select--filled:hover:not(.select--disabled) .select__combobox {\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));\n }\n\n .select--filled.select--disabled .select__combobox {\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-disabled-subtle));\n opacity: var(--nile-opacity-50, var(--ng-opacity-100));\n cursor: not-allowed;\n }\n\n .select--filled:not(.select--disabled).select--open .select__combobox,\n .select--filled:not(.select--disabled).select--focused .select__combobox {\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));\n outline: 3px solid rgba(0, 89, 255, 0.4);\n }\n\n .select--medium .select__combobox {\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n padding: var(--nile-spacing-lg, var(--ng-spacing-md)) var(--nile-spacing-lg, var(--ng-spacing-lg));\n height: var(--nile-height-40px, var(--ng-height-40px));\n box-sizing: border-box;\n }\n\n .select--medium .select__clear {\n margin-inline-start: var(--nile-spacing-lg, var(--ng-spacing-lg));\n }\n\n .select--medium .select__prefix::slotted(*) {\n margin-inline-end: var(--nile-spacing-md, var(--ng-spacing-md));\n }\n\n .select--medium .select__prefix.multiple::slotted(*) {\n margin-inline-start: var(--nile-spacing-lg, var(--ng-spacing-md));\n }\n\n .select--medium.select--multiple:not(.select--placeholder-visible)\n .select__combobox {\n padding-inline-start: var(--nile-spacing-none, var(--ng-spacing-none));\n }\n\n .select--medium .select__tags {\n gap: var(--nile-spacing-3px, var(--ng-spacing-sm));\n }\n\n /* Pills */\n .select--pill.select--medium .select__combobox {\n border-radius: var(--nile-radius-3xl, var(--ng-radius-3xl));\n }\n\n /* Prefix */\n .select__prefix {\n flex: 0;\n display: inline-flex;\n align-items: center;\n color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n }\n\n .select__suffix {\n flex: 0;\n display: inline-flex;\n align-items: center;\n color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n }\n\n /* Clear button */\n .select__clear {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n color: var(--nile-colors-primary-600, var(--ng-colors-text-brand-secondary-700));\n border: none;\n background: none;\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n transition: 150ms color;\n cursor: pointer;\n }\n\n .select__clear:hover {\n color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n }\n\n .select__clear:focus {\n outline: none;\n }\n\n /* Expand icon */\n .select__expand-icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n transition: 250ms rotate ease;\n rotate: 0;\n margin-inline-start: var(--nile-spacing-md, var(--ng-spacing-md));\n }\n\n .select--open .select__expand-icon {\n rotate: -180deg;\n }\n\n /* Listbox */\n .select__listbox {\n display: block;\n position: relative;\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-md));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border: solid 1px var(--nile-colors-neutral-500, var(--ng-colors-border-secondary-alt));\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n padding-block: var(--nile-spacing-none, var(--ng-spacing-xs));\n padding-inline: var(--nile-spacing-none, var(--ng-spacing-xs));\n overscroll-behavior: none;\n /* Make sure it adheres to the popup's auto size */\n max-width: var(--auto-size-available-width);\n max-height: var(--auto-size-available-height);\n box-shadow: var(--nile-box-shadow-none, var(--ng-shadow-xs));\n }\n\n .select__options {\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n color: rgb(133, 129, 129);\n width: 100%;\n }\n\n .select__options__search-enabled {\n padding-top: var(--nile-spacing-10px, var(--ng-spacing-lg));\n width: 100%;\n }\n\n .select__listbox::slotted(nile-divider) {\n --spacing: var(--nile-spacing-xs, var(--ng-spacing-sm));\n }\n\n .select__listbox::slotted(small) {\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n font-weight: var(--nile-font-weight-semi-bold, var(--ng-font-weight-semibold));\n color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n padding-block: var(--nile-spacing-xs, var(--ng-spacing-sm));\n padding-inline: var(--nile-spacing-xl, var(--ng-spacing-xl));\n }\n\n .select__search {\n position: sticky;\n top: 0px;\n z-index: 1;\n width: calc(100% - 16px);\n padding: var(--nile-spacing-md, var(--ng-spacing-md));\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n margin-bottom: -8px;\n }\n\n .select__footer {\n position: sticky;\n bottom: 0px;\n background: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));\n border-top: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));\n display: flex;\n height: 15px;\n /* Auto layout */\n display: var(--nile-display-flex, var(--ng-display-flex));\n flex-direction: row;\n align-items: center;\n padding: var(--nile-spacing-md, var(--ng-spacing-md)) var(--nile-spacing-lg, var(--ng-spacing-lg));\n gap: var(--nile-spacing-none, var(--ng-spacing-none));\n justify-content: space-between;\n box-sizing: unset;\n container-type: inline-size;\n container-name: nile-select-footer;\n }\n\n .select__footer-action,\n .select__footer .select__clear {\n display: inline-flex;\n align-items: center;\n gap: var(--nile-spacing-sm, var(--ng-spacing-sm));\n min-width: 0;\n }\n\n .select__footer-glyph {\n flex: 0 0 auto;\n display: inline-flex;\n vertical-align: middle;\n }\n\n .select__footer-label {\n white-space: nowrap;\n }\n\n @container nile-select-footer (max-width: 148px) {\n .select__clear .select__footer-label {\n display: none;\n }\n }\n\n @container nile-select-footer (max-width: 113px) {\n .select__footer-label {\n display: none;\n }\n }\n\n .tag__prefix[slot='prefix'] {\n height: 14px;\n display: inline-block;\n overflow: hidden;\n }\n\n .tag__prefix[slot='prefix'] img {\n max-height: 100%;\n }\n\n .select__loader {\n width: 100%;\n text-align: center;\n display: block;\n }\n\n .select__loader--icon {\n margin-top: var(--nile-spacing-xl, var(--ng-spacing-xl));\n animation: spin 0.6s linear infinite;\n }\n\n .select__no-results {\n padding: var(--nile-spacing-lg, var(--ng-spacing-lg));\n }\n\n @keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n .select__prefix--from-options {\n margin-inline-end: var(--nile-spacing-lg, var(--ng-spacing-md));\n }\n \n .select__hide-default{\n display: none;\n }\n\n .virtualized nile-option[selected] {\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));\n }\n\n .virtualized nile-option[selected]::part(base) {\n color: var(--nile-colors-primary-600, var(--ng-colors-text-brand-secondary-700));\n }\n\n .virtualized.no-scroll {\n overflow: hidden !important;\n }\n\n .virtual-select-loader {\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 75%;\n }\n\n .select__footer.loading, .select__options.loading {\n opacity: 0.5;\n pointer-events: none;\n }\n\n .virtual-select-loader {\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 75%;\n }\n\n .select__footer.loading, .select__options.loading {\n opacity: 0.5;\n pointer-events: none;\n }\n .select.select--open .select__combobox {\n border-color: var(--ng-colors-border-brand);\n box-shadow: 0 0 0 1px var(--ng-colors-border-brand) inset ;\n }\n\n :host([enableDescription]) .option::part(base) {\n height: 41px;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|
|
1
|
+
{"version":3,"file":"nile-virtual-select.css.cjs.js","sources":["../../../src/nile-virtual-select/nile-virtual-select.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {css} from 'lit';\n\n/**\n * Select_2 CSS\n */\nexport const styles = css`\n :host {\n box-sizing: border-box;\n --ng-nxt-gen-outline: var(--ng-border-width-1) solid var(--ng-colors-border-brand);\n --ng-nxt-gen-outline-error: var(--ng-border-width-1) solid var(--ng-colors-border-error);\n --ng-private-outline-transparent: var(--ng-border-width-1) solid transparent;\n --ng-box-shadow: 0px 12px 16px -4px var(--ng-colors-effects-shadow-lg-01, rgba(10, 13, 18, 0.08)), 0px 4px 6px -2px var(--ng-colors-effects-shadow-lg-02, rgba(10, 13, 18, 0.03)), 0px 2px 2px -1px var(--ng-colors-effects-shadow-lg-03, rgba(10, 13, 18, 0.04));\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n .virtualized{\n min-width: 110px;\n width: 100%;\n }\n\n .virtualized ::slotted(nile-option),\n .virtualized nile-option {\n width: 100%;\n display: block;\n }\n\n /* Ensure proper sizing for non-virtualized options (small datasets) */\n .virtualized:not(:has(lit-virtualizer)) {\n display: flex;\n flex-direction: column;\n }\n\n .virtualized:not(:has(lit-virtualizer)) nile-option {\n flex-shrink: 0;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n :host([disabled]) .form-control--has-label .form-control__label {\n user-select: none;\n -webkit-user-select: none;\n }\n\n [hidden] {\n display: none !important;\n }\n\n .form-control .form-control__label {\n display: none;\n }\n\n .form-control .form-control__help-text {\n display: none;\n }\n\n /* Label */\n .form-control--has-label .form-control__label {\n display: block;\n margin-bottom: var(--nile-spacing-sm, var(--ng-spacing-sm));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-secondary-700));\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-md));\n font-style: normal;\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-medium));\n line-height: var(--nile-spacing-2xl, var(--ng-line-height-text-sm));\n letter-spacing: 0.2px;\n }\n\n .form-control--has-label.form-control--medium .form-control__label {\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n }\n\n :host([required]) .form-control--has-label .form-control__label::after {\n content: '*';\n margin-inline-start: -2px;\n color: var(--nile-colors-red-700, var(--ng-colors-text-error-primary-600));\n }\n\n /* Help text */\n .form-control--has-help-text .form-control__help-text {\n display: block;\n color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n margin-top: var(--nile-spacing-lg, var(--ng-spacing-lg));\n }\n\n .form-control--has-help-text.form-control--medium .form-control__help-text {\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n }\n\n .form-control--has-help-text.form-control--radio-group\n .form-control__help-text {\n margin-top: var(--nile-spacing-xs, var(--ng-spacing-sm));\n }\n\n :host {\n display: block;\n }\n\n /** The popup */\n .select {\n flex: 1 1 auto;\n display: inline-flex;\n width: 100%;\n position: relative;\n vertical-align: middle;\n }\n\n .select::part(popup) {\n z-index: 9999;\n }\n\n .select[data-current-placement^='top']::part(popup) {\n transform-origin: bottom;\n }\n\n .select[data-current-placement^='bottom']::part(popup) {\n transform-origin: top;\n }\n\n /* Combobox */\n .select__combobox {\n flex: 1;\n display: flex;\n width: 100%;\n min-width: 0;\n position: relative;\n align-items: center;\n justify-content: start;\n font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-medium));\n letter-spacing: normal;\n vertical-align: middle;\n overflow: hidden;\n cursor: pointer;\n transition: 150ms color, 150ms border, 150ms box-shadow,\n 150ms background-color;\n }\n\n .select__display-input {\n position: relative;\n width: 100%;\n font: inherit;\n border: none;\n background: none;\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n cursor: inherit;\n overflow: hidden;\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n margin: var(--nile-spacing-none, var(--ng-spacing-none));\n -webkit-appearance: none;\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3,var(--ng-font-size-text-md));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n }\n\n .select__display-input::placeholder {\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n color: var(--nile-colors-text-placeholder, var(--ng-colors-text-placeholder));\n }\n\n .select:not(.select--disabled):hover .select__display-input {\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n }\n\n .select__display-input:focus {\n outline: none;\n }\n\n /* Visually hide the display input when multiple is enabled */\n .select--multiple:not(.select--placeholder-visible) .select__display-input {\n position: absolute;\n z-index: -1;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n }\n\n .select__value-input {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n margin: var(--nile-spacing-none, var(--ng-spacing-none));\n opacity: 0;\n z-index: -1;\n }\n\n .select__tags {\n display: flex;\n flex: 1;\n align-items: center;\n flex-wrap: nowrap;\n margin-inline-start: var(--nile-spacing-7px, var(--ng-spacing-md));\n width: 100%;\n overflow: hidden;\n }\n\n .select__tags-count {\n color: var(--nile-colors-primary-600, var(--ng-colors-text-brand-secondary-700));\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n font-style: normal;\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-medium));\n line-height: var(--nile-line-height-xsmall, var(--ng-line-height-text-sm));\n letter-spacing: 0.2px;\n margin: var(--nile-spacing-sm, var(--ng-spacing-sm));\n }\n\n .select__tags-count-clearable {\n margin-right: var(--nile-spacing-5xl, var(--ng-spacing-5xl));\n }\n\n button.select__tags-count {\n appearance: none;\n -webkit-appearance: none;\n background: none;\n text-align: inherit;\n }\n\n button.select__tags-count:disabled {\n cursor: not-allowed;\n }\n\n .select__tags--fitted {\n min-width: 0;\n }\n\n .select__tags nile-lite-tooltip.select__tag-tip {\n display: contents;\n }\n\n :host([showtooltip]) .select__tags nile-tag {\n flex: 0 1 auto;\n cursor: pointer;\n min-width: 0;\n max-width: var(--nile-width-180px, var(--ng-height-180px));\n }\n\n :host([showtooltip]) .select__tags nile-tag::part(base) {\n max-width: 100%;\n }\n\n :host([showtooltip]) .select__tags nile-tag::part(prefix_content_wrapper) {\n flex: 1 1 auto;\n min-width: 0;\n }\n\n :host([showtooltip]) .select__tags nile-tag::part(content) {\n display: block;\n flex: 1 1 auto;\n min-width: 0;\n /* The tag's line-height of 1 leaves the clip box shorter than the glyph\n box, so descenders are cut. Pad the clip box, negate it in layout. */\n padding-block: 3px;\n margin-block: -3px;\n overflow: hidden;\n white-space: nowrap;\n }\n\n :host([showtooltip]) .select__tags nile-tag::part(content) {\n text-overflow: ellipsis;\n }\n\n :host([showtooltip]) .select__tags nile-tag::part(remove-button) {\n flex: 0 0 auto;\n }\n\n .select__tags--fitted nile-tag:focus-visible {\n outline: 2px solid var(--nile-colors-primary-600, var(--ng-colors-border-brand));\n outline-offset: 1px;\n border-radius: var(--nile-radius-sm, var(--ng-radius-sm));\n }\n\n .select__tags--fitted .select__tags-count {\n flex: 0 0 auto;\n margin: 0;\n padding: 0 var(--nile-spacing-xsmall, var(--ng-spacing-md));\n height: var(--nile-height-26px, var(--ng-height-26px));\n display: inline-flex;\n align-items: center;\n white-space: nowrap;\n cursor: pointer;\n border: 1px dashed\n var(--nile-colors-neutral-500, var(--ng-colors-border-secondary));\n border-radius: var(--nile-radius-sm, var(--ng-radius-sm));\n }\n\n .select__tags--fitted .select__tags-count:focus-visible {\n outline: 2px solid var(--nile-colors-primary-600, var(--ng-colors-border-brand));\n outline-offset: 1px;\n }\n\n .select__tags::slotted(nile-tag) {\n cursor: pointer !important;\n }\n\n .select--disabled .select__tags,\n .select--disabled .select__tags::slotted(nile-tag) {\n cursor: not-allowed !important;\n }\n\n .select--disabled .select__display-input{\n color:var(--nile-colors-dark-500, var(--ng-colors-text-disabled));\n pointer-events:none;\n }\n\n /* Standard selects */\n .select--standard .select__combobox {\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border: solid 1px var(--nile-colors-neutral-500, var(--ng-colors-border-primary));\n outline: var(--nile-outline-none, var(--ng-private-outline-transparent));\n }\n\n .select--standard .select__combobox:hover {\n border: 1px solid var(--nile-colors-dark-900, var(--ng-colors-border-neutral));\n background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n }\n\n .select--error:hover:not(.select--disabled) .select__combobox {\n border-color: var(--nile-colors-red-500, var(--ng-colors-border-error));\n outline: var(--nile-outline-none, var(--ng-colors-border-error));\n }\n\n .select--standard.select--disabled .select__combobox {\n background-color: var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle));\n border-color: var(--nile-colors-neutral-500, var(--ng-colors-border-primary));\n color: var(--nile-colors-dark-500, var(--ng-colors-text-disabled));\n user-select:none;\n cursor: not-allowed;\n outline: none;\n }\n\n .select--standard:not(.select--disabled).select--open .select__combobox,\n .select--standard:not(.select--disabled).select--focused .select__combobox {\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));\n }\n\n .select--warning .select__combobox {\n border-color: var(--nile-colors-yellow-500, var(--ng-colors-border-warning));\n }\n\n .select--error .select__combobox {\n border-color: var(--nile-colors-red-500, var(--ng-colors-border-error));\n outline: var(--nile-outline-none, var(--ng-private-outline-transparent));\n }\n\n .select--success {\n border-color: var(--nile-colors-green-500, var(--ng-componentcolors-utility-success-500));\n }\n\n /* Filled selects */\n .select--filled .select__combobox {\n border: none;\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n }\n\n .select--filled:hover:not(.select--disabled) .select__combobox {\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));\n }\n\n .select--filled.select--disabled .select__combobox {\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-disabled-subtle));\n opacity: var(--nile-opacity-50, var(--ng-opacity-100));\n cursor: not-allowed;\n }\n\n .select--filled:not(.select--disabled).select--open .select__combobox,\n .select--filled:not(.select--disabled).select--focused .select__combobox {\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));\n outline: 3px solid rgba(0, 89, 255, 0.4);\n }\n\n .select--medium .select__combobox {\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n padding: var(--nile-spacing-lg, var(--ng-spacing-md)) var(--nile-spacing-lg, var(--ng-spacing-lg));\n height: var(--nile-height-40px, var(--ng-height-40px));\n box-sizing: border-box;\n }\n\n .select--medium .select__clear {\n margin-inline-start: var(--nile-spacing-lg, var(--ng-spacing-lg));\n }\n\n .select--medium .select__prefix::slotted(*) {\n margin-inline-end: var(--nile-spacing-md, var(--ng-spacing-md));\n }\n\n .select--medium .select__prefix.multiple::slotted(*) {\n margin-inline-start: var(--nile-spacing-lg, var(--ng-spacing-md));\n }\n\n .select--medium.select--multiple:not(.select--placeholder-visible)\n .select__combobox {\n padding-inline-start: var(--nile-spacing-none, var(--ng-spacing-none));\n }\n\n .select--medium .select__tags {\n gap: var(--nile-spacing-3px, var(--ng-spacing-sm));\n }\n\n /* Pills */\n .select--pill.select--medium .select__combobox {\n border-radius: var(--nile-radius-3xl, var(--ng-radius-3xl));\n }\n\n /* Prefix */\n .select__prefix {\n flex: 0;\n display: inline-flex;\n align-items: center;\n color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n }\n\n .select__suffix {\n flex: 0;\n display: inline-flex;\n align-items: center;\n color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n }\n\n /* Clear button */\n .select__clear {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n color: var(--nile-colors-primary-600, var(--ng-colors-text-brand-secondary-700));\n border: none;\n background: none;\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n transition: 150ms color;\n cursor: pointer;\n }\n\n .select__clear:hover {\n color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n }\n\n .select__clear:focus {\n outline: none;\n }\n\n /* Expand icon */\n .select__expand-icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n transition: 250ms rotate ease;\n rotate: 0;\n margin-inline-start: var(--nile-spacing-md, var(--ng-spacing-md));\n }\n\n .select--open .select__expand-icon {\n rotate: -180deg;\n }\n\n /* Listbox */\n .select__listbox {\n display: block;\n position: relative;\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-md));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border: solid 1px var(--nile-colors-neutral-500, var(--ng-colors-border-secondary-alt));\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n padding-block: var(--nile-spacing-none, var(--ng-spacing-xs));\n padding-inline: var(--nile-spacing-none, var(--ng-spacing-xs));\n overscroll-behavior: none;\n /* Make sure it adheres to the popup's auto size */\n max-width: var(--auto-size-available-width);\n max-height: var(--auto-size-available-height);\n box-shadow: var(--nile-box-shadow-none, var(--ng-shadow-xs));\n }\n\n .select__options {\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n color: rgb(133, 129, 129);\n width: 100%;\n }\n\n .select__options__search-enabled {\n padding-top: var(--nile-spacing-10px, var(--ng-spacing-lg));\n width: 100%;\n }\n\n .select__listbox::slotted(nile-divider) {\n --spacing: var(--nile-spacing-xs, var(--ng-spacing-sm));\n }\n\n .select__listbox::slotted(small) {\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n font-weight: var(--nile-font-weight-semi-bold, var(--ng-font-weight-semibold));\n color: var(--nile-colors-dark-500, var(--ng-colors-text-tertiary-600));\n padding-block: var(--nile-spacing-xs, var(--ng-spacing-sm));\n padding-inline: var(--nile-spacing-xl, var(--ng-spacing-xl));\n }\n\n .select__search {\n position: sticky;\n top: 0px;\n z-index: 1;\n width: calc(100% - 16px);\n padding: var(--nile-spacing-md, var(--ng-spacing-md));\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n margin-bottom: -8px;\n }\n\n .select__footer {\n position: sticky;\n bottom: 0px;\n background: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));\n border-top: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));\n display: flex;\n height: 15px;\n /* Auto layout */\n display: var(--nile-display-flex, var(--ng-display-flex));\n flex-direction: row;\n align-items: center;\n padding: var(--nile-spacing-md, var(--ng-spacing-md)) var(--nile-spacing-lg, var(--ng-spacing-lg));\n gap: var(--nile-spacing-none, var(--ng-spacing-none));\n justify-content: space-between;\n box-sizing: unset;\n }\n\n .select__footer--query {\n container-type: inline-size;\n container-name: nile-select-footer;\n }\n\n .select__footer-action,\n .select__footer .select__clear {\n display: inline-flex;\n align-items: center;\n gap: var(--nile-spacing-sm, var(--ng-spacing-sm));\n min-width: 0;\n }\n\n .select__footer-glyph {\n flex: 0 0 auto;\n display: inline-flex;\n vertical-align: middle;\n }\n\n .select__footer-label {\n white-space: nowrap;\n }\n\n @container nile-select-footer (max-width: 148px) {\n .select__clear .select__footer-label {\n display: none;\n }\n }\n\n @container nile-select-footer (max-width: 113px) {\n .select__footer-label {\n display: none;\n }\n }\n\n .tag__prefix[slot='prefix'] {\n height: 14px;\n display: inline-block;\n overflow: hidden;\n }\n\n .tag__prefix[slot='prefix'] img {\n max-height: 100%;\n }\n\n .select__loader {\n width: 100%;\n text-align: center;\n display: block;\n }\n\n .select__loader--icon {\n margin-top: var(--nile-spacing-xl, var(--ng-spacing-xl));\n animation: spin 0.6s linear infinite;\n }\n\n .select__no-results {\n padding: var(--nile-spacing-lg, var(--ng-spacing-lg));\n }\n\n @keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n .select__invisible {\n opacity: 0;\n }\n\n .select__prefix--from-options {\n margin-inline-end: var(--nile-spacing-lg, var(--ng-spacing-md));\n }\n \n .select__hide-default{\n display: none;\n }\n\n .virtualized nile-option[selected] {\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-secondary));\n }\n\n .virtualized nile-option[selected]::part(base) {\n color: var(--nile-colors-primary-600, var(--ng-colors-text-brand-secondary-700));\n }\n\n .virtualized.no-scroll {\n overflow: hidden !important;\n }\n\n .virtual-select-loader {\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 75%;\n }\n\n .select__footer.loading, .select__options.loading {\n opacity: 0.5;\n pointer-events: none;\n }\n\n .virtual-select-loader {\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 75%;\n }\n\n .select__footer.loading, .select__options.loading {\n opacity: 0.5;\n pointer-events: none;\n }\n .select.select--open .select__combobox {\n border-color: var(--ng-colors-border-brand);\n box-shadow: 0 0 0 1px var(--ng-colors-border-brand) inset ;\n }\n\n :host([enableDescription]) .option::part(base) {\n height: 41px;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|
|
@@ -234,35 +234,23 @@ import{css as e}from"lit";const o=e`
|
|
|
234
234
|
display: contents;
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
.select__tags nile-tag {
|
|
237
|
+
:host([showtooltip]) .select__tags nile-tag {
|
|
238
238
|
flex: 0 1 auto;
|
|
239
239
|
cursor: pointer;
|
|
240
240
|
min-width: 0;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
/* A chip is capped - and so truncated - only when a tooltip can reveal the
|
|
244
|
-
full value. Without one it keeps its natural width and the fit pass moves
|
|
245
|
-
the surplus into the +N button instead. */
|
|
246
|
-
:host([showtooltip]) .select__tags nile-tag {
|
|
247
241
|
max-width: var(--nile-width-180px, var(--ng-height-180px));
|
|
248
242
|
}
|
|
249
243
|
|
|
250
|
-
|
|
251
|
-
can a chip refuse to shrink. */
|
|
252
|
-
:host(:not([showtooltip])) .select__tags--fitted nile-tag {
|
|
253
|
-
flex-shrink: 0;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.select__tags nile-tag::part(base) {
|
|
244
|
+
:host([showtooltip]) .select__tags nile-tag::part(base) {
|
|
257
245
|
max-width: 100%;
|
|
258
246
|
}
|
|
259
247
|
|
|
260
|
-
.select__tags nile-tag::part(prefix_content_wrapper) {
|
|
248
|
+
:host([showtooltip]) .select__tags nile-tag::part(prefix_content_wrapper) {
|
|
261
249
|
flex: 1 1 auto;
|
|
262
250
|
min-width: 0;
|
|
263
251
|
}
|
|
264
252
|
|
|
265
|
-
.select__tags nile-tag::part(content) {
|
|
253
|
+
:host([showtooltip]) .select__tags nile-tag::part(content) {
|
|
266
254
|
display: block;
|
|
267
255
|
flex: 1 1 auto;
|
|
268
256
|
min-width: 0;
|
|
@@ -278,7 +266,7 @@ import{css as e}from"lit";const o=e`
|
|
|
278
266
|
text-overflow: ellipsis;
|
|
279
267
|
}
|
|
280
268
|
|
|
281
|
-
.select__tags nile-tag::part(remove-button) {
|
|
269
|
+
:host([showtooltip]) .select__tags nile-tag::part(remove-button) {
|
|
282
270
|
flex: 0 0 auto;
|
|
283
271
|
}
|
|
284
272
|
|
|
@@ -540,6 +528,9 @@ import{css as e}from"lit";const o=e`
|
|
|
540
528
|
gap: var(--nile-spacing-none, var(--ng-spacing-none));
|
|
541
529
|
justify-content: space-between;
|
|
542
530
|
box-sizing: unset;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
.select__footer--query {
|
|
543
534
|
container-type: inline-size;
|
|
544
535
|
container-name: nile-select-footer;
|
|
545
536
|
}
|
|
@@ -608,6 +599,10 @@ import{css as e}from"lit";const o=e`
|
|
|
608
599
|
}
|
|
609
600
|
}
|
|
610
601
|
|
|
602
|
+
.select__invisible {
|
|
603
|
+
opacity: 0;
|
|
604
|
+
}
|
|
605
|
+
|
|
611
606
|
.select__prefix--from-options {
|
|
612
607
|
margin-inline-end: var(--nile-spacing-lg, var(--ng-spacing-md));
|
|
613
608
|
}
|
|
@@ -3,12 +3,12 @@ import{__decorate as i}from"tslib";import{html as s}from"lit";import{query as e,
|
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2020 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
-
*/const
|
|
6
|
+
*/const O=(i,s)=>{const e=i._$AN;if(void 0===e)return!1;for(const i of e)i._$AO?.(s,!1),O(i,s);return!0},F=i=>{let s,e;do{if(void 0===(s=i._$AM))break;e=s._$AN,e.delete(i),i=s}while(0===e?.size)},B=i=>{for(let s;s=i._$AM;i=s){let e=s._$AN;if(void 0===e)s._$AN=e=new Set;else if(e.has(i))break;e.add(i),T(s)}};
|
|
7
7
|
/**
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2017 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/function F(i){void 0!==this._$AN?(O(this),this._$AM=i,A(this)):this._$AM=i}function z(i,s=!1,e=0){const n=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(s)if(Array.isArray(n))for(let i=e;i<n.length;i++)B(n[i],!1),O(n[i]);else null!=n&&(B(n,!1),O(n));else B(this,i)}const V=i=>{i.type==$.CHILD&&(i._$AP??=z,i._$AQ??=F)};class q extends k{constructor(){super(...arguments),this._$AN=void 0}_$AT(i,s,e){super._$AT(i,s,e),A(this),this.isConnected=i._$AU}_$AO(i,s=!0){i!==this.isConnected&&(this.isConnected=i,i?this.reconnected?.():this.disconnected?.()),s&&(B(this,i),O(this))}setValue(i){if((i=>void 0===i.strings)(this._$Ct))this._$Ct._$AI(i,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=i,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}class I{constructor(i,{target:s,config:e,callback:n,skipInitial:o}){this.t=new Set,this.o=!1,this.i=!1,this.h=i,null!==s&&this.t.add(s??i),this.l=e,this.o=o??this.o,this.callback=n,window.ResizeObserver?(this.u=new ResizeObserver((i=>{this.handleChanges(i),this.h.requestUpdate()})),i.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(i){this.value=this.callback?.(i,this.u)}hostConnected(){for(const i of this.t)this.observe(i)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(i){this.t.add(i),this.u.observe(i,this.l),this.i=!0,this.h.requestUpdate()}unobserve(i){this.t.delete(i),this.u.unobserve(i)}disconnect(){this.u.disconnect()}target(i){return M(this,i)}}const M=C(class extends q{constructor(){super(...arguments),this.observing=!1}render(i,s){}update(i,[s,e]){this.controller=s,this.part=i,this.observe=e,!1===e?(s.unobserve(i.element),this.observing=!1):!1===this.observing&&(s.observe(i.element),this.observing=!0)}disconnected(){this.controller?.unobserve(this.part.element),this.observing=!1}reconnected(){!1!==this.observe&&!1===this.observing&&(this.controller?.observe(this.part.element),this.observing=!0)}});let T=class extends f{constructor(){super(...arguments),this.formControlController=new h(this,{assumeInteractionOn:["nile-blur","nile-input"]}),this.hasSlotController=new d(this,"help-text","label"),this.portalManager=new x(this),this.hasFocus=!1,this.displayLabel="",this.selectedOptions=[],this.oldValue="",this.scrolling=!1,this.name="",this.data=[],this.originalOptionItems=[],this.value="",this.defaultValue="",this.size="medium",this.placeholder="Select...",this.autoResize=!1,this.searchValue="",this.searchEnabled=!1,this.enableVisibilityEffect=!1,this.internalSearchPlaceHolder="Search...",this.disableLocalSearch=!1,this.optionsLoading=!1,this.loading=!1,this.multiple=!1,this.helpText="",this.errorMessage="",this.warning=!1,this.error=!1,this.success=!1,this.disabled=!1,this.clearable=!1,this.open=!1,this.hoist=!1,this.filled=!1,this.pill=!1,this.label="",this.placement="bottom",this.form="",this.required=!1,this.showNoResults=!1,this.noResultsMessage="No results found",this.showSelected=!1,this.blockValueChange=!1,this.noWidthSync=!1,this.portal=!1,this._maxOptionsVisible=3,this.maxOptionsVisibleExplicit=!1,this.chipMinWidth=110,this.chipMaxWidth=180,this.showTooltip=!1,this.hiddenChipCount=0,this.lastOverflowWidth=0,this.chipFitFrame=0,this.lastChipLayout={hidden:-1,visible:-1},this.clippedChips=[],this.clipFrame=0,this.enableTabClose=!1,this.descriptionSearchEnabled=!1,this.allowHtmlLabel=!0,this.enableDescription=!1,this.legacy=!1,this.tickOnSelect=!1,this.showListbox=!1,this.wasShowSelectedCheckedOnClose=!1,this.handleDocumentMouseDown=i=>{if(!this.open)return;const s=i.composedPath(),e=s.includes(this),n=this.popup&&s.includes(this.popup),o=this.portal&&this.portalManager.portalContainerElement&&s.includes(this.portalManager.portalContainerElement);e||n||o||this.hide()},this.handleWindowError=i=>{(i.error?.message||i.message||"").includes("Cannot read properties of null (reading 'insertBefore')")&&i.preventDefault()},this.handleWindowResize=()=>{this.portalManager.updatePortalAppendPosition()},this.handleWindowScroll=()=>{this.portalManager.updatePortalAppendPosition()},this.resizeController=new I(this,{callback:i=>{for(const s of i)s.target.classList.contains("select__tags")&&this.calculateTotalWidthOfTags()}})}get maxOptionsVisible(){return this._maxOptionsVisible}set maxOptionsVisible(i){const s=this._maxOptionsVisible;this._maxOptionsVisible=i,this.maxOptionsVisibleExplicit=!0,this.requestUpdate("maxOptionsVisible",s)}get chipFittingEnabled(){return!!this.multiple&&!this.maxOptionsVisibleExplicit}get validity(){return this.valueInput?.validity}get validationMessage(){return this.valueInput?.validationMessage??""}connectedCallback(){super.connectedCallback(),this.initializeComponent(),this.setupEventListeners(),this.updateComplete.then((()=>{this.value&&this.data.length>0&&this.selectionChanged()}))}disconnectedCallback(){this.removeOpenListeners(),this.visibilityManager?.cleanup(),this.scrollTimeout&&(clearTimeout(this.scrollTimeout),this.scrollTimeout=void 0),this.portalManager.cleanupPortalAppend(),this.destroyChipFit()}updated(i){i.has("value")&&this.selectionChanged(),(i.has("autoResize")||i.has("multiple")||i.has("maxOptionsVisible"))&&this.setupResizeObserver(),(i.has("chipMinWidth")||i.has("chipMaxWidth"))&&this.destroyChipFit(),this.chipFittingEnabled&&this.calculateTotalWidthOfTags(),this.multiple&&this.showTooltip&&this.scheduleClipCheck()}initializeComponent(){this.open=!1,this.emit("nile-init")}getDisplayText(i){return this.renderItemConfig?.getDisplayText?this.renderItemConfig.getDisplayText(i):i?.label||i?.name||i?.toString()||""}getItemValue(i){return this.renderItemConfig?.getValue?this.renderItemConfig.getValue(i):i?.value||i}getItemDescription(i){return this.renderItemConfig?.getDescription?this.renderItemConfig.getDescription(i):i?.description||i||""}getItemPrefix(i){return this.renderItemConfig?.getPrefix?this.renderItemConfig.getPrefix(i):i?.prefix||i||""}getItemSuffix(i){return this.renderItemConfig?.getSuffix?this.renderItemConfig.getSuffix(i):i?.suffix||i||""}getSearchText(i){return this.renderItemConfig?.getSearchText?this.renderItemConfig.getSearchText(i):this.getDisplayText(i)}setupEventListeners(){this.handleDocumentFocusIn=this.handleDocumentFocusIn.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.handleWindowError=this.handleWindowError.bind(this),this.handleWindowResize=this.handleWindowResize.bind(this),this.handleWindowScroll=this.handleWindowScroll.bind(this)}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown),window.addEventListener("error",this.handleWindowError),this.portal&&(window.addEventListener("resize",this.handleWindowResize),window.addEventListener("scroll",this.handleWindowScroll,!0))}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown),window.removeEventListener("error",this.handleWindowError),window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("scroll",this.handleWindowScroll,!0)}handleFocus(){this.hasFocus=!0,this.emit("nile-focus")}handleBlur(){this.hasFocus=!1,this.emit("nile-blur")}firstUpdated(i){this.visibilityManager=new S({host:this,target:this.combobox,enableVisibilityEffect:this.enableVisibilityEffect,enableTabClose:this.enableTabClose,isOpen:()=>this.open,onAnchorOutOfView:()=>{this.hide(),this.emit("nile-visibility-change",{visible:!1,reason:"anchor-out-of-view",name:this.name})},onDocumentHidden:()=>{this.hide(),this.emit("nile-visibility-change",{visible:!1,reason:"document-hidden",name:this.name})},emit:(i,s)=>this.emit(`nile-${i}`,s)})}handleDocumentFocusIn(i){if(!this.open)return;const s=i.composedPath(),e=s.includes(this),n=this.popup&&s.includes(this.popup),o=this.portal&&this.portalManager.portalContainerElement&&s.includes(this.portalManager.portalContainerElement);e||n||o||this.hide()}handleDocumentKeyDown(i){this.shouldIgnoreKeyPress(i)||(this.isEscapeKey(i)&&this.handleEscapeKey(i),this.isEnterOrSpaceKey(i)&&this.handleEnterOrSpaceKey(i))}shouldIgnoreKeyPress(i){const s=i.target,e=null!==s.closest(".select__clear"),n=null!==s.closest("nile-icon-button");return e||n}isEscapeKey(i){return"Escape"===i.key&&this.open}handleEscapeKey(i){i.preventDefault(),i.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})}isEnterOrSpaceKey(i){return"Enter"===i.key||" "===i.key}handleEnterOrSpaceKey(i){i.preventDefault(),i.stopImmediatePropagation(),this.open?this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})):this.show()}handleFooterClick(i){i.stopPropagation(),i.preventDefault()}toggleShowSelected(i){if(i.stopPropagation(),i.preventDefault(),0!==this.selectedOptions?.length){if(this.showSelected=!this.showSelected,this.showSelected){this.searchValue="";const i=Array.isArray(this.value)?this.value:[this.value];this.data=this.originalOptionItems.filter((s=>{const e=this.getItemValue(s);return i.some((i=>String(i)===String(e)))}))}else this.data=[...this.originalOptionItems];this.portalManager.resetMeasuredHeight(),this.requestUpdate(),this.repaintOptionsContainer()}}unSelectAll(){this.showSelected=!1,this.value=this.multiple?[]:"",this.data=[...this.originalOptionItems],this.selectionChanged(),this.emit("nile-change",{value:this.value,name:this.name}),this.emit("nile-clear",{value:this.multiple?this.value:"",name:this.name}),this.resetScrollPosition()}handleLabelClick(){this.displayInput.focus(),this.hide()}handleComboboxMouseDown(i){this.shouldIgnoreComboboxClick(i)||(i.preventDefault(),this.displayInput.focus({preventScroll:!0}),this.open=!this.open)}shouldIgnoreComboboxClick(i){const s=i.composedPath(),e=s.some((i=>i instanceof Element&&"nile-icon-button"===i.tagName.toLowerCase())),n=s.some((i=>i instanceof HTMLButtonElement&&i.classList.contains("select__tags-count")));return this.disabled||e||n}handleComboboxKeyDown(i){this.isEnterOrSpaceKey(i)&&(i.preventDefault(),this.open=!this.open)}handleClearClick(i){i.stopPropagation(),this.clearSelection()}clearSelection(){this.value,this.value=this.multiple?[]:"",this.selectionChanged(),this.updateComplete.then((()=>{this.nileInput({value:this.value,name:this.name}),this.nileChange({value:this.value,name:this.name}),this.emit("nile-clear")}))}handleClearMouseDown(i){i.stopPropagation()}handleOptionClick(i){const s=i.target.closest("nile-option");if(this.shouldBlockValueChange(s))return;const e=this.value;this.oldValue=e,s&&!s.disabled&&this.handleOptionSelection(s)}shouldBlockValueChange(i){return!(!this.blockValueChange||!i)&&(this.emit("nile-block-change",{value:i?.value,name:this.name}),this.hide(),!0)}handleOptionSelection(i){const s=i.value;this.multiple?this.toggleOptionSelection(s):this.setSelectedOptions(s),this.updateComplete.then((()=>this.displayInput.focus({preventScroll:!0}))),this.value!==this.oldValue&&this.updateComplete.then((()=>{this.nileInput({value:this.value,name:this.name}),this.nileChange({value:this.value,name:this.name})})),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0}))}setSelectedOptions(i){this.value=i,this.selectionChanged()}toggleOptionSelection(i){const s=Array.isArray(this.value)?this.value:[];s.includes(i)?this.value=s.filter((s=>s!==i)):this.value=[...s,i],this.selectionChanged()}handleTagRemove(i,s){i.stopPropagation(),this.disabled||(this.removeTagFromSelection(s),this.emitTagRemovalEvent(s))}removeTagFromSelection(i){let s=this.value;Array.isArray(s)||(s=s?[s]:[]);const e=s.filter((s=>s!==i.value));this.value=e,this.selectionChanged()}emitTagRemovalEvent(i){this.updateComplete.then((()=>{this.nileInput({value:this.value,name:this.name}),this.nileChange({value:this.value,name:this.name}),this.emit("nile-tag-remove",{value:this.value,name:this.name,removedtagvalue:i.value})}))}selectionChanged(){const i=this.originalOptionItems.length>0?this.originalOptionItems:this.data;if(this.selectedOptions=y.createVirtualOptionsFromValues(this.value,i,this.getDisplayText.bind(this),this.renderItemConfig?.getValue,this.allowHtmlLabel),this.multiple)this.placeholder&&0===this.value.length?this.displayLabel="":this.displayLabel=this.selectedOptions.length+" selected";else{const i=Array.isArray(this.value)?this.value[0]:this.value,s=this.selectedOptions[0]?.getTextLabel();this.displayLabel=s||(i??"")}this.updateValidity(),0===this.selectedOptions.length&&(this.showSelected=!1,this.originalOptionItems?.length>0&&!this.searchValue&&(this.data=[...this.originalOptionItems]),this.repaintOptionsContainer()),this.calculateTotalWidthOfTags()}handleSearchFocus(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleSearchBlur(){document.addEventListener("keydown",this.handleDocumentKeyDown)}handleSearchChange(i){this.searchValue=i.detail.value,this.portal&&this.portalManager.updatePortalAppendPosition(),this.emit("nile-search",{query:this.searchValue,name:this.name}),this.disableLocalSearch||(this.filterVirtualOptions(this.searchValue),this.repaintOptionsContainer(),this.portalManager.resetMeasuredHeight())}repaintOptionsContainer(){this.resetScrollPosition(),this.updateComplete.then((()=>{const i=this.shadowRoot?.querySelector(".virtualized");i&&(this.data.length<5?i.classList.add("no-scroll"):i.classList.remove("no-scroll"))}))}handleScroll(i){if(this.showSelected)return;const s=i.target;this.emit("nile-scroll",{scrollTop:s.scrollTop,scrollLeft:s.scrollLeft,name:this.name}),this.scrolling||(this.scrolling=!0,this.emit("nile-scroll-start",{scrollTop:s.scrollTop,scrollLeft:s.scrollLeft,name:this.name})),clearTimeout(this.scrollTimeout),this.scrollTimeout=window.setTimeout((()=>{this.scrolling&&(this.scrolling=!1)}),300);Math.ceil(s.scrollTop)>=Math.floor(s.scrollHeight-s.offsetHeight)&&!this.searchValue&&this.emit("nile-scroll-end",{scrollTop:s.scrollTop,scrollLeft:s.scrollLeft,name:this.name,isAtBottom:!0})}filterVirtualOptions(i){const s=w.filterVirtualOptions(i,this.originalOptionItems,this.data,this.getDisplayText.bind(this),this.getItemDescription.bind(this),this.descriptionSearchEnabled,this.renderItemConfig?.getSearchText);this.portal?(this.portalManager.updatePortalAppendPosition(),this.updateComplete.then((()=>{requestAnimationFrame((()=>{this.resetScrollPosition()}))}))):this.resetScrollPosition(),this.data=s.filteredItems,this.showNoResults=s.showNoResults,this.showSelected=!1,this.requestUpdate()}handleInvalid(i){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(i)}handleDisabledChange(){this.disabled&&(this.open=!1,this.handleOpenChange())}handleValueChange(){this.selectionChanged(),this.requestUpdate(),this.portal&&this.portalManager.portalContainerElement&&this.portalManager.updatePortalAppendPosition()}handleDataChange(){this.data.length>0&&this.open&&!this.showSelected&&!this.searchValue&&(this.originalOptionItems=[...this.data]),this.selectionChanged(),this.optionsLoading||this.loading||0!==this.data.length?this.data.length>0&&(this.showNoResults=!1):this.showNoResults=!0,this.requestUpdate(),this.portalManager.resetMeasuredHeight(),this.portal&&this.portalManager.portalContainerElement&&this.portalManager.updatePortalAppendPosition()}handleRenderItemConfigChange(){this.value&&this.data.length>0&&(this.selectionChanged(),this.requestUpdate())}handleOptionsLoadingChange(){this.optionsLoading||0!==this.data.length||(this.showNoResults=!0),this.requestUpdate(),this.portal&&this.portalManager.portalContainerElement&&this.portalManager.updatePortalAppendPosition()}handlePortalAppendChange(){this.open&&(this.portal?this.portalManager.setupPortalAppend():this.portalManager.cleanupPortalAppend())}async handleOpenChange(){this.open&&!this.disabled?(this.visibilityManager?.setup(),this.showListbox=!0,await this.updateComplete,await this.handleOpen(),this.portal&&this.portalManager.setupPortalAppend()):(this.visibilityManager?.cleanup(),await this.handleClose(),this.showListbox=!1,this.portal&&this.portalManager.cleanupPortalAppend())}async handleOpen(){this.emit("nile-show",{value:this.value,name:this.name}),this.addOpenListeners(),this.showNoResults=!this.data?.length,await r(this),this.popup?.popup&&(this.popup.popup.style.visibility="hidden"),this.popup.active=!0,await new Promise((i=>requestAnimationFrame(i))),await new Promise((i=>requestAnimationFrame(i))),this.popup?.popup&&(this.popup.popup.style.visibility="");const{keyframes:i,options:s}=v(this,"select.show",{dir:"ltr"});await l(this.popup.popup,i,s),this.wasShowSelectedCheckedOnClose&&(this.showSelected=!1,this.data=[...this.originalOptionItems],this.wasShowSelectedCheckedOnClose=!1),this.filterVirtualOptions(""),this.resetScrollPosition(),this.emit("nile-after-show",{value:this.value,name:this.name})}async handleClose(){this.emit("nile-hide",{value:this.value,name:this.name}),this.removeOpenListeners(),this.wasShowSelectedCheckedOnClose=this.showSelected,await r(this);const{keyframes:i,options:s}=v(this,"select.hide",{dir:"ltr"});await l(this.popup.popup,i,s),this.popup.active=!1,this.popup?.popup&&(this.popup.popup.style.visibility=""),this.searchValue="",this.portalManager.resetMeasuredHeight(),this.emit("nile-after-hide",{value:this.value,name:this.name})}async show(){if(!this.open&&!this.disabled)return this.open=!0,j(this,"nile-after-show");this.open=!1}async hide(){if(this.open&&!this.disabled)return this.open=!1,j(this,"nile-after-hide");this.open=!1}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.valueInput.reportValidity()}setCustomValidity(i){this.valueInput.setCustomValidity(i),this.formControlController.updateValidity()}focus(i){this.displayInput.focus(i)}blur(){this.displayInput.blur()}onInputChange(i){i.stopPropagation()}render(){const i=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const e=this.hasSlotController.test("label-suffix"),n=this.hasSlotController.test("custom-select"),o=!!this.label||!!i,t=this.clearable&&!this.disabled&&this.value.length>0,c=!!this.placeholder&&0===this.value.length,r=!!this.helpText,l=!!this.errorMessage;return s`
|
|
11
|
+
*/function A(i){void 0!==this._$AN?(F(this),this._$AM=i,B(this)):this._$AM=i}function z(i,s=!1,e=0){const n=this._$AH,o=this._$AN;if(void 0!==o&&0!==o.size)if(s)if(Array.isArray(n))for(let i=e;i<n.length;i++)O(n[i],!1),F(n[i]);else null!=n&&(O(n,!1),F(n));else O(this,i)}const T=i=>{i.type==$.CHILD&&(i._$AP??=z,i._$AQ??=A)};class V extends k{constructor(){super(...arguments),this._$AN=void 0}_$AT(i,s,e){super._$AT(i,s,e),B(this),this.isConnected=i._$AU}_$AO(i,s=!0){i!==this.isConnected&&(this.isConnected=i,i?this.reconnected?.():this.disconnected?.()),s&&(O(this,i),F(this))}setValue(i){if((i=>void 0===i.strings)(this._$Ct))this._$Ct._$AI(i,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=i,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}class M{constructor(i,{target:s,config:e,callback:n,skipInitial:o}){this.t=new Set,this.o=!1,this.i=!1,this.h=i,null!==s&&this.t.add(s??i),this.l=e,this.o=o??this.o,this.callback=n,window.ResizeObserver?(this.u=new ResizeObserver((i=>{this.handleChanges(i),this.h.requestUpdate()})),i.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(i){this.value=this.callback?.(i,this.u)}hostConnected(){for(const i of this.t)this.observe(i)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(i){this.t.add(i),this.u.observe(i,this.l),this.i=!0,this.h.requestUpdate()}unobserve(i){this.t.delete(i),this.u.unobserve(i)}disconnect(){this.u.disconnect()}target(i){return q(this,i)}}const q=C(class extends V{constructor(){super(...arguments),this.observing=!1}render(i,s){}update(i,[s,e]){this.controller=s,this.part=i,this.observe=e,!1===e?(s.unobserve(i.element),this.observing=!1):!1===this.observing&&(s.observe(i.element),this.observing=!0)}disconnected(){this.controller?.unobserve(this.part.element),this.observing=!1}reconnected(){!1!==this.observe&&!1===this.observing&&(this.controller?.observe(this.part.element),this.observing=!0)}});let I=class extends f{constructor(){super(...arguments),this.formControlController=new h(this,{assumeInteractionOn:["nile-blur","nile-input"]}),this.hasSlotController=new d(this,"help-text","label"),this.portalManager=new x(this),this.hasFocus=!1,this.displayLabel="",this.selectedOptions=[],this.oldValue="",this.scrolling=!1,this.name="",this.data=[],this.originalOptionItems=[],this.value="",this.defaultValue="",this.size="medium",this.placeholder="Select...",this.autoResize=!1,this.searchValue="",this.searchEnabled=!1,this.enableVisibilityEffect=!1,this.internalSearchPlaceHolder="Search...",this.disableLocalSearch=!1,this.optionsLoading=!1,this.loading=!1,this.multiple=!1,this.helpText="",this.errorMessage="",this.warning=!1,this.error=!1,this.success=!1,this.disabled=!1,this.clearable=!1,this.open=!1,this.hoist=!1,this.filled=!1,this.pill=!1,this.label="",this.placement="bottom",this.form="",this.required=!1,this.showNoResults=!1,this.noResultsMessage="No results found",this.showSelected=!1,this.blockValueChange=!1,this.noWidthSync=!1,this.portal=!1,this._maxOptionsVisible=3,this.maxOptionsVisibleExplicit=!1,this.chipMinWidth=110,this.chipMaxWidth=180,this.showTooltip=!1,this.hiddenChipCount=0,this.oldMaxOptionsVisible=1,this.lastOverflowWidth=0,this.chipFitFrame=0,this.lastChipLayout={hidden:-1,visible:-1},this.clippedChips=[],this.clipFrame=0,this.enableTabClose=!1,this.descriptionSearchEnabled=!1,this.allowHtmlLabel=!0,this.enableDescription=!1,this.legacy=!1,this.tickOnSelect=!1,this.showListbox=!1,this.wasShowSelectedCheckedOnClose=!1,this.handleDocumentMouseDown=i=>{if(!this.open)return;const s=i.composedPath(),e=s.includes(this),n=this.popup&&s.includes(this.popup),o=this.portal&&this.portalManager.portalContainerElement&&s.includes(this.portalManager.portalContainerElement);e||n||o||this.hide()},this.handleWindowError=i=>{(i.error?.message||i.message||"").includes("Cannot read properties of null (reading 'insertBefore')")&&i.preventDefault()},this.handleWindowResize=()=>{this.portalManager.updatePortalAppendPosition()},this.handleWindowScroll=()=>{this.portalManager.updatePortalAppendPosition()},this.resizeController=new M(this,{callback:i=>{for(const s of i)s.target.classList.contains("select__tags")&&this.calculateTotalWidthOfTags()}})}get maxOptionsVisible(){return this._maxOptionsVisible}set maxOptionsVisible(i){const s=this._maxOptionsVisible;this._maxOptionsVisible=i,this.maxOptionsVisibleExplicit=!0,this.requestUpdate("maxOptionsVisible",s)}get chipFittingEnabled(){return!!this.multiple&&this.showTooltip&&!this.maxOptionsVisibleExplicit}get legacyTagFitEnabled(){return!!this.multiple&&!this.showTooltip}setFittedMaxOptionsVisible(i){const s=this._maxOptionsVisible;this._maxOptionsVisible=i,this.requestUpdate("maxOptionsVisible",s)}get validity(){return this.valueInput?.validity}get validationMessage(){return this.valueInput?.validationMessage??""}connectedCallback(){super.connectedCallback(),this.initializeComponent(),this.setupEventListeners(),this.updateComplete.then((()=>{this.value&&this.data.length>0&&this.selectionChanged()}))}disconnectedCallback(){this.removeOpenListeners(),this.visibilityManager?.cleanup(),this.scrollTimeout&&(clearTimeout(this.scrollTimeout),this.scrollTimeout=void 0),this.portalManager.cleanupPortalAppend(),this.destroyChipFit()}updated(i){i.has("value")&&this.selectionChanged(),(i.has("autoResize")||i.has("multiple")||i.has("maxOptionsVisible")||i.has("showTooltip"))&&this.setupResizeObserver(),i.has("showTooltip")&&void 0!==i.get("showTooltip")&&this.legacyTagFitEnabled&&this.calculateTotalWidthOfTags(),(i.has("chipMinWidth")||i.has("chipMaxWidth"))&&this.destroyChipFit(),this.chipFittingEnabled&&this.calculateTotalWidthOfTags(),this.multiple&&this.showTooltip&&this.scheduleClipCheck()}initializeComponent(){this.open=!1,this.emit("nile-init")}getDisplayText(i){return this.renderItemConfig?.getDisplayText?this.renderItemConfig.getDisplayText(i):i?.label||i?.name||i?.toString()||""}getItemValue(i){return this.renderItemConfig?.getValue?this.renderItemConfig.getValue(i):i?.value||i}getItemDescription(i){return this.renderItemConfig?.getDescription?this.renderItemConfig.getDescription(i):i?.description||i||""}getItemPrefix(i){return this.renderItemConfig?.getPrefix?this.renderItemConfig.getPrefix(i):i?.prefix||i||""}getItemSuffix(i){return this.renderItemConfig?.getSuffix?this.renderItemConfig.getSuffix(i):i?.suffix||i||""}getSearchText(i){return this.renderItemConfig?.getSearchText?this.renderItemConfig.getSearchText(i):this.getDisplayText(i)}setupEventListeners(){this.handleDocumentFocusIn=this.handleDocumentFocusIn.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.handleWindowError=this.handleWindowError.bind(this),this.handleWindowResize=this.handleWindowResize.bind(this),this.handleWindowScroll=this.handleWindowScroll.bind(this)}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown),window.addEventListener("error",this.handleWindowError),this.portal&&(window.addEventListener("resize",this.handleWindowResize),window.addEventListener("scroll",this.handleWindowScroll,!0))}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown),window.removeEventListener("error",this.handleWindowError),window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("scroll",this.handleWindowScroll,!0)}handleFocus(){this.hasFocus=!0,this.emit("nile-focus")}handleBlur(){this.hasFocus=!1,this.emit("nile-blur")}firstUpdated(i){this.visibilityManager=new S({host:this,target:this.combobox,enableVisibilityEffect:this.enableVisibilityEffect,enableTabClose:this.enableTabClose,isOpen:()=>this.open,onAnchorOutOfView:()=>{this.hide(),this.emit("nile-visibility-change",{visible:!1,reason:"anchor-out-of-view",name:this.name})},onDocumentHidden:()=>{this.hide(),this.emit("nile-visibility-change",{visible:!1,reason:"document-hidden",name:this.name})},emit:(i,s)=>this.emit(`nile-${i}`,s)})}handleDocumentFocusIn(i){if(!this.open)return;const s=i.composedPath(),e=s.includes(this),n=this.popup&&s.includes(this.popup),o=this.portal&&this.portalManager.portalContainerElement&&s.includes(this.portalManager.portalContainerElement);e||n||o||this.hide()}handleDocumentKeyDown(i){this.shouldIgnoreKeyPress(i)||(this.isEscapeKey(i)&&this.handleEscapeKey(i),this.isEnterOrSpaceKey(i)&&this.handleEnterOrSpaceKey(i))}shouldIgnoreKeyPress(i){const s=i.target,e=null!==s.closest(".select__clear"),n=null!==s.closest("nile-icon-button");return e||n}isEscapeKey(i){return"Escape"===i.key&&this.open}handleEscapeKey(i){i.preventDefault(),i.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})}isEnterOrSpaceKey(i){return"Enter"===i.key||" "===i.key}handleEnterOrSpaceKey(i){i.preventDefault(),i.stopImmediatePropagation(),this.open?this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})):this.show()}handleFooterClick(i){i.stopPropagation(),i.preventDefault()}toggleShowSelected(i){if(i.stopPropagation(),i.preventDefault(),0!==this.selectedOptions?.length){if(this.showSelected=!this.showSelected,this.showSelected){this.searchValue="";const i=Array.isArray(this.value)?this.value:[this.value];this.data=this.originalOptionItems.filter((s=>{const e=this.getItemValue(s);return i.some((i=>String(i)===String(e)))}))}else this.data=[...this.originalOptionItems];this.portalManager.resetMeasuredHeight(),this.requestUpdate(),this.repaintOptionsContainer()}}unSelectAll(){this.showSelected=!1,this.value=this.multiple?[]:"",this.data=[...this.originalOptionItems],this.selectionChanged(),this.emit("nile-change",{value:this.value,name:this.name}),this.emit("nile-clear",{value:this.multiple?this.value:"",name:this.name}),this.resetScrollPosition()}handleLabelClick(){this.displayInput.focus(),this.hide()}handleComboboxMouseDown(i){this.shouldIgnoreComboboxClick(i)||(i.preventDefault(),this.displayInput.focus({preventScroll:!0}),this.open=!this.open)}shouldIgnoreComboboxClick(i){const s=i.composedPath(),e=s.some((i=>i instanceof Element&&"nile-icon-button"===i.tagName.toLowerCase())),n=s.some((i=>i instanceof HTMLButtonElement&&i.classList.contains("select__tags-count")));return this.disabled||e||n}handleComboboxKeyDown(i){this.isEnterOrSpaceKey(i)&&(i.preventDefault(),this.open=!this.open)}handleClearClick(i){i.stopPropagation(),this.clearSelection()}clearSelection(){this.value,this.value=this.multiple?[]:"",this.selectionChanged(),this.updateComplete.then((()=>{this.nileInput({value:this.value,name:this.name}),this.nileChange({value:this.value,name:this.name}),this.emit("nile-clear")}))}handleClearMouseDown(i){i.stopPropagation()}handleOptionClick(i){const s=i.target.closest("nile-option");if(this.shouldBlockValueChange(s))return;const e=this.value;this.oldValue=e,s&&!s.disabled&&this.handleOptionSelection(s)}shouldBlockValueChange(i){return!(!this.blockValueChange||!i)&&(this.emit("nile-block-change",{value:i?.value,name:this.name}),this.hide(),!0)}handleOptionSelection(i){const s=i.value;this.multiple?this.toggleOptionSelection(s):this.setSelectedOptions(s),this.updateComplete.then((()=>this.displayInput.focus({preventScroll:!0}))),this.value!==this.oldValue&&this.updateComplete.then((()=>{this.nileInput({value:this.value,name:this.name}),this.nileChange({value:this.value,name:this.name})})),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0}))}setSelectedOptions(i){this.value=i,this.selectionChanged()}toggleOptionSelection(i){const s=Array.isArray(this.value)?this.value:[];s.includes(i)?this.value=s.filter((s=>s!==i)):this.value=[...s,i],this.selectionChanged()}handleTagRemove(i,s){i.stopPropagation(),this.disabled||(this.removeTagFromSelection(s),this.emitTagRemovalEvent(s))}removeTagFromSelection(i){let s=this.value;Array.isArray(s)||(s=s?[s]:[]);const e=s.filter((s=>s!==i.value));this.value=e,this.selectionChanged()}emitTagRemovalEvent(i){this.updateComplete.then((()=>{this.nileInput({value:this.value,name:this.name}),this.nileChange({value:this.value,name:this.name}),this.emit("nile-tag-remove",{value:this.value,name:this.name,removedtagvalue:i.value})}))}selectionChanged(){const i=this.originalOptionItems.length>0?this.originalOptionItems:this.data;if(this.selectedOptions=y.createVirtualOptionsFromValues(this.value,i,this.getDisplayText.bind(this),this.renderItemConfig?.getValue,this.allowHtmlLabel),this.multiple)this.placeholder&&0===this.value.length?this.displayLabel="":this.displayLabel=this.selectedOptions.length+" selected";else{const i=Array.isArray(this.value)?this.value[0]:this.value,s=this.selectedOptions[0]?.getTextLabel();this.displayLabel=s||(i??"")}this.updateValidity(),0===this.selectedOptions.length&&(this.showSelected=!1,this.originalOptionItems?.length>0&&!this.searchValue&&(this.data=[...this.originalOptionItems]),this.repaintOptionsContainer()),this.calculateTotalWidthOfTags()}handleSearchFocus(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleSearchBlur(){document.addEventListener("keydown",this.handleDocumentKeyDown)}handleSearchChange(i){this.searchValue=i.detail.value,this.portal&&this.portalManager.updatePortalAppendPosition(),this.emit("nile-search",{query:this.searchValue,name:this.name}),this.disableLocalSearch||(this.filterVirtualOptions(this.searchValue),this.repaintOptionsContainer(),this.portalManager.resetMeasuredHeight())}repaintOptionsContainer(){this.resetScrollPosition(),this.updateComplete.then((()=>{const i=this.shadowRoot?.querySelector(".virtualized");i&&(this.data.length<5?i.classList.add("no-scroll"):i.classList.remove("no-scroll"))}))}handleScroll(i){if(this.showSelected)return;const s=i.target;this.emit("nile-scroll",{scrollTop:s.scrollTop,scrollLeft:s.scrollLeft,name:this.name}),this.scrolling||(this.scrolling=!0,this.emit("nile-scroll-start",{scrollTop:s.scrollTop,scrollLeft:s.scrollLeft,name:this.name})),clearTimeout(this.scrollTimeout),this.scrollTimeout=window.setTimeout((()=>{this.scrolling&&(this.scrolling=!1)}),300);Math.ceil(s.scrollTop)>=Math.floor(s.scrollHeight-s.offsetHeight)&&!this.searchValue&&this.emit("nile-scroll-end",{scrollTop:s.scrollTop,scrollLeft:s.scrollLeft,name:this.name,isAtBottom:!0})}filterVirtualOptions(i){const s=w.filterVirtualOptions(i,this.originalOptionItems,this.data,this.getDisplayText.bind(this),this.getItemDescription.bind(this),this.descriptionSearchEnabled,this.renderItemConfig?.getSearchText);this.portal?(this.portalManager.updatePortalAppendPosition(),this.updateComplete.then((()=>{requestAnimationFrame((()=>{this.resetScrollPosition()}))}))):this.resetScrollPosition(),this.data=s.filteredItems,this.showNoResults=s.showNoResults,this.showSelected=!1,this.requestUpdate()}handleInvalid(i){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(i)}handleDisabledChange(){this.disabled&&(this.open=!1,this.handleOpenChange())}handleValueChange(){this.selectionChanged(),this.requestUpdate(),this.portal&&this.portalManager.portalContainerElement&&this.portalManager.updatePortalAppendPosition()}handleDataChange(){this.data.length>0&&this.open&&!this.showSelected&&!this.searchValue&&(this.originalOptionItems=[...this.data]),this.selectionChanged(),this.optionsLoading||this.loading||0!==this.data.length?this.data.length>0&&(this.showNoResults=!1):this.showNoResults=!0,this.requestUpdate(),this.portalManager.resetMeasuredHeight(),this.portal&&this.portalManager.portalContainerElement&&this.portalManager.updatePortalAppendPosition()}handleRenderItemConfigChange(){this.value&&this.data.length>0&&(this.selectionChanged(),this.requestUpdate())}handleOptionsLoadingChange(){this.optionsLoading||0!==this.data.length||(this.showNoResults=!0),this.requestUpdate(),this.portal&&this.portalManager.portalContainerElement&&this.portalManager.updatePortalAppendPosition()}handlePortalAppendChange(){this.open&&(this.portal?this.portalManager.setupPortalAppend():this.portalManager.cleanupPortalAppend())}async handleOpenChange(){this.open&&!this.disabled?(this.visibilityManager?.setup(),this.showListbox=!0,await this.updateComplete,await this.handleOpen(),this.portal&&this.portalManager.setupPortalAppend()):(this.visibilityManager?.cleanup(),await this.handleClose(),this.showListbox=!1,this.portal&&this.portalManager.cleanupPortalAppend())}async handleOpen(){this.emit("nile-show",{value:this.value,name:this.name}),this.addOpenListeners(),this.showNoResults=!this.data?.length,await r(this),this.popup?.popup&&(this.popup.popup.style.visibility="hidden"),this.popup.active=!0,await new Promise((i=>requestAnimationFrame(i))),await new Promise((i=>requestAnimationFrame(i))),this.popup?.popup&&(this.popup.popup.style.visibility="");const{keyframes:i,options:s}=v(this,"select.show",{dir:"ltr"});await l(this.popup.popup,i,s),this.wasShowSelectedCheckedOnClose&&(this.showSelected=!1,this.data=[...this.originalOptionItems],this.wasShowSelectedCheckedOnClose=!1),this.filterVirtualOptions(""),this.resetScrollPosition(),this.emit("nile-after-show",{value:this.value,name:this.name})}async handleClose(){this.emit("nile-hide",{value:this.value,name:this.name}),this.removeOpenListeners(),this.wasShowSelectedCheckedOnClose=this.showSelected,await r(this);const{keyframes:i,options:s}=v(this,"select.hide",{dir:"ltr"});await l(this.popup.popup,i,s),this.popup.active=!1,this.popup?.popup&&(this.popup.popup.style.visibility=""),this.searchValue="",this.portalManager.resetMeasuredHeight(),this.emit("nile-after-hide",{value:this.value,name:this.name})}async show(){if(!this.open&&!this.disabled)return this.open=!0,j(this,"nile-after-show");this.open=!1}async hide(){if(this.open&&!this.disabled)return this.open=!1,j(this,"nile-after-hide");this.open=!1}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.valueInput.reportValidity()}setCustomValidity(i){this.valueInput.setCustomValidity(i),this.formControlController.updateValidity()}focus(i){this.displayInput.focus(i)}blur(){this.displayInput.blur()}onInputChange(i){i.stopPropagation()}render(){const i=this.hasSlotController.test("label");this.hasSlotController.test("help-text");const e=this.hasSlotController.test("label-suffix"),n=this.hasSlotController.test("custom-select"),o=!!this.label||!!i,t=this.clearable&&!this.disabled&&this.value.length>0,c=!!this.placeholder&&0===this.value.length,r=!!this.helpText,l=!!this.errorMessage;return s`
|
|
12
12
|
<div
|
|
13
13
|
part="form-control"
|
|
14
14
|
class=${m({"form-control":!0,"form-control--small":"small"===this.size,"form-control--medium":"medium"===this.size,"form-control--large":"large"===this.size,"form-control--has-label":o,"form-control--has-help-text":r})}
|
|
@@ -144,36 +144,36 @@ import{__decorate as i}from"tslib";import{html as s}from"lit";import{query as e,
|
|
|
144
144
|
</div>
|
|
145
145
|
`}renderTags(){return this.chipFittingEnabled?this.renderFittedTags():this.multiple?s`
|
|
146
146
|
<div part="tags" class="select__tags">
|
|
147
|
-
${this.selectedOptions.map(((i,e)=>e<this.maxOptionsVisible||this.maxOptionsVisible<=0?s
|
|
148
|
-
<nile-lite-tooltip
|
|
147
|
+
${this.selectedOptions.map(((i,e)=>e<this.maxOptionsVisible||this.maxOptionsVisible<=0?this.showTooltip?s`<nile-lite-tooltip
|
|
149
148
|
class="select__tag-tip"
|
|
150
149
|
.content=${i.getTextLabel()}
|
|
151
150
|
?disabled=${this.chipTooltipDisabled(e)}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
part="tag"
|
|
155
|
-
exportparts="
|
|
156
|
-
base:tag__base,
|
|
157
|
-
content:tag__content,
|
|
158
|
-
remove-button:tag__remove-button,
|
|
159
|
-
remove-button__base:tag__remove-button__base
|
|
160
|
-
"
|
|
161
|
-
style="max-width:${this.chipMaxWidth}px"
|
|
162
|
-
?pill=${this.pill}
|
|
163
|
-
size=${this.size}
|
|
164
|
-
removable
|
|
165
|
-
@nile-remove=${s=>this.handleTagRemove(s,i)}
|
|
166
|
-
>
|
|
167
|
-
${i.getTextLabel()}
|
|
168
|
-
</nile-tag>
|
|
169
|
-
</nile-lite-tooltip>
|
|
170
|
-
`:e===this.maxOptionsVisible?s`
|
|
151
|
+
>${this.renderLegacyTag(i,e)}</nile-lite-tooltip
|
|
152
|
+
>`:this.renderLegacyTag(i,e):e===this.maxOptionsVisible?s`
|
|
171
153
|
<span class="select__tags-count"
|
|
172
154
|
>+${this.selectedOptions.length-e} More
|
|
173
155
|
</span>
|
|
174
156
|
`:null))}
|
|
175
157
|
</div>
|
|
176
|
-
`:s``}
|
|
158
|
+
`:s``}renderLegacyTag(i,e){const n={select__invisible:e+1>this.oldMaxOptionsVisible&&this.maxOptionsVisible===1/0};return s`
|
|
159
|
+
<nile-tag
|
|
160
|
+
class=${m(n)}
|
|
161
|
+
part="tag"
|
|
162
|
+
exportparts="
|
|
163
|
+
base:tag__base,
|
|
164
|
+
content:tag__content,
|
|
165
|
+
remove-button:tag__remove-button,
|
|
166
|
+
remove-button__base:tag__remove-button__base
|
|
167
|
+
"
|
|
168
|
+
style=${b(this.showTooltip?`max-width:${this.chipMaxWidth}px`:void 0)}
|
|
169
|
+
?pill=${this.pill}
|
|
170
|
+
size=${this.size}
|
|
171
|
+
removable
|
|
172
|
+
@nile-remove=${s=>this.handleTagRemove(s,i)}
|
|
173
|
+
>
|
|
174
|
+
${i.getTextLabel()}
|
|
175
|
+
</nile-tag>
|
|
176
|
+
`}renderValueInput(){return s`
|
|
177
177
|
<input
|
|
178
178
|
class="select__value-input"
|
|
179
179
|
type="text"
|
|
@@ -259,7 +259,7 @@ import{__decorate as i}from"tslib";import{html as s}from"lit";import{query as e,
|
|
|
259
259
|
`:s``}renderFooter(){return this.multiple?s`
|
|
260
260
|
<div
|
|
261
261
|
part="footer"
|
|
262
|
-
class
|
|
262
|
+
class=${m({select__footer:!0,loading:!!this.loading,"select__footer--query":!this.noWidthSync||this.portal})}
|
|
263
263
|
@click="${this.handleFooterClick}"
|
|
264
264
|
>
|
|
265
265
|
<span
|
|
@@ -299,4 +299,4 @@ import{__decorate as i}from"tslib";import{html as s}from"lit";import{query as e,
|
|
|
299
299
|
>${this.errorMessage}</nile-form-error-message
|
|
300
300
|
>
|
|
301
301
|
`:""}
|
|
302
|
-
`}getVirtualizedContent(){return _.getVirtualizedContent(this.data,this.searchEnabled,this.getDisplayText.bind(this),this.value,this.multiple,this.renderItemConfig?.getDisplayText,this.renderItemConfig?.getValue,this.renderItemConfig?.getDescription,this.renderItemConfig?.getPrefix,this.renderItemConfig?.getSuffix,this.showNoResults,this.noResultsMessage,this.optionsLoading||this.loading,this.handleScroll.bind(this),this.allowHtmlLabel,this.enableDescription,this.tickOnSelect,this.legacy)}nileInput(i){this.emit("nile-input",i)}nileChange(i){this.emit("nile-change",i)}updateValidity(){this.updateComplete.then((()=>{this.formControlController.updateValidity()}))}setupResizeObserver(){const i=this.autoResize&&this.chipFittingEnabled?this.shadowRoot?.querySelector(".select__tags")??void 0:void 0;if(i!==this.observedTagsContainer){if(this.observedTagsContainer&&(this.resizeController.unobserve(this.observedTagsContainer),this.observedTagsContainer=void 0),i)return this.resizeController.observe(i),void(this.observedTagsContainer=i);this.chipFittingEnabled||this.destroyChipFit()}else this.chipFittingEnabled||this.destroyChipFit()}calculateTotalWidthOfTags(){this.chipFittingEnabled&&(this.chipFitFrame&&cancelAnimationFrame(this.chipFitFrame),this.chipFitFrame=requestAnimationFrame((()=>{this.chipFitFrame=0,this.layoutChips()})))}allocateChipWidths(i,s){const e=this.chipMinWidth,n=this.chipMaxWidth;if(i.reduce(((i,s)=>i+s),0)<=s)return i.slice();if(!this.showTooltip)return null;const o=i.map((i=>Math.min(i,n)));if(o.reduce(((i,s)=>i+s),0)<=s)return o;const t=new Array(i.length).fill(0);let c=o.map(((i,s)=>s)),r=s;for(;0!==c.length;){const i=r/c.length,s=c.filter((s=>o[s]<=i));if(0===s.length)break;for(const i of s)t[i]=o[i],r-=o[i];c=c.filter((s=>o[s]>i))}if(c.length>0){const i=r/c.length;if(i<e)return null;const s=Math.floor(i);for(const i of c)t[i]=s}return t}computeChipFit(i,s,e,n){const o=i.length;if(0===o)return{visibleCount:0,widths:[],hiddenCount:0};for(let t=o;t>=1;t--){const c=o-t,r=s-(c>0?e+n:0)-n*(t-1);if(r<=0)continue;const l=this.allocateChipWidths(i.slice(0,t),r);if(l)return{visibleCount:t,widths:l,hiddenCount:c}}const t=s-e-n;return{visibleCount:1,widths:[Math.max(0,Math.min(i[0],this.showTooltip?Math.max(this.chipMinWidth,t):t))],hiddenCount:o-1}}layoutChips(){const i=this.shadowRoot;if(!i)return;const s=i.querySelector(".select__tags");if(!s)return;const e=Array.from(s.querySelectorAll("nile-tag"));if(0===e.length)return void(this.hiddenChipCount=0);const n=s.querySelector(".select__tags-count");for(const i of e)i.style.display="",i.style.width="auto",i.style.maxWidth="none",i.style.minWidth="0",i.style.flex="0 0 auto";const o=e.map((i=>Math.ceil(i.getBoundingClientRect().width))),t=n?Math.ceil(n.getBoundingClientRect().width):this.lastOverflowWidth;n&&(this.lastOverflowWidth=t);const c=getComputedStyle(s),r=parseFloat(c.columnGap||c.gap||"0")||0,l=this.computeChipFit(o,s.clientWidth,t,r);e.forEach(((i,s)=>{if(s<l.visibleCount){const e=Math.min(o[s],Math.max(l.widths[s],this.chipMinWidth));i.style.display="",i.style.width=`${e}px`,i.style.maxWidth=`${e}px`,i.style.flex="0 0 auto"}else i.style.display="none"})),this.lastChipLayout.hidden===l.hiddenCount&&this.lastChipLayout.visible===l.visibleCount||(this.lastChipLayout={hidden:l.hiddenCount,visible:l.visibleCount},this.hiddenChipCount=l.hiddenCount),this.refreshClippedChips()}isChipClipped(i){if(!i)return!1;const s=i.shadowRoot;if(s){const i=s.querySelector('[part="content"]');if(i&&i.scrollWidth>i.clientWidth+1)return!0;const e=s.querySelector('[part="prefix_content_wrapper"]');if(e&&e.scrollWidth>e.clientWidth+1)return!0}return i.scrollWidth>i.clientWidth+1}refreshClippedChips(){if(!this.multiple)return;const i=this.shadowRoot;if(!i)return;const s=Array.from(i.querySelectorAll(".select__tags nile-tag")).map((i=>this.isChipClipped(i))),e=s.length===this.clippedChips.length&&s.every(((i,s)=>i===this.clippedChips[s]));e||(this.clippedChips=s)}scheduleClipCheck(){this.clipFrame&&cancelAnimationFrame(this.clipFrame),this.clipFrame=requestAnimationFrame((()=>{this.clipFrame=0,this.refreshClippedChips()}))}chipTooltipDisabled(i){return!this.showTooltip||!this.clippedChips[i]}destroyChipFit(){this.chipFitFrame&&cancelAnimationFrame(this.chipFitFrame),this.chipFitFrame=0,this.clipFrame&&cancelAnimationFrame(this.clipFrame),this.clipFrame=0,this.lastChipLayout={hidden:-1,visible:-1}}getChipLabel(i){return(i.getTextLabel?.()??"").trim()}handleChipKeyDown(i,s){if(i.key!==p.BACKSPACE&&i.key!==p.DELETE)return;if(this.disabled)return;i.preventDefault(),i.stopPropagation();const e=this.selectedOptions.indexOf(s);this.handleTagRemove(new CustomEvent("nile-remove"),s),this.restoreFocusAfterChipRemoval(e)}async restoreFocusAfterChipRemoval(i){if(i<0)return;await this.updateComplete,await new Promise((i=>requestAnimationFrame((()=>i()))));const s=Array.from(this.shadowRoot?.querySelectorAll(".select__tags nile-tag")??[]).filter((i=>"none"!==i.style.display)),e=s[i]??s[s.length-1];e?e.focus({preventScroll:!0}):this.displayInput?.focus({preventScroll:!0})}handleOverflowActivate(i){i.preventDefault(),i.stopPropagation(),this.disabled||(this.open=!this.open)}handleOverflowKeyDown(i){i.key!==p.ENTER&&i.key!==p.SPACE||this.handleOverflowActivate(i)}async resetScrollPosition(){await this.portalManager.resetScrollPosition()}};T.styles=c,i([e(".select")],T.prototype,"popup",void 0),i([e(".select__combobox")],T.prototype,"combobox",void 0),i([e(".select__display-input")],T.prototype,"displayInput",void 0),i([e(".select__value-input")],T.prototype,"valueInput",void 0),i([e(".virtualized")],T.prototype,"virtualizedContainer",void 0),i([n()],T.prototype,"hasFocus",void 0),i([n()],T.prototype,"displayLabel",void 0),i([n()],T.prototype,"selectedOptions",void 0),i([n()],T.prototype,"oldValue",void 0),i([o()],T.prototype,"name",void 0),i([o({type:Array})],T.prototype,"data",void 0),i([n()],T.prototype,"originalOptionItems",void 0),i([o({converter:{fromAttribute:i=>i.split(" "),toAttribute:i=>i.join(" ")}})],T.prototype,"value",void 0),i([a()],T.prototype,"defaultValue",void 0),i([o()],T.prototype,"size",void 0),i([o()],T.prototype,"placeholder",void 0),i([o({type:Boolean,attribute:!0,reflect:!0})],T.prototype,"autoResize",void 0),i([n()],T.prototype,"searchValue",void 0),i([o({type:Boolean,reflect:!0})],T.prototype,"searchEnabled",void 0),i([o({type:Boolean,reflect:!0,attribute:!0})],T.prototype,"enableVisibilityEffect",void 0),i([o({attribute:"internal-search-placeholder"})],T.prototype,"internalSearchPlaceHolder",void 0),i([o({type:Boolean,reflect:!0})],T.prototype,"disableLocalSearch",void 0),i([o({type:Boolean,reflect:!0})],T.prototype,"optionsLoading",void 0),i([o({type:Boolean,reflect:!0,attribute:!0})],T.prototype,"loading",void 0),i([o({type:Boolean,reflect:!0})],T.prototype,"multiple",void 0),i([o({attribute:"help-text",reflect:!0})],T.prototype,"helpText",void 0),i([o({attribute:"error-message",reflect:!0})],T.prototype,"errorMessage",void 0),i([o({type:Boolean})],T.prototype,"warning",void 0),i([o({type:Boolean})],T.prototype,"error",void 0),i([o({type:Boolean})],T.prototype,"success",void 0),i([o({type:Boolean,reflect:!0})],T.prototype,"disabled",void 0),i([o({type:Boolean,reflect:!0})],T.prototype,"clearable",void 0),i([o({type:Boolean,reflect:!0})],T.prototype,"open",void 0),i([o({type:Boolean})],T.prototype,"hoist",void 0),i([o({type:Boolean,reflect:!0})],T.prototype,"filled",void 0),i([o({type:Boolean,reflect:!0})],T.prototype,"pill",void 0),i([o()],T.prototype,"label",void 0),i([o({reflect:!0})],T.prototype,"placement",void 0),i([o({reflect:!0})],T.prototype,"form",void 0),i([o({type:Boolean,reflect:!0})],T.prototype,"required",void 0),i([o({type:Boolean})],T.prototype,"showNoResults",void 0),i([o({type:String})],T.prototype,"noResultsMessage",void 0),i([o({type:Boolean})],T.prototype,"showSelected",void 0),i([o({attribute:!1})],T.prototype,"renderItemConfig",void 0),i([o({type:Boolean,reflect:!0})],T.prototype,"blockValueChange",void 0),i([o({type:Boolean,reflect:!0})],T.prototype,"noWidthSync",void 0),i([o({type:Boolean,reflect:!0})],T.prototype,"portal",void 0),i([o({attribute:"max-options-visible",type:Number})],T.prototype,"maxOptionsVisible",null),i([o({type:Number,reflect:!0,attribute:!0})],T.prototype,"chipMinWidth",void 0),i([o({type:Number,reflect:!0,attribute:!0})],T.prototype,"chipMaxWidth",void 0),i([o({type:Boolean,attribute:!0,reflect:!0})],T.prototype,"showTooltip",void 0),i([n()],T.prototype,"hiddenChipCount",void 0),i([n()],T.prototype,"clippedChips",void 0),i([o({type:Boolean,reflect:!0,attribute:!0})],T.prototype,"enableTabClose",void 0),i([o({type:Boolean,reflect:!0,attribute:!0})],T.prototype,"descriptionSearchEnabled",void 0),i([o({type:Boolean,reflect:!0,attribute:!0,converter:{fromAttribute:i=>"true"===i,toAttribute:i=>String(i)}})],T.prototype,"allowHtmlLabel",void 0),i([o({type:Boolean,reflect:!0,attribute:!0})],T.prototype,"enableDescription",void 0),i([o({type:Boolean,reflect:!0})],T.prototype,"legacy",void 0),i([o({type:Boolean,reflect:!0,attribute:!0})],T.prototype,"tickOnSelect",void 0),i([n()],T.prototype,"showListbox",void 0),i([n()],T.prototype,"wasShowSelectedCheckedOnClose",void 0),i([u("disabled",{waitUntilFirstUpdate:!0})],T.prototype,"handleDisabledChange",null),i([u("value",{waitUntilFirstUpdate:!0})],T.prototype,"handleValueChange",null),i([u("data",{waitUntilFirstUpdate:!0})],T.prototype,"handleDataChange",null),i([u("renderItemConfig",{waitUntilFirstUpdate:!0})],T.prototype,"handleRenderItemConfigChange",null),i([u("optionsLoading",{waitUntilFirstUpdate:!0})],T.prototype,"handleOptionsLoadingChange",null),i([u("portal",{waitUntilFirstUpdate:!0})],T.prototype,"handlePortalAppendChange",null),i([u("open",{waitUntilFirstUpdate:!0})],T.prototype,"handleOpenChange",null),T=i([t("nile-virtual-select")],T),g("select.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),g("select.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});export{T as N,I as h};
|
|
302
|
+
`}getVirtualizedContent(){return _.getVirtualizedContent(this.data,this.searchEnabled,this.getDisplayText.bind(this),this.value,this.multiple,this.renderItemConfig?.getDisplayText,this.renderItemConfig?.getValue,this.renderItemConfig?.getDescription,this.renderItemConfig?.getPrefix,this.renderItemConfig?.getSuffix,this.showNoResults,this.noResultsMessage,this.optionsLoading||this.loading,this.handleScroll.bind(this),this.allowHtmlLabel,this.enableDescription,this.tickOnSelect,this.legacy)}nileInput(i){this.emit("nile-input",i)}nileChange(i){this.emit("nile-change",i)}updateValidity(){this.updateComplete.then((()=>{this.formControlController.updateValidity()}))}setupResizeObserver(){const i=this.autoResize&&(this.chipFittingEnabled||this.legacyTagFitEnabled)?this.shadowRoot?.querySelector(".select__tags")??void 0:void 0;if(i!==this.observedTagsContainer){if(this.observedTagsContainer&&(this.resizeController.unobserve(this.observedTagsContainer),this.observedTagsContainer=void 0),i)return this.resizeController.observe(i),void(this.observedTagsContainer=i);this.chipFittingEnabled||this.destroyChipFit()}else this.chipFittingEnabled||this.destroyChipFit()}calculateTotalWidthOfTags(){this.legacyTagFitEnabled?this.fitTagsLegacy():this.chipFittingEnabled&&(this.chipFitFrame&&cancelAnimationFrame(this.chipFitFrame),this.chipFitFrame=requestAnimationFrame((()=>{this.chipFitFrame=0,this.layoutChips()})))}calculateWidthOfSelectTagsDiv(){if(this.shadowRoot){const i=this.shadowRoot.querySelector(".select__tags");if(i){return i.offsetWidth-70}}return null}fitTagsLegacy(){this.maxOptionsVisible!==1/0&&(this.oldMaxOptionsVisible=this.maxOptionsVisible),this.setFittedMaxOptionsVisible(1/0),setTimeout((()=>{const i=[];if(this.shadowRoot){this.shadowRoot.querySelectorAll("nile-tag").forEach((s=>{s instanceof HTMLElement&&i.push(s.offsetWidth)}))}if(this.value.length!==i.length)return;const s=this.calculateWidthOfSelectTagsDiv();if(!s)return;let e=0,n=0;for(let o=0;o<i.length;o++)if(e+=i[o],e>s){n=o;break}this.setFittedMaxOptionsVisible(n)}),1)}allocateChipWidths(i,s){const e=this.chipMinWidth,n=this.chipMaxWidth;if(i.reduce(((i,s)=>i+s),0)<=s)return i.slice();if(!this.showTooltip)return null;const o=i.map((i=>Math.min(i,n)));if(o.reduce(((i,s)=>i+s),0)<=s)return o;const t=new Array(i.length).fill(0);let c=o.map(((i,s)=>s)),r=s;for(;0!==c.length;){const i=r/c.length,s=c.filter((s=>o[s]<=i));if(0===s.length)break;for(const i of s)t[i]=o[i],r-=o[i];c=c.filter((s=>o[s]>i))}if(c.length>0){const i=r/c.length;if(i<e)return null;const s=Math.floor(i);for(const i of c)t[i]=s}return t}computeChipFit(i,s,e,n){const o=i.length;if(0===o)return{visibleCount:0,widths:[],hiddenCount:0};for(let t=o;t>=1;t--){const c=o-t,r=s-(c>0?e+n:0)-n*(t-1);if(r<=0)continue;const l=this.allocateChipWidths(i.slice(0,t),r);if(l)return{visibleCount:t,widths:l,hiddenCount:c}}const t=s-e-n;return{visibleCount:1,widths:[Math.max(0,Math.min(i[0],this.showTooltip?Math.max(this.chipMinWidth,t):t))],hiddenCount:o-1}}layoutChips(){const i=this.shadowRoot;if(!i)return;const s=i.querySelector(".select__tags");if(!s)return;const e=Array.from(s.querySelectorAll("nile-tag"));if(0===e.length)return void(this.hiddenChipCount=0);const n=s.querySelector(".select__tags-count");for(const i of e)i.style.display="",i.style.width="auto",i.style.maxWidth="none",i.style.minWidth="0",i.style.flex="0 0 auto";const o=e.map((i=>Math.ceil(i.getBoundingClientRect().width))),t=n?Math.ceil(n.getBoundingClientRect().width):this.lastOverflowWidth;n&&(this.lastOverflowWidth=t);const c=getComputedStyle(s),r=parseFloat(c.columnGap||c.gap||"0")||0,l=this.computeChipFit(o,s.clientWidth,t,r);e.forEach(((i,s)=>{if(s<l.visibleCount){const e=Math.min(o[s],Math.max(l.widths[s],this.chipMinWidth));i.style.display="",i.style.width=`${e}px`,i.style.maxWidth=`${e}px`,i.style.flex="0 0 auto"}else i.style.display="none"})),this.lastChipLayout.hidden===l.hiddenCount&&this.lastChipLayout.visible===l.visibleCount||(this.lastChipLayout={hidden:l.hiddenCount,visible:l.visibleCount},this.hiddenChipCount=l.hiddenCount),this.refreshClippedChips()}labelOverflows(i){let s=1/0,e=-1/0;const n=document.createRange();for(const o of i.assignedNodes({flatten:!0})){let i;if(o.nodeType===Node.TEXT_NODE){if(!o.textContent?.trim())continue;n.selectNodeContents(o),i=n.getBoundingClientRect()}else{if(!(o instanceof Element))continue;i=o.getBoundingClientRect()}0!==i.width&&(s=Math.min(s,i.left),e=Math.max(e,i.right))}if(e<s)return!1;const o=i.getBoundingClientRect(),t=getComputedStyle(i),c=o.left+parseFloat(t.borderLeftWidth)+parseFloat(t.paddingLeft),r=1/64;return e>o.right-parseFloat(t.borderRightWidth)-parseFloat(t.paddingRight)+r||s<c-r}isChipClipped(i){if(!i)return!1;const s=i.shadowRoot;if(s){const i=s.querySelector('[part="content"]');if(i&&this.labelOverflows(i))return!0;const e=s.querySelector('[part="prefix_content_wrapper"]');if(e&&e.scrollWidth>e.clientWidth+1)return!0}return i.scrollWidth>i.clientWidth+1}refreshClippedChips(){if(!this.multiple)return;const i=this.shadowRoot;if(!i)return;const s=Array.from(i.querySelectorAll(".select__tags nile-tag")).map((i=>this.isChipClipped(i))),e=s.length===this.clippedChips.length&&s.every(((i,s)=>i===this.clippedChips[s]));e||(this.clippedChips=s)}scheduleClipCheck(){this.clipFrame&&cancelAnimationFrame(this.clipFrame),this.clipFrame=requestAnimationFrame((()=>{this.clipFrame=0,this.refreshClippedChips()}))}chipTooltipDisabled(i){return!this.showTooltip||!this.clippedChips[i]}destroyChipFit(){this.chipFitFrame&&cancelAnimationFrame(this.chipFitFrame),this.chipFitFrame=0,this.clipFrame&&cancelAnimationFrame(this.clipFrame),this.clipFrame=0,this.lastChipLayout={hidden:-1,visible:-1}}getChipLabel(i){return(i.getTextLabel?.()??"").trim()}handleChipKeyDown(i,s){if(i.key!==p.BACKSPACE&&i.key!==p.DELETE)return;if(this.disabled)return;i.preventDefault(),i.stopPropagation();const e=this.selectedOptions.indexOf(s);this.handleTagRemove(new CustomEvent("nile-remove"),s),this.restoreFocusAfterChipRemoval(e)}async restoreFocusAfterChipRemoval(i){if(i<0)return;await this.updateComplete,await new Promise((i=>requestAnimationFrame((()=>i()))));const s=Array.from(this.shadowRoot?.querySelectorAll(".select__tags nile-tag")??[]).filter((i=>"none"!==i.style.display)),e=s[i]??s[s.length-1];e?e.focus({preventScroll:!0}):this.displayInput?.focus({preventScroll:!0})}handleOverflowActivate(i){i.preventDefault(),i.stopPropagation(),this.disabled||(this.open=!this.open)}handleOverflowKeyDown(i){i.key!==p.ENTER&&i.key!==p.SPACE||this.handleOverflowActivate(i)}async resetScrollPosition(){await this.portalManager.resetScrollPosition()}};I.styles=c,i([e(".select")],I.prototype,"popup",void 0),i([e(".select__combobox")],I.prototype,"combobox",void 0),i([e(".select__display-input")],I.prototype,"displayInput",void 0),i([e(".select__value-input")],I.prototype,"valueInput",void 0),i([e(".virtualized")],I.prototype,"virtualizedContainer",void 0),i([n()],I.prototype,"hasFocus",void 0),i([n()],I.prototype,"displayLabel",void 0),i([n()],I.prototype,"selectedOptions",void 0),i([n()],I.prototype,"oldValue",void 0),i([o()],I.prototype,"name",void 0),i([o({type:Array})],I.prototype,"data",void 0),i([n()],I.prototype,"originalOptionItems",void 0),i([o({converter:{fromAttribute:i=>i.split(" "),toAttribute:i=>i.join(" ")}})],I.prototype,"value",void 0),i([a()],I.prototype,"defaultValue",void 0),i([o()],I.prototype,"size",void 0),i([o()],I.prototype,"placeholder",void 0),i([o({type:Boolean,attribute:!0,reflect:!0})],I.prototype,"autoResize",void 0),i([n()],I.prototype,"searchValue",void 0),i([o({type:Boolean,reflect:!0})],I.prototype,"searchEnabled",void 0),i([o({type:Boolean,reflect:!0,attribute:!0})],I.prototype,"enableVisibilityEffect",void 0),i([o({attribute:"internal-search-placeholder"})],I.prototype,"internalSearchPlaceHolder",void 0),i([o({type:Boolean,reflect:!0})],I.prototype,"disableLocalSearch",void 0),i([o({type:Boolean,reflect:!0})],I.prototype,"optionsLoading",void 0),i([o({type:Boolean,reflect:!0,attribute:!0})],I.prototype,"loading",void 0),i([o({type:Boolean,reflect:!0})],I.prototype,"multiple",void 0),i([o({attribute:"help-text",reflect:!0})],I.prototype,"helpText",void 0),i([o({attribute:"error-message",reflect:!0})],I.prototype,"errorMessage",void 0),i([o({type:Boolean})],I.prototype,"warning",void 0),i([o({type:Boolean})],I.prototype,"error",void 0),i([o({type:Boolean})],I.prototype,"success",void 0),i([o({type:Boolean,reflect:!0})],I.prototype,"disabled",void 0),i([o({type:Boolean,reflect:!0})],I.prototype,"clearable",void 0),i([o({type:Boolean,reflect:!0})],I.prototype,"open",void 0),i([o({type:Boolean})],I.prototype,"hoist",void 0),i([o({type:Boolean,reflect:!0})],I.prototype,"filled",void 0),i([o({type:Boolean,reflect:!0})],I.prototype,"pill",void 0),i([o()],I.prototype,"label",void 0),i([o({reflect:!0})],I.prototype,"placement",void 0),i([o({reflect:!0})],I.prototype,"form",void 0),i([o({type:Boolean,reflect:!0})],I.prototype,"required",void 0),i([o({type:Boolean})],I.prototype,"showNoResults",void 0),i([o({type:String})],I.prototype,"noResultsMessage",void 0),i([o({type:Boolean})],I.prototype,"showSelected",void 0),i([o({attribute:!1})],I.prototype,"renderItemConfig",void 0),i([o({type:Boolean,reflect:!0})],I.prototype,"blockValueChange",void 0),i([o({type:Boolean,reflect:!0})],I.prototype,"noWidthSync",void 0),i([o({type:Boolean,reflect:!0})],I.prototype,"portal",void 0),i([o({attribute:"max-options-visible",type:Number})],I.prototype,"maxOptionsVisible",null),i([o({type:Number,attribute:!0})],I.prototype,"chipMinWidth",void 0),i([o({type:Number,attribute:!0})],I.prototype,"chipMaxWidth",void 0),i([o({type:Boolean,attribute:!0,reflect:!0})],I.prototype,"showTooltip",void 0),i([n()],I.prototype,"hiddenChipCount",void 0),i([n()],I.prototype,"oldMaxOptionsVisible",void 0),i([n()],I.prototype,"clippedChips",void 0),i([o({type:Boolean,reflect:!0,attribute:!0})],I.prototype,"enableTabClose",void 0),i([o({type:Boolean,reflect:!0,attribute:!0})],I.prototype,"descriptionSearchEnabled",void 0),i([o({type:Boolean,reflect:!0,attribute:!0,converter:{fromAttribute:i=>"true"===i,toAttribute:i=>String(i)}})],I.prototype,"allowHtmlLabel",void 0),i([o({type:Boolean,reflect:!0,attribute:!0})],I.prototype,"enableDescription",void 0),i([o({type:Boolean,reflect:!0})],I.prototype,"legacy",void 0),i([o({type:Boolean,reflect:!0,attribute:!0})],I.prototype,"tickOnSelect",void 0),i([n()],I.prototype,"showListbox",void 0),i([n()],I.prototype,"wasShowSelectedCheckedOnClose",void 0),i([u("disabled",{waitUntilFirstUpdate:!0})],I.prototype,"handleDisabledChange",null),i([u("value",{waitUntilFirstUpdate:!0})],I.prototype,"handleValueChange",null),i([u("data",{waitUntilFirstUpdate:!0})],I.prototype,"handleDataChange",null),i([u("renderItemConfig",{waitUntilFirstUpdate:!0})],I.prototype,"handleRenderItemConfigChange",null),i([u("optionsLoading",{waitUntilFirstUpdate:!0})],I.prototype,"handleOptionsLoadingChange",null),i([u("portal",{waitUntilFirstUpdate:!0})],I.prototype,"handlePortalAppendChange",null),i([u("open",{waitUntilFirstUpdate:!0})],I.prototype,"handleOpenChange",null),I=i([t("nile-virtual-select")],I),g("select.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),g("select.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});export{I as N,M as h};
|
|
@@ -327,8 +327,8 @@ describe('nile-side-bar in the shell track', () => {
|
|
|
327
327
|
});
|
|
328
328
|
});
|
|
329
329
|
/*
|
|
330
|
-
* The HTML API, driven from markup. pageTitle,
|
|
331
|
-
* and panelBackLabel
|
|
330
|
+
* The HTML API, driven from markup. pageTitle, headerBack, headerBackLabel,
|
|
331
|
+
* noTabs, panelBack and panelBackLabel declare no kebab `attribute:` option, so Lit
|
|
332
332
|
* observes the lowercased property name (pagetitle, notabs, ...) and markup
|
|
333
333
|
* writes them camelCase — HTML lowercases `pageTitle=` to match.
|
|
334
334
|
*
|
|
@@ -344,8 +344,8 @@ describe('nile-app-shell — the attributes the docs advertise', () => {
|
|
|
344
344
|
<nile-app-shell
|
|
345
345
|
style="width: 1440px; height: 600px;"
|
|
346
346
|
pageTitle="Applications"
|
|
347
|
-
|
|
348
|
-
|
|
347
|
+
headerBack
|
|
348
|
+
headerBackLabel="Integrations"
|
|
349
349
|
noTabs
|
|
350
350
|
panelBack
|
|
351
351
|
panelBackLabel="Chat history"
|
|
@@ -361,7 +361,8 @@ describe('nile-app-shell — the attributes the docs advertise', () => {
|
|
|
361
361
|
await el.updateComplete;
|
|
362
362
|
// Each attribute reached its property.
|
|
363
363
|
expect(el.pageTitle, 'pageTitle').to.equal('Applications');
|
|
364
|
-
expect(el.
|
|
364
|
+
expect(el.headerBack, 'headerBack').to.be.true;
|
|
365
|
+
expect(el.headerBackLabel, 'headerBackLabel').to.equal('Integrations');
|
|
365
366
|
expect(el.noTabs, 'noTabs').to.be.true;
|
|
366
367
|
expect(el.panelBack, 'panelBack').to.be.true;
|
|
367
368
|
expect(el.panelBackLabel, 'panelBackLabel').to.equal('Chat history');
|
|
@@ -372,7 +373,10 @@ describe('nile-app-shell — the attributes the docs advertise', () => {
|
|
|
372
373
|
// The reflecting pair round-trip to the lowercased name, not to kebab.
|
|
373
374
|
expect(el.hasAttribute('notabs')).to.be.true;
|
|
374
375
|
expect(el.hasAttribute('panelback')).to.be.true;
|
|
376
|
+
expect(el.hasAttribute('headerback')).to.be.true;
|
|
377
|
+
expect(el.getAttribute('headerbacklabel')).to.equal('Integrations');
|
|
375
378
|
expect(el.hasAttribute('no-tabs')).to.be.false;
|
|
379
|
+
expect(el.hasAttribute('header-back')).to.be.false;
|
|
376
380
|
el.noTabs = false;
|
|
377
381
|
el.panelBack = false;
|
|
378
382
|
await el.updateComplete;
|