@six-group/ui-library 5.1.1 → 5.2.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/six-button.six-spinner.entry.cjs.js.map +1 -1
  3. package/dist/cjs/six-button_2.cjs.entry.js +1 -1
  4. package/dist/cjs/six-button_2.cjs.entry.js.map +1 -1
  5. package/dist/cjs/six-dropdown.six-menu.entry.cjs.js.map +1 -1
  6. package/dist/cjs/six-dropdown_2.cjs.entry.js +13 -6
  7. package/dist/cjs/six-dropdown_2.cjs.entry.js.map +1 -1
  8. package/dist/cjs/six-file-upload.cjs.entry.js +9 -5
  9. package/dist/cjs/six-file-upload.cjs.entry.js.map +1 -1
  10. package/dist/cjs/six-file-upload.entry.cjs.js.map +1 -1
  11. package/dist/cjs/ui-library.cjs.js +1 -1
  12. package/dist/collection/components/six-dropdown/six-dropdown.js +33 -6
  13. package/dist/collection/components/six-dropdown/six-dropdown.js.map +1 -1
  14. package/dist/collection/components/six-file-upload/six-file-upload.js +9 -5
  15. package/dist/collection/components/six-file-upload/six-file-upload.js.map +1 -1
  16. package/dist/collection/components/six-spinner/six-spinner.css +6 -20
  17. package/dist/components/{p-BDCdPEjW.js → p-BLoBZxyR.js} +3 -3
  18. package/dist/components/{p-BDCdPEjW.js.map → p-BLoBZxyR.js.map} +1 -1
  19. package/dist/components/{p-BB2rei7y.js → p-BTKXuKvc.js} +3 -3
  20. package/dist/components/p-BTKXuKvc.js.map +1 -0
  21. package/dist/components/{p-C6ozoFuw.js → p-Cn6eoiRl.js} +16 -8
  22. package/dist/components/p-Cn6eoiRl.js.map +1 -0
  23. package/dist/components/six-breadcrumbs-item.js +2 -2
  24. package/dist/components/six-button.js +1 -1
  25. package/dist/components/six-dropdown.js +1 -1
  26. package/dist/components/six-file-upload.js +10 -6
  27. package/dist/components/six-file-upload.js.map +1 -1
  28. package/dist/components/six-header-dropdown-item.js +1 -1
  29. package/dist/components/six-header-menu-button.js +2 -2
  30. package/dist/components/six-select.js +3 -3
  31. package/dist/components/six-spinner.js +1 -1
  32. package/dist/components.json +30 -1
  33. package/dist/esm/loader.js +1 -1
  34. package/dist/esm/six-button.six-spinner.entry.js.map +1 -1
  35. package/dist/esm/six-button_2.entry.js +1 -1
  36. package/dist/esm/six-button_2.entry.js.map +1 -1
  37. package/dist/esm/six-dropdown.six-menu.entry.js.map +1 -1
  38. package/dist/esm/six-dropdown_2.entry.js +13 -6
  39. package/dist/esm/six-dropdown_2.entry.js.map +1 -1
  40. package/dist/esm/six-file-upload.entry.js +9 -5
  41. package/dist/esm/six-file-upload.entry.js.map +1 -1
  42. package/dist/esm/ui-library.js +1 -1
  43. package/dist/types/components/six-dropdown/six-dropdown.d.ts +5 -0
  44. package/dist/types/components/six-file-upload/six-file-upload.d.ts +1 -1
  45. package/dist/types/components.d.ts +10 -0
  46. package/dist/ui-library/p-27baf557.entry.js +2 -0
  47. package/dist/ui-library/p-27baf557.entry.js.map +1 -0
  48. package/dist/ui-library/{p-014f44f4.entry.js → p-68cb0eaa.entry.js} +2 -2
  49. package/dist/ui-library/{p-014f44f4.entry.js.map → p-68cb0eaa.entry.js.map} +1 -1
  50. package/dist/ui-library/{p-0eb90caf.entry.js → p-cc7202c3.entry.js} +2 -2
  51. package/dist/ui-library/p-cc7202c3.entry.js.map +1 -0
  52. package/dist/ui-library/six-button.six-spinner.entry.esm.js.map +1 -1
  53. package/dist/ui-library/six-dropdown.six-menu.entry.esm.js.map +1 -1
  54. package/dist/ui-library/six-file-upload.entry.esm.js.map +1 -1
  55. package/dist/ui-library/ui-library.esm.js +1 -1
  56. package/package.json +15 -1
  57. package/dist/components/p-BB2rei7y.js.map +0 -1
  58. package/dist/components/p-C6ozoFuw.js.map +0 -1
  59. package/dist/ui-library/p-0eb90caf.entry.js.map +0 -1
  60. package/dist/ui-library/p-59568c0f.entry.js +0 -2
  61. package/dist/ui-library/p-59568c0f.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"six-file-upload.entry.esm.js","sources":["src/components/six-file-upload/six-file-upload.scss?tag=six-file-upload&encapsulation=scoped","src/components/six-file-upload/six-file-upload.tsx"],"sourcesContent":["@import 'src/global/component';\n\n$over-color: var(--six-color-action-light-to-be-defined);\n$disabled-color: var(--six-color-inactive);\n$transition: 0.3s;\n$margin: 1rem;\n\n:host {\n position: static;\n display: block;\n}\n\n.six-file-upload {\n six-card {\n box-shadow: none;\n padding: 0;\n width: 100%;\n }\n\n &__label {\n &--highlighted {\n color: var(--six-color-action-600);\n }\n }\n\n &__container {\n &--full {\n border: dashed 1px var(--six-color-web-rock-500);\n }\n }\n\n &__drop-zone {\n padding: 2rem 0;\n display: flex;\n justify-content: center;\n width: 100%;\n transition: background-color $transition;\n\n &__spinner-container {\n display: flex;\n align-items: center;\n\n six-spinner {\n margin-right: var(--six-spacing-x-small);\n }\n }\n\n &--compact {\n padding: 0;\n }\n }\n\n &__input {\n cursor: pointer;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n user-select: none;\n height: 100%;\n opacity: 0;\n outline: none;\n }\n\n &--disabled &__drop-zone {\n background-color: $disabled-color;\n cursor: not-allowed;\n }\n\n &:not(.six-file-upload--disabled) &__drop-zone:hover,\n &__drop-zone--hover {\n background-color: $over-color;\n\n &.six-file-upload__drop-zone--compact {\n background-color: inherit;\n }\n }\n\n &--disabled &__input {\n cursor: not-allowed;\n }\n\n &__error-text {\n font-size: var(--six-input-help-text-font-size-medium);\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Listen, Prop, State } from '@stencil/core';\nimport { hasSlot } from '../../utils/slot';\n\nexport interface SixFileUploadSuccessPayload {\n files: FileList;\n}\n\nexport interface SixFileUploadFailurePayload {\n reason: string;\n code:\n | 'ONLY_ONE_FILE_ALLOWED'\n | 'ONE_OR_MORE_FILES_HAVE_INVALID_MIME_TYPE'\n | 'INVALID_MIME_TYPE'\n | 'ONE_OR_MULTIPLE_FILES_TOO_BIG'\n | 'FILE_TOO_BIG';\n}\n\n/**\n * @since 2.0.0\n * @status experimental\n *\n * @slot error-text - Error text that is shown when the status is set to invalid. Alternatively, you can use the error-text prop.\n */\n@Component({\n tag: 'six-file-upload',\n styleUrl: 'six-file-upload.scss',\n scoped: true,\n shadow: false,\n})\nexport class SixFileUpload {\n @Element() readonly host!: HTMLSixFileUploadElement;\n\n private fileInput?: HTMLInputElement;\n\n @State() isOver = false;\n @State() hasError = false;\n\n /** Set to true if file control should be small. */\n @Prop() readonly compact: boolean = false;\n\n /** Label of the drop area. */\n @Prop() readonly label?: string;\n\n /** Set when button is disabled. */\n @Prop() readonly disabled = false;\n\n /** Accepted MIME-Types. */\n @Prop() readonly accept?: string;\n\n /** More than one file allowed. */\n @Prop() readonly multiple = false;\n\n /** Allowed max file size in bytes. */\n @Prop() readonly maxFileSize?: number;\n\n /** Set to true to draw the control in a loading state. */\n @Prop({ reflect: true }) uploading = false;\n\n /** The error message shown, if `invalid` is set to true. */\n @Prop() errorText: string | string[] = '';\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 /** Triggers when a file is added. */\n @Event({ eventName: 'six-file-upload-success' }) success!: EventEmitter<SixFileUploadSuccessPayload>;\n\n /** Triggers when an uploaded file doesn't match MIME type or max file size. */\n @Event({ eventName: 'six-file-upload-failure' }) failure!: EventEmitter<SixFileUploadFailurePayload>;\n\n @Listen('dragenter', { capture: false })\n dragenterHandler() {\n if (!this.disabled) {\n this.isOver = true;\n }\n }\n\n @Listen('dragover', { capture: false })\n dragoverHandler() {\n if (!this.disabled) {\n this.isOver = true;\n }\n }\n\n @Listen('dragleave', { capture: false })\n dragleaveHandler() {\n if (!this.disabled) {\n this.isOver = false;\n }\n }\n\n @Listen('drop', { capture: false })\n dropHandler() {\n if (!this.disabled) {\n this.isOver = false;\n }\n }\n\n private handleSlotChange = () => {\n let validType = false;\n\n if (\n this.errorText != null &&\n ((typeof this.errorText == 'string' && this.errorText.trim().length > 0) ||\n (typeof this.errorText == 'object' && this.errorText.length > 0))\n ) {\n validType = true;\n }\n\n this.hasError = validType || hasSlot(this.host, 'error-text');\n };\n\n private handleFiles = (files: FileList) => {\n if (this.disabled || files.length === 0 || this.uploading) {\n return;\n }\n\n if (!this.multiple && files.length > 1) {\n return this.failure.emit({\n reason: 'Only one file is allowed.',\n code: 'ONLY_ONE_FILE_ALLOWED',\n });\n }\n\n for (const file of files) {\n if (file == null) {\n return;\n }\n\n let acceptedTypesList: string[] = [];\n if (this.accept != null) {\n acceptedTypesList = this.accept.replace(/\\s/g, '').split(',');\n }\n\n if (acceptedTypesList.length > 0 && acceptedTypesList.indexOf(file.type) === -1) {\n const reason = files.length > 1 ? 'One or more files have invalid MIME type.' : 'File has invalid MIME type.';\n const code = files.length > 1 ? 'ONE_OR_MORE_FILES_HAVE_INVALID_MIME_TYPE' : 'INVALID_MIME_TYPE';\n return this.failure.emit({ reason, code });\n }\n\n if (this.maxFileSize != null && file.size > this.maxFileSize) {\n const reason = files.length > 1 ? 'One or more files are too big' : 'File is too big.';\n const code = files.length > 1 ? 'ONE_OR_MULTIPLE_FILES_TOO_BIG' : 'FILE_TOO_BIG';\n return this.failure.emit({ reason, code });\n }\n }\n\n this.success.emit({ files } as SixFileUploadSuccessPayload);\n };\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n componentDidLoad() {\n ['dragenter', 'dragover', 'dragleave', 'drop'].forEach((eventName) => {\n this.host.addEventListener(eventName, this.preventDefaults, false);\n document.body.addEventListener(eventName, this.preventDefaults, false);\n });\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n }\n\n disconnectedCallback() {\n ['dragenter', 'dragover', 'dragleave', 'drop'].forEach((eventName) => {\n this.host.removeEventListener(eventName, this.preventDefaults, false);\n document.body.removeEventListener(eventName, this.preventDefaults, false);\n });\n this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n }\n\n private preventDefaults(e: Event) {\n e.preventDefault();\n e.stopPropagation();\n }\n\n private onChange = () => {\n if (this.fileInput?.files != null) {\n const files = this.fileInput.files;\n this.handleFiles(files);\n this.fileInput.value = '';\n }\n };\n\n private renderLabel() {\n return (\n this.label ??\n (this.compact ? (\n 'Upload'\n ) : (\n <span>\n Drop files to upload, or <span class=\"six-file-upload__label--highlighted\">browse</span>\n </span>\n ))\n );\n }\n\n render() {\n const Container = this.compact ? 'six-button' : 'six-card';\n\n const errorMessages = (Array.isArray(this.errorText) ? this.errorText : [this.errorText]).filter(\n (text) => text != null && text.trim() !== ''\n );\n\n return (\n <div\n class={{\n 'six-file-upload': true,\n 'six-file-upload--disabled': this.disabled || this.uploading,\n }}\n >\n <Container\n disabled={this.disabled || this.uploading}\n aria-invalid={this.invalid ? 'true' : 'false'}\n class={{\n 'six-file-upload__container--compact': this.compact,\n 'six-file-upload__container--full': !this.compact,\n }}\n >\n {this.compact && !this.uploading && <six-icon slot=\"prefix\">arrow_circle_up</six-icon>}\n <div\n class={{\n 'six-file-upload__drop-zone': true,\n 'six-file-upload__drop-zone--hover': this.isOver,\n 'six-file-upload__drop-zone--compact': this.compact,\n }}\n >\n {this.uploading ? (\n <span class=\"six-file-upload__drop-zone__spinner-container\">\n <six-spinner /> Uploading...\n </span>\n ) : (\n <div>\n <span>{this.renderLabel()}</span>\n <input\n class=\"six-file-upload__input\"\n type=\"file\"\n name=\"resume\"\n disabled={this.disabled}\n accept={this.accept}\n multiple={this.multiple}\n onChange={this.onChange}\n ref={(el) => (this.fileInput = el)}\n />\n </div>\n )}\n </div>\n </Container>\n <div aria-hidden={this.invalid ? 'false' : 'true'}>\n <slot name=\"error-text\">\n {errorMessages.map((text) => (\n <six-error>\n <div class=\"six-file-upload__error-text\">{text}</div>\n </six-error>\n ))}\n </slot>\n </div>\n </div>\n );\n }\n}\n"],"names":[],"mappings":";;;AAAA,MAAM,gBAAgB,GAAG,soEAAsoE;;MC6BlpE,aAAa,GAAA,MAA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CAAQ,EACjC,CACE,CAAA,OAAA,EAAA,EAAA,KAAK,EAAC,wBAAwB,EAC9B,IAAI,EAAC,MAAM,EACX,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,EAClC,CAAA,CACE,CACP,CACG,CACI,EACZ,CAAkB,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,aAAA,EAAA,IAAI,CAAC,OAAO,GAAG,OAAO,GAAG,MAAM,EAAA,EAC/C,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,YAAY,EAAA,EACpB,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,MACtB,CAAA,CAAA,WAAA,EAAA,IAAA,EACE,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,6BAA6B,EAAA,EAAE,IAAI,CAAO,CAC3C,CACb,CAAC,CACG,CACH,CACF;;;;;;;;"}
