@m3e/checkbox 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.
@@ -1790,25 +1790,6 @@
1790
1790
  "kind": "mixin",
1791
1791
  "description": "Mixin that adds support for custom event attributes.",
1792
1792
  "name": "EventAttribute",
1793
- "members": [
1794
- {
1795
- "kind": "method",
1796
- "name": "dispatchEvent",
1797
- "return": {
1798
- "type": {
1799
- "text": "boolean"
1800
- }
1801
- },
1802
- "parameters": [
1803
- {
1804
- "name": "event",
1805
- "type": {
1806
- "text": "Event"
1807
- }
1808
- }
1809
- ]
1810
- }
1811
- ],
1812
1793
  "parameters": [
1813
1794
  {
1814
1795
  "name": "base",
@@ -2106,6 +2087,17 @@
2106
2087
  "description": "Mixin to augment an element with behavior used to submit a form.",
2107
2088
  "name": "FormSubmitter",
2108
2089
  "members": [
2090
+ {
2091
+ "kind": "field",
2092
+ "name": "formAssociated",
2093
+ "type": {
2094
+ "text": "boolean"
2095
+ },
2096
+ "static": true,
2097
+ "readonly": true,
2098
+ "default": "true",
2099
+ "description": "Indicates that this custom element participates in form submission, validation, and form state restoration."
2100
+ },
2109
2101
  {
2110
2102
  "kind": "field",
2111
2103
  "name": "name",
@@ -0,0 +1,100 @@
1
+ import { CSSResultGroup, LitElement, PropertyValues } from "lit";
2
+ import { formValue } from "@m3e/core";
3
+ declare const M3eCheckboxElement_base: import("node_modules/@m3e/core/dist/src/shared/mixins/Constructor").Constructor<import("@m3e/core").LabelledMixin> & import("node_modules/@m3e/core/dist/src/shared/mixins/Constructor").Constructor<import("@m3e/core").RequiredConstraintValidationMixin> & import("node_modules/@m3e/core/dist/src/shared/mixins/Constructor").Constructor<import("@m3e/core").DirtyMixin> & import("node_modules/@m3e/core/dist/src/shared/mixins/Constructor").Constructor<import("@m3e/core").TouchedMixin> & import("node_modules/@m3e/core/dist/src/shared/mixins/Constructor").Constructor<import("@m3e/core").RequiredMixin> & import("node_modules/@m3e/core/dist/src/shared/mixins/Constructor").Constructor<import("@m3e/core").ConstraintValidationMixin> & import("node_modules/@m3e/core/dist/src/shared/mixins/Constructor").Constructor<import("@m3e/core").CheckedIndeterminateMixin> & import("node_modules/@m3e/core/dist/src/shared/mixins/Constructor").Constructor<import("@m3e/core").FormAssociatedMixin> & import("node_modules/@m3e/core/dist/src/shared/mixins/Constructor").Constructor & 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;
4
+ /**
5
+ * A checkbox that allows a user to select one or more options from a limited number of choices.
6
+ *
7
+ * @description
8
+ * The `m3e-checkbox` component enables users to select one or more options from a set. It supports selected,
9
+ * unselected, and indeterminate states, and communicates selection through visual cues and accessible semantics.
10
+ * This component reflects user intent, form participation, and validation feedback, adapting to disabled and
11
+ * required contexts. It emits `input` and `change` events to signal state transitions and integrates with form
12
+ * submission via `name` and `value`.
13
+ *
14
+ * @example
15
+ * The following example illustrates wrapping a `m3e-checkbox` within a `label`.
16
+ * ```html
17
+ * <label>
18
+ * <m3e-checkbox></m3e-checkbox>
19
+ * Checkbox label
20
+ * </label>
21
+ * ```
22
+ * @example
23
+ * The next example illustrates use of the `for` attribute to label a checkbox.
24
+ * ```html
25
+ * <m3e-checkbox id="chk"></m3e-checkbox>
26
+ * <label for="chk">Checkbox label </label>
27
+ * ```
28
+ *
29
+ * @tag m3e-checkbox
30
+ *
31
+ * @attr checked - Whether the element is checked.
32
+ * @attr disabled - Whether the element is disabled.
33
+ * @attr indeterminate - Whether the element's checked state is indeterminate.
34
+ * @attr name - The name that identifies the element when submitting the associated form.
35
+ * @attr required - Whether the element is required.
36
+ * @attr value - A string representing the value of the checkbox.
37
+ *
38
+ * @fires input - Emitted when the checked state changes.
39
+ * @fires invalid - Emitted when a form is submitted and the element fails constraint validation.
40
+ * @fires change - Emitted when the checked state changes.
41
+ * @fires click - Emitted when the element is clicked.
42
+ *
43
+ * @cssprop --m3e-checkbox-icon-size - Size of the checkbox icon inside the container.
44
+ * @cssprop --m3e-checkbox-container-size - Base size of the checkbox container.
45
+ * @cssprop --m3e-checkbox-container-shape - Border radius of the icon container.
46
+ * @cssprop --m3e-checkbox-unselected-outline-thickness - Border thickness for unselected state.
47
+ * @cssprop --m3e-checkbox-unselected-outline-color - Border color for unselected state.
48
+ * @cssprop --m3e-checkbox-unselected-hover-outline-color - Border color on hover when unselected.
49
+ * @cssprop --m3e-checkbox-unselected-disabled-outline-color - Base color for disabled unselected outline.
50
+ * @cssprop --m3e-checkbox-unselected-disabled-outline-opacity - Opacity for disabled unselected outline.
51
+ * @cssprop --m3e-checkbox-unselected-error-outline-color - Border color for invalid unselected state.
52
+ * @cssprop --m3e-checkbox-selected-container-color - Background color for selected container.
53
+ * @cssprop --m3e-checkbox-selected-icon-color - Icon color for selected state.
54
+ * @cssprop --m3e-checkbox-selected-disabled-container-color - Base color for disabled selected container.
55
+ * @cssprop --m3e-checkbox-selected-disabled-container-opacity - Opacity for disabled selected container.
56
+ * @cssprop --m3e-checkbox-selected-disabled-icon-color - Base color for disabled selected icon.
57
+ * @cssprop --m3e-checkbox-selected-disabled-icon-opacity - Opacity for disabled selected icon.
58
+ * @cssprop --m3e-checkbox-unselected-hover-color - Ripple hover color for unselected state.
59
+ * @cssprop --m3e-checkbox-unselected-focus-color - Ripple focus color for unselected state.
60
+ * @cssprop --m3e-checkbox-unselected-ripple-color - Ripple base color for unselected state.
61
+ * @cssprop --m3e-checkbox-selected-hover-color - Ripple hover color for selected state.
62
+ * @cssprop --m3e-checkbox-selected-focus-color - Ripple focus color for selected state.
63
+ * @cssprop --m3e-checkbox-selected-ripple-color - Ripple base color for selected state.
64
+ * @cssprop --m3e-checkbox-unselected-error-hover-color - Ripple hover color for invalid unselected state.
65
+ * @cssprop --m3e-checkbox-unselected-error-focus-color - Ripple focus color for invalid unselected state.
66
+ * @cssprop --m3e-checkbox-unselected-error-ripple-color - Ripple base color for invalid unselected state.
67
+ * @cssprop --m3e-checkbox-selected-error-hover-color - Ripple hover color for invalid selected state.
68
+ * @cssprop --m3e-checkbox-selected-error-focus-color - Ripple focus color for invalid selected state.
69
+ * @cssprop --m3e-checkbox-selected-error-ripple-color - Ripple base color for invalid selected state.
70
+ */
71
+ export declare class M3eCheckboxElement extends M3eCheckboxElement_base {
72
+ #private;
73
+ /** The styles of the element. */
74
+ static styles: CSSResultGroup;
75
+ /** @private */ private readonly _focusRing?;
76
+ /** @private */ private readonly _stateLayer?;
77
+ /** @private */ private readonly _ripple?;
78
+ /**
79
+ * A string representing the value of the checkbox.
80
+ * @default "on"
81
+ */
82
+ value: string;
83
+ /** @inheritdoc @private */
84
+ get [formValue](): string | File | FormData | null;
85
+ /** @inheritdoc */
86
+ connectedCallback(): void;
87
+ /** @inheritdoc */
88
+ disconnectedCallback(): void;
89
+ /** @inheritdoc */
90
+ protected firstUpdated(_changedProperties: PropertyValues<this>): void;
91
+ /** @inheritdoc */
92
+ protected render(): unknown;
93
+ }
94
+ declare global {
95
+ interface HTMLElementTagNameMap {
96
+ "m3e-checkbox": M3eCheckboxElement;
97
+ }
98
+ }
99
+ export {};
100
+ //# sourceMappingURL=CheckboxElement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckboxElement.d.ts","sourceRoot":"","sources":["../../src/CheckboxElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,cAAc,EAAQ,UAAU,EAAW,cAAc,EAAE,MAAM,KAAK,CAAC;AAGrF,OAAO,EAQL,SAAS,EAaV,MAAM,WAAW,CAAC;;AAEnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,qBACa,kBAAmB,SAAQ,uBAcvC;;IACC,iCAAiC;IACjC,OAAgB,MAAM,EAAE,cAAc,CAwIpC;IAEF,eAAe,CAAuB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAsB;IACxF,eAAe,CAAwB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAuB;IAC3F,eAAe,CAAmB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAmB;IA4B9E;;;OAGG;IACS,KAAK,SAAQ;IAEzB,2BAA2B;IAC3B,IAAa,CAAC,SAAS,CAAC,IAAI,MAAM,GAAG,IAAI,GAAG,QAAQ,GAAG,IAAI,CAE1D;IAED,kBAAkB;IACT,iBAAiB,IAAI,IAAI;IAUlC,kBAAkB;IACT,oBAAoB,IAAI,IAAI;IAUrC,kBAAkB;cACC,YAAY,CAAC,kBAAkB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAK/E,kBAAkB;cACC,MAAM,IAAI,OAAO;CAuCrC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,kBAAkB,CAAC;KACpC;CACF"}
@@ -0,0 +1,2 @@
1
+ export * from "./CheckboxElement";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m3e/checkbox",
3
- "version": "1.0.0-rc.2",
3
+ "version": "1.0.0-rc.3",
4
4
  "description": "Checkbox 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": {