@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,195 @@
1
+ @layer components {
2
+ /* =========================
3
+ CONTENT
4
+ ========================== */
5
+
6
+ .sv-dropdown-menu-content {
7
+ @apply z-50 overflow-visible outline-none;
8
+ width: var(--bits-dropdown-menu-anchor-width);
9
+
10
+ &[data-state="closed"] {
11
+ @apply overflow-hidden;
12
+ }
13
+ }
14
+
15
+ /* =========================
16
+ ITEM (shared base)
17
+ ========================== */
18
+
19
+ .sv-dropdown-menu-item {
20
+ @apply focus:bg-secondary focus:text-secondary-foreground;
21
+ @apply gap-1.5 rounded-md px-1.5 py-1 text-sm;
22
+ @apply relative flex cursor-default items-center outline-hidden select-none;
23
+ @apply [&_svg]:pointer-events-none [&_svg]:shrink-0;
24
+ @apply [&_svg:not([class*='size-'])]:size-4;
25
+
26
+ /* Inset */
27
+ &[data-inset] {
28
+ @apply ps-7;
29
+ }
30
+
31
+ /* Disabled */
32
+ &[data-disabled] {
33
+ pointer-events: none;
34
+ opacity: 0.5;
35
+ }
36
+
37
+ /* Destructive variant */
38
+ &[data-variant="destructive"] {
39
+ @apply text-danger;
40
+
41
+ &:focus {
42
+ @apply bg-danger/10 text-danger;
43
+ }
44
+
45
+ & *:not([data-slot]) > svg {
46
+ color: var(--color-danger);
47
+ }
48
+ }
49
+
50
+ /* Non-destructive focus: propagate accent color to descendants */
51
+ &:not([data-variant="destructive"]):focus *:not([data-slot]) {
52
+ @apply text-secondary-foreground;
53
+ }
54
+ }
55
+
56
+ /* =========================
57
+ CHECKBOX ITEM
58
+ ========================== */
59
+
60
+ .sv-dropdown-menu-checkbox-item {
61
+ @apply focus:bg-secondary focus:text-secondary-foreground;
62
+ @apply gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm;
63
+ @apply relative flex cursor-default items-center outline-hidden select-none;
64
+ @apply [&_svg]:pointer-events-none [&_svg]:shrink-0;
65
+ @apply [&_svg:not([class*='size-'])]:size-4;
66
+
67
+ &[data-inset] {
68
+ @apply ps-7;
69
+ }
70
+
71
+ &[data-disabled] {
72
+ pointer-events: none;
73
+ opacity: 0.5;
74
+ }
75
+
76
+ &:focus *:not([data-slot]) {
77
+ @apply text-secondary-foreground;
78
+ }
79
+ }
80
+
81
+ /* =========================
82
+ RADIO ITEM
83
+ ========================== */
84
+
85
+ .sv-dropdown-menu-radio-item {
86
+ @apply focus:bg-secondary focus:text-secondary-foreground;
87
+ @apply gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm;
88
+ @apply relative flex cursor-default items-center outline-hidden select-none;
89
+ @apply [&_svg]:pointer-events-none [&_svg]:shrink-0;
90
+ @apply [&_svg:not([class*='size-'])]:size-4;
91
+
92
+ &[data-inset] {
93
+ @apply ps-7;
94
+ }
95
+
96
+ &[data-disabled] {
97
+ pointer-events: none;
98
+ opacity: 0.5;
99
+ }
100
+
101
+ &:focus *:not([data-slot]) {
102
+ @apply text-secondary-foreground;
103
+ }
104
+ }
105
+
106
+ /* =========================
107
+ ITEM INDICATOR
108
+ (checkbox & radio shared)
109
+ ========================== */
110
+
111
+ .sv-dropdown-menu-item-indicator {
112
+ @apply absolute right-2 flex items-center justify-center;
113
+ }
114
+
115
+ /* =========================
116
+ SUB TRIGGER
117
+ ========================== */
118
+
119
+ .sv-dropdown-menu-sub-trigger {
120
+ @apply focus:bg-secondary focus:text-secondary-foreground;
121
+ @apply gap-1.5 rounded-md px-1.5 py-1 text-sm;
122
+ @apply relative flex cursor-default items-center outline-hidden select-none;
123
+ @apply [&_svg]:pointer-events-none [&_svg]:shrink-0;
124
+ @apply [&_svg:not([class*='size-'])]:size-4;
125
+
126
+ &[data-inset] {
127
+ @apply ps-7;
128
+ }
129
+
130
+ &[data-disabled] {
131
+ pointer-events: none;
132
+ opacity: 0.5;
133
+ }
134
+
135
+ &[data-state="open"] {
136
+ @apply bg-secondary text-secondary-foreground;
137
+ }
138
+
139
+ &:not([data-variant="destructive"]):focus *:not([data-slot]) {
140
+ @apply text-secondary-foreground;
141
+ }
142
+ }
143
+
144
+ /* =========================
145
+ LABEL
146
+ ========================== */
147
+
148
+ .sv-dropdown-menu-label {
149
+ @apply text-muted-foreground px-1.5 py-1 text-xs font-medium;
150
+
151
+ &[data-inset] {
152
+ @apply ps-7;
153
+ }
154
+ }
155
+
156
+ /* =========================
157
+ GROUP HEADING
158
+ ========================== */
159
+
160
+ .sv-dropdown-menu-group-heading {
161
+ @apply px-2 py-1.5 text-sm font-semibold;
162
+
163
+ &[data-inset] {
164
+ @apply ps-8;
165
+ }
166
+ }
167
+
168
+ /* =========================
169
+ SEPARATOR
170
+ ========================== */
171
+
172
+ .sv-dropdown-menu-separator {
173
+ @apply bg-border -mx-1 my-1 h-px;
174
+ }
175
+
176
+ /* =========================
177
+ SHORTCUT
178
+ ========================== */
179
+
180
+ .sv-dropdown-menu-shortcut {
181
+ @apply text-muted-foreground ms-auto text-xs tracking-widest;
182
+
183
+ .sv-dropdown-menu-item:focus & {
184
+ @apply text-secondary-foreground;
185
+ }
186
+ }
187
+
188
+ /* =========================
189
+ SUB CONTENT
190
+ ========================== */
191
+
192
+ .sv-dropdown-menu-sub-content {
193
+ @apply shadow-lg w-auto border-border border;
194
+ }
195
+ }
@@ -0,0 +1,25 @@
1
+ @layer components {
2
+ .sv-empty {
3
+ @apply flex w-full min-w-0 flex-1 flex-col items-center justify-center text-balance text-center;
4
+ }
5
+
6
+ .sv-empty-header {
7
+ @apply flex max-w-sm flex-col items-center;
8
+ }
9
+
10
+ .sv-empty-content {
11
+ @apply flex w-full max-w-sm min-w-0 flex-col items-center text-balance;
12
+ }
13
+
14
+ .sv-empty-title {
15
+ @apply text-lg font-medium;
16
+ }
17
+
18
+ .sv-empty-description {
19
+ @apply text-muted-foreground text-sm;
20
+ }
21
+
22
+ .sv-empty-media {
23
+ @apply flex shrink-0 items-center justify-center;
24
+ }
25
+ }
@@ -0,0 +1,25 @@
1
+ @layer components {
2
+ .sv-field {
3
+ @apply flex w-full flex-col gap-1.5;
4
+ }
5
+
6
+ .sv-field[data-orientation='horizontal'] {
7
+ @apply flex-row items-center;
8
+ }
9
+
10
+ .sv-field-content {
11
+ @apply flex w-full flex-col gap-1;
12
+ }
13
+
14
+ .sv-field-label {
15
+ @apply text-sm font-medium;
16
+ }
17
+
18
+ .sv-field-description {
19
+ @apply text-muted-foreground text-xs;
20
+ }
21
+
22
+ .sv-field-error {
23
+ @apply text-danger text-xs;
24
+ }
25
+ }
@@ -0,0 +1,7 @@
1
+ @layer components {
2
+ .sv-form { @apply flex flex-col gap-4; }
3
+ .sv-form-field { @apply flex flex-col gap-1.5; }
4
+ .sv-form-label { @apply text-sm font-medium; }
5
+ .sv-form-label-error { @apply text-danger; }
6
+ .sv-form-field-errors { @apply text-danger text-xs; }
7
+ }
@@ -0,0 +1,3 @@
1
+ @layer components {
2
+ .sv-hover-card-content { @apply z-50 w-72 rounded-lg text-sm; }
3
+ }
@@ -0,0 +1,55 @@
1
+ @import './button.css';
2
+ @import './label.css';
3
+ @import './input.css';
4
+ @import './badge.css';
5
+ @import './separator.css';
6
+ @import './menu.css';
7
+ @import './dropdown-menu.css';
8
+ @import './button-group.css';
9
+ @import './accordion.css';
10
+ @import './card.css';
11
+ @import './avatar.css';
12
+ @import './tooltip.css';
13
+ @import './skeleton.css';
14
+ @import './toast.css';
15
+ @import './checkbox.css';
16
+ @import './switch.css';
17
+ @import './toggle.css';
18
+ @import './slider.css';
19
+ @import './textarea.css';
20
+ @import './progress.css';
21
+ @import './spinner.css';
22
+ @import './kbd.css';
23
+ @import './breadcrumb.css';
24
+ @import './tabs.css';
25
+ @import './radio-group.css';
26
+ @import './toggle-group.css';
27
+ @import './pagination.css';
28
+ @import './dialog.css';
29
+ @import './sheet.css';
30
+ @import './popover.css';
31
+ @import './alert-dialog.css';
32
+ @import './alert.css';
33
+ @import './select.css';
34
+ @import './native-select.css';
35
+ @import './input-group.css';
36
+ @import './input-otp.css';
37
+ @import './scroll-area.css';
38
+ @import './navigation-menu.css';
39
+ @import './empty.css';
40
+ @import './item.css';
41
+ @import './field.css';
42
+ @import './context-menu.css';
43
+ @import './menubar.css';
44
+ @import './carousel.css';
45
+ @import './drawer.css';
46
+ @import './resizable.css';
47
+ @import './command.css';
48
+ @import './form.css';
49
+ @import './hover-card.css';
50
+ @import './table.css';
51
+ @import './calendar.css';
52
+ @import './range-calendar.css';
53
+ @import './data-table.css';
54
+ @import './chart.css';
55
+ @import './sidebar.css';
@@ -0,0 +1,42 @@
1
+ @layer components {
2
+ .sv-input-group {
3
+ @apply relative flex w-full min-w-0 items-center outline-none;
4
+ @apply border-border rounded-lg border transition-colors;
5
+ @apply focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-3;
6
+ @apply has-[[data-slot][aria-invalid=true]]:border-danger has-[[data-slot][aria-invalid=true]]:ring-danger/20 has-[[data-slot][aria-invalid=true]]:ring-3;
7
+ @apply has-disabled:opacity-50;
8
+ }
9
+
10
+ .sv-input-group-input,
11
+ .sv-input-group-textarea {
12
+ @apply flex-1 border-0 bg-transparent outline-none;
13
+ }
14
+
15
+ .sv-input-group-text {
16
+ @apply flex items-center;
17
+ }
18
+
19
+ .sv-input-group-addon {
20
+ @apply flex cursor-text items-center justify-center select-none;
21
+ }
22
+
23
+ .sv-input-group-addon[data-align='inline-start'] {
24
+ @apply order-first;
25
+ }
26
+
27
+ .sv-input-group-addon[data-align='inline-end'] {
28
+ @apply order-last;
29
+ }
30
+
31
+ .sv-input-group-addon[data-align='block-start'] {
32
+ @apply order-first w-full justify-start;
33
+ }
34
+
35
+ .sv-input-group-addon[data-align='block-end'] {
36
+ @apply order-last w-full justify-start;
37
+ }
38
+
39
+ .sv-input-group-button {
40
+ @apply flex items-center shadow-none;
41
+ }
42
+ }
@@ -0,0 +1,33 @@
1
+ @layer components {
2
+ .sv-input-otp {
3
+ @apply flex items-center gap-2;
4
+ @apply disabled:cursor-not-allowed has-disabled:opacity-50;
5
+ }
6
+
7
+ .sv-input-otp-group {
8
+ @apply flex items-center rounded-lg;
9
+ @apply has-[[data-slot][aria-invalid=true]]:border-danger has-[[data-slot][aria-invalid=true]]:ring-danger/20 has-[[data-slot][aria-invalid=true]]:ring-3;
10
+ }
11
+
12
+ .sv-input-otp-slot {
13
+ @apply border-border relative flex size-8 items-center justify-center border-y border-r text-sm outline-none transition-all;
14
+ @apply first:rounded-l-lg first:border-l last:rounded-r-lg;
15
+ @apply data-active:z-10 data-active:border-ring data-active:ring-ring/50 data-active:ring-3;
16
+ @apply aria-[invalid]:border-danger;
17
+ }
18
+
19
+ .sv-input-otp-caret {
20
+ @apply pointer-events-none absolute inset-0 flex items-center justify-center;
21
+ }
22
+
23
+ .sv-input-otp-caret-line {
24
+ @apply bg-foreground h-4 w-px animate-pulse;
25
+ }
26
+
27
+ .sv-input-otp-separator {
28
+ @apply flex items-center;
29
+ & > svg {
30
+ @apply size-4;
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,65 @@
1
+ @layer components {
2
+ .sv-input {
3
+ @apply w-full min-w-0 outline-none;
4
+ @apply flex items-center;
5
+
6
+ height: 2.25rem; /* 36px */
7
+ padding-inline: 0.625rem;
8
+ padding-block: 0.25rem;
9
+ font-size: 0.875rem;
10
+ line-height: 1.25rem;
11
+
12
+ border-radius: var(--radius-lg);
13
+ border: var(--border-width, 1px) solid var(--color-border);
14
+ background-color: transparent;
15
+
16
+ box-shadow: var(--shadow-xs);
17
+ transition:
18
+ color var(--transition-duration),
19
+ box-shadow var(--transition-duration);
20
+
21
+ /* Placeholder */
22
+ &::placeholder {
23
+ color: var(--color-muted-foreground);
24
+ }
25
+
26
+ /* Focus visible */
27
+ &:focus-visible {
28
+ outline: none;
29
+ border-color: var(--color-ring);
30
+ box-shadow: 0 0 0 3px var(--color-ring);
31
+ }
32
+
33
+ /* Invalid */
34
+ &[aria-invalid="true"] {
35
+ border-color: var(--color-danger);
36
+ box-shadow: 0 0 0 3px
37
+ color-mix(in srgb, var(--color-danger) 20%, transparent);
38
+ }
39
+
40
+ /* Disabled */
41
+ &:disabled {
42
+ @apply pointer-events-none cursor-not-allowed opacity-50;
43
+ }
44
+
45
+ /* =========================
46
+ FILE INPUT PSEUDO-ELEMENTS
47
+ ========================== */
48
+
49
+ &[type="file"] {
50
+ &::file-selector-button {
51
+ display: inline-flex;
52
+ align-items: center;
53
+ height: 1.75rem; /* 28px */
54
+ font-size: 0.875rem;
55
+ font-weight: 500;
56
+ color: var(--color-foreground);
57
+ background-color: transparent;
58
+ border: none;
59
+ padding: 0;
60
+ margin-inline-end: 0.5rem;
61
+ cursor: pointer;
62
+ }
63
+ }
64
+ }
65
+ }
@@ -0,0 +1,62 @@
1
+ @layer components {
2
+ .sv-item {
3
+ @apply flex w-full flex-wrap items-center transition-colors duration-100 outline-none;
4
+ @apply focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3;
5
+ }
6
+
7
+ .sv-item[data-variant='outline'] {
8
+ @apply rounded-lg border border-border;
9
+ }
10
+
11
+ .sv-item[data-variant='muted'] {
12
+ @apply rounded-lg bg-muted;
13
+ }
14
+
15
+ .sv-item[data-size='xs'] {
16
+ @apply gap-1 p-1 text-xs;
17
+ }
18
+
19
+ .sv-item[data-size='sm'] {
20
+ @apply gap-1.5 p-1.5 text-sm;
21
+ }
22
+
23
+ .sv-item[data-size='md'] {
24
+ @apply gap-2 p-2;
25
+ }
26
+
27
+ .sv-item-title {
28
+ @apply line-clamp-1 flex w-fit items-center font-medium;
29
+ }
30
+
31
+ .sv-item-description {
32
+ @apply text-muted-foreground line-clamp-2 font-normal;
33
+ }
34
+
35
+ .sv-item-content {
36
+ @apply flex flex-1 flex-col;
37
+ }
38
+
39
+ .sv-item-header {
40
+ @apply flex basis-full items-center justify-between;
41
+ }
42
+
43
+ .sv-item-footer {
44
+ @apply flex basis-full items-center justify-between;
45
+ }
46
+
47
+ .sv-item-group {
48
+ @apply flex w-full flex-col;
49
+ }
50
+
51
+ .sv-item-separator {
52
+ @apply bg-border h-px w-full;
53
+ }
54
+
55
+ .sv-item-media {
56
+ @apply flex shrink-0 items-center justify-center;
57
+ }
58
+
59
+ .sv-item-actions {
60
+ @apply flex items-center;
61
+ }
62
+ }
@@ -0,0 +1,12 @@
1
+ @layer components {
2
+ .sv-kbd {
3
+ @apply bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-mono text-xs font-medium select-none;
4
+ & > svg {
5
+ @apply size-3;
6
+ }
7
+ }
8
+
9
+ .sv-kbd-group {
10
+ @apply inline-flex items-center gap-1;
11
+ }
12
+ }
@@ -0,0 +1,20 @@
1
+ @layer components {
2
+ .sv-label {
3
+ @apply flex items-center gap-2 select-none;
4
+
5
+ font-size: 0.875rem;
6
+ font-weight: 500;
7
+ line-height: 1;
8
+
9
+ /* Disabled — via parent group (e.g. form field wrapper) */
10
+ .group[data-disabled="true"] & {
11
+ @apply pointer-events-none opacity-50;
12
+ }
13
+
14
+ /* Disabled — via sibling peer (e.g. paired input) */
15
+ &:has(~ [data-peer]:disabled),
16
+ .peer:disabled ~ & {
17
+ @apply cursor-not-allowed opacity-50;
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,110 @@
1
+ @layer components {
2
+ /* =========================
3
+ MENU TARGET
4
+ Shared floating panel shell
5
+ ========================== */
6
+
7
+ .sv-menu-target {
8
+ @apply flex flex-col bg-surface text-surface-foreground;
9
+
10
+ min-width: 8rem;
11
+ padding: 0.25rem;
12
+ border-radius: var(--radius);
13
+ box-shadow:
14
+ 0 0 0 1px color-mix(in oklab, var(--color-foreground) 10%, transparent),
15
+ var(--shadow-md);
16
+ outline: none;
17
+
18
+ /* Entrance / exit animations driven by bits-ui data attributes */
19
+ &[data-state="open"] {
20
+ @apply animate-in fade-in-0 zoom-in-95;
21
+ }
22
+
23
+ &[data-state="closed"] {
24
+ @apply animate-out fade-out-0 zoom-out-95;
25
+ }
26
+
27
+ /* Slide direction based on which side the menu opens from */
28
+ &[data-side="bottom"] {
29
+ @apply slide-in-from-top-2;
30
+ }
31
+ &[data-side="top"] {
32
+ @apply slide-in-from-bottom-2;
33
+ }
34
+ &[data-side="left"] {
35
+ @apply slide-in-from-right-2;
36
+ }
37
+ &[data-side="right"] {
38
+ @apply slide-in-from-left-2;
39
+ }
40
+ &[data-side="inline-start"] {
41
+ @apply slide-in-from-right-2;
42
+ }
43
+ &[data-side="inline-end"] {
44
+ @apply slide-in-from-left-2;
45
+ }
46
+ }
47
+
48
+ /* =========================
49
+ MENU TRANSLUCENT
50
+ Frosted glass surface --
51
+ descendant interactive states
52
+ ========================== */
53
+
54
+ .sv-menu-translucent {
55
+ @apply bg-surface/70 relative;
56
+
57
+ &::before {
58
+ content: "";
59
+ @apply pointer-events-none absolute inset-0 rounded-[inherit] backdrop-blur-2xl backdrop-saturate-150;
60
+ z-index: -1;
61
+ animation: none !important;
62
+ }
63
+
64
+ /* Items: focus and data-highlighted */
65
+ [data-slot$="-item"]:focus,
66
+ [data-slot$="-item"][data-highlighted] {
67
+ background-color: color-mix(
68
+ in oklab,
69
+ var(--color-foreground) 10%,
70
+ transparent
71
+ );
72
+ }
73
+
74
+ /* Separators */
75
+ [data-slot$="-separator"] {
76
+ background-color: color-mix(
77
+ in oklab,
78
+ var(--color-foreground) 5%,
79
+ transparent
80
+ );
81
+ }
82
+
83
+ /* Triggers: focus and aria-expanded */
84
+ [data-slot$="-trigger"]:focus,
85
+ [data-slot$="-trigger"][aria-expanded="true"] {
86
+ background-color: color-mix(
87
+ in oklab,
88
+ var(--color-foreground) 10%,
89
+ transparent
90
+ ) !important;
91
+ }
92
+
93
+ /* Destructive variant overrides inside translucent */
94
+ [data-variant="destructive"]:focus {
95
+ background-color: color-mix(
96
+ in oklab,
97
+ var(--color-foreground) 10%,
98
+ transparent
99
+ ) !important;
100
+ }
101
+
102
+ [data-variant="destructive"] {
103
+ @apply text-secondary-foreground!;
104
+ }
105
+
106
+ [data-variant="destructive"] *:not([data-slot]) {
107
+ @apply text-secondary-foreground!;
108
+ }
109
+ }
110
+ }