@six-group/ui-library 4.2.3 → 4.2.5

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 (189) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/six-avatar.cjs.entry.js +1 -1
  3. package/dist/cjs/six-badge.cjs.entry.js +2 -2
  4. package/dist/cjs/six-button.cjs.entry.js +2 -2
  5. package/dist/cjs/six-card.cjs.entry.js +1 -1
  6. package/dist/cjs/six-checkbox_2.cjs.entry.js +2 -2
  7. package/dist/cjs/six-details.cjs.entry.js +3 -3
  8. package/dist/cjs/six-dialog.cjs.entry.js +2 -2
  9. package/dist/cjs/six-drawer.cjs.entry.js +2 -2
  10. package/dist/cjs/six-dropdown_2.cjs.entry.js +13 -4
  11. package/dist/cjs/six-dropdown_2.cjs.entry.js.map +1 -1
  12. package/dist/cjs/six-error-page.cjs.entry.js +1 -1
  13. package/dist/cjs/six-error.cjs.entry.js +2 -2
  14. package/dist/cjs/six-error.cjs.entry.js.map +1 -1
  15. package/dist/cjs/six-file-list.cjs.entry.js +1 -1
  16. package/dist/cjs/six-file-upload.cjs.entry.js +4 -6
  17. package/dist/cjs/six-file-upload.cjs.entry.js.map +1 -1
  18. package/dist/cjs/six-footer.cjs.entry.js +1 -1
  19. package/dist/cjs/six-group-label.cjs.entry.js +1 -1
  20. package/dist/cjs/six-icon-button.cjs.entry.js +3 -3
  21. package/dist/cjs/six-icon.cjs.entry.js +2 -2
  22. package/dist/cjs/six-input.cjs.entry.js +13 -4
  23. package/dist/cjs/six-input.cjs.entry.js.map +1 -1
  24. package/dist/cjs/six-language-switcher.cjs.entry.js +1 -1
  25. package/dist/cjs/six-search-field.cjs.entry.js +1 -1
  26. package/dist/cjs/six-select.cjs.entry.js +17 -18
  27. package/dist/cjs/six-select.cjs.entry.js.map +1 -1
  28. package/dist/cjs/six-tab-group.cjs.entry.js +2 -2
  29. package/dist/cjs/six-textarea.cjs.entry.js +1 -1
  30. package/dist/cjs/six-textarea.cjs.entry.js.map +1 -1
  31. package/dist/cjs/ui-library.cjs.js +1 -1
  32. package/dist/collection/collection-manifest.json +1 -1
  33. package/dist/collection/components/six-avatar/six-avatar.js +1 -1
  34. package/dist/collection/components/six-badge/six-badge.js +2 -2
  35. package/dist/collection/components/six-button/six-button.js +2 -2
  36. package/dist/collection/components/six-card/six-card.js +1 -1
  37. package/dist/collection/components/six-checkbox/six-checkbox.js +2 -2
  38. package/dist/collection/components/six-details/six-details.js +3 -3
  39. package/dist/collection/components/six-dialog/six-dialog.js +2 -2
  40. package/dist/collection/components/six-drawer/six-drawer.js +2 -2
  41. package/dist/collection/components/six-error/six-error.css +1 -0
  42. package/dist/collection/components/six-error/six-error.js +1 -1
  43. package/dist/collection/components/six-error-page/six-error-page.js +1 -1
  44. package/dist/collection/components/six-file-list/six-file-list.js +1 -1
  45. package/dist/collection/components/six-file-upload/six-file-upload.js +4 -6
  46. package/dist/collection/components/six-file-upload/six-file-upload.js.map +1 -1
  47. package/dist/collection/components/six-footer/six-footer.js +1 -1
  48. package/dist/collection/components/six-group-label/six-group-label.js +1 -1
  49. package/dist/collection/components/six-icon/six-icon.js +2 -2
  50. package/dist/collection/components/six-icon-button/six-icon-button.js +3 -3
  51. package/dist/collection/components/six-input/six-input.css +1 -0
  52. package/dist/collection/components/six-input/six-input.js +40 -4
  53. package/dist/collection/components/six-input/six-input.js.map +1 -1
  54. package/dist/collection/components/six-language-switcher/six-language-switcher.js +1 -1
  55. package/dist/collection/components/six-menu/six-menu.js +13 -4
  56. package/dist/collection/components/six-menu/six-menu.js.map +1 -1
  57. package/dist/collection/components/six-menu/test/six-menu.spec.js +1 -1
  58. package/dist/collection/components/six-menu/test/six-menu.spec.js.map +1 -1
  59. package/dist/collection/components/six-search-field/six-search-field.js +1 -1
  60. package/dist/collection/components/six-select/six-select.js +17 -18
  61. package/dist/collection/components/six-select/six-select.js.map +1 -1
  62. package/dist/collection/components/six-tab-group/six-tab-group.js +2 -2
  63. package/dist/collection/components/six-textarea/six-textarea.css +5 -0
  64. package/dist/components/six-avatar.js +1 -1
  65. package/dist/components/six-badge.js +2 -2
  66. package/dist/components/six-button2.js +2 -2
  67. package/dist/components/six-card.js +1 -1
  68. package/dist/components/six-checkbox2.js +2 -2
  69. package/dist/components/six-details2.js +3 -3
  70. package/dist/components/six-dialog.js +2 -2
  71. package/dist/components/six-drawer.js +2 -2
  72. package/dist/components/six-error-page.js +1 -1
  73. package/dist/components/six-error2.js +2 -2
  74. package/dist/components/six-error2.js.map +1 -1
  75. package/dist/components/six-file-list.js +1 -1
  76. package/dist/components/six-file-upload.js +4 -6
  77. package/dist/components/six-file-upload.js.map +1 -1
  78. package/dist/components/six-footer.js +1 -1
  79. package/dist/components/six-group-label.js +1 -1
  80. package/dist/components/six-icon-button2.js +3 -3
  81. package/dist/components/six-icon2.js +2 -2
  82. package/dist/components/six-input2.js +14 -4
  83. package/dist/components/six-input2.js.map +1 -1
  84. package/dist/components/six-language-switcher.js +1 -1
  85. package/dist/components/six-menu2.js +13 -4
  86. package/dist/components/six-menu2.js.map +1 -1
  87. package/dist/components/six-search-field.js +1 -1
  88. package/dist/components/six-select.js +17 -18
  89. package/dist/components/six-select.js.map +1 -1
  90. package/dist/components/six-tab-group.js +2 -2
  91. package/dist/components/six-textarea.js +1 -1
  92. package/dist/components/six-textarea.js.map +1 -1
  93. package/dist/components.json +52 -4
  94. package/dist/esm/loader.js +1 -1
  95. package/dist/esm/six-avatar.entry.js +1 -1
  96. package/dist/esm/six-badge.entry.js +2 -2
  97. package/dist/esm/six-button.entry.js +2 -2
  98. package/dist/esm/six-card.entry.js +1 -1
  99. package/dist/esm/six-checkbox_2.entry.js +2 -2
  100. package/dist/esm/six-details.entry.js +3 -3
  101. package/dist/esm/six-dialog.entry.js +2 -2
  102. package/dist/esm/six-drawer.entry.js +2 -2
  103. package/dist/esm/six-dropdown_2.entry.js +13 -4
  104. package/dist/esm/six-dropdown_2.entry.js.map +1 -1
  105. package/dist/esm/six-error-page.entry.js +1 -1
  106. package/dist/esm/six-error.entry.js +2 -2
  107. package/dist/esm/six-error.entry.js.map +1 -1
  108. package/dist/esm/six-file-list.entry.js +1 -1
  109. package/dist/esm/six-file-upload.entry.js +4 -6
  110. package/dist/esm/six-file-upload.entry.js.map +1 -1
  111. package/dist/esm/six-footer.entry.js +1 -1
  112. package/dist/esm/six-group-label.entry.js +1 -1
  113. package/dist/esm/six-icon-button.entry.js +3 -3
  114. package/dist/esm/six-icon.entry.js +2 -2
  115. package/dist/esm/six-input.entry.js +13 -4
  116. package/dist/esm/six-input.entry.js.map +1 -1
  117. package/dist/esm/six-language-switcher.entry.js +1 -1
  118. package/dist/esm/six-search-field.entry.js +1 -1
  119. package/dist/esm/six-select.entry.js +17 -18
  120. package/dist/esm/six-select.entry.js.map +1 -1
  121. package/dist/esm/six-tab-group.entry.js +2 -2
  122. package/dist/esm/six-textarea.entry.js +1 -1
  123. package/dist/esm/six-textarea.entry.js.map +1 -1
  124. package/dist/esm/ui-library.js +1 -1
  125. package/dist/types/components/six-input/six-input.d.ts +9 -1
  126. package/dist/types/components/six-menu/six-menu.d.ts +1 -1
  127. package/dist/types/components/six-select/six-select.d.ts +0 -1
  128. package/dist/types/components.d.ts +7 -1
  129. package/dist/ui-library/p-037afc74.entry.js +2 -0
  130. package/dist/ui-library/p-037afc74.entry.js.map +1 -0
  131. package/dist/ui-library/{p-21074819.entry.js → p-049c8910.entry.js} +2 -2
  132. package/dist/ui-library/p-049c8910.entry.js.map +1 -0
  133. package/dist/ui-library/{p-82bd8781.entry.js → p-0c129b61.entry.js} +2 -2
  134. package/dist/ui-library/p-11344bb8.entry.js +2 -0
  135. package/dist/ui-library/p-18b9189f.entry.js +2 -0
  136. package/dist/ui-library/p-18b9189f.entry.js.map +1 -0
  137. package/dist/ui-library/p-1adc26f2.entry.js +2 -0
  138. package/dist/ui-library/p-1adc26f2.entry.js.map +1 -0
  139. package/dist/ui-library/p-347e568f.entry.js +2 -0
  140. package/dist/ui-library/p-36d5f98a.entry.js +2 -0
  141. package/dist/ui-library/p-36d5f98a.entry.js.map +1 -0
  142. package/dist/ui-library/{p-c1d68730.entry.js → p-37433242.entry.js} +2 -2
  143. package/dist/ui-library/{p-a8863197.entry.js → p-416b0439.entry.js} +2 -2
  144. package/dist/ui-library/{p-03d1b956.entry.js → p-4bc7bbdb.entry.js} +2 -2
  145. package/dist/ui-library/{p-b4bc4915.entry.js → p-63ee5e7e.entry.js} +2 -2
  146. package/dist/ui-library/{p-7561b336.entry.js → p-6b40c40c.entry.js} +2 -2
  147. package/dist/ui-library/p-6b40c40c.entry.js.map +1 -0
  148. package/dist/ui-library/{p-39ff5f61.entry.js → p-7bdd1116.entry.js} +2 -2
  149. package/dist/ui-library/{p-c35a7cef.entry.js → p-99f6fe01.entry.js} +2 -2
  150. package/dist/ui-library/{p-9bc1639b.entry.js → p-b335ed9c.entry.js} +2 -2
  151. package/dist/ui-library/{p-19560508.entry.js → p-b7c68f74.entry.js} +2 -2
  152. package/dist/ui-library/{p-45003bae.entry.js → p-d1a2f84b.entry.js} +2 -2
  153. package/dist/ui-library/{p-d07b549f.entry.js → p-d88b9c16.entry.js} +2 -2
  154. package/dist/ui-library/{p-3603dd96.entry.js → p-d9586999.entry.js} +2 -2
  155. package/dist/ui-library/{p-8fb96142.entry.js → p-e14d78e9.entry.js} +2 -2
  156. package/dist/ui-library/{p-6888b9ee.entry.js → p-e9b8ad98.entry.js} +2 -2
  157. package/dist/ui-library/{p-ac00076d.entry.js → p-ebbe9bdc.entry.js} +2 -2
  158. package/dist/ui-library/ui-library.esm.js +1 -1
  159. package/dist/ui-library/ui-library.esm.js.map +1 -1
  160. package/package.json +1 -1
  161. package/dist/ui-library/p-060069d4.entry.js +0 -2
  162. package/dist/ui-library/p-060069d4.entry.js.map +0 -1
  163. package/dist/ui-library/p-0fb3fb30.entry.js +0 -2
  164. package/dist/ui-library/p-0fb3fb30.entry.js.map +0 -1
  165. package/dist/ui-library/p-21074819.entry.js.map +0 -1
  166. package/dist/ui-library/p-2c25cb61.entry.js +0 -2
  167. package/dist/ui-library/p-2c25cb61.entry.js.map +0 -1
  168. package/dist/ui-library/p-7561b336.entry.js.map +0 -1
  169. package/dist/ui-library/p-89db9a8b.entry.js +0 -2
  170. package/dist/ui-library/p-a7e2f511.entry.js +0 -2
  171. package/dist/ui-library/p-a7e2f511.entry.js.map +0 -1
  172. package/dist/ui-library/p-fe37dadf.entry.js +0 -2
  173. /package/dist/ui-library/{p-82bd8781.entry.js.map → p-0c129b61.entry.js.map} +0 -0
  174. /package/dist/ui-library/{p-fe37dadf.entry.js.map → p-11344bb8.entry.js.map} +0 -0
  175. /package/dist/ui-library/{p-89db9a8b.entry.js.map → p-347e568f.entry.js.map} +0 -0
  176. /package/dist/ui-library/{p-c1d68730.entry.js.map → p-37433242.entry.js.map} +0 -0
  177. /package/dist/ui-library/{p-a8863197.entry.js.map → p-416b0439.entry.js.map} +0 -0
  178. /package/dist/ui-library/{p-03d1b956.entry.js.map → p-4bc7bbdb.entry.js.map} +0 -0
  179. /package/dist/ui-library/{p-b4bc4915.entry.js.map → p-63ee5e7e.entry.js.map} +0 -0
  180. /package/dist/ui-library/{p-39ff5f61.entry.js.map → p-7bdd1116.entry.js.map} +0 -0
  181. /package/dist/ui-library/{p-c35a7cef.entry.js.map → p-99f6fe01.entry.js.map} +0 -0
  182. /package/dist/ui-library/{p-9bc1639b.entry.js.map → p-b335ed9c.entry.js.map} +0 -0
  183. /package/dist/ui-library/{p-19560508.entry.js.map → p-b7c68f74.entry.js.map} +0 -0
  184. /package/dist/ui-library/{p-45003bae.entry.js.map → p-d1a2f84b.entry.js.map} +0 -0
  185. /package/dist/ui-library/{p-d07b549f.entry.js.map → p-d88b9c16.entry.js.map} +0 -0
  186. /package/dist/ui-library/{p-3603dd96.entry.js.map → p-d9586999.entry.js.map} +0 -0
  187. /package/dist/ui-library/{p-8fb96142.entry.js.map → p-e14d78e9.entry.js.map} +0 -0
  188. /package/dist/ui-library/{p-6888b9ee.entry.js.map → p-e9b8ad98.entry.js.map} +0 -0
  189. /package/dist/ui-library/{p-ac00076d.entry.js.map → p-ebbe9bdc.entry.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sixTextareaCss","SixTextareaStyle0","id","SixTextarea","this","inputId","labelId","helpTextId","errorTextId","eventListeners","EventListeners","resizeObserver","ResizeObserver","setTextareaHeight","handleChange","nativeTextarea","value","sixChange","emit","handleInput","sixInput","handleBlur","hasFocus","sixBlur","handleFocus","sixFocus","handleSlotChange","hasLabelSlot","hasSlot","host","hasHelpTextSlot","hasErrorTextSlot","handleLabelChange","handleRowsChange","handleValueChange","getValue","connectedCallback","_a","shadowRoot","addEventListener","forward","componentWillLoad","componentDidLoad","observe","disconnectedCallback","unobserve","removeEventListener","removeAll","setFocus","options","focus","removeFocus","blur","select","setSelectionRange","selectionStart","selectionEnd","selectionDirection","setRangeText","replacement","start","end","selectMode","resize","style","height","scrollHeight","undefined","toString","render","h","FormControl","key","label","helpText","errorText","errorTextCount","size","disabled","required","displayError","invalid","part","class","textarea","length","ref","el","name","placeholder","readOnly","readonly","rows","minLength","minlength","maxLength","maxlength","autoCapitalize","autocapitalize","autoCorrect","autocorrect","autoFocus","autofocus","spellcheck","inputMode","inputmode","onChange","onInput","onFocus","onBlur"],"sources":["src/components/six-textarea/six-textarea.scss?tag=six-textarea&encapsulation=shadow","src/components/six-textarea/six-textarea.tsx"],"sourcesContent":["@import 'src/global/component';\n@import '../../functional-components/form-control/form-control';\n\n/**\n * @prop --height: The textarea height.\n */\n:host {\n --height: 100%;\n display: block;\n}\n\n.textarea {\n display: flex;\n align-items: center;\n position: relative;\n width: 100%;\n font-family: var(--six-font-family);\n font-weight: var(--six-input-font-weight);\n line-height: var(--six-line-height-normal);\n letter-spacing: var(--six-input-letter-spacing);\n background-color: var(--six-input-background-color);\n border: solid var(--six-border-width) var(--six-input-border-color);\n vertical-align: middle;\n transition: var(--six-transition-fast) color, var(--six-transition-fast) border, var(--six-transition-fast) box-shadow;\n cursor: text;\n\n &:hover:not(.textarea--disabled) {\n background-color: var(--six-input-background-color-hover);\n border-color: var(--six-input-border-color-hover);\n\n .textarea__control {\n color: var(--six-input-color-hover);\n }\n }\n\n &.textarea--focused:not(.textarea--disabled) {\n background-color: var(--six-input-background-color-focus);\n box-shadow: var(--six-input-focus-shadow);\n border-color: var(--six-input-border-color-focus);\n color: var(--six-input-color-focus);\n\n .textarea__control {\n color: var(--six-input-color-focus);\n }\n }\n\n &.textarea--disabled {\n background-color: var(--six-input-background-color-disabled);\n border-color: var(--six-input-border-color-disabled);\n cursor: not-allowed;\n\n .textarea__control {\n color: var(--six-input-color-disabled);\n\n &::placeholder {\n color: var(--six-input-placeholder-color-disabled);\n }\n }\n }\n}\n\n.textarea__control {\n flex: 1 1 auto;\n height: calc(var(--height) - 2 * var(--six-border-width));\n font-family: inherit;\n font-size: inherit;\n font-weight: inherit;\n line-height: 1.4;\n color: var(--sl-input-color);\n border: none;\n background: none;\n box-shadow: none;\n cursor: inherit;\n -webkit-appearance: none;\n\n &::-webkit-search-decoration,\n &::-webkit-search-cancel-button,\n &::-webkit-search-results-button,\n &::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n\n &::placeholder {\n color: var(--six-input-placeholder-color);\n user-select: none;\n }\n\n &:focus {\n outline: none;\n }\n}\n\n.textarea--invalid:not(.textarea--disabled):not(.textarea--focused) {\n border-color: var(--six-input-border-color-danger);\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Size modifiers\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.textarea--small {\n border-radius: var(--six-input-border-radius-small);\n font-size: var(--six-input-font-size-small);\n\n .textarea__control {\n padding: 0.5em var(--six-input-spacing-small);\n }\n}\n\n.textarea--medium {\n border-radius: var(--six-input-border-radius-medium);\n font-size: var(--six-input-font-size-medium);\n\n .textarea__control {\n padding: 0.5em var(--six-input-spacing-medium);\n }\n}\n\n.textarea--large {\n border-radius: var(--six-input-border-radius-large);\n font-size: var(--six-input-font-size-large);\n\n .textarea__control {\n padding: 0.5em var(--six-input-spacing-large);\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Resize types\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.textarea--resize-none .textarea__control {\n resize: none;\n}\n\n.textarea--resize-vertical .textarea__control {\n resize: vertical;\n}\n\n.textarea--resize-auto .textarea__control {\n height: auto;\n resize: none;\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport FormControl from '../../functional-components/form-control/form-control';\nimport { hasSlot } from '../../utils/slot';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { EmptyPayload } from '../../utils/types';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot label - The textarea's label. Alternatively, you can use the label prop.\n * @slot help-text - Help text that describes how to use the input.\n * @slot error-text - Error text that is shown for validation errors. Alternatively, you can use the error-text prop.\n *\n * @part base - The component's base wrapper.\n * @part form-control - The form control that wraps the label, textarea, and help text.\n * @part label - The textarea label.\n * @part textarea - The textarea control.\n * @part help-text - The textarea help text.\n */\n@Component({\n tag: 'six-textarea',\n styleUrl: 'six-textarea.scss',\n shadow: true,\n})\nexport class SixTextarea {\n private inputId = `textarea-${++id}`;\n private labelId = `textarea-label-${id}`;\n private helpTextId = `textarea-help-text-${id}`;\n private errorTextId = `input-error-text-${id}`;\n private nativeTextarea?: HTMLTextAreaElement;\n private eventListeners = new EventListeners();\n private resizeObserver = new ResizeObserver(() => this.setTextareaHeight());\n\n @Element() host!: HTMLSixTextareaElement;\n\n @State() hasFocus = false;\n @State() hasHelpTextSlot = false;\n @State() hasLabelSlot = false;\n @State() hasErrorTextSlot = false;\n\n /** The textarea's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** The textarea's name attribute. */\n @Prop({ reflect: true }) name = '';\n\n /** The textarea's value attribute. */\n @Prop({ mutable: true, reflect: true }) value = '';\n\n /** The textarea's help text. Alternatively, you can use the help-text slot. */\n @Prop() helpText = '';\n\n /** The textarea's placeholder text. */\n @Prop() placeholder?: string;\n\n /** The number of rows to display by default. */\n @Prop() rows = 4;\n\n /** Controls how the textarea can be resized. */\n @Prop() resize: 'none' | 'vertical' | 'auto' = 'vertical';\n\n /** Set to true to disable the textarea. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Set to true for a readonly textarea. */\n @Prop({ reflect: true }) readonly = false;\n\n /** The minimum length of input that will be considered valid. */\n @Prop({ reflect: true }) minlength?: number;\n\n /** The maximum length of input that will be considered valid. */\n @Prop({ reflect: true }) maxlength?: number;\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = false;\n\n /** The label text. */\n @Prop() label = '';\n\n /** The error message shown, if `invalid` is set to true. */\n @Prop() errorText: string | string[] = '';\n\n /** The number of error texts to be shown (if the error-text slot isn't used). Defaults to 1 */\n @Prop() errorTextCount?: number;\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n /** The textarea's autocaptialize attribute. */\n @Prop() autocapitalize = 'off';\n\n /** The textarea's autocorrect attribute. */\n @Prop() autocorrect: 'on' | 'off' = 'off';\n\n /** The textarea's autocomplete attribute. */\n @Prop() autocomplete = 'off';\n\n /** The textarea's autofocus attribute. */\n @Prop() autofocus = false;\n\n /** The textarea's spellcheck attribute. */\n @Prop() spellcheck = false;\n\n /** The textarea's inputmode attribute. */\n @Prop() inputmode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';\n\n /** Emitted when the control's value changes. Access the new value via event.target.value. */\n @Event({ eventName: 'six-textarea-change' }) sixChange!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control receives input. Access the new value via event.target.value. */\n @Event({ eventName: 'six-textarea-input' }) sixInput!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control gains focus. */\n @Event({ eventName: 'six-textarea-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the control loses focus. Access the new value via event.target.value. */\n @Event({ eventName: 'six-textarea-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n @Watch('helpText')\n @Watch('errorText')\n @Watch('label')\n handleLabelChange() {\n this.handleSlotChange();\n }\n\n @Watch('rows')\n handleRowsChange() {\n this.setTextareaHeight();\n }\n\n @Watch('value')\n handleValueChange() {\n this.value = this.getValue();\n if (this.nativeTextarea != null) {\n if (this.nativeTextarea.value !== this.value) {\n this.nativeTextarea.value = this.value;\n }\n }\n }\n\n connectedCallback() {\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.forward('six-textarea-input', 'input', this.host);\n this.eventListeners.forward('six-textarea-change', 'change', this.host);\n this.eventListeners.forward('six-textarea-focus', 'focus', this.host);\n this.eventListeners.forward('six-textarea-blur', 'blur', this.host);\n }\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n componentDidLoad() {\n this.setTextareaHeight();\n if (this.nativeTextarea != null) {\n this.resizeObserver.observe(this.nativeTextarea);\n }\n }\n\n disconnectedCallback() {\n if (this.nativeTextarea != null) {\n this.resizeObserver.unobserve(this.nativeTextarea);\n }\n this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n this.eventListeners.removeAll();\n }\n\n /** Sets focus on the textarea. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeTextarea?.focus(options);\n }\n\n /** Removes focus fromt the textarea. */\n @Method()\n async removeFocus() {\n this.nativeTextarea?.blur();\n }\n\n /** Selects all the text in the input. */\n @Method()\n async select() {\n return this.nativeTextarea?.select();\n }\n\n /** Sets the start and end positions of the text selection (0-based). */\n @Method()\n async setSelectionRange(\n selectionStart: number,\n selectionEnd: number,\n selectionDirection: 'forward' | 'backward' | 'none' = 'none'\n ) {\n return this.nativeTextarea?.setSelectionRange(selectionStart, selectionEnd, selectionDirection);\n }\n\n /** Replaces a range of text with a new string. */\n @Method()\n async setRangeText(\n replacement: string,\n start: number,\n end: number,\n selectMode: 'select' | 'start' | 'end' | 'preserve' = 'preserve'\n ) {\n if (this.nativeTextarea == null) return;\n\n this.nativeTextarea.setRangeText(replacement, start, end, selectMode);\n if (this.getValue() !== this.nativeTextarea.value) {\n this.value = this.nativeTextarea.value;\n this.setTextareaHeight();\n this.sixChange.emit();\n this.sixInput.emit();\n }\n }\n\n private handleChange = () => {\n if (this.nativeTextarea != null) {\n this.value = this.nativeTextarea.value;\n this.sixChange.emit();\n }\n };\n\n private handleInput = () => {\n if (this.nativeTextarea != null) {\n this.value = this.nativeTextarea.value;\n this.setTextareaHeight();\n this.sixInput.emit();\n }\n };\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit();\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleSlotChange = () => {\n this.hasLabelSlot = hasSlot(this.host, 'label');\n this.hasHelpTextSlot = hasSlot(this.host, 'help-text');\n this.hasErrorTextSlot = hasSlot(this.host, 'error-text');\n };\n\n private setTextareaHeight() {\n if (this.nativeTextarea == null) return;\n\n if (this.resize === 'auto') {\n this.nativeTextarea.style.height = 'auto';\n this.nativeTextarea.style.height = this.nativeTextarea.scrollHeight + 'px';\n } else {\n (this.nativeTextarea.style.height as string | undefined) = undefined;\n }\n }\n\n private getValue(): string {\n return (this.value ?? '').toString();\n }\n\n render() {\n return (\n <FormControl\n inputId={this.inputId}\n label={this.label}\n labelId={this.labelId}\n hasLabelSlot={this.hasLabelSlot}\n helpTextId={this.helpTextId}\n helpText={this.helpText}\n hasHelpTextSlot={this.hasHelpTextSlot}\n errorTextId={this.errorTextId}\n errorText={this.errorText}\n errorTextCount={this.errorTextCount}\n hasErrorTextSlot={this.hasErrorTextSlot}\n size={this.size}\n disabled={this.disabled}\n required={this.required}\n displayError={this.invalid}\n >\n <div\n part=\"base\"\n class={{\n textarea: true,\n\n // Sizes\n 'textarea--small': this.size === 'small',\n 'textarea--medium': this.size === 'medium',\n 'textarea--large': this.size === 'large',\n\n // States\n 'textarea--disabled': this.disabled,\n 'textarea--focused': this.hasFocus,\n 'textarea--empty': this.getValue().length === 0,\n 'textarea--invalid': this.invalid,\n\n // Modifiers\n 'textarea--resize-none': this.resize === 'none',\n 'textarea--resize-vertical': this.resize === 'vertical',\n 'textarea--resize-auto': this.resize === 'auto',\n }}\n >\n <textarea\n part=\"textarea\"\n ref={(el) => (this.nativeTextarea = el)}\n id={this.inputId}\n class=\"textarea__control\"\n name={this.name}\n placeholder={this.placeholder}\n disabled={this.disabled}\n readOnly={this.readonly}\n rows={this.rows}\n minLength={this.minlength}\n maxLength={this.maxlength}\n value={this.getValue()}\n autoCapitalize={this.autocapitalize}\n autoCorrect={this.autocorrect}\n autoFocus={this.autofocus}\n spellcheck={this.spellcheck}\n required={this.required}\n inputMode={this.inputmode}\n aria-labelledby={this.labelId}\n onChange={this.handleChange}\n onInput={this.handleInput}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n />\n </div>\n </FormControl>\n );\n }\n}\n"],"mappings":"qKAAA,MAAMA,EAAiB,g5KACvB,MAAAC,EAAeD,ECKf,IAAIE,EAAK,E,MAuBIC,EAAW,M,6MACdC,KAAAC,QAAU,cAAcH,IACxBE,KAAAE,QAAU,kBAAkBJ,IAC5BE,KAAAG,WAAa,sBAAsBL,IACnCE,KAAAI,YAAc,oBAAoBN,IAElCE,KAAAK,eAAiB,IAAIC,EACrBN,KAAAO,eAAiB,IAAIC,gBAAe,IAAMR,KAAKS,sBAuL/CT,KAAAU,aAAe,KACrB,GAAIV,KAAKW,gBAAkB,KAAM,CAC/BX,KAAKY,MAAQZ,KAAKW,eAAeC,MACjCZ,KAAKa,UAAUC,M,GAIXd,KAAAe,YAAc,KACpB,GAAIf,KAAKW,gBAAkB,KAAM,CAC/BX,KAAKY,MAAQZ,KAAKW,eAAeC,MACj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,WACjBxB,SAAU3E,KAAK2E,SACfyB,UAAWpG,KAAKqG,UAAS,kBACRrG,KAAKE,QACtBoG,SAAUtG,KAAKU,aACf6F,QAASvG,KAAKe,YACdyF,QAASxG,KAAKoB,YACdqF,OAAQzG,KAAKiB,c"}
@@ -0,0 +1,2 @@
1
+ import{r as o,h as s,H as r}from"./p-05eb1bab.js";const e=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:inline-block;box-shadow:var(--six-shadow-medium);border:1px solid var(--six-color-web-rock-100);padding:var(--six-spacing-medium)}";const b=e;const i=class{constructor(s){o(this,s)}render(){return s(r,{key:"a14bad051db8ef5f053c2576949e23a97393b8bd"},s("slot",{key:"e02884cce6fa685bbcbf01d7314d1494739406d5"}))}};i.style=b;export{i as six_card};
2
+ //# sourceMappingURL=p-347e568f.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as e,h as r}from"./p-05eb1bab.js";const t=".six-error-container{text-align:left;color:var(--six-color-danger-800);width:100%;font-size:var(--six-input-help-text-font-size-medium)}";const o=t;const s=class{constructor(r){e(this,r)}render(){return r("div",{key:"06af414764195145d2bad6237e632be9f4d150f1",class:"six-error-container"},r("slot",{key:"95c3422046e15a9fae5c123f0ef518e7d5aa9d8b"}))}};s.style=o;export{s as six_error};
2
+ //# sourceMappingURL=p-36d5f98a.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sixErrorCss","SixErrorStyle0","SixError","render","h","key","class"],"sources":["src/components/six-error/six-error.scss?tag=six-error&encapsulation=shadow","src/components/six-error/six-error.tsx"],"sourcesContent":[".six-error-container {\n text-align: left;\n color: var(--six-color-danger-800);\n width: 100%;\n font-size: var(--six-input-help-text-font-size-medium);\n}\n","import { Component, h } from '@stencil/core';\n\n/**\n * @since 4.0\n * @status beta\n *\n * @slot default - The error's message content\n */\n\n@Component({\n tag: 'six-error',\n styleUrl: 'six-error.scss',\n shadow: true,\n})\nexport class SixError {\n render() {\n return (\n <div class=\"six-error-container\">\n <slot />\n </div>\n );\n }\n}\n"],"mappings":"2CAAA,MAAMA,EAAc,2IACpB,MAAAC,EAAeD,E,MCaFE,EAAQ,M,yBACnB,MAAAC,GACE,OACEC,EAAA,OAAAC,IAAA,2CAAKC,MAAM,uBACTF,EAAA,QAAAC,IAAA,6C"}
@@ -1,2 +1,2 @@
1
- import{r as e,c as o,h as t,g as i}from"./p-05eb1bab.js";import{F as s}from"./p-605bdd81.js";import{h as r,a as l}from"./p-0cebf1d2.js";import{E as n}from"./p-8bfb4bfc.js";const c=':host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control .form-control__error-text{display:none;text-align:left}.form-control--has-label .form-control__label{display:inline-block;color:var(--six-input-label-color);font-weight:var(--six-font-weight-bold);margin-bottom:var(--six-spacing-x-small)}.form-control--has-label .form-control__label__required::after{color:var(--six-color-danger-800);content:"*";transform:scale(1.1);margin-left:var(--six-spacing-xxx-small);position:absolute}.form-control--has-label.form-control--small .form-control__label{font-size:var(--six-input-label-font-size-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--six-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control_label{font-size:var(--six-input-label-font-size-large)}.form-control--has-help-text .form-control__help-text{display:block;color:var(--six-input-help-text-color);margin-top:var(--six-spacing-x-small)}.form-control--has-help-text .form-control__help-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--has-error-text .form-control__error-text{display:block;margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text .form-control__error-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text.form-control--small .form-control__error-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-error-text.form-control--medium .form-control__error-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-error-text.form-control--large .form-control__error-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--disabled .form-control__help-text{color:var(--six-input-help-text-color-disabled)}.form-control--disabled .form-control__label{color:var(--six-input-label-color-disabled)}.form-control--invalid:not(.form-control--disabled) .form-control__label{color:var(--six-input-label-color)}:host{display:inline-block}.checkbox{display:inline-flex;align-items:center;font-family:var(--six-font-family);font-size:var(--six-input-font-size-medium);font-weight:var(--six-input-font-weight);color:var(--six-input-color);vertical-align:middle;cursor:pointer}.checkbox--focused .checkbox__control{outline:var(--six-focus-ring);outline-offset:0}.checkbox__control{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--six-selection-control-toggle-size);min-width:var(--six-selection-control-toggle-size);height:var(--six-selection-control-toggle-size);border:solid var(--six-border-width) var(--six-input-border-color);border-radius:0;background-color:var(--six-input-background-color);color:var(--six-checkbox-color);transition:var(--six-transition-fast) border-color, var(--six-transition-fast) background-color, var(--six-transition-fast) color, var(--six-transition-fast) box-shadow}.checkbox__control input[type=checkbox]{position:absolute;opacity:0;padding:0;margin:0;pointer-events:none;min-width:var(--six-selection-control-toggle-size)}.checkbox__control .checkbox__icon{display:inline-flex;width:var(--six-selection-control-toggle-size);height:var(--six-selection-control-toggle-size)}.checkbox__control .checkbox__icon svg{width:100%;height:100%}.checkbox:not(.checkbox--checked):not(.checkbox--disabled) .checkbox__control:hover{border-color:var(--six-input-border-color-hover)}.checkbox--checked .checkbox__control,.checkbox--indeterminate .checkbox__control{border-color:var(--six-selection-control-color);background-color:var(--six-selection-control-color)}.checkbox.checkbox--checked:not(.checkbox--disabled) .checkbox__control:hover,.checkbox.checkbox--indeterminate:not(.checkbox--disabled) .checkbox__control:hover{border-color:var(--six-input-border-color-focus);background-color:var(--six-input-border-color-focus)}.checkbox--disabled{cursor:not-allowed;color:var(--six-input-color-disabled)}.checkbox--disabled .checkbox__control{border-color:var(--six-input-border-color-disabled)}.checkbox--disabled.checkbox--checked .checkbox__control,.checkbox--disabled.checkbox--indeterminate .checkbox__control{background-color:var(--six-selection-control-color-disabled)}.checkbox--invalid:not(.checkbox--disabled) .checkbox__control{border-color:var(--six-input-border-color-danger)}.checkbox__text{line-height:var(--six-selection-control-toggle-size);margin-left:0.5em;user-select:none}';const a=c;let h=0;const d=class{constructor(t){e(this,t);this.sixBlur=o(this,"six-checkbox-blur",7);this.sixChange=o(this,"six-checkbox-change",7);this.sixFocus=o(this,"six-checkbox-focus",7);this.inputId=`checkbox-${++h}`;this.labelId=`checkbox-label-${h}`;this.textId=`checkbox-text-${h}`;this.errorTextId=`input-error-text-${h}`;this.eventListeners=new n;this.handleChange=()=>{if(this.nativeInput!=null){this.checked=this.nativeInput.checked;this.indeterminate=false;this.sixChange.emit()}};this.handleBlur=()=>{this.hasFocus=false;this.sixBlur.emit()};this.handleFocus=()=>{this.hasFocus=true;this.sixFocus.emit()};this.handleMouseDown=e=>{var o;e.preventDefault();(o=this.nativeInput)===null||o===void 0?void 0:o.focus()};this.hasFocus=false;this.hasLabelSlot=false;this.hasErrorSlot=false;this.name="";this.value="on";this.disabled=false;this.required=false;this.label="";this.errorText="";this.errorTextCount=undefined;this.invalid=false;this.checked=false;this.indeterminate=false}handleCheckedChange(){if(this.nativeInput==null)return;this.nativeInput.checked=this.checked;this.checked=this.nativeInput.checked;this.nativeInput.indeterminate=this.indeterminate}handleLabelChange(){this.handleSlotChange()}connectedCallback(){var e;(e=this.host.shadowRoot)===null||e===void 0?void 0:e.addEventListener("slotchange",this.handleSlotChange);this.eventListeners.forward("six-checkbox-change","change",this.host);this.eventListeners.forward("six-checkbox-blur","blur",this.host);this.eventListeners.forward("six-checkbox-focus","focus",this.host)}disconnectedCallback(){var e;(e=this.host.shadowRoot)===null||e===void 0?void 0:e.removeEventListener("slotchange",this.handleSlotChange);this.eventListeners.removeAll()}componentWillLoad(){this.handleSlotChange()}componentDidLoad(){const e=this.nativeInput;if(e==null){return}e.indeterminate=this.indeterminate}async setFocus(e){var o;(o=this.nativeInput)===null||o===void 0?void 0:o.focus(e)}async removeFocus(){var e;(e=this.nativeInput)===null||e===void 0?void 0:e.blur()}handleSlotChange(){this.hasLabelSlot=r(this.host,"label");this.hasErrorSlot=r(this.host,"error-text")}render(){return t(s,{key:"54491495a98aa97389193b9c05dc254f2ca4cc06",inputId:this.inputId,label:this.label,labelId:this.labelId,hasLabelSlot:this.hasLabelSlot,errorTextId:this.errorTextId,hasErrorTextSlot:this.hasErrorSlot,errorText:this.errorText,errorTextCount:this.errorTextCount,size:"medium",disabled:this.disabled,required:this.required,displayError:this.invalid},t("label",{key:"dae2b0c1391767645bb66f4828a4f8d8a38deaf3",part:"base",class:{checkbox:true,"checkbox--checked":this.checked,"checkbox--disabled":this.disabled,"checkbox--focused":this.hasFocus,"checkbox--invalid":this.invalid,"checkbox--indeterminate":this.indeterminate},htmlFor:this.inputId,onMouseDown:this.handleMouseDown},t("span",{key:"ed1796c0cc17867f04d104689d987d65b5bb0392",part:"control",class:"checkbox__control"},this.checked&&t("span",{part:"checked-icon",class:"checkbox__icon"},t("svg",{viewBox:"0 0 16 16"},t("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd","stroke-linecap":"round"},t("g",{stroke:"currentColor","stroke-width":"2"},t("g",{transform:"translate(3.428571, 3.428571)"},t("path",{d:"M0,5.71428571 L3.42857143,9.14285714"}),t("path",{d:"M9.14285714,0 L3.42857143,9.14285714"})))))),!this.checked&&this.indeterminate&&t("span",{part:"indeterminate-icon",class:"checkbox__icon"},t("svg",{viewBox:"0 0 16 16"},t("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd","stroke-linecap":"round"},t("g",{stroke:"currentColor","stroke-width":"2"},t("g",{transform:"translate(2.285714, 6.857143)"},t("path",{d:"M10.2857143,1.14285714 L1.14285714,1.14285714"})))))),t("input",{key:"36becd2a1efa0d8aca0b5c2b35864b0e3b6c6ea9",ref:e=>this.nativeInput=e,id:this.inputId,type:"checkbox",name:this.name,value:this.value,checked:this.checked,disabled:this.disabled,required:this.required,role:"checkbox","aria-checked":this.checked?"true":"false","aria-labelledby":this.labelId,onChange:this.handleChange,onBlur:this.handleBlur,onFocus:this.handleFocus})),t("span",{key:"845042ded0f6b244b57c9a1db3d276bfa13a5884",part:"text",id:this.textId,class:"checkbox__text"},t("slot",{key:"8b7107860fe3f1d1fd8ce7ace01750b9a426cada"}))))}get host(){return i(this)}static get watchers(){return{checked:["handleCheckedChange"],indeterminate:["handleCheckedChange"],errorText:["handleLabelChange"],label:["handleLabelChange"]}}};d.style=a;const x=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:block}:focus{outline:none}.menu-item{position:relative;display:flex;align-items:stretch;font-family:var(--six-font-sans);font-size:var(--six-font-size-small);font-weight:var(--six-font-weight-normal);line-height:var(--six-line-height-normal);letter-spacing:var(--six-letter-spacing-normal);text-align:left;color:var(--six-input-color);border-radius:var(--six-border-radius-medium);padding:var(--six-spacing-x-small) var(--six-spacing-medium);transition:var(--six-transition-fast) fill;user-select:none;white-space:nowrap;cursor:pointer}.menu-item.menu-item--focused:not(.menu-item--disabled){outline:none;background-color:var(--six-menu-item-background-color)}.menu-item.menu-item--active:not(.menu-item--disabled){outline:none;background-color:var(--six-menu-item-background-color)}.menu-item.menu-item--disabled{outline:none;color:var(--six-input-color-disabled);cursor:not-allowed}.menu-item .menu-item__label{flex:1 1 auto;align-self:center}.menu-item .menu-item__prefix{flex:0 0 auto;display:flex;align-items:center}.menu-item .menu-item__prefix ::slotted(:last-child){margin-right:0.5em}.menu-item .menu-item__suffix{flex:0 0 auto;display:flex;align-items:center}.menu-item .menu-item__suffix ::slotted(:first-child){margin-left:0.5em}.menu-item .menu-item__check{flex:0 0 auto;display:flex;align-items:center;margin-left:var(--six-spacing-small);visibility:hidden;font-size:inherit}.menu-item .menu-item__checkbox{margin-top:-1px}.menu-item--checked .menu-item__check{visibility:visible}";const b=x;const m=class{constructor(o){e(this,o);this.handleCheckboxChange=()=>{this.host.dispatchEvent(new Event("click",{bubbles:true,cancelable:true}))};this.hasFocus=false;this.active=false;this.checkType="check";this.checked=false;this.value="";this.disabled=false}connectedCallback(){this.handleBlur=this.handleBlur.bind(this);this.handleFocus=this.handleFocus.bind(this);this.handleMouseEnter=this.handleMouseEnter.bind(this);this.handleMouseLeave=this.handleMouseLeave.bind(this);this.handleCheckboxChange=this.handleCheckboxChange.bind(this)}async setFocus(e){var o;(o=this.menuItem)===null||o===void 0?void 0:o.focus(e)}async removeFocus(){var e;(e=this.menuItem)===null||e===void 0?void 0:e.blur()}getTextLabel(){return Promise.resolve(l(this.defaultSlot))}handleBlur(){this.hasFocus=false}handleFocus(){this.hasFocus=true}handleMouseEnter(){this.active=true}handleMouseLeave(){this.active=false;this.hasFocus=false}render(){return t("div",{key:"d8c10ca0fc9bd795b87790337f2cc0c792999685",ref:e=>this.menuItem=e,part:"base",class:{"menu-item":true,"menu-item--checked":this.checked,"menu-item--disabled":this.disabled,"menu-item--focused":this.hasFocus,"menu-item--active":this.active},role:"menuitem","aria-disabled":this.disabled?"true":"false","aria-checked":this.checked?"true":"false",tabIndex:!this.disabled?0:undefined,onFocus:this.handleFocus,onBlur:this.handleBlur,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},this.checkType==="checkbox"&&t("span",{class:"menu-item__checkbox"},t("six-checkbox",{"onSix-checkbox-change":this.handleCheckboxChange,disabled:this.disabled,checked:this.checked})),t("span",{key:"470f2fee47a4120c0dead3b7996220af9e5274d1",part:"prefix",class:"menu-item__prefix"},t("slot",{key:"fdddb68cb266d02f6a6a2b46ffcdecb1d8eb32db",name:"prefix"})),t("span",{key:"6d9fe694ce0e07f2aac3604b905f9194f4764057",part:"label",class:"menu-item__label"},t("slot",{key:"ef2903a04191f78955802da5edefd32583305068",ref:e=>this.defaultSlot=e})),t("span",{key:"d4f6ee6c2789c33deaf08eb585ec7ca283b59170",part:"suffix",class:"menu-item__suffix"},t("slot",{key:"39a1d59be3d1f9deda4c55b1575a72c647600783",name:"suffix"})),this.checkType==="check"&&t("span",{part:"checked-icon",class:"menu-item__check"},t("six-icon",{size:"small","aria-hidden":"true"},"check")))}get host(){return i(this)}};m.style=b;export{d as six_checkbox,m as six_menu_item};
2
- //# sourceMappingURL=p-c1d68730.entry.js.map
1
+ import{r as e,c as o,h as t,g as i}from"./p-05eb1bab.js";import{F as s}from"./p-605bdd81.js";import{h as r,a as l}from"./p-0cebf1d2.js";import{E as n}from"./p-8bfb4bfc.js";const c=':host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control .form-control__error-text{display:none;text-align:left}.form-control--has-label .form-control__label{display:inline-block;color:var(--six-input-label-color);font-weight:var(--six-font-weight-bold);margin-bottom:var(--six-spacing-x-small)}.form-control--has-label .form-control__label__required::after{color:var(--six-color-danger-800);content:"*";transform:scale(1.1);margin-left:var(--six-spacing-xxx-small);position:absolute}.form-control--has-label.form-control--small .form-control__label{font-size:var(--six-input-label-font-size-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--six-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control_label{font-size:var(--six-input-label-font-size-large)}.form-control--has-help-text .form-control__help-text{display:block;color:var(--six-input-help-text-color);margin-top:var(--six-spacing-x-small)}.form-control--has-help-text .form-control__help-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--has-error-text .form-control__error-text{display:block;margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text .form-control__error-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text.form-control--small .form-control__error-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-error-text.form-control--medium .form-control__error-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-error-text.form-control--large .form-control__error-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--disabled .form-control__help-text{color:var(--six-input-help-text-color-disabled)}.form-control--disabled .form-control__label{color:var(--six-input-label-color-disabled)}.form-control--invalid:not(.form-control--disabled) .form-control__label{color:var(--six-input-label-color)}:host{display:inline-block}.checkbox{display:inline-flex;align-items:center;font-family:var(--six-font-family);font-size:var(--six-input-font-size-medium);font-weight:var(--six-input-font-weight);color:var(--six-input-color);vertical-align:middle;cursor:pointer}.checkbox--focused .checkbox__control{outline:var(--six-focus-ring);outline-offset:0}.checkbox__control{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--six-selection-control-toggle-size);min-width:var(--six-selection-control-toggle-size);height:var(--six-selection-control-toggle-size);border:solid var(--six-border-width) var(--six-input-border-color);border-radius:0;background-color:var(--six-input-background-color);color:var(--six-checkbox-color);transition:var(--six-transition-fast) border-color, var(--six-transition-fast) background-color, var(--six-transition-fast) color, var(--six-transition-fast) box-shadow}.checkbox__control input[type=checkbox]{position:absolute;opacity:0;padding:0;margin:0;pointer-events:none;min-width:var(--six-selection-control-toggle-size)}.checkbox__control .checkbox__icon{display:inline-flex;width:var(--six-selection-control-toggle-size);height:var(--six-selection-control-toggle-size)}.checkbox__control .checkbox__icon svg{width:100%;height:100%}.checkbox:not(.checkbox--checked):not(.checkbox--disabled) .checkbox__control:hover{border-color:var(--six-input-border-color-hover)}.checkbox--checked .checkbox__control,.checkbox--indeterminate .checkbox__control{border-color:var(--six-selection-control-color);background-color:var(--six-selection-control-color)}.checkbox.checkbox--checked:not(.checkbox--disabled) .checkbox__control:hover,.checkbox.checkbox--indeterminate:not(.checkbox--disabled) .checkbox__control:hover{border-color:var(--six-input-border-color-focus);background-color:var(--six-input-border-color-focus)}.checkbox--disabled{cursor:not-allowed;color:var(--six-input-color-disabled)}.checkbox--disabled .checkbox__control{border-color:var(--six-input-border-color-disabled)}.checkbox--disabled.checkbox--checked .checkbox__control,.checkbox--disabled.checkbox--indeterminate .checkbox__control{background-color:var(--six-selection-control-color-disabled)}.checkbox--invalid:not(.checkbox--disabled) .checkbox__control{border-color:var(--six-input-border-color-danger)}.checkbox__text{line-height:var(--six-selection-control-toggle-size);margin-left:0.5em;user-select:none}';const a=c;let h=0;const d=class{constructor(t){e(this,t);this.sixBlur=o(this,"six-checkbox-blur",7);this.sixChange=o(this,"six-checkbox-change",7);this.sixFocus=o(this,"six-checkbox-focus",7);this.inputId=`checkbox-${++h}`;this.labelId=`checkbox-label-${h}`;this.textId=`checkbox-text-${h}`;this.errorTextId=`input-error-text-${h}`;this.eventListeners=new n;this.handleChange=()=>{if(this.nativeInput!=null){this.checked=this.nativeInput.checked;this.indeterminate=false;this.sixChange.emit()}};this.handleBlur=()=>{this.hasFocus=false;this.sixBlur.emit()};this.handleFocus=()=>{this.hasFocus=true;this.sixFocus.emit()};this.handleMouseDown=e=>{var o;e.preventDefault();(o=this.nativeInput)===null||o===void 0?void 0:o.focus()};this.hasFocus=false;this.hasLabelSlot=false;this.hasErrorSlot=false;this.name="";this.value="on";this.disabled=false;this.required=false;this.label="";this.errorText="";this.errorTextCount=undefined;this.invalid=false;this.checked=false;this.indeterminate=false}handleCheckedChange(){if(this.nativeInput==null)return;this.nativeInput.checked=this.checked;this.checked=this.nativeInput.checked;this.nativeInput.indeterminate=this.indeterminate}handleLabelChange(){this.handleSlotChange()}connectedCallback(){var e;(e=this.host.shadowRoot)===null||e===void 0?void 0:e.addEventListener("slotchange",this.handleSlotChange);this.eventListeners.forward("six-checkbox-change","change",this.host);this.eventListeners.forward("six-checkbox-blur","blur",this.host);this.eventListeners.forward("six-checkbox-focus","focus",this.host)}disconnectedCallback(){var e;(e=this.host.shadowRoot)===null||e===void 0?void 0:e.removeEventListener("slotchange",this.handleSlotChange);this.eventListeners.removeAll()}componentWillLoad(){this.handleSlotChange()}componentDidLoad(){const e=this.nativeInput;if(e==null){return}e.indeterminate=this.indeterminate}async setFocus(e){var o;(o=this.nativeInput)===null||o===void 0?void 0:o.focus(e)}async removeFocus(){var e;(e=this.nativeInput)===null||e===void 0?void 0:e.blur()}handleSlotChange(){this.hasLabelSlot=r(this.host,"label");this.hasErrorSlot=r(this.host,"error-text")}render(){return t(s,{key:"12e158f9bba9dae3abb2db723d16597b232b92f3",inputId:this.inputId,label:this.label,labelId:this.labelId,hasLabelSlot:this.hasLabelSlot,errorTextId:this.errorTextId,hasErrorTextSlot:this.hasErrorSlot,errorText:this.errorText,errorTextCount:this.errorTextCount,size:"medium",disabled:this.disabled,required:this.required,displayError:this.invalid},t("label",{key:"a6227229bf66e4faf9eb71a5b2c313d471fed2e9",part:"base",class:{checkbox:true,"checkbox--checked":this.checked,"checkbox--disabled":this.disabled,"checkbox--focused":this.hasFocus,"checkbox--invalid":this.invalid,"checkbox--indeterminate":this.indeterminate},htmlFor:this.inputId,onMouseDown:this.handleMouseDown},t("span",{key:"1d2ff238550165afeff4670e6a7071368d8a9372",part:"control",class:"checkbox__control"},this.checked&&t("span",{part:"checked-icon",class:"checkbox__icon"},t("svg",{viewBox:"0 0 16 16"},t("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd","stroke-linecap":"round"},t("g",{stroke:"currentColor","stroke-width":"2"},t("g",{transform:"translate(3.428571, 3.428571)"},t("path",{d:"M0,5.71428571 L3.42857143,9.14285714"}),t("path",{d:"M9.14285714,0 L3.42857143,9.14285714"})))))),!this.checked&&this.indeterminate&&t("span",{part:"indeterminate-icon",class:"checkbox__icon"},t("svg",{viewBox:"0 0 16 16"},t("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd","stroke-linecap":"round"},t("g",{stroke:"currentColor","stroke-width":"2"},t("g",{transform:"translate(2.285714, 6.857143)"},t("path",{d:"M10.2857143,1.14285714 L1.14285714,1.14285714"})))))),t("input",{key:"e6184461c925112762cca5da17cdd5b287a7e88a",ref:e=>this.nativeInput=e,id:this.inputId,type:"checkbox",name:this.name,value:this.value,checked:this.checked,disabled:this.disabled,required:this.required,role:"checkbox","aria-checked":this.checked?"true":"false","aria-labelledby":this.labelId,onChange:this.handleChange,onBlur:this.handleBlur,onFocus:this.handleFocus})),t("span",{key:"f65e7b7349bb3bc10d1828cb928c377879579944",part:"text",id:this.textId,class:"checkbox__text"},t("slot",{key:"b67fbb40e8c47748e6713b708fc7d64be688dd82"}))))}get host(){return i(this)}static get watchers(){return{checked:["handleCheckedChange"],indeterminate:["handleCheckedChange"],errorText:["handleLabelChange"],label:["handleLabelChange"]}}};d.style=a;const b=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:block}:focus{outline:none}.menu-item{position:relative;display:flex;align-items:stretch;font-family:var(--six-font-sans);font-size:var(--six-font-size-small);font-weight:var(--six-font-weight-normal);line-height:var(--six-line-height-normal);letter-spacing:var(--six-letter-spacing-normal);text-align:left;color:var(--six-input-color);border-radius:var(--six-border-radius-medium);padding:var(--six-spacing-x-small) var(--six-spacing-medium);transition:var(--six-transition-fast) fill;user-select:none;white-space:nowrap;cursor:pointer}.menu-item.menu-item--focused:not(.menu-item--disabled){outline:none;background-color:var(--six-menu-item-background-color)}.menu-item.menu-item--active:not(.menu-item--disabled){outline:none;background-color:var(--six-menu-item-background-color)}.menu-item.menu-item--disabled{outline:none;color:var(--six-input-color-disabled);cursor:not-allowed}.menu-item .menu-item__label{flex:1 1 auto;align-self:center}.menu-item .menu-item__prefix{flex:0 0 auto;display:flex;align-items:center}.menu-item .menu-item__prefix ::slotted(:last-child){margin-right:0.5em}.menu-item .menu-item__suffix{flex:0 0 auto;display:flex;align-items:center}.menu-item .menu-item__suffix ::slotted(:first-child){margin-left:0.5em}.menu-item .menu-item__check{flex:0 0 auto;display:flex;align-items:center;margin-left:var(--six-spacing-small);visibility:hidden;font-size:inherit}.menu-item .menu-item__checkbox{margin-top:-1px}.menu-item--checked .menu-item__check{visibility:visible}";const x=b;const m=class{constructor(o){e(this,o);this.handleCheckboxChange=()=>{this.host.dispatchEvent(new Event("click",{bubbles:true,cancelable:true}))};this.hasFocus=false;this.active=false;this.checkType="check";this.checked=false;this.value="";this.disabled=false}connectedCallback(){this.handleBlur=this.handleBlur.bind(this);this.handleFocus=this.handleFocus.bind(this);this.handleMouseEnter=this.handleMouseEnter.bind(this);this.handleMouseLeave=this.handleMouseLeave.bind(this);this.handleCheckboxChange=this.handleCheckboxChange.bind(this)}async setFocus(e){var o;(o=this.menuItem)===null||o===void 0?void 0:o.focus(e)}async removeFocus(){var e;(e=this.menuItem)===null||e===void 0?void 0:e.blur()}getTextLabel(){return Promise.resolve(l(this.defaultSlot))}handleBlur(){this.hasFocus=false}handleFocus(){this.hasFocus=true}handleMouseEnter(){this.active=true}handleMouseLeave(){this.active=false;this.hasFocus=false}render(){return t("div",{key:"d8c10ca0fc9bd795b87790337f2cc0c792999685",ref:e=>this.menuItem=e,part:"base",class:{"menu-item":true,"menu-item--checked":this.checked,"menu-item--disabled":this.disabled,"menu-item--focused":this.hasFocus,"menu-item--active":this.active},role:"menuitem","aria-disabled":this.disabled?"true":"false","aria-checked":this.checked?"true":"false",tabIndex:!this.disabled?0:undefined,onFocus:this.handleFocus,onBlur:this.handleBlur,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},this.checkType==="checkbox"&&t("span",{class:"menu-item__checkbox"},t("six-checkbox",{"onSix-checkbox-change":this.handleCheckboxChange,disabled:this.disabled,checked:this.checked})),t("span",{key:"470f2fee47a4120c0dead3b7996220af9e5274d1",part:"prefix",class:"menu-item__prefix"},t("slot",{key:"fdddb68cb266d02f6a6a2b46ffcdecb1d8eb32db",name:"prefix"})),t("span",{key:"6d9fe694ce0e07f2aac3604b905f9194f4764057",part:"label",class:"menu-item__label"},t("slot",{key:"ef2903a04191f78955802da5edefd32583305068",ref:e=>this.defaultSlot=e})),t("span",{key:"d4f6ee6c2789c33deaf08eb585ec7ca283b59170",part:"suffix",class:"menu-item__suffix"},t("slot",{key:"39a1d59be3d1f9deda4c55b1575a72c647600783",name:"suffix"})),this.checkType==="check"&&t("span",{part:"checked-icon",class:"menu-item__check"},t("six-icon",{size:"small","aria-hidden":"true"},"check")))}get host(){return i(this)}};m.style=x;export{d as six_checkbox,m as six_menu_item};
2
+ //# sourceMappingURL=p-37433242.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r,h as o}from"./p-05eb1bab.js";const a=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:inline-flex}.badge{display:inline-flex;align-items:center;justify-content:center;font-family:var(--six-font-family);font-size:var(--six-font-size-x-small);font-weight:var(--six-font-weight-semibold);letter-spacing:var(--six-letter-spacing-normal);line-height:1;border-radius:var(--six-border-radius-small);white-space:nowrap;padding:3px 6px;user-select:none;cursor:inherit}.badge--info{background-color:var(--six-color-web-rock-900);color:var(--six-color-white)}.badge--success{background-color:var(--six-color-success-500);color:var(--six-color-web-rock-900)}.badge--warning{background-color:var(--six-color-warning-700);color:var(--six-color-web-rock-900)}.badge--danger{background-color:var(--six-color-danger-800);color:var(--six-color-white)}.badge--action{background-color:var(--six-color-action-500);color:var(--six-color-white)}.badge--primary{background-color:var(--six-color-clay-50);color:var(--six-color-black)}.badge--pill{border-radius:var(--six-border-radius-pill)}.badge--pulse{animation:pulse 1.5s infinite}.badge--pulse.badge--info{--pulse-color:var(--six-color-web-rock-900)}.badge--pulse.badge--success{--pulse-color:var(--six-color-success-500)}.badge--pulse.badge--warning{--pulse-color:var(--six-color-warning-700)}.badge--pulse.badge--danger{--pulse-color:var(--six-color-danger-800)}.badge--pulse.badge--action{--pulse-color:var(--six-color-action-500)}.badge--pulse.badge--primary{--pulse-color:var(--six-color-clay-50)}@keyframes pulse{0%{box-shadow:0 0 0 0 var(--pulse-color)}70%{box-shadow:0 0 0 0.5rem transparent}100%{box-shadow:0 0 0 0 transparent}}";const e=a;const s=class{constructor(o){r(this,o);this.type="primary";this.pill=false;this.pulse=false}render(){return o("span",{key:"25b1dedcb8bc33ec21f80ce88ca7a30ea62181c0",part:"base",class:{badge:true,"badge--primary":this.type==="primary","badge--secondary":this.type==="secondary","badge--success":this.type==="success","badge--warning":this.type==="warning","badge--danger":this.type==="danger","badge--action":this.type==="action","badge--info":this.type==="info","badge--pill":this.pill,"badge--pulse":this.pulse},role:"status"},o("slot",{key:"ac5c9645468d85700838f1cfaf71546bbb1b747b"}))}};s.style=e;export{s as six_badge};
2
- //# sourceMappingURL=p-a8863197.entry.js.map
1
+ import{r,h as o}from"./p-05eb1bab.js";const e=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:inline-flex}.badge{display:inline-flex;align-items:center;justify-content:center;font-family:var(--six-font-family);font-size:var(--six-font-size-x-small);font-weight:var(--six-font-weight-semibold);letter-spacing:var(--six-letter-spacing-normal);line-height:1;border-radius:var(--six-border-radius-small);white-space:nowrap;padding:3px 6px;user-select:none;cursor:inherit}.badge--info{background-color:var(--six-color-web-rock-900);color:var(--six-color-white)}.badge--success{background-color:var(--six-color-success-500);color:var(--six-color-web-rock-900)}.badge--warning{background-color:var(--six-color-warning-700);color:var(--six-color-web-rock-900)}.badge--danger{background-color:var(--six-color-danger-800);color:var(--six-color-white)}.badge--action{background-color:var(--six-color-action-500);color:var(--six-color-white)}.badge--primary{background-color:var(--six-color-clay-50);color:var(--six-color-black)}.badge--pill{border-radius:var(--six-border-radius-pill)}.badge--pulse{animation:pulse 1.5s infinite}.badge--pulse.badge--info{--pulse-color:var(--six-color-web-rock-900)}.badge--pulse.badge--success{--pulse-color:var(--six-color-success-500)}.badge--pulse.badge--warning{--pulse-color:var(--six-color-warning-700)}.badge--pulse.badge--danger{--pulse-color:var(--six-color-danger-800)}.badge--pulse.badge--action{--pulse-color:var(--six-color-action-500)}.badge--pulse.badge--primary{--pulse-color:var(--six-color-clay-50)}@keyframes pulse{0%{box-shadow:0 0 0 0 var(--pulse-color)}70%{box-shadow:0 0 0 0.5rem transparent}100%{box-shadow:0 0 0 0 transparent}}";const a=e;const s=class{constructor(o){r(this,o);this.type="primary";this.pill=false;this.pulse=false}render(){return o("span",{key:"5ccb11ed2b9b1da2aa08e34be5861e554f92ee9d",part:"base",class:{badge:true,"badge--primary":this.type==="primary","badge--secondary":this.type==="secondary","badge--success":this.type==="success","badge--warning":this.type==="warning","badge--danger":this.type==="danger","badge--action":this.type==="action","badge--info":this.type==="info","badge--pill":this.pill,"badge--pulse":this.pulse},role:"status"},o("slot",{key:"0de498349b0953001942ed8d831619b196dffc27"}))}};s.style=a;export{s as six_badge};
2
+ //# sourceMappingURL=p-416b0439.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as a,h as i}from"./p-05eb1bab.js";const t=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:inline-block;--size:2rem}.avatar{display:inline-flex;align-items:center;justify-content:center;position:relative;width:var(--size);height:var(--size);background-color:var(--six-avatar-background-color);font-family:var(--six-font-sans);font-size:calc(var(--size) * 0.5);font-weight:var(--six-font-weight-normal);color:var(--six-avatar-color);overflow:hidden;user-select:none;vertical-align:middle;cursor:pointer;outline:none}.avatar:hover{box-shadow:var(--six-shadow-medium)}.avatar--circle{border-radius:var(--six-border-radius-circle)}.avatar--rounded{border-radius:var(--six-border-radius-medium)}.avatar--square{border-radius:0}.avatar__icon{display:flex;align-items:center;justify-content:center;position:absolute;top:0;left:0;width:100%;height:100%}.avatar__initials{line-height:1;text-transform:uppercase}.avatar__image{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover}";const r=t;const e=class{constructor(i){a(this,i);this.handleImageError=()=>{this.hasError=true};this.hasError=false;this.image="";this.alt="";this.initials="";this.shape="circle"}render(){return i("div",{key:"a34616731683542d8bbdc16778ab34093654d773",part:"base",class:{avatar:true,"avatar--circle":this.shape==="circle","avatar--rounded":this.shape==="rounded","avatar--square":this.shape==="square"},role:"image","aria-label":this.alt,tabIndex:0},this.initials===""&&i("div",{part:"icon",class:"avatar__icon"},i("slot",{name:"icon"},i("six-icon",null,"person"))),this.initials&&i("div",{part:"initials",class:"avatar__initials"},this.initials),this.image&&!this.hasError&&i("img",{part:"image",class:"avatar__image",src:this.image,onError:this.handleImageError}))}};e.style=r;export{e as six_avatar};
2
- //# sourceMappingURL=p-03d1b956.entry.js.map
1
+ import{r as a,h as i}from"./p-05eb1bab.js";const t=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:inline-block;--size:2rem}.avatar{display:inline-flex;align-items:center;justify-content:center;position:relative;width:var(--size);height:var(--size);background-color:var(--six-avatar-background-color);font-family:var(--six-font-sans);font-size:calc(var(--size) * 0.5);font-weight:var(--six-font-weight-normal);color:var(--six-avatar-color);overflow:hidden;user-select:none;vertical-align:middle;cursor:pointer;outline:none}.avatar:hover{box-shadow:var(--six-shadow-medium)}.avatar--circle{border-radius:var(--six-border-radius-circle)}.avatar--rounded{border-radius:var(--six-border-radius-medium)}.avatar--square{border-radius:0}.avatar__icon{display:flex;align-items:center;justify-content:center;position:absolute;top:0;left:0;width:100%;height:100%}.avatar__initials{line-height:1;text-transform:uppercase}.avatar__image{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover}";const r=t;const e=class{constructor(i){a(this,i);this.handleImageError=()=>{this.hasError=true};this.hasError=false;this.image="";this.alt="";this.initials="";this.shape="circle"}render(){return i("div",{key:"d2a98a9d561a826a49fff6f7b9e40faa9a970d49",part:"base",class:{avatar:true,"avatar--circle":this.shape==="circle","avatar--rounded":this.shape==="rounded","avatar--square":this.shape==="square"},role:"image","aria-label":this.alt,tabIndex:0},this.initials===""&&i("div",{part:"icon",class:"avatar__icon"},i("slot",{name:"icon"},i("six-icon",null,"person"))),this.initials&&i("div",{part:"initials",class:"avatar__initials"},this.initials),this.image&&!this.hasError&&i("img",{part:"image",class:"avatar__image",src:this.image,onError:this.handleImageError}))}};e.style=r;export{e as six_avatar};
2
+ //# sourceMappingURL=p-4bc7bbdb.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as o,h as i,g as r}from"./p-05eb1bab.js";import{s}from"./p-8227aaed.js";function a(t,o,i={duration:150,easing:"ease",fill:"both"}){const r=o.getBoundingClientRect();const s=t.getBoundingClientRect();const a=r.left-s.left;const e=r.top-s.top;const l=r.width/s.width;const n=r.height/s.height;t.animate([{transformOrigin:"top left",transform:`translate(${a}px, ${e}px) scale(${l}, ${n})`},{transformOrigin:"top left",transform:"none"}],i)}const e=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:block}.tab-group{display:flex;border:solid 1px transparent;border-radius:0}.tab-group .tab-group__tabs{display:flex;position:relative}.tab-group--has-scroll-controls .tab-group__nav-container{position:relative;padding:0 var(--six-spacing-x-large)}.tab-group__scroll-button{display:flex;align-items:center;justify-content:center;position:absolute;top:0;bottom:0;width:var(--six-spacing-x-large)}.tab-group__scroll-button--left{left:0}.tab-group__scroll-button--right{right:0}.tab-group--top{flex-direction:column}.tab-group--top .tab-group__nav-container{order:1}.tab-group--top .tab-group__nav{display:flex;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}.tab-group--top .tab-group__nav::-webkit-scrollbar{width:0;height:0}.tab-group--top .tab-group__tabs{flex:1 1 auto;position:relative;flex-direction:row}.tab-group--top .tab-group__body{order:2}.tab-group--bottom{flex-direction:column}.tab-group--bottom .tab-group__nav-container{order:2}.tab-group--bottom .tab-group__nav{display:flex;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}.tab-group--bottom .tab-group__nav::-webkit-scrollbar{width:0;height:0}.tab-group--bottom .tab-group__tabs{flex:1 1 auto;position:relative;flex-direction:row}.tab-group--bottom .tab-group__body{order:1}.tab-group--left{flex-direction:row}.tab-group--left .tab-group__nav-container{order:1}.tab-group--left .tab-group__tabs{flex:0 0 auto;flex-direction:column}.tab-group--left .tab-group__body{flex:1 1 auto;order:2}.tab-group--right{flex-direction:row}.tab-group--right .tab-group__nav-container{order:2}.tab-group--right .tab-group__tabs{flex:0 0 auto;flex-direction:column}.tab-group--right .tab-group__body{flex:1 1 auto;order:1}";const l=e;const n=class{constructor(i){t(this,i);this.sixTabShow=o(this,"six-tab-show",7);this.sixTabHide=o(this,"six-tab-hide",7);this.handleClick=t=>{const o=t.target;const i=o.closest("six-tab");const r=i===null||i===void 0?void 0:i.closest("six-tab-group");if(r!==this.host){return false}if(i!=null){this.setActiveTab(i)}};this.handleKeyDown=t=>{if(this.nav==null)return;const o=t.target;const i=o.closest("six-tab");const r=i===null||i===void 0?void 0:i.closest("six-tab-group");if(r!==this.host){return false}if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){const o=document.activeElement;if(o&&o.tagName.toLowerCase()==="six-tab"){const i=this.getAllTabs();let r=i.indexOf(o);if(t.key==="Home"){r=0}else if(t.key==="End"){r=i.length-1}else if(t.key==="ArrowLeft"){r=Math.max(0,r-1)}else if(t.key==="ArrowRight"){r=Math.min(i.length-1,r+1)}i[r].setFocus({preventScroll:true});this.setActiveTab(i[r]);if(["top","bottom"].includes(this.placement)){s(i[r],this.nav,"horizontal")}t.preventDefault()}}};this.handleScrollLeft=()=>{if(this.nav==null)return;this.nav.scroll({left:this.nav.scrollLeft-this.nav.clientWidth,behavior:"smooth"})};this.handleScrollRight=()=>{if(this.nav==null)return;this.nav.scroll({left:this.nav.scrollLeft+this.nav.clientWidth,behavior:"smooth"})};this.hasLeftControl=false;this.hasRightControl=false;this.placement="top";this.noScrollControls=false}handleNoScrollControlsChange(){this.updateScrollControls()}componentDidLoad(){if(this.tabGroup==null||this.nav==null)return;const t=new IntersectionObserver(((t,o)=>{if(t[0].intersectionRatio>0){this.setAriaLabels();this.setActiveTab(this.getActiveTab()||this.getAllTabs()[0],false);o.unobserve(t[0].target)}}));t.observe(this.host);this.resizeObserver=new ResizeObserver((()=>this.updateScrollControls()));this.resizeObserver.observe(this.nav);requestAnimationFrame((()=>this.updateScrollControls()));this.nav.addEventListener("scroll",(()=>{if(this.nav==null){return}this.hasRightControl=this.calculateRightControlVisibility();this.hasLeftControl=this.calculateLeftControlVisibility()}));this.mutationObserver=new MutationObserver((t=>{if(t.some((t=>{var o;return!["aria-labelledby","aria-controls"].includes((o=t.attributeName)!==null&&o!==void 0?o:"")}))){setTimeout((()=>this.setAriaLabels()))}}));this.mutationObserver.observe(this.host,{attributes:true,childList:true,subtree:true})}disconnectedCallback(){if(this.mutationObserver==null||this.tabGroup==null||this.nav==null||this.resizeObserver==null){return}this.mutationObserver.disconnect();this.resizeObserver.unobserve(this.nav)}async show(t){const o=this.getAllTabs();const i=o.find((o=>o.panel===t));if(i!=null){this.setActiveTab(i)}}getAllTabs(t=false){var o;const i=(o=this.tabs)===null||o===void 0?void 0:o.querySelector("slot");if(i==null)return[];return[...i.assignedElements()].filter((o=>t?o.tagName.toLowerCase()==="six-tab":o.tagName.toLowerCase()==="six-tab"&&!o.disabled))}getAllPanels(){var t;const o=(t=this.body)===null||t===void 0?void 0:t.querySelector("slot");if(o==null)return[];return[...o.assignedElements()].filter((t=>t.tagName.toLowerCase()==="six-tab-panel"))}getActiveTab(){return this.getAllTabs().find((t=>t.active))}calculateRightControlVisibility(){var t,o,i;if(this.nav==null){return false}return Math.abs((t=this.nav)===null||t===void 0?void 0:t.scrollLeft)+((o=this.nav)===null||o===void 0?void 0:o.clientWidth)<((i=this.nav)===null||i===void 0?void 0:i.scrollWidth)-1}calculateLeftControlVisibility(){var t;if(this.nav==null){return false}return Math.abs((t=this.nav)===null||t===void 0?void 0:t.scrollLeft)>0}updateScrollControls(){if(this.nav==null)return;this.hasRightControl=this.noScrollControls?false:["top","bottom"].includes(this.placement)&&this.calculateRightControlVisibility();this.hasLeftControl=this.noScrollControls?false:["top","bottom"].includes(this.placement)&&this.calculateLeftControlVisibility()}setActiveTab(t,o=true){var i,r,e;if(this.nav==null)return;const l=(i=t===null||t===void 0?void 0:t.shadowRoot)===null||i===void 0?void 0:i.querySelector(".tab__indicator");const n=(e=(r=this.getActiveTab())===null||r===void 0?void 0:r.shadowRoot)===null||e===void 0?void 0:e.querySelector(".tab__indicator");if(n!=null&&l!=null){a(l,n)}if(t!==this.activeTab&&!t.disabled){const i=this.activeTab;this.activeTab=t;this.getAllTabs().map((t=>t.active=t===this.activeTab));this.getAllPanels().map((t=>{var o;return t.active=t.name===((o=this.activeTab)===null||o===void 0?void 0:o.panel)}));if(["top","bottom"].includes(this.placement)){s(this.activeTab,this.nav,"horizontal")}if(o){if(i!=null){this.sixTabHide.emit({name:i.panel})}this.sixTabShow.emit({name:this.activeTab.panel})}}}setAriaLabels(){const t=this.getAllTabs();const o=this.getAllPanels();t.map((t=>{var i,r;const s=o.find((o=>o.name===t.panel));if(s!=null){t.setAttribute("aria-controls",(i=s.getAttribute("id"))!==null&&i!==void 0?i:"");s.setAttribute("aria-labelledby",(r=t.getAttribute("id"))!==null&&r!==void 0?r:"")}}))}render(){return i("div",{key:"36be38a8a29e4c551a670e6ab4e3efed68dda0b8",part:"base",ref:t=>this.tabGroup=t,class:{"tab-group":true,"tab-group--top":this.placement==="top","tab-group--bottom":this.placement==="bottom","tab-group--left":this.placement==="left","tab-group--right":this.placement==="right","tab-group--has-scroll-controls":this.hasRightControl||this.hasLeftControl},onClick:this.handleClick,onKeyDown:this.handleKeyDown},i("div",{key:"04b3f5dea207ac614d91bafa647bcef07bd89dfc",class:"tab-group__nav-container"},this.hasLeftControl&&i("six-icon-button",{class:"tab-group__scroll-button tab-group__scroll-button--left",exportparts:"base:scroll-button",name:"chevron_left",onClick:this.handleScrollLeft}),i("div",{ref:t=>this.nav=t,key:"nav",part:"nav",class:"tab-group__nav"},i("div",{key:"5f8fdd3dbb4589b9616e048fb5cc59ffe41fb534",ref:t=>this.tabs=t,part:"tabs",class:"tab-group__tabs",role:"tablist"},i("slot",{key:"a1d71effb433bdf3cca519eb2639af35ae481114",name:"nav"}))),this.hasRightControl&&i("six-icon-button",{class:"tab-group__scroll-button tab-group__scroll-button--right",exportparts:"base:scroll-button",name:"chevron_right",onClick:this.handleScrollRight})),i("div",{key:"e8a619a1263d91f502ae3301e96bd439979b1c70",ref:t=>this.body=t,part:"body",class:"tab-group__body"},i("slot",{key:"df7a1ab8629777eb970258b76633c2282ed1169b"})))}get host(){return r(this)}static get watchers(){return{noScrollControls:["handleNoScrollControlsChange"]}}};n.style=l;export{n as six_tab_group};
2
- //# sourceMappingURL=p-b4bc4915.entry.js.map
1
+ import{r as t,c as o,h as i,g as r}from"./p-05eb1bab.js";import{s}from"./p-8227aaed.js";function a(t,o,i={duration:150,easing:"ease",fill:"both"}){const r=o.getBoundingClientRect();const s=t.getBoundingClientRect();const a=r.left-s.left;const e=r.top-s.top;const l=r.width/s.width;const n=r.height/s.height;t.animate([{transformOrigin:"top left",transform:`translate(${a}px, ${e}px) scale(${l}, ${n})`},{transformOrigin:"top left",transform:"none"}],i)}const e=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:block}.tab-group{display:flex;border:solid 1px transparent;border-radius:0}.tab-group .tab-group__tabs{display:flex;position:relative}.tab-group--has-scroll-controls .tab-group__nav-container{position:relative;padding:0 var(--six-spacing-x-large)}.tab-group__scroll-button{display:flex;align-items:center;justify-content:center;position:absolute;top:0;bottom:0;width:var(--six-spacing-x-large)}.tab-group__scroll-button--left{left:0}.tab-group__scroll-button--right{right:0}.tab-group--top{flex-direction:column}.tab-group--top .tab-group__nav-container{order:1}.tab-group--top .tab-group__nav{display:flex;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}.tab-group--top .tab-group__nav::-webkit-scrollbar{width:0;height:0}.tab-group--top .tab-group__tabs{flex:1 1 auto;position:relative;flex-direction:row}.tab-group--top .tab-group__body{order:2}.tab-group--bottom{flex-direction:column}.tab-group--bottom .tab-group__nav-container{order:2}.tab-group--bottom .tab-group__nav{display:flex;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}.tab-group--bottom .tab-group__nav::-webkit-scrollbar{width:0;height:0}.tab-group--bottom .tab-group__tabs{flex:1 1 auto;position:relative;flex-direction:row}.tab-group--bottom .tab-group__body{order:1}.tab-group--left{flex-direction:row}.tab-group--left .tab-group__nav-container{order:1}.tab-group--left .tab-group__tabs{flex:0 0 auto;flex-direction:column}.tab-group--left .tab-group__body{flex:1 1 auto;order:2}.tab-group--right{flex-direction:row}.tab-group--right .tab-group__nav-container{order:2}.tab-group--right .tab-group__tabs{flex:0 0 auto;flex-direction:column}.tab-group--right .tab-group__body{flex:1 1 auto;order:1}";const l=e;const n=class{constructor(i){t(this,i);this.sixTabShow=o(this,"six-tab-show",7);this.sixTabHide=o(this,"six-tab-hide",7);this.handleClick=t=>{const o=t.target;const i=o.closest("six-tab");const r=i===null||i===void 0?void 0:i.closest("six-tab-group");if(r!==this.host){return false}if(i!=null){this.setActiveTab(i)}};this.handleKeyDown=t=>{if(this.nav==null)return;const o=t.target;const i=o.closest("six-tab");const r=i===null||i===void 0?void 0:i.closest("six-tab-group");if(r!==this.host){return false}if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){const o=document.activeElement;if(o&&o.tagName.toLowerCase()==="six-tab"){const i=this.getAllTabs();let r=i.indexOf(o);if(t.key==="Home"){r=0}else if(t.key==="End"){r=i.length-1}else if(t.key==="ArrowLeft"){r=Math.max(0,r-1)}else if(t.key==="ArrowRight"){r=Math.min(i.length-1,r+1)}i[r].setFocus({preventScroll:true});this.setActiveTab(i[r]);if(["top","bottom"].includes(this.placement)){s(i[r],this.nav,"horizontal")}t.preventDefault()}}};this.handleScrollLeft=()=>{if(this.nav==null)return;this.nav.scroll({left:this.nav.scrollLeft-this.nav.clientWidth,behavior:"smooth"})};this.handleScrollRight=()=>{if(this.nav==null)return;this.nav.scroll({left:this.nav.scrollLeft+this.nav.clientWidth,behavior:"smooth"})};this.hasLeftControl=false;this.hasRightControl=false;this.placement="top";this.noScrollControls=false}handleNoScrollControlsChange(){this.updateScrollControls()}componentDidLoad(){if(this.tabGroup==null||this.nav==null)return;const t=new IntersectionObserver(((t,o)=>{if(t[0].intersectionRatio>0){this.setAriaLabels();this.setActiveTab(this.getActiveTab()||this.getAllTabs()[0],false);o.unobserve(t[0].target)}}));t.observe(this.host);this.resizeObserver=new ResizeObserver((()=>this.updateScrollControls()));this.resizeObserver.observe(this.nav);requestAnimationFrame((()=>this.updateScrollControls()));this.nav.addEventListener("scroll",(()=>{if(this.nav==null){return}this.hasRightControl=this.calculateRightControlVisibility();this.hasLeftControl=this.calculateLeftControlVisibility()}));this.mutationObserver=new MutationObserver((t=>{if(t.some((t=>{var o;return!["aria-labelledby","aria-controls"].includes((o=t.attributeName)!==null&&o!==void 0?o:"")}))){setTimeout((()=>this.setAriaLabels()))}}));this.mutationObserver.observe(this.host,{attributes:true,childList:true,subtree:true})}disconnectedCallback(){if(this.mutationObserver==null||this.tabGroup==null||this.nav==null||this.resizeObserver==null){return}this.mutationObserver.disconnect();this.resizeObserver.unobserve(this.nav)}async show(t){const o=this.getAllTabs();const i=o.find((o=>o.panel===t));if(i!=null){this.setActiveTab(i)}}getAllTabs(t=false){var o;const i=(o=this.tabs)===null||o===void 0?void 0:o.querySelector("slot");if(i==null)return[];return[...i.assignedElements()].filter((o=>t?o.tagName.toLowerCase()==="six-tab":o.tagName.toLowerCase()==="six-tab"&&!o.disabled))}getAllPanels(){var t;const o=(t=this.body)===null||t===void 0?void 0:t.querySelector("slot");if(o==null)return[];return[...o.assignedElements()].filter((t=>t.tagName.toLowerCase()==="six-tab-panel"))}getActiveTab(){return this.getAllTabs().find((t=>t.active))}calculateRightControlVisibility(){var t,o,i;if(this.nav==null){return false}return Math.abs((t=this.nav)===null||t===void 0?void 0:t.scrollLeft)+((o=this.nav)===null||o===void 0?void 0:o.clientWidth)<((i=this.nav)===null||i===void 0?void 0:i.scrollWidth)-1}calculateLeftControlVisibility(){var t;if(this.nav==null){return false}return Math.abs((t=this.nav)===null||t===void 0?void 0:t.scrollLeft)>0}updateScrollControls(){if(this.nav==null)return;this.hasRightControl=this.noScrollControls?false:["top","bottom"].includes(this.placement)&&this.calculateRightControlVisibility();this.hasLeftControl=this.noScrollControls?false:["top","bottom"].includes(this.placement)&&this.calculateLeftControlVisibility()}setActiveTab(t,o=true){var i,r,e;if(this.nav==null)return;const l=(i=t===null||t===void 0?void 0:t.shadowRoot)===null||i===void 0?void 0:i.querySelector(".tab__indicator");const n=(e=(r=this.getActiveTab())===null||r===void 0?void 0:r.shadowRoot)===null||e===void 0?void 0:e.querySelector(".tab__indicator");if(n!=null&&l!=null){a(l,n)}if(t!==this.activeTab&&!t.disabled){const i=this.activeTab;this.activeTab=t;this.getAllTabs().map((t=>t.active=t===this.activeTab));this.getAllPanels().map((t=>{var o;return t.active=t.name===((o=this.activeTab)===null||o===void 0?void 0:o.panel)}));if(["top","bottom"].includes(this.placement)){s(this.activeTab,this.nav,"horizontal")}if(o){if(i!=null){this.sixTabHide.emit({name:i.panel})}this.sixTabShow.emit({name:this.activeTab.panel})}}}setAriaLabels(){const t=this.getAllTabs();const o=this.getAllPanels();t.map((t=>{var i,r;const s=o.find((o=>o.name===t.panel));if(s!=null){t.setAttribute("aria-controls",(i=s.getAttribute("id"))!==null&&i!==void 0?i:"");s.setAttribute("aria-labelledby",(r=t.getAttribute("id"))!==null&&r!==void 0?r:"")}}))}render(){return i("div",{key:"9752b81f3babdcbe656cc5552b7c07c7cc096d8d",part:"base",ref:t=>this.tabGroup=t,class:{"tab-group":true,"tab-group--top":this.placement==="top","tab-group--bottom":this.placement==="bottom","tab-group--left":this.placement==="left","tab-group--right":this.placement==="right","tab-group--has-scroll-controls":this.hasRightControl||this.hasLeftControl},onClick:this.handleClick,onKeyDown:this.handleKeyDown},i("div",{key:"d96c9094ddc1a9cd6ad9ac9c5ab559ac703ccd6e",class:"tab-group__nav-container"},this.hasLeftControl&&i("six-icon-button",{class:"tab-group__scroll-button tab-group__scroll-button--left",exportparts:"base:scroll-button",name:"chevron_left",onClick:this.handleScrollLeft}),i("div",{ref:t=>this.nav=t,key:"nav",part:"nav",class:"tab-group__nav"},i("div",{key:"288b14b0bbc790f1ae54e2a26693e9b103002715",ref:t=>this.tabs=t,part:"tabs",class:"tab-group__tabs",role:"tablist"},i("slot",{key:"249ef2f5d67dd3abf35b07028c9d2fe3798ef1ea",name:"nav"}))),this.hasRightControl&&i("six-icon-button",{class:"tab-group__scroll-button tab-group__scroll-button--right",exportparts:"base:scroll-button",name:"chevron_right",onClick:this.handleScrollRight})),i("div",{key:"3aa5553829dfefb71bfb725db55db8dc204f93dc",ref:t=>this.body=t,part:"body",class:"tab-group__body"},i("slot",{key:"8d96ff43d62b33d77bea3616ea5ac76ad6b99a76"})))}get host(){return r(this)}static get watchers(){return{noScrollControls:["handleNoScrollControlsChange"]}}};n.style=l;export{n as six_tab_group};
2
+ //# sourceMappingURL=p-63ee5e7e.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,c as i,h as s,g as e}from"./p-05eb1bab.js";import{P as n}from"./p-7f856f00.js";import{E as o}from"./p-8bfb4bfc.js";import{a as r,D as h}from"./p-a1502802.js";import{a as l}from"./p-0cebf1d2.js";function a(t){const i=t.tabIndex;return i>-1}function d(t){if(a(t)){return t}if(t.shadowRoot!=null){const i=[...t.shadowRoot.children].find((t=>a(t)));if(i!=null){return i}}if(t.children!=null){return[...t.children].map((t=>d(t))).at(0)}return undefined}const u=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:inline-block}.dropdown{position:relative}.dropdown__trigger{display:block}.dropdown__positioner{position:absolute;z-index:var(--six-z-index-dropdown)}.dropdown__positioner__filtered{width:100%}.dropdown__panel{font-family:var(--six-font-sans);font-size:var(--six-font-size-small);font-weight:var(--six-font-weight-normal);color:var(--color);background-color:var(--six-panel-background-color);border-radius:var(--six-border-radius-medium);border:1px solid var(--six-color-web-rock-300);box-shadow:var(--six-shadow-small);opacity:0;pointer-events:none;transform:scale(0.9);transition:var(--six-transition-fast) opacity, var(--six-transition-fast) transform;max-width:90vw}.dropdown__panel__scroll{max-height:18.75rem;overflow-y:auto;overflow-x:hidden;overscroll-behavior:none}.dropdown__panel__scroll--virtual{overflow-y:hidden;overflow-x:hidden}.filter-hidden{display:none}.dropdown__positioner[data-popper-placement^=top] .dropdown__panel{transform-origin:bottom}.dropdown__positioner[data-popper-placement^=bottom] .dropdown__panel{transform-origin:top}.dropdown__positioner[data-popper-placement^=left] .dropdown__panel{transform-origin:right}.dropdown__positioner[data-popper-placement^=right] .dropdown__panel{transform-origin:left}.dropdown__positioner.popover-visible .dropdown__panel{opacity:1;transform:none;pointer-events:all}.filter{border-bottom:1px solid var(--six-color-web-rock-300)}.filter__icon{color:var(--six-color-web-rock-600)}";const c=u;let f=0;const p=class{constructor(e){t(this,e);this.sixShow=i(this,"six-dropdown-show",7);this.sixAfterShow=i(this,"six-dropdown-after-show",7);this.sixHide=i(this,"six-dropdown-hide",7);this.sixAfterHide=i(this,"six-dropdown-after-hide",7);this.sixAutoFilter=i(this,"six-dropdown-auto-filter-fired",7);this.sixAsyncFilterFired=i(this,"six-async-filter-fired",7);this.sixScroll=i(this,"six-dropdown-scroll",7);this.componentId=`dropdown-${++f}`;this.isVisible=false;this.resizeObserver=new ResizeObserver(r((()=>this.updatePanelPosition()),100));this.eventListeners=new o;this.getMenuItems=()=>{var t,i,e,n;if(this.options.length>0){return{sixMenuItems:this.renderedOptions.map((t=>s("six-menu-item",{value:t.value},t.label))),selectionContainerItems:[]}}if(this.panel==null)return{sixMenuItems:[],selectionContainerItems:[]};const o=(t=this.panelSlot)===null||t===void 0?void 0:t.assignedElements({flatten:true}).filter(w).at(0);const r=(i=this.panelSlot)===null||i===void 0?void 0:i.assignedElements({flatten:true}).filter(v).at(0);const h=(o===null||o===void 0?void 0:o.querySelectorAll("six-menu-item"))||[];let l=((e=r===null||r===void 0?void 0:r.querySelector("slot"))===null||e===void 0?void 0:e.assignedElements().filter((t=>m(t))))||[];if(l.length===0){l=Array.from(((n=r===null||r===void 0?void 0:r.shadowRoot)===null||n===void 0?void 0:n.querySelectorAll("six-menu-item"))||[])}if(h.length>0||l.length>0){return{sixMenuItems:l,selectionContainerItems:[...h]}}else{return{sixMenuItems:r?Array.from(r.querySelectorAll("six-menu-item")):[],selectionContainerItems:[]}}};this.handleDocumentKeyDown=t=>{var i;const s=t;if(s.key==="Escape"){void this.hide();this.focusOnTrigger();return}if(this.filterInputElement===((i=this.host.shadowRoot)===null||i===void 0?void 0:i.activeElement)){if(s.key==="ArrowDown"){const{sixMenuItems:t,selectionContainerItems:i}=this.getMenuItems();const s=[...i,...t].find((t=>t.style.display!=="none"));if(s!=null){s.setFocus()}}}if(s.key==="Tab"){if(this.open&&document.activeElement!=null&&m(document.activeElement)){s.preventDefault();void this.hide();this.focusOnTrigger();return}setTimeout((()=>{var t,i;const s=this.container.getRootNode()instanceof ShadowRoot?(i=(t=document.activeElement)===null||t===void 0?void 0:t.shadowRoot)===null||i===void 0?void 0:i.activeElement:document.activeElement;if((s===null||s===void 0?void 0:s.closest(this.container.tagName.toLowerCase()))!==this.container){void this.hide();return}}))}};this.handleDocumentMouseDown=t=>{const i=t.composedPath();if(!i.includes(this.container)){void this.hide();return}};this.handlePanelSelect=t=>{const i=t.target;if(this.closeOnSelect&&v(i)){void this.hide();this.focusOnTrigger()}};this.handleTriggerClick=()=>{this.open?this.hide():this.show()};this.handleTriggerKeyDown=t=>{if(t.key==="Escape"){this.focusOnTrigger();void this.hide();return}if(!this.disableHideOnEnterAndSpace&&[" ","Enter"].includes(t.key)){t.preventDefault();this.open?void this.hide():void this.show();return}const i=this.getMenu();if(["ArrowDown","ArrowUp"].includes(t.key)){t.preventDefault();if(!this.open){void this.show()}if(i==null){return}const s=[...i.querySelectorAll("six-menu-item")];const e=s.at(0);const n=s.at(s.length-1);if(t.key==="ArrowDown"&&e!=null){e.setFocus();return}if(t.key==="ArrowUp"&&n!=null){n.setFocus();return}}const s=["Tab","Shift","Meta","Ctrl","Alt"];if(this.open&&i!=null&&!s.includes(t.key)){void i.typeToSelect(t.key);return}};this.handleTriggerKeyUp=t=>{if(t.key===" "){t.preventDefault()}};this.handleTriggerSlotChange=()=>{this.updateAccessibleTrigger()};this.handleDropdownScroll=()=>{if(this.scrollPanel==null)return;this.sixScroll.emit({scrollHeight:this.scrollPanel.scrollHeight,scrollTop:this.scrollPanel.scrollTop,scrollbarHeight:this.scrollPanel.offsetHeight*(this.scrollPanel.offsetHeight/this.scrollPanel.scrollHeight),scrollRatio:this.scrollPanel.scrollTop/(this.scrollPanel.scrollHeight-this.scrollPanel.clientHeight)})};this.open=false;this.placement="bottom-start";this.closeOnSelect=true;this.distance=4;this.skidding=0;this.hoist=false;this.containingElement=undefined;this.filter=false;this.asyncFilter=false;this.filterPlaceholder="Filter...";this.autofocusFilter=true;this.filterDebounce=0;this.disableHideOnEnterAndSpace=false;this.options=[];this.virtualScroll=false;this.matchTriggerWidth=false;this.renderedOptions=[]}get filterEnabled(){return this.filter||this.asyncFilter}get container(){return this.containingElement||this.host}handleOpenChange(){this.open?this.show():this.hide();this.updateAccessibleTrigger()}handlePopoverOptionsChange(){if(this.popover==null)return;this.popover.setOptions({strategy:this.hoist?"fixed":"absolute",placement:this.placement,distance:this.distance,skidding:this.skidding})}handleOptionsChange(){this.validateOptions()}validateOptions(){if(!Array.isArray(this.options)){this.options=[]}if(this.virtualScroll&&this.options.length===0){console.error("Options must be defined when using virtual scrolling")}this.renderedOptions=[...this.options]}componentWillLoad(){this.validateOptions();if(this.asyncFilter){this.filterDebounce=h}}componentDidLoad(){this.init();if(this.open){void this.show()}}connectedCallback(){this.init()}init(){this.initPopover();const t=this.filterInputElement;if(t!=null){this.eventListeners.add(t,"six-input-input",r((()=>{var i;const s=(i=t.value)!==null&&i!==void 0?i:"";if(this.filter){this.applyFilter(s)}this.emitFilterEvents(s)}),this.filterDebounce))}}applyFilter(t){var i;const s=((i=t.toLowerCase())===null||i===void 0?void 0:i.trim())||"";if(this.options.length>0){this.renderedOptions=this.options.filter((t=>{var i,e,n,o;return t.label&&((e=(i=String(t.label))===null||i===void 0?void 0:i.toLowerCase())===null||e===void 0?void 0:e.includes(s))||t.value&&((o=(n=String(t.value))===null||n===void 0?void 0:n.toLowerCase())===null||o===void 0?void 0:o.includes(s))}))}else{const{selectionContainerItems:t,sixMenuItems:i}=this.getMenuItems();const e=t.map((t=>t.value));t.forEach((async t=>{t.style.display=await b(t,s)?"unset":"none"}));i.forEach((async t=>{t.style.display=await b(t,s)&&!e.includes(t.value)?"unset":"none"}))}}resetFilter(){if(this.filterInputElement!=null){this.filterInputElement.value="";this.emitFilterEvents("")}if(this.options.length>0){this.renderedOptions=[...this.options]}else{const{selectionContainerItems:t,sixMenuItems:i}=this.getMenuItems();[...t,...i].forEach((t=>t.style.display="unset"))}}emitFilterEvents(t){if(this.filter){this.sixAutoFilter.emit({filterValue:t})}else if(this.asyncFilter){this.sixAsyncFilterFired.emit({filterValue:t})}}initPopover(){if(this.trigger==null||this.positioner==null)return;this.popover=new n(this.trigger,this.positioner,{strategy:this.hoist?"fixed":"absolute",placement:this.placement,distance:this.distance,skidding:this.skidding,transitionElement:this.panel,onAfterHide:()=>{if(this.filterEnabled){this.resetFilter()}this.sixAfterHide.emit()},onAfterShow:async()=>{this.sixAfterShow.emit()},onTransitionEnd:()=>{if(!this.open&&this.scrollPanel!=null){this.scrollPanel.scrollTop=0}}})}disconnectedCallback(){var t;this.resizeObserver.disconnect();this.eventListeners.removeAll();void this.hide();(t=this.popover)===null||t===void 0?void 0:t.destroy();this.popover=undefined}async show(){if(this.isVisible||this.popover==null||this.panel==null){return}const t=this.sixShow.emit();if(t.defaultPrevented){this.open=false;return}this.eventListeners.add(this.panel,"six-menu-item-selected",this.handlePanelSelect);this.eventListeners.add(document,"keydown",this.handleDocumentKeyDown);this.eventListeners.add(document,"mousedown",this.handleDocumentMouseDown);this.isVisible=true;this.open=true;if(this.trigger!=null){this.resizeObserver.observe(this.trigger)}this.updatePanelPosition();this.popover.show();if(this.filterEnabled&&this.autofocusFilter){requestAnimationFrame((()=>{var t;(t=this.filterInputElement)===null||t===void 0?void 0:t.setFocus()}))}}updatePanelPosition(){if(!this.open){return}if(this.matchTriggerWidth&&this.trigger!=null&&this.panel!=null){const t=this.trigger.getBoundingClientRect().width;this.panel.style.minWidth=`${t}px`}if(this.popover!=null){this.popover.reposition()}}async hide(){this.resizeObserver.disconnect();if(!this.isVisible||this.panel==null||this.popover==null){return}const t=this.sixHide.emit();if(t.defaultPrevented){this.open=true;return}this.eventListeners.remove(this.panel,"six-menu-item-selected",this.handlePanelSelect);this.eventListeners.remove(document,"keydown",this.handleDocumentKeyDown);this.eventListeners.remove(document,"mousedown",this.handleDocumentMouseDown);this.isVisible=false;this.open=false;this.popover.hide()}focusOnTrigger(){var t;if(this.trigger==null)return;const i=(t=this.triggerSlot)===null||t===void 0?void 0:t.assignedElements({flatten:true}).at(0);if(i!=null){if(typeof i.setFocus==="function"){i.setFocus()}else if(typeof i.focus==="function"){i.focus()}}}getMenu(){var t;return(t=this.panelSlot)===null||t===void 0?void 0:t.assignedElements({flatten:true}).filter(v).at(0)}async reposition(){if(this.open&&this.popover!=null){this.popover.reposition()}}updateAccessibleTrigger(){var t;if(this.trigger==null)return;const i=((t=this.triggerSlot)===null||t===void 0?void 0:t.assignedElements({flatten:true}))||[];const s=i.map(d).at(0);if(s!=null){s.setAttribute("aria-haspopup","true");s.setAttribute("aria-expanded",this.open?"true":"false")}}render(){return s("div",{key:"6569a6e118fd68e19f14dcae0553e25f81987923",part:"base",id:this.componentId,class:{dropdown:true,"dropdown--open":this.open}},s("span",{key:"be04c5d687eafa3c58c9fed9cf43f72d43aa45ef",part:"trigger",class:"dropdown__trigger",ref:t=>this.trigger=t,onClick:this.handleTriggerClick,onKeyDown:this.handleTriggerKeyDown,onKeyUp:this.handleTriggerKeyUp},s("slot",{key:"fba562d4fc45a0874e5cf8caad5e9710d6dd34e0",name:"trigger",ref:t=>this.triggerSlot=t,onSlotchange:this.handleTriggerSlotChange})),s("div",{key:"d37f1cb0246d47ca34004f35e3575e8433d998c8",ref:t=>this.positioner=t,class:{dropdown__positioner:true,dropdown__positioner__filtered:(this.filter||this.asyncFilter)&&!this.hoist}},s("div",{key:"e6c08b51f39a12259b4d8911770e1e1754dc4b8e",ref:t=>this.panel=t,part:"panel",class:"dropdown__panel",role:"menu","aria-hidden":this.open?"false":"true","aria-labelledby":this.componentId},this.filterEnabled&&s("six-input",{class:{filter:true,"filter-hidden":!this.open},"dropdown-search":true,"aria-hidden":this.open?"false":"true",ref:t=>this.filterInputElement=t,placeholder:this.filterPlaceholder},s("six-icon",{class:"filter__icon",slot:"suffix",size:"small"},"search")),s("div",{key:"174d0a5dd5965877e9278475112e2f14d959966d",class:{dropdown__panel__scroll:true,"dropdown__panel__scroll--virtual":this.virtualScroll},onScroll:this.handleDropdownScroll,ref:t=>this.scrollPanel=t},s("slot",{key:"fa0fc63a45e693cc6655db03b0382f028aea9473",ref:t=>this.panelSlot=t}),this.options.length>0&&s("six-menu",{part:"menu",items:this.renderedOptions,virtualScroll:this.virtualScroll})),s("slot",{key:"f24f41a9a70f0624078d43eb60b41e841ee90bf7",name:"dropdown-footer"}))))}get host(){return e(this)}static get watchers(){return{open:["handleOpenChange"],distance:["handlePopoverOptionsChange"],hoist:["handlePopoverOptionsChange"],placement:["handlePopoverOptionsChange"],skidding:["handlePopoverOptionsChange"],options:["handleOptionsChange"],virtualScroll:["handleOptionsChange"]}}};function v(t){return(t===null||t===void 0?void 0:t.tagName.toLowerCase())==="six-menu"}function m(t){return(t===null||t===void 0?void 0:t.tagName.toLowerCase())==="six-menu-item"}function w(t){var i;return((i=t===null||t===void 0?void 0:t.getAttribute("class"))===null||i===void 0?void 0:i.includes("selection-container"))||false}async function b(t,i){return t.value.toLowerCase().includes(i)||(await t.getTextLabel()).toLowerCase().includes(i)}p.style=c;const x=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:block}.menu{padding:var(--six-spacing-xx-small) 0;border:none;box-shadow:var(--six-shadow-small);overflow-y:auto;overflow-x:hidden}.menu:focus{outline:none}.no-shadow{box-shadow:none}";const g=x;const _=t=>{var i,s,e;return(e=(s=(i=t===null||t===void 0?void 0:t.shadowRoot)===null||i===void 0?void 0:i.querySelector(".menu-item"))===null||s===void 0?void 0:s.classList)===null||e===void 0?void 0:e.contains("menu-item--focused")};const y=t=>(t===null||t===void 0?void 0:t.tagName.toLowerCase())==="six-menu-item";const k=({value:t,label:i})=>s("six-menu-item",{key:t,value:t},i);const C=5;const I=64;const A=class{constructor(s){t(this,s);this.sixMenuItemSelected=i(this,"six-menu-item-selected",7);this.eventListeners=new o;this.typeToSelectString="";this.handleScrolling=()=>{if(this.menuWrapper==null)return;this.scrollingIndex=Math.floor(this.menuWrapper.scrollTop/this.sixMenuItemHeight)};this.removeBoxShadow=false;this.items=null;this.itemsShown=undefined;this.virtualScroll=false;this.itemSize=10;this.scrollingDebounce=15;this.disableKeyboardHandling=false;this.scrollingIndex=0;this.sixMenuItemHeight=I}connectedCallback(){this.handleClick=this.handleClick.bind(this);this.handleKeyDown=this.handleKeyDown.bind(this)}componentWillLoad(){if(this.items===null){return}}componentDidLoad(){this.setupForVirtualScrollingAfterRendering()}disconnectedCallback(){this.eventListeners.removeAll()}async typeToSelect(t){var i;clearTimeout(this.typeToSelectTimeout);this.typeToSelectTimeout=setTimeout((()=>this.typeToSelectString=""),750);this.typeToSelectString+=t.toLowerCase();const s=this.getItems();for(const t of s){const s=(i=t.shadowRoot)===null||i===void 0?void 0:i.querySelector("slot:not([name])");const e=l(s).toLowerCase().trim();if(e.substring(0,this.typeToSelectString.length)===this.typeToSelectString){t.setFocus();break}}}getItemsShown(){var t;const i=this.virtualScroll?C:0;return(t=this.itemsShown)!==null&&t!==void 0?t:i}setupForVirtualScrollingAfterRendering(){var t,i;if(!this.virtualScroll||this.menuWrapper==null)return;this.eventListeners.add(this.menuWrapper,"scroll",r(this.handleScrolling,this.scrollingDebounce));const s=(i=(t=this.menu)===null||t===void 0?void 0:t.querySelector("six-menu-item"))===null||i===void 0?void 0:i.clientHeight;if(s!=null&&s>0){this.sixMenuItemHeight=s}}getItems(){if(this.menu==null)return[];if(this.items!=null){return this.items.map(k)}const t=this.menu.querySelector("slot");if(t==null)return[];return[...t.assignedElements({flatten:true})].filter((t=>y(t)&&!t.disabled))}getActiveItemIndex(){const t=this.getItems();const i=this.getActiveItem();if(i!=null){const s=t.indexOf(i);if(s>-1){return s}}const s=this.extractItemsFromDOM();return s.findIndex(_)}getActiveItem(){var t;const i=this.getItems().find((t=>t===document.activeElement));if(i!=null){return i}return(t=this.extractItemsFromDOM())===null||t===void 0?void 0:t.find(_)}extractItemsFromDOM(){var t,i;return Array.from((i=(t=this.host.shadowRoot)===null||t===void 0?void 0:t.querySelectorAll("six-menu-item"))!==null&&i!==void 0?i:[])}setActiveItem(t){t===null||t===void 0?void 0:t.setFocus()}handleClick(t){const i=t.target;const s=i.closest("six-menu-item");if(s&&!s.disabled){this.sixMenuItemSelected.emit({name:s.value,item:s})}}handleKeyDown(t){if(this.disableKeyboardHandling){return}if(t.key==="Enter"){const i=this.getActiveItem();t.preventDefault();if(i!=null){this.sixMenuItemSelected.emit({name:i.value,item:i})}}if(t.key===" "){t.preventDefault()}if(["ArrowDown","ArrowUp","Home","End"].includes(t.key)){const i=this.items===null?this.getItems():this.extractItemsFromDOM();let s=this.getActiveItemIndex();if(i.length>0){t.preventDefault();if(t.key==="ArrowDown"){s++}else if(t.key==="ArrowUp"){s--}else if(t.key==="Home"){s=0}else if(t.key==="End"){s=i.length-1}if(s<0)s=0;if(s>i.length-1)s=i.length-1;this.setActiveItem(i[s]);return}}void this.typeToSelect(t.key)}getMenuWrapperStyle(){var t;const i={};if(this.getItemsShown()>0){i.height=`${((t=this.getItemsShown())!==null&&t!==void 0?t:0)*this.sixMenuItemHeight}px`}return Object.assign({},i)}getMenuContainerStyle(){const t={};if(this.virtualScroll){t.transform=`translateY(${this.sixMenuItemHeight*this.scrollingIndex}px)`}return Object.assign({},t)}getScrollbarGhostStyle(){const t={};if(this.virtualScroll&&this.items!==null){t.height=`${this.items.length*this.sixMenuItemHeight-this.itemSize*this.sixMenuItemHeight}px`}return Object.assign({},t)}renderItems(){if(this.items===undefined||this.items===null){return}if(!this.virtualScroll){return this.items.map(k)}return this.items.slice(this.scrollingIndex,Math.min(this.items.length,this.itemSize+this.scrollingIndex)).map((({value:t,label:i})=>s("six-menu-item",{checkType:"check",key:t,value:t},i)))}render(){return s("div",{key:"a8806ec6aee657eb677931fc1ba1405caec3e96e",ref:t=>this.menuWrapper=t,style:this.getMenuWrapperStyle(),part:"wrapper",class:{menu:true,".no-shadow":this.removeBoxShadow}},s("div",{key:"34b85eb38385f88e87f49a6689cf6ad082723a87",ref:t=>this.menu=t,part:"base",role:"menu",onClick:this.handleClick,onKeyDown:this.handleKeyDown,tabIndex:0,style:this.getMenuContainerStyle()},s("slot",{key:"a62dcc8bd5d97a8d479f4a4270aedcb77b729aea"}),this.renderItems()),this.virtualScroll&&s("div",{style:this.getScrollbarGhostStyle()}))}get host(){return e(this)}};A.style=g;export{p as six_dropdown,A as six_menu};
2
- //# sourceMappingURL=p-7561b336.entry.js.map
1
+ import{r as t,c as i,h as s,g as e}from"./p-05eb1bab.js";import{P as n}from"./p-7f856f00.js";import{E as o}from"./p-8bfb4bfc.js";import{a as r,D as h}from"./p-a1502802.js";import{a as l}from"./p-0cebf1d2.js";function a(t){const i=t.tabIndex;return i>-1}function d(t){if(a(t)){return t}if(t.shadowRoot!=null){const i=[...t.shadowRoot.children].find((t=>a(t)));if(i!=null){return i}}if(t.children!=null){return[...t.children].map((t=>d(t))).at(0)}return undefined}const u=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:inline-block}.dropdown{position:relative}.dropdown__trigger{display:block}.dropdown__positioner{position:absolute;z-index:var(--six-z-index-dropdown)}.dropdown__positioner__filtered{width:100%}.dropdown__panel{font-family:var(--six-font-sans);font-size:var(--six-font-size-small);font-weight:var(--six-font-weight-normal);color:var(--color);background-color:var(--six-panel-background-color);border-radius:var(--six-border-radius-medium);border:1px solid var(--six-color-web-rock-300);box-shadow:var(--six-shadow-small);opacity:0;pointer-events:none;transform:scale(0.9);transition:var(--six-transition-fast) opacity, var(--six-transition-fast) transform;max-width:90vw}.dropdown__panel__scroll{max-height:18.75rem;overflow-y:auto;overflow-x:hidden;overscroll-behavior:none}.dropdown__panel__scroll--virtual{overflow-y:hidden;overflow-x:hidden}.filter-hidden{display:none}.dropdown__positioner[data-popper-placement^=top] .dropdown__panel{transform-origin:bottom}.dropdown__positioner[data-popper-placement^=bottom] .dropdown__panel{transform-origin:top}.dropdown__positioner[data-popper-placement^=left] .dropdown__panel{transform-origin:right}.dropdown__positioner[data-popper-placement^=right] .dropdown__panel{transform-origin:left}.dropdown__positioner.popover-visible .dropdown__panel{opacity:1;transform:none;pointer-events:all}.filter{border-bottom:1px solid var(--six-color-web-rock-300)}.filter__icon{color:var(--six-color-web-rock-600)}";const f=u;let c=0;const p=class{constructor(e){t(this,e);this.sixShow=i(this,"six-dropdown-show",7);this.sixAfterShow=i(this,"six-dropdown-after-show",7);this.sixHide=i(this,"six-dropdown-hide",7);this.sixAfterHide=i(this,"six-dropdown-after-hide",7);this.sixAutoFilter=i(this,"six-dropdown-auto-filter-fired",7);this.sixAsyncFilterFired=i(this,"six-async-filter-fired",7);this.sixScroll=i(this,"six-dropdown-scroll",7);this.componentId=`dropdown-${++c}`;this.isVisible=false;this.resizeObserver=new ResizeObserver(r((()=>this.updatePanelPosition()),100));this.eventListeners=new o;this.getMenuItems=()=>{var t,i,e,n;if(this.options.length>0){return{sixMenuItems:this.renderedOptions.map((t=>s("six-menu-item",{value:t.value},t.label))),selectionContainerItems:[]}}if(this.panel==null)return{sixMenuItems:[],selectionContainerItems:[]};const o=(t=this.panelSlot)===null||t===void 0?void 0:t.assignedElements({flatten:true}).filter(w).at(0);const r=(i=this.panelSlot)===null||i===void 0?void 0:i.assignedElements({flatten:true}).filter(v).at(0);const h=(o===null||o===void 0?void 0:o.querySelectorAll("six-menu-item"))||[];let l=((e=r===null||r===void 0?void 0:r.querySelector("slot"))===null||e===void 0?void 0:e.assignedElements().filter((t=>m(t))))||[];if(l.length===0){l=Array.from(((n=r===null||r===void 0?void 0:r.shadowRoot)===null||n===void 0?void 0:n.querySelectorAll("six-menu-item"))||[])}if(h.length>0||l.length>0){return{sixMenuItems:l,selectionContainerItems:[...h]}}else{return{sixMenuItems:r?Array.from(r.querySelectorAll("six-menu-item")):[],selectionContainerItems:[]}}};this.handleDocumentKeyDown=t=>{var i;const s=t;if(s.key==="Escape"){void this.hide();this.focusOnTrigger();return}if(this.filterInputElement===((i=this.host.shadowRoot)===null||i===void 0?void 0:i.activeElement)){if(s.key==="ArrowDown"){const{sixMenuItems:t,selectionContainerItems:i}=this.getMenuItems();const s=[...i,...t].find((t=>t.style.display!=="none"));if(s!=null){s.setFocus()}}}if(s.key==="Tab"){if(this.open&&document.activeElement!=null&&m(document.activeElement)){s.preventDefault();void this.hide();this.focusOnTrigger();return}setTimeout((()=>{var t,i;const s=this.container.getRootNode()instanceof ShadowRoot?(i=(t=document.activeElement)===null||t===void 0?void 0:t.shadowRoot)===null||i===void 0?void 0:i.activeElement:document.activeElement;if((s===null||s===void 0?void 0:s.closest(this.container.tagName.toLowerCase()))!==this.container){void this.hide();return}}))}};this.handleDocumentMouseDown=t=>{const i=t.composedPath();if(!i.includes(this.container)){void this.hide();return}};this.handlePanelSelect=t=>{const i=t.target;if(this.closeOnSelect&&v(i)){void this.hide();this.focusOnTrigger()}};this.handleTriggerClick=()=>{this.open?this.hide():this.show()};this.handleTriggerKeyDown=t=>{if(t.key==="Escape"){this.focusOnTrigger();void this.hide();return}if(!this.disableHideOnEnterAndSpace&&[" ","Enter"].includes(t.key)){t.preventDefault();this.open?void this.hide():void this.show();return}const i=this.getMenu();if(["ArrowDown","ArrowUp"].includes(t.key)){t.preventDefault();if(!this.open){void this.show()}if(i==null){return}const s=[...i.querySelectorAll("six-menu-item")];const e=s.at(0);const n=s.at(s.length-1);if(t.key==="ArrowDown"&&e!=null){e.setFocus();return}if(t.key==="ArrowUp"&&n!=null){n.setFocus();return}}const s=["Tab","Shift","Meta","Ctrl","Alt"];if(this.open&&i!=null&&!s.includes(t.key)){void i.typeToSelect(t.key);return}};this.handleTriggerKeyUp=t=>{if(t.key===" "){t.preventDefault()}};this.handleTriggerSlotChange=()=>{this.updateAccessibleTrigger()};this.handleDropdownScroll=()=>{if(this.scrollPanel==null)return;this.sixScroll.emit({scrollHeight:this.scrollPanel.scrollHeight,scrollTop:this.scrollPanel.scrollTop,scrollbarHeight:this.scrollPanel.offsetHeight*(this.scrollPanel.offsetHeight/this.scrollPanel.scrollHeight),scrollRatio:this.scrollPanel.scrollTop/(this.scrollPanel.scrollHeight-this.scrollPanel.clientHeight)})};this.open=false;this.placement="bottom-start";this.closeOnSelect=true;this.distance=4;this.skidding=0;this.hoist=false;this.containingElement=undefined;this.filter=false;this.asyncFilter=false;this.filterPlaceholder="Filter...";this.autofocusFilter=true;this.filterDebounce=0;this.disableHideOnEnterAndSpace=false;this.options=[];this.virtualScroll=false;this.matchTriggerWidth=false;this.renderedOptions=[]}get filterEnabled(){return this.filter||this.asyncFilter}get container(){return this.containingElement||this.host}handleOpenChange(){this.open?this.show():this.hide();this.updateAccessibleTrigger()}handlePopoverOptionsChange(){if(this.popover==null)return;this.popover.setOptions({strategy:this.hoist?"fixed":"absolute",placement:this.placement,distance:this.distance,skidding:this.skidding})}handleOptionsChange(){this.validateOptions()}validateOptions(){if(!Array.isArray(this.options)){this.options=[]}if(this.virtualScroll&&this.options.length===0){console.error("Options must be defined when using virtual scrolling")}this.renderedOptions=[...this.options]}componentWillLoad(){this.validateOptions();if(this.asyncFilter){this.filterDebounce=h}}componentDidLoad(){this.init();if(this.open){void this.show()}}connectedCallback(){this.init()}init(){this.initPopover();const t=this.filterInputElement;if(t!=null){this.eventListeners.add(t,"six-input-input",r((()=>{var i;const s=(i=t.value)!==null&&i!==void 0?i:"";if(this.filter){this.applyFilter(s)}this.emitFilterEvents(s)}),this.filterDebounce))}}applyFilter(t){var i;const s=((i=t.toLowerCase())===null||i===void 0?void 0:i.trim())||"";if(this.options.length>0){this.renderedOptions=this.options.filter((t=>{var i,e,n,o;return t.label&&((e=(i=String(t.label))===null||i===void 0?void 0:i.toLowerCase())===null||e===void 0?void 0:e.includes(s))||t.value&&((o=(n=String(t.value))===null||n===void 0?void 0:n.toLowerCase())===null||o===void 0?void 0:o.includes(s))}))}else{const{selectionContainerItems:t,sixMenuItems:i}=this.getMenuItems();const e=t.map((t=>t.value));t.forEach((async t=>{t.style.display=await x(t,s)?"unset":"none"}));i.forEach((async t=>{t.style.display=await x(t,s)&&!e.includes(t.value)?"unset":"none"}))}}resetFilter(){if(this.filterInputElement!=null){this.filterInputElement.value="";this.emitFilterEvents("")}if(this.options.length>0){this.renderedOptions=[...this.options]}else{const{selectionContainerItems:t,sixMenuItems:i}=this.getMenuItems();[...t,...i].forEach((t=>t.style.display="unset"))}}emitFilterEvents(t){if(this.filter){this.sixAutoFilter.emit({filterValue:t})}else if(this.asyncFilter){this.sixAsyncFilterFired.emit({filterValue:t})}}initPopover(){if(this.trigger==null||this.positioner==null)return;this.popover=new n(this.trigger,this.positioner,{strategy:this.hoist?"fixed":"absolute",placement:this.placement,distance:this.distance,skidding:this.skidding,transitionElement:this.panel,onAfterHide:()=>{if(this.filterEnabled){this.resetFilter()}this.sixAfterHide.emit()},onAfterShow:async()=>{this.sixAfterShow.emit()},onTransitionEnd:()=>{if(!this.open&&this.scrollPanel!=null){this.scrollPanel.scrollTop=0}}})}disconnectedCallback(){var t;this.resizeObserver.disconnect();this.eventListeners.removeAll();void this.hide();(t=this.popover)===null||t===void 0?void 0:t.destroy();this.popover=undefined}async show(){if(this.isVisible||this.popover==null||this.panel==null){return}const t=this.sixShow.emit();if(t.defaultPrevented){this.open=false;return}this.eventListeners.add(this.panel,"six-menu-item-selected",this.handlePanelSelect);this.eventListeners.add(document,"keydown",this.handleDocumentKeyDown);this.eventListeners.add(document,"mousedown",this.handleDocumentMouseDown);this.isVisible=true;this.open=true;if(this.trigger!=null){this.resizeObserver.observe(this.trigger)}this.updatePanelPosition();this.popover.show();if(this.filterEnabled&&this.autofocusFilter){requestAnimationFrame((()=>{var t;(t=this.filterInputElement)===null||t===void 0?void 0:t.setFocus()}))}}updatePanelPosition(){if(!this.open){return}if(this.matchTriggerWidth&&this.trigger!=null&&this.panel!=null){const t=this.trigger.getBoundingClientRect().width;this.panel.style.minWidth=`${t}px`}if(this.popover!=null){this.popover.reposition()}}async hide(){this.resizeObserver.disconnect();if(!this.isVisible||this.panel==null||this.popover==null){return}const t=this.sixHide.emit();if(t.defaultPrevented){this.open=true;return}this.eventListeners.remove(this.panel,"six-menu-item-selected",this.handlePanelSelect);this.eventListeners.remove(document,"keydown",this.handleDocumentKeyDown);this.eventListeners.remove(document,"mousedown",this.handleDocumentMouseDown);this.isVisible=false;this.open=false;this.popover.hide()}focusOnTrigger(){var t;if(this.trigger==null)return;const i=(t=this.triggerSlot)===null||t===void 0?void 0:t.assignedElements({flatten:true}).at(0);if(i!=null){if(typeof i.setFocus==="function"){i.setFocus()}else if(typeof i.focus==="function"){i.focus()}}}getMenu(){var t;return(t=this.panelSlot)===null||t===void 0?void 0:t.assignedElements({flatten:true}).filter(v).at(0)}async reposition(){if(this.open&&this.popover!=null){this.popover.reposition()}}updateAccessibleTrigger(){var t;if(this.trigger==null)return;const i=((t=this.triggerSlot)===null||t===void 0?void 0:t.assignedElements({flatten:true}))||[];const s=i.map(d).at(0);if(s!=null){s.setAttribute("aria-haspopup","true");s.setAttribute("aria-expanded",this.open?"true":"false")}}render(){return s("div",{key:"6569a6e118fd68e19f14dcae0553e25f81987923",part:"base",id:this.componentId,class:{dropdown:true,"dropdown--open":this.open}},s("span",{key:"be04c5d687eafa3c58c9fed9cf43f72d43aa45ef",part:"trigger",class:"dropdown__trigger",ref:t=>this.trigger=t,onClick:this.handleTriggerClick,onKeyDown:this.handleTriggerKeyDown,onKeyUp:this.handleTriggerKeyUp},s("slot",{key:"fba562d4fc45a0874e5cf8caad5e9710d6dd34e0",name:"trigger",ref:t=>this.triggerSlot=t,onSlotchange:this.handleTriggerSlotChange})),s("div",{key:"d37f1cb0246d47ca34004f35e3575e8433d998c8",ref:t=>this.positioner=t,class:{dropdown__positioner:true,dropdown__positioner__filtered:(this.filter||this.asyncFilter)&&!this.hoist}},s("div",{key:"e6c08b51f39a12259b4d8911770e1e1754dc4b8e",ref:t=>this.panel=t,part:"panel",class:"dropdown__panel",role:"menu","aria-hidden":this.open?"false":"true","aria-labelledby":this.componentId},this.filterEnabled&&s("six-input",{class:{filter:true,"filter-hidden":!this.open},"dropdown-search":true,"aria-hidden":this.open?"false":"true",ref:t=>this.filterInputElement=t,placeholder:this.filterPlaceholder},s("six-icon",{class:"filter__icon",slot:"suffix",size:"small"},"search")),s("div",{key:"174d0a5dd5965877e9278475112e2f14d959966d",class:{dropdown__panel__scroll:true,"dropdown__panel__scroll--virtual":this.virtualScroll},onScroll:this.handleDropdownScroll,ref:t=>this.scrollPanel=t},s("slot",{key:"fa0fc63a45e693cc6655db03b0382f028aea9473",ref:t=>this.panelSlot=t}),this.options.length>0&&s("six-menu",{part:"menu",items:this.renderedOptions,virtualScroll:this.virtualScroll})),s("slot",{key:"f24f41a9a70f0624078d43eb60b41e841ee90bf7",name:"dropdown-footer"}))))}get host(){return e(this)}static get watchers(){return{open:["handleOpenChange"],distance:["handlePopoverOptionsChange"],hoist:["handlePopoverOptionsChange"],placement:["handlePopoverOptionsChange"],skidding:["handlePopoverOptionsChange"],options:["handleOptionsChange"],virtualScroll:["handleOptionsChange"]}}};function v(t){return(t===null||t===void 0?void 0:t.tagName.toLowerCase())==="six-menu"}function m(t){return(t===null||t===void 0?void 0:t.tagName.toLowerCase())==="six-menu-item"}function w(t){var i;return((i=t===null||t===void 0?void 0:t.getAttribute("class"))===null||i===void 0?void 0:i.includes("selection-container"))||false}async function x(t,i){return t.value.toLowerCase().includes(i)||(await t.getTextLabel()).toLowerCase().includes(i)}p.style=f;const b=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:block}.menu{padding:var(--six-spacing-xx-small) 0;border:none;box-shadow:var(--six-shadow-small);overflow-y:auto;overflow-x:hidden}.menu:focus{outline:none}.no-shadow{box-shadow:none}";const g=b;const _=t=>{var i,s,e;return(e=(s=(i=t===null||t===void 0?void 0:t.shadowRoot)===null||i===void 0?void 0:i.querySelector(".menu-item"))===null||s===void 0?void 0:s.classList)===null||e===void 0?void 0:e.contains("menu-item--focused")};const y=t=>(t===null||t===void 0?void 0:t.tagName.toLowerCase())==="six-menu-item";const k=({value:t,label:i})=>s("six-menu-item",{key:t,value:t},i);const C=5;const I=48;const A=64;const O=class{constructor(s){t(this,s);this.sixMenuItemSelected=i(this,"six-menu-item-selected",7);this.eventListeners=new o;this.typeToSelectString="";this.handleScrolling=()=>{if(this.menuWrapper==null)return;this.scrollingIndex=Math.floor(this.menuWrapper.scrollTop/this.sixMenuItemHeight)};this.removeBoxShadow=false;this.items=null;this.itemsShown=undefined;this.virtualScroll=false;this.itemSize=10;this.scrollingDebounce=15;this.disableKeyboardHandling=false;this.scrollingIndex=0;this.sixMenuItemHeight=this.virtualScroll?I:A}connectedCallback(){this.handleClick=this.handleClick.bind(this);this.handleKeyDown=this.handleKeyDown.bind(this)}componentWillLoad(){if(this.items===null){return}}componentDidLoad(){this.setupForVirtualScrollingAfterRendering()}disconnectedCallback(){this.eventListeners.removeAll()}async typeToSelect(t){var i;clearTimeout(this.typeToSelectTimeout);this.typeToSelectTimeout=setTimeout((()=>this.typeToSelectString=""),750);this.typeToSelectString+=t.toLowerCase();const s=this.getItems();for(const t of s){const s=(i=t.shadowRoot)===null||i===void 0?void 0:i.querySelector("slot:not([name])");const e=l(s).toLowerCase().trim();if(e.substring(0,this.typeToSelectString.length)===this.typeToSelectString){t.setFocus();break}}}getItemsShown(){var t;const i=this.virtualScroll?C:0;if(this.items&&this.items.length===1){return 0}return(t=this.itemsShown)!==null&&t!==void 0?t:i}setupForVirtualScrollingAfterRendering(){var t,i;if(!this.virtualScroll||this.menuWrapper==null)return;this.eventListeners.add(this.menuWrapper,"scroll",r(this.handleScrolling,this.scrollingDebounce));const s=(i=(t=this.menu)===null||t===void 0?void 0:t.querySelector("six-menu-item"))===null||i===void 0?void 0:i.clientHeight;if(s!=null&&s>0){this.sixMenuItemHeight=s}}getItems(){if(this.menu==null)return[];if(this.items!=null){return this.items.map(k)}const t=this.menu.querySelector("slot");if(t==null)return[];return[...t.assignedElements({flatten:true})].filter((t=>y(t)&&!t.disabled))}getActiveItemIndex(){const t=this.getItems();const i=this.getActiveItem();if(i!=null){const s=t.indexOf(i);if(s>-1){return s}}const s=this.extractItemsFromDOM();return s.findIndex(_)}getActiveItem(){var t;const i=this.getItems().find((t=>t===document.activeElement));if(i!=null){return i}return(t=this.extractItemsFromDOM())===null||t===void 0?void 0:t.find(_)}extractItemsFromDOM(){var t,i;return Array.from((i=(t=this.host.shadowRoot)===null||t===void 0?void 0:t.querySelectorAll("six-menu-item"))!==null&&i!==void 0?i:[])}setActiveItem(t){t===null||t===void 0?void 0:t.setFocus()}handleClick(t){const i=t.target;const s=i.closest("six-menu-item");if(s&&!s.disabled){this.sixMenuItemSelected.emit({name:s.value,item:s})}}handleKeyDown(t){if(this.disableKeyboardHandling){return}if(t.key==="Enter"){const i=this.getActiveItem();t.preventDefault();if(i!=null){this.sixMenuItemSelected.emit({name:i.value,item:i})}}if(t.key===" "){t.preventDefault()}if(["ArrowDown","ArrowUp","Home","End"].includes(t.key)){const i=this.items===null?this.getItems():this.extractItemsFromDOM();let s=this.getActiveItemIndex();if(i.length>0){t.preventDefault();if(t.key==="ArrowDown"){s++}else if(t.key==="ArrowUp"){s--}else if(t.key==="Home"){s=0}else if(t.key==="End"){s=i.length-1}if(s<0)s=0;if(s>i.length-1)s=i.length-1;this.setActiveItem(i[s]);return}}void this.typeToSelect(t.key)}getMenuWrapperStyle(){var t;const i={};if(this.getItemsShown()>0){i.height=`${((t=this.getItemsShown())!==null&&t!==void 0?t:0)*this.sixMenuItemHeight}px`}else if(this.items&&this.items.length===1){i.height="auto"}return Object.assign({},i)}getMenuContainerStyle(){const t={};if(this.virtualScroll){t.transform=`translateY(${this.sixMenuItemHeight*this.scrollingIndex}px)`}return Object.assign({},t)}getScrollbarGhostStyle(){const t={};if(this.virtualScroll&&this.items!==null&&this.items.length>1){t.height=`${this.items.length*this.sixMenuItemHeight-this.itemSize*this.sixMenuItemHeight}px`}return Object.assign({},t)}renderItems(){if(this.items===undefined||this.items===null){return}if(!this.virtualScroll){return this.items.map(k)}return this.items.slice(this.scrollingIndex,Math.min(this.items.length,this.itemSize+this.scrollingIndex)).map((({value:t,label:i})=>s("six-menu-item",{checkType:"check",key:t,value:t},i)))}render(){return s("div",{key:"fa1ad99f966331ac08e3d0278714613476b84953",ref:t=>this.menuWrapper=t,style:this.getMenuWrapperStyle(),part:"wrapper",class:{menu:true,".no-shadow":this.removeBoxShadow}},s("div",{key:"6a3d5440ad417f969e5862e93e44ff576f043002",ref:t=>this.menu=t,part:"base",role:"menu",onClick:this.handleClick,onKeyDown:this.handleKeyDown,tabIndex:0,style:this.getMenuContainerStyle()},s("slot",{key:"96895a99228cd5407e6a3f60b73d3192bcf3c13a"}),this.renderItems()),this.virtualScroll&&s("div",{style:this.getScrollbarGhostStyle()}))}get host(){return e(this)}};O.style=g;export{p as six_dropdown,O as six_menu};
2
+ //# sourceMappingURL=p-6b40c40c.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["isTabbable","el","tabIndex","getNearestTabbableElement","shadowRoot","tabbableShadowChild","children","find","e","map","at","undefined","sixDropdownCss","SixDropdownStyle0","id","SixDropdown","this","componentId","isVisible","resizeObserver","ResizeObserver","debounce","updatePanelPosition","eventListeners","EventListeners","getMenuItems","options","length","sixMenuItems","renderedOptions","option","h","value","label","selectionContainerItems","panel","selectionContainer","_a","panelSlot","assignedElements","flatten","filter","isSelectionContainer","sixMenuElement","_b","isSixMenu","querySelectorAll","_c","querySelector","isSixMenuItem","Array","from","_d","handleDocumentKeyDown","event","keyboardEvent","key","hide","focusOnTrigger","filterInputElement","host","activeElement","item","style","display","setFocus","open","document","preventDefault","setTimeout","container","getRootNode","ShadowRoot","closest","tagName","toLowerCase","handleDocumentMouseDown","path","composedPath","includes","handlePanelSelect","target","closeOnSelect","handleTriggerClick","show","handleTriggerKeyDown","disableHideOnEnterAndSpace","menu","getMenu","menuItems","firstMenuItem","lastMenuItem","ignoredKeys","typeToSelect","handleTriggerKeyUp","handleTriggerSlotChange","updateAccessibleTrigger","handleDropdownScroll","scrollPanel","sixScroll","emit","scrollHeight","scrollTop","scrollbarHeight","offsetHeight","scrollRatio","clientHeight","filterEnabled","asyncFilter","containingElement","handleOpenChange","handlePopoverOptionsChange","popover","setOptions","strategy","hoist","placement","distance","skidding","handleOptionsChange","validateOptions","isArray","virtualScroll","console","error","componentWillLoad","filterDebounce","DEFAULT_DEBOUNCE_FAST","componentDidLoad","init","connectedCallback","initPopover","add","filterValue","applyFilter","emitFilterEvents","filterTerm","lowerCaseFilterTerm","trim","String","selectionContainerValues","s","forEach","async","menuItem","containsFilterTerm","resetFilter","sixAutoFilter","sixAsyncFilterFired","trigger","positioner","Popover","transitionElement","onAfterHide","sixAfterHide","onAfterShow","sixAfterShow","onTransitionEnd","disconnectedCallback","disconnect","removeAll","destroy","sixShow","defaultPrevented","observe","autofocusFilter","requestAnimationFrame","matchTriggerWidth","width","getBoundingClientRect","minWidth","reposition","sixHide","remove","triggerSlot","focus","accessibleTrigger","setAttribute","render","part","class","dropdown","ref","onClick","onKeyDown","onKeyUp","name","onSlotchange","dropdown__positioner","dropdown__positioner__filtered","role","placeholder","filterPlaceholder","slot","size","dropdown__panel__scroll","onScroll","items","getAttribute","getTextLabel","sixMenuCss","SixMenuStyle0","isFocusedMenuItem","classList","contains","isSIXMenuItemElement","mapToMenuItem","DEFAULT_NUMBER_OF_ITEMS_SHOWN_FOR_VIRTUAL_SCROLLING","DEFAULT_SIX_MENU_ITEM_HEIGHT_FOR_VIRTUAL_SCROLLING","DEFAULT_SIX_MENU_ITEM_HEIGHT","SixMenu","typeToSelectString","handleScrolling","menuWrapper","scrollingIndex","Math","floor","sixMenuItemHeight","handleClick","bind","handleKeyDown","setupForVirtualScrollingAfterRendering","clearTimeout","typeToSelectTimeout","getItems","getTextContent","substring","getItemsShown","defaultItemsShown","itemsShown","scrollingDebounce","menuItemHeight","disabled","getActiveItemIndex","selectedItem","getActiveItem","itemIndex","indexOf","extractItemsFromDOM","findIndex","i","setActiveItem","clickedItem","sixMenuItemSelected","disableKeyboardHandling","activeItem","indexOfActiveItem","getMenuWrapperStyle","styles","height","Object","assign","getMenuContainerStyle","transform","getScrollbarGhostStyle","itemSize","renderItems","slice","min","checkType","removeBoxShadow"],"sources":["src/utils/tabbable.ts","src/components/six-dropdown/six-dropdown.scss?tag=six-dropdown&encapsulation=shadow","src/components/six-dropdown/six-dropdown.tsx","src/components/six-menu/six-menu.scss?tag=six-menu&encapsulation=shadow","src/components/six-menu/six-menu.tsx"],"sourcesContent":["export function isTabbable(el: HTMLElement) {\n const tabIndex = el.tabIndex;\n return tabIndex > -1;\n}\n\nexport function getNearestTabbableElement(el: HTMLElement): HTMLElement | undefined {\n // Check the element\n if (isTabbable(el)) {\n return el;\n }\n\n // Check the element's shadow root\n if (el.shadowRoot != null) {\n const tabbableShadowChild = [...el.shadowRoot.children].find((e) => isTabbable(e as HTMLElement)) as HTMLElement;\n if (tabbableShadowChild != null) {\n return tabbableShadowChild;\n }\n }\n\n // Check the element's children\n if (el.children != null) {\n return [...el.children].map((e) => getNearestTabbableElement(e as HTMLElement)).at(0);\n }\n\n return undefined;\n}\n","@import 'src/global/component';\n@import 'src/global/mixins/scrollbar';\n\n:host {\n display: inline-block;\n}\n\n.dropdown {\n position: relative;\n}\n\n.dropdown__trigger {\n display: block;\n}\n\n.dropdown__positioner {\n position: absolute;\n z-index: var(--six-z-index-dropdown);\n\n &__filtered {\n width: 100%;\n }\n}\n\n.dropdown__panel {\n font-family: var(--six-font-sans);\n font-size: var(--six-font-size-small);\n font-weight: var(--six-font-weight-normal);\n color: var(--color);\n background-color: var(--six-panel-background-color);\n border-radius: var(--six-border-radius-medium);\n border: 1px solid var(--six-color-web-rock-300);\n box-shadow: var(--six-shadow-small);\n opacity: 0;\n pointer-events: none;\n transform: scale(0.9);\n transition: var(--six-transition-fast) opacity, var(--six-transition-fast) transform;\n max-width: 90vw;\n}\n\n.dropdown__panel__scroll {\n max-height: 18.75rem;\n overflow-y: auto;\n overflow-x: hidden;\n overscroll-behavior: none;\n\n &--virtual {\n overflow-y: hidden;\n overflow-x: hidden;\n }\n}\n\n.filter-hidden {\n display: none;\n}\n\n.dropdown__positioner {\n &[data-popper-placement^='top'] .dropdown__panel {\n transform-origin: bottom;\n }\n\n &[data-popper-placement^='bottom'] .dropdown__panel {\n transform-origin: top;\n }\n\n &[data-popper-placement^='left'] .dropdown__panel {\n transform-origin: right;\n }\n\n &[data-popper-placement^='right'] .dropdown__panel {\n transform-origin: left;\n }\n\n &.popover-visible .dropdown__panel {\n opacity: 1;\n transform: none;\n pointer-events: all;\n }\n}\n\n.filter {\n border-bottom: 1px solid var(--six-color-web-rock-300);\n\n &__icon {\n color: var(--six-color-web-rock-600);\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { getNearestTabbableElement } from '../../utils/tabbable';\nimport Popover from '../../utils/popover';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { debounce, DEFAULT_DEBOUNCE_FAST } from '../../utils/execution-control';\nimport { EmptyPayload } from '../../utils/types';\nimport { SixMenuItemData } from '../six-menu/six-menu';\n\nexport interface SixDropdownAutoFilterPayload {\n filterValue: string;\n}\n\nexport interface SixDropdownAsyncFilterPayload {\n filterValue: string;\n}\n\nexport interface SixDropdownScrollPayload {\n scrollHeight: number;\n scrollTop: number;\n scrollbarHeight: number;\n scrollRatio: number;\n}\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot trigger - The dropdown's trigger, usually a `<six-button>` element.\n * @slot dropdown-footer - The dropdown's footer area.\n * @slot - The dropdown's content.\n *\n * @part base - The component's base wrapper.\n * @part trigger - The container that wraps the trigger.\n * @part panel - The panel that gets shown when the dropdown is open.\n */\n\n@Component({\n tag: 'six-dropdown',\n styleUrl: 'six-dropdown.scss',\n shadow: true,\n})\nexport class SixDropdown {\n private componentId = `dropdown-${++id}`;\n private isVisible = false;\n private panel?: HTMLElement;\n private scrollPanel?: HTMLElement;\n private panelSlot?: HTMLSlotElement;\n private positioner?: HTMLElement;\n private popover?: Popover;\n private trigger?: HTMLElement;\n private triggerSlot?: HTMLSlotElement;\n private resizeObserver = new ResizeObserver(debounce(() => this.updatePanelPosition(), 100));\n\n // the input element shown in the dropdown when filter is set to true\n private filterInputElement?: HTMLSixInputElement;\n\n @Element() host!: HTMLSixDropdownElement;\n\n /** Indicates whether the dropdown is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /**\n * The preferred placement of the dropdown panel. Note that the actual placement may vary as needed to keep the panel\n * inside the viewport.\n */\n @Prop() placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'left'\n | 'left-start'\n | 'left-end' = 'bottom-start';\n\n /** Determines whether the dropdown should hide when a menu item is selected. */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop() closeOnSelect = true;\n\n /** The distance in pixels from which to offset the panel away from its trigger. */\n @Prop() distance = 4;\n\n /** The distance in pixels from which to offset the panel along its trigger. */\n @Prop() skidding = 0;\n\n /**\n * Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n * `overflow: auto|scroll`.\n */\n @Prop() hoist = false;\n\n /** The dropdown will close when the user interacts outside of this element (e.g. clicking). */\n @Prop() containingElement?: HTMLElement;\n\n /**\n * Set to true to allow auto filtering for entries in the dropdown.\n * With this flag the dropdown will automatically filter itsel.\n * If you need to coordinate the shown elements yourself,\n * e.g. because you need to call an endpoint use asyncFilter instead\n */\n @Prop() filter = false;\n\n /**\n * Set to true to allow async filtering.\n * When you enter something in the search field the component will only emit an event but not filter any elements itself.\n * You can then simply listen to the 'six-async-filter-fired' event to manage the shown menu-items yourself\n */\n @Prop() asyncFilter = false;\n\n /** The filter's placeholder text. */\n @Prop() filterPlaceholder = 'Filter...';\n\n /** By default the search field will be focused when opening a dropdown with filtering enabled. */\n // eslint-disable-next-line @stencil-community/ban-default-true\n @Prop() autofocusFilter = true;\n\n get filterEnabled() {\n return this.filter || this.asyncFilter;\n }\n\n /** The debounce for the filter callbacks. */\n @Prop({ mutable: true }) filterDebounce = 0;\n\n /** The panel can be opend/closed by pressing the spacebar or the enter key. In some cases you might want to avoid this */\n @Prop() disableHideOnEnterAndSpace = false;\n\n /** Set the options to be shown in the dropdown (alternative to setting the elements via html)*/\n @Prop({ mutable: true }) options: SixMenuItemData[] = [];\n\n /** Defines whether the menu list will be rendered virtually i.e. only the elements actually shown (and a couple around)\n * are actually rendered in the DOM. If you use virtual scrolling pass the elements via prop instead of via slot. */\n @Prop() virtualScroll = false;\n\n /**\n * Determines if the dropdown panel's width should match the width of the trigger element.\n *\n * If set to `true`, the panel will resize its width to align with the trigger's width.\n * If `false` or omitted, the panel will maintain its default width.\n */\n @Prop() matchTriggerWidth = false;\n\n get container() {\n return this.containingElement || this.host;\n }\n\n /** Emitted when the dropdown opens. Calling `event.preventDefault()` will prevent it from being opened. */\n @Event({ eventName: 'six-dropdown-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the dropdown opens and all transitions are complete. */\n @Event({ eventName: 'six-dropdown-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the dropdown closes. Calling `event.preventDefault()` will prevent it from being closed. */\n @Event({ eventName: 'six-dropdown-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the dropdown closes and all transitions are complete. */\n @Event({ eventName: 'six-dropdown-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the auto filter is triggered */\n @Event({ eventName: 'six-dropdown-auto-filter-fired' }) sixAutoFilter!: EventEmitter<SixDropdownAutoFilterPayload>;\n\n /** Emitted when the async filter is triggered */\n @Event({ eventName: 'six-async-filter-fired' }) sixAsyncFilterFired!: EventEmitter<SixDropdownAsyncFilterPayload>;\n\n /** Emitted when the user scrolls inside dropdown panel.*/\n @Event({ eventName: 'six-dropdown-scroll' }) sixScroll!: EventEmitter<SixDropdownScrollPayload>;\n\n private eventListeners = new EventListeners();\n\n // internal representation of options, so we don't have to make options mutable\n @State() renderedOptions: SixMenuItemData[] = [];\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\n this.updateAccessibleTrigger();\n }\n\n @Watch('distance')\n @Watch('hoist')\n @Watch('placement')\n @Watch('skidding')\n handlePopoverOptionsChange() {\n if (this.popover == null) return;\n\n this.popover.setOptions({\n strategy: this.hoist ? 'fixed' : 'absolute',\n placement: this.placement,\n distance: this.distance,\n skidding: this.skidding,\n });\n }\n\n @Watch('options')\n @Watch('virtualScroll')\n handleOptionsChange() {\n this.validateOptions();\n }\n\n private validateOptions() {\n if (!Array.isArray(this.options)) {\n this.options = [];\n }\n if (this.virtualScroll && this.options.length === 0) {\n console.error('Options must be defined when using virtual scrolling');\n }\n this.renderedOptions = [...this.options];\n }\n\n componentWillLoad() {\n this.validateOptions();\n if (this.asyncFilter) {\n this.filterDebounce = DEFAULT_DEBOUNCE_FAST;\n }\n }\n\n componentDidLoad() {\n this.init();\n if (this.open) {\n void this.show();\n }\n }\n\n connectedCallback() {\n this.init();\n }\n\n private init() {\n this.initPopover();\n\n // listen to filter\n const filterInputElement = this.filterInputElement;\n if (filterInputElement != null) {\n this.eventListeners.add(\n filterInputElement,\n 'six-input-input',\n debounce(() => {\n const filterValue = filterInputElement.value ?? '';\n if (this.filter) {\n this.applyFilter(filterValue);\n }\n this.emitFilterEvents(filterValue);\n }, this.filterDebounce)\n );\n }\n }\n\n private applyFilter(filterTerm: string) {\n const lowerCaseFilterTerm = filterTerm.toLowerCase()?.trim() || '';\n if (this.options.length > 0) {\n this.renderedOptions = this.options.filter(\n (option) =>\n (option.label && String(option.label)?.toLowerCase()?.includes(lowerCaseFilterTerm)) ||\n (option.value && String(option.value)?.toLowerCase()?.includes(lowerCaseFilterTerm))\n );\n } else {\n const { selectionContainerItems, sixMenuItems } = this.getMenuItems();\n const selectionContainerValues = selectionContainerItems.map((s) => s.value);\n\n // Filter items in selection container\n selectionContainerItems.forEach(async (menuItem) => {\n menuItem.style.display = (await containsFilterTerm(menuItem, lowerCaseFilterTerm)) ? 'unset' : 'none';\n });\n\n // Filter other items. Always hide items which contained in the selection container.\n sixMenuItems.forEach(async (menuItem) => {\n menuItem.style.display =\n (await containsFilterTerm(menuItem, lowerCaseFilterTerm)) &&\n !selectionContainerValues.includes(menuItem.value)\n ? 'unset'\n : 'none';\n });\n }\n }\n\n private resetFilter() {\n if (this.filterInputElement != null) {\n this.filterInputElement.value = '';\n this.emitFilterEvents('');\n }\n if (this.options.length > 0) {\n this.renderedOptions = [...this.options];\n } else {\n const { selectionContainerItems, sixMenuItems } = this.getMenuItems();\n [...selectionContainerItems, ...sixMenuItems].forEach((item) => (item.style.display = 'unset'));\n }\n }\n\n private emitFilterEvents(filterValue: string) {\n if (this.filter) {\n this.sixAutoFilter.emit({ filterValue });\n } else if (this.asyncFilter) {\n this.sixAsyncFilterFired.emit({ filterValue });\n }\n }\n\n private initPopover() {\n if (this.trigger == null || this.positioner == null) return;\n this.popover = new Popover(this.trigger, this.positioner, {\n strategy: this.hoist ? 'fixed' : 'absolute',\n placement: this.placement,\n distance: this.distance,\n skidding: this.skidding,\n transitionElement: this.panel,\n onAfterHide: () => {\n if (this.filterEnabled) {\n this.resetFilter();\n }\n this.sixAfterHide.emit();\n },\n onAfterShow: async () => {\n this.sixAfterShow.emit();\n },\n onTransitionEnd: () => {\n if (!this.open && this.scrollPanel != null) {\n this.scrollPanel.scrollTop = 0;\n }\n },\n });\n }\n\n private getMenuItems = (): {\n selectionContainerItems: HTMLSixMenuItemElement[];\n sixMenuItems: HTMLSixMenuItemElement[];\n } => {\n if (this.options.length > 0) {\n return {\n sixMenuItems: this.renderedOptions.map((option) => (\n <six-menu-item value={option.value}>{option.label}</six-menu-item>\n )),\n selectionContainerItems: [],\n };\n }\n if (this.panel == null) return { sixMenuItems: [], selectionContainerItems: [] };\n\n // Relies on the implementation of six-select. Its dropdown slot contains two elements,\n // one for the selected menu items, and one for the other items.\n const selectionContainer = this.panelSlot?.assignedElements({ flatten: true }).filter(isSelectionContainer).at(0);\n const sixMenuElement = this.panelSlot?.assignedElements({ flatten: true }).filter(isSixMenu).at(0) as\n | HTMLSixMenuElement\n | undefined;\n const selectionContainerItems = selectionContainer?.querySelectorAll('six-menu-item') || [];\n let sixMenuItems: HTMLSixMenuItemElement[] =\n sixMenuElement\n ?.querySelector('slot')\n ?.assignedElements()\n .filter((el): el is HTMLSixMenuItemElement => isSixMenuItem(el)) || [];\n\n if (sixMenuItems.length === 0) {\n sixMenuItems = Array.from(sixMenuElement?.shadowRoot?.querySelectorAll('six-menu-item') || []);\n }\n\n if (selectionContainerItems.length > 0 || sixMenuItems.length > 0) {\n return { sixMenuItems, selectionContainerItems: [...selectionContainerItems] };\n } else {\n return {\n sixMenuItems: sixMenuElement ? Array.from(sixMenuElement.querySelectorAll('six-menu-item')) : [],\n selectionContainerItems: [],\n };\n }\n };\n\n disconnectedCallback() {\n this.resizeObserver.disconnect();\n this.eventListeners.removeAll();\n void this.hide();\n this.popover?.destroy();\n this.popover = undefined;\n }\n\n /** Shows the dropdown panel */\n @Method()\n async show() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (this.isVisible || this.popover == null || this.panel == null) {\n return;\n }\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.eventListeners.add(this.panel, 'six-menu-item-selected', this.handlePanelSelect);\n this.eventListeners.add(document, 'keydown', this.handleDocumentKeyDown);\n this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);\n\n this.isVisible = true;\n this.open = true;\n\n if (this.trigger != null) {\n this.resizeObserver.observe(this.trigger);\n }\n this.updatePanelPosition();\n this.popover.show();\n\n if (this.filterEnabled && this.autofocusFilter) {\n requestAnimationFrame(() => {\n this.filterInputElement?.setFocus();\n });\n }\n }\n\n /**\n * Set min width of dropdown panel to the width of the trigger element\n */\n private updatePanelPosition() {\n if (!this.open) {\n return;\n }\n\n if (this.matchTriggerWidth && this.trigger != null && this.panel != null) {\n const width = this.trigger.getBoundingClientRect().width;\n this.panel.style.minWidth = `${width}px`;\n }\n\n if (this.popover != null) {\n this.popover.reposition();\n }\n }\n\n /** Hides the dropdown panel */\n @Method()\n async hide() {\n this.resizeObserver.disconnect();\n\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (!this.isVisible || this.panel == null || this.popover == null) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n this.eventListeners.remove(this.panel, 'six-menu-item-selected', this.handlePanelSelect);\n this.eventListeners.remove(document, 'keydown', this.handleDocumentKeyDown);\n this.eventListeners.remove(document, 'mousedown', this.handleDocumentMouseDown);\n\n this.isVisible = false;\n this.open = false;\n this.popover.hide();\n }\n\n private focusOnTrigger() {\n if (this.trigger == null) return;\n const trigger = this.triggerSlot?.assignedElements({ flatten: true }).at(0) as HTMLSixButtonElement | undefined;\n if (trigger != null) {\n if (typeof trigger.setFocus === 'function') {\n trigger.setFocus();\n } else if (typeof trigger.focus === 'function') {\n trigger.focus();\n }\n }\n }\n\n private getMenu(): HTMLSixMenuElement | undefined {\n return this.panelSlot?.assignedElements({ flatten: true }).filter(isSixMenu).at(0) as\n | HTMLSixMenuElement\n | undefined;\n }\n\n /**\n * Instructs the dropdown menu to reposition. Useful when the position or size of the trigger changes when the menu\n * is activated.\n *\n * @deprecated: use the property `matchTriggerWidth` instead.\n */\n @Method()\n async reposition() {\n if (this.open && this.popover != null) {\n this.popover.reposition();\n }\n }\n\n private handleDocumentKeyDown = (event: Event) => {\n const keyboardEvent = event as KeyboardEvent;\n // Close when escape is pressed\n if (keyboardEvent.key === 'Escape') {\n void this.hide();\n this.focusOnTrigger();\n return;\n }\n\n if (this.filterInputElement === this.host.shadowRoot?.activeElement) {\n if (keyboardEvent.key === 'ArrowDown') {\n const { sixMenuItems, selectionContainerItems } = this.getMenuItems();\n const item = [...selectionContainerItems, ...sixMenuItems].find((item) => item.style.display !== 'none');\n if (item != null) {\n item.setFocus();\n }\n }\n }\n\n // Handle tabbing\n if (keyboardEvent.key === 'Tab') {\n // Tabbing within an open menu should close the dropdown and refocus the trigger\n if (this.open && document.activeElement != null && isSixMenuItem(document.activeElement)) {\n keyboardEvent.preventDefault();\n void this.hide();\n this.focusOnTrigger();\n return;\n }\n\n // Tabbing outside the containing element closes the panel\n //\n // If the dropdown is used within a shadow DOM, we need to obtain the activeElement within that shadowRoot,\n // otherwise `document.activeElement` will only return the name of the parent shadow DOM element.\n setTimeout(() => {\n const activeElement =\n this.container.getRootNode() instanceof ShadowRoot\n ? document.activeElement?.shadowRoot?.activeElement\n : document.activeElement;\n\n if (activeElement?.closest(this.container.tagName.toLowerCase()) !== this.container) {\n void this.hide();\n return;\n }\n });\n }\n };\n\n private handleDocumentMouseDown = (event: Event) => {\n // Close when clicking outside the containing element\n const path = event.composedPath() as EventTarget[];\n if (!path.includes(this.container)) {\n void this.hide();\n return;\n }\n };\n\n private handlePanelSelect = (event: Event) => {\n const target = event.target as HTMLElement;\n\n // Hide the dropdown when a menu item is selected\n if (this.closeOnSelect && isSixMenu(target)) {\n void this.hide();\n this.focusOnTrigger();\n }\n };\n\n private handleTriggerClick = () => {\n this.open ? this.hide() : this.show();\n };\n\n private handleTriggerKeyDown = (event: KeyboardEvent) => {\n // Close when escape or tab is pressed\n if (event.key === 'Escape') {\n this.focusOnTrigger();\n void this.hide();\n return;\n }\n\n // When spacebar/enter is pressed, show the panel but don't focus on the menu. This let's the user press the same\n // key again to hide the menu in case they don't want to make a selection.\n if (!this.disableHideOnEnterAndSpace && [' ', 'Enter'].includes(event.key)) {\n event.preventDefault();\n this.open ? void this.hide() : void this.show();\n return;\n }\n\n const menu = this.getMenu();\n\n // When up/down is pressed, we make the assumption that the user is familiar with the menu and plans to make a\n // selection. Rather than toggle the panel, we focus on the menu (if one exists) and activate the first item for\n // faster navigation.\n if (['ArrowDown', 'ArrowUp'].includes(event.key)) {\n event.preventDefault();\n\n // Show the menu if it's not already open\n if (!this.open) {\n void this.show();\n }\n\n if (menu == null) {\n return;\n }\n const menuItems = [...menu.querySelectorAll('six-menu-item')];\n const firstMenuItem = menuItems.at(0);\n const lastMenuItem = menuItems.at(menuItems.length - 1);\n\n // Focus on a menu item\n if (event.key === 'ArrowDown' && firstMenuItem != null) {\n firstMenuItem.setFocus();\n return;\n }\n\n if (event.key === 'ArrowUp' && lastMenuItem != null) {\n lastMenuItem.setFocus();\n return;\n }\n }\n\n // Other keys bring focus to the menu and initiate type-to-select behavior\n const ignoredKeys = ['Tab', 'Shift', 'Meta', 'Ctrl', 'Alt'];\n if (this.open && menu != null && !ignoredKeys.includes(event.key)) {\n void menu.typeToSelect(event.key);\n return;\n }\n };\n\n private handleTriggerKeyUp = (event: KeyboardEvent) => {\n // Prevent space from triggering a click event in Firefox\n if (event.key === ' ') {\n event.preventDefault();\n }\n };\n\n private handleTriggerSlotChange = () => {\n this.updateAccessibleTrigger();\n };\n\n private handleDropdownScroll = () => {\n if (this.scrollPanel == null) return;\n\n this.sixScroll.emit({\n scrollHeight: this.scrollPanel.scrollHeight,\n scrollTop: this.scrollPanel.scrollTop,\n scrollbarHeight: this.scrollPanel.offsetHeight * (this.scrollPanel.offsetHeight / this.scrollPanel.scrollHeight),\n scrollRatio: this.scrollPanel.scrollTop / (this.scrollPanel.scrollHeight - this.scrollPanel.clientHeight),\n });\n };\n\n //\n // Slotted triggers can be arbitrary content, but we need to link them to the dropdown panel with `aria-haspopup` and\n // `aria-expanded`. These must be applied to the \"accessible trigger\" (the tabbable portion of the trigger element\n // that gets slotted in) so screen readers will understand them. The accessible trigger could be the slotted element,\n // a child of the slotted element, or an element in the slotted element's shadow root.\n //\n // For example, the accessible trigger of an <sl-button> is a <button> located inside its shadow root.\n //\n // To determine this, we assume the first tabbable element in the trigger slot is the \"accessible trigger.\"\n //\n private updateAccessibleTrigger() {\n if (this.trigger == null) return;\n const assignedElements = (this.triggerSlot?.assignedElements({ flatten: true }) || []) as HTMLElement[];\n const accessibleTrigger = assignedElements.map(getNearestTabbableElement).at(0);\n if (accessibleTrigger != null) {\n accessibleTrigger.setAttribute('aria-haspopup', 'true');\n accessibleTrigger.setAttribute('aria-expanded', this.open ? 'true' : 'false');\n }\n }\n\n render() {\n return (\n <div\n part=\"base\"\n id={this.componentId}\n class={{\n dropdown: true,\n 'dropdown--open': this.open,\n }}\n >\n <span\n part=\"trigger\"\n class=\"dropdown__trigger\"\n ref={(el) => (this.trigger = el)}\n onClick={this.handleTriggerClick}\n onKeyDown={this.handleTriggerKeyDown}\n onKeyUp={this.handleTriggerKeyUp}\n >\n <slot\n name=\"trigger\"\n ref={(el) => (this.triggerSlot = el as HTMLSlotElement)}\n onSlotchange={this.handleTriggerSlotChange}\n />\n </span>\n\n {/* Position the panel with a wrapper since the popover makes use of `translate`. This let's us add transitions\n on the panel without interfering with the position. */}\n <div\n ref={(el) => (this.positioner = el)}\n class={{\n dropdown__positioner: true,\n dropdown__positioner__filtered: (this.filter || this.asyncFilter) && !this.hoist,\n }}\n >\n <div\n ref={(el) => (this.panel = el)}\n part=\"panel\"\n class=\"dropdown__panel\"\n role=\"menu\"\n aria-hidden={this.open ? 'false' : 'true'}\n aria-labelledby={this.componentId}\n >\n {this.filterEnabled && (\n <six-input\n class={{\n filter: true,\n 'filter-hidden': !this.open,\n }}\n dropdown-search\n aria-hidden={this.open ? 'false' : 'true'}\n ref={(el) => (this.filterInputElement = el)}\n placeholder={this.filterPlaceholder}\n >\n <six-icon class=\"filter__icon\" slot=\"suffix\" size=\"small\">\n search\n </six-icon>\n </six-input>\n )}\n <div\n class={{\n dropdown__panel__scroll: true,\n 'dropdown__panel__scroll--virtual': this.virtualScroll,\n }}\n onScroll={this.handleDropdownScroll}\n ref={(el) => (this.scrollPanel = el)}\n >\n <slot ref={(el) => (this.panelSlot = el as HTMLSlotElement)} />\n {this.options.length > 0 && (\n <six-menu part=\"menu\" items={this.renderedOptions} virtualScroll={this.virtualScroll}></six-menu>\n )}\n </div>\n <slot name=\"dropdown-footer\"></slot>\n </div>\n </div>\n </div>\n );\n }\n}\n\nfunction isSixMenu(el?: Element): boolean {\n return el?.tagName.toLowerCase() === 'six-menu';\n}\nfunction isSixMenuItem(el?: Element): boolean {\n return el?.tagName.toLowerCase() === 'six-menu-item';\n}\nfunction isSelectionContainer(el?: Element): boolean {\n return el?.getAttribute('class')?.includes('selection-container') || false;\n}\nasync function containsFilterTerm(menuItem: HTMLSixMenuItemElement, lowerCaseFilterTerm: string): Promise<boolean> {\n return (\n menuItem.value.toLowerCase().includes(lowerCaseFilterTerm) ||\n (await menuItem.getTextLabel()).toLowerCase().includes(lowerCaseFilterTerm)\n );\n}\n","@import 'src/global/component';\n\n:host {\n display: block;\n}\n\n.menu {\n padding: var(--six-spacing-xx-small) 0;\n border: none;\n box-shadow: var(--six-shadow-small);\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n.menu:focus {\n outline: none;\n}\n\n.no-shadow {\n box-shadow: none;\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State } from '@stencil/core';\nimport { getTextContent } from '../../utils/slot';\nimport { StyleDeclaration } from '../../utils/types';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { debounce } from '../../utils/execution-control';\n\nexport interface SixMenuItemData {\n label: string;\n value: string;\n}\n\nexport interface SixMenuItemSelectedPayload {\n name: string;\n item: HTMLSixMenuItemElement;\n}\n\nconst isFocusedMenuItem = (menuItem: HTMLSixMenuItemElement) =>\n menuItem?.shadowRoot?.querySelector('.menu-item')?.classList?.contains('menu-item--focused');\n\nconst isSIXMenuItemElement = (el?: Element): el is HTMLSixMenuItemElement =>\n el?.tagName.toLowerCase() === 'six-menu-item';\n\nconst mapToMenuItem = ({ value, label }: SixMenuItemData) => (\n <six-menu-item key={value} value={value}>\n {label}\n </six-menu-item>\n);\n\nconst DEFAULT_NUMBER_OF_ITEMS_SHOWN_FOR_VIRTUAL_SCROLLING = 5;\nconst DEFAULT_SIX_MENU_ITEM_HEIGHT_FOR_VIRTUAL_SCROLLING = 48;\nconst DEFAULT_SIX_MENU_ITEM_HEIGHT = 64;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The menu's content, including menu items, menu dividers, and menu labels.\n *\n * @part base - The component's base wrapper.\n */\n@Component({\n tag: 'six-menu',\n styleUrl: 'six-menu.scss',\n shadow: true,\n})\nexport class SixMenu {\n private readonly eventListeners = new EventListeners();\n\n private menu?: HTMLElement;\n private menuWrapper?: HTMLElement;\n private typeToSelectString = '';\n private typeToSelectTimeout?: number;\n\n @Element() host!: HTMLSixMenuElement;\n\n /** Emitted when a menu item is selected. */\n @Event({ eventName: 'six-menu-item-selected' }) sixMenuItemSelected!: EventEmitter<SixMenuItemSelectedPayload>;\n\n /** Set to true to remove the box-shadow */\n @Prop() removeBoxShadow = false;\n\n /** Set the options to be shown in the dropdown */\n @Prop() items: SixMenuItemData[] | null = null;\n\n /** Defines how many items should be shown. If the number of items is larger than this property a scrollbar will be shown */\n @Prop() itemsShown?: number;\n\n /** Defines whether the menu list will be rendered virtually i.e. only the elements actually shown (and a couple around)\n * are actually rendered in the DOM. If you use virtual scrolling pass the elements via prop instead of via slot. */\n @Prop() virtualScroll = false;\n\n /**\n * Used for virtual scrolling\n * Define how many items should be rendered in the DOM when using virtual scrolling\n */\n @Prop() itemSize = 10;\n\n /**\n * Used for virtual scrolling\n * Define the debounce for listening on scrolling changes in milliseconds.\n * The lower the number the more sensitive the component reacts to scrolling changes.\n */\n @Prop() scrollingDebounce = 15;\n\n /**\n * Internal: Disables handling of key presses.\n */\n @Prop() disableKeyboardHandling = false;\n\n /**\n * Used to calculate which items should be rendered in the DOM\n */\n @State()\n private scrollingIndex = 0;\n\n // set a default item height, this variable will be updated with the real value after the first render.\n // However, it's necessary to have a default value because we can only fetch the proper height after the first render\n @State()\n private sixMenuItemHeight = this.virtualScroll\n ? DEFAULT_SIX_MENU_ITEM_HEIGHT_FOR_VIRTUAL_SCROLLING\n : DEFAULT_SIX_MENU_ITEM_HEIGHT;\n\n connectedCallback() {\n this.handleClick = this.handleClick.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n }\n\n componentWillLoad() {\n if (this.items === null) {\n return;\n }\n }\n\n private handleScrolling = () => {\n if (this.menuWrapper == null) return;\n // for performance improvements we only update the DOM if the scrollRatio change \"enough\"\n this.scrollingIndex = Math.floor(this.menuWrapper.scrollTop / this.sixMenuItemHeight);\n };\n\n componentDidLoad() {\n this.setupForVirtualScrollingAfterRendering();\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n }\n\n /**\n * Initiates type-to-select logic, which automatically selects an option based on what the user is currently typing.\n * The key passed will be appended to the internal query and the selection will be updated. After a brief period, the\n * internal query is cleared automatically. This method is intended to be used with the keydown event. Useful for\n * enabling type-to-select when the menu doesn't have focus.\n */\n @Method()\n async typeToSelect(key: string) {\n clearTimeout(this.typeToSelectTimeout);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.typeToSelectTimeout = setTimeout(() => (this.typeToSelectString = ''), 750);\n this.typeToSelectString += key.toLowerCase();\n const items = this.getItems();\n for (const item of items) {\n const slot = item.shadowRoot?.querySelector('slot:not([name])') as HTMLSlotElement;\n const label = getTextContent(slot).toLowerCase().trim();\n if (label.substring(0, this.typeToSelectString.length) === this.typeToSelectString) {\n item.setFocus();\n break;\n }\n }\n }\n\n private getItemsShown(): number {\n const defaultItemsShown = this.virtualScroll ? DEFAULT_NUMBER_OF_ITEMS_SHOWN_FOR_VIRTUAL_SCROLLING : 0;\n if (this.items && this.items.length === 1) {\n return 0;\n }\n return this.itemsShown ?? defaultItemsShown;\n }\n\n private setupForVirtualScrollingAfterRendering() {\n if (!this.virtualScroll || this.menuWrapper == null) return;\n\n this.eventListeners.add(this.menuWrapper, 'scroll', debounce(this.handleScrolling, this.scrollingDebounce));\n\n // set menu height to proper height once the item is rendered.\n const menuItemHeight = this.menu?.querySelector('six-menu-item')?.clientHeight;\n if (menuItemHeight != null && menuItemHeight > 0) {\n this.sixMenuItemHeight = menuItemHeight;\n }\n }\n\n private getItems(): HTMLSixMenuItemElement[] {\n if (this.menu == null) return [];\n\n if (this.items != null) {\n return this.items.map(mapToMenuItem);\n }\n\n const slot = this.menu.querySelector('slot');\n if (slot == null) return [];\n return [...slot.assignedElements({ flatten: true })].filter(\n (el): el is HTMLSixMenuItemElement => isSIXMenuItemElement(el) && !el.disabled\n );\n }\n\n private getActiveItemIndex() {\n const items = this.getItems();\n const selectedItem = this.getActiveItem();\n if (selectedItem != null) {\n const itemIndex = items.indexOf(selectedItem);\n if (itemIndex > -1) {\n return itemIndex;\n }\n }\n const sixMenuItems = this.extractItemsFromDOM();\n return sixMenuItems.findIndex(isFocusedMenuItem);\n }\n\n private getActiveItem(): HTMLSixMenuItemElement | undefined {\n const activeElement = this.getItems().find((i) => i === document.activeElement);\n if (activeElement != null) {\n return activeElement;\n }\n return this.extractItemsFromDOM()?.find(isFocusedMenuItem);\n }\n\n private extractItemsFromDOM() {\n return Array.from(this.host.shadowRoot?.querySelectorAll('six-menu-item') ?? []);\n }\n\n private setActiveItem(item: HTMLSixMenuItemElement) {\n item?.setFocus();\n }\n\n private handleClick(event: MouseEvent) {\n const target = event.target as HTMLElement;\n const clickedItem = target.closest('six-menu-item');\n if (clickedItem && !clickedItem.disabled) {\n this.sixMenuItemSelected.emit({ name: clickedItem.value, item: clickedItem });\n }\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n if (this.disableKeyboardHandling) {\n return;\n }\n\n // Make a selection when pressing enter\n if (event.key === 'Enter') {\n const activeItem = this.getActiveItem();\n event.preventDefault();\n\n if (activeItem != null) {\n this.sixMenuItemSelected.emit({ name: activeItem.value, item: activeItem });\n }\n }\n\n // Prevent scrolling when space is pressed\n if (event.key === ' ') {\n event.preventDefault();\n }\n\n // Move the selection when pressing down or up\n if (['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key)) {\n const items = this.items === null ? this.getItems() : this.extractItemsFromDOM();\n\n let indexOfActiveItem = this.getActiveItemIndex();\n\n if (items.length > 0) {\n event.preventDefault();\n\n if (event.key === 'ArrowDown') {\n indexOfActiveItem++;\n } else if (event.key === 'ArrowUp') {\n indexOfActiveItem--;\n } else if (event.key === 'Home') {\n indexOfActiveItem = 0;\n } else if (event.key === 'End') {\n indexOfActiveItem = items.length - 1;\n }\n\n if (indexOfActiveItem < 0) indexOfActiveItem = 0;\n if (indexOfActiveItem > items.length - 1) indexOfActiveItem = items.length - 1;\n\n this.setActiveItem(items[indexOfActiveItem]);\n\n return;\n }\n }\n\n void this.typeToSelect(event.key);\n }\n\n private getMenuWrapperStyle() {\n const styles: Partial<StyleDeclaration> = {};\n if (this.getItemsShown() > 0) {\n // calculate the proper height to show the correct number of items\n styles.height = `${(this.getItemsShown() ?? 0) * this.sixMenuItemHeight}px`;\n } else if (this.items && this.items.length === 1) {\n styles.height = 'auto';\n }\n return {\n ...styles,\n };\n }\n\n private getMenuContainerStyle() {\n const styles: Partial<StyleDeclaration> = {};\n\n if (this.virtualScroll) {\n // calculate height of content are if all items would be rendered so the scrollbar has the proper size\n styles.transform = `translateY(${this.sixMenuItemHeight * this.scrollingIndex}px)`;\n }\n\n return {\n ...styles,\n };\n }\n\n private getScrollbarGhostStyle() {\n const styles: Partial<StyleDeclaration> = {};\n if (this.virtualScroll && this.items !== null && this.items.length > 1) {\n styles.height = `${this.items.length * this.sixMenuItemHeight - this.itemSize * this.sixMenuItemHeight}px`;\n }\n return {\n ...styles,\n };\n }\n\n private renderItems() {\n if (this.items === undefined || this.items === null) {\n return;\n }\n\n if (!this.virtualScroll) {\n return this.items.map(mapToMenuItem);\n }\n\n return this.items\n .slice(this.scrollingIndex, Math.min(this.items.length, this.itemSize + this.scrollingIndex))\n .map(({ value, label }: SixMenuItemData) => (\n <six-menu-item checkType=\"check\" key={value} value={value}>\n {label}\n </six-menu-item>\n ));\n }\n\n render() {\n return (\n <div\n ref={(el) => (this.menuWrapper = el)}\n style={this.getMenuWrapperStyle()}\n part=\"wrapper\"\n class={{\n menu: true,\n '.no-shadow': this.removeBoxShadow,\n }}\n >\n <div\n ref={(el) => (this.menu = el)}\n part=\"base\"\n role=\"menu\"\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n tabIndex={0}\n style={this.getMenuContainerStyle()}\n >\n <slot />\n {this.renderItems()}\n </div>\n {this.virtualScroll && <div style={this.getScrollbarGhostStyle()} />}\n </div>\n );\n }\n}\n"],"mappings":"yNAAgBA,EAAWC,GACzB,MAAMC,EAAWD,EAAGC,SACpB,OAAOA,GAAY,CACrB,C,SAEgBC,EAA0BF,GAExC,GAAID,EAAWC,GAAK,CAClB,OAAOA,C,CAIT,GAAIA,EAAGG,YAAc,KAAM,CACzB,MAAMC,EAAsB,IAAIJ,EAAGG,WAAWE,UAAUC,MAAMC,GAAMR,EAAWQ,KAC/E,GAAIH,GAAuB,KAAM,CAC/B,OAAOA,C,EAKX,GAAIJ,EAAGK,U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AAKgP,eAEPhP,KAAK0G,eAAiB3F,EAAA,OAAKgC,MAAO/C,KAAK8O,2B"}
@@ -1,2 +1,2 @@
1
- import{r as e,h as i}from"./p-05eb1bab.js";const t=".six-error-page__title{display:flex;justify-content:center;font-size:var(--six-font-size-xx-large);font-weight:bold;margin-bottom:var(--six-spacing-large)}.six-error-page__description>*{text-align:center}.six-error-page__icon-container{display:flex;justify-content:center}.six-error-page__icon::part(icon){background-color:var(--six-color-web-rock-300)}";const n=t;const r={403:{en:"Access Denied",de:"Kein Zugriff"},404:{en:"Not Found",de:"Seite nicht gefunden"},500:{en:"Ooops!",de:"Ups!"}};const s={403:{en:["You don’t have permission to access this page. ","Please contact an administrator or click the SIX logo on top left."],de:["Sie haben keine Zugriffsberechtigung auf diese Seite.","Bitte wenden Sie sich an einen Administrator oder klicken Sie auf das SIX-Logo oben links."]},404:{en:["We have not found the page you requested.","Please click the SIX logo on top left."],de:["Wir haben die angeforderte Seite nicht gefunden.","Bitte klicken Sie auf das SIX-Logo oben links."]},500:{en:["Sorry, we messed up! We try to fix this.","Please click the SIX logo on top left."],de:["Sorry, das war unser Fehler! Wir versuchen das zu beheben.","Bitte klicken Sie auf das SIX-Logo oben links."]}};const o=class{constructor(i){e(this,i);this.errorCode=undefined;this.language="en";this.customTitle=undefined;this.customDescription=undefined;this.customIcon=undefined}getIconName(){if(this.customIcon!=null){return this.customIcon}if(this.errorCode==null){return}if(this.errorCode===403){return"lock"}if(this.errorCode===404){return"find-in-page"}if(this.errorCode===500){return"sentiment-dissatisfied"}}getErrorTitle(){if(this.customTitle!=null){return this.customTitle}if(this.errorCode==null){return}return r[this.errorCode][this.language]}getErrorDescription(){var e;if(this.errorCode==null&&this.customDescription==null){return}const t=(e=this.getDescriptions())!==null&&e!==void 0?e:[];return t.map((e=>i("div",null,e)))}getDescriptions(){if(this.customDescription!==undefined){return this.customDescription}if(this.errorCode==null){return}return s[this.errorCode][this.language]}render(){return i("div",{key:"480b7593df8c54c64e63fb4218d8f9ab41cc1e0a",part:"container"},i("div",{key:"9842ad416849c357952fb90009a8311058e803e4",class:"six-error-page__icon-container",part:"icon-container"},i("six-picto",{key:"d4ff368cbab362f49baa76217bf0bef0ce4d77c9",size:"4xl",class:"six-error-page__icon",part:"icon"},this.getIconName())),i("div",{key:"270eabc20c8974d788b10ccf144204db5bad0d75",class:"six-error-page__title",part:"title"},this.getErrorTitle()),i("div",{key:"e005a5ef17a1ec204a6b1704568ba19993c774a9",class:"six-error-page__description",part:"description"},this.getErrorDescription()))}};o.style=n;export{o as six_error_page};
2
- //# sourceMappingURL=p-39ff5f61.entry.js.map
1
+ import{r as e,h as i}from"./p-05eb1bab.js";const t=".six-error-page__title{display:flex;justify-content:center;font-size:var(--six-font-size-xx-large);font-weight:bold;margin-bottom:var(--six-spacing-large)}.six-error-page__description>*{text-align:center}.six-error-page__icon-container{display:flex;justify-content:center}.six-error-page__icon::part(icon){background-color:var(--six-color-web-rock-300)}";const n=t;const r={403:{en:"Access Denied",de:"Kein Zugriff"},404:{en:"Not Found",de:"Seite nicht gefunden"},500:{en:"Ooops!",de:"Ups!"}};const s={403:{en:["You don’t have permission to access this page. ","Please contact an administrator or click the SIX logo on top left."],de:["Sie haben keine Zugriffsberechtigung auf diese Seite.","Bitte wenden Sie sich an einen Administrator oder klicken Sie auf das SIX-Logo oben links."]},404:{en:["We have not found the page you requested.","Please click the SIX logo on top left."],de:["Wir haben die angeforderte Seite nicht gefunden.","Bitte klicken Sie auf das SIX-Logo oben links."]},500:{en:["Sorry, we messed up! We try to fix this.","Please click the SIX logo on top left."],de:["Sorry, das war unser Fehler! Wir versuchen das zu beheben.","Bitte klicken Sie auf das SIX-Logo oben links."]}};const o=class{constructor(i){e(this,i);this.errorCode=undefined;this.language="en";this.customTitle=undefined;this.customDescription=undefined;this.customIcon=undefined}getIconName(){if(this.customIcon!=null){return this.customIcon}if(this.errorCode==null){return}if(this.errorCode===403){return"lock"}if(this.errorCode===404){return"find-in-page"}if(this.errorCode===500){return"sentiment-dissatisfied"}}getErrorTitle(){if(this.customTitle!=null){return this.customTitle}if(this.errorCode==null){return}return r[this.errorCode][this.language]}getErrorDescription(){var e;if(this.errorCode==null&&this.customDescription==null){return}const t=(e=this.getDescriptions())!==null&&e!==void 0?e:[];return t.map((e=>i("div",null,e)))}getDescriptions(){if(this.customDescription!==undefined){return this.customDescription}if(this.errorCode==null){return}return s[this.errorCode][this.language]}render(){return i("div",{key:"78c3882cc5c70834df70c92ce3ac0d70730484b1",part:"container"},i("div",{key:"e2f4e4ab784458d4b5d899c270e30ca9850e21e0",class:"six-error-page__icon-container",part:"icon-container"},i("six-picto",{key:"b8c8192746d6aaec5b852102ae18c170fb87c183",size:"4xl",class:"six-error-page__icon",part:"icon"},this.getIconName())),i("div",{key:"2610494ebf7457c0a62484c9694638a79f332236",class:"six-error-page__title",part:"title"},this.getErrorTitle()),i("div",{key:"b125301cc8f3808ce2c38afa11407b7e681995b2",class:"six-error-page__description",part:"description"},this.getErrorDescription()))}};o.style=n;export{o as six_error_page};
2
+ //# sourceMappingURL=p-7bdd1116.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as i,c as t,h as s,g as a}from"./p-05eb1bab.js";import{u as e,l as o}from"./p-8227aaed.js";import{h as l}from"./p-0cebf1d2.js";import{M as r}from"./p-651293e7.js";const n=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{--width:31rem;display:contents}.dialog{display:flex;align-items:center;justify-content:center;position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--six-z-index-dialog);color:var(--six-color-web-rock-900)}.dialog:not(.dialog--visible){position:absolute;width:1px;height:1px;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden;pointer-events:none;visibility:hidden}.dialog__panel{display:flex;flex-direction:column;z-index:2;width:var(--width);max-width:calc(100% - var(--six-spacing-xx-large));max-height:calc(100% - var(--six-spacing-xx-large));background-color:var(--six-panel-background-color);border-radius:var(--six-border-radius-medium);box-shadow:var(--six-shadow-large);opacity:0;transform:scale(0.8);transition:var(--six-transition-medium) opacity, var(--six-transition-medium) transform}.dialog__panel:focus{outline:none}@media screen and (max-width: 420px){.dialog__panel{max-height:80vh}}.dialog--open .dialog__panel{display:flex;opacity:1;transform:none}.dialog__header{flex:0 0 auto;display:flex}.dialog__title{flex:1 1 auto;font-size:var(--six-font-size-x-large);font-weight:var(--six-font-weight-bold);line-height:var(--six-line-height-dense);padding:var(--six-spacing-large) var(--six-spacing-large) var(--six-spacing-small)}.dialog__close{flex:0 0 auto;display:flex;align-items:center;font-size:var(--six-font-size-x-large);padding:0 var(--six-spacing-x-small)}.dialog__body{flex:1 1 auto;padding:var(--six-spacing-small) var(--six-spacing-large) var(--six-spacing-large);overflow:auto;-webkit-overflow-scrolling:touch}.dialog__footer{flex:0 0 auto;text-align:right;padding:var(--six-spacing-large)}.dialog__footer ::slotted(six-button:not(:first-of-type)){margin-left:var(--six-spacing-xx-small)}.dialog:not(.dialog--has-footer) .dialog__footer{display:none}.dialog__overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--six-overlay-background-color);opacity:0;transition:var(--six-transition-medium) opacity}.dialog--open .dialog__overlay{opacity:0.8}";const h=n;let d=0;const c=class{constructor(s){i(this,s);this.sixShow=t(this,"six-dialog-show",7);this.sixAfterShow=t(this,"six-dialog-after-show",7);this.sixHide=t(this,"six-dialog-hide",7);this.sixAfterHide=t(this,"six-dialog-after-hide",7);this.sixInitialFocus=t(this,"six-dialog-initial-focus",7);this.sixOverlayDismiss=t(this,"six-dialog-overlay-dismiss",7);this.componentId=`dialog-${++d}`;this.willShow=false;this.willHide=false;this.handleCloseClick=()=>{this.hide()};this.handleKeyDown=i=>{if(i.key==="Escape"){this.hide()}};this.handleOverlayClick=()=>{const i=this.sixOverlayDismiss.emit();if(!i.defaultPrevented){this.hide()}};this.handleSlotChange=()=>{this.hasFooter=l(this.host,"footer")};this.handleTransitionEnd=i=>{const t=i.target;if(i.propertyName==="opacity"&&t.classList.contains("dialog__panel")){this.isVisible=this.open;this.willShow=false;this.willHide=false;this.open?this.sixAfterShow.emit():this.sixAfterHide.emit()}};this.hasFooter=false;this.isVisible=false;this.open=false;this.label="";this.noHeader=false}handleOpenChange(){this.open?this.show():this.hide()}connectedCallback(){this.modal=new r(this.host,{onFocusOut:()=>{var i;return(i=this.panel)===null||i===void 0?void 0:i.focus()}})}componentWillLoad(){this.handleSlotChange()}componentDidLoad(){if(this.open){this.show()}}disconnectedCallback(){e(this.host)}async show(){if(this.willShow||this.modal==null||this.panel==null||this.dialog==null){return}const i=this.panel;const t=this.sixShow.emit();if(t.defaultPrevented){this.open=false;return}this.willShow=true;this.isVisible=true;this.open=true;this.modal.activate();o(this.host);if(this.open){requestAnimationFrame((()=>{const t=this.sixInitialFocus.emit();if(!t.defaultPrevented){i.focus({preventScroll:true})}}))}}async hide(){if(this.willHide||this.modal==null){return}const i=this.sixHide.emit();if(i.defaultPrevented){this.open=true;return}this.willHide=true;this.open=false;this.modal.deactivate();e(this.host)}render(){return s("div",{key:"a296b25173faa0d4570673307476f19457803b4a",ref:i=>this.dialog=i,part:"base",class:{dialog:true,"dialog--open":this.open,"dialog--visible":this.isVisible,"dialog--has-footer":this.hasFooter},onKeyDown:this.handleKeyDown,onTransitionEnd:this.handleTransitionEnd},s("div",{key:"f2a1cf3398fdf89247e6437785225ceccaa56710",part:"overlay",class:"dialog__overlay",onClick:this.handleOverlayClick}),s("div",{key:"cac00fcc56a2b11147a133a188e77b381429c519",ref:i=>this.panel=i,part:"panel",class:"dialog__panel",role:"dialog","aria-modal":"true","aria-hidden":this.open?"false":"true","aria-label":this.noHeader?this.label:null,"aria-labelledby":!this.noHeader?`${this.componentId}-title`:null,tabIndex:0},!this.noHeader&&s("header",{part:"header",class:"dialog__header"},s("span",{part:"title",class:"dialog__title",id:`${this.componentId}-title`},s("slot",{name:"label"},this.label||String.fromCharCode(65279))),s("six-icon-button",{exportparts:"base:close-button",class:"dialog__close",name:"close",onClick:this.handleCloseClick})),s("div",{key:"45b0a5f97bac8ed08877780dbe944b6cc306159e",part:"body",class:"dialog__body"},s("slot",{key:"299de573193e389abf04d3ecdaa94e8af8b62131"})),s("footer",{key:"b80b726e690f443461a368251ef6827f261e5d86",part:"footer",class:"dialog__footer"},s("slot",{key:"05bc0252b546c1cf77edce28632b19bddf8086c9",name:"footer",onSlotchange:this.handleSlotChange}))))}get host(){return a(this)}static get watchers(){return{open:["handleOpenChange"]}}};c.style=h;export{c as six_dialog};
2
- //# sourceMappingURL=p-c35a7cef.entry.js.map
1
+ import{r as i,c as t,h as s,g as a}from"./p-05eb1bab.js";import{u as e,l as o}from"./p-8227aaed.js";import{h as l}from"./p-0cebf1d2.js";import{M as r}from"./p-651293e7.js";const n=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{--width:31rem;display:contents}.dialog{display:flex;align-items:center;justify-content:center;position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--six-z-index-dialog);color:var(--six-color-web-rock-900)}.dialog:not(.dialog--visible){position:absolute;width:1px;height:1px;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden;pointer-events:none;visibility:hidden}.dialog__panel{display:flex;flex-direction:column;z-index:2;width:var(--width);max-width:calc(100% - var(--six-spacing-xx-large));max-height:calc(100% - var(--six-spacing-xx-large));background-color:var(--six-panel-background-color);border-radius:var(--six-border-radius-medium);box-shadow:var(--six-shadow-large);opacity:0;transform:scale(0.8);transition:var(--six-transition-medium) opacity, var(--six-transition-medium) transform}.dialog__panel:focus{outline:none}@media screen and (max-width: 420px){.dialog__panel{max-height:80vh}}.dialog--open .dialog__panel{display:flex;opacity:1;transform:none}.dialog__header{flex:0 0 auto;display:flex}.dialog__title{flex:1 1 auto;font-size:var(--six-font-size-x-large);font-weight:var(--six-font-weight-bold);line-height:var(--six-line-height-dense);padding:var(--six-spacing-large) var(--six-spacing-large) var(--six-spacing-small)}.dialog__close{flex:0 0 auto;display:flex;align-items:center;font-size:var(--six-font-size-x-large);padding:0 var(--six-spacing-x-small)}.dialog__body{flex:1 1 auto;padding:var(--six-spacing-small) var(--six-spacing-large) var(--six-spacing-large);overflow:auto;-webkit-overflow-scrolling:touch}.dialog__footer{flex:0 0 auto;text-align:right;padding:var(--six-spacing-large)}.dialog__footer ::slotted(six-button:not(:first-of-type)){margin-left:var(--six-spacing-xx-small)}.dialog:not(.dialog--has-footer) .dialog__footer{display:none}.dialog__overlay{position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--six-overlay-background-color);opacity:0;transition:var(--six-transition-medium) opacity}.dialog--open .dialog__overlay{opacity:0.8}";const d=n;let h=0;const c=class{constructor(s){i(this,s);this.sixShow=t(this,"six-dialog-show",7);this.sixAfterShow=t(this,"six-dialog-after-show",7);this.sixHide=t(this,"six-dialog-hide",7);this.sixAfterHide=t(this,"six-dialog-after-hide",7);this.sixInitialFocus=t(this,"six-dialog-initial-focus",7);this.sixOverlayDismiss=t(this,"six-dialog-overlay-dismiss",7);this.componentId=`dialog-${++h}`;this.willShow=false;this.willHide=false;this.handleCloseClick=()=>{this.hide()};this.handleKeyDown=i=>{if(i.key==="Escape"){this.hide()}};this.handleOverlayClick=()=>{const i=this.sixOverlayDismiss.emit();if(!i.defaultPrevented){this.hide()}};this.handleSlotChange=()=>{this.hasFooter=l(this.host,"footer")};this.handleTransitionEnd=i=>{const t=i.target;if(i.propertyName==="opacity"&&t.classList.contains("dialog__panel")){this.isVisible=this.open;this.willShow=false;this.willHide=false;this.open?this.sixAfterShow.emit():this.sixAfterHide.emit()}};this.hasFooter=false;this.isVisible=false;this.open=false;this.label="";this.noHeader=false}handleOpenChange(){this.open?this.show():this.hide()}connectedCallback(){this.modal=new r(this.host,{onFocusOut:()=>{var i;return(i=this.panel)===null||i===void 0?void 0:i.focus()}})}componentWillLoad(){this.handleSlotChange()}componentDidLoad(){if(this.open){this.show()}}disconnectedCallback(){e(this.host)}async show(){if(this.willShow||this.modal==null||this.panel==null||this.dialog==null){return}const i=this.panel;const t=this.sixShow.emit();if(t.defaultPrevented){this.open=false;return}this.willShow=true;this.isVisible=true;this.open=true;this.modal.activate();o(this.host);if(this.open){requestAnimationFrame((()=>{const t=this.sixInitialFocus.emit();if(!t.defaultPrevented){i.focus({preventScroll:true})}}))}}async hide(){if(this.willHide||this.modal==null){return}const i=this.sixHide.emit();if(i.defaultPrevented){this.open=true;return}this.willHide=true;this.open=false;this.modal.deactivate();e(this.host)}render(){return s("div",{key:"366fe2997ccfc4b0444ee6ee9753e8d2c42e7744",ref:i=>this.dialog=i,part:"base",class:{dialog:true,"dialog--open":this.open,"dialog--visible":this.isVisible,"dialog--has-footer":this.hasFooter},onKeyDown:this.handleKeyDown,onTransitionEnd:this.handleTransitionEnd},s("div",{key:"ed354ed231bd6c86d85405ef52b1b371dbb0fb0a",part:"overlay",class:"dialog__overlay",onClick:this.handleOverlayClick}),s("div",{key:"214bbdc1bde36c1068dad584d9d9242a0dcc5d9a",ref:i=>this.panel=i,part:"panel",class:"dialog__panel",role:"dialog","aria-modal":"true","aria-hidden":this.open?"false":"true","aria-label":this.noHeader?this.label:null,"aria-labelledby":!this.noHeader?`${this.componentId}-title`:null,tabIndex:0},!this.noHeader&&s("header",{part:"header",class:"dialog__header"},s("span",{part:"title",class:"dialog__title",id:`${this.componentId}-title`},s("slot",{name:"label"},this.label||String.fromCharCode(65279))),s("six-icon-button",{exportparts:"base:close-button",class:"dialog__close",name:"close",onClick:this.handleCloseClick})),s("div",{key:"1da84dc52118a26045bc6b4c813beed899210f05",part:"body",class:"dialog__body"},s("slot",{key:"d97bfb117a544eb5fd076658b12467febe94802e"})),s("footer",{key:"b896718eaba5a6ecdead652954cf5c43d23a4c73",part:"footer",class:"dialog__footer"},s("slot",{key:"850c447acea6ced8d76714fa759e109920c80e80",name:"footer",onSlotchange:this.handleSlotChange}))))}get host(){return a(this)}static get watchers(){return{open:["handleOpenChange"]}}};c.style=d;export{c as six_dialog};
2
+ //# sourceMappingURL=p-99f6fe01.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as o,h as t,g as l}from"./p-05eb1bab.js";import{F as r}from"./p-605bdd81.js";import{h as e}from"./p-0cebf1d2.js";const s=':host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control .form-control__error-text{display:none;text-align:left}.form-control--has-label .form-control__label{display:inline-block;color:var(--six-input-label-color);font-weight:var(--six-font-weight-bold);margin-bottom:var(--six-spacing-x-small)}.form-control--has-label .form-control__label__required::after{color:var(--six-color-danger-800);content:"*";transform:scale(1.1);margin-left:var(--six-spacing-xxx-small);position:absolute}.form-control--has-label.form-control--small .form-control__label{font-size:var(--six-input-label-font-size-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--six-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control_label{font-size:var(--six-input-label-font-size-large)}.form-control--has-help-text .form-control__help-text{display:block;color:var(--six-input-help-text-color);margin-top:var(--six-spacing-x-small)}.form-control--has-help-text .form-control__help-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--has-error-text .form-control__error-text{display:block;margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text .form-control__error-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text.form-control--small .form-control__error-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-error-text.form-control--medium .form-control__error-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-error-text.form-control--large .form-control__error-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--disabled .form-control__help-text{color:var(--six-input-help-text-color-disabled)}.form-control--disabled .form-control__label{color:var(--six-input-label-color-disabled)}.form-control--invalid:not(.form-control--disabled) .form-control__label{color:var(--six-input-label-color)}:host{display:block}';const a=s;let i=0;const n=class{constructor(t){o(this,t);this.wrapperLabelId=`label-${++i}`;this.labelId=`label-label-${i}`;this.helpTextId=`label-help-text-${i}`;this.handleSlotChange=()=>{this.hasLabelSlot=e(this.host,"label");this.hasHelpTextSlot=e(this.host,"help-text")};this.hasHelpTextSlot=false;this.hasLabelSlot=false;this.size="medium";this.label="";this.helpText="";this.disabled=false;this.required=false}handleLabelChange(){this.handleSlotChange()}connectedCallback(){var o;(o=this.host.shadowRoot)===null||o===void 0?void 0:o.addEventListener("slotchange",this.handleSlotChange)}componentWillLoad(){this.handleSlotChange()}disconnectedCallback(){var o;(o=this.host.shadowRoot)===null||o===void 0?void 0:o.removeEventListener("slotchange",this.handleSlotChange)}render(){return t(r,{key:"a518616f11a06ff39d4eef3654b43db9491749c2",inputId:this.wrapperLabelId,label:this.label,labelId:this.labelId,hasLabelSlot:this.hasLabelSlot,helpTextId:this.helpTextId,helpText:this.helpText,hasHelpTextSlot:this.hasHelpTextSlot,size:this.size,disabled:this.disabled,required:this.required},t("slot",{key:"dc6946efe018060cd9c6c609b0e6f17d882ae7e0"}))}get host(){return l(this)}static get watchers(){return{helpText:["handleLabelChange"],label:["handleLabelChange"]}}};n.style=a;export{n as six_group_label};
2
- //# sourceMappingURL=p-9bc1639b.entry.js.map
1
+ import{r as o,h as t,g as l}from"./p-05eb1bab.js";import{F as r}from"./p-605bdd81.js";import{h as e}from"./p-0cebf1d2.js";const s=':host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}.form-control .form-control__label{display:none}.form-control .form-control__help-text{display:none}.form-control .form-control__error-text{display:none;text-align:left}.form-control--has-label .form-control__label{display:inline-block;color:var(--six-input-label-color);font-weight:var(--six-font-weight-bold);margin-bottom:var(--six-spacing-x-small)}.form-control--has-label .form-control__label__required::after{color:var(--six-color-danger-800);content:"*";transform:scale(1.1);margin-left:var(--six-spacing-xxx-small);position:absolute}.form-control--has-label.form-control--small .form-control__label{font-size:var(--six-input-label-font-size-small)}.form-control--has-label.form-control--medium .form-control__label{font-size:var(--six-input-label-font-size-medium)}.form-control--has-label.form-control--large .form-control_label{font-size:var(--six-input-label-font-size-large)}.form-control--has-help-text .form-control__help-text{display:block;color:var(--six-input-help-text-color);margin-top:var(--six-spacing-x-small)}.form-control--has-help-text .form-control__help-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-help-text.form-control--small .form-control__help-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-help-text.form-control--medium .form-control__help-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-help-text.form-control--large .form-control__help-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--has-error-text .form-control__error-text{display:block;margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text .form-control__error-text ::slotted(*){margin-top:var(--six-spacing-xxx-small)}.form-control--has-error-text.form-control--small .form-control__error-text{font-size:var(--six-input-help-text-font-size-small)}.form-control--has-error-text.form-control--medium .form-control__error-text{font-size:var(--six-input-help-text-font-size-medium)}.form-control--has-error-text.form-control--large .form-control__error-text{font-size:var(--six-input-help-text-font-size-large)}.form-control--disabled .form-control__help-text{color:var(--six-input-help-text-color-disabled)}.form-control--disabled .form-control__label{color:var(--six-input-label-color-disabled)}.form-control--invalid:not(.form-control--disabled) .form-control__label{color:var(--six-input-label-color)}:host{display:block}';const a=s;let i=0;const n=class{constructor(t){o(this,t);this.wrapperLabelId=`label-${++i}`;this.labelId=`label-label-${i}`;this.helpTextId=`label-help-text-${i}`;this.handleSlotChange=()=>{this.hasLabelSlot=e(this.host,"label");this.hasHelpTextSlot=e(this.host,"help-text")};this.hasHelpTextSlot=false;this.hasLabelSlot=false;this.size="medium";this.label="";this.helpText="";this.disabled=false;this.required=false}handleLabelChange(){this.handleSlotChange()}connectedCallback(){var o;(o=this.host.shadowRoot)===null||o===void 0?void 0:o.addEventListener("slotchange",this.handleSlotChange)}componentWillLoad(){this.handleSlotChange()}disconnectedCallback(){var o;(o=this.host.shadowRoot)===null||o===void 0?void 0:o.removeEventListener("slotchange",this.handleSlotChange)}render(){return t(r,{key:"edc2f21913a2e4a40b516b69ac640950f8351a00",inputId:this.wrapperLabelId,label:this.label,labelId:this.labelId,hasLabelSlot:this.hasLabelSlot,helpTextId:this.helpTextId,helpText:this.helpText,hasHelpTextSlot:this.hasHelpTextSlot,size:this.size,disabled:this.disabled,required:this.required},t("slot",{key:"a7fd4d86c9fcf071eb80239340d54925091c465d"}))}get host(){return l(this)}static get watchers(){return{helpText:["handleLabelChange"],label:["handleLabelChange"]}}};n.style=a;export{n as six_group_label};
2
+ //# sourceMappingURL=p-b335ed9c.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as i,h as e}from"./p-05eb1bab.js";const t=':host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:inline-flex;vertical-align:middle}.material-icons{vertical-align:middle;font-weight:normal;font-style:normal;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga";user-select:none}.material-icons-filled{font-family:"Material Icons"}.material-icons-outlined{font-family:"Material Icons Outlined"}.icon--xsmall{font-size:12px}.icon--small{font-size:18px}.icon--medium{font-size:24px}.icon--large{font-size:36px}.icon--xlarge{font-size:48px}.icon--xxlarge{font-size:72px}.icon--xxxlarge{font-size:96px}.icon--inherit{font-size:1.5em}';const o=t;const n=class{constructor(e){i(this,e);this.size="inherit";this.filled=false}render(){return e("i",{key:"1829823d7fafabd422951e21baf28f0925f670d9",class:{"material-icons":true,"material-icons-outlined":!this.filled,"material-icons-filled":this.filled,"icon--xsmall":this.size==="xSmall","icon--small":this.size==="small","icon--medium":this.size==="medium","icon--large":this.size==="large","icon--xlarge":this.size==="xLarge","icon--xxlarge":this.size==="xxLarge","icon--xxxlarge":this.size==="xxxLarge","icon--inherit":this.size==="inherit"}},e("slot",{key:"0f11af1384b316708bfe8b3989ea74cc3f2c37f9"}))}};n.style=o;export{n as six_icon};
2
- //# sourceMappingURL=p-19560508.entry.js.map
1
+ import{r as i,h as e}from"./p-05eb1bab.js";const t=':host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}:host{display:inline-flex;vertical-align:middle}.material-icons{vertical-align:middle;font-weight:normal;font-style:normal;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga";user-select:none}.material-icons-filled{font-family:"Material Icons"}.material-icons-outlined{font-family:"Material Icons Outlined"}.icon--xsmall{font-size:12px}.icon--small{font-size:18px}.icon--medium{font-size:24px}.icon--large{font-size:36px}.icon--xlarge{font-size:48px}.icon--xxlarge{font-size:72px}.icon--xxxlarge{font-size:96px}.icon--inherit{font-size:1.5em}';const o=t;const n=class{constructor(e){i(this,e);this.size="inherit";this.filled=false}render(){return e("i",{key:"0ad2a9d136a1cc69769040f67f86c4ea5abfd954",class:{"material-icons":true,"material-icons-outlined":!this.filled,"material-icons-filled":this.filled,"icon--xsmall":this.size==="xSmall","icon--small":this.size==="small","icon--medium":this.size==="medium","icon--large":this.size==="large","icon--xlarge":this.size==="xLarge","icon--xxlarge":this.size==="xxLarge","icon--xxxlarge":this.size==="xxxLarge","icon--inherit":this.size==="inherit"}},e("slot",{key:"aecf0f5e3b4cdffd223434fa09283306e92be51e"}))}};n.style=o;export{n as six_icon};
2
+ //# sourceMappingURL=p-b7c68f74.entry.js.map