@dt-dds/react-link 1.0.0-beta.52 → 1.0.0-beta.53

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @dt-ui/react-link
2
2
 
3
+ ## 1.0.0-beta.53
4
+
5
+ ### Patch Changes
6
+
7
+ - refactor: use component size from core
8
+ - Updated dependencies
9
+ - @dt-dds/react-icon@1.0.0-beta.52
10
+ - @dt-dds/react-button@1.0.0-beta.76
11
+
3
12
  ## 1.0.0-beta.52
4
13
 
5
14
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1,8 +1,7 @@
1
1
  import { CustomTheme } from '@dt-dds/themes';
2
2
  import * as react from 'react';
3
3
  import { Code } from '@dt-dds/icons';
4
- import { BaseProps } from '@dt-dds/react-core';
5
- import { IconProps } from '@dt-dds/react-icon';
4
+ import { BaseProps, ComponentSize } from '@dt-dds/react-core';
6
5
 
7
6
  interface LinkProps extends BaseProps, React.AnchorHTMLAttributes<HTMLAnchorElement> {
8
7
  isDisabled?: boolean;
@@ -15,14 +14,12 @@ interface LinkProps extends BaseProps, React.AnchorHTMLAttributes<HTMLAnchorElem
15
14
  declare const Link: react.ForwardRefExoticComponent<LinkProps & react.RefAttributes<HTMLAnchorElement>>;
16
15
 
17
16
  type LinkColor = 'accent' | 'secondary';
18
- type LinkSize = 'small' | 'medium' | 'large';
17
+ type LinkSize = Extract<ComponentSize, 'small' | 'medium' | 'large'>;
19
18
  type LinkVariant = 'standalone' | 'inline';
20
19
 
21
- declare const iconSize: Record<LinkSize, IconProps['size']>;
22
-
23
20
  declare module '@emotion/react' {
24
21
  interface Theme extends CustomTheme {
25
22
  }
26
23
  }
27
24
 
28
- export { Link, type LinkColor, type LinkProps, type LinkSize, type LinkVariant, iconSize };
25
+ export { Link, type LinkColor, type LinkProps, type LinkSize, type LinkVariant };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,7 @@
1
1
  import { CustomTheme } from '@dt-dds/themes';
2
2
  import * as react from 'react';
3
3
  import { Code } from '@dt-dds/icons';
4
- import { BaseProps } from '@dt-dds/react-core';
5
- import { IconProps } from '@dt-dds/react-icon';
4
+ import { BaseProps, ComponentSize } from '@dt-dds/react-core';
6
5
 
7
6
  interface LinkProps extends BaseProps, React.AnchorHTMLAttributes<HTMLAnchorElement> {
8
7
  isDisabled?: boolean;
@@ -15,14 +14,12 @@ interface LinkProps extends BaseProps, React.AnchorHTMLAttributes<HTMLAnchorElem
15
14
  declare const Link: react.ForwardRefExoticComponent<LinkProps & react.RefAttributes<HTMLAnchorElement>>;
16
15
 
17
16
  type LinkColor = 'accent' | 'secondary';
18
- type LinkSize = 'small' | 'medium' | 'large';
17
+ type LinkSize = Extract<ComponentSize, 'small' | 'medium' | 'large'>;
19
18
  type LinkVariant = 'standalone' | 'inline';
20
19
 
21
- declare const iconSize: Record<LinkSize, IconProps['size']>;
22
-
23
20
  declare module '@emotion/react' {
24
21
  interface Theme extends CustomTheme {
25
22
  }
26
23
  }
27
24
 
28
- export { Link, type LinkColor, type LinkProps, type LinkSize, type LinkVariant, iconSize };
25
+ export { Link, type LinkColor, type LinkProps, type LinkSize, type LinkVariant };
package/dist/index.js CHANGED
@@ -59,8 +59,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
59
59
  // index.ts
60
60
  var index_exports = {};
61
61
  __export(index_exports, {
62
- Link: () => Link,
63
- iconSize: () => iconSize
62
+ Link: () => Link
64
63
  });
65
64
  module.exports = __toCommonJS(index_exports);
66
65
 
@@ -174,21 +173,13 @@ var Link = (0, import_react.forwardRef)(
174
173
  }, !isDisabled && { href, onClick }), rest), {
175
174
  children: variant === "inline" || !icon ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
176
175
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children }),
177
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_icon.Icon, { code: icon, color: "inherit", size: iconSize[size] })
176
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_icon.Icon, { code: icon, color: "inherit", size })
178
177
  ] })
179
178
  })
180
179
  );
181
180
  }
182
181
  );
183
-
184
- // src/constants/constants.ts
185
- var iconSize = {
186
- small: "xs",
187
- medium: "s",
188
- large: "l"
189
- };
190
182
  // Annotate the CommonJS export names for ESM import in node:
191
183
  0 && (module.exports = {
192
- Link,
193
- iconSize
184
+ Link
194
185
  });
package/dist/index.mjs CHANGED
@@ -140,20 +140,12 @@ var Link = forwardRef(
140
140
  }, !isDisabled && { href, onClick }), rest), {
141
141
  children: variant === "inline" || !icon ? children : /* @__PURE__ */ jsxs(Fragment, { children: [
142
142
  /* @__PURE__ */ jsx("span", { children }),
143
- /* @__PURE__ */ jsx(Icon, { code: icon, color: "inherit", size: iconSize[size] })
143
+ /* @__PURE__ */ jsx(Icon, { code: icon, color: "inherit", size })
144
144
  ] })
145
145
  })
146
146
  );
147
147
  }
148
148
  );
149
-
150
- // src/constants/constants.ts
151
- var iconSize = {
152
- small: "xs",
153
- medium: "s",
154
- large: "l"
155
- };
156
149
  export {
157
- Link,
158
- iconSize
150
+ Link
159
151
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dt-dds/react-link",
3
- "version": "1.0.0-beta.52",
3
+ "version": "1.0.0-beta.53",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./dist/index.js"
@@ -21,9 +21,9 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@dt-dds/icons": "1.0.0-beta.5",
24
- "@dt-dds/react-button": "1.0.0-beta.75",
24
+ "@dt-dds/react-button": "1.0.0-beta.76",
25
25
  "@dt-dds/react-core": "1.0.0-beta.50",
26
- "@dt-dds/react-icon": "1.0.0-beta.51",
26
+ "@dt-dds/react-icon": "1.0.0-beta.52",
27
27
  "@dt-dds/themes": "1.0.0-beta.9"
28
28
  },
29
29
  "devDependencies": {