@m3e/button-group 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/ButtonGroupElement.d.ts +98 -0
- package/dist/src/ButtonGroupElement.d.ts.map +1 -0
- package/dist/src/ButtonGroupSize.d.ts +3 -0
- package/dist/src/ButtonGroupSize.d.ts.map +1 -0
- package/dist/src/ButtonGroupVariant.d.ts +3 -0
- package/dist/src/ButtonGroupVariant.d.ts.map +1 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.d.ts.map +1 -0
- package/package.json +4 -4
|
@@ -1128,25 +1128,6 @@
|
|
|
1128
1128
|
"kind": "mixin",
|
|
1129
1129
|
"description": "Mixin that adds support for custom event attributes.",
|
|
1130
1130
|
"name": "EventAttribute",
|
|
1131
|
-
"members": [
|
|
1132
|
-
{
|
|
1133
|
-
"kind": "method",
|
|
1134
|
-
"name": "dispatchEvent",
|
|
1135
|
-
"return": {
|
|
1136
|
-
"type": {
|
|
1137
|
-
"text": "boolean"
|
|
1138
|
-
}
|
|
1139
|
-
},
|
|
1140
|
-
"parameters": [
|
|
1141
|
-
{
|
|
1142
|
-
"name": "event",
|
|
1143
|
-
"type": {
|
|
1144
|
-
"text": "Event"
|
|
1145
|
-
}
|
|
1146
|
-
}
|
|
1147
|
-
]
|
|
1148
|
-
}
|
|
1149
|
-
],
|
|
1150
1131
|
"parameters": [
|
|
1151
1132
|
{
|
|
1152
1133
|
"name": "base",
|
|
@@ -1444,6 +1425,17 @@
|
|
|
1444
1425
|
"description": "Mixin to augment an element with behavior used to submit a form.",
|
|
1445
1426
|
"name": "FormSubmitter",
|
|
1446
1427
|
"members": [
|
|
1428
|
+
{
|
|
1429
|
+
"kind": "field",
|
|
1430
|
+
"name": "formAssociated",
|
|
1431
|
+
"type": {
|
|
1432
|
+
"text": "boolean"
|
|
1433
|
+
},
|
|
1434
|
+
"static": true,
|
|
1435
|
+
"readonly": true,
|
|
1436
|
+
"default": "true",
|
|
1437
|
+
"description": "Indicates that this custom element participates in form submission, validation, and form state restoration."
|
|
1438
|
+
},
|
|
1447
1439
|
{
|
|
1448
1440
|
"kind": "field",
|
|
1449
1441
|
"name": "name",
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { CSSResultGroup, LitElement, PropertyValues } from "lit";
|
|
2
|
+
import { M3eButtonElement } from "@m3e/button";
|
|
3
|
+
import { M3eIconButtonElement } from "@m3e/icon-button";
|
|
4
|
+
import { ButtonGroupVariant } from "./ButtonGroupVariant";
|
|
5
|
+
import { ButtonGroupSize } from "./ButtonGroupSize";
|
|
6
|
+
declare const M3eButtonGroupElement_base: import("node_modules/@m3e/core/dist/src/shared/mixins/Constructor").Constructor & typeof LitElement;
|
|
7
|
+
/**
|
|
8
|
+
* Organizes buttons and adds interactions between them.
|
|
9
|
+
*
|
|
10
|
+
* @description
|
|
11
|
+
* The `m3e-button-group` component arranges multiple buttons into a unified, expressive layout,
|
|
12
|
+
* supporting both `standard` and `connected` variants. It enables seamless, accessible grouping
|
|
13
|
+
* of actions, adapts to various sizes, and ensures consistent spacing, shape, and alignment.
|
|
14
|
+
* Designed according to Material 3 principles, it empowers users to interact with related actions
|
|
15
|
+
* in a visually harmonious and intuitive way.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* The following example illustrates a standard button group.
|
|
19
|
+
* ``` html
|
|
20
|
+
* <m3e-button-group>
|
|
21
|
+
* <m3e-icon-button variant="tonal" toggle><m3e-icon name="format_bold"></m3e-icon></m3e-icon-button>
|
|
22
|
+
* <m3e-icon-button variant="tonal" toggle><m3e-icon name="format_italic"></m3e-icon></m3e-icon-button>
|
|
23
|
+
* <m3e-icon-button variant="tonal" toggle><m3e-icon name="format_underlined"></m3e-icon></m3e-icon-button>
|
|
24
|
+
* </m3e-button-group>
|
|
25
|
+
* ```
|
|
26
|
+
* @example
|
|
27
|
+
* The next example illustrates a connected button group.
|
|
28
|
+
* ```html
|
|
29
|
+
* <m3e-button-group variant="connected">
|
|
30
|
+
* <m3e-button variant="tonal" shape="square" toggle>Start</m3e-button>
|
|
31
|
+
* <m3e-button variant="tonal" shape="square" toggle>Directions</m3e-button>
|
|
32
|
+
* <m3e-button variant="tonal" shape="square" toggle>Share</m3e-button>
|
|
33
|
+
* </m3e-button-group>
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* @tag m3e-button-group
|
|
37
|
+
*
|
|
38
|
+
* @slot - Renders the buttons of the group.
|
|
39
|
+
*
|
|
40
|
+
* @attr multi - Whether multiple toggle buttons can be selected.
|
|
41
|
+
* @attr size - The size of the group.
|
|
42
|
+
* @attr variant - The appearance variant of the group.
|
|
43
|
+
*
|
|
44
|
+
* @cssprop --m3e-standard-button-group-extra-small-spacing - Spacing between buttons in standard variant, extra-small size.
|
|
45
|
+
* @cssprop --m3e-standard-button-group-small-spacing - Spacing between buttons in standard variant, small size.
|
|
46
|
+
* @cssprop --m3e-standard-button-group-medium-spacing - Spacing between buttons in standard variant, medium size.
|
|
47
|
+
* @cssprop --m3e-standard-button-group-large-spacing - Spacing between buttons in standard variant, large size.
|
|
48
|
+
* @cssprop --m3e-standard-button-group-extra-large-spacing - Spacing between buttons in standard variant, extra-large size.
|
|
49
|
+
* @cssprop --m3e-connected-button-group-spacing - Spacing between buttons in connected variant.
|
|
50
|
+
* @cssprop --m3e-connected-button-group-extra-small-inner-shape - Corner shape for connected variant, extra-small size.
|
|
51
|
+
* @cssprop --m3e-connected-button-group-extra-small-inner-pressed-shape - Pressed corner shape for connected variant, extra-small size.
|
|
52
|
+
* @cssprop --m3e-connected-button-group-small-inner-shape - Corner shape for connected variant, small size.
|
|
53
|
+
* @cssprop --m3e-connected-button-group-small-inner-pressed-shape - Pressed corner shape for connected variant, small size.
|
|
54
|
+
* @cssprop --m3e-connected-button-group-medium-inner-shape - Corner shape for connected variant, medium size.
|
|
55
|
+
* @cssprop --m3e-connected-button-group-medium-inner-pressed-shape - Pressed corner shape for connected variant, medium size.
|
|
56
|
+
* @cssprop --m3e-connected-button-group-large-inner-shape - Corner shape for connected variant, large size.
|
|
57
|
+
* @cssprop --m3e-connected-button-group-large-inner-pressed-shape - Pressed corner shape for connected variant, large size.
|
|
58
|
+
* @cssprop --m3e-connected-button-group-extra-large-inner-shape - Corner shape for connected variant, extra-large size.
|
|
59
|
+
* @cssprop --m3e-connected-button-group-extra-large-inner-pressed-shape - Pressed corner shape for connected variant, extra-large size.
|
|
60
|
+
*/
|
|
61
|
+
export declare class M3eButtonGroupElement extends M3eButtonGroupElement_base {
|
|
62
|
+
#private;
|
|
63
|
+
/** The styles of the element. */
|
|
64
|
+
static styles: CSSResultGroup;
|
|
65
|
+
private readonly _base?;
|
|
66
|
+
/**
|
|
67
|
+
* The appearance variant of the group.
|
|
68
|
+
* @default "standard"
|
|
69
|
+
*/
|
|
70
|
+
variant: ButtonGroupVariant;
|
|
71
|
+
/**
|
|
72
|
+
* The size of the group.
|
|
73
|
+
* @default "small"
|
|
74
|
+
*/
|
|
75
|
+
size: ButtonGroupSize;
|
|
76
|
+
/**
|
|
77
|
+
* Whether multiple toggle buttons can be selected.
|
|
78
|
+
* @default false
|
|
79
|
+
*/
|
|
80
|
+
multi: boolean;
|
|
81
|
+
/** The buttons contained by the group. */
|
|
82
|
+
readonly buttons: ReadonlyArray<M3eButtonElement | M3eIconButtonElement>;
|
|
83
|
+
/** @inheritdoc */
|
|
84
|
+
connectedCallback(): void;
|
|
85
|
+
/** @inheritdoc */
|
|
86
|
+
disconnectedCallback(): void;
|
|
87
|
+
/** @inheritdoc */
|
|
88
|
+
protected update(changedProperties: PropertyValues<this>): void;
|
|
89
|
+
/** @inheritdoc */
|
|
90
|
+
protected render(): unknown;
|
|
91
|
+
}
|
|
92
|
+
declare global {
|
|
93
|
+
interface HTMLElementTagNameMap {
|
|
94
|
+
"m3e-button-group": M3eButtonGroupElement;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
export {};
|
|
98
|
+
//# sourceMappingURL=ButtonGroupElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonGroupElement.d.ts","sourceRoot":"","sources":["../../src/ButtonGroupElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,cAAc,EAAQ,UAAU,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAI5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,qBACa,qBAAsB,SAAQ,0BAAyB;;IAClE,iCAAiC;IACjC,OAAgB,MAAM,EAAE,cAAc,CAuMpC;IAmBc,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAc;IAErD;;;OAGG;IAC0B,OAAO,EAAE,kBAAkB,CAAc;IAEtE;;;OAGG;IAC0B,IAAI,EAAE,eAAe,CAAW;IAE7D;;;OAGG;IAC0B,KAAK,UAAS;IAE3C,0CAA0C;IAE1C,QAAQ,CAAC,OAAO,EAAG,aAAa,CAAC,gBAAgB,GAAG,oBAAoB,CAAC,CAAC;IAE1E,kBAAkB;IACT,iBAAiB,IAAI,IAAI;IAQlC,kBAAkB;IACT,oBAAoB,IAAI,IAAI;IAMrC,kBAAkB;cACC,MAAM,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAWxE,kBAAkB;cACC,MAAM,IAAI,OAAO;CAqDrC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,qBAAqB,CAAC;KAC3C;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonGroupSize.d.ts","sourceRoot":"","sources":["../../src/ButtonGroupSize.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,MAAM,MAAM,eAAe,GAAG,aAAa,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonGroupVariant.d.ts","sourceRoot":"","sources":["../../src/ButtonGroupVariant.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m3e/button-group",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.3",
|
|
4
4
|
"description": "Button Group for M3E",
|
|
5
5
|
"author": "matraic <matraic@yahoo.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"clean": "rimraf dist"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@m3e/core": "1.0.0-rc.
|
|
33
|
-
"@m3e/button": "1.0.0-rc.
|
|
34
|
-
"@m3e/icon-button": "1.0.0-rc.
|
|
32
|
+
"@m3e/core": "1.0.0-rc.3",
|
|
33
|
+
"@m3e/button": "1.0.0-rc.3",
|
|
34
|
+
"@m3e/icon-button": "1.0.0-rc.3",
|
|
35
35
|
"lit": "^3.3.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|