@mhmo91/schmancy 0.9.17 → 0.9.18

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 (57) hide show
  1. package/custom-elements.json +85 -46
  2. package/dist/agent/schmancy.agent.js +169 -23
  3. package/dist/agent/schmancy.agent.js.map +1 -1
  4. package/dist/agent/schmancy.manifest.json +198 -18
  5. package/dist/breadcrumb.cjs.map +1 -1
  6. package/dist/breadcrumb.js.map +1 -1
  7. package/dist/dialog.cjs.map +1 -1
  8. package/dist/dialog.js.map +1 -1
  9. package/dist/dropdown.cjs.map +1 -1
  10. package/dist/dropdown.js.map +1 -1
  11. package/dist/handover/agent-runtime-followups.md +1 -1
  12. package/dist/handover/agent-runtime-v1.md +3 -3
  13. package/dist/list-BpjKUOzM.js.map +1 -1
  14. package/dist/list-CMWHu6cV.cjs.map +1 -1
  15. package/dist/menu-BIBUgS1T.js.map +1 -1
  16. package/dist/menu-DS8Iz4fJ.cjs.map +1 -1
  17. package/dist/navigation-rail.cjs.map +1 -1
  18. package/dist/navigation-rail.js.map +1 -1
  19. package/dist/sheet-DdlZhnDG.cjs.map +1 -1
  20. package/dist/sheet-LFVo5iN4.js.map +1 -1
  21. package/dist/src-C7niWYur.js.map +1 -1
  22. package/dist/src-I4M33WK2.cjs.map +1 -1
  23. package/package.json +1 -1
  24. package/src/breadcrumb/breadcrumb.ts +14 -4
  25. package/src/dialog/dialog.component.ts +9 -9
  26. package/src/dropdown/dropdown-component.ts +13 -1
  27. package/src/dropdown/dropdown-content.ts +11 -3
  28. package/src/list/list-item.ts +10 -0
  29. package/src/list/list.ts +7 -8
  30. package/src/menu/menu-item.ts +13 -0
  31. package/src/menu/menu.ts +10 -22
  32. package/src/nav-drawer/appbar.ts +11 -0
  33. package/src/nav-drawer/content.ts +11 -0
  34. package/src/nav-drawer/drawer.ts +15 -0
  35. package/src/nav-drawer/navbar.ts +14 -0
  36. package/src/navigation-bar/navigation-bar-item.ts +3 -4
  37. package/src/navigation-bar/navigation-bar.ts +3 -9
  38. package/src/navigation-rail/navigation-rail-item.ts +3 -7
  39. package/src/navigation-rail/navigation-rail.ts +12 -8
  40. package/src/sheet/sheet.ts +17 -0
  41. package/types/src/breadcrumb/breadcrumb.d.ts +14 -4
  42. package/types/src/dialog/dialog.component.d.ts +9 -9
  43. package/types/src/dropdown/dropdown-component.d.ts +13 -1
  44. package/types/src/dropdown/dropdown-content.d.ts +11 -3
  45. package/types/src/list/list-item.d.ts +10 -0
  46. package/types/src/list/list.d.ts +7 -8
  47. package/types/src/menu/menu-item.d.ts +13 -0
  48. package/types/src/menu/menu.d.ts +10 -22
  49. package/types/src/nav-drawer/appbar.d.ts +11 -0
  50. package/types/src/nav-drawer/content.d.ts +11 -0
  51. package/types/src/nav-drawer/drawer.d.ts +15 -0
  52. package/types/src/nav-drawer/navbar.d.ts +14 -0
  53. package/types/src/navigation-bar/navigation-bar-item.d.ts +3 -4
  54. package/types/src/navigation-bar/navigation-bar.d.ts +3 -9
  55. package/types/src/navigation-rail/navigation-rail-item.d.ts +3 -7
  56. package/types/src/navigation-rail/navigation-rail.d.ts +12 -8
  57. package/types/src/sheet/sheet.d.ts +17 -0
@@ -524,7 +524,13 @@
524
524
  "kind": "class",
525
525
  "name": "SchmancyBreadcrumb",
526
526
  "tagName": "schmancy-breadcrumb",
527
- "description": "Breadcrumb navigation container. Wraps a list of `schmancy-breadcrumb-item` elements with the correct ARIA landmark and semantics.",
527
+ "description": "Breadcrumb trail — navigation history from root to current page. Renders schmancy-breadcrumb-item children with separators between.",
528
+ "summary": "Use for deep hierarchical navigation (file explorer paths, e-commerce category chains, admin settings trees). Last item is styled as the current page automatically.",
529
+ "platformPrimitive": {
530
+ "tag": "nav",
531
+ "mode": "-",
532
+ "note": "Styled `<nav aria-label=\"Breadcrumb\">`. Degrades to a plain nav if the tag never registers."
533
+ },
528
534
  "attributes": [
529
535
  {
530
536
  "name": "separator",
@@ -545,13 +551,22 @@
545
551
  "name": "separator",
546
552
  "description": "The separator element."
547
553
  }
554
+ ],
555
+ "examples": [
556
+ "<schmancy-breadcrumb separator=\"›\">\n <schmancy-breadcrumb-item href=\"/\">Home</schmancy-breadcrumb-item>\n <schmancy-breadcrumb-item href=\"/docs\">Docs</schmancy-breadcrumb-item>\n <schmancy-breadcrumb-item>Getting started</schmancy-breadcrumb-item>\n</schmancy-breadcrumb>"
548
557
  ]
549
558
  },
550
559
  {
551
560
  "kind": "class",
552
561
  "name": "SchmancyBreadcrumbItem",
553
562
  "tagName": "schmancy-breadcrumb-item",
554
- "description": "Individual breadcrumb item. Renders as a link when `href` is provided, otherwise as a plain span (represents the current page).",
563
+ "description": "Single segment in a schmancy-breadcrumb trail a link when `href` is set, or a plain span (the current page) when omitted.",
564
+ "summary": "Always nested inside schmancy-breadcrumb. Omit `href` on the current page — it gets aria-current=\"page\" automatically.",
565
+ "platformPrimitive": {
566
+ "tag": "a",
567
+ "mode": "-",
568
+ "note": "Renders an `<a>` or `<span>` depending on href. Degrades to a plain anchor/span if the tag never registers."
569
+ },
555
570
  "attributes": [
556
571
  {
557
572
  "name": "href",
@@ -573,6 +588,9 @@
573
588
  "name": "",
574
589
  "description": "Label content."
575
590
  }
591
+ ],
592
+ "examples": [
593
+ "<schmancy-breadcrumb-item href=\"/products\">Products</schmancy-breadcrumb-item>"
576
594
  ]
577
595
  }
578
596
  ]
@@ -2367,7 +2385,13 @@
2367
2385
  "kind": "class",
2368
2386
  "name": "SchmancyDialog",
2369
2387
  "tagName": "schmancy-dialog",
2370
- "description": "Unified dialog component that handles both content-only and confirm modes.",
2388
+ "description": "Modal dialog content-only (just a styled panel) or confirm mode (title + message + confirm/cancel buttons). Prefer the imperative `$dialog` service for most use cases; use the element directly only when you want a declaratively-positioned dialog.",
2389
+ "summary": "Blocks interaction with the rest of the page until dismissed. For quick confirmations, prefer `$dialog.confirm({ ... })` over this element. For arbitrary dialog content driven imperatively, prefer `$dialog.component(MyComponent)`.",
2390
+ "platformPrimitive": {
2391
+ "tag": "dialog",
2392
+ "mode": "close",
2393
+ "note": "Positioned overlay in light DOM. Degrades to a styled `<dialog>` if the tag never registers — loses custom animations but keeps focus trap + ESC close."
2394
+ },
2371
2395
  "attributes": [
2372
2396
  {
2373
2397
  "name": "uid",
@@ -2437,6 +2461,16 @@
2437
2461
  "description": "Whether to hide action buttons (force content mode)"
2438
2462
  }
2439
2463
  ],
