@mhmo91/schmancy 0.4.44 → 0.4.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/ai/dialog.md +1 -1
  2. package/dist/ai/dialog.md +1 -1
  3. package/dist/{avatar-DbQohKTF.js → avatar-DAPIovPH.js} +17 -17
  4. package/dist/{avatar-DbQohKTF.js.map → avatar-DAPIovPH.js.map} +1 -1
  5. package/dist/{avatar-N8UvQjsm.cjs → avatar-DDjdOEu0.cjs} +2 -2
  6. package/dist/{avatar-N8UvQjsm.cjs.map → avatar-DDjdOEu0.cjs.map} +1 -1
  7. package/dist/badge.cjs +1 -1
  8. package/dist/badge.js +1 -1
  9. package/dist/content-drawer.cjs +1 -1
  10. package/dist/content-drawer.js +1 -1
  11. package/dist/{date-range-B7VG8UXD.js → date-range-BJNoGX45.js} +2 -2
  12. package/dist/{date-range-B7VG8UXD.js.map → date-range-BJNoGX45.js.map} +1 -1
  13. package/dist/{date-range-CREpHqxO.cjs → date-range-IyDqhNLw.cjs} +2 -2
  14. package/dist/{date-range-CREpHqxO.cjs.map → date-range-IyDqhNLw.cjs.map} +1 -1
  15. package/dist/date-range.cjs +1 -1
  16. package/dist/date-range.js +1 -1
  17. package/dist/{dialog-content-ClfiDTji.cjs → dialog-content-Biz4uVPD.cjs} +2 -2
  18. package/dist/{dialog-content-ClfiDTji.cjs.map → dialog-content-Biz4uVPD.cjs.map} +1 -1
  19. package/dist/{dialog-content-Cc7LNx1o.js → dialog-content-CmOEqKOr.js} +2 -2
  20. package/dist/{dialog-content-Cc7LNx1o.js.map → dialog-content-CmOEqKOr.js.map} +1 -1
  21. package/dist/dialog-service-AdqbEHnW.js +130 -0
  22. package/dist/dialog-service-AdqbEHnW.js.map +1 -0
  23. package/dist/dialog-service-B4gxdlr-.cjs +2 -0
  24. package/dist/dialog-service-B4gxdlr-.cjs.map +1 -0
  25. package/dist/dialog.cjs +1 -1
  26. package/dist/dialog.js +2 -2
  27. package/dist/index.cjs +1 -1
  28. package/dist/index.js +7 -7
  29. package/dist/nav-drawer.cjs +1 -1
  30. package/dist/nav-drawer.js +1 -1
  31. package/dist/{sheet-BY3YdE4E.js → sheet-BXNBQt5O.js} +2 -2
  32. package/dist/{sheet-BY3YdE4E.js.map → sheet-BXNBQt5O.js.map} +1 -1
  33. package/dist/{sheet-BY85jX0R.cjs → sheet-QLZcRUG6.cjs} +2 -2
  34. package/dist/{sheet-BY85jX0R.cjs.map → sheet-QLZcRUG6.cjs.map} +1 -1
  35. package/dist/sheet.cjs +1 -1
  36. package/dist/sheet.js +2 -2
  37. package/dist/teleport.cjs +1 -1
  38. package/dist/teleport.js +1 -1
  39. package/dist/theme.cjs +1 -1
  40. package/dist/theme.component-B3Z6xZ33.cjs +3 -0
  41. package/dist/theme.component-B3Z6xZ33.cjs.map +1 -0
  42. package/dist/{sheet.service-DSvFe5PY.js → theme.component-DbZODTAR.js} +67 -65
  43. package/dist/theme.component-DbZODTAR.js.map +1 -0
  44. package/dist/theme.js +1 -1
  45. package/dist/{typewriter-DMKxup-I.js → typewriter-CnloNIdN.js} +6 -6
  46. package/dist/{typewriter-DMKxup-I.js.map → typewriter-CnloNIdN.js.map} +1 -1
  47. package/dist/typewriter.js +1 -1
  48. package/package.json +1 -1
  49. package/dist/dialog-events--DuMbZ8T.cjs +0 -2
  50. package/dist/dialog-events--DuMbZ8T.cjs.map +0 -1
  51. package/dist/dialog-events-mjOcyPQ-.js +0 -6
  52. package/dist/dialog-events-mjOcyPQ-.js.map +0 -1
  53. package/dist/dialog-service-BZZK8N6A.cjs +0 -2
  54. package/dist/dialog-service-BZZK8N6A.cjs.map +0 -1
  55. package/dist/dialog-service-DFMlRcXf.js +0 -128
  56. package/dist/dialog-service-DFMlRcXf.js.map +0 -1
  57. package/dist/sheet.service-CNz7lXHC.cjs +0 -3
  58. package/dist/sheet.service-CNz7lXHC.cjs.map +0 -1
  59. package/dist/sheet.service-DSvFe5PY.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog-service-AdqbEHnW.js","sources":["../src/dialog/dialog-service.ts"],"sourcesContent":["import { render, TemplateResult } from 'lit'\nimport { defaultIfEmpty, forkJoin, fromEvent, map, of, Subject, switchMap, takeUntil, tap, timer, take } from 'rxjs'\nimport { ConfirmDialog } from './dailog'\nimport { DialogHereMorty, DialogHereMortyEvent, DialogWhereAreYouRicky } from './dialog-events'\nimport { ThemeWhereAreYou, ThemeHereIAm, ThemeHereIAmEvent } from '../theme/theme.component'\n\n/**\n * Dialog service options interface with component support\n */\nexport interface DialogOptions {\n\ttitle?: string\n\tsubtitle?: string\n\tmessage?: string\n\tconfirmText?: string\n\tcancelText?: string\n\tvariant?: 'default' | 'danger'\n\tconfirmColor?: 'primary' | 'error' | 'warning' | 'success' // Button color for confirm action\n\tposition?: { x: number; y: number } | MouseEvent | TouchEvent\n\n\t// New options for component rendering\n\tcontent?: TemplateResult | HTMLElement | (() => HTMLElement | TemplateResult)\n\twidth?: string\n\tonConfirm?: () => void\n\tonCancel?: () => void\n\thideActions?: boolean // Set to true to hide all buttons and title\n\ttargetContainer?: HTMLElement // Container to append dialog to (defaults to document.body)\n}\n\ninterface DialogTarget {\n\toptions: DialogOptions\n\ttype: 'confirm' | 'component'\n\tcontent?: TemplateResult | HTMLElement | (() => HTMLElement | TemplateResult)\n\tresolve?: (value: boolean) => void\n\treject?: (reason?: any) => void\n}\n\n/**\n * Dialog service for centralized dialog management.\n * Provides a simple API for showing dialogs with optional custom components.\n */\nexport class DialogService {\n\tprivate static instance: DialogService\n\n\t// Default dialog options\n\tprivate static DEFAULT_OPTIONS: Partial<DialogOptions> = {\n\t\ttitle: undefined,\n\t\tsubtitle: undefined,\n\t\tconfirmText: undefined,\n\t\tcancelText: undefined,\n\t\tvariant: 'default',\n\t\twidth: '360px',\n\t}\n\n\t// Track active dialogs to handle dismissing the most recent one\n\tprivate activeDialogs: ConfirmDialog[] = []\n\t\n\t// Track component dialogs (schmancy-dialog instances)\n\tprivate activeRawDialogs: any[] = []\n\t\n\t// Subject for dialog opening requests\n\tprivate dialogSubject = new Subject<DialogTarget>()\n\t\n\t// Subject for dialog dismissal requests\n\tprivate dismissSubject = new Subject<string>()\n\n\t// Private constructor for singleton pattern\n\tprivate constructor() {\n\t\tthis.setupDialogOpeningLogic()\n\t\tthis.setupDialogDismissLogic()\n\t}\n\n\t/**\n\t * Get the singleton instance\n\t */\n\tpublic static getInstance(): DialogService {\n\t\tif (!DialogService.instance) {\n\t\t\tDialogService.instance = new DialogService()\n\t\t}\n\t\treturn DialogService.instance\n\t}\n\t\n\t/**\n\t * Sets up the main dialog opening logic using RxJS pipes\n\t */\n\tprivate setupDialogOpeningLogic() {\n\t\tthis.dialogSubject\n\t\t\t.pipe(\n\t\t\t\tswitchMap(target =>\n\t\t\t\t\tforkJoin([\n\t\t\t\t\t\tfromEvent<DialogHereMortyEvent>(window, DialogHereMorty).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(100)),\n\t\t\t\t\t\t\tmap(e => e.detail),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tof(target).pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\tconst uid = target.type === 'confirm' \n\t\t\t\t\t\t\t\t\t? `confirm-dialog-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`\n\t\t\t\t\t\t\t\t\t: `dialog-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent(DialogWhereAreYouRicky, {\n\t\t\t\t\t\t\t\t\t\tdetail: { uid },\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// Store uid in target for later use\n\t\t\t\t\t\t\t\t;(target as any).uid = uid\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\tswitchMap(([response, target]) => {\n\t\t\t\t\tlet dialog: ConfirmDialog | any\n\t\t\t\t\tlet targetContainer: HTMLElement\n\t\t\t\t\t\n\t\t\t\t\tif (response?.dialog) {\n\t\t\t\t\t\t// Use existing dialog\n\t\t\t\t\t\tdialog = response.dialog\n\t\t\t\t\t\ttargetContainer = dialog.parentElement as HTMLElement\n\t\t\t\t\t\treturn of({ dialog, target, targetContainer })\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Determine container - use responding theme or fallback\n\t\t\t\t\t\tif (response?.theme) {\n\t\t\t\t\t\t\ttargetContainer = response.theme as HTMLElement\n\t\t\t\t\t\t\treturn of({ dialog: null, target, targetContainer })\n\t\t\t\t\t\t} else if (target.options.targetContainer) {\n\t\t\t\t\t\t\ttargetContainer = target.options.targetContainer\n\t\t\t\t\t\t\treturn of({ dialog: null, target, targetContainer })\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Use the same theme discovery pattern as sheet service\n\t\t\t\t\t\t\twindow.dispatchEvent(new CustomEvent(ThemeWhereAreYou))\n\t\t\t\t\t\t\treturn fromEvent<ThemeHereIAmEvent>(window, ThemeHereIAm).pipe(\n\t\t\t\t\t\t\t\ttakeUntil(timer(100)),\n\t\t\t\t\t\t\t\tmap(e => e.detail.theme),\n\t\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t\t\ttake(1),\n\t\t\t\t\t\t\t\tmap(theme => ({\n\t\t\t\t\t\t\t\t\tdialog: null,\n\t\t\t\t\t\t\t\t\ttarget,\n\t\t\t\t\t\t\t\t\ttargetContainer: theme || document.body\n\t\t\t\t\t\t\t\t}))\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttap(({ dialog, target, targetContainer }) => {\n\t\t\t\t\tif (!dialog) {\n\t\t\t\t\t\t// Create appropriate dialog type\n\t\t\t\t\t\tif (target.type === 'confirm') {\n\t\t\t\t\t\t\tdialog = document.createElement('confirm-dialog') as ConfirmDialog\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdialog = document.createElement('schmancy-dialog')\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tdialog.setAttribute('uid', (target as any).uid)\n\t\t\t\t\t\ttargetContainer.appendChild(dialog)\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tmap(({ dialog, target, targetContainer }) => {\n\t\t\t\t\t// Return the actual dialog element that was created\n\t\t\t\t\tif (!dialog) {\n\t\t\t\t\t\tdialog = targetContainer.querySelector(`[uid=\"${(target as any).uid}\"]`)\n\t\t\t\t\t}\n\t\t\t\t\treturn { dialog, target, targetContainer }\n\t\t\t\t}),\n\t\t\t\ttap(({ dialog, target }) => {\n\t\t\t\t\tif (target.type === 'confirm') {\n\t\t\t\t\t\t// Configure confirm dialog\n\t\t\t\t\t\tconst confirmDialog = dialog as ConfirmDialog\n\t\t\t\t\t\tconst options = target.options\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (options.title) confirmDialog.title = options.title\n\t\t\t\t\t\tif (options.subtitle) confirmDialog.subtitle = options.subtitle\n\t\t\t\t\t\tif (options.message) confirmDialog.message = options.message\n\t\t\t\t\t\tif (options.confirmText) confirmDialog.confirmText = options.confirmText\n\t\t\t\t\t\tif (options.cancelText) confirmDialog.cancelText = options.cancelText\n\t\t\t\t\t\tif (options.variant) confirmDialog.variant = options.variant\n\t\t\t\t\t\tif (options.confirmColor) confirmDialog.confirmColor = options.confirmColor\n\t\t\t\t\t\tif (options.width) confirmDialog.style.setProperty('--dialog-width', options.width)\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Handle custom content if provided\n\t\t\t\t\t\tif (options.content) {\n\t\t\t\t\t\t\tconst contentContainer = document.createElement('div')\n\t\t\t\t\t\t\tcontentContainer.slot = 'content'\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (typeof options.content === 'function') {\n\t\t\t\t\t\t\t\tconst result = options.content()\n\t\t\t\t\t\t\t\tif (result instanceof HTMLElement) {\n\t\t\t\t\t\t\t\t\tcontentContainer.appendChild(result)\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\trender(result, contentContainer)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (options.content instanceof HTMLElement) {\n\t\t\t\t\t\t\t\tcontentContainer.appendChild(options.content)\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\trender(options.content, contentContainer)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tconfirmDialog.appendChild(contentContainer)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Add to active dialogs\n\t\t\t\t\t\tthis.activeDialogs.push(confirmDialog)\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Configure component dialog\n\t\t\t\t\t\tif (target.content) {\n\t\t\t\t\t\t\tconst directContentContainer = document.createElement('div')\n\t\t\t\t\t\t\tdirectContentContainer.style.height = '100%'\n\t\t\t\t\t\t\tdirectContentContainer.style.width = '100%'\n\t\t\t\t\t\t\tdirectContentContainer.classList.add('schmancy-dialog-content-container')\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Render the content directly\n\t\t\t\t\t\t\tif (typeof target.content === 'function') {\n\t\t\t\t\t\t\t\tconst result = target.content()\n\t\t\t\t\t\t\t\tif (result instanceof HTMLElement) {\n\t\t\t\t\t\t\t\t\tdirectContentContainer.appendChild(result)\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\trender(result, directContentContainer)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (target.content instanceof HTMLElement) {\n\t\t\t\t\t\t\t\tdirectContentContainer.appendChild(target.content)\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\trender(target.content, directContentContainer)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdialog.appendChild(directContentContainer)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Set width from options\n\t\t\t\t\t\tif (target.options.width) {\n\t\t\t\t\t\t\tdialog.style.setProperty('--dialog-width', target.options.width)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Add to active raw dialogs\n\t\t\t\t\t\tthis.activeRawDialogs.push(dialog)\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttap(({ dialog, target }) => {\n\t\t\t\t\t// Show dialog and handle promise resolution\n\t\t\t\t\tconst position = target.options.position || this.getCenteredPosition()\n\t\t\t\t\t\n\t\t\t\t\tdialog.show(position).then((result: boolean) => {\n\t\t\t\t\t\tif (target.resolve) {\n\t\t\t\t\t\t\ttarget.resolve(result)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Cleanup\n\t\t\t\t\t\tif (target.type === 'confirm') {\n\t\t\t\t\t\t\tconst index = this.activeDialogs.indexOf(dialog)\n\t\t\t\t\t\t\tif (index !== -1) {\n\t\t\t\t\t\t\t\tthis.activeDialogs.splice(index, 1)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Clean up content\n\t\t\t\t\t\t\tconst contentEl = dialog.querySelector('[slot=\"content\"]')\n\t\t\t\t\t\t\tif (contentEl) {\n\t\t\t\t\t\t\t\tdialog.removeChild(contentEl)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconst index = this.activeRawDialogs.indexOf(dialog)\n\t\t\t\t\t\t\tif (index !== -1) {\n\t\t\t\t\t\t\t\tthis.activeRawDialogs.splice(index, 1)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Clean up content\n\t\t\t\t\t\t\tconst contentContainer = dialog.querySelector('.schmancy-dialog-content-container')\n\t\t\t\t\t\t\tif (contentContainer && contentContainer.parentNode) {\n\t\t\t\t\t\t\t\tcontentContainer.parentNode.removeChild(contentContainer)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Remove dialog from DOM\n\t\t\t\t\t\tif (dialog.parentElement) {\n\t\t\t\t\t\t\tdialog.parentElement.removeChild(dialog)\n\t\t\t\t\t\t}\n\t\t\t\t\t}).catch((error: any) => {\n\t\t\t\t\t\tif (target.reject) {\n\t\t\t\t\t\t\ttarget.reject(error)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t\n\t\t\t\t\t// Set up event listeners for callbacks\n\t\t\t\t\tif (target.options.onConfirm) {\n\t\t\t\t\t\tconst onConfirm = (_e: Event) => {\n\t\t\t\t\t\t\ttarget.options.onConfirm!()\n\t\t\t\t\t\t\tdialog.removeEventListener('confirm', onConfirm)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdialog.addEventListener('confirm', onConfirm)\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (target.options.onCancel) {\n\t\t\t\t\t\tconst onCancel = (_e: Event) => {\n\t\t\t\t\t\t\ttarget.options.onCancel!()\n\t\t\t\t\t\t\tdialog.removeEventListener('cancel', onCancel)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdialog.addEventListener('cancel', onCancel)\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\t\n\t/**\n\t * Sets up the dialog dismissal logic\n\t */\n\tprivate setupDialogDismissLogic() {\n\t\tthis.dismissSubject\n\t\t\t.pipe(\n\t\t\t\tswitchMap(uid =>\n\t\t\t\t\tforkJoin([\n\t\t\t\t\t\tfromEvent<DialogHereMortyEvent>(window, DialogHereMorty).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(100)),\n\t\t\t\t\t\t\tmap(e => e.detail),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tof(uid).pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent(DialogWhereAreYouRicky, { \n\t\t\t\t\t\t\t\t\t\tdetail: { uid },\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\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),\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t\ttap(([response]) => {\n\t\t\t\t\tif (response?.dialog) {\n\t\t\t\t\t\t// Hide the dialog\n\t\t\t\t\t\tresponse.dialog.hide(false)\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Remove from tracking arrays\n\t\t\t\t\t\tconst confirmIndex = this.activeDialogs.indexOf(response.dialog)\n\t\t\t\t\t\tif (confirmIndex !== -1) {\n\t\t\t\t\t\t\tthis.activeDialogs.splice(confirmIndex, 1)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tconst rawIndex = this.activeRawDialogs.indexOf(response.dialog)\n\t\t\t\t\t\tif (rawIndex !== -1) {\n\t\t\t\t\t\t\tthis.activeRawDialogs.splice(rawIndex, 1)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Remove dialog from DOM immediately\n\t\t\t\t\t\tif (response.dialog.parentElement) {\n\t\t\t\t\t\t\tresponse.dialog.parentElement.removeChild(response.dialog)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t/**\n\t * Show a confirmation dialog\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tpublic confirm(options: DialogOptions): Promise<boolean> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\t// Apply default options\n\t\t\tconst completeOptions = {\n\t\t\t\t...DialogService.DEFAULT_OPTIONS,\n\t\t\t\t...options,\n\t\t\t}\n\n\t\t\t// If no position is provided, center the dialog\n\t\t\tif (!completeOptions.position) {\n\t\t\t\tcompleteOptions.position = this.getCenteredPosition()\n\t\t\t}\n\n\t\t\t// Create dialog target and emit to subject\n\t\t\tconst target: DialogTarget = {\n\t\t\t\toptions: completeOptions,\n\t\t\t\ttype: 'confirm',\n\t\t\t\tcontent: completeOptions.content,\n\t\t\t\tresolve,\n\t\t\t\treject,\n\t\t\t}\n\n\t\t\tthis.dialogSubject.next(target)\n\t\t})\n\t}\n\n\t/**\n\t * Show a dialog with custom component content\n\t * Always renders content directly without any headers or action buttons\n\t * @returns Promise that resolves when dialog is closed\n\t */\n\tpublic component(\n\t\tcontent: TemplateResult | HTMLElement | (() => HTMLElement | TemplateResult),\n\t\toptions: Omit<DialogOptions, 'content' | 'message'> = {},\n\t): Promise<boolean> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\t// If no position is provided, center the dialog\n\t\t\tif (!options.position) {\n\t\t\t\toptions.position = this.getCenteredPosition()\n\t\t\t}\n\n\t\t\t// Create dialog target and emit to subject\n\t\t\tconst target: DialogTarget = {\n\t\t\t\toptions: options as DialogOptions,\n\t\t\t\ttype: 'component',\n\t\t\t\tcontent,\n\t\t\t\tresolve,\n\t\t\t\treject,\n\t\t\t}\n\n\t\t\tthis.dialogSubject.next(target)\n\t\t})\n\t}\n\n\t/**\n\t * Dismiss the most recently opened dialog (either confirm or component type)\n\t * @returns true if a dialog was dismissed, false if no dialogs were open\n\t */\n\tpublic dismiss(): boolean {\n\t\t// Try component dialog first (they're more likely to be on top)\n\t\tif (this.activeRawDialogs.length > 0) {\n\t\t\t// Get the most recently opened raw dialog (last in the array)\n\t\t\tconst dialog = this.activeRawDialogs[this.activeRawDialogs.length - 1]\n\t\t\tconst uid = dialog.getAttribute('uid')\n\t\t\t\n\t\t\tif (uid) {\n\t\t\t\tthis.dismissSubject.next(uid)\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Fall back to confirm dialogs\n\t\tif (this.activeDialogs.length > 0) {\n\t\t\t// Get the most recently opened dialog (last in the array)\n\t\t\tconst dialog = this.activeDialogs[this.activeDialogs.length - 1]\n\t\t\tconst uid = dialog.getAttribute('uid')\n\t\t\t\n\t\t\tif (uid) {\n\t\t\t\tthis.dismissSubject.next(uid)\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\t}\n\n\t/**\n\t * Show a simple confirmation dialog with just a message\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tpublic ask(message: string, event?: MouseEvent | TouchEvent): Promise<boolean> {\n\t\treturn this.confirm({\n\t\t\tmessage,\n\t\t\tposition: event,\n\t\t})\n\t}\n\n\t/**\n\t * Show a danger confirmation dialog\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tpublic danger(options: Omit<DialogOptions, 'variant'>): Promise<boolean> {\n\t\treturn this.confirm({\n\t\t\t...options,\n\t\t\tvariant: 'danger',\n\t\t})\n\t}\n\n\t/**\n\t * Get a centered position for the dialog\n\t */\n\tprivate getCenteredPosition(): { x: number; y: number } {\n\t\treturn {\n\t\t\tx: window.innerWidth / 2,\n\t\t\ty: window.innerHeight / 2,\n\t\t}\n\t}\n\n}\n\n/**\n * Global dialog utility - provides a quick way to show dialogs\n */\nexport const $dialog = {\n\t/**\n\t * Show a confirmation dialog\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tconfirm: (options: DialogOptions): Promise<boolean> => {\n\t\treturn DialogService.getInstance().confirm(options)\n\t},\n\n\t/**\n\t * Show a simple confirmation dialog with just a message\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\task: (message: string, event?: MouseEvent | TouchEvent): Promise<boolean> => {\n\t\treturn DialogService.getInstance().ask(message, event)\n\t},\n\n\t/**\n\t * Show a danger confirmation dialog\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tdanger: (options: Omit<DialogOptions, 'variant'>): Promise<boolean> => {\n\t\treturn DialogService.getInstance().danger(options)\n\t},\n\n\t/**\n\t * Show a dialog with custom component content\n\t * @returns Promise that resolves when dialog is closed\n\t */\n\tcomponent: (\n\t\tcontent: TemplateResult | HTMLElement | (() => HTMLElement | TemplateResult),\n\t\toptions?: Omit<DialogOptions, 'content' | 'message'>,\n\t): Promise<boolean> => {\n\t\treturn DialogService.getInstance().component(content, options)\n\t},\n\n\t/**\n\t * Show a simple dialog without title or actions, just content\n\t * This is an alias for component() since all component dialogs are now simple by design\n\t * @returns Promise that resolves when dialog is closed\n\t */\n\tsimple: (\n\t\tcontent: TemplateResult | HTMLElement | (() => HTMLElement | TemplateResult),\n\t\toptions?: Omit<DialogOptions, 'content' | 'message' | 'title' | 'confirmText' | 'cancelText'>,\n\t): Promise<boolean> => {\n\t\treturn DialogService.getInstance().component(content, options)\n\t},\n\n\t/**\n\t * Dismiss the most recently opened dialog\n\t * @returns true if a dialog was dismissed, false if no dialogs were open\n\t */\n\tdismiss: (): boolean => {\n\t\treturn DialogService.getInstance().dismiss()\n\t},\n}\n\nexport default DialogService"],"names":["DialogService","constructor","this","activeDialogs","activeRawDialogs","dialogSubject","Subject","dismissSubject","setupDialogOpeningLogic","setupDialogDismissLogic","instance","pipe","switchMap","forkJoin","fromEvent","window","DialogHereMorty","takeUntil","timer","map","e","detail","defaultIfEmpty","of","target","tap","uid","type","Date","now","Math","random","toString","substring","dispatchEvent","CustomEvent","DialogWhereAreYouRicky","bubbles","composed","response","dialog","targetContainer","parentElement","theme","options","ThemeWhereAreYou","ThemeHereIAm","take","document","body","createElement","setAttribute","appendChild","querySelector","confirmDialog","title","subtitle","message","confirmText","cancelText","variant","confirmColor","width","style","setProperty","content","contentContainer","slot","result","HTMLElement","render","push","directContentContainer","height","classList","add","position","getCenteredPosition","show","then","resolve","index","indexOf","splice","contentEl","removeChild","parentNode","catch","error","reject","onConfirm","_e","removeEventListener","addEventListener","onCancel","subscribe","hide","confirmIndex","rawIndex","Promise","completeOptions","DEFAULT_OPTIONS","next","dismiss","length","getAttribute","event","confirm","x","innerWidth","y","innerHeight","_w","$dialog","getInstance","ask","danger","component","simple"],"mappings":";;;AAwCO,MAAMA,IAAN,MAAMA,EAAAA;AAAAA,EA0BJ,cAAAC;AAZRC,SAAQC,gBAAiC,CAAA,GAGzCD,KAAQE,mBAA0B,CAAA,GAGlCF,KAAQG,gBAAgB,IAAIC,KAG5BJ,KAAQK,iBAAiB,IAAID,KAI5BJ,KAAKM,wBAAAA,GACLN,KAAKO,wBAAAA;AAAAA,EACN;AAAA,EAKA,OAAA;AAIC,WAHKT,EAAcU,aAClBV,EAAcU,WAAW,IAAIV,MAEvBA,EAAcU;AAAAA,EACtB;AAAA,EAKQ,0BAAAF;AACPN,SAAKG,cACHM,KACAC,SACCC,EAAS,CACRC,EAAgCC,QAAQC,CAAAA,EAAiBL,KACxDM,EAAUC,EAAM,GAAA,CAAA,GAChBC,EAAIC,CAAAA,MAAKA,EAAEC,MAAAA,GACXC,EAAAA,MAAe,CAAA,GAEhBC,EAAGC,GAAQb,KACVc,EAAI,MAAA;AACH,YAAMC,IAAMF,EAAOG,SAAS,YACzB,kBAAkBC,KAAKC,IAAAA,CAAAA,IAASC,KAAKC,OAAAA,EAASC,SAAS,EAAA,EAAIC,UAAU,GAAG,CAAA,CAAA,KACxE,UAAUL,KAAKC,IAAAA,CAAAA,IAASC,KAAKC,OAAAA,EAASC,SAAS,EAAA,EAAIC,UAAU,GAAG,CAAA,CAAA;AAEnElB,aAAOmB,cACN,IAAIC,YAAYC,GAAwB,EACvCf,QAAQ,EAAEK,KAAAA,EAAAA,GACVW,SAAAA,IACAC,UAAAA,QAKAd,EAAeE,MAAMA;AAAAA,YAK3Bd,EAAU,CAAA,CAAE2B,GAAUf,CAAAA,MAAAA;AAC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AA,IAG3B;AAEA,WAAA;AAAA,EACD;AAAA,EAMO,IAAI+B,GAAiBiD;AAC3B,WAAOxG,KAAKyG,QAAQ,EACnBlD,SAAAA,GACAmB,UAAU8B,EAAAA,CAAAA;AAAAA,EAEZ;AAAA,EAMO,OAAO9D,GAAAA;AACb,WAAO1C,KAAKyG,QAAQ,EAAA,GAChB/D,GACHgB,SAAS,SAAA,CAAA;AAAA,EAEX;AAAA,EAKQ,sBAAAiB;AACP,WAAO,EACN+B,GAAG7F,OAAO8F,aAAa,GACvBC,GAAG/F,OAAOgG,cAAc,EAAA;AAAA,EAE1B;AAAA;AAjbA7G,EAAemG,kBAA0C,EACxD9C,OAAAA,QACAC,UAAAA,QACAE,aAAAA,QACAC,YAAAA,QACAC,SAAS,WACTE,OAAO;AAVF,IAAM9D,IAANgH;AA4bA,MAAMC,IAAU,EAKtBN,SAAU/D,CAAAA,MACF5C,EAAckH,YAAAA,EAAcP,QAAQ/D,CAAAA,GAO5CuE,KAAK,CAAC1D,GAAiBiD,MACf1G,EAAckH,cAAcC,IAAI1D,GAASiD,CAAAA,GAOjDU,QAASxE,CAAAA,MACD5C,EAAckH,cAAcE,OAAOxE,CAAAA,GAO3CyE,WAAW,CACVpD,GACArB,MAEO5C,EAAckH,YAAAA,EAAcG,UAAUpD,GAASrB,CAAAA,GAQvD0E,QAAQ,CACPrD,GACArB,MAEO5C,EAAckH,YAAAA,EAAcG,UAAUpD,GAASrB,CAAAA,GAOvD2D,SAAS,MACDvG,EAAckH,YAAAA,EAAcX,QAAAA,EAAAA;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const g=require("lit"),o=require("rxjs"),d=require("./theme.component-B3Z6xZ33.cjs"),l=class l{constructor(){this.activeDialogs=[],this.activeRawDialogs=[],this.dialogSubject=new o.Subject,this.dismissSubject=new o.Subject,this.setupDialogOpeningLogic(),this.setupDialogDismissLogic()}static getInstance(){return l.instance||(l.instance=new l),l.instance}setupDialogOpeningLogic(){this.dialogSubject.pipe(o.switchMap(e=>o.forkJoin([o.fromEvent(window,d.DialogHereMorty).pipe(o.takeUntil(o.timer(100)),o.map(t=>t.detail),o.defaultIfEmpty(void 0)),o.of(e).pipe(o.tap(()=>{const t=e.type==="confirm"?`confirm-dialog-${Date.now()}-${Math.random().toString(36).substring(2,9)}`:`dialog-${Date.now()}-${Math.random().toString(36).substring(2,9)}`;window.dispatchEvent(new CustomEvent(d.DialogWhereAreYouRicky,{detail:{uid:t},bubbles:!0,composed:!0})),e.uid=t}))])),o.switchMap(([e,t])=>{let n,i;return e?.dialog?(n=e.dialog,i=n.parentElement,o.of({dialog:n,target:t,targetContainer:i})):e?.theme?(i=e.theme,o.of({dialog:null,target:t,targetContainer:i})):t.options.targetContainer?(i=t.options.targetContainer,o.of({dialog:null,target:t,targetContainer:i})):(window.dispatchEvent(new CustomEvent(d.ThemeWhereAreYou)),o.fromEvent(window,d.ThemeHereIAm).pipe(o.takeUntil(o.timer(100)),o.map(s=>s.detail.theme),o.defaultIfEmpty(void 0),o.take(1),o.map(s=>({dialog:null,target:t,targetContainer:s||document.body}))))}),o.tap(({dialog:e,target:t,targetContainer:n})=>{e||((e=t.type==="confirm"?document.createElement("confirm-dialog"):document.createElement("schmancy-dialog")).setAttribute("uid",t.uid),n.appendChild(e))}),o.map(({dialog:e,target:t,targetContainer:n})=>(e||(e=n.querySelector(`[uid="${t.uid}"]`)),{dialog:e,target:t,targetContainer:n})),o.tap(({dialog:e,target:t})=>{if(t.type==="confirm"){const n=e,i=t.options;if(i.title&&(n.title=i.title),i.subtitle&&(n.subtitle=i.subtitle),i.message&&(n.message=i.message),i.confirmText&&(n.confirmText=i.confirmText),i.cancelText&&(n.cancelText=i.cancelText),i.variant&&(n.variant=i.variant),i.confirmColor&&(n.confirmColor=i.confirmColor),i.width&&n.style.setProperty("--dialog-width",i.width),i.content){const s=document.createElement("div");if(s.slot="content",typeof i.content=="function"){const a=i.content();a instanceof HTMLElement?s.appendChild(a):g.render(a,s)}else i.content instanceof HTMLElement?s.appendChild(i.content):g.render(i.content,s);n.appendChild(s)}this.activeDialogs.push(n)}else{if(t.content){const n=document.createElement("div");if(n.style.height="100%",n.style.width="100%",n.classList.add("schmancy-dialog-content-container"),typeof t.content=="function"){const i=t.content();i instanceof HTMLElement?n.appendChild(i):g.render(i,n)}else t.content instanceof HTMLElement?n.appendChild(t.content):g.render(t.content,n);e.appendChild(n)}t.options.width&&e.style.setProperty("--dialog-width",t.options.width),this.activeRawDialogs.push(e)}}),o.tap(({dialog:e,target:t})=>{const n=t.options.position||this.getCenteredPosition();if(e.show(n).then(i=>{if(t.resolve&&t.resolve(i),t.type==="confirm"){const s=this.activeDialogs.indexOf(e);s!==-1&&this.activeDialogs.splice(s,1);const a=e.querySelector('[slot="content"]');a&&e.removeChild(a)}else{const s=this.activeRawDialogs.indexOf(e);s!==-1&&this.activeRawDialogs.splice(s,1);const a=e.querySelector(".schmancy-dialog-content-container");a&&a.parentNode&&a.parentNode.removeChild(a)}e.parentElement&&e.parentElement.removeChild(e)}).catch(i=>{t.reject&&t.reject(i)}),t.options.onConfirm){const i=s=>{t.options.onConfirm(),e.removeEventListener("confirm",i)};e.addEventListener("confirm",i)}if(t.options.onCancel){const i=s=>{t.options.onCancel(),e.removeEventListener("cancel",i)};e.addEventListener("cancel",i)}})).subscribe()}setupDialogDismissLogic(){this.dismissSubject.pipe(o.switchMap(e=>o.forkJoin([o.fromEvent(window,d.DialogHereMorty).pipe(o.takeUntil(o.timer(100)),o.map(t=>t.detail),o.defaultIfEmpty(void 0)),o.of(e).pipe(o.tap(()=>{window.dispatchEvent(new CustomEvent(d.DialogWhereAreYouRicky,{detail:{uid:e},bubbles:!0,composed:!0}))}))])),o.tap(([e])=>{if(e?.dialog){e.dialog.hide(!1);const t=this.activeDialogs.indexOf(e.dialog);t!==-1&&this.activeDialogs.splice(t,1);const n=this.activeRawDialogs.indexOf(e.dialog);n!==-1&&this.activeRawDialogs.splice(n,1),e.dialog.parentElement&&e.dialog.parentElement.removeChild(e.dialog)}})).subscribe()}confirm(e){return new Promise((t,n)=>{const i={...l.DEFAULT_OPTIONS,...e};i.position||(i.position=this.getCenteredPosition());const s={options:i,type:"confirm",content:i.content,resolve:t,reject:n};this.dialogSubject.next(s)})}component(e,t={}){return new Promise((n,i)=>{t.position||(t.position=this.getCenteredPosition());const s={options:t,type:"component",content:e,resolve:n,reject:i};this.dialogSubject.next(s)})}dismiss(){if(this.activeRawDialogs.length>0){const e=this.activeRawDialogs[this.activeRawDialogs.length-1].getAttribute("uid");if(e)return this.dismissSubject.next(e),!0}if(this.activeDialogs.length>0){const e=this.activeDialogs[this.activeDialogs.length-1].getAttribute("uid");if(e)return this.dismissSubject.next(e),!0}return!1}ask(e,t){return this.confirm({message:e,position:t})}danger(e){return this.confirm({...e,variant:"danger"})}getCenteredPosition(){return{x:window.innerWidth/2,y:window.innerHeight/2}}};l.DEFAULT_OPTIONS={title:void 0,subtitle:void 0,confirmText:void 0,cancelText:void 0,variant:"default",width:"360px"};let r=l;const p={confirm:c=>r.getInstance().confirm(c),ask:(c,e)=>r.getInstance().ask(c,e),danger:c=>r.getInstance().danger(c),component:(c,e)=>r.getInstance().component(c,e),simple:(c,e)=>r.getInstance().component(c,e),dismiss:()=>r.getInstance().dismiss()};exports.$dialog=p,exports.DialogService=r;
2
+ //# sourceMappingURL=dialog-service-B4gxdlr-.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog-service-B4gxdlr-.cjs","sources":["../src/dialog/dialog-service.ts"],"sourcesContent":["import { render, TemplateResult } from 'lit'\nimport { defaultIfEmpty, forkJoin, fromEvent, map, of, Subject, switchMap, takeUntil, tap, timer, take } from 'rxjs'\nimport { ConfirmDialog } from './dailog'\nimport { DialogHereMorty, DialogHereMortyEvent, DialogWhereAreYouRicky } from './dialog-events'\nimport { ThemeWhereAreYou, ThemeHereIAm, ThemeHereIAmEvent } from '../theme/theme.component'\n\n/**\n * Dialog service options interface with component support\n */\nexport interface DialogOptions {\n\ttitle?: string\n\tsubtitle?: string\n\tmessage?: string\n\tconfirmText?: string\n\tcancelText?: string\n\tvariant?: 'default' | 'danger'\n\tconfirmColor?: 'primary' | 'error' | 'warning' | 'success' // Button color for confirm action\n\tposition?: { x: number; y: number } | MouseEvent | TouchEvent\n\n\t// New options for component rendering\n\tcontent?: TemplateResult | HTMLElement | (() => HTMLElement | TemplateResult)\n\twidth?: string\n\tonConfirm?: () => void\n\tonCancel?: () => void\n\thideActions?: boolean // Set to true to hide all buttons and title\n\ttargetContainer?: HTMLElement // Container to append dialog to (defaults to document.body)\n}\n\ninterface DialogTarget {\n\toptions: DialogOptions\n\ttype: 'confirm' | 'component'\n\tcontent?: TemplateResult | HTMLElement | (() => HTMLElement | TemplateResult)\n\tresolve?: (value: boolean) => void\n\treject?: (reason?: any) => void\n}\n\n/**\n * Dialog service for centralized dialog management.\n * Provides a simple API for showing dialogs with optional custom components.\n */\nexport class DialogService {\n\tprivate static instance: DialogService\n\n\t// Default dialog options\n\tprivate static DEFAULT_OPTIONS: Partial<DialogOptions> = {\n\t\ttitle: undefined,\n\t\tsubtitle: undefined,\n\t\tconfirmText: undefined,\n\t\tcancelText: undefined,\n\t\tvariant: 'default',\n\t\twidth: '360px',\n\t}\n\n\t// Track active dialogs to handle dismissing the most recent one\n\tprivate activeDialogs: ConfirmDialog[] = []\n\t\n\t// Track component dialogs (schmancy-dialog instances)\n\tprivate activeRawDialogs: any[] = []\n\t\n\t// Subject for dialog opening requests\n\tprivate dialogSubject = new Subject<DialogTarget>()\n\t\n\t// Subject for dialog dismissal requests\n\tprivate dismissSubject = new Subject<string>()\n\n\t// Private constructor for singleton pattern\n\tprivate constructor() {\n\t\tthis.setupDialogOpeningLogic()\n\t\tthis.setupDialogDismissLogic()\n\t}\n\n\t/**\n\t * Get the singleton instance\n\t */\n\tpublic static getInstance(): DialogService {\n\t\tif (!DialogService.instance) {\n\t\t\tDialogService.instance = new DialogService()\n\t\t}\n\t\treturn DialogService.instance\n\t}\n\t\n\t/**\n\t * Sets up the main dialog opening logic using RxJS pipes\n\t */\n\tprivate setupDialogOpeningLogic() {\n\t\tthis.dialogSubject\n\t\t\t.pipe(\n\t\t\t\tswitchMap(target =>\n\t\t\t\t\tforkJoin([\n\t\t\t\t\t\tfromEvent<DialogHereMortyEvent>(window, DialogHereMorty).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(100)),\n\t\t\t\t\t\t\tmap(e => e.detail),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tof(target).pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\tconst uid = target.type === 'confirm' \n\t\t\t\t\t\t\t\t\t? `confirm-dialog-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`\n\t\t\t\t\t\t\t\t\t: `dialog-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent(DialogWhereAreYouRicky, {\n\t\t\t\t\t\t\t\t\t\tdetail: { uid },\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// Store uid in target for later use\n\t\t\t\t\t\t\t\t;(target as any).uid = uid\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\tswitchMap(([response, target]) => {\n\t\t\t\t\tlet dialog: ConfirmDialog | any\n\t\t\t\t\tlet targetContainer: HTMLElement\n\t\t\t\t\t\n\t\t\t\t\tif (response?.dialog) {\n\t\t\t\t\t\t// Use existing dialog\n\t\t\t\t\t\tdialog = response.dialog\n\t\t\t\t\t\ttargetContainer = dialog.parentElement as HTMLElement\n\t\t\t\t\t\treturn of({ dialog, target, targetContainer })\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Determine container - use responding theme or fallback\n\t\t\t\t\t\tif (response?.theme) {\n\t\t\t\t\t\t\ttargetContainer = response.theme as HTMLElement\n\t\t\t\t\t\t\treturn of({ dialog: null, target, targetContainer })\n\t\t\t\t\t\t} else if (target.options.targetContainer) {\n\t\t\t\t\t\t\ttargetContainer = target.options.targetContainer\n\t\t\t\t\t\t\treturn of({ dialog: null, target, targetContainer })\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Use the same theme discovery pattern as sheet service\n\t\t\t\t\t\t\twindow.dispatchEvent(new CustomEvent(ThemeWhereAreYou))\n\t\t\t\t\t\t\treturn fromEvent<ThemeHereIAmEvent>(window, ThemeHereIAm).pipe(\n\t\t\t\t\t\t\t\ttakeUntil(timer(100)),\n\t\t\t\t\t\t\t\tmap(e => e.detail.theme),\n\t\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t\t\ttake(1),\n\t\t\t\t\t\t\t\tmap(theme => ({\n\t\t\t\t\t\t\t\t\tdialog: null,\n\t\t\t\t\t\t\t\t\ttarget,\n\t\t\t\t\t\t\t\t\ttargetContainer: theme || document.body\n\t\t\t\t\t\t\t\t}))\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttap(({ dialog, target, targetContainer }) => {\n\t\t\t\t\tif (!dialog) {\n\t\t\t\t\t\t// Create appropriate dialog type\n\t\t\t\t\t\tif (target.type === 'confirm') {\n\t\t\t\t\t\t\tdialog = document.createElement('confirm-dialog') as ConfirmDialog\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdialog = document.createElement('schmancy-dialog')\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tdialog.setAttribute('uid', (target as any).uid)\n\t\t\t\t\t\ttargetContainer.appendChild(dialog)\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tmap(({ dialog, target, targetContainer }) => {\n\t\t\t\t\t// Return the actual dialog element that was created\n\t\t\t\t\tif (!dialog) {\n\t\t\t\t\t\tdialog = targetContainer.querySelector(`[uid=\"${(target as any).uid}\"]`)\n\t\t\t\t\t}\n\t\t\t\t\treturn { dialog, target, targetContainer }\n\t\t\t\t}),\n\t\t\t\ttap(({ dialog, target }) => {\n\t\t\t\t\tif (target.type === 'confirm') {\n\t\t\t\t\t\t// Configure confirm dialog\n\t\t\t\t\t\tconst confirmDialog = dialog as ConfirmDialog\n\t\t\t\t\t\tconst options = target.options\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (options.title) confirmDialog.title = options.title\n\t\t\t\t\t\tif (options.subtitle) confirmDialog.subtitle = options.subtitle\n\t\t\t\t\t\tif (options.message) confirmDialog.message = options.message\n\t\t\t\t\t\tif (options.confirmText) confirmDialog.confirmText = options.confirmText\n\t\t\t\t\t\tif (options.cancelText) confirmDialog.cancelText = options.cancelText\n\t\t\t\t\t\tif (options.variant) confirmDialog.variant = options.variant\n\t\t\t\t\t\tif (options.confirmColor) confirmDialog.confirmColor = options.confirmColor\n\t\t\t\t\t\tif (options.width) confirmDialog.style.setProperty('--dialog-width', options.width)\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Handle custom content if provided\n\t\t\t\t\t\tif (options.content) {\n\t\t\t\t\t\t\tconst contentContainer = document.createElement('div')\n\t\t\t\t\t\t\tcontentContainer.slot = 'content'\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (typeof options.content === 'function') {\n\t\t\t\t\t\t\t\tconst result = options.content()\n\t\t\t\t\t\t\t\tif (result instanceof HTMLElement) {\n\t\t\t\t\t\t\t\t\tcontentContainer.appendChild(result)\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\trender(result, contentContainer)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (options.content instanceof HTMLElement) {\n\t\t\t\t\t\t\t\tcontentContainer.appendChild(options.content)\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\trender(options.content, contentContainer)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tconfirmDialog.appendChild(contentContainer)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Add to active dialogs\n\t\t\t\t\t\tthis.activeDialogs.push(confirmDialog)\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Configure component dialog\n\t\t\t\t\t\tif (target.content) {\n\t\t\t\t\t\t\tconst directContentContainer = document.createElement('div')\n\t\t\t\t\t\t\tdirectContentContainer.style.height = '100%'\n\t\t\t\t\t\t\tdirectContentContainer.style.width = '100%'\n\t\t\t\t\t\t\tdirectContentContainer.classList.add('schmancy-dialog-content-container')\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Render the content directly\n\t\t\t\t\t\t\tif (typeof target.content === 'function') {\n\t\t\t\t\t\t\t\tconst result = target.content()\n\t\t\t\t\t\t\t\tif (result instanceof HTMLElement) {\n\t\t\t\t\t\t\t\t\tdirectContentContainer.appendChild(result)\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\trender(result, directContentContainer)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (target.content instanceof HTMLElement) {\n\t\t\t\t\t\t\t\tdirectContentContainer.appendChild(target.content)\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\trender(target.content, directContentContainer)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdialog.appendChild(directContentContainer)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Set width from options\n\t\t\t\t\t\tif (target.options.width) {\n\t\t\t\t\t\t\tdialog.style.setProperty('--dialog-width', target.options.width)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Add to active raw dialogs\n\t\t\t\t\t\tthis.activeRawDialogs.push(dialog)\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttap(({ dialog, target }) => {\n\t\t\t\t\t// Show dialog and handle promise resolution\n\t\t\t\t\tconst position = target.options.position || this.getCenteredPosition()\n\t\t\t\t\t\n\t\t\t\t\tdialog.show(position).then((result: boolean) => {\n\t\t\t\t\t\tif (target.resolve) {\n\t\t\t\t\t\t\ttarget.resolve(result)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Cleanup\n\t\t\t\t\t\tif (target.type === 'confirm') {\n\t\t\t\t\t\t\tconst index = this.activeDialogs.indexOf(dialog)\n\t\t\t\t\t\t\tif (index !== -1) {\n\t\t\t\t\t\t\t\tthis.activeDialogs.splice(index, 1)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Clean up content\n\t\t\t\t\t\t\tconst contentEl = dialog.querySelector('[slot=\"content\"]')\n\t\t\t\t\t\t\tif (contentEl) {\n\t\t\t\t\t\t\t\tdialog.removeChild(contentEl)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconst index = this.activeRawDialogs.indexOf(dialog)\n\t\t\t\t\t\t\tif (index !== -1) {\n\t\t\t\t\t\t\t\tthis.activeRawDialogs.splice(index, 1)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Clean up content\n\t\t\t\t\t\t\tconst contentContainer = dialog.querySelector('.schmancy-dialog-content-container')\n\t\t\t\t\t\t\tif (contentContainer && contentContainer.parentNode) {\n\t\t\t\t\t\t\t\tcontentContainer.parentNode.removeChild(contentContainer)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Remove dialog from DOM\n\t\t\t\t\t\tif (dialog.parentElement) {\n\t\t\t\t\t\t\tdialog.parentElement.removeChild(dialog)\n\t\t\t\t\t\t}\n\t\t\t\t\t}).catch((error: any) => {\n\t\t\t\t\t\tif (target.reject) {\n\t\t\t\t\t\t\ttarget.reject(error)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t\n\t\t\t\t\t// Set up event listeners for callbacks\n\t\t\t\t\tif (target.options.onConfirm) {\n\t\t\t\t\t\tconst onConfirm = (_e: Event) => {\n\t\t\t\t\t\t\ttarget.options.onConfirm!()\n\t\t\t\t\t\t\tdialog.removeEventListener('confirm', onConfirm)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdialog.addEventListener('confirm', onConfirm)\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (target.options.onCancel) {\n\t\t\t\t\t\tconst onCancel = (_e: Event) => {\n\t\t\t\t\t\t\ttarget.options.onCancel!()\n\t\t\t\t\t\t\tdialog.removeEventListener('cancel', onCancel)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdialog.addEventListener('cancel', onCancel)\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\t\n\t/**\n\t * Sets up the dialog dismissal logic\n\t */\n\tprivate setupDialogDismissLogic() {\n\t\tthis.dismissSubject\n\t\t\t.pipe(\n\t\t\t\tswitchMap(uid =>\n\t\t\t\t\tforkJoin([\n\t\t\t\t\t\tfromEvent<DialogHereMortyEvent>(window, DialogHereMorty).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(100)),\n\t\t\t\t\t\t\tmap(e => e.detail),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tof(uid).pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent(DialogWhereAreYouRicky, { \n\t\t\t\t\t\t\t\t\t\tdetail: { uid },\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\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),\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t\ttap(([response]) => {\n\t\t\t\t\tif (response?.dialog) {\n\t\t\t\t\t\t// Hide the dialog\n\t\t\t\t\t\tresponse.dialog.hide(false)\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Remove from tracking arrays\n\t\t\t\t\t\tconst confirmIndex = this.activeDialogs.indexOf(response.dialog)\n\t\t\t\t\t\tif (confirmIndex !== -1) {\n\t\t\t\t\t\t\tthis.activeDialogs.splice(confirmIndex, 1)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tconst rawIndex = this.activeRawDialogs.indexOf(response.dialog)\n\t\t\t\t\t\tif (rawIndex !== -1) {\n\t\t\t\t\t\t\tthis.activeRawDialogs.splice(rawIndex, 1)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Remove dialog from DOM immediately\n\t\t\t\t\t\tif (response.dialog.parentElement) {\n\t\t\t\t\t\t\tresponse.dialog.parentElement.removeChild(response.dialog)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t/**\n\t * Show a confirmation dialog\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tpublic confirm(options: DialogOptions): Promise<boolean> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\t// Apply default options\n\t\t\tconst completeOptions = {\n\t\t\t\t...DialogService.DEFAULT_OPTIONS,\n\t\t\t\t...options,\n\t\t\t}\n\n\t\t\t// If no position is provided, center the dialog\n\t\t\tif (!completeOptions.position) {\n\t\t\t\tcompleteOptions.position = this.getCenteredPosition()\n\t\t\t}\n\n\t\t\t// Create dialog target and emit to subject\n\t\t\tconst target: DialogTarget = {\n\t\t\t\toptions: completeOptions,\n\t\t\t\ttype: 'confirm',\n\t\t\t\tcontent: completeOptions.content,\n\t\t\t\tresolve,\n\t\t\t\treject,\n\t\t\t}\n\n\t\t\tthis.dialogSubject.next(target)\n\t\t})\n\t}\n\n\t/**\n\t * Show a dialog with custom component content\n\t * Always renders content directly without any headers or action buttons\n\t * @returns Promise that resolves when dialog is closed\n\t */\n\tpublic component(\n\t\tcontent: TemplateResult | HTMLElement | (() => HTMLElement | TemplateResult),\n\t\toptions: Omit<DialogOptions, 'content' | 'message'> = {},\n\t): Promise<boolean> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\t// If no position is provided, center the dialog\n\t\t\tif (!options.position) {\n\t\t\t\toptions.position = this.getCenteredPosition()\n\t\t\t}\n\n\t\t\t// Create dialog target and emit to subject\n\t\t\tconst target: DialogTarget = {\n\t\t\t\toptions: options as DialogOptions,\n\t\t\t\ttype: 'component',\n\t\t\t\tcontent,\n\t\t\t\tresolve,\n\t\t\t\treject,\n\t\t\t}\n\n\t\t\tthis.dialogSubject.next(target)\n\t\t})\n\t}\n\n\t/**\n\t * Dismiss the most recently opened dialog (either confirm or component type)\n\t * @returns true if a dialog was dismissed, false if no dialogs were open\n\t */\n\tpublic dismiss(): boolean {\n\t\t// Try component dialog first (they're more likely to be on top)\n\t\tif (this.activeRawDialogs.length > 0) {\n\t\t\t// Get the most recently opened raw dialog (last in the array)\n\t\t\tconst dialog = this.activeRawDialogs[this.activeRawDialogs.length - 1]\n\t\t\tconst uid = dialog.getAttribute('uid')\n\t\t\t\n\t\t\tif (uid) {\n\t\t\t\tthis.dismissSubject.next(uid)\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Fall back to confirm dialogs\n\t\tif (this.activeDialogs.length > 0) {\n\t\t\t// Get the most recently opened dialog (last in the array)\n\t\t\tconst dialog = this.activeDialogs[this.activeDialogs.length - 1]\n\t\t\tconst uid = dialog.getAttribute('uid')\n\t\t\t\n\t\t\tif (uid) {\n\t\t\t\tthis.dismissSubject.next(uid)\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\t}\n\n\t/**\n\t * Show a simple confirmation dialog with just a message\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tpublic ask(message: string, event?: MouseEvent | TouchEvent): Promise<boolean> {\n\t\treturn this.confirm({\n\t\t\tmessage,\n\t\t\tposition: event,\n\t\t})\n\t}\n\n\t/**\n\t * Show a danger confirmation dialog\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tpublic danger(options: Omit<DialogOptions, 'variant'>): Promise<boolean> {\n\t\treturn this.confirm({\n\t\t\t...options,\n\t\t\tvariant: 'danger',\n\t\t})\n\t}\n\n\t/**\n\t * Get a centered position for the dialog\n\t */\n\tprivate getCenteredPosition(): { x: number; y: number } {\n\t\treturn {\n\t\t\tx: window.innerWidth / 2,\n\t\t\ty: window.innerHeight / 2,\n\t\t}\n\t}\n\n}\n\n/**\n * Global dialog utility - provides a quick way to show dialogs\n */\nexport const $dialog = {\n\t/**\n\t * Show a confirmation dialog\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tconfirm: (options: DialogOptions): Promise<boolean> => {\n\t\treturn DialogService.getInstance().confirm(options)\n\t},\n\n\t/**\n\t * Show a simple confirmation dialog with just a message\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\task: (message: string, event?: MouseEvent | TouchEvent): Promise<boolean> => {\n\t\treturn DialogService.getInstance().ask(message, event)\n\t},\n\n\t/**\n\t * Show a danger confirmation dialog\n\t * @returns Promise that resolves to true (confirm) or false (cancel)\n\t */\n\tdanger: (options: Omit<DialogOptions, 'variant'>): Promise<boolean> => {\n\t\treturn DialogService.getInstance().danger(options)\n\t},\n\n\t/**\n\t * Show a dialog with custom component content\n\t * @returns Promise that resolves when dialog is closed\n\t */\n\tcomponent: (\n\t\tcontent: TemplateResult | HTMLElement | (() => HTMLElement | TemplateResult),\n\t\toptions?: Omit<DialogOptions, 'content' | 'message'>,\n\t): Promise<boolean> => {\n\t\treturn DialogService.getInstance().component(content, options)\n\t},\n\n\t/**\n\t * Show a simple dialog without title or actions, just content\n\t * This is an alias for component() since all component dialogs are now simple by design\n\t * @returns Promise that resolves when dialog is closed\n\t */\n\tsimple: (\n\t\tcontent: TemplateResult | HTMLElement | (() => HTMLElement | TemplateResult),\n\t\toptions?: Omit<DialogOptions, 'content' | 'message' | 'title' | 'confirmText' | 'cancelText'>,\n\t): Promise<boolean> => {\n\t\treturn DialogService.getInstance().component(content, options)\n\t},\n\n\t/**\n\t * Dismiss the most recently opened dialog\n\t * @returns true if a dialog was dismissed, false if no dialogs were open\n\t */\n\tdismiss: (): boolean => {\n\t\treturn DialogService.getInstance().dismiss()\n\t},\n}\n\nexport default DialogService"],"names":["DialogService","constructor","this","activeDialogs","activeRawDialogs","dialogSubject","Subject","dismissSubject","setupDialogOpeningLogic","setupDialogDismissLogic","getInstance","instance","pipe","switchMap","forkJoin","fromEvent","window","DialogHereMorty","takeUntil","timer","map","e","detail","defaultIfEmpty","of","target","tap","uid","type","Date","now","Math","random","toString","substring","dispatchEvent","CustomEvent","DialogWhereAreYouRicky","bubbles","composed","response","dialog","targetContainer","parentElement","theme","options","ThemeWhereAreYou","ThemeHereIAm","take","document","body","createElement","setAttribute","appendChild","querySelector","confirmDialog","title","subtitle","message","confirmText","cancelText","variant","confirmColor","width","style","setProperty","content","contentContainer","slot","result","HTMLElement","render","push","directContentContainer","height","classList","add","position","getCenteredPosition","show","then","resolve","index","indexOf","splice","contentEl","removeChild","parentNode","catch","error","reject","onConfirm","_e","removeEventListener","addEventListener","onCancel","subscribe","hide","confirmIndex","rawIndex","Promise","completeOptions","DEFAULT_OPTIONS","next","dismiss","length","getAttribute","event","confirm","x","innerWidth","y","innerHeight","$dialog","ask","danger","component","simple"],"mappings":"kGAwCaA,EAAN,MAAMA,CAAAA,CA0BJ,aAAAC,CAZRC,KAAQC,cAAiC,CAAA,EAGzCD,KAAQE,iBAA0B,GAGlCF,KAAQG,cAAgB,IAAIC,UAG5BJ,KAAQK,eAAiB,IAAID,UAI5BJ,KAAK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QAAS,UACTE,MAAO,OAAA,EAVF,IAAM/D,EAAN4F,EA4bA,MAAMqB,EAAU,CAKtBL,QAAU/D,GACF7C,EAAcU,YAAAA,EAAckG,QAAQ/D,CAAAA,EAO5CqE,IAAK,CAACxD,EAAiBiD,IACf3G,EAAcU,YAAAA,EAAcwG,IAAIxD,EAASiD,CAAAA,EAOjDQ,OAAStE,GACD7C,EAAcU,YAAAA,EAAcyG,OAAOtE,CAAAA,EAO3CuE,UAAW,CACVlD,EACArB,IAEO7C,EAAcU,YAAAA,EAAc0G,UAAUlD,EAASrB,CAAAA,EAQvDwE,OAAQ,CACPnD,EACArB,IAEO7C,EAAcU,cAAc0G,UAAUlD,EAASrB,CAAAA,EAOvD2D,QAAS,IACDxG,EAAcU,YAAAA,EAAc8F,QAAAA,CAAAA"}
package/dist/dialog.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./dialog-content-ClfiDTji.cjs"),i=require("./dialog-service-BZZK8N6A.cjs");Object.defineProperty(exports,"ConfirmDialog",{enumerable:!0,get:()=>e.ConfirmDialog}),Object.defineProperty(exports,"SchmancyDialog",{enumerable:!0,get:()=>e.SchmancyDialog}),Object.defineProperty(exports,"SchmancyDialogContent",{enumerable:!0,get:()=>e.SchmancyDialogContent}),exports.$dialog=i.$dialog,exports.DialogService=i.DialogService;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./dialog-content-Biz4uVPD.cjs"),i=require("./dialog-service-B4gxdlr-.cjs");Object.defineProperty(exports,"ConfirmDialog",{enumerable:!0,get:()=>e.ConfirmDialog}),Object.defineProperty(exports,"SchmancyDialog",{enumerable:!0,get:()=>e.SchmancyDialog}),Object.defineProperty(exports,"SchmancyDialogContent",{enumerable:!0,get:()=>e.SchmancyDialogContent}),exports.$dialog=i.$dialog,exports.DialogService=i.DialogService;
2
2
  //# sourceMappingURL=dialog.cjs.map
