@nanoporetech-digital/components 6.5.0 → 6.5.2

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.
Files changed (79) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/cjs/nano-alert.cjs.entry.js +7 -5
  3. package/dist/cjs/nano-alert.cjs.entry.js.map +1 -1
  4. package/dist/cjs/nano-details.cjs.entry.js +2 -1
  5. package/dist/cjs/nano-details.cjs.entry.js.map +1 -1
  6. package/dist/cjs/nano-global-nav-user-profile_3.cjs.entry.js.map +1 -1
  7. package/dist/cjs/nano-global-nav.cjs.entry.js +5 -5
  8. package/dist/cjs/nano-global-nav.cjs.entry.js.map +1 -1
  9. package/dist/cjs/nano-icon.cjs.entry.js +8 -6
  10. package/dist/cjs/nano-icon.cjs.entry.js.map +1 -1
  11. package/dist/cjs/nano-tab-group.cjs.entry.js +2 -2
  12. package/dist/cjs/nano-tab-group.cjs.entry.js.map +1 -1
  13. package/dist/cjs/{nano-table-ce2198d9.js → nano-table-db8dd197.js} +2 -2
  14. package/dist/cjs/{nano-table-ce2198d9.js.map → nano-table-db8dd197.js.map} +1 -1
  15. package/dist/cjs/nano-table.cjs.entry.js +1 -1
  16. package/dist/cjs/{table.worker-51ca909b.js → table.worker-f803c24b.js} +2 -2
  17. package/dist/cjs/table.worker-f803c24b.js.map +1 -0
  18. package/dist/collection/components/alert/alert.css +1 -1
  19. package/dist/collection/components/alert/alert.js +9 -3
  20. package/dist/collection/components/alert/alert.js.map +1 -1
  21. package/dist/collection/components/details/details.js +2 -1
  22. package/dist/collection/components/details/details.js.map +1 -1
  23. package/dist/collection/components/global-nav/global-nav.js +5 -5
  24. package/dist/collection/components/global-nav/global-nav.js.map +1 -1
  25. package/dist/collection/components/icon/icon.js +8 -6
  26. package/dist/collection/components/icon/icon.js.map +1 -1
  27. package/dist/collection/components/select/select.js.map +1 -1
  28. package/dist/collection/components/tabs/tab-group.js +2 -2
  29. package/dist/collection/components/tabs/tab-group.js.map +1 -1
  30. package/dist/components/icon.js +8 -6
  31. package/dist/components/icon.js.map +1 -1
  32. package/dist/components/nano-alert.js +10 -4
  33. package/dist/components/nano-alert.js.map +1 -1
  34. package/dist/components/nano-details.js +2 -1
  35. package/dist/components/nano-details.js.map +1 -1
  36. package/dist/components/nano-global-nav.js +5 -5
  37. package/dist/components/nano-global-nav.js.map +1 -1
  38. package/dist/components/nano-tab-group.js +2 -2
  39. package/dist/components/nano-tab-group.js.map +1 -1
  40. package/dist/components/select.js.map +1 -1
  41. package/dist/esm/nano-alert.entry.js +7 -5
  42. package/dist/esm/nano-alert.entry.js.map +1 -1
  43. package/dist/esm/nano-details.entry.js +2 -1
  44. package/dist/esm/nano-details.entry.js.map +1 -1
  45. package/dist/esm/nano-global-nav-user-profile_3.entry.js.map +1 -1
  46. package/dist/esm/nano-global-nav.entry.js +5 -5
  47. package/dist/esm/nano-global-nav.entry.js.map +1 -1
  48. package/dist/esm/nano-icon.entry.js +8 -6
  49. package/dist/esm/nano-icon.entry.js.map +1 -1
  50. package/dist/esm/nano-tab-group.entry.js +2 -2
  51. package/dist/esm/nano-tab-group.entry.js.map +1 -1
  52. package/dist/esm/{nano-table-d94e7ffe.js → nano-table-87772a47.js} +2 -2
  53. package/dist/esm/{nano-table-d94e7ffe.js.map → nano-table-87772a47.js.map} +1 -1
  54. package/dist/esm/nano-table.entry.js +1 -1
  55. package/dist/esm/{table.worker-5695a02c.js → table.worker-4d3873a7.js} +2 -2
  56. package/dist/esm/table.worker-4d3873a7.js.map +1 -0
  57. package/dist/nano-components/nano-alert.entry.js +1 -1
  58. package/dist/nano-components/nano-alert.entry.js.map +1 -1
  59. package/dist/nano-components/nano-details.entry.js +1 -1
  60. package/dist/nano-components/nano-details.entry.js.map +1 -1
  61. package/dist/nano-components/nano-global-nav-user-profile_3.entry.js.map +1 -1
  62. package/dist/nano-components/nano-global-nav.entry.js +1 -1
  63. package/dist/nano-components/nano-global-nav.entry.js.map +1 -1
  64. package/dist/nano-components/nano-icon.entry.js +1 -1
  65. package/dist/nano-components/nano-icon.entry.js.map +1 -1
  66. package/dist/nano-components/nano-tab-group.entry.js +1 -1
  67. package/dist/nano-components/nano-tab-group.entry.js.map +1 -1
  68. package/dist/nano-components/nano-table-87772a47.js +5 -0
  69. package/dist/nano-components/{nano-table-d94e7ffe.js.map → nano-table-87772a47.js.map} +1 -1
  70. package/dist/nano-components/nano-table.entry.js +1 -1
  71. package/dist/nano-components/table.worker-4d3873a7.js +5 -0
  72. package/docs-json.json +1 -1
  73. package/hydrate/index.js +19 -17
  74. package/package.json +2 -2
  75. package/dist/cjs/table.worker-51ca909b.js.map +0 -1
  76. package/dist/esm/table.worker-5695a02c.js.map +0 -1
  77. package/dist/nano-components/nano-table-d94e7ffe.js +0 -5
  78. package/dist/nano-components/table.worker-5695a02c.js +0 -5
  79. /package/dist/nano-components/{table.worker-5695a02c.js.map → table.worker-4d3873a7.js.map} +0 -0
@@ -432,10 +432,10 @@ const TabGroup = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
432
432
  }, onClick: this.handleClick, onKeyDown: this.handleKeyDown }, h("div", { class: "nano-tab-group__nav-container", part: "nav" }, this.placement === 'top' && (h("button", { disabled: !this.hasScrollControls, class: {
433
433
  'nano-tab-group__scroll-button': true,
434
434
  'nano-tab-group__scroll-button--left': true,
435
- }, ref: (btn) => (this.leftBtn = btn), onClick: () => this.handleBtnClick(false) }, h("nano-icon", { name: "light/chevron-left" }))), h("div", { ref: (el) => (this.nav = el), class: "nano-tab-group__nav", onScroll: this.handleTabScroll }, h("div", { ref: (el) => (this.tabs = el), part: "tabs", class: "nano-tab-group__tabs", role: "tablist", "aria-orientation": this.placement === 'start' ? 'vertical' : 'horizontal' }, h("div", { ref: (el) => (this.activeTabIndicator = el), part: "active-tab-indicator", class: "nano-tab-group__active-tab-indicator" }), h("slot", { name: "tabs", onSlotchange: this.handleTabSlotChange }))), this.placement === 'top' && (h("button", { disabled: !this.hasScrollControls, class: {
435
+ }, ref: (btn) => (this.leftBtn = btn), onClick: () => this.handleBtnClick(false) }, h("nano-icon", { name: "light/chevron-left", ariaLabel: "Scroll tabs towards the start" }))), h("div", { ref: (el) => (this.nav = el), class: "nano-tab-group__nav", onScroll: this.handleTabScroll }, h("div", { ref: (el) => (this.tabs = el), part: "tabs", class: "nano-tab-group__tabs", role: "tablist", "aria-orientation": this.placement === 'start' ? 'vertical' : 'horizontal' }, h("div", { ref: (el) => (this.activeTabIndicator = el), part: "active-tab-indicator", class: "nano-tab-group__active-tab-indicator" }), h("slot", { name: "tabs", onSlotchange: this.handleTabSlotChange }))), this.placement === 'top' && (h("button", { disabled: !this.hasScrollControls, class: {
436
436
  'nano-tab-group__scroll-button': true,
437
437
  'nano-tab-group__scroll-button--right': true,
438
- }, ref: (btn) => (this.rightBtn = btn), onClick: () => this.handleBtnClick(true) }, h("nano-icon", { name: "light/chevron-right" })))), h("slot", { name: "tab-content-header" }), h("div", { part: "body", class: "nano-tab-group__body", onTouchStart: this.handleTouchStart, onTouchEnd: this.handleTouchEnd }, h("slot", { onSlotchange: this.handleContentSlotChange })))));
438
+ }, ref: (btn) => (this.rightBtn = btn), onClick: () => this.handleBtnClick(true) }, h("nano-icon", { name: "light/chevron-right", ariaLabel: "Scroll tabs towards the end" })))), h("slot", { name: "tab-content-header" }), h("div", { part: "body", class: "nano-tab-group__body", onTouchStart: this.handleTouchStart, onTouchEnd: this.handleTouchEnd }, h("slot", { onSlotchange: this.handleContentSlotChange })))));
439
439
  }
440
440
  get host() { return this; }
