@mhmo91/schmancy 0.2.12 → 0.2.14

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 (37) hide show
  1. package/dist/card.cjs +1 -1
  2. package/dist/card.js +1 -1
  3. package/dist/content-drawer.cjs +1 -1
  4. package/dist/content-drawer.js +1 -1
  5. package/dist/date-range-Bf_u0TPH.js +130 -0
  6. package/dist/date-range-Bf_u0TPH.js.map +1 -0
  7. package/dist/date-range-C6ObEwpy.cjs +58 -0
  8. package/dist/date-range-C6ObEwpy.cjs.map +1 -0
  9. package/dist/date-range.cjs +1 -1
  10. package/dist/date-range.js +1 -1
  11. package/dist/index.cjs +1 -1
  12. package/dist/index.js +3 -3
  13. package/dist/{input-BNWPVs3H.js → input-CjHwAdCr.js} +2 -2
  14. package/dist/input-CjHwAdCr.js.map +1 -0
  15. package/dist/{input-shCt07iX.cjs → input-Dg9UEyST.cjs} +2 -2
  16. package/dist/input-Dg9UEyST.cjs.map +1 -0
  17. package/dist/input.cjs +1 -1
  18. package/dist/input.js +1 -1
  19. package/dist/list.cjs +1 -1
  20. package/dist/list.js +1 -1
  21. package/dist/nav-drawer.cjs +1 -1
  22. package/dist/nav-drawer.js +1 -1
  23. package/dist/teleport.cjs +1 -1
  24. package/dist/{teleport.component-DOO3qoVk.cjs → teleport.component-CBt5HLNC.cjs} +2 -2
  25. package/dist/{teleport.component-DOO3qoVk.cjs.map → teleport.component-CBt5HLNC.cjs.map} +1 -1
  26. package/dist/{teleport.component-DZlkBtyW.js → teleport.component-Dc1Ygxut.js} +3 -3
  27. package/dist/{teleport.component-DZlkBtyW.js.map → teleport.component-Dc1Ygxut.js.map} +1 -1
  28. package/dist/teleport.js +1 -1
  29. package/package.json +1 -1
  30. package/types/src/date-range/date-range.d.ts +49 -9
  31. package/types/src/input/input.d.ts +0 -4
  32. package/dist/date-range-AqKuO1c4.js +0 -112
  33. package/dist/date-range-AqKuO1c4.js.map +0 -1
  34. package/dist/date-range-wOUZirqC.cjs +0 -53
  35. package/dist/date-range-wOUZirqC.cjs.map +0 -1
  36. package/dist/input-BNWPVs3H.js.map +0 -1
  37. package/dist/input-shCt07iX.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"teleport.component-DZlkBtyW.js","sources":["../src/card/actions.ts","../src/card/card.ts","../src/card/content.ts","../src/card/media.ts","../src/content-drawer/$sheet.ts","../src/content-drawer/context.ts","../src/content-drawer/drawer.ts","../src/content-drawer/main.ts","../src/content-drawer/sheet.ts","../src/list/list-item.ts","../src/list/context.ts","../src/list/list.ts","../src/nav-drawer/$navbar.ts","../src/nav-drawer/context.ts","../src/nav-drawer/appbar.ts","../src/nav-drawer/content.ts","../src/nav-drawer/drawer.ts","../src/nav-drawer/navbar.ts","../src/teleport/teleport.service.ts","../src/teleport/watcher.ts","../src/teleport/teleport.component.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-action\n * @slot - The content of the action\n */\n@customElement('schmancy-card-action')\nexport default class SchmancyCardMedia extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\tprotected render(): unknown {\n\t\treturn html` <section class=\"pb-4 px-4\"><slot> </slot></section> `\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-action': SchmancyCardMedia\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('schmancy-card')\nexport default class SchmancyCard extends TailwindElement() {\n\t@property() type: 'elevated' | 'filled' | 'outlined' = 'elevated'\n\t@property({ type: Number }) elevation: 0 | 1 | 2 | 3 | 4 | 5 = 0\n\tprotected render(): unknown {\n\t\tconst classes = {\n\t\t\t'rounded-md': true,\n\t\t\t'shadow-xs': this.elevation === 1,\n\t\t\t'shadow-sm': this.elevation === 2,\n\t\t\t'shadow-md': this.elevation === 3,\n\t\t\t'shadow-lg': this.elevation === 4,\n\t\t\t'shadow-5': this.elevation === 5,\n\t\t\t'hover:shadow-xs': ['outlined', 'filled'].includes(this.type),\n\t\t\t'bg-surface-low shadow-xs hover:shadow-sm': this.type === 'elevated',\n\t\t\t'bg-surface-highest': this.type === 'filled',\n\t\t\t'bg-surface-default border border-solid border-1 border-outlineVariant': this.type === 'outlined',\n\t\t}\n\t\treturn html`<div class=\"${this.classMap(classes)}\">\n\t\t\t<slot> </slot>\n\t\t</div>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card': SchmancyCard\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { color } from '..'\n\n/**\n * @element schmancy-card-content\n * @slot headline\n * @slot subhead\n * @slot default - The content of the card\n */\n@customElement('schmancy-card-content')\nexport default class SchmancyCardContent extends TailwindElement() {\n\tprotected render(): unknown {\n\t\tconst classes = {\n\t\t\t'px-[16px] py-[24px]': true,\n\t\t}\n\t\tconst onSurface = SchmancyTheme.sys.color.surface.on\n\t\tconst onSurfaceVariant = SchmancyTheme.sys.color.surface.onVariant\n\t\treturn html`<schmancy-grid gap=\"md\" class=\"${this.classMap(classes)}\">\n\t\t\t<schmancy-grid gap=\"xs\">\n\t\t\t\t<schmancy-typography\n\t\t\t\t\t${color({\n\t\t\t\t\t\tcolor: onSurface,\n\t\t\t\t\t})}\n\t\t\t\t\ttype=\"body\"\n\t\t\t\t\ttoken=\"lg\"\n\t\t\t\t\t><slot name=\"headline\"> </slot\n\t\t\t\t></schmancy-typography>\n\t\t\t\t<schmancy-typography\n\t\t\t\t\t${color({\n\t\t\t\t\t\tcolor: onSurfaceVariant,\n\t\t\t\t\t})}\n\t\t\t\t\ttype=\"body\"\n\t\t\t\t\t><slot name=\"subhead\"></slot>\n\t\t\t\t</schmancy-typography>\n\t\t\t</schmancy-grid>\n\t\t\t<schmancy-typography\n\t\t\t\ttype=\"body\"\n\t\t\t\t${color({\n\t\t\t\t\tcolor: onSurfaceVariant,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t<slot></slot>\n\t\t\t</schmancy-typography>\n\t\t</schmancy-grid>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-content': SchmancyCardContent\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-media\n */\n@customElement('schmancy-card-media')\nexport default class SchmancyCardMedia extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\t@property({ type: String, reflect: true })\n\tsrc: string = ''\n\n\t@property({ type: String })\n\tfit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' = 'contain'\n\n\tprotected render(): unknown {\n\t\tconst styles = {\n\t\t\theight: '200px',\n\t\t}\n\t\tconst classes = {\n\t\t\t'object-center': true,\n\t\t\t'object-contain': this.fit === 'contain',\n\t\t\t'object-cover w-full': this.fit === 'cover',\n\t\t\t'object-fill': this.fit === 'fill',\n\t\t\t'object-none': this.fit === 'none',\n\t\t\t'object-scale-down': this.fit === 'scale-down',\n\t\t}\n\t\treturn html`<schmancy-grid align=\"stretch\" justify=\"stretch\" gap=\"md\">\n\t\t\t<img src=\"${this.src}\" style=${this.styleMap(styles)} class=\"${this.classMap(classes)}\" />\n\t\t</schmancy-grid>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-media': SchmancyCardMedia\n\t}\n}\n","import { SchmancyEvents } from '@schmancy/types/events'\nimport { Subject } from 'rxjs'\n\ntype DrawerAction = 'dismiss' | 'render'\ntype TRef = Element | Window\ntype TRenderRequest = HTMLElement\nexport type TRenderCustomEvent = CustomEvent<{\n\tcomponent: TRenderRequest\n\ttitle?: string\n}>\nclass Drawer {\n\tprivate $drawer = new Subject<{\n\t\tref: TRef\n\t\taction: DrawerAction\n\t\tcomponent?: TRenderRequest\n\t\ttitle?: string\n\t}>()\n\tconstructor() {\n\t\tthis.$drawer.pipe().subscribe(data => {\n\t\t\tif (data.action === 'dismiss') {\n\t\t\t\tdata.ref.dispatchEvent(\n\t\t\t\t\tnew CustomEvent(SchmancyEvents.ContentDrawerToggle, {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tstate: 'close',\n\t\t\t\t\t\t},\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} else if (data.action === 'render') {\n\t\t\t\tdata.ref.dispatchEvent(\n\t\t\t\t\tnew CustomEvent(SchmancyEvents.ContentDrawerToggle, {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tstate: 'open',\n\t\t\t\t\t\t},\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\tdata.ref.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('schmancy-content-drawer-render', {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tcomponent: data.component,\n\t\t\t\t\t\t\ttitle: data.title,\n\t\t\t\t\t\t},\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\t})\n\t}\n\n\tdimiss(ref: TRef) {\n\t\tthis.$drawer.next({\n\t\t\taction: 'dismiss',\n\t\t\tref: ref,\n\t\t})\n\t}\n\n\trender(ref: TRef, component: TRenderRequest, title?: string) {\n\t\tref.dispatchEvent(new CustomEvent('custom-event'))\n\t\tthis.$drawer.next({\n\t\t\taction: 'render',\n\t\t\tref: ref,\n\t\t\tcomponent: component,\n\t\t\ttitle,\n\t\t})\n\t}\n}\n\nexport const schmancyContentDrawer = new Drawer()\n","import { createContext } from '@lit/context'\nexport type TSchmancyContentDrawerSheetMode = 'push' | 'overlay'\nexport const SchmancyContentDrawerSheetMode = createContext<TSchmancyContentDrawerSheetMode>('push')\n\nexport type TSchmancyContentDrawerSheetState = 'open' | 'close'\nexport const SchmancyContentDrawerSheetState = createContext<TSchmancyContentDrawerSheetState>('close')\n\nexport const SchmancyContentDrawerID = createContext<string>(Math.floor(Math.random() * Date.now()).toString())\nexport const SchmancyContentDrawerMaxHeight = createContext<string>('100%')\nexport const SchmancyContentDrawerMinWidth = createContext<{\n\tmain: number\n\tsheet: number\n}>({})\n","import { provide } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { css, html, nothing } from 'lit'\nimport { customElement, property, queryAssignedElements, state } from 'lit/decorators.js'\nimport { debounceTime, distinctUntilChanged, fromEvent, map, merge, startWith, takeUntil, tap } from 'rxjs'\nimport { SchmancyEvents, TRenderCustomEvent, area, sheet } from '..'\nimport {\n\tSchmancyContentDrawerID,\n\tSchmancyContentDrawerMaxHeight,\n\tSchmancyContentDrawerMinWidth,\n\tSchmancyContentDrawerSheetMode,\n\tSchmancyContentDrawerSheetState,\n\tTSchmancyContentDrawerSheetMode,\n\tTSchmancyContentDrawerSheetState,\n} from './context'\n\n/**\n * @element schmancy-content-drawer\n * @slot appbar - The appbar slot\n * @slot - The content slot\n */\n@customElement('schmancy-content-drawer')\nexport class SchmancyContentDrawer extends $LitElement(css`\n\t:host {\n\t\tposition: relative;\n\t\tinset: 0;\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t}\n`) {\n\t/**\n\t * The minimum width of the sheet\n\t * @attr\tminWidth\n\t * @type {number}\n\t * @memberof SchmancyContentDrawer\n\t */\n\n\t@provide({ context: SchmancyContentDrawerMinWidth })\n\tminWidth: typeof SchmancyContentDrawerMinWidth.__context__ = {\n\t\tmain: 360,\n\t\tsheet: 576,\n\t}\n\n\t/**\n\t * The state of the sheet\n\t * @attr open\n\t * @type {TSchmancyContentDrawerSheetState}\n\t */\n\t@provide({ context: SchmancyContentDrawerSheetState })\n\t@property()\n\topen: TSchmancyContentDrawerSheetState\n\n\t/**\n\t * The mode of the sheet\n\t * @type {TSchmancyContentDrawerSheetMode}\n\t * @memberof SchmancyContentDrawer\n\t * @protected\n\t */\n\t@provide({ context: SchmancyContentDrawerSheetMode })\n\t@state()\n\tmode: TSchmancyContentDrawerSheetMode\n\n\t@provide({ context: SchmancyContentDrawerID })\n\tschmancyContentDrawerID = Math.floor(Math.random() * Date.now()).toString()\n\n\t@provide({ context: SchmancyContentDrawerMaxHeight })\n\tmaxHeight = '100%'\n\n\t@queryAssignedElements({ flatten: true })\n\tassignedElements!: HTMLElement[]\n\tfirstUpdated(): void {\n\t\tmerge(fromEvent<CustomEvent>(window, 'resize'), fromEvent<CustomEvent>(window, SchmancyEvents.ContentDrawerResize))\n\t\t\t.pipe(\n\t\t\t\tstartWith(true),\n\t\t\t\ttap(() => console.log(this.minWidth)),\n\t\t\t\tmap(() => (this.clientWidth ? this.clientWidth : window.innerWidth)),\n\t\t\t\tmap(width => width >= this.minWidth.main + this.minWidth.sheet),\n\t\t\t\tdebounceTime(100),\n\t\t\t\ttap(() => {\n\t\t\t\t\tthis.maxHeight = `${window.innerHeight - this.getOffsetTop(this) - 32}px`\n\t\t\t\t\tthis.style.setProperty('max-height', this.maxHeight)\n\t\t\t\t}),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(lgScreen => {\n\t\t\t\tif (lgScreen) {\n\t\t\t\t\tthis.mode = 'push'\n\t\t\t\t\tthis.open = 'open'\n\t\t\t\t} else {\n\t\t\t\t\tthis.mode = 'overlay'\n\t\t\t\t\tthis.open = 'close'\n\t\t\t\t}\n\t\t\t})\n\n\t\t/*\n\t\t * Listen to the toggle event\n\t\t */\n\t\tfromEvent<CustomEvent>(window, SchmancyEvents.ContentDrawerToggle)\n\t\t\t.pipe(\n\t\t\t\ttap(event => {\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t}),\n\t\t\t\tmap(event => event.detail.state),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(state => {\n\t\t\t\tthis.open = state\n\t\t\t})\n\n\t\tfromEvent<TRenderCustomEvent>(window, 'schmancy-content-drawer-render')\n\t\t\t.pipe(\n\t\t\t\ttap(event => {\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t}),\n\t\t\t\tmap(event => event.detail),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(({ component, title }) => {\n\t\t\t\tif (this.mode === 'push') {\n\t\t\t\t\t// TODO: Fix the router to render if constructor has different arguments\n\t\t\t\t\tarea.push({\n\t\t\t\t\t\tarea: this.schmancyContentDrawerID,\n\t\t\t\t\t\tcomponent: 'empty',\n\t\t\t\t\t\thistoryStrategy: 'silent',\n\t\t\t\t\t})\n\t\t\t\t\tarea.push({\n\t\t\t\t\t\tarea: this.schmancyContentDrawerID,\n\t\t\t\t\t\tcomponent: component,\n\t\t\t\t\t\thistoryStrategy: 'silent',\n\t\t\t\t\t})\n\t\t\t\t} else if ((this.mode = 'overlay')) {\n\t\t\t\t\tsheet.open({ component: component, uid: this.schmancyContentDrawerID, title })\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\tgetOffsetTop(element) {\n\t\tlet offsetTop = 0\n\t\twhile (element) {\n\t\t\toffsetTop += element.offsetTop\n\t\t\telement = element.offsetParent\n\t\t}\n\t\treturn offsetTop\n\t}\n\n\tprotected render() {\n\t\tif (!this.mode || !this.open) return nothing\n\t\treturn html`\n\t\t\t<schmancy-grid\n\t\t\t\tcols=${this.mode === 'overlay' ? '1fr' : 'auto 1fr'}\n\t\t\t\trows=\"1fr\"\n\t\t\t\tflow=\"col\"\n\t\t\t\tjustify=\"stretch\"\n\t\t\t\talign=\"stretch\"\n\t\t\t>\n\t\t\t\t<slot></slot>\n\t\t\t</schmancy-grid>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-content-drawer': SchmancyContentDrawer\n\t}\n}\n","import { consume } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { PropertyValueMap, css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { SchmancyEvents } from '..'\nimport {\n\tSchmancyContentDrawerMaxHeight,\n\tSchmancyContentDrawerMinWidth,\n\tSchmancyContentDrawerSheetMode,\n\tTSchmancyContentDrawerSheetMode,\n} from './context'\nimport { when } from 'lit/directives/when.js'\n\n@customElement('schmancy-content-drawer-main')\nexport class SchmancyContentDrawerMain extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t}\n`) {\n\t@property({ type: Number })\n\tminWidth\n\n\t@consume({ context: SchmancyContentDrawerMinWidth, subscribe: true })\n\tdrawerMinWidth: typeof SchmancyContentDrawerMinWidth.__context__\n\n\t@consume({ context: SchmancyContentDrawerSheetMode, subscribe: true })\n\t@state()\n\tmode: TSchmancyContentDrawerSheetMode\n\n\t@consume({ context: SchmancyContentDrawerMaxHeight, subscribe: true })\n\t@state()\n\tmaxHeight\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tif (this.minWidth) this.drawerMinWidth.main = this.minWidth\n\t\telse this.minWidth = this.drawerMinWidth.main\n\t}\n\n\tprotected update(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n\t\tsuper.update(changedProperties)\n\t\tif (changedProperties.has('minWidth') && this.minWidth) {\n\t\t\tthis.drawerMinWidth.main = this.minWidth\n\t\t\tthis.dispatchEvent(new CustomEvent(SchmancyEvents.ContentDrawerResize, { bubbles: true, composed: true }))\n\t\t}\n\t}\n\n\trender() {\n\t\tconst styles = {\n\t\t\tminWidth: `${this.minWidth}px`,\n\t\t\tmaxHeight: this.maxHeight,\n\t\t}\n\t\treturn html`\n\t\t\t<section class=\"relative inset-0 h-full\">\n\t\t\t\t<schmancy-grid\n\t\t\t\t\tclass=\"h-full relative overflow-scroll\"\n\t\t\t\t\tcols=\"${this.mode === 'push' ? 'auto 1fr' : '1fr'}\"\n\t\t\t\t\trows=\"1fr\"\n\t\t\t\t\tflow=\"col\"\n\t\t\t\t\talign=\"stretch\"\n\t\t\t\t\tjustify=\"stretch\"\n\t\t\t\t>\n\t\t\t\t\t<section style=${this.styleMap(styles)}>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</section>\n\t\t\t\t</schmancy-grid>\n\t\t\t\t${when(\n\t\t\t\t\tthis.mode === 'push',\n\t\t\t\t\t() => html` <schmancy-divider class=\"absolute right-0 top-0\" orientation=\"vertical\"></schmancy-divider>`,\n\t\t\t\t)}\n\t\t\t</section>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-content-drawer-main': SchmancyContentDrawerMain\n\t}\n}\n","import { consume } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { from, merge, Observable, of, takeUntil, tap } from 'rxjs'\nimport { SchmancyEvents, sheet } from '..'\nimport {\n\tSchmancyContentDrawerID,\n\tSchmancyContentDrawerMaxHeight,\n\tSchmancyContentDrawerMinWidth,\n\tSchmancyContentDrawerSheetMode,\n\tSchmancyContentDrawerSheetState,\n\tTSchmancyContentDrawerSheetMode,\n\tTSchmancyContentDrawerSheetState,\n} from './context'\n\n// --- 1) Removed the custom animate import\n// import { animate } from '@packages/anime-beta-master'\n\n@customElement('schmancy-content-drawer-sheet')\nexport class SchmancyContentDrawerSheet extends $LitElement(css`\n\t:host {\n\t\toverflow: scroll;\n\t}\n`) {\n\t@property({ type: Number })\n\tminWidth\n\n\t@consume({ context: SchmancyContentDrawerSheetMode, subscribe: true })\n\t@state()\n\tmode: TSchmancyContentDrawerSheetMode\n\n\t@consume({ context: SchmancyContentDrawerSheetState, subscribe: true })\n\t@state()\n\tstate: TSchmancyContentDrawerSheetState\n\n\t@consume({ context: SchmancyContentDrawerID })\n\tschmancyContentDrawerID\n\n\t@query('#sheet') sheet!: HTMLElement\n\t@queryAssignedElements({ flatten: true, slot: undefined }) defaultSlot!: HTMLElement[]\n\n\t@consume({ context: SchmancyContentDrawerMinWidth, subscribe: true })\n\tdrawerMinWidth: typeof SchmancyContentDrawerMinWidth.__context__\n\n\t@consume({ context: SchmancyContentDrawerMaxHeight, subscribe: true })\n\t@state()\n\tmaxHeight\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tif (this.minWidth) {\n\t\t\tthis.drawerMinWidth.sheet = this.minWidth\n\t\t} else {\n\t\t\tthis.minWidth = this.drawerMinWidth.sheet\n\t\t}\n\t}\n\n\tupdated(changedProperties: Map<string, any>) {\n\t\tsuper.updated(changedProperties)\n\t\tif (changedProperties.has('minWidth') && this.minWidth) {\n\t\t\t// If the 'minWidth' property changed\n\t\t\tthis.drawerMinWidth.sheet = this.minWidth\n\t\t\tthis.dispatchEvent(new CustomEvent(SchmancyEvents.ContentDrawerResize, { bubbles: true, composed: true }))\n\t\t} else if (changedProperties.has('state') || changedProperties.has('mode')) {\n\t\t\tif (this.mode === 'overlay') {\n\t\t\t\tif (this.state === 'close') {\n\t\t\t\t\tthis.closeAll()\n\t\t\t\t} else if (this.state === 'open') {\n\t\t\t\t\t// Overlay open logic if needed\n\t\t\t\t\t// this.open()\n\t\t\t\t}\n\t\t\t} else if (this.mode === 'push') {\n\t\t\t\tsheet.dismiss(this.schmancyContentDrawerID)\n\t\t\t\tif (this.state === 'close') {\n\t\t\t\t\tthis.closeAll()\n\t\t\t\t} else if (this.state === 'open') {\n\t\t\t\t\tthis.open()\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Open the sheet by sliding it into view.\n\t */\n\topen() {\n\t\t// \"onBegin\" logic from the old `animate(...)`\n\t\tif (this.mode === 'overlay') {\n\t\t\tthis.sheet.style.position = 'fixed'\n\t\t} else {\n\t\t\tthis.sheet.style.position = 'relative'\n\t\t}\n\t\tthis.sheet.style.display = 'block'\n\n\t\t// --- 2) Use native Web Animations API ---\n\t\tthis.sheet.animate(\n\t\t\t[\n\t\t\t\t{ opacity: 0, transform: 'translateX(100%)' },\n\t\t\t\t{ opacity: 1, transform: 'translateX(0%)' },\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: 500,\n\t\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\t},\n\t\t)\n\t\t// No return is needed if you don't rely on the result\n\t}\n\n\t/**\n\t * Close everything (modal sheet + the sheet itself).\n\t */\n\tcloseAll() {\n\t\t// Merge them into a single subscription,\n\t\t// so that everything closes in parallel.\n\t\tmerge(from(this.closeModalSheet()), from(this.closeSheet())).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\t/**\n\t * Dismiss the \"modal sheet.\"\n\t * This just returns an Observable that completes immediately.\n\t */\n\tcloseModalSheet() {\n\t\treturn of(true).pipe(tap(() => sheet.dismiss(this.schmancyContentDrawerID)))\n\t}\n\n\t/**\n\t * Slide the sheet out of view + hide it.\n\t * Return an Observable so we can merge it with other close operations.\n\t */\n\tcloseSheet() {\n\t\t// --- 2) Use native Web Animations API and wrap in an Observable ---\n\t\treturn new Observable<void>(observer => {\n\t\t\tconst animation = this.sheet.animate(\n\t\t\t\t[\n\t\t\t\t\t{ opacity: 1, transform: 'translateX(0%)' },\n\t\t\t\t\t{ opacity: 1, transform: 'translateX(100%)' },\n\t\t\t\t],\n\t\t\t\t{\n\t\t\t\t\tduration: 500,\n\t\t\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\t\t},\n\t\t\t)\n\n\t\t\tanimation.onfinish = () => {\n\t\t\t\t// \"onComplete\" logic\n\t\t\t\tthis.sheet.style.display = 'none'\n\t\t\t\tobserver.next()\n\t\t\t\tobserver.complete()\n\t\t\t}\n\t\t})\n\t}\n\n\tprotected render() {\n\t\tconst sheetClasses = {\n\t\t\tblock: this.mode === 'push',\n\t\t\t'absolute z-50': this.mode === 'overlay',\n\t\t\t'opacity-1': this.mode === 'overlay' && this.state === 'open',\n\t\t}\n\n\t\tconst styles = {\n\t\t\tminWidth: `${this.minWidth}px`,\n\t\t\tmaxHeight: this.maxHeight,\n\t\t}\n\n\t\treturn html`\n\t\t\t<section id=\"sheet\" class=\"${this.classMap(sheetClasses)}\" style=${this.styleMap(styles)}>\n\t\t\t\t<schmancy-area name=\"${this.schmancyContentDrawerID}\">\n\t\t\t\t\t<slot name=\"placeholder\"></slot>\n\t\t\t\t</schmancy-area>\n\t\t\t</section>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-content-drawer-sheet': SchmancyContentDrawerSheet\n\t}\n}\n","import { consume } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport { SchmancySurfaceTypeContext } from '@schmancy/surface/context'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nimport { html } from 'lit'\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js'\nimport { when } from 'lit/directives/when.js'\nimport { color } from '..'\n\n/**\n * @element schmancy-list-item\n * @slot leading - leading content\n * @slot trailing - trailing content\n * @slot - default content\n */\n@customElement('schmancy-list-item')\nexport class SchmancyListItem extends TailwindElement() {\n\t@consume({ context: SchmancySurfaceTypeContext, subscribe: true })\n\t@property()\n\tvariant: TSurfaceColor\n\n\t@property({ type: Boolean })\n\trounded: boolean\n\n\t@property({ type: Boolean }) readonly: boolean\n\n\t@property({ type: Boolean }) selected: boolean = false\n\n\t@queryAssignedElements({\n\t\tslot: 'leading',\n\t\tflatten: true,\n\t})\n\tprivate leading!: HTMLElement[]\n\n\t@queryAssignedElements({\n\t\tslot: 'trailing',\n\t\tflatten: true,\n\t})\n\tprivate trailing!: HTMLElement[]\n\n\tprotected get imgClasses(): string[] {\n\t\treturn ['h-[24px]', 'w-[24px]', 'object-contain']\n\t}\n\n\tfirstUpdated() {\n\t\tthis.leading?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t})\n\t\tthis.trailing?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t})\n\t}\n\n\trender() {\n\t\tconst classes = {\n\t\t\t'rounded-none': this.rounded === false,\n\t\t\t'rounded-full': this.rounded,\n\t\t\t'w-full min-h-[56px] relative flex items-center gap-[16px] py-[8px] px-[16px] duration-500 transition-colors focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:z-1 outline-secondary-default outline-hidden':\n\t\t\t\ttrue,\n\t\t\t'bg-secondary-container text-secondery-onContainer': this.selected,\n\t\t}\n\n\t\tconst stateLayerClasses = {\n\t\t\t'z-0 duration-500 transition-opacity': true,\n\t\t\t'rounded-none': this.rounded === false,\n\t\t\t'rounded-full': this.rounded,\n\t\t\t'hover:bg-surface-on opacity-[0.08] cursor-pointer absolute inset-0 ': !this.readonly,\n\t\t}\n\t\treturn html`<li .tabIndex=${this.readonly ? -1 : 0} class=${this.classMap(classes)}>\n\t\t\t${when(!this.readonly, () => html` <div class=\"${this.classMap(stateLayerClasses)}\"></div> `)}\n\t\t\t<slot name=\"leading\"> </slot>\n\t\t\t<schmancy-flex flow=\"row\">\n\t\t\t\t<schmancy-typography type=\"body\" token=\"lg\">\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</schmancy-typography>\n\t\t\t\t<schmancy-typography\n\t\t\t\t\t${color({\n\t\t\t\t\t\tcolor: SchmancyTheme.sys.color.surface.onVariant,\n\t\t\t\t\t})}\n\t\t\t\t\ttype=\"body\"\n\t\t\t\t\ttoken=\"md\"\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"support\"></slot>\n\t\t\t\t</schmancy-typography>\n\t\t\t</schmancy-flex>\n\t\t\t${when(!this.readonly, () => html` <div class=\"${this.classMap(stateLayerClasses)}\"></div> `)}\n\t\t\t<slot name=\"trailing\"></slot>\n\t\t</li>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-list-item': SchmancyListItem\n\t}\n}\n","import { createContext } from '@lit/context'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nexport const SchmancyListTypeContext = createContext<TSurfaceColor>(undefined)\n","import { provide } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { SchmancyListTypeContext } from './context'\n\n/**\n * @slot - The default slot.\n */\n@customElement('schmancy-list')\nexport class List extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tpadding-top: 8px;\n\t\tpadding-bottom: 8px;\n\t}\n`) {\n\t/**\n\t * The type of list.\n\t * @attr type\n\t * @type {SchmancyListType}\n\t * @default 'surface'\n\t */\n\t@provide({ context: SchmancyListTypeContext })\n\t@property()\n\tsurface: TSurfaceColor\n\n\trender() {\n\t\treturn html`\n\t\t\t<schmancy-surface type=${this.surface}>\n\t\t\t\t<ul>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</ul>\n\t\t\t</schmancy-surface>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-list': List\n\t}\n}\n","import { SchmancyEvents } from '@schmancy/types/events'\nimport { debounceTime, distinctUntilKeyChanged, Subject } from 'rxjs'\n\nclass Drawer {\n\tprivate $drawer = new Subject<{\n\t\tself: HTMLElement\n\t\tstate: boolean\n\t}>()\n\tconstructor() {\n\t\tthis.$drawer.pipe(distinctUntilKeyChanged('state'), debounceTime(100)).subscribe(data => {\n\t\t\tconsole.log('drawer', data)\n\t\t\tif (data.state) {\n\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\tnew CustomEvent(SchmancyEvents.NavDrawer_toggle, {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tstate: 'open',\n\t\t\t\t\t\t},\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} else {\n\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\tnew CustomEvent(SchmancyEvents.NavDrawer_toggle, {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tstate: 'close',\n\t\t\t\t\t\t},\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\t})\n\t}\n\topen(self?: HTMLElement) {\n\t\tthis.$drawer.next({\n\t\t\tself,\n\t\t\tstate: true,\n\t\t})\n\t}\n\tclose(self?: HTMLElement) {\n\t\tthis.$drawer.next({\n\t\t\tself,\n\t\t\tstate: false,\n\t\t})\n\t}\n}\n\nexport const schmancyNavDrawer = new Drawer()\n","import { createContext } from '@lit/context'\nexport type TSchmancyDrawerNavbarMode = 'push' | 'overlay' | undefined\nexport const SchmancyDrawerNavbarMode = createContext<TSchmancyDrawerNavbarMode>('push')\n\nexport type TSchmancyDrawerNavbarState = 'open' | 'close' | undefined\nexport const SchmancyDrawerNavbarState = createContext<TSchmancyDrawerNavbarState>('close')\n","import { consume } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport {\n\tSchmancyDrawerNavbarMode,\n\tSchmancyDrawerNavbarState,\n\tTSchmancyDrawerNavbarMode,\n} from '@schmancy/nav-drawer/context'\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { when } from 'lit/directives/when.js'\nimport { SchmancyEvents } from '..'\n\n/**\n * @element schmancy-nav-drawer-appbar\n * @slot toggler - The toggler slot\n * @slot - The default slot\n */\n@customElement('schmancy-nav-drawer-appbar')\nexport class SchmancyDrawerAppbar extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\t@consume({ context: SchmancyDrawerNavbarMode, subscribe: true })\n\t@state()\n\tsidebarMode: TSchmancyDrawerNavbarMode\n\n\t@consume({ context: SchmancyDrawerNavbarState, subscribe: true })\n\t@state()\n\tsidebarOpen\n\n\t@property({ type: Boolean }) toggler = true\n\n\trender() {\n\t\tconst appbarClasses = {\n\t\t\t'block z-50': true,\n\t\t}\n\t\tconst sidebarToggler = {\n\t\t\t'block left-3 z-50': this.sidebarMode === 'overlay',\n\t\t\thidden: this.sidebarMode === 'push',\n\t\t}\n\t\treturn html`\n\t\t\t<schmancy-grid\n\t\t\t\tcols=${this.sidebarMode === 'overlay' && this.toggler ? 'auto 1fr' : '1fr'}\n\t\t\t\tflow=\"col\"\n\t\t\t\tclass=${this.classMap(appbarClasses)}\n\t\t\t\tgap=\"sm\"\n\t\t\t\talign=\"center\"\n\t\t\t>\n\t\t\t\t${when(\n\t\t\t\t\tthis.sidebarMode === 'overlay' && this.toggler,\n\t\t\t\t\t() =>\n\t\t\t\t\t\thtml`<slot name=\"toggler\">\n\t\t\t\t\t\t\t<div class=\"${this.classMap(sidebarToggler)}\">\n\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\t\t\tnew CustomEvent(SchmancyEvents.NavDrawer_toggle, {\n\t\t\t\t\t\t\t\t\t\t\t\tdetail: { state: this.sidebarOpen === 'open' ? 'close' : 'open' },\n\t\t\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t${when(\n\t\t\t\t\t\t\t\t\t\tthis.sidebarOpen === 'close',\n\t\t\t\t\t\t\t\t\t\t() => html`menu`,\n\t\t\t\t\t\t\t\t\t\t() => html`menu_open`,\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</slot>`,\n\t\t\t\t)}\n\n\t\t\t\t<slot> </slot>\n\t\t\t</schmancy-grid>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-nav-drawer-appbar': SchmancyDrawerAppbar\n\t}\n}\n","import { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { fromEvent, takeUntil } from 'rxjs'\n\n@customElement('schmancy-nav-drawer-content')\nexport class SchmancyNavigationDrawerContent extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\tinset: 0;\n\t\toverflow-y: auto;\n\t}\n`) {\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tfromEvent(this, 'scroll')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(e => {\n\t\t\t\tthis.parentElement.dispatchEvent(new CustomEvent('scroll', { detail: e, bubbles: true, composed: true }))\n\t\t\t})\n\t}\n\trender() {\n\t\treturn html` <slot></slot> `\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-nav-drawer-content': SchmancyNavigationDrawerContent\n\t}\n}\n","import { provide } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { css, html, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { debounceTime, distinctUntilChanged, fromEvent, map, startWith, takeUntil, tap } from 'rxjs'\nimport { SchmancyEvents } from '..'\nimport { fullHeight } from './../directives/height'\nimport {\n\tSchmancyDrawerNavbarMode,\n\tSchmancyDrawerNavbarState,\n\tTSchmancyDrawerNavbarMode,\n\tTSchmancyDrawerNavbarState,\n} from './context'\n\n/**\n * @element schmancy-nav-drawer\n * @slot appbar - The appbar slot\n * @slot - The content slot\n */\n@customElement('schmancy-nav-drawer')\nexport class SchmancyNavigationDrawer extends $LitElement(css`\n\t:host {\n\t\tdisplay: flex;\n\t\tflex-grow: 1;\n\t\toverflow: hidden;\n\t}\n`) {\n\t// fullscreen property\n\t@property({ type: Boolean })\n\tfullscreen: boolean = false\n\n\t/**\n\t * The minimum width of the sidebar\n\t * @attr\tbreakpoint\n\t * @type {number}\n\t * @memberof SchmancyNavigationDrawer\n\t */\n\t@property({ type: Number, attribute: 'breakpoint' })\n\tbreakpoint: number = 768\n\n\t/**\n\t * The mode of the sidebar\n\t * @type {TSchmancyDrawerNavbarMode}\n\t * @memberof SchmancyNavigationDrawer\n\t * @protected\n\t */\n\t@provide({ context: SchmancyDrawerNavbarMode })\n\t@state()\n\tmode: TSchmancyDrawerNavbarMode\n\n\t@provide({ context: SchmancyDrawerNavbarState })\n\t@property()\n\topen: TSchmancyDrawerNavbarState\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tfromEvent<CustomEvent>(window, 'resize')\n\t\t\t.pipe(\n\t\t\t\tmap(event => event.target as Window),\n\t\t\t\tstartWith(window),\n\t\t\t\tmap(window => window.innerWidth),\n\t\t\t\tmap(width => width >= this.breakpoint),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\tdebounceTime(100),\n\t\t\t)\n\t\t\t.subscribe(lgScreen => {\n\t\t\t\tif (lgScreen) {\n\t\t\t\t\tthis.mode = 'push'\n\t\t\t\t\tthis.open = 'open'\n\t\t\t\t} else {\n\t\t\t\t\tthis.mode = 'overlay'\n\t\t\t\t\tthis.open = 'close'\n\t\t\t\t}\n\t\t\t})\n\n\t\t/*\n\t\t * Listen to the toggle event\n\t\t */\n\t\tfromEvent<CustomEvent>(window, SchmancyEvents.NavDrawer_toggle)\n\t\t\t.pipe(\n\t\t\t\ttap(event => {\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t}),\n\t\t\t\tmap(event => event.detail.state),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\tdebounceTime(100),\n\t\t\t)\n\t\t\t.subscribe(state => {\n\t\t\t\t// if the mode is push, we don't need to close the overlay when the state is close\n\t\t\t\tif (this.mode === 'push' && state === 'close') return\n\t\t\t\tthis.open = state\n\t\t\t})\n\t}\n\n\tprotected render() {\n\t\tif (!this.mode || !this.open) return nothing\n\t\treturn html`\n\t\t\t<schmancy-grid\n\t\t\t\tcols=${this.fullscreen ? '1fr' : 'auto 1fr'}\n\t\t\t\trows=\"1fr\"\n\t\t\t\tflow=\"col\"\n\t\t\t\tjustify=\"stretch\"\n\t\t\t\talign=\"stretch\"\n\t\t\t\t${fullHeight()}\n\t\t\t>\n\t\t\t\t<slot></slot>\n\t\t\t</schmancy-grid>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-nav-drawer': SchmancyNavigationDrawer\n\t}\n}\n","import { consume } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { SchmancyEvents, SchmancyTheme, color } from '..'\nimport {\n\tSchmancyDrawerNavbarMode,\n\tSchmancyDrawerNavbarState,\n\tTSchmancyDrawerNavbarMode,\n\tTSchmancyDrawerNavbarState,\n} from './context'\n\n@customElement('schmancy-nav-drawer-navbar')\nexport class SchmancyNavigationDrawerSidebar extends $LitElement() {\n\t@consume({ context: SchmancyDrawerNavbarMode, subscribe: true })\n\t@state()\n\tmode: TSchmancyDrawerNavbarMode\n\n\t@consume({ context: SchmancyDrawerNavbarState, subscribe: true })\n\t@state()\n\tprivate state: TSchmancyDrawerNavbarState\n\n\t@query('#overlay') overlay!: HTMLElement\n\t@query('nav') nav!: HTMLElement\n\n\t@property({ type: String }) width = '320px'\n\n\tupdated(changedProperties: Map<string, any>) {\n\t\tif (changedProperties.has('state')) {\n\t\t\tconsole.log('state changed', this.state, this.mode)\n\t\t\tif (this.mode === 'overlay') {\n\t\t\t\tif (this.state === 'close') {\n\t\t\t\t\tthis.hideNavDrawer()\n\t\t\t\t\tthis.closeOverlay()\n\t\t\t\t} else if (this.state === 'open') {\n\t\t\t\t\tthis.openOverlay()\n\t\t\t\t\tthis.showNavDrawer()\n\t\t\t\t}\n\t\t\t} else if (this.mode === 'push') {\n\t\t\t\tthis.showNavDrawer()\n\t\t\t\tthis.closeOverlay()\n\t\t\t}\n\t\t}\n\t}\n\n\topenOverlay() {\n\t\t// Equivalent to onBegin\n\t\tthis.overlay.style.display = 'block'\n\n\t\t// Animate opacity from 0 to 0.4\n\t\tthis.overlay.animate([{ opacity: 0 }, { opacity: 0.4 }], {\n\t\t\tduration: 200,\n\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\tfill: 'forwards', // <-- This keeps the final keyframe (0.4) after finishing\n\t\t})\n\t\t// If you want an onfinish here, you can add it:\n\t\t// .onfinish = () => console.log('overlay opened!')\n\t}\n\n\tcloseOverlay() {\n\t\t// Animate opacity from 0.4 to 0\n\t\tconst animation = this.overlay.animate([{ opacity: 0.4 }, { opacity: 0 }], {\n\t\t\tduration: 150,\n\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\tfill: 'forwards',\n\t\t})\n\t\t// translateX(-100%) when the animation is finished\n\t\t// Equivalent to onComplete\n\t\tanimation.onfinish = () => {\n\t\t\tthis.overlay.style.display = 'none'\n\t\t}\n\t}\n\n\t// show nav drawer\n\tshowNavDrawer() {\n\t\t// check the transform, skip if already open\n\t\tif (this.nav.style.transform === 'translateX(0)') return\n\t\tconst animation = this.nav.animate([{ transform: 'translateX(-100%)' }, { transform: 'translateX(0)' }], {\n\t\t\tduration: 200,\n\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tanimation.onfinish = () => {\n\t\t\tthis.state = 'open'\n\t\t}\n\t}\n\n\t// hide nav drawer\n\thideNavDrawer() {\n\t\t// skip if already closed\n\t\tif (this.nav.style.transform === 'translateX(-100%)') return\n\t\tconst animation = this.nav.animate([{ transform: 'translateX(0)' }, { transform: 'translateX(-100%)' }], {\n\t\t\tduration: 200,\n\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tanimation.onfinish = () => {\n\t\t\tthis.state = 'close'\n\t\t}\n\t}\n\n\tprotected render() {\n\t\tconst sidebarClasses = {\n\t\t\t'p-[16px] max-w-[360px] w-fit h-full overflow-auto': true,\n\t\t\tblock: this.mode === 'push',\n\t\t\t'fixed inset-0 z-50': this.mode === 'overlay',\n\t\t}\n\t\tconst overlayClass = {\n\t\t\t'fixed inset-0 z-49 hidden': true,\n\t\t}\n\n\t\tconst styleMap = {\n\t\t\twidth: this.width,\n\t\t}\n\n\t\treturn html`\n\t\t\t<nav\n\t\t\t\tstyle=${this.styleMap(styleMap)}\n\t\t\t\tclass=\"${this.classMap({ ...sidebarClasses })}\"\n\t\t\t\t${color({\n\t\t\t\t\tbgColor: SchmancyTheme.sys.color.surface.container,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t<slot></slot>\n\t\t\t</nav>\n\t\t\t<div\n\t\t\t\tid=\"overlay\"\n\t\t\t\t${color({\n\t\t\t\t\tbgColor: SchmancyTheme.sys.color.scrim,\n\t\t\t\t})}\n\t\t\t\t@click=${() => {\n\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent(SchmancyEvents.NavDrawer_toggle, {\n\t\t\t\t\t\t\tdetail: { state: 'close' },\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t}}\n\t\t\t\tclass=\"${this.classMap({ ...overlayClass })}\"\n\t\t\t></div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-nav-drawer-navbar': SchmancyNavigationDrawerSidebar\n\t}\n}\n","import { bufferTime, concatMap, filter, fromEvent, map, of, Subject, take, tap, timeout, zip } from 'rxjs'\nimport { SchmancyTeleportation } from './teleport.component'\n\nexport type WhereAreYouRickyEvent = CustomEvent<{\n\tid: string\n\tcallerID: number\n}>\n\nexport const WhereAreYouRicky = 'whereAreYouRicky'\n\nexport type HereMortyEvent = CustomEvent<{\n\tcomponent: SchmancyTeleportation\n}>\n\nexport type FLIP_REQUEST = {\n\tfrom: {\n\t\trect: DOMRect\n\t\telement?: HTMLElement\n\t}\n\tto: {\n\t\trect: DOMRect\n\t\telement: HTMLElement\n\t}\n\tstagger?: number\n\thost: HTMLElement\n}\nexport const HereMorty = 'hereMorty'\n\nclass Teleportation {\n\tactiveTeleportations = new Map<string, DOMRect>()\n\tflipRequests = new Subject<FLIP_REQUEST>()\n\n\tconstructor() {\n\t\tthis.flipRequests\n\t\t\t.pipe(\n\t\t\t\tbufferTime(1),\n\t\t\t\tmap(requests =>\n\t\t\t\t\trequests.map(({ from, to, host }, i) => ({\n\t\t\t\t\t\tfrom,\n\t\t\t\t\t\tto,\n\t\t\t\t\t\thost,\n\t\t\t\t\t\ti,\n\t\t\t\t\t})),\n\t\t\t\t),\n\t\t\t\tconcatMap(requests => zip(requests.map(request => of(this.flip(request))))),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\tfind = (component: SchmancyTeleportation) => {\n\t\treturn zip([\n\t\t\tfromEvent<HereMortyEvent>(window, HereMorty).pipe(\n\t\t\t\tfilter(\n\t\t\t\t\te =>\n\t\t\t\t\t\t!!e.detail.component.uuid &&\n\t\t\t\t\t\t!!component.id &&\n\t\t\t\t\t\te.detail.component.id === component.id &&\n\t\t\t\t\t\te.detail.component.uuid !== component.uuid,\n\t\t\t\t),\n\t\t\t\tmap(e => e.detail.component),\n\t\t\t\ttake(1),\n\t\t\t),\n\t\t\tof(component).pipe(\n\t\t\t\ttap(() => {\n\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent<WhereAreYouRickyEvent['detail']>(WhereAreYouRicky, {\n\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\tid: component.id,\n\t\t\t\t\t\t\t\tcallerID: component.uuid,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t}),\n\t\t\t),\n\t\t]).pipe(\n\t\t\tmap(([component]) => component),\n\t\t\ttimeout(0),\n\t\t)\n\t}\n\n\tflip = (request: {\n\t\tfrom: {\n\t\t\trect: DOMRect\n\t\t}\n\t\tto: {\n\t\t\telement: HTMLElement\n\t\t\trect: DOMRect\n\t\t}\n\t\thost: HTMLElement\n\t\ti: number\n\t}) => {\n\t\tconst { from, to } = request\n\n\t\t// Prepare the element for animation\n\t\tconst originalZIndex = to.element.style.zIndex\n\t\tto.element.style.transformOrigin = 'top left'\n\t\tto.element.style.setProperty('visibility', 'visible')\n\t\tto.element.style.zIndex = '1000'\n\n\t\t// \"onBegin\" logic goes here (since Web Animations doesn't have onBegin).\n\t\t// If you had more logic, place it here:\n\t\t// e.g., console.log('Starting FLIP animation...');\n\n\t\t// Calculate starting and ending transforms\n\t\tconst startX = from.rect.left - to.rect.left\n\t\tconst startY = from.rect.top - to.rect.top\n\t\tconst startScaleX = from.rect.width / to.rect.width\n\t\tconst startScaleY = from.rect.height / to.rect.height\n\n\t\t// Create keyframes\n\t\tconst keyframes: Keyframe[] = [\n\t\t\t{\n\t\t\t\ttransform: `translate(${startX}px, ${startY}px) scale(${startScaleX}, ${startScaleY})`,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttransform: 'translate(0, 0) scale(1, 1)',\n\t\t\t},\n\t\t]\n\n\t\t// Use native Web Animations API\n\t\tconst animation = to.element.animate(keyframes, {\n\t\t\tduration: 250,\n\t\t\tdelay: 10, // if desired\n\t\t\t// Approximate 'inOutQuad' via a cubic-bezier easing.\n\t\t\t// You can adjust these values to taste, or use a standard one:\n\t\t\teasing: 'cubic-bezier(0.455, 0.03, 0.515, 0.955)',\n\t\t\t// or simply 'ease-in-out'\n\t\t})\n\n\t\t// \"onComplete\" logic goes here\n\t\tanimation.onfinish = () => {\n\t\t\tto.element.style.zIndex = originalZIndex\n\t\t\tto.element.style.transformOrigin = ''\n\t\t\t// If you have additional cleanup, place it here\n\t\t\t// e.g., console.log('FLIP animation completed!');\n\t\t}\n\t}\n}\n\nexport const teleport = new Teleportation()\nexport default teleport\n","import { Observable, interval } from 'rxjs'\nimport { distinctUntilChanged, map, take } from 'rxjs/operators'\n\n// Function to monitor element's bounding client rect\nexport function watchElementRect(element: Element): Observable<DOMRectReadOnly> {\n\treturn interval(50).pipe(\n\t\t// startWith(true),\n\t\tmap(() => element.getBoundingClientRect()),\n\t\tdistinctUntilChanged(\n\t\t\t(prev, curr) =>\n\t\t\t\tprev.width === curr.width &&\n\t\t\t\tprev.height === curr.height &&\n\t\t\t\tprev.top === curr.top &&\n\t\t\t\tprev.right === curr.right &&\n\t\t\t\tprev.bottom === curr.bottom &&\n\t\t\t\tprev.left === curr.left,\n\t\t),\n\t\ttake(1),\n\t)\n}\n","import { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { filter, fromEvent, merge, of, takeUntil, tap, throwIfEmpty } from 'rxjs'\nimport { FINDING_MORTIES, FINDING_MORTIES_EVENT, HERE_RICKY, HERE_RICKY_EVENT } from '..'\nimport {\n\tHereMorty,\n\tHereMortyEvent,\n\tWhereAreYouRicky,\n\tWhereAreYouRickyEvent,\n\tdefault as teleport,\n\tdefault as teleportationService,\n} from './teleport.service'\nimport { watchElementRect } from './watcher'\nimport { $LitElement } from '@mixins/index'\n@customElement('schmancy-teleport')\nexport class SchmancyTeleportation extends $LitElement(css``) {\n\t/**\n\t * @attr {string} uuid - The component tag to teleport\n\t * @readonly\n\t */\n\t@property({ type: Number, reflect: true }) uuid = Math.floor(Math.random() * Date.now())\n\n\t/**\n\t * @attr {string} id - The component tag to teleport\n\t * @required\n\t */\n\t@property({ type: String }) id!: string\n\n\t@property({ type: Number }) delay = 0\n\n\tdebugging = import.meta.env.DEV ? true : false\n\n\tget _slottedChildren() {\n\t\tconst slot = this.shadowRoot.querySelector('slot')\n\t\treturn slot.assignedElements({ flatten: true })\n\t}\n\n\tconnectedCallback(): void {\n\t\tif (this.id === undefined) throw new Error('id is required')\n\t\tsuper.connectedCallback()\n\t\tmerge(\n\t\t\tfromEvent<FINDING_MORTIES_EVENT>(window, FINDING_MORTIES).pipe(\n\t\t\t\ttap({\n\t\t\t\t\tnext: () => {\n\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\tnew CustomEvent<HERE_RICKY_EVENT['detail']>(HERE_RICKY, {\n\t\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\t\tcomponent: this,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t)\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t),\n\t\t\tfromEvent<WhereAreYouRickyEvent>(window, WhereAreYouRicky).pipe(\n\t\t\t\ttap({\n\t\t\t\t\tnext: e => {\n\t\t\t\t\t\tif (e.detail.id === this.id && this.uuid && e.detail.callerID !== this.uuid) {\n\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\tnew CustomEvent<HereMortyEvent['detail']>(HereMorty, {\n\t\t\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\t\t\tcomponent: this,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t),\n\t\t)\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe()\n\t}\n\n\tasync firstUpdated() {\n\t\tof(teleportationService.activeTeleportations.get(this.id))\n\t\t\t.pipe(\n\t\t\t\tfilter(a => !!a),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\tthrowIfEmpty(),\n\t\t\t)\n\t\t\t.subscribe({\n\t\t\t\tnext: domRect => {\n\t\t\t\t\tconsole.count('teleport')\n\t\t\t\t\tthis.style.setProperty('visibility', 'hidden')\n\t\t\t\t\t// teleport.flipRequests.next({ from: component, to: this, stagger: 0 })\n\t\t\t\t\twatchElementRect(this)\n\t\t\t\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t\t\t\t.subscribe({\n\t\t\t\t\t\t\tnext: e => {\n\t\t\t\t\t\t\t\t// console.log(e)\n\t\t\t\t\t\t\t\tteleportationService.activeTeleportations.set(this.id, e)\n\t\t\t\t\t\t\t\tteleport.flipRequests.next({\n\t\t\t\t\t\t\t\t\tfrom: {\n\t\t\t\t\t\t\t\t\t\trect: domRect,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tto: {\n\t\t\t\t\t\t\t\t\t\trect: e,\n\t\t\t\t\t\t\t\t\t\telement: this._slottedChildren[0] as HTMLElement,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\thost: this,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t\terror: () => {\n\t\t\t\t\tthis.style.setProperty('visibility', 'visible')\n\t\t\t\t\twatchElementRect(this)\n\t\t\t\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t\t\t\t.subscribe({\n\t\t\t\t\t\t\tnext: e => {\n\t\t\t\t\t\t\t\tconsole.log(e)\n\t\t\t\t\t\t\t\tteleportationService.activeTeleportations.set(this.id, e)\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t\tcomplete: () => {},\n\t\t\t})\n\t}\n\n\trender() {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-teleport': SchmancyTeleportation\n\t}\n}\n"],"names":["SchmancyCardMedia","TailwindElement","css","html","customElement","SchmancyCard","super","arguments","this","type","elevation","classes","includes","classMap","__decorateClass","property","prototype","Number","SchmancyCardContent","render","onSurface","SchmancyTheme","sys","color","surface","on","onSurfaceVariant","onVariant","src","fit","styleMap","height","String","reflect","schmancyContentDrawer","constructor","$drawer","Subject","pipe","subscribe","data","action","ref","dispatchEvent","CustomEvent","SchmancyEvents","ContentDrawerToggle","detail","state","bubbles","composed","component","title","next","e","SchmancyContentDrawerSheetMode","createContext","SchmancyContentDrawerSheetState","SchmancyContentDrawerID","Math","floor","random","Date","now","toString","SchmancyContentDrawerMaxHeight","SchmancyContentDrawerMinWidth","SchmancyContentDrawer","$LitElement","minWidth","main","sheet","schmancyContentDrawerID","maxHeight","merge","fromEvent","window","ContentDrawerResize","startWith","tap","map","clientWidth","innerWidth","width","debounceTime","innerHeight","getOffsetTop","style","setProperty","distinctUntilChanged","takeUntil","disconnecting","lgScreen","mode","open","event","stopPropagation","area","push","historyStrategy","uid","element","offsetTop","offsetParent","nothing","provide","context","queryAssignedElements","flatten","SchmancyContentDrawerMain","connectedCallback","drawerMinWidth","changedProperties","update","has","styles","when","consume","SchmancyContentDrawerSheet","updated","closeAll","dismiss","position","display","animate","opacity","transform","duration","easing","from","closeModalSheet","closeSheet","of","Observable","observer","onfinish","complete","sheetClasses","block","query","slot","undefined","SchmancyListItem","selected","leading","forEach","img","classList","add","imgClasses","trailing","rounded","stateLayerClasses","readonly","SchmancySurfaceTypeContext","Boolean","SchmancyListTypeContext","List","schmancyNavDrawer","distinctUntilKeyChanged","NavDrawer_toggle","self","SchmancyDrawerNavbarMode","SchmancyDrawerNavbarState","SchmancyDrawerAppbar","toggler","sidebarToggler","sidebarMode","hidden","sidebarOpen","SchmancyNavigationDrawerContent","parentElement","SchmancyNavigationDrawer","fullscreen","breakpoint","target","fullHeight","attribute","SchmancyNavigationDrawerSidebar","hideNavDrawer","closeOverlay","openOverlay","showNavDrawer","overlay","fill","nav","sidebarClasses","bgColor","container","scrim","WhereAreYouRicky","HereMorty","teleport","activeTeleportations","Map","flipRequests","find","zip","filter","uuid","id","take","callerID","timeout","flip","request","to","originalZIndex","zIndex","transformOrigin","keyframes","rect","left","top","delay","bufferTime","requests","host","i","concatMap","watchElementRect","interval","getBoundingClientRect","prev","curr","right","bottom","SchmancyTeleportation","debugging","shadowRoot","querySelector","assignedElements","Error","FINDING_MORTIES","HERE_RICKY","firstUpdated","teleportationService","get","a","throwIfEmpty","domRect","set","_slottedChildren","error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAqBA,KAArB,cAA+CC,EAAgBC;AAAAA;AAAAA;AAAAA;AAAAA,CAKpD,EAAA;AAAA,EAAA;AACF,WAAAC;AAAAA,EAAA;AANYH;AAAAA;;;GAArB,CADCI,EAAc,sBAAA,CAAA,GACMJ;;;;;ACJrB,IAAqBK,IAArB,cAA0CJ,EAA1C,EAAA;AAAA,EAAA;AAAAK,UAAAC,GAAAA,SAAAA,GACwDC,KAAAC,OAAA,YACQD,KAAAE,YAAA;AAAA,EAAA;AAAA,EACrD;AACT,UAAMC,IAAU,EACf,cAAc,IACd,aAAaH,KAAKE,cAAc,GAChC,aAAaF,KAAKE,cAAc,GAChC,aAAaF,KAAKE,cAAc,GAChC,aAAaF,KAAKE,cAAc,GAChC,YAAYF,KAAKE,cAAc,GAC/B,mBAAmB,CAAC,YAAY,QAAA,EAAUE,SAASJ,KAAKC,IAAAA,GACxD,4CAA4CD,KAAKC,SAAS,YAC1D,sBAAsBD,KAAKC,SAAS,UACpC,yEAAyED,KAAKC,SAAS,WAATA;AAE/E,WAAON,gBAAmBK,KAAKK,SAASF,CAAAA,CAAAA;AAAAA;AAAAA;AAAAA,EAAQ;AAfrCG;AAAAA,EAAA,CAAXC,EAAAA,CAAAA,GADmBV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AAA,GAEH2O,OAAO,MAAA;AACD3O,WAAA+E,MAAMC,YAAY,cAAc,SAAA,GACpBoI,GAAApN,IACf8B,EAAAA,KAAKoD,EAAUlF,KAAKmF,gBACpBpD,UAAU,EACVc,MAAWC,OAAAA;AAEVsL,QAAAA,EAAqB3C,qBAAqBgD,IAAIzO,KAAKgM,IAAIlJ,CAAC;AAAA,MAAA,EAAA,CAAA;AAAA,IAEzD,GAEHkF,UAAU;;EACV;AAAA,EAGH,SACQ;AAAA,WAAArI;AAAAA,EAAA;AAAA;AAzGmCW,EAAA,CAA1CC,EAAS,EAAEN,MAAMQ,QAAQgB,SAAAA,QALdkM,EAK+BnN,WAAA,QAAA,CAAA,GAMfF,EAAA,CAA3BC,EAAS,EAAEN,MAAMuB,YAXNmM,EAWgBnN,WAAA,MAAA,CAAA,GAEAF,EAAA,CAA3BC,EAAS,EAAEN,MAAMQ,YAbNkN,EAagBnN,WAAA,SAAA,CAAA,GAbhBmN,IAANrN,EAAA,CADNV,EAAc,mBAAA,CAAA,GACF+N;"}
