@m3e/card 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 CHANGED
@@ -33,7 +33,7 @@ Alternately, you can explicitly reference the `html-custom-data.json` and `css-c
33
33
  }
34
34
  ```
35
35
 
36
- ## 🚀 Browser Usage
36
+ ## 🚀 Native Module Support
37
37
 
38
38
  This package uses [JavaScript Modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#module_specifiers). To use it directly in a browser without a bundler, use a module script similar to the following.
39
39
 
@@ -597,6 +597,21 @@
597
597
  "module": "../core/src/shared/mixins/LinkButton.ts"
598
598
  }
599
599
  },
600
+ {
601
+ "kind": "field",
602
+ "name": "formAssociated",
603
+ "static": true,
604
+ "readonly": true,
605
+ "default": "true",
606
+ "description": "Indicates that this custom element participates in form submission, validation, and form state restoration.",
607
+ "type": {
608
+ "text": "boolean"
609
+ },
610
+ "inheritedFrom": {
611
+ "name": "AttachInternals",
612
+ "module": "../core/src/shared/mixins/AttachInternals.ts"
613
+ }
614
+ },
600
615
  {
601
616
  "kind": "field",
602
617
  "name": "name",
@@ -683,18 +698,6 @@
683
698
  "module": "../core/src/shared/mixins/Disabled.ts"
684
699
  }
685
700
  },
686
- {
687
- "kind": "field",
688
- "name": "formAssociated",
689
- "static": true,
690
- "readonly": true,
691
- "default": "formAssociated",
692
- "description": "Indicates that this custom element participates in form submission, validation, and form state restoration.",
693
- "inheritedFrom": {
694
- "name": "AttachInternals",
695
- "module": "../core/src/shared/mixins/AttachInternals.ts"
696
- }
697
- },
698
701
  {
699
702
  "kind": "field",
700
703
  "name": "[_internals]",
@@ -1869,25 +1872,6 @@
1869
1872
  "kind": "mixin",
1870
1873
  "description": "Mixin that adds support for custom event attributes.",
1871
1874
  "name": "EventAttribute",
1872
- "members": [
1873
- {
1874
- "kind": "method",
1875
- "name": "dispatchEvent",
1876
- "return": {
1877
- "type": {
1878
- "text": "boolean"
1879
- }
1880
- },
1881
- "parameters": [
1882
- {
1883
- "name": "event",
1884
- "type": {
1885
- "text": "Event"
1886
- }
1887
- }
1888
- ]
1889
- }
1890
- ],
1891
1875
  "parameters": [
1892
1876
  {
1893
1877
  "name": "base",
@@ -2185,6 +2169,17 @@
2185
2169
  "description": "Mixin to augment an element with behavior used to submit a form.",
2186
2170
  "name": "FormSubmitter",
2187
2171
  "members": [
2172
+ {
2173
+ "kind": "field",
2174
+ "name": "formAssociated",
2175
+ "type": {
2176
+ "text": "boolean"
2177
+ },
2178
+ "static": true,
2179
+ "readonly": true,
2180
+ "default": "true",
2181
+ "description": "Indicates that this custom element participates in form submission, validation, and form state restoration."
2182
+ },
2188
2183
  {
2189
2184
  "kind": "field",
2190
2185
  "name": "name",
@@ -2721,6 +2716,11 @@
2721
2716
  "kind": "javascript-module",
2722
2717
  "path": "../core/src/shared/mixins/Labelled.ts",
2723
2718
  "declarations": [
2719
+ {
2720
+ "kind": "variable",
2721
+ "name": "updateLabels",
2722
+ "description": "A symbol through which to update labels to reflect a control's current state."
2723
+ },
2724
2724
  {
2725
2725
  "kind": "function",
2726
2726
  "name": "isLabelledMixin",
@@ -2770,16 +2770,6 @@
2770
2770
  },
2771
2771
  "description": "The label elements that the element is associated with.",
2772
2772
  "readonly": true
2773
- },
2774
- {
2775
- "kind": "method",
2776
- "name": "[_updateLabels]",
2777
- "privacy": "private",
2778
- "return": {
2779
- "type": {
2780
- "text": "void"
2781
- }
2782
- }
2783
2773
  }
2784
2774
  ],
2785
2775
  "parameters": [
@@ -2794,6 +2784,14 @@
2794
2784
  }
2795
2785
  ],
2796
2786
  "exports": [
2787
+ {
2788
+ "kind": "js",
2789
+ "name": "updateLabels",
2790
+ "declaration": {
2791
+ "name": "updateLabels",
2792
+ "module": "../core/src/shared/mixins/Labelled.ts"
2793
+ }
2794
+ },
2797
2795
  {
2798
2796
  "kind": "js",
2799
2797
  "name": "isLabelledMixin",
package/dist/index.js CHANGED
@@ -643,6 +643,16 @@ let M3eCardElement = class M3eCardElement extends KeyboardClick(LinkButton(FormS
643
643
  firstUpdated(_changedProperties) {
644
644
  super.firstUpdated(_changedProperties);
645
645
  [this._elevation, this._focusRing, this._stateLayer, this._ripple].forEach((x) => x?.attach(this));
646
+ if (!this.actionable && this.hasAttribute("tabindex")) {
647
+ this.removeAttribute("tabindex");
648
+ }
649
+ }
650
+ /** @inheritdoc */
651
+ update(changedProperties) {
652
+ super.update(changedProperties);
653
+ if (!this.actionable && this.hasAttribute("tabindex")) {
654
+ this.removeAttribute("tabindex");
655
+ }
646
656
  }
647
657
  };
648
658
  _M3eCardElement_clickHandler = new WeakMap();