@momentum-design/components 0.16.16 → 0.16.18
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/browser/index.js +162 -50
- package/dist/browser/index.js.map +4 -4
- package/dist/components/formfieldwrapper/formfieldwrapper.component.d.ts +2 -11
- package/dist/components/formfieldwrapper/formfieldwrapper.component.js +12 -19
- package/dist/components/formfieldwrapper/formfieldwrapper.constants.d.ts +0 -3
- package/dist/components/formfieldwrapper/formfieldwrapper.constants.js +0 -3
- package/dist/components/link/index.d.ts +8 -0
- package/dist/components/link/index.js +5 -0
- package/dist/components/link/link.component.d.ts +90 -0
- package/dist/components/link/link.component.js +154 -0
- package/dist/components/link/link.constants.d.ts +17 -0
- package/dist/components/link/link.constants.js +18 -0
- package/dist/components/link/link.styles.d.ts +2 -0
- package/dist/components/link/link.styles.js +116 -0
- package/dist/components/link/link.types.d.ts +4 -0
- package/dist/components/link/link.types.js +1 -0
- package/dist/custom-elements.json +228 -27
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/react/formfieldwrapper/index.d.ts +2 -0
- package/dist/react/formfieldwrapper/index.js +2 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +1 -0
- package/dist/react/link/index.d.ts +29 -0
- package/dist/react/link/index.js +38 -0
- package/dist/utils/styles/index.js +2 -2
- package/package.json +1 -1
@@ -0,0 +1,116 @@
|
|
1
|
+
import { css } from 'lit';
|
2
|
+
import { hostFitContentStyles, hostFocusRingStyles } from '../../utils/styles';
|
3
|
+
const styles = [hostFitContentStyles, css `
|
4
|
+
|
5
|
+
:host {
|
6
|
+
|
7
|
+
--mdc-link-border-radius: 0.25rem;
|
8
|
+
--mdc-link-color-active: var(--mds-color-theme-text-accent-active);
|
9
|
+
--mdc-link-color-disabled: var(--mds-color-theme-text-primary-disabled);
|
10
|
+
--mdc-link-color-hover: var(--mds-color-theme-text-accent-hover);
|
11
|
+
--mdc-link-color-normal: var(--mds-color-theme-text-accent-normal);
|
12
|
+
--mdc-link-icon-margin-left: 0.25rem;
|
13
|
+
--mdc-link-inverted-color-active: var(--mds-color-theme-inverted-text-accent-active);
|
14
|
+
--mdc-link-inverted-color-disabled: var(--mds-color-theme-inverted-text-primary-disabled);
|
15
|
+
--mdc-link-inverted-color-hover: var(--mds-color-theme-inverted-text-accent-hover);
|
16
|
+
--mdc-link-inverted-color-normal: var(--mds-color-theme-inverted-text-accent-normal);
|
17
|
+
--mdc-link-text-decoration-disabled: underline;
|
18
|
+
|
19
|
+
border-radius: var(--mdc-link-border-radius);
|
20
|
+
color: var(--mdc-link-color-normal);
|
21
|
+
}
|
22
|
+
|
23
|
+
::slotted(a) {
|
24
|
+
outline: none;
|
25
|
+
align-items: center;
|
26
|
+
color: inherit;
|
27
|
+
display: flex;
|
28
|
+
gap: var(--mdc-link-icon-margin-left);
|
29
|
+
text-decoration: inherit;
|
30
|
+
text-underline-offset: auto;
|
31
|
+
text-underline-position: from-font;
|
32
|
+
}
|
33
|
+
|
34
|
+
:host(:hover) {
|
35
|
+
color: var(--mdc-link-color-hover);
|
36
|
+
}
|
37
|
+
|
38
|
+
:host(:active) {
|
39
|
+
color: var(--mdc-link-color-active);
|
40
|
+
}
|
41
|
+
|
42
|
+
:host([inline]) {
|
43
|
+
display: inline-flex;
|
44
|
+
}
|
45
|
+
|
46
|
+
:host([inverted]) {
|
47
|
+
color: var(--mdc-link-inverted-color-normal);
|
48
|
+
}
|
49
|
+
|
50
|
+
:host([inverted]:hover) {
|
51
|
+
color: var(--mdc-link-inverted-color-hover);
|
52
|
+
}
|
53
|
+
|
54
|
+
:host([inverted]:active) {
|
55
|
+
color: var(--mdc-link-inverted-color-active);
|
56
|
+
}
|
57
|
+
|
58
|
+
:host([size="large"]) {
|
59
|
+
font-size: var(--mds-font-apps-body-large-regular-font-size);
|
60
|
+
font-weight: var(--mds-font-apps-body-large-regular-font-weight);
|
61
|
+
line-height: var(--mds-font-apps-body-large-regular-line-height);
|
62
|
+
text-decoration: var(--mds-font-apps-body-large-regular-text-decoration);
|
63
|
+
text-transform: var(--mds-font-apps-body-large-regular-text-case);
|
64
|
+
}
|
65
|
+
|
66
|
+
:host([size="midsize"]) {
|
67
|
+
font-size: var(--mds-font-apps-body-midsize-regular-font-size);
|
68
|
+
font-weight: var(--mds-font-apps-body-midsize-regular-font-weight);
|
69
|
+
line-height: var(--mds-font-apps-body-midsize-regular-line-height);
|
70
|
+
text-decoration: var(--mds-font-apps-body-midsize-regular-text-decoration);
|
71
|
+
text-transform: var(--mds-font-apps-body-midsize-regular-text-case);
|
72
|
+
}
|
73
|
+
|
74
|
+
:host([size="small"]) {
|
75
|
+
font-size: var(--mds-font-apps-body-small-regular-font-size);
|
76
|
+
font-weight: var(--mds-font-apps-body-small-regular-font-weight);
|
77
|
+
line-height: var(--mds-font-apps-body-small-regular-line-height);
|
78
|
+
text-decoration: var(--mds-font-apps-body-small-regular-text-decoration);
|
79
|
+
text-transform: var(--mds-font-apps-body-small-regular-text-case);
|
80
|
+
}
|
81
|
+
|
82
|
+
:host([size="large"]:hover), :host([size="large"]:active), :host([size="large"][inline]) {
|
83
|
+
font-size: var(--mds-font-apps-body-large-regular-underline-font-size);
|
84
|
+
font-weight: var(--mds-font-apps-body-large-regular-underline-font-weight);
|
85
|
+
line-height: var(--mds-font-apps-body-large-regular-underline-line-height);
|
86
|
+
text-decoration: var(--mds-font-apps-body-large-regular-underline-text-decoration);
|
87
|
+
text-transform: var(--mds-font-apps-body-large-regular-underline-text-case);
|
88
|
+
}
|
89
|
+
|
90
|
+
:host([size="midsize"]:hover), :host([size="midsize"]:active), :host([size="midsize"][inline]) {
|
91
|
+
font-size: var(--mds-font-apps-body-midsize-regular-underline-font-size);
|
92
|
+
font-weight: var(--mds-font-apps-body-midsize-regular-underline-font-weight);
|
93
|
+
line-height: var(--mds-font-apps-body-midsize-regular-underline-line-height);
|
94
|
+
text-decoration: var(--mds-font-apps-body-midsize-regular-underline-text-decoration);
|
95
|
+
text-transform: var(--mds-font-apps-body-midsize-regular-underline-text-case);
|
96
|
+
}
|
97
|
+
|
98
|
+
:host([size="small"]:hover), :host([size="small"]:active), :host([size="small"][inline]) {
|
99
|
+
font-size: var(--mds-font-apps-body-small-regular-underline-font-size);
|
100
|
+
font-weight: var(--mds-font-apps-body-small-regular-underline-font-weight);
|
101
|
+
line-height: var(--mds-font-apps-body-small-regular-underline-line-height);
|
102
|
+
text-decoration: var(--mds-font-apps-body-small-regular-underline-text-decoration);
|
103
|
+
text-transform: var(--mds-font-apps-body-small-regular-underline-text-case);
|
104
|
+
}
|
105
|
+
|
106
|
+
:host([disabled]) {
|
107
|
+
color: var(--mdc-link-color-disabled);
|
108
|
+
pointer-events: none;
|
109
|
+
text-decoration: var(--mdc-link-text-decoration-disabled);
|
110
|
+
}
|
111
|
+
|
112
|
+
:host([inverted][disabled]) {
|
113
|
+
color: var(--mdc-link-inverted-color-disabled);
|
114
|
+
}
|
115
|
+
`, ...hostFocusRingStyles()];
|
116
|
+
export default styles;
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -2167,6 +2167,12 @@
|
|
2167
2167
|
"kind": "class",
|
2168
2168
|
"description": "formfieldwrapper is a component that contains the label and helper/validation text\n that can be configured in various ways to suit different use cases (most of the input related components).\nIt is used as an internal component and is not intended to be used directly by consumers.",
|
2169
2169
|
"name": "FormfieldWrapper",
|
2170
|
+
"slots": [
|
2171
|
+
{
|
2172
|
+
"description": "slot to add the label info icon",
|
2173
|
+
"name": "label-info"
|
2174
|
+
}
|
2175
|
+
],
|
2170
2176
|
"members": [
|
2171
2177
|
{
|
2172
2178
|
"kind": "field",
|
@@ -2205,14 +2211,6 @@
|
|
2205
2211
|
"attribute": "help-text",
|
2206
2212
|
"reflects": true
|
2207
2213
|
},
|
2208
|
-
{
|
2209
|
-
"kind": "field",
|
2210
|
-
"name": "labelInfoText",
|
2211
|
-
"type": {
|
2212
|
-
"text": "string | undefined"
|
2213
|
-
},
|
2214
|
-
"attribute": "label-info-text"
|
2215
|
-
},
|
2216
2214
|
{
|
2217
2215
|
"kind": "method",
|
2218
2216
|
"name": "renderLabelElement",
|
@@ -2224,17 +2222,6 @@
|
|
2224
2222
|
}
|
2225
2223
|
}
|
2226
2224
|
},
|
2227
|
-
{
|
2228
|
-
"kind": "method",
|
2229
|
-
"name": "renderLabelInfoToggleTip",
|
2230
|
-
"privacy": "protected",
|
2231
|
-
"description": "displays a info icon, which when hovered over, displays the labelInfoText.\nThis is in beta and is subject to change once the toggletip component is ready.",
|
2232
|
-
"return": {
|
2233
|
-
"type": {
|
2234
|
-
"text": ""
|
2235
|
-
}
|
2236
|
-
}
|
2237
|
-
},
|
2238
2225
|
{
|
2239
2226
|
"kind": "method",
|
2240
2227
|
"name": "renderHelpTextIcon",
|
@@ -2310,13 +2297,6 @@
|
|
2310
2297
|
},
|
2311
2298
|
"description": "The help text that is displayed below the input field.",
|
2312
2299
|
"fieldName": "helpText"
|
2313
|
-
},
|
2314
|
-
{
|
2315
|
-
"name": "label-info-text",
|
2316
|
-
"type": {
|
2317
|
-
"text": "string | undefined"
|
2318
|
-
},
|
2319
|
-
"fieldName": "labelInfoText"
|
2320
2300
|
}
|
2321
2301
|
],
|
2322
2302
|
"superclass": {
|
@@ -2324,7 +2304,7 @@
|
|
2324
2304
|
"module": "/src/models"
|
2325
2305
|
},
|
2326
2306
|
"tagName": "mdc-formfieldwrapper",
|
2327
|
-
"jsDoc": "/**\n * formfieldwrapper is a component that contains the label and helper/validation text\n * that can be configured in various ways to suit different use cases (most of the input related components).\n * It is used as an internal component and is not intended to be used directly by consumers.\n *\n * @tagname mdc-formfieldwrapper\n *\n */",
|
2307
|
+
"jsDoc": "/**\n * formfieldwrapper is a component that contains the label and helper/validation text\n * that can be configured in various ways to suit different use cases (most of the input related components).\n * It is used as an internal component and is not intended to be used directly by consumers.\n *\n * @tagname mdc-formfieldwrapper\n *\n * @slot label-info - slot to add the label info icon\n *\n */",
|
2328
2308
|
"customElement": true
|
2329
2309
|
}
|
2330
2310
|
],
|
@@ -2698,6 +2678,227 @@
|
|
2698
2678
|
}
|
2699
2679
|
]
|
2700
2680
|
},
|
2681
|
+
{
|
2682
|
+
"kind": "javascript-module",
|
2683
|
+
"path": "components/link/link.component.js",
|
2684
|
+
"declarations": [
|
2685
|
+
{
|
2686
|
+
"kind": "class",
|
2687
|
+
"description": "`mdc-link` component can be used to navigate to a different page\nwithin the application or to an external site. It can be used to link to\nemails or phone numbers.\n\nThe `children` of the link component is expected to be an anchor element\ncontaining the text, href, and other attributes.\n\nFor `icon`, the `mdc-icon` component is used to render the icon.",
|
2688
|
+
"name": "Link",
|
2689
|
+
"cssProperties": [
|
2690
|
+
{
|
2691
|
+
"description": "Border radius of the link",
|
2692
|
+
"name": "--mdc-link-border-radius"
|
2693
|
+
},
|
2694
|
+
{
|
2695
|
+
"description": "Text and icon color of the link in active state",
|
2696
|
+
"name": "--mdc-link-color-active"
|
2697
|
+
},
|
2698
|
+
{
|
2699
|
+
"description": "Text and icon color of the link in disabled state",
|
2700
|
+
"name": "--mdc-link-color-disabled"
|
2701
|
+
},
|
2702
|
+
{
|
2703
|
+
"description": "Text and icon color of the link in hover state",
|
2704
|
+
"name": "--mdc-link-color-hover"
|
2705
|
+
},
|
2706
|
+
{
|
2707
|
+
"description": "Text and icon color of the link in normal state",
|
2708
|
+
"name": "--mdc-link-color-normal"
|
2709
|
+
},
|
2710
|
+
{
|
2711
|
+
"description": "Gap between the text and icon (only applicable when an icon is set)",
|
2712
|
+
"name": "--mdc-link-icon-margin-left"
|
2713
|
+
},
|
2714
|
+
{
|
2715
|
+
"description": "Text and icon color of the inverted link in active state",
|
2716
|
+
"name": "--mdc-link-inverted-color-active"
|
2717
|
+
},
|
2718
|
+
{
|
2719
|
+
"description": "Text and icon color of the inverted link in disabled state",
|
2720
|
+
"name": "--mdc-link-inverted-color-disabled"
|
2721
|
+
},
|
2722
|
+
{
|
2723
|
+
"description": "Text and icon color of the inverted link in hover state",
|
2724
|
+
"name": "--mdc-link-inverted-color-hover"
|
2725
|
+
},
|
2726
|
+
{
|
2727
|
+
"description": "Text and icon color of the inverted link in normal state",
|
2728
|
+
"name": "--mdc-link-inverted-color-normal"
|
2729
|
+
},
|
2730
|
+
{
|
2731
|
+
"description": "Text decoration of the link in disabled state for all variants",
|
2732
|
+
"name": "--mdc-link-text-decoration-disabled"
|
2733
|
+
}
|
2734
|
+
],
|
2735
|
+
"members": [
|
2736
|
+
{
|
2737
|
+
"kind": "field",
|
2738
|
+
"name": "iconName",
|
2739
|
+
"type": {
|
2740
|
+
"text": "IconNames | undefined"
|
2741
|
+
},
|
2742
|
+
"description": "Name of the icon (= filename) to be used as trailing icon for link.\n\nIf no `icon` is provided, no icon will be rendered.",
|
2743
|
+
"attribute": "icon-name"
|
2744
|
+
},
|
2745
|
+
{
|
2746
|
+
"kind": "field",
|
2747
|
+
"name": "inline",
|
2748
|
+
"type": {
|
2749
|
+
"text": "boolean"
|
2750
|
+
},
|
2751
|
+
"description": "The link can be inline or standalone.",
|
2752
|
+
"default": "false",
|
2753
|
+
"attribute": "inline",
|
2754
|
+
"reflects": true
|
2755
|
+
},
|
2756
|
+
{
|
2757
|
+
"kind": "field",
|
2758
|
+
"name": "inverted",
|
2759
|
+
"type": {
|
2760
|
+
"text": "boolean"
|
2761
|
+
},
|
2762
|
+
"description": "The link color can be inverted by setting the inverted attribute to true.",
|
2763
|
+
"default": "false",
|
2764
|
+
"attribute": "inverted",
|
2765
|
+
"reflects": true
|
2766
|
+
},
|
2767
|
+
{
|
2768
|
+
"kind": "field",
|
2769
|
+
"name": "size",
|
2770
|
+
"type": {
|
2771
|
+
"text": "LinkSize"
|
2772
|
+
},
|
2773
|
+
"description": "Size of the link.\nAcceptable values include:\n\n- 'small'\n- 'midsize'\n- 'large'",
|
2774
|
+
"default": "large",
|
2775
|
+
"attribute": "size",
|
2776
|
+
"reflects": true
|
2777
|
+
},
|
2778
|
+
{
|
2779
|
+
"kind": "method",
|
2780
|
+
"name": "getIconSize",
|
2781
|
+
"privacy": "private",
|
2782
|
+
"return": {
|
2783
|
+
"type": {
|
2784
|
+
"text": ""
|
2785
|
+
}
|
2786
|
+
},
|
2787
|
+
"description": "Method to get the size of the trailing icon based on the link size."
|
2788
|
+
},
|
2789
|
+
{
|
2790
|
+
"kind": "method",
|
2791
|
+
"name": "setDisabled",
|
2792
|
+
"privacy": "private",
|
2793
|
+
"parameters": [
|
2794
|
+
{
|
2795
|
+
"name": "disabled",
|
2796
|
+
"type": {
|
2797
|
+
"text": "boolean"
|
2798
|
+
},
|
2799
|
+
"description": "The disabled state of icon"
|
2800
|
+
}
|
2801
|
+
],
|
2802
|
+
"description": "Updates the tabindex of the host element to disable or enable the link.\nWhen disabled, the link is not focusable or clickable, and tabindex is set to -1\nand aria-disabled attribute is set to true\nWhen link is not disabled, the previous tabindex of the host element is restored\nand aria-disabled attribute is removed."
|
2803
|
+
},
|
2804
|
+
{
|
2805
|
+
"kind": "method",
|
2806
|
+
"name": "updateTrailingIcon",
|
2807
|
+
"privacy": "private",
|
2808
|
+
"description": "Method to create and append trailing icon to the first anchor element in the slot.\nIf no icon name is provided, no icon will be rendered."
|
2809
|
+
},
|
2810
|
+
{
|
2811
|
+
"kind": "field",
|
2812
|
+
"name": "disabled",
|
2813
|
+
"type": {
|
2814
|
+
"text": "boolean"
|
2815
|
+
},
|
2816
|
+
"default": "false",
|
2817
|
+
"description": "Indicates whether the component is disabled.\nWhen the component is disabled for user interaction; it is not focusable or clickable.",
|
2818
|
+
"attribute": "disabled",
|
2819
|
+
"reflects": true,
|
2820
|
+
"inheritedFrom": {
|
2821
|
+
"name": "DisabledMixin",
|
2822
|
+
"module": "utils/mixins/DisabledMixin.js"
|
2823
|
+
}
|
2824
|
+
}
|
2825
|
+
],
|
2826
|
+
"attributes": [
|
2827
|
+
{
|
2828
|
+
"name": "icon-name",
|
2829
|
+
"type": {
|
2830
|
+
"text": "IconNames | undefined"
|
2831
|
+
},
|
2832
|
+
"description": "Name of the icon (= filename) to be used as trailing icon for link.\n\nIf no `icon` is provided, no icon will be rendered.",
|
2833
|
+
"fieldName": "iconName"
|
2834
|
+
},
|
2835
|
+
{
|
2836
|
+
"name": "inline",
|
2837
|
+
"type": {
|
2838
|
+
"text": "boolean"
|
2839
|
+
},
|
2840
|
+
"description": "The link can be inline or standalone.",
|
2841
|
+
"default": "false",
|
2842
|
+
"fieldName": "inline"
|
2843
|
+
},
|
2844
|
+
{
|
2845
|
+
"name": "inverted",
|
2846
|
+
"type": {
|
2847
|
+
"text": "boolean"
|
2848
|
+
},
|
2849
|
+
"description": "The link color can be inverted by setting the inverted attribute to true.",
|
2850
|
+
"default": "false",
|
2851
|
+
"fieldName": "inverted"
|
2852
|
+
},
|
2853
|
+
{
|
2854
|
+
"name": "size",
|
2855
|
+
"type": {
|
2856
|
+
"text": "LinkSize"
|
2857
|
+
},
|
2858
|
+
"description": "Size of the link.\nAcceptable values include:\n\n- 'small'\n- 'midsize'\n- 'large'",
|
2859
|
+
"default": "large",
|
2860
|
+
"fieldName": "size"
|
2861
|
+
},
|
2862
|
+
{
|
2863
|
+
"name": "disabled",
|
2864
|
+
"type": {
|
2865
|
+
"text": "boolean"
|
2866
|
+
},
|
2867
|
+
"default": "false",
|
2868
|
+
"description": "Indicates whether the component is disabled.\nWhen the component is disabled for user interaction; it is not focusable or clickable.",
|
2869
|
+
"fieldName": "disabled",
|
2870
|
+
"inheritedFrom": {
|
2871
|
+
"name": "DisabledMixin",
|
2872
|
+
"module": "src/utils/mixins/DisabledMixin.ts"
|
2873
|
+
}
|
2874
|
+
}
|
2875
|
+
],
|
2876
|
+
"mixins": [
|
2877
|
+
{
|
2878
|
+
"name": "DisabledMixin",
|
2879
|
+
"module": "/src/utils/mixins/DisabledMixin"
|
2880
|
+
}
|
2881
|
+
],
|
2882
|
+
"superclass": {
|
2883
|
+
"name": "Component",
|
2884
|
+
"module": "/src/models"
|
2885
|
+
},
|
2886
|
+
"tagName": "mdc-link",
|
2887
|
+
"jsDoc": "/**\n * `mdc-link` component can be used to navigate to a different page\n * within the application or to an external site. It can be used to link to\n * emails or phone numbers.\n *\n * The `children` of the link component is expected to be an anchor element\n * containing the text, href, and other attributes.\n *\n * For `icon`, the `mdc-icon` component is used to render the icon.\n *\n * @dependency mdc-icon\n *\n * @tagname mdc-link\n *\n * @cssproperty --mdc-link-border-radius - Border radius of the link\n * @cssproperty --mdc-link-color-active - Text and icon color of the link in active state\n * @cssproperty --mdc-link-color-disabled - Text and icon color of the link in disabled state\n * @cssproperty --mdc-link-color-hover - Text and icon color of the link in hover state\n * @cssproperty --mdc-link-color-normal - Text and icon color of the link in normal state\n * @cssproperty --mdc-link-icon-margin-left - Gap between the text and icon (only applicable when an icon is set)\n * @cssproperty --mdc-link-inverted-color-active - Text and icon color of the inverted link in active state\n * @cssproperty --mdc-link-inverted-color-disabled - Text and icon color of the inverted link in disabled state\n * @cssproperty --mdc-link-inverted-color-hover - Text and icon color of the inverted link in hover state\n * @cssproperty --mdc-link-inverted-color-normal - Text and icon color of the inverted link in normal state\n * @cssproperty --mdc-link-text-decoration-disabled - Text decoration of the link in disabled state for all variants\n */",
|
2888
|
+
"customElement": true
|
2889
|
+
}
|
2890
|
+
],
|
2891
|
+
"exports": [
|
2892
|
+
{
|
2893
|
+
"kind": "js",
|
2894
|
+
"name": "default",
|
2895
|
+
"declaration": {
|
2896
|
+
"name": "Link",
|
2897
|
+
"module": "components/link/link.component.js"
|
2898
|
+
}
|
2899
|
+
}
|
2900
|
+
]
|
2901
|
+
},
|
2701
2902
|
{
|
2702
2903
|
"kind": "javascript-module",
|
2703
2904
|
"path": "components/marker/marker.component.js",
|
package/dist/index.d.ts
CHANGED
@@ -12,6 +12,7 @@ import Divider from './components/divider';
|
|
12
12
|
import Modalcontainer from './components/modalcontainer';
|
13
13
|
import Buttonsimple from './components/buttonsimple';
|
14
14
|
import Avatarbutton from './components/avatarbutton';
|
15
|
+
import Link from './components/link';
|
15
16
|
import type { TextType } from './components/text/text.types';
|
16
|
-
export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Presence, Text, Button, Bullet, Marker, Divider, Modalcontainer, Buttonsimple, Avatarbutton, };
|
17
|
+
export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Presence, Text, Button, Bullet, Marker, Divider, Modalcontainer, Buttonsimple, Avatarbutton, Link, };
|
17
18
|
export type { TextType, };
|
package/dist/index.js
CHANGED
@@ -12,4 +12,5 @@ import Divider from './components/divider';
|
|
12
12
|
import Modalcontainer from './components/modalcontainer';
|
13
13
|
import Buttonsimple from './components/buttonsimple';
|
14
14
|
import Avatarbutton from './components/avatarbutton';
|
15
|
-
|
15
|
+
import Link from './components/link';
|
16
|
+
export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Presence, Text, Button, Bullet, Marker, Divider, Modalcontainer, Buttonsimple, Avatarbutton, Link, };
|
@@ -6,6 +6,8 @@ import Component from '../../components/formfieldwrapper';
|
|
6
6
|
*
|
7
7
|
* @tagname mdc-formfieldwrapper
|
8
8
|
*
|
9
|
+
* @slot label-info - slot to add the label info icon
|
10
|
+
*
|
9
11
|
*/
|
10
12
|
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
|
11
13
|
export default reactWrapper;
|
package/dist/react/index.d.ts
CHANGED
@@ -8,6 +8,7 @@ export { default as Divider } from './divider';
|
|
8
8
|
export { default as FormfieldWrapper } from './formfieldwrapper';
|
9
9
|
export { default as Icon } from './icon';
|
10
10
|
export { default as IconProvider } from './iconprovider';
|
11
|
+
export { default as Link } from './link';
|
11
12
|
export { default as Marker } from './marker';
|
12
13
|
export { default as Modalcontainer } from './modalcontainer';
|
13
14
|
export { default as Presence } from './presence';
|
package/dist/react/index.js
CHANGED
@@ -8,6 +8,7 @@ export { default as Divider } from './divider';
|
|
8
8
|
export { default as FormfieldWrapper } from './formfieldwrapper';
|
9
9
|
export { default as Icon } from './icon';
|
10
10
|
export { default as IconProvider } from './iconprovider';
|
11
|
+
export { default as Link } from './link';
|
11
12
|
export { default as Marker } from './marker';
|
12
13
|
export { default as Modalcontainer } from './modalcontainer';
|
13
14
|
export { default as Presence } from './presence';
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import Component from '../../components/link';
|
2
|
+
/**
|
3
|
+
* `mdc-link` component can be used to navigate to a different page
|
4
|
+
* within the application or to an external site. It can be used to link to
|
5
|
+
* emails or phone numbers.
|
6
|
+
*
|
7
|
+
* The `children` of the link component is expected to be an anchor element
|
8
|
+
* containing the text, href, and other attributes.
|
9
|
+
*
|
10
|
+
* For `icon`, the `mdc-icon` component is used to render the icon.
|
11
|
+
*
|
12
|
+
* @dependency mdc-icon
|
13
|
+
*
|
14
|
+
* @tagname mdc-link
|
15
|
+
*
|
16
|
+
* @cssproperty --mdc-link-border-radius - Border radius of the link
|
17
|
+
* @cssproperty --mdc-link-color-active - Text and icon color of the link in active state
|
18
|
+
* @cssproperty --mdc-link-color-disabled - Text and icon color of the link in disabled state
|
19
|
+
* @cssproperty --mdc-link-color-hover - Text and icon color of the link in hover state
|
20
|
+
* @cssproperty --mdc-link-color-normal - Text and icon color of the link in normal state
|
21
|
+
* @cssproperty --mdc-link-icon-margin-left - Gap between the text and icon (only applicable when an icon is set)
|
22
|
+
* @cssproperty --mdc-link-inverted-color-active - Text and icon color of the inverted link in active state
|
23
|
+
* @cssproperty --mdc-link-inverted-color-disabled - Text and icon color of the inverted link in disabled state
|
24
|
+
* @cssproperty --mdc-link-inverted-color-hover - Text and icon color of the inverted link in hover state
|
25
|
+
* @cssproperty --mdc-link-inverted-color-normal - Text and icon color of the inverted link in normal state
|
26
|
+
* @cssproperty --mdc-link-text-decoration-disabled - Text decoration of the link in disabled state for all variants
|
27
|
+
*/
|
28
|
+
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
|
29
|
+
export default reactWrapper;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { createComponent } from '@lit/react';
|
3
|
+
import Component from '../../components/link';
|
4
|
+
import { TAG_NAME } from '../../components/link/link.constants';
|
5
|
+
/**
|
6
|
+
* `mdc-link` component can be used to navigate to a different page
|
7
|
+
* within the application or to an external site. It can be used to link to
|
8
|
+
* emails or phone numbers.
|
9
|
+
*
|
10
|
+
* The `children` of the link component is expected to be an anchor element
|
11
|
+
* containing the text, href, and other attributes.
|
12
|
+
*
|
13
|
+
* For `icon`, the `mdc-icon` component is used to render the icon.
|
14
|
+
*
|
15
|
+
* @dependency mdc-icon
|
16
|
+
*
|
17
|
+
* @tagname mdc-link
|
18
|
+
*
|
19
|
+
* @cssproperty --mdc-link-border-radius - Border radius of the link
|
20
|
+
* @cssproperty --mdc-link-color-active - Text and icon color of the link in active state
|
21
|
+
* @cssproperty --mdc-link-color-disabled - Text and icon color of the link in disabled state
|
22
|
+
* @cssproperty --mdc-link-color-hover - Text and icon color of the link in hover state
|
23
|
+
* @cssproperty --mdc-link-color-normal - Text and icon color of the link in normal state
|
24
|
+
* @cssproperty --mdc-link-icon-margin-left - Gap between the text and icon (only applicable when an icon is set)
|
25
|
+
* @cssproperty --mdc-link-inverted-color-active - Text and icon color of the inverted link in active state
|
26
|
+
* @cssproperty --mdc-link-inverted-color-disabled - Text and icon color of the inverted link in disabled state
|
27
|
+
* @cssproperty --mdc-link-inverted-color-hover - Text and icon color of the inverted link in hover state
|
28
|
+
* @cssproperty --mdc-link-inverted-color-normal - Text and icon color of the inverted link in normal state
|
29
|
+
* @cssproperty --mdc-link-text-decoration-disabled - Text decoration of the link in disabled state for all variants
|
30
|
+
*/
|
31
|
+
const reactWrapper = createComponent({
|
32
|
+
tagName: TAG_NAME,
|
33
|
+
elementClass: Component,
|
34
|
+
react: React,
|
35
|
+
events: {},
|
36
|
+
displayName: 'Link',
|
37
|
+
});
|
38
|
+
export default reactWrapper;
|
@@ -56,13 +56,13 @@ const hostFocusRingStyles = (applyFocusRingOnClass = false) => {
|
|
56
56
|
:host([disabled]:focus) {
|
57
57
|
box-shadow: none;
|
58
58
|
}
|
59
|
-
:host(:focus) {
|
59
|
+
:host(:focus), :host(:focus-within) {
|
60
60
|
position: relative;
|
61
61
|
box-shadow: ${boxShadow};
|
62
62
|
}
|
63
63
|
/* High Contrast Mode */
|
64
64
|
@media (forced-colors: active) {
|
65
|
-
:host(:focus) {
|
65
|
+
:host(:focus), :host(:focus-within) {
|
66
66
|
outline: 0.125rem solid var(--mds-color-theme-focus-default-0);
|
67
67
|
}
|
68
68
|
}
|
package/package.json
CHANGED