@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
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy(JSON.parse("[[\"six-select.cjs\",[[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\"]}]]],[\"six-header-dropdown-item.cjs\",[[1,\"six-header-dropdown-item\",{\"filter\":[4],\"filterPlaceholder\":[1,\"filter-placeholder\"],\"active\":[32]}]]],[\"six-datepicker.cjs\",[[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\"]}]]],[\"six-date.cjs\",[[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\"]}]]],[\"six-file-upload.cjs\",[[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\"]]]]],[\"six-search-field.cjs\",[[1,\"six-search-field\",{\"placeholder\":[1],\"debounce\":[514],\"disabled\":[516],\"value\":[513],\"clearable\":[4]},null,{\"value\":[\"handleValueChange\"]}]]],[\"six-tag.cjs\",[[1,\"six-tag\",{\"type\":[513],\"size\":[513],\"pill\":[516],\"clearable\":[516]}]]],[\"six-tile.cjs\",[[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]}]]],[\"six-alert.cjs\",[[1,\"six-alert\",{\"open\":[1540],\"closable\":[516],\"type\":[513],\"duration\":[2],\"isVisible\":[32],\"show\":[64],\"hide\":[64],\"toast\":[64]},null,{\"open\":[\"handleOpenChange\"],\"duration\":[\"handleDurationChange\"]}]]],[\"six-breadcrumbs-item.cjs\",[[1,\"six-breadcrumbs-item\",{\"href\":[1],\"target\":[1],\"size\":[513],\"readonly\":[516,\"read-only\"]}]]],[\"six-dialog.cjs\",[[1,\"six-dialog\",{\"open\":[1540],\"label\":[1],\"noHeader\":[4,\"no-header\"],\"hasFooter\":[32],\"isVisible\":[32],\"show\":[64],\"hide\":[64]},null,{\"open\":[\"handleOpenChange\"]}]]],[\"six-drawer.cjs\",[[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\"]}]]],[\"six-header-menu-button.cjs\",[[1,\"six-header-menu-button\",{\"caret\":[4],\"disabled\":[516],\"loading\":[516],\"submit\":[516],\"reset\":[516]}]]],[\"six-rating.cjs\",[[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\"]}]]],[\"six-root.cjs\",[[1,\"six-root\",{\"padded\":[4],\"stage\":[1],\"version\":[1]}]]],[\"six-sidebar-item-group.cjs\",[[1,\"six-sidebar-item-group\",{\"name\":[1],\"icon\":[1],\"value\":[513],\"open\":[1540],\"summaryIcon\":[1,\"summary-icon\"],\"href\":[513],\"hasItems\":[32],\"summaryIconHasContent\":[32]}]]],[\"six-tab.cjs\",[[1,\"six-tab\",{\"panel\":[513],\"active\":[516],\"closable\":[4],\"hoverContent\":[1,\"hover-content\"],\"disabled\":[516],\"setFocus\":[64],\"removeFocus\":[64]}]]],[\"six-tab-group.cjs\",[[1,\"six-tab-group\",{\"placement\":[1],\"noScrollControls\":[4,\"no-scroll-controls\"],\"hasLeftControl\":[32],\"hasRightControl\":[32],\"show\":[64]},null,{\"noScrollControls\":[\"handleNoScrollControlsChange\"]}]]],[\"six-avatar.cjs\",[[1,\"six-avatar\",{\"image\":[1],\"alt\":[1],\"initials\":[1],\"shape\":[1],\"hasError\":[32]}]]],[\"six-breadcrumbs.cjs\",[[1,\"six-breadcrumbs\",{\"separatorIcon\":[513,\"separator-icon\"]}]]],[\"six-error-page.cjs\",[[1,\"six-error-page\",{\"errorCode\":[2,\"error-code\"],\"language\":[1],\"customTitle\":[1,\"custom-title\"],\"customDescription\":[16,\"custom-description\"],\"customIcon\":[1,\"custom-icon\"]}]]],[\"six-file-list-item.cjs\",[[1,\"six-file-list-item\",{\"identifier\":[513],\"name\":[513],\"date\":[513],\"size\":[514],\"nodownload\":[516],\"nodelete\":[516]}]]],[\"six-group-label.cjs\",[[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\"]}]]],[\"six-range.cjs\",[[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\"]}]]],[\"six-sidebar-item.cjs\",[[1,\"six-sidebar-item\",{\"value\":[513],\"selected\":[516],\"disabled\":[516],\"icon\":[1],\"href\":[513]}]]],[\"six-switch.cjs\",[[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\"]}]]],[\"six-textarea.cjs\",[[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\"]}]]],[\"six-badge.cjs\",[[1,\"six-badge\",{\"type\":[1],\"pill\":[4],\"pulse\":[4]}]]],[\"six-card.cjs\",[[1,\"six-card\"]]],[\"six-file-list.cjs\",[[1,\"six-file-list\"]]],[\"six-footer.cjs\",[[1,\"six-footer\"]]],[\"six-header.cjs\",[[1,\"six-header\",{\"shiftContent\":[4,\"shift-content\"],\"openSearch\":[4,\"open-search\"]},null,{\"openSearch\":[\"handleOpenSearchChange\"]}]]],[\"six-header-item.cjs\",[[1,\"six-header-item\",{\"active\":[516]}]]],[\"six-language-switcher.cjs\",[[1,\"six-language-switcher\",{\"selected\":[1537],\"languages\":[16]},null,{\"languages\":[\"handleChangesLanguages\"]}]]],[\"six-layout-grid.cjs\",[[1,\"six-layout-grid\",{\"columns\":[1026]},null,{\"columns\":[\"handleColumnsChange\"]}]]],[\"six-logo.cjs\",[[1,\"six-logo\",{\"brand\":[513]}]]],[\"six-main-container.cjs\",[[1,\"six-main-container\",{\"padded\":[4]}]]],[\"six-menu-divider.cjs\",[[1,\"six-menu-divider\"]]],[\"six-menu-label.cjs\",[[1,\"six-menu-label\"]]],[\"six-progress-bar.cjs\",[[1,\"six-progress-bar\",{\"percentage\":[2],\"indeterminate\":[4]}]]],[\"six-progress-ring.cjs\",[[1,\"six-progress-ring\",{\"size\":[2],\"strokeWidth\":[2,\"stroke-width\"],\"percentage\":[2]},null,{\"percentage\":[\"handlePercentageChange\"]}]]],[\"six-radio.cjs\",[[1,\"six-radio\",{\"name\":[1],\"value\":[513],\"disabled\":[4],\"checked\":[1540],\"invalid\":[516],\"hasFocus\":[32],\"setFocus\":[64],\"removeFocus\":[64]},null,{\"checked\":[\"handleCheckedChange\"],\"name\":[\"handleNameChange\"]}]]],[\"six-sidebar.cjs\",[[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\"]}]]],[\"six-tab-panel.cjs\",[[1,\"six-tab-panel\",{\"name\":[1],\"active\":[516]}]]],[\"six-timepicker.cjs\",[[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\"]}]]],[\"six-details.cjs\",[[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\"]}]]],[\"six-stage-indicator.cjs\",[[1,\"six-stage-indicator\",{\"stage\":[1]}]]],[\"six-picto.cjs\",[[1,\"six-picto\",{\"size\":[1]}]]],[\"six-item-picker.cjs\",[[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\"]}]]],[\"six-tooltip.cjs\",[[1,\"six-tooltip\",{\"content\":[1],\"placement\":[1],\"disabled\":[4],\"distance\":[2],\"open\":[1540],\"skidding\":[2],\"trigger\":[1],\"show\":[64],\"hide\":[64]},null,{\"open\":[\"handleOpenChange\"]}]]],[\"six-icon.cjs\",[[1,\"six-icon\",{\"size\":[513],\"filled\":[4],\"library\":[513]}]]],[\"six-input.cjs\",[[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\"]}]]],[\"six-dropdown_2.cjs\",[[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]}]]],[\"six-button_2.cjs\",[[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]}]]],[\"six-checkbox_2.cjs\",[[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\"]}]]],[\"six-icon-button.cjs\",[[1,\"six-icon-button\",{\"name\":[513],\"size\":[513],\"label\":[513],\"disabled\":[516],\"html\":[513],\"href\":[1],\"target\":[1],\"download\":[1]}]]],[\"six-error.cjs\",[[1,\"six-error\"]]]]"), options);
22
+ return index.bootstrapLazy(JSON.parse("[[\"six-select.cjs\",[[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\"]}]]],[\"six-header-dropdown-item.cjs\",[[1,\"six-header-dropdown-item\",{\"filter\":[4],\"filterPlaceholder\":[1,\"filter-placeholder\"],\"active\":[32]}]]],[\"six-datepicker.cjs\",[[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\"]}]]],[\"six-date.cjs\",[[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\"]}]]],[\"six-file-upload.cjs\",[[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\"]]]]],[\"six-search-field.cjs\",[[1,\"six-search-field\",{\"placeholder\":[1],\"debounce\":[514],\"disabled\":[516],\"value\":[513],\"clearable\":[4]},null,{\"value\":[\"handleValueChange\"]}]]],[\"six-tag.cjs\",[[1,\"six-tag\",{\"type\":[513],\"size\":[513],\"pill\":[516],\"clearable\":[516]}]]],[\"six-tile.cjs\",[[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]}]]],[\"six-alert.cjs\",[[1,\"six-alert\",{\"open\":[1540],\"closable\":[516],\"type\":[513],\"duration\":[2],\"isVisible\":[32],\"show\":[64],\"hide\":[64],\"toast\":[64]},null,{\"open\":[\"handleOpenChange\"],\"duration\":[\"handleDurationChange\"]}]]],[\"six-breadcrumbs-item.cjs\",[[1,\"six-breadcrumbs-item\",{\"href\":[1],\"target\":[1],\"size\":[513],\"readonly\":[516,\"read-only\"]}]]],[\"six-dialog.cjs\",[[1,\"six-dialog\",{\"open\":[1540],\"label\":[1],\"noHeader\":[4,\"no-header\"],\"hasFooter\":[32],\"isVisible\":[32],\"show\":[64],\"hide\":[64]},null,{\"open\":[\"handleOpenChange\"]}]]],[\"six-drawer.cjs\",[[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\"]}]]],[\"six-header-menu-button.cjs\",[[1,\"six-header-menu-button\",{\"caret\":[4],\"disabled\":[516],\"loading\":[516],\"submit\":[516],\"reset\":[516]}]]],[\"six-rating.cjs\",[[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\"]}]]],[\"six-root.cjs\",[[1,\"six-root\",{\"padded\":[4],\"stage\":[1],\"version\":[1]}]]],[\"six-sidebar-item-group.cjs\",[[1,\"six-sidebar-item-group\",{\"name\":[1],\"icon\":[1],\"value\":[513],\"open\":[1540],\"summaryIcon\":[1,\"summary-icon\"],\"href\":[513],\"hasItems\":[32],\"summaryIconHasContent\":[32]}]]],[\"six-tab.cjs\",[[1,\"six-tab\",{\"panel\":[513],\"active\":[516],\"closable\":[4],\"hoverContent\":[1,\"hover-content\"],\"disabled\":[516],\"setFocus\":[64],\"removeFocus\":[64]}]]],[\"six-tab-group.cjs\",[[1,\"six-tab-group\",{\"placement\":[1],\"noScrollControls\":[4,\"no-scroll-controls\"],\"hasLeftControl\":[32],\"hasRightControl\":[32],\"show\":[64]},null,{\"noScrollControls\":[\"handleNoScrollControlsChange\"]}]]],[\"six-avatar.cjs\",[[1,\"six-avatar\",{\"image\":[1],\"alt\":[1],\"initials\":[1],\"shape\":[1],\"hasError\":[32]}]]],[\"six-breadcrumbs.cjs\",[[1,\"six-breadcrumbs\",{\"separatorIcon\":[513,\"separator-icon\"]}]]],[\"six-error-page.cjs\",[[1,\"six-error-page\",{\"errorCode\":[2,\"error-code\"],\"language\":[1],\"customTitle\":[1,\"custom-title\"],\"customDescription\":[16,\"custom-description\"],\"customIcon\":[1,\"custom-icon\"]}]]],[\"six-file-list-item.cjs\",[[1,\"six-file-list-item\",{\"identifier\":[513],\"name\":[513],\"date\":[513],\"size\":[514],\"nodownload\":[516],\"nodelete\":[516]}]]],[\"six-group-label.cjs\",[[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\"]}]]],[\"six-range.cjs\",[[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\"]}]]],[\"six-sidebar-item.cjs\",[[1,\"six-sidebar-item\",{\"value\":[513],\"selected\":[516],\"disabled\":[516],\"icon\":[1],\"href\":[513]}]]],[\"six-switch.cjs\",[[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\"]}]]],[\"six-textarea.cjs\",[[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\"]}]]],[\"six-badge.cjs\",[[1,\"six-badge\",{\"type\":[1],\"pill\":[4],\"pulse\":[4]}]]],[\"six-card.cjs\",[[1,\"six-card\"]]],[\"six-file-list.cjs\",[[1,\"six-file-list\"]]],[\"six-footer.cjs\",[[1,\"six-footer\"]]],[\"six-header.cjs\",[[1,\"six-header\",{\"shiftContent\":[4,\"shift-content\"],\"openSearch\":[4,\"open-search\"]},null,{\"openSearch\":[\"handleOpenSearchChange\"]}]]],[\"six-header-item.cjs\",[[1,\"six-header-item\",{\"active\":[516]}]]],[\"six-language-switcher.cjs\",[[1,\"six-language-switcher\",{\"selected\":[1537],\"languages\":[16]},null,{\"languages\":[\"handleChangesLanguages\"]}]]],[\"six-layout-grid.cjs\",[[1,\"six-layout-grid\",{\"columns\":[1026]},null,{\"columns\":[\"handleColumnsChange\"]}]]],[\"six-logo.cjs\",[[1,\"six-logo\",{\"brand\":[513]}]]],[\"six-main-container.cjs\",[[1,\"six-main-container\",{\"padded\":[4]}]]],[\"six-menu-divider.cjs\",[[1,\"six-menu-divider\"]]],[\"six-menu-label.cjs\",[[1,\"six-menu-label\"]]],[\"six-progress-bar.cjs\",[[1,\"six-progress-bar\",{\"percentage\":[2],\"indeterminate\":[4]}]]],[\"six-progress-ring.cjs\",[[1,\"six-progress-ring\",{\"size\":[2],\"strokeWidth\":[2,\"stroke-width\"],\"percentage\":[2]},null,{\"percentage\":[\"handlePercentageChange\"]}]]],[\"six-radio.cjs\",[[1,\"six-radio\",{\"name\":[1],\"value\":[513],\"disabled\":[4],\"checked\":[1540],\"invalid\":[516],\"hasFocus\":[32],\"setFocus\":[64],\"removeFocus\":[64]},null,{\"checked\":[\"handleCheckedChange\"],\"name\":[\"handleNameChange\"]}]]],[\"six-sidebar.cjs\",[[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\"]}]]],[\"six-tab-panel.cjs\",[[1,\"six-tab-panel\",{\"name\":[1],\"active\":[516]}]]],[\"six-timepicker.cjs\",[[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\"]}]]],[\"six-details.cjs\",[[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\"]}]]],[\"six-stage-indicator.cjs\",[[1,\"six-stage-indicator\",{\"stage\":[1]}]]],[\"six-picto.cjs\",[[1,\"six-picto\",{\"size\":[1]}]]],[\"six-item-picker.cjs\",[[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\"]}]]],[\"six-tooltip.cjs\",[[1,\"six-tooltip\",{\"content\":[1],\"placement\":[1],\"disabled\":[4],\"distance\":[2],\"open\":[1540],\"skidding\":[2],\"trigger\":[1],\"show\":[64],\"hide\":[64]},null,{\"open\":[\"handleOpenChange\"]}]]],[\"six-icon.cjs\",[[1,\"six-icon\",{\"size\":[513],\"filled\":[4],\"library\":[513]}]]],[\"six-input.cjs\",[[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\"]}]]],[\"six-dropdown_2.cjs\",[[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]}]]],[\"six-button_2.cjs\",[[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]}]]],[\"six-checkbox_2.cjs\",[[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\"]}]]],[\"six-icon-button.cjs\",[[1,\"six-icon-button\",{\"name\":[513],\"size\":[513],\"label\":[513],\"disabled\":[516],\"html\":[513],\"href\":[1],\"target\":[1],\"download\":[1]}]]],[\"six-error.cjs\",[[1,\"six-error\"]]]]"), options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -49,6 +49,10 @@ export class SixDropdown {
49
49
  * e.g. because you need to call an endpoint use asyncFilter instead
50
50
  */
51
51
  this.filter = false;
52
+ /**
53
+ * Set to true if you want to disable the default dropdown panel scroll behavior.
54
+ */
55
+ this.noScroll = false;
52
56
  /**
53
57
  * Set to true to allow async filtering.
54
58
  * When you enter something in the search field the component will only emit an event but not filter any elements itself.
@@ -237,6 +241,9 @@ export class SixDropdown {
237
241
  });
238
242
  };
239
243
  }
244
+ get scrollEnabled() {
245
+ return !this.noScroll;
246
+ }
240
247
  get filterEnabled() {
241
248
  return this.filter || this.asyncFilter;
242
249
  }
@@ -482,19 +489,19 @@ export class SixDropdown {
482
489
  }
483
490
  }
484
491
  render() {
485
- return (h("div", { key: '46305375a199fb17ae66ca3b6678634844d0b8a2', part: "base", id: this.componentId, class: {
492
+ return (h("div", { key: '992782adb0fb029265c8ba51c90198ec923fbce4', part: "base", id: this.componentId, class: {
486
493
  dropdown: true,
487
494
  'dropdown--open': this.open,
488
- } }, h("span", { key: '2a53d2cf2b75607614f39675cabfe1362b297e70', part: "trigger", class: "dropdown__trigger", ref: (el) => (this.trigger = el), onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown, onKeyUp: this.handleTriggerKeyUp }, h("slot", { key: 'd8abcd455c768fded48df4c18b8191e365db4ab1', name: "trigger", ref: (el) => (this.triggerSlot = el), onSlotchange: this.handleTriggerSlotChange })), h("div", { key: 'fd0e0352800daebdc9843442901cad9769d3199a', ref: (el) => (this.positioner = el), class: {
495
+ } }, h("span", { key: '622495666c9a760f0c2e56ea256da4200c947832', part: "trigger", class: "dropdown__trigger", ref: (el) => (this.trigger = el), onClick: this.handleTriggerClick, onKeyDown: this.handleTriggerKeyDown, onKeyUp: this.handleTriggerKeyUp }, h("slot", { key: 'd1f99be1ee9b05ec2691ae9e2b5012e06c7bf0a6', name: "trigger", ref: (el) => (this.triggerSlot = el), onSlotchange: this.handleTriggerSlotChange })), h("div", { key: '73bbba4905be9acbb27bdb714051d32083770cc6', ref: (el) => (this.positioner = el), class: {
489
496
  dropdown__positioner: true,
490
497
  dropdown__positioner__filtered: (this.filter || this.asyncFilter) && !this.hoist,
491
- } }, h("div", { key: '2d72ca0ba1a5cbb480727e325048f7a171fb7af8', ref: (el) => (this.panel = el), part: "panel", class: "dropdown__panel", role: "menu", "aria-hidden": this.open ? 'false' : 'true', "aria-labelledby": this.componentId }, this.filterEnabled && (h("six-input", { key: 'a22263fb924be51081598579391774c82a09852f', class: {
498
+ } }, h("div", { key: 'fc47b162339ce25fa94a19d5130a74857af9367c', ref: (el) => (this.panel = el), part: "panel", class: "dropdown__panel", role: "menu", "aria-hidden": this.open ? 'false' : 'true', "aria-labelledby": this.componentId }, this.filterEnabled && (h("six-input", { key: '015e5d7f4980992b125a527aaf8478aee917dd46', class: {
492
499
  filter: true,
493
500
  'filter-hidden': !this.open,
494
- }, "dropdown-search": true, "aria-hidden": this.open ? 'false' : 'true', ref: (el) => (this.filterInputElement = el), placeholder: this.filterPlaceholder }, h("six-icon", { key: '7a8fc9e25e7e209b5b0aa05af5dcefca87e3b9d5', class: "filter__icon", slot: "suffix", size: "small" }, "search"))), h("div", { key: 'bedcab39d656be8ce064852ef9344b4fbbf60b17', class: {
495
- dropdown__panel__scroll: true,
501
+ }, "dropdown-search": true, "aria-hidden": this.open ? 'false' : 'true', ref: (el) => (this.filterInputElement = el), placeholder: this.filterPlaceholder }, h("six-icon", { key: '2eb8df4744a50b3fafdcea9c8e79f9b874e07d56', class: "filter__icon", slot: "suffix", size: "small" }, "search"))), h("div", { key: '82caedf34e671a98af1548ca70666282a024d43c', class: {
502
+ dropdown__panel__scroll: this.scrollEnabled,
496
503
  'dropdown__panel__scroll--virtual': this.virtualScroll,
497
- }, onScroll: this.handleDropdownScroll, ref: (el) => (this.scrollPanel = el) }, h("slot", { key: '21acba56de1fba98afdfda60e8b09816a70ac057', ref: (el) => (this.panelSlot = el) }), this.options.length > 0 && (h("six-menu", { key: 'd7d429d062bf111ffdaf667ada0efe640136871a', part: "menu", items: this.renderedOptions, virtualScroll: this.virtualScroll }))), h("slot", { key: 'e23be3aa659ed7fa4a513d82c982733b58a6e9db', name: "dropdown-footer" })))));
504
+ }, onScroll: this.handleDropdownScroll, ref: (el) => (this.scrollPanel = el) }, h("slot", { key: 'd26bcb4cab983c3f5d4b8228dc6933e73ebc1b45', ref: (el) => (this.panelSlot = el) }), this.options.length > 0 && (h("six-menu", { key: '520cd61ef2655d4915869e4153da3719f6ec6b3d', part: "menu", items: this.renderedOptions, virtualScroll: this.virtualScroll }))), h("slot", { key: 'd4c8cf2c2a7f33f9c6f62b0a7fe3ea51743b8387', name: "dropdown-footer" })))));
498
505
  }
499
506
  static get is() { return "six-dropdown"; }
500
507
  static get encapsulation() { return "shadow"; }
@@ -673,6 +680,26 @@ export class SixDropdown {
673
680
  "reflect": false,
674
681
  "defaultValue": "false"
675
682
  },
683
+ "noScroll": {
684
+ "type": "boolean",
685
+ "attribute": "no-scroll",
686
+ "mutable": false,
687
+ "complexType": {
688
+ "original": "boolean",
689
+ "resolved": "boolean",
690
+ "references": {}
691
+ },
692
+ "required": false,
693
+ "optional": false,
694
+ "docs": {
695
+ "tags": [],
696
+ "text": "Set to true if you want to disable the default dropdown panel scroll behavior."
697
+ },
698
+ "getter": false,
699
+ "setter": false,
700
+ "reflect": false,
701
+ "defaultValue": "false"
702
+ },
676
703
  "asyncFilter": {
677
704
  "type": "boolean",
678
705
  "attribute": "async-filter",
@@ -1 +1 @@
1
- {"version":3,"file":"six-dropdown.js","sourceRoot":"","sources":["../../../src/components/six-dropdown/six-dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAmBhF,IAAI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C;AAC7E,CAAC;AACD,KAAK,UAAU,kBAAkB,CAAC,QAAgC,EAAE,mBAA2B;IAC7F,OAAO,CACL,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;QAC1D,CAAC,MAAM,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAC5E,CAAC;AACJ,CAAC","sourcesContent":["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"]}
1
+ {"version":3,"file":"six-dropdown.js","sourceRoot":"","sources":["../../../src/components/six-dropdown/six-dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAmBhF,IAAI,EAAE,GAAG,CAAC,CAAC;AAEX;;;;;;;;;;;;;GAaG;AAOH,MAAM,OAAO,WAAW;IALxB;QAMU,gBAAW,GAAG,YAAY,EAAE,EAAE,EAAE,CAAC;QACjC,cAAS,GAAG,KAAK,CAAC;QAQlB,mBAAc,GAAG,IAAI,cAAc,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC;QAO7F,iGAAiG;QACzD,SAAI,GAAG,KAAK,CAAC;QAErD;;;WAGG;QACK,cAAS,GAYA,cAAc,CAAC;QAEhC,gFAAgF;QAChF,+DAA+D;QACvD,kBAAa,GAAG,IAAI,CAAC;QAE7B,mFAAmF;QAC3E,aAAQ,GAAG,CAAC,CAAC;QAErB,+EA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/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 if you want to disable the default dropdown panel scroll behavior.\n */\n @Prop() noScroll = false;\n\n get scrollEnabled() {\n return !this.noScroll;\n }\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: this.scrollEnabled,\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"]}
@@ -86,9 +86,13 @@ export class SixFileUpload {
86
86
  this.isOver = false;
87
87
  }
88
88
  }
89
- dropHandler() {
89
+ dropHandler(event) {
90
+ var _a;
90
91
  if (!this.disabled) {
91
92
  this.isOver = false;
93
+ if ((_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.files) {
94
+ this.handleFiles(event.dataTransfer.files);
95
+ }
92
96
  }
93
97
  }
94
98
  componentWillLoad() {
@@ -121,17 +125,17 @@ export class SixFileUpload {
121
125
  render() {
122
126
  const Container = this.compact ? 'six-button' : 'six-card';
123
127
  const errorMessages = (Array.isArray(this.errorText) ? this.errorText : [this.errorText]).filter((text) => text != null && text.trim() !== '');
124
- return (h("div", { key: '5e0eadc451195cb2c4d5c4f383e1a27b19a80dc4', class: {
128
+ return (h("div", { key: '22f6273a8a3ff2134c570ea91e92a78039f69de9', class: {
125
129
  'six-file-upload': true,
126
130
  'six-file-upload--disabled': this.disabled || this.uploading,
127
- } }, h(Container, { key: '16c443d8a887a3098cc04956bc607577ac3630b0', disabled: this.disabled || this.uploading, "aria-invalid": this.invalid ? 'true' : 'false', class: {
131
+ } }, h(Container, { key: 'c0978b21b218b9b8d251a98b6e52838029ca074a', disabled: this.disabled || this.uploading, "aria-invalid": this.invalid ? 'true' : 'false', class: {
128
132
  'six-file-upload__container--compact': this.compact,
129
133
  'six-file-upload__container--full': !this.compact,
130
- } }, this.compact && !this.uploading && h("six-icon", { key: '9fe02f54c63e61928f0c1f5886982f568b926d0d', slot: "prefix" }, "arrow_circle_up"), h("div", { key: '45350fcd292a61ddc6997019448b41d4bc94d5c8', class: {
134
+ } }, this.compact && !this.uploading && h("six-icon", { key: 'f1dcea5ddeab7fbf0eeea7af62cf8483f136a1c6', slot: "prefix" }, "arrow_circle_up"), h("div", { key: 'e166e39e3d4215de356d59fc3497191ba39e774f', class: {
131
135
  'six-file-upload__drop-zone': true,
132
136
  'six-file-upload__drop-zone--hover': this.isOver,
133
137
  'six-file-upload__drop-zone--compact': this.compact,
134
- } }, this.uploading ? (h("span", { class: "six-file-upload__drop-zone__spinner-container" }, h("six-spinner", null), " Uploading...")) : (h("div", null, h("span", null, this.renderLabel()), h("input", { class: "six-file-upload__input", type: "file", name: "resume", disabled: this.disabled, accept: this.accept, multiple: this.multiple, onChange: this.onChange, ref: (el) => (this.fileInput = el) }))))), h("div", { key: 'f5aa7f521d1ef6b2af5c23b697fa1014c87e1827', "aria-hidden": this.invalid ? 'false' : 'true' }, h("slot", { key: 'ab2f2bf8bf27b3c67304b61c491e5ab73e76398f', name: "error-text" }, errorMessages.map((text) => (h("six-error", null, h("div", { class: "six-file-upload__error-text" }, text))))))));
138
+ } }, this.uploading ? (h("span", { class: "six-file-upload__drop-zone__spinner-container" }, h("six-spinner", null), " Uploading...")) : (h("div", null, h("span", null, this.renderLabel()), h("input", { class: "six-file-upload__input", type: "file", name: "resume", disabled: this.disabled, accept: this.accept, multiple: this.multiple, onChange: this.onChange, ref: (el) => (this.fileInput = el) }))))), h("div", { key: '03cdbd08cd58667b279e0b5b961f88661125cf7d', "aria-hidden": this.invalid ? 'false' : 'true' }, h("slot", { key: 'b022f0aa0ce0964da126a4484984553dd73d9094', name: "error-text" }, errorMessages.map((text) => (h("six-error", null, h("div", { class: "six-file-upload__error-text" }, text))))))));
135
139
  }
136
140
  static get is() { return "six-file-upload"; }
137
141
  static get encapsulation() { return "scoped"; }
@@ -1 +1 @@
1
- {"version":3,"file":"six-file-upload.js","sourceRoot":"","sources":["../../../src/components/six-file-upload/six-file-upload.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChG,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAgB3C;;;;;GAKG;AAOH,MAAM,OAAO,aAAa;IAN1B;QAW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QAAQ,EACvB,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,GAClC,CACE,CACP,CACG,CACI;YACZ,2EAAkB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM;gBAC/C,6DAAM,IAAI,EAAC,YAAY,IACpB,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAC3B;oBACE,WAAK,KAAK,EAAC,6BAA6B,IAAE,IAAI,CAAO,CAC3C,CACb,CAAC,CACG,CACH,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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"]}
1
+ {"version":3,"file":"six-file-upload.js","sourceRoot":"","sources":["../../../src/components/six-file-upload/six-file-upload.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChG,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAgB3C;;;;;GAKG;AAOH,MAAM,OAAO,aAAa;IAN1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AM,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,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,GAClC,CACE,CACP,CACG,CACI;YACZ,2EAAkB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM;gBAC/C,6DAAM,IAAI,EAAC,YAAY,IACpB,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAC3B;oBACE,WAAK,KAAK,EAAC,6BAA6B,IAAE,IAAI,CAAO,CAC3C,CACb,CAAC,CACG,CACH,CACF,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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"]}
@@ -27,6 +27,7 @@
27
27
  --indicator-color: var(--six-progress-indicator-color);
28
28
  --stroke-width: 2px;
29
29
  display: inline-flex;
30
+ font-size: 40px;
30
31
  }
31
32
 
32
33
  .spinner {
@@ -49,28 +50,13 @@
49
50
  }
50
51
  }
51
52
  .six-spinner {
52
- width: auto;
53
- height: auto;
54
- position: relative;
55
- }
56
- .six-spinner .six-spinner__container {
57
- margin: 0;
58
- transform: translateX(0);
59
- }
60
- .six-spinner .six-spinner__container svg {
61
- transform: translateX(0);
62
- }
63
- .six-spinner__container {
64
- position: relative;
65
- margin: 0 auto;
66
- top: calc(50% - 20px);
67
- z-index: 1;
53
+ display: inline-block;
54
+ width: 1em;
55
+ height: 1em;
56
+ line-height: 0;
68
57
  }
69
- .six-spinner__container, .six-spinner__container svg {
70
- width: 40px;
71
- height: 40px;
58
+ .six-spinner__container svg {
72
59
  display: block;
73
- transform: translateX(40px);
74
60
  }
75
61
  .six-spinner path {
76
62
  stroke-dashoffset: 70px;