@m3e/expansion-panel 1.0.0-rc.2 → 1.0.0-rc.4
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/README.md +1 -1
- package/dist/custom-elements.json +25 -51
- package/dist/html-custom-data.json +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/src/AccordionElement.d.ts +53 -0
- package/dist/src/AccordionElement.d.ts.map +1 -0
- package/dist/src/ExpansionHeaderElement.d.ts +62 -0
- package/dist/src/ExpansionHeaderElement.d.ts.map +1 -0
- package/dist/src/ExpansionPanelElement.d.ts +120 -0
- package/dist/src/ExpansionPanelElement.d.ts.map +1 -0
- package/dist/src/ExpansionToggleDirection.d.ts +3 -0
- package/dist/src/ExpansionToggleDirection.d.ts.map +1 -0
- package/dist/src/ExpansionTogglePosition.d.ts +3 -0
- package/dist/src/ExpansionTogglePosition.d.ts.map +1 -0
- package/dist/src/index.d.ts +6 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/styles/ExpansionHeaderStyle.d.ts +6 -0
- package/dist/src/styles/ExpansionHeaderStyle.d.ts.map +1 -0
- package/dist/src/styles/ExpansionHeaderToken.d.ts +17 -0
- package/dist/src/styles/ExpansionHeaderToken.d.ts.map +1 -0
- package/dist/src/styles/ExpansionPanelStyle.d.ts +6 -0
- package/dist/src/styles/ExpansionPanelStyle.d.ts.map +1 -0
- package/dist/src/styles/ExpansionPanelToken.d.ts +21 -0
- package/dist/src/styles/ExpansionPanelToken.d.ts.map +1 -0
- package/dist/src/styles/index.d.ts +3 -0
- package/dist/src/styles/index.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { CSSResultGroup, LitElement } from "lit";
|
|
2
|
+
import { ExpansionTogglePosition } from "./ExpansionTogglePosition";
|
|
3
|
+
import { ExpansionToggleDirection } from "./ExpansionToggleDirection";
|
|
4
|
+
declare const M3eExpansionPanelElement_base: import("node_modules/@m3e/core/dist/src/shared/mixins/Constructor").Constructor<import("@m3e/core").DisabledMixin> & import("node_modules/@m3e/core/dist/src/shared/mixins/Constructor").Constructor<import("@m3e/core").AttachInternalsMixin> & typeof LitElement;
|
|
5
|
+
/**
|
|
6
|
+
* An expandable details-summary view.
|
|
7
|
+
*
|
|
8
|
+
* @description
|
|
9
|
+
* The `m3e-expansion-panel` component provides an accessible, animated details-summary view for
|
|
10
|
+
* organizing content in collapsible sections. It supports custom header, content, actions, and
|
|
11
|
+
* toggle icon slots, and offers configurable toggle position and direction. The panel responds to
|
|
12
|
+
* open/close states, emits lifecycle events, and supports rich theming via CSS custom properties
|
|
13
|
+
* for elevation, shape, spacing, and color.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* The following example illustrates the basic use of the `m3e-accordion` and `m3e-expansion-panel` components.
|
|
17
|
+
*
|
|
18
|
+
* ```html
|
|
19
|
+
* <m3e-accordion>
|
|
20
|
+
* <m3e-expansion-panel>
|
|
21
|
+
* <span slot="header">Panel 1</span>
|
|
22
|
+
* I am content for the first expansion panel
|
|
23
|
+
* </m3e-expansion-panel>
|
|
24
|
+
* <m3e-expansion-panel>
|
|
25
|
+
* <span slot="header">Panel 2</span>
|
|
26
|
+
* I am content for the second expansion panel
|
|
27
|
+
* </m3e-expansion-panel>
|
|
28
|
+
* </m3e-accordion>
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @tag m3e-expansion-panel
|
|
32
|
+
*
|
|
33
|
+
* @slot - Renders the detail of the panel.
|
|
34
|
+
* @slot actions - Renders the actions bar of the panel.
|
|
35
|
+
* @slot header - Renders the header content.
|
|
36
|
+
* @slot toggle-icon - Renders the expansion toggle icon.
|
|
37
|
+
*
|
|
38
|
+
* @attr disabled - Whether the element is disabled.
|
|
39
|
+
* @attr hide-toggle - Whether to hide the expansion toggle.
|
|
40
|
+
* @attr open - Whether the panel is expanded.
|
|
41
|
+
* @attr toggle-direction - The direction of the expansion toggle.
|
|
42
|
+
* @attr toggle-position - The position of the expansion toggle.
|
|
43
|
+
*
|
|
44
|
+
* @fires opening - Emitted when the expansion panel begins to open.
|
|
45
|
+
* @fires opened - Emitted when the expansion panel has opened.
|
|
46
|
+
* @fires closing - Emitted when the expansion panel begins to close.
|
|
47
|
+
* @fires closed - Emitted when the expansion panel has closed.
|
|
48
|
+
*
|
|
49
|
+
* @cssprop --m3e-expansion-header-collapsed-height - Height of the header when the panel is collapsed.
|
|
50
|
+
* @cssprop --m3e-expansion-header-expanded-height - Height of the header when the panel is expanded.
|
|
51
|
+
* @cssprop --m3e-expansion-header-padding-left - Left padding inside the header.
|
|
52
|
+
* @cssprop --m3e-expansion-header-padding-right - Right padding inside the header.
|
|
53
|
+
* @cssprop --m3e-expansion-header-spacing - Spacing between header elements.
|
|
54
|
+
* @cssprop --m3e-expansion-header-toggle-icon-size - Size of the toggle icon (e.g. chevron).
|
|
55
|
+
* @cssprop --m3e-expansion-header-font-size - The font size of the header text.
|
|
56
|
+
* @cssprop --m3e-expansion-header-font-weight - The font weight of the header text.
|
|
57
|
+
* @cssprop --m3e-expansion-header-line-height - The line height of the header text.
|
|
58
|
+
* @cssprop --m3e-expansion-header-tracking - Letter spacing (tracking) of the header text.
|
|
59
|
+
* @cssprop --m3e-expansion-panel-text-color - Color of the panel's text content.
|
|
60
|
+
* @cssprop --m3e-expansion-panel-disabled-text-color - Color of the panel's text content, when disabled.
|
|
61
|
+
* @cssprop --m3e-expansion-panel-disabled-text-opacity - Opacity of the panel's text content, when disabled.
|
|
62
|
+
* @cssprop --m3e-expansion-panel-container-color - Background color of the panel container.
|
|
63
|
+
* @cssprop --m3e-expansion-panel-elevation - Elevation level when the panel is collapsed.
|
|
64
|
+
* @cssprop --m3e-expansion-panel-shape - Shape (e.g. border radius) of the panel when collapsed.
|
|
65
|
+
* @cssprop --m3e-expansion-panel-open-elevation - Elevation level when the panel is expanded.
|
|
66
|
+
* @cssprop --m3e-expansion-panel-open-shape - Shape (e.g. border radius) of the panel when expanded.
|
|
67
|
+
* @cssprop --m3e-expansion-panel-content-padding - Padding around the panel's content area.
|
|
68
|
+
* @cssprop --m3e-expansion-panel-actions-spacing - Spacing between action buttons or elements.
|
|
69
|
+
* @cssprop --m3e-expansion-panel-actions-padding - Padding around the actions section.
|
|
70
|
+
* @cssprop --m3e-expansion-panel-actions-divider-thickness - Thickness of the divider above actions.
|
|
71
|
+
* @cssprop --m3e-expansion-panel-actions-divider-color - Color of the divider above actions.
|
|
72
|
+
*/
|
|
73
|
+
export declare class M3eExpansionPanelElement extends M3eExpansionPanelElement_base {
|
|
74
|
+
#private;
|
|
75
|
+
/** The styles of the element. */
|
|
76
|
+
static styles: CSSResultGroup;
|
|
77
|
+
/** @private */ private static __nextId;
|
|
78
|
+
/** @private */ private readonly _header?;
|
|
79
|
+
/**
|
|
80
|
+
* Whether the panel is expanded.
|
|
81
|
+
* @default false
|
|
82
|
+
*/
|
|
83
|
+
open: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* The direction of the expansion toggle.
|
|
86
|
+
* @default "vertical"
|
|
87
|
+
*/
|
|
88
|
+
toggleDirection: ExpansionToggleDirection;
|
|
89
|
+
/**
|
|
90
|
+
* The position of the expansion toggle.
|
|
91
|
+
* @default "after"
|
|
92
|
+
*/
|
|
93
|
+
togglePosition: ExpansionTogglePosition;
|
|
94
|
+
/**
|
|
95
|
+
* Whether to hide the expansion toggle.
|
|
96
|
+
* @default false
|
|
97
|
+
*/
|
|
98
|
+
hideToggle: boolean;
|
|
99
|
+
/** @inheritdoc */
|
|
100
|
+
protected render(): unknown;
|
|
101
|
+
}
|
|
102
|
+
interface M3eExpansionPanelElementEventMap extends HTMLElementEventMap {
|
|
103
|
+
opening: Event;
|
|
104
|
+
opened: Event;
|
|
105
|
+
closing: Event;
|
|
106
|
+
closed: Event;
|
|
107
|
+
}
|
|
108
|
+
export interface M3eExpansionPanelElement {
|
|
109
|
+
addEventListener<K extends keyof M3eExpansionPanelElementEventMap>(type: K, listener: (this: M3eExpansionPanelElement, ev: M3eExpansionPanelElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void;
|
|
110
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
111
|
+
removeEventListener<K extends keyof M3eExpansionPanelElementEventMap>(type: K, listener: (this: M3eExpansionPanelElement, ev: M3eExpansionPanelElementEventMap[K]) => void, options?: boolean | EventListenerOptions): void;
|
|
112
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
113
|
+
}
|
|
114
|
+
declare global {
|
|
115
|
+
interface HTMLElementTagNameMap {
|
|
116
|
+
"m3e-expansion-panel": M3eExpansionPanelElement;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
export {};
|
|
120
|
+
//# sourceMappingURL=ExpansionPanelElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpansionPanelElement.d.ts","sourceRoot":"","sources":["../../src/ExpansionPanelElement.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;AAKvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;;AAKtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,qBACa,wBAAyB,SAAQ,6BAM7C;;IACC,iCAAiC;IACjC,OAAgB,MAAM,EAAE,cAAc,CAAuB;IAE7D,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAK;IAK5C,eAAe,CAAgC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAA4B;IAEpG;;;OAGG;IACyC,IAAI,UAAS;IAEzD;;;OAGG;IACyD,eAAe,EAAE,wB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"","sources":["../../src/ExpansionToggleDirection.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,MAAM,MAAM,wBAAwB,GAAG,UAAU,GAAG,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpansionTogglePosition.d.ts","sourceRoot":"","sources":["../../src/ExpansionTogglePosition.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpansionHeaderStyle.d.ts","sourceRoot":"","sources":["../../../src/styles/ExpansionHeaderStyle.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,eAAO,MAAM,oBAAoB,yBA0EhC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Component design tokens for `M3eExpansionHeaderElement`.
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare const ExpansionHeaderToken: {
|
|
6
|
+
readonly collapsedHeight: import("lit").CSSResult;
|
|
7
|
+
readonly expandedHeight: import("lit").CSSResult;
|
|
8
|
+
readonly paddingLeft: import("lit").CSSResult;
|
|
9
|
+
readonly paddingRight: import("lit").CSSResult;
|
|
10
|
+
readonly spacing: import("lit").CSSResult;
|
|
11
|
+
readonly toggleIconSize: import("lit").CSSResult;
|
|
12
|
+
readonly fontSize: import("lit").CSSResult;
|
|
13
|
+
readonly fontWeight: import("lit").CSSResult;
|
|
14
|
+
readonly lineHeight: import("lit").CSSResult;
|
|
15
|
+
readonly tracking: import("lit").CSSResult;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=ExpansionHeaderToken.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpansionHeaderToken.d.ts","sourceRoot":"","sources":["../../../src/styles/ExpansionHeaderToken.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;CAevB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpansionPanelStyle.d.ts","sourceRoot":"","sources":["../../../src/styles/ExpansionPanelStyle.ts"],"names":[],"mappings":"AAOA;;;GAGG;AACH,eAAO,MAAM,mBAAmB,yBAyE/B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Component design tokens for `M3eExpansionPanelElement`.
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare const ExpansionPanelToken: {
|
|
6
|
+
readonly textColor: import("lit").CSSResult;
|
|
7
|
+
readonly disabledTextColor: import("lit").CSSResult;
|
|
8
|
+
readonly disabledTextOpacity: import("lit").CSSResult;
|
|
9
|
+
readonly containerColor: import("lit").CSSResult;
|
|
10
|
+
readonly collapsedElevation: import("lit").CSSResult;
|
|
11
|
+
readonly collapsedShape: import("lit").CSSResult;
|
|
12
|
+
readonly expandedElevation: import("lit").CSSResult;
|
|
13
|
+
readonly expandedShape: import("lit").CSSResult;
|
|
14
|
+
readonly expandedSpace: import("lit").CSSResult;
|
|
15
|
+
readonly contentPadding: import("lit").CSSResult;
|
|
16
|
+
readonly actionsSpacing: import("lit").CSSResult;
|
|
17
|
+
readonly actionsPadding: import("lit").CSSResult;
|
|
18
|
+
readonly actionsDividerThickness: import("lit").CSSResult;
|
|
19
|
+
readonly actionsDividerColor: import("lit").CSSResult;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=ExpansionPanelToken.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpansionPanelToken.d.ts","sourceRoot":"","sources":["../../../src/styles/ExpansionPanelToken.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;CAmBtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/styles/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m3e/expansion-panel",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.4",
|
|
4
4
|
"description": "Expansion Panel for M3E",
|
|
5
5
|
"author": "matraic <matraic@yahoo.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"clean": "rimraf dist"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@m3e/core": "1.0.0-rc.
|
|
31
|
+
"@m3e/core": "1.0.0-rc.4",
|
|
32
32
|
"lit": "^3.3.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|