2464
+ "events": [
2465
+ {
2466
+ "name": "confirm",
2467
+ "description": "In confirm mode, when the confirm button is clicked."
2468
+ },
2469
+ {
2470
+ "name": "cancel",
2471
+ "description": "In confirm mode, when the cancel button or ESC is activated."
2472
+ }
2473
+ ],
2440
2474
  "slots": [
2441
2475
  {
2442
2476
  "name": "default",
@@ -2448,8 +2482,8 @@
2448
2482
  }
2449
2483
  ],
2450
2484
  "examples": [
2451
- "Content mode (no buttons):\n\n<schmancy-dialog>\n <my-custom-content></my-custom-content>\n</schmancy-dialog>",
2452
- "Confirm mode (with buttons):\n\n<schmancy-dialog\n title=\"Confirm Action\"\n message=\"Are you sure?\"\n confirm-text=\"Yes\"\n cancel-text=\"No\"\n></schmancy-dialog>"
2485
+ "Content mode (no buttons):\n<schmancy-dialog>\n <my-custom-content></my-custom-content>\n</schmancy-dialog>",
2486
+ "Confirm mode (with buttons):\n<schmancy-dialog\n title=\"Delete item?\"\n message=\"This action cannot be undone.\"\n confirm-text=\"Delete\"\n cancel-text=\"Keep\"\n></schmancy-dialog>"
2453
2487
  ]
2454
2488
  }
2455
2489
  ]
@@ -2515,7 +2549,13 @@
2515
2549
  "kind": "class",
2516
2550
  "name": "SchmancyDropdown",
2517
2551
  "tagName": "schmancy-dropdown",
2518
- "description": "A dropdown component that displays content when triggered.",
2552
+ "description": "Anchored floating dropdown a generic \"show this content relative to that trigger\" primitive. Unlike schmancy-menu (which uses the dialog service and is list-shaped), dropdown is a low-level popover anchored with Floating UI. Use when you want a custom-shaped overlay tied to a specific trigger element without the menu semantics.",
2553
+ "summary": "Prefer schmancy-menu for action lists, schmancy-autocomplete for type-ahead, schmancy-tooltip for hover hints. Reach for schmancy-dropdown when none of those fit — custom filters, color pickers, inline forms anchored to a trigger.",
2554
+ "platformPrimitive": {
2555
+ "tag": "div",
2556
+ "mode": "-",
2557
+ "note": "Anchored via Floating UI (autoUpdate, flip, shift). Degrades to inline content if the tag never registers — loses positioning but content stays accessible."
2558
+ },
2519
2559
  "attributes": [
2520
2560
  {
2521
2561
  "name": "open",
@@ -2556,6 +2596,16 @@
2556
2596
  "description": "Offset distance in pixels"
2557
2597
  }
2558
2598
  ],
2599
+ "events": [
2600
+ {
2601
+ "name": "open",
2602
+ "description": "When the dropdown opens."
2603
+ },
2604
+ {
2605
+ "name": "close",
2606
+ "description": "When the dropdown closes."
2607
+ }
2608
+ ],
2559
2609
  "slots": [
2560
2610
  {
2561
2611
  "name": "trigger",
@@ -2565,6 +2615,9 @@
2565
2615
  "name": "",
2566
2616
  "description": "Default slot for the dropdown content"
2567
2617
  }
2618
+ ],
2619
+ "examples": [
2620
+ "<schmancy-dropdown>\n <schmancy-button slot=\"trigger\">Filters</schmancy-button>\n <schmancy-dropdown-content>\n <schmancy-form>…</schmancy-form>\n </schmancy-dropdown-content>\n</schmancy-dropdown>"
2568
2621
  ]
2569
2622
  }
2570
2623
  ]
@@ -2577,7 +2630,13 @@
2577
2630
  "kind": "class",
2578
2631
  "name": "SchmancyDropdownContent",
2579
2632
  "tagName": "schmancy-dropdown-content",
2580
- "description": "Content container for the schmancy-dropdown component.",
2633
+ "description": "Content panel for a schmancy-dropdown — a styled positioned surface. Always nested inside schmancy-dropdown and placed alongside the trigger slot.",
2634
+ "summary": "Nest this inside schmancy-dropdown (not in the trigger slot). Use the `content` CSS part to customize backgrounds / shadows / padding without shadow-root piercing.",
2635
+ "platformPrimitive": {
2636
+ "tag": "div",
2637
+ "mode": "-",
2638
+ "note": "Positioned panel with theme-aware styling. Degrades to an inline div if the tag never registers."
2639
+ },
2581
2640
  "attributes": [
2582
2641
  {
2583
2642
  "name": "width",
@@ -2630,6 +2689,9 @@
2630
2689
  "name": "content",
2631
2690
  "description": "The inner wrapper element; style to override panel backgrounds, shadows, padding, or borders without shadow-root piercing."
2632
2691
  }
2692
+ ],
2693
+ "examples": [
2694
+ "<schmancy-dropdown>\n <schmancy-button slot=\"trigger\">Open</schmancy-button>\n <schmancy-dropdown-content>\n Panel contents…\n </schmancy-dropdown-content>\n</schmancy-dropdown>"
2633
2695
  ]
2634
2696
  }
2635
2697
  ]
@@ -3313,6 +3375,13 @@
3313
3375
  "kind": "class",
3314
3376
  "name": "SchmancyListItem",
3315
3377
  "tagName": "schmancy-list-item",
3378
+ "description": "Single row in a schmancy-list — supports leading icon/avatar, main content, trailing actions. Clickable via click event, or used as a schmancy-menu-item's visual base.",
3379
+ "summary": "Prefer nesting inside schmancy-list for consistent spacing/surface. Use `href` to make the row a navigation target (renders as `<a>`), or a click handler for in-app actions.",
3380
+ "platformPrimitive": {
3381
+ "tag": "li",
3382
+ "mode": "click",
3383
+ "note": "Styled `<li>` or `<a>` depending on `href`. Degrades to a plain list item if the tag never registers."
3384
+ },
3316
3385
  "attributes": [
3317
3386
  {
3318
3387
  "name": "variant",
@@ -3378,6 +3447,9 @@
3378
3447
  "description": "default content"
3379
3448
  }
3380
3449
  ],
