@dt-dds/react-icon 1.0.0-beta.50 → 1.0.0-beta.52
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 +15 -0
- package/README.md +1 -1
- package/dist/index.d.mts +3 -5
- package/dist/index.d.ts +3 -5
- package/dist/index.js +6 -6
- package/dist/index.mjs +6 -6
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @dt-ui/react-icon
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.52
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- refactor: use component size from core
|
|
8
|
+
|
|
9
|
+
## 1.0.0-beta.51
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- fix: update responsive font styles
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
- @dt-dds/themes@1.0.0-beta.9
|
|
16
|
+
- @dt-dds/react-core@1.0.0-beta.50
|
|
17
|
+
|
|
3
18
|
## 1.0.0-beta.50
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ export const App = () => {
|
|
|
18
18
|
| ------------ | ---------------------- | ---------- | ------------------------------------------------------------------------------------------ |
|
|
19
19
|
| `code` | `Code` | - | Specifies the icon code for the desired symbol. |
|
|
20
20
|
| `color` | `string` | - | Sets the color of the icon. |
|
|
21
|
-
| `size` | `
|
|
21
|
+
| `size` | `ComponentSize` | 'large' | Specifies the predefined icon sizes. Custom font-sizes are allowed through the style prop. |
|
|
22
22
|
| `variant` | 'outlined' \| 'filled' | 'outlined' | Specifies the icon filling variant. |
|
|
23
23
|
| `dataTestId` | `string` | 'icon' | Customizable test identifier. |
|
|
24
24
|
| `style` | `React.CSSProperties` | - | Additional styles to apply to the icon. |
|
package/dist/index.d.mts
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { CustomTheme } from '@dt-dds/themes';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import { Code } from '@dt-dds/icons';
|
|
4
|
-
import { BaseProps } from '@dt-dds/react-core';
|
|
4
|
+
import { BaseProps, ComponentSize } from '@dt-dds/react-core';
|
|
5
5
|
|
|
6
6
|
type Variant = 'outlined' | 'filled';
|
|
7
7
|
|
|
8
|
-
type Size = 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
9
|
-
|
|
10
8
|
interface IconProps extends Omit<BaseProps, 'children'> {
|
|
11
9
|
code: Code;
|
|
12
10
|
color?: string;
|
|
13
|
-
size?:
|
|
11
|
+
size?: ComponentSize;
|
|
14
12
|
variant?: Variant;
|
|
15
13
|
}
|
|
16
14
|
declare const Icon: ({ code, color, dataTestId, size, style, variant, }: IconProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -20,4 +18,4 @@ declare module '@emotion/react' {
|
|
|
20
18
|
}
|
|
21
19
|
}
|
|
22
20
|
|
|
23
|
-
export { Icon, type IconProps };
|
|
21
|
+
export { Icon, type IconProps, type Variant };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { CustomTheme } from '@dt-dds/themes';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import { Code } from '@dt-dds/icons';
|
|
4
|
-
import { BaseProps } from '@dt-dds/react-core';
|
|
4
|
+
import { BaseProps, ComponentSize } from '@dt-dds/react-core';
|
|
5
5
|
|
|
6
6
|
type Variant = 'outlined' | 'filled';
|
|
7
7
|
|
|
8
|
-
type Size = 'xs' | 's' | 'm' | 'l' | 'xl';
|
|
9
|
-
|
|
10
8
|
interface IconProps extends Omit<BaseProps, 'children'> {
|
|
11
9
|
code: Code;
|
|
12
10
|
color?: string;
|
|
13
|
-
size?:
|
|
11
|
+
size?: ComponentSize;
|
|
14
12
|
variant?: Variant;
|
|
15
13
|
}
|
|
16
14
|
declare const Icon: ({ code, color, dataTestId, size, style, variant, }: IconProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -20,4 +18,4 @@ declare module '@emotion/react' {
|
|
|
20
18
|
}
|
|
21
19
|
}
|
|
22
20
|
|
|
23
|
-
export { Icon, type IconProps };
|
|
21
|
+
export { Icon, type IconProps, type Variant };
|
package/dist/index.js
CHANGED
|
@@ -40,11 +40,11 @@ var import_react = require("@emotion/react");
|
|
|
40
40
|
// src/Icon.styled.ts
|
|
41
41
|
var import_styled = __toESM(require("@emotion/styled"));
|
|
42
42
|
var fontSize = {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
"extra-small": "12px",
|
|
44
|
+
small: "16px",
|
|
45
|
+
medium: "20px",
|
|
46
|
+
large: "24px",
|
|
47
|
+
"extra-large": "32px"
|
|
48
48
|
};
|
|
49
49
|
var IconStyled = import_styled.default.i`
|
|
50
50
|
${({ size, theme, variant, color }) => `
|
|
@@ -80,7 +80,7 @@ var Icon = ({
|
|
|
80
80
|
code,
|
|
81
81
|
color,
|
|
82
82
|
dataTestId,
|
|
83
|
-
size = "
|
|
83
|
+
size = "large",
|
|
84
84
|
style,
|
|
85
85
|
variant = "outlined"
|
|
86
86
|
}) => {
|
package/dist/index.mjs
CHANGED
|
@@ -4,11 +4,11 @@ import { useTheme } from "@emotion/react";
|
|
|
4
4
|
// src/Icon.styled.ts
|
|
5
5
|
import styled from "@emotion/styled";
|
|
6
6
|
var fontSize = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
"extra-small": "12px",
|
|
8
|
+
small: "16px",
|
|
9
|
+
medium: "20px",
|
|
10
|
+
large: "24px",
|
|
11
|
+
"extra-large": "32px"
|
|
12
12
|
};
|
|
13
13
|
var IconStyled = styled.i`
|
|
14
14
|
${({ size, theme, variant, color }) => `
|
|
@@ -44,7 +44,7 @@ var Icon = ({
|
|
|
44
44
|
code,
|
|
45
45
|
color,
|
|
46
46
|
dataTestId,
|
|
47
|
-
size = "
|
|
47
|
+
size = "large",
|
|
48
48
|
style,
|
|
49
49
|
variant = "outlined"
|
|
50
50
|
}) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dt-dds/react-icon",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.52",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dist/index.js"
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@dt-dds/icons": "1.0.0-beta.5",
|
|
24
|
-
"@dt-dds/react-core": "1.0.0-beta.
|
|
25
|
-
"@dt-dds/themes": "1.0.0-beta.
|
|
24
|
+
"@dt-dds/react-core": "1.0.0-beta.50",
|
|
25
|
+
"@dt-dds/themes": "1.0.0-beta.9"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/core": "^7.22.9",
|