@mhmo91/schmancy 0.2.113 → 0.2.114

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 (77) hide show
  1. package/dist/{autocomplete-Du2Jw0a2.cjs → autocomplete-BU0sC_l-.cjs} +2 -2
  2. package/dist/autocomplete-BU0sC_l-.cjs.map +1 -0
  3. package/dist/{autocomplete-NL-c1Qp-.js → autocomplete-u76bIDqg.js} +29 -29
  4. package/dist/autocomplete-u76bIDqg.js.map +1 -0
  5. package/dist/autocomplete.cjs +1 -1
  6. package/dist/autocomplete.js +1 -1
  7. package/dist/card.cjs +1 -1
  8. package/dist/card.js +1 -1
  9. package/dist/{chips-Ctk7cxHI.js → chips-DTDFQDv-.js} +12 -12
  10. package/dist/{chips-Ctk7cxHI.js.map → chips-DTDFQDv-.js.map} +1 -1
  11. package/dist/chips.js +1 -1
  12. package/dist/content-drawer.cjs +1 -1
  13. package/dist/content-drawer.js +1 -1
  14. package/dist/{delay-NkgyZVcO.cjs → delay-Dzei5ynQ.cjs} +2 -2
  15. package/dist/{delay-NkgyZVcO.cjs.map → delay-Dzei5ynQ.cjs.map} +1 -1
  16. package/dist/delay.cjs +1 -1
  17. package/dist/extra.cjs +2 -0
  18. package/dist/extra.cjs.map +1 -0
  19. package/dist/extra.js +6 -0
  20. package/dist/extra.js.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +61 -58
  23. package/dist/index.js.map +1 -1
  24. package/dist/input-CTC1BTOb.cjs +51 -0
  25. package/dist/input-CTC1BTOb.cjs.map +1 -0
  26. package/dist/input-CZX1sxBe.js +135 -0
  27. package/dist/input-CZX1sxBe.js.map +1 -0
  28. package/dist/input.cjs +1 -1
  29. package/dist/input.js +1 -1
  30. package/dist/nav-drawer.cjs +1 -1
  31. package/dist/nav-drawer.js +1 -1
  32. package/dist/{option-_1gW48HB.js → option-CxalubCR.js} +18 -8
  33. package/dist/option-CxalubCR.js.map +1 -0
  34. package/dist/option-DJLLszO6.cjs +18 -0
  35. package/dist/option-DJLLszO6.cjs.map +1 -0
  36. package/dist/option.cjs +1 -1
  37. package/dist/option.js +1 -1
  38. package/dist/rxjs-utils.js +4 -4
  39. package/dist/teleport.cjs +1 -1
  40. package/dist/{teleport.component-CF-USarR.cjs → teleport.component-C9Q1WHQe.cjs} +2 -2
  41. package/dist/{teleport.component-CF-USarR.cjs.map → teleport.component-C9Q1WHQe.cjs.map} +1 -1
  42. package/dist/{teleport.component-D8DXijGl.js → teleport.component-DY1Q8ilK.js} +11 -10
  43. package/dist/{teleport.component-D8DXijGl.js.map → teleport.component-DY1Q8ilK.js.map} +1 -1
  44. package/dist/teleport.js +1 -1
  45. package/dist/timezone-Cv2QSsl4.cjs +24 -0
  46. package/dist/timezone-Cv2QSsl4.cjs.map +1 -0
  47. package/dist/timezone-EDGZdfbO.js +67 -0
  48. package/dist/timezone-EDGZdfbO.js.map +1 -0
  49. package/dist/{typewriter-bnkFoDFz.js → typewriter-C1Ij3c--.js} +11 -11
  50. package/dist/{typewriter-bnkFoDFz.js.map → typewriter-C1Ij3c--.js.map} +1 -1
  51. package/dist/{typewriter-CzV1O28F.cjs → typewriter-DtWpV0Xd.cjs} +2 -2
  52. package/dist/{typewriter-CzV1O28F.cjs.map → typewriter-DtWpV0Xd.cjs.map} +1 -1
  53. package/dist/typewriter.cjs +1 -1
  54. package/dist/typewriter.js +1 -1
  55. package/package.json +1 -1
  56. package/types/src/extra/countries/countries.d.ts +13 -0
  57. package/types/src/extra/countries/countries.data.d.ts +5 -0
  58. package/types/src/extra/countries/index.d.ts +2 -0
  59. package/types/src/extra/index.d.ts +2 -0
  60. package/types/src/extra/timezone/index.d.ts +2 -0
  61. package/types/src/extra/timezone/timezone.d.ts +13 -0
  62. package/types/src/extra/timezone/timezones.data.d.ts +7 -0
  63. package/types/src/index.d.ts +1 -1
  64. package/types/src/option/option.d.ts +1 -0
  65. package/dist/autocomplete-Du2Jw0a2.cjs.map +0 -1
  66. package/dist/autocomplete-NL-c1Qp-.js.map +0 -1
  67. package/dist/data.cjs +0 -2
  68. package/dist/data.cjs.map +0 -1
  69. package/dist/data.js +0 -2
  70. package/dist/data.js.map +0 -1
  71. package/dist/input-CszLZ81k.cjs +0 -51
  72. package/dist/input-CszLZ81k.cjs.map +0 -1
  73. package/dist/input-CwWLOBMF.js +0 -135
  74. package/dist/input-CwWLOBMF.js.map +0 -1
  75. package/dist/option-0le6-QeS.cjs +0 -18
  76. package/dist/option-0le6-QeS.cjs.map +0 -1
  77. package/dist/option-_1gW48HB.js.map +0 -1
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-B576YswO.cjs");const r=require("./area.component-BFj0Dvfb.cjs");require("./autocomplete-Du2Jw0a2.cjs"),require("./spinner-C3VJtLgk.cjs");const o=require("./icon-button-nMHz4MDw.cjs"),e=require("./teleport.component-CF-USarR.cjs"),u=require("./checkbox-FM06WS9G.cjs");require("./chips-CJZbtp-O.cjs");const b=require("./payment-card-form-Bi3yNg4b.cjs");require("./date-range-FxAO_oqk.cjs");const m=require("./delay-NkgyZVcO.cjs"),c=require("./ripple-C2BHbhcS.cjs");require("./divider-nNk0E_jZ.cjs"),require("./form-CKMp4UzU.cjs"),require("./icon-BZqH7sp7.cjs"),require("./input-CszLZ81k.cjs");const t=require("./flex-INEcbqBe.cjs"),a=require("./list-D4y-Mkap.cjs");require("./menu-DAtFS31a.cjs");const i=require("./outlet-DofHDlGH.cjs");require("./option-0le6-QeS.cjs");const l=require("./radio-group-A5QxSGOr.cjs"),p=require("./rxjs-utils.cjs");require("rxjs"),require("./index-DyJ0oDpR.cjs");const d=require("./select-BdU6KcPX.cjs"),n=require("./sheet-CQFdHSwJ.cjs"),S=require("./slider-B4OCBlQg.cjs"),h=require("./surface-kjOrb8TO.cjs");require("./table-BZV2dBD5.cjs"),require("./tabs-group-BZFBZ1_G.cjs"),require("./textarea-BCWPb0Sn.cjs");const y=require("./theme.component-Ly2C_fQ8.cjs"),f=require("./theme.interface-Xg5Zi46a.cjs");require("./theme-button-DHuXg7vh.cjs");const g=require("./tree-CG9B3uQP.cjs"),q=require("./types.cjs"),O=require("./typewriter-CzV1O28F.cjs"),w=require("./typography-D-a-z23R.cjs"),D=require("./intersection-CVvaDv96.cjs");exports.FINDING_MORTIES=r.FINDING_MORTIES,exports.HERE_RICKY=r.HERE_RICKY,exports.HISTORY_STRATEGY=r.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>r.SchmancyArea}),exports.area=r.area,exports.routerHistory=r.routerHistory,Object.defineProperty(exports,"SchmancyButton",{enumerable:!0,get:()=>o.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>o.SchmnacyIconButton}),exports.$drawer=e.$drawer,exports.HereMorty=e.HereMorty,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,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}),Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>e.SchmancyTeleportation}),exports.WhereAreYouRicky=e.WhereAreYouRicky,exports.schmancyContentDrawer=e.schmancyContentDrawer,exports.schmancyNavDrawer=e.schmancyNavDrawer,exports.teleport=e.teleport,Object.defineProperty(exports,"SchmancyCheckbox",{enumerable:!0,get:()=>u.SchmancyCheckbox}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>b.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>m.SchmancyDelay}),exports.delayContext=m.delayContext,exports.color=c.color,exports.fullHeight=c.fullHeight,exports.ripple=c.ripple,Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>t.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>t.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>t.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>t.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>a.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>a.SchmancyListItem}),exports.SchmancyListTypeContext=a.SchmancyListTypeContext,exports.$notify=i.$notify,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>i.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationOutlet",{enumerable:!0,get:()=>i.SchmancyNotificationOutlet}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>l.RadioGroup}),exports.mutationObserver=p.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>d.SchmancySelect}),exports.SchmancySheetPosition=n.SchmancySheetPosition,exports.SheetHereMorty=n.SheetHereMorty,exports.SheetWhereAreYouRicky=n.SheetWhereAreYouRicky,exports.sheet=n.sheet,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>S.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>S.SchmancySlider}),Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>h.SchmancySurface}),exports.SchmancySurfaceTypeContext=h.SchmancySurfaceTypeContext,Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>y.SchmancyThemeComponent}),exports.formateTheme=y.formateTheme,exports.tailwindStyles=y.tailwindStyles,exports.SchmancyTheme=f.SchmancyTheme,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>g.SchmancyTree}),exports.SchmancyEvents=q.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>O.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>w.SchmancyTypography}),exports.intersection$=D.intersection$;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-B576YswO.cjs");const r=require("./area.component-BFj0Dvfb.cjs");require("./autocomplete-BU0sC_l-.cjs"),require("./spinner-C3VJtLgk.cjs");const o=require("./icon-button-nMHz4MDw.cjs"),e=require("./teleport.component-C9Q1WHQe.cjs"),b=require("./checkbox-FM06WS9G.cjs");require("./chips-CJZbtp-O.cjs");const l=require("./payment-card-form-Bi3yNg4b.cjs");require("./date-range-FxAO_oqk.cjs");const m=require("./delay-Dzei5ynQ.cjs"),c=require("./ripple-C2BHbhcS.cjs");require("./divider-nNk0E_jZ.cjs");const S=require("./timezone-Cv2QSsl4.cjs");require("./form-CKMp4UzU.cjs"),require("./icon-BZqH7sp7.cjs"),require("./input-CTC1BTOb.cjs");const t=require("./flex-INEcbqBe.cjs"),a=require("./list-D4y-Mkap.cjs");require("./menu-DAtFS31a.cjs");const i=require("./outlet-DofHDlGH.cjs");require("./option-DJLLszO6.cjs");const p=require("./radio-group-A5QxSGOr.cjs"),d=require("./rxjs-utils.cjs");require("rxjs"),require("./index-DyJ0oDpR.cjs");const f=require("./select-BdU6KcPX.cjs"),n=require("./sheet-CQFdHSwJ.cjs"),h=require("./slider-B4OCBlQg.cjs"),u=require("./surface-kjOrb8TO.cjs");require("./table-BZV2dBD5.cjs"),require("./tabs-group-BZFBZ1_G.cjs"),require("./textarea-BCWPb0Sn.cjs");const y=require("./theme.component-Ly2C_fQ8.cjs"),g=require("./theme.interface-Xg5Zi46a.cjs");require("./theme-button-DHuXg7vh.cjs");const O=require("./tree-CG9B3uQP.cjs"),q=require("./types.cjs"),s=require("./typewriter-DtWpV0Xd.cjs"),w=require("./typography-D-a-z23R.cjs"),D=require("./intersection-CVvaDv96.cjs");exports.FINDING_MORTIES=r.FINDING_MORTIES,exports.HERE_RICKY=r.HERE_RICKY,exports.HISTORY_STRATEGY=r.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>r.SchmancyArea}),exports.area=r.area,exports.routerHistory=r.routerHistory,Object.defineProperty(exports,"SchmancyButton",{enumerable:!0,get:()=>o.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>o.SchmnacyIconButton}),exports.$drawer=e.$drawer,exports.HereMorty=e.HereMorty,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,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}),Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>e.SchmancyTeleportation}),exports.WhereAreYouRicky=e.WhereAreYouRicky,exports.schmancyContentDrawer=e.schmancyContentDrawer,exports.schmancyNavDrawer=e.schmancyNavDrawer,exports.teleport=e.teleport,Object.defineProperty(exports,"SchmancyCheckbox",{enumerable:!0,get:()=>b.SchmancyCheckbox}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>l.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>m.SchmancyDelay}),exports.delayContext=m.delayContext,exports.color=c.color,exports.fullHeight=c.fullHeight,exports.ripple=c.ripple,Object.defineProperty(exports,"SchmancyCountriesSelect",{enumerable:!0,get:()=>S.SchmancyCountriesSelect}),Object.defineProperty(exports,"SchmancyTimezonesSelect",{enumerable:!0,get:()=>S.SchmancyTimezonesSelect}),Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>t.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>t.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>t.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>t.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>a.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>a.SchmancyListItem}),exports.SchmancyListTypeContext=a.SchmancyListTypeContext,exports.$notify=i.$notify,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>i.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationOutlet",{enumerable:!0,get:()=>i.SchmancyNotificationOutlet}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>p.RadioGroup}),exports.mutationObserver=d.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>f.SchmancySelect}),exports.SchmancySheetPosition=n.SchmancySheetPosition,exports.SheetHereMorty=n.SheetHereMorty,exports.SheetWhereAreYouRicky=n.SheetWhereAreYouRicky,exports.sheet=n.sheet,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>h.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>h.SchmancySlider}),Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>u.SchmancySurface}),exports.SchmancySurfaceTypeContext=u.SchmancySurfaceTypeContext,Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>y.SchmancyThemeComponent}),exports.formateTheme=y.formateTheme,exports.tailwindStyles=y.tailwindStyles,exports.SchmancyTheme=g.SchmancyTheme,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>O.SchmancyTree}),exports.SchmancyEvents=q.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>s.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>w.SchmancyTypography}),exports.intersection$=D.intersection$;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -1,52 +1,53 @@
1
1
  import "./animated-text-BuRbVM-X.js";
