@m3e/nav-rail 1.0.0-rc.2 → 1.0.0-rc.3
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/dist/custom-elements.json +11 -19
- package/dist/src/NavRailElement.d.ts +69 -0
- package/dist/src/NavRailElement.d.ts.map +1 -0
- package/dist/src/NavRailToggleElement.d.ts +52 -0
- package/dist/src/NavRailToggleElement.d.ts.map +1 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -1180,25 +1180,6 @@
|
|
|
1180
1180
|
"kind": "mixin",
|
|
1181
1181
|
"description": "Mixin that adds support for custom event attributes.",
|
|
1182
1182
|
"name": "EventAttribute",
|
|
1183
|
-
"members": [
|
|
1184
|
-
{
|
|
1185
|
-
"kind": "method",
|
|
1186
|
-
"name": "dispatchEvent",
|
|
1187
|
-
"return": {
|
|
1188
|
-
"type": {
|
|
1189
|
-
"text": "boolean"
|
|
1190
|
-
}
|
|
1191
|
-
},
|
|
1192
|
-
"parameters": [
|
|
1193
|
-
{
|
|
1194
|
-
"name": "event",
|
|
1195
|
-
"type": {
|
|
1196
|
-
"text": "Event"
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
|
-
]
|
|
1200
|
-
}
|
|
1201
|
-
],
|
|
1202
1183
|
"parameters": [
|
|
1203
1184
|
{
|
|
1204
1185
|
"name": "base",
|
|
@@ -1496,6 +1477,17 @@
|
|
|
1496
1477
|
"description": "Mixin to augment an element with behavior used to submit a form.",
|
|
1497
1478
|
"name": "FormSubmitter",
|
|
1498
1479
|
"members": [
|
|
1480
|
+
{
|
|
1481
|
+
"kind": "field",
|
|
1482
|
+
"name": "formAssociated",
|
|
1483
|
+
"type": {
|
|
1484
|
+
"text": "boolean"
|
|
1485
|
+
},
|
|
1486
|
+
"static": true,
|
|
1487
|
+
"readonly": true,
|
|
1488
|
+
"default": "true",
|
|
1489
|
+
"description": "Indicates that this custom element participates in form submission, validation, and form state restoration."
|
|
1490
|
+
},
|
|
1499
1491
|
{
|
|
1500
1492
|
"kind": "field",
|
|
1501
1493
|
"name": "name",
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { CSSResultGroup } from "lit";
|
|
2
|
+
import { M3eNavBarElement, NavItemOrientation } from "@m3e/nav-bar";
|
|
3
|
+
/**
|
|
4
|
+
* A vertical bar, typically used on larger devices, that allows a user to switch between views.
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* The `m3e-nav-rail` component provides a vertical navigation rail for switching between views in
|
|
8
|
+
* an application. Designed for larger devices, it supports compact and expanded modes, interactive
|
|
9
|
+
* items, and theming via CSS custom properties.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* The following example illustrates a nav rail whose expanded state is automatically determined by the
|
|
13
|
+
* current screen size. In addition, a toggle button is used to allow the user to manually toggle the
|
|
14
|
+
* expanded state.
|
|
15
|
+
*
|
|
16
|
+
* ```html
|
|
17
|
+
* <m3e-nav-rail id="nav-rail" mode="auto">
|
|
18
|
+
* <m3e-icon-button toggle>
|
|
19
|
+
* <m3e-icon name="menu"></m3e-icon>
|
|
20
|
+
* <m3e-icon slot="selected" name="menu_open"></m3e-icon>
|
|
21
|
+
* <m3e-nav-rail-toggle for="nav-rail"></m3e-nav-rail-toggle>
|
|
22
|
+
* </m3e-icon-button>
|
|
23
|
+
* <m3e-fab size="small">
|
|
24
|
+
* <m3e-icon name="edit"></m3e-icon>
|
|
25
|
+
* <span slot="label">Extended</span>
|
|
26
|
+
* </m3e-fab>
|
|
27
|
+
* <m3e-nav-item><m3e-icon slot="icon" name="news"></m3e-icon>News</m3e-nav-item>
|
|
28
|
+
* <m3e-nav-item><m3e-icon slot="icon" name="globe"></m3e-icon>Global</m3e-nav-item>
|
|
29
|
+
* <m3e-nav-item><m3e-icon slot="icon" name="star"></m3e-icon>For you</m3e-nav-item>
|
|
30
|
+
* <m3e-nav-item><m3e-icon slot="icon" name="newsstand"></m3e-icon>Trending</m3e-nav-item>
|
|
31
|
+
* </m3e-nav-rail>
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @tag m3e-nav-rail
|
|
35
|
+
*
|
|
36
|
+
* @attr mode - The mode in which items in the rail are presented.
|
|
37
|
+
*
|
|
38
|
+
* @fires change - Emitted when the selected state of an item changes.
|
|
39
|
+
*
|
|
40
|
+
* @cssprop --m3e-nav-rail-top-space - Top block padding for the nav rail.
|
|
41
|
+
* @cssprop --m3e-nav-rail-bottom-space - Bottom block padding for the nav rail.
|
|
42
|
+
* @cssprop --m3e-nav-rail-compact-width - Width of the nav rail in compact mode.
|
|
43
|
+
* @cssprop --m3e-nav-rail-expanded-inline-padding - Inline padding for expanded nav rail.
|
|
44
|
+
* @cssprop --m3e-nav-rail-expanded-min-width - Minimum width of the nav rail in expanded mode.
|
|
45
|
+
* @cssprop --m3e-nav-rail-expanded-max-width - Maximum width of the nav rail in expanded mode.
|
|
46
|
+
* @cssprop --m3e-nav-rail-expanded-item-height - Height of nav items in expanded mode.
|
|
47
|
+
* @cssprop --m3e-nav-rail-button-item-space - Space below icon buttons and FABs.
|
|
48
|
+
* @cssprop --m3e-nav-rail-expanded-icon-button-inset - Inset for icon buttons in expanded mode.
|
|
49
|
+
*/
|
|
50
|
+
export declare class M3eNavRailElement extends M3eNavBarElement {
|
|
51
|
+
#private;
|
|
52
|
+
/** The styles of the element. */
|
|
53
|
+
static styles: CSSResultGroup;
|
|
54
|
+
constructor();
|
|
55
|
+
/** @inheritdoc */
|
|
56
|
+
connectedCallback(): void;
|
|
57
|
+
/** @inheritdoc */
|
|
58
|
+
disconnectedCallback(): void;
|
|
59
|
+
/** @inheritdoc @internal */
|
|
60
|
+
protected _updateItems(): void;
|
|
61
|
+
/** @inheritdoc @internal */
|
|
62
|
+
protected _updateOrientation(orientation: NavItemOrientation): void;
|
|
63
|
+
}
|
|
64
|
+
declare global {
|
|
65
|
+
interface HTMLElementTagNameMap {
|
|
66
|
+
"m3e-nav-rail": M3eNavRailElement;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=NavRailElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavRailElement.d.ts","sourceRoot":"","sources":["../../src/NavRailElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,cAAc,EAAE,MAAM,KAAK,CAAC;AAK1C,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,qBACa,iBAAkB,SAAQ,gBAAgB;;IACrD,iCAAiC;IACjC,OAAgB,MAAM,EAAE,cAAc,CAuCpC;;IAaF,kBAAkB;IACT,iBAAiB,IAAI,IAAI;IAKlC,kBAAkB;IACT,oBAAoB,IAAI,IAAI;IAUrC,4BAA4B;cACT,YAAY,IAAI,IAAI;IAavC,4BAA4B;cACT,kBAAkB,CAAC,WAAW,EAAE,kBAAkB,GAAG,IAAI;CAI7E;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,iBAAiB,CAAC;KACnC;CACF"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { CSSResultGroup, LitElement } from "lit";
|
|
2
|
+
declare const M3eNavRailToggleElement_base: import("node_modules/@m3e/core/dist/src/shared/mixins/Constructor").Constructor<import("@m3e/core").HtmlForMixin> & typeof LitElement;
|
|
3
|
+
/**
|
|
4
|
+
* An element, nested within a clickable element, used to toggle the expanded state of a navigation rail.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* The following example illustrates a nav rail whose expanded state is automatically determined by the
|
|
8
|
+
* current screen size. In addition, a toggle button is used to allow the user to manually toggle the
|
|
9
|
+
* expanded state.
|
|
10
|
+
*
|
|
11
|
+
* ```html
|
|
12
|
+
* <m3e-nav-rail id="nav-rail" mode="auto">
|
|
13
|
+
* <m3e-icon-button toggle>
|
|
14
|
+
* <m3e-icon name="menu"></m3e-icon>
|
|
15
|
+
* <m3e-icon slot="selected" name="menu_open"></m3e-icon>
|
|
16
|
+
* <m3e-nav-rail-toggle for="nav-rail"></m3e-nav-rail-toggle>
|
|
17
|
+
* </m3e-icon-button>
|
|
18
|
+
* <m3e-fab size="small">
|
|
19
|
+
* <m3e-icon name="edit"></m3e-icon>
|
|
20
|
+
* <span slot="label">Extended</span>
|
|
21
|
+
* </m3e-fab>
|
|
22
|
+
* <m3e-nav-item><m3e-icon slot="icon" name="news"></m3e-icon>News</m3e-nav-item>
|
|
23
|
+
* <m3e-nav-item><m3e-icon slot="icon" name="globe"></m3e-icon>Global</m3e-nav-item>
|
|
24
|
+
* <m3e-nav-item><m3e-icon slot="icon" name="star"></m3e-icon>For you</m3e-nav-item>
|
|
25
|
+
* <m3e-nav-item><m3e-icon slot="icon" name="newsstand"></m3e-icon>Trending</m3e-nav-item>
|
|
26
|
+
* </m3e-nav-rail>
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @tag m3e-nav-rail-toggle
|
|
30
|
+
*/
|
|
31
|
+
export declare class M3eNavRailToggleElement extends M3eNavRailToggleElement_base {
|
|
32
|
+
#private;
|
|
33
|
+
/** The styles of the element. */
|
|
34
|
+
static styles: CSSResultGroup;
|
|
35
|
+
/** @inheritdoc */
|
|
36
|
+
connectedCallback(): void;
|
|
37
|
+
/** @inheritdoc */
|
|
38
|
+
disconnectedCallback(): void;
|
|
39
|
+
/** @inheritdoc */
|
|
40
|
+
attach(control: HTMLElement): void;
|
|
41
|
+
/** @inheritdoc */
|
|
42
|
+
detach(): void;
|
|
43
|
+
/** @inheritdoc */
|
|
44
|
+
protected render(): unknown;
|
|
45
|
+
}
|
|
46
|
+
declare global {
|
|
47
|
+
interface HTMLElementTagNameMap {
|
|
48
|
+
"m3e-nav-rail-toggle": M3eNavRailToggleElement;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
export {};
|
|
52
|
+
//# sourceMappingURL=NavRailToggleElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavRailToggleElement.d.ts","sourceRoot":"","sources":["../../src/NavRailToggleElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,cAAc,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;;AAO5D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBACa,uBAAwB,SAAQ,4BAAmB;;IAC9D,iCAAiC;IACjC,OAAgB,MAAM,EAAE,cAAc,CAOpC;IASF,kBAAkB;IACT,iBAAiB,IAAI,IAAI;IAKlC,kBAAkB;IACT,oBAAoB,IAAI,IAAI;IAKrC,kBAAkB;IACT,MAAM,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAQ3C,kBAAkB;IACT,MAAM,IAAI,IAAI;IAQvB,kBAAkB;cACC,MAAM,IAAI,OAAO;CAoBrC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,qBAAqB,EAAE,uBAAuB,CAAC;KAChD;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m3e/nav-rail",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.3",
|
|
4
4
|
"description": "Navigation Rail for M3E",
|
|
5
5
|
"author": "matraic <matraic@yahoo.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"clean": "rimraf dist"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@m3e/core": "1.0.0-rc.
|
|
31
|
-
"@m3e/nav-bar": "1.0.0-rc.
|
|
30
|
+
"@m3e/core": "1.0.0-rc.3",
|
|
31
|
+
"@m3e/nav-bar": "1.0.0-rc.3",
|
|
32
32
|
"lit": "^3.3.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|