@svkit/styles 0.0.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/dist/components/accordion.css +82 -0
  2. package/dist/components/accordion.js +1 -0
  3. package/dist/components/alert-dialog.css +26 -0
  4. package/dist/components/alert-dialog.js +1 -0
  5. package/dist/components/alert.css +21 -0
  6. package/dist/components/alert.js +1 -0
  7. package/dist/components/avatar.css +158 -0
  8. package/dist/components/avatar.js +1 -0
  9. package/dist/components/badge.css +125 -0
  10. package/dist/components/badge.js +1 -0
  11. package/dist/components/breadcrumb.css +30 -0
  12. package/dist/components/breadcrumb.js +1 -0
  13. package/dist/components/button-group.css +99 -0
  14. package/dist/components/button-group.js +1 -0
  15. package/dist/components/button.css +205 -0
  16. package/dist/components/button.js +1 -0
  17. package/dist/components/calendar.css +34 -0
  18. package/dist/components/calendar.js +1 -0
  19. package/dist/components/card.css +114 -0
  20. package/dist/components/card.js +1 -0
  21. package/dist/components/carousel.css +5 -0
  22. package/dist/components/carousel.js +1 -0
  23. package/dist/components/chart.css +5 -0
  24. package/dist/components/chart.js +1 -0
  25. package/dist/components/checkbox.css +20 -0
  26. package/dist/components/checkbox.js +1 -0
  27. package/dist/components/command.css +14 -0
  28. package/dist/components/command.js +1 -0
  29. package/dist/components/context-menu.css +43 -0
  30. package/dist/components/context-menu.js +1 -0
  31. package/dist/components/data-table.css +5 -0
  32. package/dist/components/data-table.js +1 -0
  33. package/dist/components/dialog.css +30 -0
  34. package/dist/components/dialog.js +1 -0
  35. package/dist/components/drawer.css +10 -0
  36. package/dist/components/drawer.js +1 -0
  37. package/dist/components/dropdown-menu.css +195 -0
  38. package/dist/components/dropdown-menu.js +1 -0
  39. package/dist/components/empty.css +25 -0
  40. package/dist/components/empty.js +1 -0
  41. package/dist/components/field.css +25 -0
  42. package/dist/components/field.js +1 -0
  43. package/dist/components/form.css +7 -0
  44. package/dist/components/form.js +1 -0
  45. package/dist/components/hover-card.css +3 -0
  46. package/dist/components/hover-card.js +1 -0
  47. package/dist/components/index.css +55 -0
  48. package/dist/components/index.js +1 -0
  49. package/dist/components/input-group.css +42 -0
  50. package/dist/components/input-group.js +1 -0
  51. package/dist/components/input-otp.css +33 -0
  52. package/dist/components/input-otp.js +1 -0
  53. package/dist/components/input.css +65 -0
  54. package/dist/components/input.js +1 -0
  55. package/dist/components/item.css +62 -0
  56. package/dist/components/item.js +1 -0
  57. package/dist/components/kbd.css +12 -0
  58. package/dist/components/kbd.js +1 -0
  59. package/dist/components/label.css +20 -0
  60. package/dist/components/label.js +1 -0
  61. package/dist/components/menu.css +110 -0
  62. package/dist/components/menu.js +1 -0
  63. package/dist/components/menubar.css +54 -0
  64. package/dist/components/menubar.js +1 -0
  65. package/dist/components/native-select.css +23 -0
  66. package/dist/components/native-select.js +1 -0
  67. package/dist/components/navigation-menu.css +48 -0
  68. package/dist/components/navigation-menu.js +1 -0
  69. package/dist/components/pagination.css +33 -0
  70. package/dist/components/pagination.js +1 -0
  71. package/dist/components/popover.css +6 -0
  72. package/dist/components/popover.js +1 -0
  73. package/dist/components/progress.css +9 -0
  74. package/dist/components/progress.js +1 -0
  75. package/dist/components/radio-group.css +24 -0
  76. package/dist/components/radio-group.js +1 -0
  77. package/dist/components/range-calendar.css +34 -0
  78. package/dist/components/range-calendar.js +1 -0
  79. package/dist/components/resizable.css +4 -0
  80. package/dist/components/resizable.js +1 -0
  81. package/dist/components/scroll-area.css +18 -0
  82. package/dist/components/scroll-area.js +1 -0
  83. package/dist/components/select.css +57 -0
  84. package/dist/components/select.js +1 -0
  85. package/dist/components/separator.css +13 -0
  86. package/dist/components/separator.js +1 -0
  87. package/dist/components/sheet.css +45 -0
  88. package/dist/components/sheet.js +1 -0
  89. package/dist/components/sidebar.css +71 -0
  90. package/dist/components/sidebar.js +1 -0
  91. package/dist/components/skeleton.css +33 -0
  92. package/dist/components/skeleton.js +1 -0
  93. package/dist/components/slider.css +43 -0
  94. package/dist/components/slider.js +1 -0
  95. package/dist/components/spinner.css +5 -0
  96. package/dist/components/spinner.js +1 -0
  97. package/dist/components/switch.css +46 -0
  98. package/dist/components/switch.js +1 -0
  99. package/dist/components/table.css +10 -0
  100. package/dist/components/table.js +1 -0
  101. package/dist/components/tabs.css +40 -0
  102. package/dist/components/tabs.js +1 -0
  103. package/dist/components/textarea.css +11 -0
  104. package/dist/components/textarea.js +1 -0
  105. package/dist/components/toast.css +156 -0
  106. package/dist/components/toast.js +1 -0
  107. package/dist/components/toggle-group.css +13 -0
  108. package/dist/components/toggle-group.js +1 -0
  109. package/dist/components/toggle.css +25 -0
  110. package/dist/components/toggle.js +1 -0
  111. package/dist/components/tooltip.css +90 -0
  112. package/dist/components/tooltip.js +1 -0
  113. package/dist/index-full.css +11 -0
  114. package/dist/index.css +9 -0
  115. package/dist/index.js +1 -0
  116. package/dist/styles.css +5344 -0
  117. package/index-full.css +11 -0
  118. package/index.css +9 -0
  119. package/package.json +37 -0
  120. package/src/base/base.css +161 -0
  121. package/src/components/accordion.css +82 -0
  122. package/src/components/alert-dialog.css +26 -0
  123. package/src/components/alert.css +21 -0
  124. package/src/components/avatar.css +158 -0
  125. package/src/components/badge.css +125 -0
  126. package/src/components/breadcrumb.css +30 -0
  127. package/src/components/button-group.css +99 -0
  128. package/src/components/button.css +205 -0
  129. package/src/components/calendar.css +34 -0
  130. package/src/components/card.css +114 -0
  131. package/src/components/carousel.css +5 -0
  132. package/src/components/chart.css +5 -0
  133. package/src/components/checkbox.css +20 -0
  134. package/src/components/command.css +14 -0
  135. package/src/components/context-menu.css +43 -0
  136. package/src/components/data-table.css +5 -0
  137. package/src/components/dialog.css +30 -0
  138. package/src/components/drawer.css +10 -0
  139. package/src/components/dropdown-menu.css +195 -0
  140. package/src/components/empty.css +25 -0
  141. package/src/components/field.css +25 -0
  142. package/src/components/form.css +7 -0
  143. package/src/components/hover-card.css +3 -0
  144. package/src/components/index.css +55 -0
  145. package/src/components/input-group.css +42 -0
  146. package/src/components/input-otp.css +33 -0
  147. package/src/components/input.css +65 -0
  148. package/src/components/item.css +62 -0
  149. package/src/components/kbd.css +12 -0
  150. package/src/components/label.css +20 -0
  151. package/src/components/menu.css +110 -0
  152. package/src/components/menubar.css +54 -0
  153. package/src/components/native-select.css +23 -0
  154. package/src/components/navigation-menu.css +48 -0
  155. package/src/components/pagination.css +33 -0
  156. package/src/components/popover.css +6 -0
  157. package/src/components/progress.css +9 -0
  158. package/src/components/radio-group.css +24 -0
  159. package/src/components/range-calendar.css +34 -0
  160. package/src/components/resizable.css +4 -0
  161. package/src/components/scroll-area.css +18 -0
  162. package/src/components/select.css +57 -0
  163. package/src/components/separator.css +13 -0
  164. package/src/components/sheet.css +45 -0
  165. package/src/components/sidebar.css +71 -0
  166. package/src/components/skeleton.css +33 -0
  167. package/src/components/slider.css +43 -0
  168. package/src/components/spinner.css +5 -0
  169. package/src/components/switch.css +46 -0
  170. package/src/components/table.css +10 -0
  171. package/src/components/tabs.css +40 -0
  172. package/src/components/textarea.css +11 -0
  173. package/src/components/toast.css +156 -0
  174. package/src/components/toggle-group.css +13 -0
  175. package/src/components/toggle.css +25 -0
  176. package/src/components/tooltip.css +90 -0
  177. package/src/themes/default.css +91 -0
  178. package/src/tokens/interactions.css +72 -0
  179. package/src/tokens/variables.css +111 -0