2
- import { F as C, H as d, b as T, S as u, a as b, r as N } from "./area.component-Bo5aB8BH.js";
3
- import "./autocomplete-NL-c1Qp-.js";
2
+ import { F as C, H as T, b as d, S as u, a as b, r as N } from "./area.component-Bo5aB8BH.js";
3
+ import "./autocomplete-u76bIDqg.js";
4
4
  import "./spinner-BDx3SZsl.js";
5
5
  import { S as R, a as v } from "./icon-button-BNn0qRfC.js";
6
- import { $ as M, H as g, e as E, b as A, f as F, c as Y, d as $, g as k, S as G, a as L, i as O, k as W, l as _, m as B, j as P, n as j, o as K, W as V, s as q, h as z, t as J } from "./teleport.component-D8DXijGl.js";
6
+ import { $ as M, H as g, e as E, b as A, f as F, c as Y, d as $, g as k, S as G, a as L, i as O, k as W, l as _, m as B, j as P, n as j, o as z, W as K, s as V, h as q, t as J } from "./teleport.component-DY1Q8ilK.js";
7
7
  import { S as U } from "./checkbox-DQYRlKod.js";
8
- import "./chips-Ctk7cxHI.js";
8
+ import "./chips-DTDFQDv-.js";
9
9
  import { S as Z } from "./payment-card-form-C8FxRlh4.js";
10
10
  import "./date-range-CZiZR3OZ.js";
11
11
  import { S as ra, d as ea } from "./delay-gZOjfjX_.js";
12
12
  import { c as oa, f as ca, r as ma } from "./ripple-BumgqsDT.js";
13
13
  import "./divider-B-JF8gre.js";
14
+ import { S as sa, a as Sa } from "./timezone-EDGZdfbO.js";
14
15
  import "./form-lcamXnkd.js";
15
16
  import "./icon-CJrmUGTm.js";
16
- import "./input-CwWLOBMF.js";
17
- import { S as sa, c as Sa, a as ha, b as ia } from "./flex-CieqpOUS.js";
18
- import { L as pa, a as fa, S as xa } from "./list-CjrF4M5H.js";
17
+ import "./input-CZX1sxBe.js";
18
+ import { S as ia, c as ya, a as pa, b as fa } from "./flex-CieqpOUS.js";
19
+ import { L as la, a as wa, S as Da } from "./list-CjrF4M5H.js";
19
20
  import "./menu-Cb5kUAvU.js";
20
- import { $ as wa, S as Da, a as Ca } from "./outlet-6HZp4fo1.js";
21
- import "./option-_1gW48HB.js";
22
- import { R as Ta } from "./radio-group-BapuNl8y.js";
23
- import { mutationObserver as ba } from "./rxjs-utils.js";
21
+ import { $ as Ta, S as da, a as ua } from "./outlet-6HZp4fo1.js";
22
+ import "./option-CxalubCR.js";
23
+ import { R as Na } from "./radio-group-BapuNl8y.js";
24
+ import { mutationObserver as Ra } from "./rxjs-utils.js";
24
25
  import "rxjs";
25
26
  import "./index-CuY8m6ta.js";
26
- import { S as Ha } from "./select-8AjN6LbM.js";
27
- import { S as va, b as Ia, a as Ma, s as ga } from "./sheet-xR13xD2A.js";
28
- import { S as Aa, a as Fa } from "./slider-BakU-Bdw.js";
29
- import { a as $a, S as ka } from "./surface-YiaJJQ5m.js";
27
+ import { S as Ia } from "./select-8AjN6LbM.js";
28
+ import { S as ga, b as Ea, a as Aa, s as Fa } from "./sheet-xR13xD2A.js";
29
+ import { S as $a, a as ka } from "./slider-BakU-Bdw.js";
30
+ import { a as La, S as Oa } from "./surface-YiaJJQ5m.js";
30
31
  import "./table-BguYeeBH.js";
31
32
  import "./tabs-group-H3C6ZnQn.js";
32
33
  import "./textarea-D7bTMerW.js";
33
- import { S as La, f as Oa, t as Wa } from "./theme.component-BtBosXb1.js";
34
- import { S as Ba } from "./theme.interface-C5Kj6WjD.js";
34
+ import { S as _a, f as Ba, t as Pa } from "./theme.component-BtBosXb1.js";
35
+ import { S as za } from "./theme.interface-C5Kj6WjD.js";
35
36
  import "./theme-button-CP2_aq__.js";
