@commercetools-uikit/link 19.9.0 → 19.11.0

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.
@@ -121,7 +121,7 @@ Link.defaultProps = defaultProps;
121
121
  var Link$1 = Link;
122
122
 
123
123
  // NOTE: This string will be replaced on build time with the package version.
124
- var version = "19.9.0";
124
+ var version = "19.11.0";
125
125
 
126
126
  exports["default"] = Link$1;
127
127
  exports.version = version;
@@ -106,7 +106,7 @@ Link.defaultProps = defaultProps;
106
106
  var Link$1 = Link;
107
107
 
108
108
  // NOTE: This string will be replaced on build time with the package version.
109
- var version = "19.9.0";
109
+ var version = "19.11.0";
110
110
 
111
111
  exports["default"] = Link$1;
112
112
  exports.version = version;
@@ -104,6 +104,6 @@ Link.defaultProps = defaultProps;
104
104
  var Link$1 = Link;
105
105
 
106
106
  // NOTE: This string will be replaced on build time with the package version.
107
- var version = "19.9.0";
107
+ var version = "19.11.0";
108
108
 
109
109
  export { Link$1 as default, version };
@@ -2,13 +2,37 @@ import type { LocationDescriptor } from 'history';
2
2
  import type { MessageDescriptor } from 'react-intl';
3
3
  import { type ReactNode, type MouseEvent, type KeyboardEvent } from 'react';
4
4
  export type TLinkProps = {
5
+ /**
6
+ * Value of the link.
7
+ * <br />
8
+ * Required if `intlMessage` is not provided.
9
+ */
5
10
  children?: ReactNode;
11
+ /**
12
+ * An `intl` message object that will be rendered with `FormattedMessage`.
13
+ * <br />
14
+ * Required if `children` is not provided.
15
+ */
6
16
  intlMessage?: MessageDescriptor & {
7
17
  values?: Record<string, ReactNode>;
8
18
  };
19
+ /**
20
+ * A flag to indicate if the Link points to an external source.
21
+ * <bt />
22
+ * If `true`, a regular `<a>` is rendered instead of the default `react-router`s `<Link />`
23
+ */
9
24
  isExternal: boolean;
25
+ /**
26
+ * The URL that the Link should point to.
27
+ */
10
28
  to: string | LocationDescriptor;
29
+ /**
30
+ * Color of the link
31
+ */
11
32
  tone?: 'primary' | 'inverted' | 'secondary';
33
+ /**
34
+ * Handler when the link is clicked.
35
+ */
12
36
  onClick?: (event: MouseEvent<HTMLLinkElement> | KeyboardEvent<HTMLLinkElement>) => void;
13
37
  };
14
38
  declare const Link: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@commercetools-uikit/link",
3
3
  "description": "Links are used either to link to other UI routes, or to link to external pages. This component is a very thin wrapper over either a React Router Link, or a normal HTML <a> tag.",
4
- "version": "19.9.0",
4
+ "version": "19.11.0",
5
5
  "bugs": "https://github.com/commercetools/ui-kit/issues",
6
6
  "repository": {
7
7
  "type": "git",
@@ -21,10 +21,10 @@
21
21
  "dependencies": {
22
22
  "@babel/runtime": "^7.20.13",
23
23
  "@babel/runtime-corejs3": "^7.20.13",
24
- "@commercetools-uikit/design-system": "19.9.0",
25
- "@commercetools-uikit/icons": "19.9.0",
26
- "@commercetools-uikit/spacings-inline": "19.9.0",
27
- "@commercetools-uikit/utils": "19.9.0",
24
+ "@commercetools-uikit/design-system": "19.11.0",
25
+ "@commercetools-uikit/icons": "19.11.0",
26
+ "@commercetools-uikit/spacings-inline": "19.11.0",
27
+ "@commercetools-uikit/utils": "19.11.0",
28
28
  "@emotion/react": "^11.10.5",
29
29
  "@emotion/styled": "^11.10.5",
30
30
  "@types/history": "^4.7.11",