basecoat-css 0.3.11 → 1.0.0-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 (97) hide show
  1. package/README.md +8 -1
  2. package/dist/base/base.css +150 -0
  3. package/dist/basecoat-base.cdn.css +2942 -0
  4. package/dist/basecoat-base.cdn.min.css +2 -0
  5. package/dist/basecoat-base.css +2 -0
  6. package/dist/basecoat-components.css +32 -0
  7. package/dist/basecoat-luma.cdn.css +6073 -0
  8. package/dist/basecoat-luma.cdn.min.css +2 -0
  9. package/dist/basecoat-luma.css +2 -0
  10. package/dist/basecoat-lyra.cdn.css +6004 -0
  11. package/dist/basecoat-lyra.cdn.min.css +2 -0
  12. package/dist/basecoat-lyra.css +2 -0
  13. package/dist/basecoat-maia.cdn.css +6012 -0
  14. package/dist/basecoat-maia.cdn.min.css +2 -0
  15. package/dist/basecoat-maia.css +2 -0
  16. package/dist/basecoat-mira.cdn.css +6063 -0
  17. package/dist/basecoat-mira.cdn.min.css +2 -0
  18. package/dist/basecoat-mira.css +2 -0
  19. package/dist/basecoat-nova.cdn.css +6067 -0
  20. package/dist/basecoat-nova.cdn.min.css +2 -0
  21. package/dist/basecoat-nova.css +2 -0
  22. package/dist/basecoat-rhea.cdn.css +6092 -0
  23. package/dist/basecoat-rhea.cdn.min.css +2 -0
  24. package/dist/basecoat-rhea.css +2 -0
  25. package/dist/basecoat-sera.cdn.css +5840 -0
  26. package/dist/basecoat-sera.cdn.min.css +2 -0
  27. package/dist/basecoat-sera.css +2 -0
  28. package/dist/basecoat-vega.cdn.css +6023 -0
  29. package/dist/basecoat-vega.cdn.min.css +2 -0
  30. package/dist/basecoat-vega.css +2 -0
  31. package/dist/basecoat.all.css +1 -0
  32. package/dist/basecoat.cdn.css +5084 -2646
  33. package/dist/basecoat.cdn.min.css +1 -1
  34. package/dist/basecoat.css +1 -1311
  35. package/dist/components/alert.css +21 -0
  36. package/dist/components/badge.css +12 -0
  37. package/dist/components/button-group.css +54 -0
  38. package/dist/components/button.css +61 -0
  39. package/dist/components/card.css +22 -0
  40. package/dist/components/checkbox.css +12 -0
  41. package/dist/components/collapsible.css +21 -0
  42. package/dist/components/combobox.css +78 -0
  43. package/dist/components/command.css +133 -0
  44. package/dist/components/dialog.css +52 -0
  45. package/dist/components/dropdown-menu.css +48 -0
  46. package/dist/components/empty.css +26 -0
  47. package/dist/components/field.css +86 -0
  48. package/dist/components/form.css +9 -0
  49. package/dist/components/input-group.css +50 -0
  50. package/dist/components/input.css +32 -0
  51. package/dist/components/item.css +50 -0
  52. package/dist/components/kbd.css +10 -0
  53. package/dist/components/label.css +12 -0
  54. package/dist/components/native-select.css +12 -0
  55. package/dist/components/popover.css +81 -0
  56. package/dist/components/radio.css +11 -0
  57. package/dist/components/range.css +50 -0
  58. package/dist/components/select.css +64 -0
  59. package/dist/components/sidebar.css +101 -0
  60. package/dist/components/skeleton.css +6 -0
  61. package/dist/components/switch.css +8 -0
  62. package/dist/components/table.css +34 -0
  63. package/dist/components/tabs.css +31 -0
  64. package/dist/components/textarea.css +7 -0
  65. package/dist/components/toast.css +57 -0
  66. package/dist/components/tooltip.css +82 -0
  67. package/dist/js/all.js +1435 -755
  68. package/dist/js/all.min.js +1 -1
  69. package/dist/js/basecoat.js +95 -40
  70. package/dist/js/basecoat.min.js +1 -1
  71. package/dist/js/combobox.js +483 -0
  72. package/dist/js/combobox.min.js +1 -0
  73. package/dist/js/command.js +165 -126
  74. package/dist/js/command.min.js +1 -1
  75. package/dist/js/dropdown-menu.js +158 -133
  76. package/dist/js/dropdown-menu.min.js +1 -1
  77. package/dist/js/popover.js +22 -8
  78. package/dist/js/popover.min.js +1 -1
  79. package/dist/js/range.js +25 -0
  80. package/dist/js/range.min.js +1 -0
  81. package/dist/js/select.js +347 -359
  82. package/dist/js/select.min.js +1 -1
  83. package/dist/js/sidebar.js +27 -31
  84. package/dist/js/sidebar.min.js +1 -1
  85. package/dist/js/tabs.js +82 -38
  86. package/dist/js/tabs.min.js +1 -1
  87. package/dist/js/toast.js +42 -37
  88. package/dist/js/toast.min.js +1 -1
  89. package/dist/styles/luma.css +1308 -0
  90. package/dist/styles/lyra.css +1289 -0
  91. package/dist/styles/maia.css +1296 -0
  92. package/dist/styles/mira.css +1297 -0
  93. package/dist/styles/nova.css +1293 -0
  94. package/dist/styles/rhea.css +1305 -0
  95. package/dist/styles/sera.css +1316 -0
  96. package/dist/styles/vega.css +1293 -0
  97. package/package.json +47 -3
