@almach/ui 0.1.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 (147) hide show
  1. package/dist/.tsbuildinfo +1 -0
  2. package/dist/components/alert.d.ts +33 -0
  3. package/dist/components/alert.d.ts.map +1 -0
  4. package/dist/components/alert.js +54 -0
  5. package/dist/components/alert.js.map +1 -0
  6. package/dist/components/avatar.d.ts +15 -0
  7. package/dist/components/avatar.d.ts.map +1 -0
  8. package/dist/components/avatar.js +33 -0
  9. package/dist/components/avatar.js.map +1 -0
  10. package/dist/components/badge.d.ts +10 -0
  11. package/dist/components/badge.d.ts.map +1 -0
  12. package/dist/components/badge.js +24 -0
  13. package/dist/components/badge.js.map +1 -0
  14. package/dist/components/button.d.ts +15 -0
  15. package/dist/components/button.d.ts.map +1 -0
  16. package/dist/components/button.js +47 -0
  17. package/dist/components/button.js.map +1 -0
  18. package/dist/components/calendar.d.ts +4 -0
  19. package/dist/components/calendar.d.ts.map +1 -0
  20. package/dist/components/calendar.js +73 -0
  21. package/dist/components/calendar.js.map +1 -0
  22. package/dist/components/card.d.ts +30 -0
  23. package/dist/components/card.d.ts.map +1 -0
  24. package/dist/components/card.js +54 -0
  25. package/dist/components/card.js.map +1 -0
  26. package/dist/components/carousel.d.ts +21 -0
  27. package/dist/components/carousel.d.ts.map +1 -0
  28. package/dist/components/carousel.js +149 -0
  29. package/dist/components/carousel.js.map +1 -0
  30. package/dist/components/checkbox.d.ts +7 -0
  31. package/dist/components/checkbox.d.ts.map +1 -0
  32. package/dist/components/checkbox.js +9 -0
  33. package/dist/components/checkbox.js.map +1 -0
  34. package/dist/components/collapsible.d.ts +7 -0
  35. package/dist/components/collapsible.d.ts.map +1 -0
  36. package/dist/components/collapsible.js +19 -0
  37. package/dist/components/collapsible.js.map +1 -0
  38. package/dist/components/combobox.d.ts +11 -0
  39. package/dist/components/combobox.d.ts.map +1 -0
  40. package/dist/components/combobox.js +10 -0
  41. package/dist/components/combobox.js.map +1 -0
  42. package/dist/components/command.d.ts +85 -0
  43. package/dist/components/command.d.ts.map +1 -0
  44. package/dist/components/command.js +46 -0
  45. package/dist/components/command.js.map +1 -0
  46. package/dist/components/dialog.d.ts +36 -0
  47. package/dist/components/dialog.d.ts.map +1 -0
  48. package/dist/components/dialog.js +37 -0
  49. package/dist/components/dialog.js.map +1 -0
  50. package/dist/components/drawer.d.ts +34 -0
  51. package/dist/components/drawer.d.ts.map +1 -0
  52. package/dist/components/drawer.js +36 -0
  53. package/dist/components/drawer.js.map +1 -0
  54. package/dist/components/dropdown-menu.d.ts +30 -0
  55. package/dist/components/dropdown-menu.d.ts.map +1 -0
  56. package/dist/components/dropdown-menu.js +46 -0
  57. package/dist/components/dropdown-menu.js.map +1 -0
  58. package/dist/components/group.d.ts +26 -0
  59. package/dist/components/group.d.ts.map +1 -0
  60. package/dist/components/group.js +13 -0
  61. package/dist/components/group.js.map +1 -0
  62. package/dist/components/input.d.ts +34 -0
  63. package/dist/components/input.d.ts.map +1 -0
  64. package/dist/components/input.js +156 -0
  65. package/dist/components/input.js.map +1 -0
  66. package/dist/components/label.d.ts +7 -0
  67. package/dist/components/label.d.ts.map +1 -0
  68. package/dist/components/label.js +9 -0
  69. package/dist/components/label.js.map +1 -0
  70. package/dist/components/layered-card.d.ts +13 -0
  71. package/dist/components/layered-card.d.ts.map +1 -0
  72. package/dist/components/layered-card.js +13 -0
  73. package/dist/components/layered-card.js.map +1 -0
  74. package/dist/components/modal.d.ts +36 -0
  75. package/dist/components/modal.d.ts.map +1 -0
  76. package/dist/components/modal.js +72 -0
  77. package/dist/components/modal.js.map +1 -0
  78. package/dist/components/progress.d.ts +5 -0
  79. package/dist/components/progress.d.ts.map +1 -0
  80. package/dist/components/progress.js +11 -0
  81. package/dist/components/progress.js.map +1 -0
  82. package/dist/components/radio.d.ts +11 -0
  83. package/dist/components/radio.d.ts.map +1 -0
  84. package/dist/components/radio.js +17 -0
  85. package/dist/components/radio.js.map +1 -0
  86. package/dist/components/select.d.ts +41 -0
  87. package/dist/components/select.d.ts.map +1 -0
  88. package/dist/components/select.js +49 -0
  89. package/dist/components/select.js.map +1 -0
  90. package/dist/components/separator.d.ts +5 -0
  91. package/dist/components/separator.d.ts.map +1 -0
  92. package/dist/components/separator.js +11 -0
  93. package/dist/components/separator.js.map +1 -0
  94. package/dist/components/skeleton.d.ts +6 -0
  95. package/dist/components/skeleton.d.ts.map +1 -0
  96. package/dist/components/skeleton.js +7 -0
  97. package/dist/components/skeleton.js.map +1 -0
  98. package/dist/components/switch.d.ts +11 -0
  99. package/dist/components/switch.d.ts.map +1 -0
  100. package/dist/components/switch.js +44 -0
  101. package/dist/components/switch.js.map +1 -0
  102. package/dist/components/table.d.ts +36 -0
  103. package/dist/components/table.d.ts.map +1 -0
  104. package/dist/components/table.js +77 -0
  105. package/dist/components/table.js.map +1 -0
  106. package/dist/components/tabs.d.ts +18 -0
  107. package/dist/components/tabs.d.ts.map +1 -0
  108. package/dist/components/tabs.js +63 -0
  109. package/dist/components/tabs.js.map +1 -0
  110. package/dist/components/tag-input.d.ts +14 -0
  111. package/dist/components/tag-input.d.ts.map +1 -0
  112. package/dist/components/tag-input.js +53 -0
  113. package/dist/components/tag-input.js.map +1 -0
  114. package/dist/components/textarea.d.ts +7 -0
  115. package/dist/components/textarea.d.ts.map +1 -0
  116. package/dist/components/textarea.js +9 -0
  117. package/dist/components/textarea.js.map +1 -0
  118. package/dist/components/toast.d.ts +19 -0
  119. package/dist/components/toast.d.ts.map +1 -0
  120. package/dist/components/toast.js +51 -0
  121. package/dist/components/toast.js.map +1 -0
  122. package/dist/components/toaster.d.ts +2 -0
  123. package/dist/components/toaster.d.ts.map +1 -0
  124. package/dist/components/toaster.js +11 -0
  125. package/dist/components/toaster.js.map +1 -0
  126. package/dist/components/tooltip.d.ts +9 -0
  127. package/dist/components/tooltip.d.ts.map +1 -0
  128. package/dist/components/tooltip.js +17 -0
  129. package/dist/components/tooltip.js.map +1 -0
  130. package/dist/hooks/use-copy-to-clipboard.d.ts +8 -0
  131. package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -0
  132. package/dist/hooks/use-copy-to-clipboard.js +23 -0
  133. package/dist/hooks/use-copy-to-clipboard.js.map +1 -0
  134. package/dist/hooks/use-media-query.d.ts +7 -0
  135. package/dist/hooks/use-media-query.d.ts.map +1 -0
  136. package/dist/hooks/use-media-query.js +21 -0
  137. package/dist/hooks/use-media-query.js.map +1 -0
  138. package/dist/hooks/use-toast.d.ts +45 -0
  139. package/dist/hooks/use-toast.d.ts.map +1 -0
  140. package/dist/hooks/use-toast.js +102 -0
  141. package/dist/hooks/use-toast.js.map +1 -0
  142. package/dist/index.d.ts +46 -0
  143. package/dist/index.d.ts.map +1 -0
  144. package/dist/index.js +36 -0
  145. package/dist/index.js.map +1 -0
  146. package/package.json +74 -0
  147. package/src/styles/globals.css +241 -0
