@ktnpm_devops/react-component 0.0.1
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/LICENSE +21 -0
- package/README.md +143 -0
- package/dist/hooks/useClickOutside.d.ts +5 -0
- package/dist/hooks/useClickOutside.d.ts.map +1 -0
- package/dist/hooks/useEscapeKey.d.ts +3 -0
- package/dist/hooks/useEscapeKey.d.ts.map +1 -0
- package/dist/hooks/useEscapeKey.test.d.ts +2 -0
- package/dist/hooks/useEscapeKey.test.d.ts.map +1 -0
- package/dist/hooks/useResizeObserver.d.ts +10 -0
- package/dist/hooks/useResizeObserver.d.ts.map +1 -0
- package/dist/index.cjs +48 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +48 -0
- package/dist/index.js.map +1 -0
- package/dist/index10.cjs +20 -0
- package/dist/index10.cjs.map +1 -0
- package/dist/index10.js +20 -0
- package/dist/index10.js.map +1 -0
- package/dist/index11.cjs +14 -0
- package/dist/index11.cjs.map +1 -0
- package/dist/index11.js +14 -0
- package/dist/index11.js.map +1 -0
- package/dist/index12.cjs +12 -0
- package/dist/index12.cjs.map +1 -0
- package/dist/index12.js +12 -0
- package/dist/index12.js.map +1 -0
- package/dist/index13.cjs +42 -0
- package/dist/index13.cjs.map +1 -0
- package/dist/index13.js +42 -0
- package/dist/index13.js.map +1 -0
- package/dist/index14.cjs +12 -0
- package/dist/index14.cjs.map +1 -0
- package/dist/index14.js +12 -0
- package/dist/index14.js.map +1 -0
- package/dist/index15.cjs +10 -0
- package/dist/index15.cjs.map +1 -0
- package/dist/index15.js +10 -0
- package/dist/index15.js.map +1 -0
- package/dist/index16.cjs +12 -0
- package/dist/index16.cjs.map +1 -0
- package/dist/index16.js +12 -0
- package/dist/index16.js.map +1 -0
- package/dist/index17.cjs +18 -0
- package/dist/index17.cjs.map +1 -0
- package/dist/index17.js +18 -0
- package/dist/index17.js.map +1 -0
- package/dist/index18.cjs +21 -0
- package/dist/index18.cjs.map +1 -0
- package/dist/index18.js +21 -0
- package/dist/index18.js.map +1 -0
- package/dist/index19.cjs +12 -0
- package/dist/index19.cjs.map +1 -0
- package/dist/index19.js +12 -0
- package/dist/index19.js.map +1 -0
- package/dist/index2.cjs +44 -0
- package/dist/index2.cjs.map +1 -0
- package/dist/index2.js +44 -0
- package/dist/index2.js.map +1 -0
- package/dist/index20.cjs +9 -0
- package/dist/index20.cjs.map +1 -0
- package/dist/index20.js +9 -0
- package/dist/index20.js.map +1 -0
- package/dist/index21.cjs +9 -0
- package/dist/index21.cjs.map +1 -0
- package/dist/index21.js +9 -0
- package/dist/index21.js.map +1 -0
- package/dist/index22.cjs +30 -0
- package/dist/index22.cjs.map +1 -0
- package/dist/index22.js +30 -0
- package/dist/index22.js.map +1 -0
- package/dist/index23.cjs +9 -0
- package/dist/index23.cjs.map +1 -0
- package/dist/index23.js +9 -0
- package/dist/index23.js.map +1 -0
- package/dist/index24.cjs +18 -0
- package/dist/index24.cjs.map +1 -0
- package/dist/index24.js +18 -0
- package/dist/index24.js.map +1 -0
- package/dist/index25.cjs +27 -0
- package/dist/index25.cjs.map +1 -0
- package/dist/index25.js +27 -0
- package/dist/index25.js.map +1 -0
- package/dist/index26.cjs +18 -0
- package/dist/index26.cjs.map +1 -0
- package/dist/index26.js +18 -0
- package/dist/index26.js.map +1 -0
- package/dist/index3.cjs +19 -0
- package/dist/index3.cjs.map +1 -0
- package/dist/index3.js +19 -0
- package/dist/index3.js.map +1 -0
- package/dist/index4.cjs +15 -0
- package/dist/index4.cjs.map +1 -0
- package/dist/index4.js +15 -0
- package/dist/index4.js.map +1 -0
- package/dist/index5.cjs +22 -0
- package/dist/index5.cjs.map +1 -0
- package/dist/index5.js +22 -0
- package/dist/index5.js.map +1 -0
- package/dist/index6.cjs +68 -0
- package/dist/index6.cjs.map +1 -0
- package/dist/index6.js +68 -0
- package/dist/index6.js.map +1 -0
- package/dist/index7.cjs +85 -0
- package/dist/index7.cjs.map +1 -0
- package/dist/index7.js +85 -0
- package/dist/index7.js.map +1 -0
- package/dist/index8.cjs +19 -0
- package/dist/index8.cjs.map +1 -0
- package/dist/index8.js +19 -0
- package/dist/index8.js.map +1 -0
- package/dist/index9.cjs +8 -0
- package/dist/index9.cjs.map +1 -0
- package/dist/index9.js +8 -0
- package/dist/index9.js.map +1 -0
- package/dist/primitives/Avatar/Avatar.d.ts +7 -0
- package/dist/primitives/Avatar/Avatar.d.ts.map +1 -0
- package/dist/primitives/Avatar/index.d.ts +3 -0
- package/dist/primitives/Avatar/index.d.ts.map +1 -0
- package/dist/primitives/Badge/Badge.d.ts +6 -0
- package/dist/primitives/Badge/Badge.d.ts.map +1 -0
- package/dist/primitives/Badge/index.d.ts +3 -0
- package/dist/primitives/Badge/index.d.ts.map +1 -0
- package/dist/primitives/Button/Button.d.ts +8 -0
- package/dist/primitives/Button/Button.d.ts.map +1 -0
- package/dist/primitives/Button/index.d.ts +3 -0
- package/dist/primitives/Button/index.d.ts.map +1 -0
- package/dist/primitives/Card/Card.d.ts +7 -0
- package/dist/primitives/Card/Card.d.ts.map +1 -0
- package/dist/primitives/Card/index.d.ts +3 -0
- package/dist/primitives/Card/index.d.ts.map +1 -0
- package/dist/primitives/Input/Input.d.ts +4 -0
- package/dist/primitives/Input/Input.d.ts.map +1 -0
- package/dist/primitives/Input/index.d.ts +3 -0
- package/dist/primitives/Input/index.d.ts.map +1 -0
- package/dist/primitives/Modal/Modal.d.ts +16 -0
- package/dist/primitives/Modal/Modal.d.ts.map +1 -0
- package/dist/primitives/Modal/index.d.ts +3 -0
- package/dist/primitives/Modal/index.d.ts.map +1 -0
- package/dist/primitives/Select/Select.d.ts +4 -0
- package/dist/primitives/Select/Select.d.ts.map +1 -0
- package/dist/primitives/Select/index.d.ts +3 -0
- package/dist/primitives/Select/index.d.ts.map +1 -0
- package/dist/primitives/Table/Table.d.ts +7 -0
- package/dist/primitives/Table/Table.d.ts.map +1 -0
- package/dist/primitives/Table/index.d.ts +3 -0
- package/dist/primitives/Table/index.d.ts.map +1 -0
- package/dist/primitives/Textarea/Textarea.d.ts +4 -0
- package/dist/primitives/Textarea/Textarea.d.ts.map +1 -0
- package/dist/primitives/Textarea/index.d.ts +3 -0
- package/dist/primitives/Textarea/index.d.ts.map +1 -0
- package/dist/style.css +357 -0
- package/dist/test-setup.d.ts +2 -0
- package/dist/test-setup.d.ts.map +1 -0
- package/dist/tokens/index.css +2 -0
- package/dist/tokens/orbit-tokens.css +80 -0
- package/dist/tokens/semantic-tokens.css +77 -0
- package/dist/tokens/tokens.d.ts +42 -0
- package/dist/tokens/tokens.d.ts.map +1 -0
- package/dist/tokens/tokens.test.d.ts +2 -0
- package/dist/tokens/tokens.test.d.ts.map +1 -0
- package/dist/types/index.d.ts +52 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils/chartExport.d.ts +11 -0
- package/dist/utils/chartExport.d.ts.map +1 -0
- package/dist/utils/chartExport.test.d.ts +2 -0
- package/dist/utils/chartExport.test.d.ts.map +1 -0
- package/dist/utils/format.d.ts +14 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/format.test.d.ts +2 -0
- package/dist/utils/format.test.d.ts.map +1 -0
- package/package.json +114 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kenmei Technologies
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# @kenmeitechnologies/react-component
|
|
2
|
+
|
|
3
|
+
Kenmei's Orbit design system as a tree-shakeable React component library with CSS Modules, full dark mode support, and Storybook documentation.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @kenmeitechnologies/react-component
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Peer Dependencies
|
|
12
|
+
|
|
13
|
+
Required:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pnpm add react react-dom
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Optional (only needed for chart/table components):
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pnpm add echarts echarts-for-react # Chart components
|
|
23
|
+
pnpm add @tanstack/react-table # Advanced table features
|
|
24
|
+
pnpm add lucide-react # Icon components
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Setup
|
|
28
|
+
|
|
29
|
+
Import the design tokens in your app entry point:
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
// main.tsx or App.tsx
|
|
33
|
+
import '@kenmeitechnologies/react-component/tokens';
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Quick Start
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
import { Button, Card, CardHeader, CardContent, Badge } from '@kenmeitechnologies/react-component';
|
|
40
|
+
|
|
41
|
+
function App() {
|
|
42
|
+
return (
|
|
43
|
+
<Card>
|
|
44
|
+
<CardHeader>
|
|
45
|
+
<h2>Dashboard</h2>
|
|
46
|
+
<Badge variant="success">Active</Badge>
|
|
47
|
+
</CardHeader>
|
|
48
|
+
<CardContent>
|
|
49
|
+
<Button variant="primary" onClick={() => alert('Hello!')}>
|
|
50
|
+
Click Me
|
|
51
|
+
</Button>
|
|
52
|
+
</CardContent>
|
|
53
|
+
</Card>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Dark Mode
|
|
59
|
+
|
|
60
|
+
Set `data-theme="dark"` on your root element:
|
|
61
|
+
|
|
62
|
+
```tsx
|
|
63
|
+
document.documentElement.setAttribute('data-theme', 'dark');
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
All components automatically adapt — no additional configuration needed.
|
|
67
|
+
|
|
68
|
+
## Components
|
|
69
|
+
|
|
70
|
+
### Primitives
|
|
71
|
+
|
|
72
|
+
| Component | Description |
|
|
73
|
+
|-----------|-------------|
|
|
74
|
+
| `Button` | Variants: primary, secondary, outline, ghost, danger. Sizes: sm, md, lg |
|
|
75
|
+
| `Badge` | Status indicator: success, warning, danger, info |
|
|
76
|
+
| `Input` | Text input with focus ring |
|
|
77
|
+
| `Textarea` | Multi-line text input |
|
|
78
|
+
| `Select` | Native select dropdown |
|
|
79
|
+
| `Card` | Compound: Card + CardHeader + CardContent + CardFooter |
|
|
80
|
+
| `Table` | TableContainer + Table with styled headers/rows |
|
|
81
|
+
| `Modal` | Dialog overlay with portal, ESC-to-close, focus management |
|
|
82
|
+
| `Avatar` | Initials-based avatar with gradient background |
|
|
83
|
+
|
|
84
|
+
### Hooks
|
|
85
|
+
|
|
86
|
+
| Hook | Description |
|
|
87
|
+
|------|-------------|
|
|
88
|
+
| `useClickOutside` | Detect clicks outside a referenced element |
|
|
89
|
+
| `useEscapeKey` | Listen for Escape key press |
|
|
90
|
+
| `useResizeObserver` | Track element dimensions |
|
|
91
|
+
|
|
92
|
+
### Utilities
|
|
93
|
+
|
|
94
|
+
| Utility | Description |
|
|
95
|
+
|---------|-------------|
|
|
96
|
+
| `formatNumber` | Locale-aware number formatting |
|
|
97
|
+
| `formatBytes` | Human-readable byte sizes |
|
|
98
|
+
| `formatDataTimestamp` | Timezone-aware date formatting |
|
|
99
|
+
| `exportTableToCsv` | Export table data as CSV |
|
|
100
|
+
| `sanitizeFilename` | Safe filename generation |
|
|
101
|
+
|
|
102
|
+
## Development
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
pnpm install # Install dependencies
|
|
106
|
+
pnpm dev # Start Storybook (port 6006)
|
|
107
|
+
pnpm test # Run tests
|
|
108
|
+
pnpm build # Build library
|
|
109
|
+
pnpm lint # Lint code
|
|
110
|
+
pnpm typecheck # Type check
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## OpenSpec + Changelog Workflow
|
|
114
|
+
|
|
115
|
+
This project uses [OpenSpec](https://github.com/kenmeitechnologies/openspec) for spec-driven development and [Changesets](https://github.com/changesets/changesets) for versioning.
|
|
116
|
+
|
|
117
|
+
**OpenSpec does not update the changelog.** After completing and archiving a change, manually sync both:
|
|
118
|
+
|
|
119
|
+
1. **Create a changeset** for the automated release pipeline:
|
|
120
|
+
```bash
|
|
121
|
+
pnpm changeset
|
|
122
|
+
```
|
|
123
|
+
Or create the file directly in `.changeset/<change-name>.md`:
|
|
124
|
+
```md
|
|
125
|
+
---
|
|
126
|
+
"@kenmeitechnologies/react-component": patch
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
Description of what changed.
|
|
130
|
+
```
|
|
131
|
+
Use `patch` for docs/stories/fixes, `minor` for new components/features, `major` for breaking changes.
|
|
132
|
+
|
|
133
|
+
2. **Update CHANGELOG.md** — add a `### Added` or `### Enhanced` entry under `[Unreleased]` and update the Status Board table if component status changed.
|
|
134
|
+
|
|
135
|
+
3. **On release**, Changesets consumes the `.changeset/` files and versions the package:
|
|
136
|
+
```bash
|
|
137
|
+
pnpm changeset version # Bumps version, updates CHANGELOG
|
|
138
|
+
pnpm build && pnpm publish
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## License
|
|
142
|
+
|
|
143
|
+
MIT
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
|
|
3
|
+
/** Calls `handler` when a click occurs outside the element referenced by `ref`. */
|
|
4
|
+
export declare function useClickOutside<T extends HTMLElement>(ref: RefObject<T | null>, handler: (event: MouseEvent | TouchEvent) => void): void;
|
|
5
|
+
//# sourceMappingURL=useClickOutside.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useClickOutside.d.ts","sourceRoot":"","sources":["../../src/hooks/useClickOutside.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAElD,mFAAmF;AACnF,wBAAgB,eAAe,CAAC,CAAC,SAAS,WAAW,EACnD,GAAG,EAAE,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,EACxB,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,KAAK,IAAI,QAclD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEscapeKey.d.ts","sourceRoot":"","sources":["../../src/hooks/useEscapeKey.ts"],"names":[],"mappings":"AAEA,8EAA8E;AAC9E,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,IAAI,EAAE,OAAO,UAAO,QAS/D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEscapeKey.test.d.ts","sourceRoot":"","sources":["../../src/hooks/useEscapeKey.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
|
|
3
|
+
interface Size {
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
}
|
|
7
|
+
/** Observes the size of the element referenced by `ref` via ResizeObserver. */
|
|
8
|
+
export declare function useResizeObserver<T extends HTMLElement>(ref: RefObject<T | null>): Size;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=useResizeObserver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useResizeObserver.d.ts","sourceRoot":"","sources":["../../src/hooks/useResizeObserver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5D,UAAU,IAAI;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,+EAA+E;AAC/E,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,WAAW,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CAoBvF"}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const tokens = require("./index2.cjs");
|
|
4
|
+
const useClickOutside = require("./index3.cjs");
|
|
5
|
+
const useEscapeKey = require("./index4.cjs");
|
|
6
|
+
const useResizeObserver = require("./index5.cjs");
|
|
7
|
+
const format = require("./index6.cjs");
|
|
8
|
+
const chartExport = require("./index7.cjs");
|
|
9
|
+
const Avatar = require("./index8.cjs");
|
|
10
|
+
const Badge = require("./index9.cjs");
|
|
11
|
+
const Button = require("./index10.cjs");
|
|
12
|
+
const Card = require("./index11.cjs");
|
|
13
|
+
const Input = require("./index12.cjs");
|
|
14
|
+
const Modal = require("./index13.cjs");
|
|
15
|
+
const Select = require("./index14.cjs");
|
|
16
|
+
const Table = require("./index15.cjs");
|
|
17
|
+
const Textarea = require("./index16.cjs");
|
|
18
|
+
exports.orbitTokens = tokens.orbitTokens;
|
|
19
|
+
exports.useClickOutside = useClickOutside.useClickOutside;
|
|
20
|
+
exports.useEscapeKey = useEscapeKey.useEscapeKey;
|
|
21
|
+
exports.useResizeObserver = useResizeObserver.useResizeObserver;
|
|
22
|
+
exports.formatBytes = format.formatBytes;
|
|
23
|
+
exports.formatDataTimestamp = format.formatDataTimestamp;
|
|
24
|
+
exports.formatLocalISOString = format.formatLocalISOString;
|
|
25
|
+
exports.formatNumber = format.formatNumber;
|
|
26
|
+
exports.generateUUID = format.generateUUID;
|
|
27
|
+
exports.truncateWithEllipsis = format.truncateWithEllipsis;
|
|
28
|
+
exports.composeFilename = chartExport.composeFilename;
|
|
29
|
+
exports.downloadImageDataUrl = chartExport.downloadImageDataUrl;
|
|
30
|
+
exports.exportTableToCsv = chartExport.exportTableToCsv;
|
|
31
|
+
exports.getChartPngDataUrl = chartExport.getChartPngDataUrl;
|
|
32
|
+
exports.openPrintWindowWithChart = chartExport.openPrintWindowWithChart;
|
|
33
|
+
exports.sanitizeFilename = chartExport.sanitizeFilename;
|
|
34
|
+
exports.toStringTable = chartExport.toStringTable;
|
|
35
|
+
exports.Avatar = Avatar.Avatar;
|
|
36
|
+
exports.Badge = Badge.Badge;
|
|
37
|
+
exports.Button = Button.Button;
|
|
38
|
+
exports.Card = Card.Card;
|
|
39
|
+
exports.CardContent = Card.CardContent;
|
|
40
|
+
exports.CardFooter = Card.CardFooter;
|
|
41
|
+
exports.CardHeader = Card.CardHeader;
|
|
42
|
+
exports.Input = Input.Input;
|
|
43
|
+
exports.Modal = Modal.Modal;
|
|
44
|
+
exports.Select = Select.Select;
|
|
45
|
+
exports.Table = Table.Table;
|
|
46
|
+
exports.TableContainer = Table.TableContainer;
|
|
47
|
+
exports.Textarea = Textarea.Textarea;
|
|
48
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export { orbitTokens } from './tokens/tokens';
|
|
2
|
+
export { Button } from './primitives/Button';
|
|
3
|
+
export type { ButtonProps, ButtonVariant, ButtonSize } from './primitives/Button';
|
|
4
|
+
export { Badge } from './primitives/Badge';
|
|
5
|
+
export type { BadgeProps, BadgeVariant } from './primitives/Badge';
|
|
6
|
+
export { Input } from './primitives/Input';
|
|
7
|
+
export type { InputProps } from './primitives/Input';
|
|
8
|
+
export { Textarea } from './primitives/Textarea';
|
|
9
|
+
export type { TextareaProps } from './primitives/Textarea';
|
|
10
|
+
export { Select } from './primitives/Select';
|
|
11
|
+
export type { SelectProps } from './primitives/Select';
|
|
12
|
+
export { Card, CardHeader, CardContent, CardFooter } from './primitives/Card';
|
|
13
|
+
export type { CardProps } from './primitives/Card';
|
|
14
|
+
export { TableContainer, Table } from './primitives/Table';
|
|
15
|
+
export type { TableContainerProps, TableProps } from './primitives/Table';
|
|
16
|
+
export { Modal } from './primitives/Modal';
|
|
17
|
+
export type { ModalProps } from './primitives/Modal';
|
|
18
|
+
export { Avatar } from './primitives/Avatar';
|
|
19
|
+
export type { AvatarProps, AvatarSize } from './primitives/Avatar';
|
|
20
|
+
export { useClickOutside } from './hooks/useClickOutside';
|
|
21
|
+
export { useEscapeKey } from './hooks/useEscapeKey';
|
|
22
|
+
export { useResizeObserver } from './hooks/useResizeObserver';
|
|
23
|
+
export { truncateWithEllipsis, formatNumber, formatBytes, formatDataTimestamp, formatLocalISOString, generateUUID, } from './utils/format';
|
|
24
|
+
export { exportTableToCsv, getChartPngDataUrl, downloadImageDataUrl, openPrintWindowWithChart, composeFilename, sanitizeFilename, toStringTable, } from './utils/chartExport';
|
|
25
|
+
export type { TableData } from './utils/chartExport';
|
|
26
|
+
export type { SelectOption, DateRange, ChartDataPoint, SankeyFlowRow, LiveExplorerRow, CounterTimeseriesPoint, ChartAnnotation, StackedBarCategory, TemporalTrendPoint, } from './types';
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAElF,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEnE,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC9E,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3D,YAAY,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE1E,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGnE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,WAAW,EACX,mBAAmB,EACnB,oBAAoB,EACpB,YAAY,GACb,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,EACxB,eAAe,EACf,gBAAgB,EAChB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAGrD,YAAY,EACV,YAAY,EACZ,SAAS,EACT,cAAc,EACd,aAAa,EACb,eAAe,EACf,sBAAsB,EACtB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,SAAS,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { orbitTokens } from "./index2.js";
|
|
2
|
+
import { useClickOutside } from "./index3.js";
|
|
3
|
+
import { useEscapeKey } from "./index4.js";
|
|
4
|
+
import { useResizeObserver } from "./index5.js";
|
|
5
|
+
import { formatBytes, formatDataTimestamp, formatLocalISOString, formatNumber, generateUUID, truncateWithEllipsis } from "./index6.js";
|
|
6
|
+
import { composeFilename, downloadImageDataUrl, exportTableToCsv, getChartPngDataUrl, openPrintWindowWithChart, sanitizeFilename, toStringTable } from "./index7.js";
|
|
7
|
+
import { Avatar } from "./index8.js";
|
|
8
|
+
import { Badge } from "./index9.js";
|
|
9
|
+
import { Button } from "./index10.js";
|
|
10
|
+
import { Card, CardContent, CardFooter, CardHeader } from "./index11.js";
|
|
11
|
+
import { Input } from "./index12.js";
|
|
12
|
+
import { Modal } from "./index13.js";
|
|
13
|
+
import { Select } from "./index14.js";
|
|
14
|
+
import { Table, TableContainer } from "./index15.js";
|
|
15
|
+
import { Textarea } from "./index16.js";
|
|
16
|
+
export {
|
|
17
|
+
Avatar,
|
|
18
|
+
Badge,
|
|
19
|
+
Button,
|
|
20
|
+
Card,
|
|
21
|
+
CardContent,
|
|
22
|
+
CardFooter,
|
|
23
|
+
CardHeader,
|
|
24
|
+
Input,
|
|
25
|
+
Modal,
|
|
26
|
+
Select,
|
|
27
|
+
Table,
|
|
28
|
+
TableContainer,
|
|
29
|
+
Textarea,
|
|
30
|
+
composeFilename,
|
|
31
|
+
downloadImageDataUrl,
|
|
32
|
+
exportTableToCsv,
|
|
33
|
+
formatBytes,
|
|
34
|
+
formatDataTimestamp,
|
|
35
|
+
formatLocalISOString,
|
|
36
|
+
formatNumber,
|
|
37
|
+
generateUUID,
|
|
38
|
+
getChartPngDataUrl,
|
|
39
|
+
openPrintWindowWithChart,
|
|
40
|
+
orbitTokens,
|
|
41
|
+
sanitizeFilename,
|
|
42
|
+
toStringTable,
|
|
43
|
+
truncateWithEllipsis,
|
|
44
|
+
useClickOutside,
|
|
45
|
+
useEscapeKey,
|
|
46
|
+
useResizeObserver
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|
package/dist/index10.cjs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const react = require("react");
|
|
5
|
+
const clsx = require("./index17.cjs");
|
|
6
|
+
const Button_module = require("./index22.cjs");
|
|
7
|
+
const Button = react.forwardRef(
|
|
8
|
+
({ className, variant = "primary", size = "md", type = "button", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
9
|
+
"button",
|
|
10
|
+
{
|
|
11
|
+
ref,
|
|
12
|
+
type,
|
|
13
|
+
className: clsx.clsx(Button_module.default.root, Button_module.default[variant], size !== "md" && Button_module.default[size], className),
|
|
14
|
+
...props
|
|
15
|
+
}
|
|
16
|
+
)
|
|
17
|
+
);
|
|
18
|
+
Button.displayName = "Button";
|
|
19
|
+
exports.Button = Button;
|
|
20
|
+
//# sourceMappingURL=index10.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index10.cjs","sources":["../src/primitives/Button/Button.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport clsx from 'clsx';\nimport styles from './Button.module.css';\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger';\nexport type ButtonSize = 'sm' | 'md' | 'lg';\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: ButtonVariant;\n size?: ButtonSize;\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant = 'primary', size = 'md', type = 'button', ...props }, ref) => (\n <button\n ref={ref}\n type={type}\n className={clsx(styles.root, styles[variant], size !== 'md' && styles[size], className)}\n {...props}\n />\n ),\n);\n\nButton.displayName = 'Button';\n"],"names":["forwardRef","jsx","clsx","styles"],"mappings":";;;;;;AAYO,MAAM,SAASA,MAAAA;AAAAA,EACpB,CAAC,EAAE,WAAW,UAAU,WAAW,OAAO,MAAM,OAAO,UAAU,GAAG,MAAA,GAAS,QAC3EC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,WAAWC,KAAAA,KAAKC,sBAAO,MAAMA,cAAAA,QAAO,OAAO,GAAG,SAAS,QAAQA,cAAAA,QAAO,IAAI,GAAG,SAAS;AAAA,MACrF,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,OAAO,cAAc;;"}
|
package/dist/index10.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { clsx } from "./index17.js";
|
|
4
|
+
import styles from "./index22.js";
|
|
5
|
+
const Button = forwardRef(
|
|
6
|
+
({ className, variant = "primary", size = "md", type = "button", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7
|
+
"button",
|
|
8
|
+
{
|
|
9
|
+
ref,
|
|
10
|
+
type,
|
|
11
|
+
className: clsx(styles.root, styles[variant], size !== "md" && styles[size], className),
|
|
12
|
+
...props
|
|
13
|
+
}
|
|
14
|
+
)
|
|
15
|
+
);
|
|
16
|
+
Button.displayName = "Button";
|
|
17
|
+
export {
|
|
18
|
+
Button
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=index10.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index10.js","sources":["../src/primitives/Button/Button.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport clsx from 'clsx';\nimport styles from './Button.module.css';\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger';\nexport type ButtonSize = 'sm' | 'md' | 'lg';\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: ButtonVariant;\n size?: ButtonSize;\n}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant = 'primary', size = 'md', type = 'button', ...props }, ref) => (\n <button\n ref={ref}\n type={type}\n className={clsx(styles.root, styles[variant], size !== 'md' && styles[size], className)}\n {...props}\n />\n ),\n);\n\nButton.displayName = 'Button';\n"],"names":[],"mappings":";;;;AAYO,MAAM,SAAS;AAAA,EACpB,CAAC,EAAE,WAAW,UAAU,WAAW,OAAO,MAAM,OAAO,UAAU,GAAG,MAAA,GAAS,QAC3E;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,WAAW,KAAK,OAAO,MAAM,OAAO,OAAO,GAAG,SAAS,QAAQ,OAAO,IAAI,GAAG,SAAS;AAAA,MACrF,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,OAAO,cAAc;"}
|
package/dist/index11.cjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const clsx = require("./index17.cjs");
|
|
5
|
+
const Card_module = require("./index24.cjs");
|
|
6
|
+
const Card = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx.clsx(Card_module.default.root, className), ...props });
|
|
7
|
+
const CardHeader = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx.clsx(Card_module.default.header, className), ...props });
|
|
8
|
+
const CardContent = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx.clsx(Card_module.default.content, className), ...props });
|
|
9
|
+
const CardFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx.clsx(Card_module.default.footer, className), ...props });
|
|
10
|
+
exports.Card = Card;
|
|
11
|
+
exports.CardContent = CardContent;
|
|
12
|
+
exports.CardFooter = CardFooter;
|
|
13
|
+
exports.CardHeader = CardHeader;
|
|
14
|
+
//# sourceMappingURL=index11.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index11.cjs","sources":["../src/primitives/Card/Card.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport styles from './Card.module.css';\n\nexport interface CardProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nexport const Card = ({ className, ...props }: CardProps) => (\n <div className={clsx(styles.root, className)} {...props} />\n);\n\nexport const CardHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={clsx(styles.header, className)} {...props} />\n);\n\nexport const CardContent = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={clsx(styles.content, className)} {...props} />\n);\n\nexport const CardFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={clsx(styles.footer, className)} {...props} />\n);\n"],"names":["jsx","clsx","styles"],"mappings":";;;;;AAKO,MAAM,OAAO,CAAC,EAAE,WAAW,GAAG,YACnCA,2BAAAA,IAAC,OAAA,EAAI,WAAWC,KAAAA,KAAKC,YAAAA,QAAO,MAAM,SAAS,GAAI,GAAG,MAAA,CAAO;AAGpD,MAAM,aAAa,CAAC,EAAE,WAAW,GAAG,YACzCF,2BAAAA,IAAC,OAAA,EAAI,WAAWC,KAAAA,KAAKC,YAAAA,QAAO,QAAQ,SAAS,GAAI,GAAG,MAAA,CAAO;AAGtD,MAAM,cAAc,CAAC,EAAE,WAAW,GAAG,YAC1CF,2BAAAA,IAAC,OAAA,EAAI,WAAWC,KAAAA,KAAKC,YAAAA,QAAO,SAAS,SAAS,GAAI,GAAG,MAAA,CAAO;AAGvD,MAAM,aAAa,CAAC,EAAE,WAAW,GAAG,YACzCF,2BAAAA,IAAC,OAAA,EAAI,WAAWC,KAAAA,KAAKC,YAAAA,QAAO,QAAQ,SAAS,GAAI,GAAG,MAAA,CAAO;;;;;"}
|
package/dist/index11.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { clsx } from "./index17.js";
|
|
3
|
+
import styles from "./index24.js";
|
|
4
|
+
const Card = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: clsx(styles.root, className), ...props });
|
|
5
|
+
const CardHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: clsx(styles.header, className), ...props });
|
|
6
|
+
const CardContent = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: clsx(styles.content, className), ...props });
|
|
7
|
+
const CardFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: clsx(styles.footer, className), ...props });
|
|
8
|
+
export {
|
|
9
|
+
Card,
|
|
10
|
+
CardContent,
|
|
11
|
+
CardFooter,
|
|
12
|
+
CardHeader
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=index11.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index11.js","sources":["../src/primitives/Card/Card.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport styles from './Card.module.css';\n\nexport interface CardProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nexport const Card = ({ className, ...props }: CardProps) => (\n <div className={clsx(styles.root, className)} {...props} />\n);\n\nexport const CardHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={clsx(styles.header, className)} {...props} />\n);\n\nexport const CardContent = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={clsx(styles.content, className)} {...props} />\n);\n\nexport const CardFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={clsx(styles.footer, className)} {...props} />\n);\n"],"names":[],"mappings":";;;AAKO,MAAM,OAAO,CAAC,EAAE,WAAW,GAAG,YACnC,oBAAC,OAAA,EAAI,WAAW,KAAK,OAAO,MAAM,SAAS,GAAI,GAAG,MAAA,CAAO;AAGpD,MAAM,aAAa,CAAC,EAAE,WAAW,GAAG,YACzC,oBAAC,OAAA,EAAI,WAAW,KAAK,OAAO,QAAQ,SAAS,GAAI,GAAG,MAAA,CAAO;AAGtD,MAAM,cAAc,CAAC,EAAE,WAAW,GAAG,YAC1C,oBAAC,OAAA,EAAI,WAAW,KAAK,OAAO,SAAS,SAAS,GAAI,GAAG,MAAA,CAAO;AAGvD,MAAM,aAAa,CAAC,EAAE,WAAW,GAAG,YACzC,oBAAC,OAAA,EAAI,WAAW,KAAK,OAAO,QAAQ,SAAS,GAAI,GAAG,MAAA,CAAO;"}
|
package/dist/index12.cjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const react = require("react");
|
|
5
|
+
const clsx = require("./index17.cjs");
|
|
6
|
+
const Input_module = require("./index21.cjs");
|
|
7
|
+
const Input = react.forwardRef(
|
|
8
|
+
({ className, type = "text", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("input", { ref, type, className: clsx.clsx(Input_module.default.root, className), ...props })
|
|
9
|
+
);
|
|
10
|
+
Input.displayName = "Input";
|
|
11
|
+
exports.Input = Input;
|
|
12
|
+
//# sourceMappingURL=index12.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index12.cjs","sources":["../src/primitives/Input/Input.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport clsx from 'clsx';\nimport styles from './Input.module.css';\n\nexport interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(\n ({ className, type = 'text', ...props }, ref) => (\n <input ref={ref} type={type} className={clsx(styles.root, className)} {...props} />\n ),\n);\n\nInput.displayName = 'Input';\n"],"names":["forwardRef","jsx","clsx","styles"],"mappings":";;;;;;AAMO,MAAM,QAAQA,MAAAA;AAAAA,EACnB,CAAC,EAAE,WAAW,OAAO,QAAQ,GAAG,SAAS,QACvCC,2BAAAA,IAAC,WAAM,KAAU,MAAY,WAAWC,UAAKC,aAAAA,QAAO,MAAM,SAAS,GAAI,GAAG,MAAA,CAAO;AAErF;AAEA,MAAM,cAAc;;"}
|
package/dist/index12.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { clsx } from "./index17.js";
|
|
4
|
+
import styles from "./index21.js";
|
|
5
|
+
const Input = forwardRef(
|
|
6
|
+
({ className, type = "text", ...props }, ref) => /* @__PURE__ */ jsx("input", { ref, type, className: clsx(styles.root, className), ...props })
|
|
7
|
+
);
|
|
8
|
+
Input.displayName = "Input";
|
|
9
|
+
export {
|
|
10
|
+
Input
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=index12.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index12.js","sources":["../src/primitives/Input/Input.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport clsx from 'clsx';\nimport styles from './Input.module.css';\n\nexport interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(\n ({ className, type = 'text', ...props }, ref) => (\n <input ref={ref} type={type} className={clsx(styles.root, className)} {...props} />\n ),\n);\n\nInput.displayName = 'Input';\n"],"names":[],"mappings":";;;;AAMO,MAAM,QAAQ;AAAA,EACnB,CAAC,EAAE,WAAW,OAAO,QAAQ,GAAG,SAAS,QACvC,oBAAC,WAAM,KAAU,MAAY,WAAW,KAAK,OAAO,MAAM,SAAS,GAAI,GAAG,MAAA,CAAO;AAErF;AAEA,MAAM,cAAc;"}
|
package/dist/index13.cjs
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const reactDom = require("react-dom");
|
|
5
|
+
const clsx = require("./index17.cjs");
|
|
6
|
+
const useEscapeKey = require("./index4.cjs");
|
|
7
|
+
const Modal_module = require("./index25.cjs");
|
|
8
|
+
const Modal = ({
|
|
9
|
+
open,
|
|
10
|
+
title,
|
|
11
|
+
onClose,
|
|
12
|
+
children,
|
|
13
|
+
footer,
|
|
14
|
+
portalTarget,
|
|
15
|
+
className,
|
|
16
|
+
bodyClassName,
|
|
17
|
+
style,
|
|
18
|
+
closeLabel = "×"
|
|
19
|
+
}) => {
|
|
20
|
+
useEscapeKey.useEscapeKey(onClose, open);
|
|
21
|
+
if (!open) return null;
|
|
22
|
+
const modalContent = /* @__PURE__ */ jsxRuntime.jsx("div", { className: Modal_module.default.overlay, role: "dialog", "aria-modal": "true", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx.clsx(Modal_module.default.root, className), style, children: [
|
|
23
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: Modal_module.default.header, children: [
|
|
24
|
+
title ? /* @__PURE__ */ jsxRuntime.jsx("h2", { className: Modal_module.default.title, children: title }) : /* @__PURE__ */ jsxRuntime.jsx("span", {}),
|
|
25
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
26
|
+
"button",
|
|
27
|
+
{
|
|
28
|
+
type: "button",
|
|
29
|
+
onClick: onClose,
|
|
30
|
+
className: Modal_module.default.closeBtn,
|
|
31
|
+
"aria-label": "Close modal",
|
|
32
|
+
children: closeLabel
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
] }),
|
|
36
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx.clsx(Modal_module.default.body, bodyClassName), children }),
|
|
37
|
+
footer && /* @__PURE__ */ jsxRuntime.jsx("div", { className: Modal_module.default.footer, children: footer })
|
|
38
|
+
] }) });
|
|
39
|
+
return reactDom.createPortal(modalContent, portalTarget ?? document.body);
|
|
40
|
+
};
|
|
41
|
+
exports.Modal = Modal;
|
|
42
|
+
//# sourceMappingURL=index13.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index13.cjs","sources":["../src/primitives/Modal/Modal.tsx"],"sourcesContent":["import { type CSSProperties, type ReactNode } from 'react';\nimport { createPortal } from 'react-dom';\nimport clsx from 'clsx';\nimport { useEscapeKey } from '../../hooks/useEscapeKey';\nimport styles from './Modal.module.css';\n\nexport interface ModalProps {\n open: boolean;\n title?: ReactNode;\n onClose: () => void;\n children: ReactNode;\n footer?: ReactNode;\n portalTarget?: HTMLElement;\n className?: string;\n bodyClassName?: string;\n style?: CSSProperties;\n closeLabel?: ReactNode;\n}\n\nexport const Modal = ({\n open,\n title,\n onClose,\n children,\n footer,\n portalTarget,\n className,\n bodyClassName,\n style,\n closeLabel = '\\u00D7',\n}: ModalProps) => {\n useEscapeKey(onClose, open);\n\n if (!open) return null;\n\n const modalContent = (\n <div className={styles.overlay} role=\"dialog\" aria-modal=\"true\">\n <div className={clsx(styles.root, className)} style={style}>\n <div className={styles.header}>\n {title ? <h2 className={styles.title}>{title}</h2> : <span />}\n <button\n type=\"button\"\n onClick={onClose}\n className={styles.closeBtn}\n aria-label=\"Close modal\"\n >\n {closeLabel}\n </button>\n </div>\n <div className={clsx(styles.body, bodyClassName)}>{children}</div>\n {footer && <div className={styles.footer}>{footer}</div>}\n </div>\n </div>\n );\n\n return createPortal(modalContent, portalTarget ?? document.body);\n};\n"],"names":["useEscapeKey","jsx","styles","jsxs","clsx","createPortal"],"mappings":";;;;;;;AAmBO,MAAM,QAAQ,CAAC;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AACf,MAAkB;AAChBA,eAAAA,aAAa,SAAS,IAAI;AAE1B,MAAI,CAAC,KAAM,QAAO;AAElB,QAAM,eACJC,+BAAC,OAAA,EAAI,WAAWC,aAAAA,QAAO,SAAS,MAAK,UAAS,cAAW,QACvD,UAAAC,gCAAC,SAAI,WAAWC,KAAAA,KAAKF,qBAAO,MAAM,SAAS,GAAG,OAC5C,UAAA;AAAA,IAAAC,2BAAAA,KAAC,OAAA,EAAI,WAAWD,aAAAA,QAAO,QACpB,UAAA;AAAA,MAAA,QAAQD,2BAAAA,IAAC,QAAG,WAAWC,aAAAA,QAAO,OAAQ,UAAA,MAAA,CAAM,mCAAS,QAAA,CAAA,CAAK;AAAA,MAC3DD,2BAAAA;AAAAA,QAAC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,SAAS;AAAA,UACT,WAAWC,aAAAA,QAAO;AAAA,UAClB,cAAW;AAAA,UAEV,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACH,GACF;AAAA,IACAD,+BAAC,SAAI,WAAWG,KAAAA,KAAKF,aAAAA,QAAO,MAAM,aAAa,GAAI,UAAS;AAAA,IAC3D,UAAUD,2BAAAA,IAAC,OAAA,EAAI,WAAWC,aAAAA,QAAO,QAAS,UAAA,OAAA,CAAO;AAAA,EAAA,EAAA,CACpD,EAAA,CACF;AAGF,SAAOG,SAAAA,aAAa,cAAc,gBAAgB,SAAS,IAAI;AACjE;;"}
|
package/dist/index13.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { createPortal } from "react-dom";
|
|
3
|
+
import { clsx } from "./index17.js";
|
|
4
|
+
import { useEscapeKey } from "./index4.js";
|
|
5
|
+
import styles from "./index25.js";
|
|
6
|
+
const Modal = ({
|
|
7
|
+
open,
|
|
8
|
+
title,
|
|
9
|
+
onClose,
|
|
10
|
+
children,
|
|
11
|
+
footer,
|
|
12
|
+
portalTarget,
|
|
13
|
+
className,
|
|
14
|
+
bodyClassName,
|
|
15
|
+
style,
|
|
16
|
+
closeLabel = "×"
|
|
17
|
+
}) => {
|
|
18
|
+
useEscapeKey(onClose, open);
|
|
19
|
+
if (!open) return null;
|
|
20
|
+
const modalContent = /* @__PURE__ */ jsx("div", { className: styles.overlay, role: "dialog", "aria-modal": "true", children: /* @__PURE__ */ jsxs("div", { className: clsx(styles.root, className), style, children: [
|
|
21
|
+
/* @__PURE__ */ jsxs("div", { className: styles.header, children: [
|
|
22
|
+
title ? /* @__PURE__ */ jsx("h2", { className: styles.title, children: title }) : /* @__PURE__ */ jsx("span", {}),
|
|
23
|
+
/* @__PURE__ */ jsx(
|
|
24
|
+
"button",
|
|
25
|
+
{
|
|
26
|
+
type: "button",
|
|
27
|
+
onClick: onClose,
|
|
28
|
+
className: styles.closeBtn,
|
|
29
|
+
"aria-label": "Close modal",
|
|
30
|
+
children: closeLabel
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
] }),
|
|
34
|
+
/* @__PURE__ */ jsx("div", { className: clsx(styles.body, bodyClassName), children }),
|
|
35
|
+
footer && /* @__PURE__ */ jsx("div", { className: styles.footer, children: footer })
|
|
36
|
+
] }) });
|
|
37
|
+
return createPortal(modalContent, portalTarget ?? document.body);
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
Modal
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=index13.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index13.js","sources":["../src/primitives/Modal/Modal.tsx"],"sourcesContent":["import { type CSSProperties, type ReactNode } from 'react';\nimport { createPortal } from 'react-dom';\nimport clsx from 'clsx';\nimport { useEscapeKey } from '../../hooks/useEscapeKey';\nimport styles from './Modal.module.css';\n\nexport interface ModalProps {\n open: boolean;\n title?: ReactNode;\n onClose: () => void;\n children: ReactNode;\n footer?: ReactNode;\n portalTarget?: HTMLElement;\n className?: string;\n bodyClassName?: string;\n style?: CSSProperties;\n closeLabel?: ReactNode;\n}\n\nexport const Modal = ({\n open,\n title,\n onClose,\n children,\n footer,\n portalTarget,\n className,\n bodyClassName,\n style,\n closeLabel = '\\u00D7',\n}: ModalProps) => {\n useEscapeKey(onClose, open);\n\n if (!open) return null;\n\n const modalContent = (\n <div className={styles.overlay} role=\"dialog\" aria-modal=\"true\">\n <div className={clsx(styles.root, className)} style={style}>\n <div className={styles.header}>\n {title ? <h2 className={styles.title}>{title}</h2> : <span />}\n <button\n type=\"button\"\n onClick={onClose}\n className={styles.closeBtn}\n aria-label=\"Close modal\"\n >\n {closeLabel}\n </button>\n </div>\n <div className={clsx(styles.body, bodyClassName)}>{children}</div>\n {footer && <div className={styles.footer}>{footer}</div>}\n </div>\n </div>\n );\n\n return createPortal(modalContent, portalTarget ?? document.body);\n};\n"],"names":[],"mappings":";;;;;AAmBO,MAAM,QAAQ,CAAC;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AACf,MAAkB;AAChB,eAAa,SAAS,IAAI;AAE1B,MAAI,CAAC,KAAM,QAAO;AAElB,QAAM,eACJ,oBAAC,OAAA,EAAI,WAAW,OAAO,SAAS,MAAK,UAAS,cAAW,QACvD,UAAA,qBAAC,SAAI,WAAW,KAAK,OAAO,MAAM,SAAS,GAAG,OAC5C,UAAA;AAAA,IAAA,qBAAC,OAAA,EAAI,WAAW,OAAO,QACpB,UAAA;AAAA,MAAA,QAAQ,oBAAC,QAAG,WAAW,OAAO,OAAQ,UAAA,MAAA,CAAM,wBAAS,QAAA,CAAA,CAAK;AAAA,MAC3D;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,SAAS;AAAA,UACT,WAAW,OAAO;AAAA,UAClB,cAAW;AAAA,UAEV,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACH,GACF;AAAA,IACA,oBAAC,SAAI,WAAW,KAAK,OAAO,MAAM,aAAa,GAAI,UAAS;AAAA,IAC3D,UAAU,oBAAC,OAAA,EAAI,WAAW,OAAO,QAAS,UAAA,OAAA,CAAO;AAAA,EAAA,EAAA,CACpD,EAAA,CACF;AAGF,SAAO,aAAa,cAAc,gBAAgB,SAAS,IAAI;AACjE;"}
|
package/dist/index14.cjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const react = require("react");
|
|
5
|
+
const clsx = require("./index17.cjs");
|
|
6
|
+
const Select_module = require("./index20.cjs");
|
|
7
|
+
const Select = react.forwardRef(
|
|
8
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("select", { ref, className: clsx.clsx(Select_module.default.root, className), ...props, children })
|
|
9
|
+
);
|
|
10
|
+
Select.displayName = "Select";
|
|
11
|
+
exports.Select = Select;
|
|
12
|
+
//# sourceMappingURL=index14.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index14.cjs","sources":["../src/primitives/Select/Select.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport clsx from 'clsx';\nimport styles from './Select.module.css';\n\nexport interface SelectProps extends React.SelectHTMLAttributes<HTMLSelectElement> {}\n\nexport const Select = forwardRef<HTMLSelectElement, SelectProps>(\n ({ className, children, ...props }, ref) => (\n <select ref={ref} className={clsx(styles.root, className)} {...props}>\n {children}\n </select>\n ),\n);\n\nSelect.displayName = 'Select';\n"],"names":["forwardRef","jsx","clsx","styles"],"mappings":";;;;;;AAMO,MAAM,SAASA,MAAAA;AAAAA,EACpB,CAAC,EAAE,WAAW,UAAU,GAAG,MAAA,GAAS,QAClCC,2BAAAA,IAAC,YAAO,KAAU,WAAWC,KAAAA,KAAKC,sBAAO,MAAM,SAAS,GAAI,GAAG,OAC5D,SAAA,CACH;AAEJ;AAEA,OAAO,cAAc;;"}
|
package/dist/index14.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { clsx } from "./index17.js";
|
|
4
|
+
import styles from "./index20.js";
|
|
5
|
+
const Select = forwardRef(
|
|
6
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx("select", { ref, className: clsx(styles.root, className), ...props, children })
|
|
7
|
+
);
|
|
8
|
+
Select.displayName = "Select";
|
|
9
|
+
export {
|
|
10
|
+
Select
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=index14.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index14.js","sources":["../src/primitives/Select/Select.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport clsx from 'clsx';\nimport styles from './Select.module.css';\n\nexport interface SelectProps extends React.SelectHTMLAttributes<HTMLSelectElement> {}\n\nexport const Select = forwardRef<HTMLSelectElement, SelectProps>(\n ({ className, children, ...props }, ref) => (\n <select ref={ref} className={clsx(styles.root, className)} {...props}>\n {children}\n </select>\n ),\n);\n\nSelect.displayName = 'Select';\n"],"names":[],"mappings":";;;;AAMO,MAAM,SAAS;AAAA,EACpB,CAAC,EAAE,WAAW,UAAU,GAAG,MAAA,GAAS,QAClC,oBAAC,YAAO,KAAU,WAAW,KAAK,OAAO,MAAM,SAAS,GAAI,GAAG,OAC5D,SAAA,CACH;AAEJ;AAEA,OAAO,cAAc;"}
|
package/dist/index15.cjs
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const clsx = require("./index17.cjs");
|
|
5
|
+
const Table_module = require("./index19.cjs");
|
|
6
|
+
const TableContainer = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx.clsx(Table_module.default.container, className), ...props });
|
|
7
|
+
const Table = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx("table", { className: clsx.clsx(Table_module.default.root, className), ...props });
|
|
8
|
+
exports.Table = Table;
|
|
9
|
+
exports.TableContainer = TableContainer;
|
|
10
|
+
//# sourceMappingURL=index15.cjs.map
|