3450
+ "examples": [
3451
+ "<schmancy-list-item href=\"/profile\">\n <schmancy-icon slot=\"leading\">person</schmancy-icon>\n Profile\n <schmancy-icon slot=\"trailing\">chevron_right</schmancy-icon>\n</schmancy-list-item>"
3452
+ ],
3381
3453
  "contexts": [
3382
3454
  {
3383
3455
  "name": "SchmancySurfaceTypeContext",
@@ -3395,7 +3467,13 @@
3395
3467
  "kind": "class",
3396
3468
  "name": "List",
3397
3469
  "tagName": "schmancy-list",
3398
- "description": "`<schmancy-list>` component. A list component that wraps its content within a customizable surface. It allows you to set the surface type and fill style, and can optionally enable scrolling behavior by delegating the scroller attribute to the surface.",
3470
+ "description": "Wrapped list container holds schmancy-list-item children on a themed surface. Optionally scrollable.",
3471
+ "summary": "Use for vertical lists of similarly-shaped items: settings entries, menu items, contact lists, notification lists. Pair with schmancy-list-item children.",
3472
+ "platformPrimitive": {
3473
+ "tag": "ul",
3474
+ "mode": "-",
3475
+ "note": "Styled list container. Degrades to a plain ul/div if the tag never registers."
3476
+ },
3399
3477
  "attributes": [
3400
3478
  {
3401
3479
  "name": "surface",
@@ -3458,7 +3536,7 @@
3458
3536
  }
3459
3537
  ],
3460
3538
  "examples": [
3461
- "<schmancy-list surface=\"container\" scroller>\n <schmancy-list-item>List Item 1</schmancy-list-item>\n</schmancy-list>"
3539
+ "<schmancy-list surface=\"container\" scroller>\n <schmancy-list-item>First</schmancy-list-item>\n <schmancy-list-item>Second</schmancy-list-item>\n <schmancy-list-item>Third</schmancy-list-item>\n</schmancy-list>"
3462
3540
  ],
3463
3541
  "contexts": [
3464
3542
  {
@@ -3938,7 +4016,23 @@
3938
4016
  {
3939
4017
  "kind": "class",
3940
4018
  "name": "SchmancyMenuItem",
3941
- "tagName": "schmancy-menu-item"
4019
+ "tagName": "schmancy-menu-item",
4020
+ "description": "Single item inside a schmancy-menu. Auto-dismisses the menu dialog on click — attach your action handler to `@click` and it just works.",
4021
+ "summary": "Always nested inside schmancy-menu. The click handler runs before the dialog closes, so `@click=${() => doThing()}` is the full pattern.",
4022
+ "platformPrimitive": {
4023
+ "tag": "menuitem",
4024
+ "mode": "click",
4025
+ "note": "Wraps schmancy-list-item with auto-dismiss. Degrades to a styled `<button role=\"menuitem\">` if the tag never registers."
4026
+ },
4027
+ "slots": [
4028
+ {
4029
+ "name": "",
4030
+ "description": "The item label and optional icons."
4031
+ }
4032
+ ],
4033
+ "examples": [
4034
+ "<schmancy-menu-item @click=${() => archive()}>\n <schmancy-icon slot=\"leading\">archive</schmancy-icon>\n Archive\n</schmancy-menu-item>"
4035
+ ]
3942
4036
  }
3943
4037
  ]
3944
4038
  },
@@ -3950,7 +4044,13 @@
3950
4044
  "kind": "class",
3951
4045
  "name": "SchmancyMenu",
3952
4046
  "tagName": "schmancy-menu",
3953
- "description": "Menu Component CRITICAL: The dialog ONLY renders the raw menu items passed via the default slot. NO <ul> wrapper, NO classes, NO additional markup in the dialog call. The dialog service handles positioning and display - we just pass the pure content.",
4047
+ "description": "Floating menu a trigger button + a list of schmancy-menu-item children that open as a positioned dialog on click.",
4048
+ "summary": "Use for dropdown menus attached to a button or icon — \"More actions\", \"Account\", row overflow menus in tables. Clicking a schmancy-menu-item inside auto-dismisses; custom components slotted inside must call `$dialog.dismiss()` themselves.",
4049
+ "platformPrimitive": {
4050
+ "tag": "menu",
4051
+ "mode": "close",
4052
+ "note": "Trigger + floating listbox dialog. Degrades to a native `<select>` or inline list if the tag never registers."
4053
+ },
3954
4054
  "slots": [
3955
4055
  {
3956
4056
  "name": "trigger",
@@ -3966,8 +4066,7 @@
3966
4066
  }
3967
4067
  ],
3968
4068
  "examples": [
3969
- "Basic menu with auto-dismiss\n\n<schmancy-menu>\n <schmancy-button slot=\"trigger\">Actions</schmancy-button>\n <schmancy-menu-item @click=${() => editItem()}>Edit</schmancy-menu-item>\n <schmancy-menu-item @click=${() => deleteItem()}>Delete</schmancy-menu-item>\n</schmancy-menu>\n\nNote: Dialog auto-dismisses when schmancy-menu-item is clicked",
3970
- "Custom component (manual dismiss)\n\n<schmancy-menu>\n <schmancy-icon-button slot=\"trigger\">settings</schmancy-icon-button>\n <my-settings-form @submit=${() => $dialog.dismiss()}></my-settings-form>\n</schmancy-menu>\n\nNote: Custom components must call $dialog.dismiss() manually"
4069
+ "<schmancy-menu>\n <schmancy-icon-button slot=\"trigger\" aria-label=\"Actions\">\n <schmancy-icon>more_vert</schmancy-icon>\n </schmancy-icon-button>\n <schmancy-menu-item @click=${() => edit()}>Edit</schmancy-menu-item>\n <schmancy-menu-item @click=${() => remove()}>Delete</schmancy-menu-item>\n</schmancy-menu>"
3971
4070
  ]
3972
4071
  }
3973
4072
  ]
@@ -3980,11 +4079,21 @@
3980
4079
  "kind": "class",
3981
4080
  "name": "SchmancyDrawerAppbar",
3982
4081
  "tagName": "schmancy-nav-drawer-appbar",
4082
+ "description": "Top app bar region inside schmancy-nav-drawer — the horizontal strip above the content area that typically holds the page title, hamburger trigger, and contextual actions.",
4083
+ "summary": "Always nested inside schmancy-nav-drawer. Holds the page-level title + top-right actions. On mobile, the drawer's hamburger button renders inside this region.",
4084
+ "platformPrimitive": {
4085
+ "tag": "header",
4086
+ "mode": "-",
4087
+ "note": "Styled horizontal bar. Degrades to a plain header element if the tag never registers."
4088
+ },
3983
4089
  "slots": [
3984
4090
  {
3985
4091
  "name": "",
3986
4092
  "description": "The default slot"
3987
4093
  }
4094
+ ],
4095
+ "examples": [
4096
+ "<schmancy-nav-drawer-appbar>\n <schmancy-typography type=\"title\" token=\"lg\">Dashboard</schmancy-typography>\n <schmancy-icon-button slot=\"trailing\" aria-label=\"Notifications\">\n <schmancy-icon>notifications</schmancy-icon>\n </schmancy-icon-button>\n</schmancy-nav-drawer-appbar>"
3988
4097
  ]
3989
4098
  }
3990
4099
  ]
@@ -3996,7 +4105,17 @@
3996
4105
  {
3997
4106
  "kind": "class",
3998
4107
  "name": "SchmancyNavigationDrawerContent",
3999
- "tagName": "schmancy-nav-drawer-content"
4108
+ "tagName": "schmancy-nav-drawer-content",
4109
+ "description": "Main content region inside schmancy-nav-drawer — typically hosts the router outlet or the page's body content.",
4110
+ "summary": "Always nested inside schmancy-nav-drawer. Scrollable by default; propagates scroll events up so the drawer can collapse app-bar on scroll.",
4111
+ "platformPrimitive": {
4112
+ "tag": "main",
4113
+ "mode": "scroll",
4114
+ "note": "Scrollable `<main>`. Degrades to a plain scrollable div if the tag never registers."
4115
+ },
4116
+ "examples": [
4117
+ "<schmancy-nav-drawer-content>\n <schmancy-area name=\"main\"></schmancy-area>\n</schmancy-nav-drawer-content>"
4118
+ ]
4000
4119
  }
4001
4120
  ]
4002
4121
  },
@@ -4008,6 +4127,13 @@
4008
4127
  "kind": "class",
4009
4128
  "name": "SchmancyNavigationDrawer",
4010
4129
  "tagName": "schmancy-nav-drawer",
4130
+ "description": "Responsive navigation drawer — a left sidebar that becomes a hamburger-triggered modal overlay on narrow viewports. Composes schmancy-nav-drawer-navbar (the nav rail), schmancy-nav-drawer-appbar (the top bar), and schmancy-nav-drawer-content (the main region).",
4131
+ "summary": "The app-shell layout primitive. Wrap your whole app in this when you want \"persistent sidebar on desktop, drawer on mobile\" behavior. Mode auto-switches at the breakpoint.",
4132
+ "platformPrimitive": {
4133
+ "tag": "div",
4134
+ "mode": "-",
4135
+ "note": "Flex layout with viewport-width mode switching. Degrades to a stack of plain divs if the tag never registers."
4136
+ },
4011
4137
  "attributes": [
4012
4138
  {
4013
4139
  "name": "fullscreen",
@@ -4041,12 +4167,21 @@
4041
4167
  ]
4042
4168
  }
