@itilite/lumina-ui 0.0.4 → 0.0.6
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 -0
- package/dist/cjs/index.js +22861 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/types/components/Button/Button.d.ts +4 -0
- package/dist/cjs/types/components/Button/index.d.ts +1 -0
- package/dist/cjs/types/components/Button/types.d.ts +18 -0
- package/dist/cjs/types/components/Checkbox/Checkbox.d.ts +4 -0
- package/dist/cjs/types/components/Checkbox/index.d.ts +1 -0
- package/dist/cjs/types/components/Checkbox/types.d.ts +11 -0
- package/dist/cjs/types/components/Modal/Modal.d.ts +3 -0
- package/dist/cjs/types/components/Modal/index.d.ts +1 -0
- package/dist/cjs/types/components/Modal/types.d.ts +21 -0
- package/dist/cjs/types/components/Radio/Radio.d.ts +4 -0
- package/dist/cjs/types/components/Radio/index.d.ts +1 -0
- package/dist/cjs/types/components/Radio/types.d.ts +11 -0
- package/dist/cjs/types/components/Switch/Switch.d.ts +4 -0
- package/dist/cjs/types/components/Switch/index.d.ts +1 -0
- package/dist/cjs/types/components/Switch/types.d.ts +7 -0
- package/dist/cjs/types/components/Tooltip/Tooltip.d.ts +3 -0
- package/dist/cjs/types/components/Tooltip/index.d.ts +1 -0
- package/dist/cjs/types/components/Tooltip/types.d.ts +8 -0
- package/dist/cjs/types/components/index.d.ts +6 -0
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/esm/index.css +1 -0
- package/dist/esm/index.js +22836 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/types/components/Button/Button.d.ts +4 -0
- package/dist/esm/types/components/Button/index.d.ts +1 -0
- package/dist/esm/types/components/Button/types.d.ts +18 -0
- package/dist/esm/types/components/Checkbox/Checkbox.d.ts +4 -0
- package/dist/esm/types/components/Checkbox/index.d.ts +1 -0
- package/dist/esm/types/components/Checkbox/types.d.ts +11 -0
- package/dist/esm/types/components/Modal/Modal.d.ts +3 -0
- package/dist/esm/types/components/Modal/index.d.ts +1 -0
- package/dist/esm/types/components/Modal/types.d.ts +21 -0
- package/dist/esm/types/components/Radio/Radio.d.ts +4 -0
- package/dist/esm/types/components/Radio/index.d.ts +1 -0
- package/dist/esm/types/components/Radio/types.d.ts +11 -0
- package/dist/esm/types/components/Switch/Switch.d.ts +4 -0
- package/dist/esm/types/components/Switch/index.d.ts +1 -0
- package/dist/esm/types/components/Switch/types.d.ts +7 -0
- package/dist/esm/types/components/Tooltip/Tooltip.d.ts +3 -0
- package/dist/esm/types/components/Tooltip/index.d.ts +1 -0
- package/dist/esm/types/components/Tooltip/types.d.ts +8 -0
- package/dist/esm/types/components/index.d.ts +6 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/package.json +89 -94
- package/src/components/Button/Button.module.scss +2 -2
- package/src/components/Button/Button.tsx +4 -1
- package/src/components/Button/types.ts +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Button } from "./Button";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ButtonProps {
|
|
2
|
+
id?: string;
|
|
3
|
+
name?: string;
|
|
4
|
+
type?: "primary" | "secondary" | "critical" | undefined;
|
|
5
|
+
variant?: "subtle" | "text" | "link";
|
|
6
|
+
size?: "large" | "small";
|
|
7
|
+
shape?: "circle" | "default" | "round";
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
iconPosition?: "start" | "end";
|
|
10
|
+
className?: string;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
13
|
+
href?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
onHoverUnderline?: boolean;
|
|
17
|
+
analytics?: Record<string, unknown>;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Checkbox } from "./Checkbox";
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Modal } from "./Modal";
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Radio } from "./Radio";
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Switch } from "./Switch";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Tooltip } from "./Tooltip";
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./components";
|
package/package.json
CHANGED
|
@@ -1,95 +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
|
-
|
|
90
|
-
|
|
91
|
-
"dependencies": {
|
|
92
|
-
"minimatch": "^8.0.4",
|
|
93
|
-
"minipass": "^4.2.8"
|
|
94
|
-
}
|
|
95
|
-
}
|
|
2
|
+
"name": "@itilite/lumina-ui",
|
|
3
|
+
"version": "0.0.6",
|
|
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
|
+
}
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
box-shadow: 0 1px 0 0 rgba(17, 24, 39, 0.1);
|
|
33
33
|
&:global(.ant-btn-primary):hover,
|
|
34
34
|
&:global(.ant-btn-primary):active {
|
|
35
|
-
@apply tw-bg-color-action-primary;
|
|
35
|
+
@apply tw-bg-color-action-primary-hover;
|
|
36
36
|
box-shadow: 0px 2px 4px 0px rgba(17, 24, 39, 0.1);
|
|
37
37
|
}
|
|
38
38
|
&.variant_subtle {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
&.variant_link {
|
|
55
55
|
@apply tw-text-color-text-primary;
|
|
56
56
|
&:hover {
|
|
57
|
-
@apply tw-text-color-text-primary;
|
|
57
|
+
@apply tw-text-color-text-primary-hover;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
}
|
|
@@ -22,7 +22,8 @@ const Button: React.FC<ButtonProps> = (props) => {
|
|
|
22
22
|
loading = false,
|
|
23
23
|
onHoverUnderline = false,
|
|
24
24
|
id = "",
|
|
25
|
-
name = ""
|
|
25
|
+
name = "",
|
|
26
|
+
tabIndex = 0,
|
|
26
27
|
} = props;
|
|
27
28
|
|
|
28
29
|
const buttonMap: Record<string, "primary" | "default" | "text" | "link"> = {
|
|
@@ -70,6 +71,7 @@ const Button: React.FC<ButtonProps> = (props) => {
|
|
|
70
71
|
loading={loading}
|
|
71
72
|
href={href || undefined}
|
|
72
73
|
data-testid='lumina-button'
|
|
74
|
+
tabIndex={tabIndex}
|
|
73
75
|
>
|
|
74
76
|
{children}
|
|
75
77
|
</AntButton>
|
|
@@ -89,6 +91,7 @@ Button.propTypes = {
|
|
|
89
91
|
disabled: PropTypes.bool,
|
|
90
92
|
loading: PropTypes.bool,
|
|
91
93
|
href: PropTypes.string,
|
|
94
|
+
tabIndex: PropTypes.number,
|
|
92
95
|
onHoverUnderline: PropTypes.bool,
|
|
93
96
|
};
|
|
94
97
|
|