@ropav/styles 0.3.0 → 0.5.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 (163) hide show
  1. package/README.md +160 -19
  2. package/dist/components/accordion.css +12 -5
  3. package/dist/components/alert-dialog.css +1 -1
  4. package/dist/components/alert.css +9 -1
  5. package/dist/components/autocomplete/autocomplete.styles.d.ts +33 -0
  6. package/dist/components/autocomplete/autocomplete.styles.d.ts.map +1 -1
  7. package/dist/components/autocomplete/autocomplete.styles.js +12 -0
  8. package/dist/components/autocomplete.css +39 -3
  9. package/dist/components/avatar.css +9 -0
  10. package/dist/components/badge.css +7 -0
  11. package/dist/components/button-group.css +6 -6
  12. package/dist/components/button.css +34 -11
  13. package/dist/components/calendar-year-picker.css +2 -1
  14. package/dist/components/calendar.css +8 -0
  15. package/dist/components/card.css +22 -1
  16. package/dist/components/chip.css +21 -0
  17. package/dist/components/close-button.css +8 -0
  18. package/dist/components/color-input-group/color-input-group.styles.d.ts +27 -0
  19. package/dist/components/color-input-group/color-input-group.styles.d.ts.map +1 -1
  20. package/dist/components/color-input-group/color-input-group.styles.js +6 -0
  21. package/dist/components/color-input-group.css +30 -1
  22. package/dist/components/color-swatch-picker.css +11 -0
  23. package/dist/components/combo-box/combo-box.styles.d.ts +27 -0
  24. package/dist/components/combo-box/combo-box.styles.d.ts.map +1 -1
  25. package/dist/components/combo-box/combo-box.styles.js +17 -7
  26. package/dist/components/combo-box.css +21 -1
  27. package/dist/components/date-input-group/date-input-group.styles.d.ts +27 -0
  28. package/dist/components/date-input-group/date-input-group.styles.d.ts.map +1 -1
  29. package/dist/components/date-input-group/date-input-group.styles.js +6 -0
  30. package/dist/components/date-input-group.css +30 -1
  31. package/dist/components/dropdown/dropdown.styles.d.ts.map +1 -1
  32. package/dist/components/dropdown/dropdown.styles.js +1 -1
  33. package/dist/components/dropdown.css +17 -12
  34. package/dist/components/index.css +4 -0
  35. package/dist/components/index.d.ts +4 -0
  36. package/dist/components/index.d.ts.map +1 -1
  37. package/dist/components/input/input.styles.d.ts +15 -0
  38. package/dist/components/input/input.styles.d.ts.map +1 -1
  39. package/dist/components/input/input.styles.js +6 -0
  40. package/dist/components/input-group/input-group.styles.d.ts +27 -0
  41. package/dist/components/input-group/input-group.styles.d.ts.map +1 -1
  42. package/dist/components/input-group/input-group.styles.js +6 -0
  43. package/dist/components/input-group.css +32 -1
  44. package/dist/components/input.css +23 -1
  45. package/dist/components/list-box/list-box.styles.d.ts +15 -0
  46. package/dist/components/list-box/list-box.styles.d.ts.map +1 -1
  47. package/dist/components/list-box/list-box.styles.js +15 -5
  48. package/dist/components/list-box-item.css +4 -2
  49. package/dist/components/list-box.css +19 -0
  50. package/dist/components/menu/menu.styles.d.ts +19 -1
  51. package/dist/components/menu/menu.styles.d.ts.map +1 -1
  52. package/dist/components/menu/menu.styles.js +9 -1
  53. package/dist/components/menu.css +25 -0
  54. package/dist/components/meter.css +12 -0
  55. package/dist/components/modal.css +1 -1
  56. package/dist/components/number-field/number-field.styles.d.ts +27 -0
  57. package/dist/components/number-field/number-field.styles.d.ts.map +1 -1
  58. package/dist/components/number-field/number-field.styles.js +6 -0
  59. package/dist/components/number-field.css +68 -1
  60. package/dist/components/pagination.css +10 -6
  61. package/dist/components/popover.css +15 -1
  62. package/dist/components/progress-bar.css +12 -0
  63. package/dist/components/progress-circle.css +12 -0
  64. package/dist/components/radio.css +7 -0
  65. package/dist/components/range-calendar.css +28 -0
  66. package/dist/components/search-field/search-field.styles.d.ts +27 -0
  67. package/dist/components/search-field/search-field.styles.d.ts.map +1 -1
  68. package/dist/components/search-field/search-field.styles.js +6 -0
  69. package/dist/components/search-field.css +33 -1
  70. package/dist/components/segmented-control/index.d.ts +2 -0
  71. package/dist/components/segmented-control/index.d.ts.map +1 -0
  72. package/dist/components/segmented-control/index.js +2 -0
  73. package/dist/components/segmented-control/segmented-control.styles.d.ts +73 -0
  74. package/dist/components/segmented-control/segmented-control.styles.d.ts.map +1 -0
  75. package/dist/components/segmented-control/segmented-control.styles.js +27 -0
  76. package/dist/components/segmented-control.css +193 -0
  77. package/dist/components/select/select.styles.d.ts +33 -0
  78. package/dist/components/select/select.styles.d.ts.map +1 -1
  79. package/dist/components/select/select.styles.js +12 -0
  80. package/dist/components/select.css +40 -3
  81. package/dist/components/separator.css +18 -1
  82. package/dist/components/sidebar/index.d.ts +2 -0
  83. package/dist/components/sidebar/index.d.ts.map +1 -0
  84. package/dist/components/sidebar/index.js +2 -0
  85. package/dist/components/sidebar/sidebar.styles.d.ts +190 -0
  86. package/dist/components/sidebar/sidebar.styles.d.ts.map +1 -0
  87. package/dist/components/sidebar/sidebar.styles.js +52 -0
  88. package/dist/components/sidebar.css +510 -0
  89. package/dist/components/skeleton.css +9 -0
  90. package/dist/components/slider.css +61 -0
  91. package/dist/components/splitter/index.d.ts +2 -0
  92. package/dist/components/splitter/index.d.ts.map +1 -0
  93. package/dist/components/splitter/index.js +2 -0
  94. package/dist/components/splitter/splitter.styles.d.ts +61 -0
  95. package/dist/components/splitter/splitter.styles.d.ts.map +1 -0
  96. package/dist/components/splitter/splitter.styles.js +26 -0
  97. package/dist/components/splitter.css +241 -0
  98. package/dist/components/surface.css +24 -0
  99. package/dist/components/switch.css +30 -0
  100. package/dist/components/table.css +11 -3
  101. package/dist/components/tabs.css +30 -2
  102. package/dist/components/tag.css +10 -0
  103. package/dist/components/textarea/textarea.styles.d.ts +15 -0
  104. package/dist/components/textarea/textarea.styles.d.ts.map +1 -1
  105. package/dist/components/textarea/textarea.styles.js +6 -0
  106. package/dist/components/textarea.css +23 -1
  107. package/dist/components/toast.css +1 -1
  108. package/dist/components/toggle-button-group.css +7 -7
  109. package/dist/components/toggle-button.css +17 -11
  110. package/dist/components/toolbar.css +8 -1
  111. package/dist/components/tooltip.css +15 -2
  112. package/dist/components/typography.css +21 -0
  113. package/dist/components/virtualizer/index.d.ts +2 -0
  114. package/dist/components/virtualizer/index.d.ts.map +1 -0
  115. package/dist/components/virtualizer/index.js +2 -0
  116. package/dist/components/virtualizer/virtualizer.styles.d.ts +44 -0
  117. package/dist/components/virtualizer/virtualizer.styles.d.ts.map +1 -0
  118. package/dist/components/virtualizer/virtualizer.styles.js +15 -0
  119. package/dist/components/virtualizer.css +64 -0
  120. package/dist/index.css +7 -2
  121. package/dist/index.js +5 -1
  122. package/dist/ropav.min.css +2 -2
  123. package/dist/themes/airbnb.css +231 -0
  124. package/dist/themes/all.css +17 -0
  125. package/dist/themes/coinbase.css +231 -0
  126. package/dist/themes/{default/variables.css → default.css} +28 -9
  127. package/dist/themes/discord.css +231 -0
  128. package/dist/themes/hero.css +262 -0
  129. package/dist/themes/lavender.css +231 -0
  130. package/dist/themes/mint.css +231 -0
  131. package/dist/themes/netflix.css +231 -0
  132. package/dist/themes/rabbit.css +231 -0
  133. package/dist/themes/shared/theme.css +19 -2
  134. package/dist/themes/sky.css +231 -0
  135. package/dist/themes/spotify.css +231 -0
  136. package/dist/themes/uber.css +231 -0
  137. package/dist/utilities/index.css +97 -0
  138. package/dist/variants/index.css +5 -15
  139. package/package.json +2 -3
  140. package/src/components/autocomplete/autocomplete.styles.ts +12 -0
  141. package/src/components/color-input-group/color-input-group.styles.ts +10 -0
  142. package/src/components/combo-box/combo-box.styles.ts +12 -0
  143. package/src/components/date-input-group/date-input-group.styles.ts +10 -0
  144. package/src/components/dropdown/dropdown.styles.ts +3 -1
  145. package/src/components/index.ts +4 -0
  146. package/src/components/input/input.styles.ts +6 -0
  147. package/src/components/input-group/input-group.styles.ts +10 -0
  148. package/src/components/list-box/list-box.styles.ts +6 -0
  149. package/src/components/menu/menu.styles.ts +10 -0
  150. package/src/components/number-field/number-field.styles.ts +10 -0
  151. package/src/components/search-field/search-field.styles.ts +10 -0
  152. package/src/components/segmented-control/index.ts +1 -0
  153. package/src/components/segmented-control/segmented-control.styles.ts +37 -0
  154. package/src/components/select/select.styles.ts +12 -0
  155. package/src/components/sidebar/index.ts +1 -0
  156. package/src/components/sidebar/sidebar.styles.ts +94 -0
  157. package/src/components/splitter/index.ts +1 -0
  158. package/src/components/splitter/splitter.styles.ts +44 -0
  159. package/src/components/textarea/textarea.styles.ts +6 -0
  160. package/src/components/virtualizer/index.ts +1 -0
  161. package/src/components/virtualizer/virtualizer.styles.ts +15 -0
  162. package/dist/themes/default/components/index.css +0 -6
  163. package/dist/themes/default/index.css +0 -8
