@oxy.so/bloom 19.8.3 → 19.9.1

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 (63) hide show
  1. package/docs/adoption-matrix.mdx +2 -2
  2. package/docs/conversation-sidebar.mdx +1 -1
  3. package/docs/design-tokens.mdx +1 -1
  4. package/docs/sidebar.mdx +2 -2
  5. package/docs/task-catalog.json +1 -1
  6. package/docs/task-catalog.mdx +1 -1
  7. package/docs/theme.mdx +3 -0
  8. package/lib/commonjs/conversation-sidebar/create-conversation-sidebar.js +6 -3
  9. package/lib/commonjs/conversation-sidebar/create-conversation-sidebar.js.map +1 -1
  10. package/lib/commonjs/conversation-sidebar/index.js +1 -1
  11. package/lib/commonjs/conversation-sidebar/index.web.js +1 -1
  12. package/lib/commonjs/design-tokens/tokens.json +445 -0
  13. package/lib/commonjs/sidebar/SidebarToolbar.js +24 -9
  14. package/lib/commonjs/sidebar/SidebarToolbar.js.map +1 -1
  15. package/lib/commonjs/sidebar/SidebarTreeSection.js +17 -6
  16. package/lib/commonjs/sidebar/SidebarTreeSection.js.map +1 -1
  17. package/lib/commonjs/theme/color-presets.js +10 -1
  18. package/lib/commonjs/theme/color-presets.js.map +1 -1
  19. package/lib/commonjs/theme/preset-accent-hues.js +4 -0
  20. package/lib/commonjs/theme/preset-accent-hues.js.map +1 -1
  21. package/lib/module/conversation-sidebar/create-conversation-sidebar.js +6 -3
  22. package/lib/module/conversation-sidebar/create-conversation-sidebar.js.map +1 -1
  23. package/lib/module/conversation-sidebar/index.js +1 -1
  24. package/lib/module/conversation-sidebar/index.web.js +1 -1
  25. package/lib/module/design-tokens/tokens.json +445 -0
  26. package/lib/module/sidebar/SidebarToolbar.js +24 -9
  27. package/lib/module/sidebar/SidebarToolbar.js.map +1 -1
  28. package/lib/module/sidebar/SidebarTreeSection.js +16 -5
  29. package/lib/module/sidebar/SidebarTreeSection.js.map +1 -1
  30. package/lib/module/theme/color-presets.js +10 -1
  31. package/lib/module/theme/color-presets.js.map +1 -1
  32. package/lib/module/theme/preset-accent-hues.js +4 -0
  33. package/lib/module/theme/preset-accent-hues.js.map +1 -1
  34. package/lib/typescript/commonjs/conversation-sidebar/create-conversation-sidebar.d.ts.map +1 -1
  35. package/lib/typescript/commonjs/conversation-sidebar/index.d.ts +1 -1
  36. package/lib/typescript/commonjs/conversation-sidebar/index.web.d.ts +1 -1
  37. package/lib/typescript/commonjs/sidebar/SidebarToolbar.d.ts +5 -1
  38. package/lib/typescript/commonjs/sidebar/SidebarToolbar.d.ts.map +1 -1
  39. package/lib/typescript/commonjs/sidebar/SidebarTreeSection.d.ts +7 -1
  40. package/lib/typescript/commonjs/sidebar/SidebarTreeSection.d.ts.map +1 -1
  41. package/lib/typescript/commonjs/theme/color-presets.d.ts +10 -1
  42. package/lib/typescript/commonjs/theme/color-presets.d.ts.map +1 -1
  43. package/lib/typescript/commonjs/theme/preset-accent-hues.d.ts.map +1 -1
  44. package/lib/typescript/module/conversation-sidebar/create-conversation-sidebar.d.ts.map +1 -1
  45. package/lib/typescript/module/conversation-sidebar/index.d.ts +1 -1
  46. package/lib/typescript/module/conversation-sidebar/index.web.d.ts +1 -1
  47. package/lib/typescript/module/sidebar/SidebarToolbar.d.ts +5 -1
  48. package/lib/typescript/module/sidebar/SidebarToolbar.d.ts.map +1 -1
  49. package/lib/typescript/module/sidebar/SidebarTreeSection.d.ts +7 -1
  50. package/lib/typescript/module/sidebar/SidebarTreeSection.d.ts.map +1 -1
  51. package/lib/typescript/module/theme/color-presets.d.ts +10 -1
  52. package/lib/typescript/module/theme/color-presets.d.ts.map +1 -1
  53. package/lib/typescript/module/theme/preset-accent-hues.d.ts.map +1 -1
  54. package/package.json +1 -1
  55. package/src/conversation-sidebar/create-conversation-sidebar.tsx +3 -2
  56. package/src/conversation-sidebar/index.ts +1 -1
  57. package/src/conversation-sidebar/index.web.ts +1 -1
  58. package/src/design-tokens/tokens.json +445 -0
  59. package/src/sidebar/SidebarToolbar.tsx +22 -10
  60. package/src/sidebar/SidebarTreeSection.tsx +15 -4
  61. package/src/theme/__tests__/__fixtures__/golden-resolved-tokens.json +146 -0
  62. package/src/theme/color-presets.ts +11 -1
  63. package/src/theme/preset-accent-hues.ts +1 -0
