@itilite/lumina-ui 0.0.321 → 0.0.322
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/README.md +106 -0
- package/dist/{cjs/types/components/Button/types.d.ts → Button.d.mts} +10 -1
- package/dist/{esm/types/components/Button/types.d.ts → Button.d.ts} +10 -1
- package/dist/Button.js +111 -0
- package/dist/Button.mjs +9 -0
- package/dist/{esm/types/components/Checkbox/types.d.ts → Checkbox.d.mts} +10 -1
- package/dist/{types/components/Checkbox/types.d.ts → Checkbox.d.ts} +10 -1
- package/dist/Checkbox.js +121 -0
- package/dist/Checkbox.mjs +9 -0
- package/dist/chunk-FUJQIYOF.mjs +37 -0
- package/dist/chunk-ME35H7QC.mjs +77 -0
- package/dist/chunk-OMYHSSPQ.mjs +64 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +197 -0
- package/dist/index.mjs +11 -0
- package/dist/styles.css +1162 -0
- package/package.json +72 -80
- package/babel.config.js +0 -7
- package/dist/cjs/index.css +0 -1
- package/dist/cjs/index.js +0 -23219
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/types/components/Button/Button.d.ts +0 -4
- package/dist/cjs/types/components/Button/index.d.ts +0 -1
- package/dist/cjs/types/components/Checkbox/Checkbox.d.ts +0 -4
- package/dist/cjs/types/components/Checkbox/index.d.ts +0 -1
- package/dist/cjs/types/components/Checkbox/types.d.ts +0 -11
- package/dist/cjs/types/components/Modal/Modal.d.ts +0 -3
- package/dist/cjs/types/components/Modal/index.d.ts +0 -1
- package/dist/cjs/types/components/Modal/types.d.ts +0 -21
- package/dist/cjs/types/components/Radio/Radio.d.ts +0 -4
- package/dist/cjs/types/components/Radio/index.d.ts +0 -1
- package/dist/cjs/types/components/Radio/types.d.ts +0 -11
- package/dist/cjs/types/components/Switch/Switch.d.ts +0 -4
- package/dist/cjs/types/components/Switch/index.d.ts +0 -1
- package/dist/cjs/types/components/Switch/types.d.ts +0 -7
- package/dist/cjs/types/components/Tag/Tag.d.ts +0 -4
- package/dist/cjs/types/components/Tag/index.d.ts +0 -1
- package/dist/cjs/types/components/Tag/type.d.ts +0 -7
- package/dist/cjs/types/components/Tooltip/Tooltip.d.ts +0 -3
- package/dist/cjs/types/components/Tooltip/index.d.ts +0 -1
- package/dist/cjs/types/components/Tooltip/types.d.ts +0 -8
- package/dist/cjs/types/components/index.d.ts +0 -7
- package/dist/cjs/types/index.d.ts +0 -1
- package/dist/esm/index.css +0 -1
- package/dist/esm/index.js +0 -23193
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/types/components/Button/Button.d.ts +0 -4
- package/dist/esm/types/components/Button/index.d.ts +0 -1
- package/dist/esm/types/components/Checkbox/Checkbox.d.ts +0 -4
- package/dist/esm/types/components/Checkbox/index.d.ts +0 -1
- package/dist/esm/types/components/Modal/Modal.d.ts +0 -3
- package/dist/esm/types/components/Modal/index.d.ts +0 -1
- package/dist/esm/types/components/Modal/types.d.ts +0 -21
- package/dist/esm/types/components/Radio/Radio.d.ts +0 -4
- package/dist/esm/types/components/Radio/index.d.ts +0 -1
- package/dist/esm/types/components/Radio/types.d.ts +0 -11
- package/dist/esm/types/components/Switch/Switch.d.ts +0 -4
- package/dist/esm/types/components/Switch/index.d.ts +0 -1
- package/dist/esm/types/components/Switch/types.d.ts +0 -7
- package/dist/esm/types/components/Tag/Tag.d.ts +0 -4
- package/dist/esm/types/components/Tag/index.d.ts +0 -1
- package/dist/esm/types/components/Tag/type.d.ts +0 -7
- package/dist/esm/types/components/Tooltip/Tooltip.d.ts +0 -3
- package/dist/esm/types/components/Tooltip/index.d.ts +0 -1
- package/dist/esm/types/components/Tooltip/types.d.ts +0 -8
- package/dist/esm/types/components/index.d.ts +0 -7
- package/dist/esm/types/index.d.ts +0 -1
- 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/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/Tag/Tag.d.ts +0 -4
- package/dist/types/components/Tag/index.d.ts +0 -1
- package/dist/types/components/Tag/type.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 -7
- package/dist/types/index.d.ts +0 -1
- package/eslint.config.mjs +0 -55
- package/jest.config.js +0 -12
- package/rollup.config.mjs +0 -58
- package/setupTests.ts +0 -1
- package/src/components/Button/Button.module.scss +0 -199
- package/src/components/Button/Button.test.tsx +0 -90
- package/src/components/Button/Button.tsx +0 -91
- package/src/components/Button/index.ts +0 -1
- package/src/components/Button/types.ts +0 -16
- package/src/components/Checkbox/Checkbox.module.scss +0 -141
- package/src/components/Checkbox/Checkbox.tsx +0 -56
- package/src/components/Checkbox/index.ts +0 -1
- package/src/components/Checkbox/types.ts +0 -12
- package/src/components/Modal/Modal.module.scss +0 -61
- package/src/components/Modal/Modal.tsx +0 -103
- package/src/components/Modal/index.ts +0 -1
- package/src/components/Modal/types.ts +0 -21
- package/src/components/Radio/Radio.module.scss +0 -103
- package/src/components/Radio/Radio.tsx +0 -54
- package/src/components/Radio/index.ts +0 -1
- package/src/components/Radio/types.ts +0 -12
- package/src/components/Switch/Switch.module.scss +0 -17
- package/src/components/Switch/Switch.tsx +0 -37
- package/src/components/Switch/index.ts +0 -1
- package/src/components/Switch/types.ts +0 -12
- package/src/components/Tag/Tag.module.scss +0 -61
- package/src/components/Tag/Tag.tsx +0 -34
- package/src/components/Tag/index.ts +0 -1
- package/src/components/Tag/type.ts +0 -7
- package/src/components/Tooltip/Tooltip.module.scss +0 -12
- package/src/components/Tooltip/Tooltip.tsx +0 -29
- package/src/components/Tooltip/index.ts +0 -1
- package/src/components/Tooltip/types.ts +0 -21
- package/src/components/index.ts +0 -8
- package/src/global.d.ts +0 -6
- package/src/index.ts +0 -1
- package/src/types/jest.d.ts +0 -10
- package/src/types/scss.d.ts +0 -1
- package/tsconfig.json +0 -41
package/README.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# @itilite/lumina-ui
|
|
2
|
+
|
|
3
|
+
Itilite Lumina Design System UI Components - A React component library built with TypeScript, Ant Design, and Tailwind CSS.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @itilite/lumina-ui
|
|
9
|
+
# or
|
|
10
|
+
pnpm add @itilite/lumina-ui
|
|
11
|
+
# or
|
|
12
|
+
yarn add @itilite/lumina-ui
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Peer Dependencies
|
|
16
|
+
|
|
17
|
+
Make sure you have the following peer dependencies installed:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install react antd
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
### Importing Components
|
|
26
|
+
|
|
27
|
+
You can import components individually (recommended for tree-shaking):
|
|
28
|
+
|
|
29
|
+
```tsx
|
|
30
|
+
import { Button } from '@itilite/lumina-ui/button';
|
|
31
|
+
import { Checkbox } from '@itilite/lumina-ui/checkbox';
|
|
32
|
+
import '@itilite/lumina-ui/styles.css';
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Or import all components from the main entry point:
|
|
36
|
+
|
|
37
|
+
```tsx
|
|
38
|
+
import { Button, Checkbox } from '@itilite/lumina-ui';
|
|
39
|
+
import '@itilite/lumina-ui/styles.css';
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Button Component
|
|
43
|
+
|
|
44
|
+
```tsx
|
|
45
|
+
import { Button } from '@itilite/lumina-ui/button';
|
|
46
|
+
import '@itilite/lumina-ui/styles.css';
|
|
47
|
+
|
|
48
|
+
function App() {
|
|
49
|
+
return (
|
|
50
|
+
<Button onClick={() => console.log('Clicked!')}>
|
|
51
|
+
Click Me
|
|
52
|
+
</Button>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Checkbox Component
|
|
58
|
+
|
|
59
|
+
```tsx
|
|
60
|
+
import { Checkbox } from '@itilite/lumina-ui/checkbox';
|
|
61
|
+
import '@itilite/lumina-ui/styles.css';
|
|
62
|
+
|
|
63
|
+
function App() {
|
|
64
|
+
return (
|
|
65
|
+
<Checkbox onChange={(checked) => console.log(checked)}>
|
|
66
|
+
Accept Terms
|
|
67
|
+
</Checkbox>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Styling
|
|
73
|
+
|
|
74
|
+
The package exports a `styles.css` file that includes all component styles. Import it in your application:
|
|
75
|
+
|
|
76
|
+
```tsx
|
|
77
|
+
import '@itilite/lumina-ui/styles.css';
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Available Components
|
|
81
|
+
|
|
82
|
+
- **Button** - Customizable button component
|
|
83
|
+
- **Checkbox** - Checkbox input component
|
|
84
|
+
|
|
85
|
+
More components coming soon!
|
|
86
|
+
|
|
87
|
+
## TypeScript Support
|
|
88
|
+
|
|
89
|
+
This package is built with TypeScript and includes type definitions out of the box.
|
|
90
|
+
|
|
91
|
+
## Browser Support
|
|
92
|
+
|
|
93
|
+
- Modern browsers (Chrome, Firefox, Safari, Edge)
|
|
94
|
+
- React 18+
|
|
95
|
+
|
|
96
|
+
## License
|
|
97
|
+
|
|
98
|
+
MIT
|
|
99
|
+
|
|
100
|
+
## Contributing
|
|
101
|
+
|
|
102
|
+
For bugs and feature requests, please visit our [GitHub repository](https://github.com/Itilite/dev-design-system).
|
|
103
|
+
|
|
104
|
+
## Maintainer
|
|
105
|
+
|
|
106
|
+
Itilite
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
|
|
3
|
+
interface ButtonProps {
|
|
2
4
|
type?: "primary" | "secondary" | "critical" | undefined;
|
|
3
5
|
variant?: "subtle" | "text" | "link";
|
|
4
6
|
size?: "large" | "small";
|
|
@@ -14,3 +16,10 @@ export interface ButtonProps {
|
|
|
14
16
|
onHoverUnderline?: boolean;
|
|
15
17
|
analytics?: Record<string, unknown>;
|
|
16
18
|
}
|
|
19
|
+
|
|
20
|
+
declare function Button(props: ButtonProps): React$1.JSX.Element;
|
|
21
|
+
declare namespace Button {
|
|
22
|
+
var displayName: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { Button, Button as default };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
|
|
3
|
+
interface ButtonProps {
|
|
2
4
|
type?: "primary" | "secondary" | "critical" | undefined;
|
|
3
5
|
variant?: "subtle" | "text" | "link";
|
|
4
6
|
size?: "large" | "small";
|
|
@@ -14,3 +16,10 @@ export interface ButtonProps {
|
|
|
14
16
|
onHoverUnderline?: boolean;
|
|
15
17
|
analytics?: Record<string, unknown>;
|
|
16
18
|
}
|
|
19
|
+
|
|
20
|
+
declare function Button(props: ButtonProps): React$1.JSX.Element;
|
|
21
|
+
declare namespace Button {
|
|
22
|
+
var displayName: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { Button, Button as default };
|
package/dist/Button.js
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/Button/Button.tsx
|
|
31
|
+
var Button_exports = {};
|
|
32
|
+
__export(Button_exports, {
|
|
33
|
+
Button: () => Button,
|
|
34
|
+
default: () => Button_default
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(Button_exports);
|
|
37
|
+
var import_antd = require("antd");
|
|
38
|
+
var import_clsx = __toESM(require("clsx"));
|
|
39
|
+
|
|
40
|
+
// src/Button/Button.module.scss
|
|
41
|
+
var Button_module_default = { "button": "Button-module__button___PM45p", "size_large": "Button-module__size_large___4muaQ", "shape_circle": "Button-module__shape_circle___5jh5G", "size_normal": "Button-module__size_normal___qtQjh", "size_small": "Button-module__size_small___7xabg", "type_primary": "Button-module__type_primary___-eoy3", "variant_subtle": "Button-module__variant_subtle___FojFh", "variant_text": "Button-module__variant_text___T-3KC", "variant_link": "Button-module__variant_link___dTdwy", "type_secondary": "Button-module__type_secondary___CwF0Y", "type_critical": "Button-module__type_critical___vVyiK", "onHoverUnderline": "Button-module__onHoverUnderline___wKzkT" };
|
|
42
|
+
|
|
43
|
+
// src/Button/Button.tsx
|
|
44
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
|
+
function Button(props) {
|
|
46
|
+
const {
|
|
47
|
+
type = "primary",
|
|
48
|
+
variant = "default",
|
|
49
|
+
size = "normal",
|
|
50
|
+
shape = "default",
|
|
51
|
+
className = "",
|
|
52
|
+
icon = null,
|
|
53
|
+
children,
|
|
54
|
+
onClick,
|
|
55
|
+
href = "",
|
|
56
|
+
disabled = false,
|
|
57
|
+
loading = false,
|
|
58
|
+
onHoverUnderline = false
|
|
59
|
+
} = props;
|
|
60
|
+
const buttonMap = {
|
|
61
|
+
default: "primary",
|
|
62
|
+
subtle: "default",
|
|
63
|
+
text: "text",
|
|
64
|
+
link: "link"
|
|
65
|
+
};
|
|
66
|
+
const sizeMap = {
|
|
67
|
+
small: "small",
|
|
68
|
+
normal: "middle",
|
|
69
|
+
// Map "default" to "middle"
|
|
70
|
+
large: "large"
|
|
71
|
+
};
|
|
72
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
73
|
+
import_antd.Button,
|
|
74
|
+
{
|
|
75
|
+
className: (0, import_clsx.default)(
|
|
76
|
+
Button_module_default.button,
|
|
77
|
+
Button_module_default[`size_${size}`],
|
|
78
|
+
Button_module_default[`variant_${variant}`],
|
|
79
|
+
Button_module_default[`shape_${shape}`],
|
|
80
|
+
Button_module_default[`type_${type}`],
|
|
81
|
+
`size_${size}`,
|
|
82
|
+
`variant_${variant}`,
|
|
83
|
+
`shape_${shape}`,
|
|
84
|
+
`type_${type}`,
|
|
85
|
+
className,
|
|
86
|
+
{
|
|
87
|
+
"tw-cursor-not-allowed": disabled,
|
|
88
|
+
"tw-opacity-40": disabled
|
|
89
|
+
},
|
|
90
|
+
disabled && Button_module_default.disabled,
|
|
91
|
+
onHoverUnderline && Button_module_default.onHoverUnderline
|
|
92
|
+
),
|
|
93
|
+
"data-testid": "lumina-button",
|
|
94
|
+
disabled,
|
|
95
|
+
href: href || void 0,
|
|
96
|
+
icon,
|
|
97
|
+
loading,
|
|
98
|
+
onClick,
|
|
99
|
+
shape,
|
|
100
|
+
size: sizeMap[size],
|
|
101
|
+
type: buttonMap[variant],
|
|
102
|
+
children
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
Button.displayName = "Button";
|
|
107
|
+
var Button_default = Button;
|
|
108
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
109
|
+
0 && (module.exports = {
|
|
110
|
+
Button
|
|
111
|
+
});
|
package/dist/Button.mjs
ADDED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
1
2
|
import { CheckboxChangeEvent } from 'antd/es/checkbox';
|
|
2
|
-
|
|
3
|
+
|
|
4
|
+
interface CheckboxProps {
|
|
3
5
|
checked?: boolean;
|
|
4
6
|
className?: string;
|
|
5
7
|
onChange?: (e: CheckboxChangeEvent) => void;
|
|
@@ -9,3 +11,10 @@ export interface CheckboxProps {
|
|
|
9
11
|
disabled?: boolean;
|
|
10
12
|
indeterminate?: boolean;
|
|
11
13
|
}
|
|
14
|
+
|
|
15
|
+
declare function Checkbox(props: CheckboxProps): React$1.JSX.Element;
|
|
16
|
+
declare namespace Checkbox {
|
|
17
|
+
var displayName: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { Checkbox, Checkbox as default };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
1
2
|
import { CheckboxChangeEvent } from 'antd/es/checkbox';
|
|
2
|
-
|
|
3
|
+
|
|
4
|
+
interface CheckboxProps {
|
|
3
5
|
checked?: boolean;
|
|
4
6
|
className?: string;
|
|
5
7
|
onChange?: (e: CheckboxChangeEvent) => void;
|
|
@@ -9,3 +11,10 @@ export interface CheckboxProps {
|
|
|
9
11
|
disabled?: boolean;
|
|
10
12
|
indeterminate?: boolean;
|
|
11
13
|
}
|
|
14
|
+
|
|
15
|
+
declare function Checkbox(props: CheckboxProps): React$1.JSX.Element;
|
|
16
|
+
declare namespace Checkbox {
|
|
17
|
+
var displayName: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { Checkbox, Checkbox as default };
|
package/dist/Checkbox.js
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
+
var __spreadValues = (a, b) => {
|
|
14
|
+
for (var prop in b || (b = {}))
|
|
15
|
+
if (__hasOwnProp.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
if (__getOwnPropSymbols)
|
|
18
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
}
|
|
22
|
+
return a;
|
|
23
|
+
};
|
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
var __objRest = (source, exclude) => {
|
|
26
|
+
var target = {};
|
|
27
|
+
for (var prop in source)
|
|
28
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
if (source != null && __getOwnPropSymbols)
|
|
31
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
var __export = (target, all) => {
|
|
38
|
+
for (var name in all)
|
|
39
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
40
|
+
};
|
|
41
|
+
var __copyProps = (to, from, except, desc) => {
|
|
42
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
43
|
+
for (let key of __getOwnPropNames(from))
|
|
44
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
45
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
46
|
+
}
|
|
47
|
+
return to;
|
|
48
|
+
};
|
|
49
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
50
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
51
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
52
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
53
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
54
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
55
|
+
mod
|
|
56
|
+
));
|
|
57
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
58
|
+
|
|
59
|
+
// src/Checkbox/Checkbox.tsx
|
|
60
|
+
var Checkbox_exports = {};
|
|
61
|
+
__export(Checkbox_exports, {
|
|
62
|
+
Checkbox: () => Checkbox,
|
|
63
|
+
default: () => Checkbox_default
|
|
64
|
+
});
|
|
65
|
+
module.exports = __toCommonJS(Checkbox_exports);
|
|
66
|
+
var import_antd = require("antd");
|
|
67
|
+
var import_clsx = __toESM(require("clsx"));
|
|
68
|
+
|
|
69
|
+
// src/Checkbox/Checkbox.module.scss
|
|
70
|
+
var Checkbox_module_default = { "checkbox": "Checkbox-module__checkbox___D2qRJ", "size_small": "Checkbox-module__size_small___lgUjj", "size_medium": "Checkbox-module__size_medium___Npyaz", "size_large": "Checkbox-module__size_large___chR9U", "type_checked": "Checkbox-module__type_checked___fhhpM", "disabled": "Checkbox-module__disabled___xqtab", "type_unchecked": "Checkbox-module__type_unchecked___1zNB7", "variant_normal": "Checkbox-module__variant_normal___MbKJP", "variant_emphasized": "Checkbox-module__variant_emphasized___Yo9yv", "variant_indeterminate": "Checkbox-module__variant_indeterminate___-tnoD" };
|
|
71
|
+
|
|
72
|
+
// src/Checkbox/Checkbox.tsx
|
|
73
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
74
|
+
function Checkbox(props) {
|
|
75
|
+
const _a = props, {
|
|
76
|
+
className = "",
|
|
77
|
+
children = null,
|
|
78
|
+
onChange = () => {
|
|
79
|
+
},
|
|
80
|
+
checked = false,
|
|
81
|
+
disabled = false,
|
|
82
|
+
size = "small",
|
|
83
|
+
variant = "normal",
|
|
84
|
+
indeterminate = false
|
|
85
|
+
} = _a, rest = __objRest(_a, [
|
|
86
|
+
"className",
|
|
87
|
+
"children",
|
|
88
|
+
"onChange",
|
|
89
|
+
"checked",
|
|
90
|
+
"disabled",
|
|
91
|
+
"size",
|
|
92
|
+
"variant",
|
|
93
|
+
"indeterminate"
|
|
94
|
+
]);
|
|
95
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
96
|
+
import_antd.Checkbox,
|
|
97
|
+
__spreadProps(__spreadValues({
|
|
98
|
+
checked,
|
|
99
|
+
className: (0, import_clsx.default)(
|
|
100
|
+
Checkbox_module_default.checkbox,
|
|
101
|
+
Checkbox_module_default[`size_${size}`],
|
|
102
|
+
Checkbox_module_default[`variant_${variant}`],
|
|
103
|
+
checked ? Checkbox_module_default.type_checked : Checkbox_module_default.type_unchecked,
|
|
104
|
+
disabled && Checkbox_module_default.disabled,
|
|
105
|
+
indeterminate && Checkbox_module_default[`variant_indeterminate`],
|
|
106
|
+
className
|
|
107
|
+
),
|
|
108
|
+
disabled,
|
|
109
|
+
indeterminate,
|
|
110
|
+
onChange
|
|
111
|
+
}, rest), {
|
|
112
|
+
children
|
|
113
|
+
})
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
Checkbox.displayName = "Checkbox";
|
|
117
|
+
var Checkbox_default = Checkbox;
|
|
118
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
119
|
+
0 && (module.exports = {
|
|
120
|
+
Checkbox
|
|
121
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export {
|
|
34
|
+
__spreadValues,
|
|
35
|
+
__spreadProps,
|
|
36
|
+
__objRest
|
|
37
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// src/Button/Button.tsx
|
|
2
|
+
import { Button as AntButton } from "antd";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
|
|
5
|
+
// src/Button/Button.module.scss
|
|
6
|
+
var Button_module_default = { "button": "Button-module__button___PM45p", "size_large": "Button-module__size_large___4muaQ", "shape_circle": "Button-module__shape_circle___5jh5G", "size_normal": "Button-module__size_normal___qtQjh", "size_small": "Button-module__size_small___7xabg", "type_primary": "Button-module__type_primary___-eoy3", "variant_subtle": "Button-module__variant_subtle___FojFh", "variant_text": "Button-module__variant_text___T-3KC", "variant_link": "Button-module__variant_link___dTdwy", "type_secondary": "Button-module__type_secondary___CwF0Y", "type_critical": "Button-module__type_critical___vVyiK", "onHoverUnderline": "Button-module__onHoverUnderline___wKzkT" };
|
|
7
|
+
|
|
8
|
+
// src/Button/Button.tsx
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
function Button(props) {
|
|
11
|
+
const {
|
|
12
|
+
type = "primary",
|
|
13
|
+
variant = "default",
|
|
14
|
+
size = "normal",
|
|
15
|
+
shape = "default",
|
|
16
|
+
className = "",
|
|
17
|
+
icon = null,
|
|
18
|
+
children,
|
|
19
|
+
onClick,
|
|
20
|
+
href = "",
|
|
21
|
+
disabled = false,
|
|
22
|
+
loading = false,
|
|
23
|
+
onHoverUnderline = false
|
|
24
|
+
} = props;
|
|
25
|
+
const buttonMap = {
|
|
26
|
+
default: "primary",
|
|
27
|
+
subtle: "default",
|
|
28
|
+
text: "text",
|
|
29
|
+
link: "link"
|
|
30
|
+
};
|
|
31
|
+
const sizeMap = {
|
|
32
|
+
small: "small",
|
|
33
|
+
normal: "middle",
|
|
34
|
+
// Map "default" to "middle"
|
|
35
|
+
large: "large"
|
|
36
|
+
};
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
|
+
AntButton,
|
|
39
|
+
{
|
|
40
|
+
className: clsx(
|
|
41
|
+
Button_module_default.button,
|
|
42
|
+
Button_module_default[`size_${size}`],
|
|
43
|
+
Button_module_default[`variant_${variant}`],
|
|
44
|
+
Button_module_default[`shape_${shape}`],
|
|
45
|
+
Button_module_default[`type_${type}`],
|
|
46
|
+
`size_${size}`,
|
|
47
|
+
`variant_${variant}`,
|
|
48
|
+
`shape_${shape}`,
|
|
49
|
+
`type_${type}`,
|
|
50
|
+
className,
|
|
51
|
+
{
|
|
52
|
+
"tw-cursor-not-allowed": disabled,
|
|
53
|
+
"tw-opacity-40": disabled
|
|
54
|
+
},
|
|
55
|
+
disabled && Button_module_default.disabled,
|
|
56
|
+
onHoverUnderline && Button_module_default.onHoverUnderline
|
|
57
|
+
),
|
|
58
|
+
"data-testid": "lumina-button",
|
|
59
|
+
disabled,
|
|
60
|
+
href: href || void 0,
|
|
61
|
+
icon,
|
|
62
|
+
loading,
|
|
63
|
+
onClick,
|
|
64
|
+
shape,
|
|
65
|
+
size: sizeMap[size],
|
|
66
|
+
type: buttonMap[variant],
|
|
67
|
+
children
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
Button.displayName = "Button";
|
|
72
|
+
var Button_default = Button;
|
|
73
|
+
|
|
74
|
+
export {
|
|
75
|
+
Button,
|
|
76
|
+
Button_default
|
|
77
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__objRest,
|
|
3
|
+
__spreadProps,
|
|
4
|
+
__spreadValues
|
|
5
|
+
} from "./chunk-FUJQIYOF.mjs";
|
|
6
|
+
|
|
7
|
+
// src/Checkbox/Checkbox.tsx
|
|
8
|
+
import { Checkbox as AntCheckbox } from "antd";
|
|
9
|
+
import clsx from "clsx";
|
|
10
|
+
|
|
11
|
+
// src/Checkbox/Checkbox.module.scss
|
|
12
|
+
var Checkbox_module_default = { "checkbox": "Checkbox-module__checkbox___D2qRJ", "size_small": "Checkbox-module__size_small___lgUjj", "size_medium": "Checkbox-module__size_medium___Npyaz", "size_large": "Checkbox-module__size_large___chR9U", "type_checked": "Checkbox-module__type_checked___fhhpM", "disabled": "Checkbox-module__disabled___xqtab", "type_unchecked": "Checkbox-module__type_unchecked___1zNB7", "variant_normal": "Checkbox-module__variant_normal___MbKJP", "variant_emphasized": "Checkbox-module__variant_emphasized___Yo9yv", "variant_indeterminate": "Checkbox-module__variant_indeterminate___-tnoD" };
|
|
13
|
+
|
|
14
|
+
// src/Checkbox/Checkbox.tsx
|
|
15
|
+
import { jsx } from "react/jsx-runtime";
|
|
16
|
+
function Checkbox(props) {
|
|
17
|
+
const _a = props, {
|
|
18
|
+
className = "",
|
|
19
|
+
children = null,
|
|
20
|
+
onChange = () => {
|
|
21
|
+
},
|
|
22
|
+
checked = false,
|
|
23
|
+
disabled = false,
|
|
24
|
+
size = "small",
|
|
25
|
+
variant = "normal",
|
|
26
|
+
indeterminate = false
|
|
27
|
+
} = _a, rest = __objRest(_a, [
|
|
28
|
+
"className",
|
|
29
|
+
"children",
|
|
30
|
+
"onChange",
|
|
31
|
+
"checked",
|
|
32
|
+
"disabled",
|
|
33
|
+
"size",
|
|
34
|
+
"variant",
|
|
35
|
+
"indeterminate"
|
|
36
|
+
]);
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
|
+
AntCheckbox,
|
|
39
|
+
__spreadProps(__spreadValues({
|
|
40
|
+
checked,
|
|
41
|
+
className: clsx(
|
|
42
|
+
Checkbox_module_default.checkbox,
|
|
43
|
+
Checkbox_module_default[`size_${size}`],
|
|
44
|
+
Checkbox_module_default[`variant_${variant}`],
|
|
45
|
+
checked ? Checkbox_module_default.type_checked : Checkbox_module_default.type_unchecked,
|
|
46
|
+
disabled && Checkbox_module_default.disabled,
|
|
47
|
+
indeterminate && Checkbox_module_default[`variant_indeterminate`],
|
|
48
|
+
className
|
|
49
|
+
),
|
|
50
|
+
disabled,
|
|
51
|
+
indeterminate,
|
|
52
|
+
onChange
|
|
53
|
+
}, rest), {
|
|
54
|
+
children
|
|
55
|
+
})
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
Checkbox.displayName = "Checkbox";
|
|
59
|
+
var Checkbox_default = Checkbox;
|
|
60
|
+
|
|
61
|
+
export {
|
|
62
|
+
Checkbox,
|
|
63
|
+
Checkbox_default
|
|
64
|
+
};
|
package/dist/index.d.mts
ADDED
package/dist/index.d.ts
ADDED