@@ -38,32 +38,32 @@
38
38
 
39
39
  /* Apply border radius to first button (start edge) */
40
40
  .toggle-button-group--horizontal .toggle-button:first-child {
41
- @apply rounded-s-3xl;
41
+ @apply rounded-s-component;
42
42
  }
43
43
 
44
44
  /* Apply border radius to last button (end edge) */
45
45
  .toggle-button-group--horizontal .toggle-button:last-child {
46
- @apply rounded-e-3xl;
46
+ @apply rounded-e-component;
47
47
  }
48
48
 
49
49
  /* If only one button, apply both rounded edges */
50
50
  .toggle-button-group--horizontal .toggle-button:first-child:last-child {
51
- @apply rounded-3xl;
51
+ @apply rounded-component;
52
52
  }
53
53
 
54
54
  /* Apply border radius to first button (top edge) in vertical */
55
55
  .toggle-button-group--vertical .toggle-button:first-child {
56
- @apply rounded-t-3xl;
56
+ @apply rounded-t-component;
57
57
  }
58
58
 
59
59
  /* Apply border radius to last button (bottom edge) in vertical */
60
60
  .toggle-button-group--vertical .toggle-button:last-child {
61
- @apply rounded-b-3xl;
61
+ @apply rounded-b-component;
62
62
  }