1
+ {"version":3,"file":"six-file-upload.entry.esm.js","sources":["src/components/six-file-upload/six-file-upload.scss?tag=six-file-upload&encapsulation=scoped","src/components/six-file-upload/six-file-upload.tsx"],"sourcesContent":["@import 'src/global/component';\n\n$over-color: var(--six-color-action-light-to-be-defined);\n$disabled-color: var(--six-color-inactive);\n$transition: 0.3s;\n$margin: 1rem;\n\n:host {\n position: static;\n display: block;\n}\n\n.six-file-upload {\n six-card {\n box-shadow: none;\n padding: 0;\n width: 100%;\n }\n\n &__label {\n &--highlighted {\n color: var(--six-color-action-600);\n }\n }\n\n &__container {\n &--full {\n border: dashed 1px var(--six-color-web-rock-500);\n }\n }\n\n &__drop-zone {\n padding: 2rem 0;\n display: flex;\n justify-content: center;\n width: 100%;\n transition: background-color $transition;\n\n &__spinner-container {\n display: flex;\n align-items: center;\n\n six-spinner {\n margin-right: var(--six-spacing-x-small);\n }\n }\n\n &--compact {\n padding: 0;\n }\n }\n\n &__input {\n cursor: pointer;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n user-select: none;\n height: 100%;\n opacity: 0;\n outline: none;\n }\n\n &--disabled &__drop-zone {\n background-color: $disabled-color;\n cursor: not-allowed;\n }\n\n &:not(.six-file-upload--disabled) &__drop-zone:hover,\n &__drop-zone--hover {\n background-color: $over-color;\n\n &.six-file-upload__drop-zone--compact {\n background-color: inherit;\n }\n }\n\n &--disabled &__input {\n cursor: not-allowed;\n }\n\n &__error-text {\n font-size: var(--six-input-help-text-font-size-medium);\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Listen, Prop, State } from '@stencil/core';\nimport { hasSlot } from '../../utils/slot';\n\nexport interface SixFileUploadSuccessPayload {\n files: FileList;\n}\n\nexport interface SixFileUploadFailurePayload {\n reason: string;\n code:\n | 'ONLY_ONE_FILE_ALLOWED'\n | 'ONE_OR_MORE_FILES_HAVE_INVALID_MIME_TYPE'\n | 'INVALID_MIME_TYPE'\n | 'ONE_OR_MULTIPLE_FILES_TOO_BIG'\n | 'FILE_TOO_BIG';\n}\n\n/**\n * @since 2.0.0\n * @status experimental\n *\n * @slot error-text - Error text that is shown when the status is set to invalid. Alternatively, you can use the error-text prop.\n */\n@Component({\n tag: 'six-file-upload',\n styleUrl: 'six-file-upload.scss',\n scoped: true,\n shadow: false,\n})\nexport class SixFileUpload {\n @Element() readonly host!: HTMLSixFileUploadElement;\n\n private fileInput?: HTMLInputElement;\n\n @State() isOver = false;\n @State() hasError = false;\n\n /** Set to true if file control should be small. */\n @Prop() readonly compact: boolean = false;\n\n /** Label of the drop area. */\n @Prop() readonly label?: string;\n\n /** Set when button is disabled. */\n @Prop() readonly disabled = false;\n\n /** Accepted MIME-Types. */\n @Prop() readonly accept?: string;\n\n /** More than one file allowed. */\n @Prop() readonly multiple = false;\n\n /** Allowed max file size in bytes. */\n @Prop() readonly maxFileSize?: number;\n\n /** Set to true to draw the control in a loading state. */\n @Prop({ reflect: true }) uploading = false;\n\n /** The error message shown, if `invalid` is set to true. */\n @Prop() errorText: string | string[] = '';\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 /** Triggers when a file is added. */\n @Event({ eventName: 'six-file-upload-success' }) success!: EventEmitter<SixFileUploadSuccessPayload>;\n\n /** Triggers when an uploaded file doesn't match MIME type or max file size. */\n @Event({ eventName: 'six-file-upload-failure' }) failure!: EventEmitter<SixFileUploadFailurePayload>;\n\n @Listen('dragenter', { capture: false })\n dragenterHandler() {\n if (!this.disabled) {\n this.isOver = true;\n }\n }\n\n @Listen('dragover', { capture: false })\n dragoverHandler() {\n if (!this.disabled) {\n this.isOver = true;\n }\n }\n\n @Listen('dragleave', { capture: false })\n dragleaveHandler() {\n if (!this.disabled) {\n this.isOver = false;\n }\n }\n\n @Listen('drop', { capture: false })\n dropHandler(event: DragEvent) {\n if (!this.disabled) {\n this.isOver = false;\n if (event.dataTransfer?.files) {\n this.handleFiles(event.dataTransfer.files);\n }\n }\n }\n\n private handleSlotChange = () => {\n let validType = false;\n\n if (\n this.errorText != null &&\n ((typeof this.errorText == 'string' && this.errorText.trim().length > 0) ||\n (typeof this.errorText == 'object' && this.errorText.length > 0))\n ) {\n validType = true;\n }\n\n this.hasError = validType || hasSlot(this.host, 'error-text');\n };\n\n private handleFiles = (files: FileList) => {\n if (this.disabled || files.length === 0 || this.uploading) {\n return;\n }\n\n if (!this.multiple && files.length > 1) {\n return this.failure.emit({\n reason: 'Only one file is allowed.',\n code: 'ONLY_ONE_FILE_ALLOWED',\n });\n }\n\n for (const file of files) {\n if (file == null) {\n return;\n }\n\n let acceptedTypesList: string[] = [];\n if (this.accept != null) {\n acceptedTypesList = this.accept.replace(/\\s/g, '').split(',');\n }\n\n if (acceptedTypesList.length > 0 && acceptedTypesList.indexOf(file.type) === -1) {\n const reason = files.length > 1 ? 'One or more files have invalid MIME type.' : 'File has invalid MIME type.';\n const code = files.length > 1 ? 'ONE_OR_MORE_FILES_HAVE_INVALID_MIME_TYPE' : 'INVALID_MIME_TYPE';\n return this.failure.emit({ reason, code });\n }\n\n if (this.maxFileSize != null && file.size > this.maxFileSize) {\n const reason = files.length > 1 ? 'One or more files are too big' : 'File is too big.';\n const code = files.length > 1 ? 'ONE_OR_MULTIPLE_FILES_TOO_BIG' : 'FILE_TOO_BIG';\n return this.failure.emit({ reason, code });\n }\n }\n\n this.success.emit({ files } as SixFileUploadSuccessPayload);\n };\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n componentDidLoad() {\n ['dragenter', 'dragover', 'dragleave', 'drop'].forEach((eventName) => {\n this.host.addEventListener(eventName, this.preventDefaults, false);\n document.body.addEventListener(eventName, this.preventDefaults, false);\n });\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n }\n\n disconnectedCallback() {\n ['dragenter', 'dragover', 'dragleave', 'drop'].forEach((eventName) => {\n this.host.removeEventListener(eventName, this.preventDefaults, false);\n document.body.removeEventListener(eventName, this.preventDefaults, false);\n });\n this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n }\n\n private preventDefaults(e: Event) {\n e.preventDefault();\n e.stopPropagation();\n }\n\n private onChange = () => {\n if (this.fileInput?.files != null) {\n const files = this.fileInput.files;\n this.handleFiles(files);\n this.fileInput.value = '';\n }\n };\n\n private renderLabel() {\n return (\n this.label ??\n (this.compact ? (\n 'Upload'\n ) : (\n <span>\n Drop files to upload, or <span class=\"six-file-upload__label--highlighted\">browse</span>\n </span>\n ))\n );\n }\n\n render() {\n const Container = this.compact ? 'six-button' : 'six-card';\n\n const errorMessages = (Array.isArray(this.errorText) ? this.errorText : [this.errorText]).filter(\n (text) => text != null && text.trim() !== ''\n );\n\n return (\n <div\n class={{\n 'six-file-upload': true,\n 'six-file-upload--disabled': this.disabled || this.uploading,\n }}\n >\n <Container\n disabled={this.disabled || this.uploading}\n aria-invalid={this.invalid ? 'true' : 'false'}\n class={{\n 'six-file-upload__container--compact': this.compact,\n 'six-file-upload__container--full': !this.compact,\n }}\n >\n {this.compact && !this.uploading && <six-icon slot=\"prefix\">arrow_circle_up</six-icon>}\n <div\n class={{\n 'six-file-upload__drop-zone': true,\n 'six-file-upload__drop-zone--hover': this.isOver,\n 'six-file-upload__drop-zone--compact': this.compact,\n }}\n >\n {this.uploading ? (\n <span class=\"six-file-upload__drop-zone__spinner-container\">\n <six-spinner /> Uploading...\n </span>\n ) : (\n <div>\n <span>{this.renderLabel()}</span>\n <input\n class=\"six-file-upload__input\"\n type=\"file\"\n name=\"resume\"\n disabled={this.disabled}\n accept={this.accept}\n multiple={this.multiple}\n onChange={this.onChange}\n ref={(el) => (this.fileInput = el)}\n />\n </div>\n )}\n </div>\n </Container>\n <div aria-hidden={this.invalid ? 'false' : 'true'}>\n <slot name=\"error-text\">\n {errorMessages.map((text) => (\n <six-error>\n <div class=\"six-file-upload__error-text\">{text}</div>\n </six-error>\n ))}\n </slot>\n </div>\n </div>\n );\n }\n}\n"],"names":[],"mappings":";;;AAAA,MAAM,gBAAgB,GAAG,soEAAsoE;;MC6BlpE,aAAa,GAAA,MAAA;AAN1B,IAAA,WAAA,CAAA,OAAA,EAAA;;;;AAWW,QAAA,IAAM,CAAA,MAAA,GAAG,KAAK;AACd,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;;AAGR,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;;AAMxB,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;;AAMhB,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;;AAMR,QAAA,IAAS,CAAA,SAAA,GAAG,KAAK;;AAGlC,QAAA,IAAS,CAAA,SAAA,GAAsB,EAAE;;AAGhB,QAAA,IAAO,CAAA,OAAA,GAAG,KAAK;AAuChC,QAAA,IAAgB,CAAA,gBAAA,GAA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vB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,GAAG,EAAE,CAAC,EAAE,MAAM,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,EAClC,CAAA,CACE,CACP,CACG,CACI,EACZ,CAAkB,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,aAAA,EAAA,IAAI,CAAC,OAAO,GAAG,OAAO,GAAG,MAAM,EAAA,EAC/C,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,YAAY,EAAA,EACpB,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,MACtB,CAAA,CAAA,WAAA,EAAA,IAAA,EACE,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,6BAA6B,EAAA,EAAE,IAAI,CAAO,CAC3C,CACb,CAAC,CACG,CACH,CACF;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- import{p as e,b as a}from"./p-JoG9I7EO.js";export{s as setNonce}from"./p-JoG9I7EO.js";import{g as l}from"./p-DQuL1Twl.js";var t=()=>{const a=import.meta.url;const l={};if(a!==""){l.resourcesUrl=new URL(".",a).href}return e(l)};t().then((async e=>{await l();return a(JSON.parse('[["p-6607d03a",[[1,"six-select",{"multiple":[4],"selectAllButton":[4,"select-all-button"],"selectAllText":[1,"select-all-text"],"disabled":[4],"name":[1],"placeholder":[1],"filterPlaceholder":[1,"filter-placeholder"],"filterDebounce":[2,"filter-debounce"],"size":[1],"hoist":[4],"value":[1025],"pill":[4],"helpText":[1,"help-text"],"required":[4],"clearable":[4],"label":[1],"errorText":[1,"error-text"],"errorTextCount":[2,"error-text-count"],"invalid":[516],"line":[4],"filter":[4],"asyncFilter":[4,"async-filter"],"autocomplete":[4],"inputDebounce":[2,"input-debounce"],"options":[16],"virtualScroll":[4,"virtual-scroll"],"hasFocus":[32],"hasHelpTextSlot":[32],"hasLabelSlot":[32],"hasErrorTextSlot":[32],"isOpen":[32],"displayedValues":[32],"selectionContainerItems":[32],"setFocus":[64]},null,{"disabled":["handleDisabledChange"],"helpText":["handleLabelChange"],"errorText":["handleLabelChange"],"label":["handleLabelChange"],"multiple":["handleMultipleChange"],"value":["handleValueChange"]}]]],["p-12a2cc6b",[[1,"six-header-dropdown-item",{"filter":[4],"filterPlaceholder":[1,"filter-placeholder"],"active":[32]}]]],["p-38c51fd1",[[1,"six-datepicker",{"type":[1],"locale":[1],"open":[1540],"inline":[516],"readonly":[4],"disabled":[4],"allowedDates":[16,"allowed-dates"],"min":[16],"max":[16],"closeOnSelect":[4,"close-on-select"],"placement":[1],"size":[1],"required":[4],"defaultDate":[1,"default-date"],"placeholder":[1],"value":[1040],"label":[1],"errorText":[1,"error-text"],"errorTextCount":[2,"error-text-count"],"invalid":[516],"containingElement":[16,"containing-element"],"dateFormat":[1,"date-format"],"debounce":[2],"name":[513],"clearable":[4],"iconPosition":[1,"icon-position"],"hoist":[4],"pointerDate":[32],"selectionMode":[32],"isDropDownContentUp":[32],"setFocus":[64],"select":[64]},[[9,"resize","resizeHandler"],[9,"scroll","scrollHandler"]],{"debounce":["debounceChanged"],"value":["valueChanged"]}]]],["p-7f7413db",[[1,"six-date",{"language":[1],"readonly":[4],"disabled":[4],"allowedDates":[16,"allowed-dates"],"min":[1],"max":[1],"size":[1],"required":[4],"placeholder":[1],"value":[1025],"dateFormat":[1,"date-format"],"label":[1],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"errorTextCount":[2,"error-text-count"],"invalid":[516],"name":[513],"clearable":[4],"pointerDate":[32],"selectionMode":[32],"setFocus":[64]},null,{"value":["valueChanged"]}]]],["p-0eb90caf",[[6,"six-file-upload",{"compact":[4],"label":[1],"disabled":[4],"accept":[1],"multiple":[4],"maxFileSize":[2,"max-file-size"],"uploading":[516],"errorText":[1,"error-text"],"invalid":[516],"isOver":[32],"hasError":[32]},[[1,"dragenter","dragenterHandler"],[1,"dragover","dragoverHandler"],[1,"dragleave","dragleaveHandler"],[1,"drop","dropHandler"]]]]],["p-4152b371",[[1,"six-search-field",{"placeholder":[1],"debounce":[514],"disabled":[516],"value":[513],"clearable":[4]},null,{"value":["handleValueChange"]}]]],["p-df2b8f01",[[1,"six-tag",{"type":[513],"size":[513],"pill":[516],"clearable":[516]}]]],["p-ccc7e227",[[1,"six-tile",{"label":[1],"iconName":[1,"icon-name"],"closeable":[4],"elevated":[4],"disableTooltip":[4,"disable-tooltip"],"disabled":[516],"size":[513],"visible":[32],"hasIconSlot":[32],"hasLabelSlot":[32],"hide":[64],"show":[64]}]]],["p-e92df84a",[[1,"six-alert",{"open":[1540],"closable":[516],"type":[513],"duration":[2],"isVisible":[32],"show":[64],"hide":[64],"toast":[64]},null,{"open":["handleOpenChange"],"duration":["handleDurationChange"]}]]],["p-72d3f332",[[1,"six-breadcrumbs-item",{"href":[1],"target":[1],"size":[513],"readonly":[516,"read-only"]}]]],["p-83d5fa7c",[[1,"six-dialog",{"open":[1540],"label":[1],"noHeader":[4,"no-header"],"hasFooter":[32],"isVisible":[32],"show":[64],"hide":[64]},null,{"open":["handleOpenChange"]}]]],["p-56e172e0",[[1,"six-drawer",{"open":[1540],"label":[1],"placement":[1],"contained":[4],"noHeader":[4,"no-header"],"hasFooter":[32],"isVisible":[32],"show":[64],"hide":[64]},null,{"open":["handleOpenChange"]}]]],["p-984a1f6d",[[1,"six-header-menu-button",{"caret":[4],"disabled":[516],"loading":[516],"submit":[516],"reset":[516]}]]],["p-fd97bc8a",[[1,"six-rating",{"name":[1],"value":[1026],"disabled":[4],"required":[4],"label":[1],"errorText":[1,"error-text"],"errorTextCount":[2,"error-text-count"],"invalid":[516],"max":[2],"size":[513],"readonly":[4],"helpText":[1,"help-text"],"hasFocus":[32],"hasLabelSlot":[32],"hasErrorSlot":[32],"hoveredValue":[32]},null,{"value":["handleValueChange"]}]]],["p-fc2d893f",[[1,"six-root",{"padded":[4],"stage":[1],"version":[1]}]]],["p-2a245a37",[[1,"six-sidebar-item-group",{"name":[1],"icon":[1],"value":[513],"open":[1540],"summaryIcon":[1,"summary-icon"],"href":[513],"hasItems":[32],"summaryIconHasContent":[32]}]]],["p-a9a5485a",[[1,"six-tab",{"panel":[513],"active":[516],"closable":[4],"hoverContent":[1,"hover-content"],"disabled":[516],"setFocus":[64],"removeFocus":[64]}]]],["p-39109b96",[[1,"six-tab-group",{"placement":[1],"noScrollControls":[4,"no-scroll-controls"],"hasLeftControl":[32],"hasRightControl":[32],"show":[64]},null,{"noScrollControls":["handleNoScrollControlsChange"]}]]],["p-ed6625e6",[[1,"six-avatar",{"image":[1],"alt":[1],"initials":[1],"shape":[1],"hasError":[32]}]]],["p-4decf969",[[1,"six-breadcrumbs",{"separatorIcon":[513,"separator-icon"]}]]],["p-4d9785bd",[[1,"six-error-page",{"errorCode":[2,"error-code"],"language":[1],"customTitle":[1,"custom-title"],"customDescription":[16,"custom-description"],"customIcon":[1,"custom-icon"]}]]],["p-91c195d3",[[1,"six-file-list-item",{"identifier":[513],"name":[513],"date":[513],"size":[514],"nodownload":[516],"nodelete":[516]}]]],["p-8c2edb7f",[[1,"six-group-label",{"size":[513],"label":[1],"helpText":[1,"help-text"],"disabled":[516],"required":[4],"hasHelpTextSlot":[32],"hasLabelSlot":[32]},null,{"helpText":["handleLabelChange"],"label":["handleLabelChange"]}]]],["p-bea434d1",[[1,"six-range",{"name":[1],"value":[1026],"required":[4],"helpText":[1,"help-text"],"disabled":[4],"label":[1],"errorText":[1,"error-text"],"errorTextCount":[2,"error-text-count"],"invalid":[516],"min":[2],"max":[2],"step":[2],"tooltip":[1],"tooltipFormatter":[16,"tooltip-formatter"],"hasFocus":[32],"hasHelpTextSlot":[32],"hasErrorTextSlot":[32],"hasLabelSlot":[32],"hasTooltip":[32],"setFocus":[64],"removeFocus":[64]},null,{"label":["handleLabelChange"],"errorText":["handleLabelChange"],"helpText":["handleLabelChange"],"value":["handleValueChange"],"min":["handleValueChange"],"max":["handleValueChange"]}]]],["p-26219330",[[1,"six-sidebar-item",{"value":[513],"selected":[516],"disabled":[516],"icon":[1],"href":[513]}]]],["p-29aac7ea",[[1,"six-switch",{"name":[1],"value":[1],"disabled":[4],"required":[4],"checked":[1540],"label":[1],"errorText":[1,"error-text"],"errorTextCount":[2,"error-text-count"],"invalid":[516],"hasFocus":[32],"hasErrorTextSlot":[32],"setFocus":[64],"removeFocus":[64]},null,{"checked":["handleCheckedChange"],"errorText":["handleLabelChange"],"label":["handleLabelChange"]}]]],["p-e8e5445e",[[1,"six-textarea",{"size":[513],"name":[513],"value":[1537],"helpText":[1,"help-text"],"placeholder":[1],"rows":[2],"resize":[1],"disabled":[516],"readonly":[516],"minlength":[514],"maxlength":[514],"required":[4],"label":[1],"errorText":[1,"error-text"],"errorTextCount":[2,"error-text-count"],"invalid":[516],"autocapitalize":[1],"autocorrect":[1],"autocomplete":[1],"autofocus":[4],"spellcheck":[4],"inputmode":[1],"hasFocus":[32],"hasHelpTextSlot":[32],"hasLabelSlot":[32],"hasErrorTextSlot":[32],"setFocus":[64],"removeFocus":[64],"select":[64],"setSelectionRange":[64],"setRangeText":[64]},null,{"helpText":["handleLabelChange"],"errorText":["handleLabelChange"],"label":["handleLabelChange"],"rows":["handleRowsChange"],"value":["handleValueChange"]}]]],["p-b37d9771",[[1,"six-badge",{"type":[1],"pill":[4],"pulse":[4]}]]],["p-d81265f4",[[1,"six-card"]]],["p-05ca516d",[[1,"six-file-list"]]],["p-06c6b189",[[1,"six-footer"]]],["p-aaea0f73",[[1,"six-header",{"shiftContent":[4,"shift-content"],"openSearch":[4,"open-search"]},null,{"openSearch":["handleOpenSearchChange"]}]]],["p-664ddbab",[[1,"six-header-item",{"active":[516]}]]],["p-54490d28",[[1,"six-language-switcher",{"selected":[1537],"languages":[16]},null,{"languages":["handleChangesLanguages"]}]]],["p-29994dc3",[[1,"six-layout-grid",{"columns":[1026]},null,{"columns":["handleColumnsChange"]}]]],["p-194037e9",[[1,"six-logo",{"brand":[513]}]]],["p-22f924a1",[[1,"six-main-container",{"padded":[4]}]]],["p-70388108",[[1,"six-menu-divider"]]],["p-3d9e03b5",[[1,"six-menu-label"]]],["p-66d616e8",[[1,"six-progress-bar",{"percentage":[2],"indeterminate":[4]}]]],["p-a7f9c92d",[[1,"six-progress-ring",{"size":[2],"strokeWidth":[2,"stroke-width"],"percentage":[2]},null,{"percentage":["handlePercentageChange"]}]]],["p-6cd4fbd8",[[1,"six-radio",{"name":[1],"value":[513],"disabled":[4],"checked":[1540],"invalid":[516],"hasFocus":[32],"setFocus":[64],"removeFocus":[64]},null,{"checked":["handleCheckedChange"],"name":["handleNameChange"]}]]],["p-66b94978",[[1,"six-sidebar",{"position":[1],"open":[1540],"width":[1],"toggled":[4],"isVisible":[32],"toggle":[64],"show":[64],"hide":[64],"selectItemByIndex":[64],"selectItemByName":[64]},null,{"open":["handleOpenChange"]}]]],["p-e100aff2",[[1,"six-tab-panel",{"name":[1],"active":[516]}]]],["p-e56c5237",[[1,"six-timepicker",{"format":[1],"separator":[1],"value":[1025],"open":[1540],"inline":[516],"readonly":[4],"disabled":[4],"placement":[1],"size":[1],"required":[4],"placeholder":[1],"errorText":[1,"error-text"],"errorTextCount":[2,"error-text-count"],"label":[1],"invalid":[516],"name":[513],"clearable":[4],"iconPosition":[1,"icon-position"],"hoist":[4],"timeout":[2],"interval":[2],"defaultTime":[1,"default-time"],"debounce":[2],"isPopupContentUp":[32],"isDropDownContentUp":[32],"popupValue":[32],"setFocus":[64]},[[9,"resize","resizeHandler"],[9,"scroll","scrollHandler"]],{"value":["valueChanged"]}]]],["p-fe2ef0a4",[[1,"six-details",{"open":[1540],"summary":[1],"summaryIcon":[1,"summary-icon"],"summaryIconSize":[513,"summary-icon-size"],"disabled":[4],"inline":[4],"selectableEmpty":[4,"selectable-empty"],"hasContent":[4,"has-content"],"animateSummaryIcon":[32],"show":[64],"hide":[64]},null,{"open":["handleOpenChange"]}]]],["p-ab043a8c",[[1,"six-stage-indicator",{"stage":[1]}]]],["p-a6d7d618",[[1,"six-picto",{"size":[1]}]]],["p-22ad3353",[[1,"six-item-picker",{"value":[1544],"type":[1],"min":[1544],"max":[1544],"roundtrip":[516],"step":[514],"items":[16],"padded":[4],"paddingLength":[2,"padding-length"],"paddingChar":[1,"padding-char"],"paddingDirection":[1,"padding-direction"],"timeout":[2],"interval":[2],"debounce":[2],"_items":[32],"_itemIndexes":[32]},null,{"value":["handleValueChange"],"debounce":["debounceChanged"],"items":["handleSetChange"]}]]],["p-3c1285ad",[[1,"six-tooltip",{"content":[1],"placement":[1],"disabled":[4],"distance":[2],"open":[1540],"skidding":[2],"trigger":[1],"show":[64],"hide":[64]},null,{"open":["handleOpenChange"]}]]],["p-dc694314",[[1,"six-icon",{"size":[513],"filled":[4],"library":[513]}]]],["p-6dd3f54c",[[1,"six-input",{"type":[513],"size":[513],"name":[513],"value":[1537],"pill":[516],"helpText":[1,"help-text"],"placeholder":[1],"disabled":[516],"readonly":[516],"minlength":[514],"maxlength":[514],"min":[514],"max":[514],"step":[514],"pattern":[513],"dropdownSearch":[4,"dropdown-search"],"required":[4],"autocapitalize":[1],"autocorrect":[1],"autocomplete":[1],"autofocus":[4],"spellcheck":[4],"label":[1],"errorText":[1,"error-text"],"errorTextCount":[2,"error-text-count"],"invalid":[516],"clearable":[4],"togglePassword":[4,"toggle-password"],"inputmode":[1],"line":[4],"hasFocus":[32],"hasHelpTextSlot":[32],"hasLabelSlot":[32],"hasErrorSlot":[32],"isPasswordVisible":[32],"setFocus":[64],"removeFocus":[64],"select":[64],"setSelectionRange":[64],"getSelectionRange":[64],"setRangeText":[64]},null,{"helpText":["handleLabelChange"],"errorText":["handleLabelChange"],"label":["handleLabelChange"],"value":["handleValueChange"]}]]],["p-59568c0f",[[1,"six-dropdown",{"open":[1540],"placement":[1],"closeOnSelect":[4,"close-on-select"],"distance":[2],"skidding":[2],"hoist":[4],"containingElement":[16,"containing-element"],"filter":[4],"asyncFilter":[4,"async-filter"],"filterPlaceholder":[1,"filter-placeholder"],"autofocusFilter":[4,"autofocus-filter"],"filterDebounce":[1026,"filter-debounce"],"disableHideOnEnterAndSpace":[4,"disable-hide-on-enter-and-space"],"options":[1040],"virtualScroll":[4,"virtual-scroll"],"matchTriggerWidth":[4,"match-trigger-width"],"renderedOptions":[32],"show":[64],"hide":[64]},null,{"open":["handleOpenChange"],"distance":["handlePopoverOptionsChange"],"hoist":["handlePopoverOptionsChange"],"placement":["handlePopoverOptionsChange"],"skidding":["handlePopoverOptionsChange"],"options":["handleOptionsChange"],"virtualScroll":["handleOptionsChange"]}],[1,"six-menu",{"removeBoxShadow":[4,"remove-box-shadow"],"items":[16],"itemsShown":[2,"items-shown"],"virtualScroll":[4,"virtual-scroll"],"itemSize":[2,"item-size"],"scrollingDebounce":[2,"scrolling-debounce"],"disableKeyboardHandling":[4,"disable-keyboard-handling"],"scrollingIndex":[32],"sixMenuItemHeight":[32],"typeToSelect":[64]}]]],["p-014f44f4",[[1,"six-button",{"type":[513],"size":[513],"caret":[4],"disabled":[516],"loading":[516],"pill":[516],"circle":[516],"submit":[516],"reset":[516],"name":[1],"value":[1],"href":[1],"target":[1],"download":[1],"hasFocus":[32],"hasLabel":[32],"hasPrefix":[32],"hasSuffix":[32],"setFocus":[64],"removeFocus":[64]}],[1,"six-spinner",{"logo":[1],"six":[4]}]]],["p-9deca0d0",[[1,"six-menu-item",{"checkType":[1,"check-type"],"checked":[516],"value":[513],"disabled":[516],"hasFocus":[32],"active":[32],"setFocus":[64],"removeFocus":[64],"getTextLabel":[64]}],[1,"six-checkbox",{"name":[1],"value":[1],"disabled":[4],"required":[4],"label":[1],"errorText":[1,"error-text"],"errorTextCount":[2,"error-text-count"],"invalid":[516],"checked":[1540],"indeterminate":[1540],"hasFocus":[32],"hasLabelSlot":[32],"hasErrorSlot":[32],"setFocus":[64],"removeFocus":[64]},null,{"checked":["handleCheckedChange"],"indeterminate":["handleCheckedChange"],"errorText":["handleLabelChange"],"label":["handleLabelChange"]}]]],["p-da5f40ed",[[1,"six-icon-button",{"name":[513],"size":[513],"label":[513],"disabled":[516],"html":[513],"href":[1],"target":[1],"download":[1]}]]],["p-fcd3305f",[[1,"six-error"]]]]'),e)}));
1
+ import{p as e,b as a}from"./p-JoG9I7EO.js";export{s as setNonce}from"./p-JoG9I7EO.js";import{g as l}from"./p-DQuL1Twl.js";var t=()=>{const a=import.meta.url;const l={};if(a!==""){l.resourcesUrl=new URL(".",a).href}return e(l)};t().then((async e=>{await l();return a(JSON.parse('[["p-6607d03a",[[1,"six-select",{"multiple":[4],"selectAllButton":[4,"select-all-button"],"selectAllText":[1,"select-all-text"],"disabled":[4],"name":[1],"placeholder":[1],"filterPlaceholder":[1,"filter-placeholder"],"filterDebounce":[2,"filter-debounce"],"size":[1],"hoist":[4],"value":[1025],"pill":[4],"helpText":[1,"help-text"],"required":[4],"clearable":[4],"label":[1],"errorText":[1,"error-text"],"errorTextCount":[2,"error-text-count"],"invalid":[516],"line":[4],"filter":[4],"asyncFilter":[4,"async-filter"],"autocomplete":[4],"inputDebounce":[2,"input-debounce"],"options":[16],"virtualScroll":[4,"virtual-scroll"],"hasFocus":[32],"hasHelpTextSlot":[32],"hasLabelSlot":[32],"hasErrorTextSlot":[32],"isOpen":[32],"displayedValues":[32],"selectionContainerItems":[32],"setFocus":[64]},null,{"disabled":["handleDisabledChange"],"helpText":["handleLabelChange"],"errorText":["handleLabelChange"],"label":["handleLabelChange"],"multiple":["handleMultipleChange"],"value":["handleValueChange"]}]]],["p-12a2cc6b",[[1,"six-header-dropdown-item",{"filter":[4],"filterPlaceholder":[1,"filter-placeholder"],"active":[32]}]]],["p-38c51fd1",[[1,"six-datepicker",{"type":[1],"locale":[1],"open":[1540],"inline":[516],"readonly":[4],"disabled":[4],"allowedDates":[16,"allowed-dates"],"min":[16],"max":[16],"closeOnSelect":[4,"close-on-select"],"placement":[1],"size":[1],"required":[4],"defaultDate":[1,"default-date"],"placeholder":[1],"value":[1040],"label":[1],"errorText":[1,"error-text"],"errorTextCount":[2,"error-text-count"],"invalid":[516],"containingElement":[16,"containing-element"],"dateFormat":[1,"date-format"],"debounce":[2],"name":[513],"clearable":[4],"iconPosition":[1,"icon-position"],"hoist":[4],"pointerDate":[32],"selectionMode":[32],"isDropDownContentUp":[32],"setFocus":[64],"select":[64]},[[9,"resize","resizeHandler"],[9,"scroll","scrollHandler"]],{"debounce":["debounceChanged"],"value":["valueChanged"]}]]],["p-7f7413db",[[1,"six-date",{"language":[1],"readonly":[4],"disabled":[4],"allowedDates":[16,"allowed-dates"],"min":[1],"max":[1],"size":[1],"required":[4],"placeholder":[1],"value":[1025],"dateFormat":[1,"date-format"],"label":[1],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"errorTextCount":[2,"error-text-count"],"invalid":[516],"name":[513],"clearable":[4],"pointerDate":[32],"selectionMode":[32],"setFocus":[64]},null,{"value":["valueChanged"]}]]],["p-cc7202c3",[[6,"six-file-upload",{"compact":[4],"label":[1],"disabled":[4],"accept":[1],"multiple":[4],"maxFileSize":[2,"max-file-size"],"uploading":[516],"errorText":[1,"error-text"],"invalid":[516],"isOver":[32],"hasError":[32]},[[1,"dragenter","dragenterHandler"],[1,"dragover","dragoverHandler"],[1,"dragleave","dragleaveHandler"],[1,"drop","dropHandler"]]]]],["p-4152b371",[[1,"six-search-field",{"placeholder":[1],"debounce":[514],"disabled":[516],"value":[513],"clearable":[4]},null,{"value":["handleValueChange"]}]]],["p-df2b8f01",[[1,"six-tag",{"type":[513],"size":[513],"pill":[516],"clearable":[516]}]]],["p-ccc7e227",[[1,"six-tile",{"label":[1],"iconName":[1,"icon-name"],"closeable":[4],"elevated":[4],"disableTooltip":[4,"disable-tooltip"],"disabled":[516],"size":[513],"visible":[32],"hasIconSlot":[32],"hasLabelSlot":[32],"hide":[64],"show":[64]}]]],["p-e92df84a",[[1,"six-alert",{"open":[1540],"closable":[516],"type":[513],"duration":[2],"isVisible":[32],"show":[64],"hide":[64],"toast":[64]},null,{"open":["handleOpenChange"],"duration":["handleDurationChange"]}]]],["p-72d3f332",[[1,"six-breadcrumbs-item",{"href":[1],"target":[1],"size":[513],"readonly":[516,"read-only"]}]]],["p-83d5fa7c",[[1,"six-dialog",{"open":[1540],"label":[1],"noHeader":[4,"no-header"],"hasFooter":[32],"isVisible":[32],"show":[64],"hide":[64]},null,{"open":["handleOpenChange"]}]]],["p-56e172e0",[[1,"six-drawer",{"open":[1540],"label":[1],"placement":[1],"contained":[4],"noHeader":[4,"no-header"],"hasFooter":[32],"isVisible":[32],"show":[64],"hide":[64]},null,{"open":["handleOpenChange"]}]]],["p-984a1f6d",[[1,"six-header-menu-button",{"caret":[4],"disabled":[516],"loading":[516],"submit":[516],"reset":[516]}]]],["p-fd97bc8a",[[1,"six-rating",{"name":[1],"value":[1026],"disabled":[4],"required":[4],"label":[1],"errorText":[1,"error-text"],"errorTextCount":[2,"error-text-count"],"invalid":[516],"max":[2],"size":[513],"readonly":[4],"helpText":[1,"help-text"],"hasFocus":[32],"hasLabelSlot":[32],"hasErrorSlot":[32],"hoveredValue":[32]},null,{"value":["handleValueChange"]}]]],["p-fc2d893f",[[1,"six-root",{"padded":[4],"stage":[1],"version":[1]}]]],["p-2a245a37",[[1,"six-sidebar-item-group",{"name":[1],"icon":[1],"value":[513],"open":[1540],"summaryIcon":[1,"summary-icon"],"href":[513],"hasItems":[32],"summaryIconHasContent":[32]}]]],["p-a9a5485a",[[1,"six-tab",{"panel":[513],"active":[516],"closable":[4],"hoverContent":[1,"hover-content"],"disabled":[516],"setFocus":[64],"removeFocus":[64]}]]],["p-39109b96",[[1,"six-tab-group",{"placement":[1],"noScrollControls":[4,"no-scroll-controls"],"hasLeftControl":[32],"hasRightControl":[32],"show":[64]},null,{"noScrollControls":["handleNoScrollControlsChange"]}]]],["p-ed6625e6",[[1,"six-avatar",{"image":[1],"alt":[1],"initials":[1],"shape":[1],"hasError":[32]}]]],["p-4decf969",[[1,"six-breadcrumbs",{"separatorIcon":[513,"separator-icon"]}]]],["p-4d9785bd",[[1,"six-error-page",{"errorCode":[2,"error-code"],"language":[1],"customTitle":[1,"custom-title"],"customDescription":[16,"custom-description"],"customIcon":[1,"custom-icon"]}]]],["p-91c195d3",[[1,"six-file-list-item",{"identifier":[513],"name":[513],"date":[513],"size":[514],"nodownload":[516],"nodelete":[516]}]]],["p-8c2edb7f",[[1,"six-group-label",{"size":[513],"label":[1],"helpText":[1,"help-text"],"disabled":[516],"required":[4],"hasHelpTextSlot":[32],"hasLabelSlot":[32]},null,{"helpText":["handleLabelChange"],"label":["handleLabelChange"]}]]],["p-bea434d1",[[1,"six-range",{"name":[1],"value":[1026],"required":[4],"helpText":[1,"help-text"],"disabled":[4],"label":[1],"errorText":[1,"error-text"],"errorTextCount":[2,"error-text-count"],"invalid":[516],"min":[2],"max":[2],"step":[2],"tooltip":[1],"tooltipFormatter":[16,"tooltip-formatter"],"hasFocus":[32],"hasHelpTextSlot":[32],"hasErrorTextSlot":[32],"hasLabelSlot":[32],"hasTooltip":[32],"setFocus":[64],"removeFocus":[64]},null,{"label":["handleLabelChange"],"errorText":["handleLabelChange"],"helpText":["handleLabelChange"],"value":["handleValueChange"],"min":["handleValueChange"],"max":["handleValueChange"]}]]],["p-26219330",[[1,"six-sidebar-item",{"value":[513],"selected":[516],"disabled":[516],"icon":[1],"href":[513]}]]],["p-29aac7ea",[[1,"six-switch",{"name":[1],"value":[1],"disabled":[4],"required":[4],"checked":[1540],"label":[1],"errorText":[1,"error-text"],"errorTextCount":[2,"error-text-count"],"invalid":[516],"hasFocus":[32],"hasErrorTextSlot":[32],"setFocus":[64],"removeFocus":[64]},null,{"checked":["handleCheckedChange"],"errorText":["handleLabelChange"],"label":["handleLabelChange"]}]]],["p-e8e5445e",[[1,"six-textarea",{"size":[513],"name":[513],"value":[1537],"helpText":[1,"help-text"],"placeholder":[1],"rows":[2],"resize":[1],"disabled":[516],"readonly":[516],"minlength":[514],"maxlength":[514],"required":[4],"label":[1],"errorText":[1,"error-text"],"errorTextCount":[2,"error-text-count"],"invalid":[516],"autocapitalize":[1],"autocorrect":[1],"autocomplete":[1],"autofocus":[4],"spellcheck":[4],"inputmode":[1],"hasFocus":[32],"hasHelpTextSlot":[32],"hasLabelSlot":[32],"hasErrorTextSlot":[32],"setFocus":[64],"removeFocus":[64],"select":[64],"setSelectionRange":[64],"setRangeText":[64]},null,{"helpText":["handleLabelChange"],"errorText":["handleLabelChange"],"label":["handleLabelChange"],"rows":["handleRowsChange"],"value":["handleValueChange"]}]]],["p-b37d9771",[[1,"six-badge",{"type":[1],"pill":[4],"pulse":[4]}]]],["p-d81265f4",[[1,"six-card"]]],["p-05ca516d",[[1,"six-file-list"]]],["p-06c6b189",[[1,"six-footer"]]],["p-aaea0f73",[[1,"six-header",{"shiftContent":[4,"shift-content"],"openSearch":[4,"open-search"]},null,{"openSearch":["handleOpenSearchChange"]}]]],["p-664ddbab",[[1,"six-header-item",{"active":[516]}]]],["p-54490d28",[[1,"six-language-switcher",{"selected":[1537],"languages":[16]},null,{"languages":["handleChangesLanguages"]}]]],["p-29994dc3",[[1,"six-layout-grid",{"columns":[1026]},null,{"columns":["handleColumnsChange"]}]]],["p-194037e9",[[1,"six-logo",{"brand":[513]}]]],["p-22f924a1",[[1,"six-main-container",{"padded":[4]}]]],["p-70388108",[[1,"six-menu-divider"]]],["p-3d9e03b5",[[1,"six-menu-label"]]],["p-66d616e8",[[1,"six-progress-bar",{"percentage":[2],"indeterminate":[4]}]]],["p-a7f9c92d",[[1,"six-progress-ring",{"size":[2],"strokeWidth":[2,"stroke-width"],"percentage":[2]},null,{"percentage":["handlePercentageChange"]}]]],["p-6cd4fbd8",[[1,"six-radio",{"name":[1],"value":[513],"disabled":[4],"checked":[1540],"invalid":[516],"hasFocus":[32],"setFocus":[64],"removeFocus":[64]},null,{"checked":["handleCheckedChange"],"name":["handleNameChange"]}]]],["p-66b94978",[[1,"six-sidebar",{"position":[1],"open":[1540],"width":[1],"toggled":[4],"isVisible":[32],"toggle":[64],"show":[64],"hide":[64],"selectItemByIndex":[64],"selectItemByName":[64]},null,{"open":["handleOpenChange"]}]]],["p-e100aff2",[[1,"six-tab-panel",{"name":[1],"active":[516]}]]],["p-e56c5237",[[1,"six-timepicker",{"format":[1],"separator":[1],"value":[1025],"open":[1540],"inline":[516],"readonly":[4],"disabled":[4],"placement":[1],"size":[1],"required":[4],"placeholder":[1],"errorText":[1,"error-text"],"errorTextCount":[2,"error-text-count"],"label":[1],"invalid":[516],"name":[513],"clearable":[4],"iconPosition":[1,"icon-position"],"hoist":[4],"timeout":[2],"interval":[2],"defaultTime":[1,"default-time"],"debounce":[2],"isPopupContentUp":[32],"isDropDownContentUp":[32],"popupValue":[32],"setFocus":[64]},[[9,"resize","resizeHandler"],[9,"scroll","scrollHandler"]],{"value":["valueChanged"]}]]],["p-fe2ef0a4",[[1,"six-details",{"open":[1540],"summary":[1],"summaryIcon":[1,"summary-icon"],"summaryIconSize":[513,"summary-icon-size"],"disabled":[4],"inline":[4],"selectableEmpty":[4,"selectable-empty"],"hasContent":[4,"has-content"],"animateSummaryIcon":[32],"show":[64],"hide":[64]},null,{"open":["handleOpenChange"]}]]],["p-ab043a8c",[[1,"six-stage-indicator",{"stage":[1]}]]],["p-a6d7d618",[[1,"six-picto",{"size":[1]}]]],["p-22ad3353",[[1,"six-item-picker",{"value":[1544],"type":[1],"min":[1544],"max":[1544],"roundtrip":[516],"step":[514],"items":[16],"padded":[4],"paddingLength":[2,"padding-length"],"paddingChar":[1,"padding-char"],"paddingDirection":[1,"padding-direction"],"timeout":[2],"interval":[2],"debounce":[2],"_items":[32],"_itemIndexes":[32]},null,{"value":["handleValueChange"],"debounce":["debounceChanged"],"items":["handleSetChange"]}]]],["p-3c1285ad",[[1,"six-tooltip",{"content":[1],"placement":[1],"disabled":[4],"distance":[2],"open":[1540],"skidding":[2],"trigger":[1],"show":[64],"hide":[64]},null,{"open":["handleOpenChange"]}]]],["p-dc694314",[[1,"six-icon",{"size":[513],"filled":[4],"library":[513]}]]],["p-6dd3f54c",[[1,"six-input",{"type":[513],"size":[513],"name":[513],"value":[1537],"pill":[516],"helpText":[1,"help-text"],"placeholder":[1],"disabled":[516],"readonly":[516],"minlength":[514],"maxlength":[514],"min":[514],"max":[514],"step":[514],"pattern":[513],"dropdownSearch":[4,"dropdown-search"],"required":[4],"autocapitalize":[1],"autocorrect":[1],"autocomplete":[1],"autofocus":[4],"spellcheck":[4],"label":[1],"errorText":[1,"error-text"],"errorTextCount":[2,"error-text-count"],"invalid":[516],"clearable":[4],"togglePassword":[4,"toggle-password"],"inputmode":[1],"line":[4],"hasFocus":[32],"hasHelpTextSlot":[32],"hasLabelSlot":[32],"hasErrorSlot":[32],"isPasswordVisible":[32],"setFocus":[64],"removeFocus":[64],"select":[64],"setSelectionRange":[64],"getSelectionRange":[64],"setRangeText":[64]},null,{"helpText":["handleLabelChange"],"errorText":["handleLabelChange"],"label":["handleLabelChange"],"value":["handleValueChange"]}]]],["p-27baf557",[[1,"six-dropdown",{"open":[1540],"placement":[1],"closeOnSelect":[4,"close-on-select"],"distance":[2],"skidding":[2],"hoist":[4],"containingElement":[16,"containing-element"],"filter":[4],"noScroll":[4,"no-scroll"],"asyncFilter":[4,"async-filter"],"filterPlaceholder":[1,"filter-placeholder"],"autofocusFilter":[4,"autofocus-filter"],"filterDebounce":[1026,"filter-debounce"],"disableHideOnEnterAndSpace":[4,"disable-hide-on-enter-and-space"],"options":[1040],"virtualScroll":[4,"virtual-scroll"],"matchTriggerWidth":[4,"match-trigger-width"],"renderedOptions":[32],"show":[64],"hide":[64]},null,{"open":["handleOpenChange"],"distance":["handlePopoverOptionsChange"],"hoist":["handlePopoverOptionsChange"],"placement":["handlePopoverOptionsChange"],"skidding":["handlePopoverOptionsChange"],"options":["handleOptionsChange"],"virtualScroll":["handleOptionsChange"]}],[1,"six-menu",{"removeBoxShadow":[4,"remove-box-shadow"],"items":[16],"itemsShown":[2,"items-shown"],"virtualScroll":[4,"virtual-scroll"],"itemSize":[2,"item-size"],"scrollingDebounce":[2,"scrolling-debounce"],"disableKeyboardHandling":[4,"disable-keyboard-handling"],"scrollingIndex":[32],"sixMenuItemHeight":[32],"typeToSelect":[64]}]]],["p-68cb0eaa",[[1,"six-button",{"type":[513],"size":[513],"caret":[4],"disabled":[516],"loading":[516],"pill":[516],"circle":[516],"submit":[516],"reset":[516],"name":[1],"value":[1],"href":[1],"target":[1],"download":[1],"hasFocus":[32],"hasLabel":[32],"hasPrefix":[32],"hasSuffix":[32],"setFocus":[64],"removeFocus":[64]}],[1,"six-spinner",{"logo":[1],"six":[4]}]]],["p-9deca0d0",[[1,"six-menu-item",{"checkType":[1,"check-type"],"checked":[516],"value":[513],"disabled":[516],"hasFocus":[32],"active":[32],"setFocus":[64],"removeFocus":[64],"getTextLabel":[64]}],[1,"six-checkbox",{"name":[1],"value":[1],"disabled":[4],"required":[4],"label":[1],"errorText":[1,"error-text"],"errorTextCount":[2,"error-text-count"],"invalid":[516],"checked":[1540],"indeterminate":[1540],"hasFocus":[32],"hasLabelSlot":[32],"hasErrorSlot":[32],"setFocus":[64],"removeFocus":[64]},null,{"checked":["handleCheckedChange"],"indeterminate":["handleCheckedChange"],"errorText":["handleLabelChange"],"label":["handleLabelChange"]}]]],["p-da5f40ed",[[1,"six-icon-button",{"name":[513],"size":[513],"label":[513],"disabled":[516],"html":[513],"href":[1],"target":[1],"download":[1]}]]],["p-fcd3305f",[[1,"six-error"]]]]'),e)}));
2
2
  //# sourceMappingURL=ui-library.esm.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@six-group/ui-library",
3
- "version": "5.1.1",
3
+ "version": "5.2.0-rc.2",
4
4
  "description": "Web components in alignment with the SIX corporate styleguide",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.cjs.js",
@@ -15,6 +15,10 @@
15
15
  "dist/",
16
16
  "loader/"
17
17
  ],
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/six-group/six-webcomponents.git"
21
+ },
18
22
  "scripts": {
19
23
  "build": "npm run clean && stencil build --docs",
20
24
  "watch": "npm run clean && stencil build --watch",
@@ -26,12 +30,19 @@
26
30
  "test:allInclCoverage": "stencil test --spec --e2e --coverage",
27
31
  "test:debug": "stencil test --spec --e2e --devtools",
28
32
  "test.watch": "stencil test --spec --e2e --watchAll",
33
+ "test:e2e": "playwright test",
34
+ "test:e2eDebug": "playwright test --debug --headed",
35
+ "test:e2eUi": "playwright test --ui",
29
36
  "generate": "stencil generate",
30
37
  "clean": "rimraf dist loader www docs",
31
38
  "lint": " eslint src/**/*{.ts,.tsx}",
32
39
  "lint:fix": "eslint --fix src/**/*{.ts,.tsx}",
33
40
  "codeclean": "npm run lint:fix && npm run prettier:fix"
34
41
  },
