panelui-native 0.62.0 → 0.65.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 (198) hide show
  1. package/README.md +5 -0
  2. package/lib/module/components/area-chart/index.js +14 -4
  3. package/lib/module/components/area-chart/index.js.map +1 -1
  4. package/lib/module/components/badge/index.js +1 -1
  5. package/lib/module/components/badge/index.js.map +1 -1
  6. package/lib/module/components/bar-chart/index.js +53 -6
  7. package/lib/module/components/bar-chart/index.js.map +1 -1
  8. package/lib/module/components/bottom-sheet/index.js +2 -2
  9. package/lib/module/components/bottom-sheet/index.js.map +1 -1
  10. package/lib/module/components/button/index.js +19 -9
  11. package/lib/module/components/button/index.js.map +1 -1
  12. package/lib/module/components/candlestick-chart/index.js +14 -4
  13. package/lib/module/components/candlestick-chart/index.js.map +1 -1
  14. package/lib/module/components/card/index.js +26 -1
  15. package/lib/module/components/card/index.js.map +1 -1
  16. package/lib/module/components/carousel/index.js +28 -14
  17. package/lib/module/components/carousel/index.js.map +1 -1
  18. package/lib/module/components/checkbox/index.js +2 -3
  19. package/lib/module/components/checkbox/index.js.map +1 -1
  20. package/lib/module/components/dialog/index.js +51 -5
  21. package/lib/module/components/dialog/index.js.map +1 -1
  22. package/lib/module/components/drawer/index.js +2 -2
  23. package/lib/module/components/drawer/index.js.map +1 -1
  24. package/lib/module/components/fab/index.js +4 -3
  25. package/lib/module/components/fab/index.js.map +1 -1
  26. package/lib/module/components/field/index.js +41 -6
  27. package/lib/module/components/field/index.js.map +1 -1
  28. package/lib/module/components/flow/flow-accessibility.js +84 -0
  29. package/lib/module/components/flow/flow-accessibility.js.map +1 -0
  30. package/lib/module/components/flow/index.js +100 -39
  31. package/lib/module/components/flow/index.js.map +1 -1
  32. package/lib/module/components/form/use-form.js +93 -66
  33. package/lib/module/components/form/use-form.js.map +1 -1
  34. package/lib/module/components/heatmap-chart/index.js +2 -2
  35. package/lib/module/components/heatmap-chart/index.js.map +1 -1
  36. package/lib/module/components/hex-chart/index.js +4 -4
  37. package/lib/module/components/hex-chart/index.js.map +1 -1
  38. package/lib/module/components/kpi/index.js +3 -1
  39. package/lib/module/components/kpi/index.js.map +1 -1
  40. package/lib/module/components/line-chart/index.js +17 -7
  41. package/lib/module/components/line-chart/index.js.map +1 -1
  42. package/lib/module/components/map/index.js +71 -8
  43. package/lib/module/components/map/index.js.map +1 -1
  44. package/lib/module/components/map/map-accessibility.js +20 -0
  45. package/lib/module/components/map/map-accessibility.js.map +1 -0
  46. package/lib/module/components/map/maplibre.js.map +1 -1
  47. package/lib/module/components/menu/index.js +4 -1
  48. package/lib/module/components/menu/index.js.map +1 -1
  49. package/lib/module/components/number-input/index.js +1 -23
  50. package/lib/module/components/number-input/index.js.map +1 -1
  51. package/lib/module/components/number-input/number-input-math.js +44 -0
  52. package/lib/module/components/number-input/number-input-math.js.map +1 -0
  53. package/lib/module/components/pie-chart/index.js +2 -2
  54. package/lib/module/components/pie-chart/index.js.map +1 -1
  55. package/lib/module/components/plot/index.js +1329 -0
  56. package/lib/module/components/plot/index.js.map +1 -0
  57. package/lib/module/components/polar-area-chart/index.js +2 -2
  58. package/lib/module/components/polar-area-chart/index.js.map +1 -1
  59. package/lib/module/components/radar-chart/index.js +14 -4
  60. package/lib/module/components/radar-chart/index.js.map +1 -1
  61. package/lib/module/components/radio-group/index.js +1 -2
  62. package/lib/module/components/radio-group/index.js.map +1 -1
  63. package/lib/module/components/ring-chart/index.js +2 -2
  64. package/lib/module/components/ring-chart/index.js.map +1 -1
  65. package/lib/module/components/section-rail/index.js +120 -15
  66. package/lib/module/components/section-rail/index.js.map +1 -1
  67. package/lib/module/components/selection-mode/index.js +129 -18
  68. package/lib/module/components/selection-mode/index.js.map +1 -1
  69. package/lib/module/components/sortable/index.js +20 -60
  70. package/lib/module/components/sortable/index.js.map +1 -1
  71. package/lib/module/components/sortable/reorder.js +63 -0
  72. package/lib/module/components/sortable/reorder.js.map +1 -0
  73. package/lib/module/components/swipe/index.js +4 -4
  74. package/lib/module/components/swipe/index.js.map +1 -1
  75. package/lib/module/components/switch/index.js +36 -3
  76. package/lib/module/components/switch/index.js.map +1 -1
  77. package/lib/module/components/time-picker/accessibility.js +21 -0
  78. package/lib/module/components/time-picker/accessibility.js.map +1 -0
  79. package/lib/module/components/time-picker/index.js +34 -8
  80. package/lib/module/components/time-picker/index.js.map +1 -1
  81. package/lib/module/components/waterfall-chart/index.js +1325 -0
  82. package/lib/module/components/waterfall-chart/index.js.map +1 -0
  83. package/lib/module/index.js +8 -0
  84. package/lib/module/index.js.map +1 -1
  85. package/lib/module/primitives/modal-isolation-store.js +29 -0
  86. package/lib/module/primitives/modal-isolation-store.js.map +1 -0
  87. package/lib/module/primitives/portal.js +36 -4
  88. package/lib/module/primitives/portal.js.map +1 -1
  89. package/lib/module/providers/panel-ui-provider.js +27 -6
  90. package/lib/module/providers/panel-ui-provider.js.map +1 -1
  91. package/lib/typescript/src/components/area-chart/index.d.ts.map +1 -1
  92. package/lib/typescript/src/components/badge/index.d.ts.map +1 -1
  93. package/lib/typescript/src/components/bar-chart/index.d.ts.map +1 -1
  94. package/lib/typescript/src/components/button/index.d.ts.map +1 -1
  95. package/lib/typescript/src/components/candlestick-chart/index.d.ts +6 -3
  96. package/lib/typescript/src/components/candlestick-chart/index.d.ts.map +1 -1
  97. package/lib/typescript/src/components/card/index.d.ts +48 -1
  98. package/lib/typescript/src/components/card/index.d.ts.map +1 -1
  99. package/lib/typescript/src/components/carousel/index.d.ts +1 -1
  100. package/lib/typescript/src/components/carousel/index.d.ts.map +1 -1
  101. package/lib/typescript/src/components/checkbox/index.d.ts.map +1 -1
  102. package/lib/typescript/src/components/dialog/index.d.ts +47 -2
  103. package/lib/typescript/src/components/dialog/index.d.ts.map +1 -1
  104. package/lib/typescript/src/components/fab/index.d.ts.map +1 -1
  105. package/lib/typescript/src/components/field/index.d.ts +8 -1
  106. package/lib/typescript/src/components/field/index.d.ts.map +1 -1
  107. package/lib/typescript/src/components/flow/flow-accessibility.d.ts +49 -0
  108. package/lib/typescript/src/components/flow/flow-accessibility.d.ts.map +1 -0
  109. package/lib/typescript/src/components/flow/index.d.ts +14 -2
  110. package/lib/typescript/src/components/flow/index.d.ts.map +1 -1
  111. package/lib/typescript/src/components/form/use-form.d.ts.map +1 -1
  112. package/lib/typescript/src/components/heatmap-chart/index.d.ts.map +1 -1
  113. package/lib/typescript/src/components/hex-chart/index.d.ts.map +1 -1
  114. package/lib/typescript/src/components/kpi/index.d.ts.map +1 -1
  115. package/lib/typescript/src/components/line-chart/index.d.ts.map +1 -1
  116. package/lib/typescript/src/components/map/index.d.ts +13 -5
  117. package/lib/typescript/src/components/map/index.d.ts.map +1 -1
  118. package/lib/typescript/src/components/map/map-accessibility.d.ts +19 -0
  119. package/lib/typescript/src/components/map/map-accessibility.d.ts.map +1 -0
  120. package/lib/typescript/src/components/map/maplibre.d.ts +2 -0
  121. package/lib/typescript/src/components/map/maplibre.d.ts.map +1 -1
  122. package/lib/typescript/src/components/menu/index.d.ts.map +1 -1
  123. package/lib/typescript/src/components/number-input/index.d.ts.map +1 -1
  124. package/lib/typescript/src/components/number-input/number-input-math.d.ts +9 -0
  125. package/lib/typescript/src/components/number-input/number-input-math.d.ts.map +1 -0
  126. package/lib/typescript/src/components/plot/index.d.ts +471 -0
  127. package/lib/typescript/src/components/plot/index.d.ts.map +1 -0
  128. package/lib/typescript/src/components/radar-chart/index.d.ts.map +1 -1
  129. package/lib/typescript/src/components/radio-group/index.d.ts.map +1 -1
  130. package/lib/typescript/src/components/section-rail/index.d.ts +8 -1
  131. package/lib/typescript/src/components/section-rail/index.d.ts.map +1 -1
  132. package/lib/typescript/src/components/selection-mode/index.d.ts +82 -6
  133. package/lib/typescript/src/components/selection-mode/index.d.ts.map +1 -1
  134. package/lib/typescript/src/components/sortable/index.d.ts.map +1 -1
  135. package/lib/typescript/src/components/sortable/reorder.d.ts +14 -0
  136. package/lib/typescript/src/components/sortable/reorder.d.ts.map +1 -0
  137. package/lib/typescript/src/components/swipe/index.d.ts.map +1 -1
  138. package/lib/typescript/src/components/switch/index.d.ts +3 -3
  139. package/lib/typescript/src/components/switch/index.d.ts.map +1 -1
  140. package/lib/typescript/src/components/time-picker/accessibility.d.ts +10 -0
  141. package/lib/typescript/src/components/time-picker/accessibility.d.ts.map +1 -0
  142. package/lib/typescript/src/components/time-picker/index.d.ts.map +1 -1
  143. package/lib/typescript/src/components/waterfall-chart/index.d.ts +379 -0
  144. package/lib/typescript/src/components/waterfall-chart/index.d.ts.map +1 -0
  145. package/lib/typescript/src/index.d.ts +4 -1
  146. package/lib/typescript/src/index.d.ts.map +1 -1
  147. package/lib/typescript/src/primitives/modal-isolation-store.d.ts +10 -0
  148. package/lib/typescript/src/primitives/modal-isolation-store.d.ts.map +1 -0
  149. package/lib/typescript/src/primitives/portal.d.ts +6 -0
  150. package/lib/typescript/src/primitives/portal.d.ts.map +1 -1
  151. package/lib/typescript/src/providers/panel-ui-provider.d.ts.map +1 -1
  152. package/package.json +5 -2
  153. package/src/components/area-chart/index.tsx +14 -4
  154. package/src/components/badge/index.tsx +4 -1
  155. package/src/components/bar-chart/index.tsx +54 -7
  156. package/src/components/bottom-sheet/index.tsx +3 -3
  157. package/src/components/button/index.tsx +15 -21
  158. package/src/components/candlestick-chart/index.tsx +20 -7
  159. package/src/components/card/index.tsx +32 -7
  160. package/src/components/carousel/index.tsx +42 -20
  161. package/src/components/checkbox/index.tsx +1 -2
  162. package/src/components/dialog/index.tsx +58 -5
  163. package/src/components/drawer/index.tsx +3 -3
  164. package/src/components/fab/index.tsx +8 -12
  165. package/src/components/field/index.tsx +52 -10
  166. package/src/components/flow/flow-accessibility.ts +109 -0
  167. package/src/components/flow/index.tsx +162 -50
  168. package/src/components/form/use-form.ts +101 -65
  169. package/src/components/heatmap-chart/index.tsx +2 -3
  170. package/src/components/hex-chart/index.tsx +4 -5
  171. package/src/components/kpi/index.tsx +3 -1
  172. package/src/components/line-chart/index.tsx +17 -6
  173. package/src/components/map/index.tsx +110 -7
  174. package/src/components/map/map-accessibility.ts +41 -0
  175. package/src/components/map/maplibre.ts +2 -0
  176. package/src/components/menu/index.tsx +4 -1
  177. package/src/components/number-input/index.tsx +1 -26
  178. package/src/components/number-input/number-input-math.ts +50 -0
  179. package/src/components/pie-chart/index.tsx +2 -2
  180. package/src/components/plot/index.tsx +1565 -0
  181. package/src/components/polar-area-chart/index.tsx +2 -2
  182. package/src/components/radar-chart/index.tsx +14 -4
  183. package/src/components/radio-group/index.tsx +1 -2
  184. package/src/components/ring-chart/index.tsx +2 -2
  185. package/src/components/section-rail/index.tsx +133 -14
  186. package/src/components/selection-mode/index.tsx +163 -26
  187. package/src/components/sortable/index.tsx +27 -69
  188. package/src/components/sortable/reorder.ts +88 -0
  189. package/src/components/swipe/index.tsx +7 -4
  190. package/src/components/switch/index.tsx +42 -6
  191. package/src/components/time-picker/accessibility.ts +24 -0
  192. package/src/components/time-picker/index.tsx +48 -2
  193. package/src/components/waterfall-chart/index.tsx +1589 -0
  194. package/src/index.ts +69 -0
  195. package/src/primitives/modal-isolation-store.ts +31 -0
  196. package/src/primitives/portal.tsx +34 -4
  197. package/src/providers/panel-ui-provider.tsx +41 -9
  198. package/theme.css +54 -3
