@mhmo91/schmancy 0.5.21 → 0.5.22

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 (47) hide show
  1. package/dist/{autocomplete-BJ_0fG9s.cjs → autocomplete-CG2YtfwU.cjs} +2 -2
  2. package/dist/autocomplete-CG2YtfwU.cjs.map +1 -0
  3. package/dist/{autocomplete-BG5HqWvt.js → autocomplete-DzZQusAY.js} +7 -7
  4. package/dist/autocomplete-DzZQusAY.js.map +1 -0
  5. package/dist/autocomplete.cjs +1 -1
  6. package/dist/autocomplete.js +1 -1
  7. package/dist/{avatar--NfBgxWj.js → avatar-39MTGkwX.js} +5 -5
  8. package/dist/{avatar--NfBgxWj.js.map → avatar-39MTGkwX.js.map} +1 -1
  9. package/dist/{avatar-BT1w6myH.cjs → avatar-QYDHa7s3.cjs} +2 -2
  10. package/dist/{avatar-BT1w6myH.cjs.map → avatar-QYDHa7s3.cjs.map} +1 -1
  11. package/dist/badge.cjs +1 -1
  12. package/dist/badge.js +1 -1
  13. package/dist/chips.cjs +1 -1
  14. package/dist/chips.js +1 -1
  15. package/dist/code-highlight.cjs +1 -1
  16. package/dist/code-highlight.js +1 -1
  17. package/dist/{code-preview-DrB-Y8dn.js → code-preview-CrsExDWj.js} +6 -7
  18. package/dist/{code-preview-DrB-Y8dn.js.map → code-preview-CrsExDWj.js.map} +1 -1
  19. package/dist/{code-preview-CHuRZ9cY.cjs → code-preview-hWI3erYE.cjs} +6 -7
  20. package/dist/{code-preview-CHuRZ9cY.cjs.map → code-preview-hWI3erYE.cjs.map} +1 -1
  21. package/dist/content-drawer.cjs +1 -1
  22. package/dist/content-drawer.js +1 -1
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.js +5 -5
  25. package/dist/nav-drawer.cjs +1 -1
  26. package/dist/nav-drawer.js +1 -1
  27. package/dist/navigation-bar.cjs +1 -1
  28. package/dist/navigation-bar.js +1 -1
  29. package/dist/{select-Cod_lOwT.cjs → select-BszKwEA_.cjs} +4 -4
  30. package/dist/select-BszKwEA_.cjs.map +1 -0
  31. package/dist/{select-BxlDe36e.js → select-CHgsFxnz.js} +13 -13
  32. package/dist/select-CHgsFxnz.js.map +1 -0
  33. package/dist/select.cjs +1 -1
  34. package/dist/select.js +1 -1
  35. package/dist/{suggestion-chip-CxQK5dcP.js → suggestion-chip-BTiLUD1d.js} +8 -8
  36. package/dist/suggestion-chip-BTiLUD1d.js.map +1 -0
  37. package/dist/{suggestion-chip-AVshmS4V.cjs → suggestion-chip-D7izoLhZ.cjs} +7 -7
  38. package/dist/suggestion-chip-D7izoLhZ.cjs.map +1 -0
  39. package/dist/teleport.cjs +1 -1
  40. package/dist/teleport.js +1 -1
  41. package/package.json +1 -1
  42. package/dist/autocomplete-BG5HqWvt.js.map +0 -1
  43. package/dist/autocomplete-BJ_0fG9s.cjs.map +0 -1
  44. package/dist/select-BxlDe36e.js.map +0 -1
  45. package/dist/select-Cod_lOwT.cjs.map +0 -1
  46. package/dist/suggestion-chip-AVshmS4V.cjs.map +0 -1
  47. package/dist/suggestion-chip-CxQK5dcP.js.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-BT1w6myH.cjs");Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>e.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=e.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>e.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=e.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=e.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>e.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=e.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=e.SchmancyContentDrawerSheetState,exports.schmancyContentDrawer=e.schmancyContentDrawer;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-QYDHa7s3.cjs");Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>e.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=e.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>e.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=e.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=e.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>e.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=e.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=e.SchmancyContentDrawerSheetState,exports.schmancyContentDrawer=e.schmancyContentDrawer;
2
2
  //# sourceMappingURL=content-drawer.cjs.map
