@mhmo91/schmancy 0.10.18 → 0.10.19
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.
- package/dist/agent/{flow-CvG1fLW5.js.map → flow-3RrZM-e7.js.map} +1 -1
- package/dist/agent/overlay.confirm-body-D3jQyXgA.js +2863 -0
- package/dist/agent/overlay.confirm-body-D3jQyXgA.js.map +1 -0
- package/dist/agent/{rolldown-runtime-DsMetpgY.js → rolldown-runtime-BIIoCavz.js} +9 -2
- package/dist/agent/schmancy.agent.js +3870 -5769
- package/dist/agent/schmancy.agent.js.map +1 -1
- package/dist/agent/{vendor-material-color-DcL7ZPxx.js.map → vendor-material-color-33Mj762T.js.map} +1 -1
- package/dist/{audio-D-TZzpXF.cjs → audio-Cvmemu84.cjs} +1 -1
- package/dist/{audio-D-TZzpXF.cjs.map → audio-Cvmemu84.cjs.map} +1 -1
- package/dist/{audio-DS43uoRA.js → audio-CxO5a2HL.js} +1 -1
- package/dist/{audio-DS43uoRA.js.map → audio-CxO5a2HL.js.map} +1 -1
- package/dist/audio.cjs +1 -1
- package/dist/audio.js +2 -2
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{boat-cuoSkhGI.js → boat-CNWIQPA1.js} +1 -1
- package/dist/{boat-cuoSkhGI.js.map → boat-CNWIQPA1.js.map} +1 -1
- package/dist/{boat-DN1_tyvx.cjs → boat-OatK_MGh.cjs} +1 -1
- package/dist/{boat-DN1_tyvx.cjs.map → boat-OatK_MGh.cjs.map} +1 -1
- package/dist/boat.cjs +1 -1
- package/dist/boat.js +1 -1
- package/dist/{chips-m2NPN480.js → chips-D1kJrbzo.js} +1 -1
- package/dist/{chips-m2NPN480.js.map → chips-D1kJrbzo.js.map} +1 -1
- package/dist/{chips-DSdvCpmi.cjs → chips-Dx_WvOGk.cjs} +1 -1
- package/dist/{chips-DSdvCpmi.cjs.map → chips-Dx_WvOGk.cjs.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +1 -1
- package/dist/connectivity.cjs +1 -1
- package/dist/connectivity.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{date-range-D98QcCHl.js → date-range-Dv-DM6mB.js} +1 -1
- package/dist/{date-range-D98QcCHl.js.map → date-range-Dv-DM6mB.js.map} +1 -1
- package/dist/{date-range-DxS3Agbj.cjs → date-range-H903Vt_r.cjs} +1 -1
- package/dist/{date-range-DxS3Agbj.cjs.map → date-range-H903Vt_r.cjs.map} +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/directives.cjs +1 -1
- package/dist/directives.js +1 -1
- package/dist/{float-B8NcSE3a.cjs → float-CfbQM_2v.cjs} +1 -1
- package/dist/{float-B8NcSE3a.cjs.map → float-CfbQM_2v.cjs.map} +1 -1
- package/dist/{float-C-glc-3u.js → float-KmbhaQHA.js} +1 -1
- package/dist/{float-C-glc-3u.js.map → float-KmbhaQHA.js.map} +1 -1
- package/dist/float.cjs +1 -1
- package/dist/float.js +1 -1
- package/dist/{form-DJvxIyfW.js → form-8IcmP8uV.js} +2 -2
- package/dist/{form-DJvxIyfW.js.map → form-8IcmP8uV.js.map} +1 -1
- package/dist/{form-St_IwR7y.cjs → form-CuBIrKOA.cjs} +1 -1
- package/dist/{form-St_IwR7y.cjs.map → form-CuBIrKOA.cjs.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +2 -2
- package/dist/handover/agent-runtime-followups.md +1 -1
- package/dist/handover/agent-runtime-v1.md +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +56 -53
- package/dist/json.cjs +1 -1
- package/dist/json.js +1 -1
- package/dist/{layout-Delq-QvR.cjs → layout-BbCIfIgo.cjs} +1 -1
- package/dist/{layout-Delq-QvR.cjs.map → layout-BbCIfIgo.cjs.map} +1 -1
- package/dist/{layout-BH28sKGc.js → layout-Dq2oeOTS.js} +1 -1
- package/dist/{layout-BH28sKGc.js.map → layout-Dq2oeOTS.js.map} +1 -1
- package/dist/{menu-Dag0cuWV.cjs → menu-BqKQ-s0C.cjs} +1 -1
- package/dist/{menu-Dag0cuWV.cjs.map → menu-BqKQ-s0C.cjs.map} +1 -1
- package/dist/{menu-B_-weNpZ.js → menu-C5ksITpG.js} +1 -1
- package/dist/{menu-B_-weNpZ.js.map → menu-C5ksITpG.js.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/navigation-bar.cjs +1 -1
- package/dist/navigation-bar.js +1 -1
- package/dist/{notification-yd2KeHjd.cjs → notification-DR3gvWt8.cjs} +1 -1
- package/dist/{notification-yd2KeHjd.cjs.map → notification-DR3gvWt8.cjs.map} +1 -1
- package/dist/{notification-DySnvQeO.js → notification-eZxtr3NN.js} +1 -1
- package/dist/{notification-DySnvQeO.js.map → notification-eZxtr3NN.js.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/overlay-DG6EeyKt.cjs +80 -0
- package/dist/overlay-DG6EeyKt.cjs.map +1 -0
- package/dist/overlay-oxM9OLXP.js +745 -0
- package/dist/overlay-oxM9OLXP.js.map +1 -0
- package/dist/overlay.cjs +1 -80
- package/dist/{overlay.confirm-body-sUmd_zVy.cjs.map → overlay.confirm-body-78e1WrN9.cjs.map} +1 -1
- package/dist/{overlay.confirm-body-DESGpbru.js.map → overlay.confirm-body-D_P2e7l6.js.map} +1 -1
- package/dist/overlay.js +5 -746
- package/dist/{overlay.service-DV_o_xQ0.js → overlay.service-C8NwO4Bx.js} +2 -2
- package/dist/{overlay.service-DV_o_xQ0.js.map → overlay.service-C8NwO4Bx.js.map} +1 -1
- package/dist/{overlay.service-BxtEFFSH.cjs → overlay.service-DQkGPUY7.cjs} +1 -1
- package/dist/{overlay.service-BxtEFFSH.cjs.map → overlay.service-DQkGPUY7.cjs.map} +1 -1
- package/dist/page.cjs +1 -1
- package/dist/page.js +2 -2
- package/dist/{rxjs-utils-Dv9T9IpA.js.map → rxjs-utils-Cs6XGwF6.js.map} +1 -1
- package/dist/{rxjs-utils-BKB2UM_j.cjs.map → rxjs-utils-Dsj75cJy.cjs.map} +1 -1
- package/dist/rxjs-utils.cjs +1 -1
- package/dist/rxjs-utils.js +1 -1
- package/dist/{sound.service-DyY78ukR.cjs → sound.service-DVJZb9ox.cjs} +1 -1
- package/dist/{sound.service-DyY78ukR.cjs.map → sound.service-DVJZb9ox.cjs.map} +1 -1
- package/dist/{sound.service-BIN2W7Rv.js → sound.service-v_jqCkos.js} +1 -1
- package/dist/{sound.service-BIN2W7Rv.js.map → sound.service-v_jqCkos.js.map} +1 -1
- package/dist/{splash-screen-25PTDqnp.cjs.map → splash-screen-BvaDkvJU.cjs.map} +1 -1
- package/dist/{splash-screen-bGW_sS4i.js.map → splash-screen-ChMkAPLU.js.map} +1 -1
- package/dist/splash-screen.cjs +1 -1
- package/dist/splash-screen.js +1 -1
- package/dist/{src-Blm9PNcf.cjs → src-BIlD63Cz.cjs} +1 -1
- package/dist/{src-Blm9PNcf.cjs.map → src-BIlD63Cz.cjs.map} +1 -1
- package/dist/{src-olrlFt4e.js → src-DnunCC4X.js} +18 -17
- package/dist/{src-olrlFt4e.js.map → src-DnunCC4X.js.map} +1 -1
- package/dist/{state-nm8yzMPp.js → state-CHbIt2Dw.js} +198 -202
- package/dist/{state-nm8yzMPp.js.map → state-CHbIt2Dw.js.map} +1 -1
- package/dist/state-DcGj-pJJ.cjs +1 -0
- package/dist/{state-avic94Ft.cjs.map → state-DcGj-pJJ.cjs.map} +1 -1
- package/dist/state.cjs +1 -1
- package/dist/state.js +1 -1
- package/dist/{tabs-BVC_qn8S.js.map → tabs-CkDNLbiS.js.map} +1 -1
- package/dist/{tabs-Dc3_Ox2B.cjs.map → tabs-lxQHWEb7.cjs.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{theme-DCybsrfv.cjs → theme-CMyXTDht.cjs} +1 -1
- package/dist/{theme-DCybsrfv.cjs.map → theme-CMyXTDht.cjs.map} +1 -1
- package/dist/{theme-BiCwFfCf.js → theme-CNWRYdfn.js} +2 -2
- package/dist/{theme-BiCwFfCf.js.map → theme-CNWRYdfn.js.map} +1 -1
- package/dist/{theme-button-DqiA0rJg.js.map → theme-button-CixloLin.js.map} +1 -1
- package/dist/{theme-button-cZGRyQRK.cjs.map → theme-button-kMhsX5Oe.cjs.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/theme.js +2 -2
- package/dist/{theme.service-BOWIT_5k.js → theme.service-CSzNkqBB.js} +1 -1
- package/dist/{theme.service-BOWIT_5k.js.map → theme.service-CSzNkqBB.js.map} +1 -1
- package/dist/{theme.service-DkdH1t60.cjs → theme.service-CnFUmUpc.cjs} +1 -1
- package/dist/{theme.service-DkdH1t60.cjs.map → theme.service-CnFUmUpc.cjs.map} +1 -1
- package/dist/{utils-D2QUu4-g.cjs.map → utils-C-Q8ePtG.cjs.map} +1 -1
- package/dist/{utils-Cj_nRRyx.js.map → utils-DXE5fBBd.js.map} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/dist/{window-DMy5Gsgu.js → window-BcvDNi9D.js} +1 -1
- package/dist/{window-DMy5Gsgu.js.map → window-BcvDNi9D.js.map} +1 -1
- package/dist/{window-BMecbTzs.cjs → window-qaGFMn_4.cjs} +1 -1
- package/dist/{window-BMecbTzs.cjs.map → window-qaGFMn_4.cjs.map} +1 -1
- package/dist/window.cjs +1 -1
- package/dist/window.js +1 -1
- package/package.json +1 -1
- package/src/index.ts +8 -0
- package/src/state/index.ts +31 -9
- package/types/src/index.d.ts +1 -0
- package/dist/overlay.cjs.map +0 -1
- package/dist/overlay.js.map +0 -1
- package/dist/state-avic94Ft.cjs +0 -1
- /package/dist/agent/{flow-CvG1fLW5.js → flow-3RrZM-e7.js} +0 -0
- /package/dist/agent/{vendor-material-color-DcL7ZPxx.js → vendor-material-color-33Mj762T.js} +0 -0
- /package/dist/{overlay.confirm-body-sUmd_zVy.cjs → overlay.confirm-body-78e1WrN9.cjs} +0 -0
- /package/dist/{overlay.confirm-body-DESGpbru.js → overlay.confirm-body-D_P2e7l6.js} +0 -0
- /package/dist/{rxjs-utils-Dv9T9IpA.js → rxjs-utils-Cs6XGwF6.js} +0 -0
- /package/dist/{rxjs-utils-BKB2UM_j.cjs → rxjs-utils-Dsj75cJy.cjs} +0 -0
- /package/dist/{splash-screen-25PTDqnp.cjs → splash-screen-BvaDkvJU.cjs} +0 -0
- /package/dist/{splash-screen-bGW_sS4i.js → splash-screen-ChMkAPLU.js} +0 -0
- /package/dist/{tabs-BVC_qn8S.js → tabs-CkDNLbiS.js} +0 -0
- /package/dist/{tabs-Dc3_Ox2B.cjs → tabs-lxQHWEb7.cjs} +0 -0
- /package/dist/{theme-button-DqiA0rJg.js → theme-button-CixloLin.js} +0 -0
- /package/dist/{theme-button-cZGRyQRK.cjs → theme-button-kMhsX5Oe.cjs} +0 -0
- /package/dist/{utils-D2QUu4-g.cjs → utils-C-Q8ePtG.cjs} +0 -0
- /package/dist/{utils-Cj_nRRyx.js → utils-DXE5fBBd.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boat-cuoSkhGI.js","names":[],"sources":["../src/boat/boat.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { styleMap } from 'lit/directives/style-map.js'\nimport { when } from 'lit/directives/when.js'\nimport { filter, finalize, fromEvent, map, merge, switchMap, takeUntil, tap } from 'rxjs'\nimport { SPRING_SMOOTH, SPRING_SNAPPY } from '../utils/animation.js'\nimport { reducedMotion$ } from '../directives/reduced-motion'\nimport { theme } from '../theme/theme.service.js'\n\nconst FAB_HEIGHT = 44\nconst DRAG_THRESHOLD = 5\nconst POSITION_STORAGE_KEY_PREFIX = 'schmancy-boat-'\n\ntype Corner = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'\ntype BoatState = 'collapsed' | 'expanded'\ninterface Position {\n\tx: number\n\ty: number\n}\n\n@customElement('schmancy-boat')\nexport default class SchmancyBoat extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: contents;\n\t\tposition: relative;\n\t\tz-index: 1000;\n\t}\n\t:host([hidden]) {\n\t\tdisplay: none !important;\n\t}\n`]\n\n\t@property({ type: String }) id: string = 'default'\n\t@property({ type: String }) icon?: string\n\t@property({ type: String }) label?: string\n\t/** Override the expanded panel width (e.g. '320px', '24rem'). Defaults to responsive sizing. */\n\t@property({ type: String }) expandedWidth?: string\n\t/** When true, uses a lower elevation shadow in the minimized (FAB) state. */\n\t@property({ type: Boolean, reflect: true }) lowered: boolean = false\n\t/** Corner the boat is anchored to. */\n\t@property({ type: String }) corner: Corner = 'bottom-right'\n\t/** Whether the panel is open. */\n\t@property({ type: Boolean, reflect: true }) open: boolean = false\n\n\t/**\n\t * State property.\n\t * Maps 'expanded' → open=true, 'collapsed' → open=false (FAB visible).\n\t */\n\tget state(): BoatState {\n\t\treturn this.open ? 'expanded' : 'collapsed'\n\t}\n\tset state(val: BoatState) {\n\t\tif (val === 'expanded') {\n\t\t\tthis.expand()\n\t\t} else {\n\t\t\t// collapsed\n\t\t\tthis.close()\n\t\t}\n\t}\n\n\t// Internal drag state (triggers re-render for cursor class)\n\t@state() private isDragging = false\n\n\t// Internal position — plain fields, updated directly during drag (no re-render needed)\n\tprivate _position: Position = { x: 16, y: 16 }\n\t@state() private _currentCorner: Corner = 'bottom-right'\n\n\t// Refs\n\tprivate _containerRef = createRef<HTMLElement>()\n\tprivate _contentRef = createRef<HTMLElement>()\n\tprivate _headerRef = createRef<HTMLElement>()\n\tprivate _currentAnimation?: Animation\n\n\t// ============================================\n\t// COMPUTED\n\t// ============================================\n\n\tprivate get panelWidth(): string {\n\t\treturn this.expandedWidth ?? 'min(360px, calc(100vw - 32px))'\n\t}\n\n\tprivate get isBottomCorner(): boolean {\n\t\treturn this._currentCorner.startsWith('bottom')\n\t}\n\n\tprivate get closedClipPath(): string {\n\t\treturn this.isBottomCorner\n\t\t\t? `inset(calc(100% - ${FAB_HEIGHT}px) 0px 0px 0px round 22px)`\n\t\t\t: `inset(0px 0px calc(100% - ${FAB_HEIGHT}px) 0px round 22px)`\n\t}\n\n\tprivate get openClipPath(): string {\n\t\treturn 'inset(0px 0px 0px 0px round 12px)'\n\t}\n\n\tprivate get elevation(): 0 | 1 | 2 | 3 | 4 | 5 {\n\t\tif (this.open) return 4\n\t\treturn this.lowered ? 1 : 3\n\t}\n\n\t// ============================================\n\t// POSITION MANAGEMENT\n\t// ============================================\n\n\tprivate _applyContainerPosition() {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\t\tcontainer.style.removeProperty('left')\n\t\tcontainer.style.removeProperty('right')\n\t\tcontainer.style.removeProperty('top')\n\t\tcontainer.style.removeProperty('bottom')\n\t\tconst { x, y } = this._position\n\t\tif (this._currentCorner.includes('right')) {\n\t\t\tcontainer.style.right = `${x}px`\n\t\t} else {\n\t\t\tcontainer.style.left = `${x}px`\n\t\t}\n\t\tif (this._currentCorner.includes('bottom')) {\n\t\t\tcontainer.style.bottom = `${y + theme.bottomOffset}px`\n\t\t} else {\n\t\t\tcontainer.style.top = `${y}px`\n\t\t}\n\t}\n\n\tprivate _loadPosition() {\n\t\ttry {\n\t\t\tconst saved = localStorage.getItem(POSITION_STORAGE_KEY_PREFIX + this.id)\n\t\t\tif (saved) {\n\t\t\t\tconst parsed = JSON.parse(saved) as { x: number; y: number; anchor: Corner }\n\t\t\t\tthis._position = { x: parsed.x, y: parsed.y }\n\t\t\t\tthis._currentCorner = parsed.anchor\n\t\t\t}\n\t\t} catch {\n\t\t\t// ignore localStorage errors\n\t\t}\n\t}\n\n\tprivate _savePosition() {\n\t\ttry {\n\t\t\tlocalStorage.setItem(\n\t\t\t\tPOSITION_STORAGE_KEY_PREFIX + this.id,\n\t\t\t\tJSON.stringify({ ...this._position, anchor: this._currentCorner }),\n\t\t\t)\n\t\t} catch {\n\t\t\t// ignore localStorage errors\n\t\t}\n\t}\n\n\tprivate _validateBounds() {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\t\tconst rect = container.getBoundingClientRect()\n\t\tif (rect.width === 0) return\n\t\tconst vw = window.innerWidth\n\t\tconst vh = window.innerHeight\n\t\tconst isRight = this._currentCorner.includes('right')\n\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\tconst actualLeft = isRight ? vw - this._position.x - rect.width : this._position.x\n\t\tconst actualTop = isBottom ? vh - this._position.y - rect.height : this._position.y\n\t\tconst newLeft = Math.max(0, Math.min(actualLeft, vw - rect.width))\n\t\tconst newTop = Math.max(0, Math.min(actualTop, vh - rect.height))\n\t\tthis._position = {\n\t\t\tx: isRight ? vw - newLeft - rect.width : newLeft,\n\t\t\ty: isBottom ? vh - newTop - rect.height : newTop,\n\t\t}\n\t\tthis._applyContainerPosition()\n\t}\n\n\n\t// ============================================\n\t// CORNER SNAPPING\n\t// ============================================\n\n\tprivate _reorientToNearestCorner(skipAnimation = false): void {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\n\t\t// F — record current screen position before DOM mutation\n\t\tconst rect = container.getBoundingClientRect()\n\n\t\t// L — calculate nearest corner using FAB visual center (container is always collapsed during drag)\n\t\tconst currentIsBottom = this._currentCorner.includes('bottom')\n\t\tconst fabCenterX = rect.left + rect.width / 2\n\t\tconst fabCenterY = currentIsBottom\n\t\t\t? rect.bottom - FAB_HEIGHT / 2\n\t\t\t: rect.top + FAB_HEIGHT / 2\n\t\tconst side = fabCenterX > window.innerWidth / 2 ? 'right' : 'left'\n\t\tconst vert = fabCenterY > window.innerHeight / 2 ? 'bottom' : 'top'\n\t\tconst newCorner: Corner = `${vert}-${side}` as Corner\n\n\t\t// Snap corner and reset offset to standard edge gap\n\t\tthis._currentCorner = newCorner\n\t\tthis._position = { x: 16, y: 16 }\n\t\tthis._applyContainerPosition()\n\t\t// Sync clip-path to new corner — managed imperatively, not via styleMap\n\t\tif (!this.open) {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t}\n\n\t\tif (skipAnimation || reducedMotion$.value) {\n\t\t\tthis._savePosition()\n\t\t\treturn\n\t\t}\n\n\t\t// I — invert: shift element back to its original visual position\n\t\tconst newRect = container.getBoundingClientRect()\n\t\tconst dx = rect.left - newRect.left\n\t\tconst dy = rect.top - newRect.top\n\t\tcontainer.style.transform = `translate(${dx}px, ${dy}px)`\n\n\t\t// P — play: animate from the inverse offset to natural resting position\n\t\tthis._currentAnimation?.cancel()\n\t\tconst anim = container.animate(\n\t\t\t[{ transform: container.style.transform }, { transform: 'translate(0,0)' }],\n\t\t\t{\n\t\t\t\tduration: SPRING_SMOOTH.duration,\n\t\t\t\teasing: SPRING_SMOOTH.easingFallback,\n\t\t\t\tfill: 'forwards',\n\t\t\t},\n\t\t)\n\t\tthis._currentAnimation = anim\n\t\tanim.finished.then(() => {\n\t\t\tif (container.isConnected) {\n\t\t\t\tcontainer.style.transform = ''\n\t\t\t}\n\t\t\treturn\n\t\t})\n\n\t\tthis._savePosition()\n\t}\n\n\t// ============================================\n\t// DRAG PIPELINE\n\t// ============================================\n\n\tprivate _setupDrag() {\n\t\tconst header = this._headerRef.value\n\t\tconst container = this._containerRef.value\n\t\tif (!header || !container) return\n\n\t\tlet didDrag = false\n\n\t\tfromEvent<PointerEvent>(header, 'pointerdown')\n\t\t\t.pipe(\n\t\t\t\tfilter(e => e.button === 0),\n\t\t\t\ttap(e => {\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\te.stopPropagation()\n\t\t\t\t\theader.setPointerCapture(e.pointerId)\n\t\t\t\t}),\n\t\t\t\tmap(e => {\n\t\t\t\t\tconst rect = container.getBoundingClientRect()\n\t\t\t\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\t\t\t\tconst wasOpen = this.open\n\t\t\t\t\tdidDrag = false\n\t\t\t\t\treturn {\n\t\t\t\t\t\tpointerId: e.pointerId,\n\t\t\t\t\t\tstartX: e.clientX,\n\t\t\t\t\t\tstartY: e.clientY,\n\t\t\t\t\t\toffsetX: e.clientX - rect.left,\n\t\t\t\t\t\toffsetY: e.clientY - rect.top,\n\t\t\t\t\t\trect,\n\t\t\t\t\t\tisBottom,\n\t\t\t\t\t\twasOpen,\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tswitchMap(({ pointerId, startX, startY, offsetX, offsetY, rect, isBottom, wasOpen }) => {\n\t\t\t\t\tconst sameId = (e: PointerEvent) => e.pointerId === pointerId\n\t\t\t\t\tconst move$ = fromEvent<PointerEvent>(window, 'pointermove').pipe(filter(sameId))\n\t\t\t\t\tconst end$ = merge(\n\t\t\t\t\t\tfromEvent<PointerEvent>(window, 'pointerup'),\n\t\t\t\t\t\tfromEvent<PointerEvent>(window, 'pointercancel'),\n\t\t\t\t\t).pipe(filter(sameId))\n\n\t\t\t\t\treturn move$.pipe(\n\t\t\t\t\t\ttap(({ clientX, clientY }) => {\n\t\t\t\t\t\t\tconst dx = clientX - startX\n\t\t\t\t\t\t\tconst dy = clientY - startY\n\t\t\t\t\t\t\tif (Math.sqrt(dx * dx + dy * dy) > DRAG_THRESHOLD && !didDrag) {\n\t\t\t\t\t\t\t\tdidDrag = true\n\t\t\t\t\t\t\t\tthis.isDragging = true\n\t\t\t\t\t\t\t\t// Collapse on first confirmed drag move (not on click)\n\t\t\t\t\t\t\t\tif (wasOpen) {\n\t\t\t\t\t\t\t\t\tthis._currentAnimation?.cancel()\n\t\t\t\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\t\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\t\t\t\t\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\t\t\t\t\t\t\tconst content = this._contentRef.value\n\t\t\t\t\t\t\t\t\tif (content) {\n\t\t\t\t\t\t\t\t\t\tcontent.inert = true\n\t\t\t\t\t\t\t\t\t\tcontent.style.visibility = 'hidden'\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}\n\t\t\t\t\t\t\tif (!didDrag) return\n\n\t\t\t\t\t\t\tconst vw = window.innerWidth\n\t\t\t\t\t\t\tconst vh = window.innerHeight\n\t\t\t\t\t\t\tconst left = Math.max(0, Math.min(clientX - offsetX, vw - rect.width))\n\t\t\t\t\t\t\t// Allow container to go partially off-screen so FAB stays reachable at all edges\n\t\t\t\t\t\t\tconst minTop = isBottom ? FAB_HEIGHT - rect.height : 0\n\t\t\t\t\t\t\tconst maxTop = isBottom ? vh - rect.height : vh - FAB_HEIGHT\n\t\t\t\t\t\t\tconst top = Math.max(minTop, Math.min(clientY - offsetY, maxTop))\n\n\t\t\t\t\t\t\tthis._position = {\n\t\t\t\t\t\t\t\tx: this._currentCorner.includes('right') ? vw - left - rect.width : left,\n\t\t\t\t\t\t\t\ty: isBottom ? vh - top - rect.height : top,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis._applyContainerPosition()\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttakeUntil(end$),\n\t\t\t\t\t\tfinalize(() => {\n\t\t\t\t\t\t\tif (didDrag) {\n\t\t\t\t\t\t\t\tthis._reorientToNearestCorner()\n\t\t\t\t\t\t\t\tthis.isDragging = false\n\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.isDragging = false\n\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t\tthis.toggle()\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\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t// ============================================\n\t// LIFECYCLE\n\t// ============================================\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tfromEvent(window, 'resize')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(() => this._validateBounds())\n\n\t\ttheme.bottomOffset$.pipe(\n\t\t\ttap(() => this._applyContainerPosition()),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\t}\n\n\tfirstUpdated() {\n\t\t// Initialize corner from property\n\t\tthis._currentCorner = this.corner\n\n\t\t// Load saved drag position from localStorage\n\t\tthis._loadPosition()\n\n\t\tconst container = this._containerRef.value\n\t\tconst content = this._contentRef.value\n\t\tif (!container) return\n\n\t\t// Apply initial position\n\t\tthis._applyContainerPosition()\n\n\t\t// Set initial open/closed visual state\n\t\tif (this.open) {\n\t\t\tcontainer.style.overflow = ''\n\t\t\tif (content) {\n\t\t\t\tcontent.inert = false\n\t\t\t\tcontent.style.visibility = 'visible'\n\t\t\t}\n\t\t} else {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\tif (content) {\n\t\t\t\tcontent.inert = true\n\t\t\t\tcontent.style.visibility = 'hidden'\n\t\t\t}\n\t\t}\n\n\t\t// Set up drag\n\t\tthis._setupDrag()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis._currentAnimation?.cancel()\n\t}\n\n\t// ============================================\n\t// ANIMATION\n\t// ============================================\n\n\tprivate async _animateOpen(): Promise<void> {\n\t\tconst container = this._containerRef.value\n\t\tconst content = this._contentRef.value\n\t\tif (!container) return\n\n\t\tif (content) {\n\t\t\tcontent.style.visibility = 'visible'\n\t\t\tcontent.inert = false\n\t\t}\n\n\t\tthis.open = true\n\t\tawait this.updateComplete\n\n\t\tif (reducedMotion$.value) {\n\t\t\tcontainer.style.clipPath = ''\n\t\t\tcontainer.style.overflow = ''\n\t\t\tthis.dispatchScopedEvent('toggle', 'expanded')\n\t\t\treturn\n\t\t}\n\n\t\tthis._currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\n\t\tconst openKeyframes: Keyframe[] = [\n\t\t\t{ clipPath: this.closedClipPath, opacity: 0.95 },\n\t\t\t{ clipPath: this.openClipPath, opacity: 1 },\n\t\t]\n\t\tconst anim = container.animate(openKeyframes, {\n\t\t\tduration: SPRING_SMOOTH.duration,\n\t\t\teasing: SPRING_SMOOTH.easingFallback,\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tthis._currentAnimation = anim\n\n\t\t// Clear clip-path so overflow/scroll work normally after animation\n\t\tanim.finished.then(() => {\n\t\t\tif (container.isConnected) {\n\t\t\t\tcontainer.style.clipPath = ''\n\t\t\t\tcontainer.style.overflow = ''\n\t\t\t}\n\t\t\treturn\n\t\t})\n\n\t\tthis.dispatchScopedEvent('toggle', 'expanded')\n\t}\n\n\tprivate async _animateClose(): Promise<void> {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\n\t\tif (reducedMotion$.value) {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\tthis.open = false\n\t\t\tconst content = this._contentRef.value\n\t\t\tif (content) {\n\t\t\t\tcontent.inert = true\n\t\t\t\tcontent.style.visibility = 'hidden'\n\t\t\t}\n\t\t\tthis.dispatchScopedEvent('toggle', 'collapsed')\n\t\t\treturn\n\t\t}\n\n\t\tthis._currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\n\t\tconst closeKeyframes: Keyframe[] = [\n\t\t\t{ clipPath: this.openClipPath, opacity: 1 },\n\t\t\t{ clipPath: this.closedClipPath, opacity: 0.95 },\n\t\t]\n\t\tconst anim = container.animate(closeKeyframes, {\n\t\t\tduration: Math.round(SPRING_SNAPPY.duration * 0.9),\n\t\t\teasing: 'cubic-bezier(0.4, 0, 0.8, 0.15)',\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tthis._currentAnimation = anim\n\n\t\tawait anim.finished\n\n\t\tthis.open = false\n\n\t\tconst content = this._contentRef.value\n\t\tif (content) {\n\t\t\tcontent.inert = true\n\t\t\tcontent.style.visibility = 'hidden'\n\t\t}\n\n\t\tthis.dispatchScopedEvent('toggle', 'collapsed')\n\t}\n\n\t// ============================================\n\t// PUBLIC API\n\t// ============================================\n\n\ttoggle() {\n\t\tif (this.open) this._animateClose()\n\t\telse this._animateOpen()\n\t}\n\n\texpand() {\n\t\tif (this.open) return\n\t\tthis.removeAttribute('hidden')\n\t\tif (!this._containerRef.value) {\n\t\t\tthis.open = true\n\t\t\treturn\n\t\t}\n\t\tthis._animateOpen()\n\t}\n\n\t/** Alias for expand() — kept for backwards compatibility. */\n\tshow() {\n\t\tthis.expand()\n\t}\n\n\tclose() {\n\t\tif (!this.open) return\n\t\tif (!this._containerRef.value) {\n\t\t\tthis.open = false\n\t\t\treturn\n\t\t}\n\t\tthis._animateClose()\n\t}\n\n\t// ============================================\n\t// RENDER\n\t// ============================================\n\n\tprotected render(): unknown {\n\t\tconst isBottom = this._currentCorner.startsWith('bottom')\n\n\t\tconst containerClasses = classMap({\n\t\t\tflex: true,\n\t\t\t'flex-col': isBottom,\n\t\t\t'flex-col-reverse': !isBottom,\n\t\t\t'will-change-[clip-path]': true,\n\t\t\t'z-1000': true,\n\t\t\t'rounded-2xl': this.open,\n\t\t\t'rounded-[22px]': !this.open,\n\t\t\t'overflow-hidden': true,\n\t\t\t'opacity-95': this.isDragging,\n\t\t})\n\n\t\tconst containerStyles = styleMap({\n\t\t\tposition: 'fixed',\n\t\t\twidth: this.panelWidth,\n\t\t\t'max-height': 'calc(100vh - 32px)',\n\t\t\t'pointer-events': 'none',\n\t\t})\n\n\t\tconst contentStyles = styleMap({\n\t\t\t'pointer-events': this.open ? 'auto' : 'none',\n\t\t})\n\n\t\tconst headerClasses = classMap({\n\t\t\t'h-full': true,\n\t\t\t'px-3': true,\n\t\t\tflex: true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t'select-none': true,\n\t\t\t'touch-none': true,\n\t\t\t'cursor-grabbing': this.isDragging,\n\t\t\t'cursor-move': !this.isDragging,\n\t\t\t'transition-opacity': true,\n\t\t\t'duration-200': true,\n\t\t})\n\n\t\treturn html`\n\t\t\t<!-- schmancy-surface owns background color and elevation-based shadow.\n\t\t\t Position is managed imperatively via _applyContainerPosition(). -->\n\t\t\t<schmancy-surface\n\t\t\t\t${ref(this._containerRef)}\n\t\t\t\ttype=\"glass\"\n\t\t\t\t.elevation=${this.elevation}\n\t\t\t\tclass=${containerClasses}\n\t\t\t\tstyle=${containerStyles}\n\t\t\t\taria-expanded=${this.open}\n\t\t\t>\n\t\t\t\t<!-- Content section (visually above header for bottom corners) -->\n\t\t\t\t<section\n\t\t\t\t\t${ref(this._contentRef)}\n\t\t\t\t\tclass=\"flex-1 min-h-0 overflow-hidden flex flex-col\"\n\t\t\t\t\tstyle=${contentStyles}\n\t\t\t\t\trole=\"dialog\"\n\t\t\t\t\taria-label=\"${this.label ?? 'Floating panel'}\"\n\t\t\t\t>\n\t\t\t\t\t<schmancy-surface type=\"solid\" class=\"flex flex-col flex-1 min-h-0 overflow-hidden\">\n\t\t\t\t\t\t<schmancy-scroll hide class=\"flex-1\">\n\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t</schmancy-scroll>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</section>\n\n\t\t\t\t<!-- Gradient separator between header and content — only when open -->\n\t\t\t\t${when(\n\t\t\t\t\tthis.open,\n\t\t\t\t\t() =>\n\t\t\t\t\t\thtml`<div\n\t\t\t\t\t\t\tclass=\"h-px shrink-0 bg-linear-to-r from-transparent via-primary-default/30 to-transparent\"\n\t\t\t\t\t\t></div>`,\n\t\t\t\t)}\n\n\t\t\t\t<!-- Header / FAB section — always interactive, always visible -->\n\t\t\t\t<section\n\t\t\t\t\tclass=\"shrink-0 bg-surface-containerLowest\"\n\t\t\t\t\tstyle=${styleMap({ 'pointer-events': 'auto', height: `${FAB_HEIGHT}px` })}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\t${ref(this._headerRef)}\n\t\t\t\t\t\tclass=${headerClasses}\n\t\t\t\t\t\ttitle=\"Drag to move\"\n\t\t\t\t\t\taria-label=\"Drag to reposition panel\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<!-- Summary slot rendered once — avoids DOM teardown on toggle -->\n\t\t\t\t\t\t<div class=\"flex-1 min-w-0\">\n\t\t\t\t\t\t\t<slot name=\"summary\"></slot>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<!-- Toggle button: collapse when open, expand when closed -->\n\t\t\t\t\t\t${when(\n\t\t\t\t\t\t\tthis.open,\n\t\t\t\t\t\t\t() => html`\n\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tvariant=\"text\"\n\t\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\t\tthis.close()\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\ttitle=\"Collapse\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tclose_fullscreen\n\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t\t() => html`\n\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tvariant=\"text\"\n\t\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\t\tthis.expand()\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\ttitle=\"Expand\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\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A,WAAA,kBAAA,KAAA,EAAA;AAAA,IAAA,IAAA,IAAA,EAAA,CA9CR,EAAc,gBAAA,CAAA,EAAgB,EAAA;AAAA,SAAA,KAAA"}
|
|
1
|
+
{"version":3,"file":"boat-CNWIQPA1.js","names":[],"sources":["../src/boat/boat.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { styleMap } from 'lit/directives/style-map.js'\nimport { when } from 'lit/directives/when.js'\nimport { filter, finalize, fromEvent, map, merge, switchMap, takeUntil, tap } from 'rxjs'\nimport { SPRING_SMOOTH, SPRING_SNAPPY } from '../utils/animation.js'\nimport { reducedMotion$ } from '../directives/reduced-motion'\nimport { theme } from '../theme/theme.service.js'\n\nconst FAB_HEIGHT = 44\nconst DRAG_THRESHOLD = 5\nconst POSITION_STORAGE_KEY_PREFIX = 'schmancy-boat-'\n\ntype Corner = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'\ntype BoatState = 'collapsed' | 'expanded'\ninterface Position {\n\tx: number\n\ty: number\n}\n\n@customElement('schmancy-boat')\nexport default class SchmancyBoat extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: contents;\n\t\tposition: relative;\n\t\tz-index: 1000;\n\t}\n\t:host([hidden]) {\n\t\tdisplay: none !important;\n\t}\n`]\n\n\t@property({ type: String }) id: string = 'default'\n\t@property({ type: String }) icon?: string\n\t@property({ type: String }) label?: string\n\t/** Override the expanded panel width (e.g. '320px', '24rem'). Defaults to responsive sizing. */\n\t@property({ type: String }) expandedWidth?: string\n\t/** When true, uses a lower elevation shadow in the minimized (FAB) state. */\n\t@property({ type: Boolean, reflect: true }) lowered: boolean = false\n\t/** Corner the boat is anchored to. */\n\t@property({ type: String }) corner: Corner = 'bottom-right'\n\t/** Whether the panel is open. */\n\t@property({ type: Boolean, reflect: true }) open: boolean = false\n\n\t/**\n\t * State property.\n\t * Maps 'expanded' → open=true, 'collapsed' → open=false (FAB visible).\n\t */\n\tget state(): BoatState {\n\t\treturn this.open ? 'expanded' : 'collapsed'\n\t}\n\tset state(val: BoatState) {\n\t\tif (val === 'expanded') {\n\t\t\tthis.expand()\n\t\t} else {\n\t\t\t// collapsed\n\t\t\tthis.close()\n\t\t}\n\t}\n\n\t// Internal drag state (triggers re-render for cursor class)\n\t@state() private isDragging = false\n\n\t// Internal position — plain fields, updated directly during drag (no re-render needed)\n\tprivate _position: Position = { x: 16, y: 16 }\n\t@state() private _currentCorner: Corner = 'bottom-right'\n\n\t// Refs\n\tprivate _containerRef = createRef<HTMLElement>()\n\tprivate _contentRef = createRef<HTMLElement>()\n\tprivate _headerRef = createRef<HTMLElement>()\n\tprivate _currentAnimation?: Animation\n\n\t// ============================================\n\t// COMPUTED\n\t// ============================================\n\n\tprivate get panelWidth(): string {\n\t\treturn this.expandedWidth ?? 'min(360px, calc(100vw - 32px))'\n\t}\n\n\tprivate get isBottomCorner(): boolean {\n\t\treturn this._currentCorner.startsWith('bottom')\n\t}\n\n\tprivate get closedClipPath(): string {\n\t\treturn this.isBottomCorner\n\t\t\t? `inset(calc(100% - ${FAB_HEIGHT}px) 0px 0px 0px round 22px)`\n\t\t\t: `inset(0px 0px calc(100% - ${FAB_HEIGHT}px) 0px round 22px)`\n\t}\n\n\tprivate get openClipPath(): string {\n\t\treturn 'inset(0px 0px 0px 0px round 12px)'\n\t}\n\n\tprivate get elevation(): 0 | 1 | 2 | 3 | 4 | 5 {\n\t\tif (this.open) return 4\n\t\treturn this.lowered ? 1 : 3\n\t}\n\n\t// ============================================\n\t// POSITION MANAGEMENT\n\t// ============================================\n\n\tprivate _applyContainerPosition() {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\t\tcontainer.style.removeProperty('left')\n\t\tcontainer.style.removeProperty('right')\n\t\tcontainer.style.removeProperty('top')\n\t\tcontainer.style.removeProperty('bottom')\n\t\tconst { x, y } = this._position\n\t\tif (this._currentCorner.includes('right')) {\n\t\t\tcontainer.style.right = `${x}px`\n\t\t} else {\n\t\t\tcontainer.style.left = `${x}px`\n\t\t}\n\t\tif (this._currentCorner.includes('bottom')) {\n\t\t\tcontainer.style.bottom = `${y + theme.bottomOffset}px`\n\t\t} else {\n\t\t\tcontainer.style.top = `${y}px`\n\t\t}\n\t}\n\n\tprivate _loadPosition() {\n\t\ttry {\n\t\t\tconst saved = localStorage.getItem(POSITION_STORAGE_KEY_PREFIX + this.id)\n\t\t\tif (saved) {\n\t\t\t\tconst parsed = JSON.parse(saved) as { x: number; y: number; anchor: Corner }\n\t\t\t\tthis._position = { x: parsed.x, y: parsed.y }\n\t\t\t\tthis._currentCorner = parsed.anchor\n\t\t\t}\n\t\t} catch {\n\t\t\t// ignore localStorage errors\n\t\t}\n\t}\n\n\tprivate _savePosition() {\n\t\ttry {\n\t\t\tlocalStorage.setItem(\n\t\t\t\tPOSITION_STORAGE_KEY_PREFIX + this.id,\n\t\t\t\tJSON.stringify({ ...this._position, anchor: this._currentCorner }),\n\t\t\t)\n\t\t} catch {\n\t\t\t// ignore localStorage errors\n\t\t}\n\t}\n\n\tprivate _validateBounds() {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\t\tconst rect = container.getBoundingClientRect()\n\t\tif (rect.width === 0) return\n\t\tconst vw = window.innerWidth\n\t\tconst vh = window.innerHeight\n\t\tconst isRight = this._currentCorner.includes('right')\n\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\tconst actualLeft = isRight ? vw - this._position.x - rect.width : this._position.x\n\t\tconst actualTop = isBottom ? vh - this._position.y - rect.height : this._position.y\n\t\tconst newLeft = Math.max(0, Math.min(actualLeft, vw - rect.width))\n\t\tconst newTop = Math.max(0, Math.min(actualTop, vh - rect.height))\n\t\tthis._position = {\n\t\t\tx: isRight ? vw - newLeft - rect.width : newLeft,\n\t\t\ty: isBottom ? vh - newTop - rect.height : newTop,\n\t\t}\n\t\tthis._applyContainerPosition()\n\t}\n\n\n\t// ============================================\n\t// CORNER SNAPPING\n\t// ============================================\n\n\tprivate _reorientToNearestCorner(skipAnimation = false): void {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\n\t\t// F — record current screen position before DOM mutation\n\t\tconst rect = container.getBoundingClientRect()\n\n\t\t// L — calculate nearest corner using FAB visual center (container is always collapsed during drag)\n\t\tconst currentIsBottom = this._currentCorner.includes('bottom')\n\t\tconst fabCenterX = rect.left + rect.width / 2\n\t\tconst fabCenterY = currentIsBottom\n\t\t\t? rect.bottom - FAB_HEIGHT / 2\n\t\t\t: rect.top + FAB_HEIGHT / 2\n\t\tconst side = fabCenterX > window.innerWidth / 2 ? 'right' : 'left'\n\t\tconst vert = fabCenterY > window.innerHeight / 2 ? 'bottom' : 'top'\n\t\tconst newCorner: Corner = `${vert}-${side}` as Corner\n\n\t\t// Snap corner and reset offset to standard edge gap\n\t\tthis._currentCorner = newCorner\n\t\tthis._position = { x: 16, y: 16 }\n\t\tthis._applyContainerPosition()\n\t\t// Sync clip-path to new corner — managed imperatively, not via styleMap\n\t\tif (!this.open) {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t}\n\n\t\tif (skipAnimation || reducedMotion$.value) {\n\t\t\tthis._savePosition()\n\t\t\treturn\n\t\t}\n\n\t\t// I — invert: shift element back to its original visual position\n\t\tconst newRect = container.getBoundingClientRect()\n\t\tconst dx = rect.left - newRect.left\n\t\tconst dy = rect.top - newRect.top\n\t\tcontainer.style.transform = `translate(${dx}px, ${dy}px)`\n\n\t\t// P — play: animate from the inverse offset to natural resting position\n\t\tthis._currentAnimation?.cancel()\n\t\tconst anim = container.animate(\n\t\t\t[{ transform: container.style.transform }, { transform: 'translate(0,0)' }],\n\t\t\t{\n\t\t\t\tduration: SPRING_SMOOTH.duration,\n\t\t\t\teasing: SPRING_SMOOTH.easingFallback,\n\t\t\t\tfill: 'forwards',\n\t\t\t},\n\t\t)\n\t\tthis._currentAnimation = anim\n\t\tanim.finished.then(() => {\n\t\t\tif (container.isConnected) {\n\t\t\t\tcontainer.style.transform = ''\n\t\t\t}\n\t\t\treturn\n\t\t})\n\n\t\tthis._savePosition()\n\t}\n\n\t// ============================================\n\t// DRAG PIPELINE\n\t// ============================================\n\n\tprivate _setupDrag() {\n\t\tconst header = this._headerRef.value\n\t\tconst container = this._containerRef.value\n\t\tif (!header || !container) return\n\n\t\tlet didDrag = false\n\n\t\tfromEvent<PointerEvent>(header, 'pointerdown')\n\t\t\t.pipe(\n\t\t\t\tfilter(e => e.button === 0),\n\t\t\t\ttap(e => {\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\te.stopPropagation()\n\t\t\t\t\theader.setPointerCapture(e.pointerId)\n\t\t\t\t}),\n\t\t\t\tmap(e => {\n\t\t\t\t\tconst rect = container.getBoundingClientRect()\n\t\t\t\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\t\t\t\tconst wasOpen = this.open\n\t\t\t\t\tdidDrag = false\n\t\t\t\t\treturn {\n\t\t\t\t\t\tpointerId: e.pointerId,\n\t\t\t\t\t\tstartX: e.clientX,\n\t\t\t\t\t\tstartY: e.clientY,\n\t\t\t\t\t\toffsetX: e.clientX - rect.left,\n\t\t\t\t\t\toffsetY: e.clientY - rect.top,\n\t\t\t\t\t\trect,\n\t\t\t\t\t\tisBottom,\n\t\t\t\t\t\twasOpen,\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tswitchMap(({ pointerId, startX, startY, offsetX, offsetY, rect, isBottom, wasOpen }) => {\n\t\t\t\t\tconst sameId = (e: PointerEvent) => e.pointerId === pointerId\n\t\t\t\t\tconst move$ = fromEvent<PointerEvent>(window, 'pointermove').pipe(filter(sameId))\n\t\t\t\t\tconst end$ = merge(\n\t\t\t\t\t\tfromEvent<PointerEvent>(window, 'pointerup'),\n\t\t\t\t\t\tfromEvent<PointerEvent>(window, 'pointercancel'),\n\t\t\t\t\t).pipe(filter(sameId))\n\n\t\t\t\t\treturn move$.pipe(\n\t\t\t\t\t\ttap(({ clientX, clientY }) => {\n\t\t\t\t\t\t\tconst dx = clientX - startX\n\t\t\t\t\t\t\tconst dy = clientY - startY\n\t\t\t\t\t\t\tif (Math.sqrt(dx * dx + dy * dy) > DRAG_THRESHOLD && !didDrag) {\n\t\t\t\t\t\t\t\tdidDrag = true\n\t\t\t\t\t\t\t\tthis.isDragging = true\n\t\t\t\t\t\t\t\t// Collapse on first confirmed drag move (not on click)\n\t\t\t\t\t\t\t\tif (wasOpen) {\n\t\t\t\t\t\t\t\t\tthis._currentAnimation?.cancel()\n\t\t\t\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\t\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\t\t\t\t\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\t\t\t\t\t\t\tconst content = this._contentRef.value\n\t\t\t\t\t\t\t\t\tif (content) {\n\t\t\t\t\t\t\t\t\t\tcontent.inert = true\n\t\t\t\t\t\t\t\t\t\tcontent.style.visibility = 'hidden'\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}\n\t\t\t\t\t\t\tif (!didDrag) return\n\n\t\t\t\t\t\t\tconst vw = window.innerWidth\n\t\t\t\t\t\t\tconst vh = window.innerHeight\n\t\t\t\t\t\t\tconst left = Math.max(0, Math.min(clientX - offsetX, vw - rect.width))\n\t\t\t\t\t\t\t// Allow container to go partially off-screen so FAB stays reachable at all edges\n\t\t\t\t\t\t\tconst minTop = isBottom ? FAB_HEIGHT - rect.height : 0\n\t\t\t\t\t\t\tconst maxTop = isBottom ? vh - rect.height : vh - FAB_HEIGHT\n\t\t\t\t\t\t\tconst top = Math.max(minTop, Math.min(clientY - offsetY, maxTop))\n\n\t\t\t\t\t\t\tthis._position = {\n\t\t\t\t\t\t\t\tx: this._currentCorner.includes('right') ? vw - left - rect.width : left,\n\t\t\t\t\t\t\t\ty: isBottom ? vh - top - rect.height : top,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis._applyContainerPosition()\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttakeUntil(end$),\n\t\t\t\t\t\tfinalize(() => {\n\t\t\t\t\t\t\tif (didDrag) {\n\t\t\t\t\t\t\t\tthis._reorientToNearestCorner()\n\t\t\t\t\t\t\t\tthis.isDragging = false\n\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.isDragging = false\n\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t\tthis.toggle()\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\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t// ============================================\n\t// LIFECYCLE\n\t// ============================================\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tfromEvent(window, 'resize')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(() => this._validateBounds())\n\n\t\ttheme.bottomOffset$.pipe(\n\t\t\ttap(() => this._applyContainerPosition()),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\t}\n\n\tfirstUpdated() {\n\t\t// Initialize corner from property\n\t\tthis._currentCorner = this.corner\n\n\t\t// Load saved drag position from localStorage\n\t\tthis._loadPosition()\n\n\t\tconst container = this._containerRef.value\n\t\tconst content = this._contentRef.value\n\t\tif (!container) return\n\n\t\t// Apply initial position\n\t\tthis._applyContainerPosition()\n\n\t\t// Set initial open/closed visual state\n\t\tif (this.open) {\n\t\t\tcontainer.style.overflow = ''\n\t\t\tif (content) {\n\t\t\t\tcontent.inert = false\n\t\t\t\tcontent.style.visibility = 'visible'\n\t\t\t}\n\t\t} else {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\tif (content) {\n\t\t\t\tcontent.inert = true\n\t\t\t\tcontent.style.visibility = 'hidden'\n\t\t\t}\n\t\t}\n\n\t\t// Set up drag\n\t\tthis._setupDrag()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis._currentAnimation?.cancel()\n\t}\n\n\t// ============================================\n\t// ANIMATION\n\t// ============================================\n\n\tprivate async _animateOpen(): Promise<void> {\n\t\tconst container = this._containerRef.value\n\t\tconst content = this._contentRef.value\n\t\tif (!container) return\n\n\t\tif (content) {\n\t\t\tcontent.style.visibility = 'visible'\n\t\t\tcontent.inert = false\n\t\t}\n\n\t\tthis.open = true\n\t\tawait this.updateComplete\n\n\t\tif (reducedMotion$.value) {\n\t\t\tcontainer.style.clipPath = ''\n\t\t\tcontainer.style.overflow = ''\n\t\t\tthis.dispatchScopedEvent('toggle', 'expanded')\n\t\t\treturn\n\t\t}\n\n\t\tthis._currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\n\t\tconst openKeyframes: Keyframe[] = [\n\t\t\t{ clipPath: this.closedClipPath, opacity: 0.95 },\n\t\t\t{ clipPath: this.openClipPath, opacity: 1 },\n\t\t]\n\t\tconst anim = container.animate(openKeyframes, {\n\t\t\tduration: SPRING_SMOOTH.duration,\n\t\t\teasing: SPRING_SMOOTH.easingFallback,\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tthis._currentAnimation = anim\n\n\t\t// Clear clip-path so overflow/scroll work normally after animation\n\t\tanim.finished.then(() => {\n\t\t\tif (container.isConnected) {\n\t\t\t\tcontainer.style.clipPath = ''\n\t\t\t\tcontainer.style.overflow = ''\n\t\t\t}\n\t\t\treturn\n\t\t})\n\n\t\tthis.dispatchScopedEvent('toggle', 'expanded')\n\t}\n\n\tprivate async _animateClose(): Promise<void> {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\n\t\tif (reducedMotion$.value) {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\tthis.open = false\n\t\t\tconst content = this._contentRef.value\n\t\t\tif (content) {\n\t\t\t\tcontent.inert = true\n\t\t\t\tcontent.style.visibility = 'hidden'\n\t\t\t}\n\t\t\tthis.dispatchScopedEvent('toggle', 'collapsed')\n\t\t\treturn\n\t\t}\n\n\t\tthis._currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\n\t\tconst closeKeyframes: Keyframe[] = [\n\t\t\t{ clipPath: this.openClipPath, opacity: 1 },\n\t\t\t{ clipPath: this.closedClipPath, opacity: 0.95 },\n\t\t]\n\t\tconst anim = container.animate(closeKeyframes, {\n\t\t\tduration: Math.round(SPRING_SNAPPY.duration * 0.9),\n\t\t\teasing: 'cubic-bezier(0.4, 0, 0.8, 0.15)',\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tthis._currentAnimation = anim\n\n\t\tawait anim.finished\n\n\t\tthis.open = false\n\n\t\tconst content = this._contentRef.value\n\t\tif (content) {\n\t\t\tcontent.inert = true\n\t\t\tcontent.style.visibility = 'hidden'\n\t\t}\n\n\t\tthis.dispatchScopedEvent('toggle', 'collapsed')\n\t}\n\n\t// ============================================\n\t// PUBLIC API\n\t// ============================================\n\n\ttoggle() {\n\t\tif (this.open) this._animateClose()\n\t\telse this._animateOpen()\n\t}\n\n\texpand() {\n\t\tif (this.open) return\n\t\tthis.removeAttribute('hidden')\n\t\tif (!this._containerRef.value) {\n\t\t\tthis.open = true\n\t\t\treturn\n\t\t}\n\t\tthis._animateOpen()\n\t}\n\n\t/** Alias for expand() — kept for backwards compatibility. */\n\tshow() {\n\t\tthis.expand()\n\t}\n\n\tclose() {\n\t\tif (!this.open) return\n\t\tif (!this._containerRef.value) {\n\t\t\tthis.open = false\n\t\t\treturn\n\t\t}\n\t\tthis._animateClose()\n\t}\n\n\t// ============================================\n\t// RENDER\n\t// ============================================\n\n\tprotected render(): unknown {\n\t\tconst isBottom = this._currentCorner.startsWith('bottom')\n\n\t\tconst containerClasses = classMap({\n\t\t\tflex: true,\n\t\t\t'flex-col': isBottom,\n\t\t\t'flex-col-reverse': !isBottom,\n\t\t\t'will-change-[clip-path]': true,\n\t\t\t'z-1000': true,\n\t\t\t'rounded-2xl': this.open,\n\t\t\t'rounded-[22px]': !this.open,\n\t\t\t'overflow-hidden': true,\n\t\t\t'opacity-95': this.isDragging,\n\t\t})\n\n\t\tconst containerStyles = styleMap({\n\t\t\tposition: 'fixed',\n\t\t\twidth: this.panelWidth,\n\t\t\t'max-height': 'calc(100vh - 32px)',\n\t\t\t'pointer-events': 'none',\n\t\t})\n\n\t\tconst contentStyles = styleMap({\n\t\t\t'pointer-events': this.open ? 'auto' : 'none',\n\t\t})\n\n\t\tconst headerClasses = classMap({\n\t\t\t'h-full': true,\n\t\t\t'px-3': true,\n\t\t\tflex: true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t'select-none': true,\n\t\t\t'touch-none': true,\n\t\t\t'cursor-grabbing': this.isDragging,\n\t\t\t'cursor-move': !this.isDragging,\n\t\t\t'transition-opacity': true,\n\t\t\t'duration-200': true,\n\t\t})\n\n\t\treturn html`\n\t\t\t<!-- schmancy-surface owns background color and elevation-based shadow.\n\t\t\t Position is managed imperatively via _applyContainerPosition(). -->\n\t\t\t<schmancy-surface\n\t\t\t\t${ref(this._containerRef)}\n\t\t\t\ttype=\"glass\"\n\t\t\t\t.elevation=${this.elevation}\n\t\t\t\tclass=${containerClasses}\n\t\t\t\tstyle=${containerStyles}\n\t\t\t\taria-expanded=${this.open}\n\t\t\t>\n\t\t\t\t<!-- Content section (visually above header for bottom corners) -->\n\t\t\t\t<section\n\t\t\t\t\t${ref(this._contentRef)}\n\t\t\t\t\tclass=\"flex-1 min-h-0 overflow-hidden flex flex-col\"\n\t\t\t\t\tstyle=${contentStyles}\n\t\t\t\t\trole=\"dialog\"\n\t\t\t\t\taria-label=\"${this.label ?? 'Floating panel'}\"\n\t\t\t\t>\n\t\t\t\t\t<schmancy-surface type=\"solid\" class=\"flex flex-col flex-1 min-h-0 overflow-hidden\">\n\t\t\t\t\t\t<schmancy-scroll hide class=\"flex-1\">\n\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t</schmancy-scroll>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</section>\n\n\t\t\t\t<!-- Gradient separator between header and content — only when open -->\n\t\t\t\t${when(\n\t\t\t\t\tthis.open,\n\t\t\t\t\t() =>\n\t\t\t\t\t\thtml`<div\n\t\t\t\t\t\t\tclass=\"h-px shrink-0 bg-linear-to-r from-transparent via-primary-default/30 to-transparent\"\n\t\t\t\t\t\t></div>`,\n\t\t\t\t)}\n\n\t\t\t\t<!-- Header / FAB section — always interactive, always visible -->\n\t\t\t\t<section\n\t\t\t\t\tclass=\"shrink-0 bg-surface-containerLowest\"\n\t\t\t\t\tstyle=${styleMap({ 'pointer-events': 'auto', height: `${FAB_HEIGHT}px` })}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\t${ref(this._headerRef)}\n\t\t\t\t\t\tclass=${headerClasses}\n\t\t\t\t\t\ttitle=\"Drag to move\"\n\t\t\t\t\t\taria-label=\"Drag to reposition panel\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<!-- Summary slot rendered once — avoids DOM teardown on toggle -->\n\t\t\t\t\t\t<div class=\"flex-1 min-w-0\">\n\t\t\t\t\t\t\t<slot name=\"summary\"></slot>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<!-- Toggle button: collapse when open, expand when closed -->\n\t\t\t\t\t\t${when(\n\t\t\t\t\t\t\tthis.open,\n\t\t\t\t\t\t\t() => html`\n\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tvariant=\"text\"\n\t\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\t\tthis.close()\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\ttitle=\"Collapse\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tclose_fullscreen\n\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t\t() => html`\n\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tvariant=\"text\"\n\t\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\t\tthis.expand()\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\ttitle=\"Expand\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tfullscreen\n\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\t\t\t</schmancy-surface>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-boat': SchmancyBoat\n\t}\n}\n"],"mappings":";;;;;;;;;;;;AAYA,IAAM,IAAa,IAEb,IAA8B,kBAUrB,IAAA,cAA2B,EAAA;CAAA,YAAA,GAAA,GAAA;EAAA,MAAA,GAAA,EAAA,EAAA,KAAA,KAYA,WAAA,KAAA,UAAA,CAMsB,GAAA,KAAA,SAElB,gBAAA,KAAA,OAAA,CAEe,GAAA,KAAA,aAAA,CAmB9B,GAAA,KAAA,YAGA;GAAE,GAAG;GAAI,GAAG;GAAA,EAAA,KAAA,iBACA,gBAAA,KAAA,gBAGlB,GAAA,EAAA,KAAA,cACF,GAAA,EAAA,KAAA,aACD,GAAA;;CAAA;EAAA,KAAA,SAjDL,CAAC,CAAG;;;;;;;;;;;CA2BpB,IAAA,QAAI;EACH,OAAO,KAAK,OAAO,aAAa;;CAEjC,IAAA,MAAU,GAAA;EACG,AAA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,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,iBAAA,KAAA,EAAA,EAAA,EAAA,CAE1B,EAAS;CAAE,MAAM;CAAS,SAAA,CAAS;CAAA,CAAA,CAAA,EAAO,EAAA,WAAA,WAAA,KAAA,EAAA,EAAA,EAAA,CAE1C,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,UAAA,KAAA,EAAA,EAAA,EAAA,CAE1B,EAAS;CAAE,MAAM;CAAS,SAAA,CAAS;CAAA,CAAA,CAAA,EAAO,EAAA,WAAA,QAAA,KAAA,EAAA,EAAA,EAAA,CAmB1C,GAAA,CAAA,EAAO,EAAA,WAAA,cAAA,KAAA,EAAA,EAAA,EAAA,CAIP,GAAA,CAAA,EAAO,EAAA,WAAA,kBAAA,KAAA,EAAA;AAAA,IAAA,IAAA,IAAA,EAAA,CA9CR,EAAc,gBAAA,CAAA,EAAgB,EAAA;AAAA,SAAA,KAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require(`./chunk-CncqDLb2.cjs`);const e=require(`./mixins-Du9HMrIG.cjs`),t=require(`./active-host-jH3iloCR.cjs`),n=require(`./animation-CCOIW4wJ.cjs`),r=require(`./reduced-motion-Dzfp_w5x.cjs`),i=require(`./theme.service-
|
|
1
|
+
require(`./chunk-CncqDLb2.cjs`);const e=require(`./mixins-Du9HMrIG.cjs`),t=require(`./active-host-jH3iloCR.cjs`),n=require(`./animation-CCOIW4wJ.cjs`),r=require(`./reduced-motion-Dzfp_w5x.cjs`),i=require(`./theme.service-CnFUmUpc.cjs`);let a=require(`rxjs`),o=require(`lit/directives/class-map.js`),s=require(`lit/directives/style-map.js`),c=require(`lit/decorators.js`),l=require(`lit`),u=require(`lit/directives/ref.js`),d=require(`lit/directives/when.js`);var f=44,p=`schmancy-boat-`,m=class extends e.c{constructor(...e){super(...e),this.id=`default`,this.lowered=!1,this.corner=`bottom-right`,this.open=!1,this.isDragging=!1,this._position={x:16,y:16},this._currentCorner=`bottom-right`,this._containerRef=(0,u.createRef)(),this._contentRef=(0,u.createRef)(),this._headerRef=(0,u.createRef)()}static{this.styles=[l.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: contents;
|
|
4
4
|
position: relative;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boat-DN1_tyvx.cjs","names":[],"sources":["../src/boat/boat.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { styleMap } from 'lit/directives/style-map.js'\nimport { when } from 'lit/directives/when.js'\nimport { filter, finalize, fromEvent, map, merge, switchMap, takeUntil, tap } from 'rxjs'\nimport { SPRING_SMOOTH, SPRING_SNAPPY } from '../utils/animation.js'\nimport { reducedMotion$ } from '../directives/reduced-motion'\nimport { theme } from '../theme/theme.service.js'\n\nconst FAB_HEIGHT = 44\nconst DRAG_THRESHOLD = 5\nconst POSITION_STORAGE_KEY_PREFIX = 'schmancy-boat-'\n\ntype Corner = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'\ntype BoatState = 'collapsed' | 'expanded'\ninterface Position {\n\tx: number\n\ty: number\n}\n\n@customElement('schmancy-boat')\nexport default class SchmancyBoat extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: contents;\n\t\tposition: relative;\n\t\tz-index: 1000;\n\t}\n\t:host([hidden]) {\n\t\tdisplay: none !important;\n\t}\n`]\n\n\t@property({ type: String }) id: string = 'default'\n\t@property({ type: String }) icon?: string\n\t@property({ type: String }) label?: string\n\t/** Override the expanded panel width (e.g. '320px', '24rem'). Defaults to responsive sizing. */\n\t@property({ type: String }) expandedWidth?: string\n\t/** When true, uses a lower elevation shadow in the minimized (FAB) state. */\n\t@property({ type: Boolean, reflect: true }) lowered: boolean = false\n\t/** Corner the boat is anchored to. */\n\t@property({ type: String }) corner: Corner = 'bottom-right'\n\t/** Whether the panel is open. */\n\t@property({ type: Boolean, reflect: true }) open: boolean = false\n\n\t/**\n\t * State property.\n\t * Maps 'expanded' → open=true, 'collapsed' → open=false (FAB visible).\n\t */\n\tget state(): BoatState {\n\t\treturn this.open ? 'expanded' : 'collapsed'\n\t}\n\tset state(val: BoatState) {\n\t\tif (val === 'expanded') {\n\t\t\tthis.expand()\n\t\t} else {\n\t\t\t// collapsed\n\t\t\tthis.close()\n\t\t}\n\t}\n\n\t// Internal drag state (triggers re-render for cursor class)\n\t@state() private isDragging = false\n\n\t// Internal position — plain fields, updated directly during drag (no re-render needed)\n\tprivate _position: Position = { x: 16, y: 16 }\n\t@state() private _currentCorner: Corner = 'bottom-right'\n\n\t// Refs\n\tprivate _containerRef = createRef<HTMLElement>()\n\tprivate _contentRef = createRef<HTMLElement>()\n\tprivate _headerRef = createRef<HTMLElement>()\n\tprivate _currentAnimation?: Animation\n\n\t// ============================================\n\t// COMPUTED\n\t// ============================================\n\n\tprivate get panelWidth(): string {\n\t\treturn this.expandedWidth ?? 'min(360px, calc(100vw - 32px))'\n\t}\n\n\tprivate get isBottomCorner(): boolean {\n\t\treturn this._currentCorner.startsWith('bottom')\n\t}\n\n\tprivate get closedClipPath(): string {\n\t\treturn this.isBottomCorner\n\t\t\t? `inset(calc(100% - ${FAB_HEIGHT}px) 0px 0px 0px round 22px)`\n\t\t\t: `inset(0px 0px calc(100% - ${FAB_HEIGHT}px) 0px round 22px)`\n\t}\n\n\tprivate get openClipPath(): string {\n\t\treturn 'inset(0px 0px 0px 0px round 12px)'\n\t}\n\n\tprivate get elevation(): 0 | 1 | 2 | 3 | 4 | 5 {\n\t\tif (this.open) return 4\n\t\treturn this.lowered ? 1 : 3\n\t}\n\n\t// ============================================\n\t// POSITION MANAGEMENT\n\t// ============================================\n\n\tprivate _applyContainerPosition() {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\t\tcontainer.style.removeProperty('left')\n\t\tcontainer.style.removeProperty('right')\n\t\tcontainer.style.removeProperty('top')\n\t\tcontainer.style.removeProperty('bottom')\n\t\tconst { x, y } = this._position\n\t\tif (this._currentCorner.includes('right')) {\n\t\t\tcontainer.style.right = `${x}px`\n\t\t} else {\n\t\t\tcontainer.style.left = `${x}px`\n\t\t}\n\t\tif (this._currentCorner.includes('bottom')) {\n\t\t\tcontainer.style.bottom = `${y + theme.bottomOffset}px`\n\t\t} else {\n\t\t\tcontainer.style.top = `${y}px`\n\t\t}\n\t}\n\n\tprivate _loadPosition() {\n\t\ttry {\n\t\t\tconst saved = localStorage.getItem(POSITION_STORAGE_KEY_PREFIX + this.id)\n\t\t\tif (saved) {\n\t\t\t\tconst parsed = JSON.parse(saved) as { x: number; y: number; anchor: Corner }\n\t\t\t\tthis._position = { x: parsed.x, y: parsed.y }\n\t\t\t\tthis._currentCorner = parsed.anchor\n\t\t\t}\n\t\t} catch {\n\t\t\t// ignore localStorage errors\n\t\t}\n\t}\n\n\tprivate _savePosition() {\n\t\ttry {\n\t\t\tlocalStorage.setItem(\n\t\t\t\tPOSITION_STORAGE_KEY_PREFIX + this.id,\n\t\t\t\tJSON.stringify({ ...this._position, anchor: this._currentCorner }),\n\t\t\t)\n\t\t} catch {\n\t\t\t// ignore localStorage errors\n\t\t}\n\t}\n\n\tprivate _validateBounds() {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\t\tconst rect = container.getBoundingClientRect()\n\t\tif (rect.width === 0) return\n\t\tconst vw = window.innerWidth\n\t\tconst vh = window.innerHeight\n\t\tconst isRight = this._currentCorner.includes('right')\n\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\tconst actualLeft = isRight ? vw - this._position.x - rect.width : this._position.x\n\t\tconst actualTop = isBottom ? vh - this._position.y - rect.height : this._position.y\n\t\tconst newLeft = Math.max(0, Math.min(actualLeft, vw - rect.width))\n\t\tconst newTop = Math.max(0, Math.min(actualTop, vh - rect.height))\n\t\tthis._position = {\n\t\t\tx: isRight ? vw - newLeft - rect.width : newLeft,\n\t\t\ty: isBottom ? vh - newTop - rect.height : newTop,\n\t\t}\n\t\tthis._applyContainerPosition()\n\t}\n\n\n\t// ============================================\n\t// CORNER SNAPPING\n\t// ============================================\n\n\tprivate _reorientToNearestCorner(skipAnimation = false): void {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\n\t\t// F — record current screen position before DOM mutation\n\t\tconst rect = container.getBoundingClientRect()\n\n\t\t// L — calculate nearest corner using FAB visual center (container is always collapsed during drag)\n\t\tconst currentIsBottom = this._currentCorner.includes('bottom')\n\t\tconst fabCenterX = rect.left + rect.width / 2\n\t\tconst fabCenterY = currentIsBottom\n\t\t\t? rect.bottom - FAB_HEIGHT / 2\n\t\t\t: rect.top + FAB_HEIGHT / 2\n\t\tconst side = fabCenterX > window.innerWidth / 2 ? 'right' : 'left'\n\t\tconst vert = fabCenterY > window.innerHeight / 2 ? 'bottom' : 'top'\n\t\tconst newCorner: Corner = `${vert}-${side}` as Corner\n\n\t\t// Snap corner and reset offset to standard edge gap\n\t\tthis._currentCorner = newCorner\n\t\tthis._position = { x: 16, y: 16 }\n\t\tthis._applyContainerPosition()\n\t\t// Sync clip-path to new corner — managed imperatively, not via styleMap\n\t\tif (!this.open) {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t}\n\n\t\tif (skipAnimation || reducedMotion$.value) {\n\t\t\tthis._savePosition()\n\t\t\treturn\n\t\t}\n\n\t\t// I — invert: shift element back to its original visual position\n\t\tconst newRect = container.getBoundingClientRect()\n\t\tconst dx = rect.left - newRect.left\n\t\tconst dy = rect.top - newRect.top\n\t\tcontainer.style.transform = `translate(${dx}px, ${dy}px)`\n\n\t\t// P — play: animate from the inverse offset to natural resting position\n\t\tthis._currentAnimation?.cancel()\n\t\tconst anim = container.animate(\n\t\t\t[{ transform: container.style.transform }, { transform: 'translate(0,0)' }],\n\t\t\t{\n\t\t\t\tduration: SPRING_SMOOTH.duration,\n\t\t\t\teasing: SPRING_SMOOTH.easingFallback,\n\t\t\t\tfill: 'forwards',\n\t\t\t},\n\t\t)\n\t\tthis._currentAnimation = anim\n\t\tanim.finished.then(() => {\n\t\t\tif (container.isConnected) {\n\t\t\t\tcontainer.style.transform = ''\n\t\t\t}\n\t\t\treturn\n\t\t})\n\n\t\tthis._savePosition()\n\t}\n\n\t// ============================================\n\t// DRAG PIPELINE\n\t// ============================================\n\n\tprivate _setupDrag() {\n\t\tconst header = this._headerRef.value\n\t\tconst container = this._containerRef.value\n\t\tif (!header || !container) return\n\n\t\tlet didDrag = false\n\n\t\tfromEvent<PointerEvent>(header, 'pointerdown')\n\t\t\t.pipe(\n\t\t\t\tfilter(e => e.button === 0),\n\t\t\t\ttap(e => {\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\te.stopPropagation()\n\t\t\t\t\theader.setPointerCapture(e.pointerId)\n\t\t\t\t}),\n\t\t\t\tmap(e => {\n\t\t\t\t\tconst rect = container.getBoundingClientRect()\n\t\t\t\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\t\t\t\tconst wasOpen = this.open\n\t\t\t\t\tdidDrag = false\n\t\t\t\t\treturn {\n\t\t\t\t\t\tpointerId: e.pointerId,\n\t\t\t\t\t\tstartX: e.clientX,\n\t\t\t\t\t\tstartY: e.clientY,\n\t\t\t\t\t\toffsetX: e.clientX - rect.left,\n\t\t\t\t\t\toffsetY: e.clientY - rect.top,\n\t\t\t\t\t\trect,\n\t\t\t\t\t\tisBottom,\n\t\t\t\t\t\twasOpen,\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tswitchMap(({ pointerId, startX, startY, offsetX, offsetY, rect, isBottom, wasOpen }) => {\n\t\t\t\t\tconst sameId = (e: PointerEvent) => e.pointerId === pointerId\n\t\t\t\t\tconst move$ = fromEvent<PointerEvent>(window, 'pointermove').pipe(filter(sameId))\n\t\t\t\t\tconst end$ = merge(\n\t\t\t\t\t\tfromEvent<PointerEvent>(window, 'pointerup'),\n\t\t\t\t\t\tfromEvent<PointerEvent>(window, 'pointercancel'),\n\t\t\t\t\t).pipe(filter(sameId))\n\n\t\t\t\t\treturn move$.pipe(\n\t\t\t\t\t\ttap(({ clientX, clientY }) => {\n\t\t\t\t\t\t\tconst dx = clientX - startX\n\t\t\t\t\t\t\tconst dy = clientY - startY\n\t\t\t\t\t\t\tif (Math.sqrt(dx * dx + dy * dy) > DRAG_THRESHOLD && !didDrag) {\n\t\t\t\t\t\t\t\tdidDrag = true\n\t\t\t\t\t\t\t\tthis.isDragging = true\n\t\t\t\t\t\t\t\t// Collapse on first confirmed drag move (not on click)\n\t\t\t\t\t\t\t\tif (wasOpen) {\n\t\t\t\t\t\t\t\t\tthis._currentAnimation?.cancel()\n\t\t\t\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\t\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\t\t\t\t\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\t\t\t\t\t\t\tconst content = this._contentRef.value\n\t\t\t\t\t\t\t\t\tif (content) {\n\t\t\t\t\t\t\t\t\t\tcontent.inert = true\n\t\t\t\t\t\t\t\t\t\tcontent.style.visibility = 'hidden'\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}\n\t\t\t\t\t\t\tif (!didDrag) return\n\n\t\t\t\t\t\t\tconst vw = window.innerWidth\n\t\t\t\t\t\t\tconst vh = window.innerHeight\n\t\t\t\t\t\t\tconst left = Math.max(0, Math.min(clientX - offsetX, vw - rect.width))\n\t\t\t\t\t\t\t// Allow container to go partially off-screen so FAB stays reachable at all edges\n\t\t\t\t\t\t\tconst minTop = isBottom ? FAB_HEIGHT - rect.height : 0\n\t\t\t\t\t\t\tconst maxTop = isBottom ? vh - rect.height : vh - FAB_HEIGHT\n\t\t\t\t\t\t\tconst top = Math.max(minTop, Math.min(clientY - offsetY, maxTop))\n\n\t\t\t\t\t\t\tthis._position = {\n\t\t\t\t\t\t\t\tx: this._currentCorner.includes('right') ? vw - left - rect.width : left,\n\t\t\t\t\t\t\t\ty: isBottom ? vh - top - rect.height : top,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis._applyContainerPosition()\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttakeUntil(end$),\n\t\t\t\t\t\tfinalize(() => {\n\t\t\t\t\t\t\tif (didDrag) {\n\t\t\t\t\t\t\t\tthis._reorientToNearestCorner()\n\t\t\t\t\t\t\t\tthis.isDragging = false\n\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.isDragging = false\n\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t\tthis.toggle()\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\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t// ============================================\n\t// LIFECYCLE\n\t// ============================================\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tfromEvent(window, 'resize')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(() => this._validateBounds())\n\n\t\ttheme.bottomOffset$.pipe(\n\t\t\ttap(() => this._applyContainerPosition()),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\t}\n\n\tfirstUpdated() {\n\t\t// Initialize corner from property\n\t\tthis._currentCorner = this.corner\n\n\t\t// Load saved drag position from localStorage\n\t\tthis._loadPosition()\n\n\t\tconst container = this._containerRef.value\n\t\tconst content = this._contentRef.value\n\t\tif (!container) return\n\n\t\t// Apply initial position\n\t\tthis._applyContainerPosition()\n\n\t\t// Set initial open/closed visual state\n\t\tif (this.open) {\n\t\t\tcontainer.style.overflow = ''\n\t\t\tif (content) {\n\t\t\t\tcontent.inert = false\n\t\t\t\tcontent.style.visibility = 'visible'\n\t\t\t}\n\t\t} else {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\tif (content) {\n\t\t\t\tcontent.inert = true\n\t\t\t\tcontent.style.visibility = 'hidden'\n\t\t\t}\n\t\t}\n\n\t\t// Set up drag\n\t\tthis._setupDrag()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis._currentAnimation?.cancel()\n\t}\n\n\t// ============================================\n\t// ANIMATION\n\t// ============================================\n\n\tprivate async _animateOpen(): Promise<void> {\n\t\tconst container = this._containerRef.value\n\t\tconst content = this._contentRef.value\n\t\tif (!container) return\n\n\t\tif (content) {\n\t\t\tcontent.style.visibility = 'visible'\n\t\t\tcontent.inert = false\n\t\t}\n\n\t\tthis.open = true\n\t\tawait this.updateComplete\n\n\t\tif (reducedMotion$.value) {\n\t\t\tcontainer.style.clipPath = ''\n\t\t\tcontainer.style.overflow = ''\n\t\t\tthis.dispatchScopedEvent('toggle', 'expanded')\n\t\t\treturn\n\t\t}\n\n\t\tthis._currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\n\t\tconst openKeyframes: Keyframe[] = [\n\t\t\t{ clipPath: this.closedClipPath, opacity: 0.95 },\n\t\t\t{ clipPath: this.openClipPath, opacity: 1 },\n\t\t]\n\t\tconst anim = container.animate(openKeyframes, {\n\t\t\tduration: SPRING_SMOOTH.duration,\n\t\t\teasing: SPRING_SMOOTH.easingFallback,\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tthis._currentAnimation = anim\n\n\t\t// Clear clip-path so overflow/scroll work normally after animation\n\t\tanim.finished.then(() => {\n\t\t\tif (container.isConnected) {\n\t\t\t\tcontainer.style.clipPath = ''\n\t\t\t\tcontainer.style.overflow = ''\n\t\t\t}\n\t\t\treturn\n\t\t})\n\n\t\tthis.dispatchScopedEvent('toggle', 'expanded')\n\t}\n\n\tprivate async _animateClose(): Promise<void> {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\n\t\tif (reducedMotion$.value) {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\tthis.open = false\n\t\t\tconst content = this._contentRef.value\n\t\t\tif (content) {\n\t\t\t\tcontent.inert = true\n\t\t\t\tcontent.style.visibility = 'hidden'\n\t\t\t}\n\t\t\tthis.dispatchScopedEvent('toggle', 'collapsed')\n\t\t\treturn\n\t\t}\n\n\t\tthis._currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\n\t\tconst closeKeyframes: Keyframe[] = [\n\t\t\t{ clipPath: this.openClipPath, opacity: 1 },\n\t\t\t{ clipPath: this.closedClipPath, opacity: 0.95 },\n\t\t]\n\t\tconst anim = container.animate(closeKeyframes, {\n\t\t\tduration: Math.round(SPRING_SNAPPY.duration * 0.9),\n\t\t\teasing: 'cubic-bezier(0.4, 0, 0.8, 0.15)',\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tthis._currentAnimation = anim\n\n\t\tawait anim.finished\n\n\t\tthis.open = false\n\n\t\tconst content = this._contentRef.value\n\t\tif (content) {\n\t\t\tcontent.inert = true\n\t\t\tcontent.style.visibility = 'hidden'\n\t\t}\n\n\t\tthis.dispatchScopedEvent('toggle', 'collapsed')\n\t}\n\n\t// ============================================\n\t// PUBLIC API\n\t// ============================================\n\n\ttoggle() {\n\t\tif (this.open) this._animateClose()\n\t\telse this._animateOpen()\n\t}\n\n\texpand() {\n\t\tif (this.open) return\n\t\tthis.removeAttribute('hidden')\n\t\tif (!this._containerRef.value) {\n\t\t\tthis.open = true\n\t\t\treturn\n\t\t}\n\t\tthis._animateOpen()\n\t}\n\n\t/** Alias for expand() — kept for backwards compatibility. */\n\tshow() {\n\t\tthis.expand()\n\t}\n\n\tclose() {\n\t\tif (!this.open) return\n\t\tif (!this._containerRef.value) {\n\t\t\tthis.open = false\n\t\t\treturn\n\t\t}\n\t\tthis._animateClose()\n\t}\n\n\t// ============================================\n\t// RENDER\n\t// ============================================\n\n\tprotected render(): unknown {\n\t\tconst isBottom = this._currentCorner.startsWith('bottom')\n\n\t\tconst containerClasses = classMap({\n\t\t\tflex: true,\n\t\t\t'flex-col': isBottom,\n\t\t\t'flex-col-reverse': !isBottom,\n\t\t\t'will-change-[clip-path]': true,\n\t\t\t'z-1000': true,\n\t\t\t'rounded-2xl': this.open,\n\t\t\t'rounded-[22px]': !this.open,\n\t\t\t'overflow-hidden': true,\n\t\t\t'opacity-95': this.isDragging,\n\t\t})\n\n\t\tconst containerStyles = styleMap({\n\t\t\tposition: 'fixed',\n\t\t\twidth: this.panelWidth,\n\t\t\t'max-height': 'calc(100vh - 32px)',\n\t\t\t'pointer-events': 'none',\n\t\t})\n\n\t\tconst contentStyles = styleMap({\n\t\t\t'pointer-events': this.open ? 'auto' : 'none',\n\t\t})\n\n\t\tconst headerClasses = classMap({\n\t\t\t'h-full': true,\n\t\t\t'px-3': true,\n\t\t\tflex: true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t'select-none': true,\n\t\t\t'touch-none': true,\n\t\t\t'cursor-grabbing': this.isDragging,\n\t\t\t'cursor-move': !this.isDragging,\n\t\t\t'transition-opacity': true,\n\t\t\t'duration-200': true,\n\t\t})\n\n\t\treturn html`\n\t\t\t<!-- schmancy-surface owns background color and elevation-based shadow.\n\t\t\t Position is managed imperatively via _applyContainerPosition(). -->\n\t\t\t<schmancy-surface\n\t\t\t\t${ref(this._containerRef)}\n\t\t\t\ttype=\"glass\"\n\t\t\t\t.elevation=${this.elevation}\n\t\t\t\tclass=${containerClasses}\n\t\t\t\tstyle=${containerStyles}\n\t\t\t\taria-expanded=${this.open}\n\t\t\t>\n\t\t\t\t<!-- Content section (visually above header for bottom corners) -->\n\t\t\t\t<section\n\t\t\t\t\t${ref(this._contentRef)}\n\t\t\t\t\tclass=\"flex-1 min-h-0 overflow-hidden flex flex-col\"\n\t\t\t\t\tstyle=${contentStyles}\n\t\t\t\t\trole=\"dialog\"\n\t\t\t\t\taria-label=\"${this.label ?? 'Floating panel'}\"\n\t\t\t\t>\n\t\t\t\t\t<schmancy-surface type=\"solid\" class=\"flex flex-col flex-1 min-h-0 overflow-hidden\">\n\t\t\t\t\t\t<schmancy-scroll hide class=\"flex-1\">\n\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t</schmancy-scroll>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</section>\n\n\t\t\t\t<!-- Gradient separator between header and content — only when open -->\n\t\t\t\t${when(\n\t\t\t\t\tthis.open,\n\t\t\t\t\t() =>\n\t\t\t\t\t\thtml`<div\n\t\t\t\t\t\t\tclass=\"h-px shrink-0 bg-linear-to-r from-transparent via-primary-default/30 to-transparent\"\n\t\t\t\t\t\t></div>`,\n\t\t\t\t)}\n\n\t\t\t\t<!-- Header / FAB section — always interactive, always visible -->\n\t\t\t\t<section\n\t\t\t\t\tclass=\"shrink-0 bg-surface-containerLowest\"\n\t\t\t\t\tstyle=${styleMap({ 'pointer-events': 'auto', height: `${FAB_HEIGHT}px` })}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\t${ref(this._headerRef)}\n\t\t\t\t\t\tclass=${headerClasses}\n\t\t\t\t\t\ttitle=\"Drag to move\"\n\t\t\t\t\t\taria-label=\"Drag to reposition panel\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<!-- Summary slot rendered once — avoids DOM teardown on toggle -->\n\t\t\t\t\t\t<div class=\"flex-1 min-w-0\">\n\t\t\t\t\t\t\t<slot name=\"summary\"></slot>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<!-- Toggle button: collapse when open, expand when closed -->\n\t\t\t\t\t\t${when(\n\t\t\t\t\t\t\tthis.open,\n\t\t\t\t\t\t\t() => html`\n\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tvariant=\"text\"\n\t\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\t\tthis.close()\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\ttitle=\"Collapse\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tclose_fullscreen\n\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t\t() => html`\n\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tvariant=\"text\"\n\t\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\t\tthis.expand()\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\ttitle=\"Expand\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tfullscreen\n\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\t\t\t</schmancy-surface>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-boat': SchmancyBoat\n\t}\n}\n"],"mappings":"2cAYA,IAAM,EAAa,GAEb,EAA8B,iBAUrB,EAAA,cAA2B,EAAA,CAAA,CAAA,YAAA,GAAA,EAAA,CAAA,MAAA,GAAA,EAAA,CAAA,KAAA,GAYA,UAAA,KAAA,QAAA,CAMsB,EAAA,KAAA,OAElB,eAAA,KAAA,KAAA,CAEe,EAAA,KAAA,WAAA,CAmB9B,EAAA,KAAA,UAGA,CAAE,EAAG,GAAI,EAAG,GAAA,CAAA,KAAA,eACA,eAAA,KAAA,eAAA,EAAA,EAAA,YAAA,CAAA,KAAA,aAAA,EAAA,EAAA,YAAA,CAAA,KAAA,YAAA,EAAA,EAAA,YAAA,CAAA,OAAA,KAAA,OA5C1B,CAAC,EAAA,GAAG;;;;;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s","names":[],"sources":["../src/boat/boat.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { styleMap } from 'lit/directives/style-map.js'\nimport { when } from 'lit/directives/when.js'\nimport { filter, finalize, fromEvent, map, merge, switchMap, takeUntil, tap } from 'rxjs'\nimport { SPRING_SMOOTH, SPRING_SNAPPY } from '../utils/animation.js'\nimport { reducedMotion$ } from '../directives/reduced-motion'\nimport { theme } from '../theme/theme.service.js'\n\nconst FAB_HEIGHT = 44\nconst DRAG_THRESHOLD = 5\nconst POSITION_STORAGE_KEY_PREFIX = 'schmancy-boat-'\n\ntype Corner = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'\ntype BoatState = 'collapsed' | 'expanded'\ninterface Position {\n\tx: number\n\ty: number\n}\n\n@customElement('schmancy-boat')\nexport default class SchmancyBoat extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: contents;\n\t\tposition: relative;\n\t\tz-index: 1000;\n\t}\n\t:host([hidden]) {\n\t\tdisplay: none !important;\n\t}\n`]\n\n\t@property({ type: String }) id: string = 'default'\n\t@property({ type: String }) icon?: string\n\t@property({ type: String }) label?: string\n\t/** Override the expanded panel width (e.g. '320px', '24rem'). Defaults to responsive sizing. */\n\t@property({ type: String }) expandedWidth?: string\n\t/** When true, uses a lower elevation shadow in the minimized (FAB) state. */\n\t@property({ type: Boolean, reflect: true }) lowered: boolean = false\n\t/** Corner the boat is anchored to. */\n\t@property({ type: String }) corner: Corner = 'bottom-right'\n\t/** Whether the panel is open. */\n\t@property({ type: Boolean, reflect: true }) open: boolean = false\n\n\t/**\n\t * State property.\n\t * Maps 'expanded' → open=true, 'collapsed' → open=false (FAB visible).\n\t */\n\tget state(): BoatState {\n\t\treturn this.open ? 'expanded' : 'collapsed'\n\t}\n\tset state(val: BoatState) {\n\t\tif (val === 'expanded') {\n\t\t\tthis.expand()\n\t\t} else {\n\t\t\t// collapsed\n\t\t\tthis.close()\n\t\t}\n\t}\n\n\t// Internal drag state (triggers re-render for cursor class)\n\t@state() private isDragging = false\n\n\t// Internal position — plain fields, updated directly during drag (no re-render needed)\n\tprivate _position: Position = { x: 16, y: 16 }\n\t@state() private _currentCorner: Corner = 'bottom-right'\n\n\t// Refs\n\tprivate _containerRef = createRef<HTMLElement>()\n\tprivate _contentRef = createRef<HTMLElement>()\n\tprivate _headerRef = createRef<HTMLElement>()\n\tprivate _currentAnimation?: Animation\n\n\t// ============================================\n\t// COMPUTED\n\t// ============================================\n\n\tprivate get panelWidth(): string {\n\t\treturn this.expandedWidth ?? 'min(360px, calc(100vw - 32px))'\n\t}\n\n\tprivate get isBottomCorner(): boolean {\n\t\treturn this._currentCorner.startsWith('bottom')\n\t}\n\n\tprivate get closedClipPath(): string {\n\t\treturn this.isBottomCorner\n\t\t\t? `inset(calc(100% - ${FAB_HEIGHT}px) 0px 0px 0px round 22px)`\n\t\t\t: `inset(0px 0px calc(100% - ${FAB_HEIGHT}px) 0px round 22px)`\n\t}\n\n\tprivate get openClipPath(): string {\n\t\treturn 'inset(0px 0px 0px 0px round 12px)'\n\t}\n\n\tprivate get elevation(): 0 | 1 | 2 | 3 | 4 | 5 {\n\t\tif (this.open) return 4\n\t\treturn this.lowered ? 1 : 3\n\t}\n\n\t// ============================================\n\t// POSITION MANAGEMENT\n\t// ============================================\n\n\tprivate _applyContainerPosition() {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\t\tcontainer.style.removeProperty('left')\n\t\tcontainer.style.removeProperty('right')\n\t\tcontainer.style.removeProperty('top')\n\t\tcontainer.style.removeProperty('bottom')\n\t\tconst { x, y } = this._position\n\t\tif (this._currentCorner.includes('right')) {\n\t\t\tcontainer.style.right = `${x}px`\n\t\t} else {\n\t\t\tcontainer.style.left = `${x}px`\n\t\t}\n\t\tif (this._currentCorner.includes('bottom')) {\n\t\t\tcontainer.style.bottom = `${y + theme.bottomOffset}px`\n\t\t} else {\n\t\t\tcontainer.style.top = `${y}px`\n\t\t}\n\t}\n\n\tprivate _loadPosition() {\n\t\ttry {\n\t\t\tconst saved = localStorage.getItem(POSITION_STORAGE_KEY_PREFIX + this.id)\n\t\t\tif (saved) {\n\t\t\t\tconst parsed = JSON.parse(saved) as { x: number; y: number; anchor: Corner }\n\t\t\t\tthis._position = { x: parsed.x, y: parsed.y }\n\t\t\t\tthis._currentCorner = parsed.anchor\n\t\t\t}\n\t\t} catch {\n\t\t\t// ignore localStorage errors\n\t\t}\n\t}\n\n\tprivate _savePosition() {\n\t\ttry {\n\t\t\tlocalStorage.setItem(\n\t\t\t\tPOSITION_STORAGE_KEY_PREFIX + this.id,\n\t\t\t\tJSON.stringify({ ...this._position, anchor: this._currentCorner }),\n\t\t\t)\n\t\t} catch {\n\t\t\t// ignore localStorage errors\n\t\t}\n\t}\n\n\tprivate _validateBounds() {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\t\tconst rect = container.getBoundingClientRect()\n\t\tif (rect.width === 0) return\n\t\tconst vw = window.innerWidth\n\t\tconst vh = window.innerHeight\n\t\tconst isRight = this._currentCorner.includes('right')\n\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\tconst actualLeft = isRight ? vw - this._position.x - rect.width : this._position.x\n\t\tconst actualTop = isBottom ? vh - this._position.y - rect.height : this._position.y\n\t\tconst newLeft = Math.max(0, Math.min(actualLeft, vw - rect.width))\n\t\tconst newTop = Math.max(0, Math.min(actualTop, vh - rect.height))\n\t\tthis._position = {\n\t\t\tx: isRight ? vw - newLeft - rect.width : newLeft,\n\t\t\ty: isBottom ? vh - newTop - rect.height : newTop,\n\t\t}\n\t\tthis._applyContainerPosition()\n\t}\n\n\n\t// ============================================\n\t// CORNER SNAPPING\n\t// ============================================\n\n\tprivate _reorientToNearestCorner(skipAnimation = false): void {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\n\t\t// F — record current screen position before DOM mutation\n\t\tconst rect = container.getBoundingClientRect()\n\n\t\t// L — calculate nearest corner using FAB visual center (container is always collapsed during drag)\n\t\tconst currentIsBottom = this._currentCorner.includes('bottom')\n\t\tconst fabCenterX = rect.left + rect.width / 2\n\t\tconst fabCenterY = currentIsBottom\n\t\t\t? rect.bottom - FAB_HEIGHT / 2\n\t\t\t: rect.top + FAB_HEIGHT / 2\n\t\tconst side = fabCenterX > window.innerWidth / 2 ? 'right' : 'left'\n\t\tconst vert = fabCenterY > window.innerHeight / 2 ? 'bottom' : 'top'\n\t\tconst newCorner: Corner = `${vert}-${side}` as Corner\n\n\t\t// Snap corner and reset offset to standard edge gap\n\t\tthis._currentCorner = newCorner\n\t\tthis._position = { x: 16, y: 16 }\n\t\tthis._applyContainerPosition()\n\t\t// Sync clip-path to new corner — managed imperatively, not via styleMap\n\t\tif (!this.open) {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t}\n\n\t\tif (skipAnimation || reducedMotion$.value) {\n\t\t\tthis._savePosition()\n\t\t\treturn\n\t\t}\n\n\t\t// I — invert: shift element back to its original visual position\n\t\tconst newRect = container.getBoundingClientRect()\n\t\tconst dx = rect.left - newRect.left\n\t\tconst dy = rect.top - newRect.top\n\t\tcontainer.style.transform = `translate(${dx}px, ${dy}px)`\n\n\t\t// P — play: animate from the inverse offset to natural resting position\n\t\tthis._currentAnimation?.cancel()\n\t\tconst anim = container.animate(\n\t\t\t[{ transform: container.style.transform }, { transform: 'translate(0,0)' }],\n\t\t\t{\n\t\t\t\tduration: SPRING_SMOOTH.duration,\n\t\t\t\teasing: SPRING_SMOOTH.easingFallback,\n\t\t\t\tfill: 'forwards',\n\t\t\t},\n\t\t)\n\t\tthis._currentAnimation = anim\n\t\tanim.finished.then(() => {\n\t\t\tif (container.isConnected) {\n\t\t\t\tcontainer.style.transform = ''\n\t\t\t}\n\t\t\treturn\n\t\t})\n\n\t\tthis._savePosition()\n\t}\n\n\t// ============================================\n\t// DRAG PIPELINE\n\t// ============================================\n\n\tprivate _setupDrag() {\n\t\tconst header = this._headerRef.value\n\t\tconst container = this._containerRef.value\n\t\tif (!header || !container) return\n\n\t\tlet didDrag = false\n\n\t\tfromEvent<PointerEvent>(header, 'pointerdown')\n\t\t\t.pipe(\n\t\t\t\tfilter(e => e.button === 0),\n\t\t\t\ttap(e => {\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\te.stopPropagation()\n\t\t\t\t\theader.setPointerCapture(e.pointerId)\n\t\t\t\t}),\n\t\t\t\tmap(e => {\n\t\t\t\t\tconst rect = container.getBoundingClientRect()\n\t\t\t\t\tconst isBottom = this._currentCorner.includes('bottom')\n\t\t\t\t\tconst wasOpen = this.open\n\t\t\t\t\tdidDrag = false\n\t\t\t\t\treturn {\n\t\t\t\t\t\tpointerId: e.pointerId,\n\t\t\t\t\t\tstartX: e.clientX,\n\t\t\t\t\t\tstartY: e.clientY,\n\t\t\t\t\t\toffsetX: e.clientX - rect.left,\n\t\t\t\t\t\toffsetY: e.clientY - rect.top,\n\t\t\t\t\t\trect,\n\t\t\t\t\t\tisBottom,\n\t\t\t\t\t\twasOpen,\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tswitchMap(({ pointerId, startX, startY, offsetX, offsetY, rect, isBottom, wasOpen }) => {\n\t\t\t\t\tconst sameId = (e: PointerEvent) => e.pointerId === pointerId\n\t\t\t\t\tconst move$ = fromEvent<PointerEvent>(window, 'pointermove').pipe(filter(sameId))\n\t\t\t\t\tconst end$ = merge(\n\t\t\t\t\t\tfromEvent<PointerEvent>(window, 'pointerup'),\n\t\t\t\t\t\tfromEvent<PointerEvent>(window, 'pointercancel'),\n\t\t\t\t\t).pipe(filter(sameId))\n\n\t\t\t\t\treturn move$.pipe(\n\t\t\t\t\t\ttap(({ clientX, clientY }) => {\n\t\t\t\t\t\t\tconst dx = clientX - startX\n\t\t\t\t\t\t\tconst dy = clientY - startY\n\t\t\t\t\t\t\tif (Math.sqrt(dx * dx + dy * dy) > DRAG_THRESHOLD && !didDrag) {\n\t\t\t\t\t\t\t\tdidDrag = true\n\t\t\t\t\t\t\t\tthis.isDragging = true\n\t\t\t\t\t\t\t\t// Collapse on first confirmed drag move (not on click)\n\t\t\t\t\t\t\t\tif (wasOpen) {\n\t\t\t\t\t\t\t\t\tthis._currentAnimation?.cancel()\n\t\t\t\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\t\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\t\t\t\t\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\t\t\t\t\t\t\tconst content = this._contentRef.value\n\t\t\t\t\t\t\t\t\tif (content) {\n\t\t\t\t\t\t\t\t\t\tcontent.inert = true\n\t\t\t\t\t\t\t\t\t\tcontent.style.visibility = 'hidden'\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}\n\t\t\t\t\t\t\tif (!didDrag) return\n\n\t\t\t\t\t\t\tconst vw = window.innerWidth\n\t\t\t\t\t\t\tconst vh = window.innerHeight\n\t\t\t\t\t\t\tconst left = Math.max(0, Math.min(clientX - offsetX, vw - rect.width))\n\t\t\t\t\t\t\t// Allow container to go partially off-screen so FAB stays reachable at all edges\n\t\t\t\t\t\t\tconst minTop = isBottom ? FAB_HEIGHT - rect.height : 0\n\t\t\t\t\t\t\tconst maxTop = isBottom ? vh - rect.height : vh - FAB_HEIGHT\n\t\t\t\t\t\t\tconst top = Math.max(minTop, Math.min(clientY - offsetY, maxTop))\n\n\t\t\t\t\t\t\tthis._position = {\n\t\t\t\t\t\t\t\tx: this._currentCorner.includes('right') ? vw - left - rect.width : left,\n\t\t\t\t\t\t\t\ty: isBottom ? vh - top - rect.height : top,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis._applyContainerPosition()\n\t\t\t\t\t\t}),\n\t\t\t\t\t\ttakeUntil(end$),\n\t\t\t\t\t\tfinalize(() => {\n\t\t\t\t\t\t\tif (didDrag) {\n\t\t\t\t\t\t\t\tthis._reorientToNearestCorner()\n\t\t\t\t\t\t\t\tthis.isDragging = false\n\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.isDragging = false\n\t\t\t\t\t\t\t\tdidDrag = false\n\t\t\t\t\t\t\t\tthis.toggle()\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\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t// ============================================\n\t// LIFECYCLE\n\t// ============================================\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tfromEvent(window, 'resize')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(() => this._validateBounds())\n\n\t\ttheme.bottomOffset$.pipe(\n\t\t\ttap(() => this._applyContainerPosition()),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\t}\n\n\tfirstUpdated() {\n\t\t// Initialize corner from property\n\t\tthis._currentCorner = this.corner\n\n\t\t// Load saved drag position from localStorage\n\t\tthis._loadPosition()\n\n\t\tconst container = this._containerRef.value\n\t\tconst content = this._contentRef.value\n\t\tif (!container) return\n\n\t\t// Apply initial position\n\t\tthis._applyContainerPosition()\n\n\t\t// Set initial open/closed visual state\n\t\tif (this.open) {\n\t\t\tcontainer.style.overflow = ''\n\t\t\tif (content) {\n\t\t\t\tcontent.inert = false\n\t\t\t\tcontent.style.visibility = 'visible'\n\t\t\t}\n\t\t} else {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\tif (content) {\n\t\t\t\tcontent.inert = true\n\t\t\t\tcontent.style.visibility = 'hidden'\n\t\t\t}\n\t\t}\n\n\t\t// Set up drag\n\t\tthis._setupDrag()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis._currentAnimation?.cancel()\n\t}\n\n\t// ============================================\n\t// ANIMATION\n\t// ============================================\n\n\tprivate async _animateOpen(): Promise<void> {\n\t\tconst container = this._containerRef.value\n\t\tconst content = this._contentRef.value\n\t\tif (!container) return\n\n\t\tif (content) {\n\t\t\tcontent.style.visibility = 'visible'\n\t\t\tcontent.inert = false\n\t\t}\n\n\t\tthis.open = true\n\t\tawait this.updateComplete\n\n\t\tif (reducedMotion$.value) {\n\t\t\tcontainer.style.clipPath = ''\n\t\t\tcontainer.style.overflow = ''\n\t\t\tthis.dispatchScopedEvent('toggle', 'expanded')\n\t\t\treturn\n\t\t}\n\n\t\tthis._currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\n\t\tconst openKeyframes: Keyframe[] = [\n\t\t\t{ clipPath: this.closedClipPath, opacity: 0.95 },\n\t\t\t{ clipPath: this.openClipPath, opacity: 1 },\n\t\t]\n\t\tconst anim = container.animate(openKeyframes, {\n\t\t\tduration: SPRING_SMOOTH.duration,\n\t\t\teasing: SPRING_SMOOTH.easingFallback,\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tthis._currentAnimation = anim\n\n\t\t// Clear clip-path so overflow/scroll work normally after animation\n\t\tanim.finished.then(() => {\n\t\t\tif (container.isConnected) {\n\t\t\t\tcontainer.style.clipPath = ''\n\t\t\t\tcontainer.style.overflow = ''\n\t\t\t}\n\t\t\treturn\n\t\t})\n\n\t\tthis.dispatchScopedEvent('toggle', 'expanded')\n\t}\n\n\tprivate async _animateClose(): Promise<void> {\n\t\tconst container = this._containerRef.value\n\t\tif (!container) return\n\n\t\tif (reducedMotion$.value) {\n\t\t\tcontainer.style.clipPath = this.closedClipPath\n\t\t\tcontainer.style.overflow = 'hidden'\n\t\t\tthis.open = false\n\t\t\tconst content = this._contentRef.value\n\t\t\tif (content) {\n\t\t\t\tcontent.inert = true\n\t\t\t\tcontent.style.visibility = 'hidden'\n\t\t\t}\n\t\t\tthis.dispatchScopedEvent('toggle', 'collapsed')\n\t\t\treturn\n\t\t}\n\n\t\tthis._currentAnimation?.cancel()\n\t\tcontainer.style.overflow = 'hidden'\n\n\t\tconst closeKeyframes: Keyframe[] = [\n\t\t\t{ clipPath: this.openClipPath, opacity: 1 },\n\t\t\t{ clipPath: this.closedClipPath, opacity: 0.95 },\n\t\t]\n\t\tconst anim = container.animate(closeKeyframes, {\n\t\t\tduration: Math.round(SPRING_SNAPPY.duration * 0.9),\n\t\t\teasing: 'cubic-bezier(0.4, 0, 0.8, 0.15)',\n\t\t\tfill: 'forwards',\n\t\t})\n\t\tthis._currentAnimation = anim\n\n\t\tawait anim.finished\n\n\t\tthis.open = false\n\n\t\tconst content = this._contentRef.value\n\t\tif (content) {\n\t\t\tcontent.inert = true\n\t\t\tcontent.style.visibility = 'hidden'\n\t\t}\n\n\t\tthis.dispatchScopedEvent('toggle', 'collapsed')\n\t}\n\n\t// ============================================\n\t// PUBLIC API\n\t// ============================================\n\n\ttoggle() {\n\t\tif (this.open) this._animateClose()\n\t\telse this._animateOpen()\n\t}\n\n\texpand() {\n\t\tif (this.open) return\n\t\tthis.removeAttribute('hidden')\n\t\tif (!this._containerRef.value) {\n\t\t\tthis.open = true\n\t\t\treturn\n\t\t}\n\t\tthis._animateOpen()\n\t}\n\n\t/** Alias for expand() — kept for backwards compatibility. */\n\tshow() {\n\t\tthis.expand()\n\t}\n\n\tclose() {\n\t\tif (!this.open) return\n\t\tif (!this._containerRef.value) {\n\t\t\tthis.open = false\n\t\t\treturn\n\t\t}\n\t\tthis._animateClose()\n\t}\n\n\t// ============================================\n\t// RENDER\n\t// ============================================\n\n\tprotected render(): unknown {\n\t\tconst isBottom = this._currentCorner.startsWith('bottom')\n\n\t\tconst containerClasses = classMap({\n\t\t\tflex: true,\n\t\t\t'flex-col': isBottom,\n\t\t\t'flex-col-reverse': !isBottom,\n\t\t\t'will-change-[clip-path]': true,\n\t\t\t'z-1000': true,\n\t\t\t'rounded-2xl': this.open,\n\t\t\t'rounded-[22px]': !this.open,\n\t\t\t'overflow-hidden': true,\n\t\t\t'opacity-95': this.isDragging,\n\t\t})\n\n\t\tconst containerStyles = styleMap({\n\t\t\tposition: 'fixed',\n\t\t\twidth: this.panelWidth,\n\t\t\t'max-height': 'calc(100vh - 32px)',\n\t\t\t'pointer-events': 'none',\n\t\t})\n\n\t\tconst contentStyles = styleMap({\n\t\t\t'pointer-events': this.open ? 'auto' : 'none',\n\t\t})\n\n\t\tconst headerClasses = classMap({\n\t\t\t'h-full': true,\n\t\t\t'px-3': true,\n\t\t\tflex: true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t'select-none': true,\n\t\t\t'touch-none': true,\n\t\t\t'cursor-grabbing': this.isDragging,\n\t\t\t'cursor-move': !this.isDragging,\n\t\t\t'transition-opacity': true,\n\t\t\t'duration-200': true,\n\t\t})\n\n\t\treturn html`\n\t\t\t<!-- schmancy-surface owns background color and elevation-based shadow.\n\t\t\t Position is managed imperatively via _applyContainerPosition(). -->\n\t\t\t<schmancy-surface\n\t\t\t\t${ref(this._containerRef)}\n\t\t\t\ttype=\"glass\"\n\t\t\t\t.elevation=${this.elevation}\n\t\t\t\tclass=${containerClasses}\n\t\t\t\tstyle=${containerStyles}\n\t\t\t\taria-expanded=${this.open}\n\t\t\t>\n\t\t\t\t<!-- Content section (visually above header for bottom corners) -->\n\t\t\t\t<section\n\t\t\t\t\t${ref(this._contentRef)}\n\t\t\t\t\tclass=\"flex-1 min-h-0 overflow-hidden flex flex-col\"\n\t\t\t\t\tstyle=${contentStyles}\n\t\t\t\t\trole=\"dialog\"\n\t\t\t\t\taria-label=\"${this.label ?? 'Floating panel'}\"\n\t\t\t\t>\n\t\t\t\t\t<schmancy-surface type=\"solid\" class=\"flex flex-col flex-1 min-h-0 overflow-hidden\">\n\t\t\t\t\t\t<schmancy-scroll hide class=\"flex-1\">\n\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t</schmancy-scroll>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</section>\n\n\t\t\t\t<!-- Gradient separator between header and content — only when open -->\n\t\t\t\t${when(\n\t\t\t\t\tthis.open,\n\t\t\t\t\t() =>\n\t\t\t\t\t\thtml`<div\n\t\t\t\t\t\t\tclass=\"h-px shrink-0 bg-linear-to-r from-transparent via-primary-default/30 to-transparent\"\n\t\t\t\t\t\t></div>`,\n\t\t\t\t)}\n\n\t\t\t\t<!-- Header / FAB section — always interactive, always visible -->\n\t\t\t\t<section\n\t\t\t\t\tclass=\"shrink-0 bg-surface-containerLowest\"\n\t\t\t\t\tstyle=${styleMap({ 'pointer-events': 'auto', height: `${FAB_HEIGHT}px` })}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\t${ref(this._headerRef)}\n\t\t\t\t\t\tclass=${headerClasses}\n\t\t\t\t\t\ttitle=\"Drag to move\"\n\t\t\t\t\t\taria-label=\"Drag to reposition panel\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<!-- Summary slot rendered once — avoids DOM teardown on toggle -->\n\t\t\t\t\t\t<div class=\"flex-1 min-w-0\">\n\t\t\t\t\t\t\t<slot name=\"summary\"></slot>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<!-- Toggle button: collapse when open, expand when closed -->\n\t\t\t\t\t\t${when(\n\t\t\t\t\t\t\tthis.open,\n\t\t\t\t\t\t\t() => html`\n\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tvariant=\"text\"\n\t\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\t\tthis.close()\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\ttitle=\"Collapse\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tclose_fullscreen\n\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t\t() => html`\n\t\t\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t\t\tvariant=\"text\"\n\t\t\t\t\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\t\tthis.expand()\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\ttitle=\"Expand\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tfullscreen\n\t\t\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\t\t\t</schmancy-surface>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-boat': SchmancyBoat\n\t}\n}\n"],"mappings":"2cAYA,IAAM,EAAa,GAEb,EAA8B,iBAUrB,EAAA,cAA2B,EAAA,CAAA,CAAA,YAAA,GAAA,EAAA,CAAA,MAAA,GAAA,EAAA,CAAA,KAAA,GAYA,UAAA,KAAA,QAAA,CAMsB,EAAA,KAAA,OAElB,eAAA,KAAA,KAAA,CAEe,EAAA,KAAA,WAAA,CAmB9B,EAAA,KAAA,UAGA,CAAE,EAAG,GAAI,EAAG,GAAA,CAAA,KAAA,eACA,eAAA,KAAA,eAAA,EAAA,EAAA,YAAA,CAAA,KAAA,aAAA,EAAA,EAAA,YAAA,CAAA,KAAA,YAAA,EAAA,EAAA,YAAA,CAAA,OAAA,KAAA,OA5C1B,CAAC,EAAA,GAAG;;;;;;;;;GA2BpB,IAAA,OAAI,CACH,OAAO,KAAK,KAAO,WAAa,YAEjC,IAAA,MAAU,EAAA,CACL,IAAQ,WACX,KAAK,QAAA,CAGL,KAAK,OAAA,CAqBP,IAAA,YAAY,CACX,OAAO,KAAK,eAAiB,iCAG9B,IAAA,gBAAY,CACX,OAAO,KAAK,eAAe,W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AAA,CAAS,EAAA,UAAA,OAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UACjB,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,QAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAEjB,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,gBAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAEjB,CAAE,KAAM,QAAS,QAAA,CAAS,EAAA,CAAA,CAAA,CAAO,EAAA,UAAA,UAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAEjC,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,SAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAEjB,CAAE,KAAM,QAAS,QAAA,CAAS,EAAA,CAAA,CAAA,CAAO,EAAA,UAAA,OAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,QAAA,CAAA,CAmBnC,EAAA,UAAA,aAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,QAAA,CAAA,CAIA,EAAA,UAAA,iBAAA,IAAA,GAAA,CAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eA9CM,gBAAA,CAAA,CAAgB,EAAA,CAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA"}
|
package/dist/boat.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./boat-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./boat-OatK_MGh.cjs`);exports.SchmancyBoat=e.t;
|
package/dist/boat.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./boat-
|
|
1
|
+
import { t as e } from "./boat-CNWIQPA1.js";
|
|
2
2
|
export { e as SchmancyBoat };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as e } from "./mixins-DCVXqL1Q.js";
|
|
2
2
|
import { a as t } from "./active-host-BP0zy_Y9.js";
|
|
3
3
|
import "./input-chip-c5n547tg.js";
|
|
4
|
-
import { r as n } from "./layout-
|
|
4
|
+
import { r as n } from "./layout-Dq2oeOTS.js";
|
|
5
5
|
import { t as r } from "./magnetic-DxvoEz8_.js";
|
|
6
6
|
import { BehaviorSubject as i, combineLatest as a } from "rxjs";
|
|
7
7
|
import { debounceTime as o, distinctUntilChanged as s, takeUntil as c } from "rxjs/operators";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chips-m2NPN480.js","names":[],"sources":["../src/chips/assist-chip.ts","../src/chips/chips.ts","../src/chips/filter-chip.ts","../src/chips/suggestion-chip.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { BehaviorSubject, combineLatest } from 'rxjs'\nimport { takeUntil } from 'rxjs/operators'\n\n/**\n * Assist chip component - prompts user actions like opening calendar events or sharing content\n * Pure Schmancy implementation with Tailwind CSS and RxJS state management\n */\n@customElement('schmancy-assist-chip')\nexport class SchmancyAssistChip extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: inline-block;\n\t\toutline: none;\n\t\twidth: fit-content;\n\t\tmin-width: fit-content;\n\t}\n\n\t:host([disabled]) {\n\t\tpointer-events: none;\n\t}\n\n\t.ripple {\n\t\tposition: absolute;\n\t\tborder-radius: 50%;\n\t\ttransform: scale(0);\n\t\tanimation: ripple 600ms linear;\n\t\tbackground-color: rgba(0, 0, 0, 0.08);\n\t\tpointer-events: none;\n\t}\n\n\t@keyframes ripple {\n\t\tto {\n\t\t\ttransform: scale(4);\n\t\t\topacity: 0;\n\t\t}\n\t}\n\n\t/* State layer for M3 hover/focus/pressed states */\n\t.state-layer {\n\t\tposition: absolute;\n\t\tinset: 0;\n\t\tborder-radius: inherit;\n\t\tpointer-events: none;\n\t\tbackground-color: currentColor;\n\t\topacity: 0;\n\t\ttransition: opacity 200ms ease;\n\t}\n\n\t:host(:not([disabled])) button:hover .state-layer {\n\t\topacity: 0.08;\n\t}\n\n\t:host(:not([disabled])) button:focus-visible .state-layer {\n\t\topacity: 0.1;\n\t}\n\n\t:host(:not([disabled])) button:active .state-layer {\n\t\topacity: 0.1;\n\t}\n`];\n\t/** Value identifier for the chip */\n\t@property({ reflect: true }) value = ''\n\n\t/** Optional icon name (Material Symbols) */\n\t@property({ reflect: true }) icon = ''\n\n\t/** Optional href for navigation */\n\t@property({ reflect: true }) href = ''\n\n\t/** Target for navigation (e.g., '_blank') */\n\t@property({ reflect: true }) target = ''\n\n\t/** Disable the chip */\n\t@property({ type: Boolean, reflect: true }) disabled = false\n\n\t/** Elevated style variant - true by default per M3 spec for assist chips */\n\t@property({ type: Boolean, reflect: true }) elevated = true\n\n\t// RxJS state streams\n\tprivate hover$ = new BehaviorSubject<boolean>(false)\n\tprivate pressed$ = new BehaviorSubject<boolean>(false)\n\tprivate focused$ = new BehaviorSubject<boolean>(false)\n\n\t// UI state - only ripples needed for rendering\n\t@state() private ripples: Array<{ x: number; y: number; id: number }> = []\n\n\tprotected static shadowRootOptions = { ...LitElement.shadowRootOptions, delegatesFocus: true }\n\n\tprivate nextRippleId = 0\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Stream management for future extensions\n\t\t// Currently, states are handled directly in event handlers\n\t\t// This pipeline can be extended for more complex state interactions\n\t\tcombineLatest([\n\t\t\tthis.hover$,\n\t\t\tthis.pressed$,\n\t\t\tthis.focused$\n\t\t]).pipe(\n\t\t\t// States are managed through event handlers directly\n\t\t\t// This pipeline is kept for potential future state combinations\n\t\t\ttakeUntil(this.disconnecting)\n\t\t).subscribe()\n\t}\n\n\tprivate handleClick = (e: MouseEvent) => {\n\t\tif (this.disabled) return\n\n\t\t// Add ripple effect\n\t\tconst button = this.shadowRoot?.querySelector('button')\n\t\tif (button) {\n\t\t\tconst rect = button.getBoundingClientRect()\n\t\t\tconst x = e.clientX - rect.left\n\t\t\tconst y = e.clientY - rect.top\n\t\t\tconst id = this.nextRippleId++\n\n\t\t\tthis.ripples = [...this.ripples, { x, y, id }]\n\n\t\t\t// Remove ripple after animation\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.ripples = this.ripples.filter(r => r.id !== id)\n\t\t\t}, 600)\n\t\t}\n\n\t\t// Navigate if href is provided\n\t\tif (this.href) {\n\t\t\tif (this.target === '_blank') {\n\t\t\t\twindow.open(this.href, '_blank')\n\t\t\t} else {\n\t\t\t\twindow.location.href = this.href\n\t\t\t}\n\t\t}\n\n\t\t// Dispatch action event\n\t\tthis.dispatchEvent(new CustomEvent('action', {\n\t\t\tdetail: { value: this.value },\n\t\t\tbubbles: true,\n\t\t\tcomposed: true\n\t\t}))\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\tif (this.disabled) return\n\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\tthis.pressed$.next(true)\n\n\t\t\t// Simulate click\n\t\t\tconst clickEvent = new MouseEvent('click', {\n\t\t\t\tbubbles: true,\n\t\t\t\tcancelable: true,\n\t\t\t\tclientX: 0,\n\t\t\t\tclientY: 0\n\t\t\t})\n\t\t\tthis.handleClick(clickEvent)\n\n\t\t\tsetTimeout(() => this.pressed$.next(false), 100)\n\t\t}\n\t}\n\n\tprivate handleFocus = () => {\n\t\tthis.focused$.next(true)\n\t}\n\n\tprivate handleBlur = () => {\n\t\tthis.focused$.next(false)\n\t}\n\n\trender() {\n\t\tconst hasIcon = !!this.icon;\n\n\t\tconst classes = {\n\t\t\t'relative': true,\n\t\t\t'inline-flex': true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t'h-8': true, // M3: 32px height\n\t\t\t'min-h-[32px]': true,\n\t\t\t'rounded-full': true,\n\t\t\t'cursor-pointer': !this.disabled,\n\t\t\t'transition-all': true,\n\t\t\t'duration-200': true,\n\t\t\t'select-none': true,\n\t\t\t'overflow-hidden': true,\n\n\t\t\t// M3 Padding: 8px with icon, 16px without (leading), 16px trailing\n\t\t\t'pl-2': hasIcon, // 8px with icon\n\t\t\t'pl-4': !hasIcon, // 16px without icon\n\t\t\t'pr-4': true, // 16px trailing\n\n\t\t\t// M3 Colors - assist chips are elevated by default\n\t\t\t'bg-surface-containerLow': true,\n\t\t\t'text-surface-onVariant': true,\n\n\t\t\t// M3: Assist chips elevated by default (shadow-1)\n\t\t\t'shadow-sm': this.elevated && !this.disabled, // shadow-1 for elevation\n\t\t\t'hover:shadow-md': this.elevated && !this.disabled, // elevated on hover\n\n\t\t\t// Focus state\n\t\t\t'focus-visible:outline': !this.disabled,\n\t\t\t'focus-visible:outline-2': !this.disabled,\n\t\t\t'focus-visible:outline-primary': !this.disabled,\n\t\t\t'focus-visible:outline-offset-2': !this.disabled,\n\n\t\t\t// Disabled\n\t\t\t'opacity-38': this.disabled, // M3 disabled opacity\n\t\t\t'cursor-not-allowed': this.disabled\n\t\t}\n\n\t\treturn html`\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=${classMap(classes)}\n\t\t\t\t?disabled=${this.disabled}\n\t\t\t\t@click=${this.handleClick}\n\t\t\t\t@keydown=${this.handleKeyDown}\n\t\t\t\t@mouseenter=${() => this.hover$.next(true)}\n\t\t\t\t@mouseleave=${() => this.hover$.next(false)}\n\t\t\t\t@mousedown=${() => this.pressed$.next(true)}\n\t\t\t\t@mouseup=${() => this.pressed$.next(false)}\n\t\t\t\t@focus=${this.handleFocus}\n\t\t\t\t@blur=${this.handleBlur}\n\t\t\t\ttabindex=${this.disabled ? '-1' : '0'}\n\t\t\t\trole=\"button\"\n\t\t\t\taria-disabled=${this.disabled}\n\t\t\t\taria-label=${this.value}\n\t\t\t>\n\t\t\t\t${this.icon ? html`\n\t\t\t\t\t<schmancy-icon class=\"text-[18px] shrink-0\">${this.icon}</schmancy-icon>\n\t\t\t\t` : ''}\n\t\t\t\t<span class=\"text-sm font-medium leading-5\">\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</span>\n\n\t\t\t\t<!-- Ripple effects -->\n\t\t\t\t${this.ripples.map(ripple => html`\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass=\"ripple\"\n\t\t\t\t\t\tstyle=\"left: ${ripple.x}px; top: ${ripple.y}px;\"\n\t\t\t\t\t></span>\n\t\t\t\t`)}\n\n\t\t\t\t<!-- State layer for M3 hover/focus/pressed states -->\n\t\t\t\t<div class=\"state-layer\"></div>\n\t\t\t</button>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-assist-chip': SchmancyAssistChip\n\t}\n}\n\nexport type AssistChipActionEvent = { value: string }","import { SchmancyElement } from '@mixins/index'\nimport { css, html, PropertyValues } from 'lit'\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js'\nimport { BehaviorSubject, combineLatest } from 'rxjs'\nimport { debounceTime, distinctUntilChanged, takeUntil } from 'rxjs/operators'\nimport { fullWidth } from '../directives/layout'\nimport type { FilterChipChangeEvent as SchmancyChipChangeEvent } from './filter-chip'\nimport { SchmancyFilterChip as SchmancyChip } from './filter-chip'\n\n@customElement('schmancy-chips')\nexport default class SchmancyChips extends SchmancyElement {\n\tstatic styles = [css`\n:host{\n\tdisplay:block;\n\theight:fit-content;\n\twidth:fit-content;\n}\n\n`]\n\n\n\t// RxJS state streams - initialized with undefined to detect if properties were set\n\tprivate value$ = new BehaviorSubject<string>('')\n\tprivate values$ = new BehaviorSubject<string[]>([])\n\n\t// Track if properties were initialized from attributes/properties\n\tprivate _value: string = ''\n\tprivate _values: string[] = []\n\tprivate _multi: boolean = false\n\n\t// Track if properties have been explicitly set\n\tprivate _valueSet: boolean = false\n\tprivate _valuesSet: boolean = false\n\n\t/**\n\t * @deprecated Use .values for multi-selection or .value for single-selection instead.\n\t * The mode is now automatically determined based on which property is used.\n\t */\n\t@property({\n\t\ttype: Boolean,\n\t\treflect: true,\n\t})\n\tget multi(): boolean {\n\t\treturn this._multi\n\t}\n\tset multi(value: boolean) {\n\t\tthis._multi = value\n\t\t// Note: We don't update any BehaviorSubject here as mode is now computed\n\t}\n\n\t/**\n\t * Automatically determines the selection mode based on which properties are in use\n\t */\n\tprivate get mode(): 'multi' | 'single' | 'none' {\n\t\t// Check if values array is being used (explicitly set)\n\t\tif (this._valuesSet) {\n\t\t\treturn 'multi'\n\t\t}\n\t\t// Check if value string is being used (explicitly set)\n\t\tif (this._valueSet) {\n\t\t\treturn 'single'\n\t\t}\n\t\t// Check if either property has been set via attributes\n\t\tif (this.hasAttribute('values')) {\n\t\t\treturn 'multi'\n\t\t}\n\t\tif (this.hasAttribute('value')) {\n\t\t\treturn 'single'\n\t\t}\n\t\t// Fallback to deprecated multi prop for backward compatibility\n\t\tif (this._multi === true) {\n\t\t\treturn 'multi'\n\t\t}\n\t\t// Default to none (no selection management)\n\t\treturn 'none'\n\t}\n\n\t@property({\n\t\ttype: Array,\n\t\treflect: true,\n\t})\n\tget values(): string[] {\n\t\treturn this._values\n\t}\n\tset values(value: string[]) {\n\t\tthis._values = value || []\n\t\tthis._valuesSet = true // Mark that values has been explicitly set\n\t\tthis.values$.next(this._values)\n\t}\n\n\t@property({\n\t\ttype: String,\n\t\treflect: true,\n\t})\n\tget value(): string {\n\t\treturn this._value\n\t}\n\tset value(value: string) {\n\t\tthis._value = value || ''\n\t\tthis._valueSet = true // Mark that value has been explicitly set\n\t\tthis.value$.next(this._value)\n\t}\n\n\t@queryAssignedElements({\n\t\tselector:\n\t\t\t'schmancy-chip, schmancy-filter-chip, schmancy-assist-chip, schmancy-input-chip, schmancy-suggestion-chip',\n\t\tflatten: true,\n\t})\n\tchips!: (SchmancyChip | HTMLElement)[]\n\n\t@property({\n\t\ttype: Boolean,\n\t\treflect: true,\n\t})\n\twrap: boolean = false\n\n\t@property({\n\t\ttype: Boolean,\n\t\treflect: true,\n\t})\n\trequired: boolean = false\n\n\t@property({\n\t\ttype: String,\n\t\treflect: true,\n\t})\n\tjustify: 'start' | 'center' | 'end' = 'start'\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Initialize BehaviorSubjects with current property values\n\t\t// This ensures properties set before connectedCallback are respected\n\t\tthis.value$.next(this._value)\n\t\tthis.values$.next(this._values)\n\n\t\t// Set up reactive pipeline for state synchronization\n\t\tcombineLatest([\n\t\t\tthis.value$.pipe(distinctUntilChanged()),\n\t\t\tthis.values$.pipe(\n\t\t\t\tdistinctUntilChanged((prev, curr) => prev.length === curr.length && prev.every((v, i) => v === curr[i])),\n\t\t\t),\n\t\t])\n\t\t\t.pipe(\n\t\t\t\tdebounceTime(0), // Ensure DOM is ready\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(([value, values]) => {\n\t\t\t\t// Reactively update chip states based on container state and auto-detected mode\n\t\t\t\tthis.updateChipStates(this.mode, value, values)\n\t\t\t})\n\t}\n\n\tprivate updateChipStates(mode: 'multi' | 'single' | 'none', value: string, values: string[]) {\n\t\tif (!this.chips) return\n\n\t\t// If mode is 'none', don't manage selection state\n\t\tif (mode === 'none') return\n\n\t\tthis.chips.forEach(chip => {\n\t\t\tif ('value' in chip && 'selected' in chip) {\n\t\t\t\tconst filterChip = chip as SchmancyChip\n\t\t\t\tif (mode === 'multi') {\n\t\t\t\t\t// In multi mode: only select if values array explicitly includes this chip's value\n\t\t\t\t\tfilterChip.selected = values.length > 0 && values.includes(filterChip.value)\n\t\t\t\t} else if (mode === 'single') {\n\t\t\t\t\t// In single mode: only select if value is non-empty AND matches this chip's value\n\t\t\t\t\t// This prevents chips from being selected when value is empty string\n\t\t\t\t\tfilterChip.selected = value !== '' && value === filterChip.value\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tasync change(e: CustomEvent<SchmancyChipChangeEvent>) {\n\t\te.preventDefault()\n\t\te.stopPropagation()\n\n\t\t// If mode is 'none', don't handle selection changes\n\t\tif (this.mode === 'none') return\n\n\t\tconst { value, selected } = e.detail\n\n\t\t// Update the reactive streams and internal tracking, which will trigger state synchronization\n\t\tif (this.mode === 'multi') {\n\t\t\tif (selected) {\n\t\t\t\t// Add value if not already present\n\t\t\t\tif (!this._values.includes(value)) {\n\t\t\t\t\tthis._values = [...this._values, value]\n\t\t\t\t\tthis.values$.next(this._values)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Remove value\n\t\t\t\tthis._values = this._values.filter(v => v !== value)\n\t\t\t\tthis.values$.next(this._values)\n\t\t\t}\n\t\t} else if (this.mode === 'single') {\n\t\t\tif (selected) {\n\t\t\t\tthis._value = value\n\t\t\t} else if (!this.required) {\n\t\t\t\t// Allow deselection if not required\n\t\t\t\tthis._value = ''\n\t\t\t} else {\n\t\t\t\t// Required mode - ignore deselection\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.value$.next(this._value)\n\t\t}\n\n\t\t// Request update to trigger re-render and property reflection\n\t\tthis.requestUpdate()\n\n\t\t// Dispatch change event with appropriate detail based on mode\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent<SchmancyChipsChangeEvent>('change', {\n\t\t\t\tdetail: this.mode === 'multi' ? this._values : this._value,\n\t\t\t\tbubbles: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprotected firstUpdated(_changedProperties: PropertyValues): void {\n\t\tsuper.firstUpdated(_changedProperties)\n\t\t// Initial state synchronization will happen through the reactive pipeline\n\t\t// Force an initial update to ensure chips are synchronized\n\t\tthis.updateChipStates(this.mode, this._value, this._values)\n\t}\n\n\tprotected render(): unknown {\n\t\tconst classes = {\n\t\t\t'flex flex-nowrap justify-center gap-2': true,\n\t\t\t'flex-wrap': this.wrap,\n\t\t\t'justify-center': this.justify === 'center',\n\t\t}\n\t\treturn html`\n\t\t\t<schmancy-scroll\n\t\t\t\thide\n\t\t\t\t.direction=${this.wrap ? 'vertical' : 'horizontal'}\n\t\t\t\tclass=\"${this.classMap(classes)}\"\n\t\t\t\t${fullWidth()}\n\t\t\t\t@change=${this.change}\n\t\t\t>\n\t\t\t\t<slot\n\t\t\t\t\t@slotchange=${() => {\n\t\t\t\t\t\t// When slot changes, trigger state update through reactive pipeline\n\t\t\t\t\t\tthis.updateChipStates(this.mode, this._value, this._values)\n\t\t\t\t\t}}\n\t\t\t\t></slot>\n\t\t\t</schmancy-scroll>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-chips': SchmancyChips\n\t}\n}\nexport type SchmancyChipsChangeEvent = string | Array<string>\n","import { SchmancyElement } from '@mixins/index'\nimport { css, html, LitElement } from 'lit'\nimport { property } from 'lit/decorators.js'\nimport { magnetic } from '../directives/magnetic'\n\n/**\n * Filter chip component for content filtering.\n *\n * Filter chips are the ONLY chip type that maintains persistent selected state.\n * They are used for filtering content by toggling on/off different filter criteria.\n *\n * @fires change - Dispatched when selection state changes with {value, selected}\n * @fires remove - Dispatched when remove button is clicked (if removable)\n *\n * @example\n * ```html\n * <schmancy-filter-chip value=\"category-1\" selected>\n * Category 1\n * </schmancy-filter-chip>\n * ```\n */\nexport class SchmancyFilterChip extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: inline-block;\n\t\toutline: none;\n\t\twidth: fit-content;\n\t\tmin-width: fit-content;\n\t\tborder-radius: 0.5rem;\n\t\ttransition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);\n\t}\n\n\t:host(:active:not([disabled])) {\n\t\ttransform: scale(0.95);\n\t\ttransition-duration: 100ms;\n\t}\n\n\t:host([disabled]) {\n\t\tpointer-events: none;\n\t\topacity: var(--schmancy-sys-state-disabled-opacity);\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\t:host { transition: none; }\n\t\t:host(:active:not([disabled])) { transform: none; }\n\t}\n\n\tbutton {\n\t\tfont-family: inherit;\n\t}\n`];\n\t/** Unique identifier for this filter chip */\n\t@property({ type: String, reflect: true })\n\tvalue: string = ''\n\n\t/** Whether the filter chip is selected (active filter) */\n\tprivate _selected: boolean = false\n\n\t@property({ type: Boolean, reflect: true })\n\tget selected(): boolean {\n\t\treturn this._selected\n\t}\n\tset selected(value: boolean) {\n\t\tconst oldValue = this._selected\n\t\tthis._selected = value\n\t\tthis.requestUpdate('selected', oldValue)\n\t}\n\n\t/** Whether to show a remove button */\n\t@property({ type: Boolean, reflect: true })\n\tremovable: boolean = false\n\n\t/** Whether the chip is disabled */\n\t@property({ type: Boolean, reflect: true })\n\tdisabled: boolean = false\n\n\t/** Whether to use elevated style with shadow */\n\t@property({ type: Boolean, reflect: true })\n\televated: boolean = false\n\n\n\tconstructor() {\n\t\tsuper()\n\t\ttry {\n\t\t\tthis.internals = this.attachInternals()\n\t\t} catch {\n\t\t\tthis.internals = undefined\n\t\t}\n\t}\n\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tdelegatesFocus: true,\n\t}\n\n\tstatic formAssociated = true\n\tinternals: ElementInternals | undefined\n\tget form() {\n\t\treturn this.internals?.form\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t}\n\n\tprotected updated(changed: Map<string, unknown>) {\n\t\tsuper.updated?.(changed)\n\t\tif (changed.has('value') || changed.has('selected')) {\n\t\t\tthis.internals?.setFormValue(this._selected ? (this.value || 'on') : null)\n\t\t}\n\t}\n\n\tformResetCallback(): void {\n\t\tthis._selected = this.hasAttribute('selected')\n\t}\n\n\tformDisabledCallback(disabled: boolean): void {\n\t\tthis.disabled = disabled\n\t}\n\n\tprivate handleClick = () => {\n\t\tif (this.disabled) return\n\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('change', {\n\t\t\t\tdetail: { value: this.value, selected: !this._selected },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate handleRemove = (e: Event) => {\n\t\tif (this.disabled) return\n\n\t\te.stopPropagation()\n\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('remove', {\n\t\t\t\tdetail: { value: this.value },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\tif (this.disabled) return\n\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\tthis.dispatchEvent(\n\t\t\t\tnew CustomEvent('change', {\n\t\t\t\t\tdetail: { value: this.value, selected: !this._selected },\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t}),\n\t\t\t)\n\t\t}\n\t}\n\n\n\tprotected render(): unknown {\n\t\tconst chipClasses = {\n\t\t\t'inline-flex': true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t'rounded-lg': true,\n\t\t\t'h-8 px-4': true,\n\t\t\t'cursor-pointer': !this.disabled,\n\t\t\t'transition-all': true,\n\t\t\t'duration-200': true,\n\t\t\t'select-none': true,\n\t\t\t'text-sm': true,\n\t\t\t'font-medium': true,\n\t\t\t'relative': true,\n\t\t\t'min-h-[32px]': true,\n\n\t\t\t// Background and text colors based on selection state\n\t\t\t'bg-secondary-container': this._selected,\n\t\t\t'text-secondary-onContainer': this._selected,\n\t\t\t'bg-surface-container': !this._selected,\n\t\t\t'text-surface-on': !this._selected,\n\n\t\t\t// Hover states\n\t\t\t'hover:brightness-95': this._selected && !this.disabled,\n\t\t\t'hover:bg-surface-containerHigh': !this._selected && !this.disabled,\n\n\t\t\t// Pressed state\n\t\t\t'active:brightness-90': !this.disabled,\n\n\t\t\t// Focus-visible state\n\t\t\t'focus-visible:outline': !this.disabled,\n\t\t\t'focus-visible:outline-2': !this.disabled,\n\t\t\t'focus-visible:outline-offset-2': !this.disabled,\n\t\t\t'focus-visible:outline-primary-default': !this.disabled,\n\n\t\t\t// Elevated style\n\t\t\t'shadow-md': this.elevated && !this.disabled,\n\t\t\t'hover:shadow-lg': this.elevated && !this.disabled,\n\n\t\t\t// Disabled state\n\t\t\t'opacity-[var(--schmancy-sys-state-disabled-opacity)]': this.disabled,\n\t\t\t'cursor-not-allowed': this.disabled,\n\t\t}\n\n\t\treturn html`\n\t\t\t<button\n\t\t\t\t${magnetic({ strength: 2, radius: 40 })}\n\t\t\t\tclass=${this.classMap(chipClasses)}\n\t\t\t\t@click=${this.handleClick}\n\t\t\t\t@keydown=${this.handleKeyDown}\n\t\t\t\t?disabled=${this.disabled}\n\t\t\t\taria-pressed=${this._selected ? 'true' : 'false'}\n\t\t\t\trole=\"checkbox\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t>\n\t\t\t\t<slot></slot>\n\n\t\t\t\t${this.removable\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tclass=\"ml-1 -mr-1 p-0.5 rounded-full hover:bg-surface-containerHighest transition-colors duration-200\"\n\t\t\t\t\t\t\t\t@click=${this.handleRemove}\n\t\t\t\t\t\t\t\taria-label=\"Remove filter\"\n\t\t\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span class=\"material-symbols-outlined text-sm\">close</span>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t`\n\t\t\t\t\t: ''}\n\t\t\t</button>\n\t\t`\n\t}\n}\n\nif (!customElements.get('schmancy-filter-chip')) {\n\tcustomElements.define('schmancy-filter-chip', SchmancyFilterChip)\n}\n\nif (!customElements.get('schmancy-chip')) {\n\tclass SchmancyChipCompat extends SchmancyFilterChip {}\n\tcustomElements.define('schmancy-chip', SchmancyChipCompat)\n}\n\nexport { SchmancyFilterChip as SchmancyChip }\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-chip': SchmancyFilterChip\n\t\t'schmancy-filter-chip': SchmancyFilterChip\n\t}\n}\n\nexport type FilterChipChangeEvent = { value: string; selected: boolean }\nexport type FilterChipRemoveEvent = { value: string }\nexport type SchmancyChipChangeEvent = FilterChipChangeEvent\n","import { SchmancyElement } from '@mixins/index'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { BehaviorSubject, combineLatest } from 'rxjs'\nimport { takeUntil } from 'rxjs/operators'\n\n/**\n * Suggestion chip component - provides contextual recommendations to users\n *\n * IMPORTANT: Suggestion chips do NOT have a selected state. They are designed to\n * provide suggestions and recommendations that trigger actions when clicked.\n * Unlike filter chips, they cannot be toggled on/off.\n *\n * Pure Schmancy implementation with Tailwind CSS and RxJS state management\n */\n@customElement('schmancy-suggestion-chip')\nexport class SchmancySuggestionChip extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: inline-block;\n\t\toutline: none;\n\t\twidth: fit-content;\n\t\tmin-width: fit-content;\n\t}\n\n\t:host([disabled]) {\n\t\tpointer-events: none;\n\t}\n\n\t.ripple {\n\t\tposition: absolute;\n\t\tborder-radius: 50%;\n\t\ttransform: scale(0);\n\t\tanimation: ripple 600ms linear;\n\t\tbackground-color: rgba(0, 0, 0, 0.08);\n\t\tpointer-events: none;\n\t}\n\n\t@keyframes ripple {\n\t\tto {\n\t\t\ttransform: scale(4);\n\t\t\topacity: 0;\n\t\t}\n\t}\n\n\t/* State layer for M3 hover/focus/pressed states */\n\t.state-layer {\n\t\tposition: absolute;\n\t\tinset: 0;\n\t\tborder-radius: inherit;\n\t\tpointer-events: none;\n\t\tbackground-color: currentColor;\n\t\topacity: 0;\n\t\ttransition: opacity 200ms ease;\n\t}\n\n\t:host(:not([disabled])) button:hover .state-layer {\n\t\topacity: 0.08;\n\t}\n\n\t:host(:not([disabled])) button:focus-visible .state-layer {\n\t\topacity: 0.1;\n\t}\n\n\t:host(:not([disabled])) button:active .state-layer {\n\t\topacity: 0.1;\n\t}\n`];\n\t/** Value identifier for the chip */\n\t@property({ reflect: true }) value = ''\n\n\t/** Optional icon name (Material Symbols) */\n\t@property({ reflect: true }) icon = ''\n\n\t/** Optional href for navigation */\n\t@property({ reflect: true }) href = ''\n\n\t/** Target for navigation (e.g., '_blank') */\n\t@property({ reflect: true }) target = ''\n\n\t/** Disable the chip */\n\t@property({ type: Boolean, reflect: true }) disabled = false\n\n\t/** Elevated style variant - flat by default per M3 spec */\n\t@property({ type: Boolean, reflect: true }) elevated = false\n\n\t// RxJS state streams\n\tprivate hover$ = new BehaviorSubject<boolean>(false)\n\tprivate pressed$ = new BehaviorSubject<boolean>(false)\n\tprivate focused$ = new BehaviorSubject<boolean>(false)\n\n\t// UI state - only ripples needed for rendering\n\t@state() private ripples: Array<{ x: number; y: number; id: number }> = []\n\n\tprotected static shadowRootOptions = { ...LitElement.shadowRootOptions, delegatesFocus: true }\n\n\tprivate nextRippleId = 0\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Stream management for future extensions\n\t\t// Currently, states are handled directly in event handlers\n\t\t// This pipeline can be extended for more complex state interactions\n\t\tcombineLatest([\n\t\t\tthis.hover$,\n\t\t\tthis.pressed$,\n\t\t\tthis.focused$\n\t\t]).pipe(\n\t\t\t// States are managed through event handlers directly\n\t\t\t// This pipeline is kept for potential future state combinations\n\t\t\ttakeUntil(this.disconnecting)\n\t\t).subscribe()\n\t}\n\n\tprivate handleClick = (e: MouseEvent) => {\n\t\tif (this.disabled) return\n\n\t\t// Add ripple effect\n\t\tconst button = this.shadowRoot?.querySelector('button')\n\t\tif (button) {\n\t\t\tconst rect = button.getBoundingClientRect()\n\t\t\tconst x = e.clientX - rect.left\n\t\t\tconst y = e.clientY - rect.top\n\t\t\tconst id = this.nextRippleId++\n\n\t\t\tthis.ripples = [...this.ripples, { x, y, id }]\n\n\t\t\t// Remove ripple after animation\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.ripples = this.ripples.filter(r => r.id !== id)\n\t\t\t}, 600)\n\t\t}\n\n\t\t// Navigate if href is provided\n\t\tif (this.href) {\n\t\t\tif (this.target === '_blank') {\n\t\t\t\twindow.open(this.href, '_blank')\n\t\t\t} else {\n\t\t\t\twindow.location.href = this.href\n\t\t\t}\n\t\t}\n\n\t\t// Dispatch action event\n\t\tthis.dispatchEvent(new CustomEvent('action', {\n\t\t\tdetail: { value: this.value },\n\t\t\tbubbles: true,\n\t\t\tcomposed: true\n\t\t}))\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\tif (this.disabled) return\n\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\tthis.pressed$.next(true)\n\n\t\t\t// Simulate click\n\t\t\tconst clickEvent = new MouseEvent('click', {\n\t\t\t\tbubbles: true,\n\t\t\t\tcancelable: true,\n\t\t\t\tclientX: 0,\n\t\t\t\tclientY: 0\n\t\t\t})\n\t\t\tthis.handleClick(clickEvent)\n\n\t\t\tsetTimeout(() => this.pressed$.next(false), 100)\n\t\t}\n\t}\n\n\tprivate handleFocus = () => {\n\t\tthis.focused$.next(true)\n\t}\n\n\tprivate handleBlur = () => {\n\t\tthis.focused$.next(false)\n\t}\n\n\tprotected render(): unknown {\n\t\tconst hasIcon = !!this.icon;\n\n\t\tconst classes = {\n\t\t\t'relative': true,\n\t\t\t'inline-flex': true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t'h-8': true, // M3: 32px height\n\t\t\t'min-h-[32px]': true,\n\t\t\t'rounded-full': true,\n\t\t\t'cursor-pointer': !this.disabled,\n\t\t\t'transition-all': true,\n\t\t\t'duration-200': true,\n\t\t\t'select-none': true,\n\t\t\t'overflow-hidden': true,\n\n\t\t\t// M3 Padding: 8px with icon, 16px without (leading), 16px trailing\n\t\t\t'pl-2': hasIcon, // 8px with icon\n\t\t\t'pl-4': !hasIcon, // 16px without icon\n\t\t\t'pr-4': true, // 16px trailing\n\n\t\t\t// M3 Colors for suggestion chips\n\t\t\t'bg-surface-containerLow': true,\n\t\t\t'text-surface-onVariant': true,\n\n\t\t\t// Suggestion chips are flat by default (no elevation per M3)\n\n\t\t\t// Focus state\n\t\t\t'focus-visible:outline': !this.disabled,\n\t\t\t'focus-visible:outline-2': !this.disabled,\n\t\t\t'focus-visible:outline-primary': !this.disabled,\n\t\t\t'focus-visible:outline-offset-2': !this.disabled,\n\n\t\t\t// Disabled\n\t\t\t'opacity-38': this.disabled, // M3 disabled opacity\n\t\t\t'cursor-not-allowed': this.disabled\n\t\t}\n\n\t\treturn html`\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=${classMap(classes)}\n\t\t\t\t?disabled=${this.disabled}\n\t\t\t\t@click=${this.handleClick}\n\t\t\t\t@keydown=${this.handleKeyDown}\n\t\t\t\t@mouseenter=${() => this.hover$.next(true)}\n\t\t\t\t@mouseleave=${() => this.hover$.next(false)}\n\t\t\t\t@mousedown=${() => this.pressed$.next(true)}\n\t\t\t\t@mouseup=${() => this.pressed$.next(false)}\n\t\t\t\t@focus=${this.handleFocus}\n\t\t\t\t@blur=${this.handleBlur}\n\t\t\t\ttabindex=${this.disabled ? '-1' : '0'}\n\t\t\t\trole=\"button\"\n\t\t\t\taria-disabled=${this.disabled}\n\t\t\t\taria-label=${this.value}\n\t\t\t>\n\t\t\t\t${this.icon ? html`\n\t\t\t\t\t<schmancy-icon class=\"text-[18px] shrink-0\">${this.icon}</schmancy-icon>\n\t\t\t\t` : ''}\n\t\t\t\t<span class=\"text-sm font-medium leading-5\">\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</span>\n\n\t\t\t\t<!-- Ripple effects -->\n\t\t\t\t${this.ripples.map(ripple => html`\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass=\"ripple\"\n\t\t\t\t\t\tstyle=\"left: ${ripple.x}px; top: ${ripple.y}px;\"\n\t\t\t\t\t></span>\n\t\t\t\t`)}\n\n\t\t\t\t<!-- State layer for M3 hover/focus/pressed states -->\n\t\t\t\t<div class=\"state-layer\"></div>\n\t\t\t</button>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-suggestion-chip': SchmancySuggestionChip\n\t}\n}\n\nexport type SuggestionChipActionEvent = { value: string }"],"mappings":";;;;;;;;;;AAYO,IAAA,IAAA,cAAiC,EAAA;CAAA,YAAA,GAAA,GAAA;EAAA,MAAA,GAAA,EAAA,EAAA,KAAA,QAqDF,IAAA,KAAA,OAGD,IAAA,KAAA,OAGA,IAAA,KAAA,SAGE,IAAA,KAAA,WAAA,CAGiB,GAAA,KAAA,WAAA,CAGA,GAAA,KAAA,SAGtC,IAAI,EAAA,CAAyB,EAAA,EAAA,KAAA,WAC3B,IAAI,EAAA,CAAyB,EAAA,EAAA,KAAA,WAC7B,IAAI,EAAA,CAAyB,EAAA,EAAA,KAAA,UAGwB,EAAA,EAAA,KAAA,eAIjD,GAAA,KAAA,eAmBA,MAAA;GACtB,IAAI,KAAK,UAAU;GAGnB,IAAM,IAAS,KAAK,YAAY,cAAc,SAAA;GAC9C,IAAI,GAAQ;IACX,IAAM,IAAO,EAAO,uBAAA,EACd,IAAI,EAAE,UAAU,EAAK,MACrB,IAAI,EAAE,UAAU,EAAK,KACrB,IAAK,KAAK;IAEhB,KAAK,UAAU,CAAA,GAAI,KAAK,SAAS;KAAE,GAAA;KAAG,GAAA;KAAG,IAAA;KAAA,CAAA,EAGzC,iBAAA;KACC,KAAK,UAAU,KAAK,QAAQ,QAAO,MAAK,EAAE,OAAO,EAAA;OAC/C,IAAA;;GAIA,KAAK,SACJ,KAAK,WAAW,WACnB,OAAO,KAAK,KAAK,MAAM,SAAA,GAEvB,OAAO,SAAS,OAAO,KAAK,OAK9B,KAAK,cAAc,IAAI,YAAY,UAAU;IAC5C,QAAQ,EAAE,OAAO,KAAK,OAAA;IACtB,S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AAA,EAAA,CAG3B,EAAS,EAAE,SAAA,CAAS,GAAA,CAAA,CAAA,EAAO,EAAA,WAAA,QAAA,KAAA,EAAA,EAAA,EAAA,CAG3B,EAAS,EAAE,SAAA,CAAS,GAAA,CAAA,CAAA,EAAO,EAAA,WAAA,UAAA,KAAA,EAAA,EAAA,EAAA,CAG3B,EAAS;CAAE,MAAM;CAAS,SAAA,CAAS;CAAA,CAAA,CAAA,EAAO,EAAA,WAAA,YAAA,KAAA,EAAA,EAAA,EAAA,CAG1C,EAAS;CAAE,MAAM;CAAS,SAAA,CAAS;CAAA,CAAA,CAAA,EAAO,EAAA,WAAA,YAAA,KAAA,EAAA,EAAA,EAAA,CAQ1C,GAAA,CAAA,EAAO,EAAA,WAAA,WAAA,KAAA,EAAA,EAAA,IAAA,EAAA,CA7ER,EAAc,2BAAA,CAAA,EAA2B,EAAA;AAAA,SAAA,KAAA,GAAA,KAAA,GAAA,KAAA"}
|
|
1
|
+
{"version":3,"file":"chips-D1kJrbzo.js","names":[],"sources":["../src/chips/assist-chip.ts","../src/chips/chips.ts","../src/chips/filter-chip.ts","../src/chips/suggestion-chip.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { BehaviorSubject, combineLatest } from 'rxjs'\nimport { takeUntil } from 'rxjs/operators'\n\n/**\n * Assist chip component - prompts user actions like opening calendar events or sharing content\n * Pure Schmancy implementation with Tailwind CSS and RxJS state management\n */\n@customElement('schmancy-assist-chip')\nexport class SchmancyAssistChip extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: inline-block;\n\t\toutline: none;\n\t\twidth: fit-content;\n\t\tmin-width: fit-content;\n\t}\n\n\t:host([disabled]) {\n\t\tpointer-events: none;\n\t}\n\n\t.ripple {\n\t\tposition: absolute;\n\t\tborder-radius: 50%;\n\t\ttransform: scale(0);\n\t\tanimation: ripple 600ms linear;\n\t\tbackground-color: rgba(0, 0, 0, 0.08);\n\t\tpointer-events: none;\n\t}\n\n\t@keyframes ripple {\n\t\tto {\n\t\t\ttransform: scale(4);\n\t\t\topacity: 0;\n\t\t}\n\t}\n\n\t/* State layer for M3 hover/focus/pressed states */\n\t.state-layer {\n\t\tposition: absolute;\n\t\tinset: 0;\n\t\tborder-radius: inherit;\n\t\tpointer-events: none;\n\t\tbackground-color: currentColor;\n\t\topacity: 0;\n\t\ttransition: opacity 200ms ease;\n\t}\n\n\t:host(:not([disabled])) button:hover .state-layer {\n\t\topacity: 0.08;\n\t}\n\n\t:host(:not([disabled])) button:focus-visible .state-layer {\n\t\topacity: 0.1;\n\t}\n\n\t:host(:not([disabled])) button:active .state-layer {\n\t\topacity: 0.1;\n\t}\n`];\n\t/** Value identifier for the chip */\n\t@property({ reflect: true }) value = ''\n\n\t/** Optional icon name (Material Symbols) */\n\t@property({ reflect: true }) icon = ''\n\n\t/** Optional href for navigation */\n\t@property({ reflect: true }) href = ''\n\n\t/** Target for navigation (e.g., '_blank') */\n\t@property({ reflect: true }) target = ''\n\n\t/** Disable the chip */\n\t@property({ type: Boolean, reflect: true }) disabled = false\n\n\t/** Elevated style variant - true by default per M3 spec for assist chips */\n\t@property({ type: Boolean, reflect: true }) elevated = true\n\n\t// RxJS state streams\n\tprivate hover$ = new BehaviorSubject<boolean>(false)\n\tprivate pressed$ = new BehaviorSubject<boolean>(false)\n\tprivate focused$ = new BehaviorSubject<boolean>(false)\n\n\t// UI state - only ripples needed for rendering\n\t@state() private ripples: Array<{ x: number; y: number; id: number }> = []\n\n\tprotected static shadowRootOptions = { ...LitElement.shadowRootOptions, delegatesFocus: true }\n\n\tprivate nextRippleId = 0\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Stream management for future extensions\n\t\t// Currently, states are handled directly in event handlers\n\t\t// This pipeline can be extended for more complex state interactions\n\t\tcombineLatest([\n\t\t\tthis.hover$,\n\t\t\tthis.pressed$,\n\t\t\tthis.focused$\n\t\t]).pipe(\n\t\t\t// States are managed through event handlers directly\n\t\t\t// This pipeline is kept for potential future state combinations\n\t\t\ttakeUntil(this.disconnecting)\n\t\t).subscribe()\n\t}\n\n\tprivate handleClick = (e: MouseEvent) => {\n\t\tif (this.disabled) return\n\n\t\t// Add ripple effect\n\t\tconst button = this.shadowRoot?.querySelector('button')\n\t\tif (button) {\n\t\t\tconst rect = button.getBoundingClientRect()\n\t\t\tconst x = e.clientX - rect.left\n\t\t\tconst y = e.clientY - rect.top\n\t\t\tconst id = this.nextRippleId++\n\n\t\t\tthis.ripples = [...this.ripples, { x, y, id }]\n\n\t\t\t// Remove ripple after animation\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.ripples = this.ripples.filter(r => r.id !== id)\n\t\t\t}, 600)\n\t\t}\n\n\t\t// Navigate if href is provided\n\t\tif (this.href) {\n\t\t\tif (this.target === '_blank') {\n\t\t\t\twindow.open(this.href, '_blank')\n\t\t\t} else {\n\t\t\t\twindow.location.href = this.href\n\t\t\t}\n\t\t}\n\n\t\t// Dispatch action event\n\t\tthis.dispatchEvent(new CustomEvent('action', {\n\t\t\tdetail: { value: this.value },\n\t\t\tbubbles: true,\n\t\t\tcomposed: true\n\t\t}))\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\tif (this.disabled) return\n\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\tthis.pressed$.next(true)\n\n\t\t\t// Simulate click\n\t\t\tconst clickEvent = new MouseEvent('click', {\n\t\t\t\tbubbles: true,\n\t\t\t\tcancelable: true,\n\t\t\t\tclientX: 0,\n\t\t\t\tclientY: 0\n\t\t\t})\n\t\t\tthis.handleClick(clickEvent)\n\n\t\t\tsetTimeout(() => this.pressed$.next(false), 100)\n\t\t}\n\t}\n\n\tprivate handleFocus = () => {\n\t\tthis.focused$.next(true)\n\t}\n\n\tprivate handleBlur = () => {\n\t\tthis.focused$.next(false)\n\t}\n\n\trender() {\n\t\tconst hasIcon = !!this.icon;\n\n\t\tconst classes = {\n\t\t\t'relative': true,\n\t\t\t'inline-flex': true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t'h-8': true, // M3: 32px height\n\t\t\t'min-h-[32px]': true,\n\t\t\t'rounded-full': true,\n\t\t\t'cursor-pointer': !this.disabled,\n\t\t\t'transition-all': true,\n\t\t\t'duration-200': true,\n\t\t\t'select-none': true,\n\t\t\t'overflow-hidden': true,\n\n\t\t\t// M3 Padding: 8px with icon, 16px without (leading), 16px trailing\n\t\t\t'pl-2': hasIcon, // 8px with icon\n\t\t\t'pl-4': !hasIcon, // 16px without icon\n\t\t\t'pr-4': true, // 16px trailing\n\n\t\t\t// M3 Colors - assist chips are elevated by default\n\t\t\t'bg-surface-containerLow': true,\n\t\t\t'text-surface-onVariant': true,\n\n\t\t\t// M3: Assist chips elevated by default (shadow-1)\n\t\t\t'shadow-sm': this.elevated && !this.disabled, // shadow-1 for elevation\n\t\t\t'hover:shadow-md': this.elevated && !this.disabled, // elevated on hover\n\n\t\t\t// Focus state\n\t\t\t'focus-visible:outline': !this.disabled,\n\t\t\t'focus-visible:outline-2': !this.disabled,\n\t\t\t'focus-visible:outline-primary': !this.disabled,\n\t\t\t'focus-visible:outline-offset-2': !this.disabled,\n\n\t\t\t// Disabled\n\t\t\t'opacity-38': this.disabled, // M3 disabled opacity\n\t\t\t'cursor-not-allowed': this.disabled\n\t\t}\n\n\t\treturn html`\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=${classMap(classes)}\n\t\t\t\t?disabled=${this.disabled}\n\t\t\t\t@click=${this.handleClick}\n\t\t\t\t@keydown=${this.handleKeyDown}\n\t\t\t\t@mouseenter=${() => this.hover$.next(true)}\n\t\t\t\t@mouseleave=${() => this.hover$.next(false)}\n\t\t\t\t@mousedown=${() => this.pressed$.next(true)}\n\t\t\t\t@mouseup=${() => this.pressed$.next(false)}\n\t\t\t\t@focus=${this.handleFocus}\n\t\t\t\t@blur=${this.handleBlur}\n\t\t\t\ttabindex=${this.disabled ? '-1' : '0'}\n\t\t\t\trole=\"button\"\n\t\t\t\taria-disabled=${this.disabled}\n\t\t\t\taria-label=${this.value}\n\t\t\t>\n\t\t\t\t${this.icon ? html`\n\t\t\t\t\t<schmancy-icon class=\"text-[18px] shrink-0\">${this.icon}</schmancy-icon>\n\t\t\t\t` : ''}\n\t\t\t\t<span class=\"text-sm font-medium leading-5\">\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</span>\n\n\t\t\t\t<!-- Ripple effects -->\n\t\t\t\t${this.ripples.map(ripple => html`\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass=\"ripple\"\n\t\t\t\t\t\tstyle=\"left: ${ripple.x}px; top: ${ripple.y}px;\"\n\t\t\t\t\t></span>\n\t\t\t\t`)}\n\n\t\t\t\t<!-- State layer for M3 hover/focus/pressed states -->\n\t\t\t\t<div class=\"state-layer\"></div>\n\t\t\t</button>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-assist-chip': SchmancyAssistChip\n\t}\n}\n\nexport type AssistChipActionEvent = { value: string }","import { SchmancyElement } from '@mixins/index'\nimport { css, html, PropertyValues } from 'lit'\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js'\nimport { BehaviorSubject, combineLatest } from 'rxjs'\nimport { debounceTime, distinctUntilChanged, takeUntil } from 'rxjs/operators'\nimport { fullWidth } from '../directives/layout'\nimport type { FilterChipChangeEvent as SchmancyChipChangeEvent } from './filter-chip'\nimport { SchmancyFilterChip as SchmancyChip } from './filter-chip'\n\n@customElement('schmancy-chips')\nexport default class SchmancyChips extends SchmancyElement {\n\tstatic styles = [css`\n:host{\n\tdisplay:block;\n\theight:fit-content;\n\twidth:fit-content;\n}\n\n`]\n\n\n\t// RxJS state streams - initialized with undefined to detect if properties were set\n\tprivate value$ = new BehaviorSubject<string>('')\n\tprivate values$ = new BehaviorSubject<string[]>([])\n\n\t// Track if properties were initialized from attributes/properties\n\tprivate _value: string = ''\n\tprivate _values: string[] = []\n\tprivate _multi: boolean = false\n\n\t// Track if properties have been explicitly set\n\tprivate _valueSet: boolean = false\n\tprivate _valuesSet: boolean = false\n\n\t/**\n\t * @deprecated Use .values for multi-selection or .value for single-selection instead.\n\t * The mode is now automatically determined based on which property is used.\n\t */\n\t@property({\n\t\ttype: Boolean,\n\t\treflect: true,\n\t})\n\tget multi(): boolean {\n\t\treturn this._multi\n\t}\n\tset multi(value: boolean) {\n\t\tthis._multi = value\n\t\t// Note: We don't update any BehaviorSubject here as mode is now computed\n\t}\n\n\t/**\n\t * Automatically determines the selection mode based on which properties are in use\n\t */\n\tprivate get mode(): 'multi' | 'single' | 'none' {\n\t\t// Check if values array is being used (explicitly set)\n\t\tif (this._valuesSet) {\n\t\t\treturn 'multi'\n\t\t}\n\t\t// Check if value string is being used (explicitly set)\n\t\tif (this._valueSet) {\n\t\t\treturn 'single'\n\t\t}\n\t\t// Check if either property has been set via attributes\n\t\tif (this.hasAttribute('values')) {\n\t\t\treturn 'multi'\n\t\t}\n\t\tif (this.hasAttribute('value')) {\n\t\t\treturn 'single'\n\t\t}\n\t\t// Fallback to deprecated multi prop for backward compatibility\n\t\tif (this._multi === true) {\n\t\t\treturn 'multi'\n\t\t}\n\t\t// Default to none (no selection management)\n\t\treturn 'none'\n\t}\n\n\t@property({\n\t\ttype: Array,\n\t\treflect: true,\n\t})\n\tget values(): string[] {\n\t\treturn this._values\n\t}\n\tset values(value: string[]) {\n\t\tthis._values = value || []\n\t\tthis._valuesSet = true // Mark that values has been explicitly set\n\t\tthis.values$.next(this._values)\n\t}\n\n\t@property({\n\t\ttype: String,\n\t\treflect: true,\n\t})\n\tget value(): string {\n\t\treturn this._value\n\t}\n\tset value(value: string) {\n\t\tthis._value = value || ''\n\t\tthis._valueSet = true // Mark that value has been explicitly set\n\t\tthis.value$.next(this._value)\n\t}\n\n\t@queryAssignedElements({\n\t\tselector:\n\t\t\t'schmancy-chip, schmancy-filter-chip, schmancy-assist-chip, schmancy-input-chip, schmancy-suggestion-chip',\n\t\tflatten: true,\n\t})\n\tchips!: (SchmancyChip | HTMLElement)[]\n\n\t@property({\n\t\ttype: Boolean,\n\t\treflect: true,\n\t})\n\twrap: boolean = false\n\n\t@property({\n\t\ttype: Boolean,\n\t\treflect: true,\n\t})\n\trequired: boolean = false\n\n\t@property({\n\t\ttype: String,\n\t\treflect: true,\n\t})\n\tjustify: 'start' | 'center' | 'end' = 'start'\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Initialize BehaviorSubjects with current property values\n\t\t// This ensures properties set before connectedCallback are respected\n\t\tthis.value$.next(this._value)\n\t\tthis.values$.next(this._values)\n\n\t\t// Set up reactive pipeline for state synchronization\n\t\tcombineLatest([\n\t\t\tthis.value$.pipe(distinctUntilChanged()),\n\t\t\tthis.values$.pipe(\n\t\t\t\tdistinctUntilChanged((prev, curr) => prev.length === curr.length && prev.every((v, i) => v === curr[i])),\n\t\t\t),\n\t\t])\n\t\t\t.pipe(\n\t\t\t\tdebounceTime(0), // Ensure DOM is ready\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(([value, values]) => {\n\t\t\t\t// Reactively update chip states based on container state and auto-detected mode\n\t\t\t\tthis.updateChipStates(this.mode, value, values)\n\t\t\t})\n\t}\n\n\tprivate updateChipStates(mode: 'multi' | 'single' | 'none', value: string, values: string[]) {\n\t\tif (!this.chips) return\n\n\t\t// If mode is 'none', don't manage selection state\n\t\tif (mode === 'none') return\n\n\t\tthis.chips.forEach(chip => {\n\t\t\tif ('value' in chip && 'selected' in chip) {\n\t\t\t\tconst filterChip = chip as SchmancyChip\n\t\t\t\tif (mode === 'multi') {\n\t\t\t\t\t// In multi mode: only select if values array explicitly includes this chip's value\n\t\t\t\t\tfilterChip.selected = values.length > 0 && values.includes(filterChip.value)\n\t\t\t\t} else if (mode === 'single') {\n\t\t\t\t\t// In single mode: only select if value is non-empty AND matches this chip's value\n\t\t\t\t\t// This prevents chips from being selected when value is empty string\n\t\t\t\t\tfilterChip.selected = value !== '' && value === filterChip.value\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tasync change(e: CustomEvent<SchmancyChipChangeEvent>) {\n\t\te.preventDefault()\n\t\te.stopPropagation()\n\n\t\t// If mode is 'none', don't handle selection changes\n\t\tif (this.mode === 'none') return\n\n\t\tconst { value, selected } = e.detail\n\n\t\t// Update the reactive streams and internal tracking, which will trigger state synchronization\n\t\tif (this.mode === 'multi') {\n\t\t\tif (selected) {\n\t\t\t\t// Add value if not already present\n\t\t\t\tif (!this._values.includes(value)) {\n\t\t\t\t\tthis._values = [...this._values, value]\n\t\t\t\t\tthis.values$.next(this._values)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Remove value\n\t\t\t\tthis._values = this._values.filter(v => v !== value)\n\t\t\t\tthis.values$.next(this._values)\n\t\t\t}\n\t\t} else if (this.mode === 'single') {\n\t\t\tif (selected) {\n\t\t\t\tthis._value = value\n\t\t\t} else if (!this.required) {\n\t\t\t\t// Allow deselection if not required\n\t\t\t\tthis._value = ''\n\t\t\t} else {\n\t\t\t\t// Required mode - ignore deselection\n\t\t\t\treturn\n\t\t\t}\n\t\t\tthis.value$.next(this._value)\n\t\t}\n\n\t\t// Request update to trigger re-render and property reflection\n\t\tthis.requestUpdate()\n\n\t\t// Dispatch change event with appropriate detail based on mode\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent<SchmancyChipsChangeEvent>('change', {\n\t\t\t\tdetail: this.mode === 'multi' ? this._values : this._value,\n\t\t\t\tbubbles: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprotected firstUpdated(_changedProperties: PropertyValues): void {\n\t\tsuper.firstUpdated(_changedProperties)\n\t\t// Initial state synchronization will happen through the reactive pipeline\n\t\t// Force an initial update to ensure chips are synchronized\n\t\tthis.updateChipStates(this.mode, this._value, this._values)\n\t}\n\n\tprotected render(): unknown {\n\t\tconst classes = {\n\t\t\t'flex flex-nowrap justify-center gap-2': true,\n\t\t\t'flex-wrap': this.wrap,\n\t\t\t'justify-center': this.justify === 'center',\n\t\t}\n\t\treturn html`\n\t\t\t<schmancy-scroll\n\t\t\t\thide\n\t\t\t\t.direction=${this.wrap ? 'vertical' : 'horizontal'}\n\t\t\t\tclass=\"${this.classMap(classes)}\"\n\t\t\t\t${fullWidth()}\n\t\t\t\t@change=${this.change}\n\t\t\t>\n\t\t\t\t<slot\n\t\t\t\t\t@slotchange=${() => {\n\t\t\t\t\t\t// When slot changes, trigger state update through reactive pipeline\n\t\t\t\t\t\tthis.updateChipStates(this.mode, this._value, this._values)\n\t\t\t\t\t}}\n\t\t\t\t></slot>\n\t\t\t</schmancy-scroll>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-chips': SchmancyChips\n\t}\n}\nexport type SchmancyChipsChangeEvent = string | Array<string>\n","import { SchmancyElement } from '@mixins/index'\nimport { css, html, LitElement } from 'lit'\nimport { property } from 'lit/decorators.js'\nimport { magnetic } from '../directives/magnetic'\n\n/**\n * Filter chip component for content filtering.\n *\n * Filter chips are the ONLY chip type that maintains persistent selected state.\n * They are used for filtering content by toggling on/off different filter criteria.\n *\n * @fires change - Dispatched when selection state changes with {value, selected}\n * @fires remove - Dispatched when remove button is clicked (if removable)\n *\n * @example\n * ```html\n * <schmancy-filter-chip value=\"category-1\" selected>\n * Category 1\n * </schmancy-filter-chip>\n * ```\n */\nexport class SchmancyFilterChip extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: inline-block;\n\t\toutline: none;\n\t\twidth: fit-content;\n\t\tmin-width: fit-content;\n\t\tborder-radius: 0.5rem;\n\t\ttransition: transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);\n\t}\n\n\t:host(:active:not([disabled])) {\n\t\ttransform: scale(0.95);\n\t\ttransition-duration: 100ms;\n\t}\n\n\t:host([disabled]) {\n\t\tpointer-events: none;\n\t\topacity: var(--schmancy-sys-state-disabled-opacity);\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\t:host { transition: none; }\n\t\t:host(:active:not([disabled])) { transform: none; }\n\t}\n\n\tbutton {\n\t\tfont-family: inherit;\n\t}\n`];\n\t/** Unique identifier for this filter chip */\n\t@property({ type: String, reflect: true })\n\tvalue: string = ''\n\n\t/** Whether the filter chip is selected (active filter) */\n\tprivate _selected: boolean = false\n\n\t@property({ type: Boolean, reflect: true })\n\tget selected(): boolean {\n\t\treturn this._selected\n\t}\n\tset selected(value: boolean) {\n\t\tconst oldValue = this._selected\n\t\tthis._selected = value\n\t\tthis.requestUpdate('selected', oldValue)\n\t}\n\n\t/** Whether to show a remove button */\n\t@property({ type: Boolean, reflect: true })\n\tremovable: boolean = false\n\n\t/** Whether the chip is disabled */\n\t@property({ type: Boolean, reflect: true })\n\tdisabled: boolean = false\n\n\t/** Whether to use elevated style with shadow */\n\t@property({ type: Boolean, reflect: true })\n\televated: boolean = false\n\n\n\tconstructor() {\n\t\tsuper()\n\t\ttry {\n\t\t\tthis.internals = this.attachInternals()\n\t\t} catch {\n\t\t\tthis.internals = undefined\n\t\t}\n\t}\n\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tdelegatesFocus: true,\n\t}\n\n\tstatic formAssociated = true\n\tinternals: ElementInternals | undefined\n\tget form() {\n\t\treturn this.internals?.form\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t}\n\n\tprotected updated(changed: Map<string, unknown>) {\n\t\tsuper.updated?.(changed)\n\t\tif (changed.has('value') || changed.has('selected')) {\n\t\t\tthis.internals?.setFormValue(this._selected ? (this.value || 'on') : null)\n\t\t}\n\t}\n\n\tformResetCallback(): void {\n\t\tthis._selected = this.hasAttribute('selected')\n\t}\n\n\tformDisabledCallback(disabled: boolean): void {\n\t\tthis.disabled = disabled\n\t}\n\n\tprivate handleClick = () => {\n\t\tif (this.disabled) return\n\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('change', {\n\t\t\t\tdetail: { value: this.value, selected: !this._selected },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate handleRemove = (e: Event) => {\n\t\tif (this.disabled) return\n\n\t\te.stopPropagation()\n\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('remove', {\n\t\t\t\tdetail: { value: this.value },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\tif (this.disabled) return\n\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\tthis.dispatchEvent(\n\t\t\t\tnew CustomEvent('change', {\n\t\t\t\t\tdetail: { value: this.value, selected: !this._selected },\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t}),\n\t\t\t)\n\t\t}\n\t}\n\n\n\tprotected render(): unknown {\n\t\tconst chipClasses = {\n\t\t\t'inline-flex': true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t'rounded-lg': true,\n\t\t\t'h-8 px-4': true,\n\t\t\t'cursor-pointer': !this.disabled,\n\t\t\t'transition-all': true,\n\t\t\t'duration-200': true,\n\t\t\t'select-none': true,\n\t\t\t'text-sm': true,\n\t\t\t'font-medium': true,\n\t\t\t'relative': true,\n\t\t\t'min-h-[32px]': true,\n\n\t\t\t// Background and text colors based on selection state\n\t\t\t'bg-secondary-container': this._selected,\n\t\t\t'text-secondary-onContainer': this._selected,\n\t\t\t'bg-surface-container': !this._selected,\n\t\t\t'text-surface-on': !this._selected,\n\n\t\t\t// Hover states\n\t\t\t'hover:brightness-95': this._selected && !this.disabled,\n\t\t\t'hover:bg-surface-containerHigh': !this._selected && !this.disabled,\n\n\t\t\t// Pressed state\n\t\t\t'active:brightness-90': !this.disabled,\n\n\t\t\t// Focus-visible state\n\t\t\t'focus-visible:outline': !this.disabled,\n\t\t\t'focus-visible:outline-2': !this.disabled,\n\t\t\t'focus-visible:outline-offset-2': !this.disabled,\n\t\t\t'focus-visible:outline-primary-default': !this.disabled,\n\n\t\t\t// Elevated style\n\t\t\t'shadow-md': this.elevated && !this.disabled,\n\t\t\t'hover:shadow-lg': this.elevated && !this.disabled,\n\n\t\t\t// Disabled state\n\t\t\t'opacity-[var(--schmancy-sys-state-disabled-opacity)]': this.disabled,\n\t\t\t'cursor-not-allowed': this.disabled,\n\t\t}\n\n\t\treturn html`\n\t\t\t<button\n\t\t\t\t${magnetic({ strength: 2, radius: 40 })}\n\t\t\t\tclass=${this.classMap(chipClasses)}\n\t\t\t\t@click=${this.handleClick}\n\t\t\t\t@keydown=${this.handleKeyDown}\n\t\t\t\t?disabled=${this.disabled}\n\t\t\t\taria-pressed=${this._selected ? 'true' : 'false'}\n\t\t\t\trole=\"checkbox\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t>\n\t\t\t\t<slot></slot>\n\n\t\t\t\t${this.removable\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tclass=\"ml-1 -mr-1 p-0.5 rounded-full hover:bg-surface-containerHighest transition-colors duration-200\"\n\t\t\t\t\t\t\t\t@click=${this.handleRemove}\n\t\t\t\t\t\t\t\taria-label=\"Remove filter\"\n\t\t\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span class=\"material-symbols-outlined text-sm\">close</span>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t`\n\t\t\t\t\t: ''}\n\t\t\t</button>\n\t\t`\n\t}\n}\n\nif (!customElements.get('schmancy-filter-chip')) {\n\tcustomElements.define('schmancy-filter-chip', SchmancyFilterChip)\n}\n\nif (!customElements.get('schmancy-chip')) {\n\tclass SchmancyChipCompat extends SchmancyFilterChip {}\n\tcustomElements.define('schmancy-chip', SchmancyChipCompat)\n}\n\nexport { SchmancyFilterChip as SchmancyChip }\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-chip': SchmancyFilterChip\n\t\t'schmancy-filter-chip': SchmancyFilterChip\n\t}\n}\n\nexport type FilterChipChangeEvent = { value: string; selected: boolean }\nexport type FilterChipRemoveEvent = { value: string }\nexport type SchmancyChipChangeEvent = FilterChipChangeEvent\n","import { SchmancyElement } from '@mixins/index'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { BehaviorSubject, combineLatest } from 'rxjs'\nimport { takeUntil } from 'rxjs/operators'\n\n/**\n * Suggestion chip component - provides contextual recommendations to users\n *\n * IMPORTANT: Suggestion chips do NOT have a selected state. They are designed to\n * provide suggestions and recommendations that trigger actions when clicked.\n * Unlike filter chips, they cannot be toggled on/off.\n *\n * Pure Schmancy implementation with Tailwind CSS and RxJS state management\n */\n@customElement('schmancy-suggestion-chip')\nexport class SchmancySuggestionChip extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: inline-block;\n\t\toutline: none;\n\t\twidth: fit-content;\n\t\tmin-width: fit-content;\n\t}\n\n\t:host([disabled]) {\n\t\tpointer-events: none;\n\t}\n\n\t.ripple {\n\t\tposition: absolute;\n\t\tborder-radius: 50%;\n\t\ttransform: scale(0);\n\t\tanimation: ripple 600ms linear;\n\t\tbackground-color: rgba(0, 0, 0, 0.08);\n\t\tpointer-events: none;\n\t}\n\n\t@keyframes ripple {\n\t\tto {\n\t\t\ttransform: scale(4);\n\t\t\topacity: 0;\n\t\t}\n\t}\n\n\t/* State layer for M3 hover/focus/pressed states */\n\t.state-layer {\n\t\tposition: absolute;\n\t\tinset: 0;\n\t\tborder-radius: inherit;\n\t\tpointer-events: none;\n\t\tbackground-color: currentColor;\n\t\topacity: 0;\n\t\ttransition: opacity 200ms ease;\n\t}\n\n\t:host(:not([disabled])) button:hover .state-layer {\n\t\topacity: 0.08;\n\t}\n\n\t:host(:not([disabled])) button:focus-visible .state-layer {\n\t\topacity: 0.1;\n\t}\n\n\t:host(:not([disabled])) button:active .state-layer {\n\t\topacity: 0.1;\n\t}\n`];\n\t/** Value identifier for the chip */\n\t@property({ reflect: true }) value = ''\n\n\t/** Optional icon name (Material Symbols) */\n\t@property({ reflect: true }) icon = ''\n\n\t/** Optional href for navigation */\n\t@property({ reflect: true }) href = ''\n\n\t/** Target for navigation (e.g., '_blank') */\n\t@property({ reflect: true }) target = ''\n\n\t/** Disable the chip */\n\t@property({ type: Boolean, reflect: true }) disabled = false\n\n\t/** Elevated style variant - flat by default per M3 spec */\n\t@property({ type: Boolean, reflect: true }) elevated = false\n\n\t// RxJS state streams\n\tprivate hover$ = new BehaviorSubject<boolean>(false)\n\tprivate pressed$ = new BehaviorSubject<boolean>(false)\n\tprivate focused$ = new BehaviorSubject<boolean>(false)\n\n\t// UI state - only ripples needed for rendering\n\t@state() private ripples: Array<{ x: number; y: number; id: number }> = []\n\n\tprotected static shadowRootOptions = { ...LitElement.shadowRootOptions, delegatesFocus: true }\n\n\tprivate nextRippleId = 0\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Stream management for future extensions\n\t\t// Currently, states are handled directly in event handlers\n\t\t// This pipeline can be extended for more complex state interactions\n\t\tcombineLatest([\n\t\t\tthis.hover$,\n\t\t\tthis.pressed$,\n\t\t\tthis.focused$\n\t\t]).pipe(\n\t\t\t// States are managed through event handlers directly\n\t\t\t// This pipeline is kept for potential future state combinations\n\t\t\ttakeUntil(this.disconnecting)\n\t\t).subscribe()\n\t}\n\n\tprivate handleClick = (e: MouseEvent) => {\n\t\tif (this.disabled) return\n\n\t\t// Add ripple effect\n\t\tconst button = this.shadowRoot?.querySelector('button')\n\t\tif (button) {\n\t\t\tconst rect = button.getBoundingClientRect()\n\t\t\tconst x = e.clientX - rect.left\n\t\t\tconst y = e.clientY - rect.top\n\t\t\tconst id = this.nextRippleId++\n\n\t\t\tthis.ripples = [...this.ripples, { x, y, id }]\n\n\t\t\t// Remove ripple after animation\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.ripples = this.ripples.filter(r => r.id !== id)\n\t\t\t}, 600)\n\t\t}\n\n\t\t// Navigate if href is provided\n\t\tif (this.href) {\n\t\t\tif (this.target === '_blank') {\n\t\t\t\twindow.open(this.href, '_blank')\n\t\t\t} else {\n\t\t\t\twindow.location.href = this.href\n\t\t\t}\n\t\t}\n\n\t\t// Dispatch action event\n\t\tthis.dispatchEvent(new CustomEvent('action', {\n\t\t\tdetail: { value: this.value },\n\t\t\tbubbles: true,\n\t\t\tcomposed: true\n\t\t}))\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\tif (this.disabled) return\n\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\tthis.pressed$.next(true)\n\n\t\t\t// Simulate click\n\t\t\tconst clickEvent = new MouseEvent('click', {\n\t\t\t\tbubbles: true,\n\t\t\t\tcancelable: true,\n\t\t\t\tclientX: 0,\n\t\t\t\tclientY: 0\n\t\t\t})\n\t\t\tthis.handleClick(clickEvent)\n\n\t\t\tsetTimeout(() => this.pressed$.next(false), 100)\n\t\t}\n\t}\n\n\tprivate handleFocus = () => {\n\t\tthis.focused$.next(true)\n\t}\n\n\tprivate handleBlur = () => {\n\t\tthis.focused$.next(false)\n\t}\n\n\tprotected render(): unknown {\n\t\tconst hasIcon = !!this.icon;\n\n\t\tconst classes = {\n\t\t\t'relative': true,\n\t\t\t'inline-flex': true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t'h-8': true, // M3: 32px height\n\t\t\t'min-h-[32px]': true,\n\t\t\t'rounded-full': true,\n\t\t\t'cursor-pointer': !this.disabled,\n\t\t\t'transition-all': true,\n\t\t\t'duration-200': true,\n\t\t\t'select-none': true,\n\t\t\t'overflow-hidden': true,\n\n\t\t\t// M3 Padding: 8px with icon, 16px without (leading), 16px trailing\n\t\t\t'pl-2': hasIcon, // 8px with icon\n\t\t\t'pl-4': !hasIcon, // 16px without icon\n\t\t\t'pr-4': true, // 16px trailing\n\n\t\t\t// M3 Colors for suggestion chips\n\t\t\t'bg-surface-containerLow': true,\n\t\t\t'text-surface-onVariant': true,\n\n\t\t\t// Suggestion chips are flat by default (no elevation per M3)\n\n\t\t\t// Focus state\n\t\t\t'focus-visible:outline': !this.disabled,\n\t\t\t'focus-visible:outline-2': !this.disabled,\n\t\t\t'focus-visible:outline-primary': !this.disabled,\n\t\t\t'focus-visible:outline-offset-2': !this.disabled,\n\n\t\t\t// Disabled\n\t\t\t'opacity-38': this.disabled, // M3 disabled opacity\n\t\t\t'cursor-not-allowed': this.disabled\n\t\t}\n\n\t\treturn html`\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=${classMap(classes)}\n\t\t\t\t?disabled=${this.disabled}\n\t\t\t\t@click=${this.handleClick}\n\t\t\t\t@keydown=${this.handleKeyDown}\n\t\t\t\t@mouseenter=${() => this.hover$.next(true)}\n\t\t\t\t@mouseleave=${() => this.hover$.next(false)}\n\t\t\t\t@mousedown=${() => this.pressed$.next(true)}\n\t\t\t\t@mouseup=${() => this.pressed$.next(false)}\n\t\t\t\t@focus=${this.handleFocus}\n\t\t\t\t@blur=${this.handleBlur}\n\t\t\t\ttabindex=${this.disabled ? '-1' : '0'}\n\t\t\t\trole=\"button\"\n\t\t\t\taria-disabled=${this.disabled}\n\t\t\t\taria-label=${this.value}\n\t\t\t>\n\t\t\t\t${this.icon ? html`\n\t\t\t\t\t<schmancy-icon class=\"text-[18px] shrink-0\">${this.icon}</schmancy-icon>\n\t\t\t\t` : ''}\n\t\t\t\t<span class=\"text-sm font-medium leading-5\">\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</span>\n\n\t\t\t\t<!-- Ripple effects -->\n\t\t\t\t${this.ripples.map(ripple => html`\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass=\"ripple\"\n\t\t\t\t\t\tstyle=\"left: ${ripple.x}px; top: ${ripple.y}px;\"\n\t\t\t\t\t></span>\n\t\t\t\t`)}\n\n\t\t\t\t<!-- State layer for M3 hover/focus/pressed states -->\n\t\t\t\t<div class=\"state-layer\"></div>\n\t\t\t</button>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-suggestion-chip': SchmancySuggestionChip\n\t}\n}\n\nexport type SuggestionChipActionEvent = { value: string }"],"mappings":";;;;;;;;;;AAYO,IAAA,IAAA,cAAiC,EAAA;CAAA,YAAA,GAAA,GAAA;EAAA,MAAA,GAAA,EAAA,EAAA,KAAA,QAqDF,IAAA,KAAA,OAGD,IAAA,KAAA,OAGA,IAAA,KAAA,SAGE,IAAA,KAAA,WAAA,CAGiB,GAAA,KAAA,WAAA,CAGA,GAAA,KAAA,SAGtC,IAAI,EAAA,CAAyB,EAAA,EAAA,KAAA,WAC3B,IAAI,EAAA,CAAyB,EAAA,EAAA,KAAA,WAC7B,IAAI,EAAA,CAAyB,EAAA,EAAA,KAAA,UAGwB,EAAA,EAAA,KAAA,eAIjD,GAAA,KAAA,eAmBA,MAAA;GACtB,IAAI,KAAK,UAAU;GAGnB,IAAM,IAAS,KAAK,YAAY,cAAc,SAAA;GAC9C,IAAI,GAAQ;IACX,IAAM,IAAO,EAAO,uBAAA,EACd,IAAI,EAAE,UAAU,EAAK,MACrB,IAAI,EAAE,UAAU,EAAK,KACrB,IAAK,KAAK;IAEhB,KAAK,UAAU,CAAA,GAAI,KAAK,SAAS;KAAE,GAAA;KAAG,GAAA;KAAG,IAAA;KAAA,CAAA,EAGzC,iBAAA;KACC,KAAK,UAAU,KAAK,QAAQ,QAAO,MAAK,EAAE,OAAO,EAAA;OAC/C,IAAA;;GAIA,KAAK,SACJ,KAAK,WAAW,WACnB,OAAO,KAAK,KAAK,MAAM,SAAA,GAEvB,OA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EAAA,EAAA,EAAA,CAG3B,EAAS,EAAE,SAAA,CAAS,GAAA,CAAA,CAAA,EAAO,EAAA,WAAA,QAAA,KAAA,EAAA,EAAA,EAAA,CAG3B,EAAS,EAAE,SAAA,CAAS,GAAA,CAAA,CAAA,EAAO,EAAA,WAAA,QAAA,KAAA,EAAA,EAAA,EAAA,CAG3B,EAAS,EAAE,SAAA,CAAS,GAAA,CAAA,CAAA,EAAO,EAAA,WAAA,UAAA,KAAA,EAAA,EAAA,EAAA,CAG3B,EAAS;CAAE,MAAM;CAAS,SAAA,CAAS;CAAA,CAAA,CAAA,EAAO,EAAA,WAAA,YAAA,KAAA,EAAA,EAAA,EAAA,CAG1C,EAAS;CAAE,MAAM;CAAS,SAAA,CAAS;CAAA,CAAA,CAAA,EAAO,EAAA,WAAA,YAAA,KAAA,EAAA,EAAA,EAAA,CAQ1C,GAAA,CAAA,EAAO,EAAA,WAAA,WAAA,KAAA,EAAA,EAAA,IAAA,EAAA,CA7ER,EAAc,2BAAA,CAAA,EAA2B,EAAA;AAAA,SAAA,KAAA,GAAA,KAAA,GAAA,KAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require(`./chunk-CncqDLb2.cjs`);const e=require(`./mixins-Du9HMrIG.cjs`),t=require(`./active-host-jH3iloCR.cjs`);require(`./input-chip-MsiMu-b5.cjs`);const n=require(`./layout-
|
|
1
|
+
require(`./chunk-CncqDLb2.cjs`);const e=require(`./mixins-Du9HMrIG.cjs`),t=require(`./active-host-jH3iloCR.cjs`);require(`./input-chip-MsiMu-b5.cjs`);const n=require(`./layout-BbCIfIgo.cjs`),r=require(`./magnetic-Bgh7aHHI.cjs`);let i=require(`rxjs`),a=require(`rxjs/operators`),o=require(`lit/directives/class-map.js`),s=require(`lit/decorators.js`),c=require(`lit`);var l=class extends e.c{constructor(...e){super(...e),this.value=``,this.icon=``,this.href=``,this.target=``,this.disabled=!1,this.elevated=!0,this.hover$=new i.BehaviorSubject(!1),this.pressed$=new i.BehaviorSubject(!1),this.focused$=new i.BehaviorSubject(!1),this.ripples=[],this.nextRippleId=0,this.handleClick=e=>{if(this.disabled)return;let t=this.shadowRoot?.querySelector(`button`);if(t){let n=t.getBoundingClientRect(),r=e.clientX-n.left,i=e.clientY-n.top,a=this.nextRippleId++;this.ripples=[...this.ripples,{x:r,y:i,id:a}],setTimeout(()=>{this.ripples=this.ripples.filter(e=>e.id!==a)},600)}this.href&&(this.target===`_blank`?window.open(this.href,`_blank`):window.location.href=this.href),this.dispatchEvent(new CustomEvent(`action`,{detail:{value:this.value},bubbles:!0,composed:!0}))},this.handleKeyDown=e=>{if(!this.disabled&&(e.key===`Enter`||e.key===` `)){e.preventDefault(),this.pressed$.next(!0);let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,clientX:0,clientY:0});this.handleClick(t),setTimeout(()=>this.pressed$.next(!1),100)}},this.handleFocus=()=>{this.focused$.next(!0)},this.handleBlur=()=>{this.focused$.next(!1)}}static{this.styles=[c.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: inline-block;
|
|
4
4
|
outline: none;
|