@@ -0,0 +1,241 @@
1
+ /* @almach/ui — Tailwind CSS v4 Theme */
2
+
3
+
4
+ /* ── Dark mode variant ───────────────────────────────────────────────────── */
5
+ @custom-variant dark (&:where(.dark, .dark *));
6
+
7
+
8
+ /* ── Tailwind theme — maps CSS vars → utility classes ───────────────────── */
9
+ /*
10
+ * @theme inline means Tailwind generates utilities (bg-background, text-primary,
11
+ * border-border, etc.) that read their value from the CSS variable at runtime.
12
+ * Overriding the CSS variable automatically updates every utility that uses it.
13
+ */
14
+ @theme inline {
15
+ /* Surfaces */
16
+ --color-background: hsl(var(--background));
17
+ --color-foreground: hsl(var(--foreground));
18
+ --color-card: hsl(var(--card));
19
+ --color-card-foreground: hsl(var(--card-foreground));
20
+ --color-popover: hsl(var(--popover));
21
+ --color-popover-foreground: hsl(var(--popover-foreground));
22
+
23
+ /* Brand */
24
+ --color-primary: hsl(var(--primary));
25
+ --color-primary-foreground: hsl(var(--primary-foreground));
26
+
27
+ /* Neutral */
28
+ --color-secondary: hsl(var(--secondary));
29
+ --color-secondary-foreground: hsl(var(--secondary-foreground));
30
+ --color-muted: hsl(var(--muted));
31
+ --color-muted-foreground: hsl(var(--muted-foreground));
32
+ --color-accent: hsl(var(--accent));
33
+ --color-accent-foreground: hsl(var(--accent-foreground));
34
+
35
+ /* Semantic */
36
+ --color-destructive: hsl(var(--destructive));
37
+ --color-destructive-foreground: hsl(var(--destructive-foreground));
38
+ --color-success: hsl(var(--success));
39
+ --color-success-foreground: hsl(var(--success-foreground));
40
+ --color-warning: hsl(var(--warning));
41
+ --color-warning-foreground: hsl(var(--warning-foreground));
42
+
43
+ /* Controls */
44
+ --color-border: hsl(var(--border));
45
+ --color-input: hsl(var(--input));
46
+ --color-ring: hsl(var(--ring));
47
+
48
+ /* Border radius scale */
49
+ --radius-xl: 0.875rem;
50
+ --radius-lg: var(--radius);
51
+ --radius-md: calc(var(--radius) - 2px);
52
+ --radius-sm: calc(var(--radius) - 4px);
53
+
54
+ /* Animations */
55
+ --animate-accordion-down: accordion-down 0.2s ease-out;
56
+ --animate-accordion-up: accordion-up 0.2s ease-out;
57
+ }
58
+
59
+
60
+ /* ── Animations ──────────────────────────────────────────────────────────── */
61
+ @keyframes accordion-down {
62
+ from {
63
+ height: 0;
64
+ }
65
+
66
+ to {
67
+ height: var(--radix-accordion-content-height);
68
+ }
69
+ }
70
+
71
+ @keyframes accordion-up {
72
+ from {
73
+ height: var(--radix-accordion-content-height);
74
+ }
75
+
76
+ to {
77
+ height: 0;
78
+ }
79
+ }
80
+
81
+ @keyframes shimmer {
82
+ 0% {
83
+ background-position: -400px 0;
84
+ }
85
+
86
+ 100% {
87
+ background-position: 400px 0;
88
+ }
89
+ }
90
+
91
+
92
+ /* ── Light mode tokens (defaults) ────────────────────────────────────────── */
93
+ :root {
94
+ /* Surfaces */
95
+ --background: 0 0% 100%;
96
+ --foreground: 240 10% 3.9%;
97
+ --card: 0 0% 100%;
98
+ --card-foreground: 240 10% 3.9%;
99
+ --popover: 0 0% 100%;
100
+ --popover-foreground: 240 10% 3.9%;
101
+
102
+ /* Brand */
103
+ --primary: 240 10% 3.9%;
104
+ --primary-foreground: 0 0% 98%;
105
+
106
+ /* Neutral */
107
+ --secondary: 240 4.8% 95.9%;
108
+ --secondary-foreground: 240 5.9% 10%;
109
+ --muted: 240 4.8% 95.9%;
110
+ --muted-foreground: 240 3.8% 46.1%;
111
+ --accent: 240 4.8% 95.9%;
112
+ --accent-foreground: 240 5.9% 10%;
113
+
114
+ /* Semantic */
115
+ --destructive: 0 84.2% 60.2%;
116
+ --destructive-foreground: 0 0% 98%;
117
+ --success: 142.1 76.2% 36.3%;
118
+ --success-foreground: 355.7 100% 97.3%;
119
+ --warning: 38 92% 50%;
120
+ --warning-foreground: 26 83.3% 14.1%;
121
+
122
+ /* Controls */
123
+ --border: 240 5.9% 90%;
124
+ --input: 240 5.9% 90%;
125
+ --ring: 240 10% 3.9%;
126
+ --radius: 0.625rem;
127
+
128
+ /* Switch — override to change switch colors */
129
+ --switch-on: hsl(142.1 76.2% 36.3%);
130
+ --switch-off: hsl(240 3.8% 46.1% / 0.35);
131
+ }
132
+
133
+
134
+ /* ── Dark mode tokens ────────────────────────────────────────────────────── */
135
+ .dark {
136
+ --background: 240 10% 3.9%;
137
+ --foreground: 0 0% 98%;
138
+ --card: 240 10% 5.5%;
139
+ --card-foreground: 0 0% 98%;
140
+ --popover: 240 10% 5.5%;
141
+ --popover-foreground: 0 0% 98%;
142
+
143
+ --primary: 0 0% 98%;
144
+ --primary-foreground: 240 5.9% 10%;
145
+
146
+ --secondary: 240 3.7% 15.9%;
147
+ --secondary-foreground: 0 0% 98%;
148
+ --muted: 240 3.7% 15.9%;
149
+ --muted-foreground: 240 5% 64.9%;
150
+ --accent: 240 3.7% 15.9%;
151
+ --accent-foreground: 0 0% 98%;
152
+
153
+ --destructive: 0 62.8% 30.6%;
154
+ --destructive-foreground: 0 0% 98%;
155
+ --success: 142.1 70.6% 45.3%;
156
+ --success-foreground: 144.9 80.4% 10%;
157
+ --warning: 38 92% 50%;
158
+ --warning-foreground: 26 83.3% 14.1%;
159
+
160
+ --border: 240 3.7% 15.9%;
161
+ --input: 240 3.7% 15.9%;
162
+ --ring: 240 4.9% 83.9%;
163
+
164
+ --switch-on: hsl(142.1 70.6% 45.3%);
165
+ --switch-off: hsl(240 5% 64.9% / 0.3);
166
+ }
167
+
168
+
169
+ /* ── Base styles ─────────────────────────────────────────────────────────── */
170
+ @layer base {
171
+ * {
172
+ border-color: hsl(var(--border));
173
+ outline-color: hsl(var(--ring));
174
+ }
175
+
176
+ body {
177
+ background-color: hsl(var(--background));
178
+ color: hsl(var(--foreground));
179
+ font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
180
+ font-feature-settings: "rlig" 1, "calt" 1;
181
+ -webkit-font-smoothing: antialiased;
182
+ -moz-osx-font-smoothing: grayscale;
183
+ }
184
+ }
185
+
186
+
187
+ /* ── Component utilities ─────────────────────────────────────────────────── */
188
+
189
+ /* Checkbox — Radix + CSS-driven, not Tailwind CVA */
190
+ .checkbox-root {
191
+ display: flex;
192
+ align-items: center;
193
+ justify-content: center;
194
+ width: 18px;
195
+ height: 18px;
196
+ flex-shrink: 0;
197
+ border-radius: 4px;
198
+ border: 1.5px solid hsl(var(--input));
199
+ background: hsl(var(--background));
200
+ cursor: pointer;
201
+ transition: background-color 0.15s, border-color 0.15s;
202
+ }
203
+
204
+ .checkbox-root:focus-visible {
205
+ outline: 2px solid hsl(var(--ring));
206
+ outline-offset: 2px;
207
+ }
208
+
209
+ .checkbox-root[data-state="checked"] {
210
+ background-color: hsl(var(--primary));
211
+ border-color: hsl(var(--primary));
212
+ color: hsl(var(--primary-foreground));
213
+ }
214
+
215
+ .checkbox-root[data-disabled],
216
+ .checkbox-root:disabled {
217
+ cursor: not-allowed;
218
+ opacity: 0.5;
219
+ }
220
+
221
+ .checkbox-root[aria-invalid="true"]:not([data-state="checked"]) {
222
+ border-color: hsl(var(--destructive));
223
+ }
224
+
225
+ /* Skeleton shimmer animation */
226
+ .skeleton-shimmer {
227
+ background-image: linear-gradient(90deg,
228
+ hsl(var(--muted)) 25%,
229
+ hsl(var(--muted-foreground) / 0.12) 50%,
230
+ hsl(var(--muted)) 75%);
231
+ background-size: 400px 100%;
232
+ animation: shimmer 1.6s linear infinite;
233
+ }
234
+
235
+
236
+ /* ── Utilities ───────────────────────────────────────────────────────────── */
237
+ @layer utilities {
238
+ .text-balance {
239
+ text-wrap: balance;
240
+ }
241
+ }