@particle-network/ui-react 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/README.md +23 -0
  2. package/dist/components/ProgressWrapper/index.d.ts +34 -0
  3. package/dist/components/ProgressWrapper/index.js +102 -0
  4. package/dist/components/UXButton/button-group-context.d.ts +2 -0
  5. package/dist/components/UXButton/button-group-context.js +6 -0
  6. package/dist/components/UXButton/button-group.d.ts +4 -0
  7. package/dist/components/UXButton/button-group.js +22 -0
  8. package/dist/components/UXButton/button-theme.d.ts +236 -0
  9. package/dist/components/UXButton/button-theme.js +626 -0
  10. package/dist/components/UXButton/button.d.ts +4 -0
  11. package/dist/components/UXButton/button.js +31 -0
  12. package/dist/components/UXButton/index.d.ts +8 -0
  13. package/dist/components/UXButton/index.js +6 -0
  14. package/dist/components/UXButton/use-button-group.d.ts +37 -0
  15. package/dist/components/UXButton/use-button-group.js +55 -0
  16. package/dist/components/UXButton/use-button.d.ts +65 -0
  17. package/dist/components/UXButton/use-button.js +136 -0
  18. package/dist/components/UXCheckbox/checkbox.extend.d.ts +7 -0
  19. package/dist/components/UXCheckbox/checkbox.extend.js +151 -0
  20. package/dist/components/UXCheckbox/checkbox.icon.d.ts +6 -0
  21. package/dist/components/UXCheckbox/checkbox.icon.js +46 -0
  22. package/dist/components/UXCheckbox/index.d.ts +10 -0
  23. package/dist/components/UXCheckbox/index.js +17 -0
  24. package/dist/components/UXChip/chip.extend.d.ts +299 -0
  25. package/dist/components/UXChip/chip.extend.js +236 -0
  26. package/dist/components/UXChip/index.d.ts +302 -0
  27. package/dist/components/UXChip/index.js +10 -0
  28. package/dist/components/UXDivider/divider.extend.d.ts +286 -0
  29. package/dist/components/UXDivider/divider.extend.js +15 -0
  30. package/dist/components/UXDivider/index.d.ts +4 -0
  31. package/dist/components/UXDivider/index.js +10 -0
  32. package/dist/components/UXDropdown/dropdown-item.d.ts +3 -0
  33. package/dist/components/UXDropdown/dropdown-item.js +306 -0
  34. package/dist/components/UXDropdown/dropdown-menu.d.ts +3 -0
  35. package/dist/components/UXDropdown/dropdown-menu.js +25 -0
  36. package/dist/components/UXDropdown/dropdown-section.d.ts +1 -0
  37. package/dist/components/UXDropdown/dropdown-section.js +2 -0
  38. package/dist/components/UXDropdown/dropdown.d.ts +4 -0
  39. package/dist/components/UXDropdown/dropdown.js +21 -0
  40. package/dist/components/UXDropdown/index.d.ts +6 -0
  41. package/dist/components/UXDropdown/index.js +6 -0
  42. package/dist/components/UXHint/index.d.ts +8 -0
  43. package/dist/components/UXHint/index.js +22 -0
  44. package/dist/components/UXInput/index.d.ts +346 -0
  45. package/dist/components/UXInput/index.js +10 -0
  46. package/dist/components/UXInput/input.extend.d.ts +343 -0
  47. package/dist/components/UXInput/input.extend.js +6 -0
  48. package/dist/components/UXModal/index.d.ts +10 -0
  49. package/dist/components/UXModal/index.js +89 -0
  50. package/dist/components/UXNumberInput/index.d.ts +5 -0
  51. package/dist/components/UXNumberInput/index.js +10 -0
  52. package/dist/components/UXNumberInput/number-input.extend.d.ts +8 -0
  53. package/dist/components/UXNumberInput/number-input.extend.js +6 -0
  54. package/dist/components/UXPopover/index.d.ts +6 -0
  55. package/dist/components/UXPopover/index.js +10 -0
  56. package/dist/components/UXPopover/popover.extend.d.ts +7 -0
  57. package/dist/components/UXPopover/popover.extend.js +26 -0
  58. package/dist/components/UXRadio/index.d.ts +10 -0
  59. package/dist/components/UXRadio/index.js +12 -0
  60. package/dist/components/UXRadio/radio.extend.d.ts +7 -0
  61. package/dist/components/UXRadio/radio.extend.js +97 -0
  62. package/dist/components/UXSelect/index.d.ts +6 -0
  63. package/dist/components/UXSelect/index.js +51 -0
  64. package/dist/components/UXSwitch/index.d.ts +331 -0
  65. package/dist/components/UXSwitch/index.js +10 -0
  66. package/dist/components/UXSwitch/switch.extend.d.ts +328 -0
  67. package/dist/components/UXSwitch/switch.extend.js +117 -0
  68. package/dist/components/UXTabs/index.d.ts +9 -0
  69. package/dist/components/UXTabs/index.js +11 -0
  70. package/dist/components/UXTabs/tabs.classes.d.ts +210 -0
  71. package/dist/components/UXTabs/tabs.classes.js +530 -0
  72. package/dist/components/UXTabs/tabs.extend.d.ts +8 -0
  73. package/dist/components/UXTabs/tabs.extend.js +6 -0
  74. package/dist/components/UXTooltip/index.d.ts +5 -0
  75. package/dist/components/UXTooltip/index.js +23 -0
  76. package/dist/components/UXTooltip/tooltip.extend.d.ts +314 -0
  77. package/dist/components/UXTooltip/tooltip.extend.js +27 -0
  78. package/dist/components/index.d.ts +44 -0
  79. package/dist/components/index.js +31 -0
  80. package/dist/components/layout/Center.d.ts +4 -0
  81. package/dist/components/layout/Center.js +11 -0
  82. package/dist/components/layout/Circle.d.ts +6 -0
  83. package/dist/components/layout/Circle.js +12 -0
  84. package/dist/components/layout/Flex.d.ts +29 -0
  85. package/dist/components/layout/Flex.js +24 -0
  86. package/dist/components/layout/HStack.d.ts +4 -0
  87. package/dist/components/layout/HStack.js +12 -0
  88. package/dist/components/layout/Square.d.ts +8 -0
  89. package/dist/components/layout/Square.js +13 -0
  90. package/dist/components/layout/VStack.d.ts +4 -0
  91. package/dist/components/layout/VStack.js +12 -0
  92. package/dist/components/typography/Text.d.ts +3 -0
  93. package/dist/components/typography/Text.js +12 -0
  94. package/dist/components/typography/Text.type.d.ts +103 -0
  95. package/dist/components/typography/Text.type.js +47 -0
  96. package/dist/icons/index.d.ts +6 -0
  97. package/dist/icons/index.js +58 -0
  98. package/dist/index.d.ts +2 -0
  99. package/dist/index.js +2 -0
  100. package/dist/utils/classes.d.ts +35 -0
  101. package/dist/utils/classes.js +87 -0
  102. package/dist/utils/index.d.ts +3 -0
  103. package/dist/utils/index.js +4 -0
  104. package/dist/utils/input-classes.d.ts +427 -0
  105. package/dist/utils/input-classes.js +568 -0
  106. package/dist/utils/variants.d.ts +91 -0
  107. package/dist/utils/variants.js +100 -0
  108. package/package.json +42 -0
  109. package/tailwind-preset.js +298 -0