36
- import { S as ja } from "./tree-Y2B7yK7L.js";
37
- import { SchmancyEvents as Va } from "./types.js";
38
- import { T as za } from "./typewriter-bnkFoDFz.js";
39
- import { S as Qa } from "./typography-CSQByhJF.js";
40
- import { i as Xa } from "./intersection-CJxzz8c-.js";
37
+ import { S as Va } from "./tree-Y2B7yK7L.js";
38
+ import { SchmancyEvents as Ja } from "./types.js";
39
+ import { T as Ua } from "./typewriter-C1Ij3c--.js";
40
+ import { S as Za } from "./typography-CSQByhJF.js";
41
+ import { i as rr } from "./intersection-CJxzz8c-.js";
41
42
  export {
42
43
  M as $drawer,
43
- wa as $notify,
44
+ Ta as $notify,
44
45
  C as FINDING_MORTIES,
45
- d as HERE_RICKY,
46
- T as HISTORY_STRATEGY,
46
+ T as HERE_RICKY,
47
+ d as HISTORY_STRATEGY,
47
48
  g as HereMorty,
48
- pa as List,
49
- Ta as RadioGroup,
49
+ la as List,
50
+ Na as RadioGroup,
50
51
  u as SchmancyArea,
51
52
  R as SchmancyButton,
52
53
  U as SchmancyCheckbox,
@@ -58,52 +59,54 @@ export {
58
59
  k as SchmancyContentDrawerSheet,
59
60
  G as SchmancyContentDrawerSheetMode,
60
61
  L as SchmancyContentDrawerSheetState,
62
+ sa as SchmancyCountriesSelect,
61
63
  ra as SchmancyDelay,
62
64
  O as SchmancyDrawerAppbar,
63
65
  W as SchmancyDrawerNavbarMode,
64
66
  _ as SchmancyDrawerNavbarState,
65
- Va as SchmancyEvents,
66
- sa as SchmancyFlex,
67
- Sa as SchmancyFlexV2,
68
- ha as SchmancyGrid,
69
- fa as SchmancyListItem,
70
- xa as SchmancyListTypeContext,
67
+ Ja as SchmancyEvents,
68
+ ia as SchmancyFlex,
69
+ ya as SchmancyFlexV2,
70
+ pa as SchmancyGrid,
71
+ wa as SchmancyListItem,
72
+ Da as SchmancyListTypeContext,
71
73
  B as SchmancyNavigationDrawer,
72
74
  P as SchmancyNavigationDrawerContent,
73
75
  j as SchmancyNavigationDrawerSidebar,
74
- Da as SchmancyNotification,
75
- Ca as SchmancyNotificationOutlet,
76
+ da as SchmancyNotification,
77
+ ua as SchmancyNotificationOutlet,
76
78
  Z as SchmancyPaymentCardForm,
77
- ia as SchmancyScroll,
78
- Ha as SchmancySelect,
79
- va as SchmancySheetPosition,
80
- Aa as SchmancySlide,
81
- Fa as SchmancySlider,
82
- $a as SchmancySurface,
83
- ka as SchmancySurfaceTypeContext,
84
- K as SchmancyTeleportation,
85
- Ba as SchmancyTheme,
86
- La as SchmancyThemeComponent,
87
- ja as SchmancyTree,
88
- Qa as SchmancyTypography,
79
+ fa as SchmancyScroll,
80
+ Ia as SchmancySelect,
81
+ ga as SchmancySheetPosition,
82
+ $a as SchmancySlide,
83
+ ka as SchmancySlider,
84
+ La as SchmancySurface,
85
+ Oa as SchmancySurfaceTypeContext,
86
+ z as SchmancyTeleportation,
87
+ za as SchmancyTheme,
88
+ _a as SchmancyThemeComponent,
89
+ Sa as SchmancyTimezonesSelect,
90
+ Va as SchmancyTree,
91
+ Za as SchmancyTypography,
89
92
  v as SchmnacyIconButton,
90
- Ia as SheetHereMorty,
91
- Ma as SheetWhereAreYouRicky,
92
- za as TypewriterElement,
93
- V as WhereAreYouRicky,
93
+ Ea as SheetHereMorty,
94
+ Aa as SheetWhereAreYouRicky,
95
+ Ua as TypewriterElement,
96
+ K as WhereAreYouRicky,
94
97
  b as area,
95
98
  oa as color,
96
99
  ea as delayContext,
97
- Oa as formateTheme,
100
+ Ba as formateTheme,
98
101
  ca as fullHeight,
99
- Xa as intersection$,
100
- ba as mutationObserver,
102
+ rr as intersection$,
103
+ Ra as mutationObserver,
101
104
  ma as ripple,
102
105
  N as routerHistory,
103
- q as schmancyContentDrawer,
104
- z as schmancyNavDrawer,
105
- ga as sheet,
106
- Wa as tailwindStyles,
106
+ V as schmancyContentDrawer,
107
+ q as schmancyNavDrawer,
108
+ Fa as sheet,
109
+ Pa as tailwindStyles,
107
110
  J as teleport
108
111
  };
109
112
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,51 @@
1
+ "use strict";const u=require("lit"),i=require("lit/decorators.js"),m=require("lit/directives/class-map.js"),s=require("lit/directives/if-defined.js"),f=require("lit/directives/ref.js"),b=require("lit/directives/when.js"),o=require("rxjs");require("lit/directives/style-map.js");const g=require("./tailwind.mixin-CBhPue3q.cjs"),y=require("./ripple-C2BHbhcS.cjs"),h=require("./theme.interface-Xg5Zi46a.cjs");var v=Object.defineProperty,$=Object.getOwnPropertyDescriptor,r=(t,n,p,a)=>{for(var c,l=a>1?void 0:a?$(n,p):n,d=t.length-1;d>=0;d--)(c=t[d])&&(l=(a?c(n,p,l):c(l))||l);return a&&l&&v(n,p,l),l};let e=class extends g.TailwindElement(":host{border:unset!important;line-height:unset!important;background:unset!important;padding:unset!important;font-size:unset!important;box-shadow:unset!important;width:-webkit-fill-available}:host:focus{box-shadow:unset!important}input:focus-visible{outline:none!important}input{font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;color:inherit;letter-spacing:inherit;text-transform:inherit;text-decoration:inherit;text-indent:inherit;text-shadow:inherit;text-overflow:inherit;text-rendering:inherit;text-size-adjust:inherit;text-align-last:inherit}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}@keyframes onAutoFillStart{}input:-webkit-autofill{animation-name:onAutoFillStart}"){constructor(){if(super(),this.id="",this.label="",this.type="text",this.name=`name_${Date.now()}`,this.placeholder="",this.value="",this.required=!1,this.disabled=!1,this.readonly=!1,this.clickable=!1,this.spellcheck=!1,this.align="left",this.autofocus=!1,this.autocomplete="on",this.tabIndex=0,this.error=!1,this.inputRef=f.createRef(),"attachInternals"in this)try{this.internals=this.attachInternals()}catch{this.internals=void 0}}willUpdate(t){this.id||(this.id="schmancy-input-"+e._idCounter++),super.willUpdate(t)}get form(){var t;return((t=this.internals)==null?void 0:t.form)??null}updated(t){var n,p,a;super.updated(t),t.has("value")&&((n=this.internals)==null||n.setFormValue(this.value)),t.has("error")&&(this.error?(p=this.internals)==null||p.setValidity({customError:!0},"Invalid input",this.inputElement):(a=this.internals)==null||a.setValidity({}))}checkValidity(){var t;return((t=this.inputRef.value)==null?void 0:t.checkValidity())??!0}reportValidity(){var t;return((t=this.inputRef.value)==null?void 0:t.reportValidity())??!0}setCustomValidity(t){var n;(n=this.inputRef.value)==null||n.setCustomValidity(t)}firstUpdated(){this.autofocus&&this.focus(),o.fromEvent(this.inputElement,"input").pipe(o.map(t=>t.target.value),o.distinctUntilChanged(),o.takeUntil(this.disconnecting)).subscribe(t=>{this.value=t,this.dispatchEvent(new CustomEvent("input",{detail:{value:t},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{value:t},bubbles:!0,composed:!0}))}),o.fromEvent(this.inputElement,"change").pipe(o.map(t=>t.target.value),o.distinctUntilChanged(),o.takeUntil(this.disconnecting)).subscribe(t=>{this.value=t,this.dispatchEvent(new CustomEvent("change",{detail:{value:t},bubbles:!0,composed:!0}))}),o.fromEvent(this.inputElement,"keyup").pipe(o.filter(t=>t.key==="Enter"),o.takeUntil(this.disconnecting)).subscribe(t=>{const{value:n}=t.target;this.value=n,this.dispatchEvent(new CustomEvent("enter",{detail:{value:n},bubbles:!0,composed:!0}))}),o.fromEvent(this.inputElement,"animationstart").pipe(o.filter(t=>t.animationName==="onAutoFillStart"),o.takeUntil(this.disconnecting)).subscribe(t=>{const{value:n}=t.target;this.value=n,this.dispatchEvent(new CustomEvent("change",{detail:{value:n},bubbles:!0,composed:!0}))})}select(){var t;return(t=this.inputRef.value)==null?void 0:t.select()}getValidity(){var t;return(t=this.inputRef.value)==null?void 0:t.validity}focus(t){var n;(n=this.inputRef.value)==null||n.focus(t),this.dispatchEvent(new Event("focus"))}click(){var t;(t=this.inputRef.value)==null||t.click(),this.dispatchEvent(new Event("click"))}blur(){var t;(t=this.inputRef.value)==null||t.blur(),this.dispatchEvent(new Event("blur"))}render(){const t={"w-full flex-1 h-[50px] rounded-[8px] border-0 px-[8px] sm:px-[12px] md:px-[16px]":!0,"outline-secondary-default focus:outline-1 ":!0,"disabled:opacity-40 disabled:cursor-not-allowed":!0,"placeholder:text-muted":!0,"ring-0 ring-inset focus:ring-1 focus:ring-inset":!0,"ring-secondary-default ring-outline focus:ring-secondary-default":!this.error,"ring-error-default focus:ring-error-default":this.error,"caret-transparent focus:outline-hidden cursor-pointer text-select-none":this.readonly,"cursor-pointer":this.clickable,"text-center":this.align==="center","text-right":this.align==="right"},n={"opacity-40":this.disabled,"block mb-[4px]":!0};return u.html`
2
+ ${b.when(this.label,()=>u.html`
3
+ <label
4
+ for=${this.id}
5
+ id="label-${this.id}"
6
+ class=${m.classMap(n)}
7
+ ${y.color({color:this.error?h.SchmancyTheme.sys.color.error.default:h.SchmancyTheme.sys.color.primary.default})}
8
+ >
9
+ <schmancy-typography type="label" token="lg">${this.label}</schmancy-typography>
10
+ </label>
11
+ `)}
12
+
13
+ <input
14
+ ${y.color({bgColor:h.SchmancyTheme.sys.color.surface.highest,color:h.SchmancyTheme.sys.color.surface.on})}
15
+ ${f.ref(this.inputRef)}
16
+ id=${this.id}
17
+ name=${this.name}
18
+ class=${m.classMap(t)}
19
+ .value=${this.value}
20
+ .type=${this.type}
21
+ .autocomplete=${this.autocomplete}
22
+ .spellcheck=${this.spellcheck}
23
+ placeholder=${this.placeholder}
24
+ inputmode=${s.ifDefined(this.inputmode)}
25
+ pattern=${s.ifDefined(this.pattern)}
26
+ step=${s.ifDefined(this.step)}
27
+ minlength=${s.ifDefined(this.minlength)}
28
+ maxlength=${s.ifDefined(this.maxlength)}
29
+ min=${s.ifDefined(this.min)}
30
+ max=${s.ifDefined(this.max)}
31
+ ?required=${this.required}
32
+ ?disabled=${this.disabled}
33
+ ?readonly=${this.readonly}
34
+ aria-invalid=${this.error?"true":"false"}
35
+ aria-required=${this.required?"true":"false"}
36
+ aria-labelledby=${this.label?`label-${this.id}`:u.nothing}
37
+ aria-describedby=${this.hint?`hint-${this.id}`:u.nothing}
38
+ aria-label=${s.ifDefined(this.label?void 0:this.placeholder||"Input")}
39
+ />
40
+
41
+ ${b.when(this.hint,()=>u.html`
42
+ <div
43
+ id="hint-${this.id}"
44
+ class="pt-[2px]"
45
+ ${y.color({color:this.error?h.SchmancyTheme.sys.color.error.default:h.SchmancyTheme.sys.color.primary.default})}
46
+ >
47
+ <schmancy-typography align="left" type="label"> ${this.hint} </schmancy-typography>
48
+ </div>
49
+ `)}
50
+ `}};e._idCounter=0,e.formAssociated=!0,e.shadowRootOptions={...u.LitElement.shadowRootOptions,delegatesFocus:!0},r([i.property({reflect:!0})],e.prototype,"id",2),r([i.property({type:String})],e.prototype,"label",2),r([i.property({reflect:!0})],e.prototype,"type",2),r([i.property()],e.prototype,"name",2),r([i.property()],e.prototype,"placeholder",2),r([i.property({type:String,reflect:!0})],e.prototype,"value",2),r([i.property({type:String,reflect:!0})],e.prototype,"pattern",2),r([i.property({type:Boolean,reflect:!0})],e.prototype,"required",2),r([i.property({type:Boolean,reflect:!0})],e.prototype,"disabled",2),r([i.property({type:Boolean,reflect:!0})],e.prototype,"readonly",2),r([i.property({type:Boolean,reflect:!0})],e.prototype,"clickable",2),r([i.property({type:Boolean,reflect:!0})],e.prototype,"spellcheck",2),r([i.property({type:String,reflect:!0})],e.prototype,"align",2),r([i.property()],e.prototype,"inputmode",2),r([i.property({type:Number})],e.prototype,"minlength",2),r([i.property({type:Number})],e.prototype,"maxlength",2),r([i.property()],e.prototype,"min",2),r([i.property()],e.prototype,"max",2),r([i.property({type:Number,reflect:!0})],e.prototype,"step",2),r([i.property({type:Boolean})],e.prototype,"autofocus",2),r([i.property({type:String,reflect:!0})],e.prototype,"autocomplete",2),r([i.property({type:Number,reflect:!0})],e.prototype,"tabIndex",2),r([i.property()],e.prototype,"hint",2),r([i.property({type:Boolean,reflect:!0})],e.prototype,"error",2),r([i.query("input")],e.prototype,"inputElement",2),e=r([i.customElement("schmancy-input")],e);
51
+ //# sourceMappingURL=input-CTC1BTOb.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-CTC1BTOb.cjs","sources":["../src/input/input.ts"],"sourcesContent":["import { html, LitElement, nothing, PropertyValueMap } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { when } from 'lit/directives/when.js'\nimport { distinctUntilChanged, filter, fromEvent, map, takeUntil } from 'rxjs'\n\nimport { TailwindElement } from '@mixins/index'\n\n// color directive + theme interface\nimport { color } from '@schmancy/directives'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\nimport style from './input.scss?inline'\n// If you want to be form-associated, define the type on `ElementInternals`.\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-input': SchmancyInput\n\t}\n}\n\ntype EventDetails = {\n\tvalue: string\n}\n\n/**\n * Custom events the component may emit:\n * - 'input': on every keystroke\n * - 'change': on native blur/change\n * - 'enter': specifically when user presses Enter\n */\nexport type SchmancyInputInputEvent = CustomEvent<EventDetails>\nexport type SchmancyInputChangeEvent = CustomEvent<EventDetails>\nexport type SchmancyInputEnterEvent = CustomEvent<EventDetails>\n\n@customElement('schmancy-input')\nexport default class SchmancyInput extends TailwindElement(style) {\n\t// ----------------------------\n\t// A) Public properties\n\t// ----------------------------\n\n\t/** If user does NOT set `id`, we'll autogenerate one. */\n\tstatic _idCounter = 0\n\n\t@property({ reflect: true })\n\tpublic override id = ''\n\n\t/**\n\t * The label for the control. If populated, we render a `<label for=\"...\">`.\n\t * If empty, we add an `aria-label` to the <input> for better screenreader support.\n\t */\n\t@property({ type: String }) label = ''\n\n\t/**\n\t * The type of input. (e.g. 'text', 'password', 'email', etc.)\n\t */\n\t@property({ reflect: true })\n\tpublic type: HTMLInputElement['type'] = 'text'\n\n\t/**\n\t * Name attribute (for form submissions). By default, a unique fallback.\n\t */\n\t@property()\n\tpublic name = `name_${Date.now()}`\n\n\t@property()\n\tpublic placeholder = ''\n\n\t/** Current value of the input. */\n\t@property({ type: String, reflect: true })\n\tpublic value = ''\n\n\t/** Pattern validation attribute. */\n\t@property({ type: String, reflect: true })\n\tpublic pattern?: string\n\n\t/** Whether the control is required for form validation. */\n\t@property({ type: Boolean, reflect: true })\n\tpublic required = false\n\n\t/** Whether the control is disabled. */\n\t@property({ type: Boolean, reflect: true })\n\tpublic disabled = false\n\n\t/** Whether the input is read-only. */\n\t@property({ type: Boolean, reflect: true })\n\tpublic readonly = false\n\n\t/** If true, we visually show a pointer cursor even if readOnly. */\n\t@property({ type: Boolean, reflect: true }) public clickable = false\n\n\t/** Whether browser spellcheck is enabled. */\n\t@property({ type: Boolean, reflect: true })\n\tpublic spellcheck = false\n\n\t/**\n\t * Text alignment within the input.\n\t * - 'left' | 'center' | 'right'\n\t */\n\t@property({ type: String, reflect: true })\n\tpublic align: 'left' | 'center' | 'right' = 'left'\n\n\t/** inputmode attribute (affects on-screen keyboards in mobile). */\n\t@property()\n\tpublic inputmode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url'\n\n\t@property({ type: Number })\n\tpublic minlength?: number\n\n\t@property({ type: Number })\n\tpublic maxlength?: number\n\n\t@property()\n\tpublic min?: string\n\n\t@property()\n\tpublic max?: string\n\n\t@property({ type: Number, reflect: true })\n\tpublic step?: number\n\n\t/** If true, auto-focus this input on first render. */\n\t@property({ type: Boolean })\n\tpublic autofocus = false\n\n\t/** Autocomplete/autofill hints. */\n\t@property({ type: String, reflect: true })\n\tpublic autocomplete: AutoFill = 'on'\n\n\t/**\n\t * tabIndex for focusing by tab key. Typically 0 or -1.\n\t */\n\t@property({ type: Number, reflect: true })\n\tpublic tabIndex = 0\n\n\t/**\n\t * A small hint text or error message to display under the input.\n\t */\n\t@property()\n\tpublic hint?: string\n\n\t/**\n\t * If true, we style the input as an error state, and possibly display\n\t * the hint as an error message.\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tpublic error = false\n\n\t// ----------------------------\n\t// B) Queries & Refs\n\t// ----------------------------\n\t@query('input') private inputElement!: HTMLInputElement\n\tprivate inputRef = createRef<HTMLInputElement>()\n\n\t// ----------------------------\n\t// C) Form-associated logic\n\t// ----------------------------\n\tstatic formAssociated = true\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tdelegatesFocus: true, // so focus() goes to <input>\n\t}\n\n\tprivate internals?: ElementInternals\n\n\tconstructor() {\n\t\tsuper()\n\t\tif ('attachInternals' in this) {\n\t\t\ttry {\n\t\t\t\tthis.internals = this.attachInternals()\n\t\t\t} catch {\n\t\t\t\t// no-op for older browsers / polyfills\n\t\t\t\tthis.internals = undefined\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * If user did not provide an ID, auto-generate one so <label for=\"...\">\n\t * and various aria-* attributes can reference it.\n\t */\n\tprotected override willUpdate(changedProps: PropertyValueMap<any> | Map<PropertyKey, unknown>) {\n\t\tif (!this.id) {\n\t\t\tthis.id = `schmancy-input-${SchmancyInput._idCounter++}`\n\t\t}\n\t\tsuper.willUpdate(changedProps)\n\t}\n\n\t/** The form this element is associated with, if any. */\n\tget form() {\n\t\treturn this.internals?.form ?? null\n\t}\n\n\tprotected override updated(changedProps: Map<string, unknown>) {\n\t\tsuper.updated(changedProps)\n\t\tif (changedProps.has('value')) {\n\t\t\t// Reflect the current value to the form internals, so it’s submitted.\n\t\t\tthis.internals?.setFormValue(this.value)\n\t\t}\n\n\t\tif (changedProps.has('error')) {\n\t\t\t// If we have an error state, we can set custom error validity, or none if resolved.\n\t\t\tif (this.error) {\n\t\t\t\tthis.internals?.setValidity({ customError: true }, 'Invalid input', this.inputElement)\n\t\t\t} else {\n\t\t\t\tthis.internals?.setValidity({})\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Native form methods:\n\t * - checkValidity()\n\t * - reportValidity()\n\t * - setCustomValidity()\n\t */\n\tpublic checkValidity() {\n\t\treturn this.inputRef.value?.checkValidity() ?? true\n\t}\n\tpublic reportValidity() {\n\t\treturn this.inputRef.value?.reportValidity() ?? true\n\t}\n\tpublic setCustomValidity(message: string) {\n\t\tthis.inputRef.value?.setCustomValidity(message)\n\t}\n\n\t// ----------------------------\n\t// D) Lifecycle Hooks\n\t// ----------------------------\n\tfirstUpdated() {\n\t\t// Autofocus if desired\n\t\tif (this.autofocus) {\n\t\t\tthis.focus()\n\t\t}\n\n\t\t// 1) Subscribe to 'input' events (every keystroke)\n\t\tfromEvent<InputEvent>(this.inputElement, 'input')\n\t\t\t.pipe(\n\t\t\t\tmap(ev => (ev.target as HTMLInputElement).value),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(value => {\n\t\t\t\tthis.value = value\n\t\t\t\t// Fire custom 'input' event with details\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent<EventDetails>('input', {\n\t\t\t\t\t\tdetail: { value },\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t\t// dispatch change event\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent<EventDetails>('change', {\n\t\t\t\t\t\tdetail: { value },\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t})\n\n\t\t// 2) Subscribe to 'change' events (native behavior, usually on blur)\n\t\tfromEvent<Event>(this.inputElement, 'change')\n\t\t\t.pipe(\n\t\t\t\tmap(ev => (ev.target as HTMLInputElement).value),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(value => {\n\t\t\t\tthis.value = value\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent<EventDetails>('change', {\n\t\t\t\t\t\tdetail: { value },\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t})\n\n\t\t// 3) Emit a custom 'enter' event when user presses Enter\n\t\tfromEvent<KeyboardEvent>(this.inputElement, 'keyup')\n\t\t\t.pipe(\n\t\t\t\tfilter(ev => ev.key === 'Enter'),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(ev => {\n\t\t\t\tconst { value } = ev.target as HTMLInputElement\n\t\t\t\tthis.value = value\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent<EventDetails>('enter', {\n\t\t\t\t\t\tdetail: { value },\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t})\n\n\t\t// 4) Detect autofill animation (Chrome, etc.)\n\t\tfromEvent<AnimationEvent>(this.inputElement, 'animationstart')\n\t\t\t.pipe(\n\t\t\t\tfilter(ev => ev.animationName === 'onAutoFillStart'),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(ev => {\n\t\t\t\tconst { value } = ev.target as HTMLInputElement\n\t\t\t\tthis.value = value\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent<EventDetails>('change', {\n\t\t\t\t\t\tdetail: { value },\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t})\n\t}\n\n\t// ----------------------------\n\t// E) Utility Methods\n\t// ----------------------------\n\t/** Selects all text within the input. */\n\tpublic select() {\n\t\treturn this.inputRef.value?.select()\n\t}\n\n\t/** Returns the native validity state of the inner <input>. */\n\tpublic getValidity(): ValidityState | undefined {\n\t\treturn this.inputRef.value?.validity\n\t}\n\n\t/**\n\t * Override to forward focus to the internal <input>.\n\t * Also dispatch a 'focus' event for external listeners.\n\t */\n\tpublic override focus(options?: FocusOptions) {\n\t\tthis.inputRef.value?.focus(options)\n\t\tthis.dispatchEvent(new Event('focus'))\n\t}\n\n\t/**\n\t * Override to forward clicks to the internal <input>.\n\t * Also dispatch a 'click' event for external listeners.\n\t */\n\tpublic override click() {\n\t\tthis.inputRef.value?.click()\n\t\tthis.dispatchEvent(new Event('click'))\n\t}\n\n\t/** Forward blur to the internal <input>. */\n\tpublic override blur() {\n\t\tthis.inputRef.value?.blur()\n\t\tthis.dispatchEvent(new Event('blur'))\n\t}\n\n\t// ----------------------------\n\t// F) Rendering\n\t// ----------------------------\n\tprotected override render() {\n\t\tconst inputClasses = {\n\t\t\t'w-full flex-1 h-[50px] rounded-[8px] border-0 px-[8px] sm:px-[12px] md:px-[16px]': true,\n\t\t\t'outline-secondary-default focus:outline-1 ': true,\n\t\t\t'disabled:opacity-40 disabled:cursor-not-allowed': true,\n\t\t\t'placeholder:text-muted': true,\n\t\t\t'ring-0 ring-inset focus:ring-1 focus:ring-inset': true,\n\t\t\t// If not in error state, use standard ring color:\n\t\t\t'ring-secondary-default ring-outline focus:ring-secondary-default': !this.error,\n\t\t\t// Error ring override:\n\t\t\t'ring-error-default focus:ring-error-default': this.error,\n\t\t\t// If read-only but \"clickable\" is true, show pointer. Otherwise normal text cursor.\n\t\t\t'caret-transparent focus:outline-hidden cursor-pointer text-select-none': this.readonly,\n\t\t\t'cursor-pointer': this.clickable,\n\t\t\t// Alignment classes:\n\t\t\t'text-center': this.align === 'center',\n\t\t\t'text-right': this.align === 'right',\n\t\t}\n\n\t\tconst labelClasses = {\n\t\t\t'opacity-40': this.disabled,\n\t\t\t'block mb-[4px]': true,\n\t\t}\n\n\t\t/**\n\t\t * - If `this.label` is present, we render a proper `<label for=\"${this.id}\">`.\n\t\t * - If not, we add an aria-label to the <input> for better accessibility.\n\t\t * - If there's a `hint`, we reference it via aria-describedby.\n\t\t * - If there's an error, we set aria-invalid and could set aria-errormessage.\n\t\t */\n\t\treturn html`\n\t\t\t${when(\n\t\t\t\tthis.label,\n\t\t\t\t() => html`\n\t\t\t\t\t<label\n\t\t\t\t\t\tfor=${this.id}\n\t\t\t\t\t\tid=\"label-${this.id}\"\n\t\t\t\t\t\tclass=${classMap(labelClasses)}\n\t\t\t\t\t\t${color({\n\t\t\t\t\t\t\tcolor: this.error ? SchmancyTheme.sys.color.error.default : SchmancyTheme.sys.color.primary.default,\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t<schmancy-typography type=\"label\" token=\"lg\">${this.label}</schmancy-typography>\n\t\t\t\t\t</label>\n\t\t\t\t`,\n\t\t\t)}\n\n\t\t\t<input\n\t\t\t\t${color({\n\t\t\t\t\tbgColor: SchmancyTheme.sys.color.surface.highest,\n\t\t\t\t\tcolor: SchmancyTheme.sys.color.surface.on,\n\t\t\t\t})}\n\t\t\t\t${ref(this.inputRef)}\n\t\t\t\tid=${this.id}\n\t\t\t\tname=${this.name}\n\t\t\t\tclass=${classMap(inputClasses)}\n\t\t\t\t.value=${this.value}\n\t\t\t\t.type=${this.type}\n\t\t\t\t.autocomplete=${this.autocomplete}\n\t\t\t\t.spellcheck=${this.spellcheck}\n\t\t\t\tplaceholder=${this.placeholder}\n\t\t\t\tinputmode=${ifDefined(this.inputmode)}\n\t\t\t\tpattern=${ifDefined(this.pattern)}\n\t\t\t\tstep=${ifDefined(this.step)}\n\t\t\t\tminlength=${ifDefined(this.minlength)}\n\t\t\t\tmaxlength=${ifDefined(this.maxlength)}\n\t\t\t\tmin=${ifDefined(this.min)}\n\t\t\t\tmax=${ifDefined(this.max)}\n\t\t\t\t?required=${this.required}\n\t\t\t\t?disabled=${this.disabled}\n\t\t\t\t?readonly=${this.readonly}\n\t\t\t\taria-invalid=${this.error ? 'true' : 'false'}\n\t\t\t\taria-required=${this.required ? 'true' : 'false'}\n\t\t\t\taria-labelledby=${this.label ? `label-${this.id}` : nothing}\n\t\t\t\taria-describedby=${this.hint ? `hint-${this.id}` : nothing}\n\t\t\t\taria-label=${ifDefined(!this.label ? this.placeholder || 'Input' : undefined)}\n\t\t\t/>\n\n\t\t\t${when(\n\t\t\t\tthis.hint,\n\t\t\t\t() => html`\n\t\t\t\t\t<div\n\t\t\t\t\t\tid=\"hint-${this.id}\"\n\t\t\t\t\t\tclass=\"pt-[2px]\"\n\t\t\t\t\t\t${color({\n\t\t\t\t\t\t\tcolor: this.error ? SchmancyTheme.sys.color.error.default : SchmancyTheme.sys.color.primary.default,\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t<schmancy-typography align=\"left\" type=\"label\"> ${this.hint} </schmancy-typography>\n\t\t\t\t\t</div>\n\t\t\t\t`,\n\t\t\t)}\n\t\t`\n\t}\n}\n"],"names":["SchmancyInput","TailwindElement","super","this","id","label","type","name","Date","now","placeholder","value","required","disabled","readonly","clickable","spellcheck","align","autofocus","autocomplete","tabIndex","error","inputRef","createRef","internals","attachInternals","changedProps","_idCounter","willUpdate","form","updated","has","setFormValue","setValidity","customError","inputElement","checkValidity","reportValidity","message","setCustomValidity","focus","fromEvent","pipe","map","ev","target","distinctUntilChanged","takeUntil","disconnecting","subscribe","dispatchEvent","CustomEvent","detail","bubbles","composed","filter","key","animationName","select","validity","options","Event","click","blur","render","inputClasses","labelClasses","html","when","classMap","color","SchmancyTheme","sys","default","primary","bgColor","surface","highest","on","ref","ifDefined","inputmode","pattern","step","minlength","maxlength","min","max","nothing","hint","formAssociated","shadowRootOptions","LitElement","delegatesFocus","__decorateClass","property","reflect","prototype","String","Boolean","Number","query","customElement"],"mappings":"slBAoCA,IAAqBA,EAArB,cAA2CC,g1BAiI1C,aAEC,CAAA,GADMC,MAzHPC,EAAAA,KAAgBC,GAAK,GAMeD,KAAAE,MAAA,GAMpCF,KAAOG,KAAiC,OAMxCH,KAAOI,KAAO,QAAQC,KAAKC,IAG3BN,CAAAA,GAAAA,KAAOO,YAAc,GAIrBP,KAAOQ,MAAQ,GAQfR,KAAOS,SAAW,GAIlBT,KAAOU,SAAAA,GAIPV,KAAOW,SAAW,GAG0BX,KAAOY,UAAY,GAI/DZ,KAAOa,WAAAA,GAOPb,KAAOc,MAAqC,OAuB5Cd,KAAOe,UAAAA,GAIPf,KAAOgB,aAAyB,KAMhChB,KAA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AAA,CAAA,EAIAH,EAAA,CADNC,WAAS,CAAEzF,KAAM6F,OAAAA,CAAAA,CAAAA,EAtFEnG,EAuFbiG,UAAA,YAAA,CAIAH,EAAAA,EAAA,CADNC,EAAAA,SAAS,CAAEzF,KAAM4F,OAAQF,QAAAA,EA1FNhG,CAAAA,CAAAA,EAAAA,EA2FbiG,UAAA,eAAA,GAMAH,EAAA,CADNC,EAAAA,SAAS,CAAEzF,KAAM8F,OAAQJ,QAAS,EAAA,CAAA,CAAA,EAhGfhG,EAiGbiG,UAAA,WAAA,CAMAH,EAAAA,EAAA,CADNC,EAASA,SAtGU/F,CAAAA,EAAAA,EAuGbiG,UAAA,OAAA,CAAA,EAOAH,EAAA,CADNC,EAAAA,SAAS,CAAEzF,KAAM6F,QAASH,UA7GPhG,CAAAA,CAAAA,EAAAA,EA8GbiG,UAAA,QAAA,CAKiBH,EAAAA,EAAA,CAAvBO,EAAAA,MAAM,OAnHarG,CAAAA,EAAAA,EAmHIiG,UAAA,eAAA,GAnHJjG,EAArB8F,EAAA,CADCQ,EAAAA,cAAc,gBACMtG,CAAAA,EAAAA,CAAAA"}
@@ -0,0 +1,135 @@
1
+ import { nothing as f, html as m, LitElement as w } from "lit";
2
+ import { property as r, query as E, customElement as k } from "lit/decorators.js";
3
+ import { classMap as b } from "lit/directives/class-map.js";
4
+ import { ifDefined as n } from "lit/directives/if-defined.js";
5
+ import { createRef as R, ref as C } from "lit/directives/ref.js";
6
+ import { when as g } from "lit/directives/when.js";
7
+ import { fromEvent as h, map as v, distinctUntilChanged as $, takeUntil as u, filter as x } from "rxjs";
8
+ import "lit/directives/style-map.js";
9
+ import { T as V } from "./tailwind.mixin-DklgfhB4.js";
10
+ import { c as y } from "./ripple-BumgqsDT.js";
11
+ import { S as p } from "./theme.interface-C5Kj6WjD.js";
12
+ var S = Object.defineProperty, q = Object.getOwnPropertyDescriptor, i = (t, s, l, o) => {
13
+ for (var c, a = o > 1 ? void 0 : o ? q(s, l) : s, d = t.length - 1; d >= 0; d--) (c = t[d]) && (a = (o ? c(s, l, a) : c(a)) || a);
14
+ return o && a && S(s, l, a), a;
15
+ };
16
+ let e = class extends V(":host{border:unset!important;line-height:unset!important;background:unset!important;padding:unset!important;font-size:unset!important;box-shadow:unset!important;width:-webkit-fill-available}:host:focus{box-shadow:unset!important}input:focus-visible{outline:none!important}input{font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;color:inherit;letter-spacing:inherit;text-transform:inherit;text-decoration:inherit;text-indent:inherit;text-shadow:inherit;text-overflow:inherit;text-rendering:inherit;text-size-adjust:inherit;text-align-last:inherit}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}@keyframes onAutoFillStart{}input:-webkit-autofill{animation-name:onAutoFillStart}") {
17
+ constructor() {
18
+ if (super(), this.id = "", this.label = "", this.type = "text", this.name = `name_${Date.now()}`, this.placeholder = "", this.value = "", this.required = !1, this.disabled = !1, this.readonly = !1, this.clickable = !1, this.spellcheck = !1, this.align = "left", this.autofocus = !1, this.autocomplete = "on", this.tabIndex = 0, this.error = !1, this.inputRef = R(), "attachInternals" in this) try {
19
+ this.internals = this.attachInternals();
20
+ } catch {
21
+ this.internals = void 0;
22
+ }
23
+ }
24
+ willUpdate(t) {
25
+ this.id || (this.id = "schmancy-input-" + e._idCounter++), super.willUpdate(t);
26
+ }
27
+ get form() {
28
+ var t;
29
+ return ((t = this.internals) == null ? void 0 : t.form) ?? null;
30
+ }
31
+ updated(t) {
32
+ var s, l, o;
33
+ super.updated(t), t.has("value") && ((s = this.internals) == null || s.setFormValue(this.value)), t.has("error") && (this.error ? (l = this.internals) == null || l.setValidity({ customError: !0 }, "Invalid input", this.inputElement) : (o = this.internals) == null || o.setValidity({}));
34
+ }
35
+ checkValidity() {
36
+ var t;
37
+ return ((t = this.inputRef.value) == null ? void 0 : t.checkValidity()) ?? !0;
38
+ }
39
+ reportValidity() {
40
+ var t;
41
+ return ((t = this.inputRef.value) == null ? void 0 : t.reportValidity()) ?? !0;
42
+ }
43
+ setCustomValidity(t) {
44
+ var s;
45
+ (s = this.inputRef.value) == null || s.setCustomValidity(t);
46
+ }
47
+ firstUpdated() {
48
+ this.autofocus && this.focus(), h(this.inputElement, "input").pipe(v((t) => t.target.value), $(), u(this.disconnecting)).subscribe((t) => {
49
+ this.value = t, this.dispatchEvent(new CustomEvent("input", { detail: { value: t }, bubbles: !0, composed: !0 })), this.dispatchEvent(new CustomEvent("change", { detail: { value: t }, bubbles: !0, composed: !0 }));
50
+ }), h(this.inputElement, "change").pipe(v((t) => t.target.value), $(), u(this.disconnecting)).subscribe((t) => {
51
+ this.value = t, this.dispatchEvent(new CustomEvent("change", { detail: { value: t }, bubbles: !0, composed: !0 }));
52
+ }), h(this.inputElement, "keyup").pipe(x((t) => t.key === "Enter"), u(this.disconnecting)).subscribe((t) => {
53
+ const { value: s } = t.target;
54
+ this.value = s, this.dispatchEvent(new CustomEvent("enter", { detail: { value: s }, bubbles: !0, composed: !0 }));
55
+ }), h(this.inputElement, "animationstart").pipe(x((t) => t.animationName === "onAutoFillStart"), u(this.disconnecting)).subscribe((t) => {
56
+ const { value: s } = t.target;
57
+ this.value = s, this.dispatchEvent(new CustomEvent("change", { detail: { value: s }, bubbles: !0, composed: !0 }));
58
+ });
59
+ }
60
+ select() {
61
+ var t;
62
+ return (t = this.inputRef.value) == null ? void 0 : t.select();
63
+ }
64
+ getValidity() {
65
+ var t;
66
+ return (t = this.inputRef.value) == null ? void 0 : t.validity;
67
+ }
68
+ focus(t) {
69
+ var s;
70
+ (s = this.inputRef.value) == null || s.focus(t), this.dispatchEvent(new Event("focus"));
71
+ }
72
+ click() {
73
+ var t;
74
+ (t = this.inputRef.value) == null || t.click(), this.dispatchEvent(new Event("click"));
75
+ }
76
+ blur() {
77
+ var t;
78
+ (t = this.inputRef.value) == null || t.blur(), this.dispatchEvent(new Event("blur"));
79
+ }
80
+ render() {
81
+ const t = { "w-full flex-1 h-[50px] rounded-[8px] border-0 px-[8px] sm:px-[12px] md:px-[16px]": !0, "outline-secondary-default focus:outline-1 ": !0, "disabled:opacity-40 disabled:cursor-not-allowed": !0, "placeholder:text-muted": !0, "ring-0 ring-inset focus:ring-1 focus:ring-inset": !0, "ring-secondary-default ring-outline focus:ring-secondary-default": !this.error, "ring-error-default focus:ring-error-default": this.error, "caret-transparent focus:outline-hidden cursor-pointer text-select-none": this.readonly, "cursor-pointer": this.clickable, "text-center": this.align === "center", "text-right": this.align === "right" }, s = { "opacity-40": this.disabled, "block mb-[4px]": !0 };
82
+ return m`
83
+ ${g(this.label, () => m`
84
+ <label
85
+ for=${this.id}
86
+ id="label-${this.id}"
87
+ class=${b(s)}
88
+ ${y({ color: this.error ? p.sys.color.error.default : p.sys.color.primary.default })}
89
+ >
90
+ <schmancy-typography type="label" token="lg">${this.label}</schmancy-typography>
91
+ </label>
92
+ `)}
93
+
94
+ <input
95
+ ${y({ bgColor: p.sys.color.surface.highest, color: p.sys.color.surface.on })}
96
+ ${C(this.inputRef)}
97
+ id=${this.id}
98
+ name=${this.name}
99
+ class=${b(t)}
100
+ .value=${this.value}
101
+ .type=${this.type}
102
+ .autocomplete=${this.autocomplete}
103
+ .spellcheck=${this.spellcheck}
104
+ placeholder=${this.placeholder}
105
+ inputmode=${n(this.inputmode)}
106
+ pattern=${n(this.pattern)}
107
+ step=${n(this.step)}
108
+ minlength=${n(this.minlength)}
109
+ maxlength=${n(this.maxlength)}
110
+ min=${n(this.min)}
111
+ max=${n(this.max)}
112
+ ?required=${this.required}
113
+ ?disabled=${this.disabled}
114
+ ?readonly=${this.readonly}
115
+ aria-invalid=${this.error ? "true" : "false"}
116
+ aria-required=${this.required ? "true" : "false"}
117
+ aria-labelledby=${this.label ? `label-${this.id}` : f}
118
+ aria-describedby=${this.hint ? `hint-${this.id}` : f}
119
+ aria-label=${n(this.label ? void 0 : this.placeholder || "Input")}
120
+ />
121
+
122
+ ${g(this.hint, () => m`
123
+ <div
124
+ id="hint-${this.id}"
125
+ class="pt-[2px]"
126
+ ${y({ color: this.error ? p.sys.color.error.default : p.sys.color.primary.default })}
127
+ >
128
+ <schmancy-typography align="left" type="label"> ${this.hint} </schmancy-typography>
129
+ </div>
130
+ `)}
131
+ `;
132
+ }
133
+ };
134
+ e._idCounter = 0, e.formAssociated = !0, e.shadowRootOptions = { ...w.shadowRootOptions, delegatesFocus: !0 }, i([r({ reflect: !0 })], e.prototype, "id", 2), i([r({ type: String })], e.prototype, "label", 2), i([r({ reflect: !0 })], e.prototype, "type", 2), i([r()], e.prototype, "name", 2), i([r()], e.prototype, "placeholder", 2), i([r({ type: String, reflect: !0 })], e.prototype, "value", 2), i([r({ type: String, reflect: !0 })], e.prototype, "pattern", 2), i([r({ type: Boolean, reflect: !0 })], e.prototype, "required", 2), i([r({ type: Boolean, reflect: !0 })], e.prototype, "disabled", 2), i([r({ type: Boolean, reflect: !0 })], e.prototype, "readonly", 2), i([r({ type: Boolean, reflect: !0 })], e.prototype, "clickable", 2), i([r({ type: Boolean, reflect: !0 })], e.prototype, "spellcheck", 2), i([r({ type: String, reflect: !0 })], e.prototype, "align", 2), i([r()], e.prototype, "inputmode", 2), i([r({ type: Number })], e.prototype, "minlength", 2), i([r({ type: Number })], e.prototype, "maxlength", 2), i([r()], e.prototype, "min", 2), i([r()], e.prototype, "max", 2), i([r({ type: Number, reflect: !0 })], e.prototype, "step", 2), i([r({ type: Boolean })], e.prototype, "autofocus", 2), i([r({ type: String, reflect: !0 })], e.prototype, "autocomplete", 2), i([r({ type: Number, reflect: !0 })], e.prototype, "tabIndex", 2), i([r()], e.prototype, "hint", 2), i([r({ type: Boolean, reflect: !0 })], e.prototype, "error", 2), i([E("input")], e.prototype, "inputElement", 2), e = i([k("schmancy-input")], e);
135
+ //# sourceMappingURL=input-CZX1sxBe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-CZX1sxBe.js","sources":["../src/input/input.ts"],"sourcesContent":["import { html, LitElement, nothing, PropertyValueMap } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { when } from 'lit/directives/when.js'\nimport { distinctUntilChanged, filter, fromEvent, map, takeUntil } from 'rxjs'\n\nimport { TailwindElement } from '@mixins/index'\n\n// color directive + theme interface\nimport { color } from '@schmancy/directives'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\nimport style from './input.scss?inline'\n// If you want to be form-associated, define the type on `ElementInternals`.\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-input': SchmancyInput\n\t}\n}\n\ntype EventDetails = {\n\tvalue: string\n}\n\n/**\n * Custom events the component may emit:\n * - 'input': on every keystroke\n * - 'change': on native blur/change\n * - 'enter': specifically when user presses Enter\n */\nexport type SchmancyInputInputEvent = CustomEvent<EventDetails>\nexport type SchmancyInputChangeEvent = CustomEvent<EventDetails>\nexport type SchmancyInputEnterEvent = CustomEvent<EventDetails>\n\n@customElement('schmancy-input')\nexport default class SchmancyInput extends TailwindElement(style) {\n\t// ----------------------------\n\t// A) Public properties\n\t// ----------------------------\n\n\t/** If user does NOT set `id`, we'll autogenerate one. */\n\tstatic _idCounter = 0\n\n\t@property({ reflect: true })\n\tpublic override id = ''\n\n\t/**\n\t * The label for the control. If populated, we render a `<label for=\"...\">`.\n\t * If empty, we add an `aria-label` to the <input> for better screenreader support.\n\t */\n\t@property({ type: String }) label = ''\n\n\t/**\n\t * The type of input. (e.g. 'text', 'password', 'email', etc.)\n\t */\n\t@property({ reflect: true })\n\tpublic type: HTMLInputElement['type'] = 'text'\n\n\t/**\n\t * Name attribute (for form submissions). By default, a unique fallback.\n\t */\n\t@property()\n\tpublic name = `name_${Date.now()}`\n\n\t@property()\n\tpublic placeholder = ''\n\n\t/** Current value of the input. */\n\t@property({ type: String, reflect: true })\n\tpublic value = ''\n\n\t/** Pattern validation attribute. */\n\t@property({ type: String, reflect: true })\n\tpublic pattern?: string\n\n\t/** Whether the control is required for form validation. */\n\t@property({ type: Boolean, reflect: true })\n\tpublic required = false\n\n\t/** Whether the control is disabled. */\n\t@property({ type: Boolean, reflect: true })\n\tpublic disabled = false\n\n\t/** Whether the input is read-only. */\n\t@property({ type: Boolean, reflect: true })\n\tpublic readonly = false\n\n\t/** If true, we visually show a pointer cursor even if readOnly. */\n\t@property({ type: Boolean, reflect: true }) public clickable = false\n\n\t/** Whether browser spellcheck is enabled. */\n\t@property({ type: Boolean, reflect: true })\n\tpublic spellcheck = false\n\n\t/**\n\t * Text alignment within the input.\n\t * - 'left' | 'center' | 'right'\n\t */\n\t@property({ type: String, reflect: true })\n\tpublic align: 'left' | 'center' | 'right' = 'left'\n\n\t/** inputmode attribute (affects on-screen keyboards in mobile). */\n\t@property()\n\tpublic inputmode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url'\n\n\t@property({ type: Number })\n\tpublic minlength?: number\n\n\t@property({ type: Number })\n\tpublic maxlength?: number\n\n\t@property()\n\tpublic min?: string\n\n\t@property()\n\tpublic max?: string\n\n\t@property({ type: Number, reflect: true })\n\tpublic step?: number\n\n\t/** If true, auto-focus this input on first render. */\n\t@property({ type: Boolean })\n\tpublic autofocus = false\n\n\t/** Autocomplete/autofill hints. */\n\t@property({ type: String, reflect: true })\n\tpublic autocomplete: AutoFill = 'on'\n\n\t/**\n\t * tabIndex for focusing by tab key. Typically 0 or -1.\n\t */\n\t@property({ type: Number, reflect: true })\n\tpublic tabIndex = 0\n\n\t/**\n\t * A small hint text or error message to display under the input.\n\t */\n\t@property()\n\tpublic hint?: string\n\n\t/**\n\t * If true, we style the input as an error state, and possibly display\n\t * the hint as an error message.\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tpublic error = false\n\n\t// ----------------------------\n\t// B) Queries & Refs\n\t// ----------------------------\n\t@query('input') private inputElement!: HTMLInputElement\n\tprivate inputRef = createRef<HTMLInputElement>()\n\n\t// ----------------------------\n\t// C) Form-associated logic\n\t// ----------------------------\n\tstatic formAssociated = true\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tdelegatesFocus: true, // so focus() goes to <input>\n\t}\n\n\tprivate internals?: ElementInternals\n\n\tconstructor() {\n\t\tsuper()\n\t\tif ('attachInternals' in this) {\n\t\t\ttry {\n\t\t\t\tthis.internals = this.attachInternals()\n\t\t\t} catch {\n\t\t\t\t// no-op for older browsers / polyfills\n\t\t\t\tthis.internals = undefined\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * If user did not provide an ID, auto-generate one so <label for=\"...\">\n\t * and various aria-* attributes can reference it.\n\t */\n\tprotected override willUpdate(changedProps: PropertyValueMap<any> | Map<PropertyKey, unknown>) {\n\t\tif (!this.id) {\n\t\t\tthis.id = `schmancy-input-${SchmancyInput._idCounter++}`\n\t\t}\n\t\tsuper.willUpdate(changedProps)\n\t}\n\n\t/** The form this element is associated with, if any. */\n\tget form() {\n\t\treturn this.internals?.form ?? null\n\t}\n\n\tprotected override updated(changedProps: Map<string, unknown>) {\n\t\tsuper.updated(changedProps)\n\t\tif (changedProps.has('value')) {\n\t\t\t// Reflect the current value to the form internals, so it’s submitted.\n\t\t\tthis.internals?.setFormValue(this.value)\n\t\t}\n\n\t\tif (changedProps.has('error')) {\n\t\t\t// If we have an error state, we can set custom error validity, or none if resolved.\n\t\t\tif (this.error) {\n\t\t\t\tthis.internals?.setValidity({ customError: true }, 'Invalid input', this.inputElement)\n\t\t\t} else {\n\t\t\t\tthis.internals?.setValidity({})\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Native form methods:\n\t * - checkValidity()\n\t * - reportValidity()\n\t * - setCustomValidity()\n\t */\n\tpublic checkValidity() {\n\t\treturn this.inputRef.value?.checkValidity() ?? true\n\t}\n\tpublic reportValidity() {\n\t\treturn this.inputRef.value?.reportValidity() ?? true\n\t}\n\tpublic setCustomValidity(message: string) {\n\t\tthis.inputRef.value?.setCustomValidity(message)\n\t}\n\n\t// ----------------------------\n\t// D) Lifecycle Hooks\n\t// ----------------------------\n\tfirstUpdated() {\n\t\t// Autofocus if desired\n\t\tif (this.autofocus) {\n\t\t\tthis.focus()\n\t\t}\n\n\t\t// 1) Subscribe to 'input' events (every keystroke)\n\t\tfromEvent<InputEvent>(this.inputElement, 'input')\n\t\t\t.pipe(\n\t\t\t\tmap(ev => (ev.target as HTMLInputElement).value),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(value => {\n\t\t\t\tthis.value = value\n\t\t\t\t// Fire custom 'input' event with details\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent<EventDetails>('input', {\n\t\t\t\t\t\tdetail: { value },\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t\t// dispatch change event\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent<EventDetails>('change', {\n\t\t\t\t\t\tdetail: { value },\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t})\n\n\t\t// 2) Subscribe to 'change' events (native behavior, usually on blur)\n\t\tfromEvent<Event>(this.inputElement, 'change')\n\t\t\t.pipe(\n\t\t\t\tmap(ev => (ev.target as HTMLInputElement).value),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(value => {\n\t\t\t\tthis.value = value\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent<EventDetails>('change', {\n\t\t\t\t\t\tdetail: { value },\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t})\n\n\t\t// 3) Emit a custom 'enter' event when user presses Enter\n\t\tfromEvent<KeyboardEvent>(this.inputElement, 'keyup')\n\t\t\t.pipe(\n\t\t\t\tfilter(ev => ev.key === 'Enter'),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(ev => {\n\t\t\t\tconst { value } = ev.target as HTMLInputElement\n\t\t\t\tthis.value = value\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent<EventDetails>('enter', {\n\t\t\t\t\t\tdetail: { value },\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t})\n\n\t\t// 4) Detect autofill animation (Chrome, etc.)\n\t\tfromEvent<AnimationEvent>(this.inputElement, 'animationstart')\n\t\t\t.pipe(\n\t\t\t\tfilter(ev => ev.animationName === 'onAutoFillStart'),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(ev => {\n\t\t\t\tconst { value } = ev.target as HTMLInputElement\n\t\t\t\tthis.value = value\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent<EventDetails>('change', {\n\t\t\t\t\t\tdetail: { value },\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t})\n\t}\n\n\t// ----------------------------\n\t// E) Utility Methods\n\t// ----------------------------\n\t/** Selects all text within the input. */\n\tpublic select() {\n\t\treturn this.inputRef.value?.select()\n\t}\n\n\t/** Returns the native validity state of the inner <input>. */\n\tpublic getValidity(): ValidityState | undefined {\n\t\treturn this.inputRef.value?.validity\n\t}\n\n\t/**\n\t * Override to forward focus to the internal <input>.\n\t * Also dispatch a 'focus' event for external listeners.\n\t */\n\tpublic override focus(options?: FocusOptions) {\n\t\tthis.inputRef.value?.focus(options)\n\t\tthis.dispatchEvent(new Event('focus'))\n\t}\n\n\t/**\n\t * Override to forward clicks to the internal <input>.\n\t * Also dispatch a 'click' event for external listeners.\n\t */\n\tpublic override click() {\n\t\tthis.inputRef.value?.click()\n\t\tthis.dispatchEvent(new Event('click'))\n\t}\n\n\t/** Forward blur to the internal <input>. */\n\tpublic override blur() {\n\t\tthis.inputRef.value?.blur()\n\t\tthis.dispatchEvent(new Event('blur'))\n\t}\n\n\t// ----------------------------\n\t// F) Rendering\n\t// ----------------------------\n\tprotected override render() {\n\t\tconst inputClasses = {\n\t\t\t'w-full flex-1 h-[50px] rounded-[8px] border-0 px-[8px] sm:px-[12px] md:px-[16px]': true,\n\t\t\t'outline-secondary-default focus:outline-1 ': true,\n\t\t\t'disabled:opacity-40 disabled:cursor-not-allowed': true,\n\t\t\t'placeholder:text-muted': true,\n\t\t\t'ring-0 ring-inset focus:ring-1 focus:ring-inset': true,\n\t\t\t// If not in error state, use standard ring color:\n\t\t\t'ring-secondary-default ring-outline focus:ring-secondary-default': !this.error,\n\t\t\t// Error ring override:\n\t\t\t'ring-error-default focus:ring-error-default': this.error,\n\t\t\t// If read-only but \"clickable\" is true, show pointer. Otherwise normal text cursor.\n\t\t\t'caret-transparent focus:outline-hidden cursor-pointer text-select-none': this.readonly,\n\t\t\t'cursor-pointer': this.clickable,\n\t\t\t// Alignment classes:\n\t\t\t'text-center': this.align === 'center',\n\t\t\t'text-right': this.align === 'right',\n\t\t}\n\n\t\tconst labelClasses = {\n\t\t\t'opacity-40': this.disabled,\n\t\t\t'block mb-[4px]': true,\n\t\t}\n\n\t\t/**\n\t\t * - If `this.label` is present, we render a proper `<label for=\"${this.id}\">`.\n\t\t * - If not, we add an aria-label to the <input> for better accessibility.\n\t\t * - If there's a `hint`, we reference it via aria-describedby.\n\t\t * - If there's an error, we set aria-invalid and could set aria-errormessage.\n\t\t */\n\t\treturn html`\n\t\t\t${when(\n\t\t\t\tthis.label,\n\t\t\t\t() => html`\n\t\t\t\t\t<label\n\t\t\t\t\t\tfor=${this.id}\n\t\t\t\t\t\tid=\"label-${this.id}\"\n\t\t\t\t\t\tclass=${classMap(labelClasses)}\n\t\t\t\t\t\t${color({\n\t\t\t\t\t\t\tcolor: this.error ? SchmancyTheme.sys.color.error.default : SchmancyTheme.sys.color.primary.default,\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t<schmancy-typography type=\"label\" token=\"lg\">${this.label}</schmancy-typography>\n\t\t\t\t\t</label>\n\t\t\t\t`,\n\t\t\t)}\n\n\t\t\t<input\n\t\t\t\t${color({\n\t\t\t\t\tbgColor: SchmancyTheme.sys.color.surface.highest,\n\t\t\t\t\tcolor: SchmancyTheme.sys.color.surface.on,\n\t\t\t\t})}\n\t\t\t\t${ref(this.inputRef)}\n\t\t\t\tid=${this.id}\n\t\t\t\tname=${this.name}\n\t\t\t\tclass=${classMap(inputClasses)}\n\t\t\t\t.value=${this.value}\n\t\t\t\t.type=${this.type}\n\t\t\t\t.autocomplete=${this.autocomplete}\n\t\t\t\t.spellcheck=${this.spellcheck}\n\t\t\t\tplaceholder=${this.placeholder}\n\t\t\t\tinputmode=${ifDefined(this.inputmode)}\n\t\t\t\tpattern=${ifDefined(this.pattern)}\n\t\t\t\tstep=${ifDefined(this.step)}\n\t\t\t\tminlength=${ifDefined(this.minlength)}\n\t\t\t\tmaxlength=${ifDefined(this.maxlength)}\n\t\t\t\tmin=${ifDefined(this.min)}\n\t\t\t\tmax=${ifDefined(this.max)}\n\t\t\t\t?required=${this.required}\n\t\t\t\t?disabled=${this.disabled}\n\t\t\t\t?readonly=${this.readonly}\n\t\t\t\taria-invalid=${this.error ? 'true' : 'false'}\n\t\t\t\taria-required=${this.required ? 'true' : 'false'}\n\t\t\t\taria-labelledby=${this.label ? `label-${this.id}` : nothing}\n\t\t\t\taria-describedby=${this.hint ? `hint-${this.id}` : nothing}\n\t\t\t\taria-label=${ifDefined(!this.label ? this.placeholder || 'Input' : undefined)}\n\t\t\t/>\n\n\t\t\t${when(\n\t\t\t\tthis.hint,\n\t\t\t\t() => html`\n\t\t\t\t\t<div\n\t\t\t\t\t\tid=\"hint-${this.id}\"\n\t\t\t\t\t\tclass=\"pt-[2px]\"\n\t\t\t\t\t\t${color({\n\t\t\t\t\t\t\tcolor: this.error ? SchmancyTheme.sys.color.error.default : SchmancyTheme.sys.color.primary.default,\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t<schmancy-typography align=\"left\" type=\"label\"> ${this.hint} </schmancy-typography>\n\t\t\t\t\t</div>\n\t\t\t\t`,\n\t\t\t)}\n\t\t`\n\t}\n}\n"],"names":["SchmancyInput","TailwindElement","constructor","super","this","id","label","type","name","Date","now","placeholder","value","required","disabled","readonly","clickable","spellcheck","align","autofocus","autocomplete","tabIndex","error","inputRef","createRef","internals","attachInternals","changedProps","_idCounter","willUpdate","form","updated","has","setFormValue","setValidity","customError","inputElement","checkValidity","reportValidity","message","setCustomValidity","firstUpdated","focus","fromEvent","pipe","map","ev","target","distinctUntilChanged","takeUntil","disconnecting","subscribe","dispatchEvent","CustomEvent","detail","bubbles","composed","filter","key","animationName","select","getValidity","validity","options","Event","click","blur","inputClasses","labelClasses","html","when","classMap","color","SchmancyTheme","sys","default","primary","bgColor","surface","highest","on","ref","ifDefined","inputmode","pattern","step","minlength","maxlength","min","max","nothing","hint","formAssociated","shadowRootOptions","LitElement","delegatesFocus","__decorateClass","property","reflect","prototype","String","Boolean","Number","query","customElement"],"mappings":";;;;;;;;;;;;;;;AAoCA,IAAqBA,IAArB,cAA2CC;EAiI1C,cAAAC;AAEC,QADMC,MAAAA,GAzHPC,KAAgBC,KAAK,IAMeD,KAAAE,QAAA,IAMpCF,KAAOG,OAAiC,QAMxCH,KAAOI,OAAO,QAAQC,KAAKC,IAAAA,CAAAA,IAG3BN,KAAOO,cAAc,IAIrBP,KAAOQ,QAAQ,IAQfR,KAAOS,WAAAA,IAIPT,KAAOU,WAAW,IAIlBV,KAAOW,WAAAA,IAGqCX,KAAOY,YAAY,IAI/DZ,KAAOa,aAAa,IAOpBb,KAAOc,QAAq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ADNC,EAAS,EAAE1F,MAAM+F,QAAQJ,SAAAA,QAlFNlG,EAmFbmG,WAAA,QAAA,CAAA,GAIAH,EAAA,CADNC,EAAS,EAAE1F,MAAM8F,QAAAA,CAAAA,CAAAA,GAtFErG,EAuFbmG,WAAA,aAAA,CAAA,GAIAH,EAAA,CADNC,EAAS,EAAE1F,MAAM6F,QAAQF,SAAAA,GA1FNlG,CAAAA,CAAAA,GAAAA,EA2FbmG,WAAA,gBAAA,CAMAH,GAAAA,EAAA,CADNC,EAAS,EAAE1F,MAAM+F,QAAQJ,SAAAA,QAhGNlG,EAiGbmG,WAAA,YAAA,CAAA,GAMAH,EAAA,CADNC,EAtGmBjG,CAAAA,GAAAA,EAuGbmG,WAAA,QAAA,CAOAH,GAAAA,EAAA,CADNC,EAAS,EAAE1F,MAAM8F,SAASH,SAAS,GAAA,CAAA,CAAA,GA7GhBlG,EA8GbmG,WAAA,SAAA,CAAA,GAKiBH,EAAA,CAAvBO,EAAM,OAnHavG,CAAAA,GAAAA,EAmHImG,WAAA,gBAAA,CAnHJnG,GAAAA,IAArBgG,EAAA,CADCQ,EAAc,gBACMxG,CAAAA,GAAAA,CAAAA;"}
package/dist/input.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";require("./input-CszLZ81k.cjs");
1
+ "use strict";require("./input-CTC1BTOb.cjs");
2
2
  //# sourceMappingURL=input.cjs.map
package/dist/input.js CHANGED
@@ -1,2 +1,2 @@
1
- import "./input-CwWLOBMF.js";
1
+ import "./input-CZX1sxBe.js";
2
2
  //# sourceMappingURL=input.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-CF-USarR.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("./teleport.component-C9Q1WHQe.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, i as e, k as n, l as m, m as s, j as h, n as i, h as t } from "./teleport.component-D8DXijGl.js";
1
+ import { $ as c, i as e, k as n, l as m, m as s, j as h, n as i, h as t } from "./teleport.component-DY1Q8ilK.js";
2
2
  export {
3
3
  c as $drawer,
4
4
  e as SchmancyDrawerAppbar,
@@ -4,17 +4,27 @@ import "lit/directives/style-map.js";
4
4
  import { T as p } from "./tailwind.mixin-DklgfhB4.js";
5
5
  import { html as u } from "lit";
6
6
  import { property as c, customElement as d } from "lit/decorators.js";
7
- var f = Object.defineProperty, h = Object.getOwnPropertyDescriptor, l = (e, t, r, i) => {
8
- for (var n, o = i > 1 ? void 0 : i ? h(t, r) : t, a = e.length - 1; a >= 0; a--) (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
9
- return i && o && f(t, r, o), o;
7
+ var f = Object.defineProperty, h = Object.getOwnPropertyDescriptor, r = (e, t, s, n) => {
8
+ for (var i, o = n > 1 ? void 0 : n ? h(t, s) : t, a = e.length - 1; a >= 0; a--) (i = e[a]) && (o = (n ? i(t, s, o) : i(o)) || o);
9
+ return n && o && f(t, s, o), o;
10
10
  };
11
- let s = class extends p() {
11
+ let l = class extends p() {
12
12
  constructor() {
13
13
  super(...arguments), this.value = "", this.selected = !1;
14
14
  }
15
15
  handleOptionClick() {
16
- var e;
17
- this.dispatchEvent(new CustomEvent("click", { detail: { value: this.value, label: this.label ?? ((e = this.textContent) == null ? void 0 : e.trim()) ?? "" }, bubbles: !0, composed: !0 }));
16
+ const e = this.getSlotContent();
17
+ this.dispatchEvent(new CustomEvent("click", { detail: { value: this.value, label: this.label ?? e ?? "" }, bubbles: !0, composed: !0 }));
18
+ }
19
+ getSlotContent() {
20
+ var s;
21
+ const e = (s = this.shadowRoot) == null ? void 0 : s.querySelector("slot:not([name])");
22
+ if (!e) return "";
23
+ const t = e.assignedNodes();
24
+ return t.length === 0 ? "" : t.map((n) => {
25
+ var i;
26
+ return ((i = n.textContent) == null ? void 0 : i.trim()) || "";
27
+ }).join(" ").trim();
18
28
  }
19
29
  focus() {
20
30
  var e, t;
@@ -45,5 +55,5 @@ let s = class extends p() {
45
55
  `;
46
56
  }
47
57
  };
48
- l([c({ type: String, reflect: !0 })], s.prototype, "value", 2), l([c({ type: String, reflect: !0 })], s.prototype, "label", 2), l([c({ type: Boolean })], s.prototype, "selected", 2), s = l([d("schmancy-option")], s);
49
- //# sourceMappingURL=option-_1gW48HB.js.map
58
+ r([c({ type: String, reflect: !0 })], l.prototype, "value", 2), r([c({ type: String, reflect: !0 })], l.prototype, "label", 2), r([c({ type: Boolean })], l.prototype, "selected", 2), l = r([d("schmancy-option")], l);
59
+ //# sourceMappingURL=option-CxalubCR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"option-CxalubCR.js","sources":["../src/option/option.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nexport type SchmancyOptionChangeEvent = CustomEvent<{\n\tvalue: string\n\tlabel: string\n}>\n\n@customElement('schmancy-option')\nexport default class SchmancyOption extends TailwindElement() {\n\t@property({ type: String, reflect: true }) value: string = ''\n\t@property({ type: String, reflect: true }) label: string | undefined\n\t@property({ type: Boolean }) selected: boolean = false\n\n\tprivate handleOptionClick() {\n\t\t// Get the text content from the slot\n\t\tconst slotContent = this.getSlotContent()\n\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent<SchmancyOptionChangeEvent['detail']>('click', {\n\t\t\t\tdetail: {\n\t\t\t\t\tvalue: this.value,\n\t\t\t\t\tlabel: this.label ?? slotContent ?? '',\n\t\t\t\t},\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\t// Get content from the default slot\n\tprivate getSlotContent(): string {\n\t\tconst slot = this.shadowRoot?.querySelector('slot:not([name])') as HTMLSlotElement\n\t\tif (!slot) return ''\n\n\t\tconst assignedNodes = slot.assignedNodes()\n\t\tif (assignedNodes.length === 0) return ''\n\n\t\t// Combine the text content of all assigned nodes\n\t\treturn assignedNodes\n\t\t\t.map(node => node.textContent?.trim() || '')\n\t\t\t.join(' ')\n\t\t\t.trim()\n\t}\n\n\t// override focus method to focus the native element\n\tfocus() {\n\t\tthis.shadowRoot?.querySelector('li')?.focus()\n\t}\n\n\tprotected render() {\n\t\t// Apply highlight styles if `this.selected` is true\n\t\tconst classes = {\n\t\t\t'outline-secondary-default focus-visible:outline-solid focus-visible:outline-2 focus-visible:-outline-offset-2 rounded-md focus-visible:outline-secondary-default':\n\t\t\t\ttrue,\n\t\t\t'font-semibold relative cursor-pointer py-2 px-3': true,\n\t\t\t'bg-secondary-container text-secondery-onContainer': this.selected,\n\t\t}\n\t\tconst stateLayerClasses = {\n\t\t\t'duration-500 transition-opacity': true,\n\t\t\t'hover:bg-surface-on opacity-[0.08] cursor-pointer absolute inset-0': true,\n\t\t}\n\t\treturn html`\n\t\t\t<li\n\t\t\t\ttabindex=\"0\"\n\t\t\t\tclass=\"${this.classMap(classes)}\"\n\t\t\t\trole=\"option\"\n\t\t\t\t@click=${(e: MouseEvent) => {\n\t\t\t\t\te.stopPropagation()\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\tthis.handleOptionClick()\n\t\t\t\t}}\n\t\t\t\t@keydown=${(e: KeyboardEvent) => {\n\t\t\t\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\tthis.handleOptionClick()\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<div class=\"${this.classMap(stateLayerClasses)}\"></div>\n\t\t\t\t<sch-flex class=\"text-start\" align=\"center\" justify=\"between\" flow=\"row\">\n\t\t\t\t\t<slot class=\"self-start\"></slot>\n\t\t\t\t\t<slot name=\"support\">\n\t\t\t\t\t\t<span></span>\n\t\t\t\t\t</slot>\n\t\t\t\t</sch-flex>\n\t\t\t</li>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-option': SchmancyOption\n\t}\n}\n"],"names":["SchmancyOption","TailwindElement","constructor","super","arguments","this","value","selected","slotContent","getSlotContent","dispatchEvent","CustomEvent","detail","label","bubbles","composed","slot","shadowRoot","querySelector","assignedNodes","length","map","node","textContent","trim","join","focus","classes","html","classMap","e","stopPropagation","preventDefault","handleOptionClick","key","__decorateClass","property","type","String","reflect","prototype","Boolean","customElement"],"mappings":";;;;;;;;;;AAUA,IAAqBA,IAArB,cAA4CC;EAA5C,cAAAC;AAAAC,UAAAC,GAAAA,SAAAA,GAC4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