@itilite/lumina-ui 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/cjs/index.css +1 -1
- package/dist/cjs/index.js +22751 -8
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Button/types.d.ts +2 -0
- package/dist/esm/index.css +1 -1
- package/dist/esm/index.js +22728 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Button/types.d.ts +2 -0
- package/package.json +89 -88
- package/src/components/Button/Button.module.scss +8 -2
- package/src/components/Button/Button.tsx +4 -0
- package/src/components/Button/types.ts +2 -0
- package/dist/types/components/Button/Button.d.ts +0 -4
- package/dist/types/components/Button/Button.test.d.ts +0 -1
- package/dist/types/components/Button/index.d.ts +0 -1
- package/dist/types/components/Button/types.d.ts +0 -16
- package/dist/types/components/Checkbox/Checkbox.d.ts +0 -4
- package/dist/types/components/Checkbox/index.d.ts +0 -1
- package/dist/types/components/Checkbox/types.d.ts +0 -11
- package/dist/types/components/Modal/Modal.d.ts +0 -3
- package/dist/types/components/Modal/index.d.ts +0 -1
- package/dist/types/components/Modal/types.d.ts +0 -21
- package/dist/types/components/Radio/Radio.d.ts +0 -4
- package/dist/types/components/Radio/index.d.ts +0 -1
- package/dist/types/components/Radio/types.d.ts +0 -11
- package/dist/types/components/Switch/Switch.d.ts +0 -4
- package/dist/types/components/Switch/index.d.ts +0 -1
- package/dist/types/components/Switch/types.d.ts +0 -7
- package/dist/types/components/Tooltip/Tooltip.d.ts +0 -3
- package/dist/types/components/Tooltip/index.d.ts +0 -1
- package/dist/types/components/Tooltip/types.d.ts +0 -8
- package/dist/types/components/index.d.ts +0 -6
- package/dist/types/index.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,89 +1,90 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
2
|
+
"name": "@itilite/lumina-ui",
|
|
3
|
+
"version": "0.0.5",
|
|
4
|
+
"description": "Design system",
|
|
5
|
+
"main": "dist/cjs/index.js",
|
|
6
|
+
"module": "dist/esm/index.js",
|
|
7
|
+
"types": "dist/types/index.d.ts",
|
|
8
|
+
"author": "Itilite",
|
|
9
|
+
"license": "ISC",
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"@babel/core": "^7.25.9",
|
|
12
|
+
"@babel/preset-env": "^7.25.9",
|
|
13
|
+
"@babel/preset-react": "^7.25.9",
|
|
14
|
+
"@babel/preset-typescript": "^7.25.9",
|
|
15
|
+
"@rollup/plugin-commonjs": "^26.0.1",
|
|
16
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
17
|
+
"@rollup/plugin-typescript": "^11.1.6",
|
|
18
|
+
"@testing-library/jest-dom": "^6.6.2",
|
|
19
|
+
"@testing-library/react": "^16.0.1",
|
|
20
|
+
"@types/jest": "^29.5.12",
|
|
21
|
+
"@types/prop-types": "^15.7.12",
|
|
22
|
+
"@types/react": "^18.3.12",
|
|
23
|
+
"@types/react-dom": "^18.3.0",
|
|
24
|
+
"@typescript-eslint/eslint-plugin": "^8.2.0",
|
|
25
|
+
"@typescript-eslint/parser": "^8.2.0",
|
|
26
|
+
"antd": "^5.20.1",
|
|
27
|
+
"autoprefixer": "^10.4.20",
|
|
28
|
+
"babel-jest": "^29.7.0",
|
|
29
|
+
"clsx": "^2.1.1",
|
|
30
|
+
"eslint": "^9.9.0",
|
|
31
|
+
"eslint-config-standard-with-typescript": "^43.0.1",
|
|
32
|
+
"eslint-define-config": "^2.1.0",
|
|
33
|
+
"eslint-plugin-import": "^2.29.1",
|
|
34
|
+
"eslint-plugin-react": "^7.35.0",
|
|
35
|
+
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
|
|
36
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
37
|
+
"eslint-plugin-unused-imports": "^4.1.3",
|
|
38
|
+
"glob": "9.3.5",
|
|
39
|
+
"identity-obj-proxy": "^3.0.0",
|
|
40
|
+
"jest": "^29.7.0",
|
|
41
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
42
|
+
"postcss": "^8.4.41",
|
|
43
|
+
"postcss-scss": "^4.0.9",
|
|
44
|
+
"prop-types": "^15.8.1",
|
|
45
|
+
"react": "^18.3.1",
|
|
46
|
+
"react-dom": "^18.3.1",
|
|
47
|
+
"rollup": "^4.21.0",
|
|
48
|
+
"rollup-plugin-dts": "^6.1.1",
|
|
49
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
50
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
51
|
+
"rollup-plugin-scss": "^4.0.0",
|
|
52
|
+
"sass": "^1.77.8",
|
|
53
|
+
"tailwindcss": "^3.4.10",
|
|
54
|
+
"tslib": "^2.6.3",
|
|
55
|
+
"typescript": "^5.5.3"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"react": ">=18"
|
|
59
|
+
},
|
|
60
|
+
"jest": {
|
|
61
|
+
"setupFilesAfterEnv": [
|
|
62
|
+
"<rootDir>/src/setupTests.ts"
|
|
63
|
+
],
|
|
64
|
+
"testEnvironment": "jsdom"
|
|
65
|
+
},
|
|
66
|
+
"repository": {
|
|
67
|
+
"type": "git",
|
|
68
|
+
"url": "git+https://github.com/Itilite/design-system.git"
|
|
69
|
+
},
|
|
70
|
+
"keywords": [
|
|
71
|
+
"Design",
|
|
72
|
+
"system",
|
|
73
|
+
"LuminaUI",
|
|
74
|
+
"Frontend"
|
|
75
|
+
],
|
|
76
|
+
"bugs": {
|
|
77
|
+
"url": "https://github.com/Itilite/design-system/issues"
|
|
78
|
+
},
|
|
79
|
+
"homepage": "https://github.com/Itilite/design-system#readme",
|
|
80
|
+
"scripts": {
|
|
81
|
+
"build:types": "tsc --emitDeclarationOnly",
|
|
82
|
+
"build": "rollup -c",
|
|
83
|
+
"prebuild:all": "node -v && npm -v && pwd && ls -la",
|
|
84
|
+
"build:all": "ROLLUP_DEBUG=* rollup -c && tsc --emitDeclarationOnly",
|
|
85
|
+
"dev": "rollup -c -w",
|
|
86
|
+
"lint": "eslint ",
|
|
87
|
+
"lint:fix": "eslint ./src --ext .ts,.tsx --fix",
|
|
88
|
+
"test": "jest"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -35,13 +35,19 @@
|
|
|
35
35
|
@apply tw-bg-color-action-primary;
|
|
36
36
|
box-shadow: 0px 2px 4px 0px rgba(17, 24, 39, 0.1);
|
|
37
37
|
}
|
|
38
|
+
&.variant_subtle {
|
|
39
|
+
@apply tw-text-color-text-primary;
|
|
40
|
+
&:hover {
|
|
41
|
+
@apply tw-text-color-text-primary-hover;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
38
44
|
&:focus-visible {
|
|
39
45
|
outline: 2px solid #ec5d2561;
|
|
40
46
|
}
|
|
41
47
|
&.variant_subtle {
|
|
42
48
|
@apply tw-text-color-text-primary;
|
|
43
49
|
&:hover {
|
|
44
|
-
@apply tw-text-color-text-primary;
|
|
50
|
+
@apply tw-text-color-text-primary-hover;
|
|
45
51
|
}
|
|
46
52
|
}
|
|
47
53
|
&.variant_text,
|
|
@@ -147,7 +153,7 @@
|
|
|
147
153
|
@apply tw-h-auto;
|
|
148
154
|
box-shadow: none;
|
|
149
155
|
&:global(.ant-btn-default):hover {
|
|
150
|
-
&.onHoverUnderline{
|
|
156
|
+
&.onHoverUnderline {
|
|
151
157
|
text-decoration: underline;
|
|
152
158
|
}
|
|
153
159
|
box-shadow: none;
|
|
@@ -21,6 +21,8 @@ const Button: React.FC<ButtonProps> = (props) => {
|
|
|
21
21
|
disabled = false,
|
|
22
22
|
loading = false,
|
|
23
23
|
onHoverUnderline = false,
|
|
24
|
+
id = "",
|
|
25
|
+
name = ""
|
|
24
26
|
} = props;
|
|
25
27
|
|
|
26
28
|
const buttonMap: Record<string, "primary" | "default" | "text" | "link"> = {
|
|
@@ -38,6 +40,8 @@ const Button: React.FC<ButtonProps> = (props) => {
|
|
|
38
40
|
|
|
39
41
|
return (
|
|
40
42
|
<AntButton
|
|
43
|
+
id={id}
|
|
44
|
+
name={name}
|
|
41
45
|
className={clsx(
|
|
42
46
|
classes.button,
|
|
43
47
|
classes[`size_${size}`],
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Button } from "./Button";
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export interface ButtonProps {
|
|
2
|
-
type?: "primary" | "secondary" | "critical" | undefined;
|
|
3
|
-
variant?: "subtle" | "text" | "link";
|
|
4
|
-
size?: "large" | "small";
|
|
5
|
-
shape?: "circle" | "default" | "round";
|
|
6
|
-
icon?: React.ReactNode;
|
|
7
|
-
iconPosition?: "start" | "end";
|
|
8
|
-
className?: string;
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
11
|
-
href?: string;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
loading?: boolean;
|
|
14
|
-
onHoverUnderline?: boolean;
|
|
15
|
-
analytics?: Record<string, unknown>;
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Checkbox } from "./Checkbox";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CheckboxChangeEvent } from 'antd/es/checkbox';
|
|
2
|
-
export interface CheckboxProps {
|
|
3
|
-
checked?: boolean;
|
|
4
|
-
className?: string;
|
|
5
|
-
onChange?: (e: CheckboxChangeEvent) => void;
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
size?: "large" | "small" | "medium";
|
|
8
|
-
variant?: "normal" | "emphasized";
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
indeterminate?: boolean;
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Modal } from "./Modal";
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export interface ModalProps {
|
|
2
|
-
className?: string | undefined;
|
|
3
|
-
title?: string | undefined;
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
open?: boolean;
|
|
6
|
-
handleOk?: ((e: React.MouseEvent<HTMLButtonElement>) => void) | undefined;
|
|
7
|
-
handleCancel?: ((e: React.MouseEvent<HTMLButtonElement>) => void) | undefined;
|
|
8
|
-
okText?: string | undefined;
|
|
9
|
-
cancelText?: string | undefined;
|
|
10
|
-
closeIcon?: React.ReactNode;
|
|
11
|
-
bodyClassName?: string | undefined;
|
|
12
|
-
outsideClickDisable?: boolean;
|
|
13
|
-
hideCross?: boolean;
|
|
14
|
-
okButtonLoading?: boolean;
|
|
15
|
-
okButtonDisabled?: boolean;
|
|
16
|
-
variant?: "primary" | "secondary";
|
|
17
|
-
okBtnClasses?: string | undefined;
|
|
18
|
-
cancelButtonAnalytics?: object | undefined;
|
|
19
|
-
okButtonAnalytics?: object | undefined;
|
|
20
|
-
footerMargintopDisable?: boolean;
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Radio } from "./Radio";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { RadioChangeEvent } from "antd/lib/radio";
|
|
2
|
-
export interface RadioProps {
|
|
3
|
-
checked?: boolean;
|
|
4
|
-
className?: string;
|
|
5
|
-
onChange?: (event: RadioChangeEvent) => void;
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
size?: "large" | "small" | "medium";
|
|
8
|
-
variant?: "normal" | "emphasized";
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
extra?: React.ReactNode;
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Switch } from "./Switch";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Tooltip } from "./Tooltip";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export interface TooltipProps {
|
|
2
|
-
children?: React.ReactNode;
|
|
3
|
-
title?: string | undefined;
|
|
4
|
-
placement?: "top" | "left" | "right" | "bottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | undefined;
|
|
5
|
-
color?: string | undefined;
|
|
6
|
-
className?: string | undefined;
|
|
7
|
-
mode?: "light" | "dark";
|
|
8
|
-
}
|
package/dist/types/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./components";
|