@newtonedev/editor 0.1.12 → 0.2.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/dist/Editor.d.ts.map +1 -1
- package/dist/components/CodeBlock.d.ts.map +1 -1
- package/dist/components/ConfiguratorPanel.d.ts +6 -3
- package/dist/components/ConfiguratorPanel.d.ts.map +1 -1
- package/dist/components/EditorHeader.d.ts +3 -2
- package/dist/components/EditorHeader.d.ts.map +1 -1
- package/dist/components/EditorShell.d.ts.map +1 -1
- package/dist/components/PresetSelector.d.ts +3 -2
- package/dist/components/PresetSelector.d.ts.map +1 -1
- package/dist/components/PreviewWindow.d.ts.map +1 -1
- package/dist/components/RightSidebar.d.ts.map +1 -1
- package/dist/components/Sidebar.d.ts +8 -1
- package/dist/components/Sidebar.d.ts.map +1 -1
- package/dist/components/TableOfContents.d.ts.map +1 -1
- package/dist/components/sections/ColorsSection.d.ts +6 -3
- package/dist/components/sections/ColorsSection.d.ts.map +1 -1
- package/dist/components/sections/DynamicRangeSection.d.ts +2 -2
- package/dist/components/sections/DynamicRangeSection.d.ts.map +1 -1
- package/dist/components/sections/FontsSection.d.ts +2 -2
- package/dist/components/sections/FontsSection.d.ts.map +1 -1
- package/dist/components/sections/IconsSection.d.ts +2 -2
- package/dist/components/sections/IconsSection.d.ts.map +1 -1
- package/dist/components/sections/OthersSection.d.ts +2 -2
- package/dist/components/sections/OthersSection.d.ts.map +1 -1
- package/dist/components/sections/ScalePlots.d.ts +11 -0
- package/dist/components/sections/ScalePlots.d.ts.map +1 -0
- package/dist/components/sections/index.d.ts +1 -0
- package/dist/components/sections/index.d.ts.map +1 -1
- package/dist/configurator/bridge/toCSS.d.ts +7 -0
- package/dist/configurator/bridge/toCSS.d.ts.map +1 -0
- package/dist/configurator/bridge/toJSON.d.ts +15 -0
- package/dist/configurator/bridge/toJSON.d.ts.map +1 -0
- package/dist/configurator/bridge/toThemeConfig.d.ts +8 -0
- package/dist/configurator/bridge/toThemeConfig.d.ts.map +1 -0
- package/dist/configurator/constants.d.ts +13 -0
- package/dist/configurator/constants.d.ts.map +1 -0
- package/dist/configurator/hex-conversion.d.ts +21 -0
- package/dist/configurator/hex-conversion.d.ts.map +1 -0
- package/dist/configurator/hooks/useConfigurator.d.ts +11 -0
- package/dist/configurator/hooks/useConfigurator.d.ts.map +1 -0
- package/dist/configurator/hooks/usePreviewColors.d.ts +8 -0
- package/dist/configurator/hooks/usePreviewColors.d.ts.map +1 -0
- package/dist/configurator/hooks/useWcagValidation.d.ts +20 -0
- package/dist/configurator/hooks/useWcagValidation.d.ts.map +1 -0
- package/dist/configurator/hue-conversion.d.ts +10 -0
- package/dist/configurator/hue-conversion.d.ts.map +1 -0
- package/dist/configurator/state/actions.d.ts +107 -0
- package/dist/configurator/state/actions.d.ts.map +1 -0
- package/dist/configurator/state/defaults.d.ts +7 -0
- package/dist/configurator/state/defaults.d.ts.map +1 -0
- package/dist/configurator/state/reducer.d.ts +19 -0
- package/dist/configurator/state/reducer.d.ts.map +1 -0
- package/dist/configurator/types.d.ts +60 -0
- package/dist/configurator/types.d.ts.map +1 -0
- package/dist/hooks/useEditorState.d.ts +8 -6
- package/dist/hooks/useEditorState.d.ts.map +1 -1
- package/dist/hooks/usePresets.d.ts +7 -6
- package/dist/hooks/usePresets.d.ts.map +1 -1
- package/dist/index.cjs +30372 -808
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +30351 -799
- package/dist/index.js.map +1 -1
- package/dist/preview/CategoryView.d.ts.map +1 -1
- package/dist/preview/ComponentDetailView.d.ts.map +1 -1
- package/dist/preview/ComponentRenderer.d.ts.map +1 -1
- package/dist/preview/IconBrowserView.d.ts.map +1 -1
- package/dist/preview/OverviewView.d.ts.map +1 -1
- package/dist/preview/PaletteScaleView.d.ts +11 -0
- package/dist/preview/PaletteScaleView.d.ts.map +1 -0
- package/dist/types.d.ts +4 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -4
- package/src/Editor.tsx +43 -19
- package/src/components/CodeBlock.tsx +7 -11
- package/src/components/ConfiguratorPanel.tsx +25 -18
- package/src/components/EditorHeader.tsx +29 -39
- package/src/components/EditorShell.tsx +17 -29
- package/src/components/FontPicker.tsx +7 -7
- package/src/components/PresetSelector.tsx +211 -129
- package/src/components/PreviewWindow.tsx +5 -12
- package/src/components/PrimaryNav.tsx +6 -6
- package/src/components/RightSidebar.tsx +24 -25
- package/src/components/Sidebar.tsx +54 -60
- package/src/components/TableOfContents.tsx +4 -5
- package/src/components/sections/ColorsSection.tsx +109 -121
- package/src/components/sections/DynamicRangeSection.tsx +61 -75
- package/src/components/sections/FontsSection.tsx +17 -28
- package/src/components/sections/IconsSection.tsx +2 -2
- package/src/components/sections/OthersSection.tsx +4 -5
- package/src/components/sections/ScalePlots.tsx +221 -0
- package/src/components/sections/index.ts +1 -0
- package/src/configurator/bridge/toCSS.ts +44 -0
- package/src/configurator/bridge/toJSON.ts +24 -0
- package/src/configurator/bridge/toThemeConfig.ts +114 -0
- package/src/configurator/constants.ts +13 -0
- package/src/configurator/hex-conversion.ts +67 -0
- package/src/configurator/hooks/useConfigurator.ts +33 -0
- package/src/configurator/hooks/usePreviewColors.ts +47 -0
- package/src/configurator/hooks/useWcagValidation.ts +133 -0
- package/src/configurator/hue-conversion.ts +25 -0
- package/src/configurator/state/actions.ts +43 -0
- package/src/configurator/state/defaults.ts +107 -0
- package/src/configurator/state/reducer.ts +399 -0
- package/src/configurator/types.ts +65 -0
- package/src/hooks/useEditorState.ts +25 -11
- package/src/hooks/usePresets.ts +54 -33
- package/src/index.ts +33 -0
- package/src/preview/CategoryView.tsx +8 -11
- package/src/preview/ComponentDetailView.tsx +24 -54
- package/src/preview/ComponentRenderer.tsx +2 -4
- package/src/preview/IconBrowserView.tsx +9 -10
- package/src/preview/OverviewView.tsx +9 -12
- package/src/preview/PaletteScaleView.tsx +122 -0
- package/src/types.ts +4 -3
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useCallback, type KeyboardEvent } from "react";
|
|
2
2
|
import { useTokens, getComponent, generateComponentCode, Select, NewtoneProvider, Icon } from "@newtonedev/components";
|
|
3
3
|
import type { EditableProp, NewtoneThemeConfig, ColorMode } from "@newtonedev/components";
|
|
4
|
-
import { srgbToHex } from "newtone";
|
|
5
4
|
import { CodeBlock } from "./CodeBlock";
|
|
6
5
|
import { ComponentRenderer } from "../preview/ComponentRenderer";
|
|
7
6
|
import type { SidebarSelection } from "../types";
|
|
@@ -50,8 +49,8 @@ export function RightSidebar({
|
|
|
50
49
|
transition: "transform 200ms ease, opacity 150ms ease",
|
|
51
50
|
display: "flex",
|
|
52
51
|
flexDirection: "column",
|
|
53
|
-
backgroundColor:
|
|
54
|
-
borderLeft: `1px solid ${
|
|
52
|
+
backgroundColor: tokens.colors.primary.main.background,
|
|
53
|
+
borderLeft: `1px solid ${tokens.colors.primary.main.fontDisabled}`,
|
|
55
54
|
}}
|
|
56
55
|
>
|
|
57
56
|
{selection && component && (
|
|
@@ -63,7 +62,7 @@ export function RightSidebar({
|
|
|
63
62
|
alignItems: "center",
|
|
64
63
|
justifyContent: "space-between",
|
|
65
64
|
padding: "12px 16px",
|
|
66
|
-
borderBottom: `1px solid ${
|
|
65
|
+
borderBottom: `1px solid ${tokens.colors.primary.main.fontDisabled}`,
|
|
67
66
|
flexShrink: 0,
|
|
68
67
|
}}
|
|
69
68
|
>
|
|
@@ -76,7 +75,7 @@ export function RightSidebar({
|
|
|
76
75
|
border: "none",
|
|
77
76
|
cursor: "pointer",
|
|
78
77
|
padding: 4,
|
|
79
|
-
color:
|
|
78
|
+
color: tokens.colors.primary.main.fontTertiary,
|
|
80
79
|
fontSize: 16,
|
|
81
80
|
lineHeight: 1,
|
|
82
81
|
flexShrink: 0,
|
|
@@ -84,7 +83,7 @@ export function RightSidebar({
|
|
|
84
83
|
alignItems: "center",
|
|
85
84
|
}}
|
|
86
85
|
>
|
|
87
|
-
<Icon name="arrow_back" size={16} color={
|
|
86
|
+
<Icon name="arrow_back" size={16} color={tokens.colors.primary.main.fontTertiary} />
|
|
88
87
|
</button>
|
|
89
88
|
{selection.scope === "variant" && variant ? (
|
|
90
89
|
<>
|
|
@@ -98,7 +97,7 @@ export function RightSidebar({
|
|
|
98
97
|
padding: 0,
|
|
99
98
|
fontSize: 14,
|
|
100
99
|
fontWeight: 500,
|
|
101
|
-
color:
|
|
100
|
+
color: tokens.colors.secondary.emphasis.fontPrimary,
|
|
102
101
|
whiteSpace: "nowrap",
|
|
103
102
|
}}
|
|
104
103
|
>
|
|
@@ -107,7 +106,7 @@ export function RightSidebar({
|
|
|
107
106
|
<span
|
|
108
107
|
style={{
|
|
109
108
|
fontSize: 13,
|
|
110
|
-
color:
|
|
109
|
+
color: tokens.colors.primary.main.fontTertiary,
|
|
111
110
|
}}
|
|
112
111
|
>
|
|
113
112
|
/
|
|
@@ -116,7 +115,7 @@ export function RightSidebar({
|
|
|
116
115
|
style={{
|
|
117
116
|
fontSize: 14,
|
|
118
117
|
fontWeight: 600,
|
|
119
|
-
color:
|
|
118
|
+
color: tokens.colors.primary.main.fontPrimary,
|
|
120
119
|
whiteSpace: "nowrap",
|
|
121
120
|
overflow: "hidden",
|
|
122
121
|
textOverflow: "ellipsis",
|
|
@@ -130,7 +129,7 @@ export function RightSidebar({
|
|
|
130
129
|
style={{
|
|
131
130
|
fontSize: 14,
|
|
132
131
|
fontWeight: 600,
|
|
133
|
-
color:
|
|
132
|
+
color: tokens.colors.primary.main.fontPrimary,
|
|
134
133
|
}}
|
|
135
134
|
>
|
|
136
135
|
{component.name}
|
|
@@ -152,7 +151,7 @@ export function RightSidebar({
|
|
|
152
151
|
style={{
|
|
153
152
|
marginBottom: 20,
|
|
154
153
|
borderRadius: 8,
|
|
155
|
-
border: `1px solid ${
|
|
154
|
+
border: `1px solid ${tokens.colors.primary.main.fontDisabled}`,
|
|
156
155
|
overflow: "hidden",
|
|
157
156
|
}}
|
|
158
157
|
>
|
|
@@ -172,7 +171,7 @@ export function RightSidebar({
|
|
|
172
171
|
style={{
|
|
173
172
|
fontSize: 13,
|
|
174
173
|
fontWeight: 600,
|
|
175
|
-
color:
|
|
174
|
+
color: tokens.colors.primary.main.fontTertiary,
|
|
176
175
|
textTransform: "uppercase",
|
|
177
176
|
letterSpacing: 0.5,
|
|
178
177
|
margin: 0,
|
|
@@ -202,9 +201,9 @@ export function RightSidebar({
|
|
|
202
201
|
width: "100%",
|
|
203
202
|
padding: "8px 12px",
|
|
204
203
|
borderRadius: 6,
|
|
205
|
-
border: `1px solid ${
|
|
204
|
+
border: `1px solid ${tokens.colors.primary.main.fontDisabled}`,
|
|
206
205
|
backgroundColor: "transparent",
|
|
207
|
-
color:
|
|
206
|
+
color: tokens.colors.primary.main.fontTertiary,
|
|
208
207
|
fontSize: 13,
|
|
209
208
|
cursor: "pointer",
|
|
210
209
|
}}
|
|
@@ -217,7 +216,7 @@ export function RightSidebar({
|
|
|
217
216
|
style={{
|
|
218
217
|
fontSize: 13,
|
|
219
218
|
fontWeight: 600,
|
|
220
|
-
color:
|
|
219
|
+
color: tokens.colors.primary.main.fontTertiary,
|
|
221
220
|
textTransform: "uppercase",
|
|
222
221
|
letterSpacing: 0.5,
|
|
223
222
|
margin: 0,
|
|
@@ -253,7 +252,7 @@ function PreviewSurface({
|
|
|
253
252
|
justifyContent: "center",
|
|
254
253
|
padding: 24,
|
|
255
254
|
height: 120,
|
|
256
|
-
backgroundColor:
|
|
255
|
+
backgroundColor: previewTokens.colors.primary.main.divider,
|
|
257
256
|
}}
|
|
258
257
|
>
|
|
259
258
|
<ComponentRenderer componentId={componentId} props={propOverrides} />
|
|
@@ -286,9 +285,9 @@ function PropControl({
|
|
|
286
285
|
width: "100%",
|
|
287
286
|
padding: "6px 10px",
|
|
288
287
|
borderRadius: 6,
|
|
289
|
-
border: `1px solid ${
|
|
290
|
-
backgroundColor:
|
|
291
|
-
color:
|
|
288
|
+
border: `1px solid ${tokens.colors.primary.main.fontDisabled}`,
|
|
289
|
+
backgroundColor: tokens.colors.primary.main.divider,
|
|
290
|
+
color: tokens.colors.primary.main.fontPrimary,
|
|
292
291
|
fontSize: 13,
|
|
293
292
|
fontFamily: "'SF Mono', 'Fira Code', Menlo, monospace",
|
|
294
293
|
boxSizing: "border-box" as const,
|
|
@@ -301,7 +300,7 @@ function PropControl({
|
|
|
301
300
|
style={{
|
|
302
301
|
fontSize: 12,
|
|
303
302
|
fontWeight: 500,
|
|
304
|
-
color:
|
|
303
|
+
color: tokens.colors.primary.main.fontPrimary,
|
|
305
304
|
}}
|
|
306
305
|
>
|
|
307
306
|
{prop.label}
|
|
@@ -358,7 +357,7 @@ function PropControl({
|
|
|
358
357
|
aria-label={prop.label}
|
|
359
358
|
style={{
|
|
360
359
|
width: "100%",
|
|
361
|
-
accentColor:
|
|
360
|
+
accentColor: tokens.colors.secondary.emphasis.fontPrimary,
|
|
362
361
|
cursor: "pointer",
|
|
363
362
|
}}
|
|
364
363
|
/>
|
|
@@ -376,8 +375,8 @@ function PropControl({
|
|
|
376
375
|
fontSize: 11,
|
|
377
376
|
fontFamily: "'SF Mono', 'Fira Code', Menlo, monospace",
|
|
378
377
|
color: o.value === value
|
|
379
|
-
?
|
|
380
|
-
:
|
|
378
|
+
? tokens.colors.primary.main.fontPrimary
|
|
379
|
+
: tokens.colors.primary.main.fontDisabled,
|
|
381
380
|
fontWeight: o.value === value ? 600 : 400,
|
|
382
381
|
}}
|
|
383
382
|
>
|
|
@@ -410,8 +409,8 @@ function PropControl({
|
|
|
410
409
|
height: 20,
|
|
411
410
|
borderRadius: 10,
|
|
412
411
|
backgroundColor: value
|
|
413
|
-
?
|
|
414
|
-
:
|
|
412
|
+
? tokens.colors.secondary.emphasis.fontPrimary
|
|
413
|
+
: tokens.colors.primary.main.fontDisabled,
|
|
415
414
|
position: "relative",
|
|
416
415
|
transition: "background-color 150ms ease",
|
|
417
416
|
flexShrink: 0,
|
|
@@ -1,93 +1,87 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Frame, Text, Wrapper, Button } from "@newtonedev/components";
|
|
2
|
+
import type { ColorResult } from "newtone";
|
|
3
|
+
import type { ConfiguratorState } from "../configurator/types";
|
|
4
|
+
import { ScalePlots } from "./sections/ScalePlots";
|
|
3
5
|
|
|
4
6
|
const SIDEBAR_WIDTH = 360;
|
|
5
7
|
|
|
6
8
|
interface SidebarProps {
|
|
7
9
|
readonly isDirty: boolean;
|
|
8
10
|
readonly onRevert: () => void;
|
|
11
|
+
readonly state: ConfiguratorState;
|
|
12
|
+
readonly previewColors: readonly (readonly ColorResult[])[];
|
|
13
|
+
readonly activePaletteIndex: number;
|
|
14
|
+
readonly activeSectionId: string;
|
|
15
|
+
readonly useP3: boolean;
|
|
9
16
|
}
|
|
10
17
|
|
|
11
18
|
export function Sidebar({
|
|
12
19
|
isDirty,
|
|
13
20
|
onRevert,
|
|
21
|
+
state,
|
|
22
|
+
previewColors,
|
|
23
|
+
activePaletteIndex,
|
|
24
|
+
activeSectionId,
|
|
25
|
+
useP3,
|
|
14
26
|
}: SidebarProps) {
|
|
15
|
-
const tokens = useTokens();
|
|
16
|
-
|
|
17
|
-
const borderColor = srgbToHex(tokens.border.srgb);
|
|
18
|
-
const bgColor = srgbToHex(tokens.background.srgb);
|
|
19
|
-
|
|
20
27
|
return (
|
|
21
|
-
<
|
|
28
|
+
<Frame
|
|
29
|
+
width={SIDEBAR_WIDTH}
|
|
30
|
+
bordered
|
|
31
|
+
direction="vertical"
|
|
22
32
|
style={{
|
|
23
|
-
width: SIDEBAR_WIDTH,
|
|
24
|
-
flexShrink: 0,
|
|
25
|
-
display: "flex",
|
|
26
|
-
flexDirection: "column",
|
|
27
33
|
height: "100vh",
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
34
|
+
flexShrink: 0,
|
|
35
|
+
borderTopWidth: 0,
|
|
36
|
+
borderBottomWidth: 0,
|
|
37
|
+
borderRightWidth: 0,
|
|
38
|
+
} as any}
|
|
31
39
|
>
|
|
32
40
|
{/* Header */}
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
alignItems: "center",
|
|
40
|
-
}}
|
|
41
|
+
<Frame
|
|
42
|
+
bordered
|
|
43
|
+
padding={{ x: "20", y: "16" }}
|
|
44
|
+
direction="horizontal"
|
|
45
|
+
align="center"
|
|
46
|
+
style={{ flexShrink: 0, borderLeftWidth: 0, borderRightWidth: 0, borderTopWidth: 0 }}
|
|
41
47
|
>
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
fontSize: 16,
|
|
45
|
-
fontWeight: 700,
|
|
46
|
-
color: srgbToHex(tokens.textPrimary.srgb),
|
|
47
|
-
}}
|
|
48
|
-
>
|
|
49
|
-
newtone
|
|
50
|
-
</span>
|
|
51
|
-
</div>
|
|
48
|
+
<Text role="body" size="md" weight="bold">newtone</Text>
|
|
49
|
+
</Frame>
|
|
52
50
|
|
|
53
|
-
{/* Content area
|
|
51
|
+
{/* Content area */}
|
|
54
52
|
<div
|
|
55
53
|
style={{
|
|
56
54
|
flex: 1,
|
|
57
55
|
overflowY: "auto",
|
|
58
56
|
overflowX: "hidden",
|
|
57
|
+
padding: activeSectionId === "colors" ? 16 : 0,
|
|
59
58
|
}}
|
|
60
|
-
|
|
59
|
+
>
|
|
60
|
+
{activeSectionId === "colors" && (
|
|
61
|
+
<ScalePlots
|
|
62
|
+
state={state}
|
|
63
|
+
scale={previewColors[activePaletteIndex] ?? []}
|
|
64
|
+
activePaletteIndex={activePaletteIndex}
|
|
65
|
+
useP3={useP3}
|
|
66
|
+
/>
|
|
67
|
+
)}
|
|
68
|
+
</div>
|
|
61
69
|
|
|
62
70
|
{/* Footer */}
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
borderTop: `1px solid ${borderColor}`,
|
|
68
|
-
}}
|
|
71
|
+
<Frame
|
|
72
|
+
bordered
|
|
73
|
+
padding={{ x: "20", y: "12" }}
|
|
74
|
+
style={{ flexShrink: 0, borderLeftWidth: 0, borderRightWidth: 0, borderBottomWidth: 0 }}
|
|
69
75
|
>
|
|
70
|
-
<
|
|
76
|
+
<Button
|
|
77
|
+
variant="secondary"
|
|
78
|
+
size="sm"
|
|
71
79
|
disabled={!isDirty}
|
|
72
|
-
|
|
73
|
-
aria-label="Revert all changes to the last saved version"
|
|
74
|
-
style={{
|
|
75
|
-
width: "100%",
|
|
76
|
-
padding: "8px 16px",
|
|
77
|
-
borderRadius: 6,
|
|
78
|
-
border: `1px solid ${borderColor}`,
|
|
79
|
-
backgroundColor: "transparent",
|
|
80
|
-
color: isDirty
|
|
81
|
-
? srgbToHex(tokens.textPrimary.srgb)
|
|
82
|
-
: srgbToHex(tokens.textSecondary.srgb),
|
|
83
|
-
fontSize: 13,
|
|
84
|
-
cursor: isDirty ? "pointer" : "not-allowed",
|
|
85
|
-
opacity: isDirty ? 1 : 0.5,
|
|
86
|
-
}}
|
|
80
|
+
onPress={onRevert}
|
|
87
81
|
>
|
|
88
82
|
Revert Changes
|
|
89
|
-
</
|
|
90
|
-
</
|
|
91
|
-
</
|
|
83
|
+
</Button>
|
|
84
|
+
</Frame>
|
|
85
|
+
</Frame>
|
|
92
86
|
);
|
|
93
87
|
}
|
|
@@ -3,7 +3,6 @@ import {
|
|
|
3
3
|
useTokens,
|
|
4
4
|
getComponentsByCategory,
|
|
5
5
|
} from "@newtonedev/components";
|
|
6
|
-
import { srgbToHex } from "newtone";
|
|
7
6
|
import type { PreviewView } from "../types";
|
|
8
7
|
|
|
9
8
|
interface TableOfContentsProps {
|
|
@@ -24,9 +23,9 @@ export function TableOfContents({
|
|
|
24
23
|
const tokens = useTokens();
|
|
25
24
|
const [hoveredId, setHoveredId] = useState<string | null>(null);
|
|
26
25
|
|
|
27
|
-
const borderColor =
|
|
28
|
-
const activeColor =
|
|
29
|
-
const textPrimary =
|
|
26
|
+
const borderColor = tokens.colors.primary.main.fontDisabled;
|
|
27
|
+
const activeColor = tokens.colors.secondary.emphasis.fontPrimary;
|
|
28
|
+
const textPrimary = tokens.colors.primary.main.fontPrimary;
|
|
30
29
|
const hoverBg = `${borderColor}20`;
|
|
31
30
|
|
|
32
31
|
const components = getComponentsByCategory(activeSectionId);
|
|
@@ -44,7 +43,7 @@ export function TableOfContents({
|
|
|
44
43
|
overflowY: "auto",
|
|
45
44
|
borderRight: `1px solid ${borderColor}`,
|
|
46
45
|
padding: "16px 0",
|
|
47
|
-
backgroundColor:
|
|
46
|
+
backgroundColor: tokens.colors.primary.main.background,
|
|
48
47
|
}}
|
|
49
48
|
>
|
|
50
49
|
<button
|