uiplex 1.0.0 → 1.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/README.md +461 -4
- package/dist/Select/Select.d.ts +28 -0
- package/dist/Select/Select.d.ts.map +1 -0
- package/dist/Select/index.d.ts +3 -0
- package/dist/Select/index.d.ts.map +1 -0
- package/dist/Tooltip/Tooltip.d.ts +1 -0
- package/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/index.cjs +228 -3
- package/dist/index.css +404 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +228 -4
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
A modern React component library built with TypeScript, featuring beautiful, accessible, and customizable UI components.
|
|
4
4
|
|
|
5
|
+
🌐 **Documentation & Live Examples:** [https://uniplex.ankitkaushal.in/](https://uniplex.ankitkaushal.in/)
|
|
6
|
+
|
|
5
7
|
## Installation
|
|
6
8
|
|
|
7
9
|
```bash
|
|
@@ -27,7 +29,7 @@ npm install react react-dom
|
|
|
27
29
|
CSS is automatically included when you import components! Just import and use:
|
|
28
30
|
|
|
29
31
|
```tsx
|
|
30
|
-
import { Button, Loader, Radio, RadioGroup, ThemeProvider } from 'uiplex';
|
|
32
|
+
import { Button, Loader, Radio, RadioGroup, Select, ThemeProvider } from 'uiplex';
|
|
31
33
|
|
|
32
34
|
function App() {
|
|
33
35
|
return (
|
|
@@ -127,6 +129,459 @@ import { Radio, RadioGroup } from 'uiplex';
|
|
|
127
129
|
- `options`: `Array<{ value: string; label?: string; description?: string; disabled?: boolean }>`
|
|
128
130
|
- `orientation`: `"horizontal" | "vertical"`
|
|
129
131
|
|
|
132
|
+
### Text
|
|
133
|
+
|
|
134
|
+
Typography component with sizes, weights, colors, and alignment options.
|
|
135
|
+
|
|
136
|
+
```tsx
|
|
137
|
+
import { Text } from 'uiplex';
|
|
138
|
+
|
|
139
|
+
<Text size="lg" weight="bold" color="primary">
|
|
140
|
+
Heading Text
|
|
141
|
+
</Text>
|
|
142
|
+
|
|
143
|
+
<Text size="md" align="center">
|
|
144
|
+
Centered text
|
|
145
|
+
</Text>
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**Props:**
|
|
149
|
+
- `size`: `"xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl"`
|
|
150
|
+
- `weight`: `"normal" | "medium" | "semibold" | "bold"`
|
|
151
|
+
- `color`: `"primary" | "secondary" | "success" | "error" | "warning" | "info"`
|
|
152
|
+
- `align`: `"left" | "center" | "right" | "justify"`
|
|
153
|
+
- `as`: `"p" | "span" | "div" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6"`
|
|
154
|
+
|
|
155
|
+
### Box
|
|
156
|
+
|
|
157
|
+
A versatile container component that serves as a building block for layouts.
|
|
158
|
+
|
|
159
|
+
```tsx
|
|
160
|
+
import { Box } from 'uiplex';
|
|
161
|
+
|
|
162
|
+
<Box padding="md" margin="lg" borderRadius="md" bg="primary">
|
|
163
|
+
Content here
|
|
164
|
+
</Box>
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
**Props:**
|
|
168
|
+
- `padding`: `string | number`
|
|
169
|
+
- `margin`: `string | number`
|
|
170
|
+
- `width`: `string | number`
|
|
171
|
+
- `height`: `string | number`
|
|
172
|
+
- `bg`: `string`
|
|
173
|
+
- `borderRadius`: `string | number`
|
|
174
|
+
- All standard HTML div props
|
|
175
|
+
|
|
176
|
+
### Flex
|
|
177
|
+
|
|
178
|
+
A flexible layout component built on CSS Flexbox.
|
|
179
|
+
|
|
180
|
+
```tsx
|
|
181
|
+
import { Flex } from 'uiplex';
|
|
182
|
+
|
|
183
|
+
<Flex direction="row" align="center" justify="space-between" gap="md">
|
|
184
|
+
<Box>Item 1</Box>
|
|
185
|
+
<Box>Item 2</Box>
|
|
186
|
+
</Flex>
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Props:**
|
|
190
|
+
- `direction`: `"row" | "column" | "row-reverse" | "column-reverse"`
|
|
191
|
+
- `align`: `"flex-start" | "flex-end" | "center" | "stretch" | "baseline"`
|
|
192
|
+
- `justify`: `"flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly"`
|
|
193
|
+
- `wrap`: `"nowrap" | "wrap" | "wrap-reverse"`
|
|
194
|
+
- `gap`: `string | number`
|
|
195
|
+
- All standard HTML div props
|
|
196
|
+
|
|
197
|
+
### Grid
|
|
198
|
+
|
|
199
|
+
CSS Grid layout component for two-dimensional layouts.
|
|
200
|
+
|
|
201
|
+
```tsx
|
|
202
|
+
import { Grid } from 'uiplex';
|
|
203
|
+
|
|
204
|
+
<Grid columns={3} gap="md" rows="auto">
|
|
205
|
+
<Box>Item 1</Box>
|
|
206
|
+
<Box>Item 2</Box>
|
|
207
|
+
<Box>Item 3</Box>
|
|
208
|
+
</Grid>
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
**Props:**
|
|
212
|
+
- `columns`: `number | string`
|
|
213
|
+
- `rows`: `number | string`
|
|
214
|
+
- `gap`: `string | number`
|
|
215
|
+
- All standard HTML div props
|
|
216
|
+
|
|
217
|
+
### Modal
|
|
218
|
+
|
|
219
|
+
Modal dialog component for overlays and popups.
|
|
220
|
+
|
|
221
|
+
```tsx
|
|
222
|
+
import { Modal, ModalOverlay, ModalContent, ModalHeader, ModalBody, ModalFooter, ModalCloseButton, useDisclosure } from 'uiplex';
|
|
223
|
+
|
|
224
|
+
function MyComponent() {
|
|
225
|
+
const { isOpen, onOpen, onClose } = useDisclosure();
|
|
226
|
+
|
|
227
|
+
return (
|
|
228
|
+
<>
|
|
229
|
+
<Button onClick={onOpen}>Open Modal</Button>
|
|
230
|
+
<Modal isOpen={isOpen} onClose={onClose}>
|
|
231
|
+
<ModalOverlay />
|
|
232
|
+
<ModalContent>
|
|
233
|
+
<ModalHeader>Modal Title</ModalHeader>
|
|
234
|
+
<ModalCloseButton />
|
|
235
|
+
<ModalBody>
|
|
236
|
+
Modal content goes here
|
|
237
|
+
</ModalBody>
|
|
238
|
+
<ModalFooter>
|
|
239
|
+
<Button onClick={onClose}>Close</Button>
|
|
240
|
+
</ModalFooter>
|
|
241
|
+
</ModalContent>
|
|
242
|
+
</Modal>
|
|
243
|
+
</>
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
**Modal Props:**
|
|
249
|
+
- `isOpen`: `boolean`
|
|
250
|
+
- `onClose`: `() => void`
|
|
251
|
+
- `size`: `"xs" | "sm" | "md" | "lg" | "xl" | "full"`
|
|
252
|
+
- `closeOnOverlayClick`: `boolean`
|
|
253
|
+
- `closeOnEsc`: `boolean`
|
|
254
|
+
|
|
255
|
+
### Input
|
|
256
|
+
|
|
257
|
+
Form input component with validation support.
|
|
258
|
+
|
|
259
|
+
```tsx
|
|
260
|
+
import { Input, FormControl, FormLabel, FormErrorMessage } from 'uiplex';
|
|
261
|
+
|
|
262
|
+
<FormControl isInvalid={hasError}>
|
|
263
|
+
<FormLabel>Email</FormLabel>
|
|
264
|
+
<Input
|
|
265
|
+
type="email"
|
|
266
|
+
placeholder="Enter your email"
|
|
267
|
+
value={email}
|
|
268
|
+
onChange={(e) => setEmail(e.target.value)}
|
|
269
|
+
/>
|
|
270
|
+
<FormErrorMessage>Email is required</FormErrorMessage>
|
|
271
|
+
</FormControl>
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
**Input Props:**
|
|
275
|
+
- `size`: `"sm" | "md" | "lg"`
|
|
276
|
+
- `variant`: `"outline" | "filled" | "flushed" | "unstyled"`
|
|
277
|
+
- `isInvalid`: `boolean`
|
|
278
|
+
- `isDisabled`: `boolean`
|
|
279
|
+
- `isReadOnly`: `boolean`
|
|
280
|
+
- All standard HTML input props
|
|
281
|
+
|
|
282
|
+
### Textarea
|
|
283
|
+
|
|
284
|
+
Multi-line text input component.
|
|
285
|
+
|
|
286
|
+
```tsx
|
|
287
|
+
import { Textarea } from 'uiplex';
|
|
288
|
+
|
|
289
|
+
<Textarea
|
|
290
|
+
placeholder="Enter your message"
|
|
291
|
+
rows={4}
|
|
292
|
+
value={message}
|
|
293
|
+
onChange={(e) => setMessage(e.target.value)}
|
|
294
|
+
/>
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
**Props:**
|
|
298
|
+
- `size`: `"sm" | "md" | "lg"`
|
|
299
|
+
- `variant`: `"outline" | "filled" | "flushed" | "unstyled"`
|
|
300
|
+
- `isInvalid`: `boolean`
|
|
301
|
+
- `isDisabled`: `boolean`
|
|
302
|
+
- All standard HTML textarea props
|
|
303
|
+
|
|
304
|
+
### Select
|
|
305
|
+
|
|
306
|
+
Custom dropdown select component with single and multi-select modes, search functionality, and validation support.
|
|
307
|
+
|
|
308
|
+
```tsx
|
|
309
|
+
import { Select, FormControl, FormLabel, FormErrorMessage } from 'uiplex';
|
|
310
|
+
|
|
311
|
+
// Single select
|
|
312
|
+
<Select
|
|
313
|
+
placeholder="Select an option"
|
|
314
|
+
options={[
|
|
315
|
+
{ value: 'option1', label: 'Option 1' },
|
|
316
|
+
{ value: 'option2', label: 'Option 2' },
|
|
317
|
+
{ value: 'option3', label: 'Option 3' },
|
|
318
|
+
]}
|
|
319
|
+
value={value}
|
|
320
|
+
onChange={(value) => setValue(value)}
|
|
321
|
+
/>
|
|
322
|
+
|
|
323
|
+
// Multi-select
|
|
324
|
+
<Select
|
|
325
|
+
mode="multiple"
|
|
326
|
+
placeholder="Select multiple options"
|
|
327
|
+
options={options}
|
|
328
|
+
value={values}
|
|
329
|
+
onChange={(values) => setValues(values)}
|
|
330
|
+
/>
|
|
331
|
+
|
|
332
|
+
// With search
|
|
333
|
+
<Select
|
|
334
|
+
searchable
|
|
335
|
+
placeholder="Search and select..."
|
|
336
|
+
options={options}
|
|
337
|
+
/>
|
|
338
|
+
|
|
339
|
+
// With FormControl
|
|
340
|
+
<FormControl isInvalid={hasError}>
|
|
341
|
+
<FormLabel>Country</FormLabel>
|
|
342
|
+
<Select
|
|
343
|
+
placeholder="Select a country"
|
|
344
|
+
options={countries}
|
|
345
|
+
value={country}
|
|
346
|
+
onChange={(value) => setCountry(value)}
|
|
347
|
+
/>
|
|
348
|
+
<FormErrorMessage>Country is required</FormErrorMessage>
|
|
349
|
+
</FormControl>
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
**Select Props:**
|
|
353
|
+
- `size`: `"sm" | "md" | "lg"`
|
|
354
|
+
- `variant`: `"outline" | "filled" | "unstyled"`
|
|
355
|
+
- `mode`: `"single" | "multiple"` (default: `"single"`)
|
|
356
|
+
- `searchable`: `boolean` (default: `false`)
|
|
357
|
+
- `allowClear`: `boolean` (default: `false`)
|
|
358
|
+
- `options`: `SelectOption[]` - Array of option objects
|
|
359
|
+
- `value`: `string | number | (string | number)[]` - Controlled value
|
|
360
|
+
- `defaultValue`: `string | number | (string | number)[]` - Default value (uncontrolled)
|
|
361
|
+
- `onChange`: `(value) => void` - Callback when value changes
|
|
362
|
+
- `placeholder`: `string` (default: `"Select..."`)
|
|
363
|
+
- `width`: `string | number` - Width of the select component
|
|
364
|
+
- `isInvalid`: `boolean`
|
|
365
|
+
- `isDisabled`: `boolean`
|
|
366
|
+
- `isReadOnly`: `boolean`
|
|
367
|
+
|
|
368
|
+
**SelectOption:**
|
|
369
|
+
- `value`: `string | number` - Option value
|
|
370
|
+
- `label`: `string` - Option display text
|
|
371
|
+
- `disabled`: `boolean` - Whether the option is disabled
|
|
372
|
+
|
|
373
|
+
### Link
|
|
374
|
+
|
|
375
|
+
Link component with multiple variants and color schemes.
|
|
376
|
+
|
|
377
|
+
```tsx
|
|
378
|
+
import { Link } from 'uiplex';
|
|
379
|
+
|
|
380
|
+
<Link href="/about" variant="primary" size="md">
|
|
381
|
+
Learn More
|
|
382
|
+
</Link>
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
**Props:**
|
|
386
|
+
- `variant`: `"primary" | "secondary" | "underline"`
|
|
387
|
+
- `size`: `"sm" | "md" | "lg"`
|
|
388
|
+
- `colorScheme`: `"blue" | "green" | "red" | "yellow" | "purple" | "gray"`
|
|
389
|
+
- All standard HTML anchor props
|
|
390
|
+
|
|
391
|
+
### IconButton
|
|
392
|
+
|
|
393
|
+
Button component specifically designed for icons.
|
|
394
|
+
|
|
395
|
+
```tsx
|
|
396
|
+
import { IconButton } from 'uiplex';
|
|
397
|
+
import { Mail } from 'feather-icons-react';
|
|
398
|
+
|
|
399
|
+
<IconButton
|
|
400
|
+
icon={<Mail size={18} />}
|
|
401
|
+
variant="primary"
|
|
402
|
+
size="md"
|
|
403
|
+
aria-label="Send email"
|
|
404
|
+
/>
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
**Props:**
|
|
408
|
+
- `icon`: `ReactNode` (required)
|
|
409
|
+
- `variant`: `"primary" | "secondary" | "outline" | "ghost"`
|
|
410
|
+
- `size`: `"sm" | "md" | "lg"`
|
|
411
|
+
- `colorScheme`: `"blue" | "green" | "red" | "yellow" | "purple" | "gray"`
|
|
412
|
+
- `disabled`: `boolean`
|
|
413
|
+
- `aria-label`: `string` (required for accessibility)
|
|
414
|
+
|
|
415
|
+
### CircularProgress
|
|
416
|
+
|
|
417
|
+
Circular progress indicator for loading states and progress values.
|
|
418
|
+
|
|
419
|
+
```tsx
|
|
420
|
+
import { CircularProgress, CircularProgressLabel } from 'uiplex';
|
|
421
|
+
|
|
422
|
+
<CircularProgress value={75} size={64}>
|
|
423
|
+
<CircularProgressLabel>75%</CircularProgressLabel>
|
|
424
|
+
</CircularProgress>
|
|
425
|
+
|
|
426
|
+
<CircularProgress isIndeterminate size={48} />
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
**Props:**
|
|
430
|
+
- `value`: `number` (0-100)
|
|
431
|
+
- `min`: `number`
|
|
432
|
+
- `max`: `number`
|
|
433
|
+
- `size`: `number | string`
|
|
434
|
+
- `thickness`: `number`
|
|
435
|
+
- `color`: `string`
|
|
436
|
+
- `trackColor`: `string`
|
|
437
|
+
- `isIndeterminate`: `boolean`
|
|
438
|
+
|
|
439
|
+
### Tooltip
|
|
440
|
+
|
|
441
|
+
Contextual information displayed on hover.
|
|
442
|
+
|
|
443
|
+
```tsx
|
|
444
|
+
import { Tooltip } from 'uiplex';
|
|
445
|
+
|
|
446
|
+
<Tooltip label="This is a helpful tooltip" placement="top" width={200}>
|
|
447
|
+
<Button>Hover me</Button>
|
|
448
|
+
</Tooltip>
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
**Props:**
|
|
452
|
+
- `label`: `string` (required)
|
|
453
|
+
- `placement`: `"top" | "bottom" | "left" | "right"`
|
|
454
|
+
- `width`: `string | number` (for wrapping long text)
|
|
455
|
+
- `isOpen`: `boolean` (controlled)
|
|
456
|
+
- `defaultIsOpen`: `boolean`
|
|
457
|
+
- `closeOnClick`: `boolean`
|
|
458
|
+
|
|
459
|
+
### Popover
|
|
460
|
+
|
|
461
|
+
Floating content container with positioning and triggers.
|
|
462
|
+
|
|
463
|
+
```tsx
|
|
464
|
+
import { Popover, PopoverContent, PopoverHeader, PopoverBody, PopoverFooter, PopoverCloseButton } from 'uiplex';
|
|
465
|
+
|
|
466
|
+
<Popover
|
|
467
|
+
content={
|
|
468
|
+
<PopoverContent>
|
|
469
|
+
<PopoverHeader>Popover Title</PopoverHeader>
|
|
470
|
+
<PopoverBody>Popover content</PopoverBody>
|
|
471
|
+
<PopoverFooter>
|
|
472
|
+
<PopoverCloseButton onClose={handleClose} />
|
|
473
|
+
</PopoverFooter>
|
|
474
|
+
</PopoverContent>
|
|
475
|
+
}
|
|
476
|
+
placement="bottom"
|
|
477
|
+
trigger="click"
|
|
478
|
+
>
|
|
479
|
+
<Button>Open Popover</Button>
|
|
480
|
+
</Popover>
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
**Props:**
|
|
484
|
+
- `content`: `ReactNode` (required)
|
|
485
|
+
- `placement`: `"top" | "bottom" | "left" | "right" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end"`
|
|
486
|
+
- `trigger`: `"click" | "hover"`
|
|
487
|
+
- `isOpen`: `boolean` (controlled)
|
|
488
|
+
- `defaultIsOpen`: `boolean`
|
|
489
|
+
- `closeOnBlur`: `boolean`
|
|
490
|
+
- `showArrow`: `boolean`
|
|
491
|
+
|
|
492
|
+
### Toast
|
|
493
|
+
|
|
494
|
+
Toast notifications for displaying temporary messages.
|
|
495
|
+
|
|
496
|
+
```tsx
|
|
497
|
+
import { Toast, ToastContainerGlobal } from 'uiplex';
|
|
498
|
+
|
|
499
|
+
// Add ToastContainerGlobal to your root layout
|
|
500
|
+
<ToastContainerGlobal />
|
|
501
|
+
|
|
502
|
+
// Use Toast static methods
|
|
503
|
+
Toast.success("Operation completed!");
|
|
504
|
+
Toast.error("Something went wrong");
|
|
505
|
+
Toast.warning("Please check your input");
|
|
506
|
+
Toast.info("New update available");
|
|
507
|
+
|
|
508
|
+
// With options
|
|
509
|
+
Toast.success({
|
|
510
|
+
title: "Success!",
|
|
511
|
+
description: "Your changes have been saved.",
|
|
512
|
+
duration: 3000
|
|
513
|
+
});
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
**Toast Methods:**
|
|
517
|
+
- `Toast.success(messageOrOptions, options?)`
|
|
518
|
+
- `Toast.error(messageOrOptions, options?)`
|
|
519
|
+
- `Toast.warning(messageOrOptions, options?)`
|
|
520
|
+
- `Toast.info(messageOrOptions, options?)`
|
|
521
|
+
- `Toast.close(id)`
|
|
522
|
+
- `Toast.closeAll()`
|
|
523
|
+
|
|
524
|
+
### FormControl, FormLabel, FormErrorMessage
|
|
525
|
+
|
|
526
|
+
Form control components for building accessible forms.
|
|
527
|
+
|
|
528
|
+
```tsx
|
|
529
|
+
import { FormControl, FormLabel, FormErrorMessage } from 'uiplex';
|
|
530
|
+
|
|
531
|
+
<FormControl isInvalid={hasError} isRequired>
|
|
532
|
+
<FormLabel>Username</FormLabel>
|
|
533
|
+
<Input value={username} onChange={handleChange} />
|
|
534
|
+
<FormErrorMessage>Username is required</FormErrorMessage>
|
|
535
|
+
</FormControl>
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
**FormControl Props:**
|
|
539
|
+
- `isInvalid`: `boolean`
|
|
540
|
+
- `isDisabled`: `boolean`
|
|
541
|
+
- `isRequired`: `boolean`
|
|
542
|
+
|
|
543
|
+
## Hooks
|
|
544
|
+
|
|
545
|
+
### useDisclosure
|
|
546
|
+
|
|
547
|
+
Hook for managing open/close state (useful for modals, popovers, etc.).
|
|
548
|
+
|
|
549
|
+
```tsx
|
|
550
|
+
import { useDisclosure } from 'uiplex';
|
|
551
|
+
|
|
552
|
+
function MyComponent() {
|
|
553
|
+
const { isOpen, onOpen, onClose, onToggle } = useDisclosure();
|
|
554
|
+
|
|
555
|
+
return (
|
|
556
|
+
<>
|
|
557
|
+
<Button onClick={onOpen}>Open</Button>
|
|
558
|
+
{isOpen && <Modal onClose={onClose}>Content</Modal>}
|
|
559
|
+
</>
|
|
560
|
+
);
|
|
561
|
+
}
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
### useOutsideClick
|
|
565
|
+
|
|
566
|
+
Hook for detecting clicks outside an element.
|
|
567
|
+
|
|
568
|
+
```tsx
|
|
569
|
+
import { useOutsideClick } from 'uiplex';
|
|
570
|
+
|
|
571
|
+
function MyComponent() {
|
|
572
|
+
const ref = useRef(null);
|
|
573
|
+
|
|
574
|
+
useOutsideClick({
|
|
575
|
+
refs: [ref],
|
|
576
|
+
handler: () => {
|
|
577
|
+
// Handle outside click
|
|
578
|
+
}
|
|
579
|
+
});
|
|
580
|
+
|
|
581
|
+
return <div ref={ref}>Content</div>;
|
|
582
|
+
}
|
|
583
|
+
```
|
|
584
|
+
|
|
130
585
|
## Theme System
|
|
131
586
|
|
|
132
587
|
The library includes a comprehensive theme system with light, dark, and system preference support.
|
|
@@ -185,9 +640,11 @@ import { ThemeToggle } from 'uiplex';
|
|
|
185
640
|
|
|
186
641
|
The bundled CSS includes:
|
|
187
642
|
- Theme CSS variables (light/dark mode support)
|
|
188
|
-
- Button styles
|
|
189
|
-
-
|
|
190
|
-
-
|
|
643
|
+
- Button, Loader, Radio styles
|
|
644
|
+
- Text, Box, Flex, Grid layout styles
|
|
645
|
+
- Modal, Input, Textarea, Select, FormControl styles
|
|
646
|
+
- Link, IconButton, CircularProgress styles
|
|
647
|
+
- Tooltip, Toast, Popover styles
|
|
191
648
|
|
|
192
649
|
All components automatically adapt to the current theme (light/dark) based on CSS variables.
|
|
193
650
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./Select.css";
|
|
3
|
+
export interface SelectOption {
|
|
4
|
+
value: string | number;
|
|
5
|
+
label: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface SelectProps {
|
|
9
|
+
size?: "sm" | "md" | "lg";
|
|
10
|
+
variant?: "outline" | "filled" | "unstyled";
|
|
11
|
+
isInvalid?: boolean;
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
isReadOnly?: boolean;
|
|
14
|
+
options?: SelectOption[];
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
value?: string | number | (string | number)[];
|
|
17
|
+
defaultValue?: string | number | (string | number)[];
|
|
18
|
+
onChange?: (value: string | number | (string | number)[]) => void;
|
|
19
|
+
mode?: "single" | "multiple";
|
|
20
|
+
searchable?: boolean;
|
|
21
|
+
allowClear?: boolean;
|
|
22
|
+
width?: string | number;
|
|
23
|
+
className?: string;
|
|
24
|
+
style?: React.CSSProperties;
|
|
25
|
+
id?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare const Select: React.FC<SelectProps>;
|
|
28
|
+
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../src/Select/Select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAGxE,OAAO,cAAc,CAAC;AAEtB,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC;IAC5C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC9C,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACrD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAK,IAAI,CAAC;IAClE,IAAI,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAsZxC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Select/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAEhD,OAAO,eAAe,CAAC;AAEvB,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IAChD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAEhD,OAAO,eAAe,CAAC;AAEvB,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IAChD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA2E1C,CAAC"}
|