@mhmo91/schmancy 0.9.16 → 0.9.17

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 (51) hide show
  1. package/custom-elements.json +26 -5
  2. package/dist/agent/schmancy.agent.js +119 -15
  3. package/dist/agent/schmancy.agent.js.map +1 -1
  4. package/dist/agent/schmancy.manifest.json +134 -7
  5. package/dist/card-BslSqOsf.cjs.map +1 -1
  6. package/dist/card-CEdgK9nb.js.map +1 -1
  7. package/dist/details-B8p62xmR.cjs.map +1 -1
  8. package/dist/details-CCW52lzz.js.map +1 -1
  9. package/dist/divider-CbEWg3G_.js.map +1 -1
  10. package/dist/divider-JyyFw_3J.cjs.map +1 -1
  11. package/dist/expand-BmwIPNjq.cjs.map +1 -1
  12. package/dist/expand-bFa_qVDT.js.map +1 -1
  13. package/dist/handover/agent-runtime-followups.md +1 -1
  14. package/dist/handover/agent-runtime-v1.md +3 -3
  15. package/dist/page.cjs.map +1 -1
  16. package/dist/page.js.map +1 -1
  17. package/dist/scroll-CdmXRXh2.js.map +1 -1
  18. package/dist/scroll-V1rAZ9fK.cjs.map +1 -1
  19. package/dist/surface-0XM4DBaT.js.map +1 -1
  20. package/dist/surface-B6DA01kL.cjs.map +1 -1
  21. package/dist/theme-Cq_c9IO3.js.map +1 -1
  22. package/dist/theme-DU5yXaV-.cjs.map +1 -1
  23. package/dist/tree.cjs.map +1 -1
  24. package/dist/tree.js.map +1 -1
  25. package/package.json +1 -1
  26. package/src/card/actions.ts +9 -0
  27. package/src/card/card.ts +18 -0
  28. package/src/card/content.ts +9 -0
  29. package/src/card/media.ts +6 -0
  30. package/src/details/details.ts +12 -0
  31. package/src/divider/divider.ts +11 -0
  32. package/src/expand/expand-root.component.ts +12 -0
  33. package/src/expand/expand.component.ts +14 -0
  34. package/src/layout/scroll/scroll.ts +5 -1
  35. package/src/page/page.ts +8 -11
  36. package/src/surface/surface.ts +4 -10
  37. package/src/theme/theme.component.ts +10 -15
  38. package/src/tree/tree.ts +12 -0
  39. package/types/src/card/actions.d.ts +9 -0
  40. package/types/src/card/card.d.ts +18 -0
  41. package/types/src/card/content.d.ts +9 -0
  42. package/types/src/card/media.d.ts +6 -0
  43. package/types/src/details/details.d.ts +12 -0
  44. package/types/src/divider/divider.d.ts +11 -0
  45. package/types/src/expand/expand-root.component.d.ts +12 -0
  46. package/types/src/expand/expand.component.d.ts +14 -0
  47. package/types/src/layout/scroll/scroll.d.ts +5 -1
  48. package/types/src/page/page.d.ts +8 -11
  49. package/types/src/surface/surface.d.ts +4 -10
  50. package/types/src/theme/theme.component.d.ts +10 -15
  51. package/types/src/tree/tree.d.ts +12 -0
@@ -904,11 +904,21 @@
904
904
  "kind": "class",
905
905
  "name": "SchmancyCardAction",
906
906
  "tagName": "schmancy-card-action",
907
+ "description": "Action row of a schmancy-card — holds the card's buttons / links (typically aligned bottom-right).",
908
+ "summary": "Always nested inside schmancy-card. Holds the primary + secondary CTAs for the card.",
909
+ "platformPrimitive": {
910
+ "tag": "div",
911
+ "mode": "-",
912
+ "note": "Styled flex container. Degrades to a plain div if the tag never registers."
913
+ },
907
914
  "slots": [
908
915
  {
909
916
  "name": "",
910
917
  "description": "The content of the action"
911
918
  }
919
+ ],
920
+ "examples": [
921
+ "<schmancy-card-action>\n <schmancy-button variant=\"text\">Cancel</schmancy-button>\n <schmancy-button variant=\"filled\">Save</schmancy-button>\n</schmancy-card-action>"
912
922
  ]
913
923
  }
914
924
  ]
@@ -921,6 +931,13 @@
921
931
  "kind": "class",
922
932
  "name": "SchmancyCard",
923
933
  "tagName": "schmancy-card",
934
+ "description": "Material Design card — a surface-level container for grouping related content with media / content / actions slots.",
935
+ "summary": "Use for discrete pieces of content that appear in a list (a product, a note, a message). Combine with schmancy-card-media / schmancy-card-content / schmancy-card-action children.",
936
+ "platformPrimitive": {
937
+ "tag": "div",
938
+ "mode": "-",
939
+ "note": "Styled `<div>`; becomes an `<a>` when `href` is set so the whole card is a single interactive surface. Degrades to a plain div/a if the tag never registers."
940
+ },
924
941
  "attributes": [
925
942
  {
926
943
  "name": "type",
@@ -989,6 +1006,9 @@
989
1006
  "default": "''",
990
1007
  "description": "ARIA label for accessibility."
991
1008
  }
1009
+ ],
1010
+ "examples": [
1011
+ "<schmancy-card type=\"elevated\" href=\"/items/42\">\n <schmancy-card-media src=\"/thumb.jpg\" alt=\"Thumbnail\"></schmancy-card-media>\n <schmancy-card-content>\n <h3>Title</h3>\n <p>One-line description of the card's content.</p>\n </schmancy-card-content>\n <schmancy-card-action>\n <schmancy-button variant=\"text\">Open</schmancy-button>\n </schmancy-card-action>\n</schmancy-card>"
992
1012
  ]
993
1013
  }
994
1014
  ]
@@ -1000,7 +1020,17 @@
1000
1020
  {
1001
1021
  "kind": "class",
1002
1022
  "name": "SchmancyCardContent",
1003
- "tagName": "schmancy-card-content"
1023
+ "tagName": "schmancy-card-content",
1024
+ "description": "Content region of a schmancy-card — holds the card's headline, supporting text, and inline controls.",
1025
+ "summary": "Always nested inside schmancy-card. The padded content block between the media and action rows.",
1026
+ "platformPrimitive": {
1027
+ "tag": "div",
1028
+ "mode": "-",
1029
+ "note": "Styled `<div>` with padding. Degrades to a plain div if the tag never registers."
1030
+ },
1031
+ "examples": [
1032
+ "<schmancy-card-content>\n <h3>Card title</h3>\n <p>Supporting text that describes the card's subject.</p>\n</schmancy-card-content>"
1033
+ ]
1004
1034
  }
1005
1035
  ]
1006
1036
  },
@@ -1012,6 +1042,13 @@
1012
1042
  "kind": "class",
1013
1043
  "name": "SchmancyCardMedia",
1014
1044
  "tagName": "schmancy-card-media",
1045
+ "description": "Media region of a schmancy-card — the image / thumbnail at the top of the card.",
1046
+ "summary": "Always nested inside schmancy-card. Pass `src` + `alt` props or slot an `<img>` / `<video>` for custom media.",
1047
+ "platformPrimitive": {
1048
+ "tag": "img",
1049
+ "mode": "-",
1050
+ "note": "Renders an `<img>` (or wraps a slotted media element). Degrades to a styled `<img>` if the tag never registers."
1051
+ },
1015
1052
  "attributes": [
1016
1053
  {
1017
1054
  "name": "src",
@@ -1041,6 +1078,9 @@
1041
1078
  },
1042
1079
  "default": "''"
1043
1080
  }
1081
+ ],
1082
+ "examples": [
1083
+ "<schmancy-card-media src=\"/thumb.jpg\" alt=\"Product photo\"></schmancy-card-media>"
1044
1084
  ]
1045
1085
  }
1046
1086
  ]
@@ -2203,6 +2243,13 @@
2203
2243
  "kind": "class",
2204
2244
  "name": "SchmancyDetails",
2205
2245
  "tagName": "schmancy-details",
2246
+ "description": "Expandable disclosure panel — a styled `<details>` / `<summary>` pair with animated expand + overlay options.",
2247
+ "summary": "Use for progressive-disclosure content: FAQs, collapsible settings sections, accordion-style lists. Prefer schmancy-expand for full-page accordions where only one section can be open at a time.",
2248
+ "platformPrimitive": {
2249
+ "tag": "details",
2250
+ "mode": "toggle",
2251
+ "note": "Wraps native `<details>`/`<summary>`. Degrades to the native element if the tag never registers — same keyboard accessibility, just no animation."
2252
+ },
2206
2253
  "attributes": [
2207
2254
  {
2208
2255
  "name": "summary",
@@ -2264,6 +2311,15 @@
2264
2311
  },
2265
2312
  "default": "'p-3'"
2266
2313
  }
2314
+ ],
2315
+ "events": [
2316
+ {
2317
+ "name": "toggle",
2318
+ "description": "When the open state changes (bubbles from the native `<details>`)."
2319
+ }
2320
+ ],
2321
+ "examples": [
2322
+ "<schmancy-details summary=\"Shipping details\">\n <p>Order ships in 2 business days.</p>\n</schmancy-details>"
2267
2323
  ]
2268
2324
  }
2269
2325
  ]
@@ -2406,6 +2462,13 @@
2406
2462
  "kind": "class",
2407
2463
  "name": "SchmancyDivider",
2408
2464
  "tagName": "schmancy-divider",
2465
+ "description": "Thin horizontal (or vertical) separator rule between sections of content.",
2466
+ "summary": "Semantic separator between groups — list items, menu sections, content blocks. Uses outline theme token.",
2467
+ "platformPrimitive": {
2468
+ "tag": "hr",
2469
+ "mode": "-",
2470
+ "note": "Styled horizontal rule. Degrades to a native `<hr>` if the tag never registers."
2471
+ },
2409
2472
  "attributes": [
2410
2473
  {
2411
2474
  "name": "outline",
@@ -2437,6 +2500,9 @@
2437
2500
  ],
2438
2501
  "default": "'start'"
2439
2502
  }
2503
+ ],
2504
+ "examples": [
2505
+ "<schmancy-list-item>First</schmancy-list-item>\n<schmancy-divider></schmancy-divider>\n<schmancy-list-item>Second</schmancy-list-item>"
2440
2506
  ]
2441
2507
  }
2442
2508
  ]
@@ -2576,6 +2642,13 @@
2576
2642
  "kind": "class",
2577
2643
  "name": "SchmancyExpandRoot",
2578
2644
  "tagName": "schmancy-expand-root",
2645
+ "description": "Container for schmancy-expand children — coordinates mutual-exclusion so only one child is open at a time. Also renders the portal panel that the active child expands into.",
2646
+ "summary": "Always wrap a group of schmancy-expand children. Without a root, each schmancy-expand behaves independently (which is usually not what you want — prefer schmancy-details for that).",
2647
+ "platformPrimitive": {
2648
+ "tag": "div",
2649
+ "mode": "-",
2650
+ "note": "Coordinating wrapper. Degrades to a plain div if the tag never registers — children fall back to independent `<details>` behavior."
2651
+ },
2579
2652
  "attributes": [
2580
2653
  {
2581
2654
  "name": "type",
@@ -2608,6 +2681,9 @@
2608
2681
  ],
2609
2682
  "default": "'solid'"
2610
2683
  }
2684
+ ],
2685
+ "examples": [
2686
+ "<schmancy-expand-root>\n <schmancy-expand summary=\"Step 1\">…</schmancy-expand>\n <schmancy-expand summary=\"Step 2\">…</schmancy-expand>\n</schmancy-expand-root>"
2611
2687
  ]
2612
2688
  }
2613
2689
  ]
@@ -2620,6 +2696,13 @@
2620
2696
  "kind": "class",
2621
2697
  "name": "SchmancyExpand",
2622
2698
  "tagName": "schmancy-expand",
2699
+ "description": "Accordion-style section — expands on click, coordinates with siblings via schmancy-expand-root to close any sibling when a new one opens. Only one schmancy-expand can be open at a time within the same root.",
2700
+ "summary": "Use for grouped progressive-disclosure where only one section should be open at a time. Prefer schmancy-details when sections should be independent.",
2701
+ "platformPrimitive": {
2702
+ "tag": "details",
2703
+ "mode": "toggle",
2704
+ "note": "Schmancy-skinned accordion section. Degrades to `<details>` if the tag never registers — loses mutual-exclusion behavior but stays functional."
2705
+ },
2623
2706
  "attributes": [
2624
2707
  {
2625
2708
  "name": "summary",
@@ -2677,6 +2760,15 @@
2677
2760
  },
2678
2761
  "default": "false"
2679
2762
  }
2763
+ ],
2764
+ "events": [
2765
+ {
2766
+ "name": "toggle",
2767
+ "description": "When the open state changes."
2768
+ }
2769
+ ],
2770
+ "examples": [
2771
+ "<schmancy-expand-root>\n <schmancy-expand summary=\"Billing\">Billing form…</schmancy-expand>\n <schmancy-expand summary=\"Shipping\">Shipping form…</schmancy-expand>\n <schmancy-expand summary=\"Review\">Order review…</schmancy-expand>\n</schmancy-expand-root>"
2680
2772
  ]
2681
2773
  }
2682
2774
  ]
@@ -4686,7 +4778,13 @@
4686
4778
  "kind": "class",
4687
4779
  "name": "SchmancyPage",
4688
4780
  "tagName": "schmancy-page",
4689
- "description": "Native mobile-like page container. Prevents double-tap zoom, pull-to-refresh, rubber-banding. Automatically fills remaining viewport height.",
4781
+ "description": "Mobile-first page container fills remaining viewport height, suppresses double-tap zoom / pull-to-refresh / rubber-banding. Lays children in a CSS grid whose row template is `rows`.",
4782
+ "summary": "The root of any app view — wraps header / main / footer children in a full-viewport grid. Use rows=\"auto_1fr_auto\" to make the middle child scroll while header/footer stay pinned.",
4783
+ "platformPrimitive": {
4784
+ "tag": "div",
4785
+ "mode": "-",
4786
+ "note": "Full-height CSS-grid container. Degrades to a plain div if the tag never registers — children still flow vertically but without the height fill and gesture suppression."
4787
+ },
4690
4788
  "attributes": [
4691
4789
  {
4692
4790
  "name": "rows",
@@ -4712,7 +4810,7 @@
4712
4810
  }
4713
4811
  ],
