@mhmo91/schmancy 0.9.16 → 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 +111 -51
- package/dist/agent/schmancy.agent.js +288 -38
- package/dist/agent/schmancy.agent.js.map +1 -1
- package/dist/agent/schmancy.manifest.json +332 -25
- package/dist/breadcrumb.cjs.map +1 -1
- package/dist/breadcrumb.js.map +1 -1
- package/dist/card-BslSqOsf.cjs.map +1 -1
- package/dist/card-CEdgK9nb.js.map +1 -1
- package/dist/details-B8p62xmR.cjs.map +1 -1
- package/dist/details-CCW52lzz.js.map +1 -1
- package/dist/dialog.cjs.map +1 -1
- package/dist/dialog.js.map +1 -1
- package/dist/divider-CbEWg3G_.js.map +1 -1
- package/dist/divider-JyyFw_3J.cjs.map +1 -1
- package/dist/dropdown.cjs.map +1 -1
- package/dist/dropdown.js.map +1 -1
- package/dist/expand-BmwIPNjq.cjs.map +1 -1
- package/dist/expand-bFa_qVDT.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/page.cjs.map +1 -1
- package/dist/page.js.map +1 -1
- package/dist/scroll-CdmXRXh2.js.map +1 -1
- package/dist/scroll-V1rAZ9fK.cjs.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/dist/surface-0XM4DBaT.js.map +1 -1
- package/dist/surface-B6DA01kL.cjs.map +1 -1
- package/dist/theme-Cq_c9IO3.js.map +1 -1
- package/dist/theme-DU5yXaV-.cjs.map +1 -1
- package/dist/tree.cjs.map +1 -1
- package/dist/tree.js.map +1 -1
- package/package.json +1 -1
- package/src/breadcrumb/breadcrumb.ts +14 -4
- package/src/card/actions.ts +9 -0
- package/src/card/card.ts +18 -0
- package/src/card/content.ts +9 -0
- package/src/card/media.ts +6 -0
- package/src/details/details.ts +12 -0
- package/src/dialog/dialog.component.ts +9 -9
- package/src/divider/divider.ts +11 -0
- package/src/dropdown/dropdown-component.ts +13 -1
- package/src/dropdown/dropdown-content.ts +11 -3
- package/src/expand/expand-root.component.ts +12 -0
- package/src/expand/expand.component.ts +14 -0
- package/src/layout/scroll/scroll.ts +5 -1
- 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/page/page.ts +8 -11
- package/src/sheet/sheet.ts +17 -0
- package/src/surface/surface.ts +4 -10
- package/src/theme/theme.component.ts +10 -15
- package/src/tree/tree.ts +12 -0
- package/types/src/breadcrumb/breadcrumb.d.ts +14 -4
- package/types/src/card/actions.d.ts +9 -0
- package/types/src/card/card.d.ts +18 -0
- package/types/src/card/content.d.ts +9 -0
- package/types/src/card/media.d.ts +6 -0
- package/types/src/details/details.d.ts +12 -0
- package/types/src/dialog/dialog.component.d.ts +9 -9
- package/types/src/divider/divider.d.ts +11 -0
- package/types/src/dropdown/dropdown-component.d.ts +13 -1
- package/types/src/dropdown/dropdown-content.d.ts +11 -3
- package/types/src/expand/expand-root.component.d.ts +12 -0
- package/types/src/expand/expand.component.d.ts +14 -0
- package/types/src/layout/scroll/scroll.d.ts +5 -1
- 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/page/page.d.ts +8 -11
- package/types/src/sheet/sheet.d.ts +17 -0
- package/types/src/surface/surface.d.ts +4 -10
- package/types/src/theme/theme.component.d.ts +10 -15
- package/types/src/tree/tree.d.ts +12 -0
|
@@ -13,15 +13,11 @@ export type NavigationRailItemClickEvent = CustomEvent<{
|
|
|
13
13
|
}>
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
* @see https://m3.material.io/components/navigation-rail/overview
|
|
18
|
-
*
|
|
19
|
-
* `<schmancy-navigation-rail-item>` component
|
|
20
|
-
*
|
|
21
|
-
* Individual navigation item for use within a navigation rail.
|
|
22
|
-
* Represents a single destination or action with an icon and optional label.
|
|
16
|
+
* Single destination inside schmancy-navigation-rail — vertically-stacked icon + optional label. @see https://m3.material.io/components/navigation-rail/overview
|
|
23
17
|
*
|
|
24
18
|
* @element schmancy-navigation-rail-item
|
|
19
|
+
* @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.
|
|
20
|
+
* @platform button click - Styled vertical navigation target. Degrades to a plain `<button>` if the tag never registers.
|
|
25
21
|
* @slot icon - Slot for the navigation item icon (e.g., schmancy-icon)
|
|
26
22
|
* @slot - Default slot for custom content
|
|
27
23
|
* @slot badge - Custom badge content
|
|
@@ -15,16 +15,20 @@ export type NavigationRailFabClickEvent = CustomEvent<void>
|
|
|
15
15
|
export type LabelVisibility = 'all' | 'selected' | 'none'
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* Material Design 3
|
|
19
|
-
* @see https://m3.material.io/components/navigation-rail/overview
|
|
20
|
-
*
|
|
21
|
-
* `<schmancy-navigation-rail>` component
|
|
22
|
-
*
|
|
23
|
-
* A Material Design 3 vertical navigation component positioned on the left side of an application.
|
|
24
|
-
* Navigation rails provide access to between 3-7 primary destinations with a compact footprint.
|
|
25
|
-
* Automatically hides in fullscreen mode when triggered via schmancyTheme.next({ fullscreen: true }).
|
|
18
|
+
* 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
|
|
26
19
|
*
|
|
27
20
|
* @element schmancy-navigation-rail
|
|
21
|
+
* @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.
|
|
22
|
+
* @example
|
|
23
|
+
* <schmancy-navigation-rail activeIndex="0">
|
|
24
|
+
* <schmancy-icon-button slot="fab" variant="filled">
|
|
25
|
+
* <schmancy-icon>add</schmancy-icon>
|
|
26
|
+
* </schmancy-icon-button>
|
|
27
|
+
* <schmancy-navigation-rail-item icon="home" label="Home"></schmancy-navigation-rail-item>
|
|
28
|
+
* <schmancy-navigation-rail-item icon="search" label="Search"></schmancy-navigation-rail-item>
|
|
29
|
+
* <schmancy-navigation-rail-item icon="settings" label="Settings"></schmancy-navigation-rail-item>
|
|
30
|
+
* </schmancy-navigation-rail>
|
|
31
|
+
* @platform nav - Vertical styled nav. Degrades to a plain vertical flex container if the tag never registers.
|
|
28
32
|
* @slot fab - Slot for a floating action button at the top
|
|
29
33
|
* @slot menu - Slot for a menu icon or button below the FAB
|
|
30
34
|
* @slot header - Custom header content slot
|
package/src/page/page.ts
CHANGED
|
@@ -8,20 +8,17 @@ import { theme } from '../theme/theme.service'
|
|
|
8
8
|
import { fromResizeObserver } from '../directives/layout'
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
* Prevents double-tap zoom, pull-to-refresh, rubber-banding.
|
|
13
|
-
* Automatically fills remaining viewport height.
|
|
11
|
+
* 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`.
|
|
14
12
|
*
|
|
15
13
|
* @element schmancy-page
|
|
16
|
-
*
|
|
14
|
+
* @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.
|
|
17
15
|
* @example
|
|
18
|
-
*
|
|
19
|
-
* <schmancy-
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* `
|
|
16
|
+
* <schmancy-page rows="auto_1fr_auto">
|
|
17
|
+
* <schmancy-nav-drawer-appbar>Title</schmancy-nav-drawer-appbar>
|
|
18
|
+
* <main>Scrollable content</main>
|
|
19
|
+
* <schmancy-navigation-bar></schmancy-navigation-bar>
|
|
20
|
+
* </schmancy-page>
|
|
21
|
+
* @platform div - 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.
|
|
25
22
|
*/
|
|
26
23
|
@customElement('schmancy-page')
|
|
27
24
|
export class SchmancyPage extends $LitElement(css`
|
package/src/sheet/sheet.ts
CHANGED
|
@@ -7,6 +7,23 @@ import { on } from './hook'
|
|
|
7
7
|
import { SchmancySheetPosition, sheet } from './sheet.service'
|
|
8
8
|
import { BLACKBIRD_EASING, DURATION_ENTER, DURATION_EXIT, DURATION_BACKDROP, EASE_OUT, EASE_IN } from '../utils/animation'
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Side-docked or bottom-docked panel — a dialog variant that slides in from an edge. Driven imperatively by the `sheet` service; rarely instantiated directly.
|
|
12
|
+
*
|
|
13
|
+
* @element schmancy-sheet
|
|
14
|
+
* @summary Prefer `sheet.open({ component, position })` over placing this element declaratively — the service handles stacking, focus, close on outside-click, ESC, and router integration.
|
|
15
|
+
* @example
|
|
16
|
+
* import { sheet, SchmancySheetPosition } from '@mhmo91/schmancy'
|
|
17
|
+
* sheet.open({
|
|
18
|
+
* component: new MyEditorElement(),
|
|
19
|
+
* position: SchmancySheetPosition.Side,
|
|
20
|
+
* title: 'Edit item',
|
|
21
|
+
* })
|
|
22
|
+
* @platform dialog close - Positioned-fixed panel with backdrop. Degrades to a `<dialog>` if the tag never registers — loses slide animation, keeps focus trap + dismiss.
|
|
23
|
+
* @attr position - `'side' | 'bottom'`. Which edge the sheet docks to.
|
|
24
|
+
* @attr open - Boolean; sheet is visible when true.
|
|
25
|
+
* @fires close - When the sheet is dismissed (backdrop click, close button, ESC).
|
|
26
|
+
*/
|
|
10
27
|
@customElement('schmancy-sheet')
|
|
11
28
|
export default class SchmancySheet extends $LitElement(css`
|
|
12
29
|
:host {
|
package/src/surface/surface.ts
CHANGED
|
@@ -11,22 +11,16 @@ export const SchmancySurfaceTypeContext = createContext<TSurfaceColor>('surface'
|
|
|
11
11
|
export type { SchmancySurfaceFill, SchmancySurfaceRounded, SchmancySurfaceElevation } from '@mixins/surface.mixin'
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* This component renders a styled container that adapts its dimensions based on the `fill` property.
|
|
17
|
-
* It supports various rounding options, elevation levels, and applies background and text color classes
|
|
18
|
-
* based on the specified surface variant. Additionally, when the `scroller` property is true, the component
|
|
19
|
-
* enables internal scrolling by applying overflow and scroll-behavior styles.
|
|
20
|
-
*
|
|
21
|
-
* SurfaceMixin automatically provides surfaceStyles CSS.
|
|
14
|
+
* 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.
|
|
22
15
|
*
|
|
23
16
|
* @element schmancy-surface
|
|
24
|
-
* @
|
|
25
|
-
*
|
|
17
|
+
* @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.
|
|
26
18
|
* @example
|
|
27
19
|
* <schmancy-surface fill="all" rounded="all" elevation="3" type="surfaceBright" scroller>
|
|
28
20
|
* <p>Your scrollable content here</p>
|
|
29
21
|
* </schmancy-surface>
|
|
22
|
+
* @platform div - Styled `<div>` with theme-driven background/color/elevation. Degrades to a plain `<div>` if the tag never registers — text stays readable, just loses theming.
|
|
23
|
+
* @slot - Default slot for projecting child content.
|
|
30
24
|
*/
|
|
31
25
|
@customElement('schmancy-surface')
|
|
32
26
|
export class SchmancySurface extends SurfaceMixin(
|
|
@@ -27,28 +27,23 @@ const $colorScheme = new Observable<string>(subscriber => {
|
|
|
27
27
|
})
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* This component manages color schemes, primary colors, and theme distribution
|
|
33
|
-
* throughout the component tree. It can be used at the root level or nested
|
|
34
|
-
* to provide different themes to different parts of the application.
|
|
30
|
+
* 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-…)).
|
|
35
31
|
*
|
|
36
32
|
* @element schmancy-theme
|
|
37
|
-
*
|
|
33
|
+
* @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.
|
|
38
34
|
* @example
|
|
39
|
-
* ```html
|
|
40
35
|
* <!-- Root theme provider -->
|
|
41
|
-
* <schmancy-theme
|
|
36
|
+
* <schmancy-theme root scheme="auto" color="#6200ee">
|
|
42
37
|
* <your-app></your-app>
|
|
43
38
|
* </schmancy-theme>
|
|
44
|
-
*
|
|
45
|
-
* <!-- Nested theme for specific section -->
|
|
46
|
-
* <schmancy-theme
|
|
47
|
-
* <
|
|
48
|
-
* <!-- Components here
|
|
49
|
-
* </
|
|
39
|
+
* @example
|
|
40
|
+
* <!-- Nested theme for a specific section -->
|
|
41
|
+
* <schmancy-theme scheme="dark" color="#2196f3">
|
|
42
|
+
* <schmancy-surface fill="all">
|
|
43
|
+
* <!-- Components here use the blue dark theme -->
|
|
44
|
+
* </schmancy-surface>
|
|
50
45
|
* </schmancy-theme>
|
|
51
|
-
*
|
|
46
|
+
* @platform div - 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.
|
|
52
47
|
*/
|
|
53
48
|
@customElement('schmancy-theme')
|
|
54
49
|
export class SchmancyThemeComponent extends $LitElement(tailwindStyles) {
|
package/src/tree/tree.ts
CHANGED
|
@@ -4,7 +4,19 @@ import { customElement, property, query } from 'lit/decorators.js'
|
|
|
4
4
|
import { fromEvent, merge, switchMap, takeUntil, tap, zip } from 'rxjs'
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
+
* Expandable tree node — a recursive disclosure widget. One root slot, one default slot for child nodes. Each node can itself contain schmancy-tree children.
|
|
8
|
+
*
|
|
7
9
|
* @element schmancy-tree
|
|
10
|
+
* @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).
|
|
11
|
+
* @example
|
|
12
|
+
* <schmancy-tree>
|
|
13
|
+
* <schmancy-list-item slot="root">src/</schmancy-list-item>
|
|
14
|
+
* <schmancy-tree>
|
|
15
|
+
* <schmancy-list-item slot="root">components/</schmancy-list-item>
|
|
16
|
+
* <schmancy-list-item>button.ts</schmancy-list-item>
|
|
17
|
+
* </schmancy-tree>
|
|
18
|
+
* </schmancy-tree>
|
|
19
|
+
* @platform details toggle - Recursive `<details>`-like disclosure. Degrades to a plain nested list if the tag never registers — loses expand/collapse but stays navigable.
|
|
8
20
|
* @slot root - The root element of the tree
|
|
9
21
|
* @slot - The children of the tree
|
|
10
22
|
*/
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
declare const SchmancyBreadcrumb_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
|
-
* Breadcrumb navigation
|
|
4
|
-
* elements with the correct ARIA landmark and semantics.
|
|
3
|
+
* Breadcrumb trail — navigation history from root to current page. Renders schmancy-breadcrumb-item children with separators between.
|
|
5
4
|
*
|
|
6
5
|
* @element schmancy-breadcrumb
|
|
6
|
+
* @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.
|
|
7
|
+
* @example
|
|
8
|
+
* <schmancy-breadcrumb separator="›">
|
|
9
|
+
* <schmancy-breadcrumb-item href="/">Home</schmancy-breadcrumb-item>
|
|
10
|
+
* <schmancy-breadcrumb-item href="/docs">Docs</schmancy-breadcrumb-item>
|
|
11
|
+
* <schmancy-breadcrumb-item>Getting started</schmancy-breadcrumb-item>
|
|
12
|
+
* </schmancy-breadcrumb>
|
|
13
|
+
* @platform nav - Styled `<nav aria-label="Breadcrumb">`. Degrades to a plain nav if the tag never registers.
|
|
7
14
|
* @slot - Default slot for `<schmancy-breadcrumb-item>` children.
|
|
8
15
|
* @attr separator - Character or string rendered between items. Default `/`.
|
|
9
16
|
* @csspart separator - The separator element.
|
|
@@ -16,10 +23,13 @@ export declare class SchmancyBreadcrumb extends SchmancyBreadcrumb_base {
|
|
|
16
23
|
}
|
|
17
24
|
declare const SchmancyBreadcrumbItem_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>;
|
|
18
25
|
/**
|
|
19
|
-
*
|
|
20
|
-
* otherwise as a plain span (represents the current page).
|
|
26
|
+
* Single segment in a schmancy-breadcrumb trail — a link when `href` is set, or a plain span (the current page) when omitted.
|
|
21
27
|
*
|
|
22
28
|
* @element schmancy-breadcrumb-item
|
|
29
|
+
* @summary Always nested inside schmancy-breadcrumb. Omit `href` on the current page — it gets aria-current="page" automatically.
|
|
30
|
+
* @example
|
|
31
|
+
* <schmancy-breadcrumb-item href="/products">Products</schmancy-breadcrumb-item>
|
|
32
|
+
* @platform a - Renders an `<a>` or `<span>` depending on href. Degrades to a plain anchor/span if the tag never registers.
|
|
23
33
|
* @slot - Label content.
|
|
24
34
|
* @attr href - If set, renders as an anchor.
|
|
25
35
|
* @attr current - Marks as `aria-current="page"`.
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
declare const SchmancyCardAction_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
|
+
* Action row of a schmancy-card — holds the card's buttons / links (typically aligned bottom-right).
|
|
4
|
+
*
|
|
3
5
|
* @element schmancy-card-action
|
|
6
|
+
* @summary Always nested inside schmancy-card. Holds the primary + secondary CTAs for the card.
|
|
7
|
+
* @example
|
|
8
|
+
* <schmancy-card-action>
|
|
9
|
+
* <schmancy-button variant="text">Cancel</schmancy-button>
|
|
10
|
+
* <schmancy-button variant="filled">Save</schmancy-button>
|
|
11
|
+
* </schmancy-card-action>
|
|
12
|
+
* @platform div - Styled flex container. Degrades to a plain div if the tag never registers.
|
|
4
13
|
* @slot - The content of the action
|
|
5
14
|
*/
|
|
6
15
|
export default class SchmancyCardAction extends SchmancyCardAction_base {
|
package/types/src/card/card.d.ts
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
declare const SchmancyCard_base: import("@mixins/index").Constructor<CustomElementConstructor> & import("@mixins/index").Constructor<import("@mixins/index").ITailwindElementMixin> & import("@mixins/index").Constructor<LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
|
|
3
|
+
/**
|
|
4
|
+
* Material Design card — a surface-level container for grouping related content with media / content / actions slots.
|
|
5
|
+
*
|
|
6
|
+
* @element schmancy-card
|
|
7
|
+
* @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.
|
|
8
|
+
* @example
|
|
9
|
+
* <schmancy-card type="elevated" href="/items/42">
|
|
10
|
+
* <schmancy-card-media src="/thumb.jpg" alt="Thumbnail"></schmancy-card-media>
|
|
11
|
+
* <schmancy-card-content>
|
|
12
|
+
* <h3>Title</h3>
|
|
13
|
+
* <p>One-line description of the card's content.</p>
|
|
14
|
+
* </schmancy-card-content>
|
|
15
|
+
* <schmancy-card-action>
|
|
16
|
+
* <schmancy-button variant="text">Open</schmancy-button>
|
|
17
|
+
* </schmancy-card-action>
|
|
18
|
+
* </schmancy-card>
|
|
19
|
+
* @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.
|
|
20
|
+
*/
|
|
3
21
|
export default class SchmancyCard extends SchmancyCard_base {
|
|
4
22
|
protected static shadowRootOptions: {
|
|
5
23
|
mode: string;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
declare const SchmancyCardContent_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
|
+
* Content region of a schmancy-card — holds the card's headline, supporting text, and inline controls.
|
|
4
|
+
*
|
|
3
5
|
* @element schmancy-card-content
|
|
6
|
+
* @summary Always nested inside schmancy-card. The padded content block between the media and action rows.
|
|
7
|
+
* @example
|
|
8
|
+
* <schmancy-card-content>
|
|
9
|
+
* <h3>Card title</h3>
|
|
10
|
+
* <p>Supporting text that describes the card's subject.</p>
|
|
11
|
+
* </schmancy-card-content>
|
|
12
|
+
* @platform div - Styled `<div>` with padding. Degrades to a plain div if the tag never registers.
|
|
4
13
|
*/
|
|
5
14
|
export default class SchmancyCardContent extends SchmancyCardContent_base {
|
|
6
15
|
protected render(): unknown;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
declare const SchmancyCardMedia_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
|
+
* Media region of a schmancy-card — the image / thumbnail at the top of the card.
|
|
4
|
+
*
|
|
3
5
|
* @element schmancy-card-media
|
|
6
|
+
* @summary Always nested inside schmancy-card. Pass `src` + `alt` props or slot an `<img>` / `<video>` for custom media.
|
|
7
|
+
* @example
|
|
8
|
+
* <schmancy-card-media src="/thumb.jpg" alt="Product photo"></schmancy-card-media>
|
|
9
|
+
* @platform img - Renders an `<img>` (or wraps a slotted media element). Degrades to a styled `<img>` if the tag never registers.
|
|
4
10
|
*/
|
|
5
11
|
export default class SchmancyCardMedia extends SchmancyCardMedia_base {
|
|
6
12
|
src: string;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
declare const SchmancyDetails_base: import("@mixins/index").Constructor<import("@mixins/index").ISurfaceMixin> & import("@mixins/index").Constructor<CustomElementConstructor> & import("@mixins/index").Constructor<import("@mixins/index").ITailwindElementMixin> & import("@mixins/index").Constructor<LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
|
|
3
|
+
/**
|
|
4
|
+
* Expandable disclosure panel — a styled `<details>` / `<summary>` pair with animated expand + overlay options.
|
|
5
|
+
*
|
|
6
|
+
* @element schmancy-details
|
|
7
|
+
* @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.
|
|
8
|
+
* @example
|
|
9
|
+
* <schmancy-details summary="Shipping details">
|
|
10
|
+
* <p>Order ships in 2 business days.</p>
|
|
11
|
+
* </schmancy-details>
|
|
12
|
+
* @platform details toggle - Wraps native `<details>`/`<summary>`. Degrades to the native element if the tag never registers — same keyboard accessibility, just no animation.
|
|
13
|
+
* @fires toggle - When the open state changes (bubbles from the native `<details>`).
|
|
14
|
+
*/
|
|
3
15
|
export default class SchmancyDetails extends SchmancyDetails_base {
|
|
4
16
|
protected static shadowRootOptions: {
|
|
5
17
|
mode: "open";
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
declare const SchmancyDialog_base: import("@mixins/index").Constructor<import("./dialog-base.mixin").IDialogBaseMixin> & CustomElementConstructor & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* 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.
|
|
4
4
|
*
|
|
5
5
|
* @element schmancy-dialog
|
|
6
|
+
* @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)`.
|
|
7
|
+
* @platform dialog close - Positioned overlay in light DOM. Degrades to a styled `<dialog>` if the tag never registers — loses custom animations but keeps focus trap + ESC close.
|
|
6
8
|
* @slot default - Content slot for dialog body (used in content mode)
|
|
7
9
|
* @slot content - Named slot for custom content in confirm mode
|
|
10
|
+
* @fires confirm - In confirm mode, when the confirm button is clicked.
|
|
11
|
+
* @fires cancel - In confirm mode, when the cancel button or ESC is activated.
|
|
8
12
|
*
|
|
9
13
|
* @example Content mode (no buttons):
|
|
10
|
-
* ```html
|
|
11
14
|
* <schmancy-dialog>
|
|
12
15
|
* <my-custom-content></my-custom-content>
|
|
13
16
|
* </schmancy-dialog>
|
|
14
|
-
* ```
|
|
15
17
|
*
|
|
16
18
|
* @example Confirm mode (with buttons):
|
|
17
|
-
* ```html
|
|
18
19
|
* <schmancy-dialog
|
|
19
|
-
* title="
|
|
20
|
-
* message="
|
|
21
|
-
* confirm-text="
|
|
22
|
-
* cancel-text="
|
|
20
|
+
* title="Delete item?"
|
|
21
|
+
* message="This action cannot be undone."
|
|
22
|
+
* confirm-text="Delete"
|
|
23
|
+
* cancel-text="Keep"
|
|
23
24
|
* ></schmancy-dialog>
|
|
24
|
-
* ```
|
|
25
25
|
*/
|
|
26
26
|
export declare class SchmancyDialog extends SchmancyDialog_base {
|
|
27
27
|
/**
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
declare const SchmancyDivider_base: CustomElementConstructor & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
|
|
2
|
+
/**
|
|
3
|
+
* Thin horizontal (or vertical) separator rule between sections of content.
|
|
4
|
+
*
|
|
5
|
+
* @element schmancy-divider
|
|
6
|
+
* @summary Semantic separator between groups — list items, menu sections, content blocks. Uses outline theme token.
|
|
7
|
+
* @example
|
|
8
|
+
* <schmancy-list-item>First</schmancy-list-item>
|
|
9
|
+
* <schmancy-divider></schmancy-divider>
|
|
10
|
+
* <schmancy-list-item>Second</schmancy-list-item>
|
|
11
|
+
* @platform hr - Styled horizontal rule. Degrades to a native `<hr>` if the tag never registers.
|
|
12
|
+
*/
|
|
2
13
|
export default class SchmancyDivider extends SchmancyDivider_base {
|
|
3
14
|
outline: 'default' | 'variant';
|
|
4
15
|
vertical: boolean;
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
declare const SchmancyDropdown_base: CustomElementConstructor & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* 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.
|
|
4
4
|
*
|
|
5
5
|
* @element schmancy-dropdown
|
|
6
|
+
* @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.
|
|
7
|
+
* @example
|
|
8
|
+
* <schmancy-dropdown>
|
|
9
|
+
* <schmancy-button slot="trigger">Filters</schmancy-button>
|
|
10
|
+
* <schmancy-dropdown-content>
|
|
11
|
+
* <schmancy-form>…</schmancy-form>
|
|
12
|
+
* </schmancy-dropdown-content>
|
|
13
|
+
* </schmancy-dropdown>
|
|
14
|
+
* @platform div - Anchored via Floating UI (autoUpdate, flip, shift). Degrades to inline content if the tag never registers — loses positioning but content stays accessible.
|
|
15
|
+
* @attr open - Boolean; whether the dropdown is visible.
|
|
16
|
+
* @fires open - When the dropdown opens.
|
|
17
|
+
* @fires close - When the dropdown closes.
|
|
6
18
|
* @slot trigger - The element that triggers the dropdown
|
|
7
19
|
* @slot - Default slot for the dropdown content
|
|
8
20
|
*/
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
declare const SchmancyDropdownContent_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
|
-
* Content
|
|
3
|
+
* Content panel for a schmancy-dropdown — a styled positioned surface. Always nested inside schmancy-dropdown and placed alongside the trigger slot.
|
|
4
4
|
*
|
|
5
5
|
* @element schmancy-dropdown-content
|
|
6
|
+
* @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.
|
|
7
|
+
* @example
|
|
8
|
+
* <schmancy-dropdown>
|
|
9
|
+
* <schmancy-button slot="trigger">Open</schmancy-button>
|
|
10
|
+
* <schmancy-dropdown-content>
|
|
11
|
+
* Panel contents…
|
|
12
|
+
* </schmancy-dropdown-content>
|
|
13
|
+
* </schmancy-dropdown>
|
|
14
|
+
* @platform div - Positioned panel with theme-aware styling. Degrades to an inline div if the tag never registers.
|
|
6
15
|
* @slot - Default slot for dropdown content.
|
|
7
|
-
* @csspart content - The inner wrapper element; style to override panel
|
|
8
|
-
* backgrounds, shadows, padding, or borders without shadow-root piercing.
|
|
16
|
+
* @csspart content - The inner wrapper element; style to override panel backgrounds, shadows, padding, or borders without shadow-root piercing.
|
|
9
17
|
*/
|
|
10
18
|
export declare class SchmancyDropdownContent extends SchmancyDropdownContent_base {
|
|
11
19
|
/**
|
|
@@ -2,6 +2,18 @@ import { nothing } from 'lit';
|
|
|
2
2
|
import type { TSurfaceColor } from '@schmancy/types';
|
|
3
3
|
import '../surface/surface.js';
|
|
4
4
|
declare const SchmancyExpandRoot_base: import("@mixins/index").Constructor<import("@mixins/index").ISurfaceMixin> & 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>;
|
|
5
|
+
/**
|
|
6
|
+
* 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.
|
|
7
|
+
*
|
|
8
|
+
* @element schmancy-expand-root
|
|
9
|
+
* @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).
|
|
10
|
+
* @example
|
|
11
|
+
* <schmancy-expand-root>
|
|
12
|
+
* <schmancy-expand summary="Step 1">…</schmancy-expand>
|
|
13
|
+
* <schmancy-expand summary="Step 2">…</schmancy-expand>
|
|
14
|
+
* </schmancy-expand-root>
|
|
15
|
+
* @platform div - Coordinating wrapper. Degrades to a plain div if the tag never registers — children fall back to independent `<details>` behavior.
|
|
16
|
+
*/
|
|
5
17
|
export declare class SchmancyExpandRoot extends SchmancyExpandRoot_base {
|
|
6
18
|
type: TSurfaceColor;
|
|
7
19
|
isOpen: boolean;
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
/** Dispatch this event on window to close whichever schmancy-expand is currently open */
|
|
2
2
|
export declare const SCHMANCY_EXPAND_REQUEST_CLOSE = "schmancy-expand-request-close";
|
|
3
3
|
declare const SchmancyExpand_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>;
|
|
4
|
+
/**
|
|
5
|
+
* 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.
|
|
6
|
+
*
|
|
7
|
+
* @element schmancy-expand
|
|
8
|
+
* @summary Use for grouped progressive-disclosure where only one section should be open at a time. Prefer schmancy-details when sections should be independent.
|
|
9
|
+
* @example
|
|
10
|
+
* <schmancy-expand-root>
|
|
11
|
+
* <schmancy-expand summary="Billing">Billing form…</schmancy-expand>
|
|
12
|
+
* <schmancy-expand summary="Shipping">Shipping form…</schmancy-expand>
|
|
13
|
+
* <schmancy-expand summary="Review">Order review…</schmancy-expand>
|
|
14
|
+
* </schmancy-expand-root>
|
|
15
|
+
* @platform details toggle - Schmancy-skinned accordion section. Degrades to `<details>` if the tag never registers — loses mutual-exclusion behavior but stays functional.
|
|
16
|
+
* @fires toggle - When the open state changes.
|
|
17
|
+
*/
|
|
4
18
|
export default class SchmancyExpand extends SchmancyExpand_base {
|
|
5
19
|
summary: string;
|
|
6
20
|
open: boolean;
|
|
@@ -41,7 +41,11 @@ declare global {
|
|
|
41
41
|
}
|
|
42
42
|
declare const SchmancyScroll_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>;
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Scrollable container with debounced scroll events, horizontal/vertical direction, optional hidden scrollbar, and programmatic scrollTo via command events or refs.
|
|
45
|
+
*
|
|
46
|
+
* @element schmancy-scroll
|
|
47
|
+
* @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.
|
|
48
|
+
* @platform div - Styled scrollable `<div>`. Degrades to a plain scrollable div if the tag never registers — loses the debounced scroll event and the command-bus integration.
|
|
45
49
|
*
|
|
46
50
|
* @fires {SchmancyScrollEvent} scroll - Fired when scrolling occurs (with a configurable debounce)
|
|
47
51
|
* @slot - Default slot for content to be scrolled
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { TSurfaceColor } from '@schmancy/types/surface';
|
|
2
2
|
declare const SchmancyListItem_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>;
|
|
3
3
|
/**
|
|
4
|
+
* 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.
|
|
5
|
+
*
|
|
4
6
|
* @element schmancy-list-item
|
|
7
|
+
* @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.
|
|
8
|
+
* @example
|
|
9
|
+
* <schmancy-list-item href="/profile">
|
|
10
|
+
* <schmancy-icon slot="leading">person</schmancy-icon>
|
|
11
|
+
* Profile
|
|
12
|
+
* <schmancy-icon slot="trailing">chevron_right</schmancy-icon>
|
|
13
|
+
* </schmancy-list-item>
|
|
14
|
+
* @platform li click - Styled `<li>` or `<a>` depending on `href`. Degrades to a plain list item if the tag never registers.
|
|
5
15
|
* @slot leading - leading content
|
|
6
16
|
* @slot trailing - trailing content
|
|
7
17
|
* @slot - default content
|
package/types/src/list/list.d.ts
CHANGED
|
@@ -2,19 +2,18 @@ import { SchmancySurfaceFill } from '@schmancy/surface';
|
|
|
2
2
|
import { TSurfaceColor } from '@schmancy/types/surface';
|
|
3
3
|
declare const List_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>;
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* A list component that wraps its content within a customizable surface.
|
|
8
|
-
* It allows you to set the surface type and fill style, and can optionally
|
|
9
|
-
* enable scrolling behavior by delegating the scroller attribute to the surface.
|
|
5
|
+
* Wrapped list container — holds schmancy-list-item children on a themed surface. Optionally scrollable.
|
|
10
6
|
*
|
|
11
7
|
* @element schmancy-list
|
|
12
|
-
* @
|
|
13
|
-
*
|
|
8
|
+
* @summary Use for vertical lists of similarly-shaped items: settings entries, menu items, contact lists, notification lists. Pair with schmancy-list-item children.
|
|
14
9
|
* @example
|
|
15
10
|
* <schmancy-list surface="container" scroller>
|
|
16
|
-
* <schmancy-list-item>
|
|
11
|
+
* <schmancy-list-item>First</schmancy-list-item>
|
|
12
|
+
* <schmancy-list-item>Second</schmancy-list-item>
|
|
13
|
+
* <schmancy-list-item>Third</schmancy-list-item>
|
|
17
14
|
* </schmancy-list>
|
|
15
|
+
* @platform ul - Styled list container. Degrades to a plain ul/div if the tag never registers.
|
|
16
|
+
* @slot - The default slot for list items.
|
|
18
17
|
*/
|
|
19
18
|
export declare class List extends List_base {
|
|
20
19
|
/**
|
|
@@ -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 {
|