package/dist/dialog.js CHANGED
@@ -1,5 +1,5 @@
1
- import { C as i, S as r, a as c } from "./dialog-content-Cc7LNx1o.js";
2
- import { $ as g, D as l } from "./dialog-service-DFMlRcXf.js";
1
+ import { C as i, S as r, a as c } from "./dialog-content-CmOEqKOr.js";
2
+ import { $ as g, D as l } from "./dialog-service-AdqbEHnW.js";
3
3
  export {
4
4
  g as $dialog,
5
5
  i as ConfirmDialog,
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-CtXY3MHV.cjs");const n=require("./area.component-DQ_erV9e.cjs"),t=require("./utils-C9nzOWpR.cjs");require("./autocomplete-PHnzqAII.cjs");const r=require("./avatar-N8UvQjsm.cjs"),q=require("./boat-B_xZilsk.cjs");require("./spinner-CV62BBoF.cjs");const h=require("./icon-button-9V68mzcL.cjs");require("./media-CIuTybvD.cjs");const w=require("./checkbox-BAuVXvYL.cjs");require("./chips-Dg2otqDI.cjs");const T=require("./circular-progress-DZUJU-z3.cjs"),S=require("./code-preview-CYHNaPek.cjs"),I=require("./payment-card-form-ccF9dfGC.cjs"),b=require("./date-range-CREpHqxO.cjs"),M=require("./date-range-inline-Czq1wHs1.cjs"),d=require("./delay-FgtrEHdo.cjs"),y=require("./dialog-content-ClfiDTji.cjs"),g=require("./dialog-service-BZZK8N6A.cjs"),l=require("./ripple-C2BHbhcS.cjs");require("./divider-2yg9r1tF.cjs");const p=require("./dropdown-content-DJ4CA3ug.cjs"),s=require("./timezone-UBBApQoU.cjs");require("./form-Dpokur4M.cjs"),require("./icon-mhchC8Qw.cjs");const f=require("./input-DzNoI9qU.cjs"),o=require("./flex-DWnX0ZPR.cjs"),u=require("./list-DRbkWHho.cjs");require("./menu-DEbZxoXr.cjs");const i=require("./notification-service-B6nHqzq5.cjs");require("./option-BPmOG_Hw.cjs"),require("./progress-BqZ7yHQe.cjs");const C=require("./radio-button-WmbuT_YW.cjs"),R=require("./rxjs-utils.cjs");require("rxjs"),require("./index-DyJ0oDpR.cjs");const A=require("./select-CPnSionr.cjs");require("./sheet-BY85jX0R.cjs");const a=require("./sheet.service-CNz7lXHC.cjs"),O=require("./slider-DBNoXRWS.cjs"),m=require("./schmancy-steps-container-CjAsrjKf.cjs"),c=require("./context-object-K_1gDFu-.cjs"),e=require("./selector-hook-DB8RFC1y.cjs"),P=require("./surface-ClfeUI6q.cjs"),j=require("./table-Rqnb4AJl.cjs");require("./tabs-compatibility-B1bE7hSG.cjs"),require("./textarea-Dlnyyrbq.cjs");const N=require("./theme.interface-Xg5Zi46a.cjs");require("./theme-button-Cao8AH8r.cjs");const D=require("./tooltip-WpE4e-fO.cjs"),v=require("./tree-Dn0t7MUR.cjs"),x=require("./types.cjs"),E=require("./typewriter-DwLZUKKQ.cjs"),B=require("./typography-BhCrqK_b.cjs"),H=require("./intersection-CVvaDv96.cjs");exports.FINDING_MORTIES=n.FINDING_MORTIES,exports.HERE_RICKY=n.HERE_RICKY,exports.HISTORY_STRATEGY=n.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>n.SchmancyArea}),exports.area=n.area,exports.routerHistory=n.routerHistory,exports.buildQueryString=t.buildQueryString,exports.compareActiveRoutes=t.compareActiveRoutes,exports.compareCustomElementConstructors=t.compareCustomElementConstructors,exports.compareRouteActions=t.compareRouteActions,exports.createRouteCacheKey=t.createRouteCacheKey,exports.debounce=t.debounce,exports.decodeRouteState=t.decodeRouteState,exports.deepMerge=t.deepMerge,exports.encodeRouteState=t.encodeRouteState,exports.extractQueryParams=t.extractQueryParams,exports.getTagName=t.getTagName,exports.isObject=t.isObject,exports.normalizeTagName=t.normalizeTagName,exports.sanitizeRouteState=t.sanitizeRouteState,exports.$drawer=r.$drawer,exports.HereMorty=r.HereMorty,Object.defineProperty(exports,"ScBadgeV2",{enumerable:!0,get:()=>r.ScBadgeV2}),Object.defineProperty(exports,"SchmancyAvatar",{enumerable:!0,get:()=>r.SchmancyAvatar}),Object.defineProperty(exports,"SchmancyBadgeV2",{enumerable:!0,get:()=>r.SchmancyBadgeV2}),Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>r.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=r.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>r.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=r.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=r.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>r.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=r.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=r.SchmancyContentDrawerSheetState,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>r.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=r.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=r.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>r.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerSidebar}),Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>r.SchmancyTeleportation}),exports.WhereAreYouRicky=r.WhereAreYouRicky,exports.schmancyContentDrawer=r.schmancyContentDrawer,exports.schmancyNavDrawer=r.schmancyNavDrawer,exports.teleport=r.teleport,Object.defineProperty(exports,"SchmancyBoat",{enumerable:!0,get:()=>q.SchmancyBoat}),Object.defineProperty(exports,"SchmancyButton",{enumerable:!0,get:()=>h.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>h.SchmnacyIconButton}),Object.defineProperty(exports,"SchmancyCheckbox",{enumerable:!0,get:()=>w.SchmancyCheckbox}),Object.defineProperty(exports,"SchmancyCircularProgress",{enumerable:!0,get:()=>T.SchmancyCircularProgress}),Object.defineProperty(exports,"SchmancyCode",{enumerable:!0,get:()=>S.SchmancyCode}),Object.defineProperty(exports,"SchmancyCodeHighlight",{enumerable:!0,get:()=>S.SchmancyCode}),Object.defineProperty(exports,"SchmancyCodePreview",{enumerable:!0,get:()=>S.SchmancyCodePreview}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>I.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDateRange",{enumerable:!0,get:()=>b.SchmancyDateRange}),exports.validateInitialDateRange=b.validateInitialDateRange,Object.defineProperty(exports,"SchmancyDateRangeInline",{enumerable:!0,get:()=>M.SchmancyDateRangeInline}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>d.SchmancyDelay}),exports.delayContext=d.delayContext,Object.defineProperty(exports,"ConfirmDialog",{enumerable:!0,get:()=>y.ConfirmDialog}),Object.defineProperty(exports,"SchmancyDialog",{enumerable:!0,get:()=>y.SchmancyDialog}),Object.defineProperty(exports,"SchmancyDialogContent",{enumerable:!0,get:()=>y.SchmancyDialogContent}),exports.$dialog=g.$dialog,exports.DialogService=g.DialogService,exports.color=l.color,exports.fullHeight=l.fullHeight,exports.ripple=l.ripple,Object.defineProperty(exports,"SchmancyDropdown",{enumerable:!0,get:()=>p.SchmancyDropdown}),Object.defineProperty(exports,"SchmancyDropdownContent",{enumerable:!0,get:()=>p.SchmancyDropdownContent}),Object.defineProperty(exports,"SchmancyCountriesSelect",{enumerable:!0,get:()=>s.SchmancyCountriesSelect}),Object.defineProperty(exports,"SchmancyTimezonesSelect",{enumerable:!0,get:()=>s.SchmancyTimezonesSelect}),Object.defineProperty(exports,"SchmancyInput",{enumerable:!0,get:()=>f.SchmancyInput}),Object.defineProperty(exports,"SchmancyInputCompat",{enumerable:!0,get:()=>f.SchmancyInputCompat}),Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>o.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>o.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>o.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>o.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>u.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>u.SchmancyListItem}),exports.SchmancyListTypeContext=u.SchmancyListTypeContext,exports.$notify=i.$notify,exports.NotificationAudioService=i.NotificationAudioService,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>i.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationContainer",{enumerable:!0,get:()=>i.SchmancyNotificationContainer}),Object.defineProperty(exports,"RadioButton",{enumerable:!0,get:()=>C.RadioButton}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>C.RadioGroup}),exports.mutationObserver=R.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>A.SchmancySelect}),exports.SchmancySheetPosition=a.SchmancySheetPosition,Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>a.SchmancyThemeComponent}),exports.SheetHereMorty=a.SheetHereMorty,exports.SheetWhereAreYouRicky=a.SheetWhereAreYouRicky,exports.ThemeHereIAm=a.ThemeHereIAm,exports.ThemeWhereAreYou=a.ThemeWhereAreYou,exports.formateTheme=a.formateTheme,exports.sheet=a.sheet,exports.tailwindStyles=a.tailwindStyles,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>O.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>O.SchmancySlider}),Object.defineProperty(exports,"SchmancyStep",{enumerable:!0,get:()=>m.SchmancyStep}),Object.defineProperty(exports,"SchmancyStepsContainer",{enumerable:!0,get:()=>m.SchmancyStepsContainer}),exports.StepsController=m.StepsController,exports.stepsContext=m.stepsContext,exports.BaseStore=c.BaseStore,exports.IndexedDBStorageManager=c.IndexedDBStorageManager,exports.LocalStorageManager=c.LocalStorageManager,exports.MemoryStorageManager=c.MemoryStorageManager,exports.SchmancyArrayStore=c.SchmancyArrayStore,exports.SchmancyStoreObject=c.SchmancyStoreObject,exports.SessionStorageManager=c.SessionStorageManager,exports.StoreError=c.StoreError,exports.createStorageManager=c.createStorageManager,exports.compareValues=e.compareValues,exports.createArrayContext=e.createArrayContext,exports.createCollectionSelector=e.createCollectionSelector,exports.createCompoundSelector=e.createCompoundSelector,exports.createContext=e.createContext,exports.createCountSelector=e.createCountSelector,exports.createEntriesSelector=e.createEntriesSelector,exports.createFilterSelector=e.createFilterSelector,exports.createFindSelector=e.createFindSelector,exports.createItemSelector=e.createItemSelector,exports.createItemsSelector=e.createItemsSelector,exports.createKeysSelector=e.createKeysSelector,exports.createMapSelector=e.createMapSelector,exports.createOptimizedSelector=e.createOptimizedSelector,exports.createSelector=e.createSelector,exports.createSortSelector=e.createSortSelector,exports.createTestArrayContext=e.createTestArrayContext,exports.filterArray=e.filterArray,exports.filterArrayItems=e.filterArrayItems,exports.filterMap=e.filterMap,exports.filterMapItems=e.filterMapItems,exports.getFieldValue=e.getFieldValue,exports.isArray=e.isArray,exports.isDate=e.isDate,exports.isIterable=e.isIterable,exports.isMap=e.isMap,exports.isNil=e.isNil,exports.isNumber=e.isNumber,exports.isPlainObject=e.isPlainObject,exports.isSet=e.isSet,exports.isString=e.isString,exports.select=e.select,exports.selectItem=e.selectItem,Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>P.SchmancySurface}),exports.SchmancySurfaceTypeContext=P.SchmancySurfaceTypeContext,Object.defineProperty(exports,"SchmancyDataTable",{enumerable:!0,get:()=>j.SchmancyDataTable}),Object.defineProperty(exports,"SchmancyTableRow",{enumerable:!0,get:()=>j.SchmancyTableRow}),exports.SchmancyTheme=N.SchmancyTheme,Object.defineProperty(exports,"SchmancyTooltip",{enumerable:!0,get:()=>D.SchmancyTooltip}),exports.tooltip=D.tooltip,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>v.SchmancyTree}),exports.SchmancyEvents=x.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>E.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>B.SchmancyTypography}),exports.intersection$=H.intersection$;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-CtXY3MHV.cjs");const n=require("./area.component-DQ_erV9e.cjs"),t=require("./utils-C9nzOWpR.cjs");require("./autocomplete-PHnzqAII.cjs");const r=require("./avatar-DDjdOEu0.cjs"),q=require("./boat-B_xZilsk.cjs");require("./spinner-CV62BBoF.cjs");const h=require("./icon-button-9V68mzcL.cjs");require("./media-CIuTybvD.cjs");const w=require("./checkbox-BAuVXvYL.cjs");require("./chips-Dg2otqDI.cjs");const T=require("./circular-progress-DZUJU-z3.cjs"),S=require("./code-preview-CYHNaPek.cjs"),I=require("./payment-card-form-ccF9dfGC.cjs"),b=require("./date-range-IyDqhNLw.cjs"),M=require("./date-range-inline-Czq1wHs1.cjs"),d=require("./delay-FgtrEHdo.cjs"),y=require("./dialog-content-Biz4uVPD.cjs"),g=require("./dialog-service-B4gxdlr-.cjs"),l=require("./ripple-C2BHbhcS.cjs");require("./divider-2yg9r1tF.cjs");const p=require("./dropdown-content-DJ4CA3ug.cjs"),s=require("./timezone-UBBApQoU.cjs");require("./form-Dpokur4M.cjs"),require("./icon-mhchC8Qw.cjs");const f=require("./input-DzNoI9qU.cjs"),o=require("./flex-DWnX0ZPR.cjs"),u=require("./list-DRbkWHho.cjs");require("./menu-DEbZxoXr.cjs");const i=require("./notification-service-B6nHqzq5.cjs");require("./option-BPmOG_Hw.cjs"),require("./progress-BqZ7yHQe.cjs");const C=require("./radio-button-WmbuT_YW.cjs"),R=require("./rxjs-utils.cjs");require("rxjs"),require("./index-DyJ0oDpR.cjs");const A=require("./select-CPnSionr.cjs");require("./sheet-QLZcRUG6.cjs");const a=require("./theme.component-B3Z6xZ33.cjs"),O=require("./slider-DBNoXRWS.cjs"),m=require("./schmancy-steps-container-CjAsrjKf.cjs"),c=require("./context-object-K_1gDFu-.cjs"),e=require("./selector-hook-DB8RFC1y.cjs"),P=require("./surface-ClfeUI6q.cjs"),j=require("./table-Rqnb4AJl.cjs");require("./tabs-compatibility-B1bE7hSG.cjs"),require("./textarea-Dlnyyrbq.cjs");const N=require("./theme.interface-Xg5Zi46a.cjs");require("./theme-button-Cao8AH8r.cjs");const D=require("./tooltip-WpE4e-fO.cjs"),v=require("./tree-Dn0t7MUR.cjs"),x=require("./types.cjs"),E=require("./typewriter-DwLZUKKQ.cjs"),B=require("./typography-BhCrqK_b.cjs"),H=require("./intersection-CVvaDv96.cjs");exports.FINDING_MORTIES=n.FINDING_MORTIES,exports.HERE_RICKY=n.HERE_RICKY,exports.HISTORY_STRATEGY=n.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>n.SchmancyArea}),exports.area=n.area,exports.routerHistory=n.routerHistory,exports.buildQueryString=t.buildQueryString,exports.compareActiveRoutes=t.compareActiveRoutes,exports.compareCustomElementConstructors=t.compareCustomElementConstructors,exports.compareRouteActions=t.compareRouteActions,exports.createRouteCacheKey=t.createRouteCacheKey,exports.debounce=t.debounce,exports.decodeRouteState=t.decodeRouteState,exports.deepMerge=t.deepMerge,exports.encodeRouteState=t.encodeRouteState,exports.extractQueryParams=t.extractQueryParams,exports.getTagName=t.getTagName,exports.isObject=t.isObject,exports.normalizeTagName=t.normalizeTagName,exports.sanitizeRouteState=t.sanitizeRouteState,exports.$drawer=r.$drawer,exports.HereMorty=r.HereMorty,Object.defineProperty(exports,"ScBadgeV2",{enumerable:!0,get:()=>r.ScBadgeV2}),Object.defineProperty(exports,"SchmancyAvatar",{enumerable:!0,get:()=>r.SchmancyAvatar}),Object.defineProperty(exports,"SchmancyBadgeV2",{enumerable:!0,get:()=>r.SchmancyBadgeV2}),Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>r.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=r.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>r.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=r.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=r.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>r.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=r.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=r.SchmancyContentDrawerSheetState,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>r.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=r.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=r.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>r.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerSidebar}),Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>r.SchmancyTeleportation}),exports.WhereAreYouRicky=r.WhereAreYouRicky,exports.schmancyContentDrawer=r.schmancyContentDrawer,exports.schmancyNavDrawer=r.schmancyNavDrawer,exports.teleport=r.teleport,Object.defineProperty(exports,"SchmancyBoat",{enumerable:!0,get:()=>q.SchmancyBoat}),Object.defineProperty(exports,"SchmancyButton",{enumerable:!0,get:()=>h.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>h.SchmnacyIconButton}),Object.defineProperty(exports,"SchmancyCheckbox",{enumerable:!0,get:()=>w.SchmancyCheckbox}),Object.defineProperty(exports,"SchmancyCircularProgress",{enumerable:!0,get:()=>T.SchmancyCircularProgress}),Object.defineProperty(exports,"SchmancyCode",{enumerable:!0,get:()=>S.SchmancyCode}),Object.defineProperty(exports,"SchmancyCodeHighlight",{enumerable:!0,get:()=>S.SchmancyCode}),Object.defineProperty(exports,"SchmancyCodePreview",{enumerable:!0,get:()=>S.SchmancyCodePreview}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>I.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDateRange",{enumerable:!0,get:()=>b.SchmancyDateRange}),exports.validateInitialDateRange=b.validateInitialDateRange,Object.defineProperty(exports,"SchmancyDateRangeInline",{enumerable:!0,get:()=>M.SchmancyDateRangeInline}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>d.SchmancyDelay}),exports.delayContext=d.delayContext,Object.defineProperty(exports,"ConfirmDialog",{enumerable:!0,get:()=>y.ConfirmDialog}),Object.defineProperty(exports,"SchmancyDialog",{enumerable:!0,get:()=>y.SchmancyDialog}),Object.defineProperty(exports,"SchmancyDialogContent",{enumerable:!0,get:()=>y.SchmancyDialogContent}),exports.$dialog=g.$dialog,exports.DialogService=g.DialogService,exports.color=l.color,exports.fullHeight=l.fullHeight,exports.ripple=l.ripple,Object.defineProperty(exports,"SchmancyDropdown",{enumerable:!0,get:()=>p.SchmancyDropdown}),Object.defineProperty(exports,"SchmancyDropdownContent",{enumerable:!0,get:()=>p.SchmancyDropdownContent}),Object.defineProperty(exports,"SchmancyCountriesSelect",{enumerable:!0,get:()=>s.SchmancyCountriesSelect}),Object.defineProperty(exports,"SchmancyTimezonesSelect",{enumerable:!0,get:()=>s.SchmancyTimezonesSelect}),Object.defineProperty(exports,"SchmancyInput",{enumerable:!0,get:()=>f.SchmancyInput}),Object.defineProperty(exports,"SchmancyInputCompat",{enumerable:!0,get:()=>f.SchmancyInputCompat}),Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>o.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>o.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>o.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>o.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>u.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>u.SchmancyListItem}),exports.SchmancyListTypeContext=u.SchmancyListTypeContext,exports.$notify=i.$notify,exports.NotificationAudioService=i.NotificationAudioService,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>i.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationContainer",{enumerable:!0,get:()=>i.SchmancyNotificationContainer}),Object.defineProperty(exports,"RadioButton",{enumerable:!0,get:()=>C.RadioButton}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>C.RadioGroup}),exports.mutationObserver=R.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>A.SchmancySelect}),exports.SchmancySheetPosition=a.SchmancySheetPosition,Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>a.SchmancyThemeComponent}),exports.SheetHereMorty=a.SheetHereMorty,exports.SheetWhereAreYouRicky=a.SheetWhereAreYouRicky,exports.ThemeHereIAm=a.ThemeHereIAm,exports.ThemeWhereAreYou=a.ThemeWhereAreYou,exports.formateTheme=a.formateTheme,exports.sheet=a.sheet,exports.tailwindStyles=a.tailwindStyles,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>O.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>O.SchmancySlider}),Object.defineProperty(exports,"SchmancyStep",{enumerable:!0,get:()=>m.SchmancyStep}),Object.defineProperty(exports,"SchmancyStepsContainer",{enumerable:!0,get:()=>m.SchmancyStepsContainer}),exports.StepsController=m.StepsController,exports.stepsContext=m.stepsContext,exports.BaseStore=c.BaseStore,exports.IndexedDBStorageManager=c.IndexedDBStorageManager,exports.LocalStorageManager=c.LocalStorageManager,exports.MemoryStorageManager=c.MemoryStorageManager,exports.SchmancyArrayStore=c.SchmancyArrayStore,exports.SchmancyStoreObject=c.SchmancyStoreObject,exports.SessionStorageManager=c.SessionStorageManager,exports.StoreError=c.StoreError,exports.createStorageManager=c.createStorageManager,exports.compareValues=e.compareValues,exports.createArrayContext=e.createArrayContext,exports.createCollectionSelector=e.createCollectionSelector,exports.createCompoundSelector=e.createCompoundSelector,exports.createContext=e.createContext,exports.createCountSelector=e.createCountSelector,exports.createEntriesSelector=e.createEntriesSelector,exports.createFilterSelector=e.createFilterSelector,exports.createFindSelector=e.createFindSelector,exports.createItemSelector=e.createItemSelector,exports.createItemsSelector=e.createItemsSelector,exports.createKeysSelector=e.createKeysSelector,exports.createMapSelector=e.createMapSelector,exports.createOptimizedSelector=e.createOptimizedSelector,exports.createSelector=e.createSelector,exports.createSortSelector=e.createSortSelector,exports.createTestArrayContext=e.createTestArrayContext,exports.filterArray=e.filterArray,exports.filterArrayItems=e.filterArrayItems,exports.filterMap=e.filterMap,exports.filterMapItems=e.filterMapItems,exports.getFieldValue=e.getFieldValue,exports.isArray=e.isArray,exports.isDate=e.isDate,exports.isIterable=e.isIterable,exports.isMap=e.isMap,exports.isNil=e.isNil,exports.isNumber=e.isNumber,exports.isPlainObject=e.isPlainObject,exports.isSet=e.isSet,exports.isString=e.isString,exports.select=e.select,exports.selectItem=e.selectItem,Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>P.SchmancySurface}),exports.SchmancySurfaceTypeContext=P.SchmancySurfaceTypeContext,Object.defineProperty(exports,"SchmancyDataTable",{enumerable:!0,get:()=>j.SchmancyDataTable}),Object.defineProperty(exports,"SchmancyTableRow",{enumerable:!0,get:()=>j.SchmancyTableRow}),exports.SchmancyTheme=N.SchmancyTheme,Object.defineProperty(exports,"SchmancyTooltip",{enumerable:!0,get:()=>D.SchmancyTooltip}),exports.tooltip=D.tooltip,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>v.SchmancyTree}),exports.SchmancyEvents=x.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>E.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>B.SchmancyTypography}),exports.intersection$=H.intersection$;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import "./animated-text-D26Fv13t.js";
2
2
  import { F as g, H as u, b as D, S as w, a as T, r as b } from "./area.component-BCcq9Nb7.js";