@@ -28500,6 +28500,451 @@
28500
28500
  "$value": "#3b82f63d"
28501
28501
  }
28502
28502
  }
28503
+ },
28504
+ "gemies": {
28505
+ "$description": "Gemies green, reserved for the Gemies identity.",
28506
+ "$extensions": {
28507
+ "so.oxy.bloom": {
28508
+ "seed": "#1dfc00",
28509
+ "variant": "vivid",
28510
+ "displayName": "Gemies",
28511
+ "family": "brand",
28512
+ "description": "Gemies green, reserved for the Gemies identity.",
28513
+ "pairing": "derived",
28514
+ "featured": false,
28515
+ "gate": "handle"
28516
+ }
28517
+ },
28518
+ "light": {
28519
+ "background": {
28520
+ "$value": "#d5f8c6"
28521
+ },
28522
+ "foreground": {
28523
+ "$value": "#062103"
28524
+ },
28525
+ "surface": {
28526
+ "$value": "#caecbb"
28527
+ },
28528
+ "surface-foreground": {
28529
+ "$value": "#062103"
28530
+ },
28531
+ "popover": {
28532
+ "$value": "#bfe1b0"
28533
+ },
28534
+ "popover-foreground": {
28535
+ "$value": "#062103"
28536
+ },
28537
+ "primary": {
28538
+ "$value": "#0a7b00"
28539
+ },
28540
+ "primary-foreground": {
28541
+ "$value": "#ffffff"
28542
+ },
28543
+ "secondary": {
28544
+ "$value": "#5936f2"
28545
+ },
28546
+ "secondary-foreground": {
28547
+ "$value": "#ffffff"
28548
+ },
28549
+ "tertiary": {
28550
+ "$value": "#b9187e"
28551
+ },
28552
+ "tertiary-foreground": {
28553
+ "$value": "#ffffff"
28554
+ },
28555
+ "muted": {
28556
+ "$value": "#b4d6a6"
28557
+ },
28558
+ "muted-foreground": {
28559
+ "$value": "#324e2a"
28560
+ },
28561
+ "accent": {
28562
+ "$value": "#b4d6a6"
28563
+ },
28564
+ "accent-foreground": {
28565
+ "$value": "#324e2a"
28566
+ },
28567
+ "destructive": {
28568
+ "$value": "#ba1a1a"
28569
+ },
28570
+ "border": {
28571
+ "$value": "#99ba8c"
28572
+ },
28573
+ "input": {
28574
+ "$value": "#99ba8c"
28575
+ },
28576
+ "ring": {
28577
+ "$value": "#086e00"
28578
+ },
28579
+ "sidebar": {
28580
+ "$value": "#caecbb"
28581
+ },
28582
+ "card": {
28583
+ "$value": "#edffe1"
28584
+ },
28585
+ "card-foreground": {
28586
+ "$value": "#062103"
28587
+ },
28588
+ "chart-1": {
28589
+ "$value": "#318223"
28590
+ },
28591
+ "chart-2": {
28592
+ "$value": "#007e90"
28593
+ },
28594
+ "chart-3": {
28595
+ "$value": "#6464d8"
28596
+ },
28597
+ "chart-4": {
28598
+ "$value": "#bc487a"
28599
+ },
28600
+ "chart-5": {
28601
+ "$value": "#a16500"
28602
+ },
28603
+ "content-area": {
28604
+ "$value": "#dbfecb"
28605
+ },
28606
+ "sidebar-foreground": {
28607
+ "$value": "#062103"
28608
+ },
28609
+ "sidebar-primary": {
28610
+ "$value": "#086e00"
28611
+ },
28612
+ "sidebar-primary-foreground": {
28613
+ "$value": "#ffffff"
28614
+ },
28615
+ "sidebar-accent": {
28616
+ "$value": "#b4d6a6"
28617
+ },
28618
+ "sidebar-accent-foreground": {
28619
+ "$value": "#324e2a"
28620
+ },
28621
+ "sidebar-border": {
28622
+ "$value": "#99ba8c"
28623
+ },
28624
+ "sidebar-ring": {
28625
+ "$value": "#086e00"
28626
+ },
28627
+ "primary-text": {
28628
+ "$value": "#086e00"
28629
+ },
28630
+ "primary-subtle": {
28631
+ "$value": "#11a80021"
28632
+ },
28633
+ "secondary-text": {
28634
+ "$value": "#5c4cc0"
28635
+ },
28636
+ "secondary-subtle": {
28637
+ "$value": "#8f7fff21"
28638
+ },
28639
+ "tertiary-text": {
28640
+ "$value": "#a13571"
28641
+ },
28642
+ "tertiary-subtle": {
28643
+ "$value": "#ff40b221"
28644
+ },
28645
+ "chart-1-active": {
28646
+ "$value": "#196d0e"
28647
+ },
28648
+ "chart-2-active": {
28649
+ "$value": "#006877"
28650
+ },
28651
+ "chart-3-active": {
28652
+ "$value": "#504fc3"
28653
+ },
28654
+ "chart-4-active": {
28655
+ "$value": "#a33466"
28656
+ },
28657
+ "chart-5-active": {
28658
+ "$value": "#865300"
28659
+ },
28660
+ "chart-6": {
28661
+ "$value": "#00816c"
28662
+ },
28663
+ "chart-6-active": {
28664
+ "$value": "#006b59"
28665
+ },
28666
+ "chart-7": {
28667
+ "$value": "#0077bc"
28668
+ },
28669
+ "chart-7-active": {
28670
+ "$value": "#00629d"
28671
+ },
28672
+ "chart-8": {
28673
+ "$value": "#9e52b9"
28674
+ },
28675
+ "chart-8-active": {
28676
+ "$value": "#883da4"
28677
+ },
28678
+ "chart-9": {
28679
+ "$value": "#c04e2d"
28680
+ },
28681
+ "chart-9-active": {
28682
+ "$value": "#a63b1c"
28683
+ },
28684
+ "success": {
28685
+ "$value": "#007952"
28686
+ },
28687
+ "success-foreground": {
28688
+ "$value": "#ffffff"
28689
+ },
28690
+ "success-text": {
28691
+ "$value": "#006c49"
28692
+ },
28693
+ "success-subtle": {
28694
+ "$value": "#10b98121"
28695
+ },
28696
+ "error": {
28697
+ "$value": "#bf1f27"
28698
+ },
28699
+ "error-foreground": {
28700
+ "$value": "#ffffff"
28701
+ },
28702
+ "error-text": {
28703
+ "$value": "#a73735"
28704
+ },
28705
+ "error-subtle": {
28706
+ "$value": "#ef444421"
28707
+ },
28708
+ "warning": {
28709
+ "$value": "#945d00"
28710
+ },
28711
+ "warning-foreground": {
28712
+ "$value": "#ffffff"
28713
+ },
28714
+ "warning-text": {
28715
+ "$value": "#855300"
28716
+ },
28717
+ "warning-subtle": {
28718
+ "$value": "#f59e0b21"
28719
+ },
28720
+ "info": {
28721
+ "$value": "#0064d5"
28722
+ },
28723
+ "info-foreground": {
28724
+ "$value": "#ffffff"
28725
+ },
28726
+ "info-text": {
28727
+ "$value": "#015ac2"
28728
+ },
28729
+ "info-subtle": {
28730
+ "$value": "#3b82f621"
28731
+ }
28732
+ },
28733
+ "dark": {
28734
+ "background": {
28735
+ "$value": "#001200"
28736
+ },
28737
+ "foreground": {
28738
+ "$value": "#d5f8c6"
28739
+ },
28740
+ "surface": {
28741
+ "$value": "#062103"
28742
+ },
28743
+ "surface-foreground": {
28744
+ "$value": "#d5f8c6"
28745
+ },
28746
+ "popover": {
28747
+ "$value": "#0f2909"
28748
+ },
28749
+ "popover-foreground": {
28750
+ "$value": "#d5f8c6"
28751
+ },
28752
+ "primary": {
28753
+ "$value": "#1dfc01"
28754
+ },
28755
+ "primary-foreground": {
28756
+ "$value": "#000000"
28757
+ },
28758
+ "secondary": {
28759
+ "$value": "#6647ff"
28760
+ },
28761
+ "secondary-foreground": {
28762
+ "$value": "#ffffff"
28763
+ },
28764
+ "tertiary": {
28765
+ "$value": "#ca2a8b"
28766
+ },
28767
+ "tertiary-foreground": {
28768
+ "$value": "#ffffff"
28769
+ },
28770
+ "muted": {
28771
+ "$value": "#173211"
28772
+ },
28773
+ "muted-foreground": {
28774
+ "$value": "#afd0a1"
28775
+ },
28776
+ "accent": {
28777
+ "$value": "#173211"
28778
+ },
28779
+ "accent-foreground": {
28780
+ "$value": "#afd0a1"
28781
+ },
28782
+ "destructive": {
28783
+ "$value": "#ffb4ab"
28784
+ },
28785
+ "border": {
28786
+ "$value": "#3d5a34"
28787
+ },
28788
+ "input": {
28789
+ "$value": "#3d5a34"
28790
+ },
28791
+ "ring": {
28792
+ "$value": "#1ae600"
28793
+ },
28794
+ "sidebar": {
28795
+ "$value": "#062103"
28796
+ },
28797
+ "card": {
28798
+ "$value": "#203b19"
28799
+ },
28800
+ "card-foreground": {
28801
+ "$value": "#d5f8c6"
28802
+ },
28803
+ "chart-1": {
28804
+ "$value": "#70c45c"
28805
+ },
28806
+ "chart-2": {
28807
+ "$value": "#00c2dd"
28808
+ },
28809
+ "chart-3": {
28810
+ "$value": "#a8a8ff"
28811
+ },
28812
+ "chart-4": {
28813
+ "$value": "#ff8db8"
28814
+ },
28815
+ "chart-5": {
28816
+ "$value": "#f69d00"
28817
+ },
28818
+ "content-area": {
28819
+ "$value": "#011800"
28820
+ },
28821
+ "sidebar-foreground": {
28822
+ "$value": "#d5f8c6"
28823
+ },
28824
+ "sidebar-primary": {
28825
+ "$value": "#1ae600"
28826
+ },
28827
+ "sidebar-primary-foreground": {
28828
+ "$value": "#023900"
28829
+ },
28830
+ "sidebar-accent": {
28831
+ "$value": "#173211"
28832
+ },
28833
+ "sidebar-accent-foreground": {
28834
+ "$value": "#afd0a1"
28835
+ },
28836
+ "sidebar-border": {
28837
+ "$value": "#3d5a34"
28838
+ },
28839
+ "sidebar-ring": {
28840
+ "$value": "#1ae600"
28841
+ },
28842
+ "primary-text": {
28843
+ "$value": "#1ae600"
28844
+ },
28845
+ "primary-subtle": {
28846
+ "$value": "#11a8003d"
28847
+ },
28848
+ "secondary-text": {
28849
+ "$value": "#c8bfff"
28850
+ },
28851
+ "secondary-subtle": {
28852
+ "$value": "#8f7fff3d"
28853
+ },
28854
+ "tertiary-text": {
28855
+ "$value": "#ffafd3"
28856
+ },
28857
+ "tertiary-subtle": {
28858
+ "$value": "#ff40b23d"
28859
+ },
28860
+ "chart-1-active": {
28861
+ "$value": "#86db70"
28862
+ },
28863
+ "chart-2-active": {
28864
+ "$value": "#00daf8"
28865
+ },
28866
+ "chart-3-active": {
28867
+ "$value": "#c2c1ff"
28868
+ },
28869
+ "chart-4-active": {
28870
+ "$value": "#ffb0cb"
28871
+ },
28872
+ "chart-5-active": {
28873
+ "$value": "#ffb961"
28874
+ },
28875
+ "chart-6": {
28876
+ "$value": "#00c7a7"
28877
+ },
28878
+ "chart-6-active": {
28879
+ "$value": "#00e0bc"
28880
+ },
28881
+ "chart-7": {
28882
+ "$value": "#66b6ff"
28883
+ },
28884
+ "chart-7-active": {
28885
+ "$value": "#99cbff"
28886
+ },
28887
+ "chart-8": {
28888
+ "$value": "#e391fe"
28889
+ },
28890
+ "chart-8-active": {
28891
+ "$value": "#eeb1ff"
28892
+ },
28893
+ "chart-9": {
28894
+ "$value": "#ff9476"
28895
+ },
28896
+ "chart-9-active": {
28897
+ "$value": "#ffb5a0"
28898
+ },
28899
+ "success": {
28900
+ "$value": "#00875c"
28901
+ },
28902
+ "success-foreground": {
28903
+ "$value": "#ffffff"
28904
+ },
28905
+ "success-text": {
28906
+ "$value": "#3be0a1"
28907
+ },
28908
+ "success-subtle": {
28909
+ "$value": "#10b9813d"
28910
+ },
28911
+ "error": {
28912
+ "$value": "#d12d32"
28913
+ },
28914
+ "error-foreground": {
28915
+ "$value": "#ffffff"
28916
+ },
28917
+ "error-text": {
28918
+ "$value": "#ffb3ad"
28919
+ },
28920
+ "error-subtle": {
28921
+ "$value": "#ef44443d"
28922
+ },
28923
+ "warning": {
28924
+ "$value": "#a56800"
28925
+ },
28926
+ "warning-foreground": {
28927
+ "$value": "#ffffff"
28928
+ },
28929
+ "warning-text": {
28930
+ "$value": "#ffb95f"
28931
+ },
28932
+ "warning-subtle": {
28933
+ "$value": "#f59e0b3d"
28934
+ },
28935
+ "info": {
28936
+ "$value": "#2170e4"
28937
+ },
28938
+ "info-foreground": {
28939
+ "$value": "#ffffff"
28940
+ },
28941
+ "info-text": {
28942
+ "$value": "#adc6ff"
28943
+ },
28944
+ "info-subtle": {
28945
+ "$value": "#3b82f63d"
28946
+ }
28947
+ }
28503
28948
  }