@@ -0,0 +1,43 @@
1
+ @layer components {
2
+ .sv-slider {
3
+ @apply relative flex w-full touch-none items-center select-none;
4
+ @apply data-disabled:opacity-50;
5
+ @apply data-vertical:h-full data-vertical:w-auto data-vertical:flex-col;
6
+ }
7
+
8
+ .sv-slider[data-orientation='vertical'] {
9
+ @apply min-h-40;
10
+ }
11
+
12
+ .sv-slider-track {
13
+ @apply bg-muted relative grow overflow-hidden rounded-full;
14
+ }
15
+
16
+ .sv-slider-track[data-orientation='horizontal'] {
17
+ @apply h-1 w-full;
18
+ }
19
+
20
+ .sv-slider-track[data-orientation='vertical'] {
21
+ @apply h-full w-1;
22
+ }
23
+
24
+ .sv-slider-range {
25
+ @apply bg-primary absolute select-none;
26
+ }
27
+
28
+ .sv-slider-track[data-orientation='horizontal'] .sv-slider-range {
29
+ @apply h-full;
30
+ }
31
+
32
+ .sv-slider-track[data-orientation='vertical'] .sv-slider-range {
33
+ @apply w-full;
34
+ }
35
+
36
+ .sv-slider-thumb {
37
+ @apply relative block size-3 shrink-0 rounded-full border bg-white transition-[color,box-shadow] select-none;
38
+ @apply border-ring ring-ring/50;
39
+ @apply focus-visible:ring-3 focus-visible:outline-hidden;
40
+ @apply disabled:pointer-events-none disabled:opacity-50;
41
+ @apply hover:ring-3 active:ring-3;
42
+ }
43
+ }
@@ -0,0 +1 @@
1
+ import '../styles.css';
@@ -0,0 +1,5 @@
1
+ @layer components {
2
+ .sv-spinner {
3
+ @apply size-4 animate-spin;
4
+ }
5
+ }
@@ -0,0 +1 @@
1
+ import '../styles.css';
@@ -0,0 +1,46 @@
1
+ @layer components {
2
+ .sv-switch {
3
+ @apply shrink-0 rounded-full border border-transparent transition-colors;
4
+ @apply focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3;
5
+ @apply bg-surface;
6
+ @apply data-state-checked:bg-primary;
7
+ @apply data-disabled:cursor-not-allowed data-disabled:opacity-50;
8
+ }
9
+
10
+ .sv-switch[data-size='sm'] {
11
+ @apply h-[14px] w-[24px];
12
+ }
13
+
14
+ .sv-switch[data-size='md'] {
15
+ @apply h-[18px] w-[32px];
16
+ }
17
+
18
+ .sv-switch-thumb {
19
+ @apply bg-background block rounded-full transition-transform;
20
+ @apply pointer-events-none ring-0;
21
+ }
22
+
23
+ .sv-switch[data-size='sm'] .sv-switch-thumb {
24
+ @apply size-3;
25
+ }
26
+
27
+ .sv-switch[data-size='md'] .sv-switch-thumb {
28
+ @apply size-4;
29
+ }
30
+
31
+ .sv-switch[data-size='sm'][data-state='checked'] .sv-switch-thumb {
32
+ transform: translateX(calc(100% - 2px));
33
+ }
34
+
35
+ .sv-switch[data-size='md'][data-state='checked'] .sv-switch-thumb {
36
+ transform: translateX(calc(100% - 2px));
37
+ }
38
+
39
+ .sv-switch[data-state='unchecked'] .sv-switch-thumb {
40
+ transform: translateX(0);
41
+ }
42
+
43
+ .sv-switch[aria-invalid='true'] {
44
+ @apply border-danger ring-danger/20 ring-3;
45
+ }
46
+ }
@@ -0,0 +1 @@
1
+ import '../styles.css';
@@ -0,0 +1,10 @@
1
+ @layer components {
2
+ .sv-table-container { @apply relative w-full overflow-x-auto; }
3
+ .sv-table { @apply w-full caption-bottom text-sm; }
4
+ .sv-table-header { @apply [&_tr]:border-b; }
5
+ .sv-table-body { @apply [&_tr:last-child]:border-0; }
6
+ .sv-table-row { @apply border-b border-border transition-colors hover:bg-muted/50 data-state-selected:bg-muted; }
7
+ .sv-table-head { @apply h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0; }
8
+ .sv-table-cell { @apply p-2 align-middle [&:has([role=checkbox])]:pr-0; }
9
+ .sv-table-caption { @apply text-muted-foreground mt-4 text-sm; }
10
+ }
@@ -0,0 +1 @@
1
+ import '../styles.css';
@@ -0,0 +1,40 @@
1
+ @layer components {
2
+ .sv-tabs {
3
+ @apply flex gap-2 data-orientation-horizontal:flex-col;
4
+ }
5
+
6
+ .sv-tabs-list {
7
+ @apply text-muted-foreground inline-flex h-8 w-fit items-center justify-center rounded-lg p-[3px];
8
+ @apply bg-muted;
9
+ }
10
+
11
+ .sv-tabs-list[data-variant='line'] {
12
+ @apply gap-1 rounded-none bg-transparent;
13
+ }
14
+
15
+ .sv-tabs-trigger {
16
+ @apply text-foreground/60 hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap transition-all;
17
+ @apply focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3;
18
+ @apply disabled:pointer-events-none disabled:opacity-50;
19
+
20
+ &[data-state='active'] {
21
+ @apply bg-background text-foreground shadow-sm;
22
+ }
23
+ }
24
+
25
+ .sv-tabs-list[data-variant='line'] .sv-tabs-trigger[data-state='active'] {
26
+ @apply bg-transparent shadow-none;
27
+ }
28
+
29
+ .sv-tabs-list:not([data-variant='line']) .sv-tabs-trigger::after {
30
+ @apply bg-foreground absolute inset-x-0 bottom-[-5px] h-0.5 rounded-full opacity-0 transition-opacity content-[''];
31
+ }
32
+
33
+ .sv-tabs-list:not([data-variant='line']) .sv-tabs-trigger[data-state='active']::after {
34
+ @apply opacity-100;
35
+ }
36
+
37
+ .sv-tabs-content {
38
+ @apply flex-1 text-sm outline-none;
39
+ }
40
+ }
@@ -0,0 +1 @@
1
+ import '../styles.css';
@@ -0,0 +1,11 @@
1
+ @layer components {
2
+ .sv-textarea {
3
+ @apply placeholder:text-muted-foreground border-border flex field-sizing-content min-h-16 w-full rounded-lg border bg-transparent px-2.5 py-2 text-base transition-colors outline-none md:text-sm;
4
+ @apply focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3;
5
+ @apply disabled:cursor-not-allowed disabled:opacity-50;
6
+ }
7
+
8
+ .sv-textarea[aria-invalid='true'] {
9
+ @apply border-danger ring-danger/20 ring-3;
10
+ }
11
+ }
@@ -0,0 +1 @@
1
+ import '../styles.css';
@@ -0,0 +1,156 @@
1
+ @layer components {
2
+ .sv-toast-viewport {
3
+ @apply fixed z-50 mx-auto flex w-62.5 sm:w-75;
4
+ }
5
+
6
+ .sv-toast-viewport[data-position='bottom-right'] {
7
+ @apply top-auto right-4 bottom-4 sm:right-8 sm:bottom-8;
8
+ }
9
+
10
+ .sv-toast-root {
11
+ @apply border-border absolute right-0 bottom-0 left-auto z-[calc(1000-var(--toast-index))] mr-0 h-(--height) w-full origin-bottom transform-[translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-(var(--toast-index)*var(--peek))-(var(--shrink)*var(--height))))_scale(var(--scale))] rounded-lg border bg-clip-padding p-4 shadow-lg select-none [--gap:0.75rem] [--height:var(--toast-frontmost-height,var(--toast-height))] [--offset-y:calc(var(--toast-offset-y)*-1+calc(var(--toast-index)*var(--gap)*-1)+var(--toast-swipe-movement-y))] [--peek:0.75rem] [--scale:calc(max(0,1-(var(--toast-index)*0.1)))] [--shrink:calc(1-var(--scale))] [transition:transform_0.5s_cubic-bezier(0.22,1,0.36,1),opacity_0.5s,height_0.15s] after:absolute after:top-full after:left-0 after:h-[calc(var(--gap)+1px)] after:w-full after:content-[''] data-ending-style:transform-[translateY(150%)] data-ending-style:opacity-0 data-expanded:h-(--toast-height) data-expanded:transform-[translateX(var(--toast-swipe-movement-x))_translateY(var(--offset-y))] data-limited:opacity-0 data-starting-style:transform-[translateY(150%)] data-ending-style:data-swipe-direction-down:transform-[translateY(calc(var(--toast-swipe-movement-y)+150%))] data-expanded:data-ending-style:data-swipe-direction-down:transform-[translateY(calc(var(--toast-swipe-movement-y)+150%))] data-ending-style:data-swipe-direction-left:transform-[translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))] data-expanded:data-ending-style:data-swipe-direction-left:transform-[translateX(calc(var(--toast-swipe-movement-x)-150%))_translateY(var(--offset-y))] data-ending-style:data-swipe-direction-right:transform-[translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))] data-expanded:data-ending-style:data-swipe-direction-right:transform-[translateX(calc(var(--toast-swipe-movement-x)+150%))_translateY(var(--offset-y))] data-ending-style:data-swipe-direction-up:transform-[translateY(calc(var(--toast-swipe-movement-y)-150%))];
12
+ }
13
+
14
+ .sv-toast-content {
15
+ @apply overflow-hidden transition-opacity duration-250 data-behind:pointer-events-none data-behind:opacity-0 data-expanded:pointer-events-auto data-expanded:opacity-100;
16
+ }
17
+
18
+ .sv-toast-title {
19
+ @apply text-surface-foreground text-[0.975rem] leading-5;
20
+ }
21
+
22
+ .sv-toast-description {
23
+ @apply text-surface-foreground/85 text-sm leading-5;
24
+ }
25
+
26
+ .sv-toast-icon {
27
+ @apply relative size-5 rounded-[10px] opacity-0;
28
+ transform: rotate(45deg);
29
+ animation: circleAnimation 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
30
+ animation-delay: 150ms;
31
+ }
32
+
33
+ .sv-toast-icon[data-type='success'] {
34
+ @apply bg-success/75;
35
+ }
36
+
37
+ .sv-toast-icon[data-type='error'] {
38
+ @apply bg-danger/75;
39
+ }
40
+
41
+ .sv-toast-icon[data-type='warning'] {
42
+ @apply bg-warning/75;
43
+ }
44
+
45
+ .sv-toast-icon[data-type='loading'] {
46
+ @apply bg-primary/75;
47
+ animation:
48
+ circleAnimation 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
49
+ toastLoadingSpin 1.2s linear infinite;
50
+ animation-delay: 150ms, 450ms;
51
+ }
52
+
53
+ .sv-toast-icon[data-type='message'] {
54
+ /* @apply bg-primary/75; */
55
+ }
56
+
57
+ .sv-toast-icon[data-type='error']::after,
58
+ .sv-toast-icon[data-type='error']::before {
59
+ content: '';
60
+ animation: firstLineAnimation 0.15s ease-out forwards;
61
+ animation-delay: 150ms;
62
+ position: absolute;
63
+ border-radius: 3px;
64
+ opacity: 0;
65
+ background: var(--color-danger-foreground);
66
+ bottom: 9px;
67
+ left: 4px;
68
+ height: 2px;
69
+ width: 12px;
70
+ }
71
+
72
+ .sv-toast-icon[data-type='error']::after {
73
+ animation: secondLineAnimation 0.15s ease-out forwards;
74
+ animation-delay: 180ms;
75
+ transform: rotate(90deg);
76
+ }
77
+
78
+ .sv-toast-icon[data-type='success']::after {
79
+ content: '';
80
+ box-sizing: border-box;
81
+ animation: checkmarkAnimation 0.2s ease-out forwards;
82
+ opacity: 0;
83
+ animation-delay: 200ms;
84
+ position: absolute;
85
+ border-right: 2px solid;
86
+ border-bottom: 2px solid;
87
+ border-color: var(--color-primary-foreground);
88
+ bottom: 6px;
89
+ left: 6px;
90
+ height: 10px;
91
+ width: 6px;
92
+ }
93
+
94
+ @keyframes firstLineAnimation {
95
+ from {
96
+ transform: scale(0);
97
+ opacity: 0;
98
+ }
99
+ to {
100
+ transform: scale(1);
101
+ opacity: 1;
102
+ }
103
+ }
104
+
105
+ @keyframes secondLineAnimation {
106
+ from {
107
+ transform: scale(0) rotate(90deg);
108
+ opacity: 0;
109
+ }
110
+ to {
111
+ transform: scale(1) rotate(90deg);
112
+ opacity: 1;
113
+ }
114
+ }
115
+
116
+ @keyframes checkmarkAnimation {
117
+ 0% {
118
+ height: 0;
119
+ width: 0;
120
+ opacity: 0;
121
+ }
122
+ 40% {
123
+ height: 0;
124
+ width: 6px;
125
+ opacity: 1;
126
+ }
127
+ 100% {
128
+ opacity: 1;
129
+ height: 10px;
130
+ }
131
+ }
132
+
133
+ @keyframes toastLoadingSpin {
134
+ from {
135
+ transform: rotate(45deg);
136
+ }
137
+ to {
138
+ transform: rotate(405deg);
139
+ }
140
+ }
141
+
142
+ @keyframes circleAnimation {
143
+ from {
144
+ transform: scale(0) rotate(45deg);
145
+ opacity: 0;
146
+ }
147
+ to {
148
+ transform: scale(1) rotate(45deg);
149
+ opacity: 1;
150
+ }
151
+ }
152
+
153
+ .sv-toast-close {
154
+ @apply text-surface-foreground/50 hover:text-surface-foreground absolute top-2 right-2 flex h-5 w-5 cursor-pointer items-center justify-center rounded-sm border-none bg-transparent;
155
+ }
156
+ }
@@ -0,0 +1 @@
1
+ import '../styles.css';
@@ -0,0 +1,13 @@
1
+ @layer components {
2
+ .sv-toggle-group {
3
+ @apply flex w-fit flex-row items-center gap-2;
4
+ }
5
+
6
+ .sv-toggle-group[data-orientation='vertical'] {
7
+ @apply flex-col items-stretch;
8
+ }
9
+
10
+ .sv-toggle-group-item {
11
+ @apply shrink-0;
12
+ }
13
+ }
@@ -0,0 +1 @@
1
+ import '../styles.css';
@@ -0,0 +1,25 @@
1
+ @layer components {
2
+ .sv-toggle {
3
+ @apply inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none;
4
+ @apply focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3;
5
+ @apply hover:text-foreground hover:bg-muted;
6
+ @apply data-state-on:bg-muted;
7
+ @apply [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4;
8
+ }
9
+
10
+ .sv-toggle[data-size='sm'] {
11
+ @apply h-7 min-w-7 px-2.5 text-xs;
12
+ }
13
+
14
+ .sv-toggle[data-size='md'] {
15
+ @apply h-8 min-w-8 px-2.5;
16
+ }
17
+
18
+ .sv-toggle[data-size='lg'] {
19
+ @apply h-9 min-w-9 px-2.5;
20
+ }
21
+
22
+ .sv-toggle[data-variant='outline'] {
23
+ @apply border-border border bg-transparent;
24
+ }
25
+ }
@@ -0,0 +1 @@
1
+ import '../styles.css';
@@ -0,0 +1,90 @@
1
+ @layer components {
2
+ /* =========================
3
+ TOOLTIP CONTENT
4
+ ========================== */
5
+
6
+ .sv-tooltip-content {
7
+ @apply inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-xs bg-foreground text-background;
8
+
9
+ /* Open animations */
10
+ &[data-state="open"],
11
+ &[data-state="delayed-open"] {
12
+ @apply animate-in fade-in-0 zoom-in-95;
13
+ }
14
+
15
+ /* Close animation */
16
+ &[data-state="closed"] {
17
+ @apply animate-out fade-out-0 zoom-out-95;
18
+ }
19
+
20
+ /* Slide direction — physical sides */
21
+ &[data-side="bottom"] {
22
+ @apply slide-in-from-top-2;
23
+ }
24
+ &[data-side="top"] {
25
+ @apply slide-in-from-bottom-2;
26
+ }
27
+ &[data-side="left"] {
28
+ @apply slide-in-from-right-2;
29
+ }
30
+ &[data-side="right"] {
31
+ @apply slide-in-from-left-2;
32
+ }
33
+
34
+ /* Slide direction — logical sides */
35
+ &[data-side="inline-start"] {
36
+ @apply slide-in-from-right-2;
37
+ }
38
+ &[data-side="inline-end"] {
39
+ @apply slide-in-from-left-2;
40
+ }
41
+
42
+ /* kbd slot adjustments */
43
+ &:has([data-slot="kbd"]) {
44
+ padding-inline-end: 0.375rem;
45
+ }
46
+
47
+ /* Styles for nested kbd elements */
48
+ & [data-slot="kbd"] {
49
+ @apply relative isolate z-50 rounded-sm;
50
+ }
51
+ }
52
+
53
+ /* =========================
54
+ TOOLTIP ARROW
55
+ ========================== */
56
+
57
+ .sv-tooltip-arrow {
58
+ @apply size-2.5 rotate-45 rounded-xs bg-foreground fill-foreground;
59
+
60
+ /* Physical side offsets */
61
+ &[data-side="top"] {
62
+ translate: 50% calc(-50% + 2px);
63
+ }
64
+
65
+ &[data-side="bottom"] {
66
+ translate: -50% calc(- ((-50% + 1px)));
67
+ }
68
+
69
+ &[data-side="right"] {
70
+ translate: calc(50% + 2px) 50%;
71
+ }
72
+
73
+ &[data-side="left"] {
74
+ translate: 0 calc(- (50% - 3px));
75
+ }
76
+
77
+ /* Logical side offsets */
78
+ &[data-side="inline-end"] {
79
+ top: 50% !important;
80
+ left: -0.25rem;
81
+ translate: 0 -50%;
82
+ }
83
+
84
+ &[data-side="inline-start"] {
85
+ top: 50% !important;
86
+ right: -0.25rem;
87
+ translate: 0 -50%;
88
+ }
89
+ }
90
+ }
@@ -0,0 +1 @@
1
+ import '../styles.css';
@@ -0,0 +1,11 @@
1
+ /* @import "tailwindcss"; */
2
+ @import "tw-animate-css";
3
+
4
+ @import "./src/tokens/variables.css";
5
+ @import "./src/tokens/interactions.css";
6
+
7
+ @import "./src/themes/default.css";
8
+
9
+ @import "./src/base/base.css";
10
+
11
+ @import "./src/components/index.css";
package/dist/index.css ADDED
@@ -0,0 +1,9 @@
1
+ /* @import "tailwindcss"; */
2
+ @import "tw-animate-css";
3
+
4
+ @import "./src/tokens/variables.css";
5
+ @import "./src/tokens/interactions.css";
6
+
7
+ @import "./src/themes/default.css";
8
+
9
+ @import "./src/base/base.css";
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ import './styles.css';