@momentum-design/components 0.77.0 → 0.78.0
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/browser/index.js +141 -141
- package/dist/browser/index.js.map +4 -4
- package/dist/components/buttonsimple/buttonsimple.component.d.ts +1 -1
- package/dist/components/buttonsimple/buttonsimple.component.js +2 -1
- package/dist/custom-elements.json +342 -61
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +1 -1
- package/dist/utils/mixins/AutoFocusMixin.d.ts +6 -0
- package/dist/utils/mixins/AutoFocusMixin.js +34 -0
- package/package.json +1 -1
@@ -2,7 +2,7 @@ import type { PropertyValues } from 'lit';
|
|
2
2
|
import { CSSResult } from 'lit';
|
3
3
|
import { Component } from '../../models';
|
4
4
|
import type { ButtonSize, ButtonType } from './buttonsimple.types';
|
5
|
-
declare const Buttonsimple_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/TabIndexMixin").TabIndexMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/DisabledMixin").DisabledMixinInterface> & typeof Component;
|
5
|
+
declare const Buttonsimple_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/AutoFocusMixin").AutoFocusMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/TabIndexMixin").TabIndexMixinInterface> & import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/DisabledMixin").DisabledMixinInterface> & typeof Component;
|
6
6
|
/**
|
7
7
|
* `mdc-buttonsimple` is a component that can be configured in various ways to suit different use cases.
|
8
8
|
* It is used as an internal component and is not intended to be used directly by consumers.
|
@@ -12,6 +12,7 @@ import { property } from 'lit/decorators.js';
|
|
12
12
|
import { Component } from '../../models';
|
13
13
|
import { DisabledMixin } from '../../utils/mixins/DisabledMixin';
|
14
14
|
import { TabIndexMixin } from '../../utils/mixins/TabIndexMixin';
|
15
|
+
import { AutoFocusMixin } from '../../utils/mixins/AutoFocusMixin';
|
15
16
|
import { BUTTON_TYPE, DEFAULTS } from './buttonsimple.constants';
|
16
17
|
import styles from './buttonsimple.styles';
|
17
18
|
/**
|
@@ -26,7 +27,7 @@ import styles from './buttonsimple.styles';
|
|
26
27
|
*
|
27
28
|
* @tagname mdc-buttonsimple
|
28
29
|
*/
|
29
|
-
class Buttonsimple extends TabIndexMixin(DisabledMixin(Component)) {
|
30
|
+
class Buttonsimple extends AutoFocusMixin(TabIndexMixin(DisabledMixin(Component))) {
|
30
31
|
/** @internal */
|
31
32
|
get form() {
|
32
33
|
return this.internals.form;
|
@@ -49,6 +49,21 @@
|
|
49
49
|
"description": "The visible label text of the alertchip.\n\nWe recommend limiting the <b>maximum length of the label text to 20 characters</b>,\nincluding empty spaces to split words.",
|
50
50
|
"attribute": "label"
|
51
51
|
},
|
52
|
+
{
|
53
|
+
"kind": "field",
|
54
|
+
"name": "autofocus",
|
55
|
+
"type": {
|
56
|
+
"text": "boolean"
|
57
|
+
},
|
58
|
+
"default": "false",
|
59
|
+
"description": "This property indicates whether the element should receive focus automatically when it is rendered.",
|
60
|
+
"attribute": "autofocus",
|
61
|
+
"reflects": true,
|
62
|
+
"inheritedFrom": {
|
63
|
+
"name": "AutoFocusMixin",
|
64
|
+
"module": "utils/mixins/AutoFocusMixin.js"
|
65
|
+
}
|
66
|
+
},
|
52
67
|
{
|
53
68
|
"kind": "field",
|
54
69
|
"name": "tabIndex",
|
@@ -332,6 +347,19 @@
|
|
332
347
|
"description": "The visible label text of the alertchip.\n\nWe recommend limiting the <b>maximum length of the label text to 20 characters</b>,\nincluding empty spaces to split words.",
|
333
348
|
"fieldName": "label"
|
334
349
|
},
|
350
|
+
{
|
351
|
+
"name": "autofocus",
|
352
|
+
"type": {
|
353
|
+
"text": "boolean"
|
354
|
+
},
|
355
|
+
"default": "false",
|
356
|
+
"description": "This property indicates whether the element should receive focus automatically when it is rendered.",
|
357
|
+
"fieldName": "autofocus",
|
358
|
+
"inheritedFrom": {
|
359
|
+
"name": "AutoFocusMixin",
|
360
|
+
"module": "src/utils/mixins/AutoFocusMixin.ts"
|
361
|
+
}
|
362
|
+
},
|
335
363
|
{
|
336
364
|
"name": "tabIndex",
|
337
365
|
"type": {
|
@@ -492,67 +520,6 @@
|
|
492
520
|
}
|
493
521
|
]
|
494
522
|
},
|
495
|
-
{
|
496
|
-
"kind": "javascript-module",
|
497
|
-
"path": "components/appheader/appheader.component.js",
|
498
|
-
"declarations": [
|
499
|
-
{
|
500
|
-
"kind": "class",
|
501
|
-
"description": "The `mdc-appheader` component provides a structured and accessible app header layout.\nIt consists of three primary sections: leading, center, and trailing.\n\n- The **leading section** typically holds a **brand logo**, **brand name** or **menu icon**.\n- The **center section** can contain a **search bar**, **icons** or action controls.\n- The **trailing section** generally includes a **profile avatar**, **additional icons** or **action controls**.",
|
502
|
-
"name": "Appheader",
|
503
|
-
"cssParts": [
|
504
|
-
{
|
505
|
-
"description": "The main container for styling the header.",
|
506
|
-
"name": "container"
|
507
|
-
},
|
508
|
-
{
|
509
|
-
"description": "The leading section of the header.",
|
510
|
-
"name": "leading-section"
|
511
|
-
},
|
512
|
-
{
|
513
|
-
"description": "The center section of the header.",
|
514
|
-
"name": "center-section"
|
515
|
-
},
|
516
|
-
{
|
517
|
-
"description": "The trailing section of the header.",
|
518
|
-
"name": "trailing-section"
|
519
|
-
}
|
520
|
-
],
|
521
|
-
"slots": [
|
522
|
-
{
|
523
|
-
"description": "Slot for the leading section (e.g., brand logo, brand name).",
|
524
|
-
"name": "leading"
|
525
|
-
},
|
526
|
-
{
|
527
|
-
"description": "Slot for the center section (e.g., search bar, icons).",
|
528
|
-
"name": "center"
|
529
|
-
},
|
530
|
-
{
|
531
|
-
"description": "Slot for the trailing section (e.g., profile avatar, icons).",
|
532
|
-
"name": "trailing"
|
533
|
-
}
|
534
|
-
],
|
535
|
-
"members": [],
|
536
|
-
"superclass": {
|
537
|
-
"name": "Component",
|
538
|
-
"module": "/src/models"
|
539
|
-
},
|
540
|
-
"tagName": "mdc-appheader",
|
541
|
-
"jsDoc": "/**\n * The `mdc-appheader` component provides a structured and accessible app header layout.\n * It consists of three primary sections: leading, center, and trailing.\n *\n * - The **leading section** typically holds a **brand logo**, **brand name** or **menu icon**.\n * - The **center section** can contain a **search bar**, **icons** or action controls.\n * - The **trailing section** generally includes a **profile avatar**, **additional icons** or **action controls**.\n *\n * @tagname mdc-appheader\n *\n * @slot leading - Slot for the leading section (e.g., brand logo, brand name).\n * @slot center - Slot for the center section (e.g., search bar, icons).\n * @slot trailing - Slot for the trailing section (e.g., profile avatar, icons).\n *\n * @csspart container - The main container for styling the header.\n * @csspart leading-section - The leading section of the header.\n * @csspart center-section - The center section of the header.\n * @csspart trailing-section - The trailing section of the header.\n */",
|
542
|
-
"customElement": true
|
543
|
-
}
|
544
|
-
],
|
545
|
-
"exports": [
|
546
|
-
{
|
547
|
-
"kind": "js",
|
548
|
-
"name": "default",
|
549
|
-
"declaration": {
|
550
|
-
"name": "Appheader",
|
551
|
-
"module": "components/appheader/appheader.component.js"
|
552
|
-
}
|
553
|
-
}
|
554
|
-
]
|
555
|
-
},
|
556
523
|
{
|
557
524
|
"kind": "javascript-module",
|
558
525
|
"path": "components/animation/animation.component.js",
|
@@ -765,6 +732,67 @@
|
|
765
732
|
}
|
766
733
|
]
|
767
734
|
},
|
735
|
+
{
|
736
|
+
"kind": "javascript-module",
|
737
|
+
"path": "components/appheader/appheader.component.js",
|
738
|
+
"declarations": [
|
739
|
+
{
|
740
|
+
"kind": "class",
|
741
|
+
"description": "The `mdc-appheader` component provides a structured and accessible app header layout.\nIt consists of three primary sections: leading, center, and trailing.\n\n- The **leading section** typically holds a **brand logo**, **brand name** or **menu icon**.\n- The **center section** can contain a **search bar**, **icons** or action controls.\n- The **trailing section** generally includes a **profile avatar**, **additional icons** or **action controls**.",
|
742
|
+
"name": "Appheader",
|
743
|
+
"cssParts": [
|
744
|
+
{
|
745
|
+
"description": "The main container for styling the header.",
|
746
|
+
"name": "container"
|
747
|
+
},
|
748
|
+
{
|
749
|
+
"description": "The leading section of the header.",
|
750
|
+
"name": "leading-section"
|
751
|
+
},
|
752
|
+
{
|
753
|
+
"description": "The center section of the header.",
|
754
|
+
"name": "center-section"
|
755
|
+
},
|
756
|
+
{
|
757
|
+
"description": "The trailing section of the header.",
|
758
|
+
"name": "trailing-section"
|
759
|
+
}
|
760
|
+
],
|
761
|
+
"slots": [
|
762
|
+
{
|
763
|
+
"description": "Slot for the leading section (e.g., brand logo, brand name).",
|
764
|
+
"name": "leading"
|
765
|
+
},
|
766
|
+
{
|
767
|
+
"description": "Slot for the center section (e.g., search bar, icons).",
|
768
|
+
"name": "center"
|
769
|
+
},
|
770
|
+
{
|
771
|
+
"description": "Slot for the trailing section (e.g., profile avatar, icons).",
|
772
|
+
"name": "trailing"
|
773
|
+
}
|
774
|
+
],
|
775
|
+
"members": [],
|
776
|
+
"superclass": {
|
777
|
+
"name": "Component",
|
778
|
+
"module": "/src/models"
|
779
|
+
},
|
780
|
+
"tagName": "mdc-appheader",
|
781
|
+
"jsDoc": "/**\n * The `mdc-appheader` component provides a structured and accessible app header layout.\n * It consists of three primary sections: leading, center, and trailing.\n *\n * - The **leading section** typically holds a **brand logo**, **brand name** or **menu icon**.\n * - The **center section** can contain a **search bar**, **icons** or action controls.\n * - The **trailing section** generally includes a **profile avatar**, **additional icons** or **action controls**.\n *\n * @tagname mdc-appheader\n *\n * @slot leading - Slot for the leading section (e.g., brand logo, brand name).\n * @slot center - Slot for the center section (e.g., search bar, icons).\n * @slot trailing - Slot for the trailing section (e.g., profile avatar, icons).\n *\n * @csspart container - The main container for styling the header.\n * @csspart leading-section - The leading section of the header.\n * @csspart center-section - The center section of the header.\n * @csspart trailing-section - The trailing section of the header.\n */",
|
782
|
+
"customElement": true
|
783
|
+
}
|
784
|
+
],
|
785
|
+
"exports": [
|
786
|
+
{
|
787
|
+
"kind": "js",
|
788
|
+
"name": "default",
|
789
|
+
"declaration": {
|
790
|
+
"name": "Appheader",
|
791
|
+
"module": "components/appheader/appheader.component.js"
|
792
|
+
}
|
793
|
+
}
|
794
|
+
]
|
795
|
+
},
|
768
796
|
{
|
769
797
|
"kind": "javascript-module",
|
770
798
|
"path": "components/avatar/avatar.component.js",
|
@@ -1149,6 +1177,21 @@
|
|
1149
1177
|
"module": "utils/mixins/IconNameMixin.js"
|
1150
1178
|
}
|
1151
1179
|
},
|
1180
|
+
{
|
1181
|
+
"kind": "field",
|
1182
|
+
"name": "autofocus",
|
1183
|
+
"type": {
|
1184
|
+
"text": "boolean"
|
1185
|
+
},
|
1186
|
+
"default": "false",
|
1187
|
+
"description": "This property indicates whether the element should receive focus automatically when it is rendered.",
|
1188
|
+
"attribute": "autofocus",
|
1189
|
+
"reflects": true,
|
1190
|
+
"inheritedFrom": {
|
1191
|
+
"name": "AutoFocusMixin",
|
1192
|
+
"module": "utils/mixins/AutoFocusMixin.js"
|
1193
|
+
}
|
1194
|
+
},
|
1152
1195
|
{
|
1153
1196
|
"kind": "field",
|
1154
1197
|
"name": "tabIndex",
|
@@ -1532,6 +1575,19 @@
|
|
1532
1575
|
"module": "src/utils/mixins/IconNameMixin.ts"
|
1533
1576
|
}
|
1534
1577
|
},
|
1578
|
+
{
|
1579
|
+
"name": "autofocus",
|
1580
|
+
"type": {
|
1581
|
+
"text": "boolean"
|
1582
|
+
},
|
1583
|
+
"default": "false",
|
1584
|
+
"description": "This property indicates whether the element should receive focus automatically when it is rendered.",
|
1585
|
+
"fieldName": "autofocus",
|
1586
|
+
"inheritedFrom": {
|
1587
|
+
"name": "AutoFocusMixin",
|
1588
|
+
"module": "src/utils/mixins/AutoFocusMixin.ts"
|
1589
|
+
}
|
1590
|
+
},
|
1535
1591
|
{
|
1536
1592
|
"name": "tabIndex",
|
1537
1593
|
"type": {
|
@@ -2348,6 +2404,21 @@
|
|
2348
2404
|
"module": "utils/mixins/ButtonComponentMixin.js"
|
2349
2405
|
}
|
2350
2406
|
},
|
2407
|
+
{
|
2408
|
+
"kind": "field",
|
2409
|
+
"name": "autofocus",
|
2410
|
+
"type": {
|
2411
|
+
"text": "boolean"
|
2412
|
+
},
|
2413
|
+
"default": "false",
|
2414
|
+
"description": "This property indicates whether the element should receive focus automatically when it is rendered.",
|
2415
|
+
"attribute": "autofocus",
|
2416
|
+
"reflects": true,
|
2417
|
+
"inheritedFrom": {
|
2418
|
+
"name": "AutoFocusMixin",
|
2419
|
+
"module": "utils/mixins/AutoFocusMixin.js"
|
2420
|
+
}
|
2421
|
+
},
|
2351
2422
|
{
|
2352
2423
|
"kind": "field",
|
2353
2424
|
"name": "tabIndex",
|
@@ -2671,6 +2742,19 @@
|
|
2671
2742
|
"module": "src/utils/mixins/ButtonComponentMixin.ts"
|
2672
2743
|
}
|
2673
2744
|
},
|
2745
|
+
{
|
2746
|
+
"name": "autofocus",
|
2747
|
+
"type": {
|
2748
|
+
"text": "boolean"
|
2749
|
+
},
|
2750
|
+
"default": "false",
|
2751
|
+
"description": "This property indicates whether the element should receive focus automatically when it is rendered.",
|
2752
|
+
"fieldName": "autofocus",
|
2753
|
+
"inheritedFrom": {
|
2754
|
+
"name": "AutoFocusMixin",
|
2755
|
+
"module": "src/utils/mixins/AutoFocusMixin.ts"
|
2756
|
+
}
|
2757
|
+
},
|
2674
2758
|
{
|
2675
2759
|
"name": "tabIndex",
|
2676
2760
|
"type": {
|
@@ -3746,6 +3830,21 @@
|
|
3746
3830
|
],
|
3747
3831
|
"description": "Handles the keyup event on the button.\nIf the key is 'Enter' or 'Space', the button is clicked.\nIf the key is 'Space', the button is pressed. The native HTML button works in the same way."
|
3748
3832
|
},
|
3833
|
+
{
|
3834
|
+
"kind": "field",
|
3835
|
+
"name": "autofocus",
|
3836
|
+
"type": {
|
3837
|
+
"text": "boolean"
|
3838
|
+
},
|
3839
|
+
"default": "false",
|
3840
|
+
"description": "This property indicates whether the element should receive focus automatically when it is rendered.",
|
3841
|
+
"attribute": "autofocus",
|
3842
|
+
"reflects": true,
|
3843
|
+
"inheritedFrom": {
|
3844
|
+
"name": "AutoFocusMixin",
|
3845
|
+
"module": "utils/mixins/AutoFocusMixin.js"
|
3846
|
+
}
|
3847
|
+
},
|
3749
3848
|
{
|
3750
3849
|
"kind": "field",
|
3751
3850
|
"name": "tabIndex",
|
@@ -3851,6 +3950,19 @@
|
|
3851
3950
|
"default": "button",
|
3852
3951
|
"fieldName": "type"
|
3853
3952
|
},
|
3953
|
+
{
|
3954
|
+
"name": "autofocus",
|
3955
|
+
"type": {
|
3956
|
+
"text": "boolean"
|
3957
|
+
},
|
3958
|
+
"default": "false",
|
3959
|
+
"description": "This property indicates whether the element should receive focus automatically when it is rendered.",
|
3960
|
+
"fieldName": "autofocus",
|
3961
|
+
"inheritedFrom": {
|
3962
|
+
"name": "AutoFocusMixin",
|
3963
|
+
"module": "src/utils/mixins/AutoFocusMixin.ts"
|
3964
|
+
}
|
3965
|
+
},
|
3854
3966
|
{
|
3855
3967
|
"name": "tabIndex",
|
3856
3968
|
"type": {
|
@@ -3879,6 +3991,10 @@
|
|
3879
3991
|
}
|
3880
3992
|
],
|
3881
3993
|
"mixins": [
|
3994
|
+
{
|
3995
|
+
"name": "AutoFocusMixin",
|
3996
|
+
"module": "/src/utils/mixins/AutoFocusMixin"
|
3997
|
+
},
|
3882
3998
|
{
|
3883
3999
|
"name": "TabIndexMixin",
|
3884
4000
|
"module": "/src/utils/mixins/TabIndexMixin"
|
@@ -4522,6 +4638,21 @@
|
|
4522
4638
|
"module": "utils/mixins/CardComponentMixin.js"
|
4523
4639
|
}
|
4524
4640
|
},
|
4641
|
+
{
|
4642
|
+
"kind": "field",
|
4643
|
+
"name": "autofocus",
|
4644
|
+
"type": {
|
4645
|
+
"text": "boolean"
|
4646
|
+
},
|
4647
|
+
"default": "false",
|
4648
|
+
"description": "This property indicates whether the element should receive focus automatically when it is rendered.",
|
4649
|
+
"attribute": "autofocus",
|
4650
|
+
"reflects": true,
|
4651
|
+
"inheritedFrom": {
|
4652
|
+
"name": "Buttonsimple",
|
4653
|
+
"module": "components/buttonsimple/buttonsimple.component.js"
|
4654
|
+
}
|
4655
|
+
},
|
4525
4656
|
{
|
4526
4657
|
"kind": "field",
|
4527
4658
|
"name": "tabIndex",
|
@@ -4954,6 +5085,19 @@
|
|
4954
5085
|
"module": "src/utils/mixins/CardComponentMixin.ts"
|
4955
5086
|
}
|
4956
5087
|
},
|
5088
|
+
{
|
5089
|
+
"name": "autofocus",
|
5090
|
+
"type": {
|
5091
|
+
"text": "boolean"
|
5092
|
+
},
|
5093
|
+
"default": "false",
|
5094
|
+
"description": "This property indicates whether the element should receive focus automatically when it is rendered.",
|
5095
|
+
"fieldName": "autofocus",
|
5096
|
+
"inheritedFrom": {
|
5097
|
+
"name": "Buttonsimple",
|
5098
|
+
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
5099
|
+
}
|
5100
|
+
},
|
4957
5101
|
{
|
4958
5102
|
"name": "tabIndex",
|
4959
5103
|
"type": {
|
@@ -6976,6 +7120,21 @@
|
|
6976
7120
|
"module": "utils/mixins/IconNameMixin.js"
|
6977
7121
|
}
|
6978
7122
|
},
|
7123
|
+
{
|
7124
|
+
"kind": "field",
|
7125
|
+
"name": "autofocus",
|
7126
|
+
"type": {
|
7127
|
+
"text": "boolean"
|
7128
|
+
},
|
7129
|
+
"default": "false",
|
7130
|
+
"description": "This property indicates whether the element should receive focus automatically when it is rendered.",
|
7131
|
+
"attribute": "autofocus",
|
7132
|
+
"reflects": true,
|
7133
|
+
"inheritedFrom": {
|
7134
|
+
"name": "Buttonsimple",
|
7135
|
+
"module": "components/buttonsimple/buttonsimple.component.js"
|
7136
|
+
}
|
7137
|
+
},
|
6979
7138
|
{
|
6980
7139
|
"kind": "field",
|
6981
7140
|
"name": "tabIndex",
|
@@ -7271,6 +7430,19 @@
|
|
7271
7430
|
"module": "src/utils/mixins/IconNameMixin.ts"
|
7272
7431
|
}
|
7273
7432
|
},
|
7433
|
+
{
|
7434
|
+
"name": "autofocus",
|
7435
|
+
"type": {
|
7436
|
+
"text": "boolean"
|
7437
|
+
},
|
7438
|
+
"default": "false",
|
7439
|
+
"description": "This property indicates whether the element should receive focus automatically when it is rendered.",
|
7440
|
+
"fieldName": "autofocus",
|
7441
|
+
"inheritedFrom": {
|
7442
|
+
"name": "Buttonsimple",
|
7443
|
+
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
7444
|
+
}
|
7445
|
+
},
|
7274
7446
|
{
|
7275
7447
|
"name": "tabIndex",
|
7276
7448
|
"type": {
|
@@ -10328,6 +10500,21 @@
|
|
10328
10500
|
"module": "components/chip/chip.component.js"
|
10329
10501
|
}
|
10330
10502
|
},
|
10503
|
+
{
|
10504
|
+
"kind": "field",
|
10505
|
+
"name": "autofocus",
|
10506
|
+
"type": {
|
10507
|
+
"text": "boolean"
|
10508
|
+
},
|
10509
|
+
"default": "false",
|
10510
|
+
"description": "This property indicates whether the element should receive focus automatically when it is rendered.",
|
10511
|
+
"attribute": "autofocus",
|
10512
|
+
"reflects": true,
|
10513
|
+
"inheritedFrom": {
|
10514
|
+
"name": "Buttonsimple",
|
10515
|
+
"module": "components/buttonsimple/buttonsimple.component.js"
|
10516
|
+
}
|
10517
|
+
},
|
10331
10518
|
{
|
10332
10519
|
"kind": "field",
|
10333
10520
|
"name": "tabIndex",
|
@@ -10631,6 +10818,19 @@
|
|
10631
10818
|
"module": "src/components/chip/chip.component.ts"
|
10632
10819
|
}
|
10633
10820
|
},
|
10821
|
+
{
|
10822
|
+
"name": "autofocus",
|
10823
|
+
"type": {
|
10824
|
+
"text": "boolean"
|
10825
|
+
},
|
10826
|
+
"default": "false",
|
10827
|
+
"description": "This property indicates whether the element should receive focus automatically when it is rendered.",
|
10828
|
+
"fieldName": "autofocus",
|
10829
|
+
"inheritedFrom": {
|
10830
|
+
"name": "Buttonsimple",
|
10831
|
+
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
10832
|
+
}
|
10833
|
+
},
|
10634
10834
|
{
|
10635
10835
|
"name": "tabIndex",
|
10636
10836
|
"type": {
|
@@ -27426,6 +27626,21 @@
|
|
27426
27626
|
"module": "utils/mixins/IconNameMixin.js"
|
27427
27627
|
}
|
27428
27628
|
},
|
27629
|
+
{
|
27630
|
+
"kind": "field",
|
27631
|
+
"name": "autofocus",
|
27632
|
+
"type": {
|
27633
|
+
"text": "boolean"
|
27634
|
+
},
|
27635
|
+
"default": "false",
|
27636
|
+
"description": "This property indicates whether the element should receive focus automatically when it is rendered.",
|
27637
|
+
"attribute": "autofocus",
|
27638
|
+
"reflects": true,
|
27639
|
+
"inheritedFrom": {
|
27640
|
+
"name": "Buttonsimple",
|
27641
|
+
"module": "components/buttonsimple/buttonsimple.component.js"
|
27642
|
+
}
|
27643
|
+
},
|
27429
27644
|
{
|
27430
27645
|
"kind": "field",
|
27431
27646
|
"name": "tabIndex",
|
@@ -27734,6 +27949,19 @@
|
|
27734
27949
|
"module": "src/utils/mixins/IconNameMixin.ts"
|
27735
27950
|
}
|
27736
27951
|
},
|
27952
|
+
{
|
27953
|
+
"name": "autofocus",
|
27954
|
+
"type": {
|
27955
|
+
"text": "boolean"
|
27956
|
+
},
|
27957
|
+
"default": "false",
|
27958
|
+
"description": "This property indicates whether the element should receive focus automatically when it is rendered.",
|
27959
|
+
"fieldName": "autofocus",
|
27960
|
+
"inheritedFrom": {
|
27961
|
+
"name": "Buttonsimple",
|
27962
|
+
"module": "src/components/buttonsimple/buttonsimple.component.ts"
|
27963
|
+
}
|
27964
|
+
},
|
27737
27965
|
{
|
27738
27966
|
"name": "tabIndex",
|
27739
27967
|
"type": {
|
@@ -33175,6 +33403,59 @@
|
|
33175
33403
|
}
|
33176
33404
|
]
|
33177
33405
|
},
|
33406
|
+
{
|
33407
|
+
"kind": "javascript-module",
|
33408
|
+
"path": "utils/mixins/AutoFocusMixin.js",
|
33409
|
+
"declarations": [
|
33410
|
+
{
|
33411
|
+
"kind": "mixin",
|
33412
|
+
"description": "",
|
33413
|
+
"name": "AutoFocusMixin",
|
33414
|
+
"members": [
|
33415
|
+
{
|
33416
|
+
"kind": "field",
|
33417
|
+
"name": "autofocus",
|
33418
|
+
"type": {
|
33419
|
+
"text": "boolean"
|
33420
|
+
},
|
33421
|
+
"default": "false",
|
33422
|
+
"description": "This property indicates whether the element should receive focus automatically when it is rendered.",
|
33423
|
+
"attribute": "autofocus",
|
33424
|
+
"reflects": true
|
33425
|
+
}
|
33426
|
+
],
|
33427
|
+
"attributes": [
|
33428
|
+
{
|
33429
|
+
"name": "autofocus",
|
33430
|
+
"type": {
|
33431
|
+
"text": "boolean"
|
33432
|
+
},
|
33433
|
+
"default": "false",
|
33434
|
+
"description": "This property indicates whether the element should receive focus automatically when it is rendered.",
|
33435
|
+
"fieldName": "autofocus"
|
33436
|
+
}
|
33437
|
+
],
|
33438
|
+
"parameters": [
|
33439
|
+
{
|
33440
|
+
"name": "superClass",
|
33441
|
+
"type": {
|
33442
|
+
"text": "T"
|
33443
|
+
}
|
33444
|
+
}
|
33445
|
+
]
|
33446
|
+
}
|
33447
|
+
],
|
33448
|
+
"exports": [
|
33449
|
+
{
|
33450
|
+
"kind": "js",
|
33451
|
+
"name": "AutoFocusMixin",
|
33452
|
+
"declaration": {
|
33453
|
+
"name": "AutoFocusMixin",
|
33454
|
+
"module": "utils/mixins/AutoFocusMixin.js"
|
33455
|
+
}
|
33456
|
+
}
|
33457
|
+
]
|
33458
|
+
},
|
33178
33459
|
{
|
33179
33460
|
"kind": "javascript-module",
|
33180
33461
|
"path": "utils/mixins/AvatarComponentMixin.js",
|
package/dist/react/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
export { default as AlertChip } from './alertchip';
|
2
|
-
export { default as Appheader } from './appheader';
|
3
2
|
export { default as Animation } from './animation';
|
3
|
+
export { default as Appheader } from './appheader';
|
4
4
|
export { default as Avatar } from './avatar';
|
5
5
|
export { default as AvatarButton } from './avatarbutton';
|
6
6
|
export { default as Badge } from './badge';
|
package/dist/react/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
export { default as AlertChip } from './alertchip';
|
2
|
-
export { default as Appheader } from './appheader';
|
3
2
|
export { default as Animation } from './animation';
|
3
|
+
export { default as Appheader } from './appheader';
|
4
4
|
export { default as Avatar } from './avatar';
|
5
5
|
export { default as AvatarButton } from './avatarbutton';
|
6
6
|
export { default as Badge } from './badge';
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { LitElement } from 'lit';
|
2
|
+
import type { Constructor } from './index.types';
|
3
|
+
export interface AutoFocusMixinInterface {
|
4
|
+
autofocus?: boolean;
|
5
|
+
}
|
6
|
+
export declare const AutoFocusMixin: <T extends Constructor<LitElement>>(superClass: T) => Constructor<AutoFocusMixinInterface> & T;
|
@@ -0,0 +1,34 @@
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
|
+
};
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
9
|
+
};
|
10
|
+
import { property } from 'lit/decorators.js';
|
11
|
+
export const AutoFocusMixin = (superClass) => {
|
12
|
+
class InnerMixinClass extends superClass {
|
13
|
+
constructor() {
|
14
|
+
super(...arguments);
|
15
|
+
/**
|
16
|
+
* This property indicates whether the element should receive focus automatically when it is rendered.
|
17
|
+
* @default false
|
18
|
+
*/
|
19
|
+
this.autofocus = false;
|
20
|
+
}
|
21
|
+
firstUpdated(changedProperties) {
|
22
|
+
super.firstUpdated(changedProperties);
|
23
|
+
if (this.autofocus) {
|
24
|
+
this.focus();
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
28
|
+
__decorate([
|
29
|
+
property({ type: Boolean, reflect: true }),
|
30
|
+
__metadata("design:type", Boolean)
|
31
|
+
], InnerMixinClass.prototype, "autofocus", void 0);
|
32
|
+
// Cast return type to your mixin's interface intersected with the superClass type
|
33
|
+
return InnerMixinClass;
|
34
|
+
};
|
package/package.json
CHANGED