1
+ {"version":3,"file":"teleport.component-Dc1Ygxut.js","sources":["../src/card/actions.ts","../src/card/card.ts","../src/card/content.ts","../src/card/media.ts","../src/content-drawer/$sheet.ts","../src/content-drawer/context.ts","../src/content-drawer/drawer.ts","../src/content-drawer/main.ts","../src/content-drawer/sheet.ts","../src/list/list-item.ts","../src/list/context.ts","../src/list/list.ts","../src/nav-drawer/$navbar.ts","../src/nav-drawer/context.ts","../src/nav-drawer/appbar.ts","../src/nav-drawer/content.ts","../src/nav-drawer/drawer.ts","../src/nav-drawer/navbar.ts","../src/teleport/teleport.service.ts","../src/teleport/watcher.ts","../src/teleport/teleport.component.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-action\n * @slot - The content of the action\n */\n@customElement('schmancy-card-action')\nexport default class SchmancyCardMedia extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\tprotected render(): unknown {\n\t\treturn html` <section class=\"pb-4 px-4\"><slot> </slot></section> `\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-action': SchmancyCardMedia\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('schmancy-card')\nexport default class SchmancyCard extends TailwindElement() {\n\t@property() type: 'elevated' | 'filled' | 'outlined' = 'elevated'\n\t@property({ type: Number }) elevation: 0 | 1 | 2 | 3 | 4 | 5 = 0\n\tprotected render(): unknown {\n\t\tconst classes = {\n\t\t\t'rounded-md': true,\n\t\t\t'shadow-xs': this.elevation === 1,\n\t\t\t'shadow-sm': this.elevation === 2,\n\t\t\t'shadow-md': this.elevation === 3,\n\t\t\t'shadow-lg': this.elevation === 4,\n\t\t\t'shadow-5': this.elevation === 5,\n\t\t\t'hover:shadow-xs': ['outlined', 'filled'].includes(this.type),\n\t\t\t'bg-surface-low shadow-xs hover:shadow-sm': this.type === 'elevated',\n\t\t\t'bg-surface-highest': this.type === 'filled',\n\t\t\t'bg-surface-default border border-solid border-1 border-outlineVariant': this.type === 'outlined',\n\t\t}\n\t\treturn html`<div class=\"${this.classMap(classes)}\">\n\t\t\t<slot> </slot>\n\t\t</div>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card': SchmancyCard\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { color } from '..'\n\n/**\n * @element schmancy-card-content\n * @slot headline\n * @slot subhead\n * @slot default - The content of the card\n */\n@customElement('schmancy-card-content')\nexport default class SchmancyCardContent extends TailwindElement() {\n\tprotected render(): unknown {\n\t\tconst classes = {\n\t\t\t'px-[16px] py-[24px]': true,\n\t\t}\n\t\tconst onSurface = SchmancyTheme.sys.color.surface.on\n\t\tconst onSurfaceVariant = SchmancyTheme.sys.color.surface.onVariant\n\t\treturn html`<schmancy-grid gap=\"md\" class=\"${this.classMap(classes)}\">\n\t\t\t<schmancy-grid gap=\"xs\">\n\t\t\t\t<schmancy-typography\n\t\t\t\t\t${color({\n\t\t\t\t\t\tcolor: onSurface,\n\t\t\t\t\t})}\n\t\t\t\t\ttype=\"body\"\n\t\t\t\t\ttoken=\"lg\"\n\t\t\t\t\t><slot name=\"headline\"> </slot\n\t\t\t\t></schmancy-typography>\n\t\t\t\t<schmancy-typography\n\t\t\t\t\t${color({\n\t\t\t\t\t\tcolor: onSurfaceVariant,\n\t\t\t\t\t})}\n\t\t\t\t\ttype=\"body\"\n\t\t\t\t\t><slot name=\"subhead\"></slot>\n\t\t\t\t</schmancy-typography>\n\t\t\t</schmancy-grid>\n\t\t\t<schmancy-typography\n\t\t\t\ttype=\"body\"\n\t\t\t\t${color({\n\t\t\t\t\tcolor: onSurfaceVariant,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t<slot></slot>\n\t\t\t</schmancy-typography>\n\t\t</schmancy-grid>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-content': SchmancyCardContent\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-media\n */\n@customElement('schmancy-card-media')\nexport default class SchmancyCardMedia extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\t@property({ type: String, reflect: true })\n\tsrc: string = ''\n\n\t@property({ type: String })\n\tfit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' = 'contain'\n\n\tprotected render(): unknown {\n\t\tconst styles = {\n\t\t\theight: '200px',\n\t\t}\n\t\tconst classes = {\n\t\t\t'object-center': true,\n\t\t\t'object-contain': this.fit === 'contain',\n\t\t\t'object-cover w-full': this.fit === 'cover',\n\t\t\t'object-fill': this.fit === 'fill',\n\t\t\t'object-none': this.fit === 'none',\n\t\t\t'object-scale-down': this.fit === 'scale-down',\n\t\t}\n\t\treturn html`<schmancy-grid align=\"stretch\" justify=\"stretch\" gap=\"md\">\n\t\t\t<img src=\"${this.src}\" style=${this.styleMap(styles)} class=\"${this.classMap(classes)}\" />\n\t\t</schmancy-grid>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-media': SchmancyCardMedia\n\t}\n}\n","import { SchmancyEvents } from '@schmancy/types/events'\nimport { Subject } from 'rxjs'\n\ntype DrawerAction = 'dismiss' | 'render'\ntype TRef = Element | Window\ntype TRenderRequest = HTMLElement\nexport type TRenderCustomEvent = CustomEvent<{\n\tcomponent: TRenderRequest\n\ttitle?: string\n}>\nclass Drawer {\n\tprivate $drawer = new Subject<{\n\t\tref: TRef\n\t\taction: DrawerAction\n\t\tcomponent?: TRenderRequest\n\t\ttitle?: string\n\t}>()\n\tconstructor() {\n\t\tthis.$drawer.pipe().subscribe(data => {\n\t\t\tif (data.action === 'dismiss') {\n\t\t\t\tdata.ref.dispatchEvent(\n\t\t\t\t\tnew CustomEvent(SchmancyEvents.ContentDrawerToggle, {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tstate: 'close',\n\t\t\t\t\t\t},\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} else if (data.action === 'render') {\n\t\t\t\tdata.ref.dispatchEvent(\n\t\t\t\t\tnew CustomEvent(SchmancyEvents.ContentDrawerToggle, {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tstate: 'open',\n\t\t\t\t\t\t},\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\tdata.ref.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('schmancy-content-drawer-render', {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tcomponent: data.component,\n\t\t\t\t\t\t\ttitle: data.title,\n\t\t\t\t\t\t},\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\t})\n\t}\n\n\tdimiss(ref: TRef) {\n\t\tthis.$drawer.next({\n\t\t\taction: 'dismiss',\n\t\t\tref: ref,\n\t\t})\n\t}\n\n\trender(ref: TRef, component: TRenderRequest, title?: string) {\n\t\tref.dispatchEvent(new CustomEvent('custom-event'))\n\t\tthis.$drawer.next({\n\t\t\taction: 'render',\n\t\t\tref: ref,\n\t\t\tcomponent: component,\n\t\t\ttitle,\n\t\t})\n\t}\n}\n\nexport const schmancyContentDrawer = new Drawer()\n","import { createContext } from '@lit/context'\nexport type TSchmancyContentDrawerSheetMode = 'push' | 'overlay'\nexport const SchmancyContentDrawerSheetMode = createContext<TSchmancyContentDrawerSheetMode>('push')\n\nexport type TSchmancyContentDrawerSheetState = 'open' | 'close'\nexport const SchmancyContentDrawerSheetState = createContext<TSchmancyContentDrawerSheetState>('close')\n\nexport const SchmancyContentDrawerID = createContext<string>(Math.floor(Math.random() * Date.now()).toString())\nexport const SchmancyContentDrawerMaxHeight = createContext<string>('100%')\nexport const SchmancyContentDrawerMinWidth = createContext<{\n\tmain: number\n\tsheet: number\n}>({})\n","import { provide } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { css, html, nothing } from 'lit'\nimport { customElement, property, queryAssignedElements, state } from 'lit/decorators.js'\nimport { debounceTime, distinctUntilChanged, fromEvent, map, merge, startWith, takeUntil, tap } from 'rxjs'\nimport { SchmancyEvents, TRenderCustomEvent, area, sheet } from '..'\nimport {\n\tSchmancyContentDrawerID,\n\tSchmancyContentDrawerMaxHeight,\n\tSchmancyContentDrawerMinWidth,\n\tSchmancyContentDrawerSheetMode,\n\tSchmancyContentDrawerSheetState,\n\tTSchmancyContentDrawerSheetMode,\n\tTSchmancyContentDrawerSheetState,\n} from './context'\n\n/**\n * @element schmancy-content-drawer\n * @slot appbar - The appbar slot\n * @slot - The content slot\n */\n@customElement('schmancy-content-drawer')\nexport class SchmancyContentDrawer extends $LitElement(css`\n\t:host {\n\t\tposition: relative;\n\t\tinset: 0;\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t}\n`) {\n\t/**\n\t * The minimum width of the sheet\n\t * @attr\tminWidth\n\t * @type {number}\n\t * @memberof SchmancyContentDrawer\n\t */\n\n\t@provide({ context: SchmancyContentDrawerMinWidth })\n\tminWidth: typeof SchmancyContentDrawerMinWidth.__context__ = {\n\t\tmain: 360,\n\t\tsheet: 576,\n\t}\n\n\t/**\n\t * The state of the sheet\n\t * @attr open\n\t * @type {TSchmancyContentDrawerSheetState}\n\t */\n\t@provide({ context: SchmancyContentDrawerSheetState })\n\t@property()\n\topen: TSchmancyContentDrawerSheetState\n\n\t/**\n\t * The mode of the sheet\n\t * @type {TSchmancyContentDrawerSheetMode}\n\t * @memberof SchmancyContentDrawer\n\t * @protected\n\t */\n\t@provide({ context: SchmancyContentDrawerSheetMode })\n\t@state()\n\tmode: TSchmancyContentDrawerSheetMode\n\n\t@provide({ context: SchmancyContentDrawerID })\n\tschmancyContentDrawerID = Math.floor(Math.random() * Date.now()).toString()\n\n\t@provide({ context: SchmancyContentDrawerMaxHeight })\n\tmaxHeight = '100%'\n\n\t@queryAssignedElements({ flatten: true })\n\tassignedElements!: HTMLElement[]\n\tfirstUpdated(): void {\n\t\tmerge(fromEvent<CustomEvent>(window, 'resize'), fromEvent<CustomEvent>(window, SchmancyEvents.ContentDrawerResize))\n\t\t\t.pipe(\n\t\t\t\tstartWith(true),\n\t\t\t\ttap(() => console.log(this.minWidth)),\n\t\t\t\tmap(() => (this.clientWidth ? this.clientWidth : window.innerWidth)),\n\t\t\t\tmap(width => width >= this.minWidth.main + this.minWidth.sheet),\n\t\t\t\tdebounceTime(100),\n\t\t\t\ttap(() => {\n\t\t\t\t\tthis.maxHeight = `${window.innerHeight - this.getOffsetTop(this) - 32}px`\n\t\t\t\t\tthis.style.setProperty('max-height', this.maxHeight)\n\t\t\t\t}),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(lgScreen => {\n\t\t\t\tif (lgScreen) {\n\t\t\t\t\tthis.mode = 'push'\n\t\t\t\t\tthis.open = 'open'\n\t\t\t\t} else {\n\t\t\t\t\tthis.mode = 'overlay'\n\t\t\t\t\tthis.open = 'close'\n\t\t\t\t}\n\t\t\t})\n\n\t\t/*\n\t\t * Listen to the toggle event\n\t\t */\n\t\tfromEvent<CustomEvent>(window, SchmancyEvents.ContentDrawerToggle)\n\t\t\t.pipe(\n\t\t\t\ttap(event => {\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t}),\n\t\t\t\tmap(event => event.detail.state),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(state => {\n\t\t\t\tthis.open = state\n\t\t\t})\n\n\t\tfromEvent<TRenderCustomEvent>(window, 'schmancy-content-drawer-render')\n\t\t\t.pipe(\n\t\t\t\ttap(event => {\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t}),\n\t\t\t\tmap(event => event.detail),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(({ component, title }) => {\n\t\t\t\tif (this.mode === 'push') {\n\t\t\t\t\t// TODO: Fix the router to render if constructor has different arguments\n\t\t\t\t\tarea.push({\n\t\t\t\t\t\tarea: this.schmancyContentDrawerID,\n\t\t\t\t\t\tcomponent: 'empty',\n\t\t\t\t\t\thistoryStrategy: 'silent',\n\t\t\t\t\t})\n\t\t\t\t\tarea.push({\n\t\t\t\t\t\tarea: this.schmancyContentDrawerID,\n\t\t\t\t\t\tcomponent: component,\n\t\t\t\t\t\thistoryStrategy: 'silent',\n\t\t\t\t\t})\n\t\t\t\t} else if ((this.mode = 'overlay')) {\n\t\t\t\t\tsheet.open({ component: component, uid: this.schmancyContentDrawerID, title })\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\tgetOffsetTop(element) {\n\t\tlet offsetTop = 0\n\t\twhile (element) {\n\t\t\toffsetTop += element.offsetTop\n\t\t\telement = element.offsetParent\n\t\t}\n\t\treturn offsetTop\n\t}\n\n\tprotected render() {\n\t\tif (!this.mode || !this.open) return nothing\n\t\treturn html`\n\t\t\t<schmancy-grid\n\t\t\t\tcols=${this.mode === 'overlay' ? '1fr' : 'auto 1fr'}\n\t\t\t\trows=\"1fr\"\n\t\t\t\tflow=\"col\"\n\t\t\t\tjustify=\"stretch\"\n\t\t\t\talign=\"stretch\"\n\t\t\t>\n\t\t\t\t<slot></slot>\n\t\t\t</schmancy-grid>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-content-drawer': SchmancyContentDrawer\n\t}\n}\n","import { consume } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { PropertyValueMap, css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { SchmancyEvents } from '..'\nimport {\n\tSchmancyContentDrawerMaxHeight,\n\tSchmancyContentDrawerMinWidth,\n\tSchmancyContentDrawerSheetMode,\n\tTSchmancyContentDrawerSheetMode,\n} from './context'\nimport { when } from 'lit/directives/when.js'\n\n@customElement('schmancy-content-drawer-main')\nexport class SchmancyContentDrawerMain extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t}\n`) {\n\t@property({ type: Number })\n\tminWidth\n\n\t@consume({ context: SchmancyContentDrawerMinWidth, subscribe: true })\n\tdrawerMinWidth: typeof SchmancyContentDrawerMinWidth.__context__\n\n\t@consume({ context: SchmancyContentDrawerSheetMode, subscribe: true })\n\t@state()\n\tmode: TSchmancyContentDrawerSheetMode\n\n\t@consume({ context: SchmancyContentDrawerMaxHeight, subscribe: true })\n\t@state()\n\tmaxHeight\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tif (this.minWidth) this.drawerMinWidth.main = this.minWidth\n\t\telse this.minWidth = this.drawerMinWidth.main\n\t}\n\n\tprotected update(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {\n\t\tsuper.update(changedProperties)\n\t\tif (changedProperties.has('minWidth') && this.minWidth) {\n\t\t\tthis.drawerMinWidth.main = this.minWidth\n\t\t\tthis.dispatchEvent(new CustomEvent(SchmancyEvents.ContentDrawerResize, { bubbles: true, composed: true }))\n\t\t}\n\t}\n\n\trender() {\n\t\tconst styles = {\n\t\t\tminWidth: `${this.minWidth}px`,\n\t\t\tmaxHeight: this.maxHeight,\n\t\t}\n\t\treturn html`\n\t\t\t<section class=\"relative inset-0 h-full\">\n\t\t\t\t<schmancy-grid\n\t\t\t\t\tclass=\"h-full relative overflow-scroll\"\n\t\t\t\t\tcols=\"${this.mode === 'push' ? 'auto 1fr' : '1fr'}\"\n\t\t\t\t\trows=\"1fr\"\n\t\t\t\t\tflow=\"col\"\n\t\t\t\t\talign=\"stretch\"\n\t\t\t\t\tjustify=\"stretch\"\n\t\t\t\t>\n\t\t\t\t\t<section style=${this.styleMap(styles)}>\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</section>\n\t\t\t\t</schmancy-grid>\n\t\t\t\t${when(\n\t\t\t\t\tthis.mode === 'push',\n\t\t\t\t\t() => html` <schmancy-divider class=\"absolute right-0 top-0\" orientation=\"vertical\"></schmancy-divider>`,\n\t\t\t\t)}\n\t\t\t</section>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-content-drawer-main': SchmancyContentDrawerMain\n\t}\n}\n","import { consume } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { from, merge, Observable, of, takeUntil, tap } from 'rxjs'\nimport { SchmancyEvents, sheet } from '..'\nimport {\n\tSchmancyContentDrawerID,\n\tSchmancyContentDrawerMaxHeight,\n\tSchmancyContentDrawerMinWidth,\n\tSchmancyContentDrawerSheetMode,\n\tSchmancyContentDrawerSheetState,\n\tTSchmancyContentDrawerSheetMode,\n\tTSchmancyContentDrawerSheetState,\n} from './context'\n\n// --- 1) Removed the custom animate import\n// import { animate } from '@packages/anime-beta-master'\n\n@customElement('schmancy-content-drawer-sheet')\nexport class SchmancyContentDrawerSheet extends $LitElement(css`\n\t:host {\n\t\toverflow: scroll;\n\t}\n`) {\n\t@property({ type: Number })\n\tminWidth\n\n\t@consume({ context: SchmancyContentDrawerSheetMode, subscribe: true })\n\t@state()\n\tmode: TSchmancyContentDrawerSheetMode\n\n\t@consume({ context: SchmancyContentDrawerSheetState, subscribe: true })\n\t@state()\n\tstate: TSchmancyContentDrawerSheetState\n\n\t@consume({ context: SchmancyContentDrawerID })\n\tschmancyContentDrawerID\n\n\t@query('#sheet') sheet!: HTMLElement\n\t@queryAssignedElements({ flatten: true, slot: undefined }) defaultSlot!: HTMLElement[]\n\n\t@consume({ context: SchmancyContentDrawerMinWidth, subscribe: true })\n\tdrawerMinWidth: typeof SchmancyContentDrawerMinWidth.__context__\n\n\t@consume({ context: SchmancyContentDrawerMaxHeight, subscribe: true })\n\t@state()\n\tmaxHeight\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tif (this.minWidth) {\n\t\t\tthis.drawerMinWidth.sheet = this.minWidth\n\t\t} else {\n\t\t\tthis.minWidth = this.drawerMinWidth.sheet\n\t\t}\n\t}\n\n\tupdated(changedProperties: Map<string, any>) {\n\t\tsuper.updated(changedProperties)\n\t\tif (changedProperties.has('minWidth') && this.minWidth) {\n\t\t\t// If the 'minWidth' property changed\n\t\t\tthis.drawerMinWidth.sheet = this.minWidth\n\t\t\tthis.dispatchEvent(new CustomEvent(SchmancyEvents.ContentDrawerResize, { bubbles: true, composed: true }))\n\t\t} else if (changedProperties.has('state') || changedProperties.has('mode')) {\n\t\t\tif (this.mode === 'overlay') {\n\t\t\t\tif (this.state === 'close') {\n\t\t\t\t\tthis.closeAll()\n\t\t\t\t} else if (this.state === 'open') {\n\t\t\t\t\t// Overlay open logic if needed\n\t\t\t\t\t// this.open()\n\t\t\t\t}\n\t\t\t} else if (this.mode === 'push') {\n\t\t\t\tsheet.dismiss(this.schmancyContentDrawerID)\n\t\t\t\tif (this.state === 'close') {\n\t\t\t\t\tthis.closeAll()\n\t\t\t\t} else if (this.state === 'open') {\n\t\t\t\t\tthis.open()\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Open the sheet by sliding it into view.\n\t */\n\topen() {\n\t\t// \"onBegin\" logic from the old `animate(...)`\n\t\tif (this.mode === 'overlay') {\n\t\t\tthis.sheet.style.position = 'fixed'\n\t\t} else {\n\t\t\tthis.sheet.style.position = 'relative'\n\t\t}\n\t\tthis.sheet.style.display = 'block'\n\n\t\t// --- 2) Use native Web Animations API ---\n\t\tthis.sheet.animate(\n\t\t\t[\n\t\t\t\t{ opacity: 0, transform: 'translateX(100%)' },\n\t\t\t\t{ opacity: 1, transform: 'translateX(0%)' },\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: 500,\n\t\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\t},\n\t\t)\n\t\t// No return is needed if you don't rely on the result\n\t}\n\n\t/**\n\t * Close everything (modal sheet + the sheet itself).\n\t */\n\tcloseAll() {\n\t\t// Merge them into a single subscription,\n\t\t// so that everything closes in parallel.\n\t\tmerge(from(this.closeModalSheet()), from(this.closeSheet())).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\t/**\n\t * Dismiss the \"modal sheet.\"\n\t * This just returns an Observable that completes immediately.\n\t */\n\tcloseModalSheet() {\n\t\treturn of(true).pipe(tap(() => sheet.dismiss(this.schmancyContentDrawerID)))\n\t}\n\n\t/**\n\t * Slide the sheet out of view + hide it.\n\t * Return an Observable so we can merge it with other close operations.\n\t */\n\tcloseSheet() {\n\t\t// --- 2) Use native Web Animations API and wrap in an Observable ---\n\t\treturn new Observable<void>(observer => {\n\t\t\tconst animation = this.sheet.animate(\n\t\t\t\t[\n\t\t\t\t\t{ opacity: 1, transform: 'translateX(0%)' },\n\t\t\t\t\t{ opacity: 1, transform: 'translateX(100%)' },\n\t\t\t\t],\n\t\t\t\t{\n\t\t\t\t\tduration: 500,\n\t\t\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\t\t},\n\t\t\t)\n\n\t\t\tanimation.onfinish = () => {\n\t\t\t\t// \"onComplete\" logic\n\t\t\t\tthis.sheet.style.display = 'none'\n\t\t\t\tobserver.next()\n\t\t\t\tobserver.complete()\n\t\t\t}\n\t\t})\n\t}\n\n\tprotected render() {\n\t\tconst sheetClasses = {\n\t\t\tblock: this.mode === 'push',\n\t\t\t'absolute z-50': this.mode === 'overlay',\n\t\t\t'opacity-1': this.mode === 'overlay' && this.state === 'open',\n\t\t}\n\n\t\tconst styles = {\n\t\t\tminWidth: `${this.minWidth}px`,\n\t\t\tmaxHeight: this.maxHeight,\n\t\t}\n\n\t\treturn html`\n\t\t\t<section id=\"sheet\" class=\"${this.classMap(sheetClasses)}\" style=${this.styleMap(styles)}>\n\t\t\t\t<schmancy-area name=\"${this.schmancyContentDrawerID}\">\n\t\t\t\t\t<slot name=\"placeholder\"></slot>\n\t\t\t\t</schmancy-area>\n\t\t\t</section>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-content-drawer-sheet': SchmancyContentDrawerSheet\n\t}\n}\n","import { consume } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport { SchmancySurfaceTypeContext } from '@schmancy/surface/context'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nimport { html } from 'lit'\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js'\nimport { when } from 'lit/directives/when.js'\nimport { color } from '..'\n\n/**\n * @element schmancy-list-item\n * @slot leading - leading content\n * @slot trailing - trailing content\n * @slot - default content\n */\n@customElement('schmancy-list-item')\nexport class SchmancyListItem extends TailwindElement() {\n\t@consume({ context: SchmancySurfaceTypeContext, subscribe: true })\n\t@property()\n\tvariant: TSurfaceColor\n\n\t@property({ type: Boolean })\n\trounded: boolean\n\n\t@property({ type: Boolean }) readonly: boolean\n\n\t@property({ type: Boolean }) selected: boolean = false\n\n\t@queryAssignedElements({\n\t\tslot: 'leading',\n\t\tflatten: true,\n\t})\n\tprivate leading!: HTMLElement[]\n\n\t@queryAssignedElements({\n\t\tslot: 'trailing',\n\t\tflatten: true,\n\t})\n\tprivate trailing!: HTMLElement[]\n\n\tprotected get imgClasses(): string[] {\n\t\treturn ['h-[24px]', 'w-[24px]', 'object-contain']\n\t}\n\n\tfirstUpdated() {\n\t\tthis.leading?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t})\n\t\tthis.trailing?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t})\n\t}\n\n\trender() {\n\t\tconst classes = {\n\t\t\t'rounded-none': this.rounded === false,\n\t\t\t'rounded-full': this.rounded,\n\t\t\t'w-full min-h-[56px] relative flex items-center gap-[16px] py-[8px] px-[16px] duration-500 transition-colors focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:z-1 outline-secondary-default outline-hidden':\n\t\t\t\ttrue,\n\t\t\t'bg-secondary-container text-secondery-onContainer': this.selected,\n\t\t}\n\n\t\tconst stateLayerClasses = {\n\t\t\t'z-0 duration-500 transition-opacity': true,\n\t\t\t'rounded-none': this.rounded === false,\n\t\t\t'rounded-full': this.rounded,\n\t\t\t'hover:bg-surface-on opacity-[0.08] cursor-pointer absolute inset-0 ': !this.readonly,\n\t\t}\n\t\treturn html`<li .tabIndex=${this.readonly ? -1 : 0} class=${this.classMap(classes)}>\n\t\t\t${when(!this.readonly, () => html` <div class=\"${this.classMap(stateLayerClasses)}\"></div> `)}\n\t\t\t<slot name=\"leading\"> </slot>\n\t\t\t<schmancy-flex flow=\"row\">\n\t\t\t\t<schmancy-typography type=\"body\" token=\"lg\">\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</schmancy-typography>\n\t\t\t\t<schmancy-typography\n\t\t\t\t\t${color({\n\t\t\t\t\t\tcolor: SchmancyTheme.sys.color.surface.onVariant,\n\t\t\t\t\t})}\n\t\t\t\t\ttype=\"body\"\n\t\t\t\t\ttoken=\"md\"\n\t\t\t\t>\n\t\t\t\t\t<slot name=\"support\"></slot>\n\t\t\t\t</schmancy-typography>\n\t\t\t</schmancy-flex>\n\t\t\t${when(!this.readonly, () => html` <div class=\"${this.classMap(stateLayerClasses)}\"></div> `)}\n\t\t\t<slot name=\"trailing\"></slot>\n\t\t</li>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-list-item': SchmancyListItem\n\t}\n}\n","import { createContext } from '@lit/context'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nexport const SchmancyListTypeContext = createContext<TSurfaceColor>(undefined)\n","import { provide } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { SchmancyListTypeContext } from './context'\n\n/**\n * @slot - The default slot.\n */\n@customElement('schmancy-list')\nexport class List extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tpadding-top: 8px;\n\t\tpadding-bottom: 8px;\n\t}\n`) {\n\t/**\n\t * The type of list.\n\t * @attr type\n\t * @type {SchmancyListType}\n\t * @default 'surface'\n\t */\n\t@provide({ context: SchmancyListTypeContext })\n\t@property()\n\tsurface: TSurfaceColor\n\n\trender() {\n\t\treturn html`\n\t\t\t<schmancy-surface type=${this.surface}>\n\t\t\t\t<ul>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</ul>\n\t\t\t</schmancy-surface>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-list': List\n\t}\n}\n","import { SchmancyEvents } from '@schmancy/types/events'\nimport { debounceTime, distinctUntilKeyChanged, Subject } from 'rxjs'\n\nclass Drawer {\n\tprivate $drawer = new Subject<{\n\t\tself: HTMLElement\n\t\tstate: boolean\n\t}>()\n\tconstructor() {\n\t\tthis.$drawer.pipe(distinctUntilKeyChanged('state'), debounceTime(100)).subscribe(data => {\n\t\t\tconsole.log('drawer', data)\n\t\t\tif (data.state) {\n\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\tnew CustomEvent(SchmancyEvents.NavDrawer_toggle, {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tstate: 'open',\n\t\t\t\t\t\t},\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} else {\n\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\tnew CustomEvent(SchmancyEvents.NavDrawer_toggle, {\n\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\tstate: 'close',\n\t\t\t\t\t\t},\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\t})\n\t}\n\topen(self?: HTMLElement) {\n\t\tthis.$drawer.next({\n\t\t\tself,\n\t\t\tstate: true,\n\t\t})\n\t}\n\tclose(self?: HTMLElement) {\n\t\tthis.$drawer.next({\n\t\t\tself,\n\t\t\tstate: false,\n\t\t})\n\t}\n}\n\nexport const schmancyNavDrawer = new Drawer()\n","import { createContext } from '@lit/context'\nexport type TSchmancyDrawerNavbarMode = 'push' | 'overlay' | undefined\nexport const SchmancyDrawerNavbarMode = createContext<TSchmancyDrawerNavbarMode>('push')\n\nexport type TSchmancyDrawerNavbarState = 'open' | 'close' | undefined\nexport const SchmancyDrawerNavbarState = createContext<TSchmancyDrawerNavbarState>('close')\n","import { consume } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport {\n\tSchmancyDrawerNavbarMode,\n\tSchmancyDrawerNavbarState,\n\tTSchmancyDrawerNavbarMode,\n} from '@schmancy/nav-drawer/context'\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { when } from 'lit/directives/when.js'\nimport { SchmancyEvents } from '..'\n\n/**\n * @element schmancy-nav-drawer-appbar\n * @slot toggler - The toggler slot\n * @slot - The default slot\n */\n@customElement('schmancy-nav-drawer-appbar')\nexport class SchmancyDrawerAppbar extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\t@consume({ context: SchmancyDrawerNavbarMode, subscribe: true })\n\t@state()\n\tsidebarMode: TSchmancyDrawerNavbarMode\n\n\t@consume({ context: SchmancyDrawerNavbarState, subscribe: true })\n\t@state()\n\tsidebarOpen\n\n\t@property({ type: Boolean }) toggler = true\n\n\trender() {\n\t\tconst appbarClasses = {\n\t\t\t'block z-50': true,\n\t\t}\n\t\tconst sidebarToggler = {\n\t\t\t'block left-3 z-50': this.sidebarMode === 'overlay',\n\t\t\thidden: this.sidebarMode === 'push',\n\t\t}\n\t\treturn html`\n\t\t\t<schmancy-grid\n\t\t\t\tcols=${this.sidebarMode === 'overlay' && this.toggler ? 'auto 1fr' : '1fr'}\n\t\t\t\tflow=\"col\"\n\t\t\t\tclass=${this.classMap(appbarClasses)}\n\t\t\t\tgap=\"sm\"\n\t\t\t\talign=\"center\"\n\t\t\t>\n\t\t\t\t${when(\n\t\t\t\t\tthis.sidebarMode === 'overlay' && this.toggler,\n\t\t\t\t\t() =>\n\t\t\t\t\t\thtml`<slot name=\"toggler\">\n\t\t\t\t\t\t\t<div class=\"${this.classMap(sidebarToggler)}\">\n\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\t\t\tnew CustomEvent(SchmancyEvents.NavDrawer_toggle, {\n\t\t\t\t\t\t\t\t\t\t\t\tdetail: { state: this.sidebarOpen === 'open' ? 'close' : 'open' },\n\t\t\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t${when(\n\t\t\t\t\t\t\t\t\t\tthis.sidebarOpen === 'close',\n\t\t\t\t\t\t\t\t\t\t() => html`menu`,\n\t\t\t\t\t\t\t\t\t\t() => html`menu_open`,\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</slot>`,\n\t\t\t\t)}\n\n\t\t\t\t<slot> </slot>\n\t\t\t</schmancy-grid>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-nav-drawer-appbar': SchmancyDrawerAppbar\n\t}\n}\n","import { $LitElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { fromEvent, takeUntil } from 'rxjs'\n\n@customElement('schmancy-nav-drawer-content')\nexport class SchmancyNavigationDrawerContent extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\tinset: 0;\n\t\toverflow-y: auto;\n\t}\n`) {\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tfromEvent(this, 'scroll')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(e => {\n\t\t\t\tthis.parentElement.dispatchEvent(new CustomEvent('scroll', { detail: e, bubbles: true, composed: true }))\n\t\t\t})\n\t}\n\trender() {\n\t\treturn html` <slot></slot> `\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-nav-drawer-content': SchmancyNavigationDrawerContent\n\t}\n}\n","import { provide } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { css, html, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { debounceTime, distinctUntilChanged, fromEvent, map, startWith, takeUntil, tap } from 'rxjs'\nimport { SchmancyEvents } from '..'\nimport { fullHeight } from './../directives/height'\nimport {\n\tSchmancyDrawerNavbarMode,\n\tSchmancyDrawerNavbarState,\n\tTSchmancyDrawerNavbarMode,\n\tTSchmancyDrawerNavbarState,\n} from './context'\n\n/**\n * @element schmancy-nav-drawer\n * @slot appbar - The appbar slot\n * @slot - The content slot\n */\n@customElement('schmancy-nav-drawer')\nexport class SchmancyNavigationDrawer extends $LitElement(css`\n\t:host {\n\t\tdisplay: flex;\n\t\tflex-grow: 1;\n\t\toverflow: hidden;\n\t}\n`) {\n\t// fullscreen property\n\t@property({ type: Boolean })\n\tfullscreen: boolean = false\n\n\t/**\n\t * The minimum width of the sidebar\n\t * @attr\tbreakpoint\n\t * @type {number}\n\t * @memberof SchmancyNavigationDrawer\n\t */\n\t@property({ type: Number, attribute: 'breakpoint' })\n\tbreakpoint: number = 768\n\n\t/**\n\t * The mode of the sidebar\n\t * @type {TSchmancyDrawerNavbarMode}\n\t * @memberof SchmancyNavigationDrawer\n\t * @protected\n\t */\n\t@provide({ context: SchmancyDrawerNavbarMode })\n\t@state()\n\tmode: TSchmancyDrawerNavbarMode\n\n\t@provide({ context: SchmancyDrawerNavbarState })\n\t@property()\n\topen: TSchmancyDrawerNavbarState\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tfromEvent<CustomEvent>(window, 'resize')\n\t\t\t.pipe(\n\t\t\t\tmap(event => event.target as Window),\n\t\t\t\tstartWith(window),\n\t\t\t\tmap(window => window.innerWidth),\n\t\t\t\tmap(width => width >= this.breakpoint),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\tdebounceTime(100),\n\t\t\t)\n\t\t\t.subscribe(lgScreen => {\n\t\t\t\tif (lgScreen) {\n\t\t\t\t\tthis.mode = 'push'\n\t\t\t\t\tthis.open = 'open'\n\t\t\t\t} else {\n\t\t\t\t\tthis.mode = 'overlay'\n\t\t\t\t\tthis.open = 'close'\n\t\t\t\t}\n\t\t\t})\n\n\t\t/*\n\t\t * Listen to the toggle event\n\t\t */\n\t\tfromEvent<CustomEvent>(window, SchmancyEvents.NavDrawer_toggle)\n\t\t\t.pipe(\n\t\t\t\ttap(event => {\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t}),\n\t\t\t\tmap(event => event.detail.state),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\tdebounceTime(100),\n\t\t\t)\n\t\t\t.subscribe(state => {\n\t\t\t\t// if the mode is push, we don't need to close the overlay when the state is close\n\t\t\t\tif (this.mode === 'push' && state === 'close') return\n\t\t\t\tthis.open = state\n\t\t\t})\n\t}\n\n\tprotected render() {\n\t\tif (!this.mode || !this.open) return nothing\n\t\treturn html`\n\t\t\t<schmancy-grid\n\t\t\t\tcols=${this.fullscreen ? '1fr' : 'auto 1fr'}\n\t\t\t\trows=\"1fr\"\n\t\t\t\tflow=\"col\"\n\t\t\t\tjustify=\"stretch\"\n\t\t\t\talign=\"stretch\"\n\t\t\t\t${fullHeight()}\n\t\t\t>\n\t\t\t\t<slot></slot>\n\t\t\t</schmancy-grid>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-nav-drawer': SchmancyNavigationDrawer\n\t}\n}\n","import { consume } from '@lit/context'\nimport { $LitElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { SchmancyEvents, SchmancyTheme, color } from '..'\nimport {\n\tSchmancyDrawerNavbarMode,\n\tSchmancyDrawerNavbarState,\n\tTSchmancyDrawerNavbarMode,\n\tTSchmancyDrawerNavbarState,\n} from './context'\n\n@customElement('schmancy-nav-drawer-navbar')\nexport class SchmancyNavigationDrawerSidebar extends $LitElement() {\n\t@consume({ context: SchmancyDrawerNavbarMode, subscribe: true })\n\t@state()\n\tmode: TSchmancyDrawerNavbarMode\n\n\t@consume({ context: SchmancyDrawerNavbarState, subscribe: true })\n\t@state()\n\tprivate state: TSchmancyDrawerNavbarState\n\n\t@query('#overlay') overlay!: HTMLElement\n\t@query('nav') nav!: HTMLElement\n\n\t@property({ type: String }) width = '320px'\n\n\tupdated(changedProperties: Map<string, any>) {\n\t\tif (changedProperties.has('state')) {\n\t\t\tconsole.log('state changed', this.state, this.mode)\n\t\t\tif (this.mode === 'overlay') {\n\t\t\t\tif (this.state === 'close') {\n\t\t\t\t\tthis.hideNavDrawer()\n\t\t\t\t\tthis.closeOverlay()\n\t\t\t\t} else if (this.state === 'open') {\n\t\t\t\t\tthis.openOverlay()\n\t\t\t\t\tthis.showNavDrawer()\n\t\t\t\t}\n\t\t\t} else if (this.mode === 'push') {\n\t\t\t\tthis.showNavDrawer()\n\t\t\t\tthis.closeOverlay()\n\t\t\t}\n\t\t}\n\t}\n\n\topenOverlay() {\n\t\t// Equivalent to onBegin\n\t\tthis.overlay.style.display = 'block'\n\n\t\t// Animate opacity from 0 to 0.4\n\t\tthis.overlay.animate([{ opacity: 0 }, { opacity: 0.4 }], {\n\t\t\tduration: 200,\n\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\tfill: 'forwards', // <-- This keeps the final keyframe (0.4) after finishing\n\t\t})\n\t\t// If you want an onfinish here, you can add it:\n\t\t// .onfinish = () => console.log('overlay opened!')\n\t}\n\n\tcloseOverlay() {\n\t\t// Animate opacity from 0.4 to 0\n\t\tconst animation = this.overlay.animate([{ opacity: 0.4 }, { opacity: 0 }], {\n\t\t\tduration: 150,\n\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\tfill: 'forwards',\n\t\t})\n\t\t// translateX(-100%) when the animation is finished\n\t\t// Equivalent to onComplete\n\t\tanimation.onfinish = () => {\n\t\t\tthis.overlay.style.display = 'none'\n\t\t}\n\t}\n\n\t// show nav drawer\n\tshowNavDrawer() {\n\t\t// check the transform, skip if already open\n\t\tif (this.nav.style.transform === 'translateX(0)') return\n\t\tconst animation = this.nav.animate([{ transform: 'translateX(-100%)' }, { transform: 'translateX(0)' }], {\n\t\t\tduration: 200,\n\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tanimation.onfinish = () => {\n\t\t\tthis.state = 'open'\n\t\t}\n\t}\n\n\t// hide nav drawer\n\thideNavDrawer() {\n\t\t// skip if already closed\n\t\tif (this.nav.style.transform === 'translateX(-100%)') return\n\t\tconst animation = this.nav.animate([{ transform: 'translateX(0)' }, { transform: 'translateX(-100%)' }], {\n\t\t\tduration: 200,\n\t\t\teasing: 'cubic-bezier(0.5, 0.01, 0.25, 1)',\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tanimation.onfinish = () => {\n\t\t\tthis.state = 'close'\n\t\t}\n\t}\n\n\tprotected render() {\n\t\tconst sidebarClasses = {\n\t\t\t'p-[16px] max-w-[360px] w-fit h-full overflow-auto': true,\n\t\t\tblock: this.mode === 'push',\n\t\t\t'fixed inset-0 z-50': this.mode === 'overlay',\n\t\t}\n\t\tconst overlayClass = {\n\t\t\t'fixed inset-0 z-49 hidden': true,\n\t\t}\n\n\t\tconst styleMap = {\n\t\t\twidth: this.width,\n\t\t}\n\n\t\treturn html`\n\t\t\t<nav\n\t\t\t\tstyle=${this.styleMap(styleMap)}\n\t\t\t\tclass=\"${this.classMap({ ...sidebarClasses })}\"\n\t\t\t\t${color({\n\t\t\t\t\tbgColor: SchmancyTheme.sys.color.surface.container,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t<slot></slot>\n\t\t\t</nav>\n\t\t\t<div\n\t\t\t\tid=\"overlay\"\n\t\t\t\t${color({\n\t\t\t\t\tbgColor: SchmancyTheme.sys.color.scrim,\n\t\t\t\t})}\n\t\t\t\t@click=${() => {\n\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent(SchmancyEvents.NavDrawer_toggle, {\n\t\t\t\t\t\t\tdetail: { state: 'close' },\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t}}\n\t\t\t\tclass=\"${this.classMap({ ...overlayClass })}\"\n\t\t\t></div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-nav-drawer-navbar': SchmancyNavigationDrawerSidebar\n\t}\n}\n","import { bufferTime, concatMap, filter, fromEvent, map, of, Subject, take, tap, timeout, zip } from 'rxjs'\nimport { SchmancyTeleportation } from './teleport.component'\n\nexport type WhereAreYouRickyEvent = CustomEvent<{\n\tid: string\n\tcallerID: number\n}>\n\nexport const WhereAreYouRicky = 'whereAreYouRicky'\n\nexport type HereMortyEvent = CustomEvent<{\n\tcomponent: SchmancyTeleportation\n}>\n\nexport type FLIP_REQUEST = {\n\tfrom: {\n\t\trect: DOMRect\n\t\telement?: HTMLElement\n\t}\n\tto: {\n\t\trect: DOMRect\n\t\telement: HTMLElement\n\t}\n\tstagger?: number\n\thost: HTMLElement\n}\nexport const HereMorty = 'hereMorty'\n\nclass Teleportation {\n\tactiveTeleportations = new Map<string, DOMRect>()\n\tflipRequests = new Subject<FLIP_REQUEST>()\n\n\tconstructor() {\n\t\tthis.flipRequests\n\t\t\t.pipe(\n\t\t\t\tbufferTime(1),\n\t\t\t\tmap(requests =>\n\t\t\t\t\trequests.map(({ from, to, host }, i) => ({\n\t\t\t\t\t\tfrom,\n\t\t\t\t\t\tto,\n\t\t\t\t\t\thost,\n\t\t\t\t\t\ti,\n\t\t\t\t\t})),\n\t\t\t\t),\n\t\t\t\tconcatMap(requests => zip(requests.map(request => of(this.flip(request))))),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\tfind = (component: SchmancyTeleportation) => {\n\t\treturn zip([\n\t\t\tfromEvent<HereMortyEvent>(window, HereMorty).pipe(\n\t\t\t\tfilter(\n\t\t\t\t\te =>\n\t\t\t\t\t\t!!e.detail.component.uuid &&\n\t\t\t\t\t\t!!component.id &&\n\t\t\t\t\t\te.detail.component.id === component.id &&\n\t\t\t\t\t\te.detail.component.uuid !== component.uuid,\n\t\t\t\t),\n\t\t\t\tmap(e => e.detail.component),\n\t\t\t\ttake(1),\n\t\t\t),\n\t\t\tof(component).pipe(\n\t\t\t\ttap(() => {\n\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent<WhereAreYouRickyEvent['detail']>(WhereAreYouRicky, {\n\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\tid: component.id,\n\t\t\t\t\t\t\t\tcallerID: component.uuid,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t}),\n\t\t\t),\n\t\t]).pipe(\n\t\t\tmap(([component]) => component),\n\t\t\ttimeout(0),\n\t\t)\n\t}\n\n\tflip = (request: {\n\t\tfrom: {\n\t\t\trect: DOMRect\n\t\t}\n\t\tto: {\n\t\t\telement: HTMLElement\n\t\t\trect: DOMRect\n\t\t}\n\t\thost: HTMLElement\n\t\ti: number\n\t}) => {\n\t\tconst { from, to } = request\n\n\t\t// Prepare the element for animation\n\t\tconst originalZIndex = to.element.style.zIndex\n\t\tto.element.style.transformOrigin = 'top left'\n\t\tto.element.style.setProperty('visibility', 'visible')\n\t\tto.element.style.zIndex = '1000'\n\n\t\t// \"onBegin\" logic goes here (since Web Animations doesn't have onBegin).\n\t\t// If you had more logic, place it here:\n\t\t// e.g., console.log('Starting FLIP animation...');\n\n\t\t// Calculate starting and ending transforms\n\t\tconst startX = from.rect.left - to.rect.left\n\t\tconst startY = from.rect.top - to.rect.top\n\t\tconst startScaleX = from.rect.width / to.rect.width\n\t\tconst startScaleY = from.rect.height / to.rect.height\n\n\t\t// Create keyframes\n\t\tconst keyframes: Keyframe[] = [\n\t\t\t{\n\t\t\t\ttransform: `translate(${startX}px, ${startY}px) scale(${startScaleX}, ${startScaleY})`,\n\t\t\t},\n\t\t\t{\n\t\t\t\ttransform: 'translate(0, 0) scale(1, 1)',\n\t\t\t},\n\t\t]\n\n\t\t// Use native Web Animations API\n\t\tconst animation = to.element.animate(keyframes, {\n\t\t\tduration: 250,\n\t\t\tdelay: 10, // if desired\n\t\t\t// Approximate 'inOutQuad' via a cubic-bezier easing.\n\t\t\t// You can adjust these values to taste, or use a standard one:\n\t\t\teasing: 'cubic-bezier(0.455, 0.03, 0.515, 0.955)',\n\t\t\t// or simply 'ease-in-out'\n\t\t})\n\n\t\t// \"onComplete\" logic goes here\n\t\tanimation.onfinish = () => {\n\t\t\tto.element.style.zIndex = originalZIndex\n\t\t\tto.element.style.transformOrigin = ''\n\t\t\t// If you have additional cleanup, place it here\n\t\t\t// e.g., console.log('FLIP animation completed!');\n\t\t}\n\t}\n}\n\nexport const teleport = new Teleportation()\nexport default teleport\n","import { Observable, interval } from 'rxjs'\nimport { distinctUntilChanged, map, take } from 'rxjs/operators'\n\n// Function to monitor element's bounding client rect\nexport function watchElementRect(element: Element): Observable<DOMRectReadOnly> {\n\treturn interval(50).pipe(\n\t\t// startWith(true),\n\t\tmap(() => element.getBoundingClientRect()),\n\t\tdistinctUntilChanged(\n\t\t\t(prev, curr) =>\n\t\t\t\tprev.width === curr.width &&\n\t\t\t\tprev.height === curr.height &&\n\t\t\t\tprev.top === curr.top &&\n\t\t\t\tprev.right === curr.right &&\n\t\t\t\tprev.bottom === curr.bottom &&\n\t\t\t\tprev.left === curr.left,\n\t\t),\n\t\ttake(1),\n\t)\n}\n","import { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { filter, fromEvent, merge, of, takeUntil, tap, throwIfEmpty } from 'rxjs'\nimport { FINDING_MORTIES, FINDING_MORTIES_EVENT, HERE_RICKY, HERE_RICKY_EVENT } from '..'\nimport {\n\tHereMorty,\n\tHereMortyEvent,\n\tWhereAreYouRicky,\n\tWhereAreYouRickyEvent,\n\tdefault as teleport,\n\tdefault as teleportationService,\n} from './teleport.service'\nimport { watchElementRect } from './watcher'\nimport { $LitElement } from '@mixins/index'\n@customElement('schmancy-teleport')\nexport class SchmancyTeleportation extends $LitElement(css``) {\n\t/**\n\t * @attr {string} uuid - The component tag to teleport\n\t * @readonly\n\t */\n\t@property({ type: Number, reflect: true }) uuid = Math.floor(Math.random() * Date.now())\n\n\t/**\n\t * @attr {string} id - The component tag to teleport\n\t * @required\n\t */\n\t@property({ type: String }) id!: string\n\n\t@property({ type: Number }) delay = 0\n\n\tdebugging = import.meta.env.DEV ? true : false\n\n\tget _slottedChildren() {\n\t\tconst slot = this.shadowRoot.querySelector('slot')\n\t\treturn slot.assignedElements({ flatten: true })\n\t}\n\n\tconnectedCallback(): void {\n\t\tif (this.id === undefined) throw new Error('id is required')\n\t\tsuper.connectedCallback()\n\t\tmerge(\n\t\t\tfromEvent<FINDING_MORTIES_EVENT>(window, FINDING_MORTIES).pipe(\n\t\t\t\ttap({\n\t\t\t\t\tnext: () => {\n\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\tnew CustomEvent<HERE_RICKY_EVENT['detail']>(HERE_RICKY, {\n\t\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\t\tcomponent: this,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t)\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t),\n\t\t\tfromEvent<WhereAreYouRickyEvent>(window, WhereAreYouRicky).pipe(\n\t\t\t\ttap({\n\t\t\t\t\tnext: e => {\n\t\t\t\t\t\tif (e.detail.id === this.id && this.uuid && e.detail.callerID !== this.uuid) {\n\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\tnew CustomEvent<HereMortyEvent['detail']>(HereMorty, {\n\t\t\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\t\t\tcomponent: this,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t),\n\t\t)\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe()\n\t}\n\n\tasync firstUpdated() {\n\t\tof(teleportationService.activeTeleportations.get(this.id))\n\t\t\t.pipe(\n\t\t\t\tfilter(a => !!a),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\tthrowIfEmpty(),\n\t\t\t)\n\t\t\t.subscribe({\n\t\t\t\tnext: domRect => {\n\t\t\t\t\tconsole.count('teleport')\n\t\t\t\t\tthis.style.setProperty('visibility', 'hidden')\n\t\t\t\t\t// teleport.flipRequests.next({ from: component, to: this, stagger: 0 })\n\t\t\t\t\twatchElementRect(this)\n\t\t\t\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t\t\t\t.subscribe({\n\t\t\t\t\t\t\tnext: e => {\n\t\t\t\t\t\t\t\t// console.log(e)\n\t\t\t\t\t\t\t\tteleportationService.activeTeleportations.set(this.id, e)\n\t\t\t\t\t\t\t\tteleport.flipRequests.next({\n\t\t\t\t\t\t\t\t\tfrom: {\n\t\t\t\t\t\t\t\t\t\trect: domRect,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tto: {\n\t\t\t\t\t\t\t\t\t\trect: e,\n\t\t\t\t\t\t\t\t\t\telement: this._slottedChildren[0] as HTMLElement,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\thost: this,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t\terror: () => {\n\t\t\t\t\tthis.style.setProperty('visibility', 'visible')\n\t\t\t\t\twatchElementRect(this)\n\t\t\t\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t\t\t\t.subscribe({\n\t\t\t\t\t\t\tnext: e => {\n\t\t\t\t\t\t\t\tconsole.log(e)\n\t\t\t\t\t\t\t\tteleportationService.activeTeleportations.set(this.id, e)\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t})\n\t\t\t\t},\n\t\t\t\tcomplete: () => {},\n\t\t\t})\n\t}\n\n\trender() {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-teleport': SchmancyTeleportation\n\t}\n}\n"],"names":["SchmancyCardMedia","TailwindElement","css","html","customElement","SchmancyCard","super","arguments","this","type","elevation","classes","includes","classMap","__decorateClass","property","prototype","Number","SchmancyCardContent","render","onSurface","SchmancyTheme","sys","color","surface","on","onSurfaceVariant","onVariant","src","fit","styleMap","height","String","reflect","schmancyContentDrawer","constructor","$drawer","Subject","pipe","subscribe","data","action","ref","dispatchEvent","CustomEvent","SchmancyEvents","ContentDrawerToggle","detail","state","bubbles","composed","component","title","next","e","SchmancyContentDrawerSheetMode","createContext","SchmancyContentDrawerSheetState","SchmancyContentDrawerID","Math","floor","random","Date","now","toString","SchmancyContentDrawerMaxHeight","SchmancyContentDrawerMinWidth","SchmancyContentDrawer","$LitElement","minWidth","main","sheet","schmancyContentDrawerID","maxHeight","merge","fromEvent","window","ContentDrawerResize","startWith","tap","map","clientWidth","innerWidth","width","debounceTime","innerHeight","getOffsetTop","style","setProperty","distinctUntilChanged","takeUntil","disconnecting","lgScreen","mode","open","event","stopPropagation","area","push","historyStrategy","uid","element","offsetTop","offsetParent","nothing","provide","context","queryAssignedElements","flatten","SchmancyContentDrawerMain","connectedCallback","drawerMinWidth","changedProperties","update","has","styles","when","consume","SchmancyContentDrawerSheet","updated","closeAll","dismiss","position","display","animate","opacity","transform","duration","easing","from","closeModalSheet","closeSheet","of","Observable","observer","onfinish","complete","sheetClasses","block","query","slot","undefined","SchmancyListItem","selected","leading","forEach","img","classList","add","imgClasses","trailing","rounded","stateLayerClasses","readonly","SchmancySurfaceTypeContext","Boolean","SchmancyListTypeContext","List","schmancyNavDrawer","distinctUntilKeyChanged","NavDrawer_toggle","self","SchmancyDrawerNavbarMode","SchmancyDrawerNavbarState","SchmancyDrawerAppbar","toggler","sidebarToggler","sidebarMode","hidden","sidebarOpen","SchmancyNavigationDrawerContent","parentElement","SchmancyNavigationDrawer","fullscreen","breakpoint","target","fullHeight","attribute","SchmancyNavigationDrawerSidebar","hideNavDrawer","closeOverlay","openOverlay","showNavDrawer","overlay","fill","nav","sidebarClasses","bgColor","container","scrim","WhereAreYouRicky","HereMorty","teleport","activeTeleportations","Map","flipRequests","find","zip","filter","uuid","id","take","callerID","timeout","flip","request","to","originalZIndex","zIndex","transformOrigin","keyframes","rect","left","top","delay","bufferTime","requests","host","i","concatMap","watchElementRect","interval","getBoundingClientRect","prev","curr","right","bottom","SchmancyTeleportation","debugging","shadowRoot","querySelector","assignedElements","Error","FINDING_MORTIES","HERE_RICKY","firstUpdated","teleportationService","get","a","throwIfEmpty","domRect","set","_slottedChildren","error"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAqBA,KAArB,cAA+CC,EAAgBC;AAAAA;AAAAA;AAAAA;AAAAA,CAKpD,EAAA;AAAA,EAAA;AACF,WAAAC;AAAAA,EAAA;AANYH;AAAAA;;;GAArB,CADCI,EAAc,sBAAA,CAAA,GACMJ;;;;;ACJrB,IAAqBK,IAArB,cAA0CJ,EAA1C,EAAA;AAAA,EAAA;AAAAK,UAAAC,GAAAA,SAAAA,GACwDC,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.js";
1
+ import { H as o, p as t, W as a, t as p } from "./teleport.component-Dc1Ygxut.js";
2
2
  export {
3
3
  o as HereMorty,
4
4
  t as SchmancyTeleportation,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mhmo91/schmancy",
3
- "version": "0.2.12",
3
+ "version": "0.2.14",
4
4
  "description": "UI library build with web components",
5
5
  "main": "./dist/index.js",
6
6
  "repository": {
@@ -1,7 +1,10 @@
1
1
  import SchmancyMenu from '@schmancy/menu/menu';
2
2
  import moment from 'moment';
3
- declare const SwiftHRAdminDateRange_base: CustomElementConstructor & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
4
- export default class SwiftHRAdminDateRange extends SwiftHRAdminDateRange_base {
3
+ declare const SchmancyDateRange_base: CustomElementConstructor & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
4
+ /**
5
+ * A date range selector that supports presets and manual date input.
6
+ */
7
+ export default class SchmancyDateRange extends SchmancyDateRange_base {
5
8
  type: 'date' | 'datetime-local';
6
9
  dateFrom: {
7
10
  label: string;
@@ -11,10 +14,10 @@ export default class SwiftHRAdminDateRange extends SwiftHRAdminDateRange_base {
11
14
  label: string;
12
15
  value: string;
13
16
  };
17
+ minDate?: string;
18
+ maxDate?: string;
14
19
  checkInInput: HTMLInputElement;
15
20
  checkOutInput: HTMLInputElement;
16
- minDate: string | undefined;
17
- maxDate: string | undefined;
18
21
  schmancyMenu: SchmancyMenu;
19
22
  selectedDateRange: string;
20
23
  presetRanges: Array<{
@@ -23,23 +26,60 @@ export default class SwiftHRAdminDateRange extends SwiftHRAdminDateRange_base {
23
26
  dateFrom: string;
24
27
  dateTo: string;
25
28
  };
26
- step: moment.unitOfTime.DurationConstructor | moment.unitOfTime._isoWeek;
29
+ step: moment.unitOfTime.DurationConstructor;
27
30
  selected?: boolean;
28
31
  }>;
29
32
  connectedCallback(): void;
33
+ updated(changedProps: Map<string, unknown>): void;
34
+ /**
35
+ * Returns the date format string based on the current type.
36
+ */
37
+ private getDateFormat;
38
+ /**
39
+ * Returns the display format for showing dates.
40
+ */
41
+ private getDisplayFormat;
42
+ /**
43
+ * Initializes the preset date ranges.
44
+ */
45
+ private initPresetRanges;
46
+ /**
47
+ * Updates the selectedDateRange state based on the current dateFrom and dateTo values.
48
+ */
49
+ private updateSelectedDateRange;
50
+ /**
51
+ * Updates the internal date range state and dispatches a change event.
52
+ */
30
53
  setDateRange(fromDate: string, toDate: string): void;
54
+ /**
55
+ * Called when a preset is selected. Updates the date range and closes the menu.
56
+ */
31
57
  handlePresetChange(presetLabel: string): void;
32
- render(): import("lit-html").TemplateResult<1>;
58
+ /**
59
+ * Called when the user applies a manual date change.
60
+ */
33
61
  handleDateRangeChange(): void;
62
+ /**
63
+ * Shifts the current date range by multiplying the range length with the given factor.
64
+ * Use a negative factor to shift backward.
65
+ */
66
+ private shiftDateRange;
67
+ render(): import("lit-html").TemplateResult<1>;
34
68
  }
35
- export type SchmancyDateRangeChangeEvent = CustomEvent<TSchmancDateRangePayload>;
36
- type TSchmancDateRangePayload = {
69
+ /**
70
+ * The payload for a date range change event.
71
+ */
72
+ export type TSchmancDateRangePayload = {
37
73
  dateFrom?: string;
38
74
  dateTo?: string;
39
75
  };
76
+ /**
77
+ * A custom event fired when the date range is updated.
78
+ */
79
+ export type SchmancyDateRangeChangeEvent = CustomEvent<TSchmancDateRangePayload>;
40
80
  declare global {
41
81
  interface HTMLElementTagNameMap {
42
- 'schmancy-date-range': SwiftHRAdminDateRange;
82
+ 'schmancy-date-range': SchmancyDateRange;
43
83
  }
44
84
  }
45
85
  export {};
@@ -4,10 +4,6 @@ declare global {
4
4
  'schmancy-input': SchmancyInput;
5
5
  }
6
6
  }
7
- /**
8
- * An autocomplete type (expand or customize as needed).
9
- */
10
- type AutoFill = 'off' | 'on' | 'name' | 'username' | 'email' | 'tel' | 'url' | 'new-password' | 'current-password' | 'one-time-code';
11
7
  type EventDetails = {
12
8
  value: string;
13
9
  };
@@ -1,112 +0,0 @@
1
- import "rxjs";
2
- import "lit/directives/class-map.js";
3
- import "lit/directives/style-map.js";
4
- import { $ as l } from "./litElement.mixin-Bn8Rl6md.js";
5
- import "./tailwind.mixin-C5OzBKVB.js";
6
- import { html as c } from "lit";
7
- import { property as m, query as h, state as D, customElement as p } from "lit/decorators.js";
8
- import { ifDefined as M } from "lit/directives/if-defined.js";
9
- import e from "moment";
10
- var y = Object.defineProperty, u = Object.getOwnPropertyDescriptor, o = (t, a, Y, r) => {
11
- for (var d, n = r > 1 ? void 0 : r ? u(a, Y) : a, i = t.length - 1; i >= 0; i--) (d = t[i]) && (n = (r ? d(a, Y, n) : d(n)) || n);
12
- return r && n && y(a, Y, n), n;
13
- };
14
- let s = class extends l() {
15
- constructor() {
16
- super(...arguments), this.type = "date", this.selectedDateRange = "Today";
17
- }
18
- connectedCallback() {
19
- super.connectedCallback(), this.presetRanges = [{ label: "Yesterday", range: { dateFrom: e().subtract(1, "days").startOf("day").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), dateTo: e().subtract(1, "days").endOf("day").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm") }, step: "day" }, { label: "Today", range: { dateFrom: e().startOf("day").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), dateTo: e().endOf("day").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm") }, step: "day" }, { label: "Tomorrow", range: { dateFrom: e().add(1, "days").startOf("day").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), dateTo: e().add(1, "days").endOf("day").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm") }, step: "day" }, { label: "This Week", range: { dateFrom: e().startOf("week").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), dateTo: e().endOf("week").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm") }, step: "weeks" }, { label: "Last Week", range: { dateFrom: e().subtract(1, "weeks").startOf("isoWeek").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), dateTo: e().subtract(1, "weeks").endOf("isoWeek").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm") }, step: "weeks" }, { label: "This Month", range: { dateFrom: e().startOf("month").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), dateTo: e().endOf("month").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm") }, step: "month" }];
20
- const t = this.presetRanges.find((a) => a.range.dateFrom === this.dateFrom.value && a.range.dateTo === this.dateTo.value);
21
- this.selectedDateRange = t ? t.label : e(this.dateFrom.value).format("MMM DD, YYYY").concat(" To ", e(this.dateTo.value).format("MMM DD, YYYY"));
22
- }
23
- setDateRange(t, a) {
24
- this.dateFrom.value = t, this.dateTo.value = a, this.dispatchEvent(new CustomEvent("change", { detail: { dateFrom: this.dateFrom.value, dateTo: this.dateTo.value } })), this.requestUpdate();
25
- }
26
- handlePresetChange(t) {
27
- const a = this.presetRanges.find((Y) => Y.label === t);
28
- if (a) {
29
- const { dateFrom: Y, dateTo: r } = a.range;
30
- this.setDateRange(Y, r), this.selectedDateRange = t;
31
- }
32
- }
33
- render() {
34
- return c`
35
- <div class="date-range-selector relative">
36
- <schmancy-menu class="z-100 w-max">
37
- <schmancy-grid slot="button" align="center" cols="auto 1fr auto">
38
- <schmancy-icon-button
39
- @click=${(t) => {
40
- t.preventDefault(), t.stopPropagation();
41
- const a = e(this.dateTo.value).diff(e(this.dateFrom.value), "days") || 1;
42
- this.dateFrom.value = e(this.dateFrom.value).subtract(a, "days").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), this.dateTo.value = e(this.dateTo.value).subtract(a, "days").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), this.handleDateRangeChange();
43
- }}
44
- >
45
- arrow_left
46
- </schmancy-icon-button>
47
- <schmancy-button class="w-max" variant="outlined" type="button"
48
- >${this.selectedDateRange || "Date range"}
49
- </schmancy-button>
50
- <schmancy-icon-button
51
- @click=${(t) => {
52
- t.preventDefault(), t.stopPropagation();
53
- const a = e(this.dateTo.value).diff(e(this.dateFrom.value), "days") || 1;
54
- this.dateFrom.value = e(this.dateFrom.value).add(a, "days").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), this.dateTo.value = e(this.dateTo.value).add(a, "days").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm"), this.handleDateRangeChange();
55
- }}
56
- >arrow_right</schmancy-icon-button
57
- >
58
- </schmancy-grid>
59
-
60
- <schmancy-surface elevation="2">
61
- ${this.presetRanges.map((t) => c`
62
- <schmancy-menu-item class="w-full" @click=${() => this.handlePresetChange(t.label)}>
63
- <schmancy-grid class="w-full" align="center" cols="auto 1fr auto"> ${t.label} </schmancy-grid>
64
- </schmancy-menu-item>
65
- `)}
66
- <schmancy-grid gap="sm" flow="row" class="p-4">
67
- <schmancy-input
68
- id="checkin"
69
- min=${M(this.minDate)}
70
- .type=${this.type}
71
- .label="${this.dateFrom.label}"
72
- .value=${this.dateFrom.value}
73
- @change=${(t) => {
74
- t.preventDefault(), t.stopPropagation();
75
- const a = e(t.detail.value, this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm");
76
- this.dateFrom.value = a;
77
- const Y = a;
78
- this.checkOutInput.setAttribute("min", Y);
79
- }}
80
- ></schmancy-input>
81
- <schmancy-input
82
- id="checkout"
83
- .type=${this.type}
84
- label="${this.dateTo.label}"
85
- .value=${this.dateTo.value}
86
- @change=${(t) => {
87
- t.preventDefault(), t.stopPropagation(), this.dateTo.value = e(t.detail.value, this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm").format(this.type === "date" ? "YYYY-MM-DD" : "YYYY-MM-DDTHH:mm");
88
- }}
89
- ></schmancy-input>
90
-
91
- <schmancy-button
92
- variant="outlined"
93
- @click=${(t) => {
94
- t.preventDefault(), t.stopPropagation(), this.handleDateRangeChange();
95
- }}
96
- >
97
- Apply
98
- </schmancy-button>
99
- </schmancy-grid>
100
- </schmancy-surface>
101
- </schmancy-menu>
102
- </div>
103
- `;
104
- }
105
- handleDateRangeChange() {
106
- this.setDateRange(this.dateFrom.value, this.dateTo.value);
107
- const t = this.presetRanges.find((a) => a.range.dateFrom === this.dateFrom.value && a.range.dateTo === this.dateTo.value);
108
- t ? this.selectedDateRange = t.label : (this.selectedDateRange = e(this.dateFrom.value).format(this.type === "date" ? "MMM DD, YYYY" : "MMM DD, YYYY hh:mm A").concat(" - ", e(this.dateTo.value).format(this.type === "date" ? "MMM DD, YYYY" : "MMM DD, YYYY hh:mm A")), this.schmancyMenu.open = !1);
109
- }
110
- };
111
- o([m({ type: String })], s.prototype, "type", 2), o([m({ type: Object })], s.prototype, "dateFrom", 2), o([m({ type: Object })], s.prototype, "dateTo", 2), o([h("#checkin")], s.prototype, "checkInInput", 2), o([h("#checkout")], s.prototype, "checkOutInput", 2), o([m({ type: String })], s.prototype, "minDate", 2), o([m({ type: String })], s.prototype, "maxDate", 2), o([h("schmancy-menu")], s.prototype, "schmancyMenu", 2), o([D()], s.prototype, "selectedDateRange", 2), s = o([p("schmancy-date-range")], s);
112
- //# sourceMappingURL=date-range-AqKuO1c4.js.map