@momentum-design/components 0.16.17 → 0.16.19
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/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 +221 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- 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
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