42
+ "publishConfig": {
43
+ "access": "public",
44
+ "provenance": true
45
+ },
35
46
  "dependencies": {
36
47
  "@stencil/core": "4.32.0",
37
48
  "@types/resize-observer-browser": "^0.1.5"
@@ -40,6 +51,8 @@
40
51
  "date-fns": ">=3.0.0"
41
52
  },
42
53
  "devDependencies": {
54
+ "@playwright/test": "^1.56.1",
55
+ "@stencil/playwright": "^0.2.1",
43
56
  "@fontsource/material-icons": "^5.1.1",
44
57
  "@fontsource/material-icons-outlined": "^5.1.1",
45
58
  "@fontsource-variable/material-symbols-outlined": "^5.2.22",
@@ -55,6 +68,7 @@
55
68
  "@typescript-eslint/eslint-plugin": "^7.0.0",
56
69
  "@typescript-eslint/parser": "^7.0.0",
57
70
  "cross-env": "^7.0.3",
71
+ "puppeteer": "^20.9.0",
58
72
  "replace-in-file": "^6.3.5",
59
73
  "rimraf": "^3.0.2"
60
74
  },
@@ -1 +0,0 @@
1
- {"file":"p-BB2rei7y.js","mappings":";;AAAA,MAAM,aAAa,GAAG,8mEAA8mE;;MCgBvnE,UAAU,iBAAAA,kBAAA,CAAA,MAAA,UAAA,SAAAC,CAAA,CAAA;;;;;;AAUrB;;AAEG;AACK,IAAA,aAAa,CAAC,OAAmB,EAAA;AACvC,QAAA,QACE,YAAM,KAAK,EAAC,aAAa,EAAW,WAAA,EAAA,MAAM,eAAW,QAAQ,EAAA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,EAAA,MAAM,EAAW,WAAA,EAAA,QAAQ,GAAG;;IAGjF,MAAM,GAAA;;AAEJ,QAAA,IAAI,IAAI,CAAC,GAAG,EAAE;AACZ,YAAA,OAAO,CAAC,IAAI,CAAC,2DAA2D,CAAC;AACzE,YAAA,OAAO,IAAI,CAAC,aAAa,EAAE;;AAG7B,QAAA,QAAQ,IAAI,CAAC,IAAI;AACf,YAAA,KAAK,KAAK;AACR,gBAAA,OAAO,IAAI,CAAC,aAAa,EAAE;AAC7B,YAAA,KAAK,KAAK;AACR,gBAAA,OAAO,IAAI,CAAC,aAAa,EAAE;AAC7B,YAAA;AACE,gBAAA,OAAO,IAAI,CAAC,mBAAmB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/six-spinner/six-spinner.scss?tag=six-spinner&encapsulation=shadow","src/components/six-spinner/six-spinner.tsx"],"sourcesContent":["@import 'src/global/component';\n\n/**\n * @prop --track-color: The color of the spinner's track.\n * @prop --indicator-color: The color of the spinner's indicator.\n * @prop --stroke-width: The width of the indicator.\n */\n:host {\n --track-color: var(--six-progress-track-color);\n --indicator-color: var(--six-progress-indicator-color);\n --stroke-width: 2px;\n\n display: inline-flex;\n}\n\n.spinner {\n display: inline-block;\n width: 1em;\n height: 1em;\n border-radius: 50%;\n border: solid var(--stroke-width) var(--track-color);\n border-top-color: var(--indicator-color);\n border-right-color: var(--indicator-color);\n animation: 1s linear infinite spin;\n}\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n$color-six-spinner-background: rgba(255, 255, 255, 0.7);\n\n.six-spinner {\n width: auto;\n height: auto;\n position: relative;\n\n .six-spinner__container {\n margin: 0;\n transform: translateX(0);\n }\n\n .six-spinner__container svg {\n transform: translateX(0);\n }\n\n &__container {\n position: relative;\n margin: 0 auto;\n top: calc(50% - 20px);\n z-index: 1;\n }\n\n &__container,\n &__container svg {\n width: 40px;\n height: 40px;\n display: block;\n transform: translateX(40px);\n }\n\n path {\n stroke-dashoffset: 70px;\n stroke-dasharray: 70, 444;\n -webkit-animation: six-spinner 2s cubic-bezier(0.56, 0.39, 0.51, 0.96) infinite;\n animation: six-spinner 2s cubic-bezier(0.56, 0.39, 0.51, 0.96) infinite;\n }\n\n polygon {\n stroke-dasharray: 310;\n stroke-dashoffset: 310;\n animation: big-polygon-draw 2s ease-in-out infinite;\n -webkit-animation: big-polygon-draw 2s ease-in-out infinite;\n }\n\n polygon:nth-child(2),\n polygon:nth-child(3) {\n stroke-dasharray: 110;\n stroke-dashoffset: 110;\n animation: small-polygon-draw 2s ease-in-out infinite;\n -webkit-animation: small-polygon-draw 2s ease-in-out infinite;\n }\n\n @keyframes big-polygon-draw {\n 0%,\n 100% {\n stroke-dashoffset: 310;\n }\n 50% {\n stroke-dashoffset: 140;\n }\n }\n\n @-webkit-keyframes big-polygon-draw {\n 0%,\n 100% {\n stroke-dashoffset: 310;\n }\n 50% {\n stroke-dashoffset: 140;\n }\n }\n\n @keyframes small-polygon-draw {\n 0%,\n 100% {\n stroke-dashoffset: 110;\n }\n 50% {\n stroke-dashoffset: 50;\n }\n }\n\n @-webkit-keyframes small-polygon-draw {\n 0%,\n 100% {\n stroke-dashoffset: 110;\n }\n 50% {\n stroke-dashoffset: 50;\n }\n }\n\n @-webkit-keyframes six-spinner {\n to {\n stroke-dashoffset: -444;\n }\n }\n\n @keyframes six-spinner {\n to {\n stroke-dashoffset: -444;\n }\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\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 * @part base - The component's base wrapper.\n * @part svg - The spinner icon.\n */\n@Component({\n tag: 'six-spinner',\n styleUrl: 'six-spinner.scss',\n shadow: true,\n})\nexport class SixSpinner {\n /** Indicates if the spinner is shown as animated SIX or BME logo or a simple spinner. */\n @Prop() logo?: 'six' | 'bme';\n /**\n * **@deprecated** Use `logo=\"six\"` instead.\n *\n * If set to true, the spinner displays the SIX logo.\n */\n @Prop() six?: boolean;\n\n /**\n * Renders a container with a given SVG content.\n */\n private renderWrapper(content: SVGElement) {\n return (\n <span class=\"six-spinner\" aria-busy=\"true\" aria-live=\"polite\">\n <div class=\"six-spinner__container\">{content}</div>\n </span>\n );\n }\n\n /**\n * Renders the SIX logo spinner.\n */\n private renderSIXLogo() {\n const sixLogo = (\n <svg viewBox=\"0 0 40 40\" part=\"svg\">\n <path\n fill=\"none\"\n stroke=\"#de3919\"\n stroke-width=\"5\"\n stroke-linecap=\"round\"\n d=\"M 35 5 V 35 H 5 T 5 5 H 35 V 35 H 5 V 5 H 35 V 35 H -34 V 30 H 7 A 9 8 0 0 0 14 27 L 27 14 A 8 6 0 0 1 33 12 H 42\"\n ></path>\n </svg>\n );\n return this.renderWrapper(sixLogo);\n }\n\n /**\n * Renders the BME logo spinner.\n */\n private renderBMELogo() {\n const bmeLogo = (\n <svg viewBox=\"0 0 45 55\" part=\"svg\">\n <polygon\n fill=\"none\"\n stroke=\"black\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n points=\"4.42 51.96 17.02 31.473 2 31.473 2 22.486 17.02 22.486 4.42 2 15.404 2 30.289 26.98 14.763 51.96 4.42 51.96\"\n />\n <polygon\n fill=\"none\"\n stroke=\"black\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n points=\"42 51.96 31.655 51.96 24.598 40.498 29.831 32.073 42 51.96\"\n />\n <polygon\n fill=\"none\"\n stroke=\"black\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n points=\"24.518 12.719 31.014 2 42 2 29.831 21.637 24.518 12.719\"\n />\n </svg>\n );\n return this.renderWrapper(bmeLogo);\n }\n\n /**\n * Renders a simple spinner.\n */\n private renderSimpleSpinner() {\n return <span part=\"base\" class=\"spinner\" aria-busy=\"true\" aria-live=\"polite\" />;\n }\n\n render() {\n // Check the deprecated `six` property first\n if (this.six) {\n console.warn('The \"six\" prop is deprecated. Use \"logo=\\'six\\'\" instead.');\n return this.renderSIXLogo();\n }\n\n switch (this.logo) {\n case 'six':\n return this.renderSIXLogo();\n case 'bme':\n return this.renderBMELogo();\n default:\n return this.renderSimpleSpinner();\n }\n }\n}\n"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"p-C6ozoFuw.js","mappings":";;;;;;;;;;;AAAM,SAAU,UAAU,CAAC,EAAe,EAAA;AACxC,IAAA,MAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ;AAC5B,IAAA,OAAO,QAAQ,GAAG,EAAE;AACtB;AAEM,SAAU,yBAAyB,CAAC,EAAe,EAAA;;AAEvD,IAAA,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE;AAClB,QAAA,OAAO,EAAE;;;AAIX,IAAA,IAAI,EAAE,CAAC,UAAU,IAAI,IAAI,EAAE;QACzB,MAAM,mBAAmB,GAAG,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAgB,CAAC,CAAgB;AAChH,QAAA,IAAI,mBAAmB,IAAI,IAAI,EAAE;AAC/B,YAAA,OAAO,mBAAmB;;;;AAK9B,IAAA,IAAI,EAAE,CAAC,QAAQ,IAAI,IAAI,EAAE;QACvB,OAAO,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,yBAAyB,CAAC,CAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;;AAGvF,IAAA,OAAO,SAAS;AAClB;;ACzBA,MAAM,cAAc,GAAG,2pDAA2pD;;ACuBlrD,IAAI,EAAE,GAAG,CAAC;MAsBG,WAAW,iBAAAA,kBAAA,CAAA,MAAA,WAAA,SAAAC,CAAA,CAAA;AALxB,IAAA,WAAA,GAAA;;;;;;;;;;;AAMU,QAAA,IAAA,CAAA,WAAW,GAAG,YAAY,EAAE,EAAE,EAAE;AAChC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IAC7B,OAAO,CAAA,EAAE,KAAF,IAAA,IAAA,EAAE,KAAF,MAAA,GAAA,MAAA,GAAA,EAAE,CAAE,OAAO,CAAC,WAAW,EAAE,MAAK,UAAU;AACjD;AACA,SAAS,aAAa,CAAC,EAAY,EAAA;IACjC,OAAO,CAAA,EAAE,KAAF,IAAA,IAAA,EAAE,KAAF,MAAA,GAAA,MAAA,GAAA,EAAE,CAAE,OAAO,CAAC,WAAW,EAAE,MAAK,eAAe;AACtD;AACA,SAAS,oBAAoB,CAAC,EAAY,EAAA;;IACxC,OAAO,CAAA,CAAA,EAAA,GAAA,EAAE,aAAF,EAAE,KAAA,MAAA,GAAA,MAAA,GAAF,EAAE,CAAE,YAAY,CAAC,OAAO,CAAC,0CAAE,QAAQ,CAAC,qBAAqB,CAAC,KAAI,KAAK;AAC5E;AACA,eAAe,kBAAkB,CAAC,QAAgC,EAAE,mBAA2B,EAAA;IAC7F,QACE,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;AAC1D,QAAA,CAAC,MAAM,QAAQ,CAAC,YAAY,EAAE,EAAE,WAAW,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/utils/tabbable.ts","src/components/six-dropdown/six-dropdown.scss?tag=six-dropdown&encapsulation=shadow","src/components/six-dropdown/six-dropdown.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:\n var(--six-transition-fast) opacity,\n 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 popoverHelper?: 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.popoverHelper == null) return;\n\n this.popoverHelper.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.popoverHelper = 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.popoverHelper?.destroy();\n this.popoverHelper = 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.popoverHelper == 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.popoverHelper.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.popoverHelper != null) {\n this.popoverHelper.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.popoverHelper == 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.popoverHelper.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 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"],"version":3}
@@ -1 +0,0 @@
1
- {"version":3,"names":["sixFileUploadCss","SixFileUpload","constructor","hostRef","this","isOver","hasError","compact","disabled","multiple","uploading","errorText","invalid","handleSlotChange","validType","trim","length","hasSlot","host","handleFiles","files","failure","emit","reason","code","file","acceptedTypesList","accept","replace","split","indexOf","type","maxFileSize","size","success","onChange","_a","fileInput","value","dragenterHandler","dragoverHandler","dragleaveHandler","dropHandler","componentWillLoad","componentDidLoad","forEach","eventName","addEventListener","preventDefaults","document","body","shadowRoot","disconnectedCallback","removeEventListener","e","preventDefault","stopPropagation","renderLabel","label","h","class","render","Container","errorMessages","Array","isArray","filter","text","key","slot","name","ref","el","map"],"sources":["src/components/six-file-upload/six-file-upload.scss?tag=six-file-upload&encapsulation=scoped","src/components/six-file-upload/six-file-upload.tsx"],"sourcesContent":["@import 'src/global/component';\n\n$over-color: var(--six-color-action-light-to-be-defined);\n$disabled-color: var(--six-color-inactive);\n$transition: 0.3s;\n$margin: 1rem;\n\n:host {\n position: static;\n display: block;\n}\n\n.six-file-upload {\n six-card {\n box-shadow: none;\n padding: 0;\n width: 100%;\n }\n\n &__label {\n &--highlighted {\n color: var(--six-color-action-600);\n }\n }\n\n &__container {\n &--full {\n border: dashed 1px var(--six-color-web-rock-500);\n }\n }\n\n &__drop-zone {\n padding: 2rem 0;\n display: flex;\n justify-content: center;\n width: 100%;\n transition: background-color $transition;\n\n &__spinner-container {\n display: flex;\n align-items: center;\n\n six-spinner {\n margin-right: var(--six-spacing-x-small);\n }\n }\n\n &--compact {\n padding: 0;\n }\n }\n\n &__input {\n cursor: pointer;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n user-select: none;\n height: 100%;\n opacity: 0;\n outline: none;\n }\n\n &--disabled &__drop-zone {\n background-color: $disabled-color;\n cursor: not-allowed;\n }\n\n &:not(.six-file-upload--disabled) &__drop-zone:hover,\n &__drop-zone--hover {\n background-color: $over-color;\n\n &.six-file-upload__drop-zone--compact {\n background-color: inherit;\n }\n }\n\n &--disabled &__input {\n cursor: not-allowed;\n }\n\n &__error-text {\n font-size: var(--six-input-help-text-font-size-medium);\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Listen, Prop, State } from '@stencil/core';\nimport { hasSlot } from '../../utils/slot';\n\nexport interface SixFileUploadSuccessPayload {\n files: FileList;\n}\n\nexport interface SixFileUploadFailurePayload {\n reason: string;\n code:\n | 'ONLY_ONE_FILE_ALLOWED'\n | 'ONE_OR_MORE_FILES_HAVE_INVALID_MIME_TYPE'\n | 'INVALID_MIME_TYPE'\n | 'ONE_OR_MULTIPLE_FILES_TOO_BIG'\n | 'FILE_TOO_BIG';\n}\n\n/**\n * @since 2.0.0\n * @status experimental\n *\n * @slot error-text - Error text that is shown when the status is set to invalid. Alternatively, you can use the error-text prop.\n */\n@Component({\n tag: 'six-file-upload',\n styleUrl: 'six-file-upload.scss',\n scoped: true,\n shadow: false,\n})\nexport class SixFileUpload {\n @Element() readonly host!: HTMLSixFileUploadElement;\n\n private fileInput?: HTMLInputElement;\n\n @State() isOver = false;\n @State() hasError = false;\n\n /** Set to true if file control should be small. */\n @Prop() readonly compact: boolean = false;\n\n /** Label of the drop area. */\n @Prop() readonly label?: string;\n\n /** Set when button is disabled. */\n @Prop() readonly disabled = false;\n\n /** Accepted MIME-Types. */\n @Prop() readonly accept?: string;\n\n /** More than one file allowed. */\n @Prop() readonly multiple = false;\n\n /** Allowed max file size in bytes. */\n @Prop() readonly maxFileSize?: number;\n\n /** Set to true to draw the control in a loading state. */\n @Prop({ reflect: true }) uploading = false;\n\n /** The error message shown, if `invalid` is set to true. */\n @Prop() errorText: string | string[] = '';\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 /** Triggers when a file is added. */\n @Event({ eventName: 'six-file-upload-success' }) success!: EventEmitter<SixFileUploadSuccessPayload>;\n\n /** Triggers when an uploaded file doesn't match MIME type or max file size. */\n @Event({ eventName: 'six-file-upload-failure' }) failure!: EventEmitter<SixFileUploadFailurePayload>;\n\n @Listen('dragenter', { capture: false })\n dragenterHandler() {\n if (!this.disabled) {\n this.isOver = true;\n }\n }\n\n @Listen('dragover', { capture: false })\n dragoverHandler() {\n if (!this.disabled) {\n this.isOver = true;\n }\n }\n\n @Listen('dragleave', { capture: false })\n dragleaveHandler() {\n if (!this.disabled) {\n this.isOver = false;\n }\n }\n\n @Listen('drop', { capture: false })\n dropHandler() {\n if (!this.disabled) {\n this.isOver = false;\n }\n }\n\n private handleSlotChange = () => {\n let validType = false;\n\n if (\n this.errorText != null &&\n ((typeof this.errorText == 'string' && this.errorText.trim().length > 0) ||\n (typeof this.errorText == 'object' && this.errorText.length > 0))\n ) {\n validType = true;\n }\n\n this.hasError = validType || hasSlot(this.host, 'error-text');\n };\n\n private handleFiles = (files: FileList) => {\n if (this.disabled || files.length === 0 || this.uploading) {\n return;\n }\n\n if (!this.multiple && files.length > 1) {\n return this.failure.emit({\n reason: 'Only one file is allowed.',\n code: 'ONLY_ONE_FILE_ALLOWED',\n });\n }\n\n for (const file of files) {\n if (file == null) {\n return;\n }\n\n let acceptedTypesList: string[] = [];\n if (this.accept != null) {\n acceptedTypesList = this.accept.replace(/\\s/g, '').split(',');\n }\n\n if (acceptedTypesList.length > 0 && acceptedTypesList.indexOf(file.type) === -1) {\n const reason = files.length > 1 ? 'One or more files have invalid MIME type.' : 'File has invalid MIME type.';\n const code = files.length > 1 ? 'ONE_OR_MORE_FILES_HAVE_INVALID_MIME_TYPE' : 'INVALID_MIME_TYPE';\n return this.failure.emit({ reason, code });\n }\n\n if (this.maxFileSize != null && file.size > this.maxFileSize) {\n const reason = files.length > 1 ? 'One or more files are too big' : 'File is too big.';\n const code = files.length > 1 ? 'ONE_OR_MULTIPLE_FILES_TOO_BIG' : 'FILE_TOO_BIG';\n return this.failure.emit({ reason, code });\n }\n }\n\n this.success.emit({ files } as SixFileUploadSuccessPayload);\n };\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n componentDidLoad() {\n ['dragenter', 'dragover', 'dragleave', 'drop'].forEach((eventName) => {\n this.host.addEventListener(eventName, this.preventDefaults, false);\n document.body.addEventListener(eventName, this.preventDefaults, false);\n });\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n }\n\n disconnectedCallback() {\n ['dragenter', 'dragover', 'dragleave', 'drop'].forEach((eventName) => {\n this.host.removeEventListener(eventName, this.preventDefaults, false);\n document.body.removeEventListener(eventName, this.preventDefaults, false);\n });\n this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n }\n\n private preventDefaults(e: Event) {\n e.preventDefault();\n e.stopPropagation();\n }\n\n private onChange = () => {\n if (this.fileInput?.files != null) {\n const files = this.fileInput.files;\n this.handleFiles(files);\n this.fileInput.value = '';\n }\n };\n\n private renderLabel() {\n return (\n this.label ??\n (this.compact ? (\n 'Upload'\n ) : (\n <span>\n Drop files to upload, or <span class=\"six-file-upload__label--highlighted\">browse</span>\n </span>\n ))\n );\n }\n\n render() {\n const Container = this.compact ? 'six-button' : 'six-card';\n\n const errorMessages = (Array.isArray(this.errorText) ? this.errorText : [this.errorText]).filter(\n (text) => text != null && text.trim() !== ''\n );\n\n return (\n <div\n class={{\n 'six-file-upload': true,\n 'six-file-upload--disabled': this.disabled || this.uploading,\n }}\n >\n <Container\n disabled={this.disabled || this.uploading}\n aria-invalid={this.invalid ? 'true' : 'false'}\n class={{\n 'six-file-upload__container--compact': this.compact,\n 'six-file-upload__container--full': !this.compact,\n }}\n >\n {this.compact && !this.uploading && <six-icon slot=\"prefix\">arrow_circle_up</six-icon>}\n <div\n class={{\n 'six-file-upload__drop-zone': true,\n 'six-file-upload__drop-zone--hover': this.isOver,\n 'six-file-upload__drop-zone--compact': this.compact,\n }}\n >\n {this.uploading ? (\n <span class=\"six-file-upload__drop-zone__spinner-container\">\n <six-spinner /> Uploading...\n </span>\n ) : (\n <div>\n <span>{this.renderLabel()}</span>\n <input\n class=\"six-file-upload__input\"\n type=\"file\"\n name=\"resume\"\n disabled={this.disabled}\n accept={this.accept}\n multiple={this.multiple}\n onChange={this.onChange}\n ref={(el) => (this.fileInput = el)}\n />\n </div>\n )}\n </div>\n </Container>\n <div aria-hidden={this.invalid ? 'false' : 'true'}>\n <slot name=\"error-text\">\n {errorMessages.map((text) => (\n <six-error>\n <div class=\"six-file-upload__error-text\">{text}</div>\n </six-error>\n ))}\n </slot>\n </div>\n </div>\n );\n }\n}\n"],"mappings":"6FAAA,MAAMA,EAAmB,uoE,MC6BZC,EAAa,MAN1B,WAAAC,CAAAC,G,wGAWWC,KAAMC,OAAG,MACTD,KAAQE,SAAG,MAGHF,KAAOG,QAAY,MAMnBH,KAAQI,SAAG,MAMXJ,KAAQK,SAAG,MAMHL,KAASM,UAAG,MAG7BN,KAASO,UAAsB,GAGdP,KAAOQ,QAAG,MAoC3BR,KAAgBS,iBAAG,KACzB,IAAIC,EAAY,MAEhB,GACEV,KAAKO,WAAa,cACTP,KAAKO,WAAa,UAAYP,KAAKO,UAAUI,OAAOC,OAAS,UAC5DZ,KAAKO,WAAa,UAAYP,KAAKO,UAAUK,OAAS,GAChE,CACAF,EAAY,I,CAGdV,KAAKE,SAAWQ,GAAaG,EAAQb,KAAKc,KAAM,aAAa,EAGvDd,KAAAe,YAAeC,IACrB,GAAIhB,KAAKI,UAAYY,EAAMJ,SAAW,GAAKZ,KAAKM,UAAW,CACzD,M,CAGF,IAAKN,KAAKK,UAAYW,EAAMJ,OAAS,EAAG,CACtC,OAAOZ,KAAKiB,QAAQC,KAAK,CACvBC,OAAQ,4BACRC,KAAM,yB,CAIV,IAAK,MAAMC,KAAQL,EAAO,CACxB,GAAIK,GAAQ,KAAM,CAChB,M,CAGF,IAAIC,EAA8B,GAClC,GAAItB,KAAKuB,QAAU,KAAM,CACvBD,EAAoBtB,KAAKuB,OAAOC,QAAQ,MAAO,IAAIC,MAAM,I,CAG3D,GAAIH,EAAkBV,OAAS,GAAKU,EAAkBI,QAAQL,EAAKM,SAAU,EAAI,CAC/E,MAAMR,EAASH,EAAMJ,OAAS,EAAI,4CAA8C,8BAChF,MAAMQ,EAAOJ,EAAMJ,OAAS,EAAI,2CAA6C,oBAC7E,OAAOZ,KAAKiB,QAAQC,KAAK,CAAEC,SA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AYmC,OAMzCb,EAAkB,OAAAS,IAAA,yDAAAhE,KAAKQ,QAAU,QAAU,QACzC+C,EAAA,QAAAS,IAAA,2CAAME,KAAK,cACRP,EAAcU,KAAKN,GAClBR,EAAA,iBACEA,EAAA,OAAKC,MAAM,+BAA+BO,Q","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{r as t,c as i,h as s,g as e}from"./p-JoG9I7EO.js";import{P as n}from"./p-kHci8ddv.js";import{E as o}from"./p-C4h4qpGl.js";import{a as r,D as h}from"./p-CKhg9ibv.js";import{a as l}from"./p-j3oIB5oT.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}.sr-only{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}: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)}";let c=0;const f=class{constructor(e){t(this,e);this.sixShow=i(this,"six-dropdown-show");this.sixAfterShow=i(this,"six-dropdown-after-show");this.sixHide=i(this,"six-dropdown-hide");this.sixAfterHide=i(this,"six-dropdown-after-hide");this.sixAutoFilter=i(this,"six-dropdown-auto-filter-fired");this.sixAsyncFilterFired=i(this,"six-async-filter-fired");this.sixScroll=i(this,"six-dropdown-scroll");this.componentId=`dropdown-${++c}`;this.isVisible=false;this.resizeObserver=new ResizeObserver(r((()=>this.updatePanelPosition()),100));this.open=false;this.placement="bottom-start";this.closeOnSelect=true;this.distance=4;this.skidding=0;this.hoist=false;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.eventListeners=new o;this.renderedOptions=[];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(m).at(0);const r=(i=this.panelSlot)===null||i===void 0?void 0:i.assignedElements({flatten:true}).filter(p).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=>v(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&&v(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&&p(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)})}}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.popoverHelper==null)return;this.popoverHelper.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.popoverHelper=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.popoverHelper)===null||t===void 0?void 0:t.destroy();this.popoverHelper=undefined}async show(){if(this.isVisible||this.popoverHelper==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.popoverHelper.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.popoverHelper!=null){this.popoverHelper.reposition()}}async hide(){this.resizeObserver.disconnect();if(!this.isVisible||this.panel==null||this.popoverHelper==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.popoverHelper.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(p).at(0)}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:"46305375a199fb17ae66ca3b6678634844d0b8a2",part:"base",id:this.componentId,class:{dropdown:true,"dropdown--open":this.open}},s("span",{key:"2a53d2cf2b75607614f39675cabfe1362b297e70",part:"trigger",class:"dropdown__trigger",ref:t=>this.trigger=t,onClick:this.handleTriggerClick,onKeyDown:this.handleTriggerKeyDown,onKeyUp:this.handleTriggerKeyUp},s("slot",{key:"d8abcd455c768fded48df4c18b8191e365db4ab1",name:"trigger",ref:t=>this.triggerSlot=t,onSlotchange:this.handleTriggerSlotChange})),s("div",{key:"fd0e0352800daebdc9843442901cad9769d3199a",ref:t=>this.positioner=t,class:{dropdown__positioner:true,dropdown__positioner__filtered:(this.filter||this.asyncFilter)&&!this.hoist}},s("div",{key:"2d72ca0ba1a5cbb480727e325048f7a171fb7af8",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",{key:"a22263fb924be51081598579391774c82a09852f",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",{key:"7a8fc9e25e7e209b5b0aa05af5dcefca87e3b9d5",class:"filter__icon",slot:"suffix",size:"small"},"search")),s("div",{key:"bedcab39d656be8ce064852ef9344b4fbbf60b17",class:{dropdown__panel__scroll:true,"dropdown__panel__scroll--virtual":this.virtualScroll},onScroll:this.handleDropdownScroll,ref:t=>this.scrollPanel=t},s("slot",{key:"21acba56de1fba98afdfda60e8b09816a70ac057",ref:t=>this.panelSlot=t}),this.options.length>0&&s("six-menu",{key:"d7d429d062bf111ffdaf667ada0efe640136871a",part:"menu",items:this.renderedOptions,virtualScroll:this.virtualScroll})),s("slot",{key:"e23be3aa659ed7fa4a513d82c982733b58a6e9db",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 p(t){return(t===null||t===void 0?void 0:t.tagName.toLowerCase())==="six-menu"}function v(t){return(t===null||t===void 0?void 0:t.tagName.toLowerCase())==="six-menu-item"}function m(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)}f.style=u;const w=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}.sr-only{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}: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 x=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 g=t=>(t===null||t===void 0?void 0:t.tagName.toLowerCase())==="six-menu-item";const y=({value:t,label:i})=>s("six-menu-item",{key:t,value:t},i);const _=5;const k=48;const C=64;const I=class{constructor(s){t(this,s);this.sixMenuItemSelected=i(this,"six-menu-item-selected");this.eventListeners=new o;this.typeToSelectString="";this.removeBoxShadow=false;this.items=null;this.virtualScroll=false;this.itemSize=10;this.scrollingDebounce=15;this.disableKeyboardHandling=false;this.scrollingIndex=0;this.sixMenuItemHeight=this.virtualScroll?k:C;this.handleScrolling=()=>{if(this.menuWrapper==null)return;this.scrollingIndex=Math.floor(this.menuWrapper.scrollTop/this.sixMenuItemHeight)}}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?_: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(y)}const t=this.menu.querySelector("slot");if(t==null)return[];return[...t.assignedElements({flatten:true})].filter((t=>g(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(x)}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(x)}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(y)}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:"5b49fa6852d9d86c36e77533e06950ca5c320675",ref:t=>this.menuWrapper=t,style:this.getMenuWrapperStyle(),part:"wrapper",class:{menu:true,"no-shadow":this.removeBoxShadow}},s("div",{key:"b471da4ddcd06d56f21b020491c41c53766757a6",ref:t=>this.menu=t,part:"base",role:"menu",onClick:this.handleClick,onKeyDown:this.handleKeyDown,tabIndex:0,style:this.getMenuContainerStyle()},s("slot",{key:"e04e2751c6afd78db344211ca1e6db55b6b6d829"}),this.renderItems()),this.virtualScroll&&s("div",{key:"63dcb8d734ae480e7a4a8dcd50f0dc4131f8cb09",style:this.getScrollbarGhostStyle()}))}get host(){return e(this)}};I.style=w;export{f as six_dropdown,I as six_menu};
2
- //# sourceMappingURL=p-59568c0f.entry.js.map