@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
@@ -4,6 +4,7 @@ const inputVariants = tv({
4
4
  base: "input",
5
5
  defaultVariants: {
6
6
  fullWidth: false,
7
+ size: "md",
7
8
  variant: "primary"
8
9
  },
9
10
  variants: {
@@ -11,6 +12,11 @@ const inputVariants = tv({
11
12
  false: "",
12
13
  true: "input--full-width"
13
14
  },
15
+ size: {
16
+ lg: "input--lg",
17
+ md: "",
18
+ sm: "input--sm"
19
+ },
14
20
  variant: {
15
21
  primary: "input--primary",
16
22
  secondary: "input--secondary"
@@ -6,6 +6,15 @@ export declare const inputGroupVariants: import("tailwind-variants").TVReturnTyp
6
6
  base: string;
7
7
  };
8
8
  };
9
+ size: {
10
+ lg: {
11
+ base: string;
12
+ };
13
+ md: {};
14
+ sm: {
15
+ base: string;
16
+ };
17
+ };
9
18
  variant: {
10
19
  primary: {
11
20
  base: string;
@@ -26,6 +35,15 @@ export declare const inputGroupVariants: import("tailwind-variants").TVReturnTyp
26
35
  base: string;
27
36
  };
28
37
  };
38
+ size: {
39
+ lg: {
40
+ base: string;
41
+ };
42
+ md: {};
43
+ sm: {
44
+ base: string;
45
+ };
46
+ };
29
47
  variant: {
30
48
  primary: {
31
49
  base: string;
@@ -46,6 +64,15 @@ export declare const inputGroupVariants: import("tailwind-variants").TVReturnTyp
46
64
  base: string;
47
65
  };
48
66
  };
67
+ size: {
68
+ lg: {
69
+ base: string;
70
+ };
71
+ md: {};
72
+ sm: {
73
+ base: string;
74
+ };
75
+ };
49
76
  variant: {
50
77
  primary: {
51
78
  base: string;
@@ -1 +1 @@
1
- {"version":3,"file":"input-group.styles.d.ts","sourceRoot":"","sources":["../../../src/components/input-group/input-group.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,kBAAkB;;QAazB,KAAK;QACL,IAAI;YACF,IAAI;;;;QAIN,OAAO;YACL,IAAI;;QAEN,SAAS;YACP,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIV,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
1
+ {"version":3,"file":"input-group.styles.d.ts","sourceRoot":"","sources":["../../../src/components/input-group/input-group.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,kBAAkB;;QAczB,KAAK;QACL,IAAI;YACF,IAAI;;;;QAIN,EAAE;YACA,IAAI;;QAEN,EAAE;QACF,EAAE;YACA,IAAI;;;;QAIN,OAAO;YACL,IAAI;;QAEN,SAAS;YACP,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIV,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -3,6 +3,7 @@ import { tv } from "tailwind-variants";
3
3
  const inputGroupVariants = tv({
4
4
  defaultVariants: {
5
5
  fullWidth: false,
6
+ size: "md",
6
7
  variant: "primary"
7
8
  },
8
9
  slots: {
@@ -16,6 +17,11 @@ const inputGroupVariants = tv({
16
17
  false: {},
17
18
  true: { base: "input-group--full-width" }
18
19
  },
20
+ size: {
21
+ lg: { base: "input-group--lg" },
22
+ md: {},
23
+ sm: { base: "input-group--sm" }
24
+ },
19
25
  variant: {
20
26
  primary: { base: "input-group--primary" },
21
27
  secondary: { base: "input-group--secondary" }
@@ -4,6 +4,15 @@
4
4
  border-width: var(--border-width-field);
5
5
  border-color: var(--field-border);
6
6
 
7
+ /* Forced Colors Mode flattens the fill onto the page and strips the shadow, leaving a field that
8
+ * reads as bare text - `--border-width-field` is 0, so the declared border brings nothing back on
9
+ * its own. An outline rather than a width so nothing shifts, and the focus ring replaces it while
10
+ * focused, which is the right order of importance. */
11
+ @media (forced-colors: active) {
12
+ outline: 1px solid ButtonBorder;
13
+ outline-offset: -1px;
14
+ }
15
+
7
16
  /* When textarea is present, align items to start and allow height to grow */
8
17
  &:has([data-slot="input-group-textarea"]) {
9
18
  @apply items-start;
@@ -67,7 +76,7 @@
67
76
  }
68
77
 
69
78
  .input-group__input {
70
- @apply flex-1 rounded-none border-0 bg-transparent px-3 py-2 text-base shadow-none outline-none placeholder:text-field-placeholder sm:text-sm;
79
+ @apply flex-1 rounded-none border-0 bg-transparent px-3 field-line-md shadow-none outline-none placeholder:text-field-placeholder;
71
80
 
72
81
  /* Remove border radius on left side when prefix is present */
73
82
  .input-group:has([data-slot="input-group-prefix"]) & {
@@ -205,3 +214,25 @@
205
214
  .input-group--full-width {
206
215
  @apply w-full;
207
216
  }
217
+
218
+ /* ==========================================================================
219
+ Size variants
220
+ ========================================================================== */
221
+
222
+ /* The shell states the floor and the control inside carries the metrics, which is the same split
223
+ * the base makes - the group may grow around a textarea, so it cannot state a height. */
224
+ .input-group--sm {
225
+ @apply min-h-8;
226
+
227
+ .input-group__input {
228
+ @apply field-line-sm;
229
+ }
230
+ }
231
+
232
+ .input-group--lg {
233
+ @apply min-h-10;
234
+
235
+ .input-group__input {
236
+ @apply field-line-lg;
237
+ }
238
+ }
@@ -1,9 +1,19 @@
1
1
  .input {
2
- @apply rounded-field border bg-field px-3 py-2 text-base text-field-foreground shadow-field outline-none placeholder:text-field-placeholder sm:text-sm;
2
+ @apply rounded-field border bg-field px-3 field-line-md text-field-foreground shadow-field outline-none placeholder:text-field-placeholder;
3
3
 
4
4
  border-width: var(--border-width-field);
5
5
  border-color: var(--field-border);
6
6
 
7
+ /* Forced Colors Mode flattens the fill onto the page and strips the shadow, leaving a field that
8
+ * reads as bare text - `--border-width-field` is 0, so the declared border brings nothing
9
+ * back on its own. `ButtonBorder` is the keyword the platform uses for a control's
10
+ * edge; an outline rather than a border so nothing shifts, and the focus ring replaces it
11
+ * while focused, which is the right order of importance. */
12
+ @media (forced-colors: active) {
13
+ outline: 1px solid ButtonBorder;
14
+ outline-offset: -1px;
15
+ }
16
+
7
17
  /**
8
18
  * Transitions
9
19
  * CRITICAL: motion-reduce must be AFTER transition for correct override specificity
@@ -90,3 +100,15 @@
90
100
  .input--full-width {
91
101
  @apply w-full;
92
102
  }
103
+
104
+ /* ==========================================================================
105
+ Size variants
106
+ ========================================================================== */
107
+
108
+ .input--sm {
109
+ @apply field-line-sm;
110
+ }
111
+
112
+ .input--lg {
113
+ @apply field-line-lg;
114
+ }
@@ -1,15 +1,30 @@
1
1
  import type { VariantProps } from "tailwind-variants";
2
2
  export declare const listboxVariants: import("tailwind-variants").TVReturnType<{
3
+ size: {
4
+ lg: "list-box--lg";
5
+ md: "";
6
+ sm: "list-box--sm";
7
+ };
3
8
  variant: {
4
9
  danger: "list-box--danger";
5
10
  default: "list-box--default";
6
11
  };
7
12
  }, undefined, "list-box", {
13
+ size: {
14
+ lg: "list-box--lg";
15
+ md: "";
16
+ sm: "list-box--sm";
17
+ };
8
18
  variant: {
9
19
  danger: "list-box--danger";
10
20
  default: "list-box--default";
11
21
  };
12
22
  }, undefined, import("tailwind-variants").TVReturnTypeLike<{
23
+ size: {
24
+ lg: "list-box--lg";
25
+ md: "";
26
+ sm: "list-box--sm";
27
+ };
13
28
  variant: {
14
29
  danger: "list-box--danger";
15
30
  default: "list-box--default";
@@ -1 +1 @@
1
- {"version":3,"file":"list-box.styles.d.ts","sourceRoot":"","sources":["../../../src/components/list-box/list-box.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;cAW1B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC"}
1
+ {"version":3,"file":"list-box.styles.d.ts","sourceRoot":"","sources":["../../../src/components/list-box/list-box.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiB1B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC"}
@@ -2,11 +2,21 @@ import { tv } from "tailwind-variants";
2
2
  //#region src/components/list-box/list-box.styles.ts
3
3
  const listboxVariants = tv({
4
4
  base: "list-box",
5
- defaultVariants: { variant: "default" },
6
- variants: { variant: {
7
- danger: "list-box--danger",
8
- default: "list-box--default"
9
- } }
5
+ defaultVariants: {
6
+ size: "md",
7
+ variant: "default"
8
+ },
9
+ variants: {
10
+ size: {
11
+ lg: "list-box--lg",
12
+ md: "",
13
+ sm: "list-box--sm"
14
+ },
15
+ variant: {
16
+ danger: "list-box--danger",
17
+ default: "list-box--default"
18
+ }
19
+ }
10
20
  });
11
21
  //#endregion
12
22
  export { listboxVariants };
@@ -26,8 +26,10 @@
26
26
  @apply pointer-events-none text-wrap select-none;
27
27
  }
28
28
 
29
- /* Add inline-end padding when indicator is present */
30
- &:has(.list-box-item__indicator) {
29
+ /* Room for the checkmark, only while it is drawn. The repeated attribute is what outranks the
30
+ * `px` the picker popovers reset on this same item. */
31
+ &[data-slot="list-box-item"][aria-selected="true"]:has(.list-box-item__indicator),
32
+ &[data-slot="list-box-item"][data-selected="true"]:has(.list-box-item__indicator) {
31
33
  @apply pe-7;
32
34
  }
33
35
 
@@ -23,3 +23,22 @@
23
23
  @apply ms-[3%] w-[94%];
24
24
  }
25
25
  }
26
+
27
+ /* ==========================================================================
28
+ Size variants
29
+ ========================================================================== */
30
+
31
+ /* A row is as tall as a field of the same size, so a collection standing beside one lines up. */
32
+ .list-box--sm {
33
+ [data-slot="list-box-item"] {
34
+ @apply min-h-8 py-1;
35
+ }
36
+ }
37
+
38
+ .list-box--lg {
39
+ @apply text-base;
40
+
41
+ [data-slot="list-box-item"] {
42
+ @apply min-h-10 py-2;
43
+ }
44
+ }
@@ -1,4 +1,22 @@
1
1
  import type { VariantProps } from "tailwind-variants";
2
- export declare const menuVariants: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "menu", {} | {}, undefined, import("tailwind-variants").TVReturnTypeLike<unknown, undefined>>;
2
+ export declare const menuVariants: import("tailwind-variants").TVReturnType<{
3
+ size: {
4
+ lg: "menu--lg";
5
+ md: "";
6
+ sm: "menu--sm";
7
+ };
8
+ }, undefined, "menu", {
9
+ size: {
10
+ lg: "menu--lg";
11
+ md: "";
12
+ sm: "menu--sm";
13
+ };
14
+ }, undefined, import("tailwind-variants").TVReturnTypeLike<{
15
+ size: {
16
+ lg: "menu--lg";
17
+ md: "";
18
+ sm: "menu--sm";
19
+ };
20
+ }, undefined>>;
3
21
  export type MenuVariants = VariantProps<typeof menuVariants>;
4
22
  //# sourceMappingURL=menu.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu.styles.d.ts","sourceRoot":"","sources":["../../../src/components/menu/menu.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,YAAY,iKAEvB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC"}
1
+ {"version":3,"file":"menu.styles.d.ts","sourceRoot":"","sources":["../../../src/components/menu/menu.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;cAYvB,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC"}
@@ -1,5 +1,13 @@
1
1
  import { tv } from "tailwind-variants";
2
2
  //#region src/components/menu/menu.styles.ts
3
- const menuVariants = tv({ base: "menu" });
3
+ const menuVariants = tv({
4
+ base: "menu",
5
+ defaultVariants: { size: "md" },
6
+ variants: { size: {
7
+ lg: "menu--lg",
8
+ md: "",
9
+ sm: "menu--sm"
10
+ } }
11
+ });
4
12
  //#endregion
5
13
  export { menuVariants };
@@ -2,6 +2,12 @@
2
2
  Base menu styles
3
3
  ========================================================================== */
4
4
 
5
+ /**
6
+ * Worn by both menus — the standalone one and the one inside a dropdown, which carries
7
+ * `dropdown__menu` alongside it. The two used to define the same rules twice, differing only in
8
+ * `gap`; that difference now lives with the dropdown's other overrides in `dropdown.css`, nested
9
+ * where it has the specificity to win, since this file is imported after that one.
10
+ */
5
11
  .menu {
6
12
  @apply relative flex w-full flex-col gap-1 overflow-clip p-1;
7
13
 
@@ -10,3 +16,22 @@
10
16
  @apply ms-[3%] w-[94%];
11
17
  }
12
18
  }
19
+
20
+ /* ==========================================================================
21
+ Size variants
22
+ ========================================================================== */
23
+
24
+ /* A row is as tall as a field of the same size, so a collection standing beside one lines up. */
25
+ .menu--sm {
26
+ [data-slot="menu-item"] {
27
+ @apply min-h-8 py-1;
28
+ }
29
+ }
30
+
31
+ .menu--lg {
32
+ @apply text-base;
33
+
34
+ [data-slot="menu-item"] {
35
+ @apply min-h-10 py-2;
36
+ }
37
+ }
@@ -32,6 +32,14 @@
32
32
 
33
33
  /* Default height (matches --md) */
34
34
  @apply h-2;
35
+
36
+ /* Track and fill are both plain backgrounds, so forced colors flattens the pair onto the
37
+ * page and the whole meter stops rendering - no bar, no value. */
38
+ @media (forced-colors: active) {
39
+ background-color: Canvas;
40
+ outline: 1px solid CanvasText;
41
+ outline-offset: -1px;
42
+ }
35
43
  }
36
44
 
37
45
  .meter__fill {
@@ -39,6 +47,10 @@
39
47
 
40
48
  background-color: var(--meter-fill);
41
49
 
50
+ @media (forced-colors: active) {
51
+ background-color: Highlight;
52
+ }
53
+
42
54
  /**
43
55
  * Transitions
44
56
  * CRITICAL: motion-reduce must be AFTER transition for correct override specificity
@@ -177,7 +177,7 @@
177
177
  @apply relative;
178
178
  @apply flex w-full flex-col;
179
179
  @apply bg-overlay shadow-overlay outline-none;
180
- border-radius: min(32px, var(--radius-3xl));
180
+ border-radius: min(32px, var(--component-radius));
181
181
  @apply p-6;
182
182
  @apply pointer-events-auto;
183
183
 
@@ -7,6 +7,15 @@ export declare const numberFieldVariants: import("tailwind-variants").TVReturnTy
7
7
  group: string;
8
8
  };
9
9
  };
10
+ size: {
11
+ lg: {
12
+ base: string;
13
+ };
14
+ md: {};
15
+ sm: {
16
+ base: string;
17
+ };
18
+ };
10
19
  variant: {
11
20
  primary: {
12
21
  base: string;
@@ -29,6 +38,15 @@ export declare const numberFieldVariants: import("tailwind-variants").TVReturnTy
29
38
  group: string;
30
39
  };
31
40
  };
41
+ size: {
42
+ lg: {
43
+ base: string;
44
+ };
45
+ md: {};
46
+ sm: {
47
+ base: string;
48
+ };
49
+ };
32
50
  variant: {
33
51
  primary: {
34
52
  base: string;
@@ -51,6 +69,15 @@ export declare const numberFieldVariants: import("tailwind-variants").TVReturnTy
51
69
  group: string;
52
70
  };
53
71
  };
72
+ size: {
73
+ lg: {
74
+ base: string;
75
+ };
76
+ md: {};
77
+ sm: {
78
+ base: string;
79
+ };
80
+ };
54
81
  variant: {
55
82
  primary: {
56
83
  base: string;
@@ -1 +1 @@
1
- {"version":3,"file":"number-field.styles.d.ts","sourceRoot":"","sources":["../../../src/components/number-field/number-field.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,mBAAmB;;QAc1B,KAAK;QACL,IAAI;YACF,IAAI;YACJ,KAAK;;;;QAIP,OAAO;YACL,IAAI;;QAEN,SAAS;YACP,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIV,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
1
+ {"version":3,"file":"number-field.styles.d.ts","sourceRoot":"","sources":["../../../src/components/number-field/number-field.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,mBAAmB;;QAe1B,KAAK;QACL,IAAI;YACF,IAAI;YACJ,KAAK;;;;QAIP,EAAE;YACA,IAAI;;QAEN,EAAE;QACF,EAAE;YACA,IAAI;;;;QAIN,OAAO;YACL,IAAI;;QAEN,SAAS;YACP,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIV,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -3,6 +3,7 @@ import { tv } from "tailwind-variants";
3
3
  const numberFieldVariants = tv({
4
4
  defaultVariants: {
5
5
  fullWidth: false,
6
+ size: "md",
6
7
  variant: "primary"
7
8
  },
8
9
  slots: {
@@ -20,6 +21,11 @@ const numberFieldVariants = tv({
20
21
  group: "number-field__group--full-width"
21
22
  }
22
23
  },
24
+ size: {
25
+ lg: { base: "number-field--lg" },
26
+ md: {},
27
+ sm: { base: "number-field--sm" }
28
+ },
23
29
  variant: {
24
30
  primary: { base: "number-field--primary" },
25
31
  secondary: { base: "number-field--secondary" }
@@ -18,6 +18,14 @@
18
18
  @apply grid h-9 items-center overflow-hidden rounded-field border bg-field text-sm text-field-foreground shadow-field outline-none;
19
19
  border-width: var(--border-width-field);
20
20
  border-color: var(--field-border);
21
+
22
+ /* Forced Colors Mode flattens the fill onto the page and strips the shadow, leaving a control
23
+ * with nothing to say it is one. `ButtonBorder` is the keyword the platform uses for a
24
+ * control's edge. */
25
+ @media (forced-colors: active) {
26
+ outline: 1px solid ButtonBorder;
27
+ outline-offset: -1px;
28
+ }
21
29
  grid-template-columns: 1fr;
22
30
 
23
31
  &:has([slot="decrement"]) {
@@ -89,7 +97,7 @@
89
97
  }
90
98
 
91
99
  .number-field__input {
92
- @apply min-w-0 rounded-none border-0 bg-transparent px-3 py-2 text-base tabular-nums shadow-none outline-none sm:text-sm;
100
+ @apply min-w-0 rounded-none border-0 bg-transparent px-3 field-line-md tabular-nums shadow-none outline-none;
93
101
 
94
102
  /* Remove border radius on left side when decrement button is present */
95
103
  .number-field__group:has([slot="decrement"]) & {
@@ -230,3 +238,62 @@
230
238
  .number-field__group--full-width {
231
239
  @apply w-full;
232
240
  }
241
+
242
+ /* ==========================================================================
243
+ Size variants
244
+ ========================================================================== */
245
+
246
+ /* The stepper column stays 4px wider than the field is tall, as it is at `md`. */
247
+ .number-field--sm {
248
+ .number-field__group {
249
+ @apply h-8;
250
+
251
+ &:has([slot="decrement"]) {
252
+ grid-template-columns: 36px 1fr;
253
+ }
254
+
255
+ &:has([slot="increment"]) {
256
+ grid-template-columns: 1fr 36px;
257
+ }
258
+
259
+ &:has([slot="decrement"]):has([slot="increment"]) {
260
+ grid-template-columns: 36px 1fr 36px;
261
+ }
262
+ }
263
+
264
+ .number-field__input {
265
+ @apply field-line-sm;
266
+ }
267
+
268
+ .number-field__increment-button,
269
+ .number-field__decrement-button {
270
+ @apply w-9;
271
+ }
272
+ }
273
+
274
+ .number-field--lg {
275
+ .number-field__group {
276
+ @apply h-10;
277
+
278
+ &:has([slot="decrement"]) {
279
+ grid-template-columns: 44px 1fr;
280
+ }
281
+
282
+ &:has([slot="increment"]) {
283
+ grid-template-columns: 1fr 44px;
284
+ }
285
+
286
+ &:has([slot="decrement"]):has([slot="increment"]) {
287
+ grid-template-columns: 44px 1fr 44px;
288
+ }
289
+ }
290
+
291
+ .number-field__input {
292
+ @apply field-line-lg;
293
+ }
294
+
295
+ .number-field__increment-button,
296
+ .number-field__decrement-button {
297
+ @apply w-11;
298
+ }
299
+ }
@@ -24,7 +24,7 @@
24
24
 
25
25
  /* Link - page number button (ghost button style) */
26
26
  .pagination__link {
27
- @apply relative isolate inline-flex size-9 origin-center items-center justify-center rounded-3xl text-sm font-medium whitespace-nowrap outline-none select-none no-highlight md:size-8;
27
+ @apply relative isolate inline-flex size-8 origin-center items-center justify-center rounded-component text-sm font-medium whitespace-nowrap outline-none select-none no-highlight;
28
28
 
29
29
  cursor: var(--cursor-interactive);
30
30
 
@@ -79,12 +79,16 @@
79
79
  --pagination-link-bg: var(--default);
80
80
  --pagination-link-bg-hover: var(--default-hover);
81
81
  --pagination-link-bg-pressed: var(--default-hover);
82
+
83
+ /* The active page is a background and nothing else, and an inactive link is transparent -
84
+ * forced colors flattens the first onto the page and leaves the pair identical. */
85
+ @apply forced-selected;
82
86
  }
83
87
  }
84
88
 
85
89
  /* Ellipsis */
86
90
  .pagination__ellipsis {
87
- @apply inline-flex size-9 items-center justify-center text-sm text-muted select-none md:size-8;
91
+ @apply inline-flex size-8 items-center justify-center text-sm text-muted select-none;
88
92
  }
89
93
 
90
94
  /* Navigation buttons (Previous / Next) */
@@ -103,7 +107,7 @@
103
107
 
104
108
  .pagination--sm {
105
109
  .pagination__link {
106
- @apply size-8 text-xs md:size-7;
110
+ @apply size-7 text-xs;
107
111
 
108
112
  &:active,
109
113
  &[data-pressed="true"] {
@@ -116,7 +120,7 @@
116
120
  }
117
121
 
118
122
  .pagination__ellipsis {
119
- @apply size-8 text-xs md:size-7;
123
+ @apply size-7 text-xs;
120
124
  }
121
125
 
122
126
  .pagination__summary {
@@ -130,7 +134,7 @@
130
134
 
131
135
  .pagination--lg {
132
136
  .pagination__link {
133
- @apply size-10 text-base md:size-9;
137
+ @apply size-9 text-base;
134
138
 
135
139
  &:active,
136
140
  &[data-pressed="true"] {
@@ -143,7 +147,7 @@
143
147
  }
144
148
 
145
149
  .pagination__ellipsis {
146
- @apply size-10 text-base md:size-9;
150
+ @apply size-9 text-base;
147
151
  }
148
152
 
149
153
  .pagination__summary {
@@ -3,7 +3,7 @@
3
3
  /* Base popover styles */
4
4
  .popover {
5
5
  @apply origin-(--trigger-anchor-point) bg-overlay p-0 text-sm;
6
- border-radius: min(32px, var(--radius-3xl));
6
+ border-radius: min(32px, var(--component-radius));
7
7
  box-shadow: var(--shadow-overlay);
8
8
 
9
9
  /* Entering animations */
@@ -43,6 +43,20 @@
43
43
  fill: var(--overlay);
44
44
  }
45
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="popover-overlay-arrow-group"]) {
56
+ box-shadow: none;
57
+ filter: var(--overlay-edge, none);
58
+ }
59
+
46
60
  /* Arrow rotation based on placement */
47
61
  &[data-placement="bottom"] [data-slot="popover-overlay-arrow"] {
48
62
  rotate: 180deg;
@@ -32,6 +32,14 @@
32
32
 
33
33
  /* Default height (matches --md) */
34
34
  @apply h-2;
35
+
36
+ /* Track and fill are both plain backgrounds, so forced colors flattens the pair onto the
37
+ * page and the whole bar stops rendering. */
38
+ @media (forced-colors: active) {
39
+ background-color: Canvas;
40
+ outline: 1px solid CanvasText;
41
+ outline-offset: -1px;
42
+ }
35
43
  }
36
44
 
37
45
  .progress-bar__fill {
@@ -39,6 +47,10 @@
39
47
 
40
48
  background-color: var(--progress-bar-fill);
41
49
 
50
+ @media (forced-colors: active) {
51
+ background-color: Highlight;
52
+ }
53
+
42
54
  /**
43
55
  * Transitions
44
56
  * CRITICAL: motion-reduce must be AFTER transition for correct override specificity