react-ui-suite 0.1.0
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 +71 -0
- package/dist/index.d.ts +440 -0
- package/dist/index.js +4055 -0
- package/dist/index.js.map +1 -0
- package/package.json +49 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 react-ui-suite contributors
|
|
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 do so, subject to the
|
|
10
|
+
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,71 @@
|
|
|
1
|
+
# react-ui-suite
|
|
2
|
+
|
|
3
|
+
`react-ui-suite` is a collection of production-ready React components built with Tailwind-friendly class names and ergonomic APIs. The publishable package lives in the `src/` workspace as `react-ui-suite`, while a separate Vite demo app showcases every component with rich previews.
|
|
4
|
+
|
|
5
|
+
> **ESM-only:** The npm package only publishes ES modules and type declarations under `dist/`. Tools that still require CommonJS entry points must add an extra build step (e.g., `tsup --format cjs`) before consumption.
|
|
6
|
+
|
|
7
|
+
## Packages
|
|
8
|
+
|
|
9
|
+
| Folder | Description |
|
|
10
|
+
| -------- | ------------------------------------------------------------------------------------------------------------------------- |
|
|
11
|
+
| `.` | Root workspace published as `@react-ui-suite/root`. It orchestrates tooling/scripts for every workspace but stays private. |
|
|
12
|
+
| `src/` | Workspace that publishes `react-ui-suite`. `tsup` compiles this folder to `dist/`. |
|
|
13
|
+
| `demos/` | Demo entries that describe each component preview (slug, description, tags, etc.). These files are not published. |
|
|
14
|
+
| `demo/` | Standalone Vite gallery that auto-registers every demo entry via `import.meta.glob`. Useful for local development and QA. |
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install react-ui-suite
|
|
20
|
+
# or pnpm / yarn
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Because the components rely on React, include the peer dependencies in your application:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
react@^18
|
|
27
|
+
react-dom@^18
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
import { Badge, Button, Card } from "react-ui-suite";
|
|
34
|
+
|
|
35
|
+
export function ExampleCard() {
|
|
36
|
+
return (
|
|
37
|
+
<Card title="Weekly report">
|
|
38
|
+
<Badge variant="success">Live</Badge>
|
|
39
|
+
<p className="mt-3 text-sm text-slate-600">Performance is trending upward for all KPIs.</p>
|
|
40
|
+
<Button className="mt-4 w-full">View details</Button>
|
|
41
|
+
</Card>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Every component (and its related types) is exported from `src/index.ts`, so tree-shaking works out of the box.
|
|
47
|
+
|
|
48
|
+
## Development
|
|
49
|
+
|
|
50
|
+
### Build the library workspace
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
npm install # installs all workspace deps (library + demo)
|
|
54
|
+
npm run build # builds react-ui-suite via tsup
|
|
55
|
+
npm run test # executes Vitest for the library (proxied to the src workspace)
|
|
56
|
+
npm run lint # lints the library source via ESLint (proxied to the src workspace)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
`tsup` cleans `src/dist/` automatically and marks `react` / `react-dom` as externals so the published artifacts only contain the suite's code. Linting and tests provide fast feedback before shipping any new component primitives.
|
|
60
|
+
|
|
61
|
+
### Run the local demo gallery
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm run dev # starts the demo workspace via Vite on http://localhost:5173
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The Vite app aliases `react-ui-suite` to `../src`, so you always preview the latest source without publishing. Demo entries live inside `../demos` and are auto-discovered.
|
|
68
|
+
|
|
69
|
+
## Publishing
|
|
70
|
+
|
|
71
|
+
`src/package.json` limits the published files to `dist/`, `README.md`, and `LICENSE` so neither the demo app nor the raw source ship to npm. The `prepublishOnly` script automatically runs `build`, `test`, and `lint` so the release payload is always in a healthy state. Once the API begins to stabilize, consider layering in release tooling such as [Changesets](https://github.com/changesets/changesets) or `semantic-release` to track versions/CHANGELOG entries from tagged commits.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
type AlertVariant = "info" | "success" | "warning" | "danger";
|
|
6
|
+
type AlertProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
7
|
+
title: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
variant?: AlertVariant;
|
|
10
|
+
onDismiss?: () => void;
|
|
11
|
+
};
|
|
12
|
+
declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
13
|
+
title: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
variant?: AlertVariant;
|
|
16
|
+
onDismiss?: () => void;
|
|
17
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
|
|
19
|
+
type BadgeVariant = "neutral" | "info" | "success" | "warning" | "danger";
|
|
20
|
+
type BadgeProps = React.HTMLAttributes<HTMLSpanElement> & {
|
|
21
|
+
variant?: BadgeVariant;
|
|
22
|
+
icon?: React.ReactNode;
|
|
23
|
+
};
|
|
24
|
+
declare const Badge: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & {
|
|
25
|
+
variant?: BadgeVariant;
|
|
26
|
+
icon?: React.ReactNode;
|
|
27
|
+
} & React.RefAttributes<HTMLSpanElement>>;
|
|
28
|
+
|
|
29
|
+
type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
};
|
|
32
|
+
declare function Button({ children, onClick, disabled, className, type, style, ...rest }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
33
|
+
|
|
34
|
+
type CardProps = Omit<React.HTMLAttributes<HTMLDivElement>, "title"> & {
|
|
35
|
+
eyebrow?: string;
|
|
36
|
+
title?: React.ReactNode;
|
|
37
|
+
actions?: React.ReactNode;
|
|
38
|
+
footer?: React.ReactNode;
|
|
39
|
+
muted?: boolean;
|
|
40
|
+
};
|
|
41
|
+
declare const Card: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement>, "title"> & {
|
|
42
|
+
eyebrow?: string;
|
|
43
|
+
title?: React.ReactNode;
|
|
44
|
+
actions?: React.ReactNode;
|
|
45
|
+
footer?: React.ReactNode;
|
|
46
|
+
muted?: boolean;
|
|
47
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
48
|
+
|
|
49
|
+
type CheckboxProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "onChange" | "checked" | "defaultChecked"> & {
|
|
50
|
+
label: string;
|
|
51
|
+
description?: string;
|
|
52
|
+
checked?: boolean;
|
|
53
|
+
defaultChecked?: boolean;
|
|
54
|
+
onChange?: (checked: boolean) => void;
|
|
55
|
+
indeterminate?: boolean;
|
|
56
|
+
};
|
|
57
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "defaultChecked" | "onChange" | "type" | "checked"> & {
|
|
58
|
+
label: string;
|
|
59
|
+
description?: string;
|
|
60
|
+
checked?: boolean;
|
|
61
|
+
defaultChecked?: boolean;
|
|
62
|
+
onChange?: (checked: boolean) => void;
|
|
63
|
+
indeterminate?: boolean;
|
|
64
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
65
|
+
|
|
66
|
+
type ColorPickerProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange"> & {
|
|
67
|
+
label?: string;
|
|
68
|
+
value?: string;
|
|
69
|
+
defaultValue?: string;
|
|
70
|
+
onChange?: (value: string) => void;
|
|
71
|
+
swatches?: string[];
|
|
72
|
+
};
|
|
73
|
+
declare const ColorPicker: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "defaultValue" | "onChange" | "type" | "value"> & {
|
|
74
|
+
label?: string;
|
|
75
|
+
value?: string;
|
|
76
|
+
defaultValue?: string;
|
|
77
|
+
onChange?: (value: string) => void;
|
|
78
|
+
swatches?: string[];
|
|
79
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
80
|
+
|
|
81
|
+
type ComboboxOption<T = unknown> = {
|
|
82
|
+
id: string;
|
|
83
|
+
label: string;
|
|
84
|
+
value?: T;
|
|
85
|
+
disabled?: boolean;
|
|
86
|
+
};
|
|
87
|
+
type ComboboxRenderState = {
|
|
88
|
+
active: boolean;
|
|
89
|
+
selected: boolean;
|
|
90
|
+
};
|
|
91
|
+
type ComboboxProps<T = unknown> = {
|
|
92
|
+
options: ComboboxOption<T>[];
|
|
93
|
+
value?: ComboboxOption<T> | null;
|
|
94
|
+
defaultValue?: ComboboxOption<T> | null;
|
|
95
|
+
onChange?: (option: ComboboxOption<T> | null) => void;
|
|
96
|
+
placeholder?: string;
|
|
97
|
+
disabled?: boolean;
|
|
98
|
+
className?: string;
|
|
99
|
+
listClassName?: string;
|
|
100
|
+
inputClassName?: string;
|
|
101
|
+
emptyState?: ReactNode;
|
|
102
|
+
renderOption?: (opt: ComboboxOption<T>, state: ComboboxRenderState) => ReactNode;
|
|
103
|
+
filter?: (opt: ComboboxOption<T>, query: string) => boolean;
|
|
104
|
+
openOnFocus?: boolean;
|
|
105
|
+
ariaLabel?: string;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
declare const Combobox: <T>(props: ComboboxProps<T> & React.RefAttributes<HTMLInputElement>) => React.ReactElement | null;
|
|
109
|
+
|
|
110
|
+
type DatalistInputProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
111
|
+
label?: string;
|
|
112
|
+
description?: string;
|
|
113
|
+
options: string[];
|
|
114
|
+
};
|
|
115
|
+
declare const DatalistInput: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & {
|
|
116
|
+
label?: string;
|
|
117
|
+
description?: string;
|
|
118
|
+
options: string[];
|
|
119
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
120
|
+
|
|
121
|
+
type DatePickerProps = {
|
|
122
|
+
label?: string;
|
|
123
|
+
description?: string;
|
|
124
|
+
error?: string;
|
|
125
|
+
className?: string;
|
|
126
|
+
disabled?: boolean;
|
|
127
|
+
value?: string;
|
|
128
|
+
defaultValue?: string;
|
|
129
|
+
onChange?: (value: string) => void;
|
|
130
|
+
type?: "date" | "time";
|
|
131
|
+
timeIntervalMinutes?: number;
|
|
132
|
+
use24HourClock?: boolean;
|
|
133
|
+
};
|
|
134
|
+
declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLInputElement>>;
|
|
135
|
+
|
|
136
|
+
type DialogProps = {
|
|
137
|
+
open: boolean;
|
|
138
|
+
onClose: () => void;
|
|
139
|
+
title: string;
|
|
140
|
+
description?: string;
|
|
141
|
+
children: React.ReactNode;
|
|
142
|
+
footer?: React.ReactNode;
|
|
143
|
+
modal?: boolean;
|
|
144
|
+
draggable?: boolean;
|
|
145
|
+
};
|
|
146
|
+
declare function Dialog({ open, onClose, title, description, children, footer, modal, draggable, }: DialogProps): React.ReactPortal | null;
|
|
147
|
+
|
|
148
|
+
type DisclosureProps = React.DetailsHTMLAttributes<HTMLDetailsElement> & {
|
|
149
|
+
title: React.ReactNode;
|
|
150
|
+
subtle?: boolean;
|
|
151
|
+
defaultOpen?: boolean;
|
|
152
|
+
};
|
|
153
|
+
declare const Disclosure: React.ForwardRefExoticComponent<React.DetailsHTMLAttributes<HTMLDetailsElement> & {
|
|
154
|
+
title: React.ReactNode;
|
|
155
|
+
subtle?: boolean;
|
|
156
|
+
defaultOpen?: boolean;
|
|
157
|
+
} & React.RefAttributes<HTMLDetailsElement>>;
|
|
158
|
+
|
|
159
|
+
type DropdownProps = {
|
|
160
|
+
isOpen: boolean;
|
|
161
|
+
disabled?: boolean;
|
|
162
|
+
placeholder?: string;
|
|
163
|
+
displayValue: string;
|
|
164
|
+
query: string;
|
|
165
|
+
className?: string;
|
|
166
|
+
inputClassName?: string;
|
|
167
|
+
highlightClass?: string;
|
|
168
|
+
ariaControls?: string;
|
|
169
|
+
ariaActiveDescendant?: string;
|
|
170
|
+
ariaLabel?: string;
|
|
171
|
+
shellClassName?: string;
|
|
172
|
+
leadingContent?: React.ReactNode;
|
|
173
|
+
inlineContent?: React.ReactNode;
|
|
174
|
+
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
175
|
+
inputRef: React.Ref<HTMLInputElement>;
|
|
176
|
+
chevronRef?: React.Ref<HTMLButtonElement>;
|
|
177
|
+
showChevron?: boolean;
|
|
178
|
+
onShellFocusCapture?: (event: React.FocusEvent<HTMLDivElement>) => void;
|
|
179
|
+
onShellBlurCapture?: (event: React.FocusEvent<HTMLDivElement>) => void;
|
|
180
|
+
onKeyDownCapture?: (event: React.KeyboardEvent<HTMLDivElement>) => void;
|
|
181
|
+
onShellMouseDown?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
182
|
+
onInputFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
183
|
+
onInputMouseDown?: (event: React.MouseEvent<HTMLInputElement>) => void;
|
|
184
|
+
onInputChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
185
|
+
onChevronClick?: () => void;
|
|
186
|
+
children?: React.ReactNode;
|
|
187
|
+
};
|
|
188
|
+
declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLDivElement>>;
|
|
189
|
+
|
|
190
|
+
type InputFieldProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
191
|
+
label?: string;
|
|
192
|
+
description?: string;
|
|
193
|
+
error?: string;
|
|
194
|
+
leadingIcon?: React.ReactNode;
|
|
195
|
+
trailingLabel?: string;
|
|
196
|
+
};
|
|
197
|
+
declare const InputField: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & {
|
|
198
|
+
label?: string;
|
|
199
|
+
description?: string;
|
|
200
|
+
error?: string;
|
|
201
|
+
leadingIcon?: React.ReactNode;
|
|
202
|
+
trailingLabel?: string;
|
|
203
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
204
|
+
|
|
205
|
+
type NumberInputProps = {
|
|
206
|
+
label?: string;
|
|
207
|
+
description?: string;
|
|
208
|
+
error?: string;
|
|
209
|
+
className?: string;
|
|
210
|
+
disabled?: boolean;
|
|
211
|
+
value?: number;
|
|
212
|
+
defaultValue?: number;
|
|
213
|
+
onChange?: (value: number) => void;
|
|
214
|
+
step?: number;
|
|
215
|
+
suffix?: React.ReactNode;
|
|
216
|
+
min?: number;
|
|
217
|
+
max?: number;
|
|
218
|
+
};
|
|
219
|
+
declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
220
|
+
|
|
221
|
+
type OutputChipProps = React.OutputHTMLAttributes<HTMLOutputElement> & {
|
|
222
|
+
tone?: "neutral" | "success" | "warning" | "danger";
|
|
223
|
+
label?: string;
|
|
224
|
+
};
|
|
225
|
+
declare const OutputChip: React.ForwardRefExoticComponent<React.OutputHTMLAttributes<HTMLOutputElement> & {
|
|
226
|
+
tone?: "neutral" | "success" | "warning" | "danger";
|
|
227
|
+
label?: string;
|
|
228
|
+
} & React.RefAttributes<HTMLOutputElement>>;
|
|
229
|
+
|
|
230
|
+
type PopoverProps = {
|
|
231
|
+
className?: string;
|
|
232
|
+
children: (props: {
|
|
233
|
+
scrollRef: React.MutableRefObject<HTMLUListElement | null>;
|
|
234
|
+
}) => React.ReactNode;
|
|
235
|
+
};
|
|
236
|
+
declare function Popover({ className, children }: PopoverProps): react_jsx_runtime.JSX.Element;
|
|
237
|
+
|
|
238
|
+
type CommonProps = {
|
|
239
|
+
label?: string;
|
|
240
|
+
description?: string;
|
|
241
|
+
className?: string;
|
|
242
|
+
};
|
|
243
|
+
type ProgressProps = CommonProps & {
|
|
244
|
+
value: number;
|
|
245
|
+
max?: number;
|
|
246
|
+
showValue?: boolean;
|
|
247
|
+
};
|
|
248
|
+
declare function Progress({ label, description, value, max, showValue, className, }: ProgressProps): react_jsx_runtime.JSX.Element;
|
|
249
|
+
type MeterProps = CommonProps & {
|
|
250
|
+
value: number;
|
|
251
|
+
min?: number;
|
|
252
|
+
max?: number;
|
|
253
|
+
thresholds?: {
|
|
254
|
+
value: number;
|
|
255
|
+
color: string;
|
|
256
|
+
}[];
|
|
257
|
+
};
|
|
258
|
+
declare function Meter({ label, description, value, min, max, thresholds, className, }: MeterProps): react_jsx_runtime.JSX.Element;
|
|
259
|
+
|
|
260
|
+
type RadioProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "onChange" | "checked" | "defaultChecked"> & {
|
|
261
|
+
label: string;
|
|
262
|
+
description?: string;
|
|
263
|
+
extra?: React.ReactNode;
|
|
264
|
+
checked?: boolean;
|
|
265
|
+
defaultChecked?: boolean;
|
|
266
|
+
onChange?: (checked: boolean) => void;
|
|
267
|
+
};
|
|
268
|
+
declare const Radio: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "defaultChecked" | "onChange" | "type" | "checked"> & {
|
|
269
|
+
label: string;
|
|
270
|
+
description?: string;
|
|
271
|
+
extra?: React.ReactNode;
|
|
272
|
+
checked?: boolean;
|
|
273
|
+
defaultChecked?: boolean;
|
|
274
|
+
onChange?: (checked: boolean) => void;
|
|
275
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
276
|
+
|
|
277
|
+
type SelectOption = {
|
|
278
|
+
label: string;
|
|
279
|
+
value: string;
|
|
280
|
+
description?: string;
|
|
281
|
+
disabled?: boolean;
|
|
282
|
+
};
|
|
283
|
+
type SelectProps = {
|
|
284
|
+
label?: string;
|
|
285
|
+
description?: string;
|
|
286
|
+
error?: string;
|
|
287
|
+
options: SelectOption[];
|
|
288
|
+
value?: string;
|
|
289
|
+
defaultValue?: string;
|
|
290
|
+
onChange?: (value: string | null) => void;
|
|
291
|
+
placeholder?: string;
|
|
292
|
+
className?: string;
|
|
293
|
+
disabled?: boolean;
|
|
294
|
+
leadingContent?: React.ReactNode;
|
|
295
|
+
inlineContent?: React.ReactNode;
|
|
296
|
+
};
|
|
297
|
+
declare function Select({ label, description, error, options, value, defaultValue, onChange, placeholder, className, disabled, leadingContent, inlineContent, }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
298
|
+
|
|
299
|
+
type SliderRenderProps = {
|
|
300
|
+
value: number;
|
|
301
|
+
min: number;
|
|
302
|
+
max: number;
|
|
303
|
+
percentage: number;
|
|
304
|
+
disabled?: boolean;
|
|
305
|
+
focused: boolean;
|
|
306
|
+
orientation: "horizontal" | "vertical";
|
|
307
|
+
reversed: boolean;
|
|
308
|
+
position: number;
|
|
309
|
+
trackLength: number;
|
|
310
|
+
thumbSize: number;
|
|
311
|
+
trackOffset: number;
|
|
312
|
+
trackCrossOffset: number;
|
|
313
|
+
trackThickness: number;
|
|
314
|
+
};
|
|
315
|
+
type SliderProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "defaultValue" | "onChange" | "min" | "max" | "step"> & {
|
|
316
|
+
label?: string;
|
|
317
|
+
value?: number;
|
|
318
|
+
defaultValue?: number;
|
|
319
|
+
onChange?: (value: number) => void;
|
|
320
|
+
formatValue?: (value: number) => string;
|
|
321
|
+
renderTrack?: (props: SliderRenderProps & {
|
|
322
|
+
children: React.ReactNode;
|
|
323
|
+
}) => React.ReactNode;
|
|
324
|
+
renderThumb?: (props: SliderRenderProps) => React.ReactNode;
|
|
325
|
+
trackClassName?: string;
|
|
326
|
+
thumbClassName?: string;
|
|
327
|
+
orientation?: "horizontal" | "vertical";
|
|
328
|
+
reversed?: boolean;
|
|
329
|
+
min?: number;
|
|
330
|
+
max?: number;
|
|
331
|
+
step?: number;
|
|
332
|
+
/**
|
|
333
|
+
* Approximate thumb size along the track axis (used for bounds and progress).
|
|
334
|
+
* For custom thumbs wider than tall (e.g., pills with labels), set this to the thumb's total width (horizontal) or height (vertical).
|
|
335
|
+
*/
|
|
336
|
+
thumbSize?: number;
|
|
337
|
+
/**
|
|
338
|
+
* Allow the thumb center to travel slightly beyond the track ends. Useful for wide custom thumbs that should visually meet the track edges.
|
|
339
|
+
*/
|
|
340
|
+
edgeOverlap?: number;
|
|
341
|
+
/**
|
|
342
|
+
* How the fill gradient should behave.
|
|
343
|
+
* - "stretch" (default): gradient is scaled to the filled portion.
|
|
344
|
+
* - "mask": gradient spans the full track and is revealed up to the thumb.
|
|
345
|
+
*/
|
|
346
|
+
fillMode?: "stretch" | "mask";
|
|
347
|
+
};
|
|
348
|
+
declare const Slider: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "defaultValue" | "onChange" | "type" | "value" | "step" | "max" | "min"> & {
|
|
349
|
+
label?: string;
|
|
350
|
+
value?: number;
|
|
351
|
+
defaultValue?: number;
|
|
352
|
+
onChange?: (value: number) => void;
|
|
353
|
+
formatValue?: (value: number) => string;
|
|
354
|
+
renderTrack?: (props: SliderRenderProps & {
|
|
355
|
+
children: React.ReactNode;
|
|
356
|
+
}) => React.ReactNode;
|
|
357
|
+
renderThumb?: (props: SliderRenderProps) => React.ReactNode;
|
|
358
|
+
trackClassName?: string;
|
|
359
|
+
thumbClassName?: string;
|
|
360
|
+
orientation?: "horizontal" | "vertical";
|
|
361
|
+
reversed?: boolean;
|
|
362
|
+
min?: number;
|
|
363
|
+
max?: number;
|
|
364
|
+
step?: number;
|
|
365
|
+
/**
|
|
366
|
+
* Approximate thumb size along the track axis (used for bounds and progress).
|
|
367
|
+
* For custom thumbs wider than tall (e.g., pills with labels), set this to the thumb's total width (horizontal) or height (vertical).
|
|
368
|
+
*/
|
|
369
|
+
thumbSize?: number;
|
|
370
|
+
/**
|
|
371
|
+
* Allow the thumb center to travel slightly beyond the track ends. Useful for wide custom thumbs that should visually meet the track edges.
|
|
372
|
+
*/
|
|
373
|
+
edgeOverlap?: number;
|
|
374
|
+
/**
|
|
375
|
+
* How the fill gradient should behave.
|
|
376
|
+
* - "stretch" (default): gradient is scaled to the filled portion.
|
|
377
|
+
* - "mask": gradient spans the full track and is revealed up to the thumb.
|
|
378
|
+
*/
|
|
379
|
+
fillMode?: "stretch" | "mask";
|
|
380
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
381
|
+
|
|
382
|
+
type StackedListItem = {
|
|
383
|
+
id: string;
|
|
384
|
+
title: string;
|
|
385
|
+
description?: string;
|
|
386
|
+
meta?: string;
|
|
387
|
+
icon?: React.ReactNode;
|
|
388
|
+
action?: React.ReactNode;
|
|
389
|
+
};
|
|
390
|
+
type StackedListProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
391
|
+
items: StackedListItem[];
|
|
392
|
+
dense?: boolean;
|
|
393
|
+
};
|
|
394
|
+
declare function StackedList({ items, dense, className, ...rest }: StackedListProps): react_jsx_runtime.JSX.Element;
|
|
395
|
+
|
|
396
|
+
type TableColumn<T> = {
|
|
397
|
+
key: keyof T;
|
|
398
|
+
header: string;
|
|
399
|
+
render?: (value: T[keyof T], row: T) => React.ReactNode;
|
|
400
|
+
align?: "left" | "right" | "center";
|
|
401
|
+
};
|
|
402
|
+
type TableProps<T> = {
|
|
403
|
+
columns: TableColumn<T>[];
|
|
404
|
+
data: T[];
|
|
405
|
+
caption?: string;
|
|
406
|
+
className?: string;
|
|
407
|
+
scrollAreaStyle?: React.CSSProperties;
|
|
408
|
+
style?: React.CSSProperties;
|
|
409
|
+
};
|
|
410
|
+
declare function Table<T extends Record<string, unknown>>({ columns, data, caption, className, scrollAreaStyle, style, }: TableProps<T>): react_jsx_runtime.JSX.Element;
|
|
411
|
+
|
|
412
|
+
type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
413
|
+
label?: string;
|
|
414
|
+
description?: string;
|
|
415
|
+
error?: string;
|
|
416
|
+
maxLength?: number;
|
|
417
|
+
showCount?: boolean;
|
|
418
|
+
resizeDirection?: "vertical" | "horizontal" | "both" | "none";
|
|
419
|
+
};
|
|
420
|
+
declare const Textarea: React.ForwardRefExoticComponent<React.TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
421
|
+
label?: string;
|
|
422
|
+
description?: string;
|
|
423
|
+
error?: string;
|
|
424
|
+
maxLength?: number;
|
|
425
|
+
showCount?: boolean;
|
|
426
|
+
resizeDirection?: "vertical" | "horizontal" | "both" | "none";
|
|
427
|
+
} & React.RefAttributes<HTMLTextAreaElement>>;
|
|
428
|
+
|
|
429
|
+
type ToggleProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onChange" | "type"> & {
|
|
430
|
+
checked?: boolean;
|
|
431
|
+
defaultChecked?: boolean;
|
|
432
|
+
onChange?: (checked: boolean) => void;
|
|
433
|
+
};
|
|
434
|
+
declare const Toggle: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onChange" | "type"> & {
|
|
435
|
+
checked?: boolean;
|
|
436
|
+
defaultChecked?: boolean;
|
|
437
|
+
onChange?: (checked: boolean) => void;
|
|
438
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
439
|
+
|
|
440
|
+
export { Alert, type AlertProps, type AlertVariant, Badge, type BadgeProps, type BadgeVariant, Button, type ButtonProps, Card, type CardProps, Checkbox, type CheckboxProps, ColorPicker, type ColorPickerProps, Combobox, type ComboboxOption, type ComboboxProps, type ComboboxRenderState, DatalistInput, type DatalistInputProps, DatePicker, type DatePickerProps, Dialog, type DialogProps, Disclosure, type DisclosureProps, Dropdown, type DropdownProps, InputField, type InputFieldProps, Meter, type MeterProps, NumberInput, type NumberInputProps, OutputChip, type OutputChipProps, Popover, type PopoverProps, Progress, type ProgressProps, Radio, type RadioProps, Select, type SelectOption, type SelectProps, Slider, type SliderProps, StackedList, type StackedListItem, type StackedListProps, Table, type TableColumn, type TableProps, Textarea, type TextareaProps, Toggle, type ToggleProps };
|