4714
4812
  "examples": [
4715
- "html`\n <schmancy-page rows=\"1fr_2fr_auto\">\n <header>App Bar</header>\n <main>Scrollable content</main>\n <footer>Navigation</footer>\n </schmancy-page>\n`"
4813
+ "<schmancy-page rows=\"auto_1fr_auto\">\n <schmancy-nav-drawer-appbar>Title</schmancy-nav-drawer-appbar>\n <main>Scrollable content</main>\n <schmancy-navigation-bar></schmancy-navigation-bar>\n</schmancy-page>"
4716
4814
  ]
4717
4815
  }
4718
4816
  ]
@@ -5477,7 +5575,13 @@
5477
5575
  "kind": "class",
5478
5576
  "name": "SchmancySurface",
5479
5577
  "tagName": "schmancy-surface",
5480
- "description": "`<schmancy-surface>` component This component renders a styled container that adapts its dimensions based on the `fill` property. It supports various rounding options, elevation levels, and applies background and text color classes based on the specified surface variant. Additionally, when the `scroller` property is true, the component enables internal scrolling by applying overflow and scroll-behavior styles. SurfaceMixin automatically provides surfaceStyles CSS.",
5578
+ "description": "Themed container the root surface primitive. Sets background, text color, rounding, elevation, and (optionally) internal scroll. Provides a `SchmancySurfaceTypeContext` so descendants can adapt to the enclosing surface variant.",
5579
+ "summary": "Wrap a region of a page when you need it to pick up theme tokens (background + on-color + elevation). Nest surfaces to express Material Design's hierarchical color stacking.",
5580
+ "platformPrimitive": {
5581
+ "tag": "div",
5582
+ "mode": "-",
5583
+ "note": "Styled `<div>` with theme-driven background/color/elevation. Degrades to a plain `<div>` if the tag never registers — text stays readable, just loses theming."
5584
+ },
5481
5585
  "attributes": [
5482
5586
  {
5483
5587
  "name": "type",
@@ -6059,7 +6163,13 @@
6059
6163
  "kind": "class",
6060
6164
  "name": "SchmancyThemeComponent",
6061
6165
  "tagName": "schmancy-theme",
6062
- "description": "SchmancyThemeComponent - Provides theming capabilities for Schmancy components. This component manages color schemes, primary colors, and theme distribution throughout the component tree. It can be used at the root level or nested to provide different themes to different parts of the application.",
6166
+ "description": "Theme provider generates a Material 3 palette from a seed color, resolves light/dark scheme, and publishes the token set to descendants as CSS custom properties (var(--schmancy-sys-color-…)).",
6167
+ "summary": "Always wrap your app root in a `<schmancy-theme root scheme=\"auto\" color=\"#…\">`. Nest additional `<schmancy-theme>` blocks to override theming for a subtree.",
6168
+ "platformPrimitive": {
6169
+ "tag": "div",
6170
+ "mode": "-",
6171
+ "note": "Styled `<div>` that publishes theme tokens via inline `--schmancy-sys-color-*` custom properties. Degrades to a plain div if the tag never registers — children lose theming and fall back to browser defaults."
6172
+ },
6063
6173
  "attributes": [
6064
6174
  {
6065
6175
  "name": "color",
@@ -6114,7 +6224,8 @@
6114
6224
  }
6115
6225
  ],
6116
6226
  "examples": [
6117
- "<!-- Root theme provider -->\n<schmancy-theme color=\"#6200ee\" scheme=\"auto\" root>\n <your-app></your-app>\n</schmancy-theme>\n\n<!-- Nested theme for specific section -->\n<schmancy-theme color=\"#2196f3\" scheme=\"dark\">\n <div class=\"dark-section\">\n <!-- Components here will use blue dark theme -->\n </div>\n</schmancy-theme>"
6227
+ "<!-- Root theme provider -->\n<schmancy-theme root scheme=\"auto\" color=\"#6200ee\">\n <your-app></your-app>\n</schmancy-theme>",
6228
+ "<!-- Nested theme for a specific section -->\n<schmancy-theme scheme=\"dark\" color=\"#2196f3\">\n <schmancy-surface fill=\"all\">\n <!-- Components here use the blue dark theme -->\n </schmancy-surface>\n</schmancy-theme>"
6118
6229
  ],
6119
6230
  "contexts": [
6120
6231
  {
@@ -6170,6 +6281,13 @@
6170
6281
  "kind": "class",
6171
6282
  "name": "SchmancyTree",
6172
6283
  "tagName": "schmancy-tree",
6284
+ "description": "Expandable tree node — a recursive disclosure widget. One root slot, one default slot for child nodes. Each node can itself contain schmancy-tree children.",
6285
+ "summary": "Use for hierarchical navigation / file-explorer layouts. Each level is a schmancy-tree with a `root` slot (the parent label) and default slot (the children, which may be more schmancy-trees).",
6286
+ "platformPrimitive": {
6287
+ "tag": "details",
6288
+ "mode": "toggle",
6289
+ "note": "Recursive `<details>`-like disclosure. Degrades to a plain nested list if the tag never registers — loses expand/collapse but stays navigable."
6290
+ },
6173
6291
  "attributes": [
6174
6292
  {
6175
6293
  "name": "open",
@@ -6189,6 +6307,9 @@
6189
6307
  "name": "",
6190
6308
  "description": "The children of the tree"
6191
6309
  }
6310
+ ],
6311
+ "examples": [
6312
+ "<schmancy-tree>\n <schmancy-list-item slot=\"root\">src/</schmancy-list-item>\n <schmancy-tree>\n <schmancy-list-item slot=\"root\">components/</schmancy-list-item>\n <schmancy-list-item>button.ts</schmancy-list-item>\n </schmancy-tree>\n</schmancy-tree>"
6192
6313
  ]
6193
6314
  }
6194
6315
  ]
@@ -6886,7 +7007,13 @@
6886
7007
  "kind": "class",
6887
7008
  "name": "SchmancyScroll",
6888
7009
  "tagName": "schmancy-scroll",
6889
- "description": "A custom scrollable container with enhanced features.",
7010
+ "description": "Scrollable container with debounced scroll events, horizontal/vertical direction, optional hidden scrollbar, and programmatic scrollTo via command events or refs.",
7011
+ "summary": "Use anywhere you'd reach for `overflow: auto` but also need debounced scroll events (for sticky headers, scroll spies, virtualization triggers) or the ability to drive scroll from elsewhere in the app by dispatching a schmancy-scroll-command event.",
7012
+ "platformPrimitive": {
7013
+ "tag": "div",
7014
+ "mode": "-",
7015
+ "note": "Styled scrollable `<div>`. Degrades to a plain scrollable div if the tag never registers — loses the debounced scroll event and the command-bus integration."
7016
+ },
6890
7017
  "attributes": [
6891
7018
  {
6892
7019
  "name": "hide",
@@ -1 +1 @@
1
- {"version":3,"file":"card-BslSqOsf.cjs","names":[],"sources":["../src/card/actions.ts","../src/card/card.ts","../src/card/content.ts","../src/card/media.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-action\n * @slot - The content of the action\n */\n@customElement('schmancy-card-action')\nexport default class SchmancyCardAction extends TailwindElement(css`\n\t:host {\n\t\tdisplay: flex;\n\t\tgap: 0.5rem;\n\t\tpadding: 0.5rem 1rem;\n\t\talign-items: center;\n\t\tjustify-content: flex-end;\n\t}\n`) {\n\tprotected render(): unknown {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-action': SchmancyCardAction\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { cursorGlow } from '../directives/cursor-glow'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\n@customElement('schmancy-card')\nexport default class SchmancyCard extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\tborder-radius: var(--schmancy-sys-shape-corner-medium);\n\t\ttransition:\n\t\t\tbox-shadow var(--schmancy-sys-motion-duration-short4) var(--schmancy-sys-motion-easing-standard),\n\t\t\ttransform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);\n\t\toutline: none;\n\t}\n\n\t/* Type variants */\n\t:host([type='elevated']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-low);\n\t\tbox-shadow: var(--schmancy-sys-elevation-1);\n\t}\n\t:host([type='filled']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-highest);\n\t\tbox-shadow: var(--schmancy-sys-elevation-0);\n\t}\n\t:host([type='outlined']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-default);\n\t\tborder: 1px solid var(--schmancy-sys-color-outlineVariant);\n\t\tbox-shadow: var(--schmancy-sys-elevation-0);\n\t}\n\n\t/* Interactive states */\n\t:host([interactive]) {\n\t\tcursor: pointer;\n\t\t-webkit-tap-highlight-color: transparent;\n\t}\n\t:host([interactive]:focus-visible:not([disabled])) {\n\t\toutline: 2px solid var(--schmancy-sys-color-primary-default);\n\t\toutline-offset: 2px;\n\t}\n\t:host([disabled]) {\n\t\tpointer-events: none;\n\t\topacity: var(--schmancy-sys-state-disabled-opacity);\n\t}\n\n\t/* Hover elevations — luminous glow + lift */\n\t:host([type='elevated'][interactive]:hover:not([disabled])) {\n\t\tbox-shadow:\n\t\t\tvar(--schmancy-sys-elevation-2),\n\t\t\t0 4px 24px -6px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 12%, transparent);\n\t\ttransform: translateY(-2px);\n\t}\n\t:host([type='filled'][interactive]:hover:not([disabled])),\n\t:host([type='outlined'][interactive]:hover:not([disabled])) {\n\t\tbox-shadow:\n\t\t\tvar(--schmancy-sys-elevation-1),\n\t\t\t0 4px 20px -6px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 10%, transparent);\n\t\ttransform: translateY(-1px);\n\t}\n\n\t/* Active state — kinetic compress */\n\t:host([interactive]:active:not([disabled])) {\n\t\ttransform: scale(0.98);\n\t\ttransition-duration: 100ms;\n\t}\n\n\t/* Dragged state */\n\t:host([dragged]) {\n\t\tbox-shadow:\n\t\t\tvar(--schmancy-sys-elevation-3),\n\t\t\t0 8px 32px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 15%, transparent);\n\t\ttransform: translateY(-4px);\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\t:host([interactive]:hover:not([disabled])),\n\t\t:host([interactive]:active:not([disabled])),\n\t\t:host([dragged]) {\n\t\t\ttransform: none;\n\t\t}\n\t}\n\n\t@keyframes ripple {\n\t\tto {\n\t\t\ttransform: scale(4);\n\t\t\topacity: 0;\n\t\t}\n\t}\n`) {\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\t/**\n\t * The visual style of the card.\n\t * @default 'elevated'\n\t */\n\t@property({ reflect: true })\n\ttype: 'elevated' | 'filled' | 'outlined' = 'elevated'\n\n\t/**\n\t * Makes the card interactive (clickable).\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tinteractive = false\n\n\t/**\n\t * Disables the card.\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdisabled = false\n\n\t/**\n\t * Indicates the card is being dragged.\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdragged = false\n\n\t/**\n\t * URL to navigate to when card is clicked (makes it act like a link).\n\t */\n\t@property()\n\thref?: string\n\n\t/**\n\t * Target for the link navigation.\n\t */\n\t@property()\n\ttarget?: string\n\n\t/**\n\t * ARIA role for accessibility.\n\t */\n\t@property({ attribute: 'role' })\n\toverride role = 'article'\n\n\t/**\n\t * ARIA label for accessibility.\n\t */\n\t@property({ attribute: 'aria-label' })\n\toverride ariaLabel: string = ''\n\n\t// Internal state for interaction feedback\n\t@state() pressed = false\n\t@state() private ripples: Array<{ x: number; y: number; id: number }> = []\n\n\tprivate nextRippleId = 0\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis._updateAriaAttributes()\n\t}\n\n\tupdated(changedProperties: Map<string, any>) {\n\t\tsuper.updated(changedProperties)\n\t\tif (changedProperties.has('interactive') || changedProperties.has('disabled')) {\n\t\t\tthis._updateAriaAttributes()\n\t\t}\n\t}\n\n\t// Consolidate ARIA attribute updates\n\tprivate _updateAriaAttributes() {\n\t\tconst isInteractive = this.interactive && !this.disabled\n\n\t\tif (isInteractive) {\n\t\t\tthis.setAttribute('tabindex', '0')\n\t\t\tif (!this.role || this.role === 'article') {\n\t\t\t\tthis.role = this.href ? 'link' : 'button'\n\t\t\t}\n\t\t} else {\n\t\t\tthis.removeAttribute('tabindex')\n\t\t\tif (this.role === 'button' || this.role === 'link') {\n\t\t\t\tthis.role = 'article'\n\t\t\t}\n\t\t}\n\t}\n\n\t// Shared ripple creation logic\n\tprivate _addRipple(x: number, y: number) {\n\t\tconst id = this.nextRippleId++\n\t\tthis.ripples = [...this.ripples, { x, y, id }]\n\n\t\t// Remove ripple after animation completes\n\t\tsetTimeout(() => {\n\t\t\tthis.ripples = this.ripples.filter(r => r.id !== id)\n\t\t}, 600) // M3 medium duration\n\t}\n\n\t// Shared navigation logic\n\tprivate _navigate() {\n\t\tif (!this.href) return\n\n\t\tif (this.target === '_blank') {\n\t\t\twindow.open(this.href, '_blank')\n\t\t} else {\n\t\t\twindow.location.href = this.href\n\t\t}\n\t}\n\n\t// Combined action trigger (ripple + navigate + event)\n\tprivate _triggerAction(x: number, y: number) {\n\t\tthis._addRipple(x, y)\n\t\tthis._navigate()\n\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('schmancy-click', {\n\t\t\t\tdetail: { value: this.type },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate handleClick = (e: MouseEvent) => {\n\t\tif (this.disabled || !this.interactive) return\n\n\t\tconst rect = this.getBoundingClientRect()\n\t\tthis._triggerAction(e.clientX - rect.left, e.clientY - rect.top)\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\tif (this.disabled || !this.interactive) return\n\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\tthis._setPressed(true)\n\n\t\t\t// Simulate click at center\n\t\t\tconst rect = this.getBoundingClientRect()\n\t\t\tthis._triggerAction(rect.width / 2, rect.height / 2)\n\t\t}\n\t}\n\n\tprivate handleKeyUp = (e: KeyboardEvent) => {\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\tthis._setPressed(false)\n\t\t}\n\t}\n\n\t// Consolidate pressed state management\n\tprivate _setPressed(pressed: boolean) {\n\t\tthis.pressed = pressed\n\t\tif (pressed) {\n\t\t\tthis.setAttribute('pressed', '')\n\t\t} else {\n\t\t\tthis.removeAttribute('pressed')\n\t\t}\n\t}\n\n\tprivate handleMouseDown = () => {\n\t\tif (this.disabled || !this.interactive) return\n\t\tthis._setPressed(true)\n\t}\n\n\tprivate handleMouseUp = () => this._setPressed(false)\n\tprivate handleMouseLeave = () => this._setPressed(false)\n\n\tprotected render() {\n\t\tconst isInteractive = this.interactive && !this.disabled\n\n\t\treturn html`\n\t\t\t<div\n\t\t\t\t${isInteractive ? cursorGlow({ radius: 200, intensity: 0.1 }) : ''}\n\t\t\t\tclass=\"relative w-full h-full rounded-xl ${isInteractive ? 'cursor-pointer' : ''}\"\n\t\t\t\t@click=${this.handleClick}\n\t\t\t\t@keydown=${this.handleKeyDown}\n\t\t\t\t@keyup=${this.handleKeyUp}\n\t\t\t\t@mousedown=${this.handleMouseDown}\n\t\t\t\t@mouseup=${this.handleMouseUp}\n\t\t\t\t@mouseleave=${this.handleMouseLeave}\n\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\taria-disabled=${this.disabled ? 'true' : 'false'}\n\t\t\t>\n\t\t\t\t<!-- State layer -->\n\t\t\t\t<div\n\t\t\t\t\tclass=\"absolute inset-0 rounded-xl pointer-events-none transition-opacity duration-200 bg-surface-on ${!isInteractive\n\t\t\t\t\t\t? 'opacity-0'\n\t\t\t\t\t\t: this.pressed\n\t\t\t\t\t\t\t? 'opacity-[var(--schmancy-sys-state-pressed-opacity)]'\n\t\t\t\t\t\t\t: 'opacity-0 hover:opacity-[var(--schmancy-sys-state-hover-opacity)] focus-visible:opacity-[var(--schmancy-sys-state-focus-opacity)]'}\"\n\t\t\t\t></div>\n\n\t\t\t\t<!-- Ripples -->\n\t\t\t\t${this.interactive && this.ripples.length\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<div class=\"absolute inset-0 rounded-xl overflow-hidden pointer-events-none\">\n\t\t\t\t\t\t\t\t${this.ripples.map(\n\t\t\t\t\t\t\t\t\tr => html`\n\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\tclass=\"absolute rounded-full scale-0 animate-[ripple_600ms_linear] bg-surface-on opacity-[0.12] w-5 h-5 -ml-2.5 -mt-2.5\"\n\t\t\t\t\t\t\t\t\t\t\tstyle=\"left: ${r.x}px; top: ${r.y}px\"\n\t\t\t\t\t\t\t\t\t\t></span>\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</div>\n\t\t\t\t\t\t`\n\t\t\t\t\t: ''}\n\n\t\t\t\t<!-- Content -->\n\t\t\t\t<div class=\"relative h-full w-full rounded-xl\">\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card': SchmancyCard\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-content\n */\n@customElement('schmancy-card-content')\nexport default class SchmancyCardContent extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tpadding: 1rem;\n\t}\n`) {\n\tprotected render(): unknown {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-content': SchmancyCardContent\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-media\n */\n@customElement('schmancy-card-media')\nexport default class SchmancyCardMedia extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\theight: 200px;\n\t\toverflow: hidden;\n\t}\n\t\n\t/* Allow height to be overridden when used in flex/grid layouts */\n\t:host-context(.h-full) {\n\t\theight: 100%;\n\t}\n\t\n\t::slotted(img),\n\timg {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-position: center;\n\t}\n\t\n\t/* Object fit styles based on fit attribute */\n\t:host([fit=\"contain\"]) img,\n\t:host([fit=\"contain\"]) ::slotted(img) {\n\t\tobject-fit: contain;\n\t}\n\t\n\t:host([fit=\"cover\"]) img,\n\t:host([fit=\"cover\"]) ::slotted(img) {\n\t\tobject-fit: cover;\n\t}\n\t\n\t:host([fit=\"fill\"]) img,\n\t:host([fit=\"fill\"]) ::slotted(img) {\n\t\tobject-fit: fill;\n\t}\n\t\n\t:host([fit=\"none\"]) img,\n\t:host([fit=\"none\"]) ::slotted(img) {\n\t\tobject-fit: none;\n\t}\n\t\n\t:host([fit=\"scale-down\"]) img,\n\t:host([fit=\"scale-down\"]) ::slotted(img) {\n\t\tobject-fit: scale-down;\n\t}\n`) {\n\t@property({ type: String, reflect: true })\n\tsrc: string = ''\n\n\t@property({ type: String, reflect: true })\n\tfit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' = 'contain'\n\t\n\t@property({ type: String })\n\talt: string = ''\n\n\tprotected render(): unknown {\n\t\t// If src is provided, render an img element\n\t\t// Otherwise, allow users to slot their own content\n\t\treturn this.src \n\t\t\t? html`<img src=\"${this.src}\" alt=\"${this.alt}\" />` \n\t\t\t: html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-media': SchmancyCardMedia\n\t}\n}\n"],"mappings":"0RASe,IAAA,EAAA,cAAiC,EAAA,EAAgB,EAAA,GAAG;;;;;;;;GASlE,QAAA,CACC,MAAO,GAAA,IAAI,kBAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eAXE,uBAAA,CAAA,CAAuB,EAAA,CCDvB,IAAA,EAAA,cAA2B,EAAA,EAAgB,EAAA,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CA+FjB,WAAA,KAAA,YAAA,CAO7B,EAAA,KAAA,SAAA,CAOH,EAAA,KAAA,QAAA,CAOD,EAAA,KAAA,KAkBM,UAAA,KAAA,UAMa,GAAA,KAAA,QAAA,CAGV,EAAA,KAAA,QACqD,EAAA,CAAA,KAAA,aAEjD,EAAA,KAAA,YAmEA,GAAA,CACtB,GAAI,KAAK,UAAA,CAAa,KAAK,YAAa,OAExC,IAAM,EAAO,KAAK,uBAAA,CAClB,KAAK,eAAe,EAAE,QAAU,EAAK,KAAM,EAAE,QAAU,EAAK,IAAA,EAAA,KAAA,cAGpC,GAAA,CACxB,GAAA,CAAI,KAAK,UAAa,KAAK,cAEvB,EAAE,MAAQ,SAAW,EAAE,MAAQ,KAAK,CACvC,EAAE,gBAAA,CACF,KAAK,YAAA,CAAY,EAAA,CAGjB,IAAM,EAAO,KAAK,uBAAA,CAClB,KAAK,eAAe,EAAK,MAAQ,EAAG,EAAK,OAAS,EAAA,GAAA,KAAA,YAI7B,GAAA,CAClB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A,EAAA,EAAA,EAAA,UAGhC,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,MAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eArDb,sBAAA,CAAA,CAAsB,EAAA"}
1
+ {"version":3,"file":"card-BslSqOsf.cjs","names":[],"sources":["../src/card/actions.ts","../src/card/card.ts","../src/card/content.ts","../src/card/media.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * Action row of a schmancy-card — holds the card's buttons / links (typically aligned bottom-right).\n *\n * @element schmancy-card-action\n * @summary Always nested inside schmancy-card. Holds the primary + secondary CTAs for the card.\n * @example\n * <schmancy-card-action>\n * <schmancy-button variant=\"text\">Cancel</schmancy-button>\n * <schmancy-button variant=\"filled\">Save</schmancy-button>\n * </schmancy-card-action>\n * @platform div - Styled flex container. Degrades to a plain div if the tag never registers.\n * @slot - The content of the action\n */\n@customElement('schmancy-card-action')\nexport default class SchmancyCardAction extends TailwindElement(css`\n\t:host {\n\t\tdisplay: flex;\n\t\tgap: 0.5rem;\n\t\tpadding: 0.5rem 1rem;\n\t\talign-items: center;\n\t\tjustify-content: flex-end;\n\t}\n`) {\n\tprotected render(): unknown {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-action': SchmancyCardAction\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { cursorGlow } from '../directives/cursor-glow'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\n/**\n * Material Design card — a surface-level container for grouping related content with media / content / actions slots.\n *\n * @element schmancy-card\n * @summary Use for discrete pieces of content that appear in a list (a product, a note, a message). Combine with schmancy-card-media / schmancy-card-content / schmancy-card-action children.\n * @example\n * <schmancy-card type=\"elevated\" href=\"/items/42\">\n * <schmancy-card-media src=\"/thumb.jpg\" alt=\"Thumbnail\"></schmancy-card-media>\n * <schmancy-card-content>\n * <h3>Title</h3>\n * <p>One-line description of the card's content.</p>\n * </schmancy-card-content>\n * <schmancy-card-action>\n * <schmancy-button variant=\"text\">Open</schmancy-button>\n * </schmancy-card-action>\n * </schmancy-card>\n * @platform div - Styled `<div>`; becomes an `<a>` when `href` is set so the whole card is a single interactive surface. Degrades to a plain div/a if the tag never registers.\n */\n@customElement('schmancy-card')\nexport default class SchmancyCard extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\tborder-radius: var(--schmancy-sys-shape-corner-medium);\n\t\ttransition:\n\t\t\tbox-shadow var(--schmancy-sys-motion-duration-short4) var(--schmancy-sys-motion-easing-standard),\n\t\t\ttransform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);\n\t\toutline: none;\n\t}\n\n\t/* Type variants */\n\t:host([type='elevated']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-low);\n\t\tbox-shadow: var(--schmancy-sys-elevation-1);\n\t}\n\t:host([type='filled']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-highest);\n\t\tbox-shadow: var(--schmancy-sys-elevation-0);\n\t}\n\t:host([type='outlined']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-default);\n\t\tborder: 1px solid var(--schmancy-sys-color-outlineVariant);\n\t\tbox-shadow: var(--schmancy-sys-elevation-0);\n\t}\n\n\t/* Interactive states */\n\t:host([interactive]) {\n\t\tcursor: pointer;\n\t\t-webkit-tap-highlight-color: transparent;\n\t}\n\t:host([interactive]:focus-visible:not([disabled])) {\n\t\toutline: 2px solid var(--schmancy-sys-color-primary-default);\n\t\toutline-offset: 2px;\n\t}\n\t:host([disabled]) {\n\t\tpointer-events: none;\n\t\topacity: var(--schmancy-sys-state-disabled-opacity);\n\t}\n\n\t/* Hover elevations — luminous glow + lift */\n\t:host([type='elevated'][interactive]:hover:not([disabled])) {\n\t\tbox-shadow:\n\t\t\tvar(--schmancy-sys-elevation-2),\n\t\t\t0 4px 24px -6px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 12%, transparent);\n\t\ttransform: translateY(-2px);\n\t}\n\t:host([type='filled'][interactive]:hover:not([disabled])),\n\t:host([type='outlined'][interactive]:hover:not([disabled])) {\n\t\tbox-shadow:\n\t\t\tvar(--schmancy-sys-elevation-1),\n\t\t\t0 4px 20px -6px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 10%, transparent);\n\t\ttransform: translateY(-1px);\n\t}\n\n\t/* Active state — kinetic compress */\n\t:host([interactive]:active:not([disabled])) {\n\t\ttransform: scale(0.98);\n\t\ttransition-duration: 100ms;\n\t}\n\n\t/* Dragged state */\n\t:host([dragged]) {\n\t\tbox-shadow:\n\t\t\tvar(--schmancy-sys-elevation-3),\n\t\t\t0 8px 32px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 15%, transparent);\n\t\ttransform: translateY(-4px);\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\t:host([interactive]:hover:not([disabled])),\n\t\t:host([interactive]:active:not([disabled])),\n\t\t:host([dragged]) {\n\t\t\ttransform: none;\n\t\t}\n\t}\n\n\t@keyframes ripple {\n\t\tto {\n\t\t\ttransform: scale(4);\n\t\t\topacity: 0;\n\t\t}\n\t}\n`) {\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\t/**\n\t * The visual style of the card.\n\t * @default 'elevated'\n\t */\n\t@property({ reflect: true })\n\ttype: 'elevated' | 'filled' | 'outlined' = 'elevated'\n\n\t/**\n\t * Makes the card interactive (clickable).\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tinteractive = false\n\n\t/**\n\t * Disables the card.\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdisabled = false\n\n\t/**\n\t * Indicates the card is being dragged.\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdragged = false\n\n\t/**\n\t * URL to navigate to when card is clicked (makes it act like a link).\n\t */\n\t@property()\n\thref?: string\n\n\t/**\n\t * Target for the link navigation.\n\t */\n\t@property()\n\ttarget?: string\n\n\t/**\n\t * ARIA role for accessibility.\n\t */\n\t@property({ attribute: 'role' })\n\toverride role = 'article'\n\n\t/**\n\t * ARIA label for accessibility.\n\t */\n\t@property({ attribute: 'aria-label' })\n\toverride ariaLabel: string = ''\n\n\t// Internal state for interaction feedback\n\t@state() pressed = false\n\t@state() private ripples: Array<{ x: number; y: number; id: number }> = []\n\n\tprivate nextRippleId = 0\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis._updateAriaAttributes()\n\t}\n\n\tupdated(changedProperties: Map<string, any>) {\n\t\tsuper.updated(changedProperties)\n\t\tif (changedProperties.has('interactive') || changedProperties.has('disabled')) {\n\t\t\tthis._updateAriaAttributes()\n\t\t}\n\t}\n\n\t// Consolidate ARIA attribute updates\n\tprivate _updateAriaAttributes() {\n\t\tconst isInteractive = this.interactive && !this.disabled\n\n\t\tif (isInteractive) {\n\t\t\tthis.setAttribute('tabindex', '0')\n\t\t\tif (!this.role || this.role === 'article') {\n\t\t\t\tthis.role = this.href ? 'link' : 'button'\n\t\t\t}\n\t\t} else {\n\t\t\tthis.removeAttribute('tabindex')\n\t\t\tif (this.role === 'button' || this.role === 'link') {\n\t\t\t\tthis.role = 'article'\n\t\t\t}\n\t\t}\n\t}\n\n\t// Shared ripple creation logic\n\tprivate _addRipple(x: number, y: number) {\n\t\tconst id = this.nextRippleId++\n\t\tthis.ripples = [...this.ripples, { x, y, id }]\n\n\t\t// Remove ripple after animation completes\n\t\tsetTimeout(() => {\n\t\t\tthis.ripples = this.ripples.filter(r => r.id !== id)\n\t\t}, 600) // M3 medium duration\n\t}\n\n\t// Shared navigation logic\n\tprivate _navigate() {\n\t\tif (!this.href) return\n\n\t\tif (this.target === '_blank') {\n\t\t\twindow.open(this.href, '_blank')\n\t\t} else {\n\t\t\twindow.location.href = this.href\n\t\t}\n\t}\n\n\t// Combined action trigger (ripple + navigate + event)\n\tprivate _triggerAction(x: number, y: number) {\n\t\tthis._addRipple(x, y)\n\t\tthis._navigate()\n\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('schmancy-click', {\n\t\t\t\tdetail: { value: this.type },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate handleClick = (e: MouseEvent) => {\n\t\tif (this.disabled || !this.interactive) return\n\n\t\tconst rect = this.getBoundingClientRect()\n\t\tthis._triggerAction(e.clientX - rect.left, e.clientY - rect.top)\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\tif (this.disabled || !this.interactive) return\n\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\tthis._setPressed(true)\n\n\t\t\t// Simulate click at center\n\t\t\tconst rect = this.getBoundingClientRect()\n\t\t\tthis._triggerAction(rect.width / 2, rect.height / 2)\n\t\t}\n\t}\n\n\tprivate handleKeyUp = (e: KeyboardEvent) => {\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\tthis._setPressed(false)\n\t\t}\n\t}\n\n\t// Consolidate pressed state management\n\tprivate _setPressed(pressed: boolean) {\n\t\tthis.pressed = pressed\n\t\tif (pressed) {\n\t\t\tthis.setAttribute('pressed', '')\n\t\t} else {\n\t\t\tthis.removeAttribute('pressed')\n\t\t}\n\t}\n\n\tprivate handleMouseDown = () => {\n\t\tif (this.disabled || !this.interactive) return\n\t\tthis._setPressed(true)\n\t}\n\n\tprivate handleMouseUp = () => this._setPressed(false)\n\tprivate handleMouseLeave = () => this._setPressed(false)\n\n\tprotected render() {\n\t\tconst isInteractive = this.interactive && !this.disabled\n\n\t\treturn html`\n\t\t\t<div\n\t\t\t\t${isInteractive ? cursorGlow({ radius: 200, intensity: 0.1 }) : ''}\n\t\t\t\tclass=\"relative w-full h-full rounded-xl ${isInteractive ? 'cursor-pointer' : ''}\"\n\t\t\t\t@click=${this.handleClick}\n\t\t\t\t@keydown=${this.handleKeyDown}\n\t\t\t\t@keyup=${this.handleKeyUp}\n\t\t\t\t@mousedown=${this.handleMouseDown}\n\t\t\t\t@mouseup=${this.handleMouseUp}\n\t\t\t\t@mouseleave=${this.handleMouseLeave}\n\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\taria-disabled=${this.disabled ? 'true' : 'false'}\n\t\t\t>\n\t\t\t\t<!-- State layer -->\n\t\t\t\t<div\n\t\t\t\t\tclass=\"absolute inset-0 rounded-xl pointer-events-none transition-opacity duration-200 bg-surface-on ${!isInteractive\n\t\t\t\t\t\t? 'opacity-0'\n\t\t\t\t\t\t: this.pressed\n\t\t\t\t\t\t\t? 'opacity-[var(--schmancy-sys-state-pressed-opacity)]'\n\t\t\t\t\t\t\t: 'opacity-0 hover:opacity-[var(--schmancy-sys-state-hover-opacity)] focus-visible:opacity-[var(--schmancy-sys-state-focus-opacity)]'}\"\n\t\t\t\t></div>\n\n\t\t\t\t<!-- Ripples -->\n\t\t\t\t${this.interactive && this.ripples.length\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<div class=\"absolute inset-0 rounded-xl overflow-hidden pointer-events-none\">\n\t\t\t\t\t\t\t\t${this.ripples.map(\n\t\t\t\t\t\t\t\t\tr => html`\n\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\tclass=\"absolute rounded-full scale-0 animate-[ripple_600ms_linear] bg-surface-on opacity-[0.12] w-5 h-5 -ml-2.5 -mt-2.5\"\n\t\t\t\t\t\t\t\t\t\t\tstyle=\"left: ${r.x}px; top: ${r.y}px\"\n\t\t\t\t\t\t\t\t\t\t></span>\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</div>\n\t\t\t\t\t\t`\n\t\t\t\t\t: ''}\n\n\t\t\t\t<!-- Content -->\n\t\t\t\t<div class=\"relative h-full w-full rounded-xl\">\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card': SchmancyCard\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * Content region of a schmancy-card — holds the card's headline, supporting text, and inline controls.\n *\n * @element schmancy-card-content\n * @summary Always nested inside schmancy-card. The padded content block between the media and action rows.\n * @example\n * <schmancy-card-content>\n * <h3>Card title</h3>\n * <p>Supporting text that describes the card's subject.</p>\n * </schmancy-card-content>\n * @platform div - Styled `<div>` with padding. Degrades to a plain div if the tag never registers.\n */\n@customElement('schmancy-card-content')\nexport default class SchmancyCardContent extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tpadding: 1rem;\n\t}\n`) {\n\tprotected render(): unknown {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-content': SchmancyCardContent\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * Media region of a schmancy-card — the image / thumbnail at the top of the card.\n *\n * @element schmancy-card-media\n * @summary Always nested inside schmancy-card. Pass `src` + `alt` props or slot an `<img>` / `<video>` for custom media.\n * @example\n * <schmancy-card-media src=\"/thumb.jpg\" alt=\"Product photo\"></schmancy-card-media>\n * @platform img - Renders an `<img>` (or wraps a slotted media element). Degrades to a styled `<img>` if the tag never registers.\n */\n@customElement('schmancy-card-media')\nexport default class SchmancyCardMedia extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\theight: 200px;\n\t\toverflow: hidden;\n\t}\n\t\n\t/* Allow height to be overridden when used in flex/grid layouts */\n\t:host-context(.h-full) {\n\t\theight: 100%;\n\t}\n\t\n\t::slotted(img),\n\timg {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-position: center;\n\t}\n\t\n\t/* Object fit styles based on fit attribute */\n\t:host([fit=\"contain\"]) img,\n\t:host([fit=\"contain\"]) ::slotted(img) {\n\t\tobject-fit: contain;\n\t}\n\t\n\t:host([fit=\"cover\"]) img,\n\t:host([fit=\"cover\"]) ::slotted(img) {\n\t\tobject-fit: cover;\n\t}\n\t\n\t:host([fit=\"fill\"]) img,\n\t:host([fit=\"fill\"]) ::slotted(img) {\n\t\tobject-fit: fill;\n\t}\n\t\n\t:host([fit=\"none\"]) img,\n\t:host([fit=\"none\"]) ::slotted(img) {\n\t\tobject-fit: none;\n\t}\n\t\n\t:host([fit=\"scale-down\"]) img,\n\t:host([fit=\"scale-down\"]) ::slotted(img) {\n\t\tobject-fit: scale-down;\n\t}\n`) {\n\t@property({ type: String, reflect: true })\n\tsrc: string = ''\n\n\t@property({ type: String, reflect: true })\n\tfit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' = 'contain'\n\t\n\t@property({ type: String })\n\talt: string = ''\n\n\tprotected render(): unknown {\n\t\t// If src is provided, render an img element\n\t\t// Otherwise, allow users to slot their own content\n\t\treturn this.src \n\t\t\t? html`<img src=\"${this.src}\" alt=\"${this.alt}\" />` \n\t\t\t: html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-media': SchmancyCardMedia\n\t}\n}\n"],"mappings":"0RAkBe,IAAA,EAAA,cAAiC,EAAA,EAAgB,EAAA,GAAG;;;;;;;;GASlE,QAAA,CACC,MAAO,GAAA,IAAI,kBAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eAXE,uBAAA,CAAA,CAAuB,EAAA,CCQvB,IAAA,EAAA,cAA2B,EAAA,EAAgB,EAAA,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AA,EAAgB,EAAA,GAAG;;;;;GAMnE,QAAA,CACC,MAAO,GAAA,IAAI,kBAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eARE,wBAAA,CAAA,CAAwB,EAAA,CCFxB,IAAA,EAAA,cAAgC,EAAA,EAAgB,EAAA,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0CA+CnD,GAAA,KAAA,IAG8C,UAAA,KAAA,IAG9C,GAEd,QAAA,CAGC,OAAO,KAAK,IACT,EAAA,IAAI,aAAa,KAAK,IAAA,SAAa,KAAK,IAAA,MACxC,EAAA,IAAI,kBAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAdE,CAAE,KAAM,OAAQ,QAAA,CAAS,EAAA,CAAA,CAAA,CAAO,EAAA,UAAA,MAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAGhC,CAAE,KAAM,OAAQ,QAAA,CAAS,EAAA,CAAA,CAAA,CAAO,EAAA,UAAA,MAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAGhC,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,MAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eArDb,sBAAA,CAAA,CAAsB,EAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"card-CEdgK9nb.js","names":[],"sources":["../src/card/actions.ts","../src/card/card.ts","../src/card/content.ts","../src/card/media.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-action\n * @slot - The content of the action\n */\n@customElement('schmancy-card-action')\nexport default class SchmancyCardAction extends TailwindElement(css`\n\t:host {\n\t\tdisplay: flex;\n\t\tgap: 0.5rem;\n\t\tpadding: 0.5rem 1rem;\n\t\talign-items: center;\n\t\tjustify-content: flex-end;\n\t}\n`) {\n\tprotected render(): unknown {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-action': SchmancyCardAction\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { cursorGlow } from '../directives/cursor-glow'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\n@customElement('schmancy-card')\nexport default class SchmancyCard extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\tborder-radius: var(--schmancy-sys-shape-corner-medium);\n\t\ttransition:\n\t\t\tbox-shadow var(--schmancy-sys-motion-duration-short4) var(--schmancy-sys-motion-easing-standard),\n\t\t\ttransform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);\n\t\toutline: none;\n\t}\n\n\t/* Type variants */\n\t:host([type='elevated']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-low);\n\t\tbox-shadow: var(--schmancy-sys-elevation-1);\n\t}\n\t:host([type='filled']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-highest);\n\t\tbox-shadow: var(--schmancy-sys-elevation-0);\n\t}\n\t:host([type='outlined']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-default);\n\t\tborder: 1px solid var(--schmancy-sys-color-outlineVariant);\n\t\tbox-shadow: var(--schmancy-sys-elevation-0);\n\t}\n\n\t/* Interactive states */\n\t:host([interactive]) {\n\t\tcursor: pointer;\n\t\t-webkit-tap-highlight-color: transparent;\n\t}\n\t:host([interactive]:focus-visible:not([disabled])) {\n\t\toutline: 2px solid var(--schmancy-sys-color-primary-default);\n\t\toutline-offset: 2px;\n\t}\n\t:host([disabled]) {\n\t\tpointer-events: none;\n\t\topacity: var(--schmancy-sys-state-disabled-opacity);\n\t}\n\n\t/* Hover elevations — luminous glow + lift */\n\t:host([type='elevated'][interactive]:hover:not([disabled])) {\n\t\tbox-shadow:\n\t\t\tvar(--schmancy-sys-elevation-2),\n\t\t\t0 4px 24px -6px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 12%, transparent);\n\t\ttransform: translateY(-2px);\n\t}\n\t:host([type='filled'][interactive]:hover:not([disabled])),\n\t:host([type='outlined'][interactive]:hover:not([disabled])) {\n\t\tbox-shadow:\n\t\t\tvar(--schmancy-sys-elevation-1),\n\t\t\t0 4px 20px -6px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 10%, transparent);\n\t\ttransform: translateY(-1px);\n\t}\n\n\t/* Active state — kinetic compress */\n\t:host([interactive]:active:not([disabled])) {\n\t\ttransform: scale(0.98);\n\t\ttransition-duration: 100ms;\n\t}\n\n\t/* Dragged state */\n\t:host([dragged]) {\n\t\tbox-shadow:\n\t\t\tvar(--schmancy-sys-elevation-3),\n\t\t\t0 8px 32px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 15%, transparent);\n\t\ttransform: translateY(-4px);\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\t:host([interactive]:hover:not([disabled])),\n\t\t:host([interactive]:active:not([disabled])),\n\t\t:host([dragged]) {\n\t\t\ttransform: none;\n\t\t}\n\t}\n\n\t@keyframes ripple {\n\t\tto {\n\t\t\ttransform: scale(4);\n\t\t\topacity: 0;\n\t\t}\n\t}\n`) {\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\t/**\n\t * The visual style of the card.\n\t * @default 'elevated'\n\t */\n\t@property({ reflect: true })\n\ttype: 'elevated' | 'filled' | 'outlined' = 'elevated'\n\n\t/**\n\t * Makes the card interactive (clickable).\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tinteractive = false\n\n\t/**\n\t * Disables the card.\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdisabled = false\n\n\t/**\n\t * Indicates the card is being dragged.\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdragged = false\n\n\t/**\n\t * URL to navigate to when card is clicked (makes it act like a link).\n\t */\n\t@property()\n\thref?: string\n\n\t/**\n\t * Target for the link navigation.\n\t */\n\t@property()\n\ttarget?: string\n\n\t/**\n\t * ARIA role for accessibility.\n\t */\n\t@property({ attribute: 'role' })\n\toverride role = 'article'\n\n\t/**\n\t * ARIA label for accessibility.\n\t */\n\t@property({ attribute: 'aria-label' })\n\toverride ariaLabel: string = ''\n\n\t// Internal state for interaction feedback\n\t@state() pressed = false\n\t@state() private ripples: Array<{ x: number; y: number; id: number }> = []\n\n\tprivate nextRippleId = 0\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis._updateAriaAttributes()\n\t}\n\n\tupdated(changedProperties: Map<string, any>) {\n\t\tsuper.updated(changedProperties)\n\t\tif (changedProperties.has('interactive') || changedProperties.has('disabled')) {\n\t\t\tthis._updateAriaAttributes()\n\t\t}\n\t}\n\n\t// Consolidate ARIA attribute updates\n\tprivate _updateAriaAttributes() {\n\t\tconst isInteractive = this.interactive && !this.disabled\n\n\t\tif (isInteractive) {\n\t\t\tthis.setAttribute('tabindex', '0')\n\t\t\tif (!this.role || this.role === 'article') {\n\t\t\t\tthis.role = this.href ? 'link' : 'button'\n\t\t\t}\n\t\t} else {\n\t\t\tthis.removeAttribute('tabindex')\n\t\t\tif (this.role === 'button' || this.role === 'link') {\n\t\t\t\tthis.role = 'article'\n\t\t\t}\n\t\t}\n\t}\n\n\t// Shared ripple creation logic\n\tprivate _addRipple(x: number, y: number) {\n\t\tconst id = this.nextRippleId++\n\t\tthis.ripples = [...this.ripples, { x, y, id }]\n\n\t\t// Remove ripple after animation completes\n\t\tsetTimeout(() => {\n\t\t\tthis.ripples = this.ripples.filter(r => r.id !== id)\n\t\t}, 600) // M3 medium duration\n\t}\n\n\t// Shared navigation logic\n\tprivate _navigate() {\n\t\tif (!this.href) return\n\n\t\tif (this.target === '_blank') {\n\t\t\twindow.open(this.href, '_blank')\n\t\t} else {\n\t\t\twindow.location.href = this.href\n\t\t}\n\t}\n\n\t// Combined action trigger (ripple + navigate + event)\n\tprivate _triggerAction(x: number, y: number) {\n\t\tthis._addRipple(x, y)\n\t\tthis._navigate()\n\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('schmancy-click', {\n\t\t\t\tdetail: { value: this.type },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate handleClick = (e: MouseEvent) => {\n\t\tif (this.disabled || !this.interactive) return\n\n\t\tconst rect = this.getBoundingClientRect()\n\t\tthis._triggerAction(e.clientX - rect.left, e.clientY - rect.top)\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\tif (this.disabled || !this.interactive) return\n\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\tthis._setPressed(true)\n\n\t\t\t// Simulate click at center\n\t\t\tconst rect = this.getBoundingClientRect()\n\t\t\tthis._triggerAction(rect.width / 2, rect.height / 2)\n\t\t}\n\t}\n\n\tprivate handleKeyUp = (e: KeyboardEvent) => {\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\tthis._setPressed(false)\n\t\t}\n\t}\n\n\t// Consolidate pressed state management\n\tprivate _setPressed(pressed: boolean) {\n\t\tthis.pressed = pressed\n\t\tif (pressed) {\n\t\t\tthis.setAttribute('pressed', '')\n\t\t} else {\n\t\t\tthis.removeAttribute('pressed')\n\t\t}\n\t}\n\n\tprivate handleMouseDown = () => {\n\t\tif (this.disabled || !this.interactive) return\n\t\tthis._setPressed(true)\n\t}\n\n\tprivate handleMouseUp = () => this._setPressed(false)\n\tprivate handleMouseLeave = () => this._setPressed(false)\n\n\tprotected render() {\n\t\tconst isInteractive = this.interactive && !this.disabled\n\n\t\treturn html`\n\t\t\t<div\n\t\t\t\t${isInteractive ? cursorGlow({ radius: 200, intensity: 0.1 }) : ''}\n\t\t\t\tclass=\"relative w-full h-full rounded-xl ${isInteractive ? 'cursor-pointer' : ''}\"\n\t\t\t\t@click=${this.handleClick}\n\t\t\t\t@keydown=${this.handleKeyDown}\n\t\t\t\t@keyup=${this.handleKeyUp}\n\t\t\t\t@mousedown=${this.handleMouseDown}\n\t\t\t\t@mouseup=${this.handleMouseUp}\n\t\t\t\t@mouseleave=${this.handleMouseLeave}\n\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\taria-disabled=${this.disabled ? 'true' : 'false'}\n\t\t\t>\n\t\t\t\t<!-- State layer -->\n\t\t\t\t<div\n\t\t\t\t\tclass=\"absolute inset-0 rounded-xl pointer-events-none transition-opacity duration-200 bg-surface-on ${!isInteractive\n\t\t\t\t\t\t? 'opacity-0'\n\t\t\t\t\t\t: this.pressed\n\t\t\t\t\t\t\t? 'opacity-[var(--schmancy-sys-state-pressed-opacity)]'\n\t\t\t\t\t\t\t: 'opacity-0 hover:opacity-[var(--schmancy-sys-state-hover-opacity)] focus-visible:opacity-[var(--schmancy-sys-state-focus-opacity)]'}\"\n\t\t\t\t></div>\n\n\t\t\t\t<!-- Ripples -->\n\t\t\t\t${this.interactive && this.ripples.length\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<div class=\"absolute inset-0 rounded-xl overflow-hidden pointer-events-none\">\n\t\t\t\t\t\t\t\t${this.ripples.map(\n\t\t\t\t\t\t\t\t\tr => html`\n\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\tclass=\"absolute rounded-full scale-0 animate-[ripple_600ms_linear] bg-surface-on opacity-[0.12] w-5 h-5 -ml-2.5 -mt-2.5\"\n\t\t\t\t\t\t\t\t\t\t\tstyle=\"left: ${r.x}px; top: ${r.y}px\"\n\t\t\t\t\t\t\t\t\t\t></span>\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</div>\n\t\t\t\t\t\t`\n\t\t\t\t\t: ''}\n\n\t\t\t\t<!-- Content -->\n\t\t\t\t<div class=\"relative h-full w-full rounded-xl\">\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card': SchmancyCard\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-content\n */\n@customElement('schmancy-card-content')\nexport default class SchmancyCardContent extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tpadding: 1rem;\n\t}\n`) {\n\tprotected render(): unknown {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-content': SchmancyCardContent\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-media\n */\n@customElement('schmancy-card-media')\nexport default class SchmancyCardMedia extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\theight: 200px;\n\t\toverflow: hidden;\n\t}\n\t\n\t/* Allow height to be overridden when used in flex/grid layouts */\n\t:host-context(.h-full) {\n\t\theight: 100%;\n\t}\n\t\n\t::slotted(img),\n\timg {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-position: center;\n\t}\n\t\n\t/* Object fit styles based on fit attribute */\n\t:host([fit=\"contain\"]) img,\n\t:host([fit=\"contain\"]) ::slotted(img) {\n\t\tobject-fit: contain;\n\t}\n\t\n\t:host([fit=\"cover\"]) img,\n\t:host([fit=\"cover\"]) ::slotted(img) {\n\t\tobject-fit: cover;\n\t}\n\t\n\t:host([fit=\"fill\"]) img,\n\t:host([fit=\"fill\"]) ::slotted(img) {\n\t\tobject-fit: fill;\n\t}\n\t\n\t:host([fit=\"none\"]) img,\n\t:host([fit=\"none\"]) ::slotted(img) {\n\t\tobject-fit: none;\n\t}\n\t\n\t:host([fit=\"scale-down\"]) img,\n\t:host([fit=\"scale-down\"]) ::slotted(img) {\n\t\tobject-fit: scale-down;\n\t}\n`) {\n\t@property({ type: String, reflect: true })\n\tsrc: string = ''\n\n\t@property({ type: String, reflect: true })\n\tfit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' = 'contain'\n\t\n\t@property({ type: String })\n\talt: string = ''\n\n\tprotected render(): unknown {\n\t\t// If src is provided, render an img element\n\t\t// Otherwise, allow users to slot their own content\n\t\treturn this.src \n\t\t\t? html`<img src=\"${this.src}\" alt=\"${this.alt}\" />` \n\t\t\t: html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-media': SchmancyCardMedia\n\t}\n}\n"],"mappings":";;;;;;;AASe,IAAA,IAAA,cAAiC,EAAgB,CAAG;;;;;;;;;CASlE,SAAA;AACC,SAAO,CAAI;;;AAAA,IAAA,EAAA,CAXZ,EAAc,uBAAA,CAAA,EAAuB,EAAA;ACDvB,IAAA,IAAA,cAA2B,EAAgB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BA+FjB,YAAA,KAAA,cAAA,CAO7B,GAAA,KAAA,WAAA,CAOH,GAAA,KAAA,UAAA,CAOD,GAAA,KAAA,OAkBM,WAAA,KAAA,YAMa,IAAA,KAAA,UAAA,CAGV,GAAA,KAAA,UACqD,EAAA,EAAA,KAAA,eAEjD,GAAA,KAAA,eAmEA,MAAA;AACtB,OAAI,KAAK,YAAA,CAAa,KAAK,YAAa;GAExC,IAAM,IAAO,KAAK,uBAAA;AAClB,QAAK,eAAe,EAAE,UAAU,EAAK,MAAM,EAAE,UAAU,EAAK,IAAA;KAAA,KAAA,iBAGpC,MAAA;AACxB,OAAA,CAAI,KAAK,YAAa,KAAK,gBAEvB,EAAE,QAAQ,WAAW,EAAE,QAAQ,MAAK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B,EAAc,sBAAA,CAAA,EAAsB,EAAA"}
1
+ {"version":3,"file":"card-CEdgK9nb.js","names":[],"sources":["../src/card/actions.ts","../src/card/card.ts","../src/card/content.ts","../src/card/media.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * Action row of a schmancy-card — holds the card's buttons / links (typically aligned bottom-right).\n *\n * @element schmancy-card-action\n * @summary Always nested inside schmancy-card. Holds the primary + secondary CTAs for the card.\n * @example\n * <schmancy-card-action>\n * <schmancy-button variant=\"text\">Cancel</schmancy-button>\n * <schmancy-button variant=\"filled\">Save</schmancy-button>\n * </schmancy-card-action>\n * @platform div - Styled flex container. Degrades to a plain div if the tag never registers.\n * @slot - The content of the action\n */\n@customElement('schmancy-card-action')\nexport default class SchmancyCardAction extends TailwindElement(css`\n\t:host {\n\t\tdisplay: flex;\n\t\tgap: 0.5rem;\n\t\tpadding: 0.5rem 1rem;\n\t\talign-items: center;\n\t\tjustify-content: flex-end;\n\t}\n`) {\n\tprotected render(): unknown {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-action': SchmancyCardAction\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { cursorGlow } from '../directives/cursor-glow'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\n/**\n * Material Design card — a surface-level container for grouping related content with media / content / actions slots.\n *\n * @element schmancy-card\n * @summary Use for discrete pieces of content that appear in a list (a product, a note, a message). Combine with schmancy-card-media / schmancy-card-content / schmancy-card-action children.\n * @example\n * <schmancy-card type=\"elevated\" href=\"/items/42\">\n * <schmancy-card-media src=\"/thumb.jpg\" alt=\"Thumbnail\"></schmancy-card-media>\n * <schmancy-card-content>\n * <h3>Title</h3>\n * <p>One-line description of the card's content.</p>\n * </schmancy-card-content>\n * <schmancy-card-action>\n * <schmancy-button variant=\"text\">Open</schmancy-button>\n * </schmancy-card-action>\n * </schmancy-card>\n * @platform div - Styled `<div>`; becomes an `<a>` when `href` is set so the whole card is a single interactive surface. Degrades to a plain div/a if the tag never registers.\n */\n@customElement('schmancy-card')\nexport default class SchmancyCard extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\tborder-radius: var(--schmancy-sys-shape-corner-medium);\n\t\ttransition:\n\t\t\tbox-shadow var(--schmancy-sys-motion-duration-short4) var(--schmancy-sys-motion-easing-standard),\n\t\t\ttransform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);\n\t\toutline: none;\n\t}\n\n\t/* Type variants */\n\t:host([type='elevated']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-low);\n\t\tbox-shadow: var(--schmancy-sys-elevation-1);\n\t}\n\t:host([type='filled']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-highest);\n\t\tbox-shadow: var(--schmancy-sys-elevation-0);\n\t}\n\t:host([type='outlined']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-default);\n\t\tborder: 1px solid var(--schmancy-sys-color-outlineVariant);\n\t\tbox-shadow: var(--schmancy-sys-elevation-0);\n\t}\n\n\t/* Interactive states */\n\t:host([interactive]) {\n\t\tcursor: pointer;\n\t\t-webkit-tap-highlight-color: transparent;\n\t}\n\t:host([interactive]:focus-visible:not([disabled])) {\n\t\toutline: 2px solid var(--schmancy-sys-color-primary-default);\n\t\toutline-offset: 2px;\n\t}\n\t:host([disabled]) {\n\t\tpointer-events: none;\n\t\topacity: var(--schmancy-sys-state-disabled-opacity);\n\t}\n\n\t/* Hover elevations — luminous glow + lift */\n\t:host([type='elevated'][interactive]:hover:not([disabled])) {\n\t\tbox-shadow:\n\t\t\tvar(--schmancy-sys-elevation-2),\n\t\t\t0 4px 24px -6px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 12%, transparent);\n\t\ttransform: translateY(-2px);\n\t}\n\t:host([type='filled'][interactive]:hover:not([disabled])),\n\t:host([type='outlined'][interactive]:hover:not([disabled])) {\n\t\tbox-shadow:\n\t\t\tvar(--schmancy-sys-elevation-1),\n\t\t\t0 4px 20px -6px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 10%, transparent);\n\t\ttransform: translateY(-1px);\n\t}\n\n\t/* Active state — kinetic compress */\n\t:host([interactive]:active:not([disabled])) {\n\t\ttransform: scale(0.98);\n\t\ttransition-duration: 100ms;\n\t}\n\n\t/* Dragged state */\n\t:host([dragged]) {\n\t\tbox-shadow:\n\t\t\tvar(--schmancy-sys-elevation-3),\n\t\t\t0 8px 32px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 15%, transparent);\n\t\ttransform: translateY(-4px);\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\t:host([interactive]:hover:not([disabled])),\n\t\t:host([interactive]:active:not([disabled])),\n\t\t:host([dragged]) {\n\t\t\ttransform: none;\n\t\t}\n\t}\n\n\t@keyframes ripple {\n\t\tto {\n\t\t\ttransform: scale(4);\n\t\t\topacity: 0;\n\t\t}\n\t}\n`) {\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\t/**\n\t * The visual style of the card.\n\t * @default 'elevated'\n\t */\n\t@property({ reflect: true })\n\ttype: 'elevated' | 'filled' | 'outlined' = 'elevated'\n\n\t/**\n\t * Makes the card interactive (clickable).\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tinteractive = false\n\n\t/**\n\t * Disables the card.\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdisabled = false\n\n\t/**\n\t * Indicates the card is being dragged.\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdragged = false\n\n\t/**\n\t * URL to navigate to when card is clicked (makes it act like a link).\n\t */\n\t@property()\n\thref?: string\n\n\t/**\n\t * Target for the link navigation.\n\t */\n\t@property()\n\ttarget?: string\n\n\t/**\n\t * ARIA role for accessibility.\n\t */\n\t@property({ attribute: 'role' })\n\toverride role = 'article'\n\n\t/**\n\t * ARIA label for accessibility.\n\t */\n\t@property({ attribute: 'aria-label' })\n\toverride ariaLabel: string = ''\n\n\t// Internal state for interaction feedback\n\t@state() pressed = false\n\t@state() private ripples: Array<{ x: number; y: number; id: number }> = []\n\n\tprivate nextRippleId = 0\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis._updateAriaAttributes()\n\t}\n\n\tupdated(changedProperties: Map<string, any>) {\n\t\tsuper.updated(changedProperties)\n\t\tif (changedProperties.has('interactive') || changedProperties.has('disabled')) {\n\t\t\tthis._updateAriaAttributes()\n\t\t}\n\t}\n\n\t// Consolidate ARIA attribute updates\n\tprivate _updateAriaAttributes() {\n\t\tconst isInteractive = this.interactive && !this.disabled\n\n\t\tif (isInteractive) {\n\t\t\tthis.setAttribute('tabindex', '0')\n\t\t\tif (!this.role || this.role === 'article') {\n\t\t\t\tthis.role = this.href ? 'link' : 'button'\n\t\t\t}\n\t\t} else {\n\t\t\tthis.removeAttribute('tabindex')\n\t\t\tif (this.role === 'button' || this.role === 'link') {\n\t\t\t\tthis.role = 'article'\n\t\t\t}\n\t\t}\n\t}\n\n\t// Shared ripple creation logic\n\tprivate _addRipple(x: number, y: number) {\n\t\tconst id = this.nextRippleId++\n\t\tthis.ripples = [...this.ripples, { x, y, id }]\n\n\t\t// Remove ripple after animation completes\n\t\tsetTimeout(() => {\n\t\t\tthis.ripples = this.ripples.filter(r => r.id !== id)\n\t\t}, 600) // M3 medium duration\n\t}\n\n\t// Shared navigation logic\n\tprivate _navigate() {\n\t\tif (!this.href) return\n\n\t\tif (this.target === '_blank') {\n\t\t\twindow.open(this.href, '_blank')\n\t\t} else {\n\t\t\twindow.location.href = this.href\n\t\t}\n\t}\n\n\t// Combined action trigger (ripple + navigate + event)\n\tprivate _triggerAction(x: number, y: number) {\n\t\tthis._addRipple(x, y)\n\t\tthis._navigate()\n\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('schmancy-click', {\n\t\t\t\tdetail: { value: this.type },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate handleClick = (e: MouseEvent) => {\n\t\tif (this.disabled || !this.interactive) return\n\n\t\tconst rect = this.getBoundingClientRect()\n\t\tthis._triggerAction(e.clientX - rect.left, e.clientY - rect.top)\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\tif (this.disabled || !this.interactive) return\n\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\tthis._setPressed(true)\n\n\t\t\t// Simulate click at center\n\t\t\tconst rect = this.getBoundingClientRect()\n\t\t\tthis._triggerAction(rect.width / 2, rect.height / 2)\n\t\t}\n\t}\n\n\tprivate handleKeyUp = (e: KeyboardEvent) => {\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\tthis._setPressed(false)\n\t\t}\n\t}\n\n\t// Consolidate pressed state management\n\tprivate _setPressed(pressed: boolean) {\n\t\tthis.pressed = pressed\n\t\tif (pressed) {\n\t\t\tthis.setAttribute('pressed', '')\n\t\t} else {\n\t\t\tthis.removeAttribute('pressed')\n\t\t}\n\t}\n\n\tprivate handleMouseDown = () => {\n\t\tif (this.disabled || !this.interactive) return\n\t\tthis._setPressed(true)\n\t}\n\n\tprivate handleMouseUp = () => this._setPressed(false)\n\tprivate handleMouseLeave = () => this._setPressed(false)\n\n\tprotected render() {\n\t\tconst isInteractive = this.interactive && !this.disabled\n\n\t\treturn html`\n\t\t\t<div\n\t\t\t\t${isInteractive ? cursorGlow({ radius: 200, intensity: 0.1 }) : ''}\n\t\t\t\tclass=\"relative w-full h-full rounded-xl ${isInteractive ? 'cursor-pointer' : ''}\"\n\t\t\t\t@click=${this.handleClick}\n\t\t\t\t@keydown=${this.handleKeyDown}\n\t\t\t\t@keyup=${this.handleKeyUp}\n\t\t\t\t@mousedown=${this.handleMouseDown}\n\t\t\t\t@mouseup=${this.handleMouseUp}\n\t\t\t\t@mouseleave=${this.handleMouseLeave}\n\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\taria-disabled=${this.disabled ? 'true' : 'false'}\n\t\t\t>\n\t\t\t\t<!-- State layer -->\n\t\t\t\t<div\n\t\t\t\t\tclass=\"absolute inset-0 rounded-xl pointer-events-none transition-opacity duration-200 bg-surface-on ${!isInteractive\n\t\t\t\t\t\t? 'opacity-0'\n\t\t\t\t\t\t: this.pressed\n\t\t\t\t\t\t\t? 'opacity-[var(--schmancy-sys-state-pressed-opacity)]'\n\t\t\t\t\t\t\t: 'opacity-0 hover:opacity-[var(--schmancy-sys-state-hover-opacity)] focus-visible:opacity-[var(--schmancy-sys-state-focus-opacity)]'}\"\n\t\t\t\t></div>\n\n\t\t\t\t<!-- Ripples -->\n\t\t\t\t${this.interactive && this.ripples.length\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<div class=\"absolute inset-0 rounded-xl overflow-hidden pointer-events-none\">\n\t\t\t\t\t\t\t\t${this.ripples.map(\n\t\t\t\t\t\t\t\t\tr => html`\n\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\tclass=\"absolute rounded-full scale-0 animate-[ripple_600ms_linear] bg-surface-on opacity-[0.12] w-5 h-5 -ml-2.5 -mt-2.5\"\n\t\t\t\t\t\t\t\t\t\t\tstyle=\"left: ${r.x}px; top: ${r.y}px\"\n\t\t\t\t\t\t\t\t\t\t></span>\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</div>\n\t\t\t\t\t\t`\n\t\t\t\t\t: ''}\n\n\t\t\t\t<!-- Content -->\n\t\t\t\t<div class=\"relative h-full w-full rounded-xl\">\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card': SchmancyCard\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * Content region of a schmancy-card — holds the card's headline, supporting text, and inline controls.\n *\n * @element schmancy-card-content\n * @summary Always nested inside schmancy-card. The padded content block between the media and action rows.\n * @example\n * <schmancy-card-content>\n * <h3>Card title</h3>\n * <p>Supporting text that describes the card's subject.</p>\n * </schmancy-card-content>\n * @platform div - Styled `<div>` with padding. Degrades to a plain div if the tag never registers.\n */\n@customElement('schmancy-card-content')\nexport default class SchmancyCardContent extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tpadding: 1rem;\n\t}\n`) {\n\tprotected render(): unknown {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-content': SchmancyCardContent\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * Media region of a schmancy-card — the image / thumbnail at the top of the card.\n *\n * @element schmancy-card-media\n * @summary Always nested inside schmancy-card. Pass `src` + `alt` props or slot an `<img>` / `<video>` for custom media.\n * @example\n * <schmancy-card-media src=\"/thumb.jpg\" alt=\"Product photo\"></schmancy-card-media>\n * @platform img - Renders an `<img>` (or wraps a slotted media element). Degrades to a styled `<img>` if the tag never registers.\n */\n@customElement('schmancy-card-media')\nexport default class SchmancyCardMedia extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\theight: 200px;\n\t\toverflow: hidden;\n\t}\n\t\n\t/* Allow height to be overridden when used in flex/grid layouts */\n\t:host-context(.h-full) {\n\t\theight: 100%;\n\t}\n\t\n\t::slotted(img),\n\timg {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-position: center;\n\t}\n\t\n\t/* Object fit styles based on fit attribute */\n\t:host([fit=\"contain\"]) img,\n\t:host([fit=\"contain\"]) ::slotted(img) {\n\t\tobject-fit: contain;\n\t}\n\t\n\t:host([fit=\"cover\"]) img,\n\t:host([fit=\"cover\"]) ::slotted(img) {\n\t\tobject-fit: cover;\n\t}\n\t\n\t:host([fit=\"fill\"]) img,\n\t:host([fit=\"fill\"]) ::slotted(img) {\n\t\tobject-fit: fill;\n\t}\n\t\n\t:host([fit=\"none\"]) img,\n\t:host([fit=\"none\"]) ::slotted(img) {\n\t\tobject-fit: none;\n\t}\n\t\n\t:host([fit=\"scale-down\"]) img,\n\t:host([fit=\"scale-down\"]) ::slotted(img) {\n\t\tobject-fit: scale-down;\n\t}\n`) {\n\t@property({ type: String, reflect: true })\n\tsrc: string = ''\n\n\t@property({ type: String, reflect: true })\n\tfit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' = 'contain'\n\t\n\t@property({ type: String })\n\talt: string = ''\n\n\tprotected render(): unknown {\n\t\t// If src is provided, render an img element\n\t\t// Otherwise, allow users to slot their own content\n\t\treturn this.src \n\t\t\t? html`<img src=\"${this.src}\" alt=\"${this.alt}\" />` \n\t\t\t: html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-media': SchmancyCardMedia\n\t}\n}\n"],"mappings":";;;;;;;AAkBe,IAAA,IAAA,cAAiC,EAAgB,CAAG;;;;;;;;;CASlE,SAAA;AACC,SAAO,CAAI;;;AAAA,IAAA,EAAA,CAXZ,EAAc,uBAAA,CAAA,EAAuB,EAAA;ACQvB,IAAA,IAAA,cAA2B,EAAgB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BA+FjB,YAAA,KAAA,cAAA,CAO7B,GAAA,KAAA,WAAA,CAOH,GAAA,KAAA,UAAA,CAOD,GAAA,KAAA,OAkBM,WAAA,KAAA,YAMa,IAAA,KAAA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,EAAA,CAdP,EAAS;CAAE,MAAM;CAAQ,SAAA,CAAS;CAAA,CAAA,CAAA,EAAO,EAAA,WAAA,OAAA,KAAA,EAAA,EAAA,EAAA,CAGzC,EAAS;CAAE,MAAM;CAAQ,SAAA,CAAS;CAAA,CAAA,CAAA,EAAO,EAAA,WAAA,OAAA,KAAA,EAAA,EAAA,EAAA,CAGzC,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,OAAA,KAAA,EAAA,EAAA,IAAA,EAAA,CArD3B,EAAc,sBAAA,CAAA,EAAsB,EAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"details-B8p62xmR.cjs","names":[],"sources":["../src/details/details.ts"],"sourcesContent":["import { TailwindElement, SurfaceMixin } from '@mixins/index'\nimport { css, html, LitElement, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { cursorGlow } from '../directives/cursor-glow'\nimport { magnetic } from '../directives/magnetic'\nimport { createRef, ref, Ref } from 'lit/directives/ref.js'\nimport { BehaviorSubject, fromEvent, Subscription } from 'rxjs'\nimport { distinctUntilChanged, filter, take, takeUntil, tap } from 'rxjs/operators'\nimport { SPRING_SNAPPY } from '../utils/animation.js'\nimport { reducedMotion$ } from '../directives/reduced-motion'\n\n@customElement('schmancy-details')\nexport default class SchmancyDetails extends SurfaceMixin(\n\tTailwindElement(css`\n\t\t:host {\n\t\t\tdisplay: block;\n\t\t\ttransition: box-shadow 400ms cubic-bezier(0.34, 1.2, 0.64, 1);\n\t\t}\n\n\t\t:host([overlay]) {\n\t\t\tposition: relative;\n\t\t}\n\n\t\t:host([open]) {\n\t\t\tbox-shadow:\n\t\t\t\t0 2px 12px -2px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 15%, transparent),\n\t\t\t\t0 8px 32px -8px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 8%, transparent);\n\t\t\tz-index: 10;\n\t\t}\n\n\t\tdetails {\n\t\t\tbackground: inherit;\n\t\t\tcolor: inherit;\n\t\t\tborder-radius: inherit;\n\t\t}\n\n\t\tsummary::-webkit-details-marker {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\tsummary {\n\t\t\tlist-style: none;\n\t\t\tcolor: inherit;\n\t\t}\n\n\t\t/*\n\t\t * Blackbird 2.1 — CSS-driven collapse/expand\n\t\t *\n\t\t * Single animation system: CSS grid transition handles height,\n\t\t * coordinated opacity fade for buttery smooth feel.\n\t\t * No competing Web Animations API on content.\n\t\t */\n\n\t\t.content-wrapper {\n\t\t\tdisplay: grid;\n\t\t\tgrid-template-rows: 0fr;\n\t\t\toverflow: hidden;\n\t\t\topacity: 0;\n\t\t\ttransition:\n\t\t\t\tgrid-template-rows 400ms cubic-bezier(0.34, 1.2, 0.64, 1),\n\t\t\t\topacity 250ms ease;\n\t\t}\n\n\t\t/* Spring easing when linear() is supported */\n\t\t@supports (animation-timing-function: linear(0, 1)) {\n\t\t\t.content-wrapper {\n\t\t\t\ttransition:\n\t\t\t\t\tgrid-template-rows 400ms linear(\n\t\t\t\t\t\t0, 0.006, 0.025 2.8%, 0.101 6.1%, 0.539 18.9%, 0.721 25.3%, 0.849 31.5%,\n\t\t\t\t\t\t0.937 38.1%, 0.968 41.8%, 0.991 45.7%, 1.006 50%, 1.015 54.8%,\n\t\t\t\t\t\t1.017 63.3%, 1.001\n\t\t\t\t\t),\n\t\t\t\t\topacity 250ms ease;\n\t\t\t}\n\t\t}\n\n\t\t.content-wrapper[data-open='true'] {\n\t\t\tgrid-template-rows: 1fr;\n\t\t\topacity: 1;\n\t\t}\n\n\t\t.content-inner {\n\t\t\tmin-height: 0;\n\t\t\toverflow: hidden;\n\t\t}\n\n\t\t/*\n\t\t * Progressive Enhancement: ::details-content (Chrome 131+)\n\t\t *\n\t\t * When both ::details-content AND interpolate-size are supported,\n\t\t * the browser handles height animation natively — including animated\n\t\t * close via transition-behavior: allow-discrete on content-visibility.\n\t\t * The grid wrapper becomes transparent (display: contents).\n\t\t */\n\t\t@supports selector(::details-content) and (interpolate-size: allow-keywords) {\n\t\t\t:host {\n\t\t\t\tinterpolate-size: allow-keywords;\n\t\t\t}\n\n\t\t\t.content-wrapper {\n\t\t\t\tdisplay: contents;\n\t\t\t}\n\n\t\t\tdetails::details-content {\n\t\t\t\tblock-size: 0;\n\t\t\t\toverflow-y: clip;\n\t\t\t\topacity: 0;\n\t\t\t\ttransition:\n\t\t\t\t\tblock-size 400ms cubic-bezier(0.34, 1.2, 0.64, 1),\n\t\t\t\t\topacity 250ms ease,\n\t\t\t\t\tcontent-visibility 400ms;\n\t\t\t\ttransition-behavior: allow-discrete;\n\t\t\t}\n\n\t\t\tdetails[open]::details-content {\n\t\t\t\tblock-size: auto;\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\n\t\t@media (prefers-reduced-motion: reduce) {\n\t\t\t.content-wrapper {\n\t\t\t\ttransition: none;\n\t\t\t}\n\t\t\tdetails::details-content {\n\t\t\t\ttransition: none;\n\t\t\t}\n\t\t}\n\t`),\n) {\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tmode: 'open' as const,\n\t\tdelegatesFocus: true,\n\t}\n\n\t@property() summary = ''\n\n\t@property({ type: Boolean, reflect: true })\n\tget open() {\n\t\treturn this._open$.value\n\t}\n\tset open(value: boolean) {\n\t\tif (this._open$.value !== value) {\n\t\t\tthis._open$.next(value)\n\t\t}\n\t}\n\n\t@property({ attribute: 'indicator-placement', reflect: true })\n\tindicatorPlacement: 'start' | 'end' = 'end'\n\n\t@property({ type: Boolean, attribute: 'hide-indicator' })\n\thideIndicator = false\n\n\t@property({ type: Number, attribute: 'indicator-rotate' })\n\tindicatorRotate: number = 90\n\n\t@property({ type: Boolean, reflect: true })\n\tlocked = false\n\n\t@property({ type: Boolean, reflect: true })\n\toverlay = false\n\n\t@property({ attribute: 'summary-padding' })\n\tsummaryPadding = 'p-3'\n\n\t@property({ attribute: 'content-padding' })\n\tcontentPadding = 'p-3'\n\n\tprivate _open$ = new BehaviorSubject<boolean>(false)\n\tprivate _indicatorRef: Ref<HTMLElement> = createRef()\n\tprivate _contentRef: Ref<HTMLDivElement> = createRef()\n\tprivate _currentAnimation?: Animation\n\tprivate _indicatorIsOpen = false\n\tprivate _closing = false\n\tprivate _closeSub?: Subscription\n\n\t/** True when browser handles close animation natively via ::details-content */\n\tprivate _nativeAnim =\n\t\ttypeof CSS !== 'undefined' &&\n\t\t!!CSS.supports?.('selector(::details-content)') &&\n\t\t!!CSS.supports?.('interpolate-size', 'allow-keywords')\n\n\t/**\n\t * Lazy rendering: tracks if content has ever been opened.\n\t * Once true, content stays rendered (even when closed) for smooth animations.\n\t */\n\t@state() private _hasOpened = false\n\n\tconstructor() {\n\t\tsuper()\n\t\tthis.type = 'solid'\n\t\tthis.rounded = 'all'\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tthis._open$\n\t\t\t.pipe(\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttap(isOpen => {\n\t\t\t\t\tif (isOpen && !this._hasOpened) {\n\t\t\t\t\t\tthis._hasOpened = true\n\t\t\t\t\t}\n\t\t\t\t\tthis._animateIndicator(isOpen)\n\t\t\t\t\tthis._updateIndicatorSlot()\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => this.requestUpdate())\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis._closeSub?.unsubscribe()\n\t}\n\n\trender() {\n\t\tconst isOpen = this._open$.value\n\n\t\tconst detailsClasses = this.classMap({\n\t\t\t'w-full rounded-xl transition-shadow duration-200 ease-out': true,\n\t\t\t'overflow-hidden': !this.overlay,\n\t\t\t'overflow-visible relative': this.overlay,\n\t\t})\n\n\t\tconst summaryClasses = this.classMap({\n\t\t\t[this.summaryPadding]: true,\n\t\t\t'select-none relative flex items-center gap-2 rounded-xl': true,\n\t\t\t'transition-colors duration-150': true,\n\t\t\t'ring-1 ring-inset ring-transparent': true,\n\t\t\t'hover:bg-surface-on/5 active:bg-surface-on/8 hover:ring-outline-variant/40': !this.locked,\n\t\t\t'focus-visible:ring-2 focus-visible:ring-primary-default/50 focus-visible:ring-offset-1': !this.locked,\n\t\t\t'cursor-pointer group': !this.locked,\n\t\t\t'cursor-default': this.locked,\n\t\t\t'flex-row': this.indicatorPlacement === 'start',\n\t\t\t'flex-row-reverse': this.indicatorPlacement === 'end',\n\t\t})\n\n\t\tconst contentClasses = this.classMap({\n\t\t\t[this.contentPadding]: true,\n\t\t\t'text-sm': true,\n\t\t\t'absolute inset-x-0 bg-surface-lowest/55 backdrop-blur-[16px] shadow-2xl rounded-b-xl z-20 border border-surface-on/10':\n\t\t\t\tthis.overlay,\n\t\t})\n\n\t\treturn html`\n\t\t\t<details ?open=${isOpen} @toggle=${this._handleToggle} class=${detailsClasses}>\n\t\t\t\t<summary ${this.locked ? '' : magnetic({ strength: 2, radius: 50 })} ${this.locked ? '' : cursorGlow({ radius: 250, intensity: 0.08 })} class=${summaryClasses} tabindex=${this.locked ? -1 : 0} @click=${this._handleSummaryClick}>\n\t\t\t\t\t${!this.hideIndicator\n\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t${ref(this._indicatorRef)}\n\t\t\t\t\t\t\t\t\tclass=\"flex items-center justify-center w-5 h-5 rounded-full shrink-0 opacity-70 group-hover:opacity-100\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<slot name=\"indicator\" @slotchange=${this._handleIndicatorSlotChange}>\n\t\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\t\twidth=\"20\"\n\t\t\t\t\t\t\t\t\t\t\theight=\"20\"\n\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\t\tclass=\"w-5 h-5\"\n\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\td=\"M9 6L15 12L9 18\"\n\t\t\t\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t`\n\t\t\t\t\t\t: ''}\n\n\t\t\t\t\t<span class=\"flex-1 min-w-0\">\n\t\t\t\t\t\t<slot name=\"summary\">${this.summary}</slot>\n\t\t\t\t\t</span>\n\n\t\t\t\t\t<slot name=\"actions\"></slot>\n\t\t\t\t</summary>\n\n\t\t\t\t<div\n\t\t\t\t\t${ref(this._contentRef)}\n\t\t\t\t\tclass=\"content-wrapper\"\n\t\t\t\t\tdata-open=${isOpen && !this._closing}\n\t\t\t\t\taria-hidden=${isOpen ? 'false' : 'true'}\n\t\t\t\t>\n\t\t\t\t\t<div class=\"content-inner\">\n\t\t\t\t\t\t${this._hasOpened\n\t\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t\t<div class=${contentClasses}>\n\t\t\t\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t\t\t\t\t<slot name=\"details\"></slot>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t`\n\t\t\t\t\t\t\t: nothing}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</details>\n\t\t`\n\t}\n\n\tprivate _handleSummaryClick(e: MouseEvent) {\n\t\tif ((e.target as HTMLElement).closest('[slot=\"actions\"]')) {\n\t\t\te.preventDefault()\n\t\t\treturn\n\t\t}\n\t\tif (this.locked) {\n\t\t\te.preventDefault()\n\t\t\treturn\n\t\t}\n\t\tif (this._closing) {\n\t\t\te.preventDefault()\n\t\t\treturn\n\t\t}\n\n\t\t// Native animated path (Chromium 131+): browser handles everything via CSS\n\t\tif (this._nativeAnim) return\n\n\t\t// Fallback: manually animate close via CSS transition, then close native details\n\t\tif (this._open$.value) {\n\t\t\te.preventDefault()\n\t\t\tthis._startClose()\n\t\t}\n\t\t// If closed, let native open happen (handled by _handleToggle)\n\t}\n\n\tprivate _handleToggle(e: Event) {\n\t\te.stopPropagation()\n\n\t\tconst ownDetails = this.shadowRoot?.querySelector('details')\n\t\tif (e.target !== ownDetails) return\n\n\t\tconst newState = ownDetails.open\n\n\t\tif (this._nativeAnim) {\n\t\t\t// Native path: handle both open and close\n\t\t\tif (this._open$.value !== newState) {\n\t\t\t\tthis.open = newState\n\t\t\t\tthis.dispatchScopedEvent('toggle', { open: newState })\n\t\t\t}\n\t\t} else {\n\t\t\t// Fallback path: only handle OPEN (close is driven by _startClose)\n\t\t\tif (newState && this._open$.value !== newState) {\n\t\t\t\tthis.open = newState\n\t\t\t\tthis.dispatchScopedEvent('toggle', { open: newState })\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Fallback close: trigger CSS grid+opacity transition, then close native <details>.\n\t * The CSS transition (400ms) handles the visual collapse — no WAAPI needed.\n\t */\n\tprivate _startClose() {\n\t\tthis._closing = true\n\t\tthis._closeSub?.unsubscribe()\n\n\t\t// Immediately collapse the grid wrapper via DOM attribute\n\t\tthis._contentRef.value?.setAttribute('data-open', 'false')\n\n\t\t// Animate indicator immediately\n\t\tthis._animateIndicator(false)\n\n\t\t// After CSS transition completes, close native details and update state\n\t\tconst wrapper = this._contentRef.value\n\t\tif (!wrapper) return\n\n\t\tthis._closeSub = fromEvent<TransitionEvent>(wrapper, 'transitionend').pipe(\n\t\t\tfilter(e => e.propertyName === 'grid-template-rows'),\n\t\t\ttake(1),\n\t\t\ttap(() => {\n\t\t\t\tthis._closing = false\n\t\t\t\tthis.open = false\n\t\t\t\tthis.dispatchScopedEvent('toggle', { open: false })\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\t}\n\n\tprivate _handleIndicatorSlotChange(e: Event) {\n\t\tconst slot = e.target as HTMLSlotElement\n\t\tslot.assignedElements().forEach(el => {\n\t\t\tel.setAttribute('data-open', String(this._open$.value))\n\t\t})\n\t}\n\n\tprivate _updateIndicatorSlot() {\n\t\tconst slot = this.shadowRoot?.querySelector('slot[name=\"indicator\"]') as HTMLSlotElement | null\n\t\tif (slot) {\n\t\t\tslot.assignedElements().forEach(el => {\n\t\t\t\tel.setAttribute('data-open', String(this._open$.value))\n\t\t\t})\n\t\t}\n\t}\n\n\t/** Idempotent indicator rotation — skips if already at target state */\n\tprivate _animateIndicator(isOpen: boolean) {\n\t\tif (this._indicatorIsOpen === isOpen) return\n\t\tthis._indicatorIsOpen = isOpen\n\n\t\tconst indicator = this._indicatorRef.value\n\t\tif (!indicator || reducedMotion$.value) return\n\n\t\tthis._currentAnimation?.cancel()\n\n\t\tthis._currentAnimation = indicator.animate(\n\t\t\t[\n\t\t\t\t{ transform: `rotate(${isOpen ? '0deg' : `${this.indicatorRotate}deg`})` },\n\t\t\t\t{ transform: `rotate(${isOpen ? `${this.indicatorRotate}deg` : '0deg'})` },\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: SPRING_SNAPPY.duration,\n\t\t\t\teasing: SPRING_SNAPPY.easingFallback,\n\t\t\t\tfill: 'forwards',\n\t\t\t},\n\t\t)\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-details': SchmancyDetails\n\t}\n}\n"],"mappings":"ieAYe,IAAA,EAAA,cAA8B,EAAA,EAC5C,EAAA,EAAgB,EAAA,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAA,EAAA,EAAA,UAGjC,CAAE,UAAW,kBAAA,CAAA,CAAA,CAAoB,EAAA,UAAA,iBAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,QAAA,CAAA,CAqBnC,EAAA,UAAA,aAAA,IAAA,GAAA,CAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eAhLM,mBAAA,CAAA,CAAmB,EAAA,CAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"details-B8p62xmR.cjs","names":[],"sources":["../src/details/details.ts"],"sourcesContent":["import { TailwindElement, SurfaceMixin } from '@mixins/index'\nimport { css, html, LitElement, nothing } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { cursorGlow } from '../directives/cursor-glow'\nimport { magnetic } from '../directives/magnetic'\nimport { createRef, ref, Ref } from 'lit/directives/ref.js'\nimport { BehaviorSubject, fromEvent, Subscription } from 'rxjs'\nimport { distinctUntilChanged, filter, take, takeUntil, tap } from 'rxjs/operators'\nimport { SPRING_SNAPPY } from '../utils/animation.js'\nimport { reducedMotion$ } from '../directives/reduced-motion'\n\n/**\n * Expandable disclosure panel — a styled `<details>` / `<summary>` pair with animated expand + overlay options.\n *\n * @element schmancy-details\n * @summary Use for progressive-disclosure content: FAQs, collapsible settings sections, accordion-style lists. Prefer schmancy-expand for full-page accordions where only one section can be open at a time.\n * @example\n * <schmancy-details summary=\"Shipping details\">\n * <p>Order ships in 2 business days.</p>\n * </schmancy-details>\n * @platform details toggle - Wraps native `<details>`/`<summary>`. Degrades to the native element if the tag never registers — same keyboard accessibility, just no animation.\n * @fires toggle - When the open state changes (bubbles from the native `<details>`).\n */\n@customElement('schmancy-details')\nexport default class SchmancyDetails extends SurfaceMixin(\n\tTailwindElement(css`\n\t\t:host {\n\t\t\tdisplay: block;\n\t\t\ttransition: box-shadow 400ms cubic-bezier(0.34, 1.2, 0.64, 1);\n\t\t}\n\n\t\t:host([overlay]) {\n\t\t\tposition: relative;\n\t\t}\n\n\t\t:host([open]) {\n\t\t\tbox-shadow:\n\t\t\t\t0 2px 12px -2px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 15%, transparent),\n\t\t\t\t0 8px 32px -8px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 8%, transparent);\n\t\t\tz-index: 10;\n\t\t}\n\n\t\tdetails {\n\t\t\tbackground: inherit;\n\t\t\tcolor: inherit;\n\t\t\tborder-radius: inherit;\n\t\t}\n\n\t\tsummary::-webkit-details-marker {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\tsummary {\n\t\t\tlist-style: none;\n\t\t\tcolor: inherit;\n\t\t}\n\n\t\t/*\n\t\t * Blackbird 2.1 — CSS-driven collapse/expand\n\t\t *\n\t\t * Single animation system: CSS grid transition handles height,\n\t\t * coordinated opacity fade for buttery smooth feel.\n\t\t * No competing Web Animations API on content.\n\t\t */\n\n\t\t.content-wrapper {\n\t\t\tdisplay: grid;\n\t\t\tgrid-template-rows: 0fr;\n\t\t\toverflow: hidden;\n\t\t\topacity: 0;\n\t\t\ttransition:\n\t\t\t\tgrid-template-rows 400ms cubic-bezier(0.34, 1.2, 0.64, 1),\n\t\t\t\topacity 250ms ease;\n\t\t}\n\n\t\t/* Spring easing when linear() is supported */\n\t\t@supports (animation-timing-function: linear(0, 1)) {\n\t\t\t.content-wrapper {\n\t\t\t\ttransition:\n\t\t\t\t\tgrid-template-rows 400ms linear(\n\t\t\t\t\t\t0, 0.006, 0.025 2.8%, 0.101 6.1%, 0.539 18.9%, 0.721 25.3%, 0.849 31.5%,\n\t\t\t\t\t\t0.937 38.1%, 0.968 41.8%, 0.991 45.7%, 1.006 50%, 1.015 54.8%,\n\t\t\t\t\t\t1.017 63.3%, 1.001\n\t\t\t\t\t),\n\t\t\t\t\topacity 250ms ease;\n\t\t\t}\n\t\t}\n\n\t\t.content-wrapper[data-open='true'] {\n\t\t\tgrid-template-rows: 1fr;\n\t\t\topacity: 1;\n\t\t}\n\n\t\t.content-inner {\n\t\t\tmin-height: 0;\n\t\t\toverflow: hidden;\n\t\t}\n\n\t\t/*\n\t\t * Progressive Enhancement: ::details-content (Chrome 131+)\n\t\t *\n\t\t * When both ::details-content AND interpolate-size are supported,\n\t\t * the browser handles height animation natively — including animated\n\t\t * close via transition-behavior: allow-discrete on content-visibility.\n\t\t * The grid wrapper becomes transparent (display: contents).\n\t\t */\n\t\t@supports selector(::details-content) and (interpolate-size: allow-keywords) {\n\t\t\t:host {\n\t\t\t\tinterpolate-size: allow-keywords;\n\t\t\t}\n\n\t\t\t.content-wrapper {\n\t\t\t\tdisplay: contents;\n\t\t\t}\n\n\t\t\tdetails::details-content {\n\t\t\t\tblock-size: 0;\n\t\t\t\toverflow-y: clip;\n\t\t\t\topacity: 0;\n\t\t\t\ttransition:\n\t\t\t\t\tblock-size 400ms cubic-bezier(0.34, 1.2, 0.64, 1),\n\t\t\t\t\topacity 250ms ease,\n\t\t\t\t\tcontent-visibility 400ms;\n\t\t\t\ttransition-behavior: allow-discrete;\n\t\t\t}\n\n\t\t\tdetails[open]::details-content {\n\t\t\t\tblock-size: auto;\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\n\t\t@media (prefers-reduced-motion: reduce) {\n\t\t\t.content-wrapper {\n\t\t\t\ttransition: none;\n\t\t\t}\n\t\t\tdetails::details-content {\n\t\t\t\ttransition: none;\n\t\t\t}\n\t\t}\n\t`),\n) {\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tmode: 'open' as const,\n\t\tdelegatesFocus: true,\n\t}\n\n\t@property() summary = ''\n\n\t@property({ type: Boolean, reflect: true })\n\tget open() {\n\t\treturn this._open$.value\n\t}\n\tset open(value: boolean) {\n\t\tif (this._open$.value !== value) {\n\t\t\tthis._open$.next(value)\n\t\t}\n\t}\n\n\t@property({ attribute: 'indicator-placement', reflect: true })\n\tindicatorPlacement: 'start' | 'end' = 'end'\n\n\t@property({ type: Boolean, attribute: 'hide-indicator' })\n\thideIndicator = false\n\n\t@property({ type: Number, attribute: 'indicator-rotate' })\n\tindicatorRotate: number = 90\n\n\t@property({ type: Boolean, reflect: true })\n\tlocked = false\n\n\t@property({ type: Boolean, reflect: true })\n\toverlay = false\n\n\t@property({ attribute: 'summary-padding' })\n\tsummaryPadding = 'p-3'\n\n\t@property({ attribute: 'content-padding' })\n\tcontentPadding = 'p-3'\n\n\tprivate _open$ = new BehaviorSubject<boolean>(false)\n\tprivate _indicatorRef: Ref<HTMLElement> = createRef()\n\tprivate _contentRef: Ref<HTMLDivElement> = createRef()\n\tprivate _currentAnimation?: Animation\n\tprivate _indicatorIsOpen = false\n\tprivate _closing = false\n\tprivate _closeSub?: Subscription\n\n\t/** True when browser handles close animation natively via ::details-content */\n\tprivate _nativeAnim =\n\t\ttypeof CSS !== 'undefined' &&\n\t\t!!CSS.supports?.('selector(::details-content)') &&\n\t\t!!CSS.supports?.('interpolate-size', 'allow-keywords')\n\n\t/**\n\t * Lazy rendering: tracks if content has ever been opened.\n\t * Once true, content stays rendered (even when closed) for smooth animations.\n\t */\n\t@state() private _hasOpened = false\n\n\tconstructor() {\n\t\tsuper()\n\t\tthis.type = 'solid'\n\t\tthis.rounded = 'all'\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\tthis._open$\n\t\t\t.pipe(\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttap(isOpen => {\n\t\t\t\t\tif (isOpen && !this._hasOpened) {\n\t\t\t\t\t\tthis._hasOpened = true\n\t\t\t\t\t}\n\t\t\t\t\tthis._animateIndicator(isOpen)\n\t\t\t\t\tthis._updateIndicatorSlot()\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => this.requestUpdate())\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis._closeSub?.unsubscribe()\n\t}\n\n\trender() {\n\t\tconst isOpen = this._open$.value\n\n\t\tconst detailsClasses = this.classMap({\n\t\t\t'w-full rounded-xl transition-shadow duration-200 ease-out': true,\n\t\t\t'overflow-hidden': !this.overlay,\n\t\t\t'overflow-visible relative': this.overlay,\n\t\t})\n\n\t\tconst summaryClasses = this.classMap({\n\t\t\t[this.summaryPadding]: true,\n\t\t\t'select-none relative flex items-center gap-2 rounded-xl': true,\n\t\t\t'transition-colors duration-150': true,\n\t\t\t'ring-1 ring-inset ring-transparent': true,\n\t\t\t'hover:bg-surface-on/5 active:bg-surface-on/8 hover:ring-outline-variant/40': !this.locked,\n\t\t\t'focus-visible:ring-2 focus-visible:ring-primary-default/50 focus-visible:ring-offset-1': !this.locked,\n\t\t\t'cursor-pointer group': !this.locked,\n\t\t\t'cursor-default': this.locked,\n\t\t\t'flex-row': this.indicatorPlacement === 'start',\n\t\t\t'flex-row-reverse': this.indicatorPlacement === 'end',\n\t\t})\n\n\t\tconst contentClasses = this.classMap({\n\t\t\t[this.contentPadding]: true,\n\t\t\t'text-sm': true,\n\t\t\t'absolute inset-x-0 bg-surface-lowest/55 backdrop-blur-[16px] shadow-2xl rounded-b-xl z-20 border border-surface-on/10':\n\t\t\t\tthis.overlay,\n\t\t})\n\n\t\treturn html`\n\t\t\t<details ?open=${isOpen} @toggle=${this._handleToggle} class=${detailsClasses}>\n\t\t\t\t<summary ${this.locked ? '' : magnetic({ strength: 2, radius: 50 })} ${this.locked ? '' : cursorGlow({ radius: 250, intensity: 0.08 })} class=${summaryClasses} tabindex=${this.locked ? -1 : 0} @click=${this._handleSummaryClick}>\n\t\t\t\t\t${!this.hideIndicator\n\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t${ref(this._indicatorRef)}\n\t\t\t\t\t\t\t\t\tclass=\"flex items-center justify-center w-5 h-5 rounded-full shrink-0 opacity-70 group-hover:opacity-100\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<slot name=\"indicator\" @slotchange=${this._handleIndicatorSlotChange}>\n\t\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\t\twidth=\"20\"\n\t\t\t\t\t\t\t\t\t\t\theight=\"20\"\n\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\t\tclass=\"w-5 h-5\"\n\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\td=\"M9 6L15 12L9 18\"\n\t\t\t\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t`\n\t\t\t\t\t\t: ''}\n\n\t\t\t\t\t<span class=\"flex-1 min-w-0\">\n\t\t\t\t\t\t<slot name=\"summary\">${this.summary}</slot>\n\t\t\t\t\t</span>\n\n\t\t\t\t\t<slot name=\"actions\"></slot>\n\t\t\t\t</summary>\n\n\t\t\t\t<div\n\t\t\t\t\t${ref(this._contentRef)}\n\t\t\t\t\tclass=\"content-wrapper\"\n\t\t\t\t\tdata-open=${isOpen && !this._closing}\n\t\t\t\t\taria-hidden=${isOpen ? 'false' : 'true'}\n\t\t\t\t>\n\t\t\t\t\t<div class=\"content-inner\">\n\t\t\t\t\t\t${this._hasOpened\n\t\t\t\t\t\t\t? html`\n\t\t\t\t\t\t\t\t\t<div class=${contentClasses}>\n\t\t\t\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t\t\t\t\t<slot name=\"details\"></slot>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t`\n\t\t\t\t\t\t\t: nothing}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</details>\n\t\t`\n\t}\n\n\tprivate _handleSummaryClick(e: MouseEvent) {\n\t\tif ((e.target as HTMLElement).closest('[slot=\"actions\"]')) {\n\t\t\te.preventDefault()\n\t\t\treturn\n\t\t}\n\t\tif (this.locked) {\n\t\t\te.preventDefault()\n\t\t\treturn\n\t\t}\n\t\tif (this._closing) {\n\t\t\te.preventDefault()\n\t\t\treturn\n\t\t}\n\n\t\t// Native animated path (Chromium 131+): browser handles everything via CSS\n\t\tif (this._nativeAnim) return\n\n\t\t// Fallback: manually animate close via CSS transition, then close native details\n\t\tif (this._open$.value) {\n\t\t\te.preventDefault()\n\t\t\tthis._startClose()\n\t\t}\n\t\t// If closed, let native open happen (handled by _handleToggle)\n\t}\n\n\tprivate _handleToggle(e: Event) {\n\t\te.stopPropagation()\n\n\t\tconst ownDetails = this.shadowRoot?.querySelector('details')\n\t\tif (e.target !== ownDetails) return\n\n\t\tconst newState = ownDetails.open\n\n\t\tif (this._nativeAnim) {\n\t\t\t// Native path: handle both open and close\n\t\t\tif (this._open$.value !== newState) {\n\t\t\t\tthis.open = newState\n\t\t\t\tthis.dispatchScopedEvent('toggle', { open: newState })\n\t\t\t}\n\t\t} else {\n\t\t\t// Fallback path: only handle OPEN (close is driven by _startClose)\n\t\t\tif (newState && this._open$.value !== newState) {\n\t\t\t\tthis.open = newState\n\t\t\t\tthis.dispatchScopedEvent('toggle', { open: newState })\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Fallback close: trigger CSS grid+opacity transition, then close native <details>.\n\t * The CSS transition (400ms) handles the visual collapse — no WAAPI needed.\n\t */\n\tprivate _startClose() {\n\t\tthis._closing = true\n\t\tthis._closeSub?.unsubscribe()\n\n\t\t// Immediately collapse the grid wrapper via DOM attribute\n\t\tthis._contentRef.value?.setAttribute('data-open', 'false')\n\n\t\t// Animate indicator immediately\n\t\tthis._animateIndicator(false)\n\n\t\t// After CSS transition completes, close native details and update state\n\t\tconst wrapper = this._contentRef.value\n\t\tif (!wrapper) return\n\n\t\tthis._closeSub = fromEvent<TransitionEvent>(wrapper, 'transitionend').pipe(\n\t\t\tfilter(e => e.propertyName === 'grid-template-rows'),\n\t\t\ttake(1),\n\t\t\ttap(() => {\n\t\t\t\tthis._closing = false\n\t\t\t\tthis.open = false\n\t\t\t\tthis.dispatchScopedEvent('toggle', { open: false })\n\t\t\t}),\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\t}\n\n\tprivate _handleIndicatorSlotChange(e: Event) {\n\t\tconst slot = e.target as HTMLSlotElement\n\t\tslot.assignedElements().forEach(el => {\n\t\t\tel.setAttribute('data-open', String(this._open$.value))\n\t\t})\n\t}\n\n\tprivate _updateIndicatorSlot() {\n\t\tconst slot = this.shadowRoot?.querySelector('slot[name=\"indicator\"]') as HTMLSlotElement | null\n\t\tif (slot) {\n\t\t\tslot.assignedElements().forEach(el => {\n\t\t\t\tel.setAttribute('data-open', String(this._open$.value))\n\t\t\t})\n\t\t}\n\t}\n\n\t/** Idempotent indicator rotation — skips if already at target state */\n\tprivate _animateIndicator(isOpen: boolean) {\n\t\tif (this._indicatorIsOpen === isOpen) return\n\t\tthis._indicatorIsOpen = isOpen\n\n\t\tconst indicator = this._indicatorRef.value\n\t\tif (!indicator || reducedMotion$.value) return\n\n\t\tthis._currentAnimation?.cancel()\n\n\t\tthis._currentAnimation = indicator.animate(\n\t\t\t[\n\t\t\t\t{ transform: `rotate(${isOpen ? '0deg' : `${this.indicatorRotate}deg`})` },\n\t\t\t\t{ transform: `rotate(${isOpen ? `${this.indicatorRotate}deg` : '0deg'})` },\n\t\t\t],\n\t\t\t{\n\t\t\t\tduration: SPRING_SNAPPY.duration,\n\t\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