twntyx-css 1.0.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 (228) hide show
  1. package/README.md +105 -0
  2. package/llm/CHANGELOG.md +7 -0
  3. package/llm/components/ai-background.json +90 -0
  4. package/llm/components/ai-orb.json +91 -0
  5. package/llm/components/ai-perl.json +91 -0
  6. package/llm/components/all-components.json +104 -0
  7. package/llm/components/animation-references.json +84 -0
  8. package/llm/components/avatar.json +149 -0
  9. package/llm/components/badge.json +263 -0
  10. package/llm/components/banner-marketplace.json +81 -0
  11. package/llm/components/banner.json +120 -0
  12. package/llm/components/breadcrumb.json +169 -0
  13. package/llm/components/button-container.json +150 -0
  14. package/llm/components/button-feedback.json +155 -0
  15. package/llm/components/button.json +290 -0
  16. package/llm/components/card-assessment.json +93 -0
  17. package/llm/components/card-test.json +83 -0
  18. package/llm/components/card.json +94 -0
  19. package/llm/components/chat.json +155 -0
  20. package/llm/components/checkbox.json +186 -0
  21. package/llm/components/checkmark.json +175 -0
  22. package/llm/components/collapsible.json +100 -0
  23. package/llm/components/color-palette.json +79 -0
  24. package/llm/components/color-usage.json +83 -0
  25. package/llm/components/combobox.json +143 -0
  26. package/llm/components/command-palette.json +159 -0
  27. package/llm/components/countdown.json +113 -0
  28. package/llm/components/datepicker.json +151 -0
  29. package/llm/components/divider.json +104 -0
  30. package/llm/components/empty-state.json +80 -0
  31. package/llm/components/field.json +123 -0
  32. package/llm/components/fieldset.json +78 -0
  33. package/llm/components/file-upload.json +163 -0
  34. package/llm/components/form-example.json +82 -0
  35. package/llm/components/getting-started.json +70 -0
  36. package/llm/components/icons-reference.json +78 -0
  37. package/llm/components/illustrations-library.json +78 -0
  38. package/llm/components/input-group.json +94 -0
  39. package/llm/components/introduction.json +71 -0
  40. package/llm/components/join.json +105 -0
  41. package/llm/components/kbd.json +139 -0
  42. package/llm/components/key-value.json +86 -0
  43. package/llm/components/link.json +120 -0
  44. package/llm/components/loader.json +117 -0
  45. package/llm/components/logotype.json +75 -0
  46. package/llm/components/menu.json +192 -0
  47. package/llm/components/modal.json +167 -0
  48. package/llm/components/navbar.json +158 -0
  49. package/llm/components/pagination.json +122 -0
  50. package/llm/components/pie-chart.json +94 -0
  51. package/llm/components/popover.json +174 -0
  52. package/llm/components/progress-bullet.json +203 -0
  53. package/llm/components/progress-linear.json +129 -0
  54. package/llm/components/progress-radial.json +125 -0
  55. package/llm/components/radio.json +162 -0
  56. package/llm/components/range-slider.json +125 -0
  57. package/llm/components/scrollbar.json +96 -0
  58. package/llm/components/select-input.json +224 -0
  59. package/llm/components/shadows.json +107 -0
  60. package/llm/components/skeleton.json +84 -0
  61. package/llm/components/stacked-chart.json +100 -0
  62. package/llm/components/state.json +138 -0
  63. package/llm/components/stepper.json +95 -0
  64. package/llm/components/steps.json +177 -0
  65. package/llm/components/surface.json +181 -0
  66. package/llm/components/table.json +223 -0
  67. package/llm/components/tabs.json +147 -0
  68. package/llm/components/template-ai.json +80 -0
  69. package/llm/components/template-login.json +88 -0
  70. package/llm/components/template-stats.json +76 -0
  71. package/llm/components/text-input.json +275 -0
  72. package/llm/components/textarea.json +183 -0
  73. package/llm/components/timeline.json +142 -0
  74. package/llm/components/toast.json +164 -0
  75. package/llm/components/toggle.json +158 -0
  76. package/llm/components/tool-svg-to-base64.json +78 -0
  77. package/llm/components/tool-svg-to-icon-data.json +81 -0
  78. package/llm/components/tooltip.json +90 -0
  79. package/llm/examples/ai-background.html +1 -0
  80. package/llm/examples/ai-orb.html +1 -0
  81. package/llm/examples/ai-perl.html +1 -0
  82. package/llm/examples/all-components.html +1 -0
  83. package/llm/examples/animation-references.html +1 -0
  84. package/llm/examples/avatar.html +1 -0
  85. package/llm/examples/badge.html +1 -0
  86. package/llm/examples/banner-marketplace.html +1 -0
  87. package/llm/examples/banner.html +1 -0
  88. package/llm/examples/breadcrumb.html +1 -0
  89. package/llm/examples/button-container.html +1 -0
  90. package/llm/examples/button-feedback.html +1 -0
  91. package/llm/examples/button.html +3 -0
  92. package/llm/examples/card-assessment.html +1 -0
  93. package/llm/examples/card-test.html +1 -0
  94. package/llm/examples/card.html +1 -0
  95. package/llm/examples/chat.html +1 -0
  96. package/llm/examples/checkbox.html +1 -0
  97. package/llm/examples/checkmark.html +1 -0
  98. package/llm/examples/collapsible.html +1 -0
  99. package/llm/examples/color-palette.html +1 -0
  100. package/llm/examples/color-usage.html +1 -0
  101. package/llm/examples/combobox.html +1 -0
  102. package/llm/examples/command-palette.html +1 -0
  103. package/llm/examples/countdown.html +1 -0
  104. package/llm/examples/datepicker.html +1 -0
  105. package/llm/examples/divider.html +1 -0
  106. package/llm/examples/empty-state.html +1 -0
  107. package/llm/examples/field.html +1 -0
  108. package/llm/examples/fieldset.html +1 -0
  109. package/llm/examples/file-upload.html +1 -0
  110. package/llm/examples/form-example.html +1 -0
  111. package/llm/examples/getting-started.html +1 -0
  112. package/llm/examples/icons-reference.html +1 -0
  113. package/llm/examples/illustrations-library.html +1 -0
  114. package/llm/examples/input-group.html +1 -0
  115. package/llm/examples/introduction.html +1 -0
  116. package/llm/examples/join.html +1 -0
  117. package/llm/examples/kbd.html +1 -0
  118. package/llm/examples/key-value.html +1 -0
  119. package/llm/examples/link.html +1 -0
  120. package/llm/examples/loader.html +1 -0
  121. package/llm/examples/logotype.html +1 -0
  122. package/llm/examples/menu.html +1 -0
  123. package/llm/examples/modal.html +16 -0
  124. package/llm/examples/navbar.html +1 -0
  125. package/llm/examples/pagination.html +1 -0
  126. package/llm/examples/pie-chart.html +1 -0
  127. package/llm/examples/popover.html +1 -0
  128. package/llm/examples/progress-bullet.html +1 -0
  129. package/llm/examples/progress-linear.html +1 -0
  130. package/llm/examples/progress-radial.html +1 -0
  131. package/llm/examples/radio.html +1 -0
  132. package/llm/examples/range-slider.html +1 -0
  133. package/llm/examples/scrollbar.html +1 -0
  134. package/llm/examples/select-input.html +1 -0
  135. package/llm/examples/shadows.html +1 -0
  136. package/llm/examples/skeleton.html +1 -0
  137. package/llm/examples/stacked-chart.html +1 -0
  138. package/llm/examples/state.html +1 -0
  139. package/llm/examples/stepper.html +1 -0
  140. package/llm/examples/steps.html +1 -0
  141. package/llm/examples/surface.html +1 -0
  142. package/llm/examples/table.html +16 -0
  143. package/llm/examples/tabs.html +1 -0
  144. package/llm/examples/template-ai.html +1 -0
  145. package/llm/examples/template-login.html +1 -0
  146. package/llm/examples/template-stats.html +1 -0
  147. package/llm/examples/text-input.html +10 -0
  148. package/llm/examples/textarea.html +1 -0
  149. package/llm/examples/timeline.html +1 -0
  150. package/llm/examples/toast.html +5 -0
  151. package/llm/examples/toggle.html +1 -0
  152. package/llm/examples/tool-svg-to-base64.html +1 -0
  153. package/llm/examples/tool-svg-to-icon-data.html +1 -0
  154. package/llm/examples/tooltip.html +1 -0
  155. package/llm/index.json +1615 -0
  156. package/llm/llms.txt +18 -0
  157. package/llm/patterns.json +111 -0
  158. package/llm/rules.json +47 -0
  159. package/llm/schema.json +804 -0
  160. package/llm/tokens.json +3629 -0
  161. package/package.json +30 -0
  162. package/styles/ai.css +114 -0
  163. package/styles/animation.css +2493 -0
  164. package/styles/avatar.css +101 -0
  165. package/styles/background-ai.css +118 -0
  166. package/styles/badge.css +274 -0
  167. package/styles/banner.css +98 -0
  168. package/styles/breadcrumb.css +72 -0
  169. package/styles/button.css +621 -0
  170. package/styles/card.css +27 -0
  171. package/styles/chart-pie.css +39 -0
  172. package/styles/chart-stacked.css +91 -0
  173. package/styles/chat.css +506 -0
  174. package/styles/checkmark.css +105 -0
  175. package/styles/code.css +264 -0
  176. package/styles/collapsible.css +93 -0
  177. package/styles/colors.css +536 -0
  178. package/styles/combobox.css +66 -0
  179. package/styles/command.css +81 -0
  180. package/styles/contest.css +227 -0
  181. package/styles/countdown.css +65 -0
  182. package/styles/datepicker.css +124 -0
  183. package/styles/divider.css +72 -0
  184. package/styles/drawer.css +142 -0
  185. package/styles/dropdown.css +22 -0
  186. package/styles/empty-state.css +48 -0
  187. package/styles/field.css +47 -0
  188. package/styles/fieldset.css +24 -0
  189. package/styles/form-checkbox-radio-toggle.css +233 -0
  190. package/styles/form-fileupload.css +146 -0
  191. package/styles/form-rangeslider.css +106 -0
  192. package/styles/form-shared.css +41 -0
  193. package/styles/form-text-select.css +411 -0
  194. package/styles/form.css +86 -0
  195. package/styles/globals.css +66 -0
  196. package/styles/input-group.css +63 -0
  197. package/styles/join.css +141 -0
  198. package/styles/kbd.css +55 -0
  199. package/styles/key-value.css +44 -0
  200. package/styles/link.css +48 -0
  201. package/styles/loader.css +183 -0
  202. package/styles/logotype.css +13 -0
  203. package/styles/menu.css +317 -0
  204. package/styles/modal.css +172 -0
  205. package/styles/navbar.css +48 -0
  206. package/styles/package-quill.css +1001 -0
  207. package/styles/pagination.css +147 -0
  208. package/styles/panel.css +113 -0
  209. package/styles/popover.css +303 -0
  210. package/styles/prism.css +60 -0
  211. package/styles/progress.css +209 -0
  212. package/styles/scrollbar.css +17 -0
  213. package/styles/shadow.css +25 -0
  214. package/styles/shared.css +226 -0
  215. package/styles/skeleton.css +34 -0
  216. package/styles/state.css +150 -0
  217. package/styles/stepper.css +72 -0
  218. package/styles/steps.css +98 -0
  219. package/styles/surface.css +252 -0
  220. package/styles/tab.css +286 -0
  221. package/styles/table.css +243 -0
  222. package/styles/theme.css +126 -0
  223. package/styles/timeline.css +193 -0
  224. package/styles/toast.css +150 -0
  225. package/styles/tooltip.css +8 -0
  226. package/styles/typography.css +160 -0
  227. package/styles/utility.css +20 -0
  228. package/tailwind.config.cjs +9 -0