3
3
  import { l as M, h as R, c as A, f as v, j as N, a as H, b as B, d as E, e as F, k as O, g as $, i as j, n as k, s as L } from "./utils-03Coa8AW.js";
4
4
  import "./autocomplete-CHObbMzK.js";
5
- import { $ as Y, H as z, a as G, r as V, S as W, g as K, d as _, h as q, e as Q, f as J, i as U, b as X, c as Z, k as aa, m as ea, n as ra, o as ta, l as oa, p as ca, q as sa, W as na, s as ma, j as Sa, t as ia } from "./avatar-DbQohKTF.js";
5
+ import { $ as Y, H as z, a as G, r as V, S as W, g as K, d as _, h as q, e as Q, f as J, i as U, b as X, c as Z, k as aa, m as ea, n as ra, o as ta, l as oa, p as ca, q as sa, W as na, s as ma, j as Sa, t as ia } from "./avatar-DAPIovPH.js";
6
6
  import { S as ha } from "./boat-C_BvtlNQ.js";
7
7
  import "./spinner-CbA-FXRK.js";
8
8
  import { S as la, a as fa } from "./icon-button-BW5ofOL5.js";
@@ -12,11 +12,11 @@ import "./chips-Dn8RpKCE.js";
12
12
  import { S as ga } from "./circular-progress-B1RjFzcp.js";