441
441
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"nano-tab-group.js","mappings":";;;;;;;;;;;AAAA,MAAM,WAAW,GAAG,ouNAAouN;;AC0BxvN,IAAI,EAAE,GAAG,CAAC,CAAC;MAyBE,QAAQ;;;;;;;;;IACX,WAAM,GAAG,kBAAkB,EAAE,EAAE,EAAE,CAAC;IAUlC,kBAAa,GAAW,IAAI,CAAC;IAC7B,kBAAa,GAAW,IAAI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IAExC,iBAAW,IAAI,EAAC,qBAAqB,GAAa,CAC3C,CACV,CACG,EACN,YAAM,IAAI,EAAC,oBAAoB,GAAG,EAClC,WACE,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,sBAAsB,EAC5B,YAAY,EAAE,IAAI,CAAC,gBAAgB,EACnC,UAAU,EAAE,IAAI,CAAC,cAAc,IAE/B,YAAM,YAAY,EAAE,IAAI,CAAC,uBAAuB,GAAI,CAChD,CACF,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/tabs/tab-group.scss?tag=nano-tab-group&encapsulation=shadow","./src/components/tabs/tab-group.tsx"],"sourcesContent":["@use 'sass:map';\n@use 'sass:list';\n\n@import '../../global/style/utilities/globals';\n@import '../../global/style/nano-theme/form';\n@import '../../global/style/nano-theme/base';\n@import '../../global/style/nano-theme/layers';\n\n/**\n * @prop --indicator-transition: Only relevant to placement 'start'. defaults to #{$transition-fast};\n * @prop --indicator-color: defaults to #{map.get($colors, lightblue)} on placement 'top' and #{map.get($colors, blue)} on placement 'start';\n * @prop --indicator-track-color: Only relevant to placement 'start'. defaults to #{map.get($colors, lightgrey)};\n * @prop --indicator-size: defaults to 5px on placement 'top' and 2px on placement 'start';\n\n * @prop --border-radius: defaults to #{$layer-border-radius};\n * @prop --background-rgb: will be used as the default background colour for tabs and content. defaults to #{$layer-bg-color-rgb};\n * @prop --shadow-opacity: opacity of the shadow behind tabs. defaults to 0.1;\n * @prop --scroll-btn-color: defaults to 'currentcolor';\n\n * @prop --content-padding: defaults to 2rem 2.5rem;\n * @prop --content-bg: defaults to rgb(var(--background-rgb));\n * @prop --content-border-radius: defaults to `var(--border-radius)` `position=\"top\"`. `0 var(--border-radius) var(--border-radius) 0` `position=\"start\"`;\n\n * @prop --tabs-padding-start: defaults to 2.5rem on placement 'top' and 0 on placement 'start';\n * @prop --tabs-padding-end: defaults to 2.5rem on placement 'top' and 0 on placement 'start';\n * @prop --tabs-padding-top: defaults to 0;\n * @prop --tabs-padding-bottom: defaults to 0;\n * @prop --tabs-bg-rgb: defaults to var(--bg-color);\n * @prop --tab-border-radius: defaults to `var(--border-radius) var(--border-radius) 0 0` `position=\"top\"`. `0` `position=\"start\"`. ;\n * @prop --tab-text-color: defaults to #{map.get($colors, blue)} on placement 'top' and #{map.get($colors, darkgrey)} on placement 'start';\n * @prop --fade-transparency: controls the strength of the fade on overflowing tabs, defaults to 0;\n */\n\n:host {\n --indicator-transition: #{$transition-fast};\n --indicator-color: #{map.get($colors, lightblue)};\n --indicator-track-color: #{map.get($colors, lightgrey)};\n --indicator-size: 0;\n --border-radius: #{$layer-border-radius};\n --background-rgb: #{$layer-bg-color-rgb};\n --scroll-btn-color: 'currentColor';\n --content-padding: 2rem 2.5rem;\n --content-bg: rgb(var(--background-rgb));\n --content-border-radius: var(--border-radius);\n --tabs-padding-start: 2.5rem;\n --tabs-padding-end: 2.5rem;\n --tabs-padding-top: 0;\n --tabs-padding-bottom: 0;\n --tabs-container-bg: 'transparent';\n --tabs-bg-rgb: var(--background-rgb);\n --tab-border-radius: var(--border-radius) var(--border-radius) 0 0;\n --tab-text-color: #{map.get($colors, blue)};\n --shadow-opacity: 0.1;\n --fade-transparency: 0;\n\n display: block;\n position: relative;\n z-index: #{$layer-index-raised};\n\n @media only screen and (max-width: 768px) {\n --tabs-padding-start: 1.5rem;\n --tabs-padding-end: 1.5rem;\n }\n\n ::slotted(nano-tab) {\n --tab-indicator-color: var(--indicator-color);\n --bg-rgb: var(--tabs-bg-rgb);\n --border-radius: var(--tab-border-radius);\n --grab-offset-x: var(--tabs-padding-start);\n }\n}\n\n:host([placement='start']) {\n --content-border-radius: 0 var(--border-radius) var(--border-radius) 0;\n --content-padding: 1rem;\n --tab-border-radius: 0;\n --tabs-padding-start: 0;\n --tabs-padding-end: 0;\n --tabs-padding-top: 0;\n --tabs-padding-bottom: 0;\n --tab-text-color: #{map.get($colors, darkgrey)};\n --indicator-color: #{map.get($colors, blue)};\n --indicator-size: 2px;\n}\n\n:host(.nano-color) {\n --indicator-color: var(--nano-color-tint, #{nano-color(primary, tint)});\n --tab-text-color: rgb(var(--nano-color-base-rgb) / 70%);\n\n ::slotted(nano-tab) {\n --active-text-color: var(--nano-color-shade, #{nano-color(primary, shade)});\n }\n}\n\n.nano-tab-group {\n display: flex;\n border-radius: 0;\n inline-size: 100%;\n flex: inherit;\n\n &__tabs {\n display: flex;\n position: relative;\n inline-size: 100%;\n }\n\n &__active-tab-indicator {\n position: absolute;\n transition:\n var(--indicator-transition) transform ease,\n var(--indicator-transition) width ease;\n }\n\n &__body {\n background: var(--content-bg);\n }\n\n .nano-tab-group__nav-container {\n position: relative;\n display: flex;\n background: var(--tabs-container-bg);\n }\n\n button {\n appearance: none;\n background-color: transparent;\n }\n\n &__scroll-button {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n inset-block: 0;\n border: unset;\n z-index: 2;\n transition: #{$transition-fast} ease opacity;\n opacity: 0;\n color: var(--scroll-btn-color);\n\n &:focus {\n outline: none;\n }\n\n &.is-shown {\n opacity: 1;\n }\n\n &:focus-visible {\n box-shadow: #{$control-focus-style} inset;\n }\n\n &--left {\n inset-inline-start: 0;\n }\n\n &--right {\n inset-inline-end: 0;\n }\n\n nano-icon {\n font-size: 16px;\n }\n }\n\n ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n // Top\n ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n &--top {\n flex-direction: column;\n\n .nano-tab-group__nav-container {\n &::after {\n content: '';\n inline-size: 86%;\n box-shadow: 0 10px 40px 10px rgb(0 0 0 / var(--shadow-opacity));\n block-size: 10px;\n position: absolute;\n inset-inline-start: 7%;\n inset-block-end: -10px;\n border-radius: 10px;\n z-index: -1;\n }\n }\n\n .nano-tab-group__nav {\n @include hide-scrollbar();\n\n padding-inline: var(--tabs-padding-start) var(--tabs-padding-end);\n padding-block: var(--tabs-padding-top) var(--tabs-padding-bottom);\n display: flex;\n overflow: auto hidden;\n transition: #{$transition-medium} ease;\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=');\n mask-repeat: no-repeat;\n mask-image:\n linear-gradient(\n to left,\n rgb(0 0 0 / var(--fade-transparency)) 0,\n rgb(0 0 0 / var(--fade-transparency)) var(--tabs-padding-start),\n rgb(0 0 0 / 100%) calc(var(--tabs-padding-start) * 2),\n rgb(0 0 0 / 100%) calc(100% - (var(--tabs-padding-end) * 2)),\n rgb(0 0 0 / var(--fade-transparency))\n calc(100% - var(--tabs-padding-end)),\n rgb(0 0 0 / var(--fade-transparency))\n );\n mask-size: calc(100% + calc(var(--tabs-padding-end) * 4));\n mask-position: calc(var(--tabs-padding-end) * -2);\n\n &::after {\n content: ' ';\n padding-inline: 0 var(--tabs-padding-end);\n padding-block: var(--tabs-padding-top) var(--tabs-padding-bottom);\n line-height: 1;\n flex: 0 0 auto;\n }\n }\n\n &.nano-tab-group--has-scroll-controls-left {\n .nano-tab-group__nav {\n mask-position: 0;\n mask-size: calc(100% + (var(--tabs-padding-end) * 2));\n }\n }\n\n &.nano-tab-group--has-scroll-controls-right {\n .nano-tab-group__nav {\n mask-position: calc(var(--tabs-padding-end) * -1);\n mask-size: calc(100% + var(--tabs-padding-end));\n }\n }\n\n &.nano-tab-group--has-scroll-controls-left.nano-tab-group--has-scroll-controls-right {\n .nano-tab-group__nav {\n mask-size: 100%;\n mask-position: 0;\n }\n }\n\n .nano-tab-group__tabs {\n flex: 1 1 auto;\n position: relative;\n flex-direction: row;\n text-align: center;\n color: var(--tab-text-color);\n inline-size: auto;\n }\n\n .nano-tab-group__active-tab-indicator {\n inset-block-end: -2px;\n border-block-end: solid var(--indicator-size) var(--indicator-color);\n }\n\n .nano-tab-group__body {\n order: 2;\n background: var(--content-bg);\n position: relative;\n overflow: hidden;\n inline-size: auto;\n display: flex;\n justify-content: center;\n padding: var(--content-padding);\n border-radius: var(--content-border-radius);\n flex: 1 1 auto;\n }\n }\n\n ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n // Start\n ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n &--start {\n flex-direction: row;\n\n .nano-tab-group__tabs {\n flex: 0 0 auto;\n flex-direction: column;\n color: var(--tab-text-color);\n background: rgb(var(--tabs-bg-rgb));\n border-inline-start:\n solid var(--indicator-size)\n var(--indicator-track-color);\n text-align: start;\n }\n\n .nano-tab-group__active-tab-indicator {\n inset-inline-start: calc(-1 * 2px);\n border-inline-start: solid var(--indicator-size) var(--indicator-color);\n }\n\n .nano-tab-group__body {\n flex: 1 1 auto;\n order: 2;\n padding: var(--content-padding);\n overflow: hidden;\n border-radius: var(--content-border-radius);\n }\n }\n}\n","import {\n Component,\n Element,\n ComponentInterface,\n Event,\n EventEmitter,\n Method,\n Prop,\n State,\n Watch,\n h,\n Host,\n Listen,\n Build,\n} from '@stencil/core';\n\nimport { getDirectChildren, getOffset } from '../../utils/dom';\nimport { scrollIntoView } from '../../utils/scroll';\nimport {\n ComponentStore,\n StorageMethods,\n} from '../../utils/store/component-store';\nimport { createColorClasses } from '../../utils/theme';\nimport { displayTransition } from '../../utils/transitions';\nimport type { Color } from '../../interface';\n\nlet id = 0;\n\n/**\n * A traditional tab implementation. It nests `nano-tab` and `nano-tab-content` sub-components.\n *\n * Tabs can be stacked vertically or horizontally (which presents different styling variations) using the `placement` attribute.\n * Horizontal tabs that don't fit will overflow and scroll appropriately.\n * Tab-content can also be swiped to change tabs.\n *\n * @slot tabs - Add `nano-tab` elements to add clickable tabs.\n * @slot tab-content-header - a header bar displayed above tab content.\n * @slot - Add `nano-tab-content` elements to add tabbable content.\n *\n * @part base - the main tab-group wrapper\n * @part nav - the bar surrounding all the tabs and nav buttons\n * @part tabs - the wrapper around the `nano-tab` components\n * @part active-tab-indicator - the active indicator line\n * @part body - the wrapper around the `nano-tab-content` components\n */\n\n@Component({\n tag: 'nano-tab-group',\n styleUrl: 'tab-group.scss',\n shadow: true,\n})\nexport class TabGroup implements ComponentInterface {\n private baseId = `nano-tab-group-${++id}`;\n private activeTab: HTMLNanoTabElement;\n private activePanel: HTMLNanoTabContentElement;\n private activeTabIndicator: HTMLElement;\n private nav: HTMLElement;\n private tabs: HTMLElement;\n private rightBtn: HTMLButtonElement;\n private leftBtn: HTMLButtonElement;\n\n private isRtl: boolean;\n private initialTouchX: number = null;\n private initialTouchY: number = null;\n\n private resizeObserver: ResizeObserver;\n private mutationObservers: WeakMap<Node, MutationObserver> = new WeakMap();\n\n @Element() host: HTMLNanoTabGroupElement;\n\n @State() hasScrollControls = false;\n @State() hideControlRight = true;\n @State() hideControlLeft = true;\n @State() tab: string;\n\n /**\n * The placement of the tabs.\n */\n @Prop({ reflect: true }) placement: 'top' | 'start' = 'top';\n\n /**\n * Disables the scroll arrows that appear when tabs overflow.\n */\n @Prop() noScrollControls = false;\n\n /**\n * The color to use from the application's color palette.\n */\n @Prop() color?: Color;\n\n /**\n * Store the currently open tab (against this ID) in the component store.\n * Use in conjunction with storeMethod\n */\n @Prop() storeId?: string;\n\n /**\n * The method of storage.\n * Either session storage, url hash (after the '#') or url query (after the '?').\n */\n @Prop() storeMethod: StorageMethods = 'session';\n\n /**\n * Disable 'swipe to change tab' on devices with touch\n */\n @Prop() disableSwipe: boolean;\n\n @Watch('tab')\n handleTabNameChange() {\n if (this.activeTab && this.activeTab.panel === this.tab) return;\n const tab = this.getAllActiveTabs.find((el) => el.panel === this.tab);\n this.setActiveTab(tab);\n }\n\n @Watch('placement')\n handlePlacementChange() {\n this.syncActiveTabIndicator();\n }\n\n @Watch('noScrollControls')\n handleNoScrollControlsChange() {\n this.updateScrollControls();\n }\n\n @Watch('hideControlRight')\n hideRightBtn() {\n if (!this.rightBtn) return;\n displayTransition(this.rightBtn, {\n className: 'is-shown',\n show: !this.hideControlRight,\n });\n }\n\n @Watch('hideControlLeft')\n hideLeftBtn() {\n if (!this.leftBtn) return;\n displayTransition(this.leftBtn, {\n className: 'is-shown',\n show: !this.hideControlLeft,\n });\n }\n\n @Watch('hasScrollControls')\n watchScrollControls() {\n if (this.hasScrollControls) setTimeout((_) => this.handleTabScroll(), 20);\n else\n setTimeout((_) => {\n this.hideControlLeft = this.hideControlRight = true;\n }, 20);\n }\n\n /** Emitted when a tab is shown. */\n @Event() nanoTabShow: EventEmitter<{ name: string }>;\n\n /** Emitted when a tab is hidden. */\n @Event() nanoTabHide: EventEmitter<{ name: string }>;\n\n /** Emitted when the tab is closable and the close button is activated. */\n @Event() nanoTabWillClose: EventEmitter<{ name: string }>;\n\n /** Emitted when a closable tab is removed. */\n @Event() nanoTabClose: EventEmitter<{ name: string }>;\n\n /** Shows the specified tab panel. */\n @Method()\n async show(panel: string) {\n if (this.activeTab && this.activeTab.panel === panel) return;\n\n const tab = this.getAllActiveTabs.find((el) => el.panel === panel);\n\n if (tab) this.setActiveTab(tab);\n }\n\n // Internal Methods\n\n get getAllActiveTabs() {\n return this.getAllTabs.filter((el: any) => !el.disabled);\n }\n\n get getAllTabs() {\n return getDirectChildren<HTMLNanoTabElement>(this.host, 'nano-tab');\n }\n\n get getAllPanels() {\n return getDirectChildren<HTMLNanoTabContentElement>(\n this.host,\n 'nano-tab-content'\n );\n }\n\n get getActiveTab() {\n return this.getAllActiveTabs.find((el) => el.active);\n }\n\n private updateScrollControls = () => {\n if (this.noScrollControls) {\n this.hasScrollControls = false;\n } else {\n this.hasScrollControls =\n ['top'].includes(this.placement) &&\n this.nav.scrollWidth > this.nav.clientWidth &&\n this.nav.scrollWidth > this.tabs.clientWidth;\n }\n };\n\n private setActiveTab(tab: HTMLNanoTabElement, emitEvents = true) {\n if (\n tab &&\n tab !== this.activeTab &&\n !tab.disabled &&\n this.getAllActiveTabs.includes(tab)\n ) {\n const previousTab = this.activeTab;\n this.activeTab = tab;\n this.tab = tab.panel;\n\n // Sync tabs and panels\n this.getAllActiveTabs.map((el) => (el.active = el === this.activeTab));\n this.getAllPanels.map((el) => {\n if (el.name === this.activeTab.panel) {\n el.active = true;\n this.activePanel = el;\n } else el.active = false;\n el.removeAttribute('animation-dir');\n });\n\n this.syncActiveTabIndicator();\n\n // active tab can be changed on init - this won't be ready. No big thing\n if (this.nav && ['top'].includes(this.placement)) {\n scrollIntoView(this.activeTab, this.nav, 'horizontal', 'center');\n }\n\n // Emit events\n if (emitEvents) {\n if (previousTab) {\n this.nanoTabHide.emit({ name: previousTab.panel });\n }\n\n this.nanoTabShow.emit({ name: this.activeTab.panel });\n }\n }\n }\n\n private setAriaLabels() {\n const tabs = this.getAllActiveTabs;\n const panels = this.getAllPanels;\n\n // Link each tab with its corresponding panel\n tabs.map((tab, i) => {\n const panel = panels.find((el) => el.name === tab.panel);\n if (panel) {\n if (!panel.id) panel.id = `${this.baseId}-panel-${i}`;\n if (!tab.id) tab.id = `${this.baseId}-tab-${i}`;\n\n tab.setAttribute('aria-controls', panel.id);\n panel.setAttribute('aria-labelledby', tab.id);\n }\n });\n }\n\n private syncActiveTabIndicator() {\n this.getAllTabs.forEach((tab) =>\n tab.setAttribute(\n 'direction',\n this.placement === 'top' ? 'horizontal' : 'vertical'\n )\n );\n\n const tab = this.getActiveTab;\n if (!tab) return;\n\n const width = tab.shadowRoot.querySelector('.nanotab')?.clientWidth || 0;\n const height = tab.clientHeight;\n const offset = getOffset(tab, this.tabs);\n\n if (!this.activeTabIndicator) return;\n\n const offsetTop = offset.top + this.nav.scrollTop;\n const offsetLeft = offset.left;\n\n switch (this.placement) {\n case 'top':\n this.activeTabIndicator.style.width = `${width}px`;\n this.activeTabIndicator.style.height = null;\n this.activeTabIndicator.style.transform = `translateX(${offsetLeft}px)`;\n break;\n\n case 'start':\n this.activeTabIndicator.style.width = null;\n this.activeTabIndicator.style.height = `${height}px`;\n this.activeTabIndicator.style.transform = `translateY(${offsetTop}px)`;\n break;\n }\n }\n\n private getNavWidth() {\n if (!this.nav) return 0;\n const computedStyle = getComputedStyle(this.nav);\n let clientWidth = this.nav.clientWidth;\n return (clientWidth -=\n parseFloat(computedStyle.paddingLeft) +\n parseFloat(computedStyle.paddingRight));\n }\n\n // Event handlers\n\n @Listen('nanoTabClose')\n handleTabClose(ev: CustomEvent & { target: HTMLNanoTabElement }) {\n let tabIndex = this.getAllActiveTabs.indexOf(ev.target);\n const tab = ev.target;\n if (tabIndex < 0) return;\n\n const panel = this.getAllPanels.find((el) => el.name === tab.panel);\n if (!panel) return;\n\n ev.stopImmediatePropagation();\n\n const closeEv = this.nanoTabWillClose.emit({ name: tab.panel });\n if (closeEv.defaultPrevented) return;\n\n // Show the previous tab if the tab is currently active\n if (tab.active) {\n tabIndex = tabIndex === 0 ? 1 : tabIndex - 1;\n const prevTab = this.getAllActiveTabs[tabIndex]?.panel;\n if (prevTab) this.host.show(prevTab);\n }\n\n tab.remove();\n panel.remove();\n this.nanoTabClose.emit({ name: tab.panel });\n }\n\n private handleClick = (event: MouseEvent) => {\n const target = event.target as HTMLElement;\n const tab = target.closest('nano-tab');\n\n if (tab) this.setActiveTab(tab);\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n const activeEl = document.activeElement as any;\n if (!activeEl || activeEl.tagName.toLowerCase() !== 'nano-tab') return;\n\n // Activate a tab\n if (['Enter', ' '].includes(event.key)) {\n const target = event.target as HTMLElement;\n const tab = target.closest('nano-tab');\n\n if (tab) {\n this.setActiveTab(tab);\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n // Move focus left or right\n if (\n ![\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'ArrowDown',\n 'Home',\n 'End',\n ].includes(event.key)\n )\n return;\n\n const tabs = this.getAllActiveTabs;\n let index = tabs.indexOf(activeEl);\n\n if (event.key === 'Home') index = 0;\n if (event.key === 'End') index = tabs.length - 1;\n\n if (this.placement === 'top') {\n if (\n (this.isRtl && event.key === 'ArrowRight') ||\n (!this.isRtl && event.key === 'ArrowLeft')\n ) {\n index = Math.max(0, index - 1);\n }\n if (\n (this.isRtl && event.key === 'ArrowLeft') ||\n (!this.isRtl && event.key === 'ArrowRight')\n ) {\n index = Math.min(tabs.length - 1, index + 1);\n }\n }\n\n if (this.placement === 'start') {\n if (event.key === 'ArrowUp') index = Math.max(0, index - 1);\n if (event.key === 'ArrowDown')\n index = Math.min(tabs.length - 1, index + 1);\n }\n\n tabs[index].setFocus();\n\n if (this.placement === 'top') {\n scrollIntoView(tabs[index], this.nav, 'horizontal', 'center');\n }\n // need to stop bubbling otherwise it will focus on parent tabs if nested\n event.stopPropagation();\n // stop the browser moving about\n event.preventDefault();\n };\n\n private handleTabScroll = () => {\n if (!this.hasScrollControls) {\n this.hideControlLeft = this.hideControlRight = true;\n return;\n }\n const endRight = this.isRtl\n ? this.nav.scrollLeft === 0\n : this.nav.scrollWidth - this.nav.scrollLeft === this.nav.clientWidth;\n const endLeft = this.isRtl\n ? this.nav.scrollWidth + this.nav.scrollLeft === this.nav.clientWidth\n : this.nav.scrollLeft === 0;\n\n if (endLeft) {\n this.hideControlLeft = true;\n this.hideControlRight = false;\n } else if (endRight) {\n this.hideControlLeft = false;\n this.hideControlRight = true;\n } else {\n this.hideControlRight = false;\n this.hideControlLeft = false;\n }\n };\n\n private handleBtnClick = (goRight: boolean = false) => {\n const navWidth = this.getNavWidth();\n let leftAmt;\n if (goRight) leftAmt = this.nav.scrollLeft + navWidth - 20;\n else leftAmt = this.nav.scrollLeft - navWidth + 20;\n\n try {\n this.nav.scroll({\n left: leftAmt,\n behavior: 'smooth',\n });\n } catch (e) {\n this.nav.scrollLeft = leftAmt;\n }\n };\n\n private handleTouchStart = (event: TouchEvent) => {\n if (this.disableSwipe) return;\n const touch = event.changedTouches[0];\n this.initialTouchX = touch.pageX;\n this.initialTouchY = touch.pageY;\n };\n\n private handleTouchEnd = (event: TouchEvent) => {\n if (this.disableSwipe) return;\n const touch = event.changedTouches[0];\n const distX = touch.pageX - this.initialTouchX; // get horizontal dist travelled\n const threshold = 70;\n\n const xDiff = this.initialTouchX - touch.clientX;\n const yDiff = this.initialTouchY - touch.clientY;\n\n const isHorizontalSwipe =\n Math.abs(distX) >= threshold && Math.abs(yDiff) <= 50;\n\n const tabs = this.getAllActiveTabs;\n const currIndex = tabs.findIndex((el) => el.active);\n\n if (isHorizontalSwipe) {\n const toGo =\n (distX < 0 && this.placement === 'top') ||\n (distX > 0 && this.placement !== 'top')\n ? 1\n : -1;\n\n if (tabs[currIndex + toGo]) {\n this.setActiveTab(tabs[currIndex + toGo]);\n\n if (Math.abs(xDiff) > Math.abs(yDiff)) {\n if (xDiff > 0) this.activePanel.setAttribute('animation-dir', 'left');\n else this.activePanel.setAttribute('animation-dir', 'right');\n }\n }\n }\n this.initialTouchX = null;\n this.initialTouchY = null;\n };\n\n private handleContentSlotChange = () => {\n setTimeout(() => {\n this.setAriaLabels();\n this.setActiveTab(this.getActiveTab || this.getAllActiveTabs[0], false);\n });\n };\n\n private handleTabSlotChange = (ev: Event & { target: HTMLSlotElement }) => {\n setTimeout(() => {\n this.setAriaLabels();\n this.handleTabScroll();\n this.setActiveTab(this.getActiveTab || this.getAllActiveTabs[0], false);\n this.updateScrollControls();\n }, 500);\n\n /** maintain a weakmap of mutation observers to maintain tab / indicator position on all changes. */\n const nodes = ev.target.assignedElements({ flatten: true });\n nodes.forEach((node) => {\n if (!this.mutationObservers.get(node)) {\n const mo = new MutationObserver(() => {\n setTimeout(() => {\n this.syncActiveTabIndicator();\n this.handleTabScroll();\n this.updateScrollControls();\n }, 500);\n });\n this.mutationObservers.set(node, mo);\n\n mo.observe(node, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n }\n });\n };\n\n // Stencil hooks\n\n componentDidLoad() {\n // Initial IO - watching for all content to be loaded\n const observer = new IntersectionObserver((entries, observer) => {\n if (entries[0].intersectionRatio > 0) {\n this.setAriaLabels();\n this.setActiveTab(this.getActiveTab || this.getAllActiveTabs[0], false);\n\n if (this.storeId)\n ComponentStore.init(this, ['tab'], this.storeMethod, this.storeId);\n observer.unobserve(entries[0].target);\n }\n });\n observer.observe(this.host);\n\n requestAnimationFrame(() => this.updateScrollControls());\n\n if (!window['ResizeObserver']) return;\n\n this.resizeObserver = new ResizeObserver(() => {\n setTimeout(() => {\n this.updateScrollControls();\n this.syncActiveTabIndicator();\n scrollIntoView(this.activeTab, this.nav, 'horizontal', 'center');\n }, 500);\n });\n this.resizeObserver.observe(this.nav);\n }\n\n connectedCallback() {\n this.isRtl =\n this.host.dir === 'rtl' ||\n (this.host.ownerDocument as Document).dir === 'rtl';\n\n if (Build.isServer) {\n this.setActiveTab(this.getActiveTab || this.getAllActiveTabs[0], false);\n this.setAriaLabels();\n }\n }\n\n disconnectedCallback() {\n if (this.resizeObserver) this.resizeObserver.unobserve(this.nav);\n }\n\n render() {\n this.isRtl = (this.host.ownerDocument as Document).dir === 'rtl';\n\n return (\n <Host\n class={{ ...createColorClasses(this.color) }}\n dir={this.isRtl ? 'rtl' : null}\n >\n <div\n part=\"base\"\n class={{\n 'nano-tab-group': true,\n 'nano-tab-group--top': this.placement === 'top',\n 'nano-tab-group--start': this.placement === 'start',\n 'nano-tab-group--has-scroll-controls': this.hasScrollControls,\n 'nano-tab-group--has-scroll-controls-left': !this.hideControlLeft,\n 'nano-tab-group--has-scroll-controls-right': !this.hideControlRight,\n }}\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n >\n <div class=\"nano-tab-group__nav-container\" part=\"nav\">\n {this.placement === 'top' && (\n <button\n disabled={!this.hasScrollControls}\n class={{\n 'nano-tab-group__scroll-button': true,\n 'nano-tab-group__scroll-button--left': true,\n }}\n ref={(btn) => (this.leftBtn = btn)}\n onClick={() => this.handleBtnClick(false)}\n >\n <nano-icon name=\"light/chevron-left\"></nano-icon>\n </button>\n )}\n <div\n ref={(el) => (this.nav = el)}\n class=\"nano-tab-group__nav\"\n onScroll={this.handleTabScroll}\n >\n <div\n ref={(el) => (this.tabs = el)}\n part=\"tabs\"\n class=\"nano-tab-group__tabs\"\n role=\"tablist\"\n aria-orientation={\n this.placement === 'start' ? 'vertical' : 'horizontal'\n }\n >\n <div\n ref={(el) => (this.activeTabIndicator = el)}\n part=\"active-tab-indicator\"\n class=\"nano-tab-group__active-tab-indicator\"\n />\n <slot name=\"tabs\" onSlotchange={this.handleTabSlotChange} />\n </div>\n </div>\n {this.placement === 'top' && (\n <button\n disabled={!this.hasScrollControls}\n class={{\n 'nano-tab-group__scroll-button': true,\n 'nano-tab-group__scroll-button--right': true,\n }}\n ref={(btn) => (this.rightBtn = btn)}\n onClick={() => this.handleBtnClick(true)}\n >\n <nano-icon name=\"light/chevron-right\"></nano-icon>\n </button>\n )}\n </div>\n <slot name=\"tab-content-header\" />\n <div\n part=\"body\"\n class=\"nano-tab-group__body\"\n onTouchStart={this.handleTouchStart}\n onTouchEnd={this.handleTouchEnd}\n >\n <slot onSlotchange={this.handleContentSlotChange} />\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"nano-tab-group.js","mappings":";;;;;;;;;;;AAAA,MAAM,WAAW,GAAG,ouNAAouN;;AC0BxvN,IAAI,EAAE,GAAG,CAAC,CAAC;MAyBE,QAAQ;;;;;;;;;IACX,WAAM,GAAG,kBAAkB,EAAE,EAAE,EAAE,CAAC;IAUlC,kBAAa,GAAW,IAAI,CAAC;IAC7B,kBAAa,GAAW,IAAI,CAAC;IAG7B,sBAAiB,GAAoC,IAAI,OAAO,EAAE,CAAC;IAgInE,yBAAoB,GAAG;MAC7B,IAAI,IAAI,CAAC,gBAAgB,EAAE;QACzB,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;OAChC;WAAM;QACL,IAAI,CAAC,iBAAiB;UACpB,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;YAChC,IAAI,CAAC,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW;YAC3C,IAAI,CAAC,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,IAAI,CAA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;;;;","names":[],"sources":["./src/components/tabs/tab-group.scss?tag=nano-tab-group&encapsulation=shadow","./src/components/tabs/tab-group.tsx"],"sourcesContent":["@use 'sass:map';\n@use 'sass:list';\n\n@import '../../global/style/utilities/globals';\n@import '../../global/style/nano-theme/form';\n@import '../../global/style/nano-theme/base';\n@import '../../global/style/nano-theme/layers';\n\n/**\n * @prop --indicator-transition: Only relevant to placement 'start'. defaults to #{$transition-fast};\n * @prop --indicator-color: defaults to #{map.get($colors, lightblue)} on placement 'top' and #{map.get($colors, blue)} on placement 'start';\n * @prop --indicator-track-color: Only relevant to placement 'start'. defaults to #{map.get($colors, lightgrey)};\n * @prop --indicator-size: defaults to 5px on placement 'top' and 2px on placement 'start';\n\n * @prop --border-radius: defaults to #{$layer-border-radius};\n * @prop --background-rgb: will be used as the default background colour for tabs and content. defaults to #{$layer-bg-color-rgb};\n * @prop --shadow-opacity: opacity of the shadow behind tabs. defaults to 0.1;\n * @prop --scroll-btn-color: defaults to 'currentcolor';\n\n * @prop --content-padding: defaults to 2rem 2.5rem;\n * @prop --content-bg: defaults to rgb(var(--background-rgb));\n * @prop --content-border-radius: defaults to `var(--border-radius)` `position=\"top\"`. `0 var(--border-radius) var(--border-radius) 0` `position=\"start\"`;\n\n * @prop --tabs-padding-start: defaults to 2.5rem on placement 'top' and 0 on placement 'start';\n * @prop --tabs-padding-end: defaults to 2.5rem on placement 'top' and 0 on placement 'start';\n * @prop --tabs-padding-top: defaults to 0;\n * @prop --tabs-padding-bottom: defaults to 0;\n * @prop --tabs-bg-rgb: defaults to var(--bg-color);\n * @prop --tab-border-radius: defaults to `var(--border-radius) var(--border-radius) 0 0` `position=\"top\"`. `0` `position=\"start\"`. ;\n * @prop --tab-text-color: defaults to #{map.get($colors, blue)} on placement 'top' and #{map.get($colors, darkgrey)} on placement 'start';\n * @prop --fade-transparency: controls the strength of the fade on overflowing tabs, defaults to 0;\n */\n\n:host {\n --indicator-transition: #{$transition-fast};\n --indicator-color: #{map.get($colors, lightblue)};\n --indicator-track-color: #{map.get($colors, lightgrey)};\n --indicator-size: 0;\n --border-radius: #{$layer-border-radius};\n --background-rgb: #{$layer-bg-color-rgb};\n --scroll-btn-color: 'currentColor';\n --content-padding: 2rem 2.5rem;\n --content-bg: rgb(var(--background-rgb));\n --content-border-radius: var(--border-radius);\n --tabs-padding-start: 2.5rem;\n --tabs-padding-end: 2.5rem;\n --tabs-padding-top: 0;\n --tabs-padding-bottom: 0;\n --tabs-container-bg: 'transparent';\n --tabs-bg-rgb: var(--background-rgb);\n --tab-border-radius: var(--border-radius) var(--border-radius) 0 0;\n --tab-text-color: #{map.get($colors, blue)};\n --shadow-opacity: 0.1;\n --fade-transparency: 0;\n\n display: block;\n position: relative;\n z-index: #{$layer-index-raised};\n\n @media only screen and (max-width: 768px) {\n --tabs-padding-start: 1.5rem;\n --tabs-padding-end: 1.5rem;\n }\n\n ::slotted(nano-tab) {\n --tab-indicator-color: var(--indicator-color);\n --bg-rgb: var(--tabs-bg-rgb);\n --border-radius: var(--tab-border-radius);\n --grab-offset-x: var(--tabs-padding-start);\n }\n}\n\n:host([placement='start']) {\n --content-border-radius: 0 var(--border-radius) var(--border-radius) 0;\n --content-padding: 1rem;\n --tab-border-radius: 0;\n --tabs-padding-start: 0;\n --tabs-padding-end: 0;\n --tabs-padding-top: 0;\n --tabs-padding-bottom: 0;\n --tab-text-color: #{map.get($colors, darkgrey)};\n --indicator-color: #{map.get($colors, blue)};\n --indicator-size: 2px;\n}\n\n:host(.nano-color) {\n --indicator-color: var(--nano-color-tint, #{nano-color(primary, tint)});\n --tab-text-color: rgb(var(--nano-color-base-rgb) / 70%);\n\n ::slotted(nano-tab) {\n --active-text-color: var(--nano-color-shade, #{nano-color(primary, shade)});\n }\n}\n\n.nano-tab-group {\n display: flex;\n border-radius: 0;\n inline-size: 100%;\n flex: inherit;\n\n &__tabs {\n display: flex;\n position: relative;\n inline-size: 100%;\n }\n\n &__active-tab-indicator {\n position: absolute;\n transition:\n var(--indicator-transition) transform ease,\n var(--indicator-transition) width ease;\n }\n\n &__body {\n background: var(--content-bg);\n }\n\n .nano-tab-group__nav-container {\n position: relative;\n display: flex;\n background: var(--tabs-container-bg);\n }\n\n button {\n appearance: none;\n background-color: transparent;\n }\n\n &__scroll-button {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n inset-block: 0;\n border: unset;\n z-index: 2;\n transition: #{$transition-fast} ease opacity;\n opacity: 0;\n color: var(--scroll-btn-color);\n\n &:focus {\n outline: none;\n }\n\n &.is-shown {\n opacity: 1;\n }\n\n &:focus-visible {\n box-shadow: #{$control-focus-style} inset;\n }\n\n &--left {\n inset-inline-start: 0;\n }\n\n &--right {\n inset-inline-end: 0;\n }\n\n nano-icon {\n font-size: 16px;\n }\n }\n\n ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n // Top\n ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n &--top {\n flex-direction: column;\n\n .nano-tab-group__nav-container {\n &::after {\n content: '';\n inline-size: 86%;\n box-shadow: 0 10px 40px 10px rgb(0 0 0 / var(--shadow-opacity));\n block-size: 10px;\n position: absolute;\n inset-inline-start: 7%;\n inset-block-end: -10px;\n border-radius: 10px;\n z-index: -1;\n }\n }\n\n .nano-tab-group__nav {\n @include hide-scrollbar();\n\n padding-inline: var(--tabs-padding-start) var(--tabs-padding-end);\n padding-block: var(--tabs-padding-top) var(--tabs-padding-bottom);\n display: flex;\n overflow: auto hidden;\n transition: #{$transition-medium} ease;\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=');\n mask-repeat: no-repeat;\n mask-image:\n linear-gradient(\n to left,\n rgb(0 0 0 / var(--fade-transparency)) 0,\n rgb(0 0 0 / var(--fade-transparency)) var(--tabs-padding-start),\n rgb(0 0 0 / 100%) calc(var(--tabs-padding-start) * 2),\n rgb(0 0 0 / 100%) calc(100% - (var(--tabs-padding-end) * 2)),\n rgb(0 0 0 / var(--fade-transparency))\n calc(100% - var(--tabs-padding-end)),\n rgb(0 0 0 / var(--fade-transparency))\n );\n mask-size: calc(100% + calc(var(--tabs-padding-end) * 4));\n mask-position: calc(var(--tabs-padding-end) * -2);\n\n &::after {\n content: ' ';\n padding-inline: 0 var(--tabs-padding-end);\n padding-block: var(--tabs-padding-top) var(--tabs-padding-bottom);\n line-height: 1;\n flex: 0 0 auto;\n }\n }\n\n &.nano-tab-group--has-scroll-controls-left {\n .nano-tab-group__nav {\n mask-position: 0;\n mask-size: calc(100% + (var(--tabs-padding-end) * 2));\n }\n }\n\n &.nano-tab-group--has-scroll-controls-right {\n .nano-tab-group__nav {\n mask-position: calc(var(--tabs-padding-end) * -1);\n mask-size: calc(100% + var(--tabs-padding-end));\n }\n }\n\n &.nano-tab-group--has-scroll-controls-left.nano-tab-group--has-scroll-controls-right {\n .nano-tab-group__nav {\n mask-size: 100%;\n mask-position: 0;\n }\n }\n\n .nano-tab-group__tabs {\n flex: 1 1 auto;\n position: relative;\n flex-direction: row;\n text-align: center;\n color: var(--tab-text-color);\n inline-size: auto;\n }\n\n .nano-tab-group__active-tab-indicator {\n inset-block-end: -2px;\n border-block-end: solid var(--indicator-size) var(--indicator-color);\n }\n\n .nano-tab-group__body {\n order: 2;\n background: var(--content-bg);\n position: relative;\n overflow: hidden;\n inline-size: auto;\n display: flex;\n justify-content: center;\n padding: var(--content-padding);\n border-radius: var(--content-border-radius);\n flex: 1 1 auto;\n }\n }\n\n ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n // Start\n ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n &--start {\n flex-direction: row;\n\n .nano-tab-group__tabs {\n flex: 0 0 auto;\n flex-direction: column;\n color: var(--tab-text-color);\n background: rgb(var(--tabs-bg-rgb));\n border-inline-start:\n solid var(--indicator-size)\n var(--indicator-track-color);\n text-align: start;\n }\n\n .nano-tab-group__active-tab-indicator {\n inset-inline-start: calc(-1 * 2px);\n border-inline-start: solid var(--indicator-size) var(--indicator-color);\n }\n\n .nano-tab-group__body {\n flex: 1 1 auto;\n order: 2;\n padding: var(--content-padding);\n overflow: hidden;\n border-radius: var(--content-border-radius);\n }\n }\n}\n","import {\n Component,\n Element,\n ComponentInterface,\n Event,\n EventEmitter,\n Method,\n Prop,\n State,\n Watch,\n h,\n Host,\n Listen,\n Build,\n} from '@stencil/core';\n\nimport { getDirectChildren, getOffset } from '../../utils/dom';\nimport { scrollIntoView } from '../../utils/scroll';\nimport {\n ComponentStore,\n StorageMethods,\n} from '../../utils/store/component-store';\nimport { createColorClasses } from '../../utils/theme';\nimport { displayTransition } from '../../utils/transitions';\nimport type { Color } from '../../interface';\n\nlet id = 0;\n\n/**\n * A traditional tab implementation. It nests `nano-tab` and `nano-tab-content` sub-components.\n *\n * Tabs can be stacked vertically or horizontally (which presents different styling variations) using the `placement` attribute.\n * Horizontal tabs that don't fit will overflow and scroll appropriately.\n * Tab-content can also be swiped to change tabs.\n *\n * @slot tabs - Add `nano-tab` elements to add clickable tabs.\n * @slot tab-content-header - a header bar displayed above tab content.\n * @slot - Add `nano-tab-content` elements to add tabbable content.\n *\n * @part base - the main tab-group wrapper\n * @part nav - the bar surrounding all the tabs and nav buttons\n * @part tabs - the wrapper around the `nano-tab` components\n * @part active-tab-indicator - the active indicator line\n * @part body - the wrapper around the `nano-tab-content` components\n */\n\n@Component({\n tag: 'nano-tab-group',\n styleUrl: 'tab-group.scss',\n shadow: true,\n})\nexport class TabGroup implements ComponentInterface {\n private baseId = `nano-tab-group-${++id}`;\n private activeTab: HTMLNanoTabElement;\n private activePanel: HTMLNanoTabContentElement;\n private activeTabIndicator: HTMLElement;\n private nav: HTMLElement;\n private tabs: HTMLElement;\n private rightBtn: HTMLButtonElement;\n private leftBtn: HTMLButtonElement;\n\n private isRtl: boolean;\n private initialTouchX: number = null;\n private initialTouchY: number = null;\n\n private resizeObserver: ResizeObserver;\n private mutationObservers: WeakMap<Node, MutationObserver> = new WeakMap();\n\n @Element() host: HTMLNanoTabGroupElement;\n\n @State() hasScrollControls = false;\n @State() hideControlRight = true;\n @State() hideControlLeft = true;\n @State() tab: string;\n\n /**\n * The placement of the tabs.\n */\n @Prop({ reflect: true }) placement: 'top' | 'start' = 'top';\n\n /**\n * Disables the scroll arrows that appear when tabs overflow.\n */\n @Prop() noScrollControls = false;\n\n /**\n * The color to use from the application's color palette.\n */\n @Prop() color?: Color;\n\n /**\n * Store the currently open tab (against this ID) in the component store.\n * Use in conjunction with storeMethod\n */\n @Prop() storeId?: string;\n\n /**\n * The method of storage.\n * Either session storage, url hash (after the '#') or url query (after the '?').\n */\n @Prop() storeMethod: StorageMethods = 'session';\n\n /**\n * Disable 'swipe to change tab' on devices with touch\n */\n @Prop() disableSwipe: boolean;\n\n @Watch('tab')\n handleTabNameChange() {\n if (this.activeTab && this.activeTab.panel === this.tab) return;\n const tab = this.getAllActiveTabs.find((el) => el.panel === this.tab);\n this.setActiveTab(tab);\n }\n\n @Watch('placement')\n handlePlacementChange() {\n this.syncActiveTabIndicator();\n }\n\n @Watch('noScrollControls')\n handleNoScrollControlsChange() {\n this.updateScrollControls();\n }\n\n @Watch('hideControlRight')\n hideRightBtn() {\n if (!this.rightBtn) return;\n displayTransition(this.rightBtn, {\n className: 'is-shown',\n show: !this.hideControlRight,\n });\n }\n\n @Watch('hideControlLeft')\n hideLeftBtn() {\n if (!this.leftBtn) return;\n displayTransition(this.leftBtn, {\n className: 'is-shown',\n show: !this.hideControlLeft,\n });\n }\n\n @Watch('hasScrollControls')\n watchScrollControls() {\n if (this.hasScrollControls) setTimeout((_) => this.handleTabScroll(), 20);\n else\n setTimeout((_) => {\n this.hideControlLeft = this.hideControlRight = true;\n }, 20);\n }\n\n /** Emitted when a tab is shown. */\n @Event() nanoTabShow: EventEmitter<{ name: string }>;\n\n /** Emitted when a tab is hidden. */\n @Event() nanoTabHide: EventEmitter<{ name: string }>;\n\n /** Emitted when the tab is closable and the close button is activated. */\n @Event() nanoTabWillClose: EventEmitter<{ name: string }>;\n\n /** Emitted when a closable tab is removed. */\n @Event() nanoTabClose: EventEmitter<{ name: string }>;\n\n /** Shows the specified tab panel. */\n @Method()\n async show(panel: string) {\n if (this.activeTab && this.activeTab.panel === panel) return;\n\n const tab = this.getAllActiveTabs.find((el) => el.panel === panel);\n\n if (tab) this.setActiveTab(tab);\n }\n\n // Internal Methods\n\n get getAllActiveTabs() {\n return this.getAllTabs.filter((el: any) => !el.disabled);\n }\n\n get getAllTabs() {\n return getDirectChildren<HTMLNanoTabElement>(this.host, 'nano-tab');\n }\n\n get getAllPanels() {\n return getDirectChildren<HTMLNanoTabContentElement>(\n this.host,\n 'nano-tab-content'\n );\n }\n\n get getActiveTab() {\n return this.getAllActiveTabs.find((el) => el.active);\n }\n\n private updateScrollControls = () => {\n if (this.noScrollControls) {\n this.hasScrollControls = false;\n } else {\n this.hasScrollControls =\n ['top'].includes(this.placement) &&\n this.nav.scrollWidth > this.nav.clientWidth &&\n this.nav.scrollWidth > this.tabs.clientWidth;\n }\n };\n\n private setActiveTab(tab: HTMLNanoTabElement, emitEvents = true) {\n if (\n tab &&\n tab !== this.activeTab &&\n !tab.disabled &&\n this.getAllActiveTabs.includes(tab)\n ) {\n const previousTab = this.activeTab;\n this.activeTab = tab;\n this.tab = tab.panel;\n\n // Sync tabs and panels\n this.getAllActiveTabs.map((el) => (el.active = el === this.activeTab));\n this.getAllPanels.map((el) => {\n if (el.name === this.activeTab.panel) {\n el.active = true;\n this.activePanel = el;\n } else el.active = false;\n el.removeAttribute('animation-dir');\n });\n\n this.syncActiveTabIndicator();\n\n // active tab can be changed on init - this won't be ready. No big thing\n if (this.nav && ['top'].includes(this.placement)) {\n scrollIntoView(this.activeTab, this.nav, 'horizontal', 'center');\n }\n\n // Emit events\n if (emitEvents) {\n if (previousTab) {\n this.nanoTabHide.emit({ name: previousTab.panel });\n }\n\n this.nanoTabShow.emit({ name: this.activeTab.panel });\n }\n }\n }\n\n private setAriaLabels() {\n const tabs = this.getAllActiveTabs;\n const panels = this.getAllPanels;\n\n // Link each tab with its corresponding panel\n tabs.map((tab, i) => {\n const panel = panels.find((el) => el.name === tab.panel);\n if (panel) {\n if (!panel.id) panel.id = `${this.baseId}-panel-${i}`;\n if (!tab.id) tab.id = `${this.baseId}-tab-${i}`;\n\n tab.setAttribute('aria-controls', panel.id);\n panel.setAttribute('aria-labelledby', tab.id);\n }\n });\n }\n\n private syncActiveTabIndicator() {\n this.getAllTabs.forEach((tab) =>\n tab.setAttribute(\n 'direction',\n this.placement === 'top' ? 'horizontal' : 'vertical'\n )\n );\n\n const tab = this.getActiveTab;\n if (!tab) return;\n\n const width = tab.shadowRoot.querySelector('.nanotab')?.clientWidth || 0;\n const height = tab.clientHeight;\n const offset = getOffset(tab, this.tabs);\n\n if (!this.activeTabIndicator) return;\n\n const offsetTop = offset.top + this.nav.scrollTop;\n const offsetLeft = offset.left;\n\n switch (this.placement) {\n case 'top':\n this.activeTabIndicator.style.width = `${width}px`;\n this.activeTabIndicator.style.height = null;\n this.activeTabIndicator.style.transform = `translateX(${offsetLeft}px)`;\n break;\n\n case 'start':\n this.activeTabIndicator.style.width = null;\n this.activeTabIndicator.style.height = `${height}px`;\n this.activeTabIndicator.style.transform = `translateY(${offsetTop}px)`;\n break;\n }\n }\n\n private getNavWidth() {\n if (!this.nav) return 0;\n const computedStyle = getComputedStyle(this.nav);\n let clientWidth = this.nav.clientWidth;\n return (clientWidth -=\n parseFloat(computedStyle.paddingLeft) +\n parseFloat(computedStyle.paddingRight));\n }\n\n // Event handlers\n\n @Listen('nanoTabClose')\n handleTabClose(ev: CustomEvent & { target: HTMLNanoTabElement }) {\n let tabIndex = this.getAllActiveTabs.indexOf(ev.target);\n const tab = ev.target;\n if (tabIndex < 0) return;\n\n const panel = this.getAllPanels.find((el) => el.name === tab.panel);\n if (!panel) return;\n\n ev.stopImmediatePropagation();\n\n const closeEv = this.nanoTabWillClose.emit({ name: tab.panel });\n if (closeEv.defaultPrevented) return;\n\n // Show the previous tab if the tab is currently active\n if (tab.active) {\n tabIndex = tabIndex === 0 ? 1 : tabIndex - 1;\n const prevTab = this.getAllActiveTabs[tabIndex]?.panel;\n if (prevTab) this.host.show(prevTab);\n }\n\n tab.remove();\n panel.remove();\n this.nanoTabClose.emit({ name: tab.panel });\n }\n\n private handleClick = (event: MouseEvent) => {\n const target = event.target as HTMLElement;\n const tab = target.closest('nano-tab');\n\n if (tab) this.setActiveTab(tab);\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n const activeEl = document.activeElement as any;\n if (!activeEl || activeEl.tagName.toLowerCase() !== 'nano-tab') return;\n\n // Activate a tab\n if (['Enter', ' '].includes(event.key)) {\n const target = event.target as HTMLElement;\n const tab = target.closest('nano-tab');\n\n if (tab) {\n this.setActiveTab(tab);\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n // Move focus left or right\n if (\n ![\n 'ArrowLeft',\n 'ArrowRight',\n 'ArrowUp',\n 'ArrowDown',\n 'Home',\n 'End',\n ].includes(event.key)\n )\n return;\n\n const tabs = this.getAllActiveTabs;\n let index = tabs.indexOf(activeEl);\n\n if (event.key === 'Home') index = 0;\n if (event.key === 'End') index = tabs.length - 1;\n\n if (this.placement === 'top') {\n if (\n (this.isRtl && event.key === 'ArrowRight') ||\n (!this.isRtl && event.key === 'ArrowLeft')\n ) {\n index = Math.max(0, index - 1);\n }\n if (\n (this.isRtl && event.key === 'ArrowLeft') ||\n (!this.isRtl && event.key === 'ArrowRight')\n ) {\n index = Math.min(tabs.length - 1, index + 1);\n }\n }\n\n if (this.placement === 'start') {\n if (event.key === 'ArrowUp') index = Math.max(0, index - 1);\n if (event.key === 'ArrowDown')\n index = Math.min(tabs.length - 1, index + 1);\n }\n\n tabs[index].setFocus();\n\n if (this.placement === 'top') {\n scrollIntoView(tabs[index], this.nav, 'horizontal', 'center');\n }\n // need to stop bubbling otherwise it will focus on parent tabs if nested\n event.stopPropagation();\n // stop the browser moving about\n event.preventDefault();\n };\n\n private handleTabScroll = () => {\n if (!this.hasScrollControls) {\n this.hideControlLeft = this.hideControlRight = true;\n return;\n }\n const endRight = this.isRtl\n ? this.nav.scrollLeft === 0\n : this.nav.scrollWidth - this.nav.scrollLeft === this.nav.clientWidth;\n const endLeft = this.isRtl\n ? this.nav.scrollWidth + this.nav.scrollLeft === this.nav.clientWidth\n : this.nav.scrollLeft === 0;\n\n if (endLeft) {\n this.hideControlLeft = true;\n this.hideControlRight = false;\n } else if (endRight) {\n this.hideControlLeft = false;\n this.hideControlRight = true;\n } else {\n this.hideControlRight = false;\n this.hideControlLeft = false;\n }\n };\n\n private handleBtnClick = (goRight: boolean = false) => {\n const navWidth = this.getNavWidth();\n let leftAmt;\n if (goRight) leftAmt = this.nav.scrollLeft + navWidth - 20;\n else leftAmt = this.nav.scrollLeft - navWidth + 20;\n\n try {\n this.nav.scroll({\n left: leftAmt,\n behavior: 'smooth',\n });\n } catch (e) {\n this.nav.scrollLeft = leftAmt;\n }\n };\n\n private handleTouchStart = (event: TouchEvent) => {\n if (this.disableSwipe) return;\n const touch = event.changedTouches[0];\n this.initialTouchX = touch.pageX;\n this.initialTouchY = touch.pageY;\n };\n\n private handleTouchEnd = (event: TouchEvent) => {\n if (this.disableSwipe) return;\n const touch = event.changedTouches[0];\n const distX = touch.pageX - this.initialTouchX; // get horizontal dist travelled\n const threshold = 70;\n\n const xDiff = this.initialTouchX - touch.clientX;\n const yDiff = this.initialTouchY - touch.clientY;\n\n const isHorizontalSwipe =\n Math.abs(distX) >= threshold && Math.abs(yDiff) <= 50;\n\n const tabs = this.getAllActiveTabs;\n const currIndex = tabs.findIndex((el) => el.active);\n\n if (isHorizontalSwipe) {\n const toGo =\n (distX < 0 && this.placement === 'top') ||\n (distX > 0 && this.placement !== 'top')\n ? 1\n : -1;\n\n if (tabs[currIndex + toGo]) {\n this.setActiveTab(tabs[currIndex + toGo]);\n\n if (Math.abs(xDiff) > Math.abs(yDiff)) {\n if (xDiff > 0) this.activePanel.setAttribute('animation-dir', 'left');\n else this.activePanel.setAttribute('animation-dir', 'right');\n }\n }\n }\n this.initialTouchX = null;\n this.initialTouchY = null;\n };\n\n private handleContentSlotChange = () => {\n setTimeout(() => {\n this.setAriaLabels();\n this.setActiveTab(this.getActiveTab || this.getAllActiveTabs[0], false);\n });\n };\n\n private handleTabSlotChange = (ev: Event & { target: HTMLSlotElement }) => {\n setTimeout(() => {\n this.setAriaLabels();\n this.handleTabScroll();\n this.setActiveTab(this.getActiveTab || this.getAllActiveTabs[0], false);\n this.updateScrollControls();\n }, 500);\n\n /** maintain a weakmap of mutation observers to maintain tab / indicator position on all changes. */\n const nodes = ev.target.assignedElements({ flatten: true });\n nodes.forEach((node) => {\n if (!this.mutationObservers.get(node)) {\n const mo = new MutationObserver(() => {\n setTimeout(() => {\n this.syncActiveTabIndicator();\n this.handleTabScroll();\n this.updateScrollControls();\n }, 500);\n });\n this.mutationObservers.set(node, mo);\n\n mo.observe(node, {\n characterData: true,\n childList: true,\n subtree: true,\n });\n }\n });\n };\n\n // Stencil hooks\n\n componentDidLoad() {\n // Initial IO - watching for all content to be loaded\n const observer = new IntersectionObserver((entries, observer) => {\n if (entries[0].intersectionRatio > 0) {\n this.setAriaLabels();\n this.setActiveTab(this.getActiveTab || this.getAllActiveTabs[0], false);\n\n if (this.storeId)\n ComponentStore.init(this, ['tab'], this.storeMethod, this.storeId);\n observer.unobserve(entries[0].target);\n }\n });\n observer.observe(this.host);\n\n requestAnimationFrame(() => this.updateScrollControls());\n\n if (!window['ResizeObserver']) return;\n\n this.resizeObserver = new ResizeObserver(() => {\n setTimeout(() => {\n this.updateScrollControls();\n this.syncActiveTabIndicator();\n scrollIntoView(this.activeTab, this.nav, 'horizontal', 'center');\n }, 500);\n });\n this.resizeObserver.observe(this.nav);\n }\n\n connectedCallback() {\n this.isRtl =\n this.host.dir === 'rtl' ||\n (this.host.ownerDocument as Document).dir === 'rtl';\n\n if (Build.isServer) {\n this.setActiveTab(this.getActiveTab || this.getAllActiveTabs[0], false);\n this.setAriaLabels();\n }\n }\n\n disconnectedCallback() {\n if (this.resizeObserver) this.resizeObserver.unobserve(this.nav);\n }\n\n render() {\n this.isRtl = (this.host.ownerDocument as Document).dir === 'rtl';\n\n return (\n <Host\n class={{ ...createColorClasses(this.color) }}\n dir={this.isRtl ? 'rtl' : null}\n >\n <div\n part=\"base\"\n class={{\n 'nano-tab-group': true,\n 'nano-tab-group--top': this.placement === 'top',\n 'nano-tab-group--start': this.placement === 'start',\n 'nano-tab-group--has-scroll-controls': this.hasScrollControls,\n 'nano-tab-group--has-scroll-controls-left': !this.hideControlLeft,\n 'nano-tab-group--has-scroll-controls-right': !this.hideControlRight,\n }}\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n >\n <div class=\"nano-tab-group__nav-container\" part=\"nav\">\n {this.placement === 'top' && (\n <button\n disabled={!this.hasScrollControls}\n class={{\n 'nano-tab-group__scroll-button': true,\n 'nano-tab-group__scroll-button--left': true,\n }}\n ref={(btn) => (this.leftBtn = btn)}\n onClick={() => this.handleBtnClick(false)}\n >\n <nano-icon\n name=\"light/chevron-left\"\n ariaLabel=\"Scroll tabs towards the start\"\n ></nano-icon>\n </button>\n )}\n <div\n ref={(el) => (this.nav = el)}\n class=\"nano-tab-group__nav\"\n onScroll={this.handleTabScroll}\n >\n <div\n ref={(el) => (this.tabs = el)}\n part=\"tabs\"\n class=\"nano-tab-group__tabs\"\n role=\"tablist\"\n aria-orientation={\n this.placement === 'start' ? 'vertical' : 'horizontal'\n }\n >\n <div\n ref={(el) => (this.activeTabIndicator = el)}\n part=\"active-tab-indicator\"\n class=\"nano-tab-group__active-tab-indicator\"\n />\n <slot name=\"tabs\" onSlotchange={this.handleTabSlotChange} />\n </div>\n </div>\n {this.placement === 'top' && (\n <button\n disabled={!this.hasScrollControls}\n class={{\n 'nano-tab-group__scroll-button': true,\n 'nano-tab-group__scroll-button--right': true,\n }}\n ref={(btn) => (this.rightBtn = btn)}\n onClick={() => this.handleBtnClick(true)}\n >\n <nano-icon\n name=\"light/chevron-right\"\n ariaLabel=\"Scroll tabs towards the end\"\n ></nano-icon>\n </button>\n )}\n </div>\n <slot name=\"tab-content-header\" />\n <div\n part=\"body\"\n class=\"nano-tab-group__body\"\n onTouchStart={this.handleTouchStart}\n onTouchEnd={this.handleTouchEnd}\n >\n <slot onSlotchange={this.handleContentSlotChange} />\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1 +1 @@
1
- {"file":"select.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,SAAS,GAAG,2poBAA2poB;;ACgC7qoB,IAAI,SAAS,GAAG,CAAC,CAAC;MAuBL,MAAM;EAUjB,IAAY,SAAS;IACnB,OAAO,IAAI,CAAC,UAAU,CAAC;GACxB;EACD,IAAY,SAAS,CAAC,KAAK;IACzB,IAAI,KAAK,KAAK,IAAI,CAAC,UAAU;MAAE,OAAO;IACtC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IACxB,IAAI,CAAC,eAAe,EAAE,CAAC;GACxB;EAMD,IAAY,UAAU;IACpB,OAAO,IAAI,CAAC,WAAW,CAAC;GACzB;EACD,IAAY,UAAU,CAAC,GAAgB;IACrC,IAAI,IAAI,CAAC,WAAW,KAAK,GAAG;MAAE,OAAO;IACrC,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC;IACvB,IAAI,CAAC,eAAe,EAAE,CAAC;GACxB;EAGD,IAAY,QAAQ;IAClB,OAAO,IAAI,CAAC,SAAS,CAAC;GACvB;EACD,IAAY,QAAQ,CAAC,GAA4B;IAC/C,IAAI,IAAI,CAAC,SAAS,KAAK,GAAG;MAAE,OAAO;IACnC,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC;IACrB,IAAI,CAAC,eAAe,EAAE,CAAC;GACxB;EAED;;;;;;;;;;IAxCQ,eAAU,GAA2B,EAAE,CAAC;IAGxC,aAAQ,GAAG,eAAe,SAAS,EAAE,EAAE,CAAC;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,EAAE,QAAQ,CAAC,CAAC;OAChC;WAAM,IAAI,CAAC,KAAK,IAAI,CAAC,eAAe,EAAE;QACrC,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;OAChC;WAAM;QACL,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;OACzB;KACF,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;GACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/select/select.scss?tag=nano-select&encapsulation=scoped","./src/components/select/select.tsx"],"sourcesContent":["@import '../../global/style/utilities/globals';\n@import '../../global/style/nano-theme/form';\n@import '../../global/style/nano-theme/layers';\n@import '../form-control/form-control';\n@import '../form-control/form-control-vars';\n\n:host {\n @include formControlVars;\n\n /**\n * @prop --max-menu-height: the maximum of the dropdown menu. Defaults to 50vw.\n */\n\n position: relative;\n inline-size: 100%;\n padding: 0 !important;\n font-family: $font-family-base;\n display: block;\n}\n\n:host(.nano-color) {\n --input-border-style--focus:\n #{$input-border-style} var(\n --nano-color-tint,\n #{nano-color(\n primary,\n tint\n )}\n );\n --multi-input-value-bg: var(--nano-color-tint-rgb);\n --multi-input-value-border: var(--nano-color-shade);\n --multi-input-value-text-color: var(--nano-color-contrast);\n\n color: current-color(base);\n}\n\n:host-context(nano-item:not(.item-label)) {\n --padding-start: 0;\n}\n\n:host([disabled]:not([disabled='false'])) {\n * {\n pointer-events: none !important;\n }\n}\n\nselect {\n display: none;\n}\n\n.select__native-input {\n @include text-inherit();\n\n padding: unset;\n padding-inline: var(--padding-start) var(--padding-end);\n padding-block: 0;\n border-radius: var(--input-border-radius);\n text-overflow: ellipsis;\n color: var(--input-text-color);\n display: inline-block;\n flex: 1;\n inline-size: 100%;\n max-inline-size: 100%;\n max-block-size: 100%;\n border: 0;\n outline: none;\n background: transparent;\n appearance: none;\n margin: 0;\n box-sizing: border-box;\n resize: none;\n overflow: hidden;\n cursor: default;\n line-height: 2.5em;\n\n .has-float-label & {\n line-height: 2.1em;\n min-block-size: 2.1em;\n padding-block-start: 1.4em;\n }\n\n &::selection {\n background: transparent;\n }\n\n /* stylelint-disable-next-line selector-no-vendor-prefix */\n &::-moz-selection {\n background: transparent;\n }\n\n &::placeholder {\n color: var(--placeholder-color);\n font-family: inherit;\n font-style: var(--placeholder-font-style);\n font-weight: var(--placeholder-font-weight);\n opacity: var(--placeholder-opacity);\n line-height: inherit;\n min-block-size: initial;\n }\n\n /* stylelint-disable-next-line selector-no-vendor-prefix */\n &::-moz-placeholder {\n line-height: 2.8em;\n text-overflow: ellipsis;\n }\n\n &:-webkit-autofill {\n background-color: transparent;\n }\n\n &::-webkit-search-decoration,\n &::-webkit-search-cancel-button,\n &::-webkit-search-results-button,\n &::-webkit-search-results-decoration {\n appearance: none;\n }\n\n &:invalid {\n box-shadow: none;\n }\n\n &::-ms-clear,\n &::-ms-reveal {\n display: none;\n }\n\n &.resizable {\n resize: vertical;\n overflow: auto;\n }\n\n .form-ctrl__textarea & {\n line-height: 1.5em;\n padding-block: var(--padding-top) var(--padding-bottom);\n white-space: pre-wrap;\n\n &::placeholder {\n line-height: 1.5em;\n }\n }\n\n .has-float-label.textarea & {\n padding-block-start: 1.8em;\n }\n\n :host(.masked) & {\n opacity: 0;\n position: absolute;\n inset-inline-start: 0;\n inset-block-start: 0;\n }\n}\n\n.select__mask {\n @include text-inherit();\n\n padding-inline: var(--padding-start) var(--padding-end);\n padding-block: 0;\n border-radius: var(--input-border-radius);\n pointer-events: none;\n line-height: 2.5em;\n min-block-size: 2.5em;\n}\n\n// multi stuff\n\n.select__multi {\n &-wrap {\n padding-block: 0 var(--padding-bottom);\n padding-inline: 0 0;\n display: flex;\n flex: 1;\n flex-wrap: wrap;\n overflow: hidden;\n align-items: flex-start;\n\n :host(.has-float-label) & {\n padding-block-start: 1em;\n }\n }\n\n &-input {\n @include text-inherit();\n\n padding-inline: var(--padding-start) var(--padding-end);\n padding-block: var(--padding-bottom) 0;\n min-inline-size: 50px;\n inline-size: 100%;\n max-block-size: 100%;\n appearance: none;\n border: 0;\n outline: none;\n display: inline-block;\n background: transparent;\n flex: 0;\n position: relative;\n box-sizing: border-box;\n line-height: calc(2.5em - var(--padding-bottom));\n block-size: calc(2.5em - var(--padding-bottom));\n\n &:last-child {\n flex: 1;\n }\n }\n\n &-value {\n margin-block: var(--padding-bottom) 0;\n margin-inline: var(--padding-start) -3px;\n background: rgb(var(--multi-input-value-bg) / 80%);\n color: var(--multi-input-value-text-color);\n border: 1px solid;\n border-color: var(--multi-input-value-border);\n padding: 0.35em 0.5em;\n display: flex;\n align-items: center;\n font-size: var(--input-font-size);\n letter-spacing: 1px;\n max-block-size: calc(2.5em - 8px);\n max-inline-size: calc(100% - 8px);\n border-radius: 4px;\n\n &--closable {\n padding-inline-end: 0;\n }\n\n span {\n text-overflow: ellipsis;\n white-space: nowrap;\n max-inline-size: 100%;\n overflow: hidden;\n }\n }\n\n &-value-remove {\n @include background-position(center);\n\n padding-inline-start: 0.5em;\n margin: 0;\n color: inherit;\n border: 0;\n outline: none;\n background-color: transparent;\n background-repeat: no-repeat;\n appearance: none;\n display: flex;\n align-items: center;\n inset-block-start: 0;\n font-size: 1em;\n\n nano-icon {\n --color: var(--multi-input-value-text-color);\n }\n }\n}\n\n.form-ctrl__float-label {\n inline-size: calc(100% - (1em + (var(--padding-start) * 2)));\n\n :host(.has-focus.has-multiple) & {\n transform: translateY(-110%);\n font-size: 0.8em;\n }\n\n :host(.has-value.has-multiple) & {\n transform: translateY(21%);\n inset-block-start: 0;\n }\n}\n\n:host(.has-focus) select,\n:host(.has-focus) a,\n:host(.has-focus) button {\n pointer-events: auto;\n}\n","import {\n Build,\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n Host,\n Method,\n Prop,\n State,\n Watch,\n h,\n VNode,\n Listen,\n} from '@stencil/core';\n\nimport { getActiveElement } from '../../utils/active-element';\nimport { closestElement } from '../../utils/dom';\nimport { createColorClasses } from '../../utils/theme';\nimport { debounce, debounceEvent } from '../../utils/throttle';\nimport { FormControl, FormControlWrap } from '../form-control/form-control';\nimport type {\n Color,\n SelectChangeEventDetail,\n InputChangeEventDetail,\n ControlValidityEventDetail,\n ControlValidity,\n OptionInterface,\n DropdownInterface,\n} from '../../interface';\n\nlet selectIds = 0;\n\n/**\n * The select component is a wrapper to the HTML select element with custom styling and additional functionality.\n * It accepts most of the same properties as the HTML [select](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select).\n * It's multi selection functionality is vastly improved from the native solution. It allows for the control of\n * value order through drag and drop or changing the insertion point with arrow keys. It also can allow for user defined values.\n *\n * @slot start - suitable for inline action buttons or icons that may add extra contextual information\n * @slot end - suitable for inline action buttons or icons that may add extra contextual information\n * @slot value-start - similar to 'start', however clicking elements using this slot will activate the input control. This would be suitable to show a secondary 'value' for context or to show a dropdown arrow if using a datalist\n * @slot value-end - similar to 'end', however clicking elements using this slot will activate the input control. This would be suitable to show a secondary 'value' for context or to show a dropdown arrow if using a datalist\n * @slot label - if you do not set a label attribute, you can use this slot for more complex markup\n * @slot helper - helper text to accompany the form field underneath.\n * @slot helper-end - helper text to accompany the form field on the side.\n * @slot down-arrow - use this to replace the default down arrow\n * @slot - default slot; nest `nano-option` elements\n */\n@Component({\n tag: 'nano-select',\n styleUrl: 'select.scss',\n scoped: true,\n})\nexport class Select implements ComponentInterface {\n private nativeSelect?: HTMLSelectElement;\n private valueItems: Array<HTMLSpanElement> = [];\n private dragVal: string;\n private mo?: MutationObserver;\n private selectId = `nano-select-${selectIds++}`;\n private rtl: boolean = false;\n private onInit: boolean = true;\n private customError: string = '';\n\n private get inputCtrl() {\n return this._inputCtrl;\n }\n private set inputCtrl(input) {\n if (input === this._inputCtrl) return;\n this._inputCtrl = input;\n this.setDataListOpts();\n }\n private _inputCtrl?: HTMLInputElement;\n\n // we don't want these rendered eles decorated with @State\n // because that will cause re-renders. Use get/set to set datalist options\n private _selectWrap: HTMLElement;\n private get selectWrap() {\n return this._selectWrap;\n }\n private set selectWrap(ele: HTMLElement) {\n if (this._selectWrap === ele) return;\n this._selectWrap = ele;\n this.setDataListOpts();\n }\n\n private _datalist: HTMLNanoDatalistElement;\n private get datalist() {\n return this._datalist;\n }\n private set datalist(ele: HTMLNanoDatalistElement) {\n if (this._datalist === ele) return;\n this._datalist = ele;\n this.setDataListOpts();\n }\n\n constructor() {\n this.showInlineValidation = debounce(this.showInlineValidation, 50);\n }\n\n @State() currInsertIndex: number = -1;\n @State() showErrorMsg = false;\n @State() errorMessage: string = '';\n @State() hasFocus = false;\n @State() hasLabelSlot: boolean = false;\n @State() hasHelperSlot: boolean = false;\n @State() hasHelperEndSlot = false;\n @State() inputSearchVal: string = '';\n\n @Element() el!: HTMLNanoSelectElement;\n\n /**\n * This will be true when the control is in an invalid state.\n * Validity is determined by the `required` prop. Or if custom validity message is set.\n */\n @Prop({ reflect: true })\n get invalid() {\n return this._invalid;\n }\n @State() _invalid = false;\n\n /**\n * Current validation message - if any. @readonly\n */\n @Prop()\n get validityMessage() {\n if (!this.nativeSelect) return '';\n return this.nativeSelect.validationMessage;\n }\n\n /**\n * The color to use from your application's color palette.\n * Default options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\n */\n @Prop() color?: Color;\n\n /**\n * This Boolean attribute lets you specify that a form control should have select focus when the page loads.\n */\n @Prop() autofocus = false;\n\n /**\n * If `true`, the user cannot interact with the select.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * When should the field perform validation\n */\n @Prop({ mutable: true }) validateOn?: 'dirty' | 'submit' | 'submitThenDirty' =\n 'submitThenDirty';\n\n /**\n * Whether to show validation errors underneath input\n */\n @Prop({ reflect: true }) showInlineError = true;\n\n /**\n * String to place within a label element. Alternatively use the 'label' slot\n */\n @Prop() label!: string;\n\n /**\n * Visually hide the label - but make it accessible.\n */\n @Prop() hideLabel?: boolean = false;\n\n /**\n * Enable floating label behaviour. Will disable placeholder if set.\n */\n @Prop() floatLabel: boolean = false;\n\n /**\n * If `true`, the user can enter more than one value. This attribute applies when the type attribute is set to `\"email\"` or `\"file\"`, otherwise it is ignored.\n */\n @Prop() multiple?: boolean = false;\n\n /** When `multiple=\"true\"`, control how many values to show within the control at once.\n * After the maximum, \"+n\" will be shown to indicate the number of additional items that are selected. */\n @Prop({ mutable: true }) maxValuesVisible?: boolean | number = 3;\n private _maxValuesVisible: number;\n\n @Watch('maxValuesVisible')\n watchMaxValuesVisible() {\n if (!this.multiple) return;\n\n this._maxValuesVisible =\n this.maxValuesVisible === false ? NaN : Number(this.maxValuesVisible);\n\n // make sure maxValuesVisible is a number\n if (!Number.isNaN(this._maxValuesVisible)) {\n if (this.currInsertIndex > this._maxValuesVisible) {\n // make the input position is no more than the max\n this.currInsertIndex = this._maxValuesVisible;\n }\n } else {\n // if maxValuesVisible is undefined, it will be `NaN`\n this.currInsertIndex = this.value.length - 1;\n }\n }\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.selectId + '-name';\n\n /**\n * Instructional text that shows before the select has a value. Text set here will be placed inside the label when a value is set.\n * If you don't want this behaviour just set the first option to have no value.\n */\n @Prop() placeholder?: string | null;\n\n /**\n * If `true`, the user cannot modify the value.\n */\n @Prop({ reflect: true }) readonly = false;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * The initial size of the control.\n */\n @Prop() size?: number;\n\n /**\n * Maximum number of options that can be selected when multiple is true\n */\n @Prop() max?: number;\n\n /**\n * Minimum number of options that can be selected when multiple is true\n */\n @Prop() min?: number;\n\n /**\n * The form element to associate the select with (its form owner). Must be the id of a form.\n */\n @Prop() form?: string | null;\n\n /**\n * in multiple mode, allow users to enter their own values\n */\n @Prop() allowCustomValues: boolean = false;\n\n /**\n * The value of the select.\n */\n @Prop()\n get value() {\n return this._value;\n }\n set value(val: string | string[]) {\n if (!!val && !!this._value) {\n if (JSON.stringify(val) === JSON.stringify(this._value))\n return\n }\n\n if (typeof val === 'string') {\n if (this.multiple) this._value = val.split(',');\n else this._value = val;\n } else if (Array.isArray(val)) {\n if (this.multiple) this._value = val;\n else this._value = val[0];\n }\n }\n private _value: Array<string> | string = this.multiple ? [] : '';\n\n /**\n * You can set options via js as an array of strings: `domElement.options = ['option 1', 'option 2']` or\n * objects `domElement.options = [{label: 'option 1', value: 'opt-1'}]`. See `nano-option` docs for all available properties.\n * Alternatively, you can nest `<nano-option>` elements within a `<nano-select>`\n * Regardless - reading `options` will return the current component options - slotted or otherwise\n */\n @Prop()\n get options(): Array<OptionInterface | string> {\n if (this._options.length) return this._options;\n\n if (!this.datalist || !this.datalist.activeOptions) return [];\n\n return this._elementOptions.map((ao) => {\n const { value, selected, label, filterMeta } = ao;\n return { value, selected, label, filterMeta };\n });\n }\n set options(opts: Array<OptionInterface | string>) {\n this._options = opts.map((opt) => {\n if (typeof opt === 'string') return { value: opt, label: opt };\n else return opt;\n });\n }\n private _options: OptionInterface[] = [];\n @State() _elementOptions: OptionInterface[] = [];\n\n /**\n * If `true`, a clear icon will appear in the select when there is a value. Clicking it clears the select.\n */\n @Prop() clearSelect = false;\n\n /**\n * Hide the native select element and cover with a value 'mask'.\n * Enables a fluid nano-select width upon value change (if required). Doesn't work with multiple=\"true\".\n */\n @Prop() mask = false;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `nanoSearchChange` event after each keystroke.\n */\n @Prop() debounce = 0;\n\n @Watch('debounce')\n protected debounceChanged() {\n this.nanoSearchChange = debounceEvent(this.nanoSearchChange, this.debounce);\n }\n\n @Watch('required')\n @Watch('disabled')\n @Watch('min')\n @Watch('max')\n @Watch('readonly')\n protected shouldValidate() {\n if (this.onInit) return;\n if (this.invalid) this.showErrorMsg = this._invalid = false;\n\n this.customValidate();\n if (this.validateOn !== 'dirty') return;\n this.showInlineValidation();\n }\n\n /**\n * Update the native select element when the value changes\n */\n // eslint-disable-next-line @stencil-community/no-unused-watch\n @Watch('value')\n valueChanged() {\n this.customValidate();\n\n if (this.onInit) {\n if (this.multiple) this.currInsertIndex = this.value.length - 1;\n return;\n }\n requestAnimationFrame(() => {\n this.shouldValidate();\n this.nanoChange.emit({ value: this.value });\n });\n }\n\n /** nano-dropdown config options you can pass to the nested dropdown component */\n @Prop({ mutable: true }) dropDownConfig?: Partial<DropdownInterface> = {};\n\n @Watch('dropDownConfig')\n setDataListOpts() {\n if (!this.datalist || !this.selectWrap) return;\n\n this.datalist.input = this.inputCtrl;\n\n const currDWConfig = this.datalist.dropDownConfig || {};\n this.datalist.dropDownConfig = {\n ...currDWConfig,\n ...this.dropDownConfig,\n tetherTo: this.selectWrap,\n };\n }\n\n /**\n * A function that customizes the tag value to be rendered when `multiple=\"true\"`.\n * @param option - the incoming option that was selected\n * @param index - the incoming option index\n * @returns Should return either a string / templateResult or a string containing trusted HTML or an HTMLElement\n */\n @Prop() valueTagTemplate: (option: OptionInterface, index: number) => string;\n\n // Custom Events\n\n /**\n * Emitted when the value has changed.\n */\n @Event() nanoChange!: EventEmitter<SelectChangeEventDetail>;\n\n /**\n * Emitted when the select loses focus.\n */\n @Event() nanoBlur!: EventEmitter<void>;\n\n /**\n * Emitted when the select has focus.\n */\n @Event() nanoFocus!: EventEmitter<void>;\n\n /**\n * Emitted when the select has been created.\n * @internal\n */\n @Event() nanoDidLoad!: EventEmitter<void>;\n\n /**\n * Emitted when the select has been removed.\n * @internal\n */\n @Event() nanoDidUnload!: EventEmitter<void>;\n\n /**\n * Emitted when a keyboard input occurred on a multiple=\"true\" input\n */\n @Event() nanoSearchChange!: EventEmitter<InputChangeEventDetail>;\n\n /**\n * Called when validation is performed (which depends on `validateOn`).\n * @returns event.detail: `{ isValid: boolean, errorMessage: string, originalEvent: Event }`.\n */\n @Event() nanoValidate: EventEmitter<ControlValidityEventDetail>;\n\n // Public Methods\n\n /**\n * Get the current state of the control.\n * @param validateFirst - perform validation first before reporting\n * @returns `{ isValid: boolean, errorMessage: string }`\n */\n @Method()\n async reportValidity(validateFirst: boolean): Promise<ControlValidity> {\n return new Promise((resolve) => {\n if (validateFirst) {\n this.customValidate();\n this.showInlineValidation();\n }\n setTimeout(() => {\n resolve({\n isValid: !this._invalid,\n errorMessage: this.nativeSelect.validationMessage,\n });\n }, 50);\n });\n }\n\n /**\n * Sets focus on the specified `nano-select`. Use this method instead of the global\n * `select.focus()`.\n */\n @Method()\n async setFocus() {\n if (!this.inputCtrl) return;\n this.inputCtrl.focus();\n setTimeout(() => this.inputCtrl.click(), 50);\n }\n\n /**\n * @returns the native `<select>` element used under the hood.\n */\n @Method()\n getSelectElement(): Promise<HTMLSelectElement> {\n return Promise.resolve(this.nativeSelect!);\n }\n\n /**\n * Invalidate the field and show a custom error message.\n * To clear the error you will need to re-call this method with an empty string.\n */\n @Method()\n async showError(message: string) {\n if (this.nativeSelect) {\n this.customError = message;\n this.nativeSelect.setCustomValidity(message);\n this.showInlineValidation();\n }\n }\n\n /* Logic */\n\n private get valArray() {\n return typeof this.value === 'string'\n ? this.value.length\n ? [this.value]\n : []\n : this.value;\n }\n\n private isValidValues() {\n return this.valArray.find((val) =>\n (this.options as OptionInterface[]).find((opt) => opt.value === val)\n );\n }\n\n private customValidate = () => {\n if (\n !this.nativeSelect ||\n !!this.customError ||\n !this.nativeSelect['setCustomValidity']\n )\n return;\n\n this.nativeSelect.setCustomValidity('');\n // add custom validations 'cos html5 validations are a bit rubbish on selects\n if (this.required && !this.valArray.length) {\n this.nativeSelect.setCustomValidity('Please fill in this field.');\n return true;\n }\n if (\n this.valArray.length &&\n !this.allowCustomValues &&\n !this.isValidValues()\n ) {\n this.nativeSelect.setCustomValidity(\n 'Please choose an item from this field.'\n );\n return true;\n }\n if (this.max && this.valArray.length > this.max) {\n this.nativeSelect.setCustomValidity(\n `Only up to ${this.max} values are allowed.`\n );\n return true;\n }\n if (this.min && this.valArray.length < this.min) {\n this.nativeSelect.setCustomValidity(\n `You must select a minimum of ${this.min} values.`\n );\n return true;\n }\n return false;\n };\n\n private showInlineValidation = (ev?: Event) => {\n if (this.validateOn === 'submitThenDirty') this.validateOn = 'dirty';\n\n this._invalid = false;\n this.showErrorMsg = false;\n this.errorMessage = '';\n\n if (!this.nativeSelect.validity.valid) {\n this.errorMessage = this.nativeSelect.validationMessage;\n this._invalid = true;\n this.showErrorMsg = true;\n }\n this.nanoValidate.emit({\n isValid: !this.invalid,\n errorMessage: this.errorMessage,\n originalEvent: ev,\n });\n };\n\n private handleInvalid = (ev: Event) => {\n this._invalid = true;\n\n if (this.validateOn === 'submit') {\n this._invalid = this.showErrorMsg = this.customValidate();\n }\n if (this.showInlineError) ev.preventDefault();\n\n requestAnimationFrame(() => this.showInlineValidation(ev));\n };\n\n private setValue = (e: CustomEvent<HTMLNanoOptionElement>) => {\n e.preventDefault();\n\n if (!this.multiple) {\n this.value = e.detail.value;\n return;\n }\n if (this.value && this.value.length && this.value.includes(e.detail.value))\n return;\n if (this.max && this.value.length === this.max) return;\n\n if (\n Number.isNaN(this._maxValuesVisible) ||\n this.value.length <= this._maxValuesVisible\n ) {\n this.currInsertIndex++;\n }\n\n this.value = [\n ...this.value.slice(0, this.currInsertIndex),\n e.detail.value,\n ...this.value.slice(this.currInsertIndex),\n ];\n this.inputSearchVal = '';\n };\n\n private removeValue = (toFind?: string) => {\n if (!this.multiple || !this.value.length) return;\n\n if (!toFind) toFind = this.value[this.value.length - 1];\n this.value = (this.value as Array<string>).filter((val) => val !== toFind);\n\n if (\n Number.isNaN(this._maxValuesVisible) ||\n this.value.length <= this._maxValuesVisible\n ) {\n this.currInsertIndex--;\n }\n this.setFocus();\n };\n\n private slotChangeObserver() {\n if (!window['MutationObserver']) return;\n\n const mo = (this.mo = new MutationObserver(() =>\n this.processSlottedContent()\n ));\n mo.observe(this.el, { childList: true, subtree: true });\n }\n\n private processSlottedContent() {\n // see if we have label / helper content\n this.hasLabelSlot = !!this.el.querySelectorAll('[slot=\"label\"]').length;\n this.hasHelperSlot = !!this.el.querySelector('[slot=\"helper\"]');\n this.hasHelperEndSlot = !!this.el.querySelector('[slot=\"helper-end\"]');\n }\n\n private getOptionWithValue(value: string) {\n let index: number;\n const options = this.datalist?.activeOptions?.length\n ? this.datalist.activeOptions\n : (this.options as OptionInterface[]);\n const option = options.find((opt, i) => {\n index = i;\n return !opt.disabled && opt.value?.length && opt.value === value;\n });\n return [option, index] as const;\n }\n\n private getLabel(toFind: string) {\n const option = this.getOptionWithValue(toFind)[0];\n return option && option.label ? option.label : toFind;\n }\n\n /* Event handling */\n\n @Listen('reset', { target: 'body' })\n onReset(e) {\n const form = this.form\n ? document.querySelector('#' + this.form)\n : this.el.closest('form');\n if (!form || e.target !== this.el.closest('form')) return;\n\n this.clearSelectValue();\n }\n\n @Listen('mousedown', { target: 'body' })\n @Listen('keydown')\n handleBlur(e: KeyboardEvent | MouseEvent) {\n if (!this.hasFocus) return;\n\n const kev = e as KeyboardEvent;\n let target: Element;\n\n requestAnimationFrame(() => {\n if (kev.key) {\n if (kev.key !== 'Tab') return;\n target = getActiveElement();\n } else target = e.target as Element;\n\n if (closestElement(this.el.tagName.toLowerCase(), target) !== this.el) {\n this.onBlur();\n }\n });\n }\n\n private setOptions = () => {\n if (\n !this.datalist ||\n !this.datalist.activeOptions ||\n !this.datalist.activeOptions.length\n )\n return;\n\n this._elementOptions = this.datalist.activeOptions.map((ao) => {\n const { value, selected, label, filterMeta } = ao;\n return { value, selected, label, filterMeta };\n });\n this.customValidate();\n };\n\n private handleDocumentKeyDown = (ev: KeyboardEvent) => {\n if (!this.multiple || !this.hasFocus) return;\n\n if (!this.inputSearchVal) {\n let rm: HTMLSpanElement;\n\n switch (ev.key) {\n case 'Backspace':\n if (this.inputCtrl.previousElementSibling)\n rm = this.inputCtrl.previousElementSibling as HTMLSpanElement;\n else break;\n\n this.removeValue(rm.dataset.value || null);\n break;\n\n case 'Delete':\n if (this.inputCtrl.nextElementSibling)\n rm = this.inputCtrl.nextElementSibling as HTMLSpanElement;\n else break;\n\n this.removeValue(rm.dataset.value || null);\n break;\n\n case 'ArrowLeft':\n case 'ArrowRight':\n if (!this.value.length) break;\n\n if (ev.key === 'ArrowLeft' && this.inputCtrl.previousSibling)\n this.currInsertIndex--;\n if (ev.key === 'ArrowRight' && this.inputCtrl.nextSibling)\n this.currInsertIndex++;\n\n setTimeout(() => {\n this.inputCtrl.focus();\n }, 20);\n ev.preventDefault();\n break;\n }\n }\n };\n\n private onBlur = () => {\n this.hasFocus = false;\n\n requestAnimationFrame(() => {\n if (this.validateOn === 'dirty' && !this.hasFocus)\n this.showInlineValidation();\n });\n this.nanoBlur.emit();\n\n if (!this.allowCustomValues && this.multiple) {\n this.inputSearchVal = '';\n const event = new window.Event('change');\n this.inputCtrl.dispatchEvent(event);\n }\n };\n\n private onFocus = () => {\n this.hasFocus = true;\n this.nanoFocus.emit();\n };\n\n private clearSelectValue = (ev?: Event) => {\n if (this.clearSelect && !this.readonly && !this.disabled && ev) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n if (this.multiple) {\n this.value = [];\n this.currInsertIndex = -1;\n } else this.value = '';\n\n this.inputCtrl.value = '';\n const event = new window.Event('change');\n this.inputCtrl.dispatchEvent(event);\n };\n\n private onClick = () => {\n this.setFocus();\n };\n\n /* Multi event handlers */\n\n private onDragStart = (ev: MouseEvent) => {\n const ele = ev.target as HTMLSpanElement;\n this.dragVal = ele.dataset.value;\n };\n\n private onDragEnd = (ev) => {\n this.dragVal = null;\n ev.preventDefault();\n };\n\n private onDragLeave = (ev: MouseEvent) => {\n const ele = ev.target as HTMLSpanElement;\n const spanVal: string =\n ele.dataset && ele.dataset.value ? ele.dataset.value : null;\n\n if (\n !spanVal ||\n this.dragVal === spanVal ||\n !this.value.includes(this.dragVal)\n ) {\n ev.preventDefault();\n return;\n }\n\n const to = this.value.indexOf(spanVal);\n const from = this.value.indexOf(this.dragVal);\n const tmpArr = this.value as Array<string>;\n const tmpVal = tmpArr[to];\n\n tmpArr[to] = tmpArr[from];\n tmpArr[from] = tmpVal;\n this.value = [...tmpArr];\n };\n\n private onMultiInput = (ev) => {\n this.inputSearchVal = ev.target.value.trim();\n this.nanoSearchChange.emit({ value: ev.target.value.trim() });\n };\n\n /* Stencil Component lifecycle hooks */\n\n connectedCallback() {\n this.debounceChanged();\n this.watchMaxValuesVisible();\n\n if (!Build.isBrowser) return;\n\n this.el.dispatchEvent(\n new CustomEvent('nanoDidLoad', {\n detail: this.el,\n })\n );\n }\n\n disconnectedCallback() {\n document.dispatchEvent(\n new CustomEvent('nanoDidUnload', {\n detail: this.el,\n })\n );\n\n if (!Build.isBrowser) return;\n if (this.mo) this.mo.disconnect();\n }\n\n componentDidLoad() {\n this.slotChangeObserver();\n this.customValidate();\n this.setDataListOpts();\n requestAnimationFrame(() => (this.onInit = false));\n }\n\n componentWillLoad() {\n this.processSlottedContent();\n }\n\n render() {\n const labelId = this.selectId + '-lbl';\n const moreId =\n this.showInlineError || this.hasHelperSlot\n ? this.selectId + '-moreId'\n : '';\n const helperEndId = this.hasHelperEndSlot ? this.selectId + '-helper' : '';\n\n this.rtl = (this.el.ownerDocument as Document).dir === 'rtl';\n this.valueItems = [];\n\n const compWrapOptions = (({\n el,\n floatLabel,\n label,\n errorMessage,\n showInlineError,\n hasHelperSlot,\n hasHelperEndSlot,\n hasLabelSlot,\n hideLabel,\n placeholder,\n rtl,\n }) => ({\n el,\n floatLabel,\n label,\n errorMessage,\n showInlineError,\n hasHelperSlot,\n hasHelperEndSlot,\n hasLabelSlot,\n hideLabel,\n placeholder,\n rtl,\n }))(this);\n const wrapOptions = {\n ...compWrapOptions,\n labelId,\n moreId,\n helperEndId,\n hasValue: !!this.value.length || !!this.inputSearchVal.length,\n controlId: this.selectId,\n };\n\n const controlOptions = (({ readonly, disabled }) => ({\n readonly,\n disabled,\n clearControl: this.clearSelect,\n }))(this);\n\n return (\n <Host\n type={this.multiple ? 'select-multiple' : 'select-one'}\n aria-disabled={this.disabled ? 'true' : null}\n class={{\n ...createColorClasses(this.color),\n 'has-value': !!this.value.length || !!this.inputSearchVal.length,\n 'has-focus': this.hasFocus,\n 'is-invalid': this.invalid,\n 'has-label': this.label !== null && !this.floatLabel,\n 'has-float-label': this.label !== null && this.floatLabel,\n rtl: this.rtl,\n 'has-multiple': this.multiple,\n 'has-clr-btn': this.clearSelect,\n masked: this.mask,\n }}\n >\n <FormControlWrap {...wrapOptions}>\n <FormControl\n {...controlOptions}\n onClearText={this.clearSelectValue}\n control={this.el}\n ref={(el) => (this.selectWrap = el)}\n endValueSlot={\n <slot name=\"down-arrow\">\n <nano-icon slot=\"value-end\" name=\"light/chevron-down\" />\n </slot>\n }\n >\n {this.multiple && (\n <div class=\"select__multi-wrap select\">\n {this.multipleValues(labelId, moreId, helperEndId)}\n </div>\n )}\n {!this.multiple && [\n this.mask && (\n <div class=\"select__mask\">\n {this.getLabel(this.value as string)}\n </div>\n ),\n <input\n id={this.selectId}\n class=\"select__native-input\"\n ref={(input) => (this.inputCtrl = input)}\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n disabled={this.disabled}\n form={this.form}\n placeholder={this.placeholder}\n readOnly={true}\n required={this.required}\n value={this.getLabel(this.value as string)}\n onFocus={this.onFocus}\n />,\n ]}\n </FormControl>\n </FormControlWrap>\n {!this.readonly && !this.disabled && (\n <nano-datalist\n onNanoOptionsUpdated={this.setOptions}\n ref={(el) => (this.datalist = el)}\n selected={this.valArray}\n type={this.multiple ? 'selctMulti' : 'select'}\n onNanoSelect={this.setValue}\n onNanoDeselect={(e) => {\n e.preventDefault();\n this.removeValue(e.detail.value);\n }}\n options={this._options.length ? this._options : undefined}\n >\n {this.allowCustomValues &&\n this.multiple &&\n !!this.inputSearchVal && (\n <nano-option\n slot=\"list-top\"\n value={this.inputSearchVal}\n selected={false}\n label={this.inputSearchVal}\n onNanoSelect={() => this.inputCtrl.focus()}\n >\n <span slot=\"check-icon\"></span>\n Add '{this.inputSearchVal}'\n </nano-option>\n )}\n <slot />\n </nano-datalist>\n )}\n\n <select\n id={this.selectId + '-hidden'}\n class=\"select__native-ctrl\"\n ref={(select) => (this.nativeSelect = select)}\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n disabled={this.disabled}\n form={this.form}\n multiple={this.multiple}\n name={this.name}\n required={this.required}\n onInvalid={this.handleInvalid}\n >\n {this.allowCustomValues &&\n this.valArray.map((val) => {\n return (\n <option value={val} selected={true}>\n {val}\n </option>\n );\n })}\n {!this.allowCustomValues &&\n this.options.map((opt: OptionInterface) => {\n return (\n <option\n value={opt.value}\n selected={this.valArray.includes(opt.value)}\n disabled={opt.disabled}\n label={opt.label}\n >\n {this.valArray.includes(opt.value)}\n </option>\n );\n })}\n </select>\n </Host>\n );\n }\n\n private multipleValues(\n labelId: string,\n moreId: string,\n helperEndId: string\n ): VNode | (VNode | VNode[])[] {\n const input: VNode = (\n <input\n class=\"select__multi-input\"\n id={this.selectId}\n ref={(input) => (this.inputCtrl = input)}\n readOnly={this.readonly}\n disabled={this.disabled}\n autoFocus={this.autofocus}\n autocomplete=\"off\"\n onKeyDown={this.handleDocumentKeyDown}\n onInput={this.onMultiInput}\n value={this.inputSearchVal}\n onTouchStart={this.onClick}\n onMouseDown={this.onClick}\n onFocus={this.onFocus}\n placeholder={\n this.placeholder && !this.value.length ? this.placeholder : ''\n }\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n />\n );\n if (!this.value.length) return input;\n\n const toReturn: VNode[] = [];\n\n (this.value as Array<string>).forEach((val, i) => {\n if (!Number.isNaN(this._maxValuesVisible) && i > this._maxValuesVisible)\n return;\n\n let valueTag: VNode;\n\n if (i === this._maxValuesVisible) {\n valueTag = (\n <span data-value={val} class=\"select__multi-value\">\n <span>+{this.value.length - this._maxValuesVisible}</span>\n </span>\n );\n } else {\n valueTag = (\n <span\n onDragStart={this.onDragStart}\n onDragLeave={this.onDragLeave}\n onDragEnd={this.onDragEnd}\n onDragOver={(e) => e.preventDefault()}\n draggable\n data-value={val}\n ref={(span) => this.valueItems.push(span)}\n class=\"select__multi-value select__multi-value--closable\"\n >\n {this.valueTagTemplate ? (\n <span\n innerHTML={\n this.valueTagTemplate\n ? this.valueTagTemplate(...this.getOptionWithValue(val))\n : undefined\n }\n />\n ) : (\n <span>{this.getLabel(val)}</span>\n )}\n <button\n class=\"select__multi-value-remove\"\n type=\"button\"\n tabindex=\"-1\"\n onTouchEnd={() => {\n this.removeValue(val);\n }}\n onMouseUp={() => {\n this.removeValue(val);\n }}\n >\n <nano-icon name=\"light/times\"></nano-icon>\n </button>\n </span>\n );\n }\n\n if (i === 0 && this.currInsertIndex < 0) {\n toReturn.push(input, valueTag);\n } else if (i === this.currInsertIndex) {\n toReturn.push(valueTag, input);\n } else {\n toReturn.push(valueTag);\n }\n });\n\n return toReturn;\n }\n}\n"],"version":3}
1
+ {"file":"select.js","mappings":";;;;;;;;;;;;;;;AAAA,MAAM,SAAS,GAAG,2poBAA2poB;;ACgC7qoB,IAAI,SAAS,GAAG,CAAC,CAAC;MAuBL,MAAM;EAUjB,IAAY,SAAS;IACnB,OAAO,IAAI,CAAC,UAAU,CAAC;GACxB;EACD,IAAY,SAAS,CAAC,KAAK;IACzB,IAAI,KAAK,KAAK,IAAI,CAAC,UAAU;MAAE,OAAO;IACtC,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IACxB,IAAI,CAAC,eAAe,EAAE,CAAC;GACxB;EAMD,IAAY,UAAU;IACpB,OAAO,IAAI,CAAC,WAAW,CAAC;GACzB;EACD,IAAY,UAAU,CAAC,GAAgB;IACrC,IAAI,IAAI,CAAC,WAAW,KAAK,GAAG;MAAE,OAAO;IACrC,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC;IACvB,IAAI,CAAC,eAAe,EAAE,CAAC;GACxB;EAGD,IAAY,QAAQ;IAClB,OAAO,IAAI,CAAC,SAAS,CAAC;GACvB;EACD,IAAY,QAA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AAC,CAAC;WACvB,EACD,SAAS,EAAE;YACT,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;WACvB,IAED,iBAAW,IAAI,EAAC,aAAa,GAAa,CACnC,CACJ,CACR,CAAC;OACH;MAED,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,eAAe,GAAG,CAAC,EAAE;QACvC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;OAChC;WAAM,IAAI,CAAC,KAAK,IAAI,CAAC,eAAe,EAAE;QACrC,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;OAChC;WAAM;QACL,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;OACzB;KACF,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;GACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/select/select.scss?tag=nano-select&encapsulation=scoped","./src/components/select/select.tsx"],"sourcesContent":["@import '../../global/style/utilities/globals';\n@import '../../global/style/nano-theme/form';\n@import '../../global/style/nano-theme/layers';\n@import '../form-control/form-control';\n@import '../form-control/form-control-vars';\n\n:host {\n @include formControlVars;\n\n /**\n * @prop --max-menu-height: the maximum of the dropdown menu. Defaults to 50vw.\n */\n\n position: relative;\n inline-size: 100%;\n padding: 0 !important;\n font-family: $font-family-base;\n display: block;\n}\n\n:host(.nano-color) {\n --input-border-style--focus:\n #{$input-border-style} var(\n --nano-color-tint,\n #{nano-color(\n primary,\n tint\n )}\n );\n --multi-input-value-bg: var(--nano-color-tint-rgb);\n --multi-input-value-border: var(--nano-color-shade);\n --multi-input-value-text-color: var(--nano-color-contrast);\n\n color: current-color(base);\n}\n\n:host-context(nano-item:not(.item-label)) {\n --padding-start: 0;\n}\n\n:host([disabled]:not([disabled='false'])) {\n * {\n pointer-events: none !important;\n }\n}\n\nselect {\n display: none;\n}\n\n.select__native-input {\n @include text-inherit();\n\n padding: unset;\n padding-inline: var(--padding-start) var(--padding-end);\n padding-block: 0;\n border-radius: var(--input-border-radius);\n text-overflow: ellipsis;\n color: var(--input-text-color);\n display: inline-block;\n flex: 1;\n inline-size: 100%;\n max-inline-size: 100%;\n max-block-size: 100%;\n border: 0;\n outline: none;\n background: transparent;\n appearance: none;\n margin: 0;\n box-sizing: border-box;\n resize: none;\n overflow: hidden;\n cursor: default;\n line-height: 2.5em;\n\n .has-float-label & {\n line-height: 2.1em;\n min-block-size: 2.1em;\n padding-block-start: 1.4em;\n }\n\n &::selection {\n background: transparent;\n }\n\n /* stylelint-disable-next-line selector-no-vendor-prefix */\n &::-moz-selection {\n background: transparent;\n }\n\n &::placeholder {\n color: var(--placeholder-color);\n font-family: inherit;\n font-style: var(--placeholder-font-style);\n font-weight: var(--placeholder-font-weight);\n opacity: var(--placeholder-opacity);\n line-height: inherit;\n min-block-size: initial;\n }\n\n /* stylelint-disable-next-line selector-no-vendor-prefix */\n &::-moz-placeholder {\n line-height: 2.8em;\n text-overflow: ellipsis;\n }\n\n &:-webkit-autofill {\n background-color: transparent;\n }\n\n &::-webkit-search-decoration,\n &::-webkit-search-cancel-button,\n &::-webkit-search-results-button,\n &::-webkit-search-results-decoration {\n appearance: none;\n }\n\n &:invalid {\n box-shadow: none;\n }\n\n &::-ms-clear,\n &::-ms-reveal {\n display: none;\n }\n\n &.resizable {\n resize: vertical;\n overflow: auto;\n }\n\n .form-ctrl__textarea & {\n line-height: 1.5em;\n padding-block: var(--padding-top) var(--padding-bottom);\n white-space: pre-wrap;\n\n &::placeholder {\n line-height: 1.5em;\n }\n }\n\n .has-float-label.textarea & {\n padding-block-start: 1.8em;\n }\n\n :host(.masked) & {\n opacity: 0;\n position: absolute;\n inset-inline-start: 0;\n inset-block-start: 0;\n }\n}\n\n.select__mask {\n @include text-inherit();\n\n padding-inline: var(--padding-start) var(--padding-end);\n padding-block: 0;\n border-radius: var(--input-border-radius);\n pointer-events: none;\n line-height: 2.5em;\n min-block-size: 2.5em;\n}\n\n// multi stuff\n\n.select__multi {\n &-wrap {\n padding-block: 0 var(--padding-bottom);\n padding-inline: 0 0;\n display: flex;\n flex: 1;\n flex-wrap: wrap;\n overflow: hidden;\n align-items: flex-start;\n\n :host(.has-float-label) & {\n padding-block-start: 1em;\n }\n }\n\n &-input {\n @include text-inherit();\n\n padding-inline: var(--padding-start) var(--padding-end);\n padding-block: var(--padding-bottom) 0;\n min-inline-size: 50px;\n inline-size: 100%;\n max-block-size: 100%;\n appearance: none;\n border: 0;\n outline: none;\n display: inline-block;\n background: transparent;\n flex: 0;\n position: relative;\n box-sizing: border-box;\n line-height: calc(2.5em - var(--padding-bottom));\n block-size: calc(2.5em - var(--padding-bottom));\n\n &:last-child {\n flex: 1;\n }\n }\n\n &-value {\n margin-block: var(--padding-bottom) 0;\n margin-inline: var(--padding-start) -3px;\n background: rgb(var(--multi-input-value-bg) / 80%);\n color: var(--multi-input-value-text-color);\n border: 1px solid;\n border-color: var(--multi-input-value-border);\n padding: 0.35em 0.5em;\n display: flex;\n align-items: center;\n font-size: var(--input-font-size);\n letter-spacing: 1px;\n max-block-size: calc(2.5em - 8px);\n max-inline-size: calc(100% - 8px);\n border-radius: 4px;\n\n &--closable {\n padding-inline-end: 0;\n }\n\n span {\n text-overflow: ellipsis;\n white-space: nowrap;\n max-inline-size: 100%;\n overflow: hidden;\n }\n }\n\n &-value-remove {\n @include background-position(center);\n\n padding-inline-start: 0.5em;\n margin: 0;\n color: inherit;\n border: 0;\n outline: none;\n background-color: transparent;\n background-repeat: no-repeat;\n appearance: none;\n display: flex;\n align-items: center;\n inset-block-start: 0;\n font-size: 1em;\n\n nano-icon {\n --color: var(--multi-input-value-text-color);\n }\n }\n}\n\n.form-ctrl__float-label {\n inline-size: calc(100% - (1em + (var(--padding-start) * 2)));\n\n :host(.has-focus.has-multiple) & {\n transform: translateY(-110%);\n font-size: 0.8em;\n }\n\n :host(.has-value.has-multiple) & {\n transform: translateY(21%);\n inset-block-start: 0;\n }\n}\n\n:host(.has-focus) select,\n:host(.has-focus) a,\n:host(.has-focus) button {\n pointer-events: auto;\n}\n","import {\n Build,\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n Host,\n Method,\n Prop,\n State,\n Watch,\n h,\n VNode,\n Listen,\n} from '@stencil/core';\n\nimport { getActiveElement } from '../../utils/active-element';\nimport { closestElement } from '../../utils/dom';\nimport { createColorClasses } from '../../utils/theme';\nimport { debounce, debounceEvent } from '../../utils/throttle';\nimport { FormControl, FormControlWrap } from '../form-control/form-control';\nimport type {\n Color,\n SelectChangeEventDetail,\n InputChangeEventDetail,\n ControlValidityEventDetail,\n ControlValidity,\n OptionInterface,\n DropdownInterface,\n} from '../../interface';\n\nlet selectIds = 0;\n\n/**\n * The select component is a wrapper to the HTML select element with custom styling and additional functionality.\n * It accepts most of the same properties as the HTML [select](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select).\n * It's multi selection functionality is vastly improved from the native solution. It allows for the control of\n * value order through drag and drop or changing the insertion point with arrow keys. It also can allow for user defined values.\n *\n * @slot start - suitable for inline action buttons or icons that may add extra contextual information\n * @slot end - suitable for inline action buttons or icons that may add extra contextual information\n * @slot value-start - similar to 'start', however clicking elements using this slot will activate the input control. This would be suitable to show a secondary 'value' for context or to show a dropdown arrow if using a datalist\n * @slot value-end - similar to 'end', however clicking elements using this slot will activate the input control. This would be suitable to show a secondary 'value' for context or to show a dropdown arrow if using a datalist\n * @slot label - if you do not set a label attribute, you can use this slot for more complex markup\n * @slot helper - helper text to accompany the form field underneath.\n * @slot helper-end - helper text to accompany the form field on the side.\n * @slot down-arrow - use this to replace the default down arrow\n * @slot - default slot; nest `nano-option` elements\n */\n@Component({\n tag: 'nano-select',\n styleUrl: 'select.scss',\n scoped: true,\n})\nexport class Select implements ComponentInterface {\n private nativeSelect?: HTMLSelectElement;\n private valueItems: Array<HTMLSpanElement> = [];\n private dragVal: string;\n private mo?: MutationObserver;\n private selectId = `nano-select-${selectIds++}`;\n private rtl: boolean = false;\n private onInit: boolean = true;\n private customError: string = '';\n\n private get inputCtrl() {\n return this._inputCtrl;\n }\n private set inputCtrl(input) {\n if (input === this._inputCtrl) return;\n this._inputCtrl = input;\n this.setDataListOpts();\n }\n private _inputCtrl?: HTMLInputElement;\n\n // we don't want these rendered eles decorated with @State\n // because that will cause re-renders. Use get/set to set datalist options\n private _selectWrap: HTMLElement;\n private get selectWrap() {\n return this._selectWrap;\n }\n private set selectWrap(ele: HTMLElement) {\n if (this._selectWrap === ele) return;\n this._selectWrap = ele;\n this.setDataListOpts();\n }\n\n private _datalist: HTMLNanoDatalistElement;\n private get datalist() {\n return this._datalist;\n }\n private set datalist(ele: HTMLNanoDatalistElement) {\n if (this._datalist === ele) return;\n this._datalist = ele;\n this.setDataListOpts();\n }\n\n constructor() {\n this.showInlineValidation = debounce(this.showInlineValidation, 50);\n }\n\n @State() currInsertIndex: number = -1;\n @State() showErrorMsg = false;\n @State() errorMessage: string = '';\n @State() hasFocus = false;\n @State() hasLabelSlot: boolean = false;\n @State() hasHelperSlot: boolean = false;\n @State() hasHelperEndSlot = false;\n @State() inputSearchVal: string = '';\n\n @Element() el!: HTMLNanoSelectElement;\n\n /**\n * This will be true when the control is in an invalid state.\n * Validity is determined by the `required` prop. Or if custom validity message is set.\n */\n @Prop({ reflect: true })\n get invalid() {\n return this._invalid;\n }\n @State() _invalid = false;\n\n /**\n * Current validation message - if any. @readonly\n */\n @Prop()\n get validityMessage() {\n if (!this.nativeSelect) return '';\n return this.nativeSelect.validationMessage;\n }\n\n /**\n * The color to use from your application's color palette.\n * Default options are: `\"primary\"`, `\"secondary\"`, `\"tertiary\"`, `\"success\"`, `\"warning\"`, `\"danger\"`, `\"light\"`, `\"medium\"`, and `\"dark\"`.\n */\n @Prop() color?: Color;\n\n /**\n * This Boolean attribute lets you specify that a form control should have select focus when the page loads.\n */\n @Prop() autofocus = false;\n\n /**\n * If `true`, the user cannot interact with the select.\n */\n @Prop({ reflect: true }) disabled = false;\n\n /**\n * When should the field perform validation\n */\n @Prop({ mutable: true }) validateOn?: 'dirty' | 'submit' | 'submitThenDirty' =\n 'submitThenDirty';\n\n /**\n * Whether to show validation errors underneath input\n */\n @Prop({ reflect: true }) showInlineError = true;\n\n /**\n * String to place within a label element. Alternatively use the 'label' slot\n */\n @Prop() label!: string;\n\n /**\n * Visually hide the label - but make it accessible.\n */\n @Prop() hideLabel?: boolean = false;\n\n /**\n * Enable floating label behaviour. Will disable placeholder if set.\n */\n @Prop() floatLabel: boolean = false;\n\n /**\n * If `true`, the user can enter more than one value. This attribute applies when the type attribute is set to `\"email\"` or `\"file\"`, otherwise it is ignored.\n */\n @Prop() multiple?: boolean = false;\n\n /** When `multiple=\"true\"`, control how many values to show within the control at once.\n * After the maximum, \"+n\" will be shown to indicate the number of additional items that are selected. */\n @Prop({ mutable: true }) maxValuesVisible?: boolean | number = 3;\n private _maxValuesVisible: number;\n\n @Watch('maxValuesVisible')\n watchMaxValuesVisible() {\n if (!this.multiple) return;\n\n this._maxValuesVisible =\n this.maxValuesVisible === false ? NaN : Number(this.maxValuesVisible);\n\n // make sure maxValuesVisible is a number\n if (!Number.isNaN(this._maxValuesVisible)) {\n if (this.currInsertIndex > this._maxValuesVisible) {\n // make the input position is no more than the max\n this.currInsertIndex = this._maxValuesVisible;\n }\n } else {\n // if maxValuesVisible is undefined, it will be `NaN`\n this.currInsertIndex = this.value.length - 1;\n }\n }\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.selectId + '-name';\n\n /**\n * Instructional text that shows before the select has a value. Text set here will be placed inside the label when a value is set.\n * If you don't want this behaviour just set the first option to have no value.\n */\n @Prop() placeholder?: string | null;\n\n /**\n * If `true`, the user cannot modify the value.\n */\n @Prop({ reflect: true }) readonly = false;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * The initial size of the control.\n */\n @Prop() size?: number;\n\n /**\n * Maximum number of options that can be selected when multiple is true\n */\n @Prop() max?: number;\n\n /**\n * Minimum number of options that can be selected when multiple is true\n */\n @Prop() min?: number;\n\n /**\n * The form element to associate the select with (its form owner). Must be the id of a form.\n */\n @Prop() form?: string | null;\n\n /**\n * in multiple mode, allow users to enter their own values\n */\n @Prop() allowCustomValues: boolean = false;\n\n /**\n * The value of the select.\n */\n @Prop()\n get value() {\n return this._value;\n }\n set value(val: string | string[]) {\n if (!!val && !!this._value) {\n if (JSON.stringify(val) === JSON.stringify(this._value)) return;\n }\n\n if (typeof val === 'string') {\n if (this.multiple) this._value = val.split(',');\n else this._value = val;\n } else if (Array.isArray(val)) {\n if (this.multiple) this._value = val;\n else this._value = val[0];\n }\n }\n private _value: Array<string> | string = this.multiple ? [] : '';\n\n /**\n * You can set options via js as an array of strings: `domElement.options = ['option 1', 'option 2']` or\n * objects `domElement.options = [{label: 'option 1', value: 'opt-1'}]`. See `nano-option` docs for all available properties.\n * Alternatively, you can nest `<nano-option>` elements within a `<nano-select>`\n * Regardless - reading `options` will return the current component options - slotted or otherwise\n */\n @Prop()\n get options(): Array<OptionInterface | string> {\n if (this._options.length) return this._options;\n\n if (!this.datalist || !this.datalist.activeOptions) return [];\n\n return this._elementOptions.map((ao) => {\n const { value, selected, label, filterMeta } = ao;\n return { value, selected, label, filterMeta };\n });\n }\n set options(opts: Array<OptionInterface | string>) {\n this._options = opts.map((opt) => {\n if (typeof opt === 'string') return { value: opt, label: opt };\n else return opt;\n });\n }\n private _options: OptionInterface[] = [];\n @State() _elementOptions: OptionInterface[] = [];\n\n /**\n * If `true`, a clear icon will appear in the select when there is a value. Clicking it clears the select.\n */\n @Prop() clearSelect = false;\n\n /**\n * Hide the native select element and cover with a value 'mask'.\n * Enables a fluid nano-select width upon value change (if required). Doesn't work with multiple=\"true\".\n */\n @Prop() mask = false;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `nanoSearchChange` event after each keystroke.\n */\n @Prop() debounce = 0;\n\n @Watch('debounce')\n protected debounceChanged() {\n this.nanoSearchChange = debounceEvent(this.nanoSearchChange, this.debounce);\n }\n\n @Watch('required')\n @Watch('disabled')\n @Watch('min')\n @Watch('max')\n @Watch('readonly')\n protected shouldValidate() {\n if (this.onInit) return;\n if (this.invalid) this.showErrorMsg = this._invalid = false;\n\n this.customValidate();\n if (this.validateOn !== 'dirty') return;\n this.showInlineValidation();\n }\n\n /**\n * Update the native select element when the value changes\n */\n // eslint-disable-next-line @stencil-community/no-unused-watch\n @Watch('value')\n valueChanged() {\n this.customValidate();\n\n if (this.onInit) {\n if (this.multiple) this.currInsertIndex = this.value.length - 1;\n return;\n }\n requestAnimationFrame(() => {\n this.shouldValidate();\n this.nanoChange.emit({ value: this.value });\n });\n }\n\n /** nano-dropdown config options you can pass to the nested dropdown component */\n @Prop({ mutable: true }) dropDownConfig?: Partial<DropdownInterface> = {};\n\n @Watch('dropDownConfig')\n setDataListOpts() {\n if (!this.datalist || !this.selectWrap) return;\n\n this.datalist.input = this.inputCtrl;\n\n const currDWConfig = this.datalist.dropDownConfig || {};\n this.datalist.dropDownConfig = {\n ...currDWConfig,\n ...this.dropDownConfig,\n tetherTo: this.selectWrap,\n };\n }\n\n /**\n * A function that customizes the tag value to be rendered when `multiple=\"true\"`.\n * @param option - the incoming option that was selected\n * @param index - the incoming option index\n * @returns Should return either a string / templateResult or a string containing trusted HTML or an HTMLElement\n */\n @Prop() valueTagTemplate: (option: OptionInterface, index: number) => string;\n\n // Custom Events\n\n /**\n * Emitted when the value has changed.\n */\n @Event() nanoChange!: EventEmitter<SelectChangeEventDetail>;\n\n /**\n * Emitted when the select loses focus.\n */\n @Event() nanoBlur!: EventEmitter<void>;\n\n /**\n * Emitted when the select has focus.\n */\n @Event() nanoFocus!: EventEmitter<void>;\n\n /**\n * Emitted when the select has been created.\n * @internal\n */\n @Event() nanoDidLoad!: EventEmitter<void>;\n\n /**\n * Emitted when the select has been removed.\n * @internal\n */\n @Event() nanoDidUnload!: EventEmitter<void>;\n\n /**\n * Emitted when a keyboard input occurred on a multiple=\"true\" input\n */\n @Event() nanoSearchChange!: EventEmitter<InputChangeEventDetail>;\n\n /**\n * Called when validation is performed (which depends on `validateOn`).\n * @returns event.detail: `{ isValid: boolean, errorMessage: string, originalEvent: Event }`.\n */\n @Event() nanoValidate: EventEmitter<ControlValidityEventDetail>;\n\n // Public Methods\n\n /**\n * Get the current state of the control.\n * @param validateFirst - perform validation first before reporting\n * @returns `{ isValid: boolean, errorMessage: string }`\n */\n @Method()\n async reportValidity(validateFirst: boolean): Promise<ControlValidity> {\n return new Promise((resolve) => {\n if (validateFirst) {\n this.customValidate();\n this.showInlineValidation();\n }\n setTimeout(() => {\n resolve({\n isValid: !this._invalid,\n errorMessage: this.nativeSelect.validationMessage,\n });\n }, 50);\n });\n }\n\n /**\n * Sets focus on the specified `nano-select`. Use this method instead of the global\n * `select.focus()`.\n */\n @Method()\n async setFocus() {\n if (!this.inputCtrl) return;\n this.inputCtrl.focus();\n setTimeout(() => this.inputCtrl.click(), 50);\n }\n\n /**\n * @returns the native `<select>` element used under the hood.\n */\n @Method()\n getSelectElement(): Promise<HTMLSelectElement> {\n return Promise.resolve(this.nativeSelect!);\n }\n\n /**\n * Invalidate the field and show a custom error message.\n * To clear the error you will need to re-call this method with an empty string.\n */\n @Method()\n async showError(message: string) {\n if (this.nativeSelect) {\n this.customError = message;\n this.nativeSelect.setCustomValidity(message);\n this.showInlineValidation();\n }\n }\n\n /* Logic */\n\n private get valArray() {\n return typeof this.value === 'string'\n ? this.value.length\n ? [this.value]\n : []\n : this.value;\n }\n\n private isValidValues() {\n return this.valArray.find((val) =>\n (this.options as OptionInterface[]).find((opt) => opt.value === val)\n );\n }\n\n private customValidate = () => {\n if (\n !this.nativeSelect ||\n !!this.customError ||\n !this.nativeSelect['setCustomValidity']\n )\n return;\n\n this.nativeSelect.setCustomValidity('');\n // add custom validations 'cos html5 validations are a bit rubbish on selects\n if (this.required && !this.valArray.length) {\n this.nativeSelect.setCustomValidity('Please fill in this field.');\n return true;\n }\n if (\n this.valArray.length &&\n !this.allowCustomValues &&\n !this.isValidValues()\n ) {\n this.nativeSelect.setCustomValidity(\n 'Please choose an item from this field.'\n );\n return true;\n }\n if (this.max && this.valArray.length > this.max) {\n this.nativeSelect.setCustomValidity(\n `Only up to ${this.max} values are allowed.`\n );\n return true;\n }\n if (this.min && this.valArray.length < this.min) {\n this.nativeSelect.setCustomValidity(\n `You must select a minimum of ${this.min} values.`\n );\n return true;\n }\n return false;\n };\n\n private showInlineValidation = (ev?: Event) => {\n if (this.validateOn === 'submitThenDirty') this.validateOn = 'dirty';\n\n this._invalid = false;\n this.showErrorMsg = false;\n this.errorMessage = '';\n\n if (!this.nativeSelect.validity.valid) {\n this.errorMessage = this.nativeSelect.validationMessage;\n this._invalid = true;\n this.showErrorMsg = true;\n }\n this.nanoValidate.emit({\n isValid: !this.invalid,\n errorMessage: this.errorMessage,\n originalEvent: ev,\n });\n };\n\n private handleInvalid = (ev: Event) => {\n this._invalid = true;\n\n if (this.validateOn === 'submit') {\n this._invalid = this.showErrorMsg = this.customValidate();\n }\n if (this.showInlineError) ev.preventDefault();\n\n requestAnimationFrame(() => this.showInlineValidation(ev));\n };\n\n private setValue = (e: CustomEvent<HTMLNanoOptionElement>) => {\n e.preventDefault();\n\n if (!this.multiple) {\n this.value = e.detail.value;\n return;\n }\n if (this.value && this.value.length && this.value.includes(e.detail.value))\n return;\n if (this.max && this.value.length === this.max) return;\n\n if (\n Number.isNaN(this._maxValuesVisible) ||\n this.value.length <= this._maxValuesVisible\n ) {\n this.currInsertIndex++;\n }\n\n this.value = [\n ...this.value.slice(0, this.currInsertIndex),\n e.detail.value,\n ...this.value.slice(this.currInsertIndex),\n ];\n this.inputSearchVal = '';\n };\n\n private removeValue = (toFind?: string) => {\n if (!this.multiple || !this.value.length) return;\n\n if (!toFind) toFind = this.value[this.value.length - 1];\n this.value = (this.value as Array<string>).filter((val) => val !== toFind);\n\n if (\n Number.isNaN(this._maxValuesVisible) ||\n this.value.length <= this._maxValuesVisible\n ) {\n this.currInsertIndex--;\n }\n this.setFocus();\n };\n\n private slotChangeObserver() {\n if (!window['MutationObserver']) return;\n\n const mo = (this.mo = new MutationObserver(() =>\n this.processSlottedContent()\n ));\n mo.observe(this.el, { childList: true, subtree: true });\n }\n\n private processSlottedContent() {\n // see if we have label / helper content\n this.hasLabelSlot = !!this.el.querySelectorAll('[slot=\"label\"]').length;\n this.hasHelperSlot = !!this.el.querySelector('[slot=\"helper\"]');\n this.hasHelperEndSlot = !!this.el.querySelector('[slot=\"helper-end\"]');\n }\n\n private getOptionWithValue(value: string) {\n let index: number;\n const options = this.datalist?.activeOptions?.length\n ? this.datalist.activeOptions\n : (this.options as OptionInterface[]);\n const option = options.find((opt, i) => {\n index = i;\n return !opt.disabled && opt.value?.length && opt.value === value;\n });\n return [option, index] as const;\n }\n\n private getLabel(toFind: string) {\n const option = this.getOptionWithValue(toFind)[0];\n return option && option.label ? option.label : toFind;\n }\n\n /* Event handling */\n\n @Listen('reset', { target: 'body' })\n onReset(e) {\n const form = this.form\n ? document.querySelector('#' + this.form)\n : this.el.closest('form');\n if (!form || e.target !== this.el.closest('form')) return;\n\n this.clearSelectValue();\n }\n\n @Listen('mousedown', { target: 'body' })\n @Listen('keydown')\n handleBlur(e: KeyboardEvent | MouseEvent) {\n if (!this.hasFocus) return;\n\n const kev = e as KeyboardEvent;\n let target: Element;\n\n requestAnimationFrame(() => {\n if (kev.key) {\n if (kev.key !== 'Tab') return;\n target = getActiveElement();\n } else target = e.target as Element;\n\n if (closestElement(this.el.tagName.toLowerCase(), target) !== this.el) {\n this.onBlur();\n }\n });\n }\n\n private setOptions = () => {\n if (\n !this.datalist ||\n !this.datalist.activeOptions ||\n !this.datalist.activeOptions.length\n )\n return;\n\n this._elementOptions = this.datalist.activeOptions.map((ao) => {\n const { value, selected, label, filterMeta } = ao;\n return { value, selected, label, filterMeta };\n });\n this.customValidate();\n };\n\n private handleDocumentKeyDown = (ev: KeyboardEvent) => {\n if (!this.multiple || !this.hasFocus) return;\n\n if (!this.inputSearchVal) {\n let rm: HTMLSpanElement;\n\n switch (ev.key) {\n case 'Backspace':\n if (this.inputCtrl.previousElementSibling)\n rm = this.inputCtrl.previousElementSibling as HTMLSpanElement;\n else break;\n\n this.removeValue(rm.dataset.value || null);\n break;\n\n case 'Delete':\n if (this.inputCtrl.nextElementSibling)\n rm = this.inputCtrl.nextElementSibling as HTMLSpanElement;\n else break;\n\n this.removeValue(rm.dataset.value || null);\n break;\n\n case 'ArrowLeft':\n case 'ArrowRight':\n if (!this.value.length) break;\n\n if (ev.key === 'ArrowLeft' && this.inputCtrl.previousSibling)\n this.currInsertIndex--;\n if (ev.key === 'ArrowRight' && this.inputCtrl.nextSibling)\n this.currInsertIndex++;\n\n setTimeout(() => {\n this.inputCtrl.focus();\n }, 20);\n ev.preventDefault();\n break;\n }\n }\n };\n\n private onBlur = () => {\n this.hasFocus = false;\n\n requestAnimationFrame(() => {\n if (this.validateOn === 'dirty' && !this.hasFocus)\n this.showInlineValidation();\n });\n this.nanoBlur.emit();\n\n if (!this.allowCustomValues && this.multiple) {\n this.inputSearchVal = '';\n const event = new window.Event('change');\n this.inputCtrl.dispatchEvent(event);\n }\n };\n\n private onFocus = () => {\n this.hasFocus = true;\n this.nanoFocus.emit();\n };\n\n private clearSelectValue = (ev?: Event) => {\n if (this.clearSelect && !this.readonly && !this.disabled && ev) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n if (this.multiple) {\n this.value = [];\n this.currInsertIndex = -1;\n } else this.value = '';\n\n this.inputCtrl.value = '';\n const event = new window.Event('change');\n this.inputCtrl.dispatchEvent(event);\n };\n\n private onClick = () => {\n this.setFocus();\n };\n\n /* Multi event handlers */\n\n private onDragStart = (ev: MouseEvent) => {\n const ele = ev.target as HTMLSpanElement;\n this.dragVal = ele.dataset.value;\n };\n\n private onDragEnd = (ev) => {\n this.dragVal = null;\n ev.preventDefault();\n };\n\n private onDragLeave = (ev: MouseEvent) => {\n const ele = ev.target as HTMLSpanElement;\n const spanVal: string =\n ele.dataset && ele.dataset.value ? ele.dataset.value : null;\n\n if (\n !spanVal ||\n this.dragVal === spanVal ||\n !this.value.includes(this.dragVal)\n ) {\n ev.preventDefault();\n return;\n }\n\n const to = this.value.indexOf(spanVal);\n const from = this.value.indexOf(this.dragVal);\n const tmpArr = this.value as Array<string>;\n const tmpVal = tmpArr[to];\n\n tmpArr[to] = tmpArr[from];\n tmpArr[from] = tmpVal;\n this.value = [...tmpArr];\n };\n\n private onMultiInput = (ev) => {\n this.inputSearchVal = ev.target.value.trim();\n this.nanoSearchChange.emit({ value: ev.target.value.trim() });\n };\n\n /* Stencil Component lifecycle hooks */\n\n connectedCallback() {\n this.debounceChanged();\n this.watchMaxValuesVisible();\n\n if (!Build.isBrowser) return;\n\n this.el.dispatchEvent(\n new CustomEvent('nanoDidLoad', {\n detail: this.el,\n })\n );\n }\n\n disconnectedCallback() {\n document.dispatchEvent(\n new CustomEvent('nanoDidUnload', {\n detail: this.el,\n })\n );\n\n if (!Build.isBrowser) return;\n if (this.mo) this.mo.disconnect();\n }\n\n componentDidLoad() {\n this.slotChangeObserver();\n this.customValidate();\n this.setDataListOpts();\n requestAnimationFrame(() => (this.onInit = false));\n }\n\n componentWillLoad() {\n this.processSlottedContent();\n }\n\n render() {\n const labelId = this.selectId + '-lbl';\n const moreId =\n this.showInlineError || this.hasHelperSlot\n ? this.selectId + '-moreId'\n : '';\n const helperEndId = this.hasHelperEndSlot ? this.selectId + '-helper' : '';\n\n this.rtl = (this.el.ownerDocument as Document).dir === 'rtl';\n this.valueItems = [];\n\n const compWrapOptions = (({\n el,\n floatLabel,\n label,\n errorMessage,\n showInlineError,\n hasHelperSlot,\n hasHelperEndSlot,\n hasLabelSlot,\n hideLabel,\n placeholder,\n rtl,\n }) => ({\n el,\n floatLabel,\n label,\n errorMessage,\n showInlineError,\n hasHelperSlot,\n hasHelperEndSlot,\n hasLabelSlot,\n hideLabel,\n placeholder,\n rtl,\n }))(this);\n const wrapOptions = {\n ...compWrapOptions,\n labelId,\n moreId,\n helperEndId,\n hasValue: !!this.value.length || !!this.inputSearchVal.length,\n controlId: this.selectId,\n };\n\n const controlOptions = (({ readonly, disabled }) => ({\n readonly,\n disabled,\n clearControl: this.clearSelect,\n }))(this);\n\n return (\n <Host\n type={this.multiple ? 'select-multiple' : 'select-one'}\n aria-disabled={this.disabled ? 'true' : null}\n class={{\n ...createColorClasses(this.color),\n 'has-value': !!this.value.length || !!this.inputSearchVal.length,\n 'has-focus': this.hasFocus,\n 'is-invalid': this.invalid,\n 'has-label': this.label !== null && !this.floatLabel,\n 'has-float-label': this.label !== null && this.floatLabel,\n rtl: this.rtl,\n 'has-multiple': this.multiple,\n 'has-clr-btn': this.clearSelect,\n masked: this.mask,\n }}\n >\n <FormControlWrap {...wrapOptions}>\n <FormControl\n {...controlOptions}\n onClearText={this.clearSelectValue}\n control={this.el}\n ref={(el) => (this.selectWrap = el)}\n endValueSlot={\n <slot name=\"down-arrow\">\n <nano-icon slot=\"value-end\" name=\"light/chevron-down\" />\n </slot>\n }\n >\n {this.multiple && (\n <div class=\"select__multi-wrap select\">\n {this.multipleValues(labelId, moreId, helperEndId)}\n </div>\n )}\n {!this.multiple && [\n this.mask && (\n <div class=\"select__mask\">\n {this.getLabel(this.value as string)}\n </div>\n ),\n <input\n id={this.selectId}\n class=\"select__native-input\"\n ref={(input) => (this.inputCtrl = input)}\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n disabled={this.disabled}\n form={this.form}\n placeholder={this.placeholder}\n readOnly={true}\n required={this.required}\n value={this.getLabel(this.value as string)}\n onFocus={this.onFocus}\n />,\n ]}\n </FormControl>\n </FormControlWrap>\n {!this.readonly && !this.disabled && (\n <nano-datalist\n onNanoOptionsUpdated={this.setOptions}\n ref={(el) => (this.datalist = el)}\n selected={this.valArray}\n type={this.multiple ? 'selctMulti' : 'select'}\n onNanoSelect={this.setValue}\n onNanoDeselect={(e) => {\n e.preventDefault();\n this.removeValue(e.detail.value);\n }}\n options={this._options.length ? this._options : undefined}\n >\n {this.allowCustomValues &&\n this.multiple &&\n !!this.inputSearchVal && (\n <nano-option\n slot=\"list-top\"\n value={this.inputSearchVal}\n selected={false}\n label={this.inputSearchVal}\n onNanoSelect={() => this.inputCtrl.focus()}\n >\n <span slot=\"check-icon\"></span>\n Add '{this.inputSearchVal}'\n </nano-option>\n )}\n <slot />\n </nano-datalist>\n )}\n\n <select\n id={this.selectId + '-hidden'}\n class=\"select__native-ctrl\"\n ref={(select) => (this.nativeSelect = select)}\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n disabled={this.disabled}\n form={this.form}\n multiple={this.multiple}\n name={this.name}\n required={this.required}\n onInvalid={this.handleInvalid}\n >\n {this.allowCustomValues &&\n this.valArray.map((val) => {\n return (\n <option value={val} selected={true}>\n {val}\n </option>\n );\n })}\n {!this.allowCustomValues &&\n this.options.map((opt: OptionInterface) => {\n return (\n <option\n value={opt.value}\n selected={this.valArray.includes(opt.value)}\n disabled={opt.disabled}\n label={opt.label}\n >\n {this.valArray.includes(opt.value)}\n </option>\n );\n })}\n </select>\n </Host>\n );\n }\n\n private multipleValues(\n labelId: string,\n moreId: string,\n helperEndId: string\n ): VNode | (VNode | VNode[])[] {\n const input: VNode = (\n <input\n class=\"select__multi-input\"\n id={this.selectId}\n ref={(input) => (this.inputCtrl = input)}\n readOnly={this.readonly}\n disabled={this.disabled}\n autoFocus={this.autofocus}\n autocomplete=\"off\"\n onKeyDown={this.handleDocumentKeyDown}\n onInput={this.onMultiInput}\n value={this.inputSearchVal}\n onTouchStart={this.onClick}\n onMouseDown={this.onClick}\n onFocus={this.onFocus}\n placeholder={\n this.placeholder && !this.value.length ? this.placeholder : ''\n }\n aria-labelledby={labelId + ' ' + moreId + ' ' + helperEndId}\n />\n );\n if (!this.value.length) return input;\n\n const toReturn: VNode[] = [];\n\n (this.value as Array<string>).forEach((val, i) => {\n if (!Number.isNaN(this._maxValuesVisible) && i > this._maxValuesVisible)\n return;\n\n let valueTag: VNode;\n\n if (i === this._maxValuesVisible) {\n valueTag = (\n <span data-value={val} class=\"select__multi-value\">\n <span>+{this.value.length - this._maxValuesVisible}</span>\n </span>\n );\n } else {\n valueTag = (\n <span\n onDragStart={this.onDragStart}\n onDragLeave={this.onDragLeave}\n onDragEnd={this.onDragEnd}\n onDragOver={(e) => e.preventDefault()}\n draggable\n data-value={val}\n ref={(span) => this.valueItems.push(span)}\n class=\"select__multi-value select__multi-value--closable\"\n >\n {this.valueTagTemplate ? (\n <span\n innerHTML={\n this.valueTagTemplate\n ? this.valueTagTemplate(...this.getOptionWithValue(val))\n : undefined\n }\n />\n ) : (\n <span>{this.getLabel(val)}</span>\n )}\n <button\n class=\"select__multi-value-remove\"\n type=\"button\"\n tabindex=\"-1\"\n onTouchEnd={() => {\n this.removeValue(val);\n }}\n onMouseUp={() => {\n this.removeValue(val);\n }}\n >\n <nano-icon name=\"light/times\"></nano-icon>\n </button>\n </span>\n );\n }\n\n if (i === 0 && this.currInsertIndex < 0) {\n toReturn.push(input, valueTag);\n } else if (i === this.currInsertIndex) {\n toReturn.push(valueTag, input);\n } else {\n toReturn.push(valueTag);\n }\n });\n\n return toReturn;\n }\n}\n"],"version":3}
@@ -8,7 +8,7 @@ import { c as createColorClasses } from './theme-931bd452.js';
8
8
  import './tabbable-26a66a22.js';
