@momentum-design/components 0.53.0 → 0.53.2

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.
@@ -3022,20 +3022,6 @@
3022
3022
  "module": "utils/mixins/FormInternalsMixin.js"
3023
3023
  }
3024
3024
  },
3025
- {
3026
- "kind": "field",
3027
- "name": "id",
3028
- "type": {
3029
- "text": "string"
3030
- },
3031
- "default": "`mdc-input-${uuidv4()}`",
3032
- "description": "The unique id of the input field. It is used to link the input field with the label.",
3033
- "attribute": "id",
3034
- "inheritedFrom": {
3035
- "name": "FormfieldWrapper",
3036
- "module": "components/formfieldwrapper/formfieldwrapper.component.js"
3037
- }
3038
- },
3039
3025
  {
3040
3026
  "kind": "field",
3041
3027
  "name": "dataAriaLabel",
@@ -3094,6 +3080,20 @@
3094
3080
  "module": "components/formfieldwrapper/formfieldwrapper.component.js"
3095
3081
  }
3096
3082
  },
3083
+ {
3084
+ "kind": "field",
3085
+ "name": "id",
3086
+ "type": {
3087
+ "text": "string"
3088
+ },
3089
+ "default": "''",
3090
+ "description": "The unique id of the input field. It is used to link the input field with the label.",
3091
+ "attribute": "id",
3092
+ "inheritedFrom": {
3093
+ "name": "FormfieldWrapper",
3094
+ "module": "components/formfieldwrapper/formfieldwrapper.component.js"
3095
+ }
3096
+ },
3097
3097
  {
3098
3098
  "kind": "field",
3099
3099
  "name": "helpTextType",
@@ -7585,7 +7585,7 @@
7585
7585
  {
7586
7586
  "kind": "method",
7587
7587
  "name": "handleKeyDown",
7588
- "privacy": "private",
7588
+ "privacy": "protected",
7589
7589
  "parameters": [
7590
7590
  {
7591
7591
  "name": "event",
@@ -7622,13 +7622,19 @@
7622
7622
  {
7623
7623
  "kind": "method",
7624
7624
  "name": "clearInputText",
7625
- "privacy": "private",
7625
+ "privacy": "protected",
7626
7626
  "description": "Clears the input field."
7627
7627
  },
7628
7628
  {
7629
7629
  "kind": "method",
7630
7630
  "name": "renderTrailingButton",
7631
7631
  "privacy": "protected",
7632
+ "parameters": [
7633
+ {
7634
+ "name": "show",
7635
+ "default": "false"
7636
+ }
7637
+ ],
7632
7638
  "description": "Renders the trailing button to clear the input field if the trailingButton is set to true.",
7633
7639
  "return": {
7634
7640
  "type": {
@@ -7646,6 +7652,10 @@
7646
7652
  "type": {
7647
7653
  "text": "InputType"
7648
7654
  }
7655
+ },
7656
+ {
7657
+ "name": "hidePlaceholder",
7658
+ "default": "false"
7649
7659
  }
7650
7660
  ]
7651
7661
  },
@@ -7749,20 +7759,6 @@
7749
7759
  "module": "utils/mixins/FormInternalsMixin.js"
7750
7760
  }
7751
7761
  },
7752
- {
7753
- "kind": "field",
7754
- "name": "id",
7755
- "type": {
7756
- "text": "string"
7757
- },
7758
- "default": "`mdc-input-${uuidv4()}`",
7759
- "description": "The unique id of the input field. It is used to link the input field with the label.",
7760
- "attribute": "id",
7761
- "inheritedFrom": {
7762
- "name": "FormfieldWrapper",
7763
- "module": "components/formfieldwrapper/formfieldwrapper.component.js"
7764
- }
7765
- },
7766
7762
  {
7767
7763
  "kind": "field",
7768
7764
  "name": "dataAriaLabel",
@@ -7821,6 +7817,20 @@
7821
7817
  "module": "components/formfieldwrapper/formfieldwrapper.component.js"
7822
7818
  }
7823
7819
  },
7820
+ {
7821
+ "kind": "field",
7822
+ "name": "id",
7823
+ "type": {
7824
+ "text": "string"
7825
+ },
7826
+ "default": "''",
7827
+ "description": "The unique id of the input field. It is used to link the input field with the label.",
7828
+ "attribute": "id",
7829
+ "inheritedFrom": {
7830
+ "name": "FormfieldWrapper",
7831
+ "module": "components/formfieldwrapper/formfieldwrapper.component.js"
7832
+ }
7833
+ },
7824
7834
  {
7825
7835
  "kind": "field",
7826
7836
  "name": "helpTextType",
@@ -9755,15 +9765,6 @@
9755
9765
  "module": "utils/mixins/FormInternalsMixin.js"
9756
9766
  }
9757
9767
  },