13
13
  import { S as Da, S as wa, a as Ta } from "./code-preview-JlSLKkKg.js";
14
14
  import { S as Ia } from "./payment-card-form-Cs5bP5Di.js";
15
- import { S as Ra, v as Aa } from "./date-range-B7VG8UXD.js";
15
+ import { S as Ra, v as Aa } from "./date-range-BJNoGX45.js";
16
16
  import { S as Na } from "./date-range-inline-B_K4YPtB.js";
17
17
  import { S as Ba, d as Ea } from "./delay-D415_oVH.js";
18
- import { C as Oa, S as $a, a as ja } from "./dialog-content-Cc7LNx1o.js";
19
- import { $ as La, D as Pa } from "./dialog-service-DFMlRcXf.js";
18
+ import { C as Oa, S as $a, a as ja } from "./dialog-content-CmOEqKOr.js";
19
+ import { $ as La, D as Pa } from "./dialog-service-AdqbEHnW.js";
20
20
  import { c as za, f as Ga, r as Va } from "./ripple-BumgqsDT.js";
21
21
  import "./divider-Dn26vIou.js";
22
22
  import { S as Ka, a as _a } from "./dropdown-content-DOnGrBxV.js";
@@ -35,8 +35,8 @@ import { mutationObserver as Ce } from "./rxjs-utils.js";
35
35
  import "rxjs";