@@ -0,0 +1,621 @@
1
+ /*----------------------------*/
2
+ /* BUTTON */
3
+ /*----------------------------*/
4
+
5
+ @utility button-base {
6
+ @apply include-interactive
7
+ relative
8
+ min-w-fit
9
+ min-h-11
10
+ inline-flex
11
+ items-center
12
+ leading-none
13
+ whitespace-nowrap
14
+ justify-center
15
+ font-semibold
16
+ gap-2
17
+ rounded-full
18
+ [&>span:not(.button-icon)]:gap-2
19
+ *:shrink-0
20
+ [&>span:not(.button-icon)]:flex
21
+ [&>span:not(.button-icon)]:items-center
22
+ [&_svg]:size-5
23
+ [&_svg]:aspect-square
24
+ [&_svg]:fill-current
25
+ [&_svg]:shrink-0
26
+ cursor-pointer
27
+ select-none
28
+ active:*:translate-y-0.5;
29
+
30
+ &:not(.button-sm) {
31
+ @apply text-sm
32
+ h-11
33
+ min-w-11
34
+ min-h-11
35
+ [&>span:not(.button-icon)]:gap-1.5
36
+ px-4
37
+ [&>.button-icon]:size-5
38
+ [&_svg]:size-5
39
+ [&.button-icon]:min-w-11
40
+ [&.button-icon]:px-0;
41
+ }
42
+
43
+ &:has(.avatar:first-child) {
44
+ @apply !pl-1;
45
+ }
46
+
47
+ &.is-loading,
48
+ &.is-charging {
49
+ &::after {
50
+ @apply content-['']
51
+ loader-base
52
+ loader-xs
53
+ absolute;
54
+ }
55
+ > span {
56
+ @apply opacity-0;
57
+ }
58
+ }
59
+
60
+ &.is-charging {
61
+ @apply !w-11
62
+ !px-0
63
+ !max-w-11
64
+ !min-w-11
65
+ !ease-in-out
66
+ hover:!transition-[border-color,background-color,width,min-width,max-width]
67
+ !transition-[border-color,background-color,width,min-width,max-width];
68
+ }
69
+ &.is-charging-done {
70
+ @apply w-auto
71
+ !duration-200
72
+ !ease-in-out
73
+ hover:!transition-[border-color,background-color,width]
74
+ !transition-[border-color,background-color,width];
75
+ &::after {
76
+ @apply content-['']
77
+ absolute
78
+ z-0
79
+ size-16
80
+ aspect-square
81
+ rounded-full
82
+ border
83
+ border-line-default
84
+ animate-ripple-out;
85
+ }
86
+ }
87
+
88
+ &.has-badge > span,
89
+ > span.has-badge {
90
+ @apply relative;
91
+ &::after {
92
+ @apply content-[''] absolute bg-background-brand -top-0.5 -right-1.5 rounded-full size-1.5 animate-scale-in;
93
+ }
94
+ }
95
+
96
+ &.is-disabled,
97
+ &.is-loading,
98
+ &.is-charging,
99
+ &[disabled] {
100
+ @apply cursor-not-allowed shadow-none! active:*:translate-y-0 *:drop-shadow-none!;
101
+ &,
102
+ &:hover,
103
+ &:active {
104
+ @apply outline-line-default/0 brightness-100! scale-100!;
105
+ &::after {
106
+ @apply dark:inverted;
107
+ }
108
+ }
109
+ &.button-primary {
110
+ &,
111
+ &:hover,
112
+ &:active {
113
+ @apply bg-none text-shadow-none bg-core-ui-100 dark:bg-core-ui-800 text-text-secondary/75 border-line-default;
114
+ }
115
+ }
116
+ &.button-secondary {
117
+ &,
118
+ &:hover,
119
+ &:active {
120
+ @apply bg-none text-shadow-none bg-core-ui-100 dark:bg-core-ui-800 text-text-secondary/75 border-line-default;
121
+ }
122
+ }
123
+ &.button-plain {
124
+ &,
125
+ &:hover,
126
+ &:active {
127
+ @apply underline bg-transparent text-text-secondary/75;
128
+ }
129
+ }
130
+ &.button-destructive {
131
+ &,
132
+ &:hover,
133
+ &:active {
134
+ @apply bg-none text-shadow-none bg-core-ui-100 dark:bg-core-ui-800 text-text-secondary/75 border-line-default;
135
+ }
136
+ }
137
+ }
138
+
139
+ > .avatar {
140
+ > div {
141
+ @apply size-9;
142
+ }
143
+ }
144
+ }
145
+
146
+ @utility button {
147
+ @apply button-base
148
+ [&:has(>svg:only-child:last-child:first-child)]:px-0
149
+ [&:has(.button-icon:only-child:last-child:first-child)]:px-0;
150
+
151
+ /* VARIANTS */
152
+ &.button-primary {
153
+ @apply
154
+ surface-interactive-brand
155
+ ;
156
+
157
+ &.is-active {
158
+ @apply text-text-default bg-background-brand-active;
159
+ }
160
+ }
161
+
162
+ /* Text feedback */
163
+ &[data-feedback]:not([data-feedback=""]):not([data-feedback-icon]) {
164
+ @apply overflow-hidden;
165
+
166
+ &::before {
167
+ @apply content-[attr(data-feedback)] absolute inset-x-0 text-center;
168
+ animation: button-feedback-message 4s cubic-bezier(0.9, 0, 0, 1) forwards;
169
+ }
170
+
171
+ > * {
172
+ animation: button-feedback-label 4s cubic-bezier(1, 0, 0, 0.9) forwards;
173
+ }
174
+ }
175
+
176
+ /* Icon feedback */
177
+ &[data-feedback][data-feedback-icon]:not([data-feedback=""]) {
178
+ @apply relative;
179
+
180
+ &::before {
181
+ @apply content-[attr(data-feedback)] absolute text-center pointer-events-none leading-none max-w-[20rem] w-max tooltip;
182
+ inset-inline-start: 50%;
183
+ bottom: 100%;
184
+ transform: translate(-50%, 0.125rem);
185
+ animation: button-feedback-tooltip 4s cubic-bezier(0.9, 0, 0, 1) forwards;
186
+ }
187
+
188
+ &::after {
189
+ @apply content-[''] absolute size-6 aspect-square text-center bg-current mask-close;
190
+ animation: button-feedback-icon 4s cubic-bezier(0.9, 0, 0, 1) forwards;
191
+ }
192
+
193
+ > * {
194
+ animation: button-feedback-icon-label 4s cubic-bezier(1, 0, 0, 0.9) forwards;
195
+ }
196
+
197
+ /* Success variant */
198
+ &[data-feedback-icon="success"] {
199
+ &::after {
200
+ @apply mask-check;
201
+ }
202
+ &.button-secondary,
203
+ &.button-plain,
204
+ &.button-destructive {
205
+ &::after {
206
+ @apply text-text-success;
207
+ }
208
+ }
209
+ }
210
+
211
+ /* Error variant */
212
+ &[data-feedback-icon="error"] {
213
+ &::after {
214
+ @apply mask-close;
215
+ }
216
+ &.button-secondary,
217
+ &.button-plain,
218
+ &.button-destructive {
219
+ &::after {
220
+ @apply text-text-error;
221
+ }
222
+ }
223
+ }
224
+
225
+ /* Attention variant */
226
+ &[data-feedback-icon="attention"] {
227
+ &::after {
228
+ @apply mask-exclamation;
229
+ }
230
+ &.button-secondary,
231
+ &.button-plain,
232
+ &.button-destructive {
233
+ &::after {
234
+ @apply text-text-attention;
235
+ }
236
+ }
237
+ }
238
+ }
239
+
240
+ /* Hide feedback when empty */
241
+ &[data-feedback=""] {
242
+ &::before,
243
+ &::after {
244
+ @apply hidden;
245
+ }
246
+ }
247
+
248
+ /* Icon-only feedback */
249
+ &[data-feedback="."] {
250
+ &::before {
251
+ @apply hidden;
252
+ }
253
+ }
254
+ }
255
+
256
+ @utility button-secondary {
257
+ @apply include-border-secondary text-text-default bg-background-surface;
258
+ &.is-active {
259
+ @apply bg-core-black
260
+ text-core-white
261
+ border-core-black!
262
+ hover:bg-core-black
263
+ active:bg-core-black
264
+ hover:text-core-white
265
+ active:text-core-white;
266
+ }
267
+ }
268
+
269
+ @utility button-tertiary {
270
+ @apply bg-text-default hover:bg-text-secondary active:bg-text-tertiary text-background-surface;
271
+
272
+ &.is-active {
273
+ @apply bg-text-tertiary;
274
+ }
275
+ }
276
+
277
+ @utility button-plain {
278
+ @apply underline text-text-brand;
279
+ /* > * {
280
+ @apply relative;
281
+ &::before {
282
+ @apply content-[''] h-px w-full absolute inset-x-0 bottom-0 bg-text-brand translate-y-1 opacity-0 pointer-events-none;
283
+ }
284
+ } */
285
+ &:hover {
286
+ @apply text-brand-strong;
287
+ /* > * {
288
+ &::before {
289
+ @apply bg-text-brand-hover;
290
+ }
291
+ } */
292
+ }
293
+ &.is-active,
294
+ &:active {
295
+ @apply no-underline bg-brand-default/10;
296
+ > * {
297
+ &::before {
298
+ @apply bg-text-brand-active;
299
+ }
300
+ }
301
+ }
302
+ &.is-active,
303
+ &:hover,
304
+ &:active {
305
+ > * {
306
+ &::before {
307
+ @apply opacity-100 translate-y-0;
308
+ }
309
+ }
310
+ }
311
+ }
312
+
313
+ @utility button-destructive {
314
+ @apply border backdrop-blur include-border-destructive bg-background-error border-line-error hover:border-line-error text-text-error active:bg-background-surface-elevated;
315
+
316
+ &.is-active {
317
+ @apply bg-background-surface-elevated;
318
+ }
319
+ }
320
+
321
+ @utility button-discreet {
322
+ @apply border text-text-tertiary border-line-default/0 disabled:border-line-default;
323
+
324
+ &.is-active,
325
+ &:hover,
326
+ &:active {
327
+ @apply border-line-strong text-text-default;
328
+ }
329
+ }
330
+
331
+ @utility button-menu {
332
+ @apply include-interactive text-text-default include-hover-primary;
333
+ }
334
+
335
+ /* Close */
336
+ .button.button-close,
337
+ .button-close {
338
+ --close-size: 2.75rem;
339
+ @apply size-(--close-size) min-w-(--close-size) min-h-(--close-size) p-0 text-transparent! rounded-full transition-transform duration-300 hover:rotate-90 ease-out-quint;
340
+
341
+ > span {
342
+ @apply opacity-0 pointer-events-none;
343
+ }
344
+
345
+ &::before {
346
+ @apply w-[calc(var(--close-size)-2px)] h-[calc(var(--close-size)-2px)];
347
+ }
348
+
349
+ &.button-xs {
350
+ --close-size:1.25rem;
351
+ }
352
+ &.button-sm {
353
+ --close-size:1.75rem;
354
+ }
355
+ &.button-lg {
356
+ --close-size:3.5rem;
357
+ }
358
+
359
+ &.button-primary {
360
+ &::before {
361
+ @apply bg-text-inverted;
362
+ }
363
+ }
364
+ &.button-secondary {
365
+ &::before {
366
+ @apply bg-text-default;
367
+ }
368
+ }
369
+ &.button-plain {
370
+ &::before {
371
+ @apply bg-text-brand;
372
+ }
373
+ &:hover::before {
374
+ @apply bg-brand-strong;
375
+ }
376
+ }
377
+ &.button-destructive {
378
+ &::before {
379
+ @apply bg-text-error;
380
+ }
381
+ }
382
+
383
+ &::before {
384
+ @apply content-['']
385
+ absolute
386
+ block
387
+ left-1/2
388
+ top-1/2
389
+ -translate-x-1/2
390
+ -translate-y-1/2
391
+ transform-gpu
392
+ mask-close;
393
+ }
394
+
395
+ &:not([disabled]),
396
+ &:not(.is-disabled) {
397
+ &:hover,
398
+ &:focus-visible {
399
+ > .icon {
400
+ @apply scale-100;
401
+ }
402
+ }
403
+ }
404
+ }
405
+
406
+
407
+ /* SIZES */
408
+ .button-xs {
409
+ @apply text-xs
410
+ min-w-5
411
+ min-h-5
412
+ h-5
413
+ px-2
414
+ gap-1
415
+ [&>span:not(.button-icon)]:gap-1
416
+ [&>.button-icon]:size-4
417
+ [&:has(svg:only-child)]:px-0;
418
+ }
419
+
420
+ .button-sm {
421
+ @apply text-sm
422
+ min-w-8
423
+ min-h-8
424
+ h-8
425
+ px-3
426
+ gap-1
427
+ [&>span:not(.button-icon)]:gap-1
428
+ [&>.button-icon]:size-5
429
+ [&:has(svg:only-child)]:px-0;
430
+ }
431
+
432
+ .button-lg {
433
+ @apply text-base
434
+ min-w-14
435
+ min-h-14
436
+ [&>span:not(.button-icon)]:gap-2
437
+ [&>.button-icon]:size-6
438
+ [&:has(svg:only-child)]:px-[15px];
439
+ }
440
+
441
+ /* WIDTH MODIFIERS */
442
+ .button-wide {
443
+ @apply px-10;
444
+
445
+ &.button-sm {
446
+ @apply px-8;
447
+ }
448
+
449
+ &.button-lg {
450
+ @apply px-16;
451
+ }
452
+ }
453
+
454
+ .button-block {
455
+ @apply w-full;
456
+ }
457
+
458
+ .button-sso {
459
+ @apply include-border-secondary text-text-default bg-background-surface;
460
+
461
+ > span:not(.button-icon),
462
+ > span:not(.button-icon) > span {
463
+ @apply flex-1 justify-center text-center;
464
+ }
465
+
466
+ svg {
467
+ @apply size-5;
468
+ }
469
+ }
470
+
471
+
472
+ /* Button input */
473
+ .button {
474
+ &:is(input[type="checkbox"]),
475
+ &:is(input[type="radio"]) {
476
+ @apply appearance-none;
477
+ &::after {
478
+ @apply content-[attr(aria-label)];
479
+ }
480
+
481
+ &.button-primary {
482
+ &:checked {
483
+ @apply bg-background-inverted border-background-inverted bg-none text-shadow-none shadow-none!;
484
+
485
+ *, &::before, &::after {
486
+ @apply drop-shadow-none!;
487
+ }
488
+ &::after {
489
+ @apply text-text-inverted;
490
+ }
491
+ }
492
+ }
493
+
494
+ &.button-secondary {
495
+ &:checked {
496
+ @apply surface-brand;
497
+
498
+ *, &::before, &::after {
499
+ @apply drop-shadow-none!;
500
+ }
501
+ }
502
+ }
503
+ }
504
+ }
505
+
506
+ .join > .button.button-plain,
507
+ .button.button-plain:is(input[type="checkbox"]),
508
+ .button.button-plain:is(input[type="radio"]) {
509
+ @apply no-underline include-border-secondary text-text-default;
510
+ &:checked {
511
+ @apply bg-background-inverted border-background-inverted bg-none text-shadow-none;
512
+ &::after {
513
+ @apply text-text-inverted;
514
+ }
515
+ }
516
+ }
517
+
518
+ /* Animations */
519
+ @keyframes button-feedback-message {
520
+ 0% {
521
+ transform: translateY(3rem);
522
+ opacity: 0;
523
+ }
524
+ 10% {
525
+ transform: translateY(0);
526
+ opacity: 1;
527
+ }
528
+ 90% {
529
+ transform: translateY(0);
530
+ opacity: 1;
531
+ }
532
+ 100% {
533
+ transform: translateY(3rem);
534
+ opacity: 0;
535
+ }
536
+ }
537
+
538
+ @keyframes button-feedback-tooltip {
539
+ 0% {
540
+ transform: translate(-50%, -0.1rem);
541
+ opacity: 0;
542
+ }
543
+ 10% {
544
+ transform: translate(-50%, -0.35rem);
545
+ opacity: 1;
546
+ }
547
+ 90% {
548
+ transform: translate(-50%, -0.35rem);
549
+ opacity: 1;
550
+ }
551
+ 100% {
552
+ transform: translate(-50%, -0.1rem);
553
+ opacity: 0;
554
+ }
555
+ }
556
+
557
+ @keyframes button-feedback-label {
558
+ 0% {
559
+ transform: translateY(0);
560
+ opacity: 1;
561
+ }
562
+ 10% {
563
+ transform: translateY(-3rem);
564
+ opacity: 0;
565
+ }
566
+ 90% {
567
+ transform: translateY(-3rem);
568
+ opacity: 0;
569
+ }
570
+ 100% {
571
+ transform: translateY(0);
572
+ opacity: 1;
573
+ }
574
+ }
575
+
576
+ @keyframes button-feedback-icon {
577
+ 0% {
578
+ transform: scale(0) rotate(45deg);
579
+ opacity: 0;
580
+ }
581
+ 10% {
582
+ transform: scale(1) rotate(0);
583
+ opacity: 1;
584
+ }
585
+ 90% {
586
+ transform: scale(1) rotate(0);
587
+ opacity: 1;
588
+ }
589
+ 100% {
590
+ transform: scale(0) rotate(45deg);
591
+ opacity: 0;
592
+ }
593
+ }
594
+
595
+ @keyframes button-feedback-icon-label {
596
+ 0% {
597
+ transform: scale(1) rotate(0);
598
+ opacity: 1;
599
+ }
600
+ 10% {
601
+ transform: scale(0) rotate(-45deg);
602
+ opacity: 0;
603
+ }
604
+ 90% {
605
+ transform: scale(0) rotate(-45deg);
606
+ opacity: 0;
607
+ }
608
+ 100% {
609
+ transform: scale(1) rotate(0);
610
+ opacity: 1;
611
+ }
612
+ }
613
+
614
+ @utility button-container {
615
+ @apply inline-flex
616
+ items-center
617
+ bg-[rgba(16,16,28,0.40)]
618
+ shadow-[0_0_1px_0_rgba(255,255,255,0.25)]
619
+ p-[3px]
620
+ rounded-[calc(1.5rem+3px)];
621
+ }
@@ -0,0 +1,27 @@
1
+ /*----------------------------*/
2
+ /* CARD */
3
+ /*----------------------------*/
4
+
5
+ @utility card {
6
+ &:not([class*="rounded"]) {
7
+ @apply rounded-3xl;
8
+ }
9
+
10
+ @apply border bg-background-surface border-line-default;
11
+
12
+ :where(figure:first-child) {
13
+ @apply overflow-hidden rounded-ss-[inherit] rounded-se-[inherit];
14
+ }
15
+ }
16
+
17
+ @utility card-body {
18
+ @apply flex flex-col flex-1 gap-4 p-4;
19
+ }
20
+
21
+ @utility card-actions {
22
+ @apply flex flex-wrap gap-4 items-start;
23
+ }
24
+
25
+ @utility card-interactive {
26
+ @apply [&:has(.button:hover)]:border-line-strong hover:transition-[border-color] transition-[border-color] include-transition;
27
+ }
@@ -0,0 +1,39 @@
1
+ /*----------------------------*/
2
+ /* PIE */
3
+ /*----------------------------*/
4
+ @property --pie-progress {
5
+ syntax: "<percentage>";
6
+ inherits: false;
7
+ initial-value: 0%;
8
+ }
9
+
10
+ @utility chart-pie {
11
+ --width: 50;
12
+ @apply relative overflow-clip rounded-full aspect-square text-brand-default;
13
+ mask: radial-gradient(farthest-side, transparent calc(100% - var(--width) * 1%), #fff 0);
14
+ transform: rotate(calc(var(--start) * 3.6deg));
15
+
16
+ > span {
17
+ @apply absolute inset-0;
18
+ background: conic-gradient(currentColor calc(var(--progress) * 1%), transparent 0);
19
+ }
20
+ &::before {
21
+ @apply content-[''] absolute inset-0 rounded-full bg-line-default;
22
+ }
23
+
24
+ &.chart-animate {
25
+ > span {
26
+ animation: chart-pie-animate 2s cubic-bezier(0.77, 0, 0.175, 1) forwards;
27
+ background: conic-gradient(currentColor var(--pie-progress), transparent 0);
28
+ }
29
+ }
30
+ }
31
+
32
+ @keyframes chart-pie-animate {
33
+ from {
34
+ --pie-progress: 0%;
35
+ }
36
+ to {
37
+ --pie-progress: calc(var(--progress) * 1%);
38
+ }
39
+ }