4043
4169
  ],
4170
+ "events": [
4171
+ {
4172
+ "name": "schmancy-drawer-state",
4173
+ "description": "When the drawer open/close state changes on mobile."
4174
+ }
4175
+ ],
4044
4176
  "slots": [
4045
4177
  {
4046
4178
  "name": "",
4047
4179
  "description": "The content slot"
4048
4180
  }
4049
4181
  ],
4182
+ "examples": [
4183
+ "<schmancy-nav-drawer>\n <schmancy-nav-drawer-navbar>\n <!-- nav items, typically schmancy-list-item links -->\n </schmancy-nav-drawer-navbar>\n <schmancy-nav-drawer-appbar>App title</schmancy-nav-drawer-appbar>\n <schmancy-nav-drawer-content>\n <!-- router outlet / page content -->\n </schmancy-nav-drawer-content>\n</schmancy-nav-drawer>"
4184
+ ],
4050
4185
  "contexts": [
4051
4186
  {
4052
4187
  "name": "SchmancyDrawerNavbarMode",
@@ -4068,6 +4203,13 @@
4068
4203
  "kind": "class",
4069
4204
  "name": "SchmancyNavigationDrawerSidebar",
4070
4205
  "tagName": "schmancy-nav-drawer-navbar",
4206
+ "description": "Sidebar region inside schmancy-nav-drawer — the persistent-on-desktop / modal-on-mobile nav rail.",
4207
+ "summary": "Always nested inside schmancy-nav-drawer. On desktop: pinned left sidebar. On mobile: modal overlay triggered by the hamburger button in schmancy-nav-drawer-appbar.",
4208
+ "platformPrimitive": {
4209
+ "tag": "nav",
4210
+ "mode": "-",
4211
+ "note": "Sidebar `<nav>` with responsive open/close behavior. Degrades to a plain sidebar div if the tag never registers."
4212
+ },
4071
4213
  "attributes": [
4072
4214
  {
4073
4215
  "name": "width",
@@ -4077,6 +4219,9 @@
4077
4219
  "default": "'220px'"
4078
4220
  }
4079
4221
  ],
4222
+ "examples": [
4223
+ "<schmancy-nav-drawer-navbar>\n <schmancy-list>\n <schmancy-list-item href=\"/dashboard\">Dashboard</schmancy-list-item>\n <schmancy-list-item href=\"/settings\">Settings</schmancy-list-item>\n </schmancy-list>\n</schmancy-nav-drawer-navbar>"
4224
+ ],
4080
4225
  "contexts": [
4081
4226
  {
4082
4227
  "name": "SchmancyDrawerNavbarMode",
@@ -4098,7 +4243,13 @@
4098
4243
  "kind": "class",
4099
4244
  "name": "SchmancyNavigationBarItem",
4100
4245
  "tagName": "schmancy-navigation-bar-item",
4101
- "description": "`<schmancy-navigation-bar-item>` component Individual navigation item for use within a navigation bar. Represents a single destination with an icon and optional label following Material Design 3 specifications.",
4246
+ "description": "Single destination inside schmancy-navigation-bar an icon + optional label representing one primary app destination.",
4247
+ "summary": "Always nested inside schmancy-navigation-bar. Use `icon` attr for a Material Symbols glyph or slot=icon for custom content.",
4248
+ "platformPrimitive": {
4249
+ "tag": "button",
4250
+ "mode": "click",
4251
+ "note": "Styled navigation target. Degrades to a plain `<button>` if the tag never registers."
4252
+ },
4102
4253
  "attributes": [
4103
4254
  {
4104
4255
  "name": "icon",
@@ -4180,7 +4331,13 @@
4180
4331
  "kind": "class",
4181
4332
  "name": "SchmancyNavigationBar",
4182
4333
  "tagName": "schmancy-navigation-bar",
4183
- "description": "`<schmancy-navigation-bar>` component A horizontal navigation component following Material Design 3 specifications. Navigation bars provide access to between 3-7 primary destinations. Automatically hides in fullscreen mode when triggered via schmancyTheme.next({ fullscreen: true }). **IMPORTANT**: This component includes `z-10` by default (consistent with navigation-rail). The consumer is responsible for positioning the navigation bar in their layout. For typical bottom-fixed positioning, add: `class=\"fixed bottom-0 left-0 right-0\"`.",
4334
+ "description": "Bottom navigation bar Material Design 3 horizontal nav for mobile primary destinations (37 items). Auto-hides in fullscreen mode.",
4335
+ "summary": "Use for mobile primary navigation (home, search, favorites, settings). For persistent desktop nav, prefer schmancy-navigation-rail or schmancy-nav-drawer. Consumer is responsible for fixed-bottom positioning via class.",
4336
+ "platformPrimitive": {
4337
+ "tag": "nav",
4338
+ "mode": "-",
4339
+ "note": "Styled horizontal nav with schmancy-navigation-bar-item children. Degrades to a plain flex container if the tag never registers."
4340
+ },
4184
4341
  "attributes": [
4185
4342
  {
4186
4343
  "name": "hideLabels",
@@ -4234,7 +4391,13 @@
4234
4391
  "kind": "class",
4235
4392
  "name": "SchmancyNavigationRailItem",
4236
4393
  "tagName": "schmancy-navigation-rail-item",
4237
- "description": "Material Design 3 Navigation Rail Item Component",
4394
+ "description": "Single destination inside schmancy-navigation-rail vertically-stacked icon + optional label. @see https://m3.material.io/components/navigation-rail/overview",
4395
+ "summary": "Always nested inside schmancy-navigation-rail. Use `icon` attr for a Material Symbols glyph, or slot=icon for custom content. Supports a `badge` slot for notification dots / counts.",
4396
+ "platformPrimitive": {
4397
+ "tag": "button",
4398
+ "mode": "click",
4399
+ "note": "Styled vertical navigation target. Degrades to a plain `<button>` if the tag never registers."
4400
+ },
4238
4401
  "attributes": [
4239
4402
  {
4240
4403
  "name": "icon",
@@ -4372,7 +4535,7 @@
4372
4535
  "kind": "class",
4373
4536
  "name": "SchmancyNavigationRail",
4374
4537
  "tagName": "schmancy-navigation-rail",
4375
- "description": "Material Design 3 Navigation Rail Component\r @see https://m3.material.io/components/navigation-rail/overview\r `<schmancy-navigation-rail>` component\r A Material Design 3 vertical navigation component positioned on the left side of an application.\r Navigation rails provide access to between 3-7 primary destinations with a compact footprint.\r Automatically hides in fullscreen mode when triggered via schmancyTheme.next({ fullscreen: true }).\r @element schmancy-navigation-rail\r @slot fab - Slot for a floating action button at the top\r @slot menu - Slot for a menu icon or button below the FAB\r @slot header - Custom header content slot\r @slot footer - Custom footer content slot\r @slot - Default slot for navigation rail items\r @fires navigate - When a navigation item is selected\r @fires menu-click - When the menu button is clicked\r @fires fab-click - When the FAB is clicked\r @csspart rail - The main rail container\r @csspart header - The header section\r @csspart nav - The navigation items container\r @csspart footer - The footer section",
4538
+ "description": "Vertical navigation rail Material Design 3 compact left-side nav for desktop / tablet layouts with 37 primary destinations. Auto-hides in fullscreen mode. @see https://m3.material.io/components/navigation-rail/overview\r @element schmancy-navigation-rail\r @summary Use as the desktop counterpart of schmancy-navigation-bar: same destinations, different form factor. Prefer schmancy-nav-drawer when you also want a drawer + app-bar combo.",
4376
4539
  "attributes": [
4377
4540
  {
4378
4541
  "name": "label-visibility",
@@ -4426,6 +4589,7 @@
4426
4589
  }
4427
4590
  ],
4428
4591
  "examples": [
4592
+ "<schmancy-navigation-rail activeIndex=\"0\">\r\n <schmancy-icon-button slot=\"fab\" variant=\"filled\">\r\n <schmancy-icon>add</schmancy-icon>\r\n </schmancy-icon-button>\r\n <schmancy-navigation-rail-item icon=\"home\" label=\"Home\"></schmancy-navigation-rail-item>\r\n <schmancy-navigation-rail-item icon=\"search\" label=\"Search\"></schmancy-navigation-rail-item>\r\n <schmancy-navigation-rail-item icon=\"settings\" label=\"Settings\"></schmancy-navigation-rail-item>\r\n</schmancy-navigation-rail>\r\n@platform nav - Vertical styled nav. Degrades to a plain vertical flex container if the tag never registers.\r\n@slot fab - Slot for a floating action button at the top\r\n@slot menu - Slot for a menu icon or button below the FAB\r\n@slot header - Custom header content slot\r\n@slot footer - Custom footer content slot\r\n@slot - Default slot for navigation rail items\r\n\n@fires navigate - When a navigation item is selected\r\n@fires menu-click - When the menu button is clicked\r\n@fires fab-click - When the FAB is clicked\r\n\n@csspart rail - The main rail container\r\n@csspart header - The header section\r\n@csspart nav - The navigation items container\r\n@csspart footer - The footer section",
4429
4593
  "<schmancy-navigation-rail activeIndex=\"0\">\r\n <schmancy-button slot=\"fab\" variant=\"filled\" aria-label=\"Compose\">\r\n <schmancy-icon>add</schmancy-icon>\r\n </schmancy-button>\r\n <schmancy-button slot=\"menu\" variant=\"text\" aria-label=\"Menu\">\r\n <schmancy-icon>menu</schmancy-icon>\r\n </schmancy-button>\r\n <schmancy-navigation-rail-item icon=\"home\" label=\"Home\"></schmancy-navigation-rail-item>\r\n <schmancy-navigation-rail-item icon=\"search\" label=\"Search\"></schmancy-navigation-rail-item>\r\n <schmancy-navigation-rail-item icon=\"favorite\" label=\"Favorites\" badge=\"3\"></schmancy-navigation-rail-item>\r\n <schmancy-navigation-rail-item icon=\"settings\" label=\"Settings\"></schmancy-navigation-rail-item>\r\n</schmancy-navigation-rail>"
4430
4594
  ]
4431
4595
  }
@@ -5220,6 +5384,13 @@
5220
5384
  "kind": "class",
5221
5385
  "name": "SchmancySheet",
5222
5386
  "tagName": "schmancy-sheet",
5387
+ "description": "Side-docked or bottom-docked panel — a dialog variant that slides in from an edge. Driven imperatively by the `sheet` service; rarely instantiated directly.",
5388
+ "summary": "Prefer `sheet.open({ component, position })` over placing this element declaratively — the service handles stacking, focus, close on outside-click, ESC, and router integration.",
5389
+ "platformPrimitive": {
5390
+ "tag": "dialog",
5391
+ "mode": "close",
5392
+ "note": "Positioned-fixed panel with backdrop. Degrades to a `<dialog>` if the tag never registers — loses slide animation, keeps focus trap + dismiss."
5393
+ },
5223
5394
  "attributes": [
5224
5395
  {
5225
5396
  "name": "open",
@@ -5260,6 +5431,15 @@
5260
5431
  },
5261
5432
  "default": "true"
5262
5433
  }
5434
+ ],
5435
+ "events": [
5436
+ {
5437
+ "name": "close",
5438
+ "description": "When the sheet is dismissed (backdrop click, close button, ESC)."
5439
+ }
5440
+ ],
5441
+ "examples": [
5442
+ "import { sheet, SchmancySheetPosition } from '@mhmo91/schmancy'\nsheet.open({\n component: new MyEditorElement(),\n position: SchmancySheetPosition.Side,\n title: 'Edit item',\n})"
5263
5443
  ]
5264
5444
  }
5265
5445
  ]
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb.cjs","names":[],"sources":["../src/breadcrumb/breadcrumb.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * Breadcrumb navigation container. Wraps a list of `schmancy-breadcrumb-item`\n * elements with the correct ARIA landmark and semantics.\n *\n * @element schmancy-breadcrumb\n * @slot - Default slot for `<schmancy-breadcrumb-item>` children.\n * @attr separator - Character or string rendered between items. Default `/`.\n * @csspart separator - The separator element.\n */\n@customElement('schmancy-breadcrumb')\nexport class SchmancyBreadcrumb extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n\tnav {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\talign-items: center;\n\t\tgap: 0.25rem;\n\t}\n\t.sep {\n\t\tcolor: var(--schmancy-sys-color-surface-onVariant, #79747e);\n\t\tuser-select: none;\n\t\tpadding: 0 0.25rem;\n\t}\n\t::slotted(schmancy-breadcrumb-item:last-of-type) {\n\t\tfont-weight: 500;\n\t}\n`) {\n\t@property({ type: String }) separator = '/'\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tif (!this.hasAttribute('aria-label')) this.setAttribute('aria-label', 'Breadcrumb')\n\t}\n\n\trender() {\n\t\t// Render separators between slotted items by manipulating after render.\n\t\t// The simpler approach uses the CSS adjacent-sibling pattern so the\n\t\t// separator is visually present without affecting the accessible name.\n\t\treturn html`\n\t\t\t<nav role=\"navigation\">\n\t\t\t\t<slot @slotchange=${() => this._insertSeparators()}></slot>\n\t\t\t</nav>\n\t\t`\n\t}\n\n\tprivate _insertSeparators() {\n\t\tconst slot = this.shadowRoot?.querySelector('slot') as HTMLSlotElement | null\n\t\tif (!slot) return\n\t\tconst items = slot.assignedElements({ flatten: true })\n\t\t// Remove any previously-inserted separators.\n\t\tthis.querySelectorAll('[data-schmancy-sep]').forEach(el => el.remove())\n\t\titems.forEach((el, idx) => {\n\t\t\tif (idx === items.length - 1) return\n\t\t\tconst sep = document.createElement('span')\n\t\t\tsep.setAttribute('data-schmancy-sep', '')\n\t\t\tsep.setAttribute('aria-hidden', 'true')\n\t\t\tsep.setAttribute('part', 'separator')\n\t\t\tsep.className = 'sep'\n\t\t\tsep.textContent = this.separator\n\t\t\tel.insertAdjacentElement('afterend', sep)\n\t\t})\n\t}\n}\n\n/**\n * Individual breadcrumb item. Renders as a link when `href` is provided,\n * otherwise as a plain span (represents the current page).\n *\n * @element schmancy-breadcrumb-item\n * @slot - Label content.\n * @attr href - If set, renders as an anchor.\n * @attr current - Marks as `aria-current=\"page\"`.\n */\n@customElement('schmancy-breadcrumb-item')\nexport class SchmancyBreadcrumbItem extends TailwindElement(css`\n\t:host {\n\t\tdisplay: inline-block;\n\t}\n\ta, span {\n\t\tcolor: inherit;\n\t\ttext-decoration: none;\n\t}\n\ta:hover {\n\t\ttext-decoration: underline;\n\t}\n`) {\n\t@property({ type: String }) href = ''\n\t@property({ type: Boolean, reflect: true }) current = false\n\n\trender() {\n\t\tif (this.href && !this.current) {\n\t\t\treturn html`<a href=${this.href}><slot></slot></a>`\n\t\t}\n\t\treturn html`<span aria-current=${this.current ? 'page' : 'false'}><slot></slot></span>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-breadcrumb': SchmancyBreadcrumb\n\t\t'schmancy-breadcrumb-item': SchmancyBreadcrumbItem\n\t}\n}\n"],"mappings":"qQAcO,IAAA,EAAA,cAAiC,EAAA,EAAgB,EAAA,GAAG;;;;;;;;;;;;;;;;;;gDAmBlB,IAExC,mBAAA,CACC,MAAM,mBAAA,CACD,KAAK,aAAa,aAAA,EAAe,KAAK,aAAa,aAAc,aAAA,CAGvE,QAAA,CAIC,MAAO,GAAA,IAAI;;4BAEiB,KAAK,mBAAA,CAAA;;IAKlC,mBAAA,CACC,IAAM,EAAO,KAAK,YAAY,cAAc,OAAA,CAC5C,GAAA,CAAK,EAAM,OACX,IAAM,EAAQ,EAAK,iBAAiB,CAAE,QAAA,CAAS,EAAA,CAAA,CAE/C,KAAK,iBAAiB,sBAAA,CAAuB,QAAQ,GAAM,EAAG,QAAA,CAAA,CAC9D,EAAM,SAAS,EAAI,IAAA,CAClB,GAAI,IAAQ,EAAM,OAAS,EAAG,OAC9B,IAAM,EAAM,SAAS,cAAc,OAAA,CACnC,EAAI,aAAa,oBAAqB,GAAA,CACtC,EAAI,aAAa,cAAe,OAAA,CAChC,EAAI,aAAa,OAAQ,YAAA,CACzB,EAAI,UAAY,MAChB,EAAI,YAAc,KAAK,UACvB,EAAG,sBAAsB,WAAY,EAAA,EAAA,GAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAhC7B,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,YAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eApBb,sBAAA,CAAA,CAAsB,EAAA,CAmE9B,IAAA,EAAA,cAAqC,EAAA,EAAgB,EAAA,GAAG;;;;;;;;;;;2CAY3B,GAAA,KAAA,QAAA,CACmB,EAEtD,QAAA,CACC,OAAI,KAAK,MAAA,CAAS,KAAK,QACf,EAAA,IAAI,WAAW,KAAK,KAAA,oBAErB,EAAA,IAAI,sBAAsB,KAAK,QAAU,OAAS,QAAA,yBAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAPhD,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,OAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UACjB,CAAE,KAAM,QAAS,QAAA,CAAS,EAAA,CAAA,CAAA,CAAO,EAAA,UAAA,UAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eAd7B,2BAAA,CAAA,CAA2B,EAAA,CAAA,OAAA,eAAA,QAAA,qBAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA,CAAA,OAAA,eAAA,QAAA,yBAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"breadcrumb.cjs","names":[],"sources":["../src/breadcrumb/breadcrumb.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * Breadcrumb trail — navigation history from root to current page. Renders schmancy-breadcrumb-item children with separators between.\n *\n * @element schmancy-breadcrumb\n * @summary Use for deep hierarchical navigation (file explorer paths, e-commerce category chains, admin settings trees). Last item is styled as the current page automatically.\n * @example\n * <schmancy-breadcrumb separator=\"›\">\n * <schmancy-breadcrumb-item href=\"/\">Home</schmancy-breadcrumb-item>\n * <schmancy-breadcrumb-item href=\"/docs\">Docs</schmancy-breadcrumb-item>\n * <schmancy-breadcrumb-item>Getting started</schmancy-breadcrumb-item>\n * </schmancy-breadcrumb>\n * @platform nav - Styled `<nav aria-label=\"Breadcrumb\">`. Degrades to a plain nav if the tag never registers.\n * @slot - Default slot for `<schmancy-breadcrumb-item>` children.\n * @attr separator - Character or string rendered between items. Default `/`.\n * @csspart separator - The separator element.\n */\n@customElement('schmancy-breadcrumb')\nexport class SchmancyBreadcrumb extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n\tnav {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\talign-items: center;\n\t\tgap: 0.25rem;\n\t}\n\t.sep {\n\t\tcolor: var(--schmancy-sys-color-surface-onVariant, #79747e);\n\t\tuser-select: none;\n\t\tpadding: 0 0.25rem;\n\t}\n\t::slotted(schmancy-breadcrumb-item:last-of-type) {\n\t\tfont-weight: 500;\n\t}\n`) {\n\t@property({ type: String }) separator = '/'\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tif (!this.hasAttribute('aria-label')) this.setAttribute('aria-label', 'Breadcrumb')\n\t}\n\n\trender() {\n\t\t// Render separators between slotted items by manipulating after render.\n\t\t// The simpler approach uses the CSS adjacent-sibling pattern so the\n\t\t// separator is visually present without affecting the accessible name.\n\t\treturn html`\n\t\t\t<nav role=\"navigation\">\n\t\t\t\t<slot @slotchange=${() => this._insertSeparators()}></slot>\n\t\t\t</nav>\n\t\t`\n\t}\n\n\tprivate _insertSeparators() {\n\t\tconst slot = this.shadowRoot?.querySelector('slot') as HTMLSlotElement | null\n\t\tif (!slot) return\n\t\tconst items = slot.assignedElements({ flatten: true })\n\t\t// Remove any previously-inserted separators.\n\t\tthis.querySelectorAll('[data-schmancy-sep]').forEach(el => el.remove())\n\t\titems.forEach((el, idx) => {\n\t\t\tif (idx === items.length - 1) return\n\t\t\tconst sep = document.createElement('span')\n\t\t\tsep.setAttribute('data-schmancy-sep', '')\n\t\t\tsep.setAttribute('aria-hidden', 'true')\n\t\t\tsep.setAttribute('part', 'separator')\n\t\t\tsep.className = 'sep'\n\t\t\tsep.textContent = this.separator\n\t\t\tel.insertAdjacentElement('afterend', sep)\n\t\t})\n\t}\n}\n\n/**\n * Single segment in a schmancy-breadcrumb trail a link when `href` is set, or a plain span (the current page) when omitted.\n *\n * @element schmancy-breadcrumb-item\n * @summary Always nested inside schmancy-breadcrumb. Omit `href` on the current page — it gets aria-current=\"page\" automatically.\n * @example\n * <schmancy-breadcrumb-item href=\"/products\">Products</schmancy-breadcrumb-item>\n * @platform a - Renders an `<a>` or `<span>` depending on href. Degrades to a plain anchor/span if the tag never registers.\n * @slot - Label content.\n * @attr href - If set, renders as an anchor.\n * @attr current - Marks as `aria-current=\"page\"`.\n */\n@customElement('schmancy-breadcrumb-item')\nexport class SchmancyBreadcrumbItem extends TailwindElement(css`\n\t:host {\n\t\tdisplay: inline-block;\n\t}\n\ta, span {\n\t\tcolor: inherit;\n\t\ttext-decoration: none;\n\t}\n\ta:hover {\n\t\ttext-decoration: underline;\n\t}\n`) {\n\t@property({ type: String }) href = ''\n\t@property({ type: Boolean, reflect: true }) current = false\n\n\trender() {\n\t\tif (this.href && !this.current) {\n\t\t\treturn html`<a href=${this.href}><slot></slot></a>`\n\t\t}\n\t\treturn html`<span aria-current=${this.current ? 'page' : 'false'}><slot></slot></span>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-breadcrumb': SchmancyBreadcrumb\n\t\t'schmancy-breadcrumb-item': SchmancyBreadcrumbItem\n\t}\n}\n"],"mappings":"qQAqBO,IAAA,EAAA,cAAiC,EAAA,EAAgB,EAAA,GAAG;;;;;;;;;;;;;;;;;;gDAmBlB,IAExC,mBAAA,CACC,MAAM,mBAAA,CACD,KAAK,aAAa,aAAA,EAAe,KAAK,aAAa,aAAc,aAAA,CAGvE,QAAA,CAIC,MAAO,GAAA,IAAI;;4BAEiB,KAAK,mBAAA,CAAA;;IAKlC,mBAAA,CACC,IAAM,EAAO,KAAK,YAAY,cAAc,OAAA,CAC5C,GAAA,CAAK,EAAM,OACX,IAAM,EAAQ,EAAK,iBAAiB,CAAE,QAAA,CAAS,EAAA,CAAA,CAE/C,KAAK,iBAAiB,sBAAA,CAAuB,QAAQ,GAAM,EAAG,QAAA,CAAA,CAC9D,EAAM,SAAS,EAAI,IAAA,CAClB,GAAI,IAAQ,EAAM,OAAS,EAAG,OAC9B,IAAM,EAAM,SAAS,cAAc,OAAA,CACnC,EAAI,aAAa,oBAAqB,GAAA,CACtC,EAAI,aAAa,cAAe,OAAA,CAChC,EAAI,aAAa,OAAQ,YAAA,CACzB,EAAI,UAAY,MAChB,EAAI,YAAc,KAAK,UACvB,EAAG,sBAAsB,WAAY,EAAA,EAAA,GAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAhC7B,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,YAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eApBb,sBAAA,CAAA,CAAsB,EAAA,CAsE9B,IAAA,EAAA,cAAqC,EAAA,EAAgB,EAAA,GAAG;;;;;;;;;;;2CAY3B,GAAA,KAAA,QAAA,CACmB,EAEtD,QAAA,CACC,OAAI,KAAK,MAAA,CAAS,KAAK,QACf,EAAA,IAAI,WAAW,KAAK,KAAA,oBAErB,EAAA,IAAI,sBAAsB,KAAK,QAAU,OAAS,QAAA,yBAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAPhD,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,OAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UACjB,CAAE,KAAM,QAAS,QAAA,CAAS,EAAA,CAAA,CAAA,CAAO,EAAA,UAAA,UAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eAd7B,2BAAA,CAAA,CAA2B,EAAA,CAAA,OAAA,eAAA,QAAA,qBAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA,CAAA,OAAA,eAAA,QAAA,yBAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,GAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb.js","names":[],"sources":["../src/breadcrumb/breadcrumb.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * Breadcrumb navigation container. Wraps a list of `schmancy-breadcrumb-item`\n * elements with the correct ARIA landmark and semantics.\n *\n * @element schmancy-breadcrumb\n * @slot - Default slot for `<schmancy-breadcrumb-item>` children.\n * @attr separator - Character or string rendered between items. Default `/`.\n * @csspart separator - The separator element.\n */\n@customElement('schmancy-breadcrumb')\nexport class SchmancyBreadcrumb extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n\tnav {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\talign-items: center;\n\t\tgap: 0.25rem;\n\t}\n\t.sep {\n\t\tcolor: var(--schmancy-sys-color-surface-onVariant, #79747e);\n\t\tuser-select: none;\n\t\tpadding: 0 0.25rem;\n\t}\n\t::slotted(schmancy-breadcrumb-item:last-of-type) {\n\t\tfont-weight: 500;\n\t}\n`) {\n\t@property({ type: String }) separator = '/'\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tif (!this.hasAttribute('aria-label')) this.setAttribute('aria-label', 'Breadcrumb')\n\t}\n\n\trender() {\n\t\t// Render separators between slotted items by manipulating after render.\n\t\t// The simpler approach uses the CSS adjacent-sibling pattern so the\n\t\t// separator is visually present without affecting the accessible name.\n\t\treturn html`\n\t\t\t<nav role=\"navigation\">\n\t\t\t\t<slot @slotchange=${() => this._insertSeparators()}></slot>\n\t\t\t</nav>\n\t\t`\n\t}\n\n\tprivate _insertSeparators() {\n\t\tconst slot = this.shadowRoot?.querySelector('slot') as HTMLSlotElement | null\n\t\tif (!slot) return\n\t\tconst items = slot.assignedElements({ flatten: true })\n\t\t// Remove any previously-inserted separators.\n\t\tthis.querySelectorAll('[data-schmancy-sep]').forEach(el => el.remove())\n\t\titems.forEach((el, idx) => {\n\t\t\tif (idx === items.length - 1) return\n\t\t\tconst sep = document.createElement('span')\n\t\t\tsep.setAttribute('data-schmancy-sep', '')\n\t\t\tsep.setAttribute('aria-hidden', 'true')\n\t\t\tsep.setAttribute('part', 'separator')\n\t\t\tsep.className = 'sep'\n\t\t\tsep.textContent = this.separator\n\t\t\tel.insertAdjacentElement('afterend', sep)\n\t\t})\n\t}\n}\n\n/**\n * Individual breadcrumb item. Renders as a link when `href` is provided,\n * otherwise as a plain span (represents the current page).\n *\n * @element schmancy-breadcrumb-item\n * @slot - Label content.\n * @attr href - If set, renders as an anchor.\n * @attr current - Marks as `aria-current=\"page\"`.\n */\n@customElement('schmancy-breadcrumb-item')\nexport class SchmancyBreadcrumbItem extends TailwindElement(css`\n\t:host {\n\t\tdisplay: inline-block;\n\t}\n\ta, span {\n\t\tcolor: inherit;\n\t\ttext-decoration: none;\n\t}\n\ta:hover {\n\t\ttext-decoration: underline;\n\t}\n`) {\n\t@property({ type: String }) href = ''\n\t@property({ type: Boolean, reflect: true }) current = false\n\n\trender() {\n\t\tif (this.href && !this.current) {\n\t\t\treturn html`<a href=${this.href}><slot></slot></a>`\n\t\t}\n\t\treturn html`<span aria-current=${this.current ? 'page' : 'false'}><slot></slot></span>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-breadcrumb': SchmancyBreadcrumb\n\t\t'schmancy-breadcrumb-item': SchmancyBreadcrumbItem\n\t}\n}\n"],"mappings":";;;;;AAcO,IAAA,IAAA,cAAiC,EAAgB,CAAG;;;;;;;;;;;;;;;;;;;;gCAmBlB;;CAExC,oBAAA;AACC,QAAM,mBAAA,EACD,KAAK,aAAa,aAAA,IAAe,KAAK,aAAa,cAAc,aAAA;;CAGvE,SAAA;AAIC,SAAO,CAAI;;8BAEiB,KAAK,mBAAA,CAAA;;;;CAKlC,oBAAA;EACC,IAAM,IAAO,KAAK,YAAY,cAAc,OAAA;AAC5C,MAAA,CAAK,EAAM;EACX,IAAM,IAAQ,EAAK,iBAAiB,EAAE,SAAA,CAAS,GAAA,CAAA;AAE/C,OAAK,iBAAiB,sBAAA,CAAuB,SAAQ,MAAM,EAAG,QAAA,CAAA,EAC9D,EAAM,SAAS,GAAI,MAAA;AAClB,OAAI,MAAQ,EAAM,SAAS,EAAG;GAC9B,IAAM,IAAM,SAAS,cAAc,OAAA;AACnC,KAAI,aAAa,qBAAqB,GAAA,EACtC,EAAI,aAAa,eAAe,OAAA,EAChC,EAAI,aAAa,QAAQ,YAAA,EACzB,EAAI,YAAY,OAChB,EAAI,cAAc,KAAK,WACvB,EAAG,sBAAsB,YAAY,EAAA;IAAA;;;AAAA,EAAA,CAhCtC,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,aAAA,KAAA,EAAA,EAAA,IAAA,EAAA,CApB3B,EAAc,sBAAA,CAAA,EAAsB,EAAA;AAmE9B,IAAA,IAAA,cAAqC,EAAgB,CAAG;;;;;;;;;;;;;2BAY3B,IAAA,KAAA,UAAA,CACmB;;CAEtD,SAAA;AACC,SAAI,KAAK,QAAA,CAAS,KAAK,UACf,CAAI,WAAW,KAAK,KAAA,sBAErB,CAAI,sBAAsB,KAAK,UAAU,SAAS,QAAA;;;AAAA,EAAA,CAPzD,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,QAAA,KAAA,EAAA,EAAA,EAAA,CAC1B,EAAS;CAAE,MAAM;CAAS,SAAA,CAAS;CAAA,CAAA,CAAA,EAAO,EAAA,WAAA,WAAA,KAAA,EAAA,EAAA,IAAA,EAAA,CAd3C,EAAc,2BAAA,CAAA,EAA2B,EAAA;AAAA,SAAA,KAAA,oBAAA,KAAA"}
1
+ {"version":3,"file":"breadcrumb.js","names":[],"sources":["../src/breadcrumb/breadcrumb.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * Breadcrumb trail — navigation history from root to current page. Renders schmancy-breadcrumb-item children with separators between.\n *\n * @element schmancy-breadcrumb\n * @summary Use for deep hierarchical navigation (file explorer paths, e-commerce category chains, admin settings trees). Last item is styled as the current page automatically.\n * @example\n * <schmancy-breadcrumb separator=\"›\">\n * <schmancy-breadcrumb-item href=\"/\">Home</schmancy-breadcrumb-item>\n * <schmancy-breadcrumb-item href=\"/docs\">Docs</schmancy-breadcrumb-item>\n * <schmancy-breadcrumb-item>Getting started</schmancy-breadcrumb-item>\n * </schmancy-breadcrumb>\n * @platform nav - Styled `<nav aria-label=\"Breadcrumb\">`. Degrades to a plain nav if the tag never registers.\n * @slot - Default slot for `<schmancy-breadcrumb-item>` children.\n * @attr separator - Character or string rendered between items. Default `/`.\n * @csspart separator - The separator element.\n */\n@customElement('schmancy-breadcrumb')\nexport class SchmancyBreadcrumb extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n\tnav {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\talign-items: center;\n\t\tgap: 0.25rem;\n\t}\n\t.sep {\n\t\tcolor: var(--schmancy-sys-color-surface-onVariant, #79747e);\n\t\tuser-select: none;\n\t\tpadding: 0 0.25rem;\n\t}\n\t::slotted(schmancy-breadcrumb-item:last-of-type) {\n\t\tfont-weight: 500;\n\t}\n`) {\n\t@property({ type: String }) separator = '/'\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tif (!this.hasAttribute('aria-label')) this.setAttribute('aria-label', 'Breadcrumb')\n\t}\n\n\trender() {\n\t\t// Render separators between slotted items by manipulating after render.\n\t\t// The simpler approach uses the CSS adjacent-sibling pattern so the\n\t\t// separator is visually present without affecting the accessible name.\n\t\treturn html`\n\t\t\t<nav role=\"navigation\">\n\t\t\t\t<slot @slotchange=${() => this._insertSeparators()}></slot>\n\t\t\t</nav>\n\t\t`\n\t}\n\n\tprivate _insertSeparators() {\n\t\tconst slot = this.shadowRoot?.querySelector('slot') as HTMLSlotElement | null\n\t\tif (!slot) return\n\t\tconst items = slot.assignedElements({ flatten: true })\n\t\t// Remove any previously-inserted separators.\n\t\tthis.querySelectorAll('[data-schmancy-sep]').forEach(el => el.remove())\n\t\titems.forEach((el, idx) => {\n\t\t\tif (idx === items.length - 1) return\n\t\t\tconst sep = document.createElement('span')\n\t\t\tsep.setAttribute('data-schmancy-sep', '')\n\t\t\tsep.setAttribute('aria-hidden', 'true')\n\t\t\tsep.setAttribute('part', 'separator')\n\t\t\tsep.className = 'sep'\n\t\t\tsep.textContent = this.separator\n\t\t\tel.insertAdjacentElement('afterend', sep)\n\t\t})\n\t}\n}\n\n/**\n * Single segment in a schmancy-breadcrumb trail a link when `href` is set, or a plain span (the current page) when omitted.\n *\n * @element schmancy-breadcrumb-item\n * @summary Always nested inside schmancy-breadcrumb. Omit `href` on the current page — it gets aria-current=\"page\" automatically.\n * @example\n * <schmancy-breadcrumb-item href=\"/products\">Products</schmancy-breadcrumb-item>\n * @platform a - Renders an `<a>` or `<span>` depending on href. Degrades to a plain anchor/span if the tag never registers.\n * @slot - Label content.\n * @attr href - If set, renders as an anchor.\n * @attr current - Marks as `aria-current=\"page\"`.\n */\n@customElement('schmancy-breadcrumb-item')\nexport class SchmancyBreadcrumbItem extends TailwindElement(css`\n\t:host {\n\t\tdisplay: inline-block;\n\t}\n\ta, span {\n\t\tcolor: inherit;\n\t\ttext-decoration: none;\n\t}\n\ta:hover {\n\t\ttext-decoration: underline;\n\t}\n`) {\n\t@property({ type: String }) href = ''\n\t@property({ type: Boolean, reflect: true }) current = false\n\n\trender() {\n\t\tif (this.href && !this.current) {\n\t\t\treturn html`<a href=${this.href}><slot></slot></a>`\n\t\t}\n\t\treturn html`<span aria-current=${this.current ? 'page' : 'false'}><slot></slot></span>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-breadcrumb': SchmancyBreadcrumb\n\t\t'schmancy-breadcrumb-item': SchmancyBreadcrumbItem\n\t}\n}\n"],"mappings":";;;;;AAqBO,IAAA,IAAA,cAAiC,EAAgB,CAAG;;;;;;;;;;;;;;;;;;;;gCAmBlB;;CAExC,oBAAA;AACC,QAAM,mBAAA,EACD,KAAK,aAAa,aAAA,IAAe,KAAK,aAAa,cAAc,aAAA;;CAGvE,SAAA;AAIC,SAAO,CAAI;;8BAEiB,KAAK,mBAAA,CAAA;;;;CAKlC,oBAAA;EACC,IAAM,IAAO,KAAK,YAAY,cAAc,OAAA;AAC5C,MAAA,CAAK,EAAM;EACX,IAAM,IAAQ,EAAK,iBAAiB,EAAE,SAAA,CAAS,GAAA,CAAA;AAE/C,OAAK,iBAAiB,sBAAA,CAAuB,SAAQ,MAAM,EAAG,QAAA,CAAA,EAC9D,EAAM,SAAS,GAAI,MAAA;AAClB,OAAI,MAAQ,EAAM,SAAS,EAAG;GAC9B,IAAM,IAAM,SAAS,cAAc,OAAA;AACnC,KAAI,aAAa,qBAAqB,GAAA,EACtC,EAAI,aAAa,eAAe,OAAA,EAChC,EAAI,aAAa,QAAQ,YAAA,EACzB,EAAI,YAAY,OAChB,EAAI,cAAc,KAAK,WACvB,EAAG,sBAAsB,YAAY,EAAA;IAAA;;;AAAA,EAAA,CAhCtC,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,aAAA,KAAA,EAAA,EAAA,IAAA,EAAA,CApB3B,EAAc,sBAAA,CAAA,EAAsB,EAAA;AAsE9B,IAAA,IAAA,cAAqC,EAAgB,CAAG;;;;;;;;;;;;;2BAY3B,IAAA,KAAA,UAAA,CACmB;;CAEtD,SAAA;AACC,SAAI,KAAK,QAAA,CAAS,KAAK,UACf,CAAI,WAAW,KAAK,KAAA,sBAErB,CAAI,sBAAsB,KAAK,UAAU,SAAS,QAAA;;;AAAA,EAAA,CAPzD,EAAS,EAAE,MAAM,QAAA,CAAA,CAAA,EAAS,EAAA,WAAA,QAAA,KAAA,EAAA,EAAA,EAAA,CAC1B,EAAS;CAAE,MAAM;CAAS,SAAA,CAAS;CAAA,CAAA,CAAA,EAAO,EAAA,WAAA,WAAA,KAAA,EAAA,EAAA,IAAA,EAAA,CAd3C,EAAc,2BAAA,CAAA,EAA2B,EAAA;AAAA,SAAA,KAAA,oBAAA,KAAA"}