36
36
  import "./index-CuY8m6ta.js";
37
37
  import { S as ue } from "./select-rwocpGs2.js";
38
- import "./sheet-BY3YdE4E.js";
39
- import { S as we, d as Te, b as be, a as Ie, c as Me, T as Re, f as Ae, s as ve, t as Ne } from "./sheet.service-DSvFe5PY.js";
38
+ import "./sheet-BXNBQt5O.js";
39
+ import { S as we, d as Te, b as be, a as Ie, c as Me, T as Re, f as Ae, s as ve, t as Ne } from "./theme.component-DbZODTAR.js";
40
40
  import { S as Be, a as Ee } from "./slider-C7Z1bPq7.js";
41
41
  import { S as Oe, a as $e, b as je, s as ke } from "./schmancy-steps-container-CoARMXfB.js";
42
42
  import { B as Pe, I as Ye, L as ze, M as Ge, S as Ve, a as We, b as Ke, d as _e, c as qe } from "./context-object-CDDP4bTk.js";
@@ -50,7 +50,7 @@ import "./theme-button-C4JWRMiC.js";
50
50
  import { S as kr, t as Lr } from "./tooltip-nwQwCEgl.js";
51
51
  import { S as Yr } from "./tree-BDmB7KmQ.js";
52
52
  import { SchmancyEvents as Gr } from "./types.js";
53
- import { T as Wr } from "./typewriter-DMKxup-I.js";
53
+ import { T as Wr } from "./typewriter-CnloNIdN.js";
54
54
  import { S as _r } from "./typography-DYCOngD7.js";
55
55
  import { i as Qr } from "./intersection-CJxzz8c-.js";
56
56
  export {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-N8UvQjsm.cjs");exports.$drawer=e.$drawer,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),exports.schmancyNavDrawer=e.schmancyNavDrawer;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-DDjdOEu0.cjs");exports.$drawer=e.$drawer,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),exports.schmancyNavDrawer=e.schmancyNavDrawer;
2
2
  //# sourceMappingURL=nav-drawer.cjs.map
