@fibery/ui-kit 1.40.3 → 1.41.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.
- package/CHANGELOG.md +14 -0
- package/eslint.config.mjs +16 -0
- package/package.json +11 -13
- package/src/a11y-color.test.ts +162 -0
- package/src/a11y-color.ts +13 -20
- package/src/actions-menu/actions-menu-item.tsx +9 -12
- package/src/actions-menu/context-actions-menu.tsx +8 -3
- package/src/ai/model.tsx +0 -1
- package/src/ai/temperature.tsx +0 -1
- package/src/animated-height-container.tsx +3 -3
- package/src/antd/ant-modal.tsx +10 -5
- package/src/antd/index.tsx +3 -0
- package/src/antd/input.tsx +0 -1
- package/src/antd/styles.ts +15 -15
- package/src/app-icon-with-fallback.tsx +6 -6
- package/src/app-icon-wrapper.tsx +2 -3
- package/src/app-icon.tsx +4 -4
- package/src/avatar.tsx +3 -3
- package/src/button/base-button.tsx +0 -1
- package/src/button/button.tsx +1 -0
- package/src/button/make-button-colors.ts +5 -13
- package/src/checkbox.tsx +2 -2
- package/src/collapsible-section.tsx +11 -1
- package/src/color-picker/ColorPickerOrLoader.js +2 -2
- package/src/color-utils.test.ts +307 -0
- package/src/color-utils.ts +215 -0
- package/src/command-menu/index.tsx +1 -0
- package/src/comment.tsx +3 -2
- package/src/context-menu/index.tsx +12 -7
- package/src/date-picker/contexts.ts +2 -2
- package/src/date-picker/date-range-picker.tsx +3 -4
- package/src/date-picker/single-date-picker.tsx +147 -119
- package/src/date-picker/types.ts +4 -3
- package/src/day-select/iso-week-day-select.tsx +2 -2
- package/src/day-select/week-day-select.tsx +2 -2
- package/src/delayed.tsx +0 -1
- package/src/design-system/alpha.test.ts +59 -0
- package/src/design-system/alpha.ts +41 -0
- package/src/design-system/animation.ts +10 -0
- package/src/design-system/colors-css.test.ts +39 -0
- package/src/design-system/colors-css.ts +25 -0
- package/src/design-system/colors-js.test.ts +232 -0
- package/src/design-system/colors-js.ts +107 -0
- package/src/design-system/colors.test.ts +74 -0
- package/src/design-system/colors.ts +759 -0
- package/src/design-system/date.ts +3 -0
- package/src/design-system/layout.ts +106 -0
- package/src/design-system/theme.test.ts +94 -0
- package/src/design-system/theme.ts +93 -0
- package/src/design-system/typography.ts +179 -0
- package/src/design-system/vars.test.ts +1679 -0
- package/src/design-system/vars.ts +52 -0
- package/src/design-system.test.ts +45 -22
- package/src/design-system.ts +25 -1339
- package/src/dropdown-menu/index.tsx +21 -16
- package/src/emoji-picker/app-icon-picker.tsx +5 -5
- package/src/emoji-picker/emoji-picker-content-with-color.tsx +4 -4
- package/src/emoji-picker/icon-emoji-picker.tsx +3 -3
- package/src/favorites-icon.tsx +1 -1
- package/src/fibermoji-placeholder.tsx +3 -3
- package/src/field-container.tsx +11 -2
- package/src/file-item/file-icon.tsx +169 -0
- package/src/file-item/file-menu-items.tsx +68 -0
- package/src/file-item/file-preview-actions.tsx +38 -0
- package/src/file-item/file-title.tsx +48 -0
- package/src/file-item/types.ts +27 -0
- package/src/file-item/use-register-in-image-gallery.tsx +70 -0
- package/src/file-item-2.tsx +32 -348
- package/src/file-item.tsx +6 -3
- package/src/hue-shift.test.ts +91 -0
- package/src/icons/ast/ChatBubble.ts +8 -0
- package/src/icons/ast/ChatFloat.ts +8 -0
- package/src/icons/ast/ChatSidebar.ts +8 -0
- package/src/icons/ast/FileCounter.ts +8 -0
- package/src/icons/ast/FileMultiple.ts +8 -0
- package/src/icons/ast/FileOther.ts +8 -0
- package/src/icons/ast/NoBorder.ts +8 -0
- package/src/icons/ast/NoFill.ts +8 -0
- package/src/icons/ast/ValueEdit.ts +8 -0
- package/src/icons/ast/index.tsx +9 -0
- package/src/icons/react/ChatBubble.tsx +13 -0
- package/src/icons/react/ChatFloat.tsx +13 -0
- package/src/icons/react/ChatSidebar.tsx +13 -0
- package/src/icons/react/FileCounter.tsx +13 -0
- package/src/icons/react/FileMultiple.tsx +13 -0
- package/src/icons/react/FileOther.tsx +13 -0
- package/src/icons/react/NoBorder.tsx +13 -0
- package/src/icons/react/NoFill.tsx +13 -0
- package/src/icons/react/ValueEdit.tsx +13 -0
- package/src/icons/react/index.tsx +9 -0
- package/src/icons/svg/chat-bubble.svg +4 -0
- package/src/icons/svg/chat-float.svg +4 -0
- package/src/icons/svg/chat-sidebar.svg +4 -0
- package/src/icons/svg/file-counter.svg +3 -0
- package/src/icons/svg/file-multiple.svg +3 -0
- package/src/icons/svg/file-other.svg +3 -0
- package/src/icons/svg/no-border.svg +17 -0
- package/src/icons/svg/no-fill.svg +4 -0
- package/src/icons/svg/value-edit.svg +3 -0
- package/src/images-gallery/images-gallery.tsx +8 -6
- package/src/images-gallery/slide-buttons.tsx +4 -11
- package/src/is-iOS.ts +0 -1
- package/src/is-in-popup.ts +2 -1
- package/src/lists/actions-menu-row-surface.tsx +7 -7
- package/src/loading-sausage.tsx +2 -2
- package/src/media-query-utils.ts +1 -2
- package/src/mobile-keyboard-aware-popup.tsx +6 -5
- package/src/modal-menu/modal-menu-content.tsx +2 -2
- package/src/number-input/decimal.js +9 -7
- package/src/number-input/{number-inline-input-with-autosize.tsx → number-input-inline-with-autosize.tsx} +20 -41
- package/src/number-input/number-input-inline.tsx +118 -0
- package/src/number-input/{index.test.js → number-input.test.tsx} +38 -43
- package/src/number-input/number-input.tsx +63 -121
- package/src/number-input/types.ts +19 -0
- package/src/number-input/utils.ts +61 -0
- package/src/online-users.tsx +2 -2
- package/src/palette-generator.test.ts +309 -0
- package/src/palette-generator.ts +160 -0
- package/src/palettes/_.ts +72 -0
- package/src/palettes/slate-arch.colors-snapshot.test.ts +1689 -0
- package/src/palettes/slate-arch.ts +188 -0
- package/src/palettes/slate-user.colors-snapshot.test.ts +1689 -0
- package/src/palettes/slate-user.ts +187 -0
- package/src/palettes/warm-arch.colors-snapshot.test.ts +1689 -0
- package/src/palettes/warm-arch.ts +222 -0
- package/src/palettes/warm-user.colors-snapshot.test.ts +1689 -0
- package/src/palettes/warm-user.ts +222 -0
- package/src/platform.ts +0 -3
- package/src/popover/get-element-ref.ts +28 -0
- package/src/popover/index.tsx +236 -339
- package/src/popover/{mobile-popup-context.tsx → mobile-popover-context.tsx} +7 -7
- package/src/popover/mobile-popover.tsx +169 -0
- package/src/popover/modifiers.tsx +2 -2
- package/src/popover/popup-stack-context.tsx +8 -9
- package/src/progress.tsx +2 -2
- package/src/reactions/reaction-button.tsx +12 -6
- package/src/root-theme-provider.test.tsx +411 -0
- package/src/scale-generator.ts +356 -0
- package/src/select/components/menu-list-virtualized.tsx +12 -25
- package/src/select/components/menu.tsx +12 -2
- package/src/select/index.tsx +6 -5
- package/src/select/select.tsx +38 -39
- package/src/select/styles.ts +0 -1
- package/src/select/util.ts +1 -1
- package/src/static-palettes.ts +356 -0
- package/src/thematic-color-picker.tsx +266 -0
- package/src/thematic-constants.tsx +27 -0
- package/src/thematic-controls.tsx +144 -0
- package/src/thematic-scales.tsx +122 -0
- package/src/thematic-state.ts +370 -0
- package/src/thematic.tsx +386 -0
- package/src/theme-provider.test.tsx +820 -0
- package/src/theme-provider.tsx +158 -92
- package/src/theme-settings.ts +67 -12
- package/src/theme-styles.ts +58 -6
- package/src/toast/toast-action.tsx +1 -1
- package/src/toast/toast.tsx +1 -2
- package/src/toggle-on-off.tsx +2 -2
- package/src/toggle.tsx +7 -8
- package/src/tooltip.tsx +14 -10
- package/src/type-badge.tsx +7 -14
- package/src/unit/styles.ts +2 -25
- package/src/unit/unit-with-tooltip.tsx +3 -2
- package/src/use-is-phone.tsx +7 -2
- package/src/use-long-press.tsx +2 -2
- package/src/use-on-screen-keyboard-data.tsx +2 -2
- package/src/with-data.tsx +4 -3
- package/src/workflow-progress-icon.tsx +2 -2
- package/.eslintignore +0 -3
- package/.eslintrc +0 -14
- package/src/__mocks__/createInlineTheme.js +0 -3
- package/src/create-inline-theme.ts +0 -66
- package/src/number-input/index.js +0 -191
- package/src/palette.ts +0 -237
package/src/design-system.ts
CHANGED
|
@@ -1,1339 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export const fontWeight = {
|
|
28
|
-
light: 310, // 300 basic, 310 experiment with a variable Inter
|
|
29
|
-
regular: 410, // 400 basic, 410 experiment with a variable Inter
|
|
30
|
-
mediumLight: 450,
|
|
31
|
-
medium: 500,
|
|
32
|
-
semibold: 600,
|
|
33
|
-
bold: 700,
|
|
34
|
-
} as const;
|
|
35
|
-
|
|
36
|
-
// 300 basic, 310 experiment with a variable Inter
|
|
37
|
-
export const fontSize = {
|
|
38
|
-
xxl: 30,
|
|
39
|
-
xl: 24,
|
|
40
|
-
lg: 18,
|
|
41
|
-
md: 16,
|
|
42
|
-
sm: 15,
|
|
43
|
-
xs: 14,
|
|
44
|
-
xxs: 13,
|
|
45
|
-
xxxs: 12,
|
|
46
|
-
tiny: 11,
|
|
47
|
-
mini: 10,
|
|
48
|
-
micro: 9,
|
|
49
|
-
nano: 8,
|
|
50
|
-
} as const;
|
|
51
|
-
|
|
52
|
-
const transparent = "rgba(255, 255, 255, 0)";
|
|
53
|
-
|
|
54
|
-
export const minPanelWidth = 490;
|
|
55
|
-
|
|
56
|
-
export const opacity = {
|
|
57
|
-
opacity100: 1,
|
|
58
|
-
opacity95: 0.95,
|
|
59
|
-
opacity90: 0.9,
|
|
60
|
-
opacity85: 0.85,
|
|
61
|
-
opacity80: 0.8,
|
|
62
|
-
opacity75: 0.75,
|
|
63
|
-
opacity70: 0.7,
|
|
64
|
-
opacity65: 0.65,
|
|
65
|
-
opacity60: 0.6,
|
|
66
|
-
opacity55: 0.55,
|
|
67
|
-
opacity50: 0.5,
|
|
68
|
-
opacity45: 0.45,
|
|
69
|
-
opacity40: 0.4,
|
|
70
|
-
opacity35: 0.35,
|
|
71
|
-
opacity30: 0.3,
|
|
72
|
-
opacity25: 0.25,
|
|
73
|
-
opacity20: 0.2,
|
|
74
|
-
opacity15: 0.15,
|
|
75
|
-
opacity10: 0.1,
|
|
76
|
-
opacity5: 0.05,
|
|
77
|
-
opacity0: 0,
|
|
78
|
-
} as const;
|
|
79
|
-
|
|
80
|
-
export const cardTypeColors = [
|
|
81
|
-
"#4A4A4A",
|
|
82
|
-
"#6A849B",
|
|
83
|
-
"#99A2AB",
|
|
84
|
-
"#D40915",
|
|
85
|
-
"#E72065",
|
|
86
|
-
"#9C2BAF",
|
|
87
|
-
"#673DB6",
|
|
88
|
-
"#3E53B4",
|
|
89
|
-
"#2978FB",
|
|
90
|
-
"#199EE3",
|
|
91
|
-
"#1FBED3",
|
|
92
|
-
"#159789",
|
|
93
|
-
"#4FAF54",
|
|
94
|
-
"#8EC351",
|
|
95
|
-
"#FBA32F",
|
|
96
|
-
"#FC551F",
|
|
97
|
-
"#B04E31",
|
|
98
|
-
] as const;
|
|
99
|
-
|
|
100
|
-
const swatches = {
|
|
101
|
-
"gray-light": cardTypeColors[1],
|
|
102
|
-
yellow: cardTypeColors[14],
|
|
103
|
-
green: "#69AC5E",
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
// switch to chroma.valid once we start using 2.0.1
|
|
107
|
-
const makeChromaColor = (color: string) => {
|
|
108
|
-
try {
|
|
109
|
-
return chroma(color);
|
|
110
|
-
} catch (e) {
|
|
111
|
-
return chroma(brandColors.blue);
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
export const getOpacities = _.memoize((color: string) =>
|
|
116
|
-
_.mapValues(opacity, (opacity) => {
|
|
117
|
-
if (color === transparent) {
|
|
118
|
-
return transparent;
|
|
119
|
-
}
|
|
120
|
-
return makeChromaColor(color).alpha(opacity).css();
|
|
121
|
-
})
|
|
122
|
-
);
|
|
123
|
-
|
|
124
|
-
const shades = getOpacities("#000000");
|
|
125
|
-
const lights = getOpacities("#FFFFFF");
|
|
126
|
-
|
|
127
|
-
export const separators = {
|
|
128
|
-
..._.mapValues(shades, (shade) => `0.5px solid ${shade}`),
|
|
129
|
-
} as const;
|
|
130
|
-
|
|
131
|
-
export const inversedSeparators = {
|
|
132
|
-
..._.mapValues(lights, (light) => `0.5px solid ${light}`),
|
|
133
|
-
} as const;
|
|
134
|
-
|
|
135
|
-
export const fontFamily =
|
|
136
|
-
'"Inter Variable", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif';
|
|
137
|
-
|
|
138
|
-
const stateColors = {
|
|
139
|
-
success: "rgba(8, 189, 159, 1)",
|
|
140
|
-
error: "rgba(234, 105, 63, 1)",
|
|
141
|
-
progress: "rgba(74, 126, 244, 1)",
|
|
142
|
-
canceled: "rgba(233, 163, 76, 1)",
|
|
143
|
-
unknown: "rgba(147, 157, 168, 1)",
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
const brandColors = {
|
|
147
|
-
red: "#FF5400",
|
|
148
|
-
green: "#08BD9F",
|
|
149
|
-
blue: "#4978D4",
|
|
150
|
-
} as const;
|
|
151
|
-
|
|
152
|
-
export const getDarkenColor = _.memoize((color: string): string => {
|
|
153
|
-
return makeChromaColor(color).darken(0.5).desaturate(0.8).css();
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
export const themeColors = {
|
|
157
|
-
mode: ["light", "dark"],
|
|
158
|
-
brandColors: [brandColors, brandColors],
|
|
159
|
-
stateColors: [stateColors, stateColors],
|
|
160
|
-
colorAI: ["hsla(271, 57%, 61%, 1)", "hsla(272, 43%, 50%, 1)"],
|
|
161
|
-
colorBgAI: ["hsla(271, 57%, 61%, 0.09)", "hsla(272, 43%, 50%, 0.2)"],
|
|
162
|
-
colorSubtleBgAI: ["hsla(271, 57%, 61%, 0.05)", "hsla(272, 43%, 50%, 0.1)"],
|
|
163
|
-
|
|
164
|
-
// Elevations
|
|
165
|
-
surfaceElevationS: [`0 2px 4px 0 ${blackA.blackA3}`, `0 2px 4px 0 ${whiteA.whiteA3}`],
|
|
166
|
-
surfaceElevationM: [`0 4px 8px 0 ${blackA.blackA5}`, `0 4px 8px 0 ${whiteA.whiteA5}`],
|
|
167
|
-
surfaceElevationL: [`0 8px 12px 0 ${blackA.blackA5}`, `0 8px 12px 0 ${whiteA.whiteA5}`],
|
|
168
|
-
|
|
169
|
-
// Shadows and effects / Elevation
|
|
170
|
-
shadow50: [
|
|
171
|
-
`0px 0px 0px 1px ${getOpacities(slate.slate12).opacity5}`,
|
|
172
|
-
`0px 0px 0px 1px ${getOpacities(slateDark.slate12).opacity10}`,
|
|
173
|
-
],
|
|
174
|
-
shadow100: [
|
|
175
|
-
`0px 1px 4px 0px ${getOpacities(slate.slate12).opacity5}`,
|
|
176
|
-
`0px 1px 4px 0px ${getOpacities(slate.slate12).opacity10}`,
|
|
177
|
-
],
|
|
178
|
-
shadow200: [
|
|
179
|
-
`0px 2px 6px 0px ${getOpacities(slate.slate12).opacity5}`,
|
|
180
|
-
`0px 2px 6px 0px ${getOpacities(slate.slate12).opacity10}`,
|
|
181
|
-
],
|
|
182
|
-
shadow300: [
|
|
183
|
-
`0px 3px 6px -3px ${getOpacities(slate.slate12).opacity10}, 0px 8px 20px -4px ${
|
|
184
|
-
getOpacities(slate.slate12).opacity15
|
|
185
|
-
}`,
|
|
186
|
-
`0px 3px 6px -3px ${getOpacities(slate.slate12).opacity10}, 0px 8px 20px -4px ${
|
|
187
|
-
getOpacities(slate.slate12).opacity15
|
|
188
|
-
}`,
|
|
189
|
-
],
|
|
190
|
-
shadow400: [
|
|
191
|
-
`0px 0px 1px 0px ${getOpacities(slate.slate12).opacity20}, 0px 16px 40px 0px ${
|
|
192
|
-
getOpacities(slate.slate12).opacity15
|
|
193
|
-
}`,
|
|
194
|
-
`0px 0px 1px 0px ${getOpacities(slate.slate12).opacity20}, 0px 16px 40px 0px ${
|
|
195
|
-
getOpacities(slate.slate12).opacity15
|
|
196
|
-
}`,
|
|
197
|
-
],
|
|
198
|
-
shadow500: [
|
|
199
|
-
`0px 0px 1px 0px ${getOpacities(slate.slate12).opacity20}, 0px 20px 50px 0px ${
|
|
200
|
-
getOpacities(slate.slate12).opacity15
|
|
201
|
-
}`,
|
|
202
|
-
`0px 0px 1px 0px ${getOpacities(slate.slate12).opacity20}, 0px 20px 50px 0px ${
|
|
203
|
-
getOpacities(slate.slate12).opacity15
|
|
204
|
-
}`,
|
|
205
|
-
],
|
|
206
|
-
shadow600: [
|
|
207
|
-
`0px 0px 1px 0px ${getOpacities(slate.slate12).opacity20}, 0px 26px 80px 0px ${
|
|
208
|
-
getOpacities(slate.slate12).opacity20
|
|
209
|
-
}`,
|
|
210
|
-
`0px 0px 1px 0px ${getOpacities(slate.slate12).opacity20}, 0px 26px 80px 0px ${
|
|
211
|
-
getOpacities(slate.slate12).opacity20
|
|
212
|
-
}`,
|
|
213
|
-
],
|
|
214
|
-
actionMenuShadow: [
|
|
215
|
-
`0px 0px 2px 0px ${getOpacities(slate.slate11).opacity30}, 0px 4px 6px 0px ${
|
|
216
|
-
getOpacities(slate.slate11).opacity5
|
|
217
|
-
}, 0px 10px 26px 0px ${getOpacities(slate.slate11).opacity15}`,
|
|
218
|
-
`0px 0px 0px 1px ${getOpacities(slateDark.slate6).opacity100}, 0px 4px 6px 0px ${
|
|
219
|
-
getOpacities(slateDark.slate1).opacity5
|
|
220
|
-
}, 0px 10px 26px 0px ${getOpacities(slateDark.slate1).opacity15}`,
|
|
221
|
-
],
|
|
222
|
-
shadowPopup: [
|
|
223
|
-
`0px 0px 2px 0px ${getOpacities(slate.slate11).opacity30}, 0px 4px 6px 0px ${
|
|
224
|
-
getOpacities(slate.slate11).opacity5
|
|
225
|
-
}, 0px 10px 26px 0px ${getOpacities(slate.slate11).opacity15}`,
|
|
226
|
-
`0px 0px 0px 1px ${getOpacities(slateDark.slate6).opacity100}, 0px 4px 6px 0px ${
|
|
227
|
-
getOpacities(slateDark.slate1).opacity5
|
|
228
|
-
}, 0px 10px 26px 0px ${getOpacities(slateDark.slate1).opacity15}`,
|
|
229
|
-
],
|
|
230
|
-
shadowSidebar: [
|
|
231
|
-
`-3px 0px 10px 0px ${getOpacities(slate.slate10).opacity10}`,
|
|
232
|
-
`-3px 0px 10px 0px ${getOpacities(slateDark.slate1).opacity80}`,
|
|
233
|
-
],
|
|
234
|
-
effectBgActionsMenu: [
|
|
235
|
-
`blur(12px) saturate(190%) contrast(50%) brightness(130%)`,
|
|
236
|
-
`blur(12px) saturate(180%) contrast(60%) brightness(70%)`,
|
|
237
|
-
],
|
|
238
|
-
effectBgPopup: [
|
|
239
|
-
`blur(24px) saturate(190%) contrast(50%) brightness(130%)`,
|
|
240
|
-
`blur(24px) saturate(180%) contrast(60%) brightness(70%)`,
|
|
241
|
-
],
|
|
242
|
-
|
|
243
|
-
// Rubbish dump
|
|
244
|
-
primaryBlue: [indigo.indigo9, indigoDark.indigo9],
|
|
245
|
-
whiteColor: [whiteA.whiteA0, whiteA.whiteA0],
|
|
246
|
-
blackColor: [blackA.blackA0, blackA.blackA0],
|
|
247
|
-
mainBg: [slate.slate3, slateDark.slateBase],
|
|
248
|
-
panelBg: [whiteA.whiteA0, slateDark.slate1],
|
|
249
|
-
panelContentBg: [slate.slate2, slateDark.slate1],
|
|
250
|
-
panelContentBgOpacity80: [getOpacities(slate.slate2).opacity80, getOpacities(slateDark.slate1).opacity80],
|
|
251
|
-
colorBgRelationContainer: [slate.slate2, slateDark.slate1],
|
|
252
|
-
colorBgAISidebarContent: [slate.slate1, slateDark.slate1],
|
|
253
|
-
pageBg: [whiteA.whiteA0, slateDark.slate1],
|
|
254
|
-
pageContentBg: [whiteA.whiteA0, slateDark.slate2],
|
|
255
|
-
colorBgPopup: [whiteA.whiteA0, slateDark.slate4],
|
|
256
|
-
colorBgSidebar: [whiteA.whiteA0, slateDark.slate3],
|
|
257
|
-
menuBg: [slate.slate3, slateDark.slateBase],
|
|
258
|
-
menuTextColor: [slateDark.slate5, slate.slate8],
|
|
259
|
-
menuItemHoverColor: [slate.slate5, slateDark.slate6],
|
|
260
|
-
menuSelectedTextColor: [slate.slate2, slate.slate2],
|
|
261
|
-
menuFooterColor: [getOpacities(whiteA.whiteA0).opacity20, getOpacities(slateDark.slate3).opacity40],
|
|
262
|
-
menuFooterHoverColor: [getOpacities(whiteA.whiteA0).opacity60, slateDark.slate4],
|
|
263
|
-
menuIconColor: [getOpacities(slate.slate12).opacity70, getOpacities(slateDark.slate12).opacity70],
|
|
264
|
-
menuSelectedIconColor: [getOpacities(slate.slate1).opacity90, getOpacities(slate.slate1).opacity90],
|
|
265
|
-
|
|
266
|
-
// Text, links colors
|
|
267
|
-
textColor: [slateDark.slate5, slate.slate6],
|
|
268
|
-
textSelectionColor: [getOpacities(blue.blue10).opacity20, getOpacities(blueDark.blue10).opacity40],
|
|
269
|
-
accentTextColor: [slate.slate10, slateDark.slate10],
|
|
270
|
-
disabledTextColor: [slate.slate9, slateDark.slate9],
|
|
271
|
-
inversedTextColor: [slate.slate3, slateDark.slate6],
|
|
272
|
-
colorTextSecondary: [getOpacities(slate.slate12).opacity70, getOpacities(slateDark.slate12).opacity65],
|
|
273
|
-
linkColor: [indigoDark.indigo10, indigoDark.indigo10],
|
|
274
|
-
linkBorder: [
|
|
275
|
-
`0.5px solid ${getOpacities(indigoDark.indigo10).opacity40}`,
|
|
276
|
-
`0.5px solid ${getOpacities(indigoDark.indigo11).opacity40}`,
|
|
277
|
-
],
|
|
278
|
-
linkHoverColor: [indigo.indigo10, indigoDark.indigo11],
|
|
279
|
-
linkBorderHover: [
|
|
280
|
-
`0.5px solid ${getOpacities(indigo.indigo10).opacity80}`,
|
|
281
|
-
`0.5px solid ${getOpacities(indigoDark.indigo10).opacity70}`,
|
|
282
|
-
],
|
|
283
|
-
codeColor: [red.red9, red.red8],
|
|
284
|
-
codeBgColor: [slate.slate3, slateDark.slate4],
|
|
285
|
-
codeBlockBgColor: [slate.slate3, slateDark.slate4],
|
|
286
|
-
addedDiffTextColor: [teal.teal9, tealDark.teal11],
|
|
287
|
-
removedDiffTextColor: [red.red11, redDark.red11],
|
|
288
|
-
|
|
289
|
-
// Entity
|
|
290
|
-
entityNodeColor: [slateDark.slate3, slate.slate8],
|
|
291
|
-
entityNodeBorder: [
|
|
292
|
-
`0.5px solid ${getOpacities(slateDark.slate3).opacity30}`,
|
|
293
|
-
`0.5px solid ${getOpacities(slate.slate8).opacity40}`,
|
|
294
|
-
],
|
|
295
|
-
entityNodeHoverColor: [slateDark.slate7, slate.slate7],
|
|
296
|
-
entityNodeBorderHover: [
|
|
297
|
-
`0.5px solid ${getOpacities(slate.slate11).opacity80}`,
|
|
298
|
-
`0.5px solid ${getOpacities(slate.slate7).opacity80}`,
|
|
299
|
-
],
|
|
300
|
-
entityNodeBgColor: [slate.slate2, slateDark.slate3],
|
|
301
|
-
shortcutTextColor: [slate.slate9, slateDark.slate11],
|
|
302
|
-
shortcutBorder: [
|
|
303
|
-
`1px solid ${getOpacities(slate.slate8).opacity50}`,
|
|
304
|
-
`1px solid ${getOpacities(slateDark.slate10).opacity20}`,
|
|
305
|
-
],
|
|
306
|
-
shortcutBorderColor: [getOpacities(slate.slate8).opacity50, getOpacities(slateDark.slate10).opacity20],
|
|
307
|
-
|
|
308
|
-
// Input
|
|
309
|
-
inputBgColor: [whiteA.whiteA0, slateDark.slate2],
|
|
310
|
-
inputDisabledBgColor: [getOpacities(slate.slate6).opacity30, getOpacities(slateDark.slate6).opacity30],
|
|
311
|
-
inputDisabledBorderColor: [
|
|
312
|
-
`0 0 0 1px ${getOpacities(slate.slate6).opacity20}`,
|
|
313
|
-
`0 0 0 1px ${getOpacities(slateDark.slate8).opacity20}`,
|
|
314
|
-
],
|
|
315
|
-
inputCopyBgColor: [slate.slate3, slateDark.slate4],
|
|
316
|
-
inputBorderColor: [
|
|
317
|
-
`0 0 0 1px ${getOpacities(slate.slate6).opacity70}`,
|
|
318
|
-
`0 0 0 1px ${getOpacities(slateDark.slate8).opacity70}`,
|
|
319
|
-
],
|
|
320
|
-
inputBorderHoverColor: [
|
|
321
|
-
`0 0 0 1px ${getOpacities(slate.slate7).opacity100}`,
|
|
322
|
-
`0 0 0 1px ${getOpacities(slateDark.slate8).opacity100}`,
|
|
323
|
-
],
|
|
324
|
-
inputBorderFocusColor: [
|
|
325
|
-
`0 0 0 1px ${getOpacities(slate.slate8).opacity100}`,
|
|
326
|
-
`0 0 0 1px ${getOpacities(slateDark.slate9).opacity100}`,
|
|
327
|
-
],
|
|
328
|
-
inputBorderBlendMode: ["multiply", "lighten"],
|
|
329
|
-
inputPlaceholderTextColor: [slate.slate9, slateDark.slate9],
|
|
330
|
-
inputErrorBorderColor: [`0 0 0 1px ${red.red11}`, `0 0 0 1px ${red.red7}`],
|
|
331
|
-
inputErrorBorderHoverColor: [
|
|
332
|
-
`0 0 0 1px ${getOpacities(red.red11).opacity40}`,
|
|
333
|
-
`0 0 0 1px ${getOpacities(red.red7).opacity40}`,
|
|
334
|
-
],
|
|
335
|
-
inputErrorBorderFocusColor: [
|
|
336
|
-
`0 0 0 1px ${getOpacities(red.red11).opacity25}`,
|
|
337
|
-
`0 0 0 1px ${getOpacities(red.red7).opacity25}`,
|
|
338
|
-
],
|
|
339
|
-
inputErrorBorderFocusShadow: [
|
|
340
|
-
`0 0 0 3px ${getOpacities(red.red11).opacity25}`,
|
|
341
|
-
`0 0 0 3px ${getOpacities(red.red7).opacity25}`,
|
|
342
|
-
],
|
|
343
|
-
buttonPrimaryColor: [indigo.indigo9, indigoDark.indigo9],
|
|
344
|
-
buttonColor: [slate.slate10, slateDark.slate10],
|
|
345
|
-
buttonPrimaryTextColor: [slate.slate2, slate.slate6],
|
|
346
|
-
checkboxColor: [getOpacities(slate.slate12).opacity70, getOpacities(slateDark.slate12).opacity70],
|
|
347
|
-
colorBorderBlockQuote: [slate.slate11, slateDark.slate11],
|
|
348
|
-
|
|
349
|
-
// Actions menu
|
|
350
|
-
colorBgActionsMenu: [whiteA.whiteA0, slateDark.slate3],
|
|
351
|
-
colorBgActionsMenuItemHover: [getOpacities(slate.slate11).opacity10, getOpacities(slateDark.slate11).opacity10],
|
|
352
|
-
colorBgActionsMenuItemSelected: [getOpacities(indigo.indigo4).opacity80, getOpacities(indigoDark.indigo4).opacity80],
|
|
353
|
-
colorBgActionsMenuItemSelectedHover: [
|
|
354
|
-
getOpacities(indigo.indigo5).opacity80,
|
|
355
|
-
getOpacities(indigoDark.indigo6).opacity80,
|
|
356
|
-
],
|
|
357
|
-
colorBgActionsMenuItemDangerHover: [getOpacities(red.red9).opacity10, getOpacities(redDark.red10).opacity10],
|
|
358
|
-
|
|
359
|
-
colorBgActionsMenuItemDangerActive: [getOpacities(red.red9).opacity80, getOpacities(redDark.red10).opacity80],
|
|
360
|
-
actionMenuBg: [whiteA.whiteA0, slateDark.slate3],
|
|
361
|
-
actionMenuInnerBg: [whiteA.whiteA0, slateDark.slate4],
|
|
362
|
-
actionMenuHover: [slate.slate4, slateDark.slate5],
|
|
363
|
-
actionMenuInnerHover: [slate.slate4, getOpacities(slateDark.slate6).opacity50],
|
|
364
|
-
actionMenuButtonColor: [whiteA.whiteA0, slateDark.slate2],
|
|
365
|
-
actionMenuButtonHoverColor: [slate.slate1, slateDark.slate3],
|
|
366
|
-
actionMenuButtonShadow: [
|
|
367
|
-
`0 0 0 1px ${getOpacities(slate.slate10).opacity10}, 0 2px 4px -4px ${getOpacities(slate.slate10).opacity20}`,
|
|
368
|
-
`0 0 0 1px ${getOpacities(slateDark.slate2).opacity10}, 0 2px 4px -4px ${getOpacities(slateDark.slate2).opacity20}`,
|
|
369
|
-
],
|
|
370
|
-
actionMenuButtonShadowHover: [
|
|
371
|
-
`0 0 0 1px ${getOpacities(slate.slate10).opacity10}, 0 6px 8px -4px ${getOpacities(slate.slate10).opacity30}`,
|
|
372
|
-
`0 0 0 1px ${getOpacities(slateDark.slate2).opacity10}, 0 6px 8px -4px ${getOpacities(slateDark.slate2).opacity30}`,
|
|
373
|
-
],
|
|
374
|
-
actionMenuSeparatorColor: [getOpacities(blackA.blackA0).opacity10, getOpacities(whiteA.whiteA0).opacity15],
|
|
375
|
-
separatorColor: [getOpacities(blackA.blackA0).opacity10, getOpacities(whiteA.whiteA0).opacity10],
|
|
376
|
-
separatorColorDimmed: [getOpacities(blackA.blackA0).opacity5, getOpacities(whiteA.whiteA0).opacity5],
|
|
377
|
-
separatorBreadcrumbsColor: [slate.slate8, slateDark.slate8],
|
|
378
|
-
iconColor: [getOpacities(slate.slate12).opacity70, getOpacities(slateDark.slate12).opacity70],
|
|
379
|
-
appIconColor: [getOpacities(slate.slate2).opacity90, getOpacities(slate.slate2).opacity70],
|
|
380
|
-
appIconBgColor: [getOpacities(slate.slate1).opacity90, getOpacities(slate.slate2).opacity50],
|
|
381
|
-
mentionBgColor: [getOpacities(slate.slate7).opacity30, getOpacities(slateDark.slate7).opacity40],
|
|
382
|
-
colorBgSelectMenu: [slate.slate1, slateDark.slate3],
|
|
383
|
-
shadowSelectMenu: [
|
|
384
|
-
`0px 0px 2px 0px ${getOpacities(slate.slate11).opacity30}, 0px 4px 6px 0px ${
|
|
385
|
-
getOpacities(slate.slate11).opacity5
|
|
386
|
-
}, 0px 10px 26px 0px ${getOpacities(slate.slate11).opacity15}`,
|
|
387
|
-
`0px 0px 0px 1px ${getOpacities(slateDark.slate6).opacity100}, 0px 4px 6px 0px ${
|
|
388
|
-
getOpacities(slateDark.slate1).opacity5
|
|
389
|
-
}, 0px 10px 26px 0px ${getOpacities(slateDark.slate1).opacity15}`,
|
|
390
|
-
],
|
|
391
|
-
colorBgListItemGeneral: [transparent, transparent],
|
|
392
|
-
colorBgListItemGeneralHover: [slate.slate3, slateDark.slate4],
|
|
393
|
-
colorBgListItemGeneralFocus: [slate.slate4, slateDark.slate6],
|
|
394
|
-
colorBgListItemGeneralSelected: [indigo.indigo3, indigoDark.indigo4],
|
|
395
|
-
colorBgListItemGeneralSelectedHover: [indigo.indigo4, indigoDark.indigo6],
|
|
396
|
-
colorBgListItemGeneralSelectedFocus: [indigo.indigo4, indigoDark.indigo6],
|
|
397
|
-
colorBgListItemGeneralDisabled: [transparent, transparent],
|
|
398
|
-
colorTextListItemGeneralDisabled: [slate.slate9, slateDark.slate9],
|
|
399
|
-
colorBgListItemGeneralSelectedDisabled: [indigo.indigo5, indigoDark.indigo5],
|
|
400
|
-
opacityListItemGeneralDisabled: [`${opacity.opacity40}`, `${opacity.opacity40}`],
|
|
401
|
-
|
|
402
|
-
// Search Items
|
|
403
|
-
colorBgSearchRowHover: [slate.slate4, slateDark.slate5],
|
|
404
|
-
colorBgSearchRowCreateHover: [indigo.indigo4, indigoDark.indigo4],
|
|
405
|
-
opacitySearchItemDone: [`${opacity.opacity40}`, `${opacity.opacity40}`],
|
|
406
|
-
// Entity Box Style And States
|
|
407
|
-
// Basic Entity Box State
|
|
408
|
-
colorBgEntityBoxDefault: [whiteA.whiteA0, slateDark.slate3],
|
|
409
|
-
shadowStrokeEntityBoxDefault: [`0 0 0 1px ${slate.slate5}`, `0 0 0 1px ${slateDark.slate5}`],
|
|
410
|
-
shadowEntityBoxDefault: [
|
|
411
|
-
`0px 2px 4px 0px ${getOpacities(slate.slate12).opacity5}`,
|
|
412
|
-
`0px 2px 4px 0px ${getOpacities(slateDark.slate1).opacity5}`,
|
|
413
|
-
],
|
|
414
|
-
// :hover
|
|
415
|
-
colorBgEntityBoxDefaultHover: [whiteA.whiteA0, slateDark.slate4],
|
|
416
|
-
shadowEntityBoxDefaultHover: [
|
|
417
|
-
`0px 4px 8px 0px ${getOpacities(slate.slate12).opacity10}`,
|
|
418
|
-
`0px 4px 8px 0px ${getOpacities(slateDark.slate1).opacity10}`,
|
|
419
|
-
],
|
|
420
|
-
// :focus
|
|
421
|
-
colorBgEntityBoxDefaultFocus: [whiteA.whiteA0, slateDark.slate3],
|
|
422
|
-
colorOverlayEntityBoxDefaultFocus: [indigo.indigo9, indigoDark.indigo9],
|
|
423
|
-
shadowStrokeEntityBoxDefaultFocus: [
|
|
424
|
-
`0 0 0 2px ${getOpacities(indigo.indigo9).opacity40}`,
|
|
425
|
-
`0 0 0 2px ${getOpacities(indigoDark.indigo9).opacity40}`,
|
|
426
|
-
],
|
|
427
|
-
// :focus:hover
|
|
428
|
-
colorBgEntityBoxDefaultFocusHover: [whiteA.whiteA0, slateDark.slate4],
|
|
429
|
-
colorOverlayEntityBoxDefaultFocusHover: [indigo.indigo9, indigoDark.indigo9],
|
|
430
|
-
shadowStrokeEntityBoxDefaultFocusHover: [
|
|
431
|
-
`0 0 0 2px ${getOpacities(indigo.indigo9).opacity60}`,
|
|
432
|
-
`0 0 0 2px ${getOpacities(indigoDark.indigo9).opacity60}`,
|
|
433
|
-
],
|
|
434
|
-
//::drag
|
|
435
|
-
opacityEntityBoxDefaultDrag: [`${opacity.opacity40}`, `${opacity.opacity40}`],
|
|
436
|
-
shadowEntityBoxDefaultDrag: [
|
|
437
|
-
`0px 8px 12px 0px ${getOpacities(slate.slate12).opacity10}`,
|
|
438
|
-
`0px 8px 12px 0px ${getOpacities(slateDark.slate1).opacity10}`,
|
|
439
|
-
],
|
|
440
|
-
// Selected Entity Box State
|
|
441
|
-
colorBgEntityBoxSelected: [indigo.indigo2, indigoDark.indigo3],
|
|
442
|
-
shadowStrokeEntityBoxSelected: [
|
|
443
|
-
`0 0 0 1px ${getOpacities(indigo.indigo9).opacity40}, 0 0 0 3px ${getOpacities(indigo.indigo9).opacity40}`,
|
|
444
|
-
`0 0 0 1px ${indigoDark.indigo9}, 0 0 0 3px ${getOpacities(indigoDark.indigo9).opacity40}`,
|
|
445
|
-
],
|
|
446
|
-
// :hover
|
|
447
|
-
colorBgEntityBoxSelectedHover: [indigo.indigo3, indigoDark.indigo3],
|
|
448
|
-
shadowStrokeEntityBoxSelectedHover: [
|
|
449
|
-
`0 0 0 1px ${getOpacities(indigo.indigo9).opacity60}, 0 0 0 3px ${getOpacities(indigo.indigo9).opacity40}`,
|
|
450
|
-
`0 0 0 1px ${indigoDark.indigo9}, 0 0 0 3px ${getOpacities(indigoDark.indigo9).opacity40}`,
|
|
451
|
-
],
|
|
452
|
-
//::drag
|
|
453
|
-
colorBgEntityBoxSelectedDrag: [indigo.indigo3, indigoDark.indigo3],
|
|
454
|
-
shadowStrokeEntityBoxSelectedDrag: [
|
|
455
|
-
`0 0 0 1px ${getOpacities(indigo.indigo9).opacity40}, 0 0 0 3px ${getOpacities(indigo.indigo9).opacity40}`,
|
|
456
|
-
`0 0 0 1px ${indigoDark.indigo9}, 0 0 0 3px ${getOpacities(indigoDark.indigo9).opacity40}`,
|
|
457
|
-
],
|
|
458
|
-
// Disabled Entity Box State (done)
|
|
459
|
-
opacityEntityBoxDisabled: [`${opacity.opacity65}`, `${opacity.opacity65}`],
|
|
460
|
-
// :hover
|
|
461
|
-
opacityEntityBoxDisabledHover: [`${opacity.opacity75}`, `${opacity.opacity75}`],
|
|
462
|
-
// :focus
|
|
463
|
-
opacityEntityBoxDisabledFocus: [`${opacity.opacity75}`, `${opacity.opacity75}`],
|
|
464
|
-
// :drag
|
|
465
|
-
opacityEntityBoxDisabledDrag: [`${opacity.opacity40}`, `${opacity.opacity40}`],
|
|
466
|
-
// Entity Old
|
|
467
|
-
entityCardBgColor: [whiteA.whiteA0, slateDark.slate5],
|
|
468
|
-
entityCardSelectedColor: [getOpacities(slate.slate2).opacity80, getOpacities(slateDark.slate6).opacity50],
|
|
469
|
-
entityCardHoverColor: [getOpacities(slate.slate2).opacity80, getOpacities(slateDark.slate6).opacity50],
|
|
470
|
-
entityCardDoneColor: [getOpacities(slate.slate4).opacity30, getOpacities(slateDark.slate5).opacity30],
|
|
471
|
-
entityCardShadow: [
|
|
472
|
-
`0 0 0 1px ${getOpacities(slate.slate10).opacity10}, 0 2px 4px -4px ${getOpacities(slate.slate10).opacity20}`,
|
|
473
|
-
`0 0 0 1px ${getOpacities(slateDark.slate2).opacity10}, 0 2px 4px -4px ${getOpacities(slateDark.slate2).opacity20}`,
|
|
474
|
-
],
|
|
475
|
-
entityCardShadowHover: [
|
|
476
|
-
`0 0 0 1px ${getOpacities(slate.slate10).opacity10}, 0 2px 4px -4px ${getOpacities(slate.slate10).opacity20}`,
|
|
477
|
-
`0 0 0 1px ${getOpacities(slateDark.slate2).opacity10}, 0 2px 4px -4px ${getOpacities(slateDark.slate2).opacity20}`,
|
|
478
|
-
],
|
|
479
|
-
colorBgSegmentedControl: [getOpacities(slate.slate5).opacity80, getOpacities(slateDark.slate3).opacity80],
|
|
480
|
-
colorBgMenuHeaderAvatar: [whiteA.whiteA0, slateDark.slate2],
|
|
481
|
-
shadowMenuHeaderAvatar: [
|
|
482
|
-
`0px 1px 4px ${getOpacities(slate.slate11).opacity10}, 0 0 0 0.5px ${getOpacities(slate.slate5).opacity50}`,
|
|
483
|
-
`0 0 0 1px ${getOpacities(slateDark.slate9).opacity20}`,
|
|
484
|
-
],
|
|
485
|
-
// Main Menu Items Styles and States
|
|
486
|
-
// Dragged
|
|
487
|
-
opacityMenuItemDragged: [`${opacity.opacity40}`, `${opacity.opacity40}`],
|
|
488
|
-
colorBgMenuItemSelectedDragged: [indigo.indigo6, indigoDark.indigo6],
|
|
489
|
-
// Default
|
|
490
|
-
colorTextMenuItem: [slateDark.slate5, getOpacities(slateDark.slate12).opacity90],
|
|
491
|
-
colorBgMenuItem: [transparent, transparent],
|
|
492
|
-
// :hover
|
|
493
|
-
colorBgMenuItemHover: [slate.slate5, slateDark.slate2],
|
|
494
|
-
// :focus
|
|
495
|
-
colorBgMenuItemFocus: [slate.slate6, slateDark.slate5],
|
|
496
|
-
// Selected
|
|
497
|
-
colorBgMenuItemSelected: [getOpacities(indigo.indigo5).opacity80, indigoDark.indigo3],
|
|
498
|
-
// :hover
|
|
499
|
-
colorBgMenuItemSelectedHover: [getOpacities(indigo.indigo6).opacity70, indigoDark.indigo5],
|
|
500
|
-
// :focus, :focus:hover
|
|
501
|
-
colorBgPinnedFieldsLabel: [slate.slate11, slateDark.slate11],
|
|
502
|
-
colorBgObjectEditorSeparator: [slate.slate12, slateDark.slate12],
|
|
503
|
-
colorBgMenuItemSelectedFocused: [indigo.indigo6, indigoDark.indigo5],
|
|
504
|
-
colorBgFieldEditorContainer: [slate.slate2, slateDark.slate3],
|
|
505
|
-
colorBgFieldEditorLinkEqualSign: [slate.slate6, slateDark.slate2],
|
|
506
|
-
allowedDropColor: [slate.slate4, slateDark.slate4],
|
|
507
|
-
relationViewBgColor: [slate.slate2, slateDark.slate3],
|
|
508
|
-
|
|
509
|
-
mySpaceIconColor: [swatches["gray-light"], swatches["gray-light"]],
|
|
510
|
-
mySpaceIconBg: [getOpacities(swatches["gray-light"]).opacity20, getOpacities(swatches["gray-light"]).opacity20],
|
|
511
|
-
privateIconColor: [swatches.green, swatches.green],
|
|
512
|
-
privateIconBg: [getOpacities(swatches.green).opacity20, getOpacities(swatches.green).opacity20],
|
|
513
|
-
favoritesIconColor: [swatches.yellow, swatches.yellow],
|
|
514
|
-
favoritesIconBg: [getOpacities(swatches.yellow).opacity20, getOpacities(swatches.yellow).opacity20],
|
|
515
|
-
|
|
516
|
-
// Unit
|
|
517
|
-
unitBg: [slate.slate3, slateDark.slate6],
|
|
518
|
-
unitBgHover: [slate.slate4, slateDark.slate7],
|
|
519
|
-
|
|
520
|
-
// Badges
|
|
521
|
-
colorBgBadgeNeutral: [getOpacities(indigo.indigo5).opacity70, getOpacities(indigoDark.indigo4).opacity80],
|
|
522
|
-
colorBgBadgeSuccess: [teal.teal5, tealDark.teal5],
|
|
523
|
-
colorBgBadgeWarning: [yellow.yellow5, yellowDark.yellow5],
|
|
524
|
-
colorBgBadgeError: [red.red5, redDark.red5],
|
|
525
|
-
colorTextBadgeNeutral: [indigo.indigo11, indigoDark.indigo11],
|
|
526
|
-
colorTextBadgeSuccess: [teal.teal11, tealDark.teal11],
|
|
527
|
-
colorTextBadgeWarning: [yellow.yellow11, yellowDark.yellow11],
|
|
528
|
-
colorTextBadgeError: [red.red11, redDark.red11],
|
|
529
|
-
badgeBgColor: [getOpacities(slate.slate10).opacity20, getOpacities(slate.slate10).opacity20],
|
|
530
|
-
panelBadgeBgColor: [getOpacities(slate.slate10).opacity20, getOpacities(slate.slate10).opacity20],
|
|
531
|
-
tooltipBgColor: [slateDark.slate5, slateDark.slate6],
|
|
532
|
-
todayMarkerColor: [red.red8, redDark.red6],
|
|
533
|
-
viewBgOverlayColor: [getOpacities(slate.slate8).opacity20, getOpacities(slateDark.slate1).opacity60],
|
|
534
|
-
floatEditorMenuBg: [slate.slate1, slateDark.slate6],
|
|
535
|
-
floatEditorActiveColor: [indigo.indigo11, indigoDark.indigo11],
|
|
536
|
-
planBadgeBgColor: [yellow.yellow10, yellowDark.yellow10],
|
|
537
|
-
commentColor: [getOpacities(yellow.yellow6).opacity60, getOpacities(yellowDark.yellow9).opacity40],
|
|
538
|
-
cellBackgroundColor: [slate.slate2, slateDark.slate2],
|
|
539
|
-
cellBackgroundHoverColor: [getOpacities(slate.slate6).opacity30, getOpacities(slateDark.slate6).opacity30],
|
|
540
|
-
cellBorderColor: [getOpacities(slate.slate8).opacity50, getOpacities(slateDark.slate9).opacity50],
|
|
541
|
-
cellPinnedBorderColor: [getOpacities(slate.slate8).opacity70, getOpacities(slateDark.slate9).opacity70],
|
|
542
|
-
tableRowWarningColor: [getOpacities(yellow.yellow6).opacity60, getOpacities(yellowDark.yellow9).opacity40],
|
|
543
|
-
errorBgColor: [getOpacities(red.red9).opacity20, getOpacities(redDark.red9).opacity60],
|
|
544
|
-
errorTextColor: [red.red11, red.red7],
|
|
545
|
-
errorButtonColor: [red.red9, redDark.red10],
|
|
546
|
-
warningBgColor: [getOpacities(yellow.yellow6).opacity60, getOpacities(yellowDark.yellow8).opacity60],
|
|
547
|
-
warningButtonColor: [yellow.yellow11, yellowDark.yellow11],
|
|
548
|
-
infoBox: [getOpacities(yellow.yellow4).opacity50, getOpacities(yellowDark.yellow9).opacity20],
|
|
549
|
-
appCardBgColor: [whiteA.whiteA0, slateDark.slate2],
|
|
550
|
-
appCardHoverColor: [getOpacities(slate.slate1).opacity95, slateDark.slate2],
|
|
551
|
-
modalBg: [getOpacities(slate.slate11).opacity20, getOpacities(slateDark.slate2).opacity50],
|
|
552
|
-
modalContentBg: [whiteA.whiteA0, slateDark.slate3],
|
|
553
|
-
progressIconBg: [blackA.blackA7, whiteA.whiteA7],
|
|
554
|
-
progressIconFill: [blackA.blackA11, whiteA.whiteA11],
|
|
555
|
-
selectedColorBorder: [getOpacities(slate.slate6).opacity25, getOpacities(slate.slate6).opacity25],
|
|
556
|
-
formBg: [slate.slate2, slateDark.slate2],
|
|
557
|
-
formHeaderShadow: [
|
|
558
|
-
`${getOpacities(slate.slate10).opacity10} 0px 0px 6px`,
|
|
559
|
-
`${getOpacities(slateDark.slate1).opacity40} 0px 0px 6px`,
|
|
560
|
-
],
|
|
561
|
-
formEditorFieldBg: [slate.slate3, slateDark.slate4],
|
|
562
|
-
filterGroup1Bg: [slate.slate2, slateDark.slate6],
|
|
563
|
-
filterGroup2Bg: [slate.slate3, slateDark.slate7],
|
|
564
|
-
filterGroupBorder: [blackA.blackA3, whiteA.whiteA3],
|
|
565
|
-
colorBgNotificationHover: [slate.slate3, slateDark.slate4],
|
|
566
|
-
colorBgNotificationSelected: [indigo.indigo3, indigoDark.indigo4],
|
|
567
|
-
colorBgNotificationSelectedHover: [indigo.indigo4, indigoDark.indigo6],
|
|
568
|
-
disabledInversedTextColor: [shades.opacity25, lights.opacity25],
|
|
569
|
-
success: [teal.teal9, tealDark.teal9],
|
|
570
|
-
danger: [red.red9, redDark.red10],
|
|
571
|
-
active: [red.red9, redDark.red10],
|
|
572
|
-
warning: [yellow.yellow9, yellowDark.yellow8],
|
|
573
|
-
cardBg: ["#FFFFFF", slateDark.slate6],
|
|
574
|
-
cardSelected: ["#FFFB8F", slateDark.slate5],
|
|
575
|
-
cardSelectedHover: ["rgba(240, 244, 247, 0.6)", slateDark.slate5],
|
|
576
|
-
selectedImageBorder: [blackA.blackA8, whiteA.whiteA11],
|
|
577
|
-
transparent: [transparent, transparent],
|
|
578
|
-
shades: [lights, shades],
|
|
579
|
-
lights: [shades, lights],
|
|
580
|
-
separators: [separators, inversedSeparators],
|
|
581
|
-
inversedSeparators: [inversedSeparators, separators],
|
|
582
|
-
progressBg: [slate.slate4, slate.slate4],
|
|
583
|
-
progressText: [slate.slate11, slate.slate11],
|
|
584
|
-
progressFillBg: [slate.slate11, slate.slate11],
|
|
585
|
-
progressFillText: [whiteA.whiteA0, whiteA.whiteA0],
|
|
586
|
-
progressBarFillNeutral: [getOpacities(slate.slate9).opacity20, getOpacities(slateDark.slate9).opacity20],
|
|
587
|
-
progressBarFill: [indigo.indigo9, indigoDark.indigo10],
|
|
588
|
-
progressBarBg: [getOpacities(indigo.indigo9).opacity25, getOpacities(indigoDark.indigo10).opacity25],
|
|
589
|
-
searchFiltersBg: [slate.slate1, slateDark.slate2],
|
|
590
|
-
colorPickerSwatchBorder: [blackA.blackA7, blackA.blackA7],
|
|
591
|
-
colorBorderRichTextMedia: [blackA.blackA7, blackA.blackA7],
|
|
592
|
-
richTextTableBorder: [blackA.blackA5, whiteA.whiteA7],
|
|
593
|
-
|
|
594
|
-
// Drag and drop
|
|
595
|
-
colorBgDropLine: [indigo.indigo8, indigoDark.indigo8],
|
|
596
|
-
|
|
597
|
-
// Views
|
|
598
|
-
viewBg: [slate.slate1, slateDark.slate1],
|
|
599
|
-
viewSecondaryBg: [slate.slate2, slateDark.slate2],
|
|
600
|
-
viewHighlightBg: [indigo.indigo3, indigoDark.indigo3],
|
|
601
|
-
|
|
602
|
-
// Board
|
|
603
|
-
boardBg: [slate.slate1, slateDark.slate1],
|
|
604
|
-
boardBgWithOpacity80: [getOpacities(slate.slate1).opacity80, getOpacities(slateDark.slate1).opacity80],
|
|
605
|
-
boardAxisBgHover: [slate.slate4, slateDark.slate4],
|
|
606
|
-
|
|
607
|
-
// Grid
|
|
608
|
-
gridHeaderBgColor: [slate.slate2, slateDark.slate3],
|
|
609
|
-
gridHeaderHoverBgColor: [slate.slate3, slateDark.slate4],
|
|
610
|
-
gridHeaderTextColor: [slate.slate10, slateDark.slate11],
|
|
611
|
-
gridCellBgColor: [whiteA.whiteA0, slateDark.slate2],
|
|
612
|
-
gridCellBorderColor: [slate.slate5, slateDark.slate6],
|
|
613
|
-
gridDisabledCellBgColor: [slate.slate2, slateDark.slate3],
|
|
614
|
-
gridSelectedCellBgColor: [indigo.indigo3, indigoDark.indigo3],
|
|
615
|
-
gridHighlightedCellBgColor: [indigo.indigo4, indigoDark.indigo5],
|
|
616
|
-
gridSelectedCellBorderColor: [indigo.indigo6, indigoDark.indigo7],
|
|
617
|
-
gridSelectedPinnedCellBorderColor: [indigo.indigo7, indigoDark.indigo7],
|
|
618
|
-
gridDisabledSelectedCellBgColor: [indigo.indigo4, indigoDark.indigo5],
|
|
619
|
-
gridActiveCellBorderColor: [indigo.indigo8, indigoDark.indigo9],
|
|
620
|
-
|
|
621
|
-
//timeline
|
|
622
|
-
timelineEntityHandleColor: [indigo.indigo7, indigoDark.indigo7],
|
|
623
|
-
timelineDependencyHoverBgColor: [indigo.indigo8, indigoDark.indigo8],
|
|
624
|
-
timelineDependencyOverlapBgColor: [red.red9, redDark.red9],
|
|
625
|
-
timelineDependencyOverlapHoverBgColor: [red.red11, redDark.red11],
|
|
626
|
-
timelineCellBgColor: [slate.slate1, slateDark.slate1],
|
|
627
|
-
timelineCellWeekendBgColor: [slate.slate2, slateDark.slate2],
|
|
628
|
-
timelineCellTodayBgColor: [indigo.indigo4, indigoDark.indigo2],
|
|
629
|
-
timelineCreateEntityPlaceholderBgColor: [getOpacities(slate.slate11).opacity20, slateDark.slate7],
|
|
630
|
-
|
|
631
|
-
// #region buttons
|
|
632
|
-
// solid
|
|
633
|
-
colorBgButtonSolidAccentDefault: [indigo.indigo9, indigoDark.indigo9],
|
|
634
|
-
colorBgButtonSolidAccentHover: [indigo.indigo11, indigoDark.indigo10],
|
|
635
|
-
colorBgButtonSolidNeutralDefault: [slate.slate12, slateDark.slate12],
|
|
636
|
-
colorBgButtonSolidNeutralHover: [getOpacities(slate.slate12).opacity85, whiteA.whiteA0],
|
|
637
|
-
colorBgButtonSolidDestructiveDefault: [red.red9, redDark.red9],
|
|
638
|
-
colorBgButtonSolidDestructiveHover: [red.red11, redDark.red10],
|
|
639
|
-
colorTextButtonSolidAccent: [whiteA.whiteA0, whiteA.whiteA0],
|
|
640
|
-
colorTextButtonSolidAccentActive: [getOpacities(whiteA.whiteA0).opacity80, getOpacities(whiteA.whiteA0).opacity80],
|
|
641
|
-
colorTextButtonSolidNeutral: [whiteA.whiteA0, slateDark.slate2],
|
|
642
|
-
colorTextButtonSolidNeutralActive: [whiteA.whiteA0, getOpacities(slateDark.slate2).opacity80],
|
|
643
|
-
colorTextButtonSolidDestructive: [whiteA.whiteA0, whiteA.whiteA0],
|
|
644
|
-
colorTextButtonSolidDestructiveActive: [
|
|
645
|
-
getOpacities(whiteA.whiteA0).opacity80,
|
|
646
|
-
getOpacities(whiteA.whiteA0).opacity80,
|
|
647
|
-
],
|
|
648
|
-
colorIconButtonSolidAccent: [whiteA.whiteA0, whiteA.whiteA0],
|
|
649
|
-
colorIconButtonSolidNeutral: [whiteA.whiteA0, slateDark.slate8],
|
|
650
|
-
colorIconButtonSolidDestructive: [whiteA.whiteA0, whiteA.whiteA0],
|
|
651
|
-
// outline
|
|
652
|
-
colorBorderButtonOutlineAccentDefault: [indigo.indigo8, indigoDark.indigo8],
|
|
653
|
-
colorBorderButtonOutlineNeutralDefault: [slate.slate8, slateDark.slate7],
|
|
654
|
-
colorBorderButtonOutlineDestructiveDefault: [red.red7, redDark.red7],
|
|
655
|
-
colorBgButtonOutlineAccentDefault: [whiteA.whiteA0, slateDark.slate1],
|
|
656
|
-
colorBgButtonOutlineAccentHover: [indigo.indigo3, indigoDark.indigo3],
|
|
657
|
-
colorBgButtonOutlineNeutralDefault: [whiteA.whiteA0, slateDark.slate1],
|
|
658
|
-
colorBgButtonOutlineNeutralHover: [slate.slate4, slateDark.slate4],
|
|
659
|
-
colorBgButtonOutlineDestructiveDefault: [whiteA.whiteA0, slateDark.slate1],
|
|
660
|
-
colorBgButtonOutlineDestructiveHover: [red.red4, redDark.red4],
|
|
661
|
-
colorTextButtonOutlineAccent: [indigo.indigo11, indigoDark.indigo11],
|
|
662
|
-
colorTextButtonOutlineAccentActive: [
|
|
663
|
-
getOpacities(indigo.indigo11).opacity80,
|
|
664
|
-
getOpacities(indigoDark.indigo11).opacity80,
|
|
665
|
-
],
|
|
666
|
-
colorTextButtonOutlineNeutral: [slate.slate11, slateDark.slate11],
|
|
667
|
-
colorTextButtonOutlineNeutralActive: [
|
|
668
|
-
getOpacities(slate.slate12).opacity80,
|
|
669
|
-
getOpacities(slateDark.slate12).opacity80,
|
|
670
|
-
],
|
|
671
|
-
colorTextButtonOutlineDestructive: [red.red11, redDark.red11],
|
|
672
|
-
colorTextButtonOutlineDestructiveActive: [getOpacities(red.red11).opacity80, getOpacities(redDark.red11).opacity80],
|
|
673
|
-
colorIconButtonOutlineAccent: [indigo.indigo11, indigoDark.indigo11],
|
|
674
|
-
colorIconButtonOutlineNeutral: [slate.slate11, slateDark.slate11],
|
|
675
|
-
colorIconButtonOutlineDestructive: [red.red11, redDark.red11],
|
|
676
|
-
// soft
|
|
677
|
-
colorBgButtonSoftAccentDefault: [indigo.indigo3, indigoDark.indigo4],
|
|
678
|
-
colorBgButtonSoftAccentHover: [indigo.indigo5, indigoDark.indigo6],
|
|
679
|
-
colorBgButtonSoftNeutralDefault: [slate.slate3, slateDark.slate3],
|
|
680
|
-
colorBgButtonSoftNeutralHover: [slate.slate7, slateDark.slate7],
|
|
681
|
-
colorBgButtonSoftDestructiveDefault: [red.red4, redDark.red4],
|
|
682
|
-
colorBgButtonSoftDestructiveHover: [red.red6, redDark.red6],
|
|
683
|
-
colorTextButtonSoftAccent: [indigo.indigo11, indigoDark.indigo11],
|
|
684
|
-
colorTextButtonSoftAccentActive: [
|
|
685
|
-
getOpacities(indigo.indigo11).opacity80,
|
|
686
|
-
getOpacities(indigoDark.indigo11).opacity80,
|
|
687
|
-
],
|
|
688
|
-
colorTextButtonSoftNeutral: [slate.slate11, slateDark.slate11],
|
|
689
|
-
colorTextButtonSoftNeutralActive: [getOpacities(slate.slate11).opacity80, getOpacities(slateDark.slate11).opacity80],
|
|
690
|
-
colorTextButtonSoftDestructive: [red.red11, redDark.red11],
|
|
691
|
-
colorTextButtonSoftDestructiveActive: [getOpacities(red.red11).opacity80, getOpacities(redDark.red11).opacity80],
|
|
692
|
-
colorIconButtonSoftAccent: [indigo.indigo11, indigoDark.indigo11],
|
|
693
|
-
colorIconButtonSoftNeutral: [slate.slate11, slateDark.slate11],
|
|
694
|
-
colorIconButtonSoftDestructive: [red.red11, redDark.red11],
|
|
695
|
-
// ghost
|
|
696
|
-
colorBgButtonGhostAccentDefault: [transparent, transparent],
|
|
697
|
-
colorBgButtonGhostAccentHover: [getOpacities(indigo.indigo4).opacity80, getOpacities(indigoDark.indigo4).opacity80],
|
|
698
|
-
colorBgButtonGhostNeutralDefault: [transparent, transparent],
|
|
699
|
-
colorBgButtonGhostNeutralHover: [getOpacities(slate.slate7).opacity50, getOpacities(slateDark.slate6).opacity80],
|
|
700
|
-
colorBgButtonGhostDestructiveDefault: [transparent, transparent],
|
|
701
|
-
colorBgButtonGhostDestructiveHover: [red.red4, redDark.red4],
|
|
702
|
-
colorTextButtonGhostAccent: [indigo.indigo11, indigoDark.indigo11],
|
|
703
|
-
colorTextButtonGhostAccentActive: [
|
|
704
|
-
getOpacities(indigo.indigo11).opacity80,
|
|
705
|
-
getOpacities(indigoDark.indigo11).opacity80,
|
|
706
|
-
],
|
|
707
|
-
colorTextButtonGhostNeutral: [slate.slate11, slateDark.slate11],
|
|
708
|
-
colorTextButtonGhostNeutralActive: [getOpacities(slate.slate11).opacity80, getOpacities(slateDark.slate11).opacity80],
|
|
709
|
-
colorTextButtonGhostDestructive: [red.red11, redDark.red11],
|
|
710
|
-
colorTextButtonGhostDestructiveActive: [getOpacities(red.red11).opacity80, getOpacities(redDark.red11).opacity80],
|
|
711
|
-
colorIconButtonGhostAccent: [indigo.indigo11, indigoDark.indigo11],
|
|
712
|
-
colorIconButtonGhostNeutral: [slate.slate11, slateDark.slate11],
|
|
713
|
-
colorIconButtonGhostDestructive: [red.red11, redDark.red11],
|
|
714
|
-
// #endregion
|
|
715
|
-
|
|
716
|
-
colorBorderAccentFocusRing: [getOpacities(indigo.indigo9).opacity30, getOpacities(indigo.indigo9).opacity30],
|
|
717
|
-
colorBorderNeutralFocusRing: [getOpacities(slate.slate9).opacity30, getOpacities(slate.slate9).opacity30],
|
|
718
|
-
colorBorderDestructiveFocusRing: [getOpacities(red.red9).opacity30, getOpacities(red.red9).opacity30],
|
|
719
|
-
|
|
720
|
-
colorBgReactionsDefault: [whiteA.whiteA0, slateDark.slate2],
|
|
721
|
-
colorBgReactionsHover: [slate.slate3, slateDark.slate6],
|
|
722
|
-
colorBorderReactionsHover: [slate.slate8, slateDark.slate9],
|
|
723
|
-
colorBgReactionsSelectedDefault: [indigo.indigo3, indigoDark.indigo8],
|
|
724
|
-
colorBorderReactionsSelectedDefault: [indigo.indigo8, indigoDark.indigo8],
|
|
725
|
-
colorBgReactionsSelectedHover: [indigo.indigo2, indigo.indigo10],
|
|
726
|
-
colorBorderReactionsSelectedHover: [indigo.indigo9, indigo.indigo10],
|
|
727
|
-
colorTextReactionsSelected: [indigo.indigo10, slateDark.slate12],
|
|
728
|
-
colorBgToastDefault: [slate.slate1, slateDark.slate1],
|
|
729
|
-
colorBgDbTabHover: [slate.slate3, slateDark.slate4],
|
|
730
|
-
colorBgDbTabFocus: [slate.slate6, slateDark.slate6],
|
|
731
|
-
colorBgTabHover: [getOpacities(slate.slate11).opacity10, getOpacities(slateDark.slate11).opacity10],
|
|
732
|
-
|
|
733
|
-
// Chat
|
|
734
|
-
colorBgMessageContainer: [blackA.blackA3, slateDark.slate6],
|
|
735
|
-
colorBgMessageContainerHover: [slate.slate2, slateDark.slate3],
|
|
736
|
-
colorBgEntityAvatarDefault: [indigo.indigo1, indigoDark.indigo1],
|
|
737
|
-
colorBgEntityAvatarHover: [indigo.indigo3, indigoDark.indigo3],
|
|
738
|
-
colorTextEntityAvatarDefault: [indigo.indigo8, indigoDark.indigo8],
|
|
739
|
-
colorTextEntityAvatarHover: [indigo.indigo9, indigoDark.indigo9],
|
|
740
|
-
|
|
741
|
-
// Text editor
|
|
742
|
-
colorBgEditorImageZoomed: [slate.slate3, slateDark.slate6],
|
|
743
|
-
colorMermaidPrimaryColor: [slate.slate2, slateDark.slate8],
|
|
744
|
-
colorMermaidPrimaryBorderColor: [slate.slate9, slateDark.slate9],
|
|
745
|
-
colorMermaidLineColor: [slate.slate10, slateDark.slate9],
|
|
746
|
-
|
|
747
|
-
//Whiteboard
|
|
748
|
-
instrumentsMenuBg: [getOpacities(whiteA.whiteA0).opacity100, getOpacities(slateDark.slate4).opacity100],
|
|
749
|
-
instrumentsMenuShadow: [
|
|
750
|
-
`0px 0px 1px 0px ${getOpacities(slate.slate11).opacity20}, 0px 4px 6px 0px ${
|
|
751
|
-
getOpacities(slate.slate11).opacity5
|
|
752
|
-
}, 0px 3px 12px 0px ${getOpacities(slate.slate11).opacity10}`,
|
|
753
|
-
`0px 0px 1px 0px ${getOpacities(slateDark.slate6).opacity100}, 0px 4px 6px 0px ${
|
|
754
|
-
getOpacities(slateDark.slate1).opacity5
|
|
755
|
-
}, 0px 3px 12px 0px ${getOpacities(slateDark.slate1).opacity15}`,
|
|
756
|
-
],
|
|
757
|
-
commentBubbleBg: [whiteA.whiteA0, slateDark.slate6],
|
|
758
|
-
commentsPanelShadow: [
|
|
759
|
-
`0 0 0 1px ${getOpacities(slate.slate10).opacity10}, 0 2px 4px -4px ${getOpacities(slate.slate10).opacity20}`,
|
|
760
|
-
`0 0 0 1px ${getOpacities(slateDark.slate2).opacity10}, 0 2px 4px -4px ${getOpacities(slateDark.slate2).opacity20}`,
|
|
761
|
-
],
|
|
762
|
-
|
|
763
|
-
// SegmentedControl
|
|
764
|
-
colorBgSegmentedControlDefault: [slate.slate3, slateDark.slate1],
|
|
765
|
-
colorBgSegmentedControlActive: [slate.slate1, slateDark.slate6],
|
|
766
|
-
colorBgSegmentedControlHover: [slate.slate5, slateDark.slate4],
|
|
767
|
-
colorBorderSegmentedControlDefault: [slate.slate6, slateDark.slate7],
|
|
768
|
-
|
|
769
|
-
// Chargebee info
|
|
770
|
-
colorBgChargebeeInfoBox: [slate.slate3, slateDark.slate1],
|
|
771
|
-
} as const;
|
|
772
|
-
|
|
773
|
-
type ThemeDefs = typeof themeColors;
|
|
774
|
-
|
|
775
|
-
type GetThemeColors<idx extends number> = {
|
|
776
|
-
[k in keyof ThemeDefs]: ThemeDefs[k][idx];
|
|
777
|
-
};
|
|
778
|
-
|
|
779
|
-
type LightColors = GetThemeColors<0>;
|
|
780
|
-
type DarkColors = GetThemeColors<1>;
|
|
781
|
-
|
|
782
|
-
const lightColors = Object.fromEntries(
|
|
783
|
-
Object.entries(themeColors).map(([key, value]) => {
|
|
784
|
-
return [key, value[0]];
|
|
785
|
-
})
|
|
786
|
-
) as LightColors;
|
|
787
|
-
|
|
788
|
-
const light2Colors = {
|
|
789
|
-
...lightColors,
|
|
790
|
-
mode: "light2",
|
|
791
|
-
} as const;
|
|
792
|
-
|
|
793
|
-
const darkColors = Object.fromEntries(
|
|
794
|
-
Object.entries(themeColors).map(([key, value]) => {
|
|
795
|
-
return [key, value[1]];
|
|
796
|
-
})
|
|
797
|
-
) as DarkColors;
|
|
798
|
-
|
|
799
|
-
export function getLightColors() {
|
|
800
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
801
|
-
// @ts-ignore
|
|
802
|
-
if (process.env.NODE_ENV !== "test") {
|
|
803
|
-
throw new Error("Only for test purpose");
|
|
804
|
-
}
|
|
805
|
-
return lightColors;
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
export function getDarkColors() {
|
|
809
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
810
|
-
// @ts-ignore
|
|
811
|
-
if (process.env.NODE_ENV !== "test") {
|
|
812
|
-
throw new Error("Only for test purpose");
|
|
813
|
-
}
|
|
814
|
-
return darkColors;
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
export function getLight2Colors() {
|
|
818
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
819
|
-
// @ts-ignore
|
|
820
|
-
if (process.env.NODE_ENV !== "test") {
|
|
821
|
-
throw new Error("Only for test purpose");
|
|
822
|
-
}
|
|
823
|
-
return light2Colors;
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
const getDefaultTheme = (): never => {
|
|
827
|
-
throw Error("Please specify theme mode");
|
|
828
|
-
};
|
|
829
|
-
|
|
830
|
-
export function getThemeValue<T>(theme: ThemeMode, values: {light: T; light2?: T; dark: T}): T {
|
|
831
|
-
if (theme in values) {
|
|
832
|
-
return values[theme] as T;
|
|
833
|
-
}
|
|
834
|
-
return values.light;
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
function getTypeColors(themeColor: string, theme: ThemeMode) {
|
|
838
|
-
let color;
|
|
839
|
-
// switch to chroma.valid once we start using 2.0.1
|
|
840
|
-
try {
|
|
841
|
-
chroma(themeColor);
|
|
842
|
-
color = themeColor;
|
|
843
|
-
} catch (e) {
|
|
844
|
-
color = brandColors.green;
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
const lightTypeColors = {
|
|
848
|
-
primary: color,
|
|
849
|
-
opacity: getOpacities(color),
|
|
850
|
-
darkenPrimary: getDarkenColor(color),
|
|
851
|
-
brightenPrimary: chroma(color).luminance(0.92).desaturate(0.1).alpha(0.98).css(),
|
|
852
|
-
headerBg: chroma(color).luminance(0.7).desaturate(0.5).set("hsl.h", "+2").css(),
|
|
853
|
-
detailsBg: chroma(color).alpha(0.5).luminance(0.85).hex(),
|
|
854
|
-
focus: chroma(color).alpha(0.25).css(),
|
|
855
|
-
separator: chroma(color).alpha(0.3).css(),
|
|
856
|
-
};
|
|
857
|
-
|
|
858
|
-
const darkTypeColors = {
|
|
859
|
-
primary: color,
|
|
860
|
-
opacity: getOpacities(color),
|
|
861
|
-
darkenPrimary: getDarkenColor(color),
|
|
862
|
-
brightenPrimary: chroma(color).luminance(0.92).desaturate(0.1).alpha(0.98).css(),
|
|
863
|
-
headerBg: chroma(color).luminance(0.7).desaturate(0.5).set("hsl.h", "+2").css(),
|
|
864
|
-
detailsBg: chroma(color).alpha(0.03).luminance(0.8).desaturate(0.8).darken(0.1).hex(),
|
|
865
|
-
focus: chroma(color).alpha(0.25).css(),
|
|
866
|
-
separator: chroma(color).alpha(0.3).css(),
|
|
867
|
-
};
|
|
868
|
-
|
|
869
|
-
switch (theme) {
|
|
870
|
-
case "light":
|
|
871
|
-
return lightTypeColors;
|
|
872
|
-
case "dark":
|
|
873
|
-
return darkTypeColors;
|
|
874
|
-
case "light2":
|
|
875
|
-
return lightTypeColors;
|
|
876
|
-
default:
|
|
877
|
-
return lightTypeColors;
|
|
878
|
-
}
|
|
879
|
-
}
|
|
880
|
-
|
|
881
|
-
type DesignColor = typeof darkColors | typeof lightColors | typeof light2Colors;
|
|
882
|
-
|
|
883
|
-
export type ThemeColors = ReturnType<typeof getTypeColors> & DesignColor;
|
|
884
|
-
|
|
885
|
-
const colorsByTheme: Record<string, DesignColor> = {
|
|
886
|
-
dark: darkColors,
|
|
887
|
-
light: lightColors,
|
|
888
|
-
light2: light2Colors,
|
|
889
|
-
};
|
|
890
|
-
|
|
891
|
-
export const getThemeColors: (themeColor: string, theme: ThemeMode) => ThemeColors = _.memoize(
|
|
892
|
-
(_themeColor: string, theme: ThemeMode = getDefaultTheme()): ThemeColors => {
|
|
893
|
-
const cl = brandColors.blue;
|
|
894
|
-
const colors = colorsByTheme[theme];
|
|
895
|
-
return {
|
|
896
|
-
...getTypeColors(cl, theme),
|
|
897
|
-
...colors,
|
|
898
|
-
};
|
|
899
|
-
},
|
|
900
|
-
(_themeColor, theme) => theme
|
|
901
|
-
);
|
|
902
|
-
|
|
903
|
-
export const getTextColor = _.memoize((color: string): string => {
|
|
904
|
-
return makeChromaColor(color).hex();
|
|
905
|
-
});
|
|
906
|
-
|
|
907
|
-
export const getLinkedHighlightBackgroundColor = _.memoize(
|
|
908
|
-
(themeColors: ThemeColors, color: string): string => {
|
|
909
|
-
switch (themeColors.mode) {
|
|
910
|
-
case "dark":
|
|
911
|
-
return makeChromaColor(color).alpha(0.4).luminance(0.5).css();
|
|
912
|
-
case "light":
|
|
913
|
-
return makeChromaColor(color).alpha(0.3).luminance(0.6).css();
|
|
914
|
-
default:
|
|
915
|
-
return makeChromaColor(color).alpha(0.3).luminance(0.6).css();
|
|
916
|
-
}
|
|
917
|
-
},
|
|
918
|
-
(themeMode, color) => `${themeMode}-${color}`
|
|
919
|
-
);
|
|
920
|
-
|
|
921
|
-
export const getLinkedHighlightDecorationBackgroundColor = _.memoize(
|
|
922
|
-
(themeColors: ThemeColors, color: string): string => {
|
|
923
|
-
switch (themeColors.mode) {
|
|
924
|
-
case "dark":
|
|
925
|
-
return makeChromaColor(color).alpha(0.9).luminance(0.5).darken(0.2).css();
|
|
926
|
-
case "light":
|
|
927
|
-
return makeChromaColor(color).alpha(0.9).luminance(0.5).css();
|
|
928
|
-
default:
|
|
929
|
-
return makeChromaColor(color).alpha(0.9).luminance(0.5).css();
|
|
930
|
-
}
|
|
931
|
-
},
|
|
932
|
-
(themeMode, color) => `${themeMode}-${color}`
|
|
933
|
-
);
|
|
934
|
-
|
|
935
|
-
export const getEnumBackgroundColor = _.memoize(
|
|
936
|
-
(mode: ThemeMode, color: string) => {
|
|
937
|
-
return getThemeValue(mode, {
|
|
938
|
-
light: a11yColor(getOpacities(color).opacity15, lightColors.whiteColor, 1),
|
|
939
|
-
dark: a11yColor(getOpacities(color).opacity30, darkColors.menuBg, 1.3),
|
|
940
|
-
});
|
|
941
|
-
},
|
|
942
|
-
(themeMode, color) => `${themeMode}-${color}`
|
|
943
|
-
);
|
|
944
|
-
|
|
945
|
-
export const getEnumTextColor = (color: string) => {
|
|
946
|
-
return `color-mix(in srgb, ${color} 25%, ${themeVars.textColor} 75%)`;
|
|
947
|
-
};
|
|
948
|
-
|
|
949
|
-
// TODO: fix color for light2. It should same as 'dark' only on dark menu but same as 'light' on other parts of application
|
|
950
|
-
export const getAppIconBackgroundColor = (mode: ThemeMode, color: string) =>
|
|
951
|
-
getThemeValue(mode, {
|
|
952
|
-
dark: a11yColor(getOpacities(color).opacity30, darkColors.menuBg, 1.3),
|
|
953
|
-
light: a11yColor(getOpacities(color).opacity15, lightColors.whiteColor, 1),
|
|
954
|
-
light2: a11yColor(getOpacities(color).opacity30, darkColors.menuBg, 1.3),
|
|
955
|
-
});
|
|
956
|
-
|
|
957
|
-
export const getIconColor = _.memoize(
|
|
958
|
-
(mode: ThemeMode, color: string) =>
|
|
959
|
-
getThemeValue(mode, {
|
|
960
|
-
light: a11yColor(getOpacities(color).opacity95, lightColors.whiteColor, 3),
|
|
961
|
-
dark: a11yColor(getOpacities(color).opacity95, darkColors.menuBg, 5),
|
|
962
|
-
}),
|
|
963
|
-
(themeMode, color) => `${themeMode}-${color}`
|
|
964
|
-
);
|
|
965
|
-
|
|
966
|
-
export const dropCursorColor = chroma(brandColors.blue).alpha(0.7).css();
|
|
967
|
-
export const colors = {
|
|
968
|
-
...getTypeColors(brandColors.green, "light"),
|
|
969
|
-
brandColors,
|
|
970
|
-
stateColors,
|
|
971
|
-
transparent,
|
|
972
|
-
shades,
|
|
973
|
-
lights,
|
|
974
|
-
inversedTextColor: "#FFFFFF",
|
|
975
|
-
disabledInversedTextColor: lights.opacity25,
|
|
976
|
-
} as const;
|
|
977
|
-
|
|
978
|
-
export const space = {
|
|
979
|
-
spaceAuto: "auto",
|
|
980
|
-
s0: 0,
|
|
981
|
-
s1: 1,
|
|
982
|
-
s2: 2,
|
|
983
|
-
s3: 3,
|
|
984
|
-
s4: 4,
|
|
985
|
-
s5: 5,
|
|
986
|
-
s6: 6,
|
|
987
|
-
s8: 8,
|
|
988
|
-
s10: 10,
|
|
989
|
-
s12: 12,
|
|
990
|
-
s14: 14,
|
|
991
|
-
s16: 16,
|
|
992
|
-
s18: 18,
|
|
993
|
-
s20: 20,
|
|
994
|
-
s24: 24,
|
|
995
|
-
s28: 28,
|
|
996
|
-
s32: 32,
|
|
997
|
-
s36: 36,
|
|
998
|
-
s40: 40,
|
|
999
|
-
s44: 44,
|
|
1000
|
-
s48: 48,
|
|
1001
|
-
s56: 56,
|
|
1002
|
-
s60: 60,
|
|
1003
|
-
s64: 64,
|
|
1004
|
-
s80: 80,
|
|
1005
|
-
s96: 96,
|
|
1006
|
-
s112: 112,
|
|
1007
|
-
s128: 128,
|
|
1008
|
-
} as const;
|
|
1009
|
-
/** Token for nested items spacing in nested trees */
|
|
1010
|
-
export const spaceNestedTreeLevel = 12;
|
|
1011
|
-
export const spaceNestedTreeInterval = 0;
|
|
1012
|
-
export const layout = {
|
|
1013
|
-
logoSize: 18,
|
|
1014
|
-
menuDefaultWidth: 243,
|
|
1015
|
-
fiberyAiSidebarDefaultWidth: 420,
|
|
1016
|
-
fiberyAiSidebarMaxWidth: 920,
|
|
1017
|
-
desktopToolbarHeight: 32,
|
|
1018
|
-
desktopMenuMinWidth: 240,
|
|
1019
|
-
collapsedMenuMinWidth: 47,
|
|
1020
|
-
menuMinWidth: 284,
|
|
1021
|
-
menuMaxWidth: 480,
|
|
1022
|
-
menuItemMinWidth: 80,
|
|
1023
|
-
menuGroupHeaderIndent: 28, // I'm ok
|
|
1024
|
-
menuItemLevelIndent: 24,
|
|
1025
|
-
listItemHeight: 38,
|
|
1026
|
-
mobileListItemHeight: 44,
|
|
1027
|
-
itemHeight: 36,
|
|
1028
|
-
itemWithSubtitleHeight: 52,
|
|
1029
|
-
groupTitleHeight: 30,
|
|
1030
|
-
enumItemHeight: 32,
|
|
1031
|
-
menuItemHeight: 32,
|
|
1032
|
-
mobileMenuItemHeight: 44,
|
|
1033
|
-
newMenuItemHeight: 28, // I'm ok
|
|
1034
|
-
mobileSidebarMenuItemHeight: 44,
|
|
1035
|
-
newMenuIconSize: 18,
|
|
1036
|
-
mobileSidebarIconSize: 20,
|
|
1037
|
-
viewHeaderHeight: space.s12 * 7,
|
|
1038
|
-
viewHeaderCompactHeight: 52,
|
|
1039
|
-
columnMinWidth: 240,
|
|
1040
|
-
columnWidths: {compact: 200, default: 240, list: 280, full: 320},
|
|
1041
|
-
objectEditorMinWidth: 480,
|
|
1042
|
-
typeEditorWidth: "30vw",
|
|
1043
|
-
typeEditorMinWidth: 480,
|
|
1044
|
-
viewSetupWidth: "30vw",
|
|
1045
|
-
viewSetupMinWidth: 380,
|
|
1046
|
-
inputHeight: 36, //TODO: merge input and item height?
|
|
1047
|
-
timelineToolbarHeight: 48,
|
|
1048
|
-
timelineLineHeight: 40,
|
|
1049
|
-
timelineGroupPadding: 0,
|
|
1050
|
-
timelineItemHeightRatio: 32 / 40,
|
|
1051
|
-
timelineHeaderHeight: 48,
|
|
1052
|
-
calendarEventHeight: 30,
|
|
1053
|
-
calendarHeaderHeight: 30,
|
|
1054
|
-
calendarToolbarHeight: 48,
|
|
1055
|
-
checkboxSize: 15,
|
|
1056
|
-
fakeBoardWidth: 260,
|
|
1057
|
-
fakeBoardHeight: 160,
|
|
1058
|
-
inlineInputHeight: 32,
|
|
1059
|
-
menuHeight: 32,
|
|
1060
|
-
popupTopMargin: 48,
|
|
1061
|
-
unitHeight: 18,
|
|
1062
|
-
} as const;
|
|
1063
|
-
|
|
1064
|
-
export const menuItemHeightVar = `--${varPrefix}-layout-menuItemHeight`;
|
|
1065
|
-
export const sidebarMenuItemHeightVar = `--${varPrefix}-layout-sidebarMenuItemHeight`;
|
|
1066
|
-
export const sidebarMenuIconSizeVar = `--${varPrefix}-layout-sidebarMenuIconSize`;
|
|
1067
|
-
export const listRowSurfaceFontSizeVar = `--${varPrefix}-layout-listRowSurfaceFontSize`;
|
|
1068
|
-
|
|
1069
|
-
export const layoutVars = {
|
|
1070
|
-
menuItemHeight: `var(${menuItemHeightVar})`,
|
|
1071
|
-
sidebarMenuItemHeight: `var(${sidebarMenuItemHeightVar})`,
|
|
1072
|
-
sidebarMenuIconSize: `var(${sidebarMenuIconSizeVar})`,
|
|
1073
|
-
listRowSurfaceFontSize: `var(${listRowSurfaceFontSizeVar})`,
|
|
1074
|
-
};
|
|
1075
|
-
|
|
1076
|
-
export const border = {
|
|
1077
|
-
radius0: 0,
|
|
1078
|
-
radius1: 1,
|
|
1079
|
-
radius2: 2,
|
|
1080
|
-
radius4: 4,
|
|
1081
|
-
radius5: 5,
|
|
1082
|
-
radius6: 6,
|
|
1083
|
-
radius8: 8,
|
|
1084
|
-
radius10: 10,
|
|
1085
|
-
radius12: 12,
|
|
1086
|
-
radius16: 16,
|
|
1087
|
-
radius9999: 9999,
|
|
1088
|
-
} as const;
|
|
1089
|
-
|
|
1090
|
-
export const lineHeight = {
|
|
1091
|
-
text: 1.6,
|
|
1092
|
-
regular: 1.5,
|
|
1093
|
-
narrow: 1.4,
|
|
1094
|
-
heading: 1.3,
|
|
1095
|
-
nowrap: 1,
|
|
1096
|
-
} as const;
|
|
1097
|
-
|
|
1098
|
-
export const tooltipDelay = {
|
|
1099
|
-
enter: 500,
|
|
1100
|
-
leave: 0,
|
|
1101
|
-
} as const;
|
|
1102
|
-
|
|
1103
|
-
export const duration = 120;
|
|
1104
|
-
export const easing = "ease-in-out";
|
|
1105
|
-
export const transition = `${duration}ms ${easing}`;
|
|
1106
|
-
|
|
1107
|
-
export const iconSize = 20;
|
|
1108
|
-
export const viewBoxSize = "0 0 20 20";
|
|
1109
|
-
export const avatarSize = 24;
|
|
1110
|
-
|
|
1111
|
-
export const shadows = {
|
|
1112
|
-
border: `0 0 0 1px ${shades.opacity10}`,
|
|
1113
|
-
inversedBorder: `0 0 0 1px ${lights.opacity10}`,
|
|
1114
|
-
videoPreview: "0 4px 30px 4px rgba(0, 0, 0, .15)",
|
|
1115
|
-
} as const;
|
|
1116
|
-
|
|
1117
|
-
export const dateFormat = "MMM D, YYYY";
|
|
1118
|
-
export const dateTimeFormat = "MMM D, YYYY HH:mm";
|
|
1119
|
-
export const timeFormat = "HH:mm";
|
|
1120
|
-
|
|
1121
|
-
export const getLinearGradient = (backgroundColors: Array<string>): string => {
|
|
1122
|
-
const parts = _.flatMap(
|
|
1123
|
-
backgroundColors.map((color, index, arr) => [
|
|
1124
|
-
`${color} ${(index / arr.length) * 100}%`,
|
|
1125
|
-
`${color} ${((index + 1) / arr.length) * 100}%`,
|
|
1126
|
-
])
|
|
1127
|
-
);
|
|
1128
|
-
return `linear-gradient(to bottom, ${parts.join(", ")})`;
|
|
1129
|
-
};
|
|
1130
|
-
|
|
1131
|
-
export const getObjectColorMemoized = _.memoize((name) => {
|
|
1132
|
-
if (!name) {
|
|
1133
|
-
return "#999999";
|
|
1134
|
-
}
|
|
1135
|
-
const colorHash = new ColorHash({
|
|
1136
|
-
lightness: [0.5, 0.6, 0.7],
|
|
1137
|
-
saturation: [0.6, 0.7, 0.8, 0.9, 1],
|
|
1138
|
-
});
|
|
1139
|
-
return colorHash.hex(name);
|
|
1140
|
-
});
|
|
1141
|
-
|
|
1142
|
-
export const themeVars = Object.keys(getThemeColors(brandColors.blue, "light")).reduce((vars, key) => {
|
|
1143
|
-
if (key === "opacity") {
|
|
1144
|
-
vars[key] = Object.fromEntries(
|
|
1145
|
-
Object.keys(opacity).map((opacityKey) => [opacityKey, `var(--${varPrefix}-opacity-${opacityKey})`])
|
|
1146
|
-
);
|
|
1147
|
-
} else if (key === "stateColors") {
|
|
1148
|
-
vars[key] = Object.fromEntries(
|
|
1149
|
-
Object.keys(stateColors).map((stateColorKey) => [
|
|
1150
|
-
stateColorKey,
|
|
1151
|
-
`var(--${varPrefix}-state-colors-${stateColorKey})`,
|
|
1152
|
-
])
|
|
1153
|
-
);
|
|
1154
|
-
} else if (key === "brandColors") {
|
|
1155
|
-
vars[key] = Object.fromEntries(
|
|
1156
|
-
Object.keys(brandColors).map((brandColorKey) => [
|
|
1157
|
-
brandColorKey,
|
|
1158
|
-
`var(--${varPrefix}-brand-colors-${brandColorKey})`,
|
|
1159
|
-
])
|
|
1160
|
-
);
|
|
1161
|
-
} else if (key === "shades") {
|
|
1162
|
-
vars[key] = Object.fromEntries(
|
|
1163
|
-
Object.keys(shades).map((shadeKey) => [shadeKey, `var(--${varPrefix}-shades-${shadeKey})`])
|
|
1164
|
-
);
|
|
1165
|
-
} else if (key === "lights") {
|
|
1166
|
-
vars[key] = Object.fromEntries(
|
|
1167
|
-
Object.keys(lights).map((lightKey) => [lightKey, `var(--${varPrefix}-lights-${lightKey})`])
|
|
1168
|
-
);
|
|
1169
|
-
} else if (key === "separators") {
|
|
1170
|
-
vars[key] = Object.fromEntries(
|
|
1171
|
-
Object.keys(separators).map((separatorKey) => [separatorKey, `var(--${varPrefix}-separator-${separatorKey})`])
|
|
1172
|
-
);
|
|
1173
|
-
} else if (key === "inversedSeparators") {
|
|
1174
|
-
vars[key] = Object.fromEntries(
|
|
1175
|
-
Object.keys(inversedSeparators).map((separatorKey) => [
|
|
1176
|
-
separatorKey,
|
|
1177
|
-
`var(--${varPrefix}-inversed-separator-${separatorKey})`,
|
|
1178
|
-
])
|
|
1179
|
-
);
|
|
1180
|
-
} else {
|
|
1181
|
-
vars[key] = `var(--${varPrefix}-color-${key})`;
|
|
1182
|
-
}
|
|
1183
|
-
return vars;
|
|
1184
|
-
}, {} as Record<string, string | {[k: string]: string}>) as ThemeColors;
|
|
1185
|
-
|
|
1186
|
-
const DEFAULT_REJECT_KEYS = Object.keys(lightColors);
|
|
1187
|
-
export const createInlineTheme = _.memoize(
|
|
1188
|
-
(theme: ThemeColors, rejectKeys = DEFAULT_REJECT_KEYS) => {
|
|
1189
|
-
return createInlineStyles<ThemeColors>(theme, rejectKeys);
|
|
1190
|
-
},
|
|
1191
|
-
(theme, rejectKeys = DEFAULT_REJECT_KEYS) => {
|
|
1192
|
-
const rejectKeysLabel = rejectKeys === DEFAULT_REJECT_KEYS ? "DEFAULT_REJECT_KEYS" : JSON.stringify(rejectKeys);
|
|
1193
|
-
return `${theme.mode}__${theme.primary}__${rejectKeysLabel}`;
|
|
1194
|
-
}
|
|
1195
|
-
);
|
|
1196
|
-
|
|
1197
|
-
export const textStyles = {
|
|
1198
|
-
heading1: {
|
|
1199
|
-
fontFamily,
|
|
1200
|
-
fontSize: typeSizes[0],
|
|
1201
|
-
letterSpacing: "-0.01em",
|
|
1202
|
-
lineHeight: lineHeight.heading,
|
|
1203
|
-
fontWeight: fontWeight.semibold,
|
|
1204
|
-
color: themeVars.textColor,
|
|
1205
|
-
},
|
|
1206
|
-
heading2: {
|
|
1207
|
-
fontFamily,
|
|
1208
|
-
fontSize: typeSizes[1],
|
|
1209
|
-
letterSpacing: "-0.002em",
|
|
1210
|
-
lineHeight: lineHeight.heading,
|
|
1211
|
-
fontWeight: fontWeight.semibold,
|
|
1212
|
-
color: themeVars.textColor,
|
|
1213
|
-
},
|
|
1214
|
-
heading3: {
|
|
1215
|
-
fontFamily,
|
|
1216
|
-
fontSize: typeSizes[2],
|
|
1217
|
-
letterSpacing: "-0.002em",
|
|
1218
|
-
lineHeight: lineHeight.heading,
|
|
1219
|
-
fontWeight: fontWeight.semibold,
|
|
1220
|
-
color: themeVars.textColor,
|
|
1221
|
-
},
|
|
1222
|
-
heading4: {
|
|
1223
|
-
fontFamily,
|
|
1224
|
-
fontSize: typeSizes[3],
|
|
1225
|
-
lineHeight: lineHeight.heading,
|
|
1226
|
-
fontWeight: fontWeight.semibold,
|
|
1227
|
-
color: themeVars.textColor,
|
|
1228
|
-
},
|
|
1229
|
-
heading5: {
|
|
1230
|
-
fontFamily,
|
|
1231
|
-
fontSize: typeSizes[4],
|
|
1232
|
-
lineHeight: lineHeight.heading,
|
|
1233
|
-
fontWeight: fontWeight.semibold,
|
|
1234
|
-
color: themeVars.textColor,
|
|
1235
|
-
},
|
|
1236
|
-
heading6: {
|
|
1237
|
-
fontFamily,
|
|
1238
|
-
fontSize: typeSizes[5],
|
|
1239
|
-
lineHeight: lineHeight.heading,
|
|
1240
|
-
letterSpacing: 0.6,
|
|
1241
|
-
textTransform: "uppercase",
|
|
1242
|
-
fontWeight: fontWeight.regular,
|
|
1243
|
-
color: themeVars.textColor,
|
|
1244
|
-
},
|
|
1245
|
-
heading7: {
|
|
1246
|
-
fontFamily,
|
|
1247
|
-
fontSize: typeSizes[6],
|
|
1248
|
-
lineHeight: lineHeight.heading,
|
|
1249
|
-
letterSpacing: 0.6,
|
|
1250
|
-
textTransform: "uppercase",
|
|
1251
|
-
fontWeight: fontWeight.regular,
|
|
1252
|
-
color: themeVars.textColor,
|
|
1253
|
-
},
|
|
1254
|
-
heading8: {
|
|
1255
|
-
fontFamily,
|
|
1256
|
-
fontSize: typeSizes[6],
|
|
1257
|
-
lineHeight: lineHeight.heading,
|
|
1258
|
-
fontWeight: fontWeight.medium,
|
|
1259
|
-
color: themeVars.textColor,
|
|
1260
|
-
},
|
|
1261
|
-
big: {
|
|
1262
|
-
fontFamily,
|
|
1263
|
-
fontSize: typeSizes[3],
|
|
1264
|
-
lineHeight: lineHeight.regular,
|
|
1265
|
-
fontWeight: fontWeight.regular,
|
|
1266
|
-
color: themeVars.textColor,
|
|
1267
|
-
},
|
|
1268
|
-
regular: {
|
|
1269
|
-
fontFamily,
|
|
1270
|
-
fontSize: typeSizes[4],
|
|
1271
|
-
lineHeight: lineHeight.regular,
|
|
1272
|
-
fontWeight: fontWeight.regular,
|
|
1273
|
-
color: themeVars.textColor,
|
|
1274
|
-
textTransform: "none",
|
|
1275
|
-
letterSpacing: "normal",
|
|
1276
|
-
},
|
|
1277
|
-
small: {
|
|
1278
|
-
fontFamily,
|
|
1279
|
-
fontSize: typeSizes[5],
|
|
1280
|
-
lineHeight: lineHeight.regular,
|
|
1281
|
-
fontWeight: fontWeight.regular,
|
|
1282
|
-
color: themeVars.textColor,
|
|
1283
|
-
textTransform: "none",
|
|
1284
|
-
},
|
|
1285
|
-
code: {
|
|
1286
|
-
fontFamily: '"SFMono-Regular", Menlo, Consolas, "PT Mono", "Liberation Mono", Courier, monospace',
|
|
1287
|
-
fontSize: typeSizes[4],
|
|
1288
|
-
lineHeight: lineHeight.regular,
|
|
1289
|
-
fontWeight: fontWeight.regular,
|
|
1290
|
-
color: themeVars.textColor,
|
|
1291
|
-
},
|
|
1292
|
-
link: {
|
|
1293
|
-
color: themeVars.linkColor,
|
|
1294
|
-
borderBottom: themeVars.linkBorder,
|
|
1295
|
-
textDecoration: "none",
|
|
1296
|
-
cursor: "pointer",
|
|
1297
|
-
transition: `border ${transition}`,
|
|
1298
|
-
},
|
|
1299
|
-
inversedLink: {
|
|
1300
|
-
color: colors.inversedTextColor,
|
|
1301
|
-
cursor: "pointer",
|
|
1302
|
-
textDecoration: "underline",
|
|
1303
|
-
textDecorationColor: lights.opacity25,
|
|
1304
|
-
},
|
|
1305
|
-
note: {
|
|
1306
|
-
fontFamily,
|
|
1307
|
-
fontSize: typeSizes[3],
|
|
1308
|
-
lineHeight: lineHeight.regular,
|
|
1309
|
-
fontWeight: fontWeight.regular,
|
|
1310
|
-
color: themeVars.textColor,
|
|
1311
|
-
borderRadius: border.radius6,
|
|
1312
|
-
},
|
|
1313
|
-
important: {
|
|
1314
|
-
fontFamily,
|
|
1315
|
-
fontSize: typeSizes[3],
|
|
1316
|
-
lineHeight: lineHeight.regular,
|
|
1317
|
-
fontWeight: fontWeight.regular,
|
|
1318
|
-
color: themeVars.textColor,
|
|
1319
|
-
border: `1px solid ${themeVars.active}`,
|
|
1320
|
-
borderRadius: border.radius6,
|
|
1321
|
-
},
|
|
1322
|
-
numeric: {
|
|
1323
|
-
tabularOn: {
|
|
1324
|
-
fontVariantNumeric: "tabular-nums",
|
|
1325
|
-
fontFeatureSettings: '"tnum" 1',
|
|
1326
|
-
},
|
|
1327
|
-
tabularOff: {
|
|
1328
|
-
fontVariantNumeric: "normal",
|
|
1329
|
-
fontFeatureSettings: '"tnum" 0',
|
|
1330
|
-
},
|
|
1331
|
-
},
|
|
1332
|
-
inherit: {
|
|
1333
|
-
fontFamily: "inherit",
|
|
1334
|
-
fontSize: "inherit",
|
|
1335
|
-
lineHeight: "inherit",
|
|
1336
|
-
fontWeight: "inherit",
|
|
1337
|
-
color: "inherit",
|
|
1338
|
-
},
|
|
1339
|
-
} as const;
|
|
1
|
+
export {opacity, getOpacities} from "./design-system/alpha";
|
|
2
|
+
export {transition, easing, duration, tooltipDelay} from "./design-system/animation";
|
|
3
|
+
export {cardTypeColors} from "./design-system/colors";
|
|
4
|
+
export {getLinearGradient, getEnumTextColor, dropCursorColor, shadows} from "./design-system/colors-css";
|
|
5
|
+
export {getDarkenColor, getTextColor, getObjectColorMemoized} from "./design-system/colors-js";
|
|
6
|
+
export {dateFormat, dateTimeFormat, timeFormat} from "./design-system/date";
|
|
7
|
+
export {
|
|
8
|
+
iconSize,
|
|
9
|
+
border,
|
|
10
|
+
space,
|
|
11
|
+
layout,
|
|
12
|
+
spaceNestedTreeInterval,
|
|
13
|
+
spaceNestedTreeLevel,
|
|
14
|
+
viewBoxSize,
|
|
15
|
+
minPanelWidth,
|
|
16
|
+
} from "./design-system/layout";
|
|
17
|
+
export {type ThemeColors, getThemeColors, createInlineStyles, themeVars, type ThemeStyles} from "./design-system/theme";
|
|
18
|
+
export {typeSizes, fontSize, fontFamily, fontWeight, lineHeight, textStyles} from "./design-system/typography";
|
|
19
|
+
export {
|
|
20
|
+
layoutVars,
|
|
21
|
+
menuItemHeightVar,
|
|
22
|
+
listRowSurfaceFontSizeVar,
|
|
23
|
+
sidebarMenuItemHeightVar,
|
|
24
|
+
sidebarMenuIconSizeVar,
|
|
25
|
+
} from "./design-system/vars";
|