9758
- {
9759
- "kind": "field",
9760
- "name": "id",
9761
- "default": "`mdc-input-${uuidv4()}`",
9762
- "inheritedFrom": {
9763
- "name": "FormInternalsMixin",
9764
- "module": "utils/mixins/FormInternalsMixin.js"
9765
- }
9766
- },
9767
9768
  {
9768
9769
  "kind": "field",
9769
9770
  "name": "dataAriaLabel",
@@ -13025,20 +13026,6 @@
13025
13026
  "module": "utils/mixins/FormInternalsMixin.js"
13026
13027
  }
13027
13028
  },
13028
- {
13029
- "kind": "field",
13030
- "name": "id",
13031
- "type": {
13032
- "text": "string"
13033
- },
13034
- "default": "`mdc-input-${uuidv4()}`",
13035
- "description": "The unique id of the input field. It is used to link the input field with the label.",
13036
- "attribute": "id",
13037
- "inheritedFrom": {
13038
- "name": "FormfieldWrapper",
13039
- "module": "components/formfieldwrapper/formfieldwrapper.component.js"
13040
- }
13041
- },
13042
13029
  {
13043
13030
  "kind": "field",
13044
13031
  "name": "dataAriaLabel",
@@ -13097,6 +13084,20 @@
13097
13084
  "module": "components/formfieldwrapper/formfieldwrapper.component.js"
13098
13085
  }
13099
13086
  },
13087
+ {
13088
+ "kind": "field",
13089
+ "name": "id",
13090
+ "type": {
13091
+ "text": "string"
13092
+ },
13093
+ "default": "''",
13094
+ "description": "The unique id of the input field. It is used to link the input field with the label.",
13095
+ "attribute": "id",
13096
+ "inheritedFrom": {
13097
+ "name": "FormfieldWrapper",
13098
+ "module": "components/formfieldwrapper/formfieldwrapper.component.js"
13099
+ }
13100
+ },
13100
13101
  {
13101
13102
  "kind": "field",
13102
13103
  "name": "helpTextType",
@@ -13976,12 +13977,41 @@
13976
13977
  "text": "Array<HTMLElement> | undefined"
13977
13978
  }
13978
13979
  },
13980
+ {
13981
+ "kind": "method",
13982
+ "name": "handleKeyDown",
13983
+ "privacy": "protected",
13984
+ "parameters": [
13985
+ {
13986
+ "name": "event",
13987
+ "type": {
13988
+ "text": "KeyboardEvent"
13989
+ },
13990
+ "description": "Keyboard event"
13991
+ }
13992
+ ],
13993
+ "description": "Handles the keydown event of the search field.\nIf the key pressed is 'Enter', it submits the form.\nIf the key pressed is 'Escape', it clears the input text.",
13994
+ "inheritedFrom": {
13995
+ "name": "Input",
13996
+ "module": "components/input/input.component.js"
13997
+ }
13998
+ },
13979
13999
  {
13980
14000
  "kind": "method",
13981
14001
  "name": "renderInputChips",
13982
14002
  "privacy": "private",
13983
14003
  "description": "This method is used to render the input chips inside filters slot.\nIt will remove any elements that are not input chips."
13984
14004
  },
14005
+ {
14006
+ "kind": "method",
14007
+ "name": "clearInputText",
14008
+ "privacy": "protected",
14009
+ "description": "Clears the input field.",
14010
+ "inheritedFrom": {
14011
+ "name": "Input",
14012
+ "module": "components/input/input.component.js"
14013
+ }
14014
+ },
13985
14015
  {
13986
14016
  "kind": "field",
13987
14017
  "name": "name",
@@ -14082,20 +14112,6 @@
14082
14112
  "module": "utils/mixins/FormInternalsMixin.js"
14083
14113
  }
14084
14114
  },
14085
- {
14086
- "kind": "field",
14087
- "name": "id",
14088
- "type": {
14089
- "text": "string"
14090
- },
14091
- "default": "`mdc-input-${uuidv4()}`",
14092
- "description": "The unique id of the input field. It is used to link the input field with the label.",
14093
- "attribute": "id",
14094
- "inheritedFrom": {
14095
- "name": "FormfieldWrapper",
14096
- "module": "components/formfieldwrapper/formfieldwrapper.component.js"
14097
- }
14098
- },
14099
14115
  {
14100
14116
  "kind": "field",
14101
14117
  "name": "dataAriaLabel",
@@ -14381,25 +14397,6 @@
14381
14397
  "module": "components/input/input.component.js"
14382
14398
  }
14383
14399
  },
