@m3e/badge 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.
@@ -1176,25 +1176,6 @@
1176
1176
  "kind": "mixin",
1177
1177
  "description": "Mixin that adds support for custom event attributes.",
1178
1178
  "name": "EventAttribute",
1179
- "members": [
1180
- {
1181
- "kind": "method",
1182
- "name": "dispatchEvent",
1183
- "return": {
1184
- "type": {
1185
- "text": "boolean"
1186
- }
1187
- },
1188
- "parameters": [
1189
- {
1190
- "name": "event",
1191
- "type": {
1192
- "text": "Event"
1193
- }
1194
- }
1195
- ]
1196
- }
1197
- ],
1198
1179
  "parameters": [
1199
1180
  {
1200
1181
  "name": "base",
@@ -1492,6 +1473,17 @@
1492
1473
  "description": "Mixin to augment an element with behavior used to submit a form.",
1493
1474
  "name": "FormSubmitter",
1494
1475
  "members": [
1476
+ {
1477
+ "kind": "field",
1478
+ "name": "formAssociated",
1479
+ "type": {
1480
+ "text": "boolean"
1481
+ },
1482
+ "static": true,
1483
+ "readonly": true,
1484
+ "default": "true",
1485
+ "description": "Indicates that this custom element participates in form submission, validation, and form state restoration."
1486
+ },
1495
1487
  {
1496
1488
  "kind": "field",
1497
1489
  "name": "name",
@@ -0,0 +1,74 @@
1
+ import { CSSResultGroup, LitElement, PropertyValues } from "lit";
2
+ import { BadgeSize } from "./BadgeSize";
3
+ import { BadgePosition } from "./BadgePosition";
4
+ declare const M3eBadgeElement_base: import("node_modules/@m3e/core/dist/src/shared/mixins/Constructor").Constructor<import("@m3e/core").HtmlForMixin> & typeof LitElement;
5
+ /**
6
+ * A visual indicator used to label content.
7
+ *
8
+ * @description
9
+ * The `m3e-badge` component is a compact visual indicator used to label content. Designed
10
+ * according to Material Design 3 guidelines, it can display counts, presence, or semantic
11
+ * emphasis, and is attachable to icons, buttons, or other components. Badges support dynamic
12
+ * sizing, color, and shape, ensuring clarity and accessibility while maintaining a consistent,
13
+ * expressive appearance across surfaces.
14
+ *
15
+ * @example
16
+ * The following example illustrates attaching a `m3e-badge` to another element using the `for` attribute.
17
+ * ```html
18
+ * <m3e-button id="button">Button</m3e-button>
19
+ * <m3e-badge for="button">10</m3e-badge>
20
+ * ```
21
+ *
22
+ * @tag m3e-badge
23
+ *
24
+ * @slot - Renders the content of the badge.
25
+ *
26
+ * @attr size - The size of the badge.
27
+ *
28
+ * @cssprop --m3e-badge-shape - Corner radius of the badge.
29
+ * @cssprop --m3e-badge-color - Foreground color of badge content.
30
+ * @cssprop --m3e-badge-container-color - Background color of the badge.
31
+ * @cssprop --m3e-badge-small-size - Fixed dimensions for small badge. Used for minimal indicators (e.g. dot).
32
+ * @cssprop --m3e-badge-medium-size - Height and min-width for medium badge.
33
+ * @cssprop --m3e-badge-medium-font-size - Font size for medium badge label.
34
+ * @cssprop --m3e-badge-medium-font-weight - Font weight for medium badge label.
35
+ * @cssprop --m3e-badge-medium-line-height - Line height for medium badge label.
36
+ * @cssprop --m3e-badge-medium-tracking - Letter spacing for medium badge label.
37
+ * @cssprop --m3e-badge-large-size - Height and min-width for large badge.
38
+ * @cssprop --m3e-badge-large-font-size - Font size for large badge label.
39
+ * @cssprop --m3e-badge-large-font-weight - Font weight for large badge label.
40
+ * @cssprop --m3e-badge-large-line-height - Line height for large badge label.
41
+ * @cssprop --m3e-badge-large-tracking - Letter spacing for large badge label.
42
+ */
43
+ export declare class M3eBadgeElement extends M3eBadgeElement_base {
44
+ #private;
45
+ /** The styles of the element. */
46
+ static styles: CSSResultGroup;
47
+ /**
48
+ * The size of the badge.
49
+ * @default "medium"
50
+ */
51
+ size: BadgeSize;
52
+ /**
53
+ * The position of the badge, when attached to another element.
54
+ * @default "above-after"
55
+ */
56
+ position: BadgePosition;
57
+ /** @inheritdoc */
58
+ detach(): void;
59
+ /** @inheritdoc */
60
+ connectedCallback(): void;
61
+ /** @inheritdoc */
62
+ disconnectedCallback(): void;
63
+ /** @inheritdoc */
64
+ protected update(changedProperties: PropertyValues<this>): void;
65
+ /** @inheritdoc */
66
+ protected render(): unknown;
67
+ }
68
+ declare global {
69
+ interface HTMLElementTagNameMap {
70
+ "m3e-badge": M3eBadgeElement;
71
+ }
72
+ }
73
+ export {};
74
+ //# sourceMappingURL=BadgeElement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BadgeElement.d.ts","sourceRoot":"","sources":["../../src/BadgeElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,cAAc,EAAQ,UAAU,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAO5E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,qBACa,eAAgB,SAAQ,oBAAmB;;IACtD,iCAAiC;IACjC,OAAgB,MAAM,EAAE,cAAc,CAqEpC;IAKF;;;OAGG;IAC0B,IAAI,EAAE,SAAS,CAAY;IAExD;;;OAGG;IAC0B,QAAQ,EAAE,aAAa,CAAiB;IAErE,kBAAkB;IACT,MAAM,IAAI,IAAI;IAKvB,kBAAkB;IACT,iBAAiB,IAAI,IAAI;IAKlC,kBAAkB;IACT,oBAAoB,IAAI,IAAI;IAKrC,kBAAkB;cACC,MAAM,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAQxE,kBAAkB;cACC,MAAM,IAAI,OAAO;CA0ErC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,eAAe,CAAC;KAC9B;CACF"}
@@ -0,0 +1,3 @@
1
+ /** Specifies the possible positions of a badge, when attached to another element. */
2
+ export type BadgePosition = "above-after" | "above-before" | "below-before" | "below-after" | "before" | "after" | "above" | "below";
3
+ //# sourceMappingURL=BadgePosition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BadgePosition.d.ts","sourceRoot":"","sources":["../../src/BadgePosition.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,MAAM,MAAM,aAAa,GACrB,aAAa,GACb,cAAc,GACd,cAAc,GACd,aAAa,GACb,QAAQ,GACR,OAAO,GACP,OAAO,GACP,OAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Specifies the possible size variants for a badge. */
2
+ export type BadgeSize = "small" | "medium" | "large";
3
+ //# sourceMappingURL=BadgeSize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BadgeSize.d.ts","sourceRoot":"","sources":["../../src/BadgeSize.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./BadgeElement";
2
+ export * from "./BadgeSize";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m3e/badge",
3
- "version": "1.0.0-rc.2",
3
+ "version": "1.0.0-rc.3",
4
4
  "description": "Badge for M3E",
5
5
  "author": "matraic <matraic@yahoo.com>",
6
6
  "license": "MIT",
@@ -27,7 +27,7 @@
27
27
  "clean": "rimraf dist"
28
28
  },
29
29
  "peerDependencies": {
30
- "@m3e/core": "1.0.0-rc.2",
30
+ "@m3e/core": "1.0.0-rc.3",
31
31
  "lit": "^3.3.0"
32
32
  },
33
33
  "devDependencies": {