@@ -1,4 +1,4 @@
1
- import { $ as c, k as e, m as n, n as m, o as s, l as o, p as t, j as w } from "./avatar-DbQohKTF.js";
1
+ import { $ as c, k as e, m as n, n as m, o as s, l as o, p as t, j as w } from "./avatar-DAPIovPH.js";
2
2
  export {
3
3
  c as $drawer,
4
4
  e as SchmancyDrawerAppbar,
@@ -8,7 +8,7 @@ import { $ as A } from "./litElement.mixin-BH9PTyUD.js";
8
8
  import { cache as O } from "lit/directives/cache.js";
9
9
  import { ifDefined as v } from "lit/directives/if-defined.js";
10
10
  import { createRef as B, ref as F } from "lit/directives/ref.js";
11
- import { S as P, s as m, a as U, b as j } from "./sheet.service-DSvFe5PY.js";
11
+ import { S as P, s as m, a as U, b as j } from "./theme.component-DbZODTAR.js";
12
12
  var D = Object.getOwnPropertyDescriptor;
13
13
  let b = class extends $(C``) {
14
14
  render() {
@@ -146,4 +146,4 @@ a([c({ type: String, reflect: !0 })], n.prototype, "uid", 2), a([c({ type: Boole
146
146
  }
147
147
  };
148
148
  })], n.prototype, "onOpenChange", 1), n = a([g("schmancy-sheet")], n);
149
- //# sourceMappingURL=sheet-BY3YdE4E.js.map
149
+ //# sourceMappingURL=sheet-BXNBQt5O.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sheet-BY3YdE4E.js","sources":["../src/sheet/header.ts","../src/sheet/sheet.ts","../src/sheet/hook.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('schmancy-sheet-header')\nexport default class SchmancySheetHeader extends TailwindElement(css``) {\n\trender() {\n\t\treturn html`\n\t\t\t<sch-flex class=\"absolute top-0 left-0 md:left-[unset] md:right-0\">\n\t\t\t\t<div class=\"block md:hidden flex-1 justify-start items-start\">\n\t\t\t\t\t<slot name=\"back\">\n\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\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>\n\t\t\t\t\t\t\t<span class=\"text-[24px]\">&#8592; </span>\n\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"hidden md:block flex-1 justify-end items-end\">\n\t\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\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>\n\t\t\t\t\t\t\tclose\n\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t</sch-flex>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet-header': SchmancySheetHeader\n\t}\n}\n","import { $LitElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js'\nimport { cache } from 'lit/directives/cache.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { fromEvent, merge, of, take, takeUntil, tap } from 'rxjs'\nimport { on } from './hook'\nimport style from './sheet.scss?inline'\nimport {\n\tSchmancySheetPosition,\n\tSheetHereMorty,\n\tSheetWhereAreYouRicky,\n\tSheetWhereAreYouRickyEvent,\n\tsheet,\n} from './sheet.service'\n\n@customElement('schmancy-sheet')\nexport default class SchmancySheet extends $LitElement(style) {\n\t@property({ type: String, reflect: true }) uid!: string\n\t@property({ type: Boolean, reflect: true }) open = false\n\t@property({ type: String, reflect: true }) header: 'hidden' | 'visible' = 'visible'\n\t@property({ type: String, reflect: true }) position: SchmancySheetPosition = SchmancySheetPosition.Side\n\t@property({ type: Boolean, reflect: true }) persist = false\n\t@property({ type: Boolean, reflect: true }) lock = false\n\t@property({ type: Boolean, reflect: true }) handleHistory = true\n\t@property({ type: String, reflect: true }) title = ''\n\n\t// Use ref directive instead of @query\n\tprivate sheetRef = createRef<HTMLDivElement>()\n\t@queryAssignedElements({ flatten: true }) private assignedElements!: HTMLElement[]\n\n\t@property() focusAttribute = 'autofocus'\n\tprivate lastFocusedElement: HTMLElement | null = null\n\n\t@on('open')\n\tonOpenChange(_oldValue: boolean, newValue: boolean) {\n\t\tif (newValue) {\n\t\t\tthis.lastFocusedElement = document.activeElement as HTMLElement\n\t\t\t// Use native inert attribute to prevent focus outside sheet\n\t\t\tthis.setBackgroundInert(true)\n\t\t\tthis.focus()\n\t\t} else {\n\t\t\tthis.setBackgroundInert(false)\n\t\t\tthis.lastFocusedElement?.focus()\n\t\t\tthis.lastFocusedElement = null\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis.setupEventListeners()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.disconnecting.next(true)\n\t}\n\n\tprivate setupEventListeners() {\n\t\t// Handle browser back button - only if handleHistory is true\n\t\tconst popState$ = this.handleHistory\n\t\t\t? fromEvent<PopStateEvent>(window, 'popstate').pipe(\n\t\t\t\t\ttap(e => {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\tthis.closeSheet()\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t: of(null).pipe(take(0)) // Empty observable if handleHistory is false\n\n\t\t// Handle ESC key - listen on the sheet element for better event capture\n\t\tconst keyUp$ = fromEvent<KeyboardEvent>(this, 'keydown').pipe(\n\t\t\ttap(event => {\n\t\t\t\tif (event.key === 'Escape' && !this.lock && this.open) {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\n\t\t// Handle inter-component communication\n\t\tconst rickyComm$ = fromEvent<SheetWhereAreYouRickyEvent>(window, SheetWhereAreYouRicky).pipe(\n\t\t\ttap(e => {\n\t\t\t\tif (e.detail.uid === this.uid) this.announcePresence()\n\t\t\t}),\n\t\t)\n\n\t\tmerge(popState$, keyUp$, rickyComm$).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\n\tprivate announcePresence() {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent(SheetHereMorty, {\n\t\t\t\tdetail: { sheet: this },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate setBackgroundInert(inert: boolean) {\n\t\t// Get all sibling elements and make them inert\n\t\tconst parent = this.parentElement\n\t\tif (parent) {\n\t\t\tArray.from(parent.children).forEach(child => {\n\t\t\t\tif (child !== this && child instanceof HTMLElement) {\n\t\t\t\t\tif (inert) {\n\t\t\t\t\t\tchild.setAttribute('inert', '')\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.removeAttribute('inert')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t\t\n\t\t// Also handle body's direct children if sheet is attached to body\n\t\tif (this.parentElement === document.body) {\n\t\t\tArray.from(document.body.children).forEach(child => {\n\t\t\t\tif (child !== this && child !== parent && child instanceof HTMLElement) {\n\t\t\t\t\tif (inert) {\n\t\t\t\t\t\tchild.setAttribute('inert', '')\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.removeAttribute('inert')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\tsetIsSheetShown(isShown: boolean) {\n\t\tthis.sheetRef.value?.setAttribute('aria-hidden', String(!isShown))\n\t\tthis.sheetRef.value?.setAttribute('aria-modal', String(isShown))\n\t}\n\n\tcloseSheet() {\n\t\tthis.open = false\n\t\tthis.dispatchEvent(new CustomEvent('close'))\n\t}\n\n\tprivate getFocusElement(): HTMLElement | null {\n\t\tconst selector = `[${this.focusAttribute}]`\n\t\treturn (this.assignedElements.find(el => el.matches(selector) || el.querySelector(selector)) as HTMLElement) ?? null\n\t}\n\n\toverride focus() {\n\t\t// First try native autofocus attribute\n\t\tconst autofocusElement = this.querySelector('[autofocus]') as HTMLElement\n\t\tif (autofocusElement) {\n\t\t\tautofocusElement.focus()\n\t\t\treturn\n\t\t}\n\t\t\n\t\t// Fallback to custom focus attribute\n\t\tthis.getFocusElement()?.focus()\n\t}\n\n\tprivate handleOverlayClick = (e: Event) => {\n\t\te.stopPropagation()\n\t\tif (!this.lock) {\n\t\t\tsheet.dismiss(this.uid)\n\t\t}\n\t}\n\n\tprivate handleHeaderDismiss = (e: CustomEvent) => {\n\t\te.stopPropagation()\n\t\tsheet.dismiss(this.uid)\n\t}\n\n\trender() {\n\t\tconst sheetClasses = {\n\t\t\t'sheet': true,\n\t\t\t'sheet--open': this.open,\n\t\t\t'sheet--locked': this.lock,\n\t\t}\n\n\t\tconst overlayClasses = {\n\t\t\t'overlay': true,\n\t\t\t'overlay--interactive': !this.lock,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div \n\t\t\t\tclass=${classMap(sheetClasses)}\n\t\t\t\trole=\"dialog\" \n\t\t\t\taria-labelledby=${ifDefined(this.header !== 'hidden' ? 'sheet-title' : undefined)}\n\t\t\t\taria-hidden=${!this.open} \n\t\t\t\taria-modal=${this.open}\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t${ref(this.sheetRef)}>\n\t\t\t\t<div\n\t\t\t\t\tclass=${classMap(overlayClasses)}\n\t\t\t\t\t@click=${this.lock ? undefined : this.handleOverlayClick}\n\t\t\t\t></div>\n\t\t\t\t<schmancy-grid\n\t\t\t\t\trows=${this.header === 'hidden' ? '1fr' : 'auto 1fr'}\n\t\t\t\t\tclass=\"content w-full\"\n\t\t\t\t\tdata-position=${this.position}\n\t\t\t\t>\n\t\t\t\t\t${cache(\n\t\t\t\t\t\tthis.header !== 'hidden'\n\t\t\t\t\t\t\t? html`<schmancy-sheet-header\n\t\t\t\t\t\t\t\tclass=\"sticky top-0 z-50 w-full\"\n\t\t\t\t\t\t\t\t@dismiss=${this.handleHeaderDismiss}\n\t\t\t\t\t\t\t\tid=\"sheet-title\"\n\t\t\t\t\t\t\t\ttitle=${ifDefined(this.title || undefined)}\n\t\t\t\t\t\t\t></schmancy-sheet-header>`\n\t\t\t\t\t\t\t: ''\n\t\t\t\t\t)}\n\n\t\t\t\t\t<schmancy-surface rounded=\"left\" fill=\"all\" id=\"body\" class=\"overflow-auto\" type=\"surface\">\n\t\t\t\t\t\t<schmancy-scroll> <slot></slot></schmancy-scroll>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</schmancy-grid>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet': SchmancySheet\n\t}\n}\n","// @watch decorator\n//\n// Runs when an observed property changes, e.g. @property or @state, but before the component updates.\n//\n// To wait for an update to complete after a change occurs, use `await this.updateComplete` in the handler. To start\n// watching after the initial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.\n//\n// Usage:\n//\n// @watch('propName')\n// handlePropChange(oldValue, newValue) {\n// ...\n// }\n//\ninterface WatchOptions {\n\twaitUntilFirstUpdate?: boolean\n}\n\nexport function on(propName: string, options?: WatchOptions) {\n\treturn (protoOrDescriptor: any, name: string): any => {\n\t\tconst { willUpdate } = protoOrDescriptor\n\n\t\toptions = Object.assign({ waitUntilFirstUpdate: false }, options) as WatchOptions\n\n\t\tprotoOrDescriptor.willUpdate = function (changedProps: Map<string, any>) {\n\t\t\twillUpdate.call(this, changedProps)\n\n\t\t\tif (changedProps.has(propName)) {\n\t\t\t\tconst oldValue = changedProps.get(propName)\n\t\t\t\tconst newValue = this[propName]\n\n\t\t\t\tif (oldValue !== newValue) {\n\t\t\t\t\tif (!options?.waitUntilFirstUpdate || this.hasUpdated) {\n\t\t\t\t\t\tthis[name].call(this, oldValue, newValue)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],"names":["SchmancySheetHeader","TailwindElement","css","render","html","this","dispatchEvent","CustomEvent","bubbles","composed","customElement","SchmancySheet","$LitElement","constructor","super","arguments","open","header","position","SchmancySheetPosition","Side","persist","lock","handleHistory","title","sheetRef","createRef","focusAttribute","lastFocusedElement","handleOverlayClick","e","stopPropagation","sheet","dismiss","uid","handleHeaderDismiss","_oldValue","newValue","document","activeElement","setBackgroundInert","focus","connectedCallback","setupEventListeners","disconnectedCallback","disconnecting","next","popState$","fromEvent","window","pipe","tap","preventDefault","closeSheet","of","take","keyUp$","event","key","rickyComm$","SheetWhereAreYouRicky","detail","announcePresence","merge","takeUntil","subscribe","SheetHereMorty","inert","parent","parentElement","Array","from","children","forEach","child","HTMLElement","setAttribute","removeAttribute","body","isShown","value","String","getFocusElement","selector","assignedElements","find","el","matches","querySelector","autofocusElement","sheetClasses","overlayClasses","overlay","classMap","ifDefined","ref","cache","propName","options","__decorateClass","property","type","reflect","prototype","Boolean","queryAssignedElements","flatten","protoOrDescriptor","name","willUpdate","Object","assign","waitUntilFirstUpdate","changedProps","call","has","oldValue","get","hasUpdated"],"mappings":";;;;;;;;;;;;AAKA,IAAqBA,IAArB,cAAiDC,EAAgBC,GAAA,EAAA;AAAA,EAChE,SAAAC;AACC,WAAOC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,gBAKO,MAAA;AACRC,WAAKC,cACJ,IAAIC,YAAY,WAAW,EAC1BC,SAAAA,IACAC,UAAAA,GAAU,CAAA,CAAA;AAAA,IAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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J,EAAA,ECnBkBF,IDkBd,QCjBG,CAACU,GAAwBC,MAAAA;AAC/B,QAAA,EAAMC,YAAEA,EAAAA,IAAeF;AAEvBT,EAAAA,IAAUY,OAAOC,OAAO,EAAEC,sBAAAA,GAAsB,GAASd,CAAAA,GAEzDS,EAAkBE,aAAa,SAAUI,GAAAA;AAGxC,QAFAJ,EAAWK,KAAK7G,MAAM4G,CAAAA,GAElBA,EAAaE,IAAIlB,CAAAA,GAAW;AAC/B,YAAMmB,IAAWH,EAAaI,IAAIpB,CAAAA,GAC5B5D,IAAWhC,KAAK4F,CAAAA;AAElBmB,MAAAA,MAAa/E,MACX6D,GAASc,yBAAwB3G,KAAKiH,cAC1CjH,KAAKuG,CAAAA,EAAMM,KAAK7G,MAAM+G,GAAU/E,CAAAA;AAAAA,IAGnC;AAAA,EACD;AAAA,EAAA,GDlBmB1B,EAkBpB4F,WAAA,gBAAA,CAAA,GAlBoB5F,IAArBwF,EAAA,CADCzF,EAAc,gBAAA,CAAA,GACMC,CAAAA;"}
1
+ {"version":3,"file":"sheet-BXNBQt5O.js","sources":["../src/sheet/header.ts","../src/sheet/sheet.ts","../src/sheet/hook.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('schmancy-sheet-header')\nexport default class SchmancySheetHeader extends TailwindElement(css``) {\n\trender() {\n\t\treturn html`\n\t\t\t<sch-flex class=\"absolute top-0 left-0 md:left-[unset] md:right-0\">\n\t\t\t\t<div class=\"block md:hidden flex-1 justify-start items-start\">\n\t\t\t\t\t<slot name=\"back\">\n\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\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>\n\t\t\t\t\t\t\t<span class=\"text-[24px]\">&#8592; </span>\n\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"hidden md:block flex-1 justify-end items-end\">\n\t\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\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>\n\t\t\t\t\t\t\tclose\n\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t</sch-flex>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet-header': SchmancySheetHeader\n\t}\n}\n","import { $LitElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js'\nimport { cache } from 'lit/directives/cache.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { fromEvent, merge, of, take, takeUntil, tap } from 'rxjs'\nimport { on } from './hook'\nimport style from './sheet.scss?inline'\nimport {\n\tSchmancySheetPosition,\n\tSheetHereMorty,\n\tSheetWhereAreYouRicky,\n\tSheetWhereAreYouRickyEvent,\n\tsheet,\n} from './sheet.service'\n\n@customElement('schmancy-sheet')\nexport default class SchmancySheet extends $LitElement(style) {\n\t@property({ type: String, reflect: true }) uid!: string\n\t@property({ type: Boolean, reflect: true }) open = false\n\t@property({ type: String, reflect: true }) header: 'hidden' | 'visible' = 'visible'\n\t@property({ type: String, reflect: true }) position: SchmancySheetPosition = SchmancySheetPosition.Side\n\t@property({ type: Boolean, reflect: true }) persist = false\n\t@property({ type: Boolean, reflect: true }) lock = false\n\t@property({ type: Boolean, reflect: true }) handleHistory = true\n\t@property({ type: String, reflect: true }) title = ''\n\n\t// Use ref directive instead of @query\n\tprivate sheetRef = createRef<HTMLDivElement>()\n\t@queryAssignedElements({ flatten: true }) private assignedElements!: HTMLElement[]\n\n\t@property() focusAttribute = 'autofocus'\n\tprivate lastFocusedElement: HTMLElement | null = null\n\n\t@on('open')\n\tonOpenChange(_oldValue: boolean, newValue: boolean) {\n\t\tif (newValue) {\n\t\t\tthis.lastFocusedElement = document.activeElement as HTMLElement\n\t\t\t// Use native inert attribute to prevent focus outside sheet\n\t\t\tthis.setBackgroundInert(true)\n\t\t\tthis.focus()\n\t\t} else {\n\t\t\tthis.setBackgroundInert(false)\n\t\t\tthis.lastFocusedElement?.focus()\n\t\t\tthis.lastFocusedElement = null\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis.setupEventListeners()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.disconnecting.next(true)\n\t}\n\n\tprivate setupEventListeners() {\n\t\t// Handle browser back button - only if handleHistory is true\n\t\tconst popState$ = this.handleHistory\n\t\t\t? fromEvent<PopStateEvent>(window, 'popstate').pipe(\n\t\t\t\t\ttap(e => {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\tthis.closeSheet()\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t: of(null).pipe(take(0)) // Empty observable if handleHistory is false\n\n\t\t// Handle ESC key - listen on the sheet element for better event capture\n\t\tconst keyUp$ = fromEvent<KeyboardEvent>(this, 'keydown').pipe(\n\t\t\ttap(event => {\n\t\t\t\tif (event.key === 'Escape' && !this.lock && this.open) {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\n\t\t// Handle inter-component communication\n\t\tconst rickyComm$ = fromEvent<SheetWhereAreYouRickyEvent>(window, SheetWhereAreYouRicky).pipe(\n\t\t\ttap(e => {\n\t\t\t\tif (e.detail.uid === this.uid) this.announcePresence()\n\t\t\t}),\n\t\t)\n\n\t\tmerge(popState$, keyUp$, rickyComm$).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\n\tprivate announcePresence() {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent(SheetHereMorty, {\n\t\t\t\tdetail: { sheet: this },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate setBackgroundInert(inert: boolean) {\n\t\t// Get all sibling elements and make them inert\n\t\tconst parent = this.parentElement\n\t\tif (parent) {\n\t\t\tArray.from(parent.children).forEach(child => {\n\t\t\t\tif (child !== this && child instanceof HTMLElement) {\n\t\t\t\t\tif (inert) {\n\t\t\t\t\t\tchild.setAttribute('inert', '')\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.removeAttribute('inert')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t\t\n\t\t// Also handle body's direct children if sheet is attached to body\n\t\tif (this.parentElement === document.body) {\n\t\t\tArray.from(document.body.children).forEach(child => {\n\t\t\t\tif (child !== this && child !== parent && child instanceof HTMLElement) {\n\t\t\t\t\tif (inert) {\n\t\t\t\t\t\tchild.setAttribute('inert', '')\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.removeAttribute('inert')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\tsetIsSheetShown(isShown: boolean) {\n\t\tthis.sheetRef.value?.setAttribute('aria-hidden', String(!isShown))\n\t\tthis.sheetRef.value?.setAttribute('aria-modal', String(isShown))\n\t}\n\n\tcloseSheet() {\n\t\tthis.open = false\n\t\tthis.dispatchEvent(new CustomEvent('close'))\n\t}\n\n\tprivate getFocusElement(): HTMLElement | null {\n\t\tconst selector = `[${this.focusAttribute}]`\n\t\treturn (this.assignedElements.find(el => el.matches(selector) || el.querySelector(selector)) as HTMLElement) ?? null\n\t}\n\n\toverride focus() {\n\t\t// First try native autofocus attribute\n\t\tconst autofocusElement = this.querySelector('[autofocus]') as HTMLElement\n\t\tif (autofocusElement) {\n\t\t\tautofocusElement.focus()\n\t\t\treturn\n\t\t}\n\t\t\n\t\t// Fallback to custom focus attribute\n\t\tthis.getFocusElement()?.focus()\n\t}\n\n\tprivate handleOverlayClick = (e: Event) => {\n\t\te.stopPropagation()\n\t\tif (!this.lock) {\n\t\t\tsheet.dismiss(this.uid)\n\t\t}\n\t}\n\n\tprivate handleHeaderDismiss = (e: CustomEvent) => {\n\t\te.stopPropagation()\n\t\tsheet.dismiss(this.uid)\n\t}\n\n\trender() {\n\t\tconst sheetClasses = {\n\t\t\t'sheet': true,\n\t\t\t'sheet--open': this.open,\n\t\t\t'sheet--locked': this.lock,\n\t\t}\n\n\t\tconst overlayClasses = {\n\t\t\t'overlay': true,\n\t\t\t'overlay--interactive': !this.lock,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div \n\t\t\t\tclass=${classMap(sheetClasses)}\n\t\t\t\trole=\"dialog\" \n\t\t\t\taria-labelledby=${ifDefined(this.header !== 'hidden' ? 'sheet-title' : undefined)}\n\t\t\t\taria-hidden=${!this.open} \n\t\t\t\taria-modal=${this.open}\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t${ref(this.sheetRef)}>\n\t\t\t\t<div\n\t\t\t\t\tclass=${classMap(overlayClasses)}\n\t\t\t\t\t@click=${this.lock ? undefined : this.handleOverlayClick}\n\t\t\t\t></div>\n\t\t\t\t<schmancy-grid\n\t\t\t\t\trows=${this.header === 'hidden' ? '1fr' : 'auto 1fr'}\n\t\t\t\t\tclass=\"content w-full\"\n\t\t\t\t\tdata-position=${this.position}\n\t\t\t\t>\n\t\t\t\t\t${cache(\n\t\t\t\t\t\tthis.header !== 'hidden'\n\t\t\t\t\t\t\t? html`<schmancy-sheet-header\n\t\t\t\t\t\t\t\tclass=\"sticky top-0 z-50 w-full\"\n\t\t\t\t\t\t\t\t@dismiss=${this.handleHeaderDismiss}\n\t\t\t\t\t\t\t\tid=\"sheet-title\"\n\t\t\t\t\t\t\t\ttitle=${ifDefined(this.title || undefined)}\n\t\t\t\t\t\t\t></schmancy-sheet-header>`\n\t\t\t\t\t\t\t: ''\n\t\t\t\t\t)}\n\n\t\t\t\t\t<schmancy-surface rounded=\"left\" fill=\"all\" id=\"body\" class=\"overflow-auto\" type=\"surface\">\n\t\t\t\t\t\t<schmancy-scroll> <slot></slot></schmancy-scroll>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</schmancy-grid>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet': SchmancySheet\n\t}\n}\n","// @watch decorator\n//\n// Runs when an observed property changes, e.g. @property or @state, but before the component updates.\n//\n// To wait for an update to complete after a change occurs, use `await this.updateComplete` in the handler. To start\n// watching after the initial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.\n//\n// Usage:\n//\n// @watch('propName')\n// handlePropChange(oldValue, newValue) {\n// ...\n// }\n//\ninterface WatchOptions {\n\twaitUntilFirstUpdate?: boolean\n}\n\nexport function on(propName: string, options?: WatchOptions) {\n\treturn (protoOrDescriptor: any, name: string): any => {\n\t\tconst { willUpdate } = protoOrDescriptor\n\n\t\toptions = Object.assign({ waitUntilFirstUpdate: false }, options) as WatchOptions\n\n\t\tprotoOrDescriptor.willUpdate = function (changedProps: Map<string, any>) {\n\t\t\twillUpdate.call(this, changedProps)\n\n\t\t\tif (changedProps.has(propName)) {\n\t\t\t\tconst oldValue = changedProps.get(propName)\n\t\t\t\tconst newValue = this[propName]\n\n\t\t\t\tif (oldValue !== newValue) {\n\t\t\t\t\tif (!options?.waitUntilFirstUpdate || this.hasUpdated) {\n\t\t\t\t\t\tthis[name].call(this, oldValue, newValue)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],"names":["SchmancySheetHeader","TailwindElement","css","render","html","this","dispatchEvent","CustomEvent","bubbles","composed","customElement","SchmancySheet","$LitElement","constructor","super","arguments","open","header","position","SchmancySheetPosition","Side","persist","lock","handleHistory","title","sheetRef","createRef","focusAttribute","lastFocusedElement","handleOverlayClick","e","stopPropagation","sheet","dismiss","uid","handleHeaderDismiss","_oldValue","newValue","document","activeElement","setBackgroundInert","focus","connectedCallback","setupEventListeners","disconnectedCallback","disconnecting","next","popState$","fromEvent","window","pipe","tap","preventDefault","closeSheet","of","take","keyUp$","event","key","rickyComm$","SheetWhereAreYouRicky","detail","announcePresence","merge","takeUntil","subscribe","SheetHereMorty","inert","parent","parentElement","Array","from","children","forEach","child","HTMLElement","setAttribute","removeAttribute","body","isShown","value","String","getFocusElement","selector","assignedElements","find","el","matches","querySelector","autofocusElement","sheetClasses","overlayClasses","overlay","classMap","ifDefined","ref","cache","propName","options","__decorateClass","property","type","reflect","prototype","Boolean","queryAssignedElements","flatten","protoOrDescriptor","name","willUpdate","Object","assign","waitUntilFirstUpdate","changedProps","call","has","oldValue","get","hasUpdated"],"mappings":";;;;;;;;;;;;AAKA,IAAqBA,IAArB,cAAiDC,EAAgBC,GAAA,EAAA;AAAA,EAChE,SAAAC;AACC,WAAOC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,gBAKO,MAAA;AACRC,WAAKC,cACJ,IAAIC,YAAY,WAAW,EAC1BC,SAAAA,IACAC,UAAAA,GAAU,CAAA,CAAA;AAAA,IAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAaJ,MAAA;AACRJ,WAAKC,cACJ,IAAIC,YAAY,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A,EAAMC,YAAEA,EAAAA,IAAeF;AAEvBT,EAAAA,IAAUY,OAAOC,OAAO,EAAEC,sBAAAA,GAAsB,GAASd,CAAAA,GAEzDS,EAAkBE,aAAa,SAAUI,GAAAA;AAGxC,QAFAJ,EAAWK,KAAK7G,MAAM4G,CAAAA,GAElBA,EAAaE,IAAIlB,CAAAA,GAAW;AAC/B,YAAMmB,IAAWH,EAAaI,IAAIpB,CAAAA,GAC5B5D,IAAWhC,KAAK4F,CAAAA;AAElBmB,MAAAA,MAAa/E,MACX6D,GAASc,yBAAwB3G,KAAKiH,cAC1CjH,KAAKuG,CAAAA,EAAMM,KAAK7G,MAAM+G,GAAU/E,CAAAA;AAAAA,IAGnC;AAAA,EACD;AAAA,EAAA,GDlBmB1B,EAkBpB4F,WAAA,gBAAA,CAAA,GAlBoB5F,IAArBwF,EAAA,CADCzF,EAAc,gBAAA,CAAA,GACMC,CAAAA;"}
@@ -1,4 +1,4 @@
1
- "use strict";const c=require("rxjs"),y=require("lit/directives/class-map.js");require("lit/directives/style-map.js");const g=require("./tailwind.mixin-DVKI3qb9.cjs"),a=require("lit/decorators.js"),u=require("lit"),E=require("./litElement.mixin-B01R2oT7.cjs"),w=require("lit/directives/cache.js"),f=require("lit/directives/if-defined.js"),v=require("lit/directives/ref.js"),d=require("./sheet.service-CNz7lXHC.cjs");var k=Object.getOwnPropertyDescriptor;let b=class extends g.TailwindElement(u.css``){render(){return u.html`
1
+ "use strict";const c=require("rxjs"),y=require("lit/directives/class-map.js");require("lit/directives/style-map.js");const g=require("./tailwind.mixin-DVKI3qb9.cjs"),a=require("lit/decorators.js"),u=require("lit"),E=require("./litElement.mixin-B01R2oT7.cjs"),w=require("lit/directives/cache.js"),f=require("lit/directives/if-defined.js"),v=require("lit/directives/ref.js"),d=require("./theme.component-B3Z6xZ33.cjs");var k=Object.getOwnPropertyDescriptor;let b=class extends g.TailwindElement(u.css``){render(){return u.html`
2
2
  <sch-flex class="absolute top-0 left-0 md:left-[unset] md:right-0">
3
3
  <div class="block md:hidden flex-1 justify-start items-start">
4
4
  <slot name="back">
@@ -51,4 +51,4 @@
51
51
  </schmancy-grid>
52
52
  </div>
53
53
  `}};var p,m;r([a.property({type:String,reflect:!0})],o.prototype,"uid",2),r([a.property({type:Boolean,reflect:!0})],o.prototype,"open",2),r([a.property({type:String,reflect:!0})],o.prototype,"header",2),r([a.property({type:String,reflect:!0})],o.prototype,"position",2),r([a.property({type:Boolean,reflect:!0})],o.prototype,"persist",2),r([a.property({type:Boolean,reflect:!0})],o.prototype,"lock",2),r([a.property({type:Boolean,reflect:!0})],o.prototype,"handleHistory",2),r([a.property({type:String,reflect:!0})],o.prototype,"title",2),r([a.queryAssignedElements({flatten:!0})],o.prototype,"assignedElements",2),r([a.property()],o.prototype,"focusAttribute",2),r([(p="open",(t,e)=>{const{willUpdate:i}=t;m=Object.assign({waitUntilFirstUpdate:!1},m),t.willUpdate=function(s){if(i.call(this,s),s.has(p)){const h=s.get(p),n=this[p];h!==n&&(m?.waitUntilFirstUpdate&&!this.hasUpdated||this[e].call(this,h,n))}}})],o.prototype,"onOpenChange",1),o=r([a.customElement("schmancy-sheet")],o);
54
- //# sourceMappingURL=sheet-BY85jX0R.cjs.map
54
+ //# sourceMappingURL=sheet-QLZcRUG6.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"sheet-BY85jX0R.cjs","sources":["../src/sheet/header.ts","../src/sheet/sheet.ts","../src/sheet/hook.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('schmancy-sheet-header')\nexport default class SchmancySheetHeader extends TailwindElement(css``) {\n\trender() {\n\t\treturn html`\n\t\t\t<sch-flex class=\"absolute top-0 left-0 md:left-[unset] md:right-0\">\n\t\t\t\t<div class=\"block md:hidden flex-1 justify-start items-start\">\n\t\t\t\t\t<slot name=\"back\">\n\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\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>\n\t\t\t\t\t\t\t<span class=\"text-[24px]\">&#8592; </span>\n\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"hidden md:block flex-1 justify-end items-end\">\n\t\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\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>\n\t\t\t\t\t\t\tclose\n\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t</sch-flex>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet-header': SchmancySheetHeader\n\t}\n}\n","import { $LitElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js'\nimport { cache } from 'lit/directives/cache.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { fromEvent, merge, of, take, takeUntil, tap } from 'rxjs'\nimport { on } from './hook'\nimport style from './sheet.scss?inline'\nimport {\n\tSchmancySheetPosition,\n\tSheetHereMorty,\n\tSheetWhereAreYouRicky,\n\tSheetWhereAreYouRickyEvent,\n\tsheet,\n} from './sheet.service'\n\n@customElement('schmancy-sheet')\nexport default class SchmancySheet extends $LitElement(style) {\n\t@property({ type: String, reflect: true }) uid!: string\n\t@property({ type: Boolean, reflect: true }) open = false\n\t@property({ type: String, reflect: true }) header: 'hidden' | 'visible' = 'visible'\n\t@property({ type: String, reflect: true }) position: SchmancySheetPosition = SchmancySheetPosition.Side\n\t@property({ type: Boolean, reflect: true }) persist = false\n\t@property({ type: Boolean, reflect: true }) lock = false\n\t@property({ type: Boolean, reflect: true }) handleHistory = true\n\t@property({ type: String, reflect: true }) title = ''\n\n\t// Use ref directive instead of @query\n\tprivate sheetRef = createRef<HTMLDivElement>()\n\t@queryAssignedElements({ flatten: true }) private assignedElements!: HTMLElement[]\n\n\t@property() focusAttribute = 'autofocus'\n\tprivate lastFocusedElement: HTMLElement | null = null\n\n\t@on('open')\n\tonOpenChange(_oldValue: boolean, newValue: boolean) {\n\t\tif (newValue) {\n\t\t\tthis.lastFocusedElement = document.activeElement as HTMLElement\n\t\t\t// Use native inert attribute to prevent focus outside sheet\n\t\t\tthis.setBackgroundInert(true)\n\t\t\tthis.focus()\n\t\t} else {\n\t\t\tthis.setBackgroundInert(false)\n\t\t\tthis.lastFocusedElement?.focus()\n\t\t\tthis.lastFocusedElement = null\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis.setupEventListeners()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.disconnecting.next(true)\n\t}\n\n\tprivate setupEventListeners() {\n\t\t// Handle browser back button - only if handleHistory is true\n\t\tconst popState$ = this.handleHistory\n\t\t\t? fromEvent<PopStateEvent>(window, 'popstate').pipe(\n\t\t\t\t\ttap(e => {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\tthis.closeSheet()\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t: of(null).pipe(take(0)) // Empty observable if handleHistory is false\n\n\t\t// Handle ESC key - listen on the sheet element for better event capture\n\t\tconst keyUp$ = fromEvent<KeyboardEvent>(this, 'keydown').pipe(\n\t\t\ttap(event => {\n\t\t\t\tif (event.key === 'Escape' && !this.lock && this.open) {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\n\t\t// Handle inter-component communication\n\t\tconst rickyComm$ = fromEvent<SheetWhereAreYouRickyEvent>(window, SheetWhereAreYouRicky).pipe(\n\t\t\ttap(e => {\n\t\t\t\tif (e.detail.uid === this.uid) this.announcePresence()\n\t\t\t}),\n\t\t)\n\n\t\tmerge(popState$, keyUp$, rickyComm$).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\n\tprivate announcePresence() {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent(SheetHereMorty, {\n\t\t\t\tdetail: { sheet: this },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate setBackgroundInert(inert: boolean) {\n\t\t// Get all sibling elements and make them inert\n\t\tconst parent = this.parentElement\n\t\tif (parent) {\n\t\t\tArray.from(parent.children).forEach(child => {\n\t\t\t\tif (child !== this && child instanceof HTMLElement) {\n\t\t\t\t\tif (inert) {\n\t\t\t\t\t\tchild.setAttribute('inert', '')\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.removeAttribute('inert')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t\t\n\t\t// Also handle body's direct children if sheet is attached to body\n\t\tif (this.parentElement === document.body) {\n\t\t\tArray.from(document.body.children).forEach(child => {\n\t\t\t\tif (child !== this && child !== parent && child instanceof HTMLElement) {\n\t\t\t\t\tif (inert) {\n\t\t\t\t\t\tchild.setAttribute('inert', '')\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.removeAttribute('inert')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\tsetIsSheetShown(isShown: boolean) {\n\t\tthis.sheetRef.value?.setAttribute('aria-hidden', String(!isShown))\n\t\tthis.sheetRef.value?.setAttribute('aria-modal', String(isShown))\n\t}\n\n\tcloseSheet() {\n\t\tthis.open = false\n\t\tthis.dispatchEvent(new CustomEvent('close'))\n\t}\n\n\tprivate getFocusElement(): HTMLElement | null {\n\t\tconst selector = `[${this.focusAttribute}]`\n\t\treturn (this.assignedElements.find(el => el.matches(selector) || el.querySelector(selector)) as HTMLElement) ?? null\n\t}\n\n\toverride focus() {\n\t\t// First try native autofocus attribute\n\t\tconst autofocusElement = this.querySelector('[autofocus]') as HTMLElement\n\t\tif (autofocusElement) {\n\t\t\tautofocusElement.focus()\n\t\t\treturn\n\t\t}\n\t\t\n\t\t// Fallback to custom focus attribute\n\t\tthis.getFocusElement()?.focus()\n\t}\n\n\tprivate handleOverlayClick = (e: Event) => {\n\t\te.stopPropagation()\n\t\tif (!this.lock) {\n\t\t\tsheet.dismiss(this.uid)\n\t\t}\n\t}\n\n\tprivate handleHeaderDismiss = (e: CustomEvent) => {\n\t\te.stopPropagation()\n\t\tsheet.dismiss(this.uid)\n\t}\n\n\trender() {\n\t\tconst sheetClasses = {\n\t\t\t'sheet': true,\n\t\t\t'sheet--open': this.open,\n\t\t\t'sheet--locked': this.lock,\n\t\t}\n\n\t\tconst overlayClasses = {\n\t\t\t'overlay': true,\n\t\t\t'overlay--interactive': !this.lock,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div \n\t\t\t\tclass=${classMap(sheetClasses)}\n\t\t\t\trole=\"dialog\" \n\t\t\t\taria-labelledby=${ifDefined(this.header !== 'hidden' ? 'sheet-title' : undefined)}\n\t\t\t\taria-hidden=${!this.open} \n\t\t\t\taria-modal=${this.open}\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t${ref(this.sheetRef)}>\n\t\t\t\t<div\n\t\t\t\t\tclass=${classMap(overlayClasses)}\n\t\t\t\t\t@click=${this.lock ? undefined : this.handleOverlayClick}\n\t\t\t\t></div>\n\t\t\t\t<schmancy-grid\n\t\t\t\t\trows=${this.header === 'hidden' ? '1fr' : 'auto 1fr'}\n\t\t\t\t\tclass=\"content w-full\"\n\t\t\t\t\tdata-position=${this.position}\n\t\t\t\t>\n\t\t\t\t\t${cache(\n\t\t\t\t\t\tthis.header !== 'hidden'\n\t\t\t\t\t\t\t? html`<schmancy-sheet-header\n\t\t\t\t\t\t\t\tclass=\"sticky top-0 z-50 w-full\"\n\t\t\t\t\t\t\t\t@dismiss=${this.handleHeaderDismiss}\n\t\t\t\t\t\t\t\tid=\"sheet-title\"\n\t\t\t\t\t\t\t\ttitle=${ifDefined(this.title || undefined)}\n\t\t\t\t\t\t\t></schmancy-sheet-header>`\n\t\t\t\t\t\t\t: ''\n\t\t\t\t\t)}\n\n\t\t\t\t\t<schmancy-surface rounded=\"left\" fill=\"all\" id=\"body\" class=\"overflow-auto\" type=\"surface\">\n\t\t\t\t\t\t<schmancy-scroll> <slot></slot></schmancy-scroll>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</schmancy-grid>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet': SchmancySheet\n\t}\n}\n","// @watch decorator\n//\n// Runs when an observed property changes, e.g. @property or @state, but before the component updates.\n//\n// To wait for an update to complete after a change occurs, use `await this.updateComplete` in the handler. To start\n// watching after the initial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.\n//\n// Usage:\n//\n// @watch('propName')\n// handlePropChange(oldValue, newValue) {\n// ...\n// }\n//\ninterface WatchOptions {\n\twaitUntilFirstUpdate?: boolean\n}\n\nexport function on(propName: string, options?: WatchOptions) {\n\treturn (protoOrDescriptor: any, name: string): any => {\n\t\tconst { willUpdate } = protoOrDescriptor\n\n\t\toptions = Object.assign({ waitUntilFirstUpdate: false }, options) as WatchOptions\n\n\t\tprotoOrDescriptor.willUpdate = function (changedProps: Map<string, any>) {\n\t\t\twillUpdate.call(this, changedProps)\n\n\t\t\tif (changedProps.has(propName)) {\n\t\t\t\tconst oldValue = changedProps.get(propName)\n\t\t\t\tconst newValue = this[propName]\n\n\t\t\t\tif (oldValue !== newValue) {\n\t\t\t\t\tif (!options?.waitUntilFirstUpdate || this.hasUpdated) {\n\t\t\t\t\t\tthis[name].call(this, oldValue, newValue)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],"names":["SchmancySheetHeader","TailwindElement","css","render","html","this","dispatchEvent","CustomEvent","bubbles","composed","customElement","SchmancySheet","$LitElement","constructor","super","arguments","open","header","position","SchmancySheetPosition","Side","persist","lock","handleHistory","title","sheetRef","createRef","focusAttribute","lastFocusedElement","handleOverlayClick","e","stopPropagation","sheet","dismiss","uid","handleHeaderDismiss","_oldValue","newValue","document","activeElement","setBackgroundInert","focus","connectedCallback","setupEventListeners","disconnectedCallback","disconnecting","next","popState$","fromEvent","window","pipe","tap","preventDefault","closeSheet","of","take","keyUp$","event","key","rickyComm$","SheetWhereAreYouRicky","detail","announcePresence","merge","takeUntil","subscribe","SheetHereMorty","inert","parent","parentElement","Array","from","children","forEach","child","HTMLElement","setAttribute","removeAttribute","body","isShown","value","String","getFocusElement","selector","assignedElements","find","el","matches","querySelector","autofocusElement","sheetClasses","overlayClasses","overlay","classMap","ifDefined","ref","cache","propName","options","__decorateClass","property","type","reflect","prototype","Boolean","queryAssignedElements","flatten","protoOrDescriptor","name","willUpdate","Object","assign","waitUntilFirstUpdate","changedProps","call","has","oldValue","get","hasUpdated"],"mappings":"qcAKA,IAAqBA,EAArB,cAAiDC,EAAAA,gBAAgBC,EAAAA,OAChE,QAAAC,CACC,OAAOC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,gBAKO,IAAA,CACRC,KAAKC,cACJ,IAAIC,YAAY,UAAW,CAC1B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M,wBAAsB,CAAEC,UAAS,CAAA,CAAA,EAZd/F,EAY8B4F,UAAA,mBAAA,CAAA,EAEtCJ,EAAA,CAAXC,EAAAA,YAdmBzF,EAcR4F,UAAA,iBAAA,CAAA,EAIZJ,EAAA,ECnBkBF,EDkBd,OCjBG,CAACU,EAAwBC,IAAAA,CAC/B,MAAMC,WAAEA,CAAAA,EAAeF,EAEvBT,EAAUY,OAAOC,OAAO,CAAEC,qBAAAA,IAA+Bd,CAAAA,EAEzDS,EAAkBE,WAAa,SAAUI,EAAAA,CAGxC,GAFAJ,EAAWK,KAAK7G,KAAM4G,CAAAA,EAElBA,EAAaE,IAAIlB,CAAAA,EAAW,CAC/B,MAAMmB,EAAWH,EAAaI,IAAIpB,CAAAA,EAC5B5D,EAAWhC,KAAK4F,CAAAA,EAElBmB,IAAa/E,IACX6D,GAASc,sBAAAA,CAAwB3G,KAAKiH,YAC1CjH,KAAKuG,GAAMM,KAAK7G,KAAM+G,EAAU/E,CAAAA,EAGnC,CACD,KDlBmB1B,EAkBpB4F,UAAA,eAAA,CAAA,EAlBoB5F,EAArBwF,EAAA,CADCzF,EAAAA,cAAc,gBAAA,CAAA,EACMC,CAAAA"}
1
+ {"version":3,"file":"sheet-QLZcRUG6.cjs","sources":["../src/sheet/header.ts","../src/sheet/sheet.ts","../src/sheet/hook.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('schmancy-sheet-header')\nexport default class SchmancySheetHeader extends TailwindElement(css``) {\n\trender() {\n\t\treturn html`\n\t\t\t<sch-flex class=\"absolute top-0 left-0 md:left-[unset] md:right-0\">\n\t\t\t\t<div class=\"block md:hidden flex-1 justify-start items-start\">\n\t\t\t\t\t<slot name=\"back\">\n\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\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>\n\t\t\t\t\t\t\t<span class=\"text-[24px]\">&#8592; </span>\n\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"hidden md:block flex-1 justify-end items-end\">\n\t\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\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>\n\t\t\t\t\t\t\tclose\n\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t</sch-flex>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet-header': SchmancySheetHeader\n\t}\n}\n","import { $LitElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js'\nimport { cache } from 'lit/directives/cache.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { fromEvent, merge, of, take, takeUntil, tap } from 'rxjs'\nimport { on } from './hook'\nimport style from './sheet.scss?inline'\nimport {\n\tSchmancySheetPosition,\n\tSheetHereMorty,\n\tSheetWhereAreYouRicky,\n\tSheetWhereAreYouRickyEvent,\n\tsheet,\n} from './sheet.service'\n\n@customElement('schmancy-sheet')\nexport default class SchmancySheet extends $LitElement(style) {\n\t@property({ type: String, reflect: true }) uid!: string\n\t@property({ type: Boolean, reflect: true }) open = false\n\t@property({ type: String, reflect: true }) header: 'hidden' | 'visible' = 'visible'\n\t@property({ type: String, reflect: true }) position: SchmancySheetPosition = SchmancySheetPosition.Side\n\t@property({ type: Boolean, reflect: true }) persist = false\n\t@property({ type: Boolean, reflect: true }) lock = false\n\t@property({ type: Boolean, reflect: true }) handleHistory = true\n\t@property({ type: String, reflect: true }) title = ''\n\n\t// Use ref directive instead of @query\n\tprivate sheetRef = createRef<HTMLDivElement>()\n\t@queryAssignedElements({ flatten: true }) private assignedElements!: HTMLElement[]\n\n\t@property() focusAttribute = 'autofocus'\n\tprivate lastFocusedElement: HTMLElement | null = null\n\n\t@on('open')\n\tonOpenChange(_oldValue: boolean, newValue: boolean) {\n\t\tif (newValue) {\n\t\t\tthis.lastFocusedElement = document.activeElement as HTMLElement\n\t\t\t// Use native inert attribute to prevent focus outside sheet\n\t\t\tthis.setBackgroundInert(true)\n\t\t\tthis.focus()\n\t\t} else {\n\t\t\tthis.setBackgroundInert(false)\n\t\t\tthis.lastFocusedElement?.focus()\n\t\t\tthis.lastFocusedElement = null\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis.setupEventListeners()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.disconnecting.next(true)\n\t}\n\n\tprivate setupEventListeners() {\n\t\t// Handle browser back button - only if handleHistory is true\n\t\tconst popState$ = this.handleHistory\n\t\t\t? fromEvent<PopStateEvent>(window, 'popstate').pipe(\n\t\t\t\t\ttap(e => {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\tthis.closeSheet()\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t: of(null).pipe(take(0)) // Empty observable if handleHistory is false\n\n\t\t// Handle ESC key - listen on the sheet element for better event capture\n\t\tconst keyUp$ = fromEvent<KeyboardEvent>(this, 'keydown').pipe(\n\t\t\ttap(event => {\n\t\t\t\tif (event.key === 'Escape' && !this.lock && this.open) {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\n\t\t// Handle inter-component communication\n\t\tconst rickyComm$ = fromEvent<SheetWhereAreYouRickyEvent>(window, SheetWhereAreYouRicky).pipe(\n\t\t\ttap(e => {\n\t\t\t\tif (e.detail.uid === this.uid) this.announcePresence()\n\t\t\t}),\n\t\t)\n\n\t\tmerge(popState$, keyUp$, rickyComm$).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\n\tprivate announcePresence() {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent(SheetHereMorty, {\n\t\t\t\tdetail: { sheet: this },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate setBackgroundInert(inert: boolean) {\n\t\t// Get all sibling elements and make them inert\n\t\tconst parent = this.parentElement\n\t\tif (parent) {\n\t\t\tArray.from(parent.children).forEach(child => {\n\t\t\t\tif (child !== this && child instanceof HTMLElement) {\n\t\t\t\t\tif (inert) {\n\t\t\t\t\t\tchild.setAttribute('inert', '')\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.removeAttribute('inert')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t\t\n\t\t// Also handle body's direct children if sheet is attached to body\n\t\tif (this.parentElement === document.body) {\n\t\t\tArray.from(document.body.children).forEach(child => {\n\t\t\t\tif (child !== this && child !== parent && child instanceof HTMLElement) {\n\t\t\t\t\tif (inert) {\n\t\t\t\t\t\tchild.setAttribute('inert', '')\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.removeAttribute('inert')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t}\n\n\tsetIsSheetShown(isShown: boolean) {\n\t\tthis.sheetRef.value?.setAttribute('aria-hidden', String(!isShown))\n\t\tthis.sheetRef.value?.setAttribute('aria-modal', String(isShown))\n\t}\n\n\tcloseSheet() {\n\t\tthis.open = false\n\t\tthis.dispatchEvent(new CustomEvent('close'))\n\t}\n\n\tprivate getFocusElement(): HTMLElement | null {\n\t\tconst selector = `[${this.focusAttribute}]`\n\t\treturn (this.assignedElements.find(el => el.matches(selector) || el.querySelector(selector)) as HTMLElement) ?? null\n\t}\n\n\toverride focus() {\n\t\t// First try native autofocus attribute\n\t\tconst autofocusElement = this.querySelector('[autofocus]') as HTMLElement\n\t\tif (autofocusElement) {\n\t\t\tautofocusElement.focus()\n\t\t\treturn\n\t\t}\n\t\t\n\t\t// Fallback to custom focus attribute\n\t\tthis.getFocusElement()?.focus()\n\t}\n\n\tprivate handleOverlayClick = (e: Event) => {\n\t\te.stopPropagation()\n\t\tif (!this.lock) {\n\t\t\tsheet.dismiss(this.uid)\n\t\t}\n\t}\n\n\tprivate handleHeaderDismiss = (e: CustomEvent) => {\n\t\te.stopPropagation()\n\t\tsheet.dismiss(this.uid)\n\t}\n\n\trender() {\n\t\tconst sheetClasses = {\n\t\t\t'sheet': true,\n\t\t\t'sheet--open': this.open,\n\t\t\t'sheet--locked': this.lock,\n\t\t}\n\n\t\tconst overlayClasses = {\n\t\t\t'overlay': true,\n\t\t\t'overlay--interactive': !this.lock,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div \n\t\t\t\tclass=${classMap(sheetClasses)}\n\t\t\t\trole=\"dialog\" \n\t\t\t\taria-labelledby=${ifDefined(this.header !== 'hidden' ? 'sheet-title' : undefined)}\n\t\t\t\taria-hidden=${!this.open} \n\t\t\t\taria-modal=${this.open}\n\t\t\t\ttabindex=\"0\"\n\t\t\t\t${ref(this.sheetRef)}>\n\t\t\t\t<div\n\t\t\t\t\tclass=${classMap(overlayClasses)}\n\t\t\t\t\t@click=${this.lock ? undefined : this.handleOverlayClick}\n\t\t\t\t></div>\n\t\t\t\t<schmancy-grid\n\t\t\t\t\trows=${this.header === 'hidden' ? '1fr' : 'auto 1fr'}\n\t\t\t\t\tclass=\"content w-full\"\n\t\t\t\t\tdata-position=${this.position}\n\t\t\t\t>\n\t\t\t\t\t${cache(\n\t\t\t\t\t\tthis.header !== 'hidden'\n\t\t\t\t\t\t\t? html`<schmancy-sheet-header\n\t\t\t\t\t\t\t\tclass=\"sticky top-0 z-50 w-full\"\n\t\t\t\t\t\t\t\t@dismiss=${this.handleHeaderDismiss}\n\t\t\t\t\t\t\t\tid=\"sheet-title\"\n\t\t\t\t\t\t\t\ttitle=${ifDefined(this.title || undefined)}\n\t\t\t\t\t\t\t></schmancy-sheet-header>`\n\t\t\t\t\t\t\t: ''\n\t\t\t\t\t)}\n\n\t\t\t\t\t<schmancy-surface rounded=\"left\" fill=\"all\" id=\"body\" class=\"overflow-auto\" type=\"surface\">\n\t\t\t\t\t\t<schmancy-scroll> <slot></slot></schmancy-scroll>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</schmancy-grid>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet': SchmancySheet\n\t}\n}\n","// @watch decorator\n//\n// Runs when an observed property changes, e.g. @property or @state, but before the component updates.\n//\n// To wait for an update to complete after a change occurs, use `await this.updateComplete` in the handler. To start\n// watching after the initial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.\n//\n// Usage:\n//\n// @watch('propName')\n// handlePropChange(oldValue, newValue) {\n// ...\n// }\n//\ninterface WatchOptions {\n\twaitUntilFirstUpdate?: boolean\n}\n\nexport function on(propName: string, options?: WatchOptions) {\n\treturn (protoOrDescriptor: any, name: string): any => {\n\t\tconst { willUpdate } = protoOrDescriptor\n\n\t\toptions = Object.assign({ waitUntilFirstUpdate: false }, options) as WatchOptions\n\n\t\tprotoOrDescriptor.willUpdate = function (changedProps: Map<string, any>) {\n\t\t\twillUpdate.call(this, changedProps)\n\n\t\t\tif (changedProps.has(propName)) {\n\t\t\t\tconst oldValue = changedProps.get(propName)\n\t\t\t\tconst newValue = this[propName]\n\n\t\t\t\tif (oldValue !== newValue) {\n\t\t\t\t\tif (!options?.waitUntilFirstUpdate || this.hasUpdated) {\n\t\t\t\t\t\tthis[name].call(this, oldValue, newValue)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],"names":["SchmancySheetHeader","TailwindElement","css","render","html","this","dispatchEvent","CustomEvent","bubbles","composed","customElement","SchmancySheet","$LitElement","constructor","super","arguments","open","header","position","SchmancySheetPosition","Side","persist","lock","handleHistory","title","sheetRef","createRef","focusAttribute","lastFocusedElement","handleOverlayClick","e","stopPropagation","sheet","dismiss","uid","handleHeaderDismiss","_oldValue","newValue","document","activeElement","setBackgroundInert","focus","connectedCallback","setupEventListeners","disconnectedCallback","disconnecting","next","popState$","fromEvent","window","pipe","tap","preventDefault","closeSheet","of","take","keyUp$","event","key","rickyComm$","SheetWhereAreYouRicky","detail","announcePresence","merge","takeUntil","subscribe","SheetHereMorty","inert","parent","parentElement","Array","from","children","forEach","child","HTMLElement","setAttribute","removeAttribute","body","isShown","value","String","getFocusElement","selector","assignedElements","find","el","matches","querySelector","autofocusElement","sheetClasses","overlayClasses","overlay","classMap","ifDefined","ref","cache","propName","options","__decorateClass","property","type","reflect","prototype","Boolean","queryAssignedElements","flatten","protoOrDescriptor","name","willUpdate","Object","assign","waitUntilFirstUpdate","changedProps","call","has","oldValue","get","hasUpdated"],"mappings":"ucAKA,IAAqBA,EAArB,cAAiDC,EAAAA,gBAAgBC,EAAAA,OAChE,QAAAC,CACC,OAAOC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,gBAKO,IAAA,CACRC,KAAKC,cACJ,IAAIC,YAAY,UAAW,CAC1BC,QAAAA,GACAC,SAAAA,EAAU,CAAA,CAAA,CAAA,CAAA;AAAA;AAAA;AAAA;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A,EAEtCJ,EAAA,CAAXC,EAAAA,YAdmBzF,EAcR4F,UAAA,iBAAA,CAAA,EAIZJ,EAAA,ECnBkBF,EDkBd,OCjBG,CAACU,EAAwBC,IAAAA,CAC/B,MAAMC,WAAEA,CAAAA,EAAeF,EAEvBT,EAAUY,OAAOC,OAAO,CAAEC,qBAAAA,IAA+Bd,CAAAA,EAEzDS,EAAkBE,WAAa,SAAUI,EAAAA,CAGxC,GAFAJ,EAAWK,KAAK7G,KAAM4G,CAAAA,EAElBA,EAAaE,IAAIlB,CAAAA,EAAW,CAC/B,MAAMmB,EAAWH,EAAaI,IAAIpB,CAAAA,EAC5B5D,EAAWhC,KAAK4F,CAAAA,EAElBmB,IAAa/E,IACX6D,GAASc,sBAAAA,CAAwB3G,KAAKiH,YAC1CjH,KAAKuG,GAAMM,KAAK7G,KAAM+G,EAAU/E,CAAAA,EAGnC,CACD,KDlBmB1B,EAkBpB4F,UAAA,eAAA,CAAA,EAlBoB5F,EAArBwF,EAAA,CADCzF,EAAAA,cAAc,gBAAA,CAAA,EACMC,CAAAA"}
package/dist/sheet.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./sheet-BY85jX0R.cjs");const e=require("./sheet.service-CNz7lXHC.cjs");exports.SchmancySheetPosition=e.SchmancySheetPosition,exports.SheetHereMorty=e.SheetHereMorty,exports.SheetWhereAreYouRicky=e.SheetWhereAreYouRicky,exports.sheet=e.sheet;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./sheet-QLZcRUG6.cjs");const e=require("./theme.component-B3Z6xZ33.cjs");exports.SchmancySheetPosition=e.SchmancySheetPosition,exports.SheetHereMorty=e.SheetHereMorty,exports.SheetWhereAreYouRicky=e.SheetWhereAreYouRicky,exports.sheet=e.sheet;
2
2
  //# sourceMappingURL=sheet.cjs.map
package/dist/sheet.js CHANGED
@@ -1,5 +1,5 @@
1
- import "./sheet-BY3YdE4E.js";
2
- import { S as r, b as s, a, s as h } from "./sheet.service-DSvFe5PY.js";
1
+ import "./sheet-BXNBQt5O.js";
2
+ import { S as r, b as s, a, s as h } from "./theme.component-DbZODTAR.js";
3
3
  export {
4
4
  r as SchmancySheetPosition,
5
5
  s as SheetHereMorty,
package/dist/teleport.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-N8UvQjsm.cjs");exports.HereMorty=e.HereMorty,Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>e.SchmancyTeleportation}),exports.WhereAreYouRicky=e.WhereAreYouRicky,exports.teleport=e.teleport;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-DDjdOEu0.cjs");exports.HereMorty=e.HereMorty,Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>e.SchmancyTeleportation}),exports.WhereAreYouRicky=e.WhereAreYouRicky,exports.teleport=e.teleport;
2
2
  //# sourceMappingURL=teleport.cjs.map
package/dist/teleport.js CHANGED
@@ -1,4 +1,4 @@
1
- import { H as o, q as t, W as a, t as s } from "./avatar-DbQohKTF.js";
1
+ import { H as o, q as t, W as a, t as s } from "./avatar-DAPIovPH.js";
2
2
  export {
3
3
  o as HereMorty,
4
4
  t as SchmancyTeleportation,
package/dist/theme.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./sheet.service-CNz7lXHC.cjs"),m=require("./theme.interface-Xg5Zi46a.cjs");Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>e.SchmancyThemeComponent}),exports.ThemeHereIAm=e.ThemeHereIAm,exports.ThemeWhereAreYou=e.ThemeWhereAreYou,exports.formateTheme=e.formateTheme,exports.tailwindStyles=e.tailwindStyles,exports.SchmancyTheme=m.SchmancyTheme;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./theme.component-B3Z6xZ33.cjs"),m=require("./theme.interface-Xg5Zi46a.cjs");Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>e.SchmancyThemeComponent}),exports.ThemeHereIAm=e.ThemeHereIAm,exports.ThemeWhereAreYou=e.ThemeWhereAreYou,exports.formateTheme=e.formateTheme,exports.tailwindStyles=e.tailwindStyles,exports.SchmancyTheme=m.SchmancyTheme;
2
2
  //# sourceMappingURL=theme.cjs.map