@lotte-innovate/ui-component-test 0.0.3 → 0.0.5
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/dist/index.js
CHANGED
@@ -42,8 +42,8 @@ export { default as Toggle } from './components/Toggle';
|
|
42
42
|
export { default as ToggleGroup } from './components/ToggleGroup';
|
43
43
|
export { default as ToggleSwitch } from './components/ToggleSwitch';
|
44
44
|
// Typography
|
45
|
-
export { default as Header } from './Typography/Header';
|
46
|
-
export { default as Text } from './Typography/Text';
|
45
|
+
// export { default as Header } from './Typography/Header';
|
46
|
+
// export { default as Text } from './Typography/Text';
|
47
47
|
// Chart
|
48
48
|
export { default as BubbleChart } from './components/BubbleChart';
|
49
49
|
export { default as RadarChart } from './components/RadarChart';
|
package/package.json
CHANGED
@@ -1,13 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lotte-innovate/ui-component-test",
|
3
3
|
"description": "Lotte UI Library",
|
4
|
-
"version": "0.0.
|
4
|
+
"version": "0.0.5",
|
5
5
|
"private": false,
|
6
6
|
"type": "module",
|
7
7
|
"files": [
|
8
|
-
"dist/components"
|
9
|
-
"dist/Typography",
|
10
|
-
"dist/index.js"
|
8
|
+
"dist/components"
|
11
9
|
],
|
12
10
|
"main": "dist/index.js",
|
13
11
|
"module": "dist/index.js",
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
2
|
-
import React from 'react';
|
3
|
-
import { IColor } from '../../types';
|
4
|
-
export interface HeaderProps extends VariantProps<typeof headerVariants> {
|
5
|
-
color?: IColor;
|
6
|
-
}
|
7
|
-
declare let headerVariants: (props?: ({
|
8
|
-
weight?: "medium" | "regular" | "semibold" | "bold" | null | undefined;
|
9
|
-
headers?: "h2" | "h3" | "h1" | "h4" | "h5" | "h6" | null | undefined;
|
10
|
-
color?: string | null | undefined;
|
11
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
12
|
-
export declare const Header: React.ForwardRefExoticComponent<Omit<import("@radix-ui/themes").HeadingProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & HeaderProps & React.RefAttributes<HTMLHeadingElement>>;
|
13
|
-
export default Header;
|
@@ -1,58 +0,0 @@
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
2
|
-
__assign = Object.assign || function(t) {
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
-
s = arguments[i];
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
-
t[p] = s[p];
|
7
|
-
}
|
8
|
-
return t;
|
9
|
-
};
|
10
|
-
return __assign.apply(this, arguments);
|
11
|
-
};
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
13
|
-
var t = {};
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
15
|
-
t[p] = s[p];
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
19
|
-
t[p[i]] = s[p[i]];
|
20
|
-
}
|
21
|
-
return t;
|
22
|
-
};
|
23
|
-
import { cn } from '../../utils/utils';
|
24
|
-
import { cva } from 'class-variance-authority';
|
25
|
-
import { textColorStyle, weightVariants } from '../../constants';
|
26
|
-
import { Heading as HeadingTheme, Theme } from '@radix-ui/themes';
|
27
|
-
import React from 'react';
|
28
|
-
var weights = __assign({}, weightVariants);
|
29
|
-
var headers = {
|
30
|
-
h1: 'h1',
|
31
|
-
h2: 'h2',
|
32
|
-
h3: 'h3',
|
33
|
-
h4: 'h4',
|
34
|
-
h5: 'h5',
|
35
|
-
h6: 'h6',
|
36
|
-
};
|
37
|
-
var headerVariants = cva('', {
|
38
|
-
variants: {
|
39
|
-
weight: weights,
|
40
|
-
headers: headers,
|
41
|
-
color: textColorStyle(),
|
42
|
-
},
|
43
|
-
defaultVariants: {
|
44
|
-
color: 'black',
|
45
|
-
},
|
46
|
-
});
|
47
|
-
export var Header = React.forwardRef(function (_a, ref) {
|
48
|
-
var className = _a.className, children = _a.children, size = _a.size, weight = _a.weight, color = _a.color, headers = _a.headers, align = _a.align, rootProps = __rest(_a, ["className", "children", "size", "weight", "color", "headers", "align"]);
|
49
|
-
if (!headers)
|
50
|
-
headers = 'h1';
|
51
|
-
return (<Theme>
|
52
|
-
<HeadingTheme ref={ref} as={headers} size={size} align={align} className={cn('leading-normal', headerVariants({ weight: weight, color: color }), className)} {...rootProps}>
|
53
|
-
{children}
|
54
|
-
</HeadingTheme>
|
55
|
-
</Theme>);
|
56
|
-
});
|
57
|
-
Header.displayName = 'Header';
|
58
|
-
export default Header;
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { VariantProps } from 'class-variance-authority';
|
3
|
-
import { IColor } from '../../types';
|
4
|
-
import { ITypoSize } from '../../types';
|
5
|
-
export interface TextProps extends VariantProps<typeof textVariants> {
|
6
|
-
color?: IColor;
|
7
|
-
size?: ITypoSize;
|
8
|
-
as?: 'span' | 'div' | 'label' | 'p';
|
9
|
-
align?: 'left' | 'center' | 'right';
|
10
|
-
}
|
11
|
-
declare const textVariants: (props?: ({
|
12
|
-
weight?: "medium" | "regular" | "semibold" | "bold" | "light" | null | undefined;
|
13
|
-
color?: string | null | undefined;
|
14
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
15
|
-
export declare const Text: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & TextProps & React.RefAttributes<HTMLSpanElement>>;
|
16
|
-
export default Text;
|
@@ -1,47 +0,0 @@
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
2
|
-
__assign = Object.assign || function(t) {
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
-
s = arguments[i];
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
-
t[p] = s[p];
|
7
|
-
}
|
8
|
-
return t;
|
9
|
-
};
|
10
|
-
return __assign.apply(this, arguments);
|
11
|
-
};
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
13
|
-
var t = {};
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
15
|
-
t[p] = s[p];
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
19
|
-
t[p[i]] = s[p[i]];
|
20
|
-
}
|
21
|
-
return t;
|
22
|
-
};
|
23
|
-
import React, { forwardRef } from 'react';
|
24
|
-
import { cva } from 'class-variance-authority';
|
25
|
-
import { Text as TextTheme, Theme } from '@radix-ui/themes';
|
26
|
-
import { textColorStyle, weightVariants } from '../../constants';
|
27
|
-
import { cn } from '../../utils/utils';
|
28
|
-
var textVariants = cva('text', {
|
29
|
-
variants: {
|
30
|
-
weight: __assign({ light: 'font-light' }, weightVariants),
|
31
|
-
color: textColorStyle(),
|
32
|
-
},
|
33
|
-
defaultVariants: {
|
34
|
-
weight: 'medium',
|
35
|
-
color: 'black',
|
36
|
-
},
|
37
|
-
});
|
38
|
-
export var Text = forwardRef(function (_a, ref) {
|
39
|
-
var className = _a.className, children = _a.children, as = _a.as, align = _a.align, weight = _a.weight, color = _a.color, size = _a.size, props = __rest(_a, ["className", "children", "as", "align", "weight", "color", "size"]);
|
40
|
-
return (<Theme>
|
41
|
-
<TextTheme as={as} ref={ref} size={size} align={align} className={cn(textVariants({ weight: weight, color: color }), className)} {...props}>
|
42
|
-
{children}
|
43
|
-
</TextTheme>
|
44
|
-
</Theme>);
|
45
|
-
});
|
46
|
-
Text.displayName = 'Text';
|
47
|
-
export default Text;
|