@sap-ux/ui-components 1.0.8 → 1.0.10

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.
@@ -1,20 +1,23 @@
1
1
  import React from 'react';
2
2
  import type { ILinkProps } from '@fluentui/react';
3
+ export interface UILinkProps extends ILinkProps {
4
+ secondary?: boolean;
5
+ }
3
6
  /**
4
7
  * UILink component
5
8
  * based on https://developer.microsoft.com/en-us/fluentui#/controls/web/link
6
9
  *
7
10
  * @exports
8
11
  * @class UILink
9
- * @extends {React.Component<ILinkProps, {}>}
12
+ * @extends {React.Component<UILinkProps, {}>}
10
13
  */
11
- export declare class UILink extends React.Component<ILinkProps, {}> {
14
+ export declare class UILink extends React.Component<UILinkProps, {}> {
12
15
  /**
13
16
  * Initializes component properties.
14
17
  *
15
- * @param {ILinkProps} props
18
+ * @param {UILinkProps} props
16
19
  */
17
- constructor(props: ILinkProps);
20
+ constructor(props: UILinkProps);
18
21
  /**
19
22
  * @returns {JSX.Element}
20
23
  */
@@ -1 +1 @@
1
- {"version":3,"file":"UILink.d.ts","sourceRoot":"","sources":["../../../src/components/UILink/UILink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAe,MAAM,iBAAiB,CAAC;AAG/D;;;;;;;GAOG;AACH,qBAAa,MAAO,SAAQ,KAAK,CAAC,SAAS,CAAC,UAAU,EAAE,EAAE,CAAC;IACvD;;;;OAIG;gBACgB,KAAK,EAAE,UAAU;IAIpC;;OAEG;IACH,MAAM,IAAI,GAAG,CAAC,OAAO;CA6BxB"}
1
+ {"version":3,"file":"UILink.d.ts","sourceRoot":"","sources":["../../../src/components/UILink/UILink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,UAAU,EAAe,MAAM,iBAAiB,CAAC;AAG/D,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC3C,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAaD;;;;;;;GAOG;AACH,qBAAa,MAAO,SAAQ,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,CAAC;IACxD;;;;OAIG;gBACgB,KAAK,EAAE,WAAW;IAIrC;;OAEG;IACH,MAAM,IAAI,GAAG,CAAC,OAAO;CAgCxB"}
@@ -6,19 +6,29 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.UILink = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const react_2 = require("@fluentui/react");
9
+ const linkStyle = {
10
+ primary: {
11
+ color: 'var(--vscode-textLink-foreground)',
12
+ hoverColor: 'var(--vscode-textLink-activeForeground)'
13
+ },
14
+ secondary: {
15
+ color: 'var(--vscode-foreground)',
16
+ hoverColor: 'var(--vscode-foreground)'
17
+ }
18
+ };
9
19
  /**
10
20
  * UILink component
11
21
  * based on https://developer.microsoft.com/en-us/fluentui#/controls/web/link
12
22
  *
13
23
  * @exports
14
24
  * @class UILink
15
- * @extends {React.Component<ILinkProps, {}>}
25
+ * @extends {React.Component<UILinkProps, {}>}
16
26
  */
17
27
  class UILink extends react_1.default.Component {
18
28
  /**
19
29
  * Initializes component properties.
20
30
  *
21
- * @param {ILinkProps} props
31
+ * @param {UILinkProps} props
22
32
  */
23
33
  constructor(props) {
24
34
  super(props);
@@ -27,18 +37,21 @@ class UILink extends react_1.default.Component {
27
37
  * @returns {JSX.Element}
28
38
  */
29
39
  render() {
40
+ const { secondary } = this.props;
41
+ const styles = secondary ? linkStyle.secondary : linkStyle.primary;
30
42
  const linkStyles = () => {
31
43
  return {
32
44
  root: {
33
- color: 'var(--vscode-textLink-foreground)',
45
+ color: styles.color,
34
46
  fontFamily: 'var(--vscode-font-family)',
47
+ textDecoration: 'underline',
35
48
  selectors: {
36
49
  '&:hover, &:hover:focus, &:hover:active': {
37
- color: 'var(--vscode-textLink-activeForeground)',
38
- textDecoration: 'underline'
50
+ color: styles.hoverColor,
51
+ textDecoration: 'none'
39
52
  },
40
53
  '&:active, &:focus': {
41
- color: 'var(--vscode-textLink-activeForeground)',
54
+ color: styles.hoverColor,
42
55
  textDecoration: 'none',
43
56
  outline: 'none'
44
57
  },
@@ -1 +1 @@
1
- {"version":3,"file":"UILink.js","sourceRoot":"","sources":["../../../src/components/UILink/UILink.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAG1B,2CAAuC;AAEvC;;;;;;;GAOG;AACH,MAAa,MAAO,SAAQ,eAAK,CAAC,SAAyB;IACvD;;;;OAIG;IACH,YAAmB,KAAiB;QAChC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;IAED;;OAEG;IACH,MAAM;QACF,MAAM,UAAU,GAAG,GAAyB,EAAE;YAC1C,OAAO;gBACH,IAAI,EAAE;oBACF,KAAK,EAAE,mCAAmC;oBAC1C,UAAU,EAAE,2BAA2B;oBACvC,SAAS,EAAE;wBACP,wCAAwC,EAAE;4BACtC,KAAK,EAAE,yCAAyC;4BAChD,cAAc,EAAE,WAAW;yBAC9B;wBACD,mBAAmB,EAAE;4BACjB,KAAK,EAAE,yCAAyC;4BAChD,cAAc,EAAE,MAAM;4BACtB,OAAO,EAAE,MAAM;yBAClB;wBACD,+BAA+B;wBAC/B,oCAAoC,EAAE;4BAClC,SAAS,EAAE,MAAM;4BACjB,OAAO,EAAE,qCAAqC;4BAC9C,aAAa,EAAE,MAAM;yBACxB;qBACJ;iBACJ;aACJ,CAAC;QACN,CAAC,CAAC;QAEF,OAAO,8BAAC,YAAI,OAAK,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,GAAI,CAAC;IACxD,CAAC;CACJ;AA1CD,wBA0CC"}
1
+ {"version":3,"file":"UILink.js","sourceRoot":"","sources":["../../../src/components/UILink/UILink.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAG1B,2CAAuC;AAMvC,MAAM,SAAS,GAAG;IACd,OAAO,EAAE;QACL,KAAK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 "version": "1.0.10",
4
4
  "license": "Apache-2.0",
5
5
  "description": "SAP UI Components Library",
6
6
  "repository": {
@@ -377,4 +377,4 @@
377
377
 
378
378
 
379
379
 
380
- window['STORIES'] = [{"titlePrefix":"","directory":"./stories","files":"*.story.tsx","importPathMatcher":"^\\.[\\\\/](?:stories\\/(?!\\.)(?=.)[^/]*?\\.story\\.tsx)$"}];</script><script src="runtime~main.3e35adfa.iframe.bundle.js"></script><script src="93.546e1b61.iframe.bundle.js"></script><script src="main.6fdbd602.iframe.bundle.js"></script></body></html>
380
+ window['STORIES'] = [{"titlePrefix":"","directory":"./stories","files":"*.story.tsx","importPathMatcher":"^\\.[\\\\/](?:stories\\/(?!\\.)(?=.)[^/]*?\\.story\\.tsx)$"}];</script><script src="runtime~main.3e35adfa.iframe.bundle.js"></script><script src="93.546e1b61.iframe.bundle.js"></script><script src="main.1856d024.iframe.bundle.js"></script></body></html>