28504
28949
  },
28505
28950
  "spacing": {
@@ -22,8 +22,14 @@ const AnimatedView = Animated.createAnimatedComponent(StyledView);
22
22
 
23
23
  /** How long after the field loses focus the empty search closes. */
24
24
  const BLUR_CLOSE_MS = 150;
25
+ /** Between two slots of the row. */
26
+ const SLOT_GAP = 8;
25
27
 
26
- /** Search and fixed action slots share one row; the sidebar owns its viewport. */
28
+ /**
29
+ * The search's slot and one per action share the row in equal parts, however many actions there
30
+ * are; the closed search covers the first slot and opens across all of them. The sidebar owns its
31
+ * viewport.
32
+ */
27
33
  export function SidebarToolbar({ actions = [], search, style, testID }: SidebarToolbarProps) {
28
34
  const common = useCommonMessages();
29
35
  const palette = useSidebarPalette();
@@ -54,17 +60,21 @@ export function SidebarToolbar({ actions = [], search, style, testID }: SidebarT
54
60
  return undefined;
55
61
  }, [search.open, reduced, progress, actionsProgress]);
56
62
  const slots = actions.length + 1;
57
- const collapsedWidth = width > 0 ? (width - 8 * (slots - 1)) / slots : 76;
63
+ const gaps = SLOT_GAP * (slots - 1);
64
+ // The first slot's width. Web states it in CSS, so it holds before any layout and through
65
+ // resizes; native animates between numbers, so it measures the row (a share of it until then).
66
+ const webCollapsedWidth = slots === 1 ? '100%' : `calc((100% - ${gaps}px) / ${slots})`;
67
+ const collapsedWidth = width > 0 ? (width - gaps) / slots : null;
58
68
  const searchWidth = useAnimatedStyle(
59
69
  () => ({
60
70
  width:
61
- width > 0
71
+ collapsedWidth != null
62
72
  ? collapsedWidth + (width - collapsedWidth) * progress.value
63
73
  : progress.value > 0
64
74
  ? '100%'
65
- : collapsedWidth,
75
+ : `${100 / slots}%`,
66
76
  }),
67
- [width, collapsedWidth, progress],
77
+ [width, collapsedWidth, slots, progress],
68
78
  );
69
79
  const actionsStyle = useAnimatedStyle(() => {
70
80
  const hidden = actionsProgress.value;
@@ -99,15 +109,16 @@ export function SidebarToolbar({ actions = [], search, style, testID }: SidebarT
99
109
  onLayout={(event) => setWidth(event.nativeEvent.layout.width)}
100
110
  >
101
111
  <StyledView
102
- className="grid h-full grid-cols-3 gap-2"
103
- style={{ flexDirection: 'row', gap: 8 }}
112
+ testID={testID ? `${testID}-slots` : undefined}
113
+ className="h-full flex-row gap-2"
114
+ style={{ height: '100%', flexDirection: 'row', gap: SLOT_GAP }}
104
115
  >
105
- <StyledView aria-hidden style={{ flex: 1 }} />
116
+ <StyledView aria-hidden style={{ flex: 1, minWidth: 0 }} />
106
117
  {actions.map((action, index) => (
107
118
  <AnimatedView
108
119
  key={index}
109
120
  className={`flex ${IS_WEB ? `transition-[opacity,transform] duration-200 motion-reduce:transition-none ${search.open ? `pointer-events-none ${rtl ? '-translate-x-2' : 'translate-x-2'} scale-95 opacity-0` : 'translate-x-0 scale-100 opacity-100'}` : ''}`}
110
- style={[{ flex: 1 }, !IS_WEB && actionsStyle]}
121
+ style={[{ flex: 1, minWidth: 0 }, !IS_WEB && actionsStyle]}
111
122
  pointerEvents={search.open ? 'none' : 'auto'}
112
123
  aria-hidden={search.open}
113
124
  accessibilityElementsHidden={search.open}
@@ -119,6 +130,7 @@ export function SidebarToolbar({ actions = [], search, style, testID }: SidebarT
119
130
  ))}
120
131
  </StyledView>
121
132
  <AnimatedView
133
+ testID={testID ? `${testID}-search` : undefined}
122
134
  className={`absolute inset-y-0 start-0 z-10 overflow-hidden rounded-full bg-background-tertiary-default ${IS_WEB ? 'transition-[width] duration-300 ease-in-out motion-reduce:transition-none' : ''}`}
123
135
  style={[
124
136
  {
@@ -129,7 +141,7 @@ export function SidebarToolbar({ actions = [], search, style, testID }: SidebarT
129
141
  borderRadius: 999,
130
142
  backgroundColor: palette.tertiary,
131
143
  },
132
- IS_WEB ? { width: search.open ? '100%' : collapsedWidth } : searchWidth,
144
+ IS_WEB ? { width: search.open ? '100%' : webCollapsedWidth } : searchWidth,
133
145
  ]}
134
146
  >
135
147
  {!search.open ? (
@@ -48,6 +48,13 @@ import { usePrefersReducedMotion } from '../hooks/use-prefers-reduced-motion';
48
48
  const EASE_IN_OUT = Easing.bezier(0.4, 0, 0.2, 1);
49
49
  /** One level of nesting: a row's content starts this much further in than its parent's. */
50
50
  export const TREE_INDENT = 16;
51
+ /**
52
+ * Where a top-level row's content starts (its disclosure, glyph, avatar or label), and so where
53
+ * the section's label and status start: one edge from the title down.
54
+ */
55
+ export const TREE_INSET = 8;
56
+ /** Where a row's `actions` end: the section's own `actions` end there too. */
57
+ const TREE_ACTIONS_INSET = 4;
51
58
  /** Long enough that a press opens the row and a swipe still scrolls the sidebar. */
52
59
  const LIFT_AFTER_MS = 350;
53
60
  const DRAG_MIME = 'application/x-bloom-sidebar-row';
@@ -57,7 +64,8 @@ type TreePress = (item: SidebarTreeItem, folder?: SidebarTreeFolder) => void;
57
64
  /**
58
65
  * One labelled section of the sidebar's tree.
59
66
  *
60
- * label `tree.label` text-secondary, its `actions` at the end. A
67
+ * label `tree.label` text-secondary, inset 8 like the rows' content (its
68
+ * `actions` at the end, inset 4 like theirs). A
61
69
  * `collapsible` section's label is a disclosure (16px chevron,
62
70
  * turning 90° open) that shows and hides the rows (300ms).
63
71
  * status `loading` / `error` (an alert, in the danger role) / `emptyLabel`,
@@ -177,7 +185,7 @@ export const SidebarTreeSection = memo(function SidebarTreeSection({
177
185
  );
178
186
  });
179
187
 
180
- const statusStyle = { paddingLeft: 8, paddingRight: 8 };
188
+ const statusStyle = { paddingLeft: TREE_INSET, paddingRight: TREE_INSET };
181
189
 
182
190
  function SectionLabel({
183
191
  section,
@@ -224,6 +232,9 @@ function SectionLabel({
224
232
  alignItems: 'center',
225
233
  justifyContent: 'space-between',
226
234
  gap: 8,
235
+ // The title starts where its rows' content does, and its actions end where theirs do.
236
+ paddingInlineStart: TREE_INSET,
237
+ paddingInlineEnd: section.actions != null ? TREE_ACTIONS_INSET : TREE_INSET,
227
238
  borderRadius: borderRadius.full,
228
239
  ...(dropHere ? { boxShadow: `inset 0 0 0 2px ${palette.ring}` } : null),
229
240
  }}
@@ -522,7 +533,7 @@ const TreeRow = memo(function TreeRow({
522
533
  // A row with a description is a contact (picture, name, last line): its picture is as tall as the
523
534
  // two lines. Any other `leading` stays in the glyph's box.
524
535
  const leadingBox = item.leading != null && item.description != null ? tree.avatar : tree.icon;
525
- const inset = 8 + depth * TREE_INDENT;
536
+ const inset = TREE_INSET + depth * TREE_INDENT;
526
537
  const Icon = item.icon;
527
538
  const row = (
528
539
  <View
@@ -544,7 +555,7 @@ const TreeRow = memo(function TreeRow({
544
555
  // With a disclosure lane the inset comes before it; without one it is
545
556
  // part of the row's press target, as a folder's row is.
546
557
  paddingInlineStart: nests ? inset : 0,
547
- paddingInlineEnd: item.actions != null ? 4 : 0,
558
+ paddingInlineEnd: item.actions != null ? TREE_ACTIONS_INSET : 0,
548
559
  backgroundColor: lit
549
560
  ? palette.selected
550
561
  : indicator === 'inside'