@tanishraj/ui-kit 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +256 -0
- package/package.json +10 -8
- package/readme.md +162 -170
- package/dist/.storybook/StorybookThemeProvider.d.ts +0 -6
- package/dist/.storybook/main.d.ts +0 -3
- package/dist/.storybook/preview.d.ts +0 -3
- package/dist/eslint.config.d.mts +0 -2
- package/dist/setupTests.d.ts +0 -0
- package/dist/src/components/Alert/Alert.d.ts +0 -11
- package/dist/src/components/Alert/Alert.stories.d.ts +0 -10
- package/dist/src/components/Alert/Alert.styles.d.ts +0 -35
- package/dist/src/components/Alert/Alert.test.d.ts +0 -1
- package/dist/src/components/Alert/index.d.ts +0 -2
- package/dist/src/components/Alert/types.d.ts +0 -6
- package/dist/src/components/Avatar/Avatar.d.ts +0 -17
- package/dist/src/components/Avatar/Avatar.stories.d.ts +0 -11
- package/dist/src/components/Avatar/Avatar.styles.d.ts +0 -23
- package/dist/src/components/Avatar/Avatar.test.d.ts +0 -1
- package/dist/src/components/Avatar/index.d.ts +0 -2
- package/dist/src/components/Avatar/types.d.ts +0 -14
- package/dist/src/components/AvatarGroup/AvatarGroup.d.ts +0 -3
- package/dist/src/components/AvatarGroup/AvatarGroup.stories.d.ts +0 -9
- package/dist/src/components/AvatarGroup/AvatarGroup.styles.d.ts +0 -8
- package/dist/src/components/AvatarGroup/AvatarGroup.test.d.ts +0 -1
- package/dist/src/components/AvatarGroup/index.d.ts +0 -2
- package/dist/src/components/AvatarGroup/types.d.ts +0 -17
- package/dist/src/components/Badge/Badge.d.ts +0 -7
- package/dist/src/components/Badge/Badge.stories.d.ts +0 -10
- package/dist/src/components/Badge/Badge.styles.d.ts +0 -14
- package/dist/src/components/Badge/Badge.test.d.ts +0 -1
- package/dist/src/components/Badge/index.d.ts +0 -2
- package/dist/src/components/Badge/types.d.ts +0 -7
- package/dist/src/components/Button/Button.d.ts +0 -10
- package/dist/src/components/Button/Button.stories.d.ts +0 -12
- package/dist/src/components/Button/Button.styles.d.ts +0 -15
- package/dist/src/components/Button/Button.test.d.ts +0 -1
- package/dist/src/components/Button/index.d.ts +0 -2
- package/dist/src/components/Button/types.d.ts +0 -6
- package/dist/src/components/ButtonGroup/ButtonGroup.d.ts +0 -3
- package/dist/src/components/ButtonGroup/ButtonGroup.stories.d.ts +0 -12
- package/dist/src/components/ButtonGroup/ButtonGroup.styles.d.ts +0 -11
- package/dist/src/components/ButtonGroup/ButtonGroup.test.d.ts +0 -1
- package/dist/src/components/ButtonGroup/index.d.ts +0 -2
- package/dist/src/components/ButtonGroup/types.d.ts +0 -15
- package/dist/src/components/OrganizationChart/OrganizationChart.d.ts +0 -2
- package/dist/src/components/OrganizationChart/OrganizationChart.stories.d.ts +0 -7
- package/dist/src/components/OrganizationChart/OrganizationChart.styles.d.ts +0 -5
- package/dist/src/components/OrganizationChart/OrganizationChart.test.d.ts +0 -1
- package/dist/src/components/OrganizationChart/index.d.ts +0 -2
- package/dist/src/components/OrganizationChart/mockData.d.ts +0 -4
- package/dist/src/components/OrganizationChart/types.d.ts +0 -62
- package/dist/src/components/OrganizationChart/utils.d.ts +0 -10
- package/dist/src/components/OrganizationChart/utils.test.d.ts +0 -1
- package/dist/src/components/index.d.ts +0 -7
- package/dist/src/hooks/index.d.ts +0 -2
- package/dist/src/hooks/useTheme.d.ts +0 -5
- package/dist/src/hooks/useToggle.d.ts +0 -1
- package/dist/src/index.d.ts +0 -3
- package/dist/src/providers/index.d.ts +0 -1
- package/dist/src/providers/theme/ThemeProvider.d.ts +0 -11
- package/dist/src/providers/theme/context.d.ts +0 -6
- package/dist/src/providers/theme/index.d.ts +0 -3
- package/dist/src/providers/theme/types.d.ts +0 -4
- package/dist/src/utils/classNames.d.ts +0 -2
- package/dist/src/utils/index.d.ts +0 -2
- package/dist/src/utils/types.d.ts +0 -3
- package/dist/vite.config.d.mts +0 -2
package/readme.md
CHANGED
|
@@ -1,238 +1,230 @@
|
|
|
1
1
|
# @tanishraj/ui-kit
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@tanishraj/ui-kit)
|
|
4
|
+
[](https://www.npmjs.com/package/@tanishraj/ui-kit)
|
|
5
|
+
[](https://github.com/tanishraj/ui-kit/blob/develop/LICENSE)
|
|
6
|
+
[](https://tanishraj.github.io/ui-kit/)
|
|
7
|
+
|
|
8
|
+
A production-ready React + TypeScript UI component library built with Vite, Storybook, Tailwind CSS, CVA, and strict quality gates.
|
|
9
|
+
|
|
10
|
+
## Table of Contents
|
|
11
|
+
|
|
12
|
+
- [About](#about)
|
|
13
|
+
- [Installation](#installation)
|
|
14
|
+
- [Usage](#usage)
|
|
15
|
+
- [Component Library API](#component-library-api)
|
|
16
|
+
- [Theming](#theming)
|
|
17
|
+
- [Accessibility](#accessibility)
|
|
18
|
+
- [Development](#development)
|
|
19
|
+
- [Testing](#testing)
|
|
20
|
+
- [CI / Automation](#ci--automation)
|
|
21
|
+
- [Publishing](#publishing)
|
|
22
|
+
- [Release Process](#release-process)
|
|
23
|
+
- [Repository Structure](#repository-structure)
|
|
24
|
+
- [Contributing](#contributing)
|
|
25
|
+
- [License](#license)
|
|
26
|
+
- [Changelog](#changelog)
|
|
6
27
|
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
- **Vite** - Fast bundling and development
|
|
10
|
-
- **React & TypeScript** - Strict type safety for better development
|
|
11
|
-
- **Tailwind CSS** - Utility-first styling approach
|
|
12
|
-
- **Tailwind Merge & CVA** - Class name manipulation
|
|
13
|
-
- **CLSX** - Conditional class name handling
|
|
14
|
-
- **ESLint & Prettier** - Code linting and formatting
|
|
15
|
-
- **Vitest & React Testing Library** - Unit testing setup
|
|
16
|
-
- **Storybook** - Interactive documentation for components
|
|
28
|
+
## About
|
|
17
29
|
|
|
18
|
-
|
|
30
|
+
This package is designed to be consumed as a reusable component library for modern React apps. It includes:
|
|
19
31
|
|
|
20
|
-
|
|
32
|
+
- TypeScript-first component APIs with prop-driven variants
|
|
33
|
+
- Storybook docs and usage examples
|
|
34
|
+
- Accessibility-minded defaults
|
|
35
|
+
- Unit tests and coverage workflows
|
|
36
|
+
- Automated release and quality checks
|
|
21
37
|
|
|
22
|
-
|
|
38
|
+
## Installation
|
|
23
39
|
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
cd ui-kit
|
|
27
|
-
npm install
|
|
40
|
+
```bash
|
|
41
|
+
npm install @tanishraj/ui-kit
|
|
28
42
|
```
|
|
29
43
|
|
|
30
|
-
|
|
44
|
+
or
|
|
31
45
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
```sh
|
|
35
|
-
npm run storybook
|
|
46
|
+
```bash
|
|
47
|
+
yarn add @tanishraj/ui-kit
|
|
36
48
|
```
|
|
37
49
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
You can now generate a new component from a Figma node and existing local code patterns:
|
|
50
|
+
or
|
|
41
51
|
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
--name MyNewComponent \
|
|
45
|
-
--figma-url "https://www.figma.com/file/<FILE_KEY>/<NAME>?node-id=<NODE_ID>" \
|
|
46
|
-
--openai-key "$OPENAI_API_KEY" \
|
|
47
|
-
--figma-token "$FIGMA_API_TOKEN" \
|
|
48
|
-
--stories \
|
|
49
|
-
--tests
|
|
52
|
+
```bash
|
|
53
|
+
pnpm add @tanishraj/ui-kit
|
|
50
54
|
```
|
|
51
55
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
- `--figma-file-key` and `--node-id` if you prefer separate args.
|
|
55
|
-
- `--skip-ai` to only scaffold fallback files without OpenAI.
|
|
56
|
-
- `--pattern-limit` to control how many local component examples are used.
|
|
57
|
-
- `--overwrite` to replace existing files.
|
|
58
|
-
|
|
59
|
-
Required environment variables:
|
|
60
|
-
|
|
61
|
-
- `OPENAI_API_KEY`
|
|
62
|
-
- `FIGMA_API_TOKEN`
|
|
63
|
-
|
|
64
|
-
### GitHub Actions (Manual trigger)
|
|
65
|
-
|
|
66
|
-
There is a workflow at [.github/workflows/generate-ui-component.yml](.github/workflows/generate-ui-component.yml) that can generate components and open a PR for review.
|
|
67
|
-
|
|
68
|
-
Dispatch inputs:
|
|
69
|
-
|
|
70
|
-
- `component_name`: component name.
|
|
71
|
-
- `figma_url`: full Figma URL containing `node-id`.
|
|
72
|
-
- `stories`: generate story file.
|
|
73
|
-
- `tests`: generate test file.
|
|
74
|
-
- `overwrite`: overwrite existing files.
|
|
75
|
-
- `pattern_limit`: how many existing components to include in AI context.
|
|
76
|
-
- `skip_ai`: scaffold fallback only.
|
|
77
|
-
|
|
78
|
-
Set repository secrets:
|
|
79
|
-
|
|
80
|
-
- `OPENAI_API_KEY`
|
|
81
|
-
- `FIGMA_API_TOKEN`
|
|
82
|
-
|
|
83
|
-
### VS Code / Codex MCP setup (Figma)
|
|
56
|
+
## Usage
|
|
84
57
|
|
|
85
|
-
|
|
58
|
+
```tsx
|
|
59
|
+
import {
|
|
60
|
+
Button,
|
|
61
|
+
Badge,
|
|
62
|
+
Avatar,
|
|
63
|
+
AvatarGroup,
|
|
64
|
+
} from '@tanishraj/ui-kit';
|
|
65
|
+
import '@tanishraj/ui-kit/globals.css';
|
|
86
66
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
- Figma authentication completes in the MCP prompt flow.
|
|
67
|
+
export function Demo() {
|
|
68
|
+
return <Button variant="primary">Get Started</Button>;
|
|
69
|
+
}
|
|
70
|
+
```
|
|
92
71
|
|
|
93
|
-
|
|
72
|
+
### Theme styles
|
|
94
73
|
|
|
95
|
-
|
|
74
|
+
```ts
|
|
75
|
+
import '@tanishraj/ui-kit/theme-primary.css';
|
|
76
|
+
// Optional: import secondary theme instead
|
|
77
|
+
// import '@tanishraj/ui-kit/theme-secondary.css';
|
|
78
|
+
```
|
|
96
79
|
|
|
97
|
-
|
|
80
|
+
## Component Library API
|
|
98
81
|
|
|
99
|
-
|
|
82
|
+
- Components are exported from the package entrypoint in a single import surface.
|
|
83
|
+
- Props follow consistent naming patterns:
|
|
84
|
+
- `size` (`sm`, `md`, `lg`)
|
|
85
|
+
- `variant` (status/visual intent)
|
|
86
|
+
- `shape` (`circle`, `square` where supported)
|
|
87
|
+
- `disabled`, `loading`, and interaction states where applicable
|
|
88
|
+
- Component stories in `*.stories.tsx` are the source of truth for public usage patterns and prop combinations.
|
|
100
89
|
|
|
101
|
-
|
|
90
|
+
### Documentation and examples
|
|
102
91
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
```
|
|
92
|
+
- Storybook: run locally with `npm run storybook`
|
|
93
|
+
- Deploy guide and live docs: see repository CI/Pages setup
|
|
106
94
|
|
|
107
|
-
|
|
95
|
+
## Theming
|
|
108
96
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
97
|
+
- Component style variants are centralized with CVA + Tailwind utility patterns.
|
|
98
|
+
- Theme tokens are built in and theme files are exported from package entry points:
|
|
99
|
+
- `theme-primary.css`
|
|
100
|
+
- `theme-secondary.css`
|
|
101
|
+
- `globals.css`
|
|
112
102
|
|
|
113
|
-
|
|
103
|
+
## Accessibility
|
|
114
104
|
|
|
115
|
-
|
|
116
|
-
npm run cleanup:component -- --name AutoGeneratedSmoke --force
|
|
117
|
-
```
|
|
105
|
+
This library is built with accessibility as a first-class goal:
|
|
118
106
|
|
|
119
|
-
|
|
107
|
+
- Keyboard support follows platform conventions (`Tab`, `Enter`, `Space`, and focus-visible states).
|
|
108
|
+
- ARIA attributes are applied where required.
|
|
109
|
+
- Buttons, badges, and avatar controls are composed to preserve semantic meaning.
|
|
110
|
+
- Disabled/loading states are explicitly represented in props and reflected visually and via attributes.
|
|
120
111
|
|
|
121
|
-
|
|
112
|
+
## Development
|
|
122
113
|
|
|
123
|
-
|
|
124
|
-
npm run build
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
> Note:
|
|
128
|
-
> `vite build` may print non-blocking warnings:
|
|
129
|
-
> - `Unknown at rule: @theme`
|
|
130
|
-
> - `Unknown at rule: @utility`
|
|
131
|
-
>
|
|
132
|
-
> These are expected with the current Tailwind CSS v4 setup and do not fail the build.
|
|
114
|
+
### Prerequisites
|
|
133
115
|
|
|
134
|
-
|
|
116
|
+
- Node.js 20+
|
|
117
|
+
- Yarn lockfile (`yarn.lock`) used in CI installs
|
|
135
118
|
|
|
136
|
-
|
|
119
|
+
### Common scripts
|
|
137
120
|
|
|
138
|
-
```
|
|
139
|
-
npm
|
|
121
|
+
```bash
|
|
122
|
+
npm run build # build distributable
|
|
123
|
+
npm run lint # lint source and config
|
|
124
|
+
npm run type-check # TypeScript checks
|
|
125
|
+
npm run test # run Vitest tests
|
|
126
|
+
npm run release:check # full release validation
|
|
127
|
+
npm run test:coverage # generate coverage report
|
|
128
|
+
npm run storybook # run Storybook locally
|
|
129
|
+
npm run storybook:build # build Storybook static site
|
|
130
|
+
npm run clean # remove generated artifacts
|
|
140
131
|
```
|
|
141
132
|
|
|
142
|
-
|
|
133
|
+
### Local component generation (Codex)
|
|
143
134
|
|
|
144
|
-
|
|
145
|
-
npm run test:watch
|
|
146
|
-
```
|
|
135
|
+
This repo can scaffold components from Figma via Codex workflows used by the maintainer.
|
|
147
136
|
|
|
148
|
-
|
|
137
|
+
## Testing
|
|
149
138
|
|
|
150
|
-
|
|
139
|
+
- Run `npm run test` while developing.
|
|
140
|
+
- Run coverage with `npm run test:coverage`.
|
|
141
|
+
- CI publishes only when unit tests and type checks are green.
|
|
151
142
|
|
|
152
|
-
|
|
153
|
-
npm run lint
|
|
154
|
-
npm run format
|
|
155
|
-
```
|
|
143
|
+
## CI / Automation
|
|
156
144
|
|
|
157
|
-
|
|
145
|
+
Current repository workflows:
|
|
158
146
|
|
|
159
|
-
|
|
147
|
+
- `eslint.yml`
|
|
148
|
+
- `type-check.yml`
|
|
149
|
+
- `unit-tests.yml`
|
|
150
|
+
- `coverage-report.yml`
|
|
151
|
+
- `codeql.yml`
|
|
152
|
+
- `npm-publish.yml`
|
|
153
|
+
- `deploy-storybook.yml`
|
|
160
154
|
|
|
161
|
-
|
|
162
|
-
npm run clean
|
|
163
|
-
```
|
|
155
|
+
Quality gates include linting, type checking, unit tests, and coverage checks.
|
|
164
156
|
|
|
165
|
-
##
|
|
157
|
+
## Publishing
|
|
166
158
|
|
|
167
|
-
|
|
168
|
-
├── src/ # Component source code
|
|
169
|
-
│ ├── components/ # React components
|
|
170
|
-
│ ├── hooks/ # Custom hooks (if any)
|
|
171
|
-
│ ├── utils/ # Utility functions
|
|
172
|
-
│ ├── index.ts # Library entry point
|
|
173
|
-
├── .storybook/ # Storybook configuration
|
|
174
|
-
├── tests/ # Unit tests
|
|
175
|
-
├── dist/ # Compiled library output
|
|
176
|
-
├── package.json # Project metadata and scripts
|
|
177
|
-
└── README.md # Documentation
|
|
178
|
-
```
|
|
159
|
+
### Automated publish (recommended)
|
|
179
160
|
|
|
180
|
-
|
|
161
|
+
- Publish is handled through GitHub Actions.
|
|
162
|
+
- Workflow validates checks before `npm publish`.
|
|
163
|
+
- Scope is controlled by repository secrets and workflow rules.
|
|
181
164
|
|
|
182
|
-
|
|
165
|
+
### Required secret
|
|
183
166
|
|
|
184
|
-
-
|
|
185
|
-
- [release.md](release.md)
|
|
167
|
+
- `NPM_TOKEN`
|
|
186
168
|
|
|
187
|
-
|
|
169
|
+
## Release Process
|
|
188
170
|
|
|
189
|
-
|
|
190
|
-
2. `npm run type-check`
|
|
191
|
-
3. `npm run test -- --run`
|
|
192
|
-
4. `npm run build`
|
|
193
|
-
5. `npm publish` with the correct dist-tag
|
|
171
|
+
A dedicated release guide is available:
|
|
194
172
|
|
|
195
|
-
|
|
173
|
+
- [`release.md`](release.md)
|
|
196
174
|
|
|
197
|
-
|
|
175
|
+
Quick release flow:
|
|
198
176
|
|
|
199
|
-
|
|
177
|
+
1. bump version (`npm version patch|minor|major`)
|
|
178
|
+
2. create release tag (for example: `v1.2.0`)
|
|
179
|
+
3. CI validates + publishes
|
|
200
180
|
|
|
201
|
-
|
|
181
|
+
## Repository Structure
|
|
202
182
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
183
|
+
```text
|
|
184
|
+
src/
|
|
185
|
+
components/ # React component implementations
|
|
186
|
+
themes/ # theme entry files
|
|
187
|
+
utils/ # shared helpers and class utilities
|
|
188
|
+
.storybook/ # Storybook config
|
|
189
|
+
.github/workflows/ # CI and release automation
|
|
207
190
|
```
|
|
208
191
|
|
|
209
|
-
|
|
192
|
+
## Components
|
|
210
193
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
194
|
+
| Component | Location | Storybook | Status |
|
|
195
|
+
| --- | --- | --- | --- |
|
|
196
|
+
| Alert | `src/components/Alert` | [Alert](https://tanishraj.github.io/ui-kit/?path=/story/components-alert--default) | Stable |
|
|
197
|
+
| Badge | `src/components/Badge` | [Badge](https://tanishraj.github.io/ui-kit/?path=/story/components-badge--playground) | Stable |
|
|
198
|
+
| Avatar | `src/components/Avatar` | [Avatar](https://tanishraj.github.io/ui-kit/?path=/story/components-avatar--playground) | Stable |
|
|
199
|
+
| AvatarGroup | `src/components/AvatarGroup` | [AvatarGroup](https://tanishraj.github.io/ui-kit/?path=/story/components-avatargroup--default) | Stable |
|
|
200
|
+
| Button | `src/components/Button` | [Button](https://tanishraj.github.io/ui-kit/?path=/story/components-button--playground) | Stable |
|
|
201
|
+
| ButtonGroup | `src/components/ButtonGroup` | [ButtonGroup](https://tanishraj.github.io/ui-kit/?path=/story/components-buttongroup--playground) | Stable |
|
|
202
|
+
| OrganizationChart | `src/components/OrganizationChart` | [OrganizationChart](https://tanishraj.github.io/ui-kit/?path=/story/components-organizationchart--playground) | Stable |
|
|
215
203
|
|
|
216
|
-
|
|
204
|
+
## Versioning and Changelog
|
|
217
205
|
|
|
218
|
-
|
|
206
|
+
- This package follows [Semantic Versioning (SemVer)](https://semver.org/).
|
|
207
|
+
- Version updates use `npm version patch|minor|major`.
|
|
208
|
+
- Pre-release versions are supported and published with the `next` tag when release is marked as prerelease.
|
|
209
|
+
- Breaking changes are documented and shipped as a new major version.
|
|
210
|
+
- Changes must be recorded in [`CHANGELOG.md`](CHANGELOG.md).
|
|
219
211
|
|
|
220
|
-
|
|
212
|
+
## Changelog
|
|
221
213
|
|
|
222
|
-
-
|
|
223
|
-
-
|
|
214
|
+
- Maintained using Keep a Changelog structure: `Unreleased`, `Added`, `Changed`, `Fixed`.
|
|
215
|
+
- Update changelog before tagging and include impact, scope, and migration notes when needed.
|
|
216
|
+
- Keep the latest released version at top below `Unreleased`.
|
|
224
217
|
|
|
225
|
-
|
|
218
|
+
## Contributing
|
|
226
219
|
|
|
227
|
-
|
|
220
|
+
Contributions should include:
|
|
228
221
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
```
|
|
222
|
+
- component changes with matching story updates
|
|
223
|
+
- tests for new/changed behavior
|
|
224
|
+
- lint-safe and type-safe implementation
|
|
233
225
|
|
|
234
|
-
|
|
226
|
+
Please keep API changes minimal and backward-compatible unless part of an intentional major version.
|
|
235
227
|
|
|
236
228
|
## License
|
|
237
229
|
|
|
238
|
-
|
|
230
|
+
MIT © Tanishraj
|
package/dist/eslint.config.d.mts
DELETED
package/dist/setupTests.d.ts
DELETED
|
File without changes
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FC, ReactNode, SVGProps } from 'react';
|
|
2
|
-
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import { RemoveNull } from '../../utils';
|
|
4
|
-
import { alertWrapperStyles } from './Alert.styles';
|
|
5
|
-
export interface AlertProps extends RemoveNull<VariantProps<typeof alertWrapperStyles>> {
|
|
6
|
-
title?: string;
|
|
7
|
-
icon?: FC<SVGProps<SVGSVGElement>>;
|
|
8
|
-
children?: ReactNode;
|
|
9
|
-
onClose?: () => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const Alert: FC<AlertProps>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { AlertProps } from './Alert';
|
|
3
|
-
declare const meta: Meta<AlertProps>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<AlertProps>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const AlertSize: Story;
|
|
8
|
-
export declare const AlertVariant: Story;
|
|
9
|
-
export declare const AlertApperance: Story;
|
|
10
|
-
export declare const AlertFilledInverted: Story;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export declare const alertWrapperStyles: (props?: ({
|
|
2
|
-
appearance?: "filled" | "outline" | "dashed" | null | undefined;
|
|
3
|
-
variant?: "default" | "primary" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
4
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
5
|
-
inverted?: boolean | null | undefined;
|
|
6
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
-
export declare const alertContentWrapperStyles: (props?: ({
|
|
8
|
-
variant?: "default" | "primary" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
9
|
-
appearance?: "filled" | "outline" | "dashed" | null | undefined;
|
|
10
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
11
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
12
|
-
export declare const alertTitleStyles: (props?: ({
|
|
13
|
-
appearance?: "filled" | "outline" | "dashed" | null | undefined;
|
|
14
|
-
variant?: "default" | "primary" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
15
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
16
|
-
inverted?: boolean | null | undefined;
|
|
17
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
18
|
-
export declare const alertDescriptionStyles: (props?: ({
|
|
19
|
-
appearance?: "filled" | "outline" | "dashed" | null | undefined;
|
|
20
|
-
variant?: "default" | "primary" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
21
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
22
|
-
inverted?: boolean | null | undefined;
|
|
23
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
24
|
-
export declare const alertIconStyles: (props?: ({
|
|
25
|
-
appearance?: "filled" | "outline" | "dashed" | null | undefined;
|
|
26
|
-
variant?: "default" | "primary" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
27
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
28
|
-
inverted?: boolean | null | undefined;
|
|
29
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
30
|
-
export declare const alertCloseButtonStyles: (props?: ({
|
|
31
|
-
appearance?: "filled" | "outline" | "dashed" | null | undefined;
|
|
32
|
-
variant?: "default" | "primary" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
33
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
34
|
-
inverted?: boolean | null | undefined;
|
|
35
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { RemoveNull } from '../../utils';
|
|
3
|
-
import { alertWrapperStyles } from './Alert.styles';
|
|
4
|
-
export type AlertVariants = RemoveNull<VariantProps<typeof alertWrapperStyles>>['variant'];
|
|
5
|
-
export type AlertAppearances = RemoveNull<VariantProps<typeof alertWrapperStyles>>['appearance'];
|
|
6
|
-
export type AlertSizes = RemoveNull<VariantProps<typeof alertWrapperStyles>>['size'];
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { FC, HTMLAttributes } from 'react';
|
|
2
|
-
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import { avatarContainerStyles } from './Avatar.styles';
|
|
4
|
-
import { AvatarIcon, AvatarImage, AvatarSizes, AvatarShapes, AvatarVariants, AvatarStatus, AvatarStatusPosition } from './types';
|
|
5
|
-
export interface AvatarProps extends HTMLAttributes<HTMLSpanElement>, Omit<VariantProps<typeof avatarContainerStyles>, 'stroke'> {
|
|
6
|
-
icon?: AvatarIcon;
|
|
7
|
-
img?: AvatarImage;
|
|
8
|
-
initials?: string;
|
|
9
|
-
status?: AvatarStatus;
|
|
10
|
-
statusPosition?: AvatarStatusPosition;
|
|
11
|
-
size?: AvatarSizes;
|
|
12
|
-
shape?: AvatarShapes;
|
|
13
|
-
variant?: AvatarVariants;
|
|
14
|
-
inverted?: boolean;
|
|
15
|
-
stroke?: boolean;
|
|
16
|
-
}
|
|
17
|
-
export declare const Avatar: FC<AvatarProps>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { AvatarProps } from './Avatar';
|
|
3
|
-
declare const meta: Meta<AvatarProps>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<AvatarProps>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const Variants: Story;
|
|
8
|
-
export declare const Sizes: Story;
|
|
9
|
-
export declare const Shapes: Story;
|
|
10
|
-
export declare const WithStroke: Story;
|
|
11
|
-
export declare const Status: Story;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export declare const avatarContainerStyles: (props?: ({
|
|
2
|
-
size?: "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
3
|
-
variant?: "default" | "primary" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
4
|
-
shape?: "circle" | "square" | null | undefined;
|
|
5
|
-
inverted?: boolean | null | undefined;
|
|
6
|
-
stroke?: boolean | null | undefined;
|
|
7
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
-
export declare const avatarImageStyles: (props?: ({
|
|
9
|
-
shape?: "circle" | "square" | null | undefined;
|
|
10
|
-
size?: "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
11
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
12
|
-
export declare const avatarTextStyles: (props?: ({
|
|
13
|
-
size?: "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
14
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
15
|
-
export declare const avatarIconStyles: (props?: ({
|
|
16
|
-
size?: "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
17
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
18
|
-
export declare const avatarStatusStyles: (props?: ({
|
|
19
|
-
status?: "primary" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
20
|
-
shape?: "circle" | "square" | null | undefined;
|
|
21
|
-
position?: "top-right" | "top-left" | "bottom-right" | "bottom-left" | null | undefined;
|
|
22
|
-
size?: "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
23
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FC, SVGProps } from 'react';
|
|
2
|
-
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import { RemoveNull } from '../../utils';
|
|
4
|
-
import { avatarContainerStyles, avatarStatusStyles } from './Avatar.styles';
|
|
5
|
-
export type AvatarSizes = RemoveNull<VariantProps<typeof avatarContainerStyles>>['size'];
|
|
6
|
-
export type AvatarShapes = RemoveNull<VariantProps<typeof avatarContainerStyles>>['shape'];
|
|
7
|
-
export type AvatarVariants = RemoveNull<VariantProps<typeof avatarContainerStyles>>['variant'];
|
|
8
|
-
export type AvatarStatus = RemoveNull<VariantProps<typeof avatarStatusStyles>['status']>;
|
|
9
|
-
export type AvatarStatusPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
10
|
-
export type AvatarIcon = FC<SVGProps<SVGSVGElement>>;
|
|
11
|
-
export type AvatarImage = {
|
|
12
|
-
src: string;
|
|
13
|
-
alt: string;
|
|
14
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { AvatarGroupProps } from './types';
|
|
3
|
-
declare const meta: Meta<AvatarGroupProps>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<AvatarGroupProps>;
|
|
6
|
-
export declare const Default: Story;
|
|
7
|
-
export declare const Variants: Story;
|
|
8
|
-
export declare const Sizes: Story;
|
|
9
|
-
export declare const Shapes: Story;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const avatarGroupStyles: (props?: ({
|
|
2
|
-
size?: "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
3
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
4
|
-
export declare const avatarGroupCounterStyles: (props?: ({
|
|
5
|
-
variant?: "default" | "primary" | "info" | "success" | "warning" | "danger" | null | undefined;
|
|
6
|
-
size?: "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
7
|
-
shape?: "circle" | "square" | null | undefined;
|
|
8
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
-
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import { RemoveNull } from '../../utils';
|
|
4
|
-
import { AvatarProps, AvatarVariants } from '../Avatar';
|
|
5
|
-
import { avatarContainerStyles } from '../Avatar/Avatar.styles';
|
|
6
|
-
export type AvatarGroupSizes = RemoveNull<VariantProps<typeof avatarContainerStyles>>['size'];
|
|
7
|
-
export type AvatarGroupShapes = RemoveNull<VariantProps<typeof avatarContainerStyles>>['shape'];
|
|
8
|
-
export type AvatarGroupItem = Omit<AvatarProps, 'size' | 'shape' | 'inverted' | 'stroke' | 'className'>;
|
|
9
|
-
export interface AvatarGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
10
|
-
items?: AvatarGroupItem[];
|
|
11
|
-
size?: AvatarGroupSizes;
|
|
12
|
-
variant?: AvatarVariants;
|
|
13
|
-
shape?: AvatarGroupShapes;
|
|
14
|
-
max?: number;
|
|
15
|
-
inverted?: boolean;
|
|
16
|
-
stroke?: boolean;
|
|
17
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { FC, HTMLAttributes, SVGProps } from 'react';
|
|
2
|
-
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import { badgeVariants } from './Badge.styles';
|
|
4
|
-
export interface BadgeProps extends HTMLAttributes<HTMLSpanElement>, Omit<VariantProps<typeof badgeVariants>, 'appearance'> {
|
|
5
|
-
icon?: FC<SVGProps<SVGSVGElement>>;
|
|
6
|
-
}
|
|
7
|
-
export declare const Badge: FC<BadgeProps>;
|