@@ -1,4 +1,4 @@
1
- import { g as n, d as t, h as r, e as c, f as h, i as o, b as S, c as s, s as m } from "./avatar--NfBgxWj.js";
1
+ import { g as n, d as t, h as r, e as c, f as h, i as o, b as S, c as s, s as m } from "./avatar-39MTGkwX.js";
2
2
  export {
3
3
  n as SchmancyContentDrawer,
4
4
  t as SchmancyContentDrawerID,
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-Bic7z7SI.cjs");const c=require("./area.component-BrvNYy7Z.cjs"),t=require("./utils-C38P63L6.cjs");require("./autocomplete-BJ_0fG9s.cjs");const r=require("./avatar-BT1w6myH.cjs"),N=require("./boat-DP98_5qG.cjs");require("./spinner-CiRbCC74.cjs");const g=require("./icon-button-C5hq1cKD.cjs");require("./media-CPIoKlRw.cjs");const v=require("./checkbox-CIMDI5hW.cjs"),i=require("./suggestion-chip-AVshmS4V.cjs"),A=require("./input-chip-CbD-eDs-.cjs"),h=require("./code-preview-CHuRZ9cY.cjs"),E=require("./payment-card-form-DTfoZiiN.cjs"),d=require("./date-range-B0yz-_Zv.cjs"),x=require("./date-range-inline-P8P2ixg1.cjs"),s=require("./delay-1aTGz1ZH.cjs"),B=require("./details-uxsPpjMp.cjs"),u=require("./dialog-content-CvVd9EwS.cjs"),f=require("./dialog-service-Bdaxn2t0.cjs"),b=require("./ripple-DqQrvaTe.cjs"),F=require("lit/directives/guard.js");require("./divider-CHGffGro.cjs");const C=require("./dropdown-content-FVKimBQR.cjs"),O=require("./timezone-DRSCR7bi.cjs");require("./form-SMbhjYsC.cjs"),require("./icon-BT_1B5_G.cjs");const P=require("./input-D3qmQZ-Y.cjs"),o=require("./flex-DisTVvBI.cjs"),p=require("./list-5Y_CGGJF.cjs"),n=require("./email-recipients-DxqCC99q.cjs"),H=require("./map-bTOQf8Jm.cjs");require("./menu-Cak8SbFx.cjs");const j=require("./navigation-rail-D1iYDMy2.cjs"),m=require("./notification-service-DaXxcXyj.cjs"),D=require("./notify-Dd5h2l-v.cjs");require("./option-C6PwIhut.cjs"),require("./progress-sFt6EeRy.cjs");const q=require("./radio-button-Cc5fCDdU.cjs"),V=require("./rxjs-utils.cjs");require("rxjs"),require("./index-CCi1otmh.cjs");const Y=require("./select-Cod_lOwT.cjs");require("./sheet-ZHVITumf.cjs");const y=require("./sheet.service-BxvWBGsJ.cjs"),w=require("./slider-BKUCiMOV.cjs"),S=require("./schmancy-steps-container-Cb-cUZWP.cjs"),a=require("./context-object-bNADqf9U.cjs"),e=require("./selector-hook-cqmAutda.cjs"),I=require("./surface-DTqeD1NX.cjs"),R=require("./table-CGB_dR8H.cjs");require("./tabs-compatibility-C1ifLAs_.cjs"),require("./textarea-1QvQzHKm.cjs");const l=require("./theme.component-BLKJxyFX.cjs"),T=require("./theme.events-Car6U_SQ.cjs"),z=require("./theme.interface-Xg5Zi46a.cjs");require("./theme-button-B0n3kSd_.cjs");const M=require("./tooltip-B4nvmANO.cjs"),L=require("./tree-CRjGBeHH.cjs"),G=require("./types.cjs"),W=require("./typewriter-VGsKEZOj.cjs"),$=require("./typography-XN-pEi3Q.cjs"),k=require("./intersection-CVvaDv96.cjs"),K=require("./number-B7aCRYnH.cjs"),_=require("./search-DWW8IoOp.cjs");exports.FINDING_MORTIES=c.FINDING_MORTIES,exports.HERE_RICKY=c.HERE_RICKY,exports.HISTORY_STRATEGY=c.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>c.SchmancyArea}),Object.defineProperty(exports,"SchmancyRoute",{enumerable:!0,get:()=>c.SchmancyRoute}),exports.area=c.area,exports.routerHistory=c.routerHistory,exports.buildQueryString=t.buildQueryString,exports.compareActiveRoutes=t.compareActiveRoutes,exports.compareCustomElementConstructors=t.compareCustomElementConstructors,exports.compareRouteActions=t.compareRouteActions,exports.createRouteCacheKey=t.createRouteCacheKey,exports.debounce=t.debounce,exports.decodeData=t.decodeData,exports.decodeRouteState=t.decodeRouteState,exports.deepMerge=t.deepMerge,exports.encodeData=t.encodeData,exports.encodeRouteState=t.encodeRouteState,exports.extractQueryParams=t.extractQueryParams,exports.getTagName=t.getTagName,exports.isObject=t.isObject,exports.lazy=t.lazy,exports.normalizeTagName=t.normalizeTagName,exports.sanitizeRouteState=t.sanitizeRouteState,exports.$drawer=r.$drawer,exports.HereMorty=r.HereMorty,Object.defineProperty(exports,"ScBadgeV2",{enumerable:!0,get:()=>r.ScBadgeV2}),Object.defineProperty(exports,"SchmancyAvatar",{enumerable:!0,get:()=>r.SchmancyAvatar}),Object.defineProperty(exports,"SchmancyBadgeV2",{enumerable:!0,get:()=>r.SchmancyBadgeV2}),Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>r.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=r.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>r.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=r.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=r.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>r.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=r.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=r.SchmancyContentDrawerSheetState,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>r.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=r.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=r.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationBar",{enumerable:!0,get:()=>r.SchmancyNavigationBar}),Object.defineProperty(exports,"SchmancyNavigationBarItem",{enumerable:!0,get:()=>r.SchmancyNavigationBarItem}),Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>r.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerSidebar}),Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>r.SchmancyTeleportation}),exports.WhereAreYouRicky=r.WhereAreYouRicky,exports.schmancyContentDrawer=r.schmancyContentDrawer,exports.schmancyNavDrawer=r.schmancyNavDrawer,exports.teleport=r.teleport,Object.defineProperty(exports,"SchmancyBoat",{enumerable:!0,get:()=>N.SchmancyBoat}),Object.defineProperty(exports,"SchmancyButton",{enumerable:!0,get:()=>g.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>g.SchmnacyIconButton}),Object.defineProperty(exports,"SchmancyCheckbox",{enumerable:!0,get:()=>v.SchmancyCheckboxElement}),Object.defineProperty(exports,"SchmancyAssistChip",{enumerable:!0,get:()=>i.SchmancyAssistChip}),exports.SchmancyChip=i.SchmancyFilterChip,exports.SchmancyFilterChip=i.SchmancyFilterChip,Object.defineProperty(exports,"SchmancySuggestionChip",{enumerable:!0,get:()=>i.SchmancySuggestionChip}),Object.defineProperty(exports,"SchmancyInputChip",{enumerable:!0,get:()=>A.SchmancyInputChip}),Object.defineProperty(exports,"SchmancyCode",{enumerable:!0,get:()=>h.SchmancyCode}),Object.defineProperty(exports,"SchmancyCodeHighlight",{enumerable:!0,get:()=>h.SchmancyCode}),Object.defineProperty(exports,"SchmancyCodePreview",{enumerable:!0,get:()=>h.SchmancyCodePreview}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>E.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDateRange",{enumerable:!0,get:()=>d.SchmancyDateRange}),exports.validateInitialDateRange=d.validateInitialDateRange,Object.defineProperty(exports,"SchmancyDateRangeInline",{enumerable:!0,get:()=>x.SchmancyDateRangeInline}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>s.SchmancyDelay}),exports.delayContext=s.delayContext,Object.defineProperty(exports,"SchmancyDetails",{enumerable:!0,get:()=>B.SchmancyDetails}),Object.defineProperty(exports,"ConfirmDialog",{enumerable:!0,get:()=>u.ConfirmDialog}),Object.defineProperty(exports,"SchmancyDialog",{enumerable:!0,get:()=>u.SchmancyDialog}),Object.defineProperty(exports,"SchmancyDialogContent",{enumerable:!0,get:()=>u.SchmancyDialogContent}),exports.$dialog=f.$dialog,exports.DialogService=f.DialogService,exports.color=b.color,exports.fullHeight=b.fullHeight,exports.ripple=b.ripple,Object.defineProperty(exports,"guard",{enumerable:!0,get:()=>F.guard}),Object.defineProperty(exports,"SchmancyDropdown",{enumerable:!0,get:()=>C.SchmancyDropdown}),Object.defineProperty(exports,"SchmancyDropdownContent",{enumerable:!0,get:()=>C.SchmancyDropdownContent}),Object.defineProperty(exports,"SchmancyCountriesSelect",{enumerable:!0,get:()=>O.SchmancyCountriesSelect}),Object.defineProperty(exports,"SchmancyTimezonesSelect",{enumerable:!0,get:()=>O.SchmancyTimezonesSelect}),Object.defineProperty(exports,"SchmancyInput",{enumerable:!0,get:()=>P.SchmancyInput}),Object.defineProperty(exports,"SchmancyInputCompat",{enumerable:!0,get:()=>P.SchmancyInputCompat}),Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>o.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>o.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>o.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>o.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>p.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>p.SchmancyListItem}),exports.SchmancyListTypeContext=p.SchmancyListTypeContext,Object.defineProperty(exports,"SchmancyEmailEditor",{enumerable:!0,get:()=>n.SchmancyEmailEditor}),Object.defineProperty(exports,"SchmancyEmailLayoutSelector",{enumerable:!0,get:()=>n.SchmancyEmailLayoutSelector}),Object.defineProperty(exports,"SchmancyEmailRecipients",{enumerable:!0,get:()=>n.SchmancyEmailRecipients}),Object.defineProperty(exports,"SchmancyEmailViewer",{enumerable:!0,get:()=>n.SchmancyEmailViewer}),Object.defineProperty(exports,"SchmancyMailbox",{enumerable:!0,get:()=>n.SchmancyMailbox}),Object.defineProperty(exports,"SchmancyMap",{enumerable:!0,get:()=>H.SchmancyMap}),Object.defineProperty(exports,"SchmancyNavigationRail",{enumerable:!0,get:()=>j.SchmancyNavigationRail}),Object.defineProperty(exports,"SchmancyNavigationRailItem",{enumerable:!0,get:()=>j.SchmancyNavigationRailItem}),exports.$notify=m.$notify,exports.NotificationAudioService=m.NotificationAudioService,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>m.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationContainer",{enumerable:!0,get:()=>m.SchmancyNotificationContainer}),exports.notify=D.notify,exports.notifyProgress=D.notifyProgress,Object.defineProperty(exports,"RadioButton",{enumerable:!0,get:()=>q.RadioButton}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>q.RadioGroup}),exports.mutationObserver=V.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>Y.SchmancySelect}),exports.SchmancySheetPosition=y.SchmancySheetPosition,exports.SheetHereMorty=y.SheetHereMorty,exports.SheetWhereAreYouRicky=y.SheetWhereAreYouRicky,exports.sheet=y.sheet,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>w.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>w.SchmancySlider}),Object.defineProperty(exports,"SchmancyStep",{enumerable:!0,get:()=>S.SchmancyStep}),Object.defineProperty(exports,"SchmancyStepsContainer",{enumerable:!0,get:()=>S.SchmancyStepsContainer}),exports.StepsController=S.StepsController,exports.stepsContext=S.stepsContext,exports.BaseStore=a.BaseStore,exports.IndexedDBStorageManager=a.IndexedDBStorageManager,exports.LocalStorageManager=a.LocalStorageManager,exports.MemoryStorageManager=a.MemoryStorageManager,exports.SchmancyArrayStore=a.SchmancyArrayStore,exports.SchmancyStoreObject=a.SchmancyStoreObject,exports.SessionStorageManager=a.SessionStorageManager,exports.StoreError=a.StoreError,exports.createStorageManager=a.createStorageManager,exports.compareValues=e.compareValues,exports.createArrayContext=e.createArrayContext,exports.createCollectionSelector=e.createCollectionSelector,exports.createCompoundSelector=e.createCompoundSelector,exports.createContext=e.createContext,exports.createCountSelector=e.createCountSelector,exports.createEntriesSelector=e.createEntriesSelector,exports.createFilterSelector=e.createFilterSelector,exports.createFindSelector=e.createFindSelector,exports.createItemSelector=e.createItemSelector,exports.createItemsSelector=e.createItemsSelector,exports.createKeysSelector=e.createKeysSelector,exports.createMapSelector=e.createMapSelector,exports.createOptimizedSelector=e.createOptimizedSelector,exports.createSelector=e.createSelector,exports.createSortSelector=e.createSortSelector,exports.createTestArrayContext=e.createTestArrayContext,exports.filterArray=e.filterArray,exports.filterArrayItems=e.filterArrayItems,exports.filterMap=e.filterMap,exports.filterMapItems=e.filterMapItems,exports.getFieldValue=e.getFieldValue,exports.isArray=e.isArray,exports.isDate=e.isDate,exports.isIterable=e.isIterable,exports.isMap=e.isMap,exports.isNil=e.isNil,exports.isNumber=e.isNumber,exports.isPlainObject=e.isPlainObject,exports.isSet=e.isSet,exports.isString=e.isString,exports.select=e.select,exports.selectItem=e.selectItem,Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>I.SchmancySurface}),exports.SchmancySurfaceTypeContext=I.SchmancySurfaceTypeContext,Object.defineProperty(exports,"SchmancyDataTable",{enumerable:!0,get:()=>R.SchmancyDataTable}),Object.defineProperty(exports,"SchmancyTableRow",{enumerable:!0,get:()=>R.SchmancyTableRow}),Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>l.SchmancyThemeComponent}),exports.formateTheme=l.formateTheme,exports.tailwindStyles=l.tailwindStyles,exports.theme=l.theme,exports.ThemeHereIAm=T.ThemeHereIAm,exports.ThemeWhereAreYou=T.ThemeWhereAreYou,exports.SchmancyTheme=z.SchmancyTheme,Object.defineProperty(exports,"SchmancyTooltip",{enumerable:!0,get:()=>M.SchmancyTooltip}),exports.tooltip=M.tooltip,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>L.SchmancyTree}),exports.SchmancyEvents=G.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>W.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>$.SchmancyTypography}),exports.intersection$=k.intersection$,exports.Numbers=K.Numbers,exports.similarity=_.similarity;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-Bic7z7SI.cjs");const c=require("./area.component-BrvNYy7Z.cjs"),t=require("./utils-C38P63L6.cjs");require("./autocomplete-CG2YtfwU.cjs");const r=require("./avatar-QYDHa7s3.cjs"),N=require("./boat-DP98_5qG.cjs");require("./spinner-CiRbCC74.cjs");const g=require("./icon-button-C5hq1cKD.cjs");require("./media-CPIoKlRw.cjs");const v=require("./checkbox-CIMDI5hW.cjs"),i=require("./suggestion-chip-D7izoLhZ.cjs"),A=require("./input-chip-CbD-eDs-.cjs"),h=require("./code-preview-hWI3erYE.cjs"),E=require("./payment-card-form-DTfoZiiN.cjs"),d=require("./date-range-B0yz-_Zv.cjs"),x=require("./date-range-inline-P8P2ixg1.cjs"),s=require("./delay-1aTGz1ZH.cjs"),B=require("./details-uxsPpjMp.cjs"),u=require("./dialog-content-CvVd9EwS.cjs"),f=require("./dialog-service-Bdaxn2t0.cjs"),b=require("./ripple-DqQrvaTe.cjs"),F=require("lit/directives/guard.js");require("./divider-CHGffGro.cjs");const C=require("./dropdown-content-FVKimBQR.cjs"),O=require("./timezone-DRSCR7bi.cjs");require("./form-SMbhjYsC.cjs"),require("./icon-BT_1B5_G.cjs");const P=require("./input-D3qmQZ-Y.cjs"),o=require("./flex-DisTVvBI.cjs"),p=require("./list-5Y_CGGJF.cjs"),n=require("./email-recipients-DxqCC99q.cjs"),H=require("./map-bTOQf8Jm.cjs");require("./menu-Cak8SbFx.cjs");const j=require("./navigation-rail-D1iYDMy2.cjs"),m=require("./notification-service-DaXxcXyj.cjs"),D=require("./notify-Dd5h2l-v.cjs");require("./option-C6PwIhut.cjs"),require("./progress-sFt6EeRy.cjs");const q=require("./radio-button-Cc5fCDdU.cjs"),V=require("./rxjs-utils.cjs");require("rxjs"),require("./index-CCi1otmh.cjs");const Y=require("./select-BszKwEA_.cjs");require("./sheet-ZHVITumf.cjs");const y=require("./sheet.service-BxvWBGsJ.cjs"),w=require("./slider-BKUCiMOV.cjs"),S=require("./schmancy-steps-container-Cb-cUZWP.cjs"),a=require("./context-object-bNADqf9U.cjs"),e=require("./selector-hook-cqmAutda.cjs"),I=require("./surface-DTqeD1NX.cjs"),R=require("./table-CGB_dR8H.cjs");require("./tabs-compatibility-C1ifLAs_.cjs"),require("./textarea-1QvQzHKm.cjs");const l=require("./theme.component-BLKJxyFX.cjs"),T=require("./theme.events-Car6U_SQ.cjs"),z=require("./theme.interface-Xg5Zi46a.cjs");require("./theme-button-B0n3kSd_.cjs");const M=require("./tooltip-B4nvmANO.cjs"),L=require("./tree-CRjGBeHH.cjs"),G=require("./types.cjs"),W=require("./typewriter-VGsKEZOj.cjs"),$=require("./typography-XN-pEi3Q.cjs"),k=require("./intersection-CVvaDv96.cjs"),K=require("./number-B7aCRYnH.cjs"),_=require("./search-DWW8IoOp.cjs");exports.FINDING_MORTIES=c.FINDING_MORTIES,exports.HERE_RICKY=c.HERE_RICKY,exports.HISTORY_STRATEGY=c.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>c.SchmancyArea}),Object.defineProperty(exports,"SchmancyRoute",{enumerable:!0,get:()=>c.SchmancyRoute}),exports.area=c.area,exports.routerHistory=c.routerHistory,exports.buildQueryString=t.buildQueryString,exports.compareActiveRoutes=t.compareActiveRoutes,exports.compareCustomElementConstructors=t.compareCustomElementConstructors,exports.compareRouteActions=t.compareRouteActions,exports.createRouteCacheKey=t.createRouteCacheKey,exports.debounce=t.debounce,exports.decodeData=t.decodeData,exports.decodeRouteState=t.decodeRouteState,exports.deepMerge=t.deepMerge,exports.encodeData=t.encodeData,exports.encodeRouteState=t.encodeRouteState,exports.extractQueryParams=t.extractQueryParams,exports.getTagName=t.getTagName,exports.isObject=t.isObject,exports.lazy=t.lazy,exports.normalizeTagName=t.normalizeTagName,exports.sanitizeRouteState=t.sanitizeRouteState,exports.$drawer=r.$drawer,exports.HereMorty=r.HereMorty,Object.defineProperty(exports,"ScBadgeV2",{enumerable:!0,get:()=>r.ScBadgeV2}),Object.defineProperty(exports,"SchmancyAvatar",{enumerable:!0,get:()=>r.SchmancyAvatar}),Object.defineProperty(exports,"SchmancyBadgeV2",{enumerable:!0,get:()=>r.SchmancyBadgeV2}),Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>r.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=r.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>r.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=r.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=r.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>r.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=r.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=r.SchmancyContentDrawerSheetState,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>r.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=r.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=r.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationBar",{enumerable:!0,get:()=>r.SchmancyNavigationBar}),Object.defineProperty(exports,"SchmancyNavigationBarItem",{enumerable:!0,get:()=>r.SchmancyNavigationBarItem}),Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>r.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerSidebar}),Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>r.SchmancyTeleportation}),exports.WhereAreYouRicky=r.WhereAreYouRicky,exports.schmancyContentDrawer=r.schmancyContentDrawer,exports.schmancyNavDrawer=r.schmancyNavDrawer,exports.teleport=r.teleport,Object.defineProperty(exports,"SchmancyBoat",{enumerable:!0,get:()=>N.SchmancyBoat}),Object.defineProperty(exports,"SchmancyButton",{enumerable:!0,get:()=>g.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>g.SchmnacyIconButton}),Object.defineProperty(exports,"SchmancyCheckbox",{enumerable:!0,get:()=>v.SchmancyCheckboxElement}),Object.defineProperty(exports,"SchmancyAssistChip",{enumerable:!0,get:()=>i.SchmancyAssistChip}),exports.SchmancyChip=i.SchmancyFilterChip,exports.SchmancyFilterChip=i.SchmancyFilterChip,Object.defineProperty(exports,"SchmancySuggestionChip",{enumerable:!0,get:()=>i.SchmancySuggestionChip}),Object.defineProperty(exports,"SchmancyInputChip",{enumerable:!0,get:()=>A.SchmancyInputChip}),Object.defineProperty(exports,"SchmancyCode",{enumerable:!0,get:()=>h.SchmancyCode}),Object.defineProperty(exports,"SchmancyCodeHighlight",{enumerable:!0,get:()=>h.SchmancyCode}),Object.defineProperty(exports,"SchmancyCodePreview",{enumerable:!0,get:()=>h.SchmancyCodePreview}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>E.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDateRange",{enumerable:!0,get:()=>d.SchmancyDateRange}),exports.validateInitialDateRange=d.validateInitialDateRange,Object.defineProperty(exports,"SchmancyDateRangeInline",{enumerable:!0,get:()=>x.SchmancyDateRangeInline}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>s.SchmancyDelay}),exports.delayContext=s.delayContext,Object.defineProperty(exports,"SchmancyDetails",{enumerable:!0,get:()=>B.SchmancyDetails}),Object.defineProperty(exports,"ConfirmDialog",{enumerable:!0,get:()=>u.ConfirmDialog}),Object.defineProperty(exports,"SchmancyDialog",{enumerable:!0,get:()=>u.SchmancyDialog}),Object.defineProperty(exports,"SchmancyDialogContent",{enumerable:!0,get:()=>u.SchmancyDialogContent}),exports.$dialog=f.$dialog,exports.DialogService=f.DialogService,exports.color=b.color,exports.fullHeight=b.fullHeight,exports.ripple=b.ripple,Object.defineProperty(exports,"guard",{enumerable:!0,get:()=>F.guard}),Object.defineProperty(exports,"SchmancyDropdown",{enumerable:!0,get:()=>C.SchmancyDropdown}),Object.defineProperty(exports,"SchmancyDropdownContent",{enumerable:!0,get:()=>C.SchmancyDropdownContent}),Object.defineProperty(exports,"SchmancyCountriesSelect",{enumerable:!0,get:()=>O.SchmancyCountriesSelect}),Object.defineProperty(exports,"SchmancyTimezonesSelect",{enumerable:!0,get:()=>O.SchmancyTimezonesSelect}),Object.defineProperty(exports,"SchmancyInput",{enumerable:!0,get:()=>P.SchmancyInput}),Object.defineProperty(exports,"SchmancyInputCompat",{enumerable:!0,get:()=>P.SchmancyInputCompat}),Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>o.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>o.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>o.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>o.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>p.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>p.SchmancyListItem}),exports.SchmancyListTypeContext=p.SchmancyListTypeContext,Object.defineProperty(exports,"SchmancyEmailEditor",{enumerable:!0,get:()=>n.SchmancyEmailEditor}),Object.defineProperty(exports,"SchmancyEmailLayoutSelector",{enumerable:!0,get:()=>n.SchmancyEmailLayoutSelector}),Object.defineProperty(exports,"SchmancyEmailRecipients",{enumerable:!0,get:()=>n.SchmancyEmailRecipients}),Object.defineProperty(exports,"SchmancyEmailViewer",{enumerable:!0,get:()=>n.SchmancyEmailViewer}),Object.defineProperty(exports,"SchmancyMailbox",{enumerable:!0,get:()=>n.SchmancyMailbox}),Object.defineProperty(exports,"SchmancyMap",{enumerable:!0,get:()=>H.SchmancyMap}),Object.defineProperty(exports,"SchmancyNavigationRail",{enumerable:!0,get:()=>j.SchmancyNavigationRail}),Object.defineProperty(exports,"SchmancyNavigationRailItem",{enumerable:!0,get:()=>j.SchmancyNavigationRailItem}),exports.$notify=m.$notify,exports.NotificationAudioService=m.NotificationAudioService,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>m.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationContainer",{enumerable:!0,get:()=>m.SchmancyNotificationContainer}),exports.notify=D.notify,exports.notifyProgress=D.notifyProgress,Object.defineProperty(exports,"RadioButton",{enumerable:!0,get:()=>q.RadioButton}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>q.RadioGroup}),exports.mutationObserver=V.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>Y.SchmancySelect}),exports.SchmancySheetPosition=y.SchmancySheetPosition,exports.SheetHereMorty=y.SheetHereMorty,exports.SheetWhereAreYouRicky=y.SheetWhereAreYouRicky,exports.sheet=y.sheet,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>w.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>w.SchmancySlider}),Object.defineProperty(exports,"SchmancyStep",{enumerable:!0,get:()=>S.SchmancyStep}),Object.defineProperty(exports,"SchmancyStepsContainer",{enumerable:!0,get:()=>S.SchmancyStepsContainer}),exports.StepsController=S.StepsController,exports.stepsContext=S.stepsContext,exports.BaseStore=a.BaseStore,exports.IndexedDBStorageManager=a.IndexedDBStorageManager,exports.LocalStorageManager=a.LocalStorageManager,exports.MemoryStorageManager=a.MemoryStorageManager,exports.SchmancyArrayStore=a.SchmancyArrayStore,exports.SchmancyStoreObject=a.SchmancyStoreObject,exports.SessionStorageManager=a.SessionStorageManager,exports.StoreError=a.StoreError,exports.createStorageManager=a.createStorageManager,exports.compareValues=e.compareValues,exports.createArrayContext=e.createArrayContext,exports.createCollectionSelector=e.createCollectionSelector,exports.createCompoundSelector=e.createCompoundSelector,exports.createContext=e.createContext,exports.createCountSelector=e.createCountSelector,exports.createEntriesSelector=e.createEntriesSelector,exports.createFilterSelector=e.createFilterSelector,exports.createFindSelector=e.createFindSelector,exports.createItemSelector=e.createItemSelector,exports.createItemsSelector=e.createItemsSelector,exports.createKeysSelector=e.createKeysSelector,exports.createMapSelector=e.createMapSelector,exports.createOptimizedSelector=e.createOptimizedSelector,exports.createSelector=e.createSelector,exports.createSortSelector=e.createSortSelector,exports.createTestArrayContext=e.createTestArrayContext,exports.filterArray=e.filterArray,exports.filterArrayItems=e.filterArrayItems,exports.filterMap=e.filterMap,exports.filterMapItems=e.filterMapItems,exports.getFieldValue=e.getFieldValue,exports.isArray=e.isArray,exports.isDate=e.isDate,exports.isIterable=e.isIterable,exports.isMap=e.isMap,exports.isNil=e.isNil,exports.isNumber=e.isNumber,exports.isPlainObject=e.isPlainObject,exports.isSet=e.isSet,exports.isString=e.isString,exports.select=e.select,exports.selectItem=e.selectItem,Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>I.SchmancySurface}),exports.SchmancySurfaceTypeContext=I.SchmancySurfaceTypeContext,Object.defineProperty(exports,"SchmancyDataTable",{enumerable:!0,get:()=>R.SchmancyDataTable}),Object.defineProperty(exports,"SchmancyTableRow",{enumerable:!0,get:()=>R.SchmancyTableRow}),Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>l.SchmancyThemeComponent}),exports.formateTheme=l.formateTheme,exports.tailwindStyles=l.tailwindStyles,exports.theme=l.theme,exports.ThemeHereIAm=T.ThemeHereIAm,exports.ThemeWhereAreYou=T.ThemeWhereAreYou,exports.SchmancyTheme=z.SchmancyTheme,Object.defineProperty(exports,"SchmancyTooltip",{enumerable:!0,get:()=>M.SchmancyTooltip}),exports.tooltip=M.tooltip,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>L.SchmancyTree}),exports.SchmancyEvents=G.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>W.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>$.SchmancyTypography}),exports.intersection$=k.intersection$,exports.Numbers=K.Numbers,exports.similarity=_.similarity;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import "./animated-text-CLEr78FV.js";
2
2
  import { F as g, H as C, c as u, S as D, b, a as w, r as I } from "./area.component-tIK_P5JR.js";
3
3
  import { p as T, k as M, c as N, j as v, m as A, b as E, d as B, h as H, a as F, e as L, f as O, o as $, g as j, i as k, l as z, n as P, s as V } from "./utils-CYOVFxSx.js";
4
- import "./autocomplete-BG5HqWvt.js";
5
- import { $ as G, H as W, a as K, v as _, S as q, g as Q, d as J, h as U, e as X, f as Z, i as aa, b as ea, c as ra, k as ta, m as oa, n as ca, r as sa, q as ma, o as na, l as Sa, p as ia, t as ha, W as ya, s as pa, j as la, u as fa } from "./avatar--NfBgxWj.js";
4
+ import "./autocomplete-DzZQusAY.js";
5
+ import { $ as G, H as W, a as K, v as _, S as q, g as Q, d as J, h as U, e as X, f as Z, i as aa, b as ea, c as ra, k as ta, m as oa, n as ca, r as sa, q as ma, o as na, l as Sa, p as ia, t as ha, W as ya, s as pa, j as la, u as fa } from "./avatar-39MTGkwX.js";
6
6
  import { S as da } from "./boat-BdJ1jyK_.js";
7
7
  import "./spinner-DZ3oE5cQ.js";
8
8
  import { S as Ca, a as ua } from "./icon-button-DsjqusZz.js";
9
9
  import "./media-CA52MXd3.js";
10
10
  import { S as ba } from "./checkbox-4mBWkzKG.js";
11
- import { S as Ia, a as Ra, a as Ta, b as Ma } from "./suggestion-chip-CxQK5dcP.js";
11
+ import { S as Ia, a as Ra, a as Ta, b as Ma } from "./suggestion-chip-BTiLUD1d.js";
12
12
  import { S as va } from "./input-chip-DiThsRoi.js";
13
- import { S as Ea, S as Ba, a as Ha } from "./code-preview-DrB-Y8dn.js";
13
+ import { S as Ea, S as Ba, a as Ha } from "./code-preview-CrsExDWj.js";
14
14
  import { S as La } from "./payment-card-form-xwk5dfeQ.js";
15
15
  import { S as $a, v as ja } from "./date-range-CM-5J_JO.js";
16
16
  import { S as za } from "./date-range-inline-CPI4EyL0.js";
@@ -40,7 +40,7 @@ import { a as Ye, R as Ge } from "./radio-button-CZq8Z-V-.js";
40
40
  import { mutationObserver as Ke } from "./rxjs-utils.js";
41
41
  import "rxjs";
42
42
  import "./index-CW6PhEkx.js";
43
- import { S as qe } from "./select-BxlDe36e.js";
43
+ import { S as qe } from "./select-CHgsFxnz.js";
44
44
  import "./sheet-BscruHZw.js";
45
45
  import { S as Je, b as Ue, a as Xe, s as Ze } from "./sheet.service-lXqUf6n5.js";
46
46
  import { S as er, a as rr } from "./slider-gBHyj2TC.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-BT1w6myH.cjs");exports.$drawer=e.$drawer,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),exports.schmancyNavDrawer=e.schmancyNavDrawer;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-QYDHa7s3.cjs");exports.$drawer=e.$drawer,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),exports.schmancyNavDrawer=e.schmancyNavDrawer;
2
2
  //# sourceMappingURL=nav-drawer.cjs.map
@@ -1,4 +1,4 @@
1
- import { $ as c, k as e, m as n, n as m, o as s, l as o, p as t, j as w } from "./avatar--NfBgxWj.js";
1
+ import { $ as c, k as e, m as n, n as m, o as s, l as o, p as t, j as w } from "./avatar-39MTGkwX.js";
2
2
  export {
3
3
  c as $drawer,
4
4
  e as SchmancyDrawerAppbar,
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-BT1w6myH.cjs");Object.defineProperty(exports,"SchmancyNavigationBar",{enumerable:!0,get:()=>e.SchmancyNavigationBar}),Object.defineProperty(exports,"SchmancyNavigationBarItem",{enumerable:!0,get:()=>e.SchmancyNavigationBarItem});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-QYDHa7s3.cjs");Object.defineProperty(exports,"SchmancyNavigationBar",{enumerable:!0,get:()=>e.SchmancyNavigationBar}),Object.defineProperty(exports,"SchmancyNavigationBarItem",{enumerable:!0,get:()=>e.SchmancyNavigationBarItem});
2
2
  //# sourceMappingURL=navigation-bar.cjs.map