14384
- {
14385
- "kind": "method",
14386
- "name": "handleKeyDown",
14387
- "privacy": "private",
14388
- "parameters": [
14389
- {
14390
- "name": "event",
14391
- "type": {
14392
- "text": "KeyboardEvent"
14393
- },
14394
- "description": "Keyboard event"
14395
- }
14396
- ],
14397
- "description": "Handles the keydown event of the input field.\nIf the key pressed is 'Enter', it submits the form.",
14398
- "inheritedFrom": {
14399
- "name": "Input",
14400
- "module": "components/input/input.component.js"
14401
- }
14402
- },
14403
14400
  {
14404
14401
  "kind": "method",
14405
14402
  "name": "renderLeadingIcon",
@@ -14430,20 +14427,16 @@
14430
14427
  "module": "components/input/input.component.js"
14431
14428
  }
14432
14429
  },
14433
- {
14434
- "kind": "method",
14435
- "name": "clearInputText",
14436
- "privacy": "private",
14437
- "description": "Clears the input field.",
14438
- "inheritedFrom": {
14439
- "name": "Input",
14440
- "module": "components/input/input.component.js"
14441
- }
14442
- },
14443
14430
  {
14444
14431
  "kind": "method",
14445
14432
  "name": "renderTrailingButton",
14446
14433
  "privacy": "protected",
14434
+ "parameters": [
14435
+ {
14436
+ "name": "show",
14437
+ "default": "false"
14438
+ }
14439
+ ],
14447
14440
  "description": "Renders the trailing button to clear the input field if the trailingButton is set to true.",
14448
14441
  "return": {
14449
14442
  "type": {
@@ -14465,6 +14458,10 @@
14465
14458
  "type": {
14466
14459
  "text": "InputType"
14467
14460
  }
14461
+ },
14462
+ {
14463
+ "name": "hidePlaceholder",
14464
+ "default": "false"
14468
14465
  }
14469
14466
  ],
14470
14467
  "inheritedFrom": {
@@ -14515,6 +14512,20 @@
14515
14512
  "module": "components/formfieldwrapper/formfieldwrapper.component.js"
14516
14513
  }
14517
14514
  },
14515
+ {
14516
+ "kind": "field",
14517
+ "name": "id",
14518
+ "type": {
14519
+ "text": "string"
14520
+ },
14521
+ "default": "''",
14522
+ "description": "The unique id of the input field. It is used to link the input field with the label.",
14523
+ "attribute": "id",
14524
+ "inheritedFrom": {
14525
+ "name": "FormfieldWrapper",
14526
+ "module": "components/formfieldwrapper/formfieldwrapper.component.js"
14527
+ }
14528
+ },
14518
14529
  {
14519
14530
  "kind": "field",
14520
14531
  "name": "helpTextType",
@@ -15616,20 +15627,6 @@
15616
15627
  "module": "utils/mixins/FormInternalsMixin.js"
15617
15628
  }
15618
15629
  },
15619
- {
15620
- "kind": "field",
15621
- "name": "id",
15622
- "type": {
15623
- "text": "string"
15624
- },
15625
- "default": "`mdc-input-${uuidv4()}`",
15626
- "description": "The unique id of the input field. It is used to link the input field with the label.",
15627
- "attribute": "id",
15628
- "inheritedFrom": {
15629
- "name": "FormfieldWrapper",
15630
- "module": "components/formfieldwrapper/formfieldwrapper.component.js"
15631
- }
15632
- },
15633
15630
  {
15634
15631
  "kind": "field",
15635
15632
  "name": "dataAriaLabel",
@@ -15688,6 +15685,20 @@
15688
15685
  "module": "components/formfieldwrapper/formfieldwrapper.component.js"
15689
15686
  }
15690
15687
  },
15688
+ {
15689
+ "kind": "field",
15690
+ "name": "id",
15691
+ "type": {
15692
+ "text": "string"
15693
+ },
15694
+ "default": "''",
15695
+ "description": "The unique id of the input field. It is used to link the input field with the label.",
15696
+ "attribute": "id",
15697
+ "inheritedFrom": {
15698
+ "name": "FormfieldWrapper",
15699
+ "module": "components/formfieldwrapper/formfieldwrapper.component.js"
15700
+ }
15701
+ },
15691
15702
  {
15692
15703
  "kind": "field",
15693
15704
  "name": "helpTextType",
@@ -17455,20 +17466,6 @@
17455
17466
  "module": "utils/mixins/FormInternalsMixin.js"
17456
17467
  }
17457
17468
  },
