@momentum-design/components 0.120.4 → 0.120.5
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/custom-elements.json +248 -248
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +1 -1
- package/package.json +1 -1
@@ -17441,254 +17441,6 @@
|
|
17441
17441
|
}
|
17442
17442
|
]
|
17443
17443
|
},
|
17444
|
-
{
|
17445
|
-
"kind": "javascript-module",
|
17446
|
-
"path": "components/icon/icon.component.js",
|
17447
|
-
"declarations": [
|
17448
|
-
{
|
17449
|
-
"kind": "class",
|
17450
|
-
"description": "Icon component that dynamically displays SVG icons based on a valid name.\n\nThis component must be mounted within an `IconProvider` component.\n\nThe `IconProvider` defines the source URL from which icons are consumed.\nThe `Icon` component accepts a `name` attribute, which corresponds to\nthe file name of the icon to be loaded from the specified URL.\n\nOnce fetched, the icon will be rendered. If the fetching process is unsuccessful,\nno icon will be displayed.\n\nThe `size` attribute allows for dynamic sizing of the icon based on the provided\n`length-unit` attribute. This unit can either come from the `IconProvider`\nor can be overridden for each individual icon. For example:\nif `size = 1` and `length-unit = 'em'`, the dimensions of the icon will be\n`width: 1em; height: 1em`.\n\nRegarding accessibility, there are three types of icons: decorative, informative and informative standalone.\n\n### Decorative Icons\n- Decorative icons do not convey any essential information to the content of a page.\n- They should be hidden from screen readers (SR) to prevent confusion for users.\n- For decorative icons, an `aria-label` is not required, and the `role` will be set to null.\n\n### Informative Icons\n- Informative icons convey important information that is not adequately represented\n by surrounding text or components.\n- They provide valuable context and must be announced by assistive technologies.\n- For informative icons, an `aria-label` is required, and the `role` will be set to \"img\" automatically.\n- If an `aria-label` is provided, the role will be set to 'img'; if it is absent,\n the role will be unset.\n\n### Informative Standalone Icons\n- If an icon is informative (as mentioned above) and does not belong to a button (=standalone), it must\nhave a Tooltip that describes what it means.\n- For informative standalone icons, an `aria-label` & `tabindex=\"0\"` is required,\nand the `role` will be set to \"img\" automatically.\n- **Only use this when a Icon is standalone and is not part of a button or other interactive elements.**",
|
17451
|
-
"name": "Icon",
|
17452
|
-
"cssProperties": [
|
17453
|
-
{
|
17454
|
-
"description": "Allows customization of the default fill color.",
|
17455
|
-
"name": "--mdc-icon-fill-color"
|
17456
|
-
},
|
17457
|
-
{
|
17458
|
-
"description": "Allows customization of the icon size.",
|
17459
|
-
"name": "--mdc-icon-size"
|
17460
|
-
},
|
17461
|
-
{
|
17462
|
-
"description": "Allows customization of the icon border radius.",
|
17463
|
-
"name": "--mdc-icon-border-radius"
|
17464
|
-
}
|
17465
|
-
],
|
17466
|
-
"cssParts": [
|
17467
|
-
{
|
17468
|
-
"description": "The svg inside the icon element.",
|
17469
|
-
"name": "icon"
|
17470
|
-
}
|
17471
|
-
],
|
17472
|
-
"members": [
|
17473
|
-
{
|
17474
|
-
"kind": "field",
|
17475
|
-
"name": "iconData",
|
17476
|
-
"type": {
|
17477
|
-
"text": "HTMLElement | undefined"
|
17478
|
-
},
|
17479
|
-
"privacy": "private"
|
17480
|
-
},
|
17481
|
-
{
|
17482
|
-
"kind": "field",
|
17483
|
-
"name": "lengthUnitFromContext",
|
17484
|
-
"type": {
|
17485
|
-
"text": "string | undefined"
|
17486
|
-
},
|
17487
|
-
"privacy": "private"
|
17488
|
-
},
|
17489
|
-
{
|
17490
|
-
"kind": "field",
|
17491
|
-
"name": "sizeFromContext",
|
17492
|
-
"type": {
|
17493
|
-
"text": "number | undefined"
|
17494
|
-
},
|
17495
|
-
"privacy": "private"
|
17496
|
-
},
|
17497
|
-
{
|
17498
|
-
"kind": "field",
|
17499
|
-
"name": "name",
|
17500
|
-
"type": {
|
17501
|
-
"text": "IconNames | undefined"
|
17502
|
-
},
|
17503
|
-
"description": "Name of the icon (= filename)",
|
17504
|
-
"attribute": "name",
|
17505
|
-
"reflects": true
|
17506
|
-
},
|
17507
|
-
{
|
17508
|
-
"kind": "field",
|
17509
|
-
"name": "size",
|
17510
|
-
"type": {
|
17511
|
-
"text": "number | undefined"
|
17512
|
-
},
|
17513
|
-
"description": "Size of the icon (works in combination with length unit)",
|
17514
|
-
"attribute": "size"
|
17515
|
-
},
|
17516
|
-
{
|
17517
|
-
"kind": "field",
|
17518
|
-
"name": "lengthUnit",
|
17519
|
-
"type": {
|
17520
|
-
"text": "string | undefined"
|
17521
|
-
},
|
17522
|
-
"description": "Length unit attribute for overriding length-unit from `IconProvider`",
|
17523
|
-
"attribute": "length-unit"
|
17524
|
-
},
|
17525
|
-
{
|
17526
|
-
"kind": "field",
|
17527
|
-
"name": "ariaLabel",
|
17528
|
-
"type": {
|
17529
|
-
"text": "string | null"
|
17530
|
-
},
|
17531
|
-
"default": "null",
|
17532
|
-
"description": "Aria-label attribute to be set for accessibility",
|
17533
|
-
"attribute": "aria-label"
|
17534
|
-
},
|
17535
|
-
{
|
17536
|
-
"kind": "field",
|
17537
|
-
"name": "ariaLabelledBy",
|
17538
|
-
"type": {
|
17539
|
-
"text": "string | null"
|
17540
|
-
},
|
17541
|
-
"default": "null",
|
17542
|
-
"description": "Aria-labelledby attribute to be set for accessibility",
|
17543
|
-
"attribute": "aria-labelledby"
|
17544
|
-
},
|
17545
|
-
{
|
17546
|
-
"kind": "field",
|
17547
|
-
"name": "iconProviderContext",
|
17548
|
-
"privacy": "private",
|
17549
|
-
"readonly": true
|
17550
|
-
},
|
17551
|
-
{
|
17552
|
-
"kind": "field",
|
17553
|
-
"name": "abortController",
|
17554
|
-
"type": {
|
17555
|
-
"text": "AbortController | undefined"
|
17556
|
-
},
|
17557
|
-
"privacy": "private",
|
17558
|
-
"default": "new AbortController()"
|
17559
|
-
},
|
17560
|
-
{
|
17561
|
-
"kind": "method",
|
17562
|
-
"name": "prepareIconElement",
|
17563
|
-
"privacy": "private",
|
17564
|
-
"parameters": [
|
17565
|
-
{
|
17566
|
-
"name": "iconData",
|
17567
|
-
"type": {
|
17568
|
-
"text": "string"
|
17569
|
-
},
|
17570
|
-
"description": "The icon string to be parsed"
|
17571
|
-
}
|
17572
|
-
],
|
17573
|
-
"description": "Parse the icon string to an html element, set the attributes and\nreturn the icon element",
|
17574
|
-
"return": {
|
17575
|
-
"type": {
|
17576
|
-
"text": ""
|
17577
|
-
}
|
17578
|
-
}
|
17579
|
-
},
|
17580
|
-
{
|
17581
|
-
"kind": "method",
|
17582
|
-
"name": "getIconData",
|
17583
|
-
"privacy": "private",
|
17584
|
-
"description": "Fetches the icon (currently only svg) and sets state and attributes once fetched successfully\n\nThis method uses abortController.signal to cancel the fetch request when the component is disconnected or updated.\nIf the request is aborted after the fetch() call has been fulfilled but before the response body has been read,\nthen attempting to read the response body will reject with an AbortError exception."
|
17585
|
-
},
|
17586
|
-
{
|
17587
|
-
"kind": "method",
|
17588
|
-
"name": "handleIconLoadedSuccess",
|
17589
|
-
"privacy": "private",
|
17590
|
-
"parameters": [
|
17591
|
-
{
|
17592
|
-
"name": "iconHtml",
|
17593
|
-
"type": {
|
17594
|
-
"text": "HTMLElement"
|
17595
|
-
},
|
17596
|
-
"description": "The icon html element which has been fetched from the icon provider."
|
17597
|
-
}
|
17598
|
-
],
|
17599
|
-
"description": "Sets the iconData state to the fetched icon.\nDispatches a 'load' event on the component once the icon has been successfully loaded."
|
17600
|
-
},
|
17601
|
-
{
|
17602
|
-
"kind": "method",
|
17603
|
-
"name": "handleIconLoadedFailure",
|
17604
|
-
"privacy": "private",
|
17605
|
-
"parameters": [
|
17606
|
-
{
|
17607
|
-
"name": "error",
|
17608
|
-
"type": {
|
17609
|
-
"text": "unknown"
|
17610
|
-
}
|
17611
|
-
}
|
17612
|
-
],
|
17613
|
-
"description": "Dispatches an 'error' event on the component when the icon fetching has failed.\nThis event bubbles and is cancelable.\nThe error detail is set to the error object."
|
17614
|
-
},
|
17615
|
-
{
|
17616
|
-
"kind": "method",
|
17617
|
-
"name": "updateSize",
|
17618
|
-
"privacy": "private",
|
17619
|
-
"description": "Updates the size by setting the width and height"
|
17620
|
-
},
|
17621
|
-
{
|
17622
|
-
"kind": "field",
|
17623
|
-
"name": "computedIconSize",
|
17624
|
-
"privacy": "private",
|
17625
|
-
"readonly": true
|
17626
|
-
}
|
17627
|
-
],
|
17628
|
-
"attributes": [
|
17629
|
-
{
|
17630
|
-
"name": "name",
|
17631
|
-
"type": {
|
17632
|
-
"text": "IconNames | undefined"
|
17633
|
-
},
|
17634
|
-
"description": "Name of the icon (= filename)",
|
17635
|
-
"fieldName": "name"
|
17636
|
-
},
|
17637
|
-
{
|
17638
|
-
"name": "size",
|
17639
|
-
"type": {
|
17640
|
-
"text": "number | undefined"
|
17641
|
-
},
|
17642
|
-
"description": "Size of the icon (works in combination with length unit)",
|
17643
|
-
"fieldName": "size"
|
17644
|
-
},
|
17645
|
-
{
|
17646
|
-
"name": "length-unit",
|
17647
|
-
"type": {
|
17648
|
-
"text": "string | undefined"
|
17649
|
-
},
|
17650
|
-
"description": "Length unit attribute for overriding length-unit from `IconProvider`",
|
17651
|
-
"fieldName": "lengthUnit"
|
17652
|
-
},
|
17653
|
-
{
|
17654
|
-
"name": "aria-label",
|
17655
|
-
"type": {
|
17656
|
-
"text": "string | null"
|
17657
|
-
},
|
17658
|
-
"default": "null",
|
17659
|
-
"description": "Aria-label attribute to be set for accessibility",
|
17660
|
-
"fieldName": "ariaLabel"
|
17661
|
-
},
|
17662
|
-
{
|
17663
|
-
"name": "aria-labelledby",
|
17664
|
-
"type": {
|
17665
|
-
"text": "string | null"
|
17666
|
-
},
|
17667
|
-
"default": "null",
|
17668
|
-
"description": "Aria-labelledby attribute to be set for accessibility",
|
17669
|
-
"fieldName": "ariaLabelledBy"
|
17670
|
-
}
|
17671
|
-
],
|
17672
|
-
"superclass": {
|
17673
|
-
"name": "Component",
|
17674
|
-
"module": "/src/models"
|
17675
|
-
},
|
17676
|
-
"tagName": "mdc-icon",
|
17677
|
-
"jsDoc": "/**\n * Icon component that dynamically displays SVG icons based on a valid name.\n *\n * This component must be mounted within an `IconProvider` component.\n *\n * The `IconProvider` defines the source URL from which icons are consumed.\n * The `Icon` component accepts a `name` attribute, which corresponds to\n * the file name of the icon to be loaded from the specified URL.\n *\n * Once fetched, the icon will be rendered. If the fetching process is unsuccessful,\n * no icon will be displayed.\n *\n * The `size` attribute allows for dynamic sizing of the icon based on the provided\n * `length-unit` attribute. This unit can either come from the `IconProvider`\n * or can be overridden for each individual icon. For example:\n * if `size = 1` and `length-unit = 'em'`, the dimensions of the icon will be\n * `width: 1em; height: 1em`.\n *\n * Regarding accessibility, there are three types of icons: decorative, informative and informative standalone.\n *\n * ### Decorative Icons\n * - Decorative icons do not convey any essential information to the content of a page.\n * - They should be hidden from screen readers (SR) to prevent confusion for users.\n * - For decorative icons, an `aria-label` is not required, and the `role` will be set to null.\n *\n * ### Informative Icons\n * - Informative icons convey important information that is not adequately represented\n * by surrounding text or components.\n * - They provide valuable context and must be announced by assistive technologies.\n * - For informative icons, an `aria-label` is required, and the `role` will be set to \"img\" automatically.\n * - If an `aria-label` is provided, the role will be set to 'img'; if it is absent,\n * the role will be unset.\n *\n * ### Informative Standalone Icons\n * - If an icon is informative (as mentioned above) and does not belong to a button (=standalone), it must\n * have a Tooltip that describes what it means.\n * - For informative standalone icons, an `aria-label` & `tabindex=\"0\"` is required,\n * and the `role` will be set to \"img\" automatically.\n * - **Only use this when a Icon is standalone and is not part of a button or other interactive elements.**\n *\n * @tagname mdc-icon\n *\n * @cssproperty --mdc-icon-fill-color - Allows customization of the default fill color.\n * @cssproperty --mdc-icon-size - Allows customization of the icon size.\n * @cssproperty --mdc-icon-border-radius - Allows customization of the icon border radius.\n *\n * @csspart icon - The svg inside the icon element.\n */",
|
17678
|
-
"customElement": true
|
17679
|
-
}
|
17680
|
-
],
|
17681
|
-
"exports": [
|
17682
|
-
{
|
17683
|
-
"kind": "js",
|
17684
|
-
"name": "default",
|
17685
|
-
"declaration": {
|
17686
|
-
"name": "Icon",
|
17687
|
-
"module": "components/icon/icon.component.js"
|
17688
|
-
}
|
17689
|
-
}
|
17690
|
-
]
|
17691
|
-
},
|
17692
17444
|
{
|
17693
17445
|
"kind": "javascript-module",
|
17694
17446
|
"path": "components/iconprovider/iconprovider.component.js",
|
@@ -18219,6 +17971,254 @@
|
|
18219
17971
|
}
|
18220
17972
|
]
|
18221
17973
|
},
|
17974
|
+
{
|
17975
|
+
"kind": "javascript-module",
|
17976
|
+
"path": "components/icon/icon.component.js",
|
17977
|
+
"declarations": [
|
17978
|
+
{
|
17979
|
+
"kind": "class",
|
17980
|
+
"description": "Icon component that dynamically displays SVG icons based on a valid name.\n\nThis component must be mounted within an `IconProvider` component.\n\nThe `IconProvider` defines the source URL from which icons are consumed.\nThe `Icon` component accepts a `name` attribute, which corresponds to\nthe file name of the icon to be loaded from the specified URL.\n\nOnce fetched, the icon will be rendered. If the fetching process is unsuccessful,\nno icon will be displayed.\n\nThe `size` attribute allows for dynamic sizing of the icon based on the provided\n`length-unit` attribute. This unit can either come from the `IconProvider`\nor can be overridden for each individual icon. For example:\nif `size = 1` and `length-unit = 'em'`, the dimensions of the icon will be\n`width: 1em; height: 1em`.\n\nRegarding accessibility, there are three types of icons: decorative, informative and informative standalone.\n\n### Decorative Icons\n- Decorative icons do not convey any essential information to the content of a page.\n- They should be hidden from screen readers (SR) to prevent confusion for users.\n- For decorative icons, an `aria-label` is not required, and the `role` will be set to null.\n\n### Informative Icons\n- Informative icons convey important information that is not adequately represented\n by surrounding text or components.\n- They provide valuable context and must be announced by assistive technologies.\n- For informative icons, an `aria-label` is required, and the `role` will be set to \"img\" automatically.\n- If an `aria-label` is provided, the role will be set to 'img'; if it is absent,\n the role will be unset.\n\n### Informative Standalone Icons\n- If an icon is informative (as mentioned above) and does not belong to a button (=standalone), it must\nhave a Tooltip that describes what it means.\n- For informative standalone icons, an `aria-label` & `tabindex=\"0\"` is required,\nand the `role` will be set to \"img\" automatically.\n- **Only use this when a Icon is standalone and is not part of a button or other interactive elements.**",
|
17981
|
+
"name": "Icon",
|
17982
|
+
"cssProperties": [
|
17983
|
+
{
|
17984
|
+
"description": "Allows customization of the default fill color.",
|
17985
|
+
"name": "--mdc-icon-fill-color"
|
17986
|
+
},
|
17987
|
+
{
|
17988
|
+
"description": "Allows customization of the icon size.",
|
17989
|
+
"name": "--mdc-icon-size"
|
17990
|
+
},
|
17991
|
+
{
|
17992
|
+
"description": "Allows customization of the icon border radius.",
|
17993
|
+
"name": "--mdc-icon-border-radius"
|
17994
|
+
}
|
17995
|
+
],
|
17996
|
+
"cssParts": [
|
17997
|
+
{
|
17998
|
+
"description": "The svg inside the icon element.",
|
17999
|
+
"name": "icon"
|
18000
|
+
}
|
18001
|
+
],
|
18002
|
+
"members": [
|
18003
|
+
{
|
18004
|
+
"kind": "field",
|
18005
|
+
"name": "iconData",
|
18006
|
+
"type": {
|
18007
|
+
"text": "HTMLElement | undefined"
|
18008
|
+
},
|
18009
|
+
"privacy": "private"
|
18010
|
+
},
|
18011
|
+
{
|
18012
|
+
"kind": "field",
|
18013
|
+
"name": "lengthUnitFromContext",
|
18014
|
+
"type": {
|
18015
|
+
"text": "string | undefined"
|
18016
|
+
},
|
18017
|
+
"privacy": "private"
|
18018
|
+
},
|
18019
|
+
{
|
18020
|
+
"kind": "field",
|
18021
|
+
"name": "sizeFromContext",
|
18022
|
+
"type": {
|
18023
|
+
"text": "number | undefined"
|
18024
|
+
},
|
18025
|
+
"privacy": "private"
|
18026
|
+
},
|
18027
|
+
{
|
18028
|
+
"kind": "field",
|
18029
|
+
"name": "name",
|
18030
|
+
"type": {
|
18031
|
+
"text": "IconNames | undefined"
|
18032
|
+
},
|
18033
|
+
"description": "Name of the icon (= filename)",
|
18034
|
+
"attribute": "name",
|
18035
|
+
"reflects": true
|
18036
|
+
},
|
18037
|
+
{
|
18038
|
+
"kind": "field",
|
18039
|
+
"name": "size",
|
18040
|
+
"type": {
|
18041
|
+
"text": "number | undefined"
|
18042
|
+
},
|
18043
|
+
"description": "Size of the icon (works in combination with length unit)",
|
18044
|
+
"attribute": "size"
|
18045
|
+
},
|
18046
|
+
{
|
18047
|
+
"kind": "field",
|
18048
|
+
"name": "lengthUnit",
|
18049
|
+
"type": {
|
18050
|
+
"text": "string | undefined"
|
18051
|
+
},
|
18052
|
+
"description": "Length unit attribute for overriding length-unit from `IconProvider`",
|
18053
|
+
"attribute": "length-unit"
|
18054
|
+
},
|
18055
|
+
{
|
18056
|
+
"kind": "field",
|
18057
|
+
"name": "ariaLabel",
|
18058
|
+
"type": {
|
18059
|
+
"text": "string | null"
|
18060
|
+
},
|
18061
|
+
"default": "null",
|
18062
|
+
"description": "Aria-label attribute to be set for accessibility",
|
18063
|
+
"attribute": "aria-label"
|
18064
|
+
},
|
18065
|
+
{
|
18066
|
+
"kind": "field",
|
18067
|
+
"name": "ariaLabelledBy",
|
18068
|
+
"type": {
|
18069
|
+
"text": "string | null"
|
18070
|
+
},
|
18071
|
+
"default": "null",
|
18072
|
+
"description": "Aria-labelledby attribute to be set for accessibility",
|
18073
|
+
"attribute": "aria-labelledby"
|
18074
|
+
},
|
18075
|
+
{
|
18076
|
+
"kind": "field",
|
18077
|
+
"name": "iconProviderContext",
|
18078
|
+
"privacy": "private",
|
18079
|
+
"readonly": true
|
18080
|
+
},
|
18081
|
+
{
|
18082
|
+
"kind": "field",
|
18083
|
+
"name": "abortController",
|
18084
|
+
"type": {
|
18085
|
+
"text": "AbortController | undefined"
|
18086
|
+
},
|
18087
|
+
"privacy": "private",
|
18088
|
+
"default": "new AbortController()"
|
18089
|
+
},
|
18090
|
+
{
|
18091
|
+
"kind": "method",
|
18092
|
+
"name": "prepareIconElement",
|
18093
|
+
"privacy": "private",
|
18094
|
+
"parameters": [
|
18095
|
+
{
|
18096
|
+
"name": "iconData",
|
18097
|
+
"type": {
|
18098
|
+
"text": "string"
|
18099
|
+
},
|
18100
|
+
"description": "The icon string to be parsed"
|
18101
|
+
}
|
18102
|
+
],
|
18103
|
+
"description": "Parse the icon string to an html element, set the attributes and\nreturn the icon element",
|
18104
|
+
"return": {
|
18105
|
+
"type": {
|
18106
|
+
"text": ""
|
18107
|
+
}
|
18108
|
+
}
|
18109
|
+
},
|
18110
|
+
{
|
18111
|
+
"kind": "method",
|
18112
|
+
"name": "getIconData",
|
18113
|
+
"privacy": "private",
|
18114
|
+
"description": "Fetches the icon (currently only svg) and sets state and attributes once fetched successfully\n\nThis method uses abortController.signal to cancel the fetch request when the component is disconnected or updated.\nIf the request is aborted after the fetch() call has been fulfilled but before the response body has been read,\nthen attempting to read the response body will reject with an AbortError exception."
|
18115
|
+
},
|
18116
|
+
{
|
18117
|
+
"kind": "method",
|
18118
|
+
"name": "handleIconLoadedSuccess",
|
18119
|
+
"privacy": "private",
|
18120
|
+
"parameters": [
|
18121
|
+
{
|
18122
|
+
"name": "iconHtml",
|
18123
|
+
"type": {
|
18124
|
+
"text": "HTMLElement"
|
18125
|
+
},
|
18126
|
+
"description": "The icon html element which has been fetched from the icon provider."
|
18127
|
+
}
|
18128
|
+
],
|
18129
|
+
"description": "Sets the iconData state to the fetched icon.\nDispatches a 'load' event on the component once the icon has been successfully loaded."
|
18130
|
+
},
|
18131
|
+
{
|
18132
|
+
"kind": "method",
|
18133
|
+
"name": "handleIconLoadedFailure",
|
18134
|
+
"privacy": "private",
|
18135
|
+
"parameters": [
|
18136
|
+
{
|
18137
|
+
"name": "error",
|
18138
|
+
"type": {
|
18139
|
+
"text": "unknown"
|
18140
|
+
}
|
18141
|
+
}
|
18142
|
+
],
|
18143
|
+
"description": "Dispatches an 'error' event on the component when the icon fetching has failed.\nThis event bubbles and is cancelable.\nThe error detail is set to the error object."
|
18144
|
+
},
|
18145
|
+
{
|
18146
|
+
"kind": "method",
|
18147
|
+
"name": "updateSize",
|
18148
|
+
"privacy": "private",
|
18149
|
+
"description": "Updates the size by setting the width and height"
|
18150
|
+
},
|
18151
|
+
{
|
18152
|
+
"kind": "field",
|
18153
|
+
"name": "computedIconSize",
|
18154
|
+
"privacy": "private",
|
18155
|
+
"readonly": true
|
18156
|
+
}
|
18157
|
+
],
|
18158
|
+
"attributes": [
|
18159
|
+
{
|
18160
|
+
"name": "name",
|
18161
|
+
"type": {
|
18162
|
+
"text": "IconNames | undefined"
|
18163
|
+
},
|
18164
|
+
"description": "Name of the icon (= filename)",
|
18165
|
+
"fieldName": "name"
|
18166
|
+
},
|
18167
|
+
{
|
18168
|
+
"name": "size",
|
18169
|
+
"type": {
|
18170
|
+
"text": "number | undefined"
|
18171
|
+
},
|
18172
|
+
"description": "Size of the icon (works in combination with length unit)",
|
18173
|
+
"fieldName": "size"
|
18174
|
+
},
|
18175
|
+
{
|
18176
|
+
"name": "length-unit",
|
18177
|
+
"type": {
|
18178
|
+
"text": "string | undefined"
|
18179
|
+
},
|
18180
|
+
"description": "Length unit attribute for overriding length-unit from `IconProvider`",
|
18181
|
+
"fieldName": "lengthUnit"
|
18182
|
+
},
|
18183
|
+
{
|
18184
|
+
"name": "aria-label",
|
18185
|
+
"type": {
|
18186
|
+
"text": "string | null"
|
18187
|
+
},
|
18188
|
+
"default": "null",
|
18189
|
+
"description": "Aria-label attribute to be set for accessibility",
|
18190
|
+
"fieldName": "ariaLabel"
|
18191
|
+
},
|
18192
|
+
{
|
18193
|
+
"name": "aria-labelledby",
|
18194
|
+
"type": {
|
18195
|
+
"text": "string | null"
|
18196
|
+
},
|
18197
|
+
"default": "null",
|
18198
|
+
"description": "Aria-labelledby attribute to be set for accessibility",
|
18199
|
+
"fieldName": "ariaLabelledBy"
|
18200
|
+
}
|
18201
|
+
],
|
18202
|
+
"superclass": {
|
18203
|
+
"name": "Component",
|
18204
|
+
"module": "/src/models"
|
18205
|
+
},
|
18206
|
+
"tagName": "mdc-icon",
|
18207
|
+
"jsDoc": "/**\n * Icon component that dynamically displays SVG icons based on a valid name.\n *\n * This component must be mounted within an `IconProvider` component.\n *\n * The `IconProvider` defines the source URL from which icons are consumed.\n * The `Icon` component accepts a `name` attribute, which corresponds to\n * the file name of the icon to be loaded from the specified URL.\n *\n * Once fetched, the icon will be rendered. If the fetching process is unsuccessful,\n * no icon will be displayed.\n *\n * The `size` attribute allows for dynamic sizing of the icon based on the provided\n * `length-unit` attribute. This unit can either come from the `IconProvider`\n * or can be overridden for each individual icon. For example:\n * if `size = 1` and `length-unit = 'em'`, the dimensions of the icon will be\n * `width: 1em; height: 1em`.\n *\n * Regarding accessibility, there are three types of icons: decorative, informative and informative standalone.\n *\n * ### Decorative Icons\n * - Decorative icons do not convey any essential information to the content of a page.\n * - They should be hidden from screen readers (SR) to prevent confusion for users.\n * - For decorative icons, an `aria-label` is not required, and the `role` will be set to null.\n *\n * ### Informative Icons\n * - Informative icons convey important information that is not adequately represented\n * by surrounding text or components.\n * - They provide valuable context and must be announced by assistive technologies.\n * - For informative icons, an `aria-label` is required, and the `role` will be set to \"img\" automatically.\n * - If an `aria-label` is provided, the role will be set to 'img'; if it is absent,\n * the role will be unset.\n *\n * ### Informative Standalone Icons\n * - If an icon is informative (as mentioned above) and does not belong to a button (=standalone), it must\n * have a Tooltip that describes what it means.\n * - For informative standalone icons, an `aria-label` & `tabindex=\"0\"` is required,\n * and the `role` will be set to \"img\" automatically.\n * - **Only use this when a Icon is standalone and is not part of a button or other interactive elements.**\n *\n * @tagname mdc-icon\n *\n * @cssproperty --mdc-icon-fill-color - Allows customization of the default fill color.\n * @cssproperty --mdc-icon-size - Allows customization of the icon size.\n * @cssproperty --mdc-icon-border-radius - Allows customization of the icon border radius.\n *\n * @csspart icon - The svg inside the icon element.\n */",
|
18208
|
+
"customElement": true
|
18209
|
+
}
|
18210
|
+
],
|
18211
|
+
"exports": [
|
18212
|
+
{
|
18213
|
+
"kind": "js",
|
18214
|
+
"name": "default",
|
18215
|
+
"declaration": {
|
18216
|
+
"name": "Icon",
|
18217
|
+
"module": "components/icon/icon.component.js"
|
18218
|
+
}
|
18219
|
+
}
|
18220
|
+
]
|
18221
|
+
},
|
18222
18222
|
{
|
18223
18223
|
"kind": "javascript-module",
|
18224
18224
|
"path": "components/input/input.component.js",
|
package/dist/react/index.d.ts
CHANGED
@@ -28,10 +28,10 @@ export { default as Divider } from './divider';
|
|
28
28
|
export { default as FilterChip } from './filterchip';
|
29
29
|
export { default as FormfieldGroup } from './formfieldgroup';
|
30
30
|
export { default as FormfieldWrapper } from './formfieldwrapper';
|
31
|
-
export { default as Icon } from './icon';
|
32
31
|
export { default as IconProvider } from './iconprovider';
|
33
32
|
export { default as Illustration } from './illustration';
|
34
33
|
export { default as IllustrationProvider } from './illustrationprovider';
|
34
|
+
export { default as Icon } from './icon';
|
35
35
|
export { default as Input } from './input';
|
36
36
|
export { default as InputChip } from './inputchip';
|
37
37
|
export { default as Link } from './link';
|
package/dist/react/index.js
CHANGED
@@ -28,10 +28,10 @@ export { default as Divider } from './divider';
|
|
28
28
|
export { default as FilterChip } from './filterchip';
|
29
29
|
export { default as FormfieldGroup } from './formfieldgroup';
|
30
30
|
export { default as FormfieldWrapper } from './formfieldwrapper';
|
31
|
-
export { default as Icon } from './icon';
|
32
31
|
export { default as IconProvider } from './iconprovider';
|
33
32
|
export { default as Illustration } from './illustration';
|
34
33
|
export { default as IllustrationProvider } from './illustrationprovider';
|
34
|
+
export { default as Icon } from './icon';
|
35
35
|
export { default as Input } from './input';
|
36
36
|
export { default as InputChip } from './inputchip';
|
37
37
|
export { default as Link } from './link';
|