@@ -1,4 +1,4 @@
1
- import { r as c, q as i } from "./avatar--NfBgxWj.js";
1
+ import { r as c, q as i } from "./avatar-39MTGkwX.js";
2
2
  export {
3
3
  c as SchmancyNavigationBar,
4
4
  i as SchmancyNavigationBarItem
@@ -1,4 +1,4 @@
1
- "use strict";const p=require("@floating-ui/dom"),o=require("rxjs"),m=require("lit/directives/class-map.js");require("lit/directives/style-map.js");const a=require("lit/decorators.js");require("./tailwind.mixin-ChrVaJHF.cjs");const v=require("./litElement.mixin-rWG9s46P.cjs"),b=require("./ripple-DqQrvaTe.cjs");require("lit/directives/guard.js");const y=require("./theme.interface-Xg5Zi46a.cjs"),d=require("lit"),c=require("rxjs/operators");var S=Object.defineProperty,g=Object.getOwnPropertyDescriptor,n=(t,e,i,s)=>{for(var l,r=s>1?void 0:s?g(e,i):e,h=t.length-1;h>=0;h--)(l=t[h])&&(r=(s?l(e,i,r):l(r))||r);return s&&r&&S(e,i,r),r};exports.SchmancySelect=class extends v.$LitElement(d.css`
1
+ "use strict";const d=require("@floating-ui/dom"),o=require("rxjs"),m=require("lit/directives/class-map.js");require("lit/directives/style-map.js");const a=require("lit/decorators.js");require("./tailwind.mixin-ChrVaJHF.cjs");const v=require("./litElement.mixin-rWG9s46P.cjs"),b=require("./ripple-DqQrvaTe.cjs");require("lit/directives/guard.js");const y=require("./theme.interface-Xg5Zi46a.cjs"),p=require("lit"),c=require("rxjs/operators");var S=Object.defineProperty,g=Object.getOwnPropertyDescriptor,n=(t,e,i,s)=>{for(var l,r=s>1?void 0:s?g(e,i):e,h=t.length-1;h>=0;h--)(l=t[h])&&(r=(s?l(e,i,r):l(r))||r);return s&&r&&S(e,i,r),r};exports.SchmancySelect=class extends v.$LitElement(p.css`
2
2
  :host {
3
3
  display: block;
4
4
  position: relative;
@@ -8,7 +8,7 @@
8
8
  overflow-y: auto;
9
9
  outline: none;
10
10
  }
11
- `){constructor(){super(),this.required=!1,this.disabled=!1,this.placeholder="",this.multi=!1,this.label="",this.hint="",this.validateOn="touched",this.size="md",this.isOpen=!1,this.valueLabel="",this.isValid=!0,this.validationMessage="",this.defaultValue="",this._options$=new o.BehaviorSubject([]),this._selectedValue$=new o.BehaviorSubject(""),this._selectedValues$=new o.BehaviorSubject([]),this._optionSelect$=new o.Subject,this._userInteracted=!1,this._touched=!1,this._dirty=!1,this._submitted=!1,this._focusedOptionId="",this.formSubmitHandler=()=>{this._submitted=!0,this.checkValidity()},this.formResetHandler=()=>{this.reset()},this.handleKeyDown=t=>{if(this.disabled)return;if(!this.isOpen)return void(["Enter"," ","ArrowDown"].includes(t.key)&&(t.preventDefault(),this.openDropdown(!1)));const e=Array.from(this.options||[]),i=e.findIndex(s=>s.id===this._focusedOptionId)??-1;switch(t.key){case"Escape":t.preventDefault(),this.closeDropdown();break;case"ArrowDown":t.preventDefault(),this.focusOption(e,Math.min(i+1,e.length-1));break;case"ArrowUp":t.preventDefault(),this.focusOption(e,Math.max(i-1,0));break;case"Home":t.preventDefault(),this.focusOption(e,0);break;case"End":t.preventDefault(),this.focusOption(e,e.length-1);break;case"Enter":case" ":if(t.preventDefault(),this._focusedOptionId){const s=e.find(l=>l.id===this._focusedOptionId);s&&this.handleOptionSelect(s.value)}break;case"Tab":this.closeDropdown()}};try{this.internals=this.attachInternals()}catch{}}get value(){return this.multi?this._selectedValues$.value.join(","):this._selectedValue$.value}set value(t){if(this.multi){const e=Array.isArray(t)?t:t?String(t).split(",").map(i=>i.trim()).filter(Boolean):[];this._selectedValues$.next(e)}else this._selectedValue$.next(String(t||""))}get values(){return[...this._selectedValues$.value]}set values(t){this._selectedValues$.next(Array.isArray(t)?[...t]:[])}get form(){return this.internals?.form}connectedCallback(){super.connectedCallback(),this.id||(this.id=`schmancy-select-${Math.random().toString(36).substring(2,9)}`),this.defaultValue=this.value,o.fromEvent(this,"keydown").pipe(o.takeUntil(this.disconnecting)).subscribe(this.handleKeyDown),this._setupReactivePipelines(),this.internals?.form&&(o.fromEvent(this.internals.form,"submit").pipe(o.takeUntil(this.disconnecting)).subscribe(this.formSubmitHandler),o.fromEvent(this.internals.form,"reset").pipe(o.takeUntil(this.disconnecting)).subscribe(this.formResetHandler)),this.inputRef&&(this.inputRef.error=!1)}disconnectedCallback(){super.disconnectedCallback(),this.cleanupPositioner?.()}firstUpdated(){this.syncSelection(),this.setupOptionsAccessibility()}updated(t){if(super.updated(t),t.has("value")){const e=Array.isArray(this.value)?this.value.join(","):this.value;this.internals?.setFormValue(e),this.hasUpdated&&(this._dirty=!0),this.hasUpdated&&this.checkValidity()}t.has("isOpen")&&(this.isOpen?this.positionDropdown():this.cleanupPositioner?.())}shouldShowValidation(t=!1){if(t)return!0;switch(this.validateOn){case"always":return!0;case"touched":default:return this._touched;case"dirty":return this._dirty;case"submitted":return this._submitted}}syncSelection(){if(this.multi){const t=this._selectedValues$.value;this.options?.forEach(e=>e.selected=t.includes(e.value)),this.valueLabel=t.length>0&&this.options?.filter(e=>t.includes(e.value)).map(e=>e.label||e.textContent||"").join(", ")||this.placeholder}else{const t=this._selectedValue$.value;this.options?.forEach(i=>{i.selected=i.value===t});const e=this.options?.find(i=>i.value===t);this.valueLabel=e?e.label||e.textContent||"":this.placeholder}}setupOptionsAccessibility(){this.options?.forEach((t,e)=>{t.setAttribute("role","option"),t.id||(t.id=`${this.id}-option-${e}`),t.tabIndex=-1;const i=Array.isArray(this.value)?this.value:this.value?this.value.split(","):[];t.setAttribute("aria-selected",String(this.multi?i.includes(t.value):t.value===this.value))})}async positionDropdown(){const t=this.renderRoot.querySelector(".trigger");t&&this.ul&&(this.cleanupPositioner=p.autoUpdate(t,this.ul,async()=>{const e=window.innerHeight,i=t.getBoundingClientRect(),s=e-i.bottom,l=i.top,r=Math.max(.75*Math.max(s,l),150),h=s<200&&l>s;this.ul.style.maxHeight=`${r}px`;const{x:u,y:f}=await p.computePosition(t,this.ul,{placement:h?"top-start":"bottom-start",middleware:[p.offset(5),p.flip(),p.shift({padding:5})]});Object.assign(this.ul.style,{left:`${u}px`,top:`${f}px`,position:"absolute",width:`${t.offsetWidth}px`})}))}focusOption(t,e){const i=t[e];if(i){i.focus(),this._focusedOptionId=i.id;const s=this.renderRoot.querySelector(".trigger");if(s&&s.setAttribute("aria-activedescendant",i.id),this.ul&&i.offsetTop!==void 0){const l=i.offsetTop,r=i.offsetHeight,h=this.ul.scrollTop,u=this.ul.clientHeight;l<h?this.ul.scrollTop=l:l+r>h+u&&(this.ul.scrollTop=l+r-u)}}}async openDropdown(t=!1){if(this.disabled)return;this.isOpen=!0,await this.updateComplete;const e=Array.from(this.options||[]),i=this.multi?0:e.findIndex(s=>s.value===String(this.value));this.focusOption(e,Math.max(i,0)),t&&this.reportValidity()}closeDropdown(){this._userInteracted&&(this._touched=!0),this.isOpen=!1,this._focusedOptionId="";const t=this.renderRoot.querySelector(".trigger");t&&(t.removeAttribute("aria-activedescendant"),t?.focus()),this._userInteracted&&this.shouldShowValidation()&&this.checkValidity()}_setupReactivePipelines(){o.fromEvent(this,"option-select").pipe(c.tap(t=>{t.stopPropagation();const e=this.options.find(i=>i.value===t.detail.value);e&&this._optionSelect$.next(e)}),o.takeUntil(this.disconnecting)).subscribe(),this._optionSelect$.pipe(c.withLatestFrom(this._selectedValue$,this._selectedValues$),c.tap(([t,e,i])=>{if(this._userInteracted=!0,this._touched=!0,this._dirty=!0,this.multi){const s=i.indexOf(t.value),l=s>-1?[...i.slice(0,s),...i.slice(s+1)]:[...i,t.value];this._selectedValues$.next(l),this.valueLabel=l.length>0?this.options.filter(r=>l.includes(r.value)).map(r=>r.label||r.textContent||"").join(", "):this.placeholder}else this._selectedValue$.next(t.value),this.valueLabel=t.label||t.textContent||this.placeholder,this.closeDropdown();this.setupOptionsAccessibility(),this._fireChangeEvent()}),o.takeUntil(this.disconnecting)).subscribe(),this._options$.pipe(c.tap(t=>{t.forEach((e,i)=>{e.setAttribute("role","option"),e.tabIndex=-1,e.id||(e.id=`${this.id}-option-${i}`),e.hasAttribute("data-event-bound")||(o.fromEvent(e,"pointerdown").pipe(c.tap(s=>{s.preventDefault(),s.stopPropagation()}),o.takeUntil(this.disconnecting)).subscribe(()=>this._optionSelect$.next(e)),e.setAttribute("data-event-bound","true"))})}),o.takeUntil(this.disconnecting)).subscribe(),o.combineLatest([this._selectedValue$,this._selectedValues$,this._options$]).pipe(c.tap(([t,e,i])=>{i.length!==0&&(this.multi?i.forEach(s=>{s.selected=e.includes(s.value)}):i.forEach(s=>{s.selected=s.value===t}))}),o.takeUntil(this.disconnecting)).subscribe()}handleOptionSelect(t){const e=this.options.find(i=>i.value===t);e&&this._optionSelect$.next(e)}_fireChangeEvent(){const t=this.multi?this._selectedValues$.value:this._selectedValue$.value;this.dispatchEvent(new CustomEvent("change",{detail:{value:t},bubbles:!0,composed:!0})),this.checkValidity()}checkValidity(){if(this.disabled)return!0;const t=this.multi&&Array.isArray(this.value)?this.value.length===0:!this.value,e=!(this.required&&t);if(this.isValid=e,this.isValid?(this.validationMessage="",this.internals?.setValidity({})):(this.validationMessage="Please select an option.",this.internals?.setValidity({valueMissing:!0},"Please select an option.",this.inputRef)),this.inputRef&&this.hasUpdated){const i=!this.isValid&&this.shouldShowValidation();this.inputRef.error=i,this.inputRef.hint=i?this.validationMessage:this.hint}return this.isValid}reportValidity(){const t=this.checkValidity();return this.inputRef&&(this.inputRef.error=!t,this.inputRef.hint=t?this.hint:this.validationMessage,t||this.isOpen||this.openDropdown(!1),t||this.inputRef.reportValidity()),t}setCustomValidity(t){this.validationMessage=t,t?(this.isValid=!1,this.internals?.setValidity({customError:!0},t,this.inputRef)):(this.isValid=!0,this.internals?.setValidity({})),this.inputRef&&this.shouldShowValidation()&&(this.inputRef.error=!this.isValid,this.inputRef.hint=this.isValid?this.hint:this.validationMessage)}reset(){this.value=this.defaultValue,this.valueLabel=this.placeholder,this.isValid=!0,this.validationMessage="",this._touched=!1,this._dirty=!1,this._submitted=!1,this._userInteracted=!1,this.internals?.setValidity({}),this.inputRef&&(this.inputRef.error=!1,this.inputRef.hint=this.hint)}render(){const t=!this.isValid&&this.shouldShowValidation()&&!this.isOpen,e=this.isOpen?d.html`<span class="absolute right-3 top-1/2 transform -translate-y-1/2">▲</span>`:d.html`<span class="absolute right-3 top-1/2 transform -translate-y-1/2">▼</span>`;return d.html`
11
+ `){constructor(){super(),this.required=!1,this.disabled=!1,this.placeholder="",this.multi=!1,this.label="",this.hint="",this.validateOn="touched",this.size="md",this.isOpen=!1,this.valueLabel="",this.isValid=!0,this.validationMessage="",this.defaultValue="",this._options$=new o.BehaviorSubject([]),this._selectedValue$=new o.BehaviorSubject(""),this._selectedValues$=new o.BehaviorSubject([]),this._optionSelect$=new o.Subject,this._userInteracted=!1,this._touched=!1,this._dirty=!1,this._submitted=!1,this._focusedOptionId="",this.formSubmitHandler=()=>{this._submitted=!0,this.checkValidity()},this.formResetHandler=()=>{this.reset()},this.handleKeyDown=t=>{if(this.disabled)return;if(!this.isOpen)return void(["Enter"," ","ArrowDown"].includes(t.key)&&(t.preventDefault(),this.openDropdown(!1)));const e=Array.from(this.options||[]),i=e.findIndex(s=>s.id===this._focusedOptionId)??-1;switch(t.key){case"Escape":t.preventDefault(),this.closeDropdown();break;case"ArrowDown":t.preventDefault(),this.focusOption(e,Math.min(i+1,e.length-1));break;case"ArrowUp":t.preventDefault(),this.focusOption(e,Math.max(i-1,0));break;case"Home":t.preventDefault(),this.focusOption(e,0);break;case"End":t.preventDefault(),this.focusOption(e,e.length-1);break;case"Enter":case" ":if(t.preventDefault(),this._focusedOptionId){const s=e.find(l=>l.id===this._focusedOptionId);s&&this.handleOptionSelect(s.value)}break;case"Tab":this.closeDropdown()}};try{this.internals=this.attachInternals()}catch{}}get value(){return this.multi?this._selectedValues$.value.join(","):this._selectedValue$.value}set value(t){if(this.multi){const e=Array.isArray(t)?t:t?String(t).split(",").map(i=>i.trim()).filter(Boolean):[];this._selectedValues$.next(e)}else this._selectedValue$.next(String(t||""))}get values(){return[...this._selectedValues$.value]}set values(t){this._selectedValues$.next(Array.isArray(t)?[...t]:[])}get form(){return this.internals?.form}connectedCallback(){super.connectedCallback(),this.id||(this.id=`schmancy-select-${Math.random().toString(36).substring(2,9)}`),this.defaultValue=this.value,o.fromEvent(this,"keydown").pipe(o.takeUntil(this.disconnecting)).subscribe(this.handleKeyDown),this._setupReactivePipelines(),this.internals?.form&&(o.fromEvent(this.internals.form,"submit").pipe(o.takeUntil(this.disconnecting)).subscribe(this.formSubmitHandler),o.fromEvent(this.internals.form,"reset").pipe(o.takeUntil(this.disconnecting)).subscribe(this.formResetHandler)),this.inputRef&&(this.inputRef.error=!1)}disconnectedCallback(){super.disconnectedCallback(),this.cleanupPositioner?.()}firstUpdated(){this.syncSelection(),this.setupOptionsAccessibility()}updated(t){if(super.updated(t),t.has("value")){const e=Array.isArray(this.value)?this.value.join(","):this.value;this.internals?.setFormValue(e),this.hasUpdated&&(this._dirty=!0),this.hasUpdated&&this.checkValidity()}t.has("isOpen")&&(this.isOpen?this.positionDropdown():this.cleanupPositioner?.())}shouldShowValidation(t=!1){if(t)return!0;switch(this.validateOn){case"always":return!0;case"touched":default:return this._touched;case"dirty":return this._dirty;case"submitted":return this._submitted}}syncSelection(){if(this.multi){const t=this._selectedValues$.value;this.options?.forEach(e=>e.selected=t.includes(e.value)),this.valueLabel=t.length>0&&this.options?.filter(e=>t.includes(e.value)).map(e=>e.label||e.textContent||"").join(", ")||this.placeholder}else{const t=this._selectedValue$.value;this.options?.forEach(i=>{i.selected=i.value===t});const e=this.options?.find(i=>i.value===t);this.valueLabel=e?e.label||e.textContent||"":this.placeholder}}setupOptionsAccessibility(){this.options?.forEach((t,e)=>{t.setAttribute("role","option"),t.id||(t.id=`${this.id}-option-${e}`),t.tabIndex=-1;const i=Array.isArray(this.value)?this.value:this.value?this.value.split(","):[];t.setAttribute("aria-selected",String(this.multi?i.includes(t.value):t.value===this.value))})}async positionDropdown(){const t=this.renderRoot.querySelector(".trigger");t&&this.ul&&(this.cleanupPositioner=d.autoUpdate(t,this.ul,async()=>{const e=window.innerHeight,i=t.getBoundingClientRect(),s=e-i.bottom,l=i.top,r=Math.max(.75*Math.max(s,l),150),h=s<200&&l>s;this.ul.style.maxHeight=`${r}px`;const{x:u,y:f}=await d.computePosition(t,this.ul,{placement:h?"top-start":"bottom-start",middleware:[d.offset(5),d.flip(),d.shift({padding:5})]});Object.assign(this.ul.style,{left:`${u}px`,top:`${f}px`,position:"absolute",width:`${t.offsetWidth}px`})}))}focusOption(t,e){const i=t[e];if(i){i.focus(),this._focusedOptionId=i.id;const s=this.renderRoot.querySelector(".trigger");if(s&&s.setAttribute("aria-activedescendant",i.id),this.ul&&i.offsetTop!==void 0){const l=i.offsetTop,r=i.offsetHeight,h=this.ul.scrollTop,u=this.ul.clientHeight;l<h?this.ul.scrollTop=l:l+r>h+u&&(this.ul.scrollTop=l+r-u)}}}async openDropdown(t=!1){if(this.disabled)return;this.isOpen=!0,await this.updateComplete;const e=Array.from(this.options||[]),i=this.multi?0:e.findIndex(s=>s.value===String(this.value));this.focusOption(e,Math.max(i,0)),t&&this.reportValidity()}closeDropdown(){this._userInteracted&&(this._touched=!0),this.isOpen=!1,this._focusedOptionId="";const t=this.renderRoot.querySelector(".trigger");t&&(t.removeAttribute("aria-activedescendant"),t?.focus()),this._userInteracted&&this.shouldShowValidation()&&this.checkValidity()}_setupReactivePipelines(){o.fromEvent(this,"option-select").pipe(c.tap(t=>{t.stopPropagation();const e=this.options.find(i=>i.value===t.detail.value);e&&this._optionSelect$.next(e)}),o.takeUntil(this.disconnecting)).subscribe(),this._optionSelect$.pipe(c.withLatestFrom(this._selectedValue$,this._selectedValues$),c.tap(([t,e,i])=>{if(this._userInteracted=!0,this._touched=!0,this._dirty=!0,this.multi){const s=i.indexOf(t.value),l=s>-1?[...i.slice(0,s),...i.slice(s+1)]:[...i,t.value];this._selectedValues$.next(l),this.valueLabel=l.length>0?this.options.filter(r=>l.includes(r.value)).map(r=>r.label||r.textContent||"").join(", "):this.placeholder}else this._selectedValue$.next(t.value),this.valueLabel=t.label||t.textContent||this.placeholder,this.closeDropdown();this.setupOptionsAccessibility(),this._fireChangeEvent()}),o.takeUntil(this.disconnecting)).subscribe(),this._options$.pipe(c.tap(t=>{t.forEach((e,i)=>{e.setAttribute("role","option"),e.tabIndex=-1,e.id||(e.id=`${this.id}-option-${i}`),e.hasAttribute("data-event-bound")||(o.fromEvent(e,"click").pipe(c.tap(s=>{s.stopPropagation()}),o.takeUntil(this.disconnecting)).subscribe(()=>this._optionSelect$.next(e)),e.setAttribute("data-event-bound","true"))})}),o.takeUntil(this.disconnecting)).subscribe(),o.combineLatest([this._selectedValue$,this._selectedValues$,this._options$]).pipe(c.tap(([t,e,i])=>{i.length!==0&&(this.multi?i.forEach(s=>{s.selected=e.includes(s.value)}):i.forEach(s=>{s.selected=s.value===t}))}),o.takeUntil(this.disconnecting)).subscribe()}handleOptionSelect(t){const e=this.options.find(i=>i.value===t);e&&this._optionSelect$.next(e)}_fireChangeEvent(){const t=this.multi?this._selectedValues$.value:this._selectedValue$.value;this.dispatchEvent(new CustomEvent("change",{detail:{value:t},bubbles:!0,composed:!0})),this.checkValidity()}checkValidity(){if(this.disabled)return!0;const t=this.multi&&Array.isArray(this.value)?this.value.length===0:!this.value,e=!(this.required&&t);if(this.isValid=e,this.isValid?(this.validationMessage="",this.internals?.setValidity({})):(this.validationMessage="Please select an option.",this.internals?.setValidity({valueMissing:!0},"Please select an option.",this.inputRef)),this.inputRef&&this.hasUpdated){const i=!this.isValid&&this.shouldShowValidation();this.inputRef.error=i,this.inputRef.hint=i?this.validationMessage:this.hint}return this.isValid}reportValidity(){const t=this.checkValidity();return this.inputRef&&(this.inputRef.error=!t,this.inputRef.hint=t?this.hint:this.validationMessage,t||this.isOpen||this.openDropdown(!1),t||this.inputRef.reportValidity()),t}setCustomValidity(t){this.validationMessage=t,t?(this.isValid=!1,this.internals?.setValidity({customError:!0},t,this.inputRef)):(this.isValid=!0,this.internals?.setValidity({})),this.inputRef&&this.shouldShowValidation()&&(this.inputRef.error=!this.isValid,this.inputRef.hint=this.isValid?this.hint:this.validationMessage)}reset(){this.value=this.defaultValue,this.valueLabel=this.placeholder,this.isValid=!0,this.validationMessage="",this._touched=!1,this._dirty=!1,this._submitted=!1,this._userInteracted=!1,this.internals?.setValidity({}),this.inputRef&&(this.inputRef.error=!1,this.inputRef.hint=this.hint)}render(){const t=!this.isValid&&this.shouldShowValidation()&&!this.isOpen,e=this.isOpen?p.html`<span class="absolute right-3 top-1/2 transform -translate-y-1/2">▲</span>`:p.html`<span class="absolute right-3 top-1/2 transform -translate-y-1/2">▼</span>`;return p.html`
12
12
  <div class="relative ${this.disabled?"opacity-60 cursor-not-allowed":""}">
13
13
  <sch-input
14
14
  .name=${this.name}
@@ -39,7 +39,7 @@
39
39
  </sch-input>
40
40
 
41
41
  <!-- Overlay for capturing clicks outside when dropdown is open -->
42
- ${this.isOpen?d.html` <div class="fixed inset-0 z-10" @click=${this.closeDropdown} tabindex="-1" aria-hidden="true"></div> `:""}
42
+ ${this.isOpen?p.html` <div class="fixed inset-0 z-10" @click=${this.closeDropdown} tabindex="-1" aria-hidden="true"></div> `:""}
43
43
 
44
44
  <ul
45
45
  id="options"
@@ -54,4 +54,4 @@
54
54
  </ul>
55
55
  </div>
56
56
  `}},exports.SchmancySelect.formAssociated=!0,n([a.property({type:String})],exports.SchmancySelect.prototype,"name",2),n([a.property({type:Boolean,reflect:!0})],exports.SchmancySelect.prototype,"required",2),n([a.property({type:Boolean,reflect:!0})],exports.SchmancySelect.prototype,"disabled",2),n([a.property({type:String})],exports.SchmancySelect.prototype,"placeholder",2),n([a.property({type:String,reflect:!0})],exports.SchmancySelect.prototype,"value",1),n([a.property({type:Array})],exports.SchmancySelect.prototype,"values",1),n([a.property({type:Boolean})],exports.SchmancySelect.prototype,"multi",2),n([a.property({type:String})],exports.SchmancySelect.prototype,"label",2),n([a.property({type:String})],exports.SchmancySelect.prototype,"hint",2),n([a.property({type:String})],exports.SchmancySelect.prototype,"validateOn",2),n([a.property({type:String})],exports.SchmancySelect.prototype,"size",2),n([a.state()],exports.SchmancySelect.prototype,"isOpen",2),n([a.state()],exports.SchmancySelect.prototype,"valueLabel",2),n([a.state()],exports.SchmancySelect.prototype,"isValid",2),n([a.property({type:String})],exports.SchmancySelect.prototype,"validationMessage",2),n([a.state()],exports.SchmancySelect.prototype,"defaultValue",2),n([a.query("ul")],exports.SchmancySelect.prototype,"ul",2),n([a.query("sch-input")],exports.SchmancySelect.prototype,"inputRef",2),n([a.queryAssignedElements({flatten:!0})],exports.SchmancySelect.prototype,"options",2),n([a.state()],exports.SchmancySelect.prototype,"_userInteracted",2),n([a.state()],exports.SchmancySelect.prototype,"_touched",2),n([a.state()],exports.SchmancySelect.prototype,"_dirty",2),n([a.state()],exports.SchmancySelect.prototype,"_submitted",2),n([a.state()],exports.SchmancySelect.prototype,"_focusedOptionId",2),exports.SchmancySelect=n([a.customElement("schmancy-select")],exports.SchmancySelect);
57
- //# sourceMappingURL=select-Cod_lOwT.cjs.map
57
+ //# sourceMappingURL=select-BszKwEA_.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-BszKwEA_.cjs","sources":["../src/select/select.ts"],"sourcesContent":["import { autoUpdate, computePosition, flip, offset, shift } from '@floating-ui/dom'\nimport { $LitElement } from '@mixins/index'\nimport { color } from '@schmancy/directives'\nimport SchmancyInput from '@schmancy/input/input'\nimport SchmancyOption from '@schmancy/option/option'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\nimport { css, html, PropertyValues, TemplateResult } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { BehaviorSubject, combineLatest, fromEvent, Subject, takeUntil } from 'rxjs'\nimport { tap, withLatestFrom } from 'rxjs/operators'\n\nexport type SchmancySelectChangeEvent = CustomEvent<{\n\tvalue: string | string[]\n}>\n\n@customElement('schmancy-select')\nexport class SchmancySelect extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t}\n\n\t[role='listbox'] {\n\t\toverflow-y: auto;\n\t\toutline: none;\n\t}\n`) {\n\t// Form association setup\n\tstatic formAssociated = true\n\tprivate internals?: ElementInternals\n\n\t// API\n\t@property({ type: String }) name: string | undefined\n\t@property({ type: Boolean, reflect: true }) required = false\n\t@property({ type: Boolean, reflect: true }) disabled = false\n\t@property({ type: String }) placeholder = ''\n\t@property({ type: String, reflect: true })\n\tget value() {\n\t\treturn this.multi\n\t\t\t? this._selectedValues$.value.join(',')\n\t\t\t: this._selectedValue$.value\n\t}\n\tset value(val: string | string[]) {\n\t\tif (this.multi) {\n\t\t\tconst values = Array.isArray(val)\n\t\t\t\t? val\n\t\t\t\t: val ? String(val).split(',').map(v => v.trim()).filter(Boolean) : []\n\t\t\tthis._selectedValues$.next(values)\n\t\t} else {\n\t\t\tthis._selectedValue$.next(String(val || ''))\n\t\t}\n\t}\n\n\t// Values property for multi-select mode\n\t@property({ type: Array })\n\tget values() {\n\t\treturn [...this._selectedValues$.value]\n\t}\n\tset values(vals: string[]) {\n\t\tthis._selectedValues$.next(Array.isArray(vals) ? [...vals] : [])\n\t}\n\n\t@property({ type: Boolean }) multi = false\n\t@property({ type: String }) label = ''\n\t@property({ type: String }) hint = ''\n\t@property({ type: String }) validateOn: 'always' | 'touched' | 'dirty' | 'submitted' = 'touched'\n\t@property({ type: String }) size: 'sm' | 'md' | 'lg' = 'md'\n\n\t// Internal states\n\t@state() private isOpen = false\n\t@state() private valueLabel = ''\n\t@state() private isValid = true\n\t@property({ type: String }) validationMessage = ''\n\n\t// Store the initial/default value for reset behavior\n\t@state() private defaultValue: string | string[] = ''\n\n\t@query('ul') private ul!: HTMLUListElement\n\t@query('sch-input') private inputRef!: SchmancyInput\n\t@queryAssignedElements({ flatten: true }) private options!: SchmancyOption[]\n\tprivate cleanupPositioner?: () => void\n\n\t// Reactive state management\n\tprivate _options$ = new BehaviorSubject<SchmancyOption[]>([])\n\tprivate _selectedValue$ = new BehaviorSubject<string>('')\n\tprivate _selectedValues$ = new BehaviorSubject<string[]>([])\n\tprivate _optionSelect$ = new Subject<SchmancyOption>()\n\t@state() _userInteracted = false\n\t@state() private _touched = false\n\t@state() private _dirty = false\n\t@state() private _submitted = false\n\n\t// Reference to current focused option (for keyboard navigation)\n\t@state() private _focusedOptionId = ''\n\n\t// Form event handlers\n\tprivate formSubmitHandler = () => {\n\t\tthis._submitted = true\n\t\tthis.checkValidity()\n\t}\n\n\tprivate formResetHandler = () => {\n\t\tthis.reset()\n\t}\n\n\tconstructor() {\n\t\tsuper()\n\t\t// Initialize ElementInternals for form association\n\t\ttry {\n\t\t\tthis.internals = this.attachInternals()\n\t\t} catch (e) {\n\t\t\tconsole.warn('FormAssociated elements not supported in this browser', e)\n\t\t}\n\t}\n\n\tget form() {\n\t\treturn this.internals?.form\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tif (!this.id) {\n\t\t\tthis.id = `schmancy-select-${Math.random().toString(36).substring(2, 9)}`\n\t\t}\n\n\t\t// Store initial value for reset\n\t\tthis.defaultValue = this.value\n\n\t\t// Add keyboard handling to host element\n\t\tfromEvent<KeyboardEvent>(this, 'keydown').pipe(takeUntil(this.disconnecting)).subscribe(this.handleKeyDown)\n\n\t\t// Setup reactive pipelines\n\t\tthis._setupReactivePipelines()\n\n\t\t// Listen for form submission events to mark field as submitted\n\t\tif (this.internals?.form) {\n\t\t\tfromEvent(this.internals.form, 'submit')\n\t\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t\t.subscribe(this.formSubmitHandler)\n\n\t\t\t// Listen for form reset\n\t\t\tfromEvent(this.internals.form, 'reset')\n\t\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t\t.subscribe(this.formResetHandler)\n\t\t}\n\n\t\t// Initially hide any validation errors until user interacts\n\t\tif (this.inputRef) {\n\t\t\tthis.inputRef.error = false\n\t\t}\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.cleanupPositioner?.()\n\t\t// Form event listeners are automatically cleaned up via takeUntil(this.disconnecting)\n\t}\n\n\tfirstUpdated() {\n\t\tthis.syncSelection()\n\t\tthis.setupOptionsAccessibility()\n\t}\n\n\tupdated(changedProps: PropertyValues) {\n\t\tsuper.updated(changedProps)\n\n\t\tif (changedProps.has('value')) {\n\t\t\t// Update form value when component value changes\n\t\t\tconst formValue = Array.isArray(this.value) ? this.value.join(',') : this.value\n\t\t\tthis.internals?.setFormValue(formValue)\n\n\t\t\t// Mark as dirty if value changes from initial value\n\t\t\tif (this.hasUpdated) {\n\t\t\t\tthis._dirty = true\n\t\t\t}\n\n\t\t\t// Check validity based on validation strategy\n\t\t\tif (this.hasUpdated) {\n\t\t\t\tthis.checkValidity()\n\t\t\t}\n\t\t}\n\n\t\t// When open state changes, setup or cleanup the dropdown positioner\n\t\tif (changedProps.has('isOpen')) {\n\t\t\tif (this.isOpen) {\n\t\t\t\tthis.positionDropdown()\n\t\t\t} else {\n\t\t\t\tthis.cleanupPositioner?.()\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Determines if validation errors should be shown based on current state\n\t * and validation strategy\n\t */\n\tprivate shouldShowValidation(forceValidation = false): boolean {\n\t\tif (forceValidation) return true\n\n\t\tswitch (this.validateOn) {\n\t\t\tcase 'always':\n\t\t\t\treturn true\n\t\t\tcase 'touched':\n\t\t\t\treturn this._touched\n\t\t\tcase 'dirty':\n\t\t\t\treturn this._dirty\n\t\t\tcase 'submitted':\n\t\t\t\treturn this._submitted\n\t\t\tdefault:\n\t\t\t\treturn this._touched\n\t\t}\n\t}\n\n\tprivate syncSelection() {\n\t\tif (this.multi) {\n\t\t\t// Read directly from the BehaviorSubject to avoid string conversion issues\n\t\t\tconst selectedValues = this._selectedValues$.value\n\t\t\tthis.options?.forEach(o => (o.selected = selectedValues.includes(o.value))) // Update option selected state\n\t\t\tthis.valueLabel =\n\t\t\t\tselectedValues.length > 0\n\t\t\t\t\t? this.options\n\t\t\t\t\t\t\t?.filter(o => selectedValues.includes(o.value))\n\t\t\t\t\t\t\t.map(o => o.label || o.textContent || '')\n\t\t\t\t\t\t\t.join(', ') || this.placeholder\n\t\t\t\t\t: this.placeholder\n\t\t} else {\n\t\t\t// Single select - read from BehaviorSubject\n\t\t\tconst currentValue = this._selectedValue$.value\n\t\t\tthis.options?.forEach(o => {\n\t\t\t\t// Set selected property on each option based on matching value\n\t\t\t\to.selected = o.value === currentValue\n\t\t\t})\n\t\t\tconst selectedOption = this.options?.find(o => o.value === currentValue)\n\t\t\tthis.valueLabel = selectedOption ? (selectedOption.label || selectedOption.textContent || '') : this.placeholder\n\t\t}\n\t}\n\n\tprivate setupOptionsAccessibility() {\n\t\tthis.options?.forEach((option, index) => {\n\t\t\toption.setAttribute('role', 'option')\n\t\t\tif (!option.id) {\n\t\t\t\toption.id = `${this.id}-option-${index}`\n\t\t\t}\n\n\t\t\t// Set tabindex to -1 so they're focusable programmatically but not in the tab order\n\t\t\toption.tabIndex = -1\n\t\t\tconst selectedValues = Array.isArray(this.value) ? this.value : this.value ? this.value.split(',') : []\n\n\t\t\toption.setAttribute(\n\t\t\t\t'aria-selected',\n\t\t\t\tString(this.multi ? selectedValues.includes(option.value) : option.value === this.value),\n\t\t\t)\n\t\t})\n\t}\n\n\tprivate async positionDropdown() {\n\t\tconst reference = this.renderRoot.querySelector('.trigger') as HTMLElement\n\t\tif (!reference || !this.ul) return\n\n\t\tthis.cleanupPositioner = autoUpdate(reference, this.ul, async () => {\n\t\t\t// Get viewport dimensions\n\t\t\tconst viewportHeight = window.innerHeight\n\t\t\tconst triggerRect = reference.getBoundingClientRect()\n\n\t\t\t// Calculate available space below and above\n\t\t\tconst spaceBelow = viewportHeight - triggerRect.bottom\n\t\t\tconst spaceAbove = triggerRect.top\n\n\t\t\t// Calculate max height - use 75% of the largest available space, but at least 150px\n\t\t\tconst maxHeight = Math.max(Math.max(spaceBelow, spaceAbove) * 0.75, 150)\n\n\t\t\t// Determine if we should flip\n\t\t\tconst shouldFlip = spaceBelow < 200 && spaceAbove > spaceBelow\n\n\t\t\t// Apply max height\n\t\t\tthis.ul.style.maxHeight = `${maxHeight}px`\n\n\t\t\tconst { x, y } = await computePosition(reference, this.ul, {\n\t\t\t\tplacement: shouldFlip ? 'top-start' : 'bottom-start',\n\t\t\t\tmiddleware: [offset(5), flip(), shift({ padding: 5 })],\n\t\t\t})\n\n\t\t\tObject.assign(this.ul.style, {\n\t\t\t\tleft: `${x}px`,\n\t\t\t\ttop: `${y}px`,\n\t\t\t\tposition: 'absolute',\n\t\t\t\twidth: `${reference.offsetWidth}px`, // Match the width of the trigger\n\t\t\t})\n\t\t})\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\t// Don't handle keyboard events when disabled\n\t\tif (this.disabled) {\n\t\t\treturn\n\t\t}\n\n\t\tif (!this.isOpen) {\n\t\t\tif (['Enter', ' ', 'ArrowDown'].includes(e.key)) {\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.openDropdown(false)\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\t// Find current focused option\n\t\tconst options = Array.from(this.options || [])\n\t\tconst current = options.findIndex(o => o.id === this._focusedOptionId) ?? -1\n\n\t\tswitch (e.key) {\n\t\t\tcase 'Escape':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.closeDropdown()\n\t\t\t\tbreak\n\t\t\tcase 'ArrowDown':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, Math.min(current + 1, options.length - 1))\n\t\t\t\tbreak\n\t\t\tcase 'ArrowUp':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, Math.max(current - 1, 0))\n\t\t\t\tbreak\n\t\t\tcase 'Home':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, 0)\n\t\t\t\tbreak\n\t\t\tcase 'End':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, options.length - 1)\n\t\t\t\tbreak\n\t\t\tcase 'Enter':\n\t\t\tcase ' ':\n\t\t\t\te.preventDefault()\n\t\t\t\tif (this._focusedOptionId) {\n\t\t\t\t\tconst focusedOption = options.find(opt => opt.id === this._focusedOptionId)\n\t\t\t\t\tif (focusedOption) {\n\t\t\t\t\t\tthis.handleOptionSelect(focusedOption.value)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\tcase 'Tab':\n\t\t\t\tthis.closeDropdown()\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\tprivate focusOption(options: SchmancyOption[], index: number) {\n\t\tconst option = options[index]\n\t\tif (option) {\n\t\t\toption.focus()\n\t\t\tthis._focusedOptionId = option.id\n\n\t\t\t// Update aria-activedescendant on the combobox\n\t\t\tconst combobox = this.renderRoot.querySelector('.trigger')\n\t\t\tif (combobox) {\n\t\t\t\tcombobox.setAttribute('aria-activedescendant', option.id)\n\t\t\t}\n\n\t\t\t// Ensure option is visible in the scrollable area\n\t\t\tif (this.ul && option.offsetTop !== undefined) {\n\t\t\t\t// Get position info\n\t\t\t\tconst optionTop = option.offsetTop\n\t\t\t\tconst optionHeight = option.offsetHeight\n\t\t\t\tconst scrollTop = this.ul.scrollTop\n\t\t\t\tconst ulHeight = this.ul.clientHeight\n\n\t\t\t\t// Scroll into view if needed\n\t\t\t\tif (optionTop < scrollTop) {\n\t\t\t\t\tthis.ul.scrollTop = optionTop\n\t\t\t\t} else if (optionTop + optionHeight > scrollTop + ulHeight) {\n\t\t\t\t\tthis.ul.scrollTop = optionTop + optionHeight - ulHeight\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate async openDropdown(report = false) {\n\t\t// Don't open if disabled\n\t\tif (this.disabled) {\n\t\t\treturn\n\t\t}\n\n\t\t// Don't mark as touched on opening - we'll do that on closing\n\t\t// so errors only show after interaction is complete\n\n\t\tthis.isOpen = true\n\t\tawait this.updateComplete\n\n\t\t// Focus first or selected option\n\t\tconst options = Array.from(this.options || [])\n\t\tconst selectedIndex = this.multi ? 0 : options.findIndex(o => o.value === String(this.value))\n\n\t\tthis.focusOption(options, Math.max(selectedIndex, 0))\n\n\t\t// Don't automatically validate when opening\n\t\t// Only validate if explicitly requested (like from a form submission)\n\t\tif (report) this.reportValidity()\n\t}\n\n\tprivate closeDropdown() {\n\t\t// Only mark as touched if the user actually interacted with the component\n\t\t// and made a selection or explicitly closed it without selecting\n\t\tif (this._userInteracted) {\n\t\t\tthis._touched = true\n\t\t}\n\n\t\tthis.isOpen = false\n\t\tthis._focusedOptionId = ''\n\n\t\t// Update combobox to remove aria-activedescendant\n\t\tconst combobox = this.renderRoot.querySelector<HTMLElement>('.trigger')\n\t\tif (combobox) {\n\t\t\tcombobox.removeAttribute('aria-activedescendant')\n\t\t\tcombobox?.focus()\n\t\t}\n\n\t\t// Only check validity when closing if the user has actually interacted\n\t\t// with the component and validation should be shown\n\t\tif (this._userInteracted && this.shouldShowValidation()) {\n\t\t\tthis.checkValidity()\n\t\t}\n\t}\n\n\tprivate _setupReactivePipelines() {\n\t\t// Listen for option-select events from child options\n\t\tfromEvent<CustomEvent>(this, 'option-select')\n\t\t\t.pipe(\n\t\t\t\ttap((e) => {\n\t\t\t\t\te.stopPropagation() // Prevent event from bubbling further\n\t\t\t\t\tconst option = this.options.find(o => o.value === e.detail.value)\n\t\t\t\t\tif (option) {\n\t\t\t\t\t\tthis._optionSelect$.next(option)\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\t// Handle option selection through reactive pipeline\n\t\tthis._optionSelect$\n\t\t\t.pipe(\n\t\t\t\twithLatestFrom(this._selectedValue$, this._selectedValues$),\n\t\t\t\ttap(([option, _, currentValues]) => {\n\t\t\t\t\tthis._userInteracted = true\n\t\t\t\t\tthis._touched = true\n\t\t\t\t\tthis._dirty = true\n\n\t\t\t\t\tif (this.multi) {\n\t\t\t\t\t\tconst index = currentValues.indexOf(option.value)\n\t\t\t\t\t\tconst newValues = index > -1\n\t\t\t\t\t\t\t? [...currentValues.slice(0, index), ...currentValues.slice(index + 1)]\n\t\t\t\t\t\t\t: [...currentValues, option.value]\n\t\t\t\t\t\tthis._selectedValues$.next(newValues)\n\n\t\t\t\t\t\t// Update display label\n\t\t\t\t\t\tthis.valueLabel = newValues.length > 0\n\t\t\t\t\t\t\t? this.options\n\t\t\t\t\t\t\t\t\t.filter(o => newValues.includes(o.value))\n\t\t\t\t\t\t\t\t\t.map(o => o.label || o.textContent || '')\n\t\t\t\t\t\t\t\t\t.join(', ')\n\t\t\t\t\t\t\t: this.placeholder\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Single select\n\t\t\t\t\t\tthis._selectedValue$.next(option.value)\n\t\t\t\t\t\tthis.valueLabel = option.label || option.textContent || this.placeholder\n\t\t\t\t\t\tthis.closeDropdown()\n\t\t\t\t\t}\n\n\t\t\t\t\t// Update the option's accessibility state\n\t\t\t\t\tthis.setupOptionsAccessibility()\n\n\t\t\t\t\t// Dispatch change event\n\t\t\t\t\tthis._fireChangeEvent()\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\t// Options management pipeline - bind pointerdown events exactly like autocomplete\n\t\tthis._options$\n\t\t\t.pipe(\n\t\t\t\ttap((options) => {\n\t\t\t\t\toptions.forEach((option, index) => {\n\t\t\t\t\t\toption.setAttribute('role', 'option')\n\t\t\t\t\t\toption.tabIndex = -1\n\t\t\t\t\t\tif (!option.id) {\n\t\t\t\t\t\t\toption.id = `${this.id}-option-${index}`\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Use data-event-bound to prevent duplicate bindings\n\t\t\t\t\t\tif (!option.hasAttribute('data-event-bound')) {\n\t\t\t\t\t\t\t// Use click event instead of pointerdown for better mobile UX\n\t\t\t\t\t\t\t// This allows users to scroll through options without immediately selecting\n\t\t\t\t\t\t\tfromEvent(option, 'click').pipe(\n\t\t\t\t\t\t\t\ttap(e => {\n\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t\t\t\t\t).subscribe(() => this._optionSelect$.next(option))\n\t\t\t\t\t\t\toption.setAttribute('data-event-bound', 'true')\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\t// Selection sync pipeline - sync selected states with value changes\n\t\tcombineLatest([this._selectedValue$, this._selectedValues$, this._options$])\n\t\t\t.pipe(\n\t\t\t\ttap(([singleValue, multiValues, options]) => {\n\t\t\t\t\tif (options.length === 0) return\n\n\t\t\t\t\tif (this.multi) {\n\t\t\t\t\t\toptions.forEach(option => {\n\t\t\t\t\t\t\toption.selected = multiValues.includes(option.value)\n\t\t\t\t\t\t})\n\t\t\t\t\t} else {\n\t\t\t\t\t\toptions.forEach(option => {\n\t\t\t\t\t\t\toption.selected = option.value === singleValue\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\tprivate handleOptionSelect(value: string) {\n\t\t// This method is now called from keyboard navigation only\n\t\tconst option = this.options.find(o => o.value === value)\n\t\tif (option) {\n\t\t\tthis._optionSelect$.next(option)\n\t\t}\n\t}\n\n\tprivate _fireChangeEvent() {\n\t\t// Get the current value based on multi/single mode\n\t\tconst value = this.multi ? this._selectedValues$.value : this._selectedValue$.value\n\n\t\t// Dispatch only one change event with the value in detail\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent<SchmancySelectChangeEvent['detail']>('change', {\n\t\t\t\tdetail: { value },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\n\t\t// Then check validity (only show error if validation should be shown)\n\t\tthis.checkValidity()\n\t}\n\n\tpublic checkValidity(): boolean {\n\t\t// Disabled fields are always valid\n\t\tif (this.disabled) {\n\t\t\treturn true\n\t\t}\n\n\t\t// Determine if the select is empty based on whether it's multi-select or single-select\n\t\tconst isEmpty = this.multi ? (Array.isArray(this.value) ? this.value.length === 0 : !this.value) : !this.value\n\n\t\t// Check if the value is valid (not empty when required)\n\t\tconst isValid = !(this.required && isEmpty)\n\n\t\t// Set the validity state\n\t\tthis.isValid = isValid\n\n\t\tif (!this.isValid) {\n\t\t\tthis.validationMessage = 'Please select an option.'\n\t\t\tthis.internals?.setValidity({ valueMissing: true }, 'Please select an option.', this.inputRef)\n\t\t} else {\n\t\t\t// Clear validation message\n\t\t\tthis.validationMessage = ''\n\t\t\tthis.internals?.setValidity({})\n\t\t}\n\n\t\t// Update the input component to reflect our validation state\n\t\tif (this.inputRef && this.hasUpdated) {\n\t\t\tconst showError = !this.isValid && this.shouldShowValidation()\n\t\t\tthis.inputRef.error = showError\n\t\t\tthis.inputRef.hint = showError ? this.validationMessage : this.hint\n\t\t}\n\n\t\treturn this.isValid\n\t}\n\n\tpublic reportValidity(): boolean {\n\t\t// Force validation display regardless of validation strategy\n\t\tconst valid = this.checkValidity()\n\n\t\t// Force the input to show validation errors\n\t\tif (this.inputRef) {\n\t\t\t// Set the input's error state\n\t\t\tthis.inputRef.error = !valid\n\t\t\tthis.inputRef.hint = !valid ? this.validationMessage : this.hint\n\n\t\t\t// If invalid and not already open, automatically open the dropdown to show options\n\t\t\tif (!valid && !this.isOpen) {\n\t\t\t\t// Open the dropdown but don't mark as user interaction yet\n\t\t\t\t// This helps users immediately see available options when validation fails\n\t\t\t\tthis.openDropdown(false)\n\t\t\t}\n\n\t\t\t// Only call reportValidity on the input if invalid to show the native popup\n\t\t\tif (!valid) {\n\t\t\t\tthis.inputRef.reportValidity()\n\t\t\t}\n\t\t}\n\n\t\treturn valid\n\t}\n\n\tpublic setCustomValidity(message: string) {\n\t\tthis.validationMessage = message\n\t\tif (message) {\n\t\t\tthis.isValid = false\n\t\t\tthis.internals?.setValidity({ customError: true }, message, this.inputRef)\n\t\t} else {\n\t\t\tthis.isValid = true\n\t\t\tthis.internals?.setValidity({})\n\t\t}\n\n\t\t// Update input if needed\n\t\tif (this.inputRef && this.shouldShowValidation()) {\n\t\t\tthis.inputRef.error = !this.isValid\n\t\t\tthis.inputRef.hint = !this.isValid ? this.validationMessage : this.hint\n\t\t}\n\t}\n\n\tpublic reset() {\n\t\t// Reset to initial value\n\t\tthis.value = this.defaultValue\n\t\tthis.valueLabel = this.placeholder\n\t\tthis.isValid = true\n\t\tthis.validationMessage = ''\n\t\tthis._touched = false\n\t\tthis._dirty = false\n\t\tthis._submitted = false\n\t\tthis._userInteracted = false\n\t\tthis.internals?.setValidity({})\n\n\t\tif (this.inputRef) {\n\t\t\tthis.inputRef.error = false\n\t\t\tthis.inputRef.hint = this.hint\n\t\t}\n\t}\n\n\trender(): TemplateResult {\n\t\t// Determine if we should show errors based on the validation strategy and interaction\n\t\t// Never show errors on initial render or if the dropdown is open\n\t\tconst showErrors = !this.isValid && this.shouldShowValidation() && !this.isOpen\n\n\t\t// Add caret icon based on open state\n\t\tconst caretIcon = this.isOpen\n\t\t\t? html`<span class=\"absolute right-3 top-1/2 transform -translate-y-1/2\">▲</span>`\n\t\t\t: html`<span class=\"absolute right-3 top-1/2 transform -translate-y-1/2\">▼</span>`\n\n\t\treturn html`\n\t\t\t<div class=\"relative ${this.disabled ? 'opacity-60 cursor-not-allowed' : ''}\">\n\t\t\t\t<sch-input\n\t\t\t\t\t.name=${this.name}\n\t\t\t\t\ttabIndex=${this.disabled ? '-1' : '0'}\n\t\t\t\t\tclass=\"trigger\"\n\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\taria-expanded=${this.isOpen}\n\t\t\t\t\taria-controls=\"options\"\n\t\t\t\t\taria-autocomplete=\"none\"\n\t\t\t\t\taria-required=${this.required}\n\t\t\t\t\taria-activedescendant=${this._focusedOptionId || undefined}\n\t\t\t\t\taria-disabled=${this.disabled}\n\t\t\t\t\t.label=${this.label}\n\t\t\t\t\t.placeholder=${this.placeholder}\n\t\t\t\t\t.value=${this.valueLabel}\n\t\t\t\t\t.required=${this.required}\n\t\t\t\t\t.disabled=${this.disabled}\n\t\t\t\t\t.hint=${showErrors ? this.validationMessage : this.hint}\n\t\t\t\t\t.error=${showErrors}\n\t\t\t\t\t.validateOn=${this.validateOn}\n\t\t\t\t\t.size=${this.size}\n\t\t\t\t\treadonly\n\t\t\t\t\tclickable\n\t\t\t\t\t@click=${(e: MouseEvent) => {\n\t\t\t\t\t\t// Don't process clicks if disabled\n\t\t\t\t\t\tif (this.disabled) {\n\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// On first click, don't count this as user interaction yet\n\t\t\t\t\t\tif (!this.isOpen) {\n\t\t\t\t\t\t\t// Open without triggering validation - we'll validate when they close\n\t\t\t\t\t\t\tthis.openDropdown(false)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Mark as interacted when they close the dropdown\n\t\t\t\t\t\t\tthis._userInteracted = true\n\t\t\t\t\t\t\tthis.closeDropdown()\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t${caretIcon}\n\t\t\t\t</sch-input>\n\n\t\t\t\t<!-- Overlay for capturing clicks outside when dropdown is open -->\n\t\t\t\t${this.isOpen\n\t\t\t\t\t? html` <div class=\"fixed inset-0 z-10\" @click=${this.closeDropdown} tabindex=\"-1\" aria-hidden=\"true\"></div> `\n\t\t\t\t\t: ''}\n\n\t\t\t\t<ul\n\t\t\t\t\tid=\"options\"\n\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\taria-multiselectable=${this.multi}\n\t\t\t\t\tclass=${classMap({\n\t\t\t\t\t\t'absolute min-w-full w-full z-20 mt-1 rounded-md shadow-lg': true,\n\t\t\t\t\t\thidden: !this.isOpen,\n\t\t\t\t\t})}\n\t\t\t\t\t${color({\n\t\t\t\t\t\tbgColor: SchmancyTheme.sys.color.surface.low,\n\t\t\t\t\t\tcolor: SchmancyTheme.sys.color.surface.on,\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t<slot\n\t\t\t\t\t\t@slotchange=${() => {\n\t\t\t\t\t\t\tthis._options$.next(this.options)\n\t\t\t\t\t\t\t// Sync selection state when options re-render\n\t\t\t\t\t\t\tthis.syncSelection()\n\t\t\t\t\t\t}}\n\t\t\t\t\t></slot>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\n// Don't export 'select' here as it conflicts with the store's select decorator\n// export const select = SchmancySelect\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-select': SchmancySelect\n\t}\n}\n"],"names":["SchmancySelect","$LitElement","css","super","this","required","disabled","placeholder","multi","label","hint","validateOn","size","isOpen","valueLabel","isValid","validationMessage","defaultValue","_options$","BehaviorSubject","_selectedValue$","_selectedValues$","_optionSelect$","Subject","_userInteracted","_touched","_dirty","_submitted","_focusedOptionId","formSubmitHandler","checkValidity","formResetHandler","reset","handleKeyDown","e","includes","key","preventDefault","openDropdown","options","Array","from","current","findIndex","o","id","closeDropdown","focusOption","Math","min","length","max","focusedOption","find","opt","handleOptionSelect","value","internals","attachInternals","join","val","values","isArray","String","split","map","v","trim","filter","Boolean","next","vals","form","connectedCallback","random","toString","substring","fromEvent","pipe","takeUntil","disconnecting","subscribe","_setupReactivePipelines","inputRef","error","disconnectedCallback","cleanupPositioner","syncSelection","setupOptionsAccessibility","changedProps","updated","has","formValue","setFormValue","hasUpdated","positionDropdown","forceValidation","selectedValues","forEach","selected","textContent","currentValue","selectedOption","option","index","setAttribute","tabIndex","reference","renderRoot","querySelector","ul","autoUpdate","async","viewportHeight","window","innerHeight","triggerRect","getBoundingClientRect","spaceBelow","bottom","spaceAbove","top","maxHeight","shouldFlip","style","x","y","computePosition","placement","middleware","offset","flip","shift","padding","Object","assign","left","position","width","offsetWidth","focus","combobox","offsetTop","optionTop","optionHeight","offsetHeight","scrollTop","ulHeight","clientHeight","report","updateComplete","selectedIndex","reportValidity","removeAttribute","shouldShowValidation","tap","stopPropagation","detail","withLatestFrom","_","currentValues","indexOf","newValues","slice","_fireChangeEvent","hasAttribute","combineLatest","singleValue","multiValues","dispatchEvent","CustomEvent","bubbles","composed","isEmpty","setValidity","valueMissing","showError","valid","message","customError","render","showErrors","caretIcon","html","name","classMap","hidden","color","bgColor","SchmancyTheme","sys","surface","low","on","formAssociated","__decorateClass","property","type","prototype","reflect","state","query","queryAssignedElements","flatten","customElement"],"mappings":"ynBAiBaA,QAAAA,eAAN,cAA6BC,EAAAA,YAAYC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAyF/C,CAAA,CAAA,cACCC,MAAAA,EAzE2CC,KAAAC,SAAAA,GACAD,KAAAE,SAAAA,GAChBF,KAAAG,YAAc,GA2BbH,KAAAI,MAAAA,GACDJ,KAAAK,MAAQ,GACRL,KAAAM,KAAO,GACPN,KAAAO,WAA2D,UAC3DP,KAAAQ,KAA2B,KAG9CR,KAAQS,OAAAA,GACRT,KAAQU,WAAa,GACrBV,KAAQW,QAAAA,GACWX,KAAAY,kBAAoB,GAGvCZ,KAAQa,aAAkC,GAQnDb,KAAQc,UAAY,IAAIC,EAAAA,gBAAkC,CAAA,CAAA,EAC1Df,KAAQgB,gBAAkB,IAAID,EAAAA,gBAAwB,IACtDf,KAAQiB,iBAAmB,IAAIF,EAAAA,gBAA0B,IACzDf,KAAQkB,eAAiB,IAAIC,UACpBnB,KAAAoB,gBAAAA,GACApB,KAAQqB,SAAAA,GACRrB,KAAQsB,OAAAA,GACRtB,KAAQuB,cAGRvB,KAAQwB,iBAAmB,GAGpCxB,KAAQyB,kBAAoB,IAAA,CAC3BzB,KAAKuB,WAAAA,GACLvB,KAAK0B,cAAAA,CAAAA,EAGN1B,KAAQ2B,iBAAmB,IAAA,CAC1B3B,KAAK4B,MAAAA,CAAAA,EA6LN5B,KAAQ6B,cAAiBC,GAAAA,CAExB,GAAI9B,KAAKE,SACR,OAGD,GAAA,CAAKF,KAAKS,OAKT,OAAA,KAJI,CAAC,QAAS,IAAK,aAAasB,SAASD,EAAEE,GAAAA,IAC1CF,EAAEG,iBACFjC,KAAKkC,aAAAA,EAAa,IAMpB,MAAMC,EAAUC,MAAMC,KAAKrC,KAAKmC,SAAW,CAAA,CAAA,EACrCG,EAA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A/DtB3M,uBA+DsCsM,UAAA,UAAA,CAAA,EAQzCH,EAAA,CAARK,EAAAA,MAAAA,CAAAA,EAvEWxM,uBAuEHsM,UAAA,kBAAA,CAAA,EACQH,EAAA,CAAhBK,EAAAA,MAAAA,CAAAA,EAxEWxM,uBAwEKsM,UAAA,WAAA,CAAA,EACAH,EAAA,CAAhBK,EAAAA,MAAAA,CAAAA,EAzEWxM,uBAyEKsM,UAAA,SAAA,CAAA,EACAH,EAAA,CAAhBK,EAAAA,MAAAA,CAAAA,EA1EWxM,uBA0EKsM,UAAA,aAAA,CAAA,EAGAH,EAAA,CAAhBK,EAAAA,MAAAA,CAAAA,EA7EWxM,uBA6EKsM,UAAA,mBAAA,CAAA,EA7ELtM,QAAAA,eAANmM,EAAA,CADNS,EAAAA,cAAc,oBACF5M"}
@@ -1,20 +1,20 @@
1
1
  import { autoUpdate as _, computePosition as $, offset as V, flip as w, shift as O } from "@floating-ui/dom";
2
- import { BehaviorSubject as y, Subject as x, fromEvent as u, takeUntil as p, combineLatest as S } from "rxjs";
2
+ import { BehaviorSubject as v, Subject as x, fromEvent as u, takeUntil as p, combineLatest as S } from "rxjs";
3
3
  import { classMap as A } from "lit/directives/class-map.js";
4
4
  import "lit/directives/style-map.js";
5
- import { property as r, state as h, query as b, queryAssignedElements as k, customElement as D } from "lit/decorators.js";
5
+ import { property as r, state as h, query as b, queryAssignedElements as k, customElement as R } from "lit/decorators.js";
6
6
  import "./tailwind.mixin-9XFzAXGw.js";
7
- import { $ as R } from "./litElement.mixin-Bv6DGuhe.js";
7
+ import { $ as D } from "./litElement.mixin-Bv6DGuhe.js";
8
8
  import { c as I } from "./ripple-Cy-nvO8W.js";
9
9
  import "lit/directives/guard.js";
10
10
  import { S as m } from "./theme.interface-C5Kj6WjD.js";
11
- import { css as E, html as v } from "lit";
11
+ import { css as E, html as y } from "lit";
12
12
  import { tap as c, withLatestFrom as M } from "rxjs/operators";
13
13
  var C = Object.defineProperty, P = Object.getOwnPropertyDescriptor, a = (t, e, i, s) => {
14
14
  for (var n, l = s > 1 ? void 0 : s ? P(e, i) : e, d = t.length - 1; d >= 0; d--) (n = t[d]) && (l = (s ? n(e, i, l) : n(l)) || l);
15
15
  return s && l && C(e, i, l), l;
16
16
  };
17
- let o = class extends R(E`
17
+ let o = class extends D(E`
18
18
  :host {
19
19
  display: block;
20
20
  position: relative;
@@ -26,7 +26,7 @@ let o = class extends R(E`
26
26
  }
27
27
  `) {
28
28
  constructor() {
29
- super(), this.required = !1, this.disabled = !1, this.placeholder = "", this.multi = !1, this.label = "", this.hint = "", this.validateOn = "touched", this.size = "md", this.isOpen = !1, this.valueLabel = "", this.isValid = !0, this.validationMessage = "", this.defaultValue = "", this._options$ = new y([]), this._selectedValue$ = new y(""), this._selectedValues$ = new y([]), this._optionSelect$ = new x(), this._userInteracted = !1, this._touched = !1, this._dirty = !1, this._submitted = !1, this._focusedOptionId = "", this.formSubmitHandler = () => {
29
+ super(), this.required = !1, this.disabled = !1, this.placeholder = "", this.multi = !1, this.label = "", this.hint = "", this.validateOn = "touched", this.size = "md", this.isOpen = !1, this.valueLabel = "", this.isValid = !0, this.validationMessage = "", this.defaultValue = "", this._options$ = new v([]), this._selectedValue$ = new v(""), this._selectedValues$ = new v([]), this._optionSelect$ = new x(), this._userInteracted = !1, this._touched = !1, this._dirty = !1, this._submitted = !1, this._focusedOptionId = "", this.formSubmitHandler = () => {
30
30
  this._submitted = !0, this.checkValidity();
31
31
  }, this.formResetHandler = () => {
32
32
  this.reset();
@@ -178,8 +178,8 @@ let o = class extends R(E`
178
178
  this.setupOptionsAccessibility(), this._fireChangeEvent();
179
179
  }), p(this.disconnecting)).subscribe(), this._options$.pipe(c((t) => {
180
180
  t.forEach((e, i) => {
181
- e.setAttribute("role", "option"), e.tabIndex = -1, e.id || (e.id = `${this.id}-option-${i}`), e.hasAttribute("data-event-bound") || (u(e, "pointerdown").pipe(c((s) => {
182
- s.preventDefault(), s.stopPropagation();
181
+ e.setAttribute("role", "option"), e.tabIndex = -1, e.id || (e.id = `${this.id}-option-${i}`), e.hasAttribute("data-event-bound") || (u(e, "click").pipe(c((s) => {
182
+ s.stopPropagation();
183
183
  }), p(this.disconnecting)).subscribe(() => this._optionSelect$.next(e)), e.setAttribute("data-event-bound", "true"));
184
184
  });
185
185
  }), p(this.disconnecting)).subscribe(), S([this._selectedValue$, this._selectedValues$, this._options$]).pipe(c(([t, e, i]) => {
@@ -218,8 +218,8 @@ let o = class extends R(E`
218
218
  this.value = this.defaultValue, this.valueLabel = this.placeholder, this.isValid = !0, this.validationMessage = "", this._touched = !1, this._dirty = !1, this._submitted = !1, this._userInteracted = !1, this.internals?.setValidity({}), this.inputRef && (this.inputRef.error = !1, this.inputRef.hint = this.hint);
219
219
  }
220
220
  render() {
221
- const t = !this.isValid && this.shouldShowValidation() && !this.isOpen, e = this.isOpen ? v`<span class="absolute right-3 top-1/2 transform -translate-y-1/2">▲</span>` : v`<span class="absolute right-3 top-1/2 transform -translate-y-1/2">▼</span>`;
222
- return v`
221
+ const t = !this.isValid && this.shouldShowValidation() && !this.isOpen, e = this.isOpen ? y`<span class="absolute right-3 top-1/2 transform -translate-y-1/2">▲</span>` : y`<span class="absolute right-3 top-1/2 transform -translate-y-1/2">▼</span>`;
222
+ return y`
223
223
  <div class="relative ${this.disabled ? "opacity-60 cursor-not-allowed" : ""}">
224
224
  <sch-input
225
225
  .name=${this.name}
@@ -253,7 +253,7 @@ let o = class extends R(E`
253
253
  </sch-input>
254
254
 
255
255
  <!-- Overlay for capturing clicks outside when dropdown is open -->
256
- ${this.isOpen ? v` <div class="fixed inset-0 z-10" @click=${this.closeDropdown} tabindex="-1" aria-hidden="true"></div> ` : ""}
256
+ ${this.isOpen ? y` <div class="fixed inset-0 z-10" @click=${this.closeDropdown} tabindex="-1" aria-hidden="true"></div> ` : ""}
257
257
 
258
258
  <ul
259
259
  id="options"
@@ -272,8 +272,8 @@ let o = class extends R(E`
272
272
  `;
273
273
  }
274
274
  };
275
- o.formAssociated = !0, a([r({ type: String })], o.prototype, "name", 2), a([r({ type: Boolean, reflect: !0 })], o.prototype, "required", 2), a([r({ type: Boolean, reflect: !0 })], o.prototype, "disabled", 2), a([r({ type: String })], o.prototype, "placeholder", 2), a([r({ type: String, reflect: !0 })], o.prototype, "value", 1), a([r({ type: Array })], o.prototype, "values", 1), a([r({ type: Boolean })], o.prototype, "multi", 2), a([r({ type: String })], o.prototype, "label", 2), a([r({ type: String })], o.prototype, "hint", 2), a([r({ type: String })], o.prototype, "validateOn", 2), a([r({ type: String })], o.prototype, "size", 2), a([h()], o.prototype, "isOpen", 2), a([h()], o.prototype, "valueLabel", 2), a([h()], o.prototype, "isValid", 2), a([r({ type: String })], o.prototype, "validationMessage", 2), a([h()], o.prototype, "defaultValue", 2), a([b("ul")], o.prototype, "ul", 2), a([b("sch-input")], o.prototype, "inputRef", 2), a([k({ flatten: !0 })], o.prototype, "options", 2), a([h()], o.prototype, "_userInteracted", 2), a([h()], o.prototype, "_touched", 2), a([h()], o.prototype, "_dirty", 2), a([h()], o.prototype, "_submitted", 2), a([h()], o.prototype, "_focusedOptionId", 2), o = a([D("schmancy-select")], o);
275
+ o.formAssociated = !0, a([r({ type: String })], o.prototype, "name", 2), a([r({ type: Boolean, reflect: !0 })], o.prototype, "required", 2), a([r({ type: Boolean, reflect: !0 })], o.prototype, "disabled", 2), a([r({ type: String })], o.prototype, "placeholder", 2), a([r({ type: String, reflect: !0 })], o.prototype, "value", 1), a([r({ type: Array })], o.prototype, "values", 1), a([r({ type: Boolean })], o.prototype, "multi", 2), a([r({ type: String })], o.prototype, "label", 2), a([r({ type: String })], o.prototype, "hint", 2), a([r({ type: String })], o.prototype, "validateOn", 2), a([r({ type: String })], o.prototype, "size", 2), a([h()], o.prototype, "isOpen", 2), a([h()], o.prototype, "valueLabel", 2), a([h()], o.prototype, "isValid", 2), a([r({ type: String })], o.prototype, "validationMessage", 2), a([h()], o.prototype, "defaultValue", 2), a([b("ul")], o.prototype, "ul", 2), a([b("sch-input")], o.prototype, "inputRef", 2), a([k({ flatten: !0 })], o.prototype, "options", 2), a([h()], o.prototype, "_userInteracted", 2), a([h()], o.prototype, "_touched", 2), a([h()], o.prototype, "_dirty", 2), a([h()], o.prototype, "_submitted", 2), a([h()], o.prototype, "_focusedOptionId", 2), o = a([R("schmancy-select")], o);
276
276
  export {
277
277
  o as S
278
278
  };
279
- //# sourceMappingURL=select-BxlDe36e.js.map
279
+ //# sourceMappingURL=select-CHgsFxnz.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-CHgsFxnz.js","sources":["../src/select/select.ts"],"sourcesContent":["import { autoUpdate, computePosition, flip, offset, shift } from '@floating-ui/dom'\nimport { $LitElement } from '@mixins/index'\nimport { color } from '@schmancy/directives'\nimport SchmancyInput from '@schmancy/input/input'\nimport SchmancyOption from '@schmancy/option/option'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\nimport { css, html, PropertyValues, TemplateResult } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { BehaviorSubject, combineLatest, fromEvent, Subject, takeUntil } from 'rxjs'\nimport { tap, withLatestFrom } from 'rxjs/operators'\n\nexport type SchmancySelectChangeEvent = CustomEvent<{\n\tvalue: string | string[]\n}>\n\n@customElement('schmancy-select')\nexport class SchmancySelect extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t}\n\n\t[role='listbox'] {\n\t\toverflow-y: auto;\n\t\toutline: none;\n\t}\n`) {\n\t// Form association setup\n\tstatic formAssociated = true\n\tprivate internals?: ElementInternals\n\n\t// API\n\t@property({ type: String }) name: string | undefined\n\t@property({ type: Boolean, reflect: true }) required = false\n\t@property({ type: Boolean, reflect: true }) disabled = false\n\t@property({ type: String }) placeholder = ''\n\t@property({ type: String, reflect: true })\n\tget value() {\n\t\treturn this.multi\n\t\t\t? this._selectedValues$.value.join(',')\n\t\t\t: this._selectedValue$.value\n\t}\n\tset value(val: string | string[]) {\n\t\tif (this.multi) {\n\t\t\tconst values = Array.isArray(val)\n\t\t\t\t? val\n\t\t\t\t: val ? String(val).split(',').map(v => v.trim()).filter(Boolean) : []\n\t\t\tthis._selectedValues$.next(values)\n\t\t} else {\n\t\t\tthis._selectedValue$.next(String(val || ''))\n\t\t}\n\t}\n\n\t// Values property for multi-select mode\n\t@property({ type: Array })\n\tget values() {\n\t\treturn [...this._selectedValues$.value]\n\t}\n\tset values(vals: string[]) {\n\t\tthis._selectedValues$.next(Array.isArray(vals) ? [...vals] : [])\n\t}\n\n\t@property({ type: Boolean }) multi = false\n\t@property({ type: String }) label = ''\n\t@property({ type: String }) hint = ''\n\t@property({ type: String }) validateOn: 'always' | 'touched' | 'dirty' | 'submitted' = 'touched'\n\t@property({ type: String }) size: 'sm' | 'md' | 'lg' = 'md'\n\n\t// Internal states\n\t@state() private isOpen = false\n\t@state() private valueLabel = ''\n\t@state() private isValid = true\n\t@property({ type: String }) validationMessage = ''\n\n\t// Store the initial/default value for reset behavior\n\t@state() private defaultValue: string | string[] = ''\n\n\t@query('ul') private ul!: HTMLUListElement\n\t@query('sch-input') private inputRef!: SchmancyInput\n\t@queryAssignedElements({ flatten: true }) private options!: SchmancyOption[]\n\tprivate cleanupPositioner?: () => void\n\n\t// Reactive state management\n\tprivate _options$ = new BehaviorSubject<SchmancyOption[]>([])\n\tprivate _selectedValue$ = new BehaviorSubject<string>('')\n\tprivate _selectedValues$ = new BehaviorSubject<string[]>([])\n\tprivate _optionSelect$ = new Subject<SchmancyOption>()\n\t@state() _userInteracted = false\n\t@state() private _touched = false\n\t@state() private _dirty = false\n\t@state() private _submitted = false\n\n\t// Reference to current focused option (for keyboard navigation)\n\t@state() private _focusedOptionId = ''\n\n\t// Form event handlers\n\tprivate formSubmitHandler = () => {\n\t\tthis._submitted = true\n\t\tthis.checkValidity()\n\t}\n\n\tprivate formResetHandler = () => {\n\t\tthis.reset()\n\t}\n\n\tconstructor() {\n\t\tsuper()\n\t\t// Initialize ElementInternals for form association\n\t\ttry {\n\t\t\tthis.internals = this.attachInternals()\n\t\t} catch (e) {\n\t\t\tconsole.warn('FormAssociated elements not supported in this browser', e)\n\t\t}\n\t}\n\n\tget form() {\n\t\treturn this.internals?.form\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tif (!this.id) {\n\t\t\tthis.id = `schmancy-select-${Math.random().toString(36).substring(2, 9)}`\n\t\t}\n\n\t\t// Store initial value for reset\n\t\tthis.defaultValue = this.value\n\n\t\t// Add keyboard handling to host element\n\t\tfromEvent<KeyboardEvent>(this, 'keydown').pipe(takeUntil(this.disconnecting)).subscribe(this.handleKeyDown)\n\n\t\t// Setup reactive pipelines\n\t\tthis._setupReactivePipelines()\n\n\t\t// Listen for form submission events to mark field as submitted\n\t\tif (this.internals?.form) {\n\t\t\tfromEvent(this.internals.form, 'submit')\n\t\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t\t.subscribe(this.formSubmitHandler)\n\n\t\t\t// Listen for form reset\n\t\t\tfromEvent(this.internals.form, 'reset')\n\t\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t\t.subscribe(this.formResetHandler)\n\t\t}\n\n\t\t// Initially hide any validation errors until user interacts\n\t\tif (this.inputRef) {\n\t\t\tthis.inputRef.error = false\n\t\t}\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.cleanupPositioner?.()\n\t\t// Form event listeners are automatically cleaned up via takeUntil(this.disconnecting)\n\t}\n\n\tfirstUpdated() {\n\t\tthis.syncSelection()\n\t\tthis.setupOptionsAccessibility()\n\t}\n\n\tupdated(changedProps: PropertyValues) {\n\t\tsuper.updated(changedProps)\n\n\t\tif (changedProps.has('value')) {\n\t\t\t// Update form value when component value changes\n\t\t\tconst formValue = Array.isArray(this.value) ? this.value.join(',') : this.value\n\t\t\tthis.internals?.setFormValue(formValue)\n\n\t\t\t// Mark as dirty if value changes from initial value\n\t\t\tif (this.hasUpdated) {\n\t\t\t\tthis._dirty = true\n\t\t\t}\n\n\t\t\t// Check validity based on validation strategy\n\t\t\tif (this.hasUpdated) {\n\t\t\t\tthis.checkValidity()\n\t\t\t}\n\t\t}\n\n\t\t// When open state changes, setup or cleanup the dropdown positioner\n\t\tif (changedProps.has('isOpen')) {\n\t\t\tif (this.isOpen) {\n\t\t\t\tthis.positionDropdown()\n\t\t\t} else {\n\t\t\t\tthis.cleanupPositioner?.()\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Determines if validation errors should be shown based on current state\n\t * and validation strategy\n\t */\n\tprivate shouldShowValidation(forceValidation = false): boolean {\n\t\tif (forceValidation) return true\n\n\t\tswitch (this.validateOn) {\n\t\t\tcase 'always':\n\t\t\t\treturn true\n\t\t\tcase 'touched':\n\t\t\t\treturn this._touched\n\t\t\tcase 'dirty':\n\t\t\t\treturn this._dirty\n\t\t\tcase 'submitted':\n\t\t\t\treturn this._submitted\n\t\t\tdefault:\n\t\t\t\treturn this._touched\n\t\t}\n\t}\n\n\tprivate syncSelection() {\n\t\tif (this.multi) {\n\t\t\t// Read directly from the BehaviorSubject to avoid string conversion issues\n\t\t\tconst selectedValues = this._selectedValues$.value\n\t\t\tthis.options?.forEach(o => (o.selected = selectedValues.includes(o.value))) // Update option selected state\n\t\t\tthis.valueLabel =\n\t\t\t\tselectedValues.length > 0\n\t\t\t\t\t? this.options\n\t\t\t\t\t\t\t?.filter(o => selectedValues.includes(o.value))\n\t\t\t\t\t\t\t.map(o => o.label || o.textContent || '')\n\t\t\t\t\t\t\t.join(', ') || this.placeholder\n\t\t\t\t\t: this.placeholder\n\t\t} else {\n\t\t\t// Single select - read from BehaviorSubject\n\t\t\tconst currentValue = this._selectedValue$.value\n\t\t\tthis.options?.forEach(o => {\n\t\t\t\t// Set selected property on each option based on matching value\n\t\t\t\to.selected = o.value === currentValue\n\t\t\t})\n\t\t\tconst selectedOption = this.options?.find(o => o.value === currentValue)\n\t\t\tthis.valueLabel = selectedOption ? (selectedOption.label || selectedOption.textContent || '') : this.placeholder\n\t\t}\n\t}\n\n\tprivate setupOptionsAccessibility() {\n\t\tthis.options?.forEach((option, index) => {\n\t\t\toption.setAttribute('role', 'option')\n\t\t\tif (!option.id) {\n\t\t\t\toption.id = `${this.id}-option-${index}`\n\t\t\t}\n\n\t\t\t// Set tabindex to -1 so they're focusable programmatically but not in the tab order\n\t\t\toption.tabIndex = -1\n\t\t\tconst selectedValues = Array.isArray(this.value) ? this.value : this.value ? this.value.split(',') : []\n\n\t\t\toption.setAttribute(\n\t\t\t\t'aria-selected',\n\t\t\t\tString(this.multi ? selectedValues.includes(option.value) : option.value === this.value),\n\t\t\t)\n\t\t})\n\t}\n\n\tprivate async positionDropdown() {\n\t\tconst reference = this.renderRoot.querySelector('.trigger') as HTMLElement\n\t\tif (!reference || !this.ul) return\n\n\t\tthis.cleanupPositioner = autoUpdate(reference, this.ul, async () => {\n\t\t\t// Get viewport dimensions\n\t\t\tconst viewportHeight = window.innerHeight\n\t\t\tconst triggerRect = reference.getBoundingClientRect()\n\n\t\t\t// Calculate available space below and above\n\t\t\tconst spaceBelow = viewportHeight - triggerRect.bottom\n\t\t\tconst spaceAbove = triggerRect.top\n\n\t\t\t// Calculate max height - use 75% of the largest available space, but at least 150px\n\t\t\tconst maxHeight = Math.max(Math.max(spaceBelow, spaceAbove) * 0.75, 150)\n\n\t\t\t// Determine if we should flip\n\t\t\tconst shouldFlip = spaceBelow < 200 && spaceAbove > spaceBelow\n\n\t\t\t// Apply max height\n\t\t\tthis.ul.style.maxHeight = `${maxHeight}px`\n\n\t\t\tconst { x, y } = await computePosition(reference, this.ul, {\n\t\t\t\tplacement: shouldFlip ? 'top-start' : 'bottom-start',\n\t\t\t\tmiddleware: [offset(5), flip(), shift({ padding: 5 })],\n\t\t\t})\n\n\t\t\tObject.assign(this.ul.style, {\n\t\t\t\tleft: `${x}px`,\n\t\t\t\ttop: `${y}px`,\n\t\t\t\tposition: 'absolute',\n\t\t\t\twidth: `${reference.offsetWidth}px`, // Match the width of the trigger\n\t\t\t})\n\t\t})\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\t// Don't handle keyboard events when disabled\n\t\tif (this.disabled) {\n\t\t\treturn\n\t\t}\n\n\t\tif (!this.isOpen) {\n\t\t\tif (['Enter', ' ', 'ArrowDown'].includes(e.key)) {\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.openDropdown(false)\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\t// Find current focused option\n\t\tconst options = Array.from(this.options || [])\n\t\tconst current = options.findIndex(o => o.id === this._focusedOptionId) ?? -1\n\n\t\tswitch (e.key) {\n\t\t\tcase 'Escape':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.closeDropdown()\n\t\t\t\tbreak\n\t\t\tcase 'ArrowDown':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, Math.min(current + 1, options.length - 1))\n\t\t\t\tbreak\n\t\t\tcase 'ArrowUp':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, Math.max(current - 1, 0))\n\t\t\t\tbreak\n\t\t\tcase 'Home':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, 0)\n\t\t\t\tbreak\n\t\t\tcase 'End':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, options.length - 1)\n\t\t\t\tbreak\n\t\t\tcase 'Enter':\n\t\t\tcase ' ':\n\t\t\t\te.preventDefault()\n\t\t\t\tif (this._focusedOptionId) {\n\t\t\t\t\tconst focusedOption = options.find(opt => opt.id === this._focusedOptionId)\n\t\t\t\t\tif (focusedOption) {\n\t\t\t\t\t\tthis.handleOptionSelect(focusedOption.value)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\tcase 'Tab':\n\t\t\t\tthis.closeDropdown()\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\tprivate focusOption(options: SchmancyOption[], index: number) {\n\t\tconst option = options[index]\n\t\tif (option) {\n\t\t\toption.focus()\n\t\t\tthis._focusedOptionId = option.id\n\n\t\t\t// Update aria-activedescendant on the combobox\n\t\t\tconst combobox = this.renderRoot.querySelector('.trigger')\n\t\t\tif (combobox) {\n\t\t\t\tcombobox.setAttribute('aria-activedescendant', option.id)\n\t\t\t}\n\n\t\t\t// Ensure option is visible in the scrollable area\n\t\t\tif (this.ul && option.offsetTop !== undefined) {\n\t\t\t\t// Get position info\n\t\t\t\tconst optionTop = option.offsetTop\n\t\t\t\tconst optionHeight = option.offsetHeight\n\t\t\t\tconst scrollTop = this.ul.scrollTop\n\t\t\t\tconst ulHeight = this.ul.clientHeight\n\n\t\t\t\t// Scroll into view if needed\n\t\t\t\tif (optionTop < scrollTop) {\n\t\t\t\t\tthis.ul.scrollTop = optionTop\n\t\t\t\t} else if (optionTop + optionHeight > scrollTop + ulHeight) {\n\t\t\t\t\tthis.ul.scrollTop = optionTop + optionHeight - ulHeight\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate async openDropdown(report = false) {\n\t\t// Don't open if disabled\n\t\tif (this.disabled) {\n\t\t\treturn\n\t\t}\n\n\t\t// Don't mark as touched on opening - we'll do that on closing\n\t\t// so errors only show after interaction is complete\n\n\t\tthis.isOpen = true\n\t\tawait this.updateComplete\n\n\t\t// Focus first or selected option\n\t\tconst options = Array.from(this.options || [])\n\t\tconst selectedIndex = this.multi ? 0 : options.findIndex(o => o.value === String(this.value))\n\n\t\tthis.focusOption(options, Math.max(selectedIndex, 0))\n\n\t\t// Don't automatically validate when opening\n\t\t// Only validate if explicitly requested (like from a form submission)\n\t\tif (report) this.reportValidity()\n\t}\n\n\tprivate closeDropdown() {\n\t\t// Only mark as touched if the user actually interacted with the component\n\t\t// and made a selection or explicitly closed it without selecting\n\t\tif (this._userInteracted) {\n\t\t\tthis._touched = true\n\t\t}\n\n\t\tthis.isOpen = false\n\t\tthis._focusedOptionId = ''\n\n\t\t// Update combobox to remove aria-activedescendant\n\t\tconst combobox = this.renderRoot.querySelector<HTMLElement>('.trigger')\n\t\tif (combobox) {\n\t\t\tcombobox.removeAttribute('aria-activedescendant')\n\t\t\tcombobox?.focus()\n\t\t}\n\n\t\t// Only check validity when closing if the user has actually interacted\n\t\t// with the component and validation should be shown\n\t\tif (this._userInteracted && this.shouldShowValidation()) {\n\t\t\tthis.checkValidity()\n\t\t}\n\t}\n\n\tprivate _setupReactivePipelines() {\n\t\t// Listen for option-select events from child options\n\t\tfromEvent<CustomEvent>(this, 'option-select')\n\t\t\t.pipe(\n\t\t\t\ttap((e) => {\n\t\t\t\t\te.stopPropagation() // Prevent event from bubbling further\n\t\t\t\t\tconst option = this.options.find(o => o.value === e.detail.value)\n\t\t\t\t\tif (option) {\n\t\t\t\t\t\tthis._optionSelect$.next(option)\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\t// Handle option selection through reactive pipeline\n\t\tthis._optionSelect$\n\t\t\t.pipe(\n\t\t\t\twithLatestFrom(this._selectedValue$, this._selectedValues$),\n\t\t\t\ttap(([option, _, currentValues]) => {\n\t\t\t\t\tthis._userInteracted = true\n\t\t\t\t\tthis._touched = true\n\t\t\t\t\tthis._dirty = true\n\n\t\t\t\t\tif (this.multi) {\n\t\t\t\t\t\tconst index = currentValues.indexOf(option.value)\n\t\t\t\t\t\tconst newValues = index > -1\n\t\t\t\t\t\t\t? [...currentValues.slice(0, index), ...currentValues.slice(index + 1)]\n\t\t\t\t\t\t\t: [...currentValues, option.value]\n\t\t\t\t\t\tthis._selectedValues$.next(newValues)\n\n\t\t\t\t\t\t// Update display label\n\t\t\t\t\t\tthis.valueLabel = newValues.length > 0\n\t\t\t\t\t\t\t? this.options\n\t\t\t\t\t\t\t\t\t.filter(o => newValues.includes(o.value))\n\t\t\t\t\t\t\t\t\t.map(o => o.label || o.textContent || '')\n\t\t\t\t\t\t\t\t\t.join(', ')\n\t\t\t\t\t\t\t: this.placeholder\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Single select\n\t\t\t\t\t\tthis._selectedValue$.next(option.value)\n\t\t\t\t\t\tthis.valueLabel = option.label || option.textContent || this.placeholder\n\t\t\t\t\t\tthis.closeDropdown()\n\t\t\t\t\t}\n\n\t\t\t\t\t// Update the option's accessibility state\n\t\t\t\t\tthis.setupOptionsAccessibility()\n\n\t\t\t\t\t// Dispatch change event\n\t\t\t\t\tthis._fireChangeEvent()\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\t// Options management pipeline - bind pointerdown events exactly like autocomplete\n\t\tthis._options$\n\t\t\t.pipe(\n\t\t\t\ttap((options) => {\n\t\t\t\t\toptions.forEach((option, index) => {\n\t\t\t\t\t\toption.setAttribute('role', 'option')\n\t\t\t\t\t\toption.tabIndex = -1\n\t\t\t\t\t\tif (!option.id) {\n\t\t\t\t\t\t\toption.id = `${this.id}-option-${index}`\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Use data-event-bound to prevent duplicate bindings\n\t\t\t\t\t\tif (!option.hasAttribute('data-event-bound')) {\n\t\t\t\t\t\t\t// Use click event instead of pointerdown for better mobile UX\n\t\t\t\t\t\t\t// This allows users to scroll through options without immediately selecting\n\t\t\t\t\t\t\tfromEvent(option, 'click').pipe(\n\t\t\t\t\t\t\t\ttap(e => {\n\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t\t\t\t\t).subscribe(() => this._optionSelect$.next(option))\n\t\t\t\t\t\t\toption.setAttribute('data-event-bound', 'true')\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\t// Selection sync pipeline - sync selected states with value changes\n\t\tcombineLatest([this._selectedValue$, this._selectedValues$, this._options$])\n\t\t\t.pipe(\n\t\t\t\ttap(([singleValue, multiValues, options]) => {\n\t\t\t\t\tif (options.length === 0) return\n\n\t\t\t\t\tif (this.multi) {\n\t\t\t\t\t\toptions.forEach(option => {\n\t\t\t\t\t\t\toption.selected = multiValues.includes(option.value)\n\t\t\t\t\t\t})\n\t\t\t\t\t} else {\n\t\t\t\t\t\toptions.forEach(option => {\n\t\t\t\t\t\t\toption.selected = option.value === singleValue\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\tprivate handleOptionSelect(value: string) {\n\t\t// This method is now called from keyboard navigation only\n\t\tconst option = this.options.find(o => o.value === value)\n\t\tif (option) {\n\t\t\tthis._optionSelect$.next(option)\n\t\t}\n\t}\n\n\tprivate _fireChangeEvent() {\n\t\t// Get the current value based on multi/single mode\n\t\tconst value = this.multi ? this._selectedValues$.value : this._selectedValue$.value\n\n\t\t// Dispatch only one change event with the value in detail\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent<SchmancySelectChangeEvent['detail']>('change', {\n\t\t\t\tdetail: { value },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\n\t\t// Then check validity (only show error if validation should be shown)\n\t\tthis.checkValidity()\n\t}\n\n\tpublic checkValidity(): boolean {\n\t\t// Disabled fields are always valid\n\t\tif (this.disabled) {\n\t\t\treturn true\n\t\t}\n\n\t\t// Determine if the select is empty based on whether it's multi-select or single-select\n\t\tconst isEmpty = this.multi ? (Array.isArray(this.value) ? this.value.length === 0 : !this.value) : !this.value\n\n\t\t// Check if the value is valid (not empty when required)\n\t\tconst isValid = !(this.required && isEmpty)\n\n\t\t// Set the validity state\n\t\tthis.isValid = isValid\n\n\t\tif (!this.isValid) {\n\t\t\tthis.validationMessage = 'Please select an option.'\n\t\t\tthis.internals?.setValidity({ valueMissing: true }, 'Please select an option.', this.inputRef)\n\t\t} else {\n\t\t\t// Clear validation message\n\t\t\tthis.validationMessage = ''\n\t\t\tthis.internals?.setValidity({})\n\t\t}\n\n\t\t// Update the input component to reflect our validation state\n\t\tif (this.inputRef && this.hasUpdated) {\n\t\t\tconst showError = !this.isValid && this.shouldShowValidation()\n\t\t\tthis.inputRef.error = showError\n\t\t\tthis.inputRef.hint = showError ? this.validationMessage : this.hint\n\t\t}\n\n\t\treturn this.isValid\n\t}\n\n\tpublic reportValidity(): boolean {\n\t\t// Force validation display regardless of validation strategy\n\t\tconst valid = this.checkValidity()\n\n\t\t// Force the input to show validation errors\n\t\tif (this.inputRef) {\n\t\t\t// Set the input's error state\n\t\t\tthis.inputRef.error = !valid\n\t\t\tthis.inputRef.hint = !valid ? this.validationMessage : this.hint\n\n\t\t\t// If invalid and not already open, automatically open the dropdown to show options\n\t\t\tif (!valid && !this.isOpen) {\n\t\t\t\t// Open the dropdown but don't mark as user interaction yet\n\t\t\t\t// This helps users immediately see available options when validation fails\n\t\t\t\tthis.openDropdown(false)\n\t\t\t}\n\n\t\t\t// Only call reportValidity on the input if invalid to show the native popup\n\t\t\tif (!valid) {\n\t\t\t\tthis.inputRef.reportValidity()\n\t\t\t}\n\t\t}\n\n\t\treturn valid\n\t}\n\n\tpublic setCustomValidity(message: string) {\n\t\tthis.validationMessage = message\n\t\tif (message) {\n\t\t\tthis.isValid = false\n\t\t\tthis.internals?.setValidity({ customError: true }, message, this.inputRef)\n\t\t} else {\n\t\t\tthis.isValid = true\n\t\t\tthis.internals?.setValidity({})\n\t\t}\n\n\t\t// Update input if needed\n\t\tif (this.inputRef && this.shouldShowValidation()) {\n\t\t\tthis.inputRef.error = !this.isValid\n\t\t\tthis.inputRef.hint = !this.isValid ? this.validationMessage : this.hint\n\t\t}\n\t}\n\n\tpublic reset() {\n\t\t// Reset to initial value\n\t\tthis.value = this.defaultValue\n\t\tthis.valueLabel = this.placeholder\n\t\tthis.isValid = true\n\t\tthis.validationMessage = ''\n\t\tthis._touched = false\n\t\tthis._dirty = false\n\t\tthis._submitted = false\n\t\tthis._userInteracted = false\n\t\tthis.internals?.setValidity({})\n\n\t\tif (this.inputRef) {\n\t\t\tthis.inputRef.error = false\n\t\t\tthis.inputRef.hint = this.hint\n\t\t}\n\t}\n\n\trender(): TemplateResult {\n\t\t// Determine if we should show errors based on the validation strategy and interaction\n\t\t// Never show errors on initial render or if the dropdown is open\n\t\tconst showErrors = !this.isValid && this.shouldShowValidation() && !this.isOpen\n\n\t\t// Add caret icon based on open state\n\t\tconst caretIcon = this.isOpen\n\t\t\t? html`<span class=\"absolute right-3 top-1/2 transform -translate-y-1/2\">▲</span>`\n\t\t\t: html`<span class=\"absolute right-3 top-1/2 transform -translate-y-1/2\">▼</span>`\n\n\t\treturn html`\n\t\t\t<div class=\"relative ${this.disabled ? 'opacity-60 cursor-not-allowed' : ''}\">\n\t\t\t\t<sch-input\n\t\t\t\t\t.name=${this.name}\n\t\t\t\t\ttabIndex=${this.disabled ? '-1' : '0'}\n\t\t\t\t\tclass=\"trigger\"\n\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\taria-expanded=${this.isOpen}\n\t\t\t\t\taria-controls=\"options\"\n\t\t\t\t\taria-autocomplete=\"none\"\n\t\t\t\t\taria-required=${this.required}\n\t\t\t\t\taria-activedescendant=${this._focusedOptionId || undefined}\n\t\t\t\t\taria-disabled=${this.disabled}\n\t\t\t\t\t.label=${this.label}\n\t\t\t\t\t.placeholder=${this.placeholder}\n\t\t\t\t\t.value=${this.valueLabel}\n\t\t\t\t\t.required=${this.required}\n\t\t\t\t\t.disabled=${this.disabled}\n\t\t\t\t\t.hint=${showErrors ? this.validationMessage : this.hint}\n\t\t\t\t\t.error=${showErrors}\n\t\t\t\t\t.validateOn=${this.validateOn}\n\t\t\t\t\t.size=${this.size}\n\t\t\t\t\treadonly\n\t\t\t\t\tclickable\n\t\t\t\t\t@click=${(e: MouseEvent) => {\n\t\t\t\t\t\t// Don't process clicks if disabled\n\t\t\t\t\t\tif (this.disabled) {\n\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// On first click, don't count this as user interaction yet\n\t\t\t\t\t\tif (!this.isOpen) {\n\t\t\t\t\t\t\t// Open without triggering validation - we'll validate when they close\n\t\t\t\t\t\t\tthis.openDropdown(false)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Mark as interacted when they close the dropdown\n\t\t\t\t\t\t\tthis._userInteracted = true\n\t\t\t\t\t\t\tthis.closeDropdown()\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t${caretIcon}\n\t\t\t\t</sch-input>\n\n\t\t\t\t<!-- Overlay for capturing clicks outside when dropdown is open -->\n\t\t\t\t${this.isOpen\n\t\t\t\t\t? html` <div class=\"fixed inset-0 z-10\" @click=${this.closeDropdown} tabindex=\"-1\" aria-hidden=\"true\"></div> `\n\t\t\t\t\t: ''}\n\n\t\t\t\t<ul\n\t\t\t\t\tid=\"options\"\n\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\taria-multiselectable=${this.multi}\n\t\t\t\t\tclass=${classMap({\n\t\t\t\t\t\t'absolute min-w-full w-full z-20 mt-1 rounded-md shadow-lg': true,\n\t\t\t\t\t\thidden: !this.isOpen,\n\t\t\t\t\t})}\n\t\t\t\t\t${color({\n\t\t\t\t\t\tbgColor: SchmancyTheme.sys.color.surface.low,\n\t\t\t\t\t\tcolor: SchmancyTheme.sys.color.surface.on,\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t<slot\n\t\t\t\t\t\t@slotchange=${() => {\n\t\t\t\t\t\t\tthis._options$.next(this.options)\n\t\t\t\t\t\t\t// Sync selection state when options re-render\n\t\t\t\t\t\t\tthis.syncSelection()\n\t\t\t\t\t\t}}\n\t\t\t\t\t></slot>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\n// Don't export 'select' here as it conflicts with the store's select decorator\n// export const select = SchmancySelect\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-select': SchmancySelect\n\t}\n}\n"],"names":["SchmancySelect","$LitElement","css","super","this","required","disabled","placeholder","multi","label","hint","validateOn","size","isOpen","valueLabel","isValid","validationMessage","defaultValue","_options$","BehaviorSubject","_selectedValue$","_selectedValues$","_optionSelect$","Subject","_userInteracted","_touched","_dirty","_submitted","_focusedOptionId","formSubmitHandler","checkValidity","formResetHandler","reset","handleKeyDown","e","includes","key","preventDefault","openDropdown","options","Array","from","current","findIndex","o","id","closeDropdown","focusOption","Math","min","length","max","focusedOption","find","opt","handleOptionSelect","value","internals","attachInternals","join","val","values","isArray","String","split","map","v","trim","filter","Boolean","next","vals","form","connectedCallback","random","toString","substring","fromEvent","pipe","takeUntil","disconnecting","subscribe","_setupReactivePipelines","inputRef","error","disconnectedCallback","cleanupPositioner","firstUpdated","syncSelection","setupOptionsAccessibility","changedProps","updated","has","formValue","setFormValue","hasUpdated","positionDropdown","forceValidation","selectedValues","forEach","selected","textContent","currentValue","selectedOption","option","index","setAttribute","tabIndex","reference","renderRoot","querySelector","ul","autoUpdate","async","viewportHeight","window","innerHeight","triggerRect","getBoundingClientRect","spaceBelow","bottom","spaceAbove","top","maxHeight","shouldFlip","style","x","y","computePosition","placement","middleware","offset","flip","shift","padding","Object","assign","left","position","width","offsetWidth","focus","combobox","offsetTop","optionTop","optionHeight","offsetHeight","scrollTop","ulHeight","clientHeight","report","updateComplete","selectedIndex","reportValidity","removeAttribute","shouldShowValidation","tap","stopPropagation","detail","withLatestFrom","_","currentValues","indexOf","newValues","slice","_fireChangeEvent","hasAttribute","combineLatest","singleValue","multiValues","dispatchEvent","CustomEvent","bubbles","composed","isEmpty","setValidity","valueMissing","showError","valid","message","customError","showErrors","caretIcon","html","name","classMap","hidden","color","bgColor","SchmancyTheme","sys","surface","low","on","formAssociated","__decorateClass","property","type","prototype","reflect","state","query","queryAssignedElements","flatten","customElement"],"mappings":";;;;;;;;;;;;;;;;AAiBO,IAAMA,IAAN,cAA6BC,EAAYC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAyF/C,EAAA;AAAA,EAAA;AACCC,UAAAA,GAzE2CC,KAAAC,WAAAA,IACAD,KAAAE,WAAAA,IAChBF,KAAAG,cAAc,IA2BbH,KAAAI,QAAAA,IACDJ,KAAAK,QAAQ,IACRL,KAAAM,OAAO,IACPN,KAAAO,aAA2D,WAC3DP,KAAAQ,OAA2B,MAG9CR,KAAQS,SAAAA,IACRT,KAAQU,aAAa,IACrBV,KAAQW,cACWX,KAAAY,oBAAoB,IAGvCZ,KAAQa,eAAkC,IAQnDb,KAAQc,YAAY,IAAIC,EAAkC,CAAA,CAAA,GAC1Df,KAAQgB,kBAAkB,IAAID,EAAwB,EAAA,GACtDf,KAAQiB,mBAAmB,IAAIF,EAA0B,CAAA,CAAA,GACzDf,KAAQkB,iBAAiB,IAAIC,KACpBnB,KAAAoB,kBAAAA,IACApB,KAAQqB,WAAAA,IACRrB,KAAQsB,aACRtB,KAAQuB,aAAAA,IAGRvB,KAAQwB,mBAAmB,IAGpCxB,KAAQyB,oBAAoB,MAAA;AAC3BzB,WAAKuB,aAAAA,IACLvB,KAAK0B,cAAAA;AAAAA,IAAAA,GAGN1B,KAAQ2B,mBAAmB,MAAA;AAC1B3B,WAAK4B,MAAAA;AAAAA,IAAAA,GA6LN5B,KAAQ6B,gBAAiBC,OAAAA;AAExB,UAAI9B,KAAKE,SACR;AAGD,UAAA,CAAKF,KAAKS,OAKT,cAJI,CAAC,SAAS,KAAK,WAAA,EAAasB,SAASD,EAAEE,GAAAA,MAC1CF,EAAEG,eAAAA,GACFjC,KAAKkC,aAAAA,EAAa;AAMpB,YAAMC,IAAUC,MAAMC,KAAKrC,KAAKmC,W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EAkDgBsM,WAAA,QAAA,IAGXH,EAAA,CAAhBK,EAAAA,CAAAA,GArDWxM,EAqDKsM,WAAA,UAAA,IACAH,EAAA,CAAhBK,EAAAA,CAAAA,GAtDWxM,EAsDKsM,WAAA,cAAA,IACAH,EAAA,CAAhBK,EAAAA,CAAAA,GAvDWxM,EAuDKsM,WAAA,WAAA,IACWH,EAAA,CAA3BC,EAAS,EAAEC,MAAMtI,OAAAA,CAAAA,CAAAA,GAxDN/D,EAwDgBsM,WAAA,qBAAA,CAAA,GAGXH,EAAA,CAAhBK,EAAAA,CAAAA,GA3DWxM,EA2DKsM,WAAA,gBAAA,CAAA,GAEIH,EAAA,CAApBM,EAAM,IAAA,CAAA,GA7DKzM,EA6DSsM,WAAA,MAAA,CAAA,GACOH,EAAA,CAA3BM,EAAM,eA9DKzM,EA8DgBsM,WAAA,YAAA,CAAA,GACsBH,EAAA,CAAjDO,EAAsB,EAAEC,SAAAA,GAAS,CAAA,CAAA,GA/DtB3M,EA+DsCsM,WAAA,WAAA,IAQzCH,EAAA,CAARK,EAAAA,CAAAA,GAvEWxM,EAuEHsM,WAAA,mBAAA,IACQH,EAAA,CAAhBK,EAAAA,CAAAA,GAxEWxM,EAwEKsM,WAAA,YAAA,IACAH,EAAA,CAAhBK,EAAAA,CAAAA,GAzEWxM,EAyEKsM,WAAA,UAAA,IACAH,EAAA,CAAhBK,EAAAA,CAAAA,GA1EWxM,EA0EKsM,WAAA,cAAA,IAGAH,EAAA,CAAhBK,EAAAA,CAAAA,GA7EWxM,EA6EKsM,WAAA,oBAAA,CAAA,GA7ELtM,IAANmM,EAAA,CADNS,EAAc,iBAAA,CAAA,GACF5M,CAAAA;"}
package/dist/select.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./select-Cod_lOwT.cjs");Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>e.SchmancySelect});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./select-BszKwEA_.cjs");Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>e.SchmancySelect});
2
2
  //# sourceMappingURL=select.cjs.map
package/dist/select.js CHANGED
@@ -1,4 +1,4 @@
1
- import { S } from "./select-BxlDe36e.js";
1
+ import { S } from "./select-CHgsFxnz.js";
2
2
  export {
3
3
  S as SchmancySelect
4
4
  };
@@ -129,7 +129,7 @@ let d = class extends w($`
129
129
  }
130
130
  };
131
131
  d.shadowRootOptions = { ...k.shadowRootOptions, delegatesFocus: !0 }, u([a({ reflect: !0 })], d.prototype, "value", 2), u([a({ reflect: !0 })], d.prototype, "icon", 2), u([a({ reflect: !0 })], d.prototype, "href", 2), u([a({ reflect: !0 })], d.prototype, "target", 2), u([a({ type: Boolean, reflect: !0 })], d.prototype, "disabled", 2), u([a({ type: Boolean, reflect: !0 })], d.prototype, "elevated", 2), u([E()], d.prototype, "ripples", 2), d = u([_("schmancy-assist-chip")], d);
132
- var F = Object.defineProperty, P = Object.getOwnPropertyDescriptor, f = (t, e, s, o) => {
132
+ var F = Object.defineProperty, P = Object.getOwnPropertyDescriptor, m = (t, e, s, o) => {
133
133
  for (var l, i = o > 1 ? void 0 : o ? P(e, s) : e, n = t.length - 1; n >= 0; n--) (l = t[n]) && (i = (o ? l(e, s, i) : l(i)) || i);
134
134
  return o && i && F(e, s, i), i;
135
135
  };
@@ -192,20 +192,20 @@ let v = class extends M($`
192
192
  super.firstUpdated(t), this.updateChipStates(this.mode, this._value, this._values);
193
193
  }
194
194
  render() {
195
- const t = this.classMap({ "grid auto-cols-max grid-flow-col": !0, "items-center": !0, "flex-wrap": this.wrap, "overflow-x-auto": !this.wrap, "scrollbar-hide": !this.wrap, "gap-2": !0 });
195
+ const t = this.classMap({ "flex auto-cols-max": !0, "items-center": !0, "flex-wrap": this.wrap, "overflow-x-auto": !this.wrap, "scrollbar-hide": !this.wrap, "gap-2": !0 });
196
196
  return r`
197
- <schmancy-scroll class=${t} @change=${this.change}>
197
+ <section class=${t} @change=${this.change}>
198
198
  <slot
199
199
  @slotchange=${() => {
200
200
  this.updateChipStates(this.mode, this._value, this._values);
201
201
  }}
202
202
  ></slot>
203
- </schmancy-scroll>
203
+ </section>
204
204
  `;
205
205
  }
206
206
  };
207
- f([a({ type: Boolean, reflect: !0 })], v.prototype, "multi", 1), f([a({ type: Array, reflect: !0 })], v.prototype, "values", 1), f([a({ type: String, reflect: !0 })], v.prototype, "value", 1), f([S({ selector: "schmancy-chip, schmancy-filter-chip, schmancy-assist-chip, schmancy-input-chip, schmancy-suggestion-chip", flatten: !0 })], v.prototype, "chips", 2), f([a({ type: Boolean, reflect: !0 })], v.prototype, "wrap", 2), v = f([_("schmancy-chips")], v);
208
- var U = Object.defineProperty, I = Object.getOwnPropertyDescriptor, m = (t, e, s, o) => {
207
+ m([a({ type: Boolean, reflect: !0 })], v.prototype, "multi", 1), m([a({ type: Array, reflect: !0 })], v.prototype, "values", 1), m([a({ type: String, reflect: !0 })], v.prototype, "value", 1), m([S({ selector: "schmancy-chip, schmancy-filter-chip, schmancy-assist-chip, schmancy-input-chip, schmancy-suggestion-chip", flatten: !0 })], v.prototype, "chips", 2), m([a({ type: Boolean, reflect: !0 })], v.prototype, "wrap", 2), v = m([_("schmancy-chips")], v);
208
+ var U = Object.defineProperty, I = Object.getOwnPropertyDescriptor, f = (t, e, s, o) => {
209
209
  for (var l, i = o > 1 ? void 0 : o ? I(e, s) : e, n = t.length - 1; n >= 0; n--) (l = t[n]) && (i = (o ? l(e, s, i) : l(i)) || i);
210
210
  return o && i && U(e, s, i), i;
211
211
  };
@@ -341,7 +341,7 @@ const y = class y extends w($`
341
341
  };
342
342
  y.shadowRootOptions = { ...k.shadowRootOptions, delegatesFocus: !0 }, y.formAssociated = !0;
343
343
  let h = y;
344
- if (m([a({ type: String, reflect: !0 })], h.prototype, "value", 2), m([a({ type: Boolean, reflect: !0 })], h.prototype, "selected", 1), m([a({ type: String, reflect: !0 })], h.prototype, "icon", 2), m([a({ type: Boolean, reflect: !0 })], h.prototype, "removable", 2), m([a({ type: Boolean, reflect: !0 })], h.prototype, "disabled", 2), m([a({ type: Boolean, reflect: !0 })], h.prototype, "elevated", 2), m([S({ slot: "icon" })], h.prototype, "iconSlotElements", 2), customElements.get("schmancy-filter-chip") || customElements.define("schmancy-filter-chip", h), !customElements.get("schmancy-chip")) {
344
+ if (f([a({ type: String, reflect: !0 })], h.prototype, "value", 2), f([a({ type: Boolean, reflect: !0 })], h.prototype, "selected", 1), f([a({ type: String, reflect: !0 })], h.prototype, "icon", 2), f([a({ type: Boolean, reflect: !0 })], h.prototype, "removable", 2), f([a({ type: Boolean, reflect: !0 })], h.prototype, "disabled", 2), f([a({ type: Boolean, reflect: !0 })], h.prototype, "elevated", 2), f([S({ slot: "icon" })], h.prototype, "iconSlotElements", 2), customElements.get("schmancy-filter-chip") || customElements.define("schmancy-filter-chip", h), !customElements.get("schmancy-chip")) {
345
345
  class t extends h {
346
346
  }
347
347
  customElements.define("schmancy-chip", t);
@@ -473,4 +473,4 @@ export {
473
473
  h as a,
474
474
  p as b
475
475
  };
476
- //# sourceMappingURL=suggestion-chip-CxQK5dcP.js.map
476
+ //# sourceMappingURL=suggestion-chip-BTiLUD1d.js.map