@@ -0,0 +1,626 @@
1
+ import { tv } from "@heroui/theme";
2
+ import { collapseAdjacentVariantBorders, colorVariants, dataFocusVisibleClasses } from "../../utils/index.js";
3
+ const button_theme_button = tv({
4
+ base: [
5
+ 'z-0',
6
+ 'group',
7
+ 'relative',
8
+ 'inline-flex',
9
+ 'items-center',
10
+ 'justify-center',
11
+ 'box-border',
12
+ 'appearance-none',
13
+ 'outline-none',
14
+ 'select-none',
15
+ 'whitespace-nowrap',
16
+ 'min-w-max',
17
+ 'font-normal',
18
+ 'subpixel-antialiased',
19
+ 'overflow-hidden',
20
+ 'tap-highlight-transparent',
21
+ 'transform-gpu data-[pressed=true]:scale-[0.97]',
22
+ ...dataFocusVisibleClasses
23
+ ],
24
+ variants: {
25
+ variant: {
26
+ solid: '',
27
+ bordered: 'border-small bg-transparent',
28
+ light: 'bg-transparent',
29
+ flat: '',
30
+ faded: 'border-small',
31
+ shadow: '',
32
+ ghost: 'border-small bg-transparent',
33
+ text: 'bg-transparent min-w-0 w-auto h-auto px-0'
34
+ },
35
+ size: {
36
+ sm: 'gap-2 rounded-small !text-body3 min-w-min font-medium [&_[aria-label="Loading"]>div]:size-3',
37
+ md: 'gap-2 rounded-small text-tiny min-w-min font-medium [&_[aria-label="Loading"]>div]:size-4',
38
+ lg: 'gap-2 rounded-medium text-medium min-w-min font-medium [&_[aria-label="Loading"]>div]:size-6',
39
+ auto: 'min-w-min rounded-medium'
40
+ },
41
+ color: {
42
+ default: '',
43
+ primary: '',
44
+ secondary: '',
45
+ success: '',
46
+ warning: '',
47
+ danger: '',
48
+ bullish: '',
49
+ bearish: '',
50
+ contrast: ''
51
+ },
52
+ radius: {
53
+ none: 'rounded-none',
54
+ sm: 'rounded-small',
55
+ md: 'rounded-medium',
56
+ lg: 'rounded-large',
57
+ full: 'rounded-full'
58
+ },
59
+ fullWidth: {
60
+ true: 'w-full'
61
+ },
62
+ isDisabled: {
63
+ true: 'opacity-disabled pointer-events-none cursor-not-allowed'
64
+ },
65
+ isSelected: {
66
+ true: 'ux-button-selected'
67
+ },
68
+ isInGroup: {
69
+ true: '[&:not(:first-child):not(:last-child)]:rounded-none'
70
+ },
71
+ isIconOnly: {
72
+ true: '!px-0 !gap-0',
73
+ false: '[&>svg]:max-w-[theme(spacing.8)]'
74
+ },
75
+ disableAnimation: {
76
+ true: '!transition-none data-[pressed=true]:scale-100',
77
+ false: 'transition-transform-colors-opacity motion-reduce:transition-none'
78
+ }
79
+ },
80
+ defaultVariants: {
81
+ size: 'md',
82
+ variant: 'solid',
83
+ color: 'default',
84
+ fullWidth: false,
85
+ isDisabled: false,
86
+ isInGroup: false,
87
+ disableAnimation: false
88
+ },
89
+ compoundVariants: [
90
+ {
91
+ size: 'sm',
92
+ variant: [
93
+ 'solid',
94
+ 'flat',
95
+ 'light',
96
+ 'bordered'
97
+ ],
98
+ class: 'px-sm h-6'
99
+ },
100
+ {
101
+ size: 'md',
102
+ variant: [
103
+ 'solid',
104
+ 'flat',
105
+ 'light',
106
+ 'bordered'
107
+ ],
108
+ class: 'px-md h-[30px]'
109
+ },
110
+ {
111
+ size: 'lg',
112
+ variant: [
113
+ 'solid',
114
+ 'flat',
115
+ 'light',
116
+ 'bordered'
117
+ ],
118
+ class: 'px-lg h-11'
119
+ },
120
+ {
121
+ variant: 'solid',
122
+ color: 'default',
123
+ class: colorVariants.solid["default"]
124
+ },
125
+ {
126
+ variant: 'solid',
127
+ color: 'primary',
128
+ class: colorVariants.solid.primary
129
+ },
130
+ {
131
+ variant: 'solid',
132
+ color: 'secondary',
133
+ class: colorVariants.solid.secondary
134
+ },
135
+ {
136
+ variant: 'solid',
137
+ color: 'success',
138
+ class: colorVariants.solid.success
139
+ },
140
+ {
141
+ variant: 'solid',
142
+ color: 'warning',
143
+ class: colorVariants.solid.warning
144
+ },
145
+ {
146
+ variant: 'solid',
147
+ color: 'danger',
148
+ class: colorVariants.solid.danger
149
+ },
150
+ {
151
+ variant: 'solid',
152
+ color: 'bullish',
153
+ class: colorVariants.solid.bullish
154
+ },
155
+ {
156
+ variant: 'solid',
157
+ color: 'bearish',
158
+ class: colorVariants.solid.bearish
159
+ },
160
+ {
161
+ variant: 'solid',
162
+ color: 'contrast',
163
+ class: colorVariants.solid.contrast
164
+ },
165
+ {
166
+ variant: 'light',
167
+ color: 'default',
168
+ class: [
169
+ colorVariants.light["default"],
170
+ 'data-[hover=true]:bg-default/40'
171
+ ]
172
+ },
173
+ {
174
+ variant: 'light',
175
+ color: 'primary',
176
+ class: [
177
+ colorVariants.light.primary,
178
+ 'data-[hover=true]:bg-primary/20'
179
+ ]
180
+ },
181
+ {
182
+ variant: 'light',
183
+ color: 'secondary',
184
+ class: [
185
+ colorVariants.light.secondary,
186
+ 'data-[hover=true]:bg-default/40'
187
+ ]
188
+ },
189
+ {
190
+ variant: 'light',
191
+ color: 'success',
192
+ class: [
193
+ colorVariants.light.success,
194
+ 'data-[hover=true]:bg-success/20'
195
+ ]
196
+ },
197
+ {
198
+ variant: 'light',
199
+ color: 'warning',
200
+ class: [
201
+ colorVariants.light.warning,
202
+ 'data-[hover=true]:bg-warning/20'
203
+ ]
204
+ },
205
+ {
206
+ variant: 'light',
207
+ color: 'danger',
208
+ class: [
209
+ colorVariants.light.danger,
210
+ 'data-[hover=true]:bg-danger/20'
211
+ ]
212
+ },
213
+ {
214
+ variant: 'light',
215
+ color: 'bullish',
216
+ class: [
217
+ colorVariants.light.bullish,
218
+ 'data-[hover=true]:bg-bullish/20'
219
+ ]
220
+ },
221
+ {
222
+ variant: 'light',
223
+ color: 'bearish',
224
+ class: [
225
+ colorVariants.light.bearish,
226
+ 'data-[hover=true]:bg-bearish/20'
227
+ ]
228
+ },
229
+ {
230
+ variant: 'bordered',
231
+ color: 'default',
232
+ class: colorVariants.bordered["default"]
233
+ },
234
+ {
235
+ variant: 'bordered',
236
+ color: 'primary',
237
+ class: colorVariants.bordered.primary
238
+ },
239
+ {
240
+ variant: 'bordered',
241
+ color: 'secondary',
242
+ class: colorVariants.bordered.secondary
243
+ },
244
+ {
245
+ variant: 'bordered',
246
+ color: 'success',
247
+ class: colorVariants.bordered.success
248
+ },
249
+ {
250
+ variant: 'bordered',
251
+ color: 'warning',
252
+ class: colorVariants.bordered.warning
253
+ },
254
+ {
255
+ variant: 'bordered',
256
+ color: 'danger',
257
+ class: colorVariants.bordered.danger
258
+ },
259
+ {
260
+ variant: 'bordered',
261
+ color: 'bullish',
262
+ class: colorVariants.bordered.bullish
263
+ },
264
+ {
265
+ variant: 'bordered',
266
+ color: 'bearish',
267
+ class: colorVariants.bordered.bearish
268
+ },
269
+ {
270
+ variant: 'flat',
271
+ color: 'default',
272
+ class: colorVariants.flat["default"]
273
+ },
274
+ {
275
+ variant: 'flat',
276
+ color: 'primary',
277
+ class: colorVariants.flat.primary
278
+ },
279
+ {
280
+ variant: 'flat',
281
+ color: 'secondary',
282
+ class: colorVariants.flat.secondary
283
+ },
284
+ {
285
+ variant: 'flat',
286
+ color: 'success',
287
+ class: colorVariants.flat.success
288
+ },
289
+ {
290
+ variant: 'flat',
291
+ color: 'warning',
292
+ class: colorVariants.flat.warning
293
+ },
294
+ {
295
+ variant: 'flat',
296
+ color: 'danger',
297
+ class: colorVariants.flat.danger
298
+ },
299
+ {
300
+ variant: 'flat',
301
+ color: 'bullish',
302
+ class: colorVariants.flat.bullish
303
+ },
304
+ {
305
+ variant: 'flat',
306
+ color: 'bearish',
307
+ class: colorVariants.flat.bearish
308
+ },
309
+ {
310
+ variant: 'text',
311
+ color: 'default',
312
+ class: [
313
+ colorVariants.text["default"]
314
+ ]
315
+ },
316
+ {
317
+ variant: 'text',
318
+ color: 'primary',
319
+ class: [
320
+ colorVariants.text.primary
321
+ ]
322
+ },
323
+ {
324
+ variant: 'text',
325
+ color: 'secondary',
326
+ class: [
327
+ colorVariants.text.secondary
328
+ ]
329
+ },
330
+ {
331
+ variant: 'text',
332
+ color: 'success',
333
+ class: [
334
+ colorVariants.text.success
335
+ ]
336
+ },
337
+ {
338
+ variant: 'text',
339
+ color: 'warning',
340
+ class: [
341
+ colorVariants.text.warning
342
+ ]
343
+ },
344
+ {
345
+ variant: 'text',
346
+ color: 'danger',
347
+ class: [
348
+ colorVariants.text.danger
349
+ ]
350
+ },
351
+ {
352
+ variant: 'text',
353
+ color: 'bullish',
354
+ class: [
355
+ colorVariants.text.bullish
356
+ ]
357
+ },
358
+ {
359
+ variant: 'text',
360
+ color: 'bearish',
361
+ class: [
362
+ colorVariants.text.bearish
363
+ ]
364
+ },
365
+ {
366
+ isSelected: true,
367
+ color: 'default',
368
+ variant: 'solid',
369
+ class: 'bg-foreground-100'
370
+ },
371
+ {
372
+ isSelected: true,
373
+ variant: 'light',
374
+ color: 'default',
375
+ class: colorVariants.flat["default"]
376
+ },
377
+ {
378
+ isSelected: true,
379
+ variant: 'light',
380
+ color: 'primary',
381
+ class: colorVariants.flat.primary
382
+ },
383
+ {
384
+ isSelected: true,
385
+ variant: 'light',
386
+ color: 'secondary',
387
+ class: colorVariants.flat.secondary
388
+ },
389
+ {
390
+ isSelected: true,
391
+ variant: 'light',
392
+ color: 'success',
393
+ class: colorVariants.flat.success
394
+ },
395
+ {
396
+ isSelected: true,
397
+ variant: 'light',
398
+ color: 'warning',
399
+ class: colorVariants.flat.warning
400
+ },
401
+ {
402
+ isSelected: true,
403
+ variant: 'light',
404
+ color: 'danger',
405
+ class: colorVariants.flat.danger
406
+ },
407
+ {
408
+ isSelected: true,
409
+ variant: 'light',
410
+ color: 'bullish',
411
+ class: colorVariants.flat.bullish
412
+ },
413
+ {
414
+ isSelected: true,
415
+ variant: 'light',
416
+ color: 'bearish',
417
+ class: colorVariants.flat.bearish
418
+ },
419
+ {
420
+ isSelected: true,
421
+ variant: 'flat',
422
+ color: 'default',
423
+ class: colorVariants.solid["default"]
424
+ },
425
+ {
426
+ isSelected: true,
427
+ variant: 'flat',
428
+ color: 'primary',
429
+ class: colorVariants.solid.primary
430
+ },
431
+ {
432
+ isSelected: true,
433
+ variant: 'flat',
434
+ color: 'success',
435
+ class: colorVariants.solid.success
436
+ },
437
+ {
438
+ isSelected: true,
439
+ variant: 'flat',
440
+ color: 'warning',
441
+ class: colorVariants.solid.warning
442
+ },
443
+ {
444
+ isSelected: true,
445
+ variant: 'flat',
446
+ color: 'danger',
447
+ class: colorVariants.solid.danger
448
+ },
449
+ {
450
+ isSelected: true,
451
+ variant: 'flat',
452
+ color: 'bullish',
453
+ class: colorVariants.solid.bullish
454
+ },
455
+ {
456
+ isSelected: true,
457
+ variant: 'flat',
458
+ color: 'bearish',
459
+ class: colorVariants.solid.bearish
460
+ },
461
+ {
462
+ isInGroup: true,
463
+ class: 'rounded-none first:rounded-s-small last:rounded-e-small'
464
+ },
465
+ {
466
+ isInGroup: true,
467
+ size: 'sm',
468
+ class: 'rounded-none first:rounded-s-small last:rounded-e-small'
469
+ },
470
+ {
471
+ isInGroup: true,
472
+ size: 'md',
473
+ class: 'rounded-none first:rounded-s-small last:rounded-e-small'
474
+ },
475
+ {
476
+ isInGroup: true,
477
+ size: 'lg',
478
+ class: 'rounded-none first:rounded-s-medium last:rounded-e-medium'
479
+ },
480
+ {
481
+ isInGroup: true,
482
+ isRounded: true,
483
+ class: 'rounded-none first:rounded-s-full last:rounded-e-full'
484
+ },
485
+ {
486
+ isInGroup: true,
487
+ radius: 'none',
488
+ class: 'rounded-none first:rounded-s-none last:rounded-e-none'
489
+ },
490
+ {
491
+ isInGroup: true,
492
+ radius: 'sm',
493
+ class: 'rounded-none first:rounded-s-small last:rounded-e-small'
494
+ },
495
+ {
496
+ isInGroup: true,
497
+ radius: 'md',
498
+ class: 'rounded-none first:rounded-s-medium last:rounded-e-medium'
499
+ },
500
+ {
501
+ isInGroup: true,
502
+ radius: 'lg',
503
+ class: 'rounded-none first:rounded-s-large last:rounded-e-large'
504
+ },
505
+ {
506
+ isInGroup: true,
507
+ radius: 'full',
508
+ class: 'rounded-none first:rounded-s-full last:rounded-e-full'
509
+ },
510
+ {
511
+ isInGroup: true,
512
+ variant: [
513
+ 'ghost',
514
+ 'bordered'
515
+ ],
516
+ color: 'default',
517
+ class: collapseAdjacentVariantBorders["default"]
518
+ },
519
+ {
520
+ isInGroup: true,
521
+ variant: [
522
+ 'ghost',
523
+ 'bordered'
524
+ ],
525
+ color: 'primary',
526
+ class: collapseAdjacentVariantBorders.primary
527
+ },
528
+ {
529
+ isInGroup: true,
530
+ variant: [
531
+ 'ghost',
532
+ 'bordered'
533
+ ],
534
+ color: 'secondary',
535
+ class: collapseAdjacentVariantBorders.secondary
536
+ },
537
+ {
538
+ isInGroup: true,
539
+ variant: [
540
+ 'ghost',
541
+ 'bordered'
542
+ ],
543
+ color: 'success',
544
+ class: collapseAdjacentVariantBorders.success
545
+ },
546
+ {
547
+ isInGroup: true,
548
+ variant: [
549
+ 'ghost',
550
+ 'bordered'
551
+ ],
552
+ color: 'warning',
553
+ class: collapseAdjacentVariantBorders.warning
554
+ },
555
+ {
556
+ isInGroup: true,
557
+ variant: [
558
+ 'ghost',
559
+ 'bordered'
560
+ ],
561
+ color: 'danger',
562
+ class: collapseAdjacentVariantBorders.danger
563
+ },
564
+ {
565
+ isInGroup: true,
566
+ variant: [
567
+ 'ghost',
568
+ 'bordered'
569
+ ],
570
+ color: 'bullish',
571
+ class: collapseAdjacentVariantBorders.bullish
572
+ },
573
+ {
574
+ isInGroup: true,
575
+ variant: [
576
+ 'ghost',
577
+ 'bordered'
578
+ ],
579
+ color: 'bearish',
580
+ class: collapseAdjacentVariantBorders.bearish
581
+ },
582
+ {
583
+ isIconOnly: true,
584
+ size: 'sm',
585
+ class: 'min-w-6 w-6 h-6'
586
+ },
587
+ {
588
+ isIconOnly: true,
589
+ size: 'md',
590
+ class: 'min-w-[30px] w-[30px] h-[30px]'
591
+ },
592
+ {
593
+ isIconOnly: true,
594
+ size: 'lg',
595
+ class: 'min-w-11 w-11 h-11'
596
+ },
597
+ {
598
+ isIconOnly: true,
599
+ size: 'auto',
600
+ class: ''
601
+ },
602
+ {
603
+ variant: [
604
+ 'solid',
605
+ 'faded',
606
+ 'flat',
607
+ 'bordered',
608
+ 'shadow',
609
+ 'text'
610
+ ],
611
+ class: 'data-[hover=true]:opacity-hover'
612
+ }
613
+ ]
614
+ });
615
+ const buttonGroup = tv({
616
+ base: 'inline-flex items-center justify-center h-auto',
617
+ variants: {
618
+ fullWidth: {
619
+ true: 'w-full'
620
+ }
621
+ },
622
+ defaultVariants: {
623
+ fullWidth: false
624
+ }
625
+ });
626
+ export { button_theme_button as button, buttonGroup };
@@ -0,0 +1,4 @@
1
+ import type { UseButtonProps } from './use-button';
2
+ export type ButtonProps = UseButtonProps;
3
+ declare const Button: import("@heroui/system-rsc").InternalForwardRefRenderFunction<"button", UseButtonProps, never>;
4
+ export default Button;
@@ -0,0 +1,31 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Ripple } from "@heroui/ripple";
3
+ import { Spinner } from "@heroui/spinner";
4
+ import { forwardRef } from "@heroui/system";
5
+ import { useButton } from "./use-button.js";
6
+ const Button = forwardRef((props, ref)=>{
7
+ const { Component, domRef, children, spinnerSize, spinner = /*#__PURE__*/ jsx(Spinner, {
8
+ color: "current",
9
+ size: spinnerSize
10
+ }), spinnerPlacement, startContent, endContent, isLoading, disableRipple, getButtonProps, getRippleProps, isIconOnly } = useButton({
11
+ ...props,
12
+ ref
13
+ });
14
+ return /*#__PURE__*/ jsxs(Component, {
15
+ ref: domRef,
16
+ ...getButtonProps(),
17
+ children: [
18
+ startContent,
19
+ isLoading && 'start' === spinnerPlacement ? spinner : null,
20
+ isLoading && isIconOnly ? null : children,
21
+ isLoading && 'end' === spinnerPlacement ? spinner : null,
22
+ endContent,
23
+ !disableRipple && /*#__PURE__*/ jsx(Ripple, {
24
+ ...getRippleProps()
25
+ })
26
+ ]
27
+ });
28
+ });
29
+ Button.displayName = 'HeroUI.Button';
30
+ const UXButton_button = Button;
31
+ export { UXButton_button as default };
@@ -0,0 +1,8 @@
1
+ import UXButton from './button';
2
+ import UXButtonGroup from './button-group';
3
+ export type { ButtonProps as UXButtonProps } from './button';
4
+ export type { ButtonGroupProps as UXButtonGroupProps } from './button-group';
5
+ export { useButton as useUXButton } from './use-button';
6
+ export { useButtonGroup as useUXButtonGroup } from './use-button-group';
7
+ export { ButtonGroupProvider, useButtonGroupContext } from './button-group-context';
8
+ export { UXButton, UXButtonGroup };
@@ -0,0 +1,6 @@
1
+ import button_0 from "./button.js";
2
+ import button_group from "./button-group.js";
3
+ import { useButton } from "./use-button.js";
4
+ import { useButtonGroup } from "./use-button-group.js";
5
+ import { ButtonGroupProvider, useButtonGroupContext } from "./button-group-context.js";
6
+ export { ButtonGroupProvider, button_0 as UXButton, button_group as UXButtonGroup, useButtonGroupContext, useButton as useUXButton, useButtonGroup as useUXButtonGroup };