@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.
- package/custom-elements.json +85 -46
- package/dist/agent/schmancy.agent.js +169 -23
- package/dist/agent/schmancy.agent.js.map +1 -1
- package/dist/agent/schmancy.manifest.json +198 -18
- package/dist/breadcrumb.cjs.map +1 -1
- package/dist/breadcrumb.js.map +1 -1
- package/dist/dialog.cjs.map +1 -1
- package/dist/dialog.js.map +1 -1
- package/dist/dropdown.cjs.map +1 -1
- package/dist/dropdown.js.map +1 -1
- package/dist/handover/agent-runtime-followups.md +1 -1
- package/dist/handover/agent-runtime-v1.md +3 -3
- package/dist/list-BpjKUOzM.js.map +1 -1
- package/dist/list-CMWHu6cV.cjs.map +1 -1
- package/dist/menu-BIBUgS1T.js.map +1 -1
- package/dist/menu-DS8Iz4fJ.cjs.map +1 -1
- package/dist/navigation-rail.cjs.map +1 -1
- package/dist/navigation-rail.js.map +1 -1
- package/dist/sheet-DdlZhnDG.cjs.map +1 -1
- package/dist/sheet-LFVo5iN4.js.map +1 -1
- package/dist/src-C7niWYur.js.map +1 -1
- package/dist/src-I4M33WK2.cjs.map +1 -1
- package/package.json +1 -1
- package/src/breadcrumb/breadcrumb.ts +14 -4
- package/src/dialog/dialog.component.ts +9 -9
- package/src/dropdown/dropdown-component.ts +13 -1
- package/src/dropdown/dropdown-content.ts +11 -3
- package/src/list/list-item.ts +10 -0
- package/src/list/list.ts +7 -8
- package/src/menu/menu-item.ts +13 -0
- package/src/menu/menu.ts +10 -22
- package/src/nav-drawer/appbar.ts +11 -0
- package/src/nav-drawer/content.ts +11 -0
- package/src/nav-drawer/drawer.ts +15 -0
- package/src/nav-drawer/navbar.ts +14 -0
- package/src/navigation-bar/navigation-bar-item.ts +3 -4
- package/src/navigation-bar/navigation-bar.ts +3 -9
- package/src/navigation-rail/navigation-rail-item.ts +3 -7
- package/src/navigation-rail/navigation-rail.ts +12 -8
- package/src/sheet/sheet.ts +17 -0
- package/types/src/breadcrumb/breadcrumb.d.ts +14 -4
- package/types/src/dialog/dialog.component.d.ts +9 -9
- package/types/src/dropdown/dropdown-component.d.ts +13 -1
- package/types/src/dropdown/dropdown-content.d.ts +11 -3
- package/types/src/list/list-item.d.ts +10 -0
- package/types/src/list/list.d.ts +7 -8
- package/types/src/menu/menu-item.d.ts +13 -0
- package/types/src/menu/menu.d.ts +10 -22
- package/types/src/nav-drawer/appbar.d.ts +11 -0
- package/types/src/nav-drawer/content.d.ts +11 -0
- package/types/src/nav-drawer/drawer.d.ts +15 -0
- package/types/src/nav-drawer/navbar.d.ts +14 -0
- package/types/src/navigation-bar/navigation-bar-item.d.ts +3 -4
- package/types/src/navigation-bar/navigation-bar.d.ts +3 -9
- package/types/src/navigation-rail/navigation-rail-item.d.ts +3 -7
- package/types/src/navigation-rail/navigation-rail.d.ts +12 -8
- package/types/src/sheet/sheet.d.ts +17 -0
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
declare const SchmancyMenuItem_base: CustomElementConstructor & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
|
|
2
|
+
/**
|
|
3
|
+
* Single item inside a schmancy-menu. Auto-dismisses the menu dialog on click — attach your action handler to `@click` and it just works.
|
|
4
|
+
*
|
|
5
|
+
* @element schmancy-menu-item
|
|
6
|
+
* @summary Always nested inside schmancy-menu. The click handler runs before the dialog closes, so `@click=${() => doThing()}` is the full pattern.
|
|
7
|
+
* @example
|
|
8
|
+
* <schmancy-menu-item @click=${() => archive()}>
|
|
9
|
+
* <schmancy-icon slot="leading">archive</schmancy-icon>
|
|
10
|
+
* Archive
|
|
11
|
+
* </schmancy-menu-item>
|
|
12
|
+
* @platform menuitem click - Wraps schmancy-list-item with auto-dismiss. Degrades to a styled `<button role="menuitem">` if the tag never registers.
|
|
13
|
+
* @slot - The item label and optional icons.
|
|
14
|
+
*/
|
|
2
15
|
export default class SchmancyMenuItem extends SchmancyMenuItem_base {
|
|
3
16
|
protected render(): unknown;
|
|
4
17
|
}
|
package/types/src/menu/menu.d.ts
CHANGED
|
@@ -1,30 +1,18 @@
|
|
|
1
1
|
declare const SchmancyMenu_base: CustomElementConstructor & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Floating menu — a trigger button + a list of schmancy-menu-item children that open as a positioned dialog on click.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* @example Basic menu with auto-dismiss
|
|
10
|
-
* ```typescript
|
|
5
|
+
* @element schmancy-menu
|
|
6
|
+
* @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.
|
|
7
|
+
* @example
|
|
11
8
|
* <schmancy-menu>
|
|
12
|
-
* <schmancy-button slot="trigger"
|
|
13
|
-
*
|
|
14
|
-
*
|
|
9
|
+
* <schmancy-icon-button slot="trigger" aria-label="Actions">
|
|
10
|
+
* <schmancy-icon>more_vert</schmancy-icon>
|
|
11
|
+
* </schmancy-icon-button>
|
|
12
|
+
* <schmancy-menu-item @click=${() => edit()}>Edit</schmancy-menu-item>
|
|
13
|
+
* <schmancy-menu-item @click=${() => remove()}>Delete</schmancy-menu-item>
|
|
15
14
|
* </schmancy-menu>
|
|
16
|
-
*
|
|
17
|
-
* Note: Dialog auto-dismisses when schmancy-menu-item is clicked
|
|
18
|
-
*
|
|
19
|
-
* @example Custom component (manual dismiss)
|
|
20
|
-
* ```typescript
|
|
21
|
-
* <schmancy-menu>
|
|
22
|
-
* <schmancy-icon-button slot="trigger">settings</schmancy-icon-button>
|
|
23
|
-
* <my-settings-form @submit=${() => $dialog.dismiss()}></my-settings-form>
|
|
24
|
-
* </schmancy-menu>
|
|
25
|
-
* ```
|
|
26
|
-
* Note: Custom components must call $dialog.dismiss() manually
|
|
27
|
-
*
|
|
15
|
+
* @platform menu close - Trigger + floating listbox dialog. Degrades to a native `<select>` or inline list if the tag never registers.
|
|
28
16
|
* @slot trigger - Button to open menu (new naming)
|
|
29
17
|
* @slot button - Button to open menu (backward compatible)
|
|
30
18
|
* @slot default - Menu items or any custom component to display in dialog
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
declare const SchmancyDrawerAppbar_base: import("@mixins/index").Constructor<CustomElementConstructor> & import("@mixins/index").Constructor<import("@mixins/index").ITailwindElementMixin> & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
|
|
2
2
|
/**
|
|
3
|
+
* 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.
|
|
4
|
+
*
|
|
3
5
|
* @element schmancy-nav-drawer-appbar
|
|
6
|
+
* @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.
|
|
7
|
+
* @example
|
|
8
|
+
* <schmancy-nav-drawer-appbar>
|
|
9
|
+
* <schmancy-typography type="title" token="lg">Dashboard</schmancy-typography>
|
|
10
|
+
* <schmancy-icon-button slot="trailing" aria-label="Notifications">
|
|
11
|
+
* <schmancy-icon>notifications</schmancy-icon>
|
|
12
|
+
* </schmancy-icon-button>
|
|
13
|
+
* </schmancy-nav-drawer-appbar>
|
|
14
|
+
* @platform header - Styled horizontal bar. Degrades to a plain header element if the tag never registers.
|
|
4
15
|
* @slot - The default slot
|
|
5
16
|
*/
|
|
6
17
|
export declare class SchmancyDrawerAppbar extends SchmancyDrawerAppbar_base {
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
declare const SchmancyNavigationDrawerContent_base: CustomElementConstructor & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
|
|
2
|
+
/**
|
|
3
|
+
* Main content region inside schmancy-nav-drawer — typically hosts the router outlet or the page's body content.
|
|
4
|
+
*
|
|
5
|
+
* @element schmancy-nav-drawer-content
|
|
6
|
+
* @summary Always nested inside schmancy-nav-drawer. Scrollable by default; propagates scroll events up so the drawer can collapse app-bar on scroll.
|
|
7
|
+
* @example
|
|
8
|
+
* <schmancy-nav-drawer-content>
|
|
9
|
+
* <schmancy-area name="main"></schmancy-area>
|
|
10
|
+
* </schmancy-nav-drawer-content>
|
|
11
|
+
* @platform main scroll - Scrollable `<main>`. Degrades to a plain scrollable div if the tag never registers.
|
|
12
|
+
*/
|
|
2
13
|
export declare class SchmancyNavigationDrawerContent extends SchmancyNavigationDrawerContent_base {
|
|
3
14
|
connectedCallback(): void;
|
|
4
15
|
render(): import("lit-html").TemplateResult<1>;
|
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
import { TSchmancyDrawerNavbarMode, TSchmancyDrawerNavbarState } from './context';
|
|
2
2
|
declare const SchmancyNavigationDrawer_base: CustomElementConstructor & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
|
|
3
3
|
/**
|
|
4
|
+
* 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).
|
|
5
|
+
*
|
|
4
6
|
* @element schmancy-nav-drawer
|
|
7
|
+
* @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.
|
|
8
|
+
* @example
|
|
9
|
+
* <schmancy-nav-drawer>
|
|
10
|
+
* <schmancy-nav-drawer-navbar>
|
|
11
|
+
* <!-- nav items, typically schmancy-list-item links -->
|
|
12
|
+
* </schmancy-nav-drawer-navbar>
|
|
13
|
+
* <schmancy-nav-drawer-appbar>App title</schmancy-nav-drawer-appbar>
|
|
14
|
+
* <schmancy-nav-drawer-content>
|
|
15
|
+
* <!-- router outlet / page content -->
|
|
16
|
+
* </schmancy-nav-drawer-content>
|
|
17
|
+
* </schmancy-nav-drawer>
|
|
18
|
+
* @platform div - Flex layout with viewport-width mode switching. Degrades to a stack of plain divs if the tag never registers.
|
|
5
19
|
* @slot - The content slot
|
|
20
|
+
* @fires schmancy-drawer-state - When the drawer open/close state changes on mobile.
|
|
6
21
|
*/
|
|
7
22
|
export declare class SchmancyNavigationDrawer extends SchmancyNavigationDrawer_base {
|
|
8
23
|
fullscreen: boolean;
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { TSchmancyDrawerNavbarMode, TSchmancyDrawerNavbarState } from './context';
|
|
2
2
|
declare const SchmancyNavigationDrawerSidebar_base: CustomElementConstructor & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
|
|
3
|
+
/**
|
|
4
|
+
* Sidebar region inside schmancy-nav-drawer — the persistent-on-desktop / modal-on-mobile nav rail.
|
|
5
|
+
*
|
|
6
|
+
* @element schmancy-nav-drawer-navbar
|
|
7
|
+
* @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.
|
|
8
|
+
* @example
|
|
9
|
+
* <schmancy-nav-drawer-navbar>
|
|
10
|
+
* <schmancy-list>
|
|
11
|
+
* <schmancy-list-item href="/dashboard">Dashboard</schmancy-list-item>
|
|
12
|
+
* <schmancy-list-item href="/settings">Settings</schmancy-list-item>
|
|
13
|
+
* </schmancy-list>
|
|
14
|
+
* </schmancy-nav-drawer-navbar>
|
|
15
|
+
* @platform nav - Sidebar `<nav>` with responsive open/close behavior. Degrades to a plain sidebar div if the tag never registers.
|
|
16
|
+
*/
|
|
3
17
|
export declare class SchmancyNavigationDrawerSidebar extends SchmancyNavigationDrawerSidebar_base {
|
|
4
18
|
mode: TSchmancyDrawerNavbarMode;
|
|
5
19
|
drawerState: TSchmancyDrawerNavbarState;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
declare const SchmancyNavigationBarItem_base: import("../../mixins").Constructor<CustomElementConstructor> & import("../../mixins").Constructor<import("@mixins/tailwind.mixin").ITailwindElementMixin> & import("../../mixins").Constructor<import("lit").LitElement> & import("../../mixins").Constructor<import("../../mixins").IBaseMixin>;
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Individual navigation item for use within a navigation bar.
|
|
6
|
-
* Represents a single destination with an icon and optional label following Material Design 3 specifications.
|
|
3
|
+
* Single destination inside schmancy-navigation-bar — an icon + optional label representing one primary app destination.
|
|
7
4
|
*
|
|
8
5
|
* @element schmancy-navigation-bar-item
|
|
6
|
+
* @summary Always nested inside schmancy-navigation-bar. Use `icon` attr for a Material Symbols glyph or slot=icon for custom content.
|
|
7
|
+
* @platform button click - Styled navigation target. Degrades to a plain `<button>` if the tag never registers.
|
|
9
8
|
* @slot icon - Slot for custom icon content
|
|
10
9
|
* @slot - Default slot for custom content
|
|
11
10
|
*
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
declare const SchmancyNavigationBar_base: import("../../mixins").Constructor<CustomElementConstructor> & import("../../mixins").Constructor<import("@mixins/tailwind.mixin").ITailwindElementMixin> & import("../../mixins").Constructor<import("lit").LitElement> & import("../../mixins").Constructor<import("../../mixins").IBaseMixin>;
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* A horizontal navigation component following Material Design 3 specifications.
|
|
6
|
-
* Navigation bars provide access to between 3-7 primary destinations.
|
|
7
|
-
* Automatically hides in fullscreen mode when triggered via schmancyTheme.next({ fullscreen: true }).
|
|
8
|
-
*
|
|
9
|
-
* **IMPORTANT**: This component includes `z-10` by default (consistent with navigation-rail).
|
|
10
|
-
* The consumer is responsible for positioning the navigation bar in their layout.
|
|
11
|
-
* For typical bottom-fixed positioning, add: `class="fixed bottom-0 left-0 right-0"`.
|
|
3
|
+
* Bottom navigation bar — Material Design 3 horizontal nav for mobile primary destinations (3–7 items). Auto-hides in fullscreen mode.
|
|
12
4
|
*
|
|
13
5
|
* @element schmancy-navigation-bar
|
|
6
|
+
* @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.
|
|
7
|
+
* @platform nav - Styled horizontal nav with schmancy-navigation-bar-item children. Degrades to a plain flex container if the tag never registers.
|
|
14
8
|
* @slot - Default slot for navigation bar items
|
|
15
9
|
*
|
|
16
10
|
* @fires navigation-change - When an item is selected
|
|
@@ -7,15 +7,11 @@ export type NavigationRailItemClickEvent = CustomEvent<{
|
|
|
7
7
|
}>;
|
|
8
8
|
declare const SchmancyNavigationRailItem_base: CustomElementConstructor & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
* @see https://m3.material.io/components/navigation-rail/overview
|
|
12
|
-
*
|
|
13
|
-
* `<schmancy-navigation-rail-item>` component
|
|
14
|
-
*
|
|
15
|
-
* Individual navigation item for use within a navigation rail.
|
|
16
|
-
* Represents a single destination or action with an icon and optional label.
|
|
10
|
+
* Single destination inside schmancy-navigation-rail — vertically-stacked icon + optional label. @see https://m3.material.io/components/navigation-rail/overview
|
|
17
11
|
*
|
|
18
12
|
* @element schmancy-navigation-rail-item
|
|
13
|
+
* @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.
|
|
14
|
+
* @platform button click - Styled vertical navigation target. Degrades to a plain `<button>` if the tag never registers.
|
|
19
15
|
* @slot icon - Slot for the navigation item icon (e.g., schmancy-icon)
|
|
20
16
|
* @slot - Default slot for custom content
|
|
21
17
|
* @slot badge - Custom badge content
|
|
@@ -5,16 +5,20 @@ export type NavigationRailFabClickEvent = CustomEvent<void>;
|
|
|
5
5
|
export type LabelVisibility = 'all' | 'selected' | 'none';
|
|
6
6
|
declare const SchmancyNavigationRail_base: CustomElementConstructor & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
|
|
7
7
|
/**
|
|
8
|
-
* Material Design 3
|
|
9
|
-
* @see https://m3.material.io/components/navigation-rail/overview
|
|
10
|
-
*
|
|
11
|
-
* `<schmancy-navigation-rail>` component
|
|
12
|
-
*
|
|
13
|
-
* A Material Design 3 vertical navigation component positioned on the left side of an application.
|
|
14
|
-
* Navigation rails provide access to between 3-7 primary destinations with a compact footprint.
|
|
15
|
-
* Automatically hides in fullscreen mode when triggered via schmancyTheme.next({ fullscreen: true }).
|
|
8
|
+
* Vertical navigation rail — Material Design 3 compact left-side nav for desktop / tablet layouts with 3–7 primary destinations. Auto-hides in fullscreen mode. @see https://m3.material.io/components/navigation-rail/overview
|
|
16
9
|
*
|
|
17
10
|
* @element schmancy-navigation-rail
|
|
11
|
+
* @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.
|
|
12
|
+
* @example
|
|
13
|
+
* <schmancy-navigation-rail activeIndex="0">
|
|
14
|
+
* <schmancy-icon-button slot="fab" variant="filled">
|
|
15
|
+
* <schmancy-icon>add</schmancy-icon>
|
|
16
|
+
* </schmancy-icon-button>
|
|
17
|
+
* <schmancy-navigation-rail-item icon="home" label="Home"></schmancy-navigation-rail-item>
|
|
18
|
+
* <schmancy-navigation-rail-item icon="search" label="Search"></schmancy-navigation-rail-item>
|
|
19
|
+
* <schmancy-navigation-rail-item icon="settings" label="Settings"></schmancy-navigation-rail-item>
|
|
20
|
+
* </schmancy-navigation-rail>
|
|
21
|
+
* @platform nav - Vertical styled nav. Degrades to a plain vertical flex container if the tag never registers.
|
|
18
22
|
* @slot fab - Slot for a floating action button at the top
|
|
19
23
|
* @slot menu - Slot for a menu icon or button below the FAB
|
|
20
24
|
* @slot header - Custom header content slot
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
import { SchmancySheetPosition } from './sheet.service';
|
|
2
2
|
declare const SchmancySheet_base: CustomElementConstructor & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
|
|
3
|
+
/**
|
|
4
|
+
* Side-docked or bottom-docked panel — a dialog variant that slides in from an edge. Driven imperatively by the `sheet` service; rarely instantiated directly.
|
|
5
|
+
*
|
|
6
|
+
* @element schmancy-sheet
|
|
7
|
+
* @summary Prefer `sheet.open({ component, position })` over placing this element declaratively — the service handles stacking, focus, close on outside-click, ESC, and router integration.
|
|
8
|
+
* @example
|
|
9
|
+
* import { sheet, SchmancySheetPosition } from '@mhmo91/schmancy'
|
|
10
|
+
* sheet.open({
|
|
11
|
+
* component: new MyEditorElement(),
|
|
12
|
+
* position: SchmancySheetPosition.Side,
|
|
13
|
+
* title: 'Edit item',
|
|
14
|
+
* })
|
|
15
|
+
* @platform dialog close - Positioned-fixed panel with backdrop. Degrades to a `<dialog>` if the tag never registers — loses slide animation, keeps focus trap + dismiss.
|
|
16
|
+
* @attr position - `'side' | 'bottom'`. Which edge the sheet docks to.
|
|
17
|
+
* @attr open - Boolean; sheet is visible when true.
|
|
18
|
+
* @fires close - When the sheet is dismissed (backdrop click, close button, ESC).
|
|
19
|
+
*/
|
|
3
20
|
export default class SchmancySheet extends SchmancySheet_base {
|
|
4
21
|
open: boolean;
|
|
5
22
|
position: SchmancySheetPosition;
|