@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.
Files changed (50) hide show
  1. package/dist/cjs/index.css +1 -0
  2. package/dist/cjs/index.js +22861 -0
  3. package/dist/cjs/index.js.map +1 -0
  4. package/dist/cjs/types/components/Button/Button.d.ts +4 -0
  5. package/dist/cjs/types/components/Button/index.d.ts +1 -0
  6. package/dist/cjs/types/components/Button/types.d.ts +18 -0
  7. package/dist/cjs/types/components/Checkbox/Checkbox.d.ts +4 -0
  8. package/dist/cjs/types/components/Checkbox/index.d.ts +1 -0
  9. package/dist/cjs/types/components/Checkbox/types.d.ts +11 -0
  10. package/dist/cjs/types/components/Modal/Modal.d.ts +3 -0
  11. package/dist/cjs/types/components/Modal/index.d.ts +1 -0
  12. package/dist/cjs/types/components/Modal/types.d.ts +21 -0
  13. package/dist/cjs/types/components/Radio/Radio.d.ts +4 -0
  14. package/dist/cjs/types/components/Radio/index.d.ts +1 -0
  15. package/dist/cjs/types/components/Radio/types.d.ts +11 -0
  16. package/dist/cjs/types/components/Switch/Switch.d.ts +4 -0
  17. package/dist/cjs/types/components/Switch/index.d.ts +1 -0
  18. package/dist/cjs/types/components/Switch/types.d.ts +7 -0
  19. package/dist/cjs/types/components/Tooltip/Tooltip.d.ts +3 -0
  20. package/dist/cjs/types/components/Tooltip/index.d.ts +1 -0
  21. package/dist/cjs/types/components/Tooltip/types.d.ts +8 -0
  22. package/dist/cjs/types/components/index.d.ts +6 -0
  23. package/dist/cjs/types/index.d.ts +1 -0
  24. package/dist/esm/index.css +1 -0
  25. package/dist/esm/index.js +22836 -0
  26. package/dist/esm/index.js.map +1 -0
  27. package/dist/esm/types/components/Button/Button.d.ts +4 -0
  28. package/dist/esm/types/components/Button/index.d.ts +1 -0
  29. package/dist/esm/types/components/Button/types.d.ts +18 -0
  30. package/dist/esm/types/components/Checkbox/Checkbox.d.ts +4 -0
  31. package/dist/esm/types/components/Checkbox/index.d.ts +1 -0
  32. package/dist/esm/types/components/Checkbox/types.d.ts +11 -0
  33. package/dist/esm/types/components/Modal/Modal.d.ts +3 -0
  34. package/dist/esm/types/components/Modal/index.d.ts +1 -0
  35. package/dist/esm/types/components/Modal/types.d.ts +21 -0
  36. package/dist/esm/types/components/Radio/Radio.d.ts +4 -0
  37. package/dist/esm/types/components/Radio/index.d.ts +1 -0
  38. package/dist/esm/types/components/Radio/types.d.ts +11 -0
  39. package/dist/esm/types/components/Switch/Switch.d.ts +4 -0
  40. package/dist/esm/types/components/Switch/index.d.ts +1 -0
  41. package/dist/esm/types/components/Switch/types.d.ts +7 -0
  42. package/dist/esm/types/components/Tooltip/Tooltip.d.ts +3 -0
  43. package/dist/esm/types/components/Tooltip/index.d.ts +1 -0
  44. package/dist/esm/types/components/Tooltip/types.d.ts +8 -0
  45. package/dist/esm/types/components/index.d.ts +6 -0
  46. package/dist/esm/types/index.d.ts +1 -0
  47. package/package.json +89 -94
  48. package/src/components/Button/Button.module.scss +2 -2
  49. package/src/components/Button/Button.tsx +4 -1
  50. package/src/components/Button/types.ts +1 -0
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import { ButtonProps } from "./types";
3
+ declare const Button: React.FC<ButtonProps>;
4
+ export default Button;
@@ -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,4 @@
1
+ import * as React from "react";
2
+ import { CheckboxProps } from "./types";
3
+ declare const Checkbox: React.FC<CheckboxProps>;
4
+ export default Checkbox;
@@ -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,3 @@
1
+ import { ModalProps } from "./types";
2
+ declare const Modal: React.FC<ModalProps>;
3
+ export default Modal;
@@ -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,4 @@
1
+ import React from "react";
2
+ import { RadioProps } from "./types";
3
+ declare const Radio: React.FC<RadioProps>;
4
+ export default Radio;
@@ -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,4 @@
1
+ import * as React from "react";
2
+ import { SwitchProps } from "./types";
3
+ declare const Switch: React.FC<SwitchProps>;
4
+ export default Switch;
@@ -0,0 +1 @@
1
+ export { default as Switch } from "./Switch";
@@ -0,0 +1,7 @@
1
+ export interface SwitchProps {
2
+ size?: "default" | "small";
3
+ className?: string | undefined;
4
+ onChange?: (checked: boolean, event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void;
5
+ disabled?: boolean;
6
+ checked?: boolean;
7
+ }
@@ -0,0 +1,3 @@
1
+ import { TooltipProps } from "./types";
2
+ declare const Tooltip: React.FC<TooltipProps>;
3
+ export default Tooltip;
@@ -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,6 @@
1
+ export * from "./Button";
2
+ export * from "./Switch";
3
+ export * from "./Modal";
4
+ export * from "./Tooltip";
5
+ export * from './Checkbox';
6
+ export * from './Radio';
@@ -0,0 +1 @@
1
+ export * from "./components";
package/package.json CHANGED
@@ -1,95 +1,90 @@
1
1
  {
2
- "name": "@itilite/lumina-ui",
3
- "version": "0.0.4",
4
- "description": "Design system",
5
- "main": "dist/cjs/index.js",
6
- "module": "dist/esm/index.js",
7
- "types": "dist/types/index.d.ts",
8
- "scripts": {
9
- "build:types": "tsc --emitDeclarationOnly",
10
- "build": "rollup -c",
11
- "prebuild:all": "node -v && npm -v && pwd && ls -la",
12
- "build:all": "ROLLUP_DEBUG=* rollup -c && tsc --emitDeclarationOnly",
13
- "dev": "rollup -c -w",
14
- "lint": "eslint ",
15
- "lint:fix": "eslint ./src --ext .ts,.tsx --fix",
16
- "test": "jest",
17
- "publish": "npm init --scope=itilite && npm publish"
18
- },
19
- "author": "Itilite",
20
- "license": "ISC",
21
- "devDependencies": {
22
- "@babel/core": "^7.25.9",
23
- "@babel/preset-env": "^7.25.9",
24
- "@babel/preset-react": "^7.25.9",
25
- "@babel/preset-typescript": "^7.25.9",
26
- "@rollup/plugin-commonjs": "^26.0.1",
27
- "@rollup/plugin-node-resolve": "^15.2.3",
28
- "@rollup/plugin-typescript": "^11.1.6",
29
- "@testing-library/jest-dom": "^6.6.2",
30
- "@testing-library/react": "^16.0.1",
31
- "@types/jest": "^29.5.12",
32
- "@types/prop-types": "^15.7.12",
33
- "@types/react": "^18.3.12",
34
- "@types/react-dom": "^18.3.0",
35
- "@typescript-eslint/eslint-plugin": "^8.2.0",
36
- "@typescript-eslint/parser": "^8.2.0",
37
- "antd": "^5.20.1",
38
- "autoprefixer": "^10.4.20",
39
- "babel-jest": "^29.7.0",
40
- "clsx": "^2.1.1",
41
- "eslint": "^9.9.0",
42
- "eslint-config-standard-with-typescript": "^43.0.1",
43
- "eslint-define-config": "^2.1.0",
44
- "eslint-plugin-import": "^2.29.1",
45
- "eslint-plugin-react": "^7.35.0",
46
- "eslint-plugin-react-hooks": "^5.1.0-rc.0",
47
- "eslint-plugin-simple-import-sort": "^12.1.1",
48
- "eslint-plugin-unused-imports": "^4.1.3",
49
- "glob": "9.3.5",
50
- "identity-obj-proxy": "^3.0.0",
51
- "jest": "^29.7.0",
52
- "jest-environment-jsdom": "^29.7.0",
53
- "postcss": "^8.4.41",
54
- "postcss-scss": "^4.0.9",
55
- "prop-types": "^15.8.1",
56
- "react": "^18.3.1",
57
- "react-dom": "^18.3.1",
58
- "rollup": "^4.21.0",
59
- "rollup-plugin-dts": "^6.1.1",
60
- "rollup-plugin-peer-deps-external": "^2.2.4",
61
- "rollup-plugin-postcss": "^4.0.2",
62
- "rollup-plugin-scss": "^4.0.0",
63
- "sass": "^1.77.8",
64
- "tailwindcss": "^3.4.10",
65
- "tslib": "^2.6.3",
66
- "typescript": "^5.5.3"
67
- },
68
- "peerDependencies": {
69
- "react": ">=18"
70
- },
71
- "jest": {
72
- "setupFilesAfterEnv": [
73
- "<rootDir>/src/setupTests.ts"
74
- ],
75
- "testEnvironment": "jsdom"
76
- },
77
- "repository": {
78
- "type": "git",
79
- "url": "git+https://github.com/Itilite/design-system.git"
80
- },
81
- "keywords": [
82
- "Design",
83
- "system",
84
- "LuminaUI",
85
- "Frontend"
86
- ],
87
- "bugs": {
88
- "url": "https://github.com/Itilite/design-system/issues"
89
- },
90
- "homepage": "https://github.com/Itilite/design-system#readme",
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
 
@@ -15,4 +15,5 @@ export interface ButtonProps {
15
15
  loading?: boolean;
16
16
  onHoverUnderline?: boolean;
17
17
  analytics?: Record<string, unknown>;
18
+ tabIndex?: number;
18
19
  }