9
9
  import './dom-8599fac1.js';
10
10
 
11
- const alertCss = ":host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}:host{--border-radius:var(--nano-layer-border-radius, var(--nano-border-radius-medium, 4px));--border-color:var(--nano-layer-border-color, rgba(0, 0, 0, 0.1));--border-width:var(--nano-layer-border-width, 1px);--background:var(--nano-layer-bg, #fff);--tint-color:var(--nano-color-base, var(--nano-color-primary, #007495));--icon-size:2rem;--scrim-color:var(--nano-layer-overlay-dark, rgb(74 74 74 / 50%));--close-button-color:#b5aea7;display:block}:host(.nano-color){--tint-color:var(--nano-color-base, var(--nano-color-primary, #007495))}.alert{position:relative;background-color:var(--background);border:solid var(--border-width) var(--border-color);border-block-start-width:4px;border-block-start-color:var(--tint-color);border-radius:var(--border-radius);opacity:0;transform:scale(0.9);transition:var(--nano-transition-medium, 0.5s) opacity ease, var(--nano-transition-fast, 0.3s) transform ease}.alert:focus{outline:none}.alert:not(.alert--showing){position:absolute;inline-size:1px;block-size:1px;clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);overflow:hidden;pointer-events:none;visibility:hidden}.alert--open{opacity:1;transform:none}.alert--toasty,.alert--modal{box-shadow:var(--nano-layer-shadow-large, 0 2px 8px rgba(0, 0, 0, 0.2));margin:var(--nano-spacing-medium, 16px)}.alert--modal.alert--nodismiss{animation:cannotClose 0.25s ease-in-out 1}@keyframes cannotClose{0%{transform:scale(1)}50%{transform:scale(1.08)}100%{transform:scale(1)}}.alert__content{display:flex;align-items:stretch}.alert__modal-wrap{position:fixed;display:flex;align-items:center;justify-content:center;inset:0;z-index:var(--nano-layer-index-alert, 800)}.alert__message{flex:1 1 auto;padding:var(--nano-spacing-medium, 16px);overflow:hidden;line-height:1.6}.alert__close{--color:var(--close-button-color);flex:0 0 auto;display:flex;align-items:center;font-size:1.1em;padding-inline:0 var(--nano-spacing-medium, 16px);padding-block:0}.alert__footer{padding:0 var(--nano-spacing-small, 8px) 0;display:flex;flex-direction:row;justify-content:space-around;align-items:center}.alert__footer ::slotted(*){flex:1;margin:0 var(--nano-spacing-small, 8px) var(--nano-spacing-medium, 16px) !important}.alert__overlay{position:fixed;inset:0;background-color:var(--scrim-color);opacity:0;transition:var(--nano-transition-fast, 0.3s) opacity;z-index:var(--nano-layer-index-alert, 800);-webkit-backdrop-filter:blur(var(--nano-layer-overlay-blur, 3px));backdrop-filter:blur(var(--nano-layer-overlay-blur, 3px));pointer-events:all}.alert__overlay--open{opacity:1}.alert__icon{flex:0 0 auto;display:flex;align-items:center;font-size:var(--icon-size)}.alert__icon ::slotted(*){color:var(--tint-color);margin-inline-start:var(--nano-spacing-medium, 16px)}";
11
+ const alertCss = ":host{box-sizing:border-box}*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}:host{--border-radius:var(--nano-layer-border-radius, var(--nano-border-radius-medium, 4px));--border-color:var(--nano-layer-border-color, rgba(0, 0, 0, 0.1));--border-width:var(--nano-layer-border-width, 1px);--background:var(--nano-layer-bg, #fff);--tint-color:var(--nano-color-base, var(--nano-color-primary, #007495));--icon-size:2rem;--scrim-color:var(--nano-layer-overlay-dark, rgb(74 74 74 / 50%));--close-button-color:#b5aea7;display:block}:host(.nano-color){--tint-color:var(--nano-color-base, var(--nano-color-primary, #007495))}.alert{position:relative;background-color:var(--background);border:solid var(--border-width) var(--border-color);border-block-start-width:4px;border-block-start-color:var(--tint-color);border-radius:var(--border-radius);opacity:0;transform:scale(0.9);transition:var(--nano-transition-medium, 0.5s) opacity ease, var(--nano-transition-fast, 0.3s) transform ease}.alert:focus{outline:none}.alert:not(.alert--showing){position:absolute;inline-size:1px;block-size:1px;clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);overflow:hidden;pointer-events:none;visibility:hidden}.alert--open{opacity:1;transform:none}.alert--toasty,.alert--modal{box-shadow:var(--nano-layer-shadow-large, 0 2px 8px rgba(0, 0, 0, 0.2));margin:var(--nano-spacing-medium, 16px)}.alert--modal.alert--nodismiss{animation:cannotClose 0.25s ease-in-out 1}@keyframes cannotClose{0%{transform:scale(1)}50%{transform:scale(1.08)}100%{transform:scale(1)}}.alert__content{display:flex;align-items:stretch}.alert__modal-wrap{position:fixed;display:flex;align-items:center;justify-content:center;inset:0;z-index:var(--nano-layer-index-alert, 800)}.alert__message{flex:1 1 auto;padding:var(--nano-spacing-medium, 16px);overflow:hidden;line-height:1.6}.alert__close{--color:var(--close-button-color);flex:0 0 auto;display:flex;align-items:center;font-size:1.1em;padding-inline:0 var(--nano-spacing-medium, 16px);padding-block:0}.alert__footer{padding:0 var(--nano-spacing-small, 8px) 0;display:flex;flex-direction:row;justify-content:space-around;align-items:center}.alert__footer ::slotted(*){flex:1;margin:0 var(--nano-spacing-small, 8px) var(--nano-spacing-medium, 16px) !important}.alert__overlay{position:fixed;inset:0;background-color:var(--scrim-color);opacity:0;transition:var(--nano-transition-fast, 0.3s) opacity;z-index:var(--nano-layer-index-alert, 800);-webkit-backdrop-filter:blur(var(--nano-layer-overlay-blur, 3px));backdrop-filter:blur(var(--nano-layer-overlay-blur, 3px));pointer-events:all}.alert__overlay--open{opacity:1}.alert__icon{flex:0 0 auto;display:flex;align-items:center;font-size:var(--icon-size)}.alert__icon ::slotted(*),.alert__icon::slotted(*){color:var(--tint-color);margin-inline-start:var(--nano-spacing-medium, 16px)}";
12
12
 
13
13
  let toastStackTr;
14
14
  let toastStackTl;
@@ -109,10 +109,12 @@ const Alert = class {
109
109
  this.host.hidden = false;
110
110
  this.goingToShow = true;
111
111
  this.open = true;
112
- requestAnimationFrame(() => {
113
- this.isShowing = true;
114
- this.goingToShow = false;
115
- });
112
+ {
113
+ requestAnimationFrame(() => {
114
+ this.isShowing = true;
115
+ this.goingToShow = false;
116
+ });
117
+ }
116
118
  if (this.duration < Infinity) {
117
119
  clearTimeout(this.autoHideTimeout);
118
120
  this.autoHideTimeout = setTimeout(() => this.hide(), this.duration);