@@ -0,0 +1,32 @@
1
+ /* Input */
2
+ @layer components {
3
+ .field > input[type='text']:not(:is(.command > header input, .dialog > * > header input)),
4
+ .field > input[type='email'],
5
+ .field > input[type='password'],
6
+ .field > input[type='number'],
7
+ .field > input[type='file'],
8
+ .field > input[type='tel'],
9
+ .field > input[type='url'],
10
+ .field > input[type='search']:not(:is(.command > header input, .dialog > * > header input)),
11
+ .field > input[type='date'],
12
+ .field > input[type='datetime-local'],
13
+ .field > input[type='month'],
14
+ .field > input[type='week'],
15
+ .field > input[type='time'],
16
+ .input[type='text'],
17
+ .input[type='email'],
18
+ .input[type='password'],
19
+ .input[type='number'],
20
+ .input[type='file'],
21
+ .input[type='tel'],
22
+ .input[type='url'],
23
+ .input[type='search'],
24
+ .input[type='date'],
25
+ .input[type='datetime-local'],
26
+ .input[type='month'],
27
+ .input[type='week'],
28
+ .input[type='time'],
29
+ .input:not([type]) {
30
+ @apply w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50;
31
+ }
32
+ }
@@ -0,0 +1,50 @@
1
+ /* Item */
2
+ @layer components {
3
+ .item-group {
4
+ @apply flex w-full flex-col;
5
+ }
6
+
7
+ .item-group > hr {
8
+ @apply w-full shrink-0 border-0 border-t;
9
+ }
10
+
11
+ .item {
12
+ @apply flex w-full flex-wrap items-center border transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50;
13
+ }
14
+
15
+ a.item {
16
+ @apply hover:bg-muted;
17
+ }
18
+
19
+ .item > figure {
20
+ @apply flex shrink-0 items-center justify-center [&_svg]:pointer-events-none;
21
+ }
22
+
23
+ .item > figure:has(img) {
24
+ @apply overflow-hidden [&_img]:size-full [&_img]:object-cover;
25
+ }
26
+
27
+ .item > section {
28
+ @apply flex flex-1 flex-col;
29
+ }
30
+
31
+ .item > section + section {
32
+ @apply flex-none;
33
+ }
34
+
35
+ .item > aside {
36
+ @apply flex items-center;
37
+ }
38
+
39
+ .item > :is(header, footer) {
40
+ @apply flex basis-full items-center justify-between;
41
+ }
42
+
43
+ .item :is(h2, h3, h4) {
44
+ @apply line-clamp-1 flex w-fit items-center;
45
+ }
46
+
47
+ .item p {
48
+ @apply text-muted-foreground line-clamp-2 text-start font-normal [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary;
49
+ }
50
+ }
@@ -0,0 +1,10 @@
1
+ /* Kbd */
2
+ @layer components {
3
+ .kbd {
4
+ @apply pointer-events-none inline-flex items-center justify-center select-none;
5
+ }
6
+
7
+ .kbd-group {
8
+ @apply inline-flex items-center;
9
+ }
10
+ }
@@ -0,0 +1,12 @@
1
+ /* Label */
2
+ @layer components {
3
+ .field > label,
4
+ .label {
5
+ @apply flex items-center select-none peer-disabled:pointer-events-none;
6
+
7
+ &:has(>*:disabled),
8
+ &:has(+*:disabled) {
9
+ @apply pointer-events-none;
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,12 @@
1
+ /* Native Select */
2
+ @layer components {
3
+ .field > select,
4
+ select.select {
5
+ @apply min-w-0 appearance-none outline-none select-none disabled:cursor-not-allowed disabled:opacity-50;
6
+
7
+ option,
8
+ optgroup {
9
+ @apply bg-[Canvas] text-[CanvasText];
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,81 @@
1
+ /* Popover */
2
+ @layer components {
3
+ [data-popover] {
4
+ @apply absolute z-50 min-w-full w-max overflow-x-hidden overflow-y-auto visible opacity-100 scale-100 transition-all outline-hidden;
5
+
6
+ &[aria-hidden='true'] {
7
+ @apply invisible opacity-0 scale-95;
8
+
9
+ &:not([data-side]),
10
+ &[data-side='bottom'] {
11
+ @apply -translate-y-2;
12
+ }
13
+
14
+ &[data-side='top'] {
15
+ @apply translate-y-2;
16
+ }
17
+
18
+ &[data-side='left'] {
19
+ @apply translate-x-2;
20
+ }
21
+
22
+ &[data-side='right'] {
23
+ @apply -translate-x-2;
24
+ }
25
+ }
26
+
27
+ &:not([data-side]),
28
+ &[data-side='bottom'] {
29
+ @apply mt-1 top-full;
30
+ }
31
+
32
+ &[data-side='top'] {
33
+ @apply mb-1 bottom-full;
34
+ }
35
+
36
+ &[data-side='left'] {
37
+ @apply me-1 end-full;
38
+ }
39
+
40
+ &[data-side='right'] {
41
+ @apply ms-1 start-full;
42
+ }
43
+
44
+ &:not([data-side]),
45
+ &[data-side='bottom'],
46
+ &[data-side='top'] {
47
+ &:not([data-align]),
48
+ &[data-align='start'] {
49
+ @apply start-0;
50
+ }
51
+
52
+ &[data-align='end'] {
53
+ @apply end-0;
54
+ }
55
+
56
+ &[data-align='center'] {
57
+ @apply start-1/2 -translate-x-1/2;
58
+ }
59
+ }
60
+
61
+ &[data-side='left'],
62
+ &[data-side='right'] {
63
+ &:not([data-align]),
64
+ &[data-align='start'] {
65
+ @apply top-0;
66
+ }
67
+
68
+ &[data-align='end'] {
69
+ @apply bottom-0;
70
+ }
71
+
72
+ &[data-align='center'] {
73
+ @apply top-1/2 -translate-y-1/2;
74
+ }
75
+ }
76
+ }
77
+
78
+ .popover {
79
+ @apply relative inline-flex;
80
+ }
81
+ }
@@ -0,0 +1,11 @@
1
+ /* Radio */
2
+ @layer components {
3
+ .field > input[type='radio'],
4
+ .input[type='radio'] {
5
+ @apply relative shrink-0 appearance-none border outline-none disabled:cursor-not-allowed disabled:opacity-50;
6
+
7
+ &:checked:before {
8
+ @apply absolute top-1/2 left-1/2 content-[''] -translate-x-1/2 -translate-y-1/2 rounded-full;
9
+ }
10
+ }
11
+ }
@@ -0,0 +1,50 @@
1
+ /* Range */
2
+ @layer components {
3
+ .field > input[type='range'],
4
+ .input[type='range'] {
5
+ @apply flex appearance-none items-center p-0 outline-none disabled:pointer-events-none disabled:opacity-50;
6
+ --slider-value: 20%;
7
+
8
+ &::-webkit-slider-thumb {
9
+ @apply block shrink-0 appearance-none;
10
+ }
11
+
12
+ &::-webkit-slider-runnable-track {
13
+ @apply w-full appearance-none;
14
+ background: linear-gradient(to right, var(--primary) var(--slider-value), var(--muted) var(--slider-value));
15
+ }
16
+
17
+ &:dir(rtl)::-webkit-slider-runnable-track {
18
+ background: linear-gradient(to left, var(--primary) var(--slider-value), var(--muted) var(--slider-value));
19
+ }
20
+
21
+ &::-moz-range-thumb {
22
+ @apply block shrink-0 appearance-none;
23
+ }
24
+
25
+ &::-moz-range-track {
26
+ @apply w-full appearance-none;
27
+ background: linear-gradient(to right, var(--primary) var(--slider-value), var(--muted) var(--slider-value));
28
+ }
29
+
30
+ &:dir(rtl)::-moz-range-track {
31
+ background: linear-gradient(to left, var(--primary) var(--slider-value), var(--muted) var(--slider-value));
32
+ }
33
+
34
+ &::-ms-thumb {
35
+ @apply block shrink-0 appearance-none;
36
+ }
37
+
38
+ &::-ms-track {
39
+ @apply w-full appearance-none;
40
+ }
41
+
42
+ &::-ms-fill-lower {
43
+ @apply bg-primary;
44
+ }
45
+
46
+ &::-ms-fill-upper {
47
+ @apply bg-muted;
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,64 @@
1
+ /* Select */
2
+ @layer components {
3
+ *:not(select).select {
4
+ @apply relative inline-flex;
5
+ }
6
+
7
+ *:not(select).select > button {
8
+ @apply flex w-fit items-center justify-between whitespace-nowrap font-normal outline-hidden disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0;
9
+ }
10
+
11
+ *:not(select).select > button > span {
12
+ @apply flex flex-1 truncate text-start;
13
+ }
14
+
15
+ *:not(select).select > button > svg {
16
+ @apply shrink-0;
17
+ }
18
+
19
+ *:not(select).select [data-popover] {
20
+ @apply isolate overflow-x-hidden;
21
+ min-width: max(100%, 9rem);
22
+ }
23
+
24
+ *:not(select).select [role='listbox'] {
25
+ @apply outline-hidden;
26
+ }
27
+
28
+ *:not(select).select [role='listbox'] [role='group']:not(:has([role='option']:not([aria-hidden='true']))) {
29
+ @apply hidden;
30
+ }
31
+
32
+ *:not(select).select [role='listbox']:not(:has([data-value]:not([aria-hidden='true'])))::before {
33
+ @apply flex items-center justify-center truncate;
34
+ }
35
+
36
+ *:not(select).select [role='listbox'][data-empty]:not(:has([data-value]:not([aria-hidden='true'])))::before {
37
+ @apply content-[attr(data-empty)];
38
+ }
39
+
40
+ *:not(select).select [role='listbox']:not([data-empty]):not(:has([data-value]:not([aria-hidden='true'])))::before {
41
+ @apply content-['No_results_found'];
42
+ }
43
+
44
+ *:not(select).select [role='option'] {
45
+ @apply aria-hidden:hidden relative flex w-full cursor-default items-center truncate outline-hidden select-none aria-disabled:pointer-events-none aria-disabled:opacity-50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0;
46
+ }
47
+
48
+ *:not(select).select [role='option'][aria-selected='true'] {
49
+ @apply bg-[image:var(--check-icon)] bg-no-repeat bg-position-[center_right_0.5rem] bg-size-[0.875rem];
50
+ }
51
+
52
+ *:not(select).select [role='option'][aria-selected='true']:dir(rtl) {
53
+ @apply bg-position-[center_left_0.5rem];
54
+ }
55
+
56
+ *:not(select).select [role='separator'] {
57
+ @apply border-0;
58
+ }
59
+
60
+ *:not(select).select:not([data-select-initialized]) [role='option']:not([aria-disabled='true']):not(:disabled):hover,
61
+ *:not(select).select [role='option'].active {
62
+ @apply bg-accent text-accent-foreground;
63
+ }
64
+ }
@@ -0,0 +1,101 @@
1
+ /* Sidebar */
2
+ @layer components {
3
+ .sidebar {
4
+ &:not([data-sidebar-initialized]) {
5
+ @apply max-md:hidden;
6
+ }
7
+ &:not([aria-hidden]),
8
+ &[aria-hidden=false] {
9
+ @apply max-md:bg-black/50 max-md:fixed max-md:inset-0 max-md:z-40;
10
+ }
11
+ nav {
12
+ @apply fixed inset-y-0 z-50 flex w-(--sidebar-mobile-width) flex-col transition-transform duration-300 ease-in-out md:w-(--sidebar-width);
13
+ }
14
+ & + * {
15
+ @apply transition-[margin] ease-in-out duration-300;
16
+ }
17
+ &:not([data-side]),
18
+ &[data-side=left] {
19
+ nav {
20
+ @apply left-0 border-r;
21
+ }
22
+ & + * {
23
+ @apply relative md:ml-(--sidebar-width);
24
+ }
25
+ &[aria-hidden=true] {
26
+ nav {
27
+ @apply -translate-x-full;
28
+ }
29
+ & + * {
30
+ @apply md:ml-0;
31
+ }
32
+ }
33
+ }
34
+ &[data-side=right] {
35
+ nav {
36
+ @apply right-0 border-l;
37
+ }
38
+ & + * {
39
+ @apply relative md:mr-(--sidebar-width);
40
+ }
41
+ &[aria-hidden=true] {
42
+ nav {
43
+ @apply translate-x-full;
44
+ }
45
+ & + * {
46
+ @apply md:mr-0;
47
+ }
48
+ }
49
+ }
50
+ nav {
51
+ > header,
52
+ > footer {
53
+ @apply flex flex-col;
54
+ }
55
+ [role=separator] {
56
+ @apply w-auto;
57
+ }
58
+ > section {
59
+ @apply flex min-h-0 flex-1 flex-col overflow-y-auto;
60
+
61
+ > [role=group] {
62
+ @apply relative flex w-full min-w-0 flex-col;
63
+ }
64
+ h3 {
65
+ @apply flex shrink-0 items-center outline-hidden transition-[margin,opacity] duration-200 ease-linear [&>svg]:shrink-0;
66
+ }
67
+ ul {
68
+ @apply flex w-full min-w-0 flex-col;
69
+
70
+ li {
71
+ @apply relative;
72
+
73
+ > a,
74
+ > button,
75
+ > details > summary {
76
+ @apply flex w-full items-center overflow-hidden text-left outline-hidden transition-[width,height,padding] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0;
77
+ }
78
+ > details {
79
+ &:not([open]) {
80
+ > summary {
81
+ &::after {
82
+ @apply -rotate-90 rtl:rotate-90;
83
+ }
84
+ }
85
+ }
86
+ > summary {
87
+ &::after {
88
+ @apply ms-auto block size-3.5 bg-current content-[''] transition-transform ease-linear;
89
+ @apply mask-[image:var(--chevron-down-icon)] mask-size-[1rem] mask-no-repeat mask-center;
90
+ }
91
+ }
92
+ }
93
+ }
94
+ ul {
95
+ @apply flex min-w-0 flex-col;
96
+ }
97
+ }
98
+ }
99
+ }
100
+ }
101
+ }
@@ -0,0 +1,6 @@
1
+ /* Skeleton */
2
+ @layer components {
3
+ .skeleton {
4
+ @apply animate-pulse;
5
+ }
6
+ }
@@ -0,0 +1,8 @@
1
+ /* Switch */
2
+ @layer components {
3
+ .field > input[type='checkbox'][role='switch'],
4
+ .input[type='checkbox'][role='switch'] {
5
+ @apply inline-flex shrink-0 appearance-none items-center transition-all outline-none disabled:cursor-not-allowed disabled:opacity-50;
6
+ @apply before:pointer-events-none before:block before:content-[''] before:ring-0 before:transition-transform;
7
+ }
8
+ }
@@ -0,0 +1,34 @@
1
+ /* Tables */
2
+ @layer components {
3
+ .table-container {
4
+ @apply relative w-full overflow-x-auto;
5
+ }
6
+
7
+ .table {
8
+ @apply w-full caption-bottom;
9
+
10
+ thead {
11
+ @apply [&_tr]:border-b;
12
+ }
13
+
14
+ tbody {
15
+ @apply [&_tr:last-child]:border-0;
16
+ }
17
+
18
+ tfoot {
19
+ @apply border-t font-medium [&>tr]:last:border-b-0;
20
+ }
21
+
22
+ tr {
23
+ @apply border-b transition-colors data-[state=selected]:bg-muted;
24
+ }
25
+
26
+ th {
27
+ @apply align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pe-0 [&>[role=checkbox]]:translate-y-[2px];
28
+ }
29
+
30
+ td {
31
+ @apply align-middle whitespace-nowrap [&:has([role=checkbox])]:pe-0 [&>[role=checkbox]]:translate-y-[2px];
32
+ }
33
+ }
34
+ }
@@ -0,0 +1,31 @@
1
+ /* Tabs */
2
+ @layer components {
3
+ .tabs {
4
+ @apply flex;
5
+
6
+ &:has(> [role='tablist'][aria-orientation='horizontal']),
7
+ &:not(:has(> [role='tablist'][aria-orientation='vertical'])) {
8
+ @apply flex-col;
9
+ }
10
+
11
+ &:has(> [role='tablist'][aria-orientation='vertical']) {
12
+ @apply flex-row;
13
+ }
14
+
15
+ > [role='tablist'] {
16
+ @apply text-muted-foreground inline-flex w-fit items-center justify-center;
17
+
18
+ &[aria-orientation='vertical'] {
19
+ @apply h-fit flex-col;
20
+ }
21
+
22
+ > [role='tab'] {
23
+ @apply relative inline-flex flex-1 items-center justify-center whitespace-nowrap transition-all outline-none disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0;
24
+ }
25
+ }
26
+
27
+ > [role='tabpanel'] {
28
+ @apply flex-1 outline-none;
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,7 @@
1
+ /* Textarea */
2
+ @layer components {
3
+ .field > textarea,
4
+ .textarea {
5
+ @apply flex field-sizing-content min-h-16 w-full outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50;
6
+ }
7
+ }
@@ -0,0 +1,57 @@
1
+ /* Toasts */
2
+ @layer components {
3
+ .toaster {
4
+ @apply pointer-events-none fixed bottom-0 z-50 flex w-full flex-col-reverse gap-4 p-4 sm:max-w-90;
5
+
6
+ &:not([data-align]),
7
+ &[data-align='end'] {
8
+ @apply right-0;
9
+ }
10
+ &[data-align='start'] {
11
+ @apply left-0;
12
+ }
13
+ &[data-align='center'] {
14
+ @apply left-1/2 -translate-x-1/2;
15
+ }
16
+ .toast {
17
+ @apply pointer-events-auto grid w-full grid-rows-[1fr] animate-[toast-up_0.3s_ease-in-out] transition-[grid-template-rows,opacity] duration-300 ease-in-out;
18
+
19
+ .toast-content {
20
+ @apply flex items-center gap-2.5 overflow-hidden p-3 text-[13px];
21
+
22
+ svg {
23
+ @apply size-4 shrink-0;
24
+ }
25
+ section {
26
+ h2 {
27
+ @apply font-medium tracking-tight;
28
+ }
29
+ p {
30
+ @apply text-muted-foreground break-all;
31
+ }
32
+ }
33
+ footer {
34
+ @apply ms-auto flex flex-col gap-2;
35
+
36
+ [data-toast-action],
37
+ [data-toast-cancel] {
38
+ @apply h-6 px-2.5 text-xs;
39
+ }
40
+ }
41
+ }
42
+ &[aria-hidden='true'] {
43
+ @apply grid-rows-[0fr] overflow-hidden border-0 p-0 opacity-0;
44
+
45
+ .toast-content {
46
+ @apply border-0;
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
52
+ @keyframes toast-up {
53
+ from {
54
+ opacity: 0;
55
+ transform: translateY(100%);
56
+ }
57
+ }
@@ -0,0 +1,82 @@
1
+ /* Tooltip */
2
+ @layer components {
3
+ [data-tooltip] {
4
+ @apply relative;
5
+
6
+ &:before {
7
+ @apply absolute z-[60] w-fit max-w-xs origin-(--transform-origin) scale-95 truncate invisible opacity-0 transition-all pointer-events-none content-[attr(data-tooltip)];
8
+ }
9
+
10
+ &:hover:before {
11
+ @apply visible opacity-100 scale-100;
12
+ }
13
+
14
+ &:focus-visible:not(:hover):before {
15
+ @apply hidden;
16
+ }
17
+
18
+ &:not([data-side]),
19
+ &[data-side='top'] {
20
+ @apply before:bottom-full before:mb-1.5 before:translate-y-2 hover:before:translate-y-0;
21
+ }
22
+
23
+ &[data-side='bottom'] {
24
+ @apply before:top-full before:mt-1.5 before:-translate-y-2 hover:before:translate-y-0;
25
+ }
26
+
27
+ &:not([data-side]),
28
+ &[data-side='top'],
29
+ &[data-side='bottom'] {
30
+ &[data-align='start'] {
31
+ @apply before:left-0;
32
+ }
33
+ &[data-align='end'] {
34
+ @apply before:right-0;
35
+ }
36
+ &:not([data-align]),
37
+ &[data-align='center'] {
38
+ @apply before:left-1/2 before:-translate-x-1/2;
39
+ }
40
+ }
41
+
42
+ &[data-side='left'] {
43
+ @apply before:right-full before:mr-1.5 before:translate-x-2 hover:before:translate-x-0;
44
+ }
45
+
46
+ &[data-side='right'] {
47
+ @apply before:left-full before:ml-1.5 before:-translate-x-2 hover:before:translate-x-0;
48
+ }
49
+
50
+ &[data-side='inline-start'] {
51
+ @apply before:right-full before:mr-1.5 before:translate-x-2 hover:before:translate-x-0;
52
+ }
53
+
54
+ &[data-side='inline-start']:dir(rtl) {
55
+ @apply before:right-auto before:left-full before:mr-0 before:ml-1.5 before:-translate-x-2 hover:before:translate-x-0;
56
+ }
57
+
58
+ &[data-side='inline-end'] {
59
+ @apply before:left-full before:ml-1.5 before:-translate-x-2 hover:before:translate-x-0;
60
+ }
61
+
62
+ &[data-side='inline-end']:dir(rtl) {
63
+ @apply before:left-auto before:right-full before:ml-0 before:mr-1.5 before:translate-x-2 hover:before:translate-x-0;
64
+ }
65
+
66
+ &[data-side='left'],
67
+ &[data-side='right'],
68
+ &[data-side='inline-start'],
69
+ &[data-side='inline-end'] {
70
+ &[data-align='start'] {
71
+ @apply before:top-0;
72
+ }
73
+ &[data-align='end'] {
74
+ @apply before:bottom-0;
75
+ }
76
+ &:not([data-align]),
77
+ &[data-align='center'] {
78
+ @apply before:top-1/2 before:-translate-y-1/2;
79
+ }
80
+ }
81
+ }
82
+ }