@skdx/web-components-blocks 0.1.0
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/LICENSE +21 -0
- package/README.md +9 -0
- package/custom-elements.json +695 -0
- package/dist/dashboard-layout/DashboardLayout.cjs +50 -0
- package/dist/dashboard-layout/DashboardLayout.d.cts +87 -0
- package/dist/dashboard-layout/DashboardLayout.d.ts +87 -0
- package/dist/dashboard-layout/DashboardLayout.js +50 -0
- package/dist/dashboard-layout/index.cjs +1 -0
- package/dist/dashboard-layout/index.d.cts +1 -0
- package/dist/dashboard-layout/index.d.ts +1 -0
- package/dist/dashboard-layout/index.js +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1 -0
- package/dist/internal/define.cjs +1 -0
- package/dist/internal/define.d.cts +8 -0
- package/dist/internal/define.d.ts +8 -0
- package/dist/internal/define.js +1 -0
- package/dist/internal/events.cjs +1 -0
- package/dist/internal/events.d.cts +12 -0
- package/dist/internal/events.d.ts +12 -0
- package/dist/internal/events.js +1 -0
- package/dist/internal/part.cjs +1 -0
- package/dist/internal/part.d.cts +10 -0
- package/dist/internal/part.d.ts +10 -0
- package/dist/internal/part.js +1 -0
- package/dist/internal/slots.cjs +1 -0
- package/dist/internal/slots.d.cts +9 -0
- package/dist/internal/slots.d.ts +9 -0
- package/dist/internal/slots.js +1 -0
- package/dist/page-container/PageContainer.cjs +29 -0
- package/dist/page-container/PageContainer.d.cts +70 -0
- package/dist/page-container/PageContainer.d.ts +70 -0
- package/dist/page-container/PageContainer.js +29 -0
- package/dist/page-container/index.cjs +1 -0
- package/dist/page-container/index.d.cts +1 -0
- package/dist/page-container/index.d.ts +1 -0
- package/dist/page-container/index.js +1 -0
- package/dist/sign-in-page/SignInPage.cjs +63 -0
- package/dist/sign-in-page/SignInPage.d.cts +101 -0
- package/dist/sign-in-page/SignInPage.d.ts +101 -0
- package/dist/sign-in-page/SignInPage.js +63 -0
- package/dist/sign-in-page/index.cjs +1 -0
- package/dist/sign-in-page/index.d.cts +1 -0
- package/dist/sign-in-page/index.d.ts +1 -0
- package/dist/sign-in-page/index.js +1 -0
- package/package.json +117 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";var s=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var _=Object.prototype.hasOwnProperty;var y=(n,e)=>{for(var a in e)s(n,a,{get:e[a],enumerable:!0})},k=(n,e,a,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of m(e))!_.call(n,r)&&r!==a&&s(n,r,{get:()=>e[r],enumerable:!(i=h(e,r))||i.enumerable});return n};var x=n=>k(s({},"__esModule",{value:!0}),n),l=(n,e,a,i)=>{for(var r=i>1?void 0:i?h(e,a):e,v=n.length-1,u;v>=0;v--)(u=n[v])&&(r=(i?u(e,a,r):u(r))||r);return i&&r&&s(e,a,r),r};var N={};y(N,{SkdxDashboardLayout:()=>o});module.exports=x(N);var t=require("lit"),d=require("lit/decorators.js"),c=require("../internal/define.cjs"),b=require("../internal/events.cjs"),g=require("../internal/slots.cjs");var f="data-skdx-dashboard-layout-generated",p={fromAttribute:n=>n!=="false"},$=0,o=class extends t.LitElement{constructor(){super(...arguments);this.title="";this.defaultNavOpen=!0;this.navLabel="Main navigation";this.navToggleLabel="Toggle navigation";this.navId=`skdx-dashboard-layout-nav-${++$}`;this.toggleNav=()=>{let a=!this.open;this.uncontrolledNavOpen=a,this.requestUpdate(),(0,b.emit)(this,"nav-open-change",a)}}createRenderRoot(){return this}get open(){return this.navOpen??this.uncontrolledNavOpen??this.defaultNavOpen}connectedCallback(){super.connectedCallback(),queueMicrotask(()=>this.requestUpdate())}region(a){return this.querySelector(`.skdx-dashboard-layout__${a}`)}updated(){this.toggleAttribute("data-nav-open",this.open),(0,g.placeSlotted)(this,f,{branding:this.region("branding"),actions:this.region("actions")},this.region("content"))}navList(a){return t.html`<ul class="skdx-dashboard-layout__nav-list">
|
|
2
|
+
${a.map(i=>this.navItem(i))}
|
|
3
|
+
</ul>`}navItem(a){return a.kind==="divider"?t.html`<li
|
|
4
|
+
role="separator"
|
|
5
|
+
class="skdx-dashboard-layout__nav-divider"
|
|
6
|
+
></li>`:a.kind==="header"?t.html`<li class="skdx-dashboard-layout__nav-header">${a.label??""}</li>`:a.href!==void 0?t.html`<li>
|
|
7
|
+
<a
|
|
8
|
+
class="skdx-dashboard-layout__nav-item"
|
|
9
|
+
href=${a.href}
|
|
10
|
+
aria-current=${a.current?"page":t.nothing}
|
|
11
|
+
>${a.label??""}</a
|
|
12
|
+
>
|
|
13
|
+
</li>`:t.html`<li>
|
|
14
|
+
<span class="skdx-dashboard-layout__nav-item">${a.label??""}</span>
|
|
15
|
+
${a.children?.length?this.navList(a.children):t.nothing}
|
|
16
|
+
</li>`}render(){let a=this.open;return t.html`
|
|
17
|
+
<header
|
|
18
|
+
class="skdx-dashboard-layout__app-bar"
|
|
19
|
+
data-skdx-dashboard-layout-generated
|
|
20
|
+
>
|
|
21
|
+
<button
|
|
22
|
+
class="skdx-button skdx-dashboard-layout__nav-toggle"
|
|
23
|
+
type="button"
|
|
24
|
+
data-icon-only
|
|
25
|
+
aria-expanded=${a?"true":"false"}
|
|
26
|
+
aria-controls=${this.navId}
|
|
27
|
+
aria-label=${this.navToggleLabel}
|
|
28
|
+
@click=${this.toggleNav}
|
|
29
|
+
>
|
|
30
|
+
☰
|
|
31
|
+
</button>
|
|
32
|
+
<div class="skdx-dashboard-layout__branding"></div>
|
|
33
|
+
${this.title?t.html`<span class="skdx-dashboard-layout__title">${this.title}</span>`:t.nothing}
|
|
34
|
+
<div class="skdx-dashboard-layout__actions"></div>
|
|
35
|
+
</header>
|
|
36
|
+
<div
|
|
37
|
+
class="skdx-dashboard-layout__body"
|
|
38
|
+
data-skdx-dashboard-layout-generated
|
|
39
|
+
>
|
|
40
|
+
<nav
|
|
41
|
+
id=${this.navId}
|
|
42
|
+
class="skdx-dashboard-layout__nav"
|
|
43
|
+
aria-label=${this.navLabel}
|
|
44
|
+
?hidden=${!a}
|
|
45
|
+
>
|
|
46
|
+
${this.navList(this.navigation??[])}
|
|
47
|
+
</nav>
|
|
48
|
+
<main class="skdx-dashboard-layout__content"></main>
|
|
49
|
+
</div>
|
|
50
|
+
`}};l([(0,d.property)({type:String})],o.prototype,"title",2),l([(0,d.property)({attribute:!1})],o.prototype,"navigation",2),l([(0,d.property)({converter:p,attribute:"nav-open"})],o.prototype,"navOpen",2),l([(0,d.property)({converter:p,attribute:"default-nav-open"})],o.prototype,"defaultNavOpen",2),l([(0,d.property)({type:String,attribute:"nav-label"})],o.prototype,"navLabel",2),l([(0,d.property)({type:String,attribute:"nav-toggle-label"})],o.prototype,"navToggleLabel",2),o=l([(0,c.customElement)("skdx-dashboard-layout","dashboard-layout","root")],o);0&&(module.exports={SkdxDashboardLayout});
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { LitElement, type TemplateResult } from 'lit';
|
|
2
|
+
/** One entry of a `<skdx-dashboard-layout>` side navigation. */
|
|
3
|
+
export interface SkdxDashboardNavigationItem {
|
|
4
|
+
/** What the entry renders as: a navigation row, a group label, or a rule. @default 'item' */
|
|
5
|
+
kind?: 'item' | 'header' | 'divider';
|
|
6
|
+
/** The entry's visible text; a divider carries none. @default undefined */
|
|
7
|
+
label?: string;
|
|
8
|
+
/** Where the entry navigates; without it the entry is a plain label row. @default undefined */
|
|
9
|
+
href?: string;
|
|
10
|
+
/** Marks the entry as the current page, emitting `aria-current="page"`. @default false */
|
|
11
|
+
current?: boolean;
|
|
12
|
+
/** Entries nested under this one, rendered as a list inside its row. @default undefined */
|
|
13
|
+
children?: readonly SkdxDashboardNavigationItem[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Application shell block: an app bar, a collapsible side navigation and the content region.
|
|
17
|
+
*
|
|
18
|
+
* Renders light DOM, so its parts are classes rather than shadow `::part()`
|
|
19
|
+
* targets: `.skdx-dashboard-layout` on the host, then `__app-bar`,
|
|
20
|
+
* `__nav-toggle`, `__branding`, `__title`, `__actions`, `__body`, `__nav`,
|
|
21
|
+
* `__nav-list`, `__nav-item`, `__nav-header`, `__nav-divider` and `__content`.
|
|
22
|
+
* `data-nav-open` sits on the host while the navigation is shown.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```html
|
|
26
|
+
* <skdx-dashboard-layout id="shell" title="Acme">
|
|
27
|
+
* <p>Dashboard content.</p>
|
|
28
|
+
* </skdx-dashboard-layout>
|
|
29
|
+
* <script>
|
|
30
|
+
* document.getElementById('shell').navigation = [{ label: 'Home', href: '#', current: true }];
|
|
31
|
+
* </script>
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @slot - The page content rendered inside the `<main>` region.
|
|
35
|
+
* @slot branding - Logo or product mark at the start of the app bar.
|
|
36
|
+
* @slot actions - Controls at the end of the app bar.
|
|
37
|
+
* @fires nav-open-change - Fires with the new open state whenever the navigation toggle is activated.
|
|
38
|
+
*/
|
|
39
|
+
export declare class SkdxDashboardLayout extends LitElement {
|
|
40
|
+
/** Light DOM, so `@skdx/skins` and consumer CSS reach the composed core elements. */
|
|
41
|
+
createRenderRoot(): HTMLElement | DocumentFragment;
|
|
42
|
+
/**
|
|
43
|
+
* Application title shown in the app bar after the branding, shadowing the native tooltip attribute.
|
|
44
|
+
* @default '' — no title renders.
|
|
45
|
+
*/
|
|
46
|
+
title: string;
|
|
47
|
+
/** The side navigation, one entry per row, nested through each entry's `children`. */
|
|
48
|
+
navigation: readonly SkdxDashboardNavigationItem[];
|
|
49
|
+
/**
|
|
50
|
+
* Whether the side navigation is shown, for controlled usage.
|
|
51
|
+
* @default undefined — uncontrolled, following `defaultNavOpen`.
|
|
52
|
+
*/
|
|
53
|
+
navOpen?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Whether the side navigation starts shown, for uncontrolled usage.
|
|
56
|
+
* @default true
|
|
57
|
+
*/
|
|
58
|
+
defaultNavOpen: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Accessible name of the side navigation landmark.
|
|
61
|
+
* @default 'Main navigation'
|
|
62
|
+
*/
|
|
63
|
+
navLabel: string;
|
|
64
|
+
/**
|
|
65
|
+
* Accessible name of the icon-only button that shows and hides the navigation.
|
|
66
|
+
* @default 'Toggle navigation'
|
|
67
|
+
*/
|
|
68
|
+
navToggleLabel: string;
|
|
69
|
+
/** Generated navigation id, published as the toggle's `aria-controls`. */
|
|
70
|
+
private readonly navId;
|
|
71
|
+
/** What the toggle last chose; outranked by `navOpen` whenever the consumer controls the state. */
|
|
72
|
+
private uncontrolledNavOpen?;
|
|
73
|
+
/** Whether the navigation is shown right now, controlled or not. */
|
|
74
|
+
private get open();
|
|
75
|
+
connectedCallback(): void;
|
|
76
|
+
private readonly toggleNav;
|
|
77
|
+
private region;
|
|
78
|
+
protected updated(): void;
|
|
79
|
+
private navList;
|
|
80
|
+
private navItem;
|
|
81
|
+
render(): TemplateResult;
|
|
82
|
+
}
|
|
83
|
+
declare global {
|
|
84
|
+
interface HTMLElementTagNameMap {
|
|
85
|
+
'skdx-dashboard-layout': SkdxDashboardLayout;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { LitElement, type TemplateResult } from 'lit';
|
|
2
|
+
/** One entry of a `<skdx-dashboard-layout>` side navigation. */
|
|
3
|
+
export interface SkdxDashboardNavigationItem {
|
|
4
|
+
/** What the entry renders as: a navigation row, a group label, or a rule. @default 'item' */
|
|
5
|
+
kind?: 'item' | 'header' | 'divider';
|
|
6
|
+
/** The entry's visible text; a divider carries none. @default undefined */
|
|
7
|
+
label?: string;
|
|
8
|
+
/** Where the entry navigates; without it the entry is a plain label row. @default undefined */
|
|
9
|
+
href?: string;
|
|
10
|
+
/** Marks the entry as the current page, emitting `aria-current="page"`. @default false */
|
|
11
|
+
current?: boolean;
|
|
12
|
+
/** Entries nested under this one, rendered as a list inside its row. @default undefined */
|
|
13
|
+
children?: readonly SkdxDashboardNavigationItem[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Application shell block: an app bar, a collapsible side navigation and the content region.
|
|
17
|
+
*
|
|
18
|
+
* Renders light DOM, so its parts are classes rather than shadow `::part()`
|
|
19
|
+
* targets: `.skdx-dashboard-layout` on the host, then `__app-bar`,
|
|
20
|
+
* `__nav-toggle`, `__branding`, `__title`, `__actions`, `__body`, `__nav`,
|
|
21
|
+
* `__nav-list`, `__nav-item`, `__nav-header`, `__nav-divider` and `__content`.
|
|
22
|
+
* `data-nav-open` sits on the host while the navigation is shown.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```html
|
|
26
|
+
* <skdx-dashboard-layout id="shell" title="Acme">
|
|
27
|
+
* <p>Dashboard content.</p>
|
|
28
|
+
* </skdx-dashboard-layout>
|
|
29
|
+
* <script>
|
|
30
|
+
* document.getElementById('shell').navigation = [{ label: 'Home', href: '#', current: true }];
|
|
31
|
+
* </script>
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @slot - The page content rendered inside the `<main>` region.
|
|
35
|
+
* @slot branding - Logo or product mark at the start of the app bar.
|
|
36
|
+
* @slot actions - Controls at the end of the app bar.
|
|
37
|
+
* @fires nav-open-change - Fires with the new open state whenever the navigation toggle is activated.
|
|
38
|
+
*/
|
|
39
|
+
export declare class SkdxDashboardLayout extends LitElement {
|
|
40
|
+
/** Light DOM, so `@skdx/skins` and consumer CSS reach the composed core elements. */
|
|
41
|
+
createRenderRoot(): HTMLElement | DocumentFragment;
|
|
42
|
+
/**
|
|
43
|
+
* Application title shown in the app bar after the branding, shadowing the native tooltip attribute.
|
|
44
|
+
* @default '' — no title renders.
|
|
45
|
+
*/
|
|
46
|
+
title: string;
|
|
47
|
+
/** The side navigation, one entry per row, nested through each entry's `children`. */
|
|
48
|
+
navigation: readonly SkdxDashboardNavigationItem[];
|
|
49
|
+
/**
|
|
50
|
+
* Whether the side navigation is shown, for controlled usage.
|
|
51
|
+
* @default undefined — uncontrolled, following `defaultNavOpen`.
|
|
52
|
+
*/
|
|
53
|
+
navOpen?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Whether the side navigation starts shown, for uncontrolled usage.
|
|
56
|
+
* @default true
|
|
57
|
+
*/
|
|
58
|
+
defaultNavOpen: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Accessible name of the side navigation landmark.
|
|
61
|
+
* @default 'Main navigation'
|
|
62
|
+
*/
|
|
63
|
+
navLabel: string;
|
|
64
|
+
/**
|
|
65
|
+
* Accessible name of the icon-only button that shows and hides the navigation.
|
|
66
|
+
* @default 'Toggle navigation'
|
|
67
|
+
*/
|
|
68
|
+
navToggleLabel: string;
|
|
69
|
+
/** Generated navigation id, published as the toggle's `aria-controls`. */
|
|
70
|
+
private readonly navId;
|
|
71
|
+
/** What the toggle last chose; outranked by `navOpen` whenever the consumer controls the state. */
|
|
72
|
+
private uncontrolledNavOpen?;
|
|
73
|
+
/** Whether the navigation is shown right now, controlled or not. */
|
|
74
|
+
private get open();
|
|
75
|
+
connectedCallback(): void;
|
|
76
|
+
private readonly toggleNav;
|
|
77
|
+
private region;
|
|
78
|
+
protected updated(): void;
|
|
79
|
+
private navList;
|
|
80
|
+
private navItem;
|
|
81
|
+
render(): TemplateResult;
|
|
82
|
+
}
|
|
83
|
+
declare global {
|
|
84
|
+
interface HTMLElementTagNameMap {
|
|
85
|
+
'skdx-dashboard-layout': SkdxDashboardLayout;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var p=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var t=(l,d,a,o)=>{for(var n=o>1?void 0:o?c(d,a):d,s=l.length-1,v;s>=0;s--)(v=l[s])&&(n=(o?v(d,a,n):v(n))||n);return o&&n&&p(d,a,n),n};import{html as r,LitElement as b,nothing as u}from"lit";import{property as i}from"lit/decorators.js";import{customElement as g}from"../internal/define.js";import{emit as m}from"../internal/events.js";import{placeSlotted as _}from"../internal/slots.js";var y="data-skdx-dashboard-layout-generated",h={fromAttribute:l=>l!=="false"},k=0,e=class extends b{constructor(){super(...arguments);this.title="";this.defaultNavOpen=!0;this.navLabel="Main navigation";this.navToggleLabel="Toggle navigation";this.navId=`skdx-dashboard-layout-nav-${++k}`;this.toggleNav=()=>{let a=!this.open;this.uncontrolledNavOpen=a,this.requestUpdate(),m(this,"nav-open-change",a)}}createRenderRoot(){return this}get open(){return this.navOpen??this.uncontrolledNavOpen??this.defaultNavOpen}connectedCallback(){super.connectedCallback(),queueMicrotask(()=>this.requestUpdate())}region(a){return this.querySelector(`.skdx-dashboard-layout__${a}`)}updated(){this.toggleAttribute("data-nav-open",this.open),_(this,y,{branding:this.region("branding"),actions:this.region("actions")},this.region("content"))}navList(a){return r`<ul class="skdx-dashboard-layout__nav-list">
|
|
2
|
+
${a.map(o=>this.navItem(o))}
|
|
3
|
+
</ul>`}navItem(a){return a.kind==="divider"?r`<li
|
|
4
|
+
role="separator"
|
|
5
|
+
class="skdx-dashboard-layout__nav-divider"
|
|
6
|
+
></li>`:a.kind==="header"?r`<li class="skdx-dashboard-layout__nav-header">${a.label??""}</li>`:a.href!==void 0?r`<li>
|
|
7
|
+
<a
|
|
8
|
+
class="skdx-dashboard-layout__nav-item"
|
|
9
|
+
href=${a.href}
|
|
10
|
+
aria-current=${a.current?"page":u}
|
|
11
|
+
>${a.label??""}</a
|
|
12
|
+
>
|
|
13
|
+
</li>`:r`<li>
|
|
14
|
+
<span class="skdx-dashboard-layout__nav-item">${a.label??""}</span>
|
|
15
|
+
${a.children?.length?this.navList(a.children):u}
|
|
16
|
+
</li>`}render(){let a=this.open;return r`
|
|
17
|
+
<header
|
|
18
|
+
class="skdx-dashboard-layout__app-bar"
|
|
19
|
+
data-skdx-dashboard-layout-generated
|
|
20
|
+
>
|
|
21
|
+
<button
|
|
22
|
+
class="skdx-button skdx-dashboard-layout__nav-toggle"
|
|
23
|
+
type="button"
|
|
24
|
+
data-icon-only
|
|
25
|
+
aria-expanded=${a?"true":"false"}
|
|
26
|
+
aria-controls=${this.navId}
|
|
27
|
+
aria-label=${this.navToggleLabel}
|
|
28
|
+
@click=${this.toggleNav}
|
|
29
|
+
>
|
|
30
|
+
☰
|
|
31
|
+
</button>
|
|
32
|
+
<div class="skdx-dashboard-layout__branding"></div>
|
|
33
|
+
${this.title?r`<span class="skdx-dashboard-layout__title">${this.title}</span>`:u}
|
|
34
|
+
<div class="skdx-dashboard-layout__actions"></div>
|
|
35
|
+
</header>
|
|
36
|
+
<div
|
|
37
|
+
class="skdx-dashboard-layout__body"
|
|
38
|
+
data-skdx-dashboard-layout-generated
|
|
39
|
+
>
|
|
40
|
+
<nav
|
|
41
|
+
id=${this.navId}
|
|
42
|
+
class="skdx-dashboard-layout__nav"
|
|
43
|
+
aria-label=${this.navLabel}
|
|
44
|
+
?hidden=${!a}
|
|
45
|
+
>
|
|
46
|
+
${this.navList(this.navigation??[])}
|
|
47
|
+
</nav>
|
|
48
|
+
<main class="skdx-dashboard-layout__content"></main>
|
|
49
|
+
</div>
|
|
50
|
+
`}};t([i({type:String})],e.prototype,"title",2),t([i({attribute:!1})],e.prototype,"navigation",2),t([i({converter:h,attribute:"nav-open"})],e.prototype,"navOpen",2),t([i({converter:h,attribute:"default-nav-open"})],e.prototype,"defaultNavOpen",2),t([i({type:String,attribute:"nav-label"})],e.prototype,"navLabel",2),t([i({type:String,attribute:"nav-toggle-label"})],e.prototype,"navToggleLabel",2),e=t([g("skdx-dashboard-layout","dashboard-layout","root")],e);export{e as SkdxDashboardLayout};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var r=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var k=(o,a)=>{for(var d in a)r(o,d,{get:a[d],enumerable:!0})},m=(o,a,d,e)=>{if(a&&typeof a=="object"||typeof a=="function")for(let t of h(a))!i.call(o,t)&&t!==d&&r(o,t,{get:()=>a[t],enumerable:!(e=b(a,t))||e.enumerable});return o};var p=o=>m(r({},"__esModule",{value:!0}),o);var s={};k(s,{SkdxDashboardLayout:()=>x.SkdxDashboardLayout});module.exports=p(s);var x=require("./DashboardLayout.cjs");0&&(module.exports={SkdxDashboardLayout});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SkdxDashboardLayout, type SkdxDashboardNavigationItem } from './DashboardLayout.cjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SkdxDashboardLayout, type SkdxDashboardNavigationItem } from './DashboardLayout.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{SkdxDashboardLayout as t}from"./DashboardLayout.js";export{t as SkdxDashboardLayout};
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var d=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var k=Object.prototype.hasOwnProperty;var p=(a,e)=>{for(var o in e)d(a,o,{get:e[o],enumerable:!0})},m=(a,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of g(e))!k.call(a,r)&&r!==o&&d(a,r,{get:()=>e[r],enumerable:!(n=S(e,r))||n.enumerable});return a};var y=a=>m(d({},"__esModule",{value:!0}),a);var P={};p(P,{SkdxDashboardLayout:()=>i.SkdxDashboardLayout,SkdxPageContainer:()=>x.SkdxPageContainer,SkdxSignInPage:()=>t.SkdxSignInPage,defaultProviderLabel:()=>t.defaultProviderLabel});module.exports=y(P);var i=require("./dashboard-layout/index.cjs"),x=require("./page-container/index.cjs"),t=require("./sign-in-page/index.cjs");0&&(module.exports={SkdxDashboardLayout,SkdxPageContainer,SkdxSignInPage,defaultProviderLabel});
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { SkdxDashboardLayout, type SkdxDashboardNavigationItem } from './dashboard-layout/index.cjs';
|
|
2
|
+
export { SkdxPageContainer, type SkdxPageContainerBreadcrumb } from './page-container/index.cjs';
|
|
3
|
+
export { defaultProviderLabel, SkdxSignInPage, type SkdxSignInDetail, type SkdxSignInProvider, } from './sign-in-page/index.cjs';
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { SkdxDashboardLayout, type SkdxDashboardNavigationItem } from './dashboard-layout/index.js';
|
|
2
|
+
export { SkdxPageContainer, type SkdxPageContainerBreadcrumb } from './page-container/index.js';
|
|
3
|
+
export { defaultProviderLabel, SkdxSignInPage, type SkdxSignInDetail, type SkdxSignInProvider, } from './sign-in-page/index.js';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{SkdxDashboardLayout as r}from"./dashboard-layout/index.js";import{SkdxPageContainer as t}from"./page-container/index.js";import{defaultProviderLabel as n,SkdxSignInPage as i}from"./sign-in-page/index.js";export{r as SkdxDashboardLayout,t as SkdxPageContainer,i as SkdxSignInPage,n as defaultProviderLabel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var l=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var r=Object.prototype.hasOwnProperty;var a=(e,t)=>{for(var o in t)l(e,o,{get:t[o],enumerable:!0})},C=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of i(t))!r.call(e,s)&&s!==o&&l(e,s,{get:()=>t[s],enumerable:!(n=m(t,s))||n.enumerable});return e};var p=e=>C(l({},"__esModule",{value:!0}),e);var d={};a(d,{customElement:()=>u});module.exports=p(d);var c=require("./part.cjs"),u=(e,t,o)=>n=>{E(n,t,o),customElements.get(e)===void 0&&customElements.define(e,n)};function E(e,t,o){let n=e.prototype,s=n.connectedCallback;n.connectedCallback=function(){(0,c.applyHostPart)(this,t,o),s?.call(this)}}0&&(module.exports={customElement});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CustomElementDecorator } from 'lit/decorators.js';
|
|
2
|
+
/**
|
|
3
|
+
* Decorator that registers `tagName` once — skipping a tag another copy of this
|
|
4
|
+
* package already defined — and applies the block's host class and `data-part`
|
|
5
|
+
* on connect.
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare const customElement: (tagName: string, component: string, part: string) => CustomElementDecorator;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CustomElementDecorator } from 'lit/decorators.js';
|
|
2
|
+
/**
|
|
3
|
+
* Decorator that registers `tagName` once — skipping a tag another copy of this
|
|
4
|
+
* package already defined — and applies the block's host class and `data-part`
|
|
5
|
+
* on connect.
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare const customElement: (tagName: string, component: string, part: string) => CustomElementDecorator;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{applyHostPart as l}from"./part.js";var i=(e,o,n)=>t=>{c(t,o,n),customElements.get(e)===void 0&&customElements.define(e,t)};function c(e,o,n){let t=e.prototype,s=t.connectedCallback;t.connectedCallback=function(){l(this,o,n),s?.call(this)}}export{i as customElement};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var i=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var T=(e,t)=>{for(var o in t)i(e,o,{get:t[o],enumerable:!0})},E=(e,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of u(t))!v.call(e,n)&&n!==o&&i(e,n,{get:()=>t[n],enumerable:!(s=r(t,n))||s.enumerable});return e};var a=e=>E(i({},"__esModule",{value:!0}),e);var d={};T(d,{emit:()=>c});module.exports=a(d);function c(e,t,o,s){let n=new CustomEvent(t,{detail:o,bubbles:!0,composed:!0,...s});return e.dispatchEvent(n),n}0&&(module.exports={emit});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dispatches `name` on `host` as a `CustomEvent`, defaulting to this package's
|
|
3
|
+
* `{ bubbles: true, composed: true }` so a public event reaches a listener bound
|
|
4
|
+
* on an ancestor.
|
|
5
|
+
*
|
|
6
|
+
* @param detail - the event's `detail`; omit for a `CustomEvent<void>`.
|
|
7
|
+
* @param init - overrides merged over the defaults, for `cancelable` or a
|
|
8
|
+
* deliberately non-bubbling event.
|
|
9
|
+
* @returns the dispatched event, so a caller can read `defaultPrevented`.
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare function emit<T = void>(host: EventTarget, name: string, detail?: T, init?: EventInit): CustomEvent<T>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dispatches `name` on `host` as a `CustomEvent`, defaulting to this package's
|
|
3
|
+
* `{ bubbles: true, composed: true }` so a public event reaches a listener bound
|
|
4
|
+
* on an ancestor.
|
|
5
|
+
*
|
|
6
|
+
* @param detail - the event's `detail`; omit for a `CustomEvent<void>`.
|
|
7
|
+
* @param init - overrides merged over the defaults, for `cancelable` or a
|
|
8
|
+
* deliberately non-bubbling event.
|
|
9
|
+
* @returns the dispatched event, so a caller can read `defaultPrevented`.
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare function emit<T = void>(host: EventTarget, name: string, detail?: T, init?: EventInit): CustomEvent<T>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function i(e,n,o,s){let t=new CustomEvent(n,{detail:o,bubbles:!0,composed:!0,...s});return e.dispatchEvent(t),t}export{i as emit};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var l=(a,t)=>{for(var s in t)e(a,s,{get:t[s],enumerable:!0})},u=(a,t,s,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let d of n(t))!p.call(a,d)&&d!==s&&e(a,d,{get:()=>t[d],enumerable:!(i=r(t,d))||i.enumerable});return a};var x=a=>u(e({},"__esModule",{value:!0}),a);var c={};l(c,{applyHostPart:()=>b});module.exports=x(c);function b(a,t,s){a.classList.add(`skdx-${t}`),a.setAttribute("data-part",s),a.setAttribute("data-skdx-component",t)}0&&(module.exports={applyHostPart});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adds a block's styling hooks to its host through `classList.add`, so a consumer's own classes survive.
|
|
3
|
+
* Every block element is its family's root, so the class is the bare family name.
|
|
4
|
+
*
|
|
5
|
+
* @param host - The custom element itself.
|
|
6
|
+
* @param component - Family name in kebab-case, e.g. `'page-container'`.
|
|
7
|
+
* @param part - Part name written to `data-part`, always `'root'` here.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare function applyHostPart(host: HTMLElement, component: string, part: string): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adds a block's styling hooks to its host through `classList.add`, so a consumer's own classes survive.
|
|
3
|
+
* Every block element is its family's root, so the class is the bare family name.
|
|
4
|
+
*
|
|
5
|
+
* @param host - The custom element itself.
|
|
6
|
+
* @param component - Family name in kebab-case, e.g. `'page-container'`.
|
|
7
|
+
* @param part - Part name written to `data-part`, always `'root'` here.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare function applyHostPart(host: HTMLElement, component: string, part: string): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function d(t,a,s){t.classList.add(`skdx-${a}`),t.setAttribute("data-part",s),t.setAttribute("data-skdx-component",a)}export{d as applyHostPart};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var d=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var E=(n,e)=>{for(var o in e)d(n,o,{get:e[o],enumerable:!0})},a=(n,e,o,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of s(e))!u.call(n,t)&&t!==o&&d(n,t,{get:()=>e[t],enumerable:!(l=c(e,t))||l.enumerable});return n};var m=n=>a(d({},"__esModule",{value:!0}),n);var f={};E(f,{placeSlotted:()=>p});module.exports=m(f);function p(n,e,o,l){for(let t of Array.from(n.childNodes)){if(t.nodeType===Node.COMMENT_NODE)continue;if(t.nodeType!==Node.ELEMENT_NODE){t.textContent?.trim()&&l?.append(t);continue}let i=t;if(i.hasAttribute(e))continue;let r=i.getAttribute("slot");(r===null?l:o[r]??null)?.append(i)}}0&&(module.exports={placeSlotted});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Moves a block's consumer children into the regions it generated: an element
|
|
3
|
+
* carrying `slot="name"` goes to `regions[name]`, everything else to `fallback`.
|
|
4
|
+
* A block renders light DOM, where `<slot>` is inert, so placement is a move.
|
|
5
|
+
*
|
|
6
|
+
* A node whose region has not rendered yet is left where it is, for the next pass.
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare function placeSlotted(host: HTMLElement, marker: string, regions: Readonly<Record<string, HTMLElement | null>>, fallback: HTMLElement | null): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Moves a block's consumer children into the regions it generated: an element
|
|
3
|
+
* carrying `slot="name"` goes to `regions[name]`, everything else to `fallback`.
|
|
4
|
+
* A block renders light DOM, where `<slot>` is inert, so placement is a move.
|
|
5
|
+
*
|
|
6
|
+
* A node whose region has not rendered yet is left where it is, for the next pass.
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare function placeSlotted(host: HTMLElement, marker: string, regions: Readonly<Record<string, HTMLElement | null>>, fallback: HTMLElement | null): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function c(l,i,d,n){for(let e of Array.from(l.childNodes)){if(e.nodeType===Node.COMMENT_NODE)continue;if(e.nodeType!==Node.ELEMENT_NODE){e.textContent?.trim()&&n?.append(e);continue}let t=e;if(t.hasAttribute(i))continue;let o=t.getAttribute("slot");(o===null?n:d[o]??null)?.append(t)}}export{c as placeSlotted};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";var d=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var k=(r,e)=>{for(var a in e)d(r,a,{get:e[a],enumerable:!0})},v=(r,e,a,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of g(e))!h.call(r,t)&&t!==a&&d(r,t,{get:()=>e[t],enumerable:!(s=p(e,t))||s.enumerable});return r};var x=r=>v(d({},"__esModule",{value:!0}),r),o=(r,e,a,s)=>{for(var t=s>1?void 0:s?p(e,a):e,c=r.length-1,b;c>=0;c--)(b=r[c])&&(t=(s?b(e,a,t):b(t))||t);return s&&t&&d(e,a,t),t};var L={};k(L,{SkdxPageContainer:()=>i});module.exports=x(L);var n=require("lit"),l=require("lit/decorators.js"),m=require("../internal/define.cjs"),u=require("../internal/slots.cjs"),E=require("@skdx/web-components/breadcrumb"),f=require("@skdx/web-components/heading"),T=require("@skdx/web-components/toolbar");var _="data-skdx-page-container-generated",y=0,i=class extends n.LitElement{constructor(){super(...arguments);this.headingLevel=1;this.breadcrumbLabel="Breadcrumb";this.actionsLabel="Page actions";this.titleId=`skdx-page-container-title-${++y}`}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.setAttribute("role","region"),this.setAttribute("aria-labelledby",this.titleId),queueMicrotask(()=>this.requestUpdate())}get hasActions(){return this.querySelector('[slot="actions"]')!==null}region(a){return this.querySelector(`.skdx-page-container__${a}`)}updated(){(0,u.placeSlotted)(this,_,{actions:this.region("actions")},this.region("content"))}render(){return n.html`
|
|
2
|
+
<header
|
|
3
|
+
class="skdx-page-container__header"
|
|
4
|
+
data-skdx-page-container-generated
|
|
5
|
+
role="none"
|
|
6
|
+
>
|
|
7
|
+
${this.breadcrumbs?.length?n.html`<skdx-breadcrumb
|
|
8
|
+
class="skdx-page-container__breadcrumbs"
|
|
9
|
+
label=${this.breadcrumbLabel}
|
|
10
|
+
.items=${this.breadcrumbs}
|
|
11
|
+
></skdx-breadcrumb>`:n.nothing}
|
|
12
|
+
<div class="skdx-page-container__heading-row">
|
|
13
|
+
<skdx-heading
|
|
14
|
+
class="skdx-page-container__title"
|
|
15
|
+
as=${`h${this.headingLevel}`}
|
|
16
|
+
id=${this.titleId}
|
|
17
|
+
>${this.title??""}</skdx-heading
|
|
18
|
+
>
|
|
19
|
+
${this.hasActions?n.html`<skdx-toolbar
|
|
20
|
+
class="skdx-page-container__actions"
|
|
21
|
+
aria-label=${this.actionsLabel}
|
|
22
|
+
></skdx-toolbar>`:n.nothing}
|
|
23
|
+
</div>
|
|
24
|
+
</header>
|
|
25
|
+
<div
|
|
26
|
+
class="skdx-page-container__content"
|
|
27
|
+
data-skdx-page-container-generated
|
|
28
|
+
></div>
|
|
29
|
+
`}};o([(0,l.property)({type:String})],i.prototype,"title",2),o([(0,l.property)({type:Number,attribute:"heading-level"})],i.prototype,"headingLevel",2),o([(0,l.property)({attribute:!1})],i.prototype,"breadcrumbs",2),o([(0,l.property)({type:String,attribute:"breadcrumb-label"})],i.prototype,"breadcrumbLabel",2),o([(0,l.property)({type:String,attribute:"actions-label"})],i.prototype,"actionsLabel",2),i=o([(0,m.customElement)("skdx-page-container","page-container","root")],i);0&&(module.exports={SkdxPageContainer});
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { LitElement, type TemplateResult } from 'lit';
|
|
2
|
+
import '@skdx/web-components/breadcrumb';
|
|
3
|
+
import '@skdx/web-components/heading';
|
|
4
|
+
import '@skdx/web-components/toolbar';
|
|
5
|
+
/** One crumb of a `<skdx-page-container>` trail, ancestor first. */
|
|
6
|
+
export interface SkdxPageContainerBreadcrumb {
|
|
7
|
+
/** The crumb's text. */
|
|
8
|
+
label: string;
|
|
9
|
+
/** Where the crumb navigates; without it the crumb is non-navigable current-page text. @default undefined */
|
|
10
|
+
href?: string;
|
|
11
|
+
/** Marks a navigable crumb as the current page, emitting `aria-current="page"`. @default false */
|
|
12
|
+
current?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Page header block: a breadcrumb trail, a heading and page-level actions above the page content.
|
|
16
|
+
*
|
|
17
|
+
* Renders light DOM, so its parts are classes rather than shadow `::part()`
|
|
18
|
+
* targets: `.skdx-page-container` on the host, then `__header`,
|
|
19
|
+
* `__breadcrumbs`, `__heading-row`, `__title`, `__actions` and `__content`.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```html
|
|
23
|
+
* <skdx-page-container title="Billing">
|
|
24
|
+
* <skdx-button slot="actions">Export</skdx-button>
|
|
25
|
+
* <p>Invoices and payment methods.</p>
|
|
26
|
+
* </skdx-page-container>
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @slot - The page content below the header.
|
|
30
|
+
* @slot actions - Controls placed in the toolbar beside the heading.
|
|
31
|
+
*/
|
|
32
|
+
export declare class SkdxPageContainer extends LitElement {
|
|
33
|
+
/** Light DOM, so `@skdx/skins` and consumer CSS reach the composed core elements. */
|
|
34
|
+
createRenderRoot(): HTMLElement | DocumentFragment;
|
|
35
|
+
/** The page heading text, rendered into a derived Heading that also names the section. */
|
|
36
|
+
title: string;
|
|
37
|
+
/**
|
|
38
|
+
* Heading level of the derived title. A page container normally holds the page's only `<h1>`; lower it when the block sits inside a larger outline.
|
|
39
|
+
* @default 1
|
|
40
|
+
*/
|
|
41
|
+
headingLevel: 1 | 2 | 3 | 4 | 5 | 6;
|
|
42
|
+
/**
|
|
43
|
+
* Trail rendered into a derived Breadcrumb above the heading.
|
|
44
|
+
* @default undefined — no breadcrumb region renders.
|
|
45
|
+
*/
|
|
46
|
+
breadcrumbs?: readonly SkdxPageContainerBreadcrumb[];
|
|
47
|
+
/**
|
|
48
|
+
* Accessible name of the derived breadcrumb `<nav>` landmark.
|
|
49
|
+
* @default 'Breadcrumb'
|
|
50
|
+
*/
|
|
51
|
+
breadcrumbLabel: string;
|
|
52
|
+
/**
|
|
53
|
+
* Accessible name of the derived actions Toolbar beside the heading.
|
|
54
|
+
* @default 'Page actions'
|
|
55
|
+
*/
|
|
56
|
+
actionsLabel: string;
|
|
57
|
+
/** Generated title id, published as the section's `aria-labelledby`. */
|
|
58
|
+
private readonly titleId;
|
|
59
|
+
connectedCallback(): void;
|
|
60
|
+
/** Whether the consumer supplied anything for the toolbar — still true once it has been moved in. */
|
|
61
|
+
private get hasActions();
|
|
62
|
+
private region;
|
|
63
|
+
protected updated(): void;
|
|
64
|
+
render(): TemplateResult;
|
|
65
|
+
}
|
|
66
|
+
declare global {
|
|
67
|
+
interface HTMLElementTagNameMap {
|
|
68
|
+
'skdx-page-container': SkdxPageContainer;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { LitElement, type TemplateResult } from 'lit';
|
|
2
|
+
import '@skdx/web-components/breadcrumb';
|
|
3
|
+
import '@skdx/web-components/heading';
|
|
4
|
+
import '@skdx/web-components/toolbar';
|
|
5
|
+
/** One crumb of a `<skdx-page-container>` trail, ancestor first. */
|
|
6
|
+
export interface SkdxPageContainerBreadcrumb {
|
|
7
|
+
/** The crumb's text. */
|
|
8
|
+
label: string;
|
|
9
|
+
/** Where the crumb navigates; without it the crumb is non-navigable current-page text. @default undefined */
|
|
10
|
+
href?: string;
|
|
11
|
+
/** Marks a navigable crumb as the current page, emitting `aria-current="page"`. @default false */
|
|
12
|
+
current?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Page header block: a breadcrumb trail, a heading and page-level actions above the page content.
|
|
16
|
+
*
|
|
17
|
+
* Renders light DOM, so its parts are classes rather than shadow `::part()`
|
|
18
|
+
* targets: `.skdx-page-container` on the host, then `__header`,
|
|
19
|
+
* `__breadcrumbs`, `__heading-row`, `__title`, `__actions` and `__content`.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```html
|
|
23
|
+
* <skdx-page-container title="Billing">
|
|
24
|
+
* <skdx-button slot="actions">Export</skdx-button>
|
|
25
|
+
* <p>Invoices and payment methods.</p>
|
|
26
|
+
* </skdx-page-container>
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @slot - The page content below the header.
|
|
30
|
+
* @slot actions - Controls placed in the toolbar beside the heading.
|
|
31
|
+
*/
|
|
32
|
+
export declare class SkdxPageContainer extends LitElement {
|
|
33
|
+
/** Light DOM, so `@skdx/skins` and consumer CSS reach the composed core elements. */
|
|
34
|
+
createRenderRoot(): HTMLElement | DocumentFragment;
|
|
35
|
+
/** The page heading text, rendered into a derived Heading that also names the section. */
|
|
36
|
+
title: string;
|
|
37
|
+
/**
|
|
38
|
+
* Heading level of the derived title. A page container normally holds the page's only `<h1>`; lower it when the block sits inside a larger outline.
|
|
39
|
+
* @default 1
|
|
40
|
+
*/
|
|
41
|
+
headingLevel: 1 | 2 | 3 | 4 | 5 | 6;
|
|
42
|
+
/**
|
|
43
|
+
* Trail rendered into a derived Breadcrumb above the heading.
|
|
44
|
+
* @default undefined — no breadcrumb region renders.
|
|
45
|
+
*/
|
|
46
|
+
breadcrumbs?: readonly SkdxPageContainerBreadcrumb[];
|
|
47
|
+
/**
|
|
48
|
+
* Accessible name of the derived breadcrumb `<nav>` landmark.
|
|
49
|
+
* @default 'Breadcrumb'
|
|
50
|
+
*/
|
|
51
|
+
breadcrumbLabel: string;
|
|
52
|
+
/**
|
|
53
|
+
* Accessible name of the derived actions Toolbar beside the heading.
|
|
54
|
+
* @default 'Page actions'
|
|
55
|
+
*/
|
|
56
|
+
actionsLabel: string;
|
|
57
|
+
/** Generated title id, published as the section's `aria-labelledby`. */
|
|
58
|
+
private readonly titleId;
|
|
59
|
+
connectedCallback(): void;
|
|
60
|
+
/** Whether the consumer supplied anything for the toolbar — still true once it has been moved in. */
|
|
61
|
+
private get hasActions();
|
|
62
|
+
private region;
|
|
63
|
+
protected updated(): void;
|
|
64
|
+
render(): TemplateResult;
|
|
65
|
+
}
|
|
66
|
+
declare global {
|
|
67
|
+
interface HTMLElementTagNameMap {
|
|
68
|
+
'skdx-page-container': SkdxPageContainer;
|
|
69
|
+
}
|
|
70
|
+
}
|