package/src/index.ts CHANGED
@@ -304,6 +304,7 @@ export {
304
304
  type MapArcProps,
305
305
  type MapGeoJSONProps,
306
306
  type MapClusterProps,
307
+ type MapFeatureAccessibility,
307
308
  type MapHeatmapProps,
308
309
  type MapUserLocationProps,
309
310
  type BasemapSource,
@@ -591,6 +592,52 @@ export {
591
592
  type PolarAreaScale,
592
593
  type PolarAreaDatum,
593
594
  } from './components/polar-area-chart';
595
+ export {
596
+ Plot,
597
+ usePlot,
598
+ usePlotCursor,
599
+ type PlotProps,
600
+ type PlotHandle,
601
+ type PlotGeometry,
602
+ type PlotHeaderProps,
603
+ type PlotLegendProps,
604
+ type PlotGridProps,
605
+ type PlotSeriesProps,
606
+ type PlotLineProps,
607
+ type PlotAreaProps,
608
+ type PlotBarsProps,
609
+ type PlotDotsProps,
610
+ type PlotRuleProps,
611
+ type PlotLayerProps,
612
+ type PlotOverlayProps,
613
+ type PlotXAxisProps,
614
+ type PlotYAxisProps,
615
+ type PlotCursorProps,
616
+ type PlotTooltipProps,
617
+ type PlotDatum,
618
+ type PlotStatus,
619
+ type PlotCurve,
620
+ type PlotScale,
621
+ type PlotBound,
622
+ type PlotBox,
623
+ } from './components/plot';
624
+ /*
625
+ * The scale functions, alongside the component they exist for. Every one is a
626
+ * worklet, which is what lets a mark somebody writes themselves be rebuilt on
627
+ * the UI thread on the same frames `Plot`'s own are.
628
+ */
629
+ export {
630
+ areaPath,
631
+ bandOf,
632
+ barPath,
633
+ compactNumber,
634
+ linePath,
635
+ segment,
636
+ xAt,
637
+ xOf,
638
+ yOf,
639
+ type ChartPoint,
640
+ } from './components/plot';
594
641
  export { Textarea, type TextareaProps } from './components/textarea';
595
642
  export {
596
643
  TagInput,
@@ -1049,6 +1096,28 @@ export {
1049
1096
  type TypographyParagraphProps,
1050
1097
  type TypographyCodeProps,
1051
1098
  } from './components/typography';
1099
+ export {
1100
+ WaterfallChart,
1101
+ useWaterfallChart,
1102
+ waterfallSteps,
1103
+ type WaterfallChartProps,
1104
+ type WaterfallChartHandle,
1105
+ type WaterfallChartHeaderProps,
1106
+ type WaterfallChartGridProps,
1107
+ type WaterfallChartBarsProps,
1108
+ type WaterfallChartConnectorsProps,
1109
+ type WaterfallChartValuesProps,
1110
+ type WaterfallChartSkeletonProps,
1111
+ type WaterfallChartXAxisProps,
1112
+ type WaterfallChartYAxisProps,
1113
+ type WaterfallChartTooltipProps,
1114
+ type WaterfallChartLegendProps,
1115
+ type WaterfallChartStatus,
1116
+ type WaterfallChartOrientation,
1117
+ type WaterfallDatum,
1118
+ type WaterfallStep,
1119
+ type WaterfallKind,
1120
+ } from './components/waterfall-chart';
1052
1121
 
1053
1122
  // Icons
1054
1123
  export {
@@ -0,0 +1,31 @@
1
+ /** Tracks modal owners without unisolating the app while a nested modal remains. */
2
+ export class ModalIsolationStore {
3
+ private owners = new Set<string>();
4
+ private listeners = new Set<() => void>();
5
+
6
+ acquire = (owner: string): (() => void) => {
7
+ const wasActive = this.getSnapshot();
8
+ this.owners.add(owner);
9
+ if (this.getSnapshot() !== wasActive) this.emit();
10
+
11
+ let released = false;
12
+ return () => {
13
+ if (released) return;
14
+ released = true;
15
+ const activeBeforeRelease = this.getSnapshot();
16
+ this.owners.delete(owner);
17
+ if (this.getSnapshot() !== activeBeforeRelease) this.emit();
18
+ };
19
+ };
20
+
21
+ subscribe = (listener: () => void): (() => void) => {
22
+ this.listeners.add(listener);
23
+ return () => this.listeners.delete(listener);
24
+ };
25
+
26
+ getSnapshot = (): boolean => this.owners.size > 0;
27
+
28
+ private emit() {
29
+ this.listeners.forEach((listener) => listener());
30
+ }
31
+ }
@@ -7,6 +7,7 @@ import {
7
7
  useSyncExternalStore,
8
8
  type ReactNode,
9
9
  } from 'react';
10
+ import { ModalIsolationStore } from './modal-isolation-store';
10
11
 
11
12
  type PortalMap = ReadonlyMap<string, ReactNode>;
12
13
 
@@ -39,13 +40,18 @@ class PortalStore {
39
40
  }
40
41
 
41
42
  const PortalContext = createContext<PortalStore | null>(null);
43
+ const ModalIsolationContext = createContext<ModalIsolationStore | null>(null);
42
44
 
43
45
  export function PortalProvider({ children }: { children: ReactNode }) {
44
- const storeRef = useRef<PortalStore | null>(null);
45
- storeRef.current ??= new PortalStore();
46
+ const portalStoreRef = useRef<PortalStore | null>(null);
47
+ const modalStoreRef = useRef<ModalIsolationStore | null>(null);
48
+ portalStoreRef.current ??= new PortalStore();
49
+ modalStoreRef.current ??= new ModalIsolationStore();
46
50
  return (
47
- <PortalContext.Provider value={storeRef.current}>
48
- {children}
51
+ <PortalContext.Provider value={portalStoreRef.current}>
52
+ <ModalIsolationContext.Provider value={modalStoreRef.current}>
53
+ {children}
54
+ </ModalIsolationContext.Provider>
49
55
  </PortalContext.Provider>
50
56
  );
51
57
  }
@@ -71,6 +77,30 @@ export function Portal({ children }: { children: ReactNode }) {
71
77
  return null;
72
78
  }
73
79
 
80
+ /** A portal that owns modal focus until it unmounts. */
81
+ export function ModalPortal({ children }: { children: ReactNode }) {
82
+ const store = useModalIsolationStore('ModalPortal');
83
+ const owner = useId();
84
+
85
+ useEffect(() => store.acquire(owner), [owner, store]);
86
+
87
+ return <Portal>{children}</Portal>;
88
+ }
89
+
90
+ /** Whether any modal portal currently owns focus. */
91
+ export function useModalIsolationActive(): boolean {
92
+ const store = useModalIsolationStore('useModalIsolationActive');
93
+ return useSyncExternalStore(store.subscribe, store.getSnapshot);
94
+ }
95
+
96
+ function useModalIsolationStore(component: string): ModalIsolationStore {
97
+ const store = useContext(ModalIsolationContext);
98
+ if (!store) {
99
+ throw new Error(`${component} must be used within a <PanelUIProvider>`);
100
+ }
101
+ return store;
102
+ }
103
+
74
104
  /** Mount point for portaled content. PanelUIProvider renders one automatically. */
75
105
  export function PortalHost() {
76
106
  const store = usePortalStore('PortalHost');
@@ -1,7 +1,11 @@
1
1
  import { Fragment, type ComponentType, type ReactNode } from 'react';
2
- import { StyleSheet, View } from 'react-native';
2
+ import { Platform, StyleSheet, View } from 'react-native';
3
3
  import { GestureHandlerRootView } from 'react-native-gesture-handler';
4
- import { PortalHost, PortalProvider } from '../primitives/portal';
4
+ import {
5
+ PortalHost,
6
+ PortalProvider,
7
+ useModalIsolationActive,
8
+ } from '../primitives/portal';
5
9
  import { ToastViewport } from '../components/toast';
6
10
  import { cn } from '../utils/cn';
7
11
 
@@ -58,19 +62,47 @@ export function PanelUIProvider({
58
62
  {/* Outermost of ours, so every field below it can avoid the keyboard.
59
63
  A no-op Fragment when the controller is not installed. */}
60
64
  <KeyboardProvider>
61
- <View className={cn('flex-1', background && 'bg-background', className)}>
62
- <PortalProvider>
65
+ <PortalProvider>
66
+ <ProviderSurface
67
+ background={background}
68
+ className={className}
69
+ >
63
70
  {children}
64
- {/* Sits before PortalHost so it can portal into it. */}
65
- <ToastViewport />
66
- <PortalHost />
67
- </PortalProvider>
68
- </View>
71
+ </ProviderSurface>
72
+ </PortalProvider>
69
73
  </KeyboardProvider>
70
74
  </GestureHandlerRootView>
71
75
  );
72
76
  }
73
77
 
78
+ function ProviderSurface({
79
+ children,
80
+ className,
81
+ background,
82
+ }: Required<Pick<PanelUIProviderProps, 'children' | 'background'>> &
83
+ Pick<PanelUIProviderProps, 'className'>) {
84
+ const modalActive = useModalIsolationActive();
85
+ const isolateApp = Platform.OS === 'android' && modalActive;
86
+
87
+ return (
88
+ <View className={cn('flex-1', background && 'bg-background', className)}>
89
+ {/* This wrapper is the app accessibility boundary. PortalHost stays its
90
+ sibling, so hiding the background can never hide the active modal. */}
91
+ <View
92
+ collapsable={false}
93
+ style={styles.content}
94
+ importantForAccessibility={isolateApp ? 'no-hide-descendants' : 'auto'}
95
+ >
96
+ {children}
97
+ </View>
98
+ {/* Sits before PortalHost so it can portal into it. */}
99
+ <ToastViewport />
100
+ <PortalHost />
101
+ </View>
102
+ );
103
+ }
104
+
74
105
  const styles = StyleSheet.create({
75
106
  root: { flex: 1 },
107
+ content: { flex: 1 },
76
108
  });
package/theme.css CHANGED
@@ -56,6 +56,18 @@
56
56
  */
57
57
  --color-overlay: unset;
58
58
  --color-overlay-foreground: unset;
59
+ /*
60
+ * A band set *into* a surface rather than raised off it — the footer of
61
+ * actions under a card or a dialog.
62
+ *
63
+ * A translucent black in every theme, rather than a colour of its own,
64
+ * because it has to come out darker than whatever it is drawn on and that
65
+ * changes: a card, a popover, or a surface the caller passed in. `--color-
66
+ * muted` cannot do this job — it is white in a dark theme, so the band it
67
+ * draws floats forward instead of sinking, which is the opposite of what a
68
+ * footer is saying.
69
+ */
70
+ --color-inset: unset;
59
71
  --color-primary: unset;
60
72
  --color-primary-foreground: unset;
61
73
  --color-secondary: unset;
@@ -66,12 +78,16 @@
66
78
  --color-accent-foreground: unset;
67
79
  --color-destructive: unset;
68
80
  --color-destructive-foreground: unset;
81
+ --color-destructive-solid-foreground: unset;
69
82
  --color-info: unset;
70
83
  --color-info-foreground: unset;
84
+ --color-info-solid-foreground: unset;
71
85
  --color-success: unset;
72
86
  --color-success-foreground: unset;
87
+ --color-success-solid-foreground: unset;
73
88
  --color-warning: unset;
74
89
  --color-warning-foreground: unset;
90
+ --color-warning-solid-foreground: unset;
75
91
  --color-border: unset;
76
92
  --color-input: unset;
77
93
  --color-ring: unset;
@@ -194,6 +210,8 @@
194
210
 
195
211
  --color-overlay: #ffffff;
196
212
  --color-overlay-foreground: #262626;
213
+ /* the sunken band under a card or dialog: black at 3.5% */
214
+ --color-inset: rgba(0, 0, 0, 0.035);
197
215
 
198
216
  --color-primary: #262626;
199
217
  --color-primary-foreground: #fafafa;
@@ -212,15 +230,19 @@
212
230
  /* status: {hue}-500, foreground {hue}-700 */
213
231
  --color-destructive: #ef4444;
214
232
  --color-destructive-foreground: #b91c1c;
233
+ --color-destructive-solid-foreground: #171717;
215
234
 
216
235
  --color-info: #3b82f6;
217
236
  --color-info-foreground: #1d4ed8;
237
+ --color-info-solid-foreground: #171717;
218
238
 
219
239
  --color-success: #10b981;
220
240
  --color-success-foreground: #047857;
241
+ --color-success-solid-foreground: #171717;
221
242
 
222
243
  --color-warning: #f59e0b;
223
244
  --color-warning-foreground: #b45309;
245
+ --color-warning-solid-foreground: #171717;
224
246
 
225
247
  /* border: black 8%, input: black 10% */
226
248
  --color-border: rgba(0, 0, 0, 0.08);
@@ -289,6 +311,8 @@
289
311
  /* color-mix(background 92%, white) — one step past the popover */
290
312
  --color-overlay: #232323;
291
313
  --color-overlay-foreground: #f5f5f5;
314
+ /* the sunken band under a card or dialog: black at 22% */
315
+ --color-inset: rgba(0, 0, 0, 0.22);
292
316
 
293
317
  --color-primary: #f5f5f5;
294
318
  --color-primary-foreground: #262626;
@@ -311,15 +335,19 @@
311
335
  /* color-mix(red-500 90%, white), foreground {hue}-400 */
312
336
  --color-destructive: #f15757;
313
337
  --color-destructive-foreground: #f87171;
338
+ --color-destructive-solid-foreground: #171717;
314
339
 
315
340
  --color-info: #3b82f6;
316
341
  --color-info-foreground: #60a5fa;
342
+ --color-info-solid-foreground: #171717;
317
343
 
318
344
  --color-success: #10b981;
319
345
  --color-success-foreground: #34d399;
346
+ --color-success-solid-foreground: #171717;
320
347
 
321
348
  --color-warning: #f59e0b;
322
349
  --color-warning-foreground: #fbbf24;
350
+ --color-warning-solid-foreground: #171717;
323
351
 
324
352
  /* border: white 6%, input: white 8% */
325
353
  --color-border: rgba(255, 255, 255, 0.06);
@@ -413,6 +441,8 @@
413
441
 
414
442
  --color-overlay: #ffffff;
415
443
  --color-overlay-foreground: #08090a;
444
+ /* the sunken band under a card or dialog: black at 3.5% */
445
+ --color-inset: rgba(0, 0, 0, 0.035);
416
446
 
417
447
  --color-primary: #5e6ad2;
418
448
  --color-primary-foreground: #ffffff;
@@ -428,15 +458,19 @@
428
458
 
429
459
  --color-destructive: #eb5757;
430
460
  --color-destructive-foreground: #c62b30;
461
+ --color-destructive-solid-foreground: #08090a;
431
462
 
432
463
  --color-info: #4ea7fc;
433
464
  --color-info-foreground: #0b6ec4;
465
+ --color-info-solid-foreground: #08090a;
434
466
 
435
467
  --color-success: #27a644;
436
468
  --color-success-foreground: #1c7a32;
469
+ --color-success-solid-foreground: #08090a;
437
470
 
438
471
  --color-warning: #f2c94c;
439
472
  --color-warning-foreground: #8a6d0b;
473
+ --color-warning-solid-foreground: #08090a;
440
474
 
441
475
  --color-border: rgba(0, 0, 0, 0.08);
442
476
  --color-input: rgba(0, 0, 0, 0.12);
@@ -496,6 +530,8 @@
496
530
 
497
531
  --color-overlay: #18191a;
498
532
  --color-overlay-foreground: #f7f8f8;
533
+ /* the sunken band under a card or dialog: black at 22% */
534
+ --color-inset: rgba(0, 0, 0, 0.22);
499
535
 
500
536
  --color-primary: #5e6ad2;
501
537
  --color-primary-foreground: #ffffff;
@@ -511,15 +547,19 @@
511
547
 
512
548
  --color-destructive: #eb5757;
513
549
  --color-destructive-foreground: #ff8a8a;
550
+ --color-destructive-solid-foreground: #08090a;
514
551
 
515
552
  --color-info: #4ea7fc;
516
553
  --color-info-foreground: #8ec5ff;
554
+ --color-info-solid-foreground: #08090a;
517
555
 
518
556
  --color-success: #27a644;
519
557
  --color-success-foreground: #4cc061;
558
+ --color-success-solid-foreground: #08090a;
520
559
 
521
560
  --color-warning: #f2c94c;
522
561
  --color-warning-foreground: #f5d97a;
562
+ --color-warning-solid-foreground: #08090a;
523
563
 
524
564
  /* The hairlines are opaque, not translucent: the surface ladder is only
525
565
  a few points wide, so a border mixed with whatever is under it would
@@ -583,11 +623,12 @@
583
623
 
584
624
  --color-overlay: #ffffff;
585
625
  --color-overlay-foreground: #171717;
626
+ /* the sunken band under a card or dialog: black at 3.5% */
627
+ --color-inset: rgba(0, 0, 0, 0.035);
586
628
 
587
- /* Brand green is too light for white text; light mode uses the
588
- darker ramp step so the contrast ratio holds. */
629
+ /* Dark green ink preserves the brand fill and clears the body-text floor. */
589
630
  --color-primary: #24b47e;
590
- --color-primary-foreground: #ffffff;
631
+ --color-primary-foreground: #052e1b;
591
632
 
592
633
  --color-secondary: rgba(0, 0, 0, 0.05);
593
634
  --color-secondary-foreground: #171717;
@@ -600,15 +641,19 @@
600
641
 
601
642
  --color-destructive: #ef4444;
602
643
  --color-destructive-foreground: #b91c1c;
644
+ --color-destructive-solid-foreground: #171717;
603
645
 
604
646
  --color-info: #3b82f6;
605
647
  --color-info-foreground: #1d4ed8;
648
+ --color-info-solid-foreground: #171717;
606
649
 
607
650
  --color-success: #24b47e;
608
651
  --color-success-foreground: #16794c;
652
+ --color-success-solid-foreground: #171717;
609
653
 
610
654
  --color-warning: #f59e0b;
611
655
  --color-warning-foreground: #b45309;
656
+ --color-warning-solid-foreground: #171717;
612
657
 
613
658
  --color-border: rgba(0, 0, 0, 0.08);
614
659
  --color-input: rgba(0, 0, 0, 0.1);
@@ -668,6 +713,8 @@
668
713
 
669
714
  --color-overlay: #2a2a2a;
670
715
  --color-overlay-foreground: #ededed;
716
+ /* the sunken band under a card or dialog: black at 22% */
717
+ --color-inset: rgba(0, 0, 0, 0.22);
671
718
 
672
719
  --color-primary: #3ecf8e;
673
720
  --color-primary-foreground: #052e1b;
@@ -683,15 +730,19 @@
683
730
 
684
731
  --color-destructive: #f15757;
685
732
  --color-destructive-foreground: #f87171;
733
+ --color-destructive-solid-foreground: #171717;
686
734
 
687
735
  --color-info: #3b82f6;
688
736
  --color-info-foreground: #60a5fa;
737
+ --color-info-solid-foreground: #171717;
689
738
 
690
739
  --color-success: #3ecf8e;
691
740
  --color-success-foreground: #4ade80;
741
+ --color-success-solid-foreground: #171717;
692
742
 
693
743
  --color-warning: #f59e0b;
694
744
  --color-warning-foreground: #fbbf24;
745
+ --color-warning-solid-foreground: #171717;
695
746
 
696
747
  --color-border: rgba(255, 255, 255, 0.07);
697
748
  --color-input: rgba(255, 255, 255, 0.1);