@demodev-ui/react 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 ADDED
@@ -0,0 +1,28 @@
1
+ # @demodev-ui/react
2
+
3
+ A design system style package built on HeroUI. Provides custom themes, utilities, and component styles.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @demodev-ui/react @heroui/react @heroui/styles
9
+ ```
10
+
11
+ ### Peer Dependencies
12
+
13
+ - `@heroui/react` ^3.0.1
14
+ - `@heroui/styles` ^3.0.1
15
+ - `tailwindcss` ^4
16
+
17
+ ## Usage
18
+
19
+ Import in your project's CSS entry file:
20
+
21
+ ```css
22
+ @import "tailwindcss";
23
+ @import "@demodev-ui/react/styles";
24
+ ```
25
+
26
+ ## License
27
+
28
+ MIT
@@ -0,0 +1,982 @@
1
+ @import "@heroui/styles";
2
+ @theme {
3
+ /* Gray Colors */
4
+ --color-gray-50: oklch(97.3% 0.001 287.31deg);
5
+ --color-gray-100: oklch(94% 0.001 287.27deg);
6
+ --color-gray-200: oklch(85.2% 0.004 286.57deg);
7
+ --color-gray-300: oklch(75.8% 0.006 286.43deg);
8
+ --color-gray-400: oklch(67.2% 0.009 286.26deg);
9
+ --color-gray-500: oklch(58.5% 0.011 286.14deg);
10
+ --color-gray-600: oklch(49.2% 0.013 285.97deg);
11
+ --color-gray-700: oklch(40.5% 0.013 285.83deg);
12
+ --color-gray-800: oklch(31.9% 0.011 285.82deg);
13
+ --color-gray-900: oklch(22.4% 0.008 285.8deg);
14
+ --color-gray-950: oklch(17.9% 0.004 286.04deg);
15
+
16
+ /* Semantic Colors */
17
+ --danger: #ef1026;
18
+ --success: #27c961;
19
+ --warning: #ffdc18;
20
+ }
21
+ @theme {
22
+ --radius-lg-plus: 0.625rem; /* 10px */
23
+ --radius-2xl-plus: 1.25rem; /* 20px */
24
+
25
+ /* button */
26
+ --radius-button-xs: var(--radius-md);
27
+ --radius-button-sm: var(--radius-lg);
28
+ --radius-button-md: var(--radius-lg-plus);
29
+ --radius-button-lg: var(--radius-xl);
30
+
31
+ /* chip */
32
+ --radius-chip-sm: var(--radius-md);
33
+ --radius-chip-md: var(--radius-lg);
34
+ --radius-chip-lg: var(--radius-button-sm);
35
+
36
+ /* input */
37
+ --radius-input-lg: var(--radius-button-lg);
38
+
39
+ /* list box */
40
+ --radius-list-box: var(--radius-xl);
41
+ --radius-list-box-item: var(--radius-lg);
42
+
43
+ /* toast */
44
+ --radius-toast: var(--radius-2xl);
45
+ }
46
+ @theme {
47
+ --spacing-field: calc(var(--spacing) * 2);
48
+
49
+ /* button */
50
+ --spacing-button-sm: calc(var(--spacing) * 9);
51
+ --spacing-button-md: calc(var(--spacing) * 10);
52
+ --spacing-button-lg: calc(var(--spacing) * 12);
53
+
54
+ /* chip */
55
+ --spacing-chip-sm: calc(var(--spacing) * 6);
56
+ --spacing-chip-md: calc(var(--spacing) * 8);
57
+ --spacing-chip-lg: var(--spacing-button-sm);
58
+
59
+ /* icon */
60
+ --spacing-button-icon-sm: calc(var(--spacing) * 4);
61
+ --spacing-chip-icon-sm: calc(var(--spacing) * 3);
62
+ --spacing-chip-icon-md: calc(var(--spacing) * 3.5);
63
+ --spacing-chip-icon-lg: var(--spacing-button-icon-sm);
64
+
65
+ /* input */
66
+ --spacing-input-lg: var(--spacing-button-lg);
67
+ }
68
+ @custom-variant light {
69
+ &:is(.light, .light *, [data-theme="light"], [data-theme="light"] *) {
70
+ @slot;
71
+
72
+ &::before,
73
+ &::after {
74
+ @slot;
75
+ }
76
+ }
77
+
78
+ @media (prefers-color-scheme: light) {
79
+ &:not(:is(.light, .light *, [data-theme="light"], [data-theme="light"] *)) & {
80
+ @slot;
81
+
82
+ &::before,
83
+ &::after {
84
+ @slot;
85
+ }
86
+ }
87
+ }
88
+ }
89
+ @utility button-size-sm {
90
+ @apply rounded-button-sm h-button-sm;
91
+ @apply px-3 text-sm;
92
+ }
93
+ @utility button-size-md {
94
+ @apply rounded-button-md h-button-md;
95
+ }
96
+ @utility button-size-lg {
97
+ @apply rounded-button-lg h-button-lg;
98
+ @apply gap-3 px-6;
99
+ }
100
+ @utility chip-size-sm {
101
+ @apply rounded-chip-sm h-chip-sm gap-1 px-2 text-xs;
102
+
103
+ svg {
104
+ @apply size-chip-icon-sm;
105
+ }
106
+ }
107
+ @utility chip-size-md {
108
+ @apply rounded-chip-md h-chip-md gap-1.5 px-2.5 text-sm;
109
+
110
+ svg {
111
+ @apply size-chip-icon-md;
112
+ }
113
+ }
114
+ @utility chip-size-lg {
115
+ @apply button-size-sm gap-1.5;
116
+
117
+ svg {
118
+ @apply size-chip-icon-lg;
119
+ }
120
+ }
121
+ @utility input-text-lg {
122
+ @apply px-4 text-base;
123
+ }
124
+ @utility input-size-lg {
125
+ @apply input-text-lg rounded-input-lg min-h-input-lg;
126
+ }
127
+ @utility input-style-primary {
128
+ @apply outline-border shadow-none outline-1 outline-solid;
129
+
130
+ /* Disabled state */
131
+ &[data-disabled="true"],
132
+ &[aria-disabled="true"] {
133
+ @apply light:bg-gray-50/50;
134
+ }
135
+ }
136
+ @utility input-group-style-primary {
137
+ &:not([data-invalid="true"]) {
138
+ @apply input-style-primary;
139
+ }
140
+
141
+ /* Focus within state */
142
+ &[data-focus-within="true"],
143
+ &:focus-within {
144
+ @apply outline-none;
145
+ }
146
+ }
147
+ @utility popover-list-box {
148
+ @apply gap-0.5 p-1;
149
+ }
150
+ @utility popover-list-box-item {
151
+ @apply rounded-list-box-item px-3 py-2;
152
+ }
153
+ @utility popover-list-box-item-indicator {
154
+ @apply right-2.5 size-4 transition-none;
155
+
156
+ [data-slot="list-box-item-indicator--checkmark"] {
157
+ @apply size-2 stroke-3;
158
+ }
159
+
160
+ &[data-visible="true"] {
161
+ @apply bg-accent text-accent-foreground rounded-full;
162
+ }
163
+ }
164
+ :root:not([data-theme="dark"]) {
165
+ --background: #fff;
166
+ }
167
+ @layer components {
168
+ .alert {
169
+ @apply rounded-toast;
170
+
171
+ &:has(button) {
172
+ @apply py-4;
173
+ }
174
+ }
175
+ }
176
+ @layer components {
177
+ .button {
178
+ /* SVG icon styling - exclude spinner and link-icon svgs */
179
+ & svg:not([data-slot="spinner"] svg, [data-slot="link-icon"] svg) {
180
+ @apply size-button-icon-sm;
181
+ }
182
+ }
183
+
184
+ .button--sm {
185
+ @apply button-size-sm;
186
+
187
+ &.button--icon-only {
188
+ @apply w-button-sm;
189
+ }
190
+ }
191
+
192
+ .button--md {
193
+ @apply button-size-md;
194
+
195
+ &.button--icon-only {
196
+ @apply w-button-md;
197
+ }
198
+ }
199
+
200
+ .button--lg {
201
+ @apply button-size-lg;
202
+
203
+ &.button--icon-only {
204
+ @apply w-button-lg;
205
+ }
206
+ }
207
+
208
+ .button--secondary {
209
+ --button-bg: var(--color-accent-soft);
210
+ --button-bg-hover: var(--color-accent-soft-hover);
211
+ --button-bg-pressed: var(--color-accent-soft-hover);
212
+ --button-fg: var(--color-accent-soft-foreground);
213
+ }
214
+
215
+ .button--outline {
216
+ &[data-color="accent"] {
217
+ @apply border-accent;
218
+
219
+ --button-bg: var(--color-accent-soft);
220
+ --button-bg-hover: var(--color-accent-soft-hover);
221
+ --button-bg-pressed: var(--color-accent-soft-hover);
222
+ --button-fg: var(--color-accent-soft-foreground);
223
+ }
224
+
225
+ &[data-color="danger"] {
226
+ @apply border-danger;
227
+
228
+ --button-bg: var(--color-danger-soft);
229
+ --button-bg-hover: var(--color-danger-soft-hover);
230
+ --button-bg-pressed: var(--color-danger-soft-hover);
231
+ --button-fg: var(--color-danger-soft-foreground);
232
+ }
233
+
234
+ &[data-color="success"] {
235
+ @apply border-success;
236
+
237
+ --button-bg: var(--color-success-soft);
238
+ --button-bg-hover: var(--color-success-soft-hover);
239
+ --button-bg-pressed: var(--color-success-soft-hover);
240
+ --button-fg: var(--color-success-soft-foreground);
241
+ }
242
+
243
+ &[data-color="warning"] {
244
+ @apply border-warning;
245
+
246
+ --button-bg: var(--color-warning-soft);
247
+ --button-bg-hover: var(--color-warning-soft-hover);
248
+ --button-bg-pressed: var(--color-warning-soft-hover);
249
+ --button-fg: var(--color-warning-soft-foreground);
250
+ }
251
+ }
252
+
253
+ .button--ghost {
254
+ &[data-color="accent"] {
255
+ --button-bg-hover: var(--color-accent-soft);
256
+ --button-fg: var(--color-accent);
257
+ }
258
+
259
+ &[data-color="danger"] {
260
+ --button-bg-hover: var(--color-danger-soft);
261
+ --button-fg: var(--color-danger);
262
+ }
263
+
264
+ &[data-color="success"] {
265
+ --button-bg-hover: var(--color-success-soft);
266
+ --button-fg: var(--color-success);
267
+ }
268
+
269
+ &[data-color="warning"] {
270
+ --button-bg-hover: var(--color-warning-soft);
271
+ --button-fg: var(--color-warning);
272
+ }
273
+ }
274
+ }
275
+ @layer components {
276
+ /* Apply border radius to first button (start edge) */
277
+ .button-group--horizontal .button:first-child {
278
+ @apply rounded-s-lg;
279
+
280
+ &.button--sm {
281
+ @apply rounded-s-md;
282
+ }
283
+
284
+ &.button--lg {
285
+ @apply rounded-s-lg-plus;
286
+ }
287
+ }
288
+
289
+ /* Apply border radius to last button (end edge) */
290
+ .button-group--horizontal .button:last-child {
291
+ @apply rounded-e-lg;
292
+
293
+ &.button--sm {
294
+ @apply rounded-e-md;
295
+ }
296
+
297
+ &.button--lg {
298
+ @apply rounded-e-lg-plus;
299
+ }
300
+ }
301
+
302
+ /* If only one button, apply both rounded edges */
303
+ .button-group--horizontal .button:first-child:last-child {
304
+ @apply rounded-lg;
305
+
306
+ &.button--sm {
307
+ @apply rounded-md;
308
+ }
309
+
310
+ &.button--lg {
311
+ @apply rounded-lg-plus;
312
+ }
313
+ }
314
+
315
+ /* Apply border radius to first button (top edge) in vertical */
316
+ .button-group--vertical .button:first-child {
317
+ @apply rounded-t-lg;
318
+
319
+ &.button--sm {
320
+ @apply rounded-t-md;
321
+ }
322
+
323
+ &.button--lg {
324
+ @apply rounded-t-lg-plus;
325
+ }
326
+ }
327
+
328
+ /* Apply border radius to last button (bottom edge) in vertical */
329
+ .button-group--vertical .button:last-child {
330
+ @apply rounded-b-lg;
331
+
332
+ &.button--sm {
333
+ @apply rounded-b-md;
334
+ }
335
+
336
+ &.button--lg {
337
+ @apply rounded-b-lg-plus;
338
+ }
339
+ }
340
+
341
+ /* If only one button in vertical, apply all rounded edges */
342
+ .button-group--vertical .button:first-child:last-child {
343
+ @apply rounded-lg;
344
+
345
+ &.button--sm {
346
+ @apply rounded-md;
347
+ }
348
+
349
+ &.button--lg {
350
+ @apply rounded-lg-plus;
351
+ }
352
+ }
353
+ }
354
+ @layer components {
355
+ .checkbox--primary {
356
+ .checkbox__control {
357
+ @apply outline-border bg-transparent shadow-none outline-2 -outline-offset-1 outline-solid;
358
+ }
359
+
360
+ &:is([data-selected="true"], [data-indeterminate="true"]) .checkbox__control {
361
+ @apply outline-accent;
362
+
363
+ transition: outline-color 500ms;
364
+ }
365
+
366
+ &[data-invalid="true"] .checkbox__control {
367
+ @apply outline-danger outline-2!;
368
+ }
369
+ }
370
+
371
+ .checkbox__control {
372
+ @apply rounded-sm;
373
+
374
+ &::before {
375
+ @apply rounded-sm;
376
+ }
377
+
378
+ /* Size */
379
+ &[data-size="md"] {
380
+ @apply size-5;
381
+
382
+ &::before {
383
+ @apply size-5;
384
+ }
385
+
386
+ [data-slot="checkbox-default-indicator--checkmark"] {
387
+ @apply size-3;
388
+ }
389
+
390
+ [data-slot="checkbox-default-indicator--indeterminate"] {
391
+ @apply size-3;
392
+ }
393
+ }
394
+
395
+ /* Rounded */
396
+ &[data-rounded="true"] {
397
+ @apply rounded-full;
398
+
399
+ &::before {
400
+ @apply rounded-full;
401
+ }
402
+
403
+ [data-slot="checkbox-default-indicator--checkmark"] {
404
+ @apply size-2;
405
+ }
406
+
407
+ [data-slot="checkbox-default-indicator--indeterminate"] {
408
+ @apply size-2 stroke-[4px];
409
+ }
410
+ }
411
+
412
+ &[data-rounded="true"][data-size="md"] {
413
+ [data-slot="checkbox-default-indicator--checkmark"] {
414
+ @apply size-2.5;
415
+ }
416
+
417
+ [data-slot="checkbox-default-indicator--indeterminate"] {
418
+ @apply size-2.5;
419
+ }
420
+ }
421
+ }
422
+ }
423
+ @layer components {
424
+ .chip {
425
+ @apply chip-size-md;
426
+ }
427
+
428
+ /* Size variants */
429
+ .chip--sm {
430
+ @apply chip-size-sm;
431
+ }
432
+
433
+ .chip--lg {
434
+ @apply chip-size-lg;
435
+ }
436
+
437
+ /* Variant styles */
438
+ .chip--tertiary {
439
+ @apply border-border border;
440
+ }
441
+ }
442
+ @layer components {
443
+ /* Variants */
444
+ .close-button--default {
445
+ @apply light:bg-transparent;
446
+
447
+ @media (hover: hover) {
448
+ &:hover,
449
+ &[data-hovered="true"] {
450
+ @apply light:bg-default;
451
+ }
452
+ }
453
+ }
454
+ }
455
+ @layer components {
456
+ .combo-box {
457
+ @apply gap-field;
458
+
459
+ [data-slot="input"] {
460
+ &:has(+ .combo-box__trigger) {
461
+ @apply pr-8;
462
+ }
463
+ }
464
+ }
465
+
466
+ .combo-box__trigger {
467
+ @apply pr-3;
468
+ }
469
+
470
+ .combo-box__popover {
471
+ @apply rounded-list-box;
472
+
473
+ .list-box {
474
+ @apply popover-list-box;
475
+ }
476
+
477
+ [data-slot="list-box-item"] {
478
+ @apply popover-list-box-item;
479
+ }
480
+
481
+ .list-box-item__indicator {
482
+ @apply popover-list-box-item-indicator;
483
+ }
484
+ }
485
+ }
486
+ @layer components {
487
+ .alert-dialog__dialog--sm,
488
+ .modal__dialog--sm {
489
+ @apply max-w-md;
490
+ }
491
+
492
+ .alert-dialog__dialog--md,
493
+ .modal__dialog--md {
494
+ @apply max-w-2xl;
495
+ }
496
+
497
+ .alert-dialog__dialog--lg,
498
+ .modal__dialog--lg {
499
+ @apply max-w-3xl;
500
+ }
501
+ }
502
+ @layer components {
503
+ .dropdown__popover {
504
+ @apply rounded-list-box;
505
+
506
+ [data-slot="dropdown-menu"] {
507
+ @apply popover-list-box;
508
+ }
509
+
510
+ [data-slot="menu-item"] {
511
+ @apply popover-list-box-item;
512
+ }
513
+ }
514
+ }
515
+ @layer components {
516
+ .input {
517
+ @apply input-size-lg;
518
+ }
519
+
520
+ .input--primary {
521
+ @apply input-style-primary;
522
+ }
523
+ }
524
+ @layer components {
525
+ .input-group {
526
+ @apply min-h-12;
527
+ }
528
+
529
+ .input-group__input {
530
+ @apply px-4 text-base;
531
+ }
532
+
533
+ .input-group--primary {
534
+ @apply input-style-primary;
535
+ }
536
+
537
+ .input-group__prefix {
538
+ @apply px-4;
539
+ }
540
+
541
+ .input-group__suffix {
542
+ @apply px-4;
543
+
544
+ &:has(button) {
545
+ @apply pr-1.5;
546
+ }
547
+ }
548
+ }
549
+ @layer components {
550
+ .number-field {
551
+ @apply gap-field;
552
+ }
553
+
554
+ .number-field__group {
555
+ @apply input-size-lg px-0;
556
+
557
+ grid-template-columns: auto 1fr auto;
558
+ }
559
+
560
+ .number-field__input {
561
+ @apply input-text-lg;
562
+ }
563
+
564
+ .number-field__increment-button,
565
+ .number-field__decrement-button {
566
+ @apply w-12;
567
+ }
568
+
569
+ .number-field--primary .number-field__group {
570
+ @apply input-group-style-primary;
571
+ }
572
+ }
573
+ @layer components {
574
+ .pagination__link {
575
+ @apply rounded-button-sm;
576
+
577
+ &[data-active="true"] {
578
+ @apply bg-accent text-accent-foreground;
579
+ }
580
+ }
581
+
582
+ .pagination--sm {
583
+ .pagination__link {
584
+ @apply rounded-button-xs;
585
+ }
586
+ }
587
+
588
+ .pagination--lg {
589
+ .pagination__link {
590
+ @apply rounded-button-md;
591
+ }
592
+ }
593
+ }
594
+ @layer components {
595
+ .radio__control {
596
+ &[data-size="md"] {
597
+ @apply size-5;
598
+ }
599
+ }
600
+
601
+ .radio-group--primary .radio__control {
602
+ @apply shadow-none;
603
+
604
+ /* Default indicator color (unselected) */
605
+ .radio:not([aria-checked="true"], [data-selected="true"]) & .radio__indicator:empty::before {
606
+ @apply border-border border-2;
607
+ }
608
+ }
609
+ }
610
+ @layer components {
611
+ .search-field {
612
+ @apply gap-field;
613
+ }
614
+
615
+ .search-field__group {
616
+ @apply input-size-lg px-0;
617
+ }
618
+
619
+ .search-field--primary .search-field__group {
620
+ @apply input-group-style-primary;
621
+ }
622
+
623
+ .search-field__search-icon {
624
+ @apply ml-4;
625
+ }
626
+
627
+ .search-field__clear-button {
628
+ @apply bg-default mr-3;
629
+ }
630
+
631
+ .search-field__input {
632
+ @apply input-text-lg;
633
+
634
+ .search-field__group:has([data-slot="search-field-search-icon"]) & {
635
+ @apply pl-3;
636
+ }
637
+
638
+ .search-field__group:has([slot="clear"]) & {
639
+ @apply pr-3;
640
+ }
641
+ }
642
+ }
643
+ @layer components {
644
+ .select {
645
+ @apply gap-field;
646
+ }
647
+
648
+ .select--primary .select__trigger {
649
+ @apply input-style-primary;
650
+ }
651
+
652
+ .select__trigger {
653
+ @apply input-size-lg;
654
+
655
+ &:has(.select__indicator) {
656
+ @apply pr-8;
657
+ }
658
+
659
+ &[data-pressed="true"] {
660
+ @apply status-focused;
661
+
662
+ border-color: var(--color-field-border-focus);
663
+ background-color: var(--color-field-focus);
664
+
665
+ --tw-ring-offset-width: 0px;
666
+ }
667
+ }
668
+
669
+ .select--secondary .select__trigger {
670
+ &[data-pressed="true"] {
671
+ background-color: var(--color-default);
672
+ }
673
+ }
674
+
675
+ .select__value {
676
+ @apply input-text-lg flex items-center px-0;
677
+ }
678
+
679
+ .select__indicator {
680
+ @apply right-3;
681
+ }
682
+
683
+ .select__popover {
684
+ @apply rounded-list-box;
685
+
686
+ [data-slot="list-box"] {
687
+ @apply popover-list-box;
688
+ }
689
+
690
+ [data-slot="list-box-item"] {
691
+ @apply popover-list-box-item;
692
+ }
693
+ }
694
+
695
+ .list-box-item__indicator {
696
+ @apply popover-list-box-item-indicator;
697
+ }
698
+ }
699
+ @layer components {
700
+ .slider {
701
+ &[data-orientation="horizontal"] {
702
+ @apply gap-y-2;
703
+
704
+ .slider__track {
705
+ /* Add transparent borders to provide space for thumb at edges */
706
+ /* Thumb width is 1.5rem (24px), so half is 0.75rem (12px) */
707
+ @apply h-2 border-x-6;
708
+ }
709
+
710
+ .slider__thumb {
711
+ @apply slider-thumb;
712
+ }
713
+ }
714
+
715
+ &[data-orientation="vertical"] {
716
+ .label {
717
+ @apply justify-self-center;
718
+ }
719
+
720
+ .slider__track {
721
+ /* Add transparent borders to provide space for thumb at edges */
722
+ /* Thumb width is 1.5rem (24px), so half is 0.75rem (12px) */
723
+ @apply w-2 border-y-6;
724
+ }
725
+
726
+ .slider__thumb {
727
+ @apply slider-thumb;
728
+ }
729
+ }
730
+ }
731
+ }
732
+ @utility slider-thumb {
733
+ /* Thumb width + border width */
734
+ @apply size-3;
735
+
736
+ &::after {
737
+ @apply outline-accent size-3 outline-2;
738
+ }
739
+ }
740
+ @layer components {
741
+ .tabs__list {
742
+ @apply rounded-button-lg;
743
+ }
744
+
745
+ .tabs__tab {
746
+ @apply button-size-md;
747
+ }
748
+
749
+ .tabs__indicator {
750
+ @apply rounded-button-md;
751
+ }
752
+ }
753
+ @layer components {
754
+ .tag:is([data-selected="true"], [aria-selected="true"]) {
755
+ &.tag--default {
756
+ @apply bg-accent text-accent-foreground;
757
+
758
+ /* Selected + Hover state */
759
+ @media (hover: hover) {
760
+ &:is(:hover, [data-hovered="true"]) {
761
+ @apply bg-accent-hover;
762
+ }
763
+ }
764
+ }
765
+
766
+ &.tag--surface {
767
+ @apply border-accent;
768
+ }
769
+
770
+ .tag__remove-button {
771
+ @apply bg-transparent;
772
+ }
773
+ }
774
+
775
+ .tag--surface {
776
+ @apply border-border border;
777
+ }
778
+
779
+ .tag__remove-button {
780
+ @apply -mr-0.5;
781
+ }
782
+
783
+ .tag--sm {
784
+ @apply chip-size-sm;
785
+
786
+ .tag__remove-button {
787
+ @apply size-chip-icon-sm;
788
+ }
789
+ }
790
+
791
+ .tag--md {
792
+ @apply chip-size-md;
793
+
794
+ .tag__remove-button {
795
+ @apply size-chip-icon-md;
796
+ }
797
+ }
798
+
799
+ .tag--lg {
800
+ @apply chip-size-lg;
801
+
802
+ .tag__remove-button {
803
+ @apply size-chip-icon-lg;
804
+ }
805
+ }
806
+ }
807
+ @layer components {
808
+ .textarea {
809
+ @apply input-size-lg py-3;
810
+ }
811
+
812
+ .textarea--primary {
813
+ @apply input-style-primary;
814
+ }
815
+ }
816
+ @layer components {
817
+ .textfield {
818
+ @apply gap-field;
819
+ }
820
+ }
821
+ @layer components {
822
+ .toast {
823
+ @apply rounded-toast;
824
+
825
+ .close-button {
826
+ @apply light:sm:bg-background;
827
+ }
828
+ }
829
+
830
+ .toast__action {
831
+ @apply my-1 self-end sm:self-center;
832
+ }
833
+ }
834
+ @layer components {
835
+ .toggle-button {
836
+ & svg {
837
+ @apply mx-0;
838
+ }
839
+ }
840
+
841
+ .toggle-button--default {
842
+ --toggle-button-bg-selected: var(--color-accent);
843
+ --toggle-button-fg-selected: var(--color-accent-foreground);
844
+ --toggle-button-bg-selected-hover: var(--color-accent-hover);
845
+ --toggle-button-bg-selected-pressed: var(--color-accent-hover);
846
+ }
847
+
848
+ .toggle-button--ghost {
849
+ @apply border-border border;
850
+
851
+ &[data-selected="true"] {
852
+ @apply border-accent;
853
+ }
854
+ }
855
+
856
+ /* Size variants */
857
+ .toggle-button--sm {
858
+ @apply chip-size-sm;
859
+ }
860
+
861
+ .toggle-button--md {
862
+ @apply chip-size-md;
863
+ }
864
+
865
+ .toggle-button--lg {
866
+ @apply chip-size-lg;
867
+ }
868
+
869
+ /* Icon-only modifier */
870
+ .toggle-button--icon-only.toggle-button--sm {
871
+ @apply w-chip-sm;
872
+ }
873
+
874
+ .toggle-button--icon-only.toggle-button--md {
875
+ @apply w-chip-md;
876
+ }
877
+
878
+ .toggle-button--icon-only.toggle-button--lg {
879
+ @apply w-chip-lg;
880
+ }
881
+ }
882
+ @layer components {
883
+ /* Apply border radius to first button (start edge) */
884
+ .toggle-button-group--horizontal .toggle-button:first-child {
885
+ @apply rounded-s-chip-md;
886
+
887
+ &.toggle-button--sm {
888
+ @apply rounded-s-chip-sm;
889
+ }
890
+
891
+ &.toggle-button--lg {
892
+ @apply rounded-s-chip-lg;
893
+ }
894
+ }
895
+
896
+ /* Apply border radius to last button (end edge) */
897
+ .toggle-button-group--horizontal .toggle-button:last-child {
898
+ @apply rounded-e-chip-md;
899
+
900
+ &.toggle-button--sm {
901
+ @apply rounded-e-chip-sm;
902
+ }
903
+
904
+ &.toggle-button--lg {
905
+ @apply rounded-e-chip-lg;
906
+ }
907
+ }
908
+
909
+ /* If only one button, apply both rounded edges */
910
+ .toggle-button-group--horizontal .toggle-button:first-child:last-child {
911
+ @apply rounded-chip-md;
912
+
913
+ &.toggle-button--sm {
914
+ @apply rounded-chip-sm;
915
+ }
916
+
917
+ &.toggle-button--lg {
918
+ @apply rounded-chip-lg;
919
+ }
920
+ }
921
+
922
+ /* Apply border radius to first button (top edge) in vertical */
923
+ .toggle-button-group--vertical .toggle-button:first-child {
924
+ @apply rounded-t-chip-md;
925
+
926
+ &.toggle-button--sm {
927
+ @apply rounded-t-chip-sm;
928
+ }
929
+
930
+ &.toggle-button--lg {
931
+ @apply rounded-t-chip-lg;
932
+ }
933
+ }
934
+
935
+ /* Apply border radius to last button (bottom edge) in vertical */
936
+ .toggle-button-group--vertical .toggle-button:last-child {
937
+ @apply rounded-b-chip-md;
938
+
939
+ &.toggle-button--sm {
940
+ @apply rounded-b-chip-sm;
941
+ }
942
+
943
+ &.toggle-button--lg {
944
+ @apply rounded-b-chip-lg;
945
+ }
946
+ }
947
+
948
+ /* If only one button in vertical, apply all rounded edges */
949
+ .toggle-button-group--vertical .toggle-button:first-child:last-child {
950
+ @apply rounded-chip-md;
951
+
952
+ &.toggle-button--sm {
953
+ @apply rounded-chip-sm;
954
+ }
955
+
956
+ &.toggle-button--lg {
957
+ @apply rounded-chip-lg;
958
+ }
959
+ }
960
+
961
+ /* Restore border radius in detached mode */
962
+ .toggle-button-group--detached .toggle-button {
963
+ @apply rounded-chip-md;
964
+
965
+ &.toggle-button--sm {
966
+ @apply rounded-chip-sm;
967
+ }
968
+
969
+ &.toggle-button--lg {
970
+ @apply rounded-chip-lg;
971
+ }
972
+ }
973
+ }
974
+ @layer components {
975
+ .tooltip {
976
+ @apply rounded-lg px-2.5 py-1.5;
977
+ }
978
+
979
+ .tooltip [data-slot="overlay-arrow"] path {
980
+ d: path("M0 0 L6 6 L12 0");
981
+ }
982
+ }
@@ -0,0 +1 @@
1
+ declare module "@demodev-ui/react/styles";
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@demodev-ui/react",
3
+ "version": "1.0.2",
4
+ "type": "module",
5
+ "lint-staged": {
6
+ "*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}": [
7
+ "prettier --write",
8
+ "eslint --fix"
9
+ ],
10
+ "*.css": [
11
+ "prettier --write",
12
+ "stylelint --fix"
13
+ ]
14
+ },
15
+ "sideEffects": [
16
+ "*.css"
17
+ ],
18
+ "exports": {
19
+ "./styles": {
20
+ "types": "./dist/styles/index.d.ts",
21
+ "default": "./dist/styles/index.css"
22
+ }
23
+ },
24
+ "files": [
25
+ "dist"
26
+ ],
27
+ "peerDependencies": {
28
+ "@heroui/react": "3.0.1",
29
+ "@heroui/styles": "3.0.1",
30
+ "tailwindcss": "^4"
31
+ },
32
+ "devDependencies": {
33
+ "@heroui/react": "3.0.1",
34
+ "@heroui/styles": "3.0.1",
35
+ "@tsconfig/create-react-app": "^2.0.10",
36
+ "@types/react": "^19.2.5",
37
+ "@types/react-dom": "^19.2.3",
38
+ "tailwindcss": "^4.1.18",
39
+ "@demodev-ui/core": "^0.0.0"
40
+ },
41
+ "scripts": {
42
+ "build": "postcss src/styles/index.css -o dist/styles/index.css && cp src/styles/index.d.ts dist/styles/index.d.ts",
43
+ "lint-staged": "lint-staged"
44
+ }
45
+ }