@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.
- package/docs/adoption-matrix.mdx +2 -2
- package/docs/conversation-sidebar.mdx +1 -1
- package/docs/design-tokens.mdx +1 -1
- package/docs/sidebar.mdx +2 -2
- package/docs/task-catalog.json +1 -1
- package/docs/task-catalog.mdx +1 -1
- package/docs/theme.mdx +3 -0
- package/lib/commonjs/conversation-sidebar/create-conversation-sidebar.js +6 -3
- package/lib/commonjs/conversation-sidebar/create-conversation-sidebar.js.map +1 -1
- package/lib/commonjs/conversation-sidebar/index.js +1 -1
- package/lib/commonjs/conversation-sidebar/index.web.js +1 -1
- package/lib/commonjs/design-tokens/tokens.json +445 -0
- package/lib/commonjs/sidebar/SidebarToolbar.js +24 -9
- package/lib/commonjs/sidebar/SidebarToolbar.js.map +1 -1
- package/lib/commonjs/sidebar/SidebarTreeSection.js +17 -6
- package/lib/commonjs/sidebar/SidebarTreeSection.js.map +1 -1
- package/lib/commonjs/theme/color-presets.js +10 -1
- package/lib/commonjs/theme/color-presets.js.map +1 -1
- package/lib/commonjs/theme/preset-accent-hues.js +4 -0
- package/lib/commonjs/theme/preset-accent-hues.js.map +1 -1
- package/lib/module/conversation-sidebar/create-conversation-sidebar.js +6 -3
- package/lib/module/conversation-sidebar/create-conversation-sidebar.js.map +1 -1
- package/lib/module/conversation-sidebar/index.js +1 -1
- package/lib/module/conversation-sidebar/index.web.js +1 -1
- package/lib/module/design-tokens/tokens.json +445 -0
- package/lib/module/sidebar/SidebarToolbar.js +24 -9
- package/lib/module/sidebar/SidebarToolbar.js.map +1 -1
- package/lib/module/sidebar/SidebarTreeSection.js +16 -5
- package/lib/module/sidebar/SidebarTreeSection.js.map +1 -1
- package/lib/module/theme/color-presets.js +10 -1
- package/lib/module/theme/color-presets.js.map +1 -1
- package/lib/module/theme/preset-accent-hues.js +4 -0
- package/lib/module/theme/preset-accent-hues.js.map +1 -1
- package/lib/typescript/commonjs/conversation-sidebar/create-conversation-sidebar.d.ts.map +1 -1
- package/lib/typescript/commonjs/conversation-sidebar/index.d.ts +1 -1
- package/lib/typescript/commonjs/conversation-sidebar/index.web.d.ts +1 -1
- package/lib/typescript/commonjs/sidebar/SidebarToolbar.d.ts +5 -1
- package/lib/typescript/commonjs/sidebar/SidebarToolbar.d.ts.map +1 -1
- package/lib/typescript/commonjs/sidebar/SidebarTreeSection.d.ts +7 -1
- package/lib/typescript/commonjs/sidebar/SidebarTreeSection.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/color-presets.d.ts +10 -1
- package/lib/typescript/commonjs/theme/color-presets.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme/preset-accent-hues.d.ts.map +1 -1
- package/lib/typescript/module/conversation-sidebar/create-conversation-sidebar.d.ts.map +1 -1
- package/lib/typescript/module/conversation-sidebar/index.d.ts +1 -1
- package/lib/typescript/module/conversation-sidebar/index.web.d.ts +1 -1
- package/lib/typescript/module/sidebar/SidebarToolbar.d.ts +5 -1
- package/lib/typescript/module/sidebar/SidebarToolbar.d.ts.map +1 -1
- package/lib/typescript/module/sidebar/SidebarTreeSection.d.ts +7 -1
- package/lib/typescript/module/sidebar/SidebarTreeSection.d.ts.map +1 -1
- package/lib/typescript/module/theme/color-presets.d.ts +10 -1
- package/lib/typescript/module/theme/color-presets.d.ts.map +1 -1
- package/lib/typescript/module/theme/preset-accent-hues.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/conversation-sidebar/create-conversation-sidebar.tsx +3 -2
- package/src/conversation-sidebar/index.ts +1 -1
- package/src/conversation-sidebar/index.web.ts +1 -1
- package/src/design-tokens/tokens.json +445 -0
- package/src/sidebar/SidebarToolbar.tsx +22 -10
- package/src/sidebar/SidebarTreeSection.tsx +15 -4
- package/src/theme/__tests__/__fixtures__/golden-resolved-tokens.json +146 -0
- package/src/theme/color-presets.ts +11 -1
- package/src/theme/preset-accent-hues.ts +1 -0
|
@@ -10,7 +10,7 @@ import * as Dropdown from "../dropdown-menu/index.web.js";
|
|
|
10
10
|
import { createConversationSidebar } from "./create-conversation-sidebar.js";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* A sidebar of conversations:
|
|
13
|
+
* A sidebar of conversations: its tools on top (search, and the store and "+" buttons when given), a list
|
|
14
14
|
* of conversations with their agents' avatars and a context menu each, and the panel's own footer.
|
|
15
15
|
*/
|
|
16
16
|
export const ConversationSidebar = createConversationSidebar({
|
|
@@ -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": {
|
|
@@ -16,8 +16,14 @@ const AnimatedView = Animated.createAnimatedComponent(StyledView);
|
|
|
16
16
|
|
|
17
17
|
/** How long after the field loses focus the empty search closes. */
|
|
18
18
|
const BLUR_CLOSE_MS = 150;
|
|
19
|
+
/** Between two slots of the row. */
|
|
20
|
+
const SLOT_GAP = 8;
|
|
19
21
|
|
|
20
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* The search's slot and one per action share the row in equal parts, however many actions there
|
|
24
|
+
* are; the closed search covers the first slot and opens across all of them. The sidebar owns its
|
|
25
|
+
* viewport.
|
|
26
|
+
*/
|
|
21
27
|
export function SidebarToolbar({
|
|
22
28
|
actions = [],
|
|
23
29
|
search,
|
|
@@ -55,10 +61,14 @@ export function SidebarToolbar({
|
|
|
55
61
|
return undefined;
|
|
56
62
|
}, [search.open, reduced, progress, actionsProgress]);
|
|
57
63
|
const slots = actions.length + 1;
|
|
58
|
-
const
|
|
64
|
+
const gaps = SLOT_GAP * (slots - 1);
|
|
65
|
+
// The first slot's width. Web states it in CSS, so it holds before any layout and through
|
|
66
|
+
// resizes; native animates between numbers, so it measures the row (a share of it until then).
|
|
67
|
+
const webCollapsedWidth = slots === 1 ? '100%' : `calc((100% - ${gaps}px) / ${slots})`;
|
|
68
|
+
const collapsedWidth = width > 0 ? (width - gaps) / slots : null;
|
|
59
69
|
const searchWidth = useAnimatedStyle(() => ({
|
|
60
|
-
width:
|
|
61
|
-
}), [width, collapsedWidth, progress]);
|
|
70
|
+
width: collapsedWidth != null ? collapsedWidth + (width - collapsedWidth) * progress.value : progress.value > 0 ? '100%' : `${100 / slots}%`
|
|
71
|
+
}), [width, collapsedWidth, slots, progress]);
|
|
62
72
|
const actionsStyle = useAnimatedStyle(() => {
|
|
63
73
|
const hidden = actionsProgress.value;
|
|
64
74
|
return {
|
|
@@ -96,20 +106,24 @@ export function SidebarToolbar({
|
|
|
96
106
|
}, style],
|
|
97
107
|
onLayout: event => setWidth(event.nativeEvent.layout.width),
|
|
98
108
|
children: [/*#__PURE__*/_jsxs(StyledView, {
|
|
99
|
-
|
|
109
|
+
testID: testID ? `${testID}-slots` : undefined,
|
|
110
|
+
className: "h-full flex-row gap-2",
|
|
100
111
|
style: {
|
|
112
|
+
height: '100%',
|
|
101
113
|
flexDirection: 'row',
|
|
102
|
-
gap:
|
|
114
|
+
gap: SLOT_GAP
|
|
103
115
|
},
|
|
104
116
|
children: [/*#__PURE__*/_jsx(StyledView, {
|
|
105
117
|
"aria-hidden": true,
|
|
106
118
|
style: {
|
|
107
|
-
flex: 1
|
|
119
|
+
flex: 1,
|
|
120
|
+
minWidth: 0
|
|
108
121
|
}
|
|
109
122
|
}), actions.map((action, index) => /*#__PURE__*/_jsx(AnimatedView, {
|
|
110
123
|
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'}` : ''}`,
|
|
111
124
|
style: [{
|
|
112
|
-
flex: 1
|
|
125
|
+
flex: 1,
|
|
126
|
+
minWidth: 0
|
|
113
127
|
}, !IS_WEB && actionsStyle],
|
|
114
128
|
pointerEvents: search.open ? 'none' : 'auto',
|
|
115
129
|
"aria-hidden": search.open,
|
|
@@ -121,6 +135,7 @@ export function SidebarToolbar({
|
|
|
121
135
|
children: action
|
|
122
136
|
}, index))]
|
|
123
137
|
}), /*#__PURE__*/_jsx(AnimatedView, {
|
|
138
|
+
testID: testID ? `${testID}-search` : undefined,
|
|
124
139
|
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' : ''}`,
|
|
125
140
|
style: [{
|
|
126
141
|
position: 'absolute',
|
|
@@ -130,7 +145,7 @@ export function SidebarToolbar({
|
|
|
130
145
|
borderRadius: 999,
|
|
131
146
|
backgroundColor: palette.tertiary
|
|
132
147
|
}, IS_WEB ? {
|
|
133
|
-
width: search.open ? '100%' :
|
|
148
|
+
width: search.open ? '100%' : webCollapsedWidth
|
|
134
149
|
} : searchWidth],
|
|
135
150
|
children: !search.open ? /*#__PURE__*/_jsx(Button, {
|
|
136
151
|
ref: trigger,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useRef","useState","Animated","Easing","useAnimatedStyle","useSharedValue","withTiming","Button","CloseButton","useDirectionProps","useIsRtl","RiSearchLine","useCommonMessages","StyledView","TextField","TextFieldIcon","TextFieldInput","useSidebarPalette","IS_WEB","usePrefersReducedMotion","jsx","_jsx","jsxs","_jsxs","AnimatedView","createAnimatedComponent","BLUR_CLOSE_MS","SidebarToolbar","actions","search","style","testID","common","palette","direction","rtl","input","trigger","width","setWidth","reduced","progress","Number","open","actionsProgress","easing","bezier","value","duration","frame","requestAnimationFrame","current","focus","cancelAnimationFrame","undefined","slots","length","collapsedWidth","searchWidth","actionsStyle","hidden","opacity","transform","translateX","scale","close","onValueChange","onOpenChange","onBlur","setTimeout","label","accessibilityLabel","className","height","onLayout","event","nativeEvent","layout","children","flexDirection","gap","flex","map","action","index","pointerEvents","accessibilityElementsHidden","importantForAccessibility","inert","position","top","bottom","insetInlineStart","borderRadius","backgroundColor","tertiary","ref","appearance","tone","iconOnly","leadingIcon","borderWidth","onPress","radius","paddingInlineStart","paddingInlineEnd","icon","inputRef","placeholder","onChangeText","onKeyPress","key","insetInlineEnd","closeLabel","size"],"sourceRoot":"../../../src","sources":["sidebar/SidebarToolbar.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAuBC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAE7E,OAAOC,QAAQ,IACbC,MAAM,EACNC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,QACL,yBAAyB;AAChC,SAASC,MAAM,EAAEC,WAAW,QAAQ,WAAW;AAC/C,SAASC,iBAAiB,EAAEC,QAAQ,QAAQ,wBAAqB;AACjE,SAASC,YAAY,QAAQ,gCAA6B;AAC1D,SAASC,iBAAiB,QAAQ,8BAA2B;AAC7D,SAASC,UAAU,QAAQ,gCAA6B;AACxD,SAASC,SAAS,EAAEC,aAAa,EAAEC,cAAc,QAAQ,wBAAe;AACxE,SAASC,iBAAiB,QAAQ,cAAW;AAG7C,SAASC,MAAM,QAAQ,uBAAoB;AAC3C,SAASC,uBAAuB,QAAQ,wCAAqC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE9E,MAAMC,YAAY,GAAGtB,QAAQ,CAACuB,uBAAuB,CAACZ,UAAU,CAAC;;AAEjE;AACA,MAAMa,aAAa,GAAG,GAAG;;
|
|
1
|
+
{"version":3,"names":["React","useEffect","useRef","useState","Animated","Easing","useAnimatedStyle","useSharedValue","withTiming","Button","CloseButton","useDirectionProps","useIsRtl","RiSearchLine","useCommonMessages","StyledView","TextField","TextFieldIcon","TextFieldInput","useSidebarPalette","IS_WEB","usePrefersReducedMotion","jsx","_jsx","jsxs","_jsxs","AnimatedView","createAnimatedComponent","BLUR_CLOSE_MS","SLOT_GAP","SidebarToolbar","actions","search","style","testID","common","palette","direction","rtl","input","trigger","width","setWidth","reduced","progress","Number","open","actionsProgress","easing","bezier","value","duration","frame","requestAnimationFrame","current","focus","cancelAnimationFrame","undefined","slots","length","gaps","webCollapsedWidth","collapsedWidth","searchWidth","actionsStyle","hidden","opacity","transform","translateX","scale","close","onValueChange","onOpenChange","onBlur","setTimeout","label","accessibilityLabel","className","height","onLayout","event","nativeEvent","layout","children","flexDirection","gap","flex","minWidth","map","action","index","pointerEvents","accessibilityElementsHidden","importantForAccessibility","inert","position","top","bottom","insetInlineStart","borderRadius","backgroundColor","tertiary","ref","appearance","tone","iconOnly","leadingIcon","borderWidth","onPress","radius","paddingInlineStart","paddingInlineEnd","icon","inputRef","placeholder","onChangeText","onKeyPress","key","insetInlineEnd","closeLabel","size"],"sourceRoot":"../../../src","sources":["sidebar/SidebarToolbar.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAuBC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAE7E,OAAOC,QAAQ,IACbC,MAAM,EACNC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,QACL,yBAAyB;AAChC,SAASC,MAAM,EAAEC,WAAW,QAAQ,WAAW;AAC/C,SAASC,iBAAiB,EAAEC,QAAQ,QAAQ,wBAAqB;AACjE,SAASC,YAAY,QAAQ,gCAA6B;AAC1D,SAASC,iBAAiB,QAAQ,8BAA2B;AAC7D,SAASC,UAAU,QAAQ,gCAA6B;AACxD,SAASC,SAAS,EAAEC,aAAa,EAAEC,cAAc,QAAQ,wBAAe;AACxE,SAASC,iBAAiB,QAAQ,cAAW;AAG7C,SAASC,MAAM,QAAQ,uBAAoB;AAC3C,SAASC,uBAAuB,QAAQ,wCAAqC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE9E,MAAMC,YAAY,GAAGtB,QAAQ,CAACuB,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AA5B,QAAA,gBAEF5D,IAAA,CAACN,aAAa;YAAC+F,IAAI,EAAEnG;UAAa,CAAE,CAAC,eACrCU,IAAA,CAACL,cAAc;YACb+F,QAAQ,EAAE1E,KAAM;YAChBoC,KAAK,EAAEA,KAAM;YACbuC,WAAW,EAAElF,MAAM,CAACkF,WAAW,IAAIvC,KAAM;YACzCzB,KAAK,EAAElB,MAAM,CAACkB,KAAM;YACpBiE,YAAY,EAAEnF,MAAM,CAACuC,aAAc;YACnCE,MAAM,EAAEA,MAAO;YACf2C,UAAU,EAAGpC,KAAK,IAAK;cACrB,IAAIA,KAAK,CAACC,WAAW,CAACoC,GAAG,KAAK,QAAQ,EAAE/C,KAAK,CAAC,CAAC;YACjD;UAAE,CACH,CAAC;QAAA,CACO,CAAC,eACZ/C,IAAA,CAACR,UAAU;UACT8D,SAAS,EAAC,sBAAsB;UAChC5C,KAAK,EAAE;YAAE8D,QAAQ,EAAE,UAAU;YAAEuB,cAAc,EAAE,CAAC;YAAEtB,GAAG,EAAE;UAAE,CAAE;UAAAb,QAAA,eAE3D5D,IAAA,CAACb,WAAW;YACVkE,kBAAkB,EAAE5C,MAAM,CAACuF,UAAU,IAAIpF,MAAM,CAACmC,KAAM;YACtDkD,IAAI,EAAC,IAAI;YACTZ,OAAO,EAAEtC;UAAM,CAChB;QAAC,CACQ,CAAC;MAAA,CACH;IACb,CACW,CAAC;EAAA,CACL,CAAC;AAEjB","ignoreList":[]}
|
|
@@ -26,13 +26,21 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
26
26
|
const EASE_IN_OUT = Easing.bezier(0.4, 0, 0.2, 1);
|
|
27
27
|
/** One level of nesting: a row's content starts this much further in than its parent's. */
|
|
28
28
|
export const TREE_INDENT = 16;
|
|
29
|
+
/**
|
|
30
|
+
* Where a top-level row's content starts (its disclosure, glyph, avatar or label), and so where
|
|
31
|
+
* the section's label and status start: one edge from the title down.
|
|
32
|
+
*/
|
|
33
|
+
export const TREE_INSET = 8;
|
|
34
|
+
/** Where a row's `actions` end: the section's own `actions` end there too. */
|
|
35
|
+
const TREE_ACTIONS_INSET = 4;
|
|
29
36
|
/** Long enough that a press opens the row and a swipe still scrolls the sidebar. */
|
|
30
37
|
const LIFT_AFTER_MS = 350;
|
|
31
38
|
const DRAG_MIME = 'application/x-bloom-sidebar-row';
|
|
32
39
|
/**
|
|
33
40
|
* One labelled section of the sidebar's tree.
|
|
34
41
|
*
|
|
35
|
-
* label `tree.label` text-secondary,
|
|
42
|
+
* label `tree.label` text-secondary, inset 8 like the rows' content (its
|
|
43
|
+
* `actions` at the end, inset 4 like theirs). A
|
|
36
44
|
* `collapsible` section's label is a disclosure (16px chevron,
|
|
37
45
|
* turning 90° open) that shows and hides the rows (300ms).
|
|
38
46
|
* status `loading` / `error` (an alert, in the danger role) / `emptyLabel`,
|
|
@@ -146,8 +154,8 @@ export const SidebarTreeSection = /*#__PURE__*/memo(function SidebarTreeSection(
|
|
|
146
154
|
});
|
|
147
155
|
});
|
|
148
156
|
const statusStyle = {
|
|
149
|
-
paddingLeft:
|
|
150
|
-
paddingRight:
|
|
157
|
+
paddingLeft: TREE_INSET,
|
|
158
|
+
paddingRight: TREE_INSET
|
|
151
159
|
};
|
|
152
160
|
function SectionLabel({
|
|
153
161
|
section,
|
|
@@ -198,6 +206,9 @@ function SectionLabel({
|
|
|
198
206
|
alignItems: 'center',
|
|
199
207
|
justifyContent: 'space-between',
|
|
200
208
|
gap: 8,
|
|
209
|
+
// The title starts where its rows' content does, and its actions end where theirs do.
|
|
210
|
+
paddingInlineStart: TREE_INSET,
|
|
211
|
+
paddingInlineEnd: section.actions != null ? TREE_ACTIONS_INSET : TREE_INSET,
|
|
201
212
|
borderRadius: borderRadius.full,
|
|
202
213
|
...(dropHere ? {
|
|
203
214
|
boxShadow: `inset 0 0 0 2px ${palette.ring}`
|
|
@@ -495,7 +506,7 @@ const TreeRow = /*#__PURE__*/memo(function TreeRow({
|
|
|
495
506
|
// A row with a description is a contact (picture, name, last line): its picture is as tall as the
|
|
496
507
|
// two lines. Any other `leading` stays in the glyph's box.
|
|
497
508
|
const leadingBox = item.leading != null && item.description != null ? tree.avatar : tree.icon;
|
|
498
|
-
const inset =
|
|
509
|
+
const inset = TREE_INSET + depth * TREE_INDENT;
|
|
499
510
|
const Icon = item.icon;
|
|
500
511
|
const row = /*#__PURE__*/_jsxs(View, {
|
|
501
512
|
ref: ref,
|
|
@@ -520,7 +531,7 @@ const TreeRow = /*#__PURE__*/memo(function TreeRow({
|
|
|
520
531
|
// With a disclosure lane the inset comes before it; without one it is
|
|
521
532
|
// part of the row's press target, as a folder's row is.
|
|
522
533
|
paddingInlineStart: nests ? inset : 0,
|
|
523
|
-
paddingInlineEnd: item.actions != null ?
|
|
534
|
+
paddingInlineEnd: item.actions != null ? TREE_ACTIONS_INSET : 0,
|
|
524
535
|
backgroundColor: lit ? palette.selected : indicator === 'inside' ? palette.tertiaryHover : selected || hovered ? palette.rowHover : 'transparent',
|
|
525
536
|
opacity: dragging && IS_WEB ? 0.5 : 1
|
|
526
537
|
},
|