17458
- {
17459
- "kind": "field",
17460
- "name": "id",
17461
- "type": {
17462
- "text": "string"
17463
- },
17464
- "default": "`mdc-input-${uuidv4()}`",
17465
- "description": "The unique id of the input field. It is used to link the input field with the label.",
17466
- "attribute": "id",
17467
- "inheritedFrom": {
17468
- "name": "FormfieldWrapper",
17469
- "module": "components/formfieldwrapper/formfieldwrapper.component.js"
17470
- }
17471
- },
17472
17469
  {
17473
17470
  "kind": "field",
17474
17471
  "name": "dataAriaLabel",
@@ -17527,6 +17524,20 @@
17527
17524
  "module": "components/formfieldwrapper/formfieldwrapper.component.js"
17528
17525
  }
17529
17526
  },
17527
+ {
17528
+ "kind": "field",
17529
+ "name": "id",
17530
+ "type": {
17531
+ "text": "string"
17532
+ },
17533
+ "default": "''",
17534
+ "description": "The unique id of the input field. It is used to link the input field with the label.",
17535
+ "attribute": "id",
17536
+ "inheritedFrom": {
17537
+ "name": "FormfieldWrapper",
17538
+ "module": "components/formfieldwrapper/formfieldwrapper.component.js"
17539
+ }
17540
+ },
17530
17541
  {
17531
17542
  "kind": "field",
17532
17543
  "name": "helpTextType",
@@ -18341,20 +18352,6 @@
18341
18352
  "module": "utils/mixins/FormInternalsMixin.js"
18342
18353
  }
18343
18354
  },
18344
- {
18345
- "kind": "field",
18346
- "name": "id",
18347
- "type": {
18348
- "text": "string"
18349
- },
18350
- "default": "`mdc-input-${uuidv4()}`",
18351
- "description": "The unique id of the input field. It is used to link the input field with the label.",
18352
- "attribute": "id",
18353
- "inheritedFrom": {
18354
- "name": "FormfieldWrapper",
18355
- "module": "components/formfieldwrapper/formfieldwrapper.component.js"
18356
- }
18357
- },
18358
18355
  {
18359
18356
  "kind": "field",
18360
18357
  "name": "dataAriaLabel",
@@ -18413,6 +18410,20 @@
18413
18410
  "module": "components/formfieldwrapper/formfieldwrapper.component.js"
18414
18411
  }
18415
18412
  },
18413
+ {
18414
+ "kind": "field",
18415
+ "name": "id",
18416
+ "type": {
18417
+ "text": "string"
18418
+ },
18419
+ "default": "''",
18420
+ "description": "The unique id of the input field. It is used to link the input field with the label.",
18421
+ "attribute": "id",
18422
+ "inheritedFrom": {
18423
+ "name": "FormfieldWrapper",
18424
+ "module": "components/formfieldwrapper/formfieldwrapper.component.js"
18425
+ }
18426
+ },
18416
18427
  {
18417
18428
  "kind": "field",
18418
18429
  "name": "helpTextType",
@@ -21344,11 +21355,6 @@
21344
21355
  {
21345
21356
  "kind": "method",
21346
21357
  "name": "reportValidity"
21347
- },
21348
- {
21349
- "kind": "field",
21350
- "name": "id",
21351
- "default": "`mdc-input-${uuidv4()}`"
21352
21358
  }
21353
21359
  ],
21354
21360
  "attributes": [
@@ -11,18 +11,8 @@ import { property, query } from 'lit/decorators.js';
11
11
  import { v4 as uuidv4 } from 'uuid';
12
12
  export const FormInternalsMixin = (superClass) => {
13
13
  class InnerMixinClass extends superClass {
14
- /** @internal */
15
- get form() {
16
- return this.internals.form;
17
- }
18
- get validity() {
19
- return this.internals.validity;
20
- }
21
- get willValidate() {
22
- return this.internals.willValidate;
23
- }
24
- constructor(...args) {
25
- super(args);
14
+ constructor() {
15
+ super(...arguments);
26
16
  /**
27
17
  * Indicates the name of the component group.
28
18
  * They are used to group elements in a form together.
@@ -36,6 +26,20 @@ export const FormInternalsMixin = (superClass) => {
36
26
  this.value = '';
37
27
  /** @internal */
38
28
  this.internals = this.attachInternals();
29
+ }
30
+ /** @internal */
31
+ get form() {
32
+ return this.internals.form;
33
+ }
34
+ get validity() {
35
+ return this.internals.validity;
36
+ }
37
+ get willValidate() {
38
+ return this.internals.willValidate;
39
+ }
40
+ connectedCallback() {
41
+ super.connectedCallback();
42
+ /** @internal */
39
43
  this.id = `mdc-input-${uuidv4()}`;
40
44
  }
41
45
  /**
package/package.json CHANGED
@@ -39,5 +39,5 @@
39
39
  "lit": "^3.2.0",
40
40
  "uuid": "^11.0.5"
41
41
  },
42
- "version": "0.53.0"
42
+ "version": "0.53.2"
43
43
  }