@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
package/index-full.css ADDED
@@ -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/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/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@svkit/styles",
3
+ "version": "0.0.2-beta.0",
4
+ "type": "module",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "scripts": {
9
+ "build": "node scripts/build.js",
10
+ "prepare": "node scripts/build.js"
11
+ },
12
+ "files": [
13
+ "dist",
14
+ "index.css",
15
+ "index-full.css",
16
+ "src"
17
+ ],
18
+ "exports": {
19
+ ".": {
20
+ "style": "./index-full.css"
21
+ },
22
+ "./core": {
23
+ "style": "./index.css"
24
+ },
25
+ "./components/*.css": "./dist/components/*.css"
26
+ },
27
+ "sideEffects": [
28
+ "**/*.css"
29
+ ],
30
+ "peerDependencies": {
31
+ "tailwindcss": "^4.2.2",
32
+ "tw-animate-css": "^1.4.0"
33
+ },
34
+ "devDependencies": {
35
+ "@tailwindcss/cli": "^4.2.4"
36
+ }
37
+ }
@@ -0,0 +1,161 @@
1
+ @layer base {
2
+ /*
3
+ * ========================================
4
+ * DOCUMENT ROOT
5
+ * ========================================
6
+ */
7
+
8
+ html {
9
+ color-scheme: light dark;
10
+ -webkit-text-size-adjust: 100%;
11
+ }
12
+
13
+ body {
14
+ @apply bg-background text-foreground;
15
+
16
+ font-family: var(--font-sans, ui-sans-serif, system-ui);
17
+ -webkit-font-smoothing: antialiased;
18
+ text-rendering: optimizeLegibility;
19
+ }
20
+
21
+ /* @media (prefers-reduced-motion: reduce) {
22
+ * {
23
+ transition-duration: 0.01ms !important;
24
+ animation-duration: 0.01ms !important;
25
+ }
26
+ } */
27
+
28
+ /*
29
+ * ========================================
30
+ * TYPOGRAPHY
31
+ * ========================================
32
+ */
33
+
34
+ h1,
35
+ h2,
36
+ h3,
37
+ h4,
38
+ h5,
39
+ h6 {
40
+ line-height: 1.25;
41
+ color: var(--color-foreground);
42
+ }
43
+
44
+ p {
45
+ line-height: 1.6;
46
+ /* color: var(--color-foreground); */
47
+ }
48
+
49
+ small {
50
+ font-size: 0.875em;
51
+ color: var(--color-muted);
52
+ }
53
+
54
+ /*
55
+ * ========================================
56
+ * LINKS
57
+ * ========================================
58
+ */
59
+
60
+ a {
61
+ color: var(--color-link);
62
+ text-decoration: none;
63
+
64
+ transition: color var(--duration-fast) var(--ease-standard);
65
+ }
66
+
67
+ a:hover {
68
+ color: var(--color-link-hover);
69
+ }
70
+
71
+ /*
72
+ * ========================================
73
+ * INTERACTIVE ELEMENTS
74
+ * ========================================
75
+ */
76
+
77
+ button,
78
+ [role="button"] {
79
+ cursor: var(--cursor-interactive);
80
+ }
81
+
82
+ button:disabled,
83
+ [aria-disabled="true"] {
84
+ cursor: var(--cursor-disabled);
85
+ opacity: var(--disabled-opacity);
86
+ }
87
+
88
+ /*
89
+ * ========================================
90
+ * GLOBAL FOCUS RING
91
+ * ========================================
92
+ */
93
+
94
+ :focus-visible {
95
+ outline: var(--focus-ring-width) solid var(--focus-ring-color);
96
+ outline-offset: var(--focus-ring-offset);
97
+ }
98
+
99
+ /*
100
+ * ========================================
101
+ * BORDERS & SEPARATORS
102
+ * ========================================
103
+ */
104
+
105
+ hr {
106
+ border: none;
107
+ border-top: var(--border-width) solid var(--color-separator);
108
+ }
109
+
110
+ /*
111
+ * ========================================
112
+ * MEDIA DEFAULTS
113
+ * ========================================
114
+ */
115
+
116
+ img,
117
+ video,
118
+ canvas,
119
+ svg {
120
+ display: block;
121
+ max-width: 100%;
122
+ }
123
+
124
+ /*
125
+ * ========================================
126
+ * SELECTION
127
+ * ========================================
128
+ */
129
+
130
+ ::selection {
131
+ background-color: var(--color-primary);
132
+ color: var(--color-primary-foreground);
133
+ }
134
+
135
+ /* modern OKLCH support */
136
+ @supports (background-color: oklch(from white l c h / 0.5)) {
137
+ ::selection {
138
+ background-color: oklch(from var(--color-primary) l c h / 0.25);
139
+ }
140
+ }
141
+
142
+ /*
143
+ * ========================================
144
+ * SCROLLBAR (optional but useful)
145
+ * ========================================
146
+ */
147
+
148
+ /*::-webkit-scrollbar {
149
+ width: 8px;
150
+ height: 8px;
151
+ }
152
+
153
+ ::-webkit-scrollbar-thumb {
154
+ background: var(--color-muted);
155
+ border-radius: var(--radius-sm);
156
+ }
157
+
158
+ ::-webkit-scrollbar-thumb:hover {
159
+ background: var(--color-border);
160
+ }*/
161
+ }
@@ -0,0 +1,82 @@
1
+ @layer components {
2
+ /* =========================
3
+ ROOT
4
+ ========================== */
5
+
6
+ .sv-accordion {
7
+ @apply flex w-full flex-col rounded-lg px-3;
8
+ /* @apply flex w-full flex-col bg-surface px-3 rounded-lg; */
9
+ }
10
+
11
+ .sv-accordion:is(.sv-variant--surface, [data-variant='surface']) {
12
+ @apply bg-surface;
13
+ }
14
+
15
+ /* =========================
16
+ ITEM
17
+ ========================== */
18
+
19
+ .sv-accordion-item {
20
+ @apply border-border not-last:border-b;
21
+ }
22
+
23
+ /* =========================
24
+ TRIGGER
25
+ ========================== */
26
+ /* group/accordion-trigger */
27
+ .sv-accordion-trigger {
28
+ @apply relative flex flex-1 items-start justify-between;
29
+ @apply border border-transparent transition-all outline-none;
30
+ @apply disabled:pointer-events-none disabled:opacity-50;
31
+
32
+ /* Layout & typography */
33
+ @apply rounded-lg py-2.5 text-left text-sm font-medium hover:underline;
34
+
35
+ /* Focus visible */
36
+
37
+ @apply focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3;
38
+
39
+ /* Trigger icon — targets both ChevronDown and ChevronUp via data-slot */
40
+ & [data-slot='accordion-trigger-icon'] {
41
+ @apply text-muted-foreground ml-auto size-4;
42
+ }
43
+
44
+ & [data-chevron-up] {
45
+ @apply pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline;
46
+ }
47
+
48
+ & [data-chevron-down] {
49
+ @apply pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden;
50
+ }
51
+ }
52
+
53
+ /* =========================
54
+ CONTENT
55
+ ========================== */
56
+
57
+ .sv-accordion-content {
58
+ @apply text-sm;
59
+
60
+ /* Open / close animations */
61
+ &[data-state='open'] {
62
+ @apply animate-accordion-down;
63
+ }
64
+
65
+ &[data-state='closed'] {
66
+ @apply animate-accordion-up;
67
+ }
68
+ }
69
+
70
+ .sv-accordion-content-inner {
71
+ @apply pt-0 pb-2.5;
72
+
73
+ /* Rich text defaults inside content */
74
+ & a {
75
+ @apply hover:text-foreground underline underline-offset-3;
76
+ }
77
+
78
+ & p:not(:last-child) {
79
+ @apply mb-4;
80
+ }
81
+ }
82
+ }
@@ -0,0 +1,26 @@
1
+ @layer components {
2
+ .sv-alert-dialog-overlay {
3
+ @apply data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs;
4
+ }
5
+
6
+ .sv-alert-dialog-content {
7
+ @apply bg-surface text-surface-foreground border-border fixed top-1/2 left-1/2 z-50 grid w-full max-w-xs -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border p-4 shadow-lg outline-none sm:max-w-sm;
8
+ @apply data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95;
9
+ }
10
+
11
+ .sv-alert-dialog-header {
12
+ @apply flex flex-col gap-1.5 text-center sm:text-left;
13
+ }
14
+
15
+ .sv-alert-dialog-title {
16
+ @apply text-lg font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2;
17
+ }
18
+
19
+ .sv-alert-dialog-description {
20
+ @apply text-muted-foreground text-sm;
21
+ }
22
+
23
+ .sv-alert-dialog-footer {
24
+ @apply border-border bg-muted/50 -mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t p-4 sm:flex-row sm:justify-end;
25
+ }
26
+ }
@@ -0,0 +1,21 @@
1
+ @layer components {
2
+ .sv-alert {
3
+ @apply relative grid w-full gap-0.5 rounded-lg border border-border px-2.5 py-2 text-left text-sm;
4
+ }
5
+
6
+ .sv-alert[data-variant='danger'] {
7
+ @apply border-danger/50 text-danger;
8
+ }
9
+
10
+ .sv-alert-title {
11
+ @apply font-medium;
12
+ }
13
+
14
+ .sv-alert-description {
15
+ @apply text-muted-foreground text-sm;
16
+ }
17
+
18
+ .sv-alert-action {
19
+ @apply absolute top-2 right-2;
20
+ }
21
+ }
@@ -0,0 +1,158 @@
1
+ @layer components {
2
+ /* =========================
3
+ AVATAR ROOT
4
+ ========================== */
5
+
6
+ .sv-avatar {
7
+ /* Default size */
8
+ width: 2rem; /* 32px */
9
+ height: 2rem;
10
+
11
+ border-radius: 9999px;
12
+
13
+ /* Inner border overlay via ::after — adapts to light/dark via mix-blend */
14
+ &::after {
15
+ content: "";
16
+ position: absolute;
17
+ inset: 0;
18
+ border-radius: 9999px;
19
+ border: var(--border-width) solid var(--color-border);
20
+ mix-blend-mode: darken;
21
+ pointer-events: none;
22
+
23
+ @media (prefers-color-scheme: dark) {
24
+ mix-blend-mode: lighten;
25
+ }
26
+ }
27
+
28
+ /* Sizes */
29
+ &[data-size="sm"] {
30
+ width: 1.5rem; /* 24px */
31
+ height: 1.5rem;
32
+ }
33
+
34
+ &[data-size="lg"] {
35
+ width: 2.5rem; /* 40px */
36
+ height: 2.5rem;
37
+ }
38
+ }
39
+
40
+ /* =========================
41
+ AVATAR IMAGE
42
+ ========================== */
43
+
44
+ .sv-avatar-image {
45
+ border-radius: 9999px;
46
+ aspect-ratio: 1;
47
+ width: 100%;
48
+ height: 100%;
49
+ object-fit: cover;
50
+ }
51
+
52
+ /* =========================
53
+ AVATAR FALLBACK
54
+ ========================== */
55
+
56
+ .sv-avatar-fallback {
57
+ @apply bg-muted text-muted-foreground flex size-full items-center justify-center text-sm;
58
+ border-radius: 9999px;
59
+ font-size: 0.875rem;
60
+
61
+ .group\/avatar[data-size="sm"] & {
62
+ font-size: 0.75rem;
63
+ }
64
+ }
65
+
66
+ /* =========================
67
+ AVATAR BADGE
68
+ ========================== */
69
+
70
+ .sv-avatar-badge {
71
+ @apply bg-primary text-primary-foreground ring-background;
72
+
73
+ /* sm */
74
+ .group\/avatar[data-size="sm"] & {
75
+ width: 0.5rem;
76
+ height: 0.5rem;
77
+
78
+ & > svg {
79
+ display: none;
80
+ }
81
+ }
82
+
83
+ /* default */
84
+ .group\/avatar[data-size="default"] & {
85
+ width: 0.625rem;
86
+ height: 0.625rem;
87
+
88
+ & > svg {
89
+ width: 0.5rem;
90
+ height: 0.5rem;
91
+ }
92
+ }
93
+
94
+ /* lg */
95
+ .group\/avatar[data-size="lg"] & {
96
+ width: 0.75rem;
97
+ height: 0.75rem;
98
+
99
+ & > svg {
100
+ width: 0.5rem;
101
+ height: 0.5rem;
102
+ }
103
+ }
104
+ }
105
+
106
+ /* =========================
107
+ AVATAR GROUP
108
+ ========================== */
109
+
110
+ .sv-avatar-group {
111
+ /* Avatars inside the group get a ring border */
112
+ & [data-slot="avatar"] {
113
+ @apply ring-background ring-2;
114
+ }
115
+ }
116
+
117
+ /* =========================
118
+ AVATAR GROUP COUNT
119
+ ========================== */
120
+
121
+ .sv-avatar-group-count {
122
+ @apply bg-muted text-muted-foreground;
123
+
124
+ border-radius: 9999px;
125
+ font-size: 0.875rem;
126
+
127
+ /* Default size — matches avatar default */
128
+ width: 2rem;
129
+ height: 2rem;
130
+
131
+ & > svg {
132
+ width: 1rem;
133
+ height: 1rem;
134
+ }
135
+
136
+ /* sm — driven by parent group */
137
+ .group\/avatar-group:has([data-slot="avatar"][data-size="sm"]) & {
138
+ width: 1.5rem;
139
+ height: 1.5rem;
140
+
141
+ & > svg {
142
+ width: 0.75rem;
143
+ height: 0.75rem;
144
+ }
145
+ }
146
+
147
+ /* lg */
148
+ .group\/avatar-group:has([data-slot="avatar"][data-size="lg"]) & {
149
+ width: 2.5rem;
150
+ height: 2.5rem;
151
+
152
+ & > svg {
153
+ width: 1.25rem;
154
+ height: 1.25rem;
155
+ }
156
+ }
157
+ }
158
+ }
@@ -0,0 +1,125 @@
1
+ @layer components {
2
+ .sv-badge {
3
+ @apply inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap select-none;
4
+
5
+ height: 1.25rem; /* 20px */
6
+ gap: 0.25rem;
7
+ border-radius: 9999px;
8
+ padding-inline: 0.5rem;
9
+ padding-block: 0.125rem;
10
+ font-size: 0.75rem;
11
+ font-weight: 500;
12
+
13
+ border: var(--border-width) solid transparent;
14
+ background-color: var(--sv-bg);
15
+ color: var(--sv-fg);
16
+
17
+ transition: var(--transition-colors);
18
+
19
+ /* Icon adjustments */
20
+ &:has([data-icon="inline-start"]) {
21
+ padding-inline-start: 0.375rem;
22
+ }
23
+
24
+ &:has([data-icon="inline-end"]) {
25
+ padding-inline-end: 0.375rem;
26
+ }
27
+
28
+ & > svg {
29
+ width: 0.75rem !important;
30
+ height: 0.75rem !important;
31
+ flex-shrink: 0;
32
+ pointer-events: none;
33
+ }
34
+
35
+ /* Focus visible */
36
+ &:focus-visible {
37
+ outline: none;
38
+ border-color: var(--color-ring);
39
+ box-shadow: 0 0 0 3px var(--color-ring-shadow);
40
+ }
41
+
42
+ /* Invalid */
43
+ &[aria-invalid="true"] {
44
+ border-color: var(--color-danger);
45
+ box-shadow: 0 0 0 3px
46
+ color-mix(in srgb, var(--color-danger) 20%, transparent);
47
+ }
48
+ }
49
+
50
+ /* =========================
51
+ VARIANTS
52
+ ========================== */
53
+
54
+ .sv-badge:is(.sv-variant--primary, [data-variant="primary"]) {
55
+ --sv-bg: var(--color-primary);
56
+ --sv-fg: var(--color-primary-foreground);
57
+
58
+ &:is(a):hover {
59
+ background-color: color-mix(
60
+ in srgb,
61
+ var(--color-primary) 80%,
62
+ transparent
63
+ );
64
+ }
65
+ }
66
+
67
+ .sv-badge:is(.sv-variant--secondary, [data-variant="secondary"]) {
68
+ --sv-bg: var(--color-secondary);
69
+ --sv-fg: var(--color-secondary-foreground);
70
+
71
+ &:is(a):hover {
72
+ background-color: color-mix(
73
+ in srgb,
74
+ var(--color-secondary) 80%,
75
+ transparent
76
+ );
77
+ }
78
+ }
79
+
80
+ .sv-badge:is(.sv-variant--danger, [data-variant="danger"]) {
81
+ --sv-bg: color-mix(in srgb, var(--color-danger) 10%, transparent);
82
+ --sv-fg: var(--color-danger);
83
+
84
+ &:focus-visible {
85
+ box-shadow: 0 0 0 3px
86
+ color-mix(in srgb, var(--color-danger) 20%, transparent);
87
+ }
88
+
89
+ &:is(a):hover {
90
+ background-color: color-mix(
91
+ in srgb,
92
+ var(--color-danger) 20%,
93
+ transparent
94
+ );
95
+ }
96
+ }
97
+
98
+ .sv-badge:is(.sv-variant--outline, [data-variant="outline"]) {
99
+ --sv-bg: transparent;
100
+ --sv-fg: var(--color-foreground);
101
+ border-color: var(--color-border);
102
+
103
+ &:is(a):hover {
104
+ background-color: var(--color-muted);
105
+ color: var(--color-muted-foreground);
106
+ }
107
+ }
108
+
109
+ .sv-badge:is(.sv-variant--ghost, [data-variant="ghost"]) {
110
+ --sv-bg: transparent;
111
+ --sv-fg: var(--color-foreground);
112
+
113
+ &:hover {
114
+ background-color: var(--color-muted);
115
+ color: var(--color-muted-foreground);
116
+ }
117
+ }
118
+
119
+ .sv-badge:is(.sv-variant--link, [data-variant="link"]) {
120
+ --sv-bg: transparent;
121
+ --sv-fg: var(--color-primary);
122
+
123
+ @apply underline-offset-4 hover:underline;
124
+ }
125
+ }
@@ -0,0 +1,30 @@
1
+ @layer components {
2
+ .sv-breadcrumb-list {
3
+ @apply text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm;
4
+ }
5
+
6
+ .sv-breadcrumb-item {
7
+ @apply inline-flex items-center gap-1;
8
+ }
9
+
10
+ .sv-breadcrumb-link {
11
+ @apply hover:text-foreground transition-colors;
12
+ }
13
+
14
+ .sv-breadcrumb-page {
15
+ @apply text-foreground font-normal;
16
+ }
17
+
18
+ .sv-breadcrumb-separator {
19
+ & > svg {
20
+ @apply size-3.5;
21
+ }
22
+ }
23
+
24
+ .sv-breadcrumb-ellipsis {
25
+ @apply flex size-5 items-center justify-center;
26
+ & > svg {
27
+ @apply size-4;
28
+ }
29
+ }
30
+ }