@momentum-design/components 0.121.1 → 0.121.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.
- package/dist/browser/index.js +168 -168
- package/dist/browser/index.js.map +3 -3
- package/dist/components/menuitemradio/menuitemradio.component.d.ts +2 -1
- package/dist/components/menuitemradio/menuitemradio.component.js +6 -3
- package/dist/custom-elements.json +270 -225
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +1 -1
- package/dist/utils/mixins/ControlTypeMixin.js +1 -0
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { PropertyValues, CSSResult, TemplateResult } from 'lit';
|
|
2
2
|
import MenuItem from '../menuitem/menuitem.component';
|
|
3
3
|
import { Indicator } from './menuitemradio.types';
|
|
4
|
+
declare const MenuItemRadio_base: import("../../utils/mixins/index.types").Constructor<import("../../utils/mixins/ControlTypeMixin").ControlTypeMixinInterface> & typeof MenuItem;
|
|
4
5
|
/**
|
|
5
6
|
* A menuitemradio component is a checkable menuitem that is used in a menu.
|
|
6
7
|
* A menuitemradio should be checked only one at a time. <br/>
|
|
@@ -56,7 +57,7 @@ import { Indicator } from './menuitemradio.types';
|
|
|
56
57
|
* @csspart trailing-arrow - Allows customization of trailing arrow icon.
|
|
57
58
|
* @csspart trailing-text - Allows customization of the trailing text part.
|
|
58
59
|
*/
|
|
59
|
-
declare class MenuItemRadio extends
|
|
60
|
+
declare class MenuItemRadio extends MenuItemRadio_base {
|
|
60
61
|
/**
|
|
61
62
|
* The aria-checked attribute is used to indicate that the menuitemradio is checked or not.
|
|
62
63
|
* @default false
|
|
@@ -15,6 +15,7 @@ import MenuItem from '../menuitem/menuitem.component';
|
|
|
15
15
|
import { TYPE } from '../text/text.constants';
|
|
16
16
|
import { TAG_NAME as MENUSECTION_TAGNAME } from '../menusection/menusection.constants';
|
|
17
17
|
import { TAG_NAME as MENUPOPOVER_TAGNAME } from '../menupopover/menupopover.constants';
|
|
18
|
+
import { ControlTypeMixin } from '../../utils/mixins/ControlTypeMixin';
|
|
18
19
|
import { INDICATOR, DEFAULTS } from './menuitemradio.constants';
|
|
19
20
|
import styles from './menuitemradio.styles';
|
|
20
21
|
/**
|
|
@@ -72,7 +73,7 @@ import styles from './menuitemradio.styles';
|
|
|
72
73
|
* @csspart trailing-arrow - Allows customization of trailing arrow icon.
|
|
73
74
|
* @csspart trailing-text - Allows customization of the trailing text part.
|
|
74
75
|
*/
|
|
75
|
-
class MenuItemRadio extends MenuItem {
|
|
76
|
+
class MenuItemRadio extends ControlTypeMixin(MenuItem) {
|
|
76
77
|
constructor() {
|
|
77
78
|
super();
|
|
78
79
|
/**
|
|
@@ -121,8 +122,10 @@ class MenuItemRadio extends MenuItem {
|
|
|
121
122
|
handleMouseClick() {
|
|
122
123
|
if (this.disabled || this.checked)
|
|
123
124
|
return;
|
|
124
|
-
this.
|
|
125
|
-
|
|
125
|
+
if (this.controlType !== 'controlled') {
|
|
126
|
+
this.updateOtherRadiosCheckedState();
|
|
127
|
+
this.checked = true;
|
|
128
|
+
}
|
|
126
129
|
this.dispatchEvent(new Event('change', { bubbles: true, composed: true }));
|
|
127
130
|
}
|
|
128
131
|
update(changedProperties) {
|
|
@@ -22060,231 +22060,6 @@
|
|
|
22060
22060
|
}
|
|
22061
22061
|
]
|
|
22062
22062
|
},
|
|
22063
|
-
{
|
|
22064
|
-
"kind": "javascript-module",
|
|
22065
|
-
"path": "components/list/list.component.js",
|
|
22066
|
-
"declarations": [
|
|
22067
|
-
{
|
|
22068
|
-
"kind": "class",
|
|
22069
|
-
"description": "mdc-list component is used to display a group of list items. It is used as a container to wrap other list items.\n\nTo add a header to the list, use the `mdc-listheader` component and place it in the `list-header` slot.\n`mdc-listitem` components can be placed in the default slot.",
|
|
22070
|
-
"name": "List",
|
|
22071
|
-
"cssParts": [
|
|
22072
|
-
{
|
|
22073
|
-
"description": "The container slot around the list items",
|
|
22074
|
-
"name": "container"
|
|
22075
|
-
}
|
|
22076
|
-
],
|
|
22077
|
-
"slots": [
|
|
22078
|
-
{
|
|
22079
|
-
"description": "This is a default/unnamed slot, where listitems can be placed.",
|
|
22080
|
-
"name": "default"
|
|
22081
|
-
},
|
|
22082
|
-
{
|
|
22083
|
-
"description": "This slot is used to pass a header for the list, which can be a `mdc-listheader` component.",
|
|
22084
|
-
"name": "list-header"
|
|
22085
|
-
}
|
|
22086
|
-
],
|
|
22087
|
-
"members": [
|
|
22088
|
-
{
|
|
22089
|
-
"kind": "field",
|
|
22090
|
-
"name": "loop",
|
|
22091
|
-
"type": {
|
|
22092
|
-
"text": "'true' | 'false'"
|
|
22093
|
-
},
|
|
22094
|
-
"privacy": "public",
|
|
22095
|
-
"description": "Whether to loop navigation when reaching the end of the list.\nIf 'true', pressing the down arrow on the last item will focus the first item,\nand pressing the up arrow on the first item will focus the last item.\nIf 'false', navigation will stop at the first or last item.",
|
|
22096
|
-
"default": "''",
|
|
22097
|
-
"attribute": "loop",
|
|
22098
|
-
"reflects": true
|
|
22099
|
-
},
|
|
22100
|
-
{
|
|
22101
|
-
"kind": "field",
|
|
22102
|
-
"name": "initialFocus",
|
|
22103
|
-
"type": {
|
|
22104
|
-
"text": "number"
|
|
22105
|
-
},
|
|
22106
|
-
"privacy": "public",
|
|
22107
|
-
"description": "The index of the item that should receive focus when the list is first rendered.\nIf the index is out of bounds, the first item (index 0) will receive focus.",
|
|
22108
|
-
"default": "0",
|
|
22109
|
-
"attribute": "initial-focus",
|
|
22110
|
-
"reflects": true
|
|
22111
|
-
},
|
|
22112
|
-
{
|
|
22113
|
-
"kind": "field",
|
|
22114
|
-
"name": "itemsStore",
|
|
22115
|
-
"default": "new ElementStore<ListItem>(this, { isValidItem: this.isValidItem, })"
|
|
22116
|
-
},
|
|
22117
|
-
{
|
|
22118
|
-
"kind": "method",
|
|
22119
|
-
"name": "getCurrentIndex",
|
|
22120
|
-
"privacy": "private",
|
|
22121
|
-
"return": {
|
|
22122
|
-
"type": {
|
|
22123
|
-
"text": ""
|
|
22124
|
-
}
|
|
22125
|
-
},
|
|
22126
|
-
"parameters": [
|
|
22127
|
-
{
|
|
22128
|
-
"name": "target",
|
|
22129
|
-
"type": {
|
|
22130
|
-
"text": "HTMLElement | null"
|
|
22131
|
-
},
|
|
22132
|
-
"description": "The target element that triggered the event."
|
|
22133
|
-
}
|
|
22134
|
-
],
|
|
22135
|
-
"description": "Retrieves the current index of the item that triggered the event.",
|
|
22136
|
-
"inheritedFrom": {
|
|
22137
|
-
"name": "ListNavigationMixin",
|
|
22138
|
-
"module": "utils/mixins/ListNavigationMixin.js"
|
|
22139
|
-
}
|
|
22140
|
-
},
|
|
22141
|
-
{
|
|
22142
|
-
"kind": "method",
|
|
22143
|
-
"name": "resetTabIndexes",
|
|
22144
|
-
"privacy": "protected",
|
|
22145
|
-
"parameters": [
|
|
22146
|
-
{
|
|
22147
|
-
"name": "index",
|
|
22148
|
-
"type": {
|
|
22149
|
-
"text": "number"
|
|
22150
|
-
},
|
|
22151
|
-
"description": "The index of the currently focused item."
|
|
22152
|
-
}
|
|
22153
|
-
],
|
|
22154
|
-
"description": "Reset all tabindex to -1 and set the tabindex of the current item to 0",
|
|
22155
|
-
"inheritedFrom": {
|
|
22156
|
-
"name": "ListNavigationMixin",
|
|
22157
|
-
"module": "utils/mixins/ListNavigationMixin.js"
|
|
22158
|
-
}
|
|
22159
|
-
},
|
|
22160
|
-
{
|
|
22161
|
-
"kind": "method",
|
|
22162
|
-
"name": "resetTabIndexAndSetFocus",
|
|
22163
|
-
"privacy": "protected",
|
|
22164
|
-
"parameters": [
|
|
22165
|
-
{
|
|
22166
|
-
"name": "newIndex",
|
|
22167
|
-
"type": {
|
|
22168
|
-
"text": "number"
|
|
22169
|
-
},
|
|
22170
|
-
"description": "The index of the new item to focus."
|
|
22171
|
-
},
|
|
22172
|
-
{
|
|
22173
|
-
"name": "oldIndex",
|
|
22174
|
-
"optional": true,
|
|
22175
|
-
"type": {
|
|
22176
|
-
"text": "number"
|
|
22177
|
-
},
|
|
22178
|
-
"description": "The index of the currently focused item."
|
|
22179
|
-
},
|
|
22180
|
-
{
|
|
22181
|
-
"name": "focusNewItem",
|
|
22182
|
-
"default": "true",
|
|
22183
|
-
"description": "Call focus() on the new item or not. It should be false during firstUpdate"
|
|
22184
|
-
}
|
|
22185
|
-
],
|
|
22186
|
-
"description": "Resets the tabindex of the currently focused item and sets focus to a new item.",
|
|
22187
|
-
"return": {
|
|
22188
|
-
"type": {
|
|
22189
|
-
"text": ""
|
|
22190
|
-
}
|
|
22191
|
-
},
|
|
22192
|
-
"inheritedFrom": {
|
|
22193
|
-
"name": "ListNavigationMixin",
|
|
22194
|
-
"module": "utils/mixins/ListNavigationMixin.js"
|
|
22195
|
-
}
|
|
22196
|
-
},
|
|
22197
|
-
{
|
|
22198
|
-
"kind": "method",
|
|
22199
|
-
"name": "resolveDirectionKey",
|
|
22200
|
-
"privacy": "private",
|
|
22201
|
-
"parameters": [
|
|
22202
|
-
{
|
|
22203
|
-
"name": "key",
|
|
22204
|
-
"type": {
|
|
22205
|
-
"text": "string"
|
|
22206
|
-
},
|
|
22207
|
-
"description": "The key pressed by the user."
|
|
22208
|
-
},
|
|
22209
|
-
{
|
|
22210
|
-
"name": "isRtl",
|
|
22211
|
-
"type": {
|
|
22212
|
-
"text": "boolean"
|
|
22213
|
-
},
|
|
22214
|
-
"description": "A boolean indicating if the layout is right-to-left (RTL)."
|
|
22215
|
-
}
|
|
22216
|
-
],
|
|
22217
|
-
"description": "Resolves the key pressed by the user based on the direction of the layout.\nThis method is used to handle keyboard navigation in a right-to-left (RTL) layout.\nIt checks if the layout is RTL and adjusts the arrow keys accordingly.\nFor example, in RTL, the left arrow key behaves like the right arrow key and vice versa.",
|
|
22218
|
-
"return": {
|
|
22219
|
-
"type": {
|
|
22220
|
-
"text": ""
|
|
22221
|
-
}
|
|
22222
|
-
},
|
|
22223
|
-
"inheritedFrom": {
|
|
22224
|
-
"name": "ListNavigationMixin",
|
|
22225
|
-
"module": "utils/mixins/ListNavigationMixin.js"
|
|
22226
|
-
}
|
|
22227
|
-
},
|
|
22228
|
-
{
|
|
22229
|
-
"kind": "method",
|
|
22230
|
-
"name": "shouldLoop",
|
|
22231
|
-
"privacy": "private",
|
|
22232
|
-
"inheritedFrom": {
|
|
22233
|
-
"name": "ListNavigationMixin",
|
|
22234
|
-
"module": "utils/mixins/ListNavigationMixin.js"
|
|
22235
|
-
}
|
|
22236
|
-
}
|
|
22237
|
-
],
|
|
22238
|
-
"attributes": [
|
|
22239
|
-
{
|
|
22240
|
-
"name": "loop",
|
|
22241
|
-
"type": {
|
|
22242
|
-
"text": "'true' | 'false'"
|
|
22243
|
-
},
|
|
22244
|
-
"description": "Whether to loop navigation when reaching the end of the list.\nIf 'true', pressing the down arrow on the last item will focus the first item,\nand pressing the up arrow on the first item will focus the last item.\nIf 'false', navigation will stop at the first or last item.",
|
|
22245
|
-
"default": "''",
|
|
22246
|
-
"fieldName": "loop"
|
|
22247
|
-
},
|
|
22248
|
-
{
|
|
22249
|
-
"name": "initial-focus",
|
|
22250
|
-
"type": {
|
|
22251
|
-
"text": "number"
|
|
22252
|
-
},
|
|
22253
|
-
"description": "The index of the item that should receive focus when the list is first rendered.\nIf the index is out of bounds, the first item (index 0) will receive focus.",
|
|
22254
|
-
"default": "0",
|
|
22255
|
-
"fieldName": "initialFocus"
|
|
22256
|
-
}
|
|
22257
|
-
],
|
|
22258
|
-
"mixins": [
|
|
22259
|
-
{
|
|
22260
|
-
"name": "ListNavigationMixin",
|
|
22261
|
-
"module": "/src/utils/mixins/ListNavigationMixin"
|
|
22262
|
-
},
|
|
22263
|
-
{
|
|
22264
|
-
"name": "CaptureDestroyEventForChildElement",
|
|
22265
|
-
"module": "/src/utils/mixins/lifecycle/CaptureDestroyEventForChildElement"
|
|
22266
|
-
}
|
|
22267
|
-
],
|
|
22268
|
-
"superclass": {
|
|
22269
|
-
"name": "Component",
|
|
22270
|
-
"module": "/src/models"
|
|
22271
|
-
},
|
|
22272
|
-
"tagName": "mdc-list",
|
|
22273
|
-
"jsDoc": "/**\n * mdc-list component is used to display a group of list items. It is used as a container to wrap other list items.\n *\n * To add a header to the list, use the `mdc-listheader` component and place it in the `list-header` slot.\n * `mdc-listitem` components can be placed in the default slot.\n *\n * @tagname mdc-list\n *\n * @slot default - This is a default/unnamed slot, where listitems can be placed.\n * @slot list-header - This slot is used to pass a header for the list, which can be a `mdc-listheader` component.\n *\n * @csspart container - The container slot around the list items\n */",
|
|
22274
|
-
"customElement": true
|
|
22275
|
-
}
|
|
22276
|
-
],
|
|
22277
|
-
"exports": [
|
|
22278
|
-
{
|
|
22279
|
-
"kind": "js",
|
|
22280
|
-
"name": "default",
|
|
22281
|
-
"declaration": {
|
|
22282
|
-
"name": "List",
|
|
22283
|
-
"module": "components/list/list.component.js"
|
|
22284
|
-
}
|
|
22285
|
-
}
|
|
22286
|
-
]
|
|
22287
|
-
},
|
|
22288
22063
|
{
|
|
22289
22064
|
"kind": "javascript-module",
|
|
22290
22065
|
"path": "components/listbox/listbox.component.js",
|
|
@@ -23249,6 +23024,231 @@
|
|
|
23249
23024
|
}
|
|
23250
23025
|
]
|
|
23251
23026
|
},
|
|
23027
|
+
{
|
|
23028
|
+
"kind": "javascript-module",
|
|
23029
|
+
"path": "components/list/list.component.js",
|
|
23030
|
+
"declarations": [
|
|
23031
|
+
{
|
|
23032
|
+
"kind": "class",
|
|
23033
|
+
"description": "mdc-list component is used to display a group of list items. It is used as a container to wrap other list items.\n\nTo add a header to the list, use the `mdc-listheader` component and place it in the `list-header` slot.\n`mdc-listitem` components can be placed in the default slot.",
|
|
23034
|
+
"name": "List",
|
|
23035
|
+
"cssParts": [
|
|
23036
|
+
{
|
|
23037
|
+
"description": "The container slot around the list items",
|
|
23038
|
+
"name": "container"
|
|
23039
|
+
}
|
|
23040
|
+
],
|
|
23041
|
+
"slots": [
|
|
23042
|
+
{
|
|
23043
|
+
"description": "This is a default/unnamed slot, where listitems can be placed.",
|
|
23044
|
+
"name": "default"
|
|
23045
|
+
},
|
|
23046
|
+
{
|
|
23047
|
+
"description": "This slot is used to pass a header for the list, which can be a `mdc-listheader` component.",
|
|
23048
|
+
"name": "list-header"
|
|
23049
|
+
}
|
|
23050
|
+
],
|
|
23051
|
+
"members": [
|
|
23052
|
+
{
|
|
23053
|
+
"kind": "field",
|
|
23054
|
+
"name": "loop",
|
|
23055
|
+
"type": {
|
|
23056
|
+
"text": "'true' | 'false'"
|
|
23057
|
+
},
|
|
23058
|
+
"privacy": "public",
|
|
23059
|
+
"description": "Whether to loop navigation when reaching the end of the list.\nIf 'true', pressing the down arrow on the last item will focus the first item,\nand pressing the up arrow on the first item will focus the last item.\nIf 'false', navigation will stop at the first or last item.",
|
|
23060
|
+
"default": "''",
|
|
23061
|
+
"attribute": "loop",
|
|
23062
|
+
"reflects": true
|
|
23063
|
+
},
|
|
23064
|
+
{
|
|
23065
|
+
"kind": "field",
|
|
23066
|
+
"name": "initialFocus",
|
|
23067
|
+
"type": {
|
|
23068
|
+
"text": "number"
|
|
23069
|
+
},
|
|
23070
|
+
"privacy": "public",
|
|
23071
|
+
"description": "The index of the item that should receive focus when the list is first rendered.\nIf the index is out of bounds, the first item (index 0) will receive focus.",
|
|
23072
|
+
"default": "0",
|
|
23073
|
+
"attribute": "initial-focus",
|
|
23074
|
+
"reflects": true
|
|
23075
|
+
},
|
|
23076
|
+
{
|
|
23077
|
+
"kind": "field",
|
|
23078
|
+
"name": "itemsStore",
|
|
23079
|
+
"default": "new ElementStore<ListItem>(this, { isValidItem: this.isValidItem, })"
|
|
23080
|
+
},
|
|
23081
|
+
{
|
|
23082
|
+
"kind": "method",
|
|
23083
|
+
"name": "getCurrentIndex",
|
|
23084
|
+
"privacy": "private",
|
|
23085
|
+
"return": {
|
|
23086
|
+
"type": {
|
|
23087
|
+
"text": ""
|
|
23088
|
+
}
|
|
23089
|
+
},
|
|
23090
|
+
"parameters": [
|
|
23091
|
+
{
|
|
23092
|
+
"name": "target",
|
|
23093
|
+
"type": {
|
|
23094
|
+
"text": "HTMLElement | null"
|
|
23095
|
+
},
|
|
23096
|
+
"description": "The target element that triggered the event."
|
|
23097
|
+
}
|
|
23098
|
+
],
|
|
23099
|
+
"description": "Retrieves the current index of the item that triggered the event.",
|
|
23100
|
+
"inheritedFrom": {
|
|
23101
|
+
"name": "ListNavigationMixin",
|
|
23102
|
+
"module": "utils/mixins/ListNavigationMixin.js"
|
|
23103
|
+
}
|
|
23104
|
+
},
|
|
23105
|
+
{
|
|
23106
|
+
"kind": "method",
|
|
23107
|
+
"name": "resetTabIndexes",
|
|
23108
|
+
"privacy": "protected",
|
|
23109
|
+
"parameters": [
|
|
23110
|
+
{
|
|
23111
|
+
"name": "index",
|
|
23112
|
+
"type": {
|
|
23113
|
+
"text": "number"
|
|
23114
|
+
},
|
|
23115
|
+
"description": "The index of the currently focused item."
|
|
23116
|
+
}
|
|
23117
|
+
],
|
|
23118
|
+
"description": "Reset all tabindex to -1 and set the tabindex of the current item to 0",
|
|
23119
|
+
"inheritedFrom": {
|
|
23120
|
+
"name": "ListNavigationMixin",
|
|
23121
|
+
"module": "utils/mixins/ListNavigationMixin.js"
|
|
23122
|
+
}
|
|
23123
|
+
},
|
|
23124
|
+
{
|
|
23125
|
+
"kind": "method",
|
|
23126
|
+
"name": "resetTabIndexAndSetFocus",
|
|
23127
|
+
"privacy": "protected",
|
|
23128
|
+
"parameters": [
|
|
23129
|
+
{
|
|
23130
|
+
"name": "newIndex",
|
|
23131
|
+
"type": {
|
|
23132
|
+
"text": "number"
|
|
23133
|
+
},
|
|
23134
|
+
"description": "The index of the new item to focus."
|
|
23135
|
+
},
|
|
23136
|
+
{
|
|
23137
|
+
"name": "oldIndex",
|
|
23138
|
+
"optional": true,
|
|
23139
|
+
"type": {
|
|
23140
|
+
"text": "number"
|
|
23141
|
+
},
|
|
23142
|
+
"description": "The index of the currently focused item."
|
|
23143
|
+
},
|
|
23144
|
+
{
|
|
23145
|
+
"name": "focusNewItem",
|
|
23146
|
+
"default": "true",
|
|
23147
|
+
"description": "Call focus() on the new item or not. It should be false during firstUpdate"
|
|
23148
|
+
}
|
|
23149
|
+
],
|
|
23150
|
+
"description": "Resets the tabindex of the currently focused item and sets focus to a new item.",
|
|
23151
|
+
"return": {
|
|
23152
|
+
"type": {
|
|
23153
|
+
"text": ""
|
|
23154
|
+
}
|
|
23155
|
+
},
|
|
23156
|
+
"inheritedFrom": {
|
|
23157
|
+
"name": "ListNavigationMixin",
|
|
23158
|
+
"module": "utils/mixins/ListNavigationMixin.js"
|
|
23159
|
+
}
|
|
23160
|
+
},
|
|
23161
|
+
{
|
|
23162
|
+
"kind": "method",
|
|
23163
|
+
"name": "resolveDirectionKey",
|
|
23164
|
+
"privacy": "private",
|
|
23165
|
+
"parameters": [
|
|
23166
|
+
{
|
|
23167
|
+
"name": "key",
|
|
23168
|
+
"type": {
|
|
23169
|
+
"text": "string"
|
|
23170
|
+
},
|
|
23171
|
+
"description": "The key pressed by the user."
|
|
23172
|
+
},
|
|
23173
|
+
{
|
|
23174
|
+
"name": "isRtl",
|
|
23175
|
+
"type": {
|
|
23176
|
+
"text": "boolean"
|
|
23177
|
+
},
|
|
23178
|
+
"description": "A boolean indicating if the layout is right-to-left (RTL)."
|
|
23179
|
+
}
|
|
23180
|
+
],
|
|
23181
|
+
"description": "Resolves the key pressed by the user based on the direction of the layout.\nThis method is used to handle keyboard navigation in a right-to-left (RTL) layout.\nIt checks if the layout is RTL and adjusts the arrow keys accordingly.\nFor example, in RTL, the left arrow key behaves like the right arrow key and vice versa.",
|
|
23182
|
+
"return": {
|
|
23183
|
+
"type": {
|
|
23184
|
+
"text": ""
|
|
23185
|
+
}
|
|
23186
|
+
},
|
|
23187
|
+
"inheritedFrom": {
|
|
23188
|
+
"name": "ListNavigationMixin",
|
|
23189
|
+
"module": "utils/mixins/ListNavigationMixin.js"
|
|
23190
|
+
}
|
|
23191
|
+
},
|
|
23192
|
+
{
|
|
23193
|
+
"kind": "method",
|
|
23194
|
+
"name": "shouldLoop",
|
|
23195
|
+
"privacy": "private",
|
|
23196
|
+
"inheritedFrom": {
|
|
23197
|
+
"name": "ListNavigationMixin",
|
|
23198
|
+
"module": "utils/mixins/ListNavigationMixin.js"
|
|
23199
|
+
}
|
|
23200
|
+
}
|
|
23201
|
+
],
|
|
23202
|
+
"attributes": [
|
|
23203
|
+
{
|
|
23204
|
+
"name": "loop",
|
|
23205
|
+
"type": {
|
|
23206
|
+
"text": "'true' | 'false'"
|
|
23207
|
+
},
|
|
23208
|
+
"description": "Whether to loop navigation when reaching the end of the list.\nIf 'true', pressing the down arrow on the last item will focus the first item,\nand pressing the up arrow on the first item will focus the last item.\nIf 'false', navigation will stop at the first or last item.",
|
|
23209
|
+
"default": "''",
|
|
23210
|
+
"fieldName": "loop"
|
|
23211
|
+
},
|
|
23212
|
+
{
|
|
23213
|
+
"name": "initial-focus",
|
|
23214
|
+
"type": {
|
|
23215
|
+
"text": "number"
|
|
23216
|
+
},
|
|
23217
|
+
"description": "The index of the item that should receive focus when the list is first rendered.\nIf the index is out of bounds, the first item (index 0) will receive focus.",
|
|
23218
|
+
"default": "0",
|
|
23219
|
+
"fieldName": "initialFocus"
|
|
23220
|
+
}
|
|
23221
|
+
],
|
|
23222
|
+
"mixins": [
|
|
23223
|
+
{
|
|
23224
|
+
"name": "ListNavigationMixin",
|
|
23225
|
+
"module": "/src/utils/mixins/ListNavigationMixin"
|
|
23226
|
+
},
|
|
23227
|
+
{
|
|
23228
|
+
"name": "CaptureDestroyEventForChildElement",
|
|
23229
|
+
"module": "/src/utils/mixins/lifecycle/CaptureDestroyEventForChildElement"
|
|
23230
|
+
}
|
|
23231
|
+
],
|
|
23232
|
+
"superclass": {
|
|
23233
|
+
"name": "Component",
|
|
23234
|
+
"module": "/src/models"
|
|
23235
|
+
},
|
|
23236
|
+
"tagName": "mdc-list",
|
|
23237
|
+
"jsDoc": "/**\n * mdc-list component is used to display a group of list items. It is used as a container to wrap other list items.\n *\n * To add a header to the list, use the `mdc-listheader` component and place it in the `list-header` slot.\n * `mdc-listitem` components can be placed in the default slot.\n *\n * @tagname mdc-list\n *\n * @slot default - This is a default/unnamed slot, where listitems can be placed.\n * @slot list-header - This slot is used to pass a header for the list, which can be a `mdc-listheader` component.\n *\n * @csspart container - The container slot around the list items\n */",
|
|
23238
|
+
"customElement": true
|
|
23239
|
+
}
|
|
23240
|
+
],
|
|
23241
|
+
"exports": [
|
|
23242
|
+
{
|
|
23243
|
+
"kind": "js",
|
|
23244
|
+
"name": "default",
|
|
23245
|
+
"declaration": {
|
|
23246
|
+
"name": "List",
|
|
23247
|
+
"module": "components/list/list.component.js"
|
|
23248
|
+
}
|
|
23249
|
+
}
|
|
23250
|
+
]
|
|
23251
|
+
},
|
|
23252
23252
|
{
|
|
23253
23253
|
"kind": "javascript-module",
|
|
23254
23254
|
"path": "components/marker/marker.component.js",
|
|
@@ -25837,6 +25837,32 @@
|
|
|
25837
25837
|
},
|
|
25838
25838
|
"description": "Returns a checkmark icon if the indicator is set to checkmark and the checked state is true.\nIf the indicator is not set to checkmark or the checked state is false, it returns nothing.\n\nThe checkmark icon will always be positioned on the trailing side of the menuitem label."
|
|
25839
25839
|
},
|
|
25840
|
+
{
|
|
25841
|
+
"kind": "field",
|
|
25842
|
+
"name": "controlTypeProviderContext",
|
|
25843
|
+
"privacy": "private",
|
|
25844
|
+
"readonly": true,
|
|
25845
|
+
"inheritedFrom": {
|
|
25846
|
+
"name": "ControlTypeMixin",
|
|
25847
|
+
"module": "utils/mixins/ControlTypeMixin.js"
|
|
25848
|
+
}
|
|
25849
|
+
},
|
|
25850
|
+
{
|
|
25851
|
+
"kind": "field",
|
|
25852
|
+
"name": "controlType",
|
|
25853
|
+
"type": {
|
|
25854
|
+
"text": "ControlType | undefined"
|
|
25855
|
+
},
|
|
25856
|
+
"privacy": "public",
|
|
25857
|
+
"description": "Indicates whether the component is controlled or uncontrolled.\n- 'controlled' it will not handle any interaction itself, e.g. toggling a checkbox.\n- 'uncontrolled' it will handle interactions\n- undefined it will get the value from controltypeprovider, or default to 'uncontrolled'",
|
|
25858
|
+
"default": "undefined",
|
|
25859
|
+
"attribute": "control-type",
|
|
25860
|
+
"reflects": true,
|
|
25861
|
+
"inheritedFrom": {
|
|
25862
|
+
"name": "ControlTypeMixin",
|
|
25863
|
+
"module": "utils/mixins/ControlTypeMixin.js"
|
|
25864
|
+
}
|
|
25865
|
+
},
|
|
25840
25866
|
{
|
|
25841
25867
|
"kind": "field",
|
|
25842
25868
|
"name": "arrowPosition",
|
|
@@ -26339,6 +26365,19 @@
|
|
|
26339
26365
|
"default": "'radio'",
|
|
26340
26366
|
"fieldName": "indicator"
|
|
26341
26367
|
},
|
|
26368
|
+
{
|
|
26369
|
+
"name": "control-type",
|
|
26370
|
+
"type": {
|
|
26371
|
+
"text": "ControlType | undefined"
|
|
26372
|
+
},
|
|
26373
|
+
"description": "Indicates whether the component is controlled or uncontrolled.\n- 'controlled' it will not handle any interaction itself, e.g. toggling a checkbox.\n- 'uncontrolled' it will handle interactions\n- undefined it will get the value from controltypeprovider, or default to 'uncontrolled'",
|
|
26374
|
+
"default": "undefined",
|
|
26375
|
+
"fieldName": "controlType",
|
|
26376
|
+
"inheritedFrom": {
|
|
26377
|
+
"name": "ControlTypeMixin",
|
|
26378
|
+
"module": "src/utils/mixins/ControlTypeMixin.ts"
|
|
26379
|
+
}
|
|
26380
|
+
},
|
|
26342
26381
|
{
|
|
26343
26382
|
"name": "arrow-position",
|
|
26344
26383
|
"type": {
|
|
@@ -26500,6 +26539,12 @@
|
|
|
26500
26539
|
}
|
|
26501
26540
|
}
|
|
26502
26541
|
],
|
|
26542
|
+
"mixins": [
|
|
26543
|
+
{
|
|
26544
|
+
"name": "ControlTypeMixin",
|
|
26545
|
+
"module": "/src/utils/mixins/ControlTypeMixin"
|
|
26546
|
+
}
|
|
26547
|
+
],
|
|
26503
26548
|
"superclass": {
|
|
26504
26549
|
"name": "MenuItem",
|
|
26505
26550
|
"module": "/src/components/menuitem/menuitem.component"
|
package/dist/react/index.d.ts
CHANGED
|
@@ -38,10 +38,10 @@ export { default as InputChip } from './inputchip';
|
|
|
38
38
|
export { default as Link } from './link';
|
|
39
39
|
export { default as LinkButton } from './linkbutton';
|
|
40
40
|
export { default as Linksimple } from './linksimple';
|
|
41
|
-
export { default as List } from './list';
|
|
42
41
|
export { default as ListBox } from './listbox';
|
|
43
42
|
export { default as Listheader } from './listheader';
|
|
44
43
|
export { default as ListItem } from './listitem';
|
|
44
|
+
export { default as List } from './list';
|
|
45
45
|
export { default as Marker } from './marker';
|
|
46
46
|
export { default as MenuBar } from './menubar';
|
|
47
47
|
export { default as MenuItem } from './menuitem';
|
package/dist/react/index.js
CHANGED
|
@@ -38,10 +38,10 @@ export { default as InputChip } from './inputchip';
|
|
|
38
38
|
export { default as Link } from './link';
|
|
39
39
|
export { default as LinkButton } from './linkbutton';
|
|
40
40
|
export { default as Linksimple } from './linksimple';
|
|
41
|
-
export { default as List } from './list';
|
|
42
41
|
export { default as ListBox } from './listbox';
|
|
43
42
|
export { default as Listheader } from './listheader';
|
|
44
43
|
export { default as ListItem } from './listitem';
|
|
44
|
+
export { default as List } from './list';
|
|
45
45
|
export { default as Marker } from './marker';
|
|
46
46
|
export { default as MenuBar } from './menubar';
|
|
47
47
|
export { default as MenuItem } from './menuitem';
|
|
@@ -12,6 +12,7 @@ import ControlTypeProvider from '../../components/controltypeprovider';
|
|
|
12
12
|
import providerUtils from '../provider';
|
|
13
13
|
import { DEFAULTS, VALID_VALUES } from '../../components/controltypeprovider/controltypeprovider.constants';
|
|
14
14
|
export const ControlTypeMixin = (superClass) => {
|
|
15
|
+
// The tests for this mixin are in the menuitemcheckbox component
|
|
15
16
|
class InnerMixinClass extends superClass {
|
|
16
17
|
constructor() {
|
|
17
18
|
super(...arguments);
|