63
63
 
64
64
  /* If only one button in vertical, apply all rounded edges */
65
65
  .toggle-button-group--vertical .toggle-button:first-child:last-child {
66
- @apply rounded-3xl;
66
+ @apply rounded-component;
67
67
  }
68
68
 
69
69
  /* Remove scale transform on active/pressed state for buttons in group */
@@ -127,7 +127,7 @@
127
127
 
128
128
  /* Restore border radius in detached mode */
129
129
  .toggle-button-group--detached .toggle-button {
130
- @apply rounded-3xl;
130
+ @apply rounded-component;
131
131
  }
132
132
 
133
133
  /* Hide separators in detached mode */
@@ -4,7 +4,7 @@
4
4
 
5
5
  /* Base styles */
6
6
  .toggle-button {
7
- @apply relative isolate inline-flex h-10 w-fit origin-center items-center justify-center gap-2 rounded-3xl px-4 text-sm font-medium whitespace-nowrap outline-none select-none no-highlight md:h-9;
7
+ @apply relative isolate inline-flex h-9 w-fit origin-center items-center justify-center gap-2 rounded-component px-4 text-sm font-medium whitespace-nowrap outline-none select-none no-highlight;
8
8
 
9
9
  /**
10
10
  * Transitions
@@ -16,6 +16,15 @@
16
16
  box-shadow 100ms var(--ease-out);
17
17
  @apply transform-gpu motion-reduce:transition-none;
18
18
 
19
+ /* Forced Colors Mode flattens the fill onto the page and strips the shadow, leaving a control
20
+ * that reads as bare text. `ButtonBorder` is the keyword the platform uses for a control's
21
+ * edge; an outline rather than a border so nothing shifts, and the focus ring replaces it
22
+ * while focused, which is the right order of importance. */
23
+ @media (forced-colors: active) {
24
+ outline: 1px solid ButtonBorder;
25
+ outline-offset: -1px;
26
+ }
27
+
19
28
  /* Cursor */
20
29
  cursor: var(--cursor-interactive);
21
30
 
@@ -65,6 +74,7 @@
65
74
  &[data-selected="true"] {
66
75
  background-color: var(--toggle-button-bg-selected);
67
76
  color: var(--toggle-button-fg-selected);
77
+ @apply forced-selected;
68
78
 
69
79
  @media (hover: hover) {
70
80
  &:hover,
@@ -81,7 +91,7 @@
81
91
 
82
92
  /* SVG icon styling */
83
93
  & svg {
84
- @apply pointer-events-none -mx-0.5 my-0.5 size-5 shrink-0 self-center sm:my-1 sm:size-4;
94
+ @apply pointer-events-none -mx-0.5 my-1 size-4 shrink-0 self-center;
85
95
  }
86
96
  }
87
97
 
@@ -90,11 +100,7 @@
90
100
  ========================================================================== */
91
101
 
92
102
  .toggle-button--sm {
93
- @apply h-9 px-3 md:h-8;
94
-
95
- & svg {
96
- @apply size-4;
97
- }
103
+ @apply h-8 px-3;
98
104
 
99
105
  &:active,
100
106
  &[data-pressed="true"] {
@@ -107,7 +113,7 @@
107
113
  }
108
114
 
109
115
  .toggle-button--lg {
110
- @apply h-11 text-base md:h-10;
116
+ @apply h-10 text-base;
111
117
 
112
118
  &:active,
113
119
  &[data-pressed="true"] {
@@ -137,13 +143,13 @@
137
143
  ========================================================================== */
138
144
 
139
145
  .toggle-button--icon-only {
140
- @apply w-10 p-0 md:w-9;
146
+ @apply w-9 p-0;
141
147
  }
142
148
 
143
149
  .toggle-button--icon-only.toggle-button--sm {
144
- @apply w-9 md:w-8;
150
+ @apply w-8;
145
151
  }
146
152
 
147
153
  .toggle-button--icon-only.toggle-button--lg {
148
- @apply w-11 md:w-10;
154
+ @apply w-10;
149
155
  }
@@ -28,5 +28,12 @@
28
28
 
29
29
  /* Attached variant */
30
30
  .toolbar--attached {
31
- @apply rounded-3xl bg-surface p-1 shadow-overlay;
31
+ @apply rounded-component bg-surface p-1 shadow-overlay;
32
+
33
+ /* Forced Colors Mode flattens the fill onto the page and strips the shadow, so the container
34
+ * stops having any shape and its contents sit loose on the page. */
35
+ @media (forced-colors: active) {
36
+ outline: 1px solid CanvasText;
37
+ outline-offset: -1px;
38
+ }
32
39
  }
@@ -3,7 +3,7 @@
3
3
  /* Base tooltip styles */
4
4
  .tooltip {
5
5
  @apply max-w-xs origin-(--trigger-anchor-point) bg-overlay p-2 text-xs break-all;
6
- border-radius: min(32px, var(--radius-xl));
6
+ border-radius: min(32px, var(--component-radius));
7
7
  box-shadow: var(--shadow-overlay);
8
8
 
9
9
  /* Entering animations */
@@ -40,10 +40,23 @@
40
40
 
41
41
  /* Arrow styling */
42
42
  & [data-slot="overlay-arrow"] {
43
- @apply stroke-border/40;
44
43
  fill: var(--overlay);
45
44
  }
46
45
 
46
+ /**
47
+ * With an arrow, the edge treatment moves off the body and onto the pair.
48
+ *
49
+ * The arrow is a second shape filled with the body's own colour, overlapping it so no seam can
50
+ * open between them — which leaves nothing for a per-shape edge to be right about: a shadow or
51
+ * hairline painted on the body alone stops at the join, and one painted on the arrow crosses
52
+ * it. `--overlay-edge` is a filter, and a filter sees the two shapes as one image, so whatever
53
+ * edge it draws follows their combined silhouette.
54
+ */
55
+ &:has([data-slot="tooltip-arrow"]) {
56
+ box-shadow: none;
57
+ filter: var(--overlay-edge, none);
58
+ }
59
+
47
60
  /* Arrow rotation based on placement */
48
61
  &[data-placement="bottom"] [data-slot="overlay-arrow"] {
49
62
  rotate: 180deg;
@@ -36,6 +36,13 @@
36
36
 
37
37
  .typography-prose code {
38
38
  @apply rounded-md bg-default px-1.5 py-0.5 font-mono text-sm text-foreground;
39
+
40
+ /* Code is marked out by a tinted background and nothing else, so forced colors leaves it
41
+ * indistinguishable from the prose around it - the monospace face is all that is left. */
42
+ @media (forced-colors: active) {
43
+ outline: 1px solid CanvasText;
44
+ outline-offset: -1px;
45
+ }
39
46
  }
40
47
 
41
48
  .typography-prose a {
@@ -64,6 +71,13 @@
64
71
 
65
72
  .typography-prose pre {
66
73
  @apply my-4 overflow-x-auto rounded-xl bg-default p-4 font-mono text-sm leading-relaxed;
74
+
75
+ /* Code is marked out by a tinted background and nothing else, so forced colors leaves it
76
+ * indistinguishable from the prose around it - the monospace face is all that is left. */
77
+ @media (forced-colors: active) {
78
+ outline: 1px solid CanvasText;
79
+ outline-offset: -1px;
80
+ }
67
81
  }
68
82
 
69
83
  .typography-prose strong {
@@ -116,6 +130,13 @@
116
130
 
117
131
  .typography--code {
118
132
  @apply rounded-md bg-default px-1.5 py-0.5 font-mono text-sm text-foreground;
133
+
134
+ /* Code is marked out by a tinted background and nothing else, so forced colors leaves it
135
+ * indistinguishable from the prose around it - the monospace face is all that is left. */
136
+ @media (forced-colors: active) {
137
+ outline: 1px solid CanvasText;
138
+ outline-offset: -1px;
139
+ }
119
140
  }
120
141
 
121
142
  .typography--align-start {
@@ -0,0 +1,2 @@
1
+ export * from "./virtualizer.styles";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/virtualizer/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { virtualizerVariants } from "./virtualizer.styles.js";
2
+ export { virtualizerVariants };
@@ -0,0 +1,44 @@
1
+ /**
2
+ * The parts a windowed collection draws for itself, whichever collection it is.
3
+ *
4
+ * Only the scrollbar so far: a table and a listbox hide the native one and draw this in its place,
5
+ * so a dragged thumb moves the rows and the scroll offset together.
6
+ */
7
+ export declare const virtualizerVariants: import("tailwind-variants").TVReturnType<{
8
+ [key: string]: {
9
+ [key: string]: {
10
+ scrollbar?: import("tailwind-variants").ClassValue;
11
+ scrollbarThumb?: import("tailwind-variants").ClassValue;
12
+ scrollbarTrack?: import("tailwind-variants").ClassValue;
13
+ } | import("tailwind-variants").ClassValue;
14
+ };
15
+ } | {
16
+ [x: string]: {
17
+ [x: string]: {
18
+ scrollbar?: import("tailwind-variants").ClassValue;
19
+ scrollbarThumb?: import("tailwind-variants").ClassValue;
20
+ scrollbarTrack?: import("tailwind-variants").ClassValue;
21
+ } | import("tailwind-variants").ClassValue;
22
+ };
23
+ } | {}, {
24
+ scrollbar: string;
25
+ scrollbarThumb: string;
26
+ scrollbarTrack: string;
27
+ }, undefined, {
28
+ [key: string]: {
29
+ [key: string]: {
30
+ scrollbar?: import("tailwind-variants").ClassValue;
31
+ scrollbarThumb?: import("tailwind-variants").ClassValue;
32
+ scrollbarTrack?: import("tailwind-variants").ClassValue;
33
+ } | import("tailwind-variants").ClassValue;
34
+ };
35
+ } | {}, {
36
+ scrollbar: string;
37
+ scrollbarThumb: string;
38
+ scrollbarTrack: string;
39
+ }, import("tailwind-variants").TVReturnTypeLike<unknown, {
40
+ scrollbar: string;
41
+ scrollbarThumb: string;
42
+ scrollbarTrack: string;
43
+ }>>;
44
+ //# sourceMappingURL=virtualizer.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"virtualizer.styles.d.ts","sourceRoot":"","sources":["../../../src/components/virtualizer/virtualizer.styles.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAM9B,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { tv } from "tailwind-variants";
2
+ //#region src/components/virtualizer/virtualizer.styles.ts
3
+ /**
4
+ * The parts a windowed collection draws for itself, whichever collection it is.
5
+ *
6
+ * Only the scrollbar so far: a table and a listbox hide the native one and draw this in its place,
7
+ * so a dragged thumb moves the rows and the scroll offset together.
8
+ */
9
+ const virtualizerVariants = tv({ slots: {
10
+ scrollbar: "virtualizer__scrollbar",
11
+ scrollbarThumb: "virtualizer__scrollbar-thumb",
12
+ scrollbarTrack: "virtualizer__scrollbar-track"
13
+ } });
14
+ //#endregion
15
+ export { virtualizerVariants };
@@ -0,0 +1,64 @@
1
+ /* ==========================================================================
2
+ Virtualizer — the parts a windowed collection draws for itself.
3
+ ========================================================================== */
4
+
5
+ /* --------------------------------------------------------------------------
6
+ Scrollbar — drawn by a windowed collection in place of the native one it
7
+ hides, so a dragged thumb moves the rows and the scroll offset together.
8
+ The component sizes and places each track; this only paints them and holds
9
+ the box they hang from.
10
+ -------------------------------------------------------------------------- */
11
+
12
+ /* A box of no height stuck to the top and inline start of the viewport, so a track placed at its
13
+ * edges sits at the viewport's edges however far the content has been scrolled along either axis.
14
+ * The component gives it the viewport's width. */
15
+ .virtualizer__scrollbar {
16
+ @apply sticky start-0 top-0 z-2 h-0;
17
+ }
18
+
19
+ .virtualizer__scrollbar-track {
20
+ @apply absolute touch-none select-none;
21
+ background-color: var(--scrollbar-track);
22
+
23
+ /* The content wrapper drops pointers mid-scroll so a fast scroll does not hover every row it
24
+ * passes. The track is what is being dragged, so it keeps taking them. */
25
+ pointer-events: auto;
26
+
27
+ &[data-orientation="vertical"] {
28
+ @apply end-0 top-0;
29
+ }
30
+
31
+ &[data-orientation="horizontal"] {
32
+ @apply start-0;
33
+ }
34
+ }
35
+
36
+ .virtualizer__scrollbar-thumb {
37
+ @apply absolute rounded-full;
38
+ background-color: var(--scrollbar-thumb);
39
+
40
+ &[data-orientation="vertical"] {
41
+ inset-inline: 2px;
42
+ }
43
+
44
+ &[data-orientation="horizontal"] {
45
+ inset-block: 2px;
46
+ }
47
+
48
+ @media (hover: hover) {
49
+ &:hover,
50
+ &[data-hovered="true"] {
51
+ background-color: color-mix(in oklch, var(--foreground) 25%, transparent);
52
+ }
53
+ }
54
+
55
+ &[data-pressed="true"] {
56
+ background-color: color-mix(in oklch, var(--foreground) 35%, transparent);
57
+ }
58
+
59
+ /* Forced Colors Mode replaces the translucent fill with the canvas, and the thumb vanishes. */
60
+ @media (forced-colors: active) {
61
+ forced-color-adjust: none;
62
+ background-color: ButtonText;
63
+ }
64
+ }
package/dist/index.css CHANGED
@@ -13,8 +13,13 @@
13
13
  /* Base component structures (unstyled) */
14
14
  @import "./components/index.css" layer(components);
15
15
 
16
- /* Default theme (variables + component customizations) */
17
- @import "./themes/default/index.css" layer(theme);
16
+ /* Maps the theme tokens onto Tailwind's namespaces - @see https://tailwindcss.com/docs/theme.
17
+ * Must stay unlayered: Tailwind only picks up `@theme` outside a cascade layer. */
18
+ @import "./themes/shared/theme.css";
19
+
20
+ /* Default theme. Declares its own `@layer theme`; the bundled alternatives in
21
+ * `themes/*.css` are opt-in and layer themselves the same way. */
22
+ @import "./themes/default.css";
18
23
 
19
24
  /* Utilities */
20
25
  @import "./utilities/index.css";
package/dist/index.js CHANGED
@@ -61,11 +61,14 @@ import { radioVariants } from "./components/radio/radio.styles.js";
61
61
  import { radioGroupVariants } from "./components/radio-group/radio-group.styles.js";
62
62
  import { scrollShadowVariants } from "./components/scroll-shadow/scroll-shadow.styles.js";
63
63
  import { searchFieldVariants } from "./components/search-field/search-field.styles.js";
64
+ import { segmentedControlVariants } from "./components/segmented-control/segmented-control.styles.js";
64
65
  import { selectVariants } from "./components/select/select.styles.js";
65
66
  import { separatorVariants } from "./components/separator/separator.styles.js";
67
+ import { sidebarVariants } from "./components/sidebar/sidebar.styles.js";
66
68
  import { skeletonVariants } from "./components/skeleton/skeleton.styles.js";
67
69
  import { sliderVariants } from "./components/slider/slider.styles.js";
68
70
  import { spinnerVariants } from "./components/spinner/spinner.styles.js";
71
+ import { splitterVariants } from "./components/splitter/splitter.styles.js";
69
72
  import { surfaceVariants } from "./components/surface/surface.styles.js";
70
73
  import { switchVariants } from "./components/switch/switch.styles.js";
71
74
  import { switchGroupVariants } from "./components/switch-group/switch-group.styles.js";
@@ -82,5 +85,6 @@ import { toggleButtonVariants } from "./components/toggle-button/toggle-button.s
82
85
  import { toggleButtonGroupVariants } from "./components/toggle-button-group/toggle-button-group.styles.js";
83
86
  import { toolbarVariants } from "./components/toolbar/toolbar.styles.js";
84
87
  import { tooltipVariants } from "./components/tooltip/tooltip.styles.js";
88
+ import { virtualizerVariants } from "./components/virtualizer/virtualizer.styles.js";
85
89
  import { cn, tv } from "tailwind-variants";
86
- export { accordionVariants, alertDialogVariants, alertVariants, ariaDisabledClasses, autocompleteVariants, avatarVariants, badgeVariants, breadcrumbsVariants, buttonGroupVariants, buttonVariants, calendarVariants, calendarYearPickerVariants, cardVariants, checkboxGroupVariants, checkboxVariants, chipVariants, closeButtonVariants, cn, colorAreaVariants, colorFieldVariants, colorInputGroupVariants, colorPickerVariants, colorSliderVariants, colorSwatchPickerVariants, colorSwatchVariants, comboBoxVariants, dateFieldVariants, dateInputGroupVariants, datePickerVariants, dateRangePickerVariants, descriptionVariants, disabledClasses, disclosureGroupVariants, disclosureVariants, drawerVariants, dropdownVariants, emptyStateVariants, errorMessageVariants, fieldErrorVariants, fieldsetVariants, focusRingClasses, headerVariants, inputGroupVariants, inputOTPVariants, inputVariants, kbdVariants, labelVariants, linkVariants, listboxItemVariants, listboxSectionVariants, listboxVariants, menuItemVariants, menuSectionVariants, menuVariants, meterVariants, modalVariants, numberFieldVariants, paginationVariants, popoverVariants, progressBarVariants, progressCircleVariants, radioGroupVariants, radioVariants, rangeCalendarVariants, scrollShadowVariants, searchFieldVariants, selectVariants, separatorVariants, skeletonVariants, sliderVariants, spinnerVariants, surfaceVariants, switchGroupVariants, switchVariants, tableVariants, tabsVariants, tagGroupVariants, tagVariants, textAreaVariants, textFieldVariants, timeFieldVariants, toastVariants, toggleButtonGroupVariants, toggleButtonVariants, toolbarVariants, tooltipVariants, tv, typographyVariants };
90
+ export { accordionVariants, alertDialogVariants, alertVariants, ariaDisabledClasses, autocompleteVariants, avatarVariants, badgeVariants, breadcrumbsVariants, buttonGroupVariants, buttonVariants, calendarVariants, calendarYearPickerVariants, cardVariants, checkboxGroupVariants, checkboxVariants, chipVariants, closeButtonVariants, cn, colorAreaVariants, colorFieldVariants, colorInputGroupVariants, colorPickerVariants, colorSliderVariants, colorSwatchPickerVariants, colorSwatchVariants, comboBoxVariants, dateFieldVariants, dateInputGroupVariants, datePickerVariants, dateRangePickerVariants, descriptionVariants, disabledClasses, disclosureGroupVariants, disclosureVariants, drawerVariants, dropdownVariants, emptyStateVariants, errorMessageVariants, fieldErrorVariants, fieldsetVariants, focusRingClasses, headerVariants, inputGroupVariants, inputOTPVariants, inputVariants, kbdVariants, labelVariants, linkVariants, listboxItemVariants, listboxSectionVariants, listboxVariants, menuItemVariants, menuSectionVariants, menuVariants, meterVariants, modalVariants, numberFieldVariants, paginationVariants, popoverVariants, progressBarVariants, progressCircleVariants, radioGroupVariants, radioVariants, rangeCalendarVariants, scrollShadowVariants, searchFieldVariants, segmentedControlVariants, selectVariants, separatorVariants, sidebarVariants, skeletonVariants, sliderVariants, spinnerVariants, splitterVariants, surfaceVariants, switchGroupVariants, switchVariants, tableVariants, tabsVariants, tagGroupVariants, tagVariants, textAreaVariants, textFieldVariants, timeFieldVariants, toastVariants, toggleButtonGroupVariants, toggleButtonVariants, toolbarVariants, tooltipVariants, tv, typographyVariants, virtualizerVariants };