@rhavenside/custom-ui-library 1.0.0 → 1.0.2
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 +535 -145
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,74 +1,476 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @rhavenside/custom-ui-library
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A reusable React UI component library with CSS variables for complete customization.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install
|
|
8
|
+
npm install @rhavenside/custom-ui-library
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Usage
|
|
12
12
|
|
|
13
13
|
### JavaScript Import
|
|
14
14
|
|
|
15
15
|
```javascript
|
|
16
|
-
import { Button, Input, Modal, Progress } from '
|
|
16
|
+
import { Button, Input, Modal, Progress } from '@rhavenside/custom-ui-library';
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
### CSS Import
|
|
20
20
|
|
|
21
21
|
```javascript
|
|
22
|
-
import '
|
|
22
|
+
import '@rhavenside/custom-ui-library/dist/style.css';
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
###
|
|
25
|
+
### Example
|
|
26
26
|
|
|
27
27
|
```jsx
|
|
28
28
|
import React from 'react';
|
|
29
|
-
import { Button, Input, Modal } from '
|
|
30
|
-
import '
|
|
29
|
+
import { Button, Input, Modal } from '@rhavenside/custom-ui-library';
|
|
30
|
+
import '@rhavenside/custom-ui-library/dist/style.css';
|
|
31
31
|
|
|
32
32
|
function App() {
|
|
33
33
|
return (
|
|
34
34
|
<div>
|
|
35
|
-
<Button variant="primary">
|
|
36
|
-
<Input label="Name" placeholder="
|
|
35
|
+
<Button variant="primary">Click me</Button>
|
|
36
|
+
<Input label="Name" placeholder="Your name" />
|
|
37
37
|
<Modal isOpen={true} onClose={() => {}}>
|
|
38
|
-
<h2>Modal
|
|
39
|
-
<p>Modal
|
|
38
|
+
<h2>Modal Title</h2>
|
|
39
|
+
<p>Modal Content</p>
|
|
40
40
|
</Modal>
|
|
41
41
|
</div>
|
|
42
42
|
);
|
|
43
43
|
}
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
##
|
|
46
|
+
## Components
|
|
47
|
+
|
|
48
|
+
- **Button** - Customizable buttons with various variants
|
|
49
|
+
- **Input** - Text input fields with labels and error states
|
|
50
|
+
- **Modal** - Modals with various sizes and positions
|
|
51
|
+
- **Card** - Card components for content display
|
|
52
|
+
- **Badge** - Badges with various variants
|
|
53
|
+
- **Dropdown** - Dropdown menus with options
|
|
54
|
+
- **Toggle** - Toggle/Switch components
|
|
55
|
+
- **Textarea** - Multi-line text input fields
|
|
56
|
+
- **Select** - Select dropdowns with custom dropdown
|
|
57
|
+
- **Checkbox** - Checkbox components
|
|
58
|
+
- **Radio** - Radio button components
|
|
59
|
+
- **Progress** - Horizontal progress bars
|
|
60
|
+
- **ProgressRadio** - Progress bars with radio button control
|
|
61
|
+
- **ProgressCircle** - Circular progress bars (HSL-based)
|
|
62
|
+
- **ProgressBubble** - Progress bars with water effect
|
|
63
|
+
|
|
64
|
+
## Component API (Props)
|
|
47
65
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
66
|
+
### Button
|
|
67
|
+
|
|
68
|
+
```jsx
|
|
69
|
+
<Button
|
|
70
|
+
variant="primary" // 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'outline' | 'ghost' | 'link'
|
|
71
|
+
size="medium" // 'small' | 'medium' | 'large'
|
|
72
|
+
disabled={false} // boolean
|
|
73
|
+
loading={false} // boolean - shows spinner
|
|
74
|
+
icon={null} // ReactNode - Icon-Element
|
|
75
|
+
iconPosition="left" // 'left' | 'right'
|
|
76
|
+
fullWidth={false} // boolean
|
|
77
|
+
type="button" // 'button' | 'submit' | 'reset'
|
|
78
|
+
onClick={handler} // function
|
|
79
|
+
className="" // string
|
|
80
|
+
style={{}} // object - inline styles
|
|
81
|
+
>
|
|
82
|
+
Button Text
|
|
83
|
+
</Button>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Input
|
|
87
|
+
|
|
88
|
+
```jsx
|
|
89
|
+
<Input
|
|
90
|
+
type="text" // string - HTML input type
|
|
91
|
+
variant="default" // 'default' | 'filled' | 'outlined'
|
|
92
|
+
label="Label" // string
|
|
93
|
+
placeholder="Placeholder" // string
|
|
94
|
+
value={value} // string (controlled)
|
|
95
|
+
defaultValue="" // string (uncontrolled)
|
|
96
|
+
error="Error message" // string
|
|
97
|
+
helperText="Helper text" // string
|
|
98
|
+
icon={null} // ReactNode
|
|
99
|
+
iconPosition="left" // 'left' | 'right'
|
|
100
|
+
disabled={false} // boolean
|
|
101
|
+
required={false} // boolean
|
|
102
|
+
fullWidth={false} // boolean
|
|
103
|
+
floatingLabel={false} // boolean
|
|
104
|
+
onChange={handler} // function
|
|
105
|
+
onFocus={handler} // function
|
|
106
|
+
onBlur={handler} // function
|
|
107
|
+
className="" // string
|
|
108
|
+
style={{}} // object
|
|
109
|
+
wrapperStyle={{}} // object
|
|
110
|
+
inputStyle={{}} // object
|
|
111
|
+
/>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Modal
|
|
115
|
+
|
|
116
|
+
```jsx
|
|
117
|
+
<Modal
|
|
118
|
+
isOpen={false} // boolean
|
|
119
|
+
onClose={handler} // function
|
|
120
|
+
title="Modal Title" // string
|
|
121
|
+
size="medium" // 'small' | 'medium' | 'large' | 'xlarge'
|
|
122
|
+
variant="center" // 'center' | 'top' | 'bottom' | 'left' | 'right'
|
|
123
|
+
closeOnOverlayClick={true} // boolean
|
|
124
|
+
showCloseButton={true} // boolean
|
|
125
|
+
footer={null} // ReactNode
|
|
126
|
+
className="" // string
|
|
127
|
+
style={{}} // object
|
|
128
|
+
overlayStyle={{}} // object
|
|
129
|
+
>
|
|
130
|
+
Modal Content
|
|
131
|
+
</Modal>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Card
|
|
135
|
+
|
|
136
|
+
```jsx
|
|
137
|
+
<Card
|
|
138
|
+
variant="default" // 'default' | 'outlined' | 'elevated'
|
|
139
|
+
hover={false} // boolean - hover effect
|
|
140
|
+
padding="medium" // 'none' | 'small' | 'medium' | 'large'
|
|
141
|
+
title="Card Title" // string
|
|
142
|
+
subtitle="Subtitle" // string
|
|
143
|
+
image="url" // string
|
|
144
|
+
imageAlt="Alt text" // string
|
|
145
|
+
actions={null} // ReactNode - Footer-Actions
|
|
146
|
+
onClick={handler} // function
|
|
147
|
+
className="" // string
|
|
148
|
+
style={{}} // object
|
|
149
|
+
>
|
|
150
|
+
Card Content
|
|
151
|
+
</Card>
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Badge
|
|
155
|
+
|
|
156
|
+
```jsx
|
|
157
|
+
<Badge
|
|
158
|
+
text="Badge" // string - or use children
|
|
159
|
+
variant="default" // 'default' | 'primary' | 'success' | 'danger' | 'warning' | 'info'
|
|
160
|
+
size="medium" // 'small' | 'medium' | 'large'
|
|
161
|
+
className="" // string
|
|
162
|
+
style={{}} // object
|
|
163
|
+
>
|
|
164
|
+
Badge Text
|
|
165
|
+
</Badge>
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Dropdown
|
|
169
|
+
|
|
170
|
+
```jsx
|
|
171
|
+
<Dropdown
|
|
172
|
+
options={[]} // Array<{value: any, label: string, disabled?: boolean}>
|
|
173
|
+
value={value} // any (controlled)
|
|
174
|
+
defaultValue={null} // any (uncontrolled)
|
|
175
|
+
onChange={handler} // function
|
|
176
|
+
placeholder="Select..." // string
|
|
177
|
+
disabled={false} // boolean
|
|
178
|
+
searchable={false} // boolean
|
|
179
|
+
multiSelect={false} // boolean
|
|
180
|
+
error={false} // boolean
|
|
181
|
+
className="" // string
|
|
182
|
+
style={{}} // object
|
|
183
|
+
triggerStyle={{}} // object
|
|
184
|
+
menuStyle={{}} // object
|
|
185
|
+
/>
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Select
|
|
189
|
+
|
|
190
|
+
```jsx
|
|
191
|
+
<Select
|
|
192
|
+
options={[]} // Array<{value: any, label: string, disabled?: boolean}>
|
|
193
|
+
value={value} // any (controlled)
|
|
194
|
+
defaultValue={null} // any (uncontrolled)
|
|
195
|
+
onChange={handler} // function - receives synthetic event
|
|
196
|
+
placeholder="Select..." // string
|
|
197
|
+
label="Label" // string
|
|
198
|
+
error="Error message" // string
|
|
199
|
+
helperText="Helper text" // string
|
|
200
|
+
disabled={false} // boolean
|
|
201
|
+
required={false} // boolean
|
|
202
|
+
fullWidth={false} // boolean
|
|
203
|
+
searchable={false} // boolean
|
|
204
|
+
name="select" // string
|
|
205
|
+
className="" // string
|
|
206
|
+
style={{}} // object
|
|
207
|
+
/>
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Toggle
|
|
211
|
+
|
|
212
|
+
```jsx
|
|
213
|
+
<Toggle
|
|
214
|
+
checked={false} // boolean
|
|
215
|
+
onChange={handler} // function(checked: boolean)
|
|
216
|
+
disabled={false} // boolean
|
|
217
|
+
size="medium" // 'small' | 'medium' | 'large'
|
|
218
|
+
variant="default" // 'default' | 'primary' | 'success' | 'danger' | 'warning' | 'info'
|
|
219
|
+
label="Toggle Label" // string
|
|
220
|
+
labelPosition="right" // 'left' | 'right'
|
|
221
|
+
className="" // string
|
|
222
|
+
style={{}} // object
|
|
223
|
+
switchStyle={{}} // object
|
|
224
|
+
/>
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### Textarea
|
|
228
|
+
|
|
229
|
+
```jsx
|
|
230
|
+
<Textarea
|
|
231
|
+
variant="default" // 'default' | 'filled' | 'outlined'
|
|
232
|
+
label="Label" // string
|
|
233
|
+
placeholder="Placeholder" // string
|
|
234
|
+
value={value} // string (controlled)
|
|
235
|
+
defaultValue="" // string (uncontrolled)
|
|
236
|
+
error="Error message" // string
|
|
237
|
+
helperText="Helper text" // string
|
|
238
|
+
disabled={false} // boolean
|
|
239
|
+
required={false} // boolean
|
|
240
|
+
fullWidth={false} // boolean
|
|
241
|
+
rows={4} // number
|
|
242
|
+
resize="vertical" // 'none' | 'both' | 'horizontal' | 'vertical'
|
|
243
|
+
onChange={handler} // function
|
|
244
|
+
onFocus={handler} // function
|
|
245
|
+
onBlur={handler} // function
|
|
246
|
+
className="" // string
|
|
247
|
+
style={{}} // object
|
|
248
|
+
wrapperStyle={{}} // object
|
|
249
|
+
textareaStyle={{}} // object
|
|
250
|
+
/>
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Checkbox
|
|
254
|
+
|
|
255
|
+
```jsx
|
|
256
|
+
<Checkbox
|
|
257
|
+
checked={false} // boolean
|
|
258
|
+
onChange={handler} // function(checked: boolean)
|
|
259
|
+
disabled={false} // boolean
|
|
260
|
+
label="Checkbox Label" // string
|
|
261
|
+
labelPosition="right" // 'left' | 'right'
|
|
262
|
+
size="medium" // 'small' | 'medium' | 'large'
|
|
263
|
+
variant="default" // 'default' | 'primary' | 'success' | 'danger' | 'warning' | 'info'
|
|
264
|
+
indeterminate={false} // boolean
|
|
265
|
+
className="" // string
|
|
266
|
+
style={{}} // object
|
|
267
|
+
boxStyle={{}} // object
|
|
268
|
+
/>
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Radio
|
|
63
272
|
|
|
64
|
-
|
|
273
|
+
```jsx
|
|
274
|
+
<Radio
|
|
275
|
+
checked={false} // boolean
|
|
276
|
+
onChange={handler} // function(value: any)
|
|
277
|
+
disabled={false} // boolean
|
|
278
|
+
label="Radio Label" // string
|
|
279
|
+
labelPosition="right" // 'left' | 'right'
|
|
280
|
+
size="medium" // 'small' | 'medium' | 'large'
|
|
281
|
+
variant="default" // 'default' | 'primary' | 'success' | 'danger' | 'warning' | 'info'
|
|
282
|
+
name="radio-group" // string - for radio groups
|
|
283
|
+
value="radio-value" // any
|
|
284
|
+
className="" // string
|
|
285
|
+
style={{}} // object
|
|
286
|
+
circleStyle={{}} // object
|
|
287
|
+
/>
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Progress
|
|
291
|
+
|
|
292
|
+
```jsx
|
|
293
|
+
<Progress
|
|
294
|
+
value={50} // number - current value
|
|
295
|
+
max={100} // number - maximum value
|
|
296
|
+
variant="default" // 'default' | 'success' | 'danger' | 'warning' | 'info'
|
|
297
|
+
size="medium" // 'small' | 'medium' | 'large'
|
|
298
|
+
showLabel={false} // boolean - shows percentage
|
|
299
|
+
label="50%" // string - custom label
|
|
300
|
+
animated={false} // boolean - enable animation
|
|
301
|
+
striped={false} // boolean - striped pattern
|
|
302
|
+
pulse={false} // boolean - pulse animation
|
|
303
|
+
shimmer={false} // boolean - shimmer animation
|
|
304
|
+
animationSpeed="normal" // 'slow' | 'normal' | 'fast' | number (seconds)
|
|
305
|
+
vertical={false} // boolean - vertical orientation
|
|
306
|
+
className="" // string
|
|
307
|
+
style={{}} // object
|
|
308
|
+
barStyle={{}} // object
|
|
309
|
+
/>
|
|
310
|
+
```
|
|
65
311
|
|
|
66
|
-
|
|
312
|
+
### ProgressRadio
|
|
67
313
|
|
|
68
|
-
|
|
314
|
+
```jsx
|
|
315
|
+
<ProgressRadio
|
|
316
|
+
options={[ // Array<{value: number, label: string, color: string}>
|
|
317
|
+
{ value: 5, label: '5%', color: '#f63a0f' },
|
|
318
|
+
{ value: 25, label: '25%', color: '#f27011' },
|
|
319
|
+
{ value: 50, label: '50%', color: '#f2b01e' },
|
|
320
|
+
{ value: 75, label: '75%', color: '#f2d31b' },
|
|
321
|
+
{ value: 100, label: '100%', color: '#86e01e' }
|
|
322
|
+
]}
|
|
323
|
+
defaultValue={25} // number
|
|
324
|
+
name="progress" // string
|
|
325
|
+
className="" // string
|
|
326
|
+
style={{}} // object
|
|
327
|
+
barStyle={{}} // object
|
|
328
|
+
/>
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### ProgressCircle
|
|
332
|
+
|
|
333
|
+
```jsx
|
|
334
|
+
<ProgressCircle
|
|
335
|
+
value={50} // number - current value
|
|
336
|
+
max={100} // number - maximum value
|
|
337
|
+
size="medium" // 'small' | 'medium' | 'large'
|
|
338
|
+
showLabel={false} // boolean - shows percentage
|
|
339
|
+
label="50%" // string - custom label
|
|
340
|
+
textFormat={(value) => `${value}%`} // function - custom text formatting
|
|
341
|
+
animationDuration={400} // number - animation duration in ms
|
|
342
|
+
className="" // string
|
|
343
|
+
style={{}} // object
|
|
344
|
+
/>
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
### ProgressBubble
|
|
348
|
+
|
|
349
|
+
```jsx
|
|
350
|
+
<ProgressBubble
|
|
351
|
+
value={50} // number - current value
|
|
352
|
+
max={100} // number - maximum value
|
|
353
|
+
size="medium" // 'small' | 'medium' | 'large'
|
|
354
|
+
showLabel={false} // boolean - shows percentage
|
|
355
|
+
label="50%" // string - custom label
|
|
356
|
+
animationSpeed="normal" // 'slow' | 'normal' | 'fast' | number (seconds)
|
|
357
|
+
animateCounter={false} // boolean - animates counter with jQuery
|
|
358
|
+
counterDuration={5000} // number - counter animation duration in ms
|
|
359
|
+
className="" // string
|
|
360
|
+
style={{}} // object
|
|
361
|
+
/>
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
**Note:** All components additionally support:
|
|
365
|
+
- `className` - for additional CSS classes
|
|
366
|
+
- `style` - for inline styles
|
|
367
|
+
- Additional HTML attributes are passed through via `{...props}`
|
|
368
|
+
|
|
369
|
+
### Practical Examples
|
|
370
|
+
|
|
371
|
+
#### Button with Icon and Loading State
|
|
372
|
+
|
|
373
|
+
```jsx
|
|
374
|
+
import { Button } from '@rhavenside/custom-ui-library';
|
|
375
|
+
|
|
376
|
+
<Button
|
|
377
|
+
variant="primary"
|
|
378
|
+
size="large"
|
|
379
|
+
icon={<Icon />}
|
|
380
|
+
iconPosition="left"
|
|
381
|
+
loading={isLoading}
|
|
382
|
+
onClick={handleSubmit}
|
|
383
|
+
>
|
|
384
|
+
Save
|
|
385
|
+
</Button>
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
#### Input with Floating Label and Validation
|
|
389
|
+
|
|
390
|
+
```jsx
|
|
391
|
+
import { Input } from '@rhavenside/custom-ui-library';
|
|
392
|
+
|
|
393
|
+
<Input
|
|
394
|
+
type="email"
|
|
395
|
+
label="Email"
|
|
396
|
+
floatingLabel={true}
|
|
397
|
+
required={true}
|
|
398
|
+
error={errors.email}
|
|
399
|
+
helperText="Please enter a valid email address"
|
|
400
|
+
icon={<MailIcon />}
|
|
401
|
+
iconPosition="left"
|
|
402
|
+
value={email}
|
|
403
|
+
onChange={(e) => setEmail(e.target.value)}
|
|
404
|
+
/>
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
#### Modal with Footer Actions
|
|
408
|
+
|
|
409
|
+
```jsx
|
|
410
|
+
import { Modal, Button } from '@rhavenside/custom-ui-library';
|
|
411
|
+
|
|
412
|
+
<Modal
|
|
413
|
+
isOpen={isOpen}
|
|
414
|
+
onClose={() => setIsOpen(false)}
|
|
415
|
+
title="Confirmation"
|
|
416
|
+
size="medium"
|
|
417
|
+
footer={
|
|
418
|
+
<>
|
|
419
|
+
<Button variant="outline" onClick={() => setIsOpen(false)}>
|
|
420
|
+
Cancel
|
|
421
|
+
</Button>
|
|
422
|
+
<Button variant="primary" onClick={handleConfirm}>
|
|
423
|
+
Confirm
|
|
424
|
+
</Button>
|
|
425
|
+
</>
|
|
426
|
+
}
|
|
427
|
+
>
|
|
428
|
+
Are you sure you want to continue?
|
|
429
|
+
</Modal>
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
#### Progress with Animations
|
|
433
|
+
|
|
434
|
+
```jsx
|
|
435
|
+
import { Progress } from '@rhavenside/custom-ui-library';
|
|
436
|
+
|
|
437
|
+
<Progress
|
|
438
|
+
value={75}
|
|
439
|
+
variant="success"
|
|
440
|
+
animated={true}
|
|
441
|
+
striped={true}
|
|
442
|
+
pulse={true}
|
|
443
|
+
showLabel={true}
|
|
444
|
+
animationSpeed="fast"
|
|
445
|
+
/>
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
#### Dropdown with Search and Multi-Select
|
|
449
|
+
|
|
450
|
+
```jsx
|
|
451
|
+
import { Dropdown } from '@rhavenside/custom-ui-library';
|
|
452
|
+
|
|
453
|
+
<Dropdown
|
|
454
|
+
options={[
|
|
455
|
+
{ value: '1', label: 'Option 1' },
|
|
456
|
+
{ value: '2', label: 'Option 2' },
|
|
457
|
+
{ value: '3', label: 'Option 3' }
|
|
458
|
+
]}
|
|
459
|
+
searchable={true}
|
|
460
|
+
multiSelect={true}
|
|
461
|
+
placeholder="Select multiple..."
|
|
462
|
+
onChange={(values) => console.log(values)}
|
|
463
|
+
/>
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
## CSS Variables Override
|
|
467
|
+
|
|
468
|
+
All components use CSS Custom Properties that can be overridden.
|
|
469
|
+
|
|
470
|
+
### Global Override
|
|
69
471
|
|
|
70
472
|
```css
|
|
71
|
-
/* In
|
|
473
|
+
/* In your project */
|
|
72
474
|
:root {
|
|
73
475
|
--btn-bg: #ff6b6b;
|
|
74
476
|
--btn-color: #ffffff;
|
|
@@ -82,10 +484,10 @@ Alle Komponenten verwenden CSS Custom Properties, die überschrieben werden kön
|
|
|
82
484
|
}
|
|
83
485
|
```
|
|
84
486
|
|
|
85
|
-
###
|
|
487
|
+
### Contextual Override
|
|
86
488
|
|
|
87
489
|
```css
|
|
88
|
-
/*
|
|
490
|
+
/* Only for specific areas */
|
|
89
491
|
.dark-theme {
|
|
90
492
|
--btn-bg: #1e40af;
|
|
91
493
|
--btn-color: #f3f4f6;
|
|
@@ -94,128 +496,128 @@ Alle Komponenten verwenden CSS Custom Properties, die überschrieben werden kön
|
|
|
94
496
|
}
|
|
95
497
|
```
|
|
96
498
|
|
|
97
|
-
##
|
|
499
|
+
## Available CSS Variables
|
|
98
500
|
|
|
99
501
|
### Button
|
|
100
|
-
- `--btn-bg` -
|
|
101
|
-
- `--btn-bg-hover` -
|
|
102
|
-
- `--btn-bg-active` -
|
|
103
|
-
- `--btn-color` -
|
|
104
|
-
- `--btn-radius` -
|
|
105
|
-
- `--btn-padding-x` -
|
|
106
|
-
- `--btn-padding-y` -
|
|
107
|
-
- `--btn-font-size` -
|
|
108
|
-
- `--btn-font-weight` -
|
|
109
|
-
- `--btn-shadow` -
|
|
110
|
-
- `--btn-shadow-hover` -
|
|
111
|
-
- `--btn-transition` -
|
|
502
|
+
- `--btn-bg` - background color
|
|
503
|
+
- `--btn-bg-hover` - hover background color
|
|
504
|
+
- `--btn-bg-active` - active background color
|
|
505
|
+
- `--btn-color` - text color
|
|
506
|
+
- `--btn-radius` - border radius
|
|
507
|
+
- `--btn-padding-x` - horizontal padding
|
|
508
|
+
- `--btn-padding-y` - vertical padding
|
|
509
|
+
- `--btn-font-size` - font size
|
|
510
|
+
- `--btn-font-weight` - font weight
|
|
511
|
+
- `--btn-shadow` - box shadow
|
|
512
|
+
- `--btn-shadow-hover` - hover box shadow
|
|
513
|
+
- `--btn-transition` - transition
|
|
112
514
|
|
|
113
515
|
### Input
|
|
114
|
-
- `--input-bg` -
|
|
115
|
-
- `--input-border` -
|
|
116
|
-
- `--input-border-focus` -
|
|
117
|
-
- `--input-color` -
|
|
118
|
-
- `--input-placeholder-color` -
|
|
119
|
-
- `--input-radius` -
|
|
120
|
-
- `--input-padding-x` -
|
|
121
|
-
- `--input-padding-y` -
|
|
122
|
-
- `--input-font-size` -
|
|
123
|
-
- `--input-shadow-focus` -
|
|
516
|
+
- `--input-bg` - background color
|
|
517
|
+
- `--input-border` - border
|
|
518
|
+
- `--input-border-focus` - focus border
|
|
519
|
+
- `--input-color` - text color
|
|
520
|
+
- `--input-placeholder-color` - placeholder color
|
|
521
|
+
- `--input-radius` - border radius
|
|
522
|
+
- `--input-padding-x` - horizontal padding
|
|
523
|
+
- `--input-padding-y` - vertical padding
|
|
524
|
+
- `--input-font-size` - font size
|
|
525
|
+
- `--input-shadow-focus` - focus box shadow
|
|
124
526
|
|
|
125
527
|
### Modal
|
|
126
|
-
- `--modal-bg` -
|
|
127
|
-
- `--modal-overlay-bg` -
|
|
128
|
-
- `--modal-radius` -
|
|
129
|
-
- `--modal-shadow` -
|
|
130
|
-
- `--modal-padding` -
|
|
131
|
-
- `--modal-max-width-small` -
|
|
132
|
-
- `--modal-max-width-medium` -
|
|
133
|
-
- `--modal-max-width-large` -
|
|
134
|
-
- `--modal-max-width-xlarge` -
|
|
528
|
+
- `--modal-bg` - background color
|
|
529
|
+
- `--modal-overlay-bg` - overlay background color
|
|
530
|
+
- `--modal-radius` - border radius
|
|
531
|
+
- `--modal-shadow` - box shadow
|
|
532
|
+
- `--modal-padding` - padding
|
|
533
|
+
- `--modal-max-width-small` - max width (small)
|
|
534
|
+
- `--modal-max-width-medium` - max width (medium)
|
|
535
|
+
- `--modal-max-width-large` - max width (large)
|
|
536
|
+
- `--modal-max-width-xlarge` - max width (xlarge)
|
|
135
537
|
|
|
136
538
|
### Progress
|
|
137
|
-
- `--progress-bg` -
|
|
138
|
-
- `--progress-color` -
|
|
139
|
-
- `--progress-height` -
|
|
140
|
-
- `--progress-radius` -
|
|
141
|
-
- `--progress-shadow` -
|
|
142
|
-
- `--progress-success-color` -
|
|
143
|
-
- `--progress-danger-color` -
|
|
144
|
-
- `--progress-warning-color` -
|
|
145
|
-
- `--progress-info-color` -
|
|
539
|
+
- `--progress-bg` - background color
|
|
540
|
+
- `--progress-color` - progress color
|
|
541
|
+
- `--progress-height` - height
|
|
542
|
+
- `--progress-radius` - border radius
|
|
543
|
+
- `--progress-shadow` - box shadow
|
|
544
|
+
- `--progress-success-color` - success variant color
|
|
545
|
+
- `--progress-danger-color` - danger variant color
|
|
546
|
+
- `--progress-warning-color` - warning variant color
|
|
547
|
+
- `--progress-info-color` - info variant color
|
|
146
548
|
|
|
147
549
|
### Card
|
|
148
|
-
- `--card-bg` -
|
|
149
|
-
- `--card-border` -
|
|
150
|
-
- `--card-radius` -
|
|
151
|
-
- `--card-shadow` -
|
|
152
|
-
- `--card-shadow-hover` -
|
|
153
|
-
- `--card-padding` -
|
|
550
|
+
- `--card-bg` - background color
|
|
551
|
+
- `--card-border` - border
|
|
552
|
+
- `--card-radius` - border radius
|
|
553
|
+
- `--card-shadow` - box shadow
|
|
554
|
+
- `--card-shadow-hover` - hover box shadow
|
|
555
|
+
- `--card-padding` - padding
|
|
154
556
|
|
|
155
557
|
### Badge
|
|
156
|
-
- `--badge-bg` -
|
|
157
|
-
- `--badge-color` -
|
|
158
|
-
- `--badge-radius` -
|
|
159
|
-
- `--badge-font-size` -
|
|
160
|
-
- `--badge-padding-x` -
|
|
161
|
-
- `--badge-padding-y` -
|
|
162
|
-
- `--badge-primary-bg` -
|
|
163
|
-
- `--badge-primary-color` -
|
|
164
|
-
- (
|
|
558
|
+
- `--badge-bg` - background color
|
|
559
|
+
- `--badge-color` - text color
|
|
560
|
+
- `--badge-radius` - border radius
|
|
561
|
+
- `--badge-font-size` - font size
|
|
562
|
+
- `--badge-padding-x` - horizontal padding
|
|
563
|
+
- `--badge-padding-y` - vertical padding
|
|
564
|
+
- `--badge-primary-bg` - primary variant background
|
|
565
|
+
- `--badge-primary-color` - primary variant text color
|
|
566
|
+
- (Similar for success, danger, warning, info)
|
|
165
567
|
|
|
166
568
|
### Dropdown
|
|
167
|
-
- `--dropdown-bg` -
|
|
168
|
-
- `--dropdown-border` -
|
|
169
|
-
- `--dropdown-radius` -
|
|
170
|
-
- `--dropdown-shadow` -
|
|
171
|
-
- `--dropdown-item-hover-bg` -
|
|
172
|
-
- `--dropdown-item-padding` -
|
|
569
|
+
- `--dropdown-bg` - background color
|
|
570
|
+
- `--dropdown-border` - border
|
|
571
|
+
- `--dropdown-radius` - border radius
|
|
572
|
+
- `--dropdown-shadow` - box shadow
|
|
573
|
+
- `--dropdown-item-hover-bg` - item hover background
|
|
574
|
+
- `--dropdown-item-padding` - item padding
|
|
173
575
|
|
|
174
576
|
### Toggle
|
|
175
|
-
- `--toggle-bg` -
|
|
176
|
-
- `--toggle-bg-checked` -
|
|
177
|
-
- `--toggle-thumb-bg` -
|
|
178
|
-
- `--toggle-radius` -
|
|
179
|
-
- `--toggle-shadow` -
|
|
577
|
+
- `--toggle-bg` - background color
|
|
578
|
+
- `--toggle-bg-checked` - checked background color
|
|
579
|
+
- `--toggle-thumb-bg` - thumb background color
|
|
580
|
+
- `--toggle-radius` - border radius
|
|
581
|
+
- `--toggle-shadow` - box shadow
|
|
180
582
|
|
|
181
583
|
### Textarea
|
|
182
|
-
- `--textarea-bg` -
|
|
183
|
-
- `--textarea-border` -
|
|
184
|
-
- `--textarea-border-focus` -
|
|
185
|
-
- `--textarea-color` -
|
|
186
|
-
- `--textarea-radius` -
|
|
187
|
-
- `--textarea-padding` -
|
|
584
|
+
- `--textarea-bg` - background color
|
|
585
|
+
- `--textarea-border` - border
|
|
586
|
+
- `--textarea-border-focus` - focus border
|
|
587
|
+
- `--textarea-color` - text color
|
|
588
|
+
- `--textarea-radius` - border radius
|
|
589
|
+
- `--textarea-padding` - padding
|
|
188
590
|
|
|
189
591
|
### Checkbox/Radio
|
|
190
|
-
- `--checkbox-bg` -
|
|
191
|
-
- `--checkbox-border` -
|
|
192
|
-
- `--checkbox-border-checked` -
|
|
193
|
-
- `--checkbox-check-bg` -
|
|
194
|
-
- `--checkbox-check-color` -
|
|
195
|
-
- `--checkbox-radius` -
|
|
592
|
+
- `--checkbox-bg` - background color
|
|
593
|
+
- `--checkbox-border` - border
|
|
594
|
+
- `--checkbox-border-checked` - checked border
|
|
595
|
+
- `--checkbox-check-bg` - check mark background color
|
|
596
|
+
- `--checkbox-check-color` - check mark color
|
|
597
|
+
- `--checkbox-radius` - border radius
|
|
196
598
|
|
|
197
599
|
### Select
|
|
198
|
-
- `--select-bg` -
|
|
199
|
-
- `--select-border` -
|
|
200
|
-
- `--select-border-focus` -
|
|
201
|
-
- `--select-color` -
|
|
202
|
-
- `--select-radius` -
|
|
600
|
+
- `--select-bg` - background color
|
|
601
|
+
- `--select-border` - border
|
|
602
|
+
- `--select-border-focus` - focus border
|
|
603
|
+
- `--select-color` - text color
|
|
604
|
+
- `--select-radius` - border radius
|
|
203
605
|
|
|
204
606
|
### ProgressCircle
|
|
205
|
-
- `--circle-progress-bg` -
|
|
206
|
-
- `--circle-progress-color` -
|
|
207
|
-
- `--circle-progress-stroke-width` -
|
|
208
|
-
- `--circle-progress-value-stroke-width` -
|
|
607
|
+
- `--circle-progress-bg` - background circle color
|
|
608
|
+
- `--circle-progress-color` - progress color (HSL-based)
|
|
609
|
+
- `--circle-progress-stroke-width` - background circle stroke width
|
|
610
|
+
- `--circle-progress-value-stroke-width` - progress path stroke width
|
|
209
611
|
|
|
210
612
|
### ProgressBubble
|
|
211
|
-
- `--bubble-progress-bg` -
|
|
212
|
-
- `--bubble-progress-border-color` -
|
|
213
|
-
- `--bubble-progress-water-alpha` -
|
|
214
|
-
- `--bubble-progress-glare-bg` -
|
|
613
|
+
- `--bubble-progress-bg` - background color
|
|
614
|
+
- `--bubble-progress-border-color` - border color
|
|
615
|
+
- `--bubble-progress-water-alpha` - water transparency
|
|
616
|
+
- `--bubble-progress-glare-bg` - glare background color
|
|
215
617
|
|
|
216
|
-
## Theme
|
|
618
|
+
## Theme Override
|
|
217
619
|
|
|
218
|
-
###
|
|
620
|
+
### Global Theme
|
|
219
621
|
|
|
220
622
|
```css
|
|
221
623
|
/* theme.css */
|
|
@@ -227,11 +629,11 @@ Alle Komponenten verwenden CSS Custom Properties, die überschrieben werden kön
|
|
|
227
629
|
```
|
|
228
630
|
|
|
229
631
|
```javascript
|
|
230
|
-
import '
|
|
231
|
-
import './theme.css'; //
|
|
632
|
+
import '@rhavenside/custom-ui-library/dist/style.css';
|
|
633
|
+
import './theme.css'; // Import after custom-ui-library
|
|
232
634
|
```
|
|
233
635
|
|
|
234
|
-
###
|
|
636
|
+
### Contextual Theme
|
|
235
637
|
|
|
236
638
|
```css
|
|
237
639
|
/* dark-theme.css */
|
|
@@ -250,19 +652,7 @@ import './theme.css'; // Nach customs importieren
|
|
|
250
652
|
</div>
|
|
251
653
|
```
|
|
252
654
|
|
|
253
|
-
## Entwicklung
|
|
254
|
-
|
|
255
|
-
```bash
|
|
256
|
-
# Lokale Entwicklung
|
|
257
|
-
npm run dev
|
|
258
|
-
|
|
259
|
-
# Library bauen
|
|
260
|
-
npm run build
|
|
261
|
-
|
|
262
|
-
# Watch-Mode
|
|
263
|
-
npm run build:watch
|
|
264
|
-
```
|
|
265
655
|
|
|
266
|
-
##
|
|
656
|
+
## License
|
|
267
657
|
|
|
268
658
|
MIT
|