@fibery/ui-kit 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/.oxlintrc.json +24 -0
  2. package/CHANGELOG.md +7 -0
  3. package/eslint.config.mjs +1 -1
  4. package/jest.config.cjs +36 -0
  5. package/package.json +10 -50
  6. package/src/@types/css.d.ts +1 -0
  7. package/src/actions-menu/actions-menu-checkbox-item.tsx +74 -0
  8. package/src/actions-menu/contexts/actions-menu-context.tsx +1 -0
  9. package/src/actions-menu/index.tsx +1 -0
  10. package/src/animated-number.tsx +2 -2
  11. package/src/antd/AutoComplete.d.ts +1 -0
  12. package/src/app-icon-with-fallback.tsx +4 -4
  13. package/src/app-icon.tsx +4 -4
  14. package/src/appIcons.json +1227 -1227
  15. package/src/avatar.tsx +44 -5
  16. package/src/box.tsx +10 -17
  17. package/src/button/make-button-colors.ts +13 -13
  18. package/src/checkbox.tsx +3 -3
  19. package/src/collapsible-section.tsx +1 -1
  20. package/src/context-menu/index.tsx +4 -0
  21. package/src/date-picker/date-range-picker.tsx +1 -1
  22. package/src/date-picker/relative-date-picker.tsx +3 -0
  23. package/src/date-picker/single-date-picker.tsx +10 -9
  24. package/src/design-system/alpha.ts +9 -0
  25. package/src/design-system/colors-css.test.ts +1 -9
  26. package/src/design-system/colors-css.ts +1 -1
  27. package/src/design-system/colors.ts +351 -313
  28. package/src/design-system/layout.ts +1 -1
  29. package/src/design-system/theme.ts +4 -1
  30. package/src/design-system/vars.test.ts +4 -0
  31. package/src/design-system.test.ts +1 -0
  32. package/src/design-system.ts +1 -1
  33. package/src/dropdown-menu/index.tsx +4 -0
  34. package/src/emoji-picker/primitives/emoji.tsx +12 -0
  35. package/src/emoji-picker/primitives/grid.tsx +100 -104
  36. package/src/emoji.tsx +1 -0
  37. package/src/file-item.tsx +308 -265
  38. package/src/icons/ast/AddDatabase.ts +1 -1
  39. package/src/icons/ast/AddIntegration.ts +1 -1
  40. package/src/icons/ast/ArrowsRightLeft.ts +1 -1
  41. package/src/icons/ast/ChatBubble.ts +1 -1
  42. package/src/icons/ast/ChatFloat.ts +1 -1
  43. package/src/icons/ast/ChatSidebar.ts +1 -1
  44. package/src/icons/ast/Clean.ts +1 -1
  45. package/src/icons/ast/Create.ts +1 -1
  46. package/src/icons/ast/ItemsTimeline.ts +1 -1
  47. package/src/icons/ast/Key.ts +1 -1
  48. package/src/icons/ast/NetworkAdd.ts +1 -1
  49. package/src/icons/ast/Print.ts +1 -1
  50. package/src/icons/ast/Success.ts +1 -1
  51. package/src/icons/ast/SuggestIntegration.ts +1 -1
  52. package/src/icons/ast/WarningTriangle.ts +1 -1
  53. package/src/icons/ast/Windows.ts +1 -1
  54. package/src/icons/svg/add-database.svg +1 -1
  55. package/src/icons/svg/add-integration.svg +1 -1
  56. package/src/icons/svg/arrows-right-left.svg +1 -1
  57. package/src/icons/svg/chat-bubble.svg +1 -1
  58. package/src/icons/svg/chat-float.svg +1 -1
  59. package/src/icons/svg/chat-sidebar.svg +3 -3
  60. package/src/icons/svg/clean.svg +1 -1
  61. package/src/icons/svg/create.svg +1 -1
  62. package/src/icons/svg/items-timeline.svg +1 -1
  63. package/src/icons/svg/key.svg +1 -1
  64. package/src/icons/svg/network-add.svg +1 -1
  65. package/src/icons/svg/print.svg +1 -1
  66. package/src/icons/svg/success.svg +1 -1
  67. package/src/icons/svg/suggest-integration.svg +1 -1
  68. package/src/icons/svg/warning-triangle.svg +1 -1
  69. package/src/icons/svg/windows.svg +1 -1
  70. package/src/images-gallery/images-gallery.tsx +24 -0
  71. package/src/lists/actions-menu-row-surface.tsx +2 -1
  72. package/src/logo.tsx +14 -13
  73. package/src/modal-menu/index.tsx +1 -0
  74. package/src/modal-menu/modal-menu-checkbox-item.tsx +50 -0
  75. package/src/online-users.tsx +45 -46
  76. package/src/palettes/slate-arch.colors-snapshot.test.ts +7 -7
  77. package/src/palettes/slate-user.colors-snapshot.test.ts +11 -11
  78. package/src/palettes/warm-arch.colors-snapshot.test.ts +7 -7
  79. package/src/palettes/warm-user.colors-snapshot.test.ts +7 -7
  80. package/src/popover/index.tsx +91 -203
  81. package/src/popover/popover-old.tsx +113 -0
  82. package/src/popover/popup-modifiers-context.ts +1 -1
  83. package/src/scale-generator.ts +2 -2
  84. package/src/select/components/clear-indicator.tsx +1 -1
  85. package/src/select/components/drop-down-indicator.tsx +2 -2
  86. package/src/select/components/group-heading.tsx +2 -2
  87. package/src/select/components/menu-list-virtualized.tsx +1 -1
  88. package/src/select/components/option.tsx +1 -1
  89. package/src/select/index.tsx +34 -37
  90. package/src/select/select-in-popover.tsx +34 -202
  91. package/src/select/select.tsx +5 -4
  92. package/src/select/styles.ts +3 -0
  93. package/src/thematic-state.ts +1 -1
  94. package/src/theme-provider.tsx +14 -2
  95. package/src/theme-styles.ts +14 -7
  96. package/src/toggle-button/toggle-button.tsx +48 -35
  97. package/src/tree-utils.test.ts +166 -0
  98. package/src/tree-utils.ts +107 -0
  99. package/src/file-item/use-register-in-image-gallery.tsx +0 -70
  100. package/src/file-item-2.tsx +0 -357
@@ -4,7 +4,7 @@ import mapValues from "lodash/mapValues";
4
4
  import {a11yColor} from "../a11y-color";
5
5
  import {darkenChroma, produceColor, set, setAlpha, setLuminanceChroma} from "../color-utils";
6
6
  import {ThemeMode} from "../theme-settings";
7
- import {getOpacities, opacity, transparent} from "./alpha";
7
+ import {alpha, getOpacities, opacity, transparent} from "./alpha";
8
8
 
9
9
  export const cardTypeColors = [
10
10
  "#4A4A4A",
@@ -50,6 +50,8 @@ type ThemeFnsDef = Record<
50
50
  }
51
51
  >;
52
52
 
53
+ const separator = (color: string) => `0.5px solid ${color}`;
54
+
53
55
  export function makeThemeDefs({
54
56
  white,
55
57
  black,
@@ -67,310 +69,348 @@ export function makeThemeDefs({
67
69
  yellowDark,
68
70
  }: ThemePalette) {
69
71
  const blackish = produceColor(black, (x) => set(x, "hsl.l", (x) => x + 5));
72
+ const purple9 = "rgb(157, 99, 212)";
73
+ const purpleDark9 = "rgb(131, 73, 182)";
74
+ const blue9 = "rgba(56, 105, 204, 1)";
75
+ const blueDark9 = "rgba(151, 177, 237, 1)";
70
76
 
71
77
  const shades = getOpacities(black);
72
78
  const separators = {
73
- ...mapValues(shades, (shade) => `0.5px solid ${shade}`),
79
+ ...mapValues(shades, separator),
74
80
  } as const;
75
81
 
76
82
  const lights = getOpacities(white);
77
83
  const inversedSeparators = {
78
- ...mapValues(lights, (light) => `0.5px solid ${light}`),
84
+ ...mapValues(lights, separator),
79
85
  } as const;
80
86
 
81
- const colors = {
82
- mode: ["light", "dark"],
87
+ // FIXME WIP to find commons/dedupe/adjust
88
+ const surface = {
89
+ // pure white / deepest dark
90
+ level0: [white, baseDark[1]],
91
+
92
+ // pure white / slightly elevated dark
93
+ level0elevated: [white, baseDark[2]],
94
+
95
+ // near-white canvas
96
+ level1: [base[1], baseDark[1]],
97
+ level1_1: [base[1], baseDark[2]],
98
+ level1_3: [base[1], baseDark[3]],
99
+ level1_4: [base[1], baseDark[4]],
100
+ level1_6: [base[1], baseDark[6]],
101
+
102
+ // secondary/subtle bg
103
+ level2: [base[2], baseDark[2]],
104
+ level2_1: [base[2], baseDark[1]],
105
+ level2_3: [base[2], baseDark[3]],
106
+ level2_6: [base[2], baseDark[6]],
107
+
108
+ // muted bg (code, form fields)
109
+ level3exotic: [base[3], blackish], // FIXME try blackA[3] | baseDark[3] to make it less exotic
110
+ level3_4: [base[3], baseDark[4]],
111
+ level3_6: [base[3], baseDark[6]],
112
+ level3_7: [base[3], baseDark[7]],
113
+
114
+ // hover emphasis (neutral)
115
+ level4: [base[4], baseDark[4]],
116
+
117
+ // hover emphasis, elevated dark
118
+ level4_5: [base[4], baseDark[5]],
119
+ level4_6: [base[4], baseDark[6]],
120
+
121
+ level3_1: [base[3], baseDark[1]],
122
+ level5_4: [base[5], baseDark[4]],
123
+ } as const;
124
+
125
+ const raised = {
126
+ // menus, modals, entity boxes
127
+ level1: [white, baseDark[3]],
128
+
129
+ // popups, inner menus, hover on raised.level1
130
+ level2: [white, baseDark[4]],
131
+
132
+ // entity cards (old)
133
+ level3: [white, baseDark[5]],
134
+
135
+ // card bg, comment bubbles, float editors
136
+ level4: [white, baseDark[6]],
137
+ } as const;
83
138
 
139
+ const shadows = {
84
140
  // Elevations
85
141
  surfaceElevationS: [`0 2px 4px 0 ${blackA[3]}`, `0 2px 4px 0 ${whiteA[3]}`],
86
142
  surfaceElevationM: [`0 4px 8px 0 ${blackA[5]}`, `0 4px 8px 0 ${whiteA[5]}`],
87
143
  surfaceElevationL: [`0 8px 12px 0 ${blackA[5]}`, `0 8px 12px 0 ${whiteA[5]}`],
88
144
 
89
145
  // Shadows and effects / Elevation
90
- shadow50: [
91
- `0px 0px 0px 1px ${getOpacities(base[12]).opacity5}`,
92
- `0px 0px 0px 1px ${getOpacities(baseDark[12]).opacity10}`,
93
- ],
94
- shadow100: [
95
- `0px 1px 4px 0px ${getOpacities(base[12]).opacity5}`,
96
- `0px 1px 4px 0px ${getOpacities(base[12]).opacity10}`,
97
- ],
98
- shadow200: [
99
- `0px 2px 6px 0px ${getOpacities(base[12]).opacity5}`,
100
- `0px 2px 6px 0px ${getOpacities(base[12]).opacity10}`,
101
- ],
146
+ shadow50: [`0px 0px 0px 1px ${alpha(base[12], 0.05)}`, `0px 0px 0px 1px ${alpha(baseDark[12], 0.1)}`],
147
+ shadow100: [`0px 1px 4px 0px ${alpha(base[12], 0.05)}`, `0px 1px 4px 0px ${alpha(base[12], 0.1)}`],
148
+ shadow200: [`0px 2px 6px 0px ${alpha(base[12], 0.05)}`, `0px 2px 6px 0px ${alpha(base[12], 0.1)}`],
102
149
  shadow300: [
103
- `0px 3px 6px -3px ${getOpacities(base[12]).opacity10}, 0px 8px 20px -4px ${getOpacities(base[12]).opacity15}`,
104
- `0px 3px 6px -3px ${getOpacities(base[12]).opacity10}, 0px 8px 20px -4px ${getOpacities(base[12]).opacity15}`,
150
+ `0px 3px 6px -3px ${alpha(base[12], 0.1)}, 0px 8px 20px -4px ${alpha(base[12], 0.15)}`,
151
+ `0px 3px 6px -3px ${alpha(base[12], 0.1)}, 0px 8px 20px -4px ${alpha(base[12], 0.15)}`,
105
152
  ],
106
153
  shadow400: [
107
- `0px 0px 1px 0px ${getOpacities(base[12]).opacity20}, 0px 16px 40px 0px ${getOpacities(base[12]).opacity15}`,
108
- `0px 0px 1px 0px ${getOpacities(base[12]).opacity20}, 0px 16px 40px 0px ${getOpacities(base[12]).opacity15}`,
154
+ `0px 0px 1px 0px ${alpha(base[12], 0.2)}, 0px 16px 40px 0px ${alpha(base[12], 0.15)}`,
155
+ `0px 0px 1px 0px ${alpha(base[12], 0.2)}, 0px 16px 40px 0px ${alpha(base[12], 0.15)}`,
109
156
  ],
110
157
  shadow500: [
111
- `0px 0px 1px 0px ${getOpacities(base[12]).opacity20}, 0px 20px 50px 0px ${getOpacities(base[12]).opacity15}`,
112
- `0px 0px 1px 0px ${getOpacities(base[12]).opacity20}, 0px 20px 50px 0px ${getOpacities(base[12]).opacity15}`,
158
+ `0px 0px 1px 0px ${alpha(base[12], 0.2)}, 0px 20px 50px 0px ${alpha(base[12], 0.15)}`,
159
+ `0px 0px 1px 0px ${alpha(base[12], 0.2)}, 0px 20px 50px 0px ${alpha(base[12], 0.15)}`,
113
160
  ],
114
161
  shadow600: [
115
- `0px 0px 1px 0px ${getOpacities(base[12]).opacity20}, 0px 26px 80px 0px ${getOpacities(base[12]).opacity20}`,
116
- `0px 0px 1px 0px ${getOpacities(base[12]).opacity20}, 0px 26px 80px 0px ${getOpacities(base[12]).opacity20}`,
162
+ `0px 0px 1px 0px ${alpha(base[12], 0.2)}, 0px 26px 80px 0px ${alpha(base[12], 0.2)}`,
163
+ `0px 0px 1px 0px ${alpha(base[12], 0.2)}, 0px 26px 80px 0px ${alpha(base[12], 0.2)}`,
117
164
  ],
118
165
  actionMenuShadow: [
119
- `0px 0px 2px 0px ${getOpacities(base[11]).opacity30}, 0px 4px 6px 0px ${
120
- getOpacities(base[11]).opacity5
121
- }, 0px 10px 26px 0px ${getOpacities(base[11]).opacity15}`,
122
- `0px 0px 0px 1px ${getOpacities(baseDark[6]).opacity100}, 0px 4px 6px 0px ${
123
- getOpacities(baseDark[1]).opacity5
124
- }, 0px 10px 26px 0px ${getOpacities(baseDark[1]).opacity15}`,
166
+ `0px 0px 2px 0px ${alpha(base[11], 0.3)}, 0px 4px 6px 0px ${alpha(base[11], 0.05)}, 0px 10px 26px 0px ${alpha(
167
+ base[11],
168
+ 0.15
169
+ )}`,
170
+ `0px 0px 0px 1px ${baseDark[6]}, 0px 4px 6px 0px ${alpha(baseDark[1], 0.05)}, 0px 10px 26px 0px ${alpha(
171
+ baseDark[1],
172
+ 0.15
173
+ )}`,
125
174
  ],
126
175
  shadowPopup: [
127
- `0px 0px 2px 0px ${getOpacities(base[11]).opacity30}, 0px 4px 6px 0px ${
128
- getOpacities(base[11]).opacity5
129
- }, 0px 10px 26px 0px ${getOpacities(base[11]).opacity15}`,
130
- `0px 0px 0px 1px ${getOpacities(baseDark[6]).opacity100}, 0px 4px 6px 0px ${
131
- getOpacities(baseDark[1]).opacity5
132
- }, 0px 10px 26px 0px ${getOpacities(baseDark[1]).opacity15}`,
133
- ],
134
- shadowSidebar: [
135
- `-3px 0px 10px 0px ${getOpacities(base[10]).opacity10}`,
136
- `-3px 0px 10px 0px ${getOpacities(baseDark[1]).opacity80}`,
137
- ],
176
+ `0px 0px 2px 0px ${alpha(base[11], 0.3)}, 0px 4px 6px 0px ${alpha(base[11], 0.05)}, 0px 10px 26px 0px ${alpha(
177
+ base[11],
178
+ 0.15
179
+ )}`,
180
+ `0px 0px 0px 1px ${baseDark[6]}, 0px 4px 6px 0px ${alpha(baseDark[1], 0.05)}, 0px 10px 26px 0px ${alpha(
181
+ baseDark[1],
182
+ 0.15
183
+ )}`,
184
+ ],
185
+ shadowSidebar: [`-3px 0px 10px 0px ${alpha(base[10], 0.1)}`, `-3px 0px 10px 0px ${alpha(baseDark[1], 0.8)}`],
186
+ } as const;
187
+
188
+ // names proposal: forbid color in keys (they all are colors) — restructure it better (separate shadows, borders etc)
189
+ // inspired by tailwind:
190
+ // bg-* Sets the background color of an element
191
+ // text-* Sets the text color of an element
192
+ // border-* Sets the border color of an element
193
+ // shadow-* Sets the color of box shadows
194
+ // fill-* Sets the fill color of SVG elements
195
+ // stroke-* Sets the stroke color of SVG elements
196
+ // e.g.
197
+ // bgMain
198
+ // bgPanel
199
+ // bgForm
200
+ // bgTooltip
201
+ // textDefault
202
+ // textAccent
203
+ // textDisabled
204
+ // textInversed
205
+ // borderInputDisabled
206
+ // borderInputError
207
+ // borderInputErrorHover
208
+ // borderInputErrorFocus
209
+ const colors = {
210
+ mode: ["light", "dark"],
211
+ ...shadows,
138
212
 
139
213
  // Rubbish dump
140
214
  primaryBlue: [accent[9], accentDark[9]],
141
215
  whiteColor: [white, white],
142
216
  blackColor: [black, black],
143
- mainBg: [base[3], blackish],
144
- panelBg: [white, baseDark[1]],
145
- panelContentBg: [base[2], baseDark[1]],
146
- colorBgRelationContainer: [base[2], baseDark[1]],
217
+ mainBg: surface.level3exotic,
218
+ panelBg: surface.level0,
219
+ panelContentBg: surface.level2_1,
220
+ colorBgRelationContainer: surface.level2_1,
147
221
  // AI colors
148
- colorAI: ["rgb(157, 99, 212)", "rgb(131, 73, 182)"],
149
- colorBgAI: ["rgba(157, 99, 212, 0.1)", "rgba(131, 73, 182, 0.1)"],
150
- colorSubtleBgAI: ["hsla(271, 57%, 61%, 0.05)", "hsla(272, 43%, 50%, 0.1)"],
151
- colorBgAIFloatingLauncher: [base[1], baseDark[4]],
152
- colorBgAIFloatingPanelContent: [base[1], baseDark[3]],
153
- colorBgAISidebarContent: [base[1], baseDark[1]],
222
+ colorAI: [purple9, purpleDark9],
223
+ colorBgAI: [alpha(purple9, 0.1), alpha(purpleDark9, 0.1)],
224
+ colorSubtleBgAI: [alpha(purple9, 0.05), alpha(purpleDark9, 0.1)], // FIXME why 0.1 for dark vs 0.05 for light?
225
+ colorBgAIFloatingLauncher: surface.level1_4,
226
+ colorBgAIFloatingPanelContent: surface.level1_3,
227
+ colorBgAISidebarContent: surface.level1,
154
228
  // Other colors
155
- pageContentBg: [white, baseDark[2]],
156
- colorBgPopup: [white, baseDark[4]],
157
- menuBg: [base[3], blackish],
229
+ pageContentBg: surface.level0elevated,
230
+ colorBgPopup: raised.level2,
231
+ menuBg: surface.level3exotic,
158
232
  menuTextColor: [base[12], baseDark[12]],
159
233
  menuItemHoverColor: [base[5], baseDark[6]],
160
- menuSelectedTextColor: [base[2], base[2]],
161
- menuIconColor: [getOpacities(base[12]).opacity70, getOpacities(baseDark[12]).opacity70],
234
+ menuSelectedTextColor: [base[2], base[2]], // FIXME baseDark
235
+ menuIconColor: [alpha(base[12], 0.7), alpha(baseDark[12], 0.7)],
162
236
 
163
237
  // Text, links colors
164
238
  textColor: [base[12], baseDark[12]],
165
- textSelectionColor: [getOpacities(accent[9]).opacity20, getOpacities(accentDark[9]).opacity40],
239
+ textSelectionColor: [alpha(accent[9], 0.2), alpha(accentDark[9], 0.4)],
166
240
  accentTextColor: [base[10], baseDark[10]],
167
241
  disabledTextColor: [base[9], baseDark[9]],
168
- inversedTextColor: [base[3], baseDark[6]],
169
- colorTextSecondary: [getOpacities(base[12]).opacity70, getOpacities(baseDark[12]).opacity65],
170
- linkColor: ["rgba(56, 105, 204, 1)", "rgba(151, 177, 237, 1)"],
171
- linkBorder: [`0.5px solid "rgba(56, 105, 204, 0.4)"`, `0.5px solid "rgba(151, 177, 237, 0.4)"`],
172
- linkHoverColor: ["rgba(56, 105, 204, 1)", "rgba(151, 177, 237, 1)"],
173
- linkBorderHover: [`0.5px solid "rgba(56, 105, 204, 0.8)"`, `0.5px solid "rgba(151, 177, 237, 0.7)"`],
242
+ inversedTextColor: surface.level3_6,
243
+ colorTextSecondary: [alpha(base[12], 0.7), alpha(baseDark[12], 0.65)],
244
+ linkColor: [blue9, blueDark9],
245
+ linkBorder: [separator(alpha(blue9, 0.4)), separator(alpha(blueDark9, 0.4))],
246
+ linkHoverColor: [blue9, blueDark9],
247
+ linkBorderHover: [separator(alpha(blue9, 0.8)), separator(alpha(blueDark9, 0.7))], // FIXME why different alpha?
174
248
  codeColor: [red[9], red[8]],
175
- codeBgColor: [base[3], baseDark[4]],
176
- codeBlockBgColor: [base[3], baseDark[4]],
249
+ codeBgColor: surface.level3_4,
250
+ codeBlockBgColor: surface.level3_4,
177
251
  addedDiffTextColor: [teal[9], tealDark[11]],
178
252
  removedDiffTextColor: [red[11], redDark[11]],
179
253
 
180
254
  // Entity
181
255
  entityNodeColor: [baseDark[3], base[8]],
182
- entityNodeBorder: [
183
- `0.5px solid ${getOpacities(baseDark[3]).opacity30}`,
184
- `0.5px solid ${getOpacities(base[8]).opacity40}`,
185
- ],
256
+ entityNodeBorder: [separator(alpha(baseDark[3], 0.3)), separator(alpha(base[8], 0.4))],
186
257
  entityNodeHoverColor: [baseDark[7], base[7]],
187
- entityNodeBorderHover: [
188
- `0.5px solid ${getOpacities(base[11]).opacity80}`,
189
- `0.5px solid ${getOpacities(base[7]).opacity80}`,
190
- ],
191
- entityNodeBgColor: [base[2], baseDark[3]],
258
+ entityNodeBorderHover: [separator(alpha(base[11], 0.8)), separator(alpha(base[7], 0.8))],
259
+ entityNodeBgColor: surface.level2_3,
192
260
  shortcutTextColor: [base[9], baseDark[11]],
193
- shortcutBorder: [
194
- `1px solid ${getOpacities(base[8]).opacity50}`,
195
- `1px solid ${getOpacities(baseDark[10]).opacity20}`,
196
- ],
197
- shortcutBorderColor: [getOpacities(base[8]).opacity50, getOpacities(baseDark[10]).opacity20],
261
+ shortcutBorder: [`1px solid ${alpha(base[8], 0.5)}`, `1px solid ${alpha(baseDark[10], 0.2)}`],
262
+ shortcutBorderColor: [alpha(base[8], 0.5), alpha(baseDark[10], 0.2)],
198
263
 
199
264
  // Input
200
- inputBgColor: [white, baseDark[2]],
201
- inputDisabledBgColor: [getOpacities(base[6]).opacity30, getOpacities(baseDark[6]).opacity30],
202
- inputDisabledBorderColor: [
203
- `0 0 0 1px ${getOpacities(base[6]).opacity20}`,
204
- `0 0 0 1px ${getOpacities(baseDark[8]).opacity20}`,
205
- ],
206
- inputCopyBgColor: [base[3], baseDark[4]],
207
- inputBorderColor: [
208
- `0 0 0 1px ${getOpacities(base[6]).opacity70}`,
209
- `0 0 0 1px ${getOpacities(baseDark[8]).opacity70}`,
210
- ],
211
- inputBorderHoverColor: [
212
- `0 0 0 1px ${getOpacities(base[7]).opacity100}`,
213
- `0 0 0 1px ${getOpacities(baseDark[8]).opacity100}`,
214
- ],
215
- inputBorderFocusColor: [
216
- `0 0 0 1px ${getOpacities(base[8]).opacity100}`,
217
- `0 0 0 1px ${getOpacities(baseDark[9]).opacity100}`,
218
- ],
265
+ inputBgColor: surface.level0elevated,
266
+ inputDisabledBgColor: [alpha(base[6], 0.3), alpha(baseDark[6], 0.3)],
267
+ inputDisabledBorderColor: [`0 0 0 1px ${alpha(base[6], 0.2)}`, `0 0 0 1px ${alpha(baseDark[8], 0.2)}`],
268
+ inputCopyBgColor: surface.level3_4,
269
+ inputBorderColor: [`0 0 0 1px ${alpha(base[6], 0.7)}`, `0 0 0 1px ${alpha(baseDark[8], 0.7)}`],
270
+ inputBorderHoverColor: [`0 0 0 1px ${base[7]}`, `0 0 0 1px ${baseDark[8]}`],
271
+ inputBorderFocusColor: [`0 0 0 1px ${base[8]}`, `0 0 0 1px ${baseDark[9]}`],
219
272
  inputBorderBlendMode: ["multiply", "lighten"],
220
273
  inputPlaceholderTextColor: [base[9], baseDark[9]],
221
274
  inputErrorBorderColor: [`0 0 0 1px ${red[11]}`, `0 0 0 1px ${red[7]}`],
222
- inputErrorBorderHoverColor: [
223
- `0 0 0 1px ${getOpacities(red[11]).opacity40}`,
224
- `0 0 0 1px ${getOpacities(red[7]).opacity40}`,
225
- ],
226
- inputErrorBorderFocusColor: [
227
- `0 0 0 1px ${getOpacities(red[11]).opacity25}`,
228
- `0 0 0 1px ${getOpacities(red[7]).opacity25}`,
229
- ],
230
- inputErrorBorderFocusShadow: [
231
- `0 0 0 3px ${getOpacities(red[11]).opacity25}`,
232
- `0 0 0 3px ${getOpacities(red[7]).opacity25}`,
233
- ],
275
+ inputErrorBorderHoverColor: [`0 0 0 1px ${alpha(red[11], 0.4)}`, `0 0 0 1px ${alpha(red[7], 0.4)}`],
276
+ inputErrorBorderFocusColor: [`0 0 0 1px ${alpha(red[11], 0.25)}`, `0 0 0 1px ${alpha(red[7], 0.25)}`],
277
+ inputErrorBorderFocusShadow: [`0 0 0 3px ${alpha(red[11], 0.25)}`, `0 0 0 3px ${alpha(red[7], 0.25)}`],
234
278
  buttonPrimaryColor: [accent[9], accentDark[9]],
235
279
  buttonColor: [base[10], baseDark[10]],
236
280
  buttonPrimaryTextColor: [base[2], base[6]],
237
- checkboxColor: [getOpacities(base[12]).opacity70, getOpacities(baseDark[12]).opacity70],
281
+ checkboxColor: [alpha(base[12], 0.7), alpha(baseDark[12], 0.7)],
238
282
  colorBorderBlockQuote: [base[11], baseDark[11]],
239
283
 
240
284
  // Actions menu
241
- colorBgActionsMenu: [white, baseDark[3]],
242
- colorBgActionsMenuItemHover: [base[4], baseDark[5]],
243
- colorBgActionsMenuItemSelected: [getOpacities(accent[4]).opacity80, getOpacities(accentDark[4]).opacity80],
244
- colorBgActionsMenuItemSelectedHover: [getOpacities(accent[5]).opacity80, getOpacities(accentDark[6]).opacity80],
245
- colorBgActionsMenuItemDangerHover: [getOpacities(red[9]).opacity10, getOpacities(redDark[10]).opacity10],
246
- colorBgActionsMenuItemDangerActive: [getOpacities(red[9]).opacity80, getOpacities(redDark[10]).opacity80],
247
- actionMenuBg: [white, baseDark[3]],
248
- actionMenuInnerBg: [white, baseDark[4]],
249
- actionMenuHover: [base[4], baseDark[5]],
250
- actionMenuInnerHover: [base[4], getOpacities(baseDark[6]).opacity50],
251
- actionMenuButtonColor: [white, baseDark[2]],
252
- actionMenuButtonHoverColor: [base[1], baseDark[3]],
285
+ colorBgActionsMenu: raised.level1,
286
+ colorBgActionsMenuItemHover: surface.level4_5,
287
+ colorBgActionsMenuItemSelected: [alpha(accent[4], 0.8), alpha(accentDark[4], 0.8)],
288
+ colorBgActionsMenuItemSelectedHover: [alpha(accent[5], 0.8), alpha(accentDark[6], 0.8)],
289
+ colorBgActionsMenuItemDangerHover: [alpha(red[9], 0.1), alpha(redDark[10], 0.1)],
290
+ colorBgActionsMenuItemDangerActive: [alpha(red[9], 0.8), alpha(redDark[10], 0.8)],
291
+ actionMenuBg: raised.level1,
292
+ actionMenuInnerBg: raised.level2,
293
+ actionMenuHover: surface.level4_5,
294
+ actionMenuInnerHover: [base[4], alpha(baseDark[6], 0.5)],
295
+ actionMenuButtonColor: surface.level0elevated,
296
+ actionMenuButtonHoverColor: surface.level1_3,
253
297
  actionMenuButtonShadow: [
254
- `0 0 0 1px ${getOpacities(base[10]).opacity10}, 0 2px 4px -4px ${getOpacities(base[10]).opacity20}`,
255
- `0 0 0 1px ${getOpacities(baseDark[2]).opacity10}, 0 2px 4px -4px ${getOpacities(baseDark[2]).opacity20}`,
298
+ `0 0 0 1px ${alpha(base[10], 0.1)}, 0 2px 4px -4px ${alpha(base[10], 0.2)}`,
299
+ `0 0 0 1px ${alpha(baseDark[2], 0.1)}, 0 2px 4px -4px ${alpha(baseDark[2], 0.2)}`,
256
300
  ],
257
- actionMenuSeparatorColor: [getOpacities(black).opacity10, getOpacities(white).opacity15],
258
- separatorColor: [getOpacities(black).opacity10, getOpacities(white).opacity10],
259
- separatorColorDimmed: [getOpacities(black).opacity5, getOpacities(white).opacity5],
301
+ actionMenuSeparatorColor: [alpha(black, 0.1), alpha(white, 0.15)],
302
+ separatorColor: [alpha(black, 0.1), alpha(white, 0.1)],
303
+ separatorColorDimmed: [alpha(black, 0.05), alpha(white, 0.05)],
260
304
  separatorBreadcrumbsColor: [base[8], baseDark[8]],
261
- iconColor: [getOpacities(base[12]).opacity70, getOpacities(baseDark[12]).opacity70],
262
- appIconColor: [getOpacities(base[2]).opacity90, getOpacities(base[2]).opacity70],
263
- appIconBgColor: [getOpacities(base[1]).opacity90, getOpacities(base[2]).opacity50],
264
- mentionBgColor: [getOpacities(base[7]).opacity30, getOpacities(baseDark[7]).opacity40],
265
- colorBgSelectMenu: [base[1], baseDark[3]],
305
+ iconColor: [alpha(base[12], 0.7), alpha(baseDark[12], 0.7)],
306
+ appIconColor: [alpha(base[2], 0.9), alpha(base[2], 0.7)],
307
+ appIconBgColor: [alpha(base[1], 0.9), alpha(base[2], 0.5)],
308
+ mentionBgColor: [alpha(base[7], 0.3), alpha(baseDark[7], 0.4)],
309
+ colorBgSelectMenu: surface.level1_3,
266
310
  shadowSelectMenu: [
267
- `0px 0px 2px 0px ${getOpacities(base[11]).opacity30}, 0px 4px 6px 0px ${
268
- getOpacities(base[11]).opacity5
269
- }, 0px 10px 26px 0px ${getOpacities(base[11]).opacity15}`,
270
- `0px 0px 0px 1px ${getOpacities(baseDark[6]).opacity100}, 0px 4px 6px 0px ${
271
- getOpacities(baseDark[1]).opacity5
272
- }, 0px 10px 26px 0px ${getOpacities(baseDark[1]).opacity15}`,
311
+ `0px 0px 2px 0px ${alpha(base[11], 0.3)}, 0px 4px 6px 0px ${alpha(base[11], 0.05)}, 0px 10px 26px 0px ${alpha(
312
+ base[11],
313
+ 0.15
314
+ )}`,
315
+ `0px 0px 0px 1px ${baseDark[6]}, 0px 4px 6px 0px ${alpha(baseDark[1], 0.05)}, 0px 10px 26px 0px ${alpha(
316
+ baseDark[1],
317
+ 0.15
318
+ )}`,
273
319
  ],
274
320
  colorBgListItemGeneral: [transparent, transparent],
275
- colorBgListItemGeneralHover: [base[3], baseDark[4]],
276
- colorBgListItemGeneralFocus: [base[4], baseDark[6]],
321
+ colorBgListItemGeneralHover: surface.level3_4,
322
+ colorBgListItemGeneralFocus: surface.level4_6,
277
323
  colorBgListItemGeneralSelected: [accent[3], accentDark[4]],
278
324
  colorBgListItemGeneralSelectedHover: [accent[4], accentDark[6]],
279
325
  colorBgListItemGeneralSelectedFocus: [accent[4], accentDark[6]],
280
326
  colorBgListItemGeneralDisabled: [transparent, transparent],
281
327
  colorTextListItemGeneralDisabled: [base[9], baseDark[9]],
282
328
  colorBgListItemGeneralSelectedDisabled: [accent[5], accentDark[5]],
283
- opacityListItemGeneralDisabled: [`${opacity.opacity40}`, `${opacity.opacity40}`],
329
+ opacityListItemGeneralDisabled: [opacity.opacity40.toString(), opacity.opacity40.toString()],
284
330
 
285
331
  // Search Items
286
- colorBgSearchRowHover: [base[4], baseDark[5]],
332
+ colorBgSearchRowHover: surface.level4_5,
287
333
  colorBgSearchRowCreateHover: [accent[4], accentDark[4]],
288
- opacitySearchItemDone: [`${opacity.opacity40}`, `${opacity.opacity40}`],
334
+ opacitySearchItemDone: [opacity.opacity40.toString(), opacity.opacity40.toString()],
289
335
  // Entity Box Style And States
290
336
  // Basic Entity Box State
291
- colorBgEntityBoxDefault: [white, baseDark[3]],
337
+ colorBgEntityBoxDefault: raised.level1,
292
338
  shadowStrokeEntityBoxDefault: [`0 0 0 1px ${base[5]}`, `0 0 0 1px ${baseDark[5]}`],
293
- shadowEntityBoxDefault: [
294
- `0px 2px 4px 0px ${getOpacities(base[12]).opacity5}`,
295
- `0px 2px 4px 0px ${getOpacities(baseDark[1]).opacity5}`,
296
- ],
339
+ shadowEntityBoxDefault: [`0px 2px 4px 0px ${alpha(base[12], 0.05)}`, `0px 2px 4px 0px ${alpha(baseDark[1], 0.05)}`],
297
340
  // :hover
298
- colorBgEntityBoxDefaultHover: [white, baseDark[4]],
341
+ colorBgEntityBoxDefaultHover: raised.level2,
299
342
  shadowEntityBoxDefaultHover: [
300
- `0px 4px 8px 0px ${getOpacities(base[12]).opacity10}`,
301
- `0px 4px 8px 0px ${getOpacities(baseDark[1]).opacity10}`,
343
+ `0px 4px 8px 0px ${alpha(base[12], 0.1)}`,
344
+ `0px 4px 8px 0px ${alpha(baseDark[1], 0.1)}`,
302
345
  ],
303
346
  // :focus
304
- colorBgEntityBoxDefaultFocus: [white, baseDark[3]],
347
+ colorBgEntityBoxDefaultFocus: raised.level1,
305
348
  colorOverlayEntityBoxDefaultFocus: [accent[9], accentDark[9]],
306
- shadowStrokeEntityBoxDefaultFocus: [
307
- `0 0 0 2px ${getOpacities(accent[9]).opacity40}`,
308
- `0 0 0 2px ${getOpacities(accentDark[9]).opacity40}`,
309
- ],
349
+ shadowStrokeEntityBoxDefaultFocus: [`0 0 0 2px ${alpha(accent[9], 0.4)}`, `0 0 0 2px ${alpha(accentDark[9], 0.4)}`],
310
350
  // :focus:hover
311
- colorBgEntityBoxDefaultFocusHover: [white, baseDark[4]],
351
+ colorBgEntityBoxDefaultFocusHover: raised.level2,
312
352
  colorOverlayEntityBoxDefaultFocusHover: [accent[9], accentDark[9]],
313
353
  shadowStrokeEntityBoxDefaultFocusHover: [
314
- `0 0 0 2px ${getOpacities(accent[9]).opacity60}`,
315
- `0 0 0 2px ${getOpacities(accentDark[9]).opacity60}`,
354
+ `0 0 0 2px ${alpha(accent[9], 0.6)}`,
355
+ `0 0 0 2px ${alpha(accentDark[9], 0.6)}`,
316
356
  ],
317
357
  //::drag
318
- opacityEntityBoxDefaultDrag: [`${opacity.opacity40}`, `${opacity.opacity40}`],
358
+ opacityEntityBoxDefaultDrag: [opacity.opacity40.toString(), opacity.opacity40.toString()],
319
359
  shadowEntityBoxDefaultDrag: [
320
- `0px 8px 12px 0px ${getOpacities(base[12]).opacity10}`,
321
- `0px 8px 12px 0px ${getOpacities(baseDark[1]).opacity10}`,
360
+ `0px 8px 12px 0px ${alpha(base[12], 0.1)}`,
361
+ `0px 8px 12px 0px ${alpha(baseDark[1], 0.1)}`,
322
362
  ],
323
363
  // Selected Entity Box State
324
364
  colorBgEntityBoxSelected: [accent[2], accentDark[3]],
325
365
  shadowStrokeEntityBoxSelected: [
326
- `0 0 0 1px ${getOpacities(accent[9]).opacity40}, 0 0 0 3px ${getOpacities(accent[9]).opacity40}`,
327
- `0 0 0 1px ${accentDark[9]}, 0 0 0 3px ${getOpacities(accentDark[9]).opacity40}`,
366
+ `0 0 0 1px ${alpha(accent[9], 0.4)}, 0 0 0 3px ${alpha(accent[9], 0.4)}`,
367
+ `0 0 0 1px ${accentDark[9]}, 0 0 0 3px ${alpha(accentDark[9], 0.4)}`,
328
368
  ],
329
369
  // :hover
330
370
  colorBgEntityBoxSelectedHover: [accent[3], accentDark[3]],
331
371
  shadowStrokeEntityBoxSelectedHover: [
332
- `0 0 0 1px ${getOpacities(accent[9]).opacity60}, 0 0 0 3px ${getOpacities(accent[9]).opacity40}`,
333
- `0 0 0 1px ${accentDark[9]}, 0 0 0 3px ${getOpacities(accentDark[9]).opacity40}`,
372
+ `0 0 0 1px ${alpha(accent[9], 0.6)}, 0 0 0 3px ${alpha(accent[9], 0.4)}`,
373
+ `0 0 0 1px ${accentDark[9]}, 0 0 0 3px ${alpha(accentDark[9], 0.4)}`,
334
374
  ],
335
375
  //::drag
336
376
  colorBgEntityBoxSelectedDrag: [accent[3], accentDark[3]],
337
377
  shadowStrokeEntityBoxSelectedDrag: [
338
- `0 0 0 1px ${getOpacities(accent[9]).opacity40}, 0 0 0 3px ${getOpacities(accent[9]).opacity40}`,
339
- `0 0 0 1px ${accentDark[9]}, 0 0 0 3px ${getOpacities(accentDark[9]).opacity40}`,
378
+ `0 0 0 1px ${alpha(accent[9], 0.4)}, 0 0 0 3px ${alpha(accent[9], 0.4)}`,
379
+ `0 0 0 1px ${accentDark[9]}, 0 0 0 3px ${alpha(accentDark[9], 0.4)}`,
340
380
  ],
341
381
  // Disabled Entity Box State (done)
342
- opacityEntityBoxDisabled: [`${opacity.opacity65}`, `${opacity.opacity65}`],
382
+ opacityEntityBoxDisabled: [opacity.opacity65.toString(), opacity.opacity65.toString()],
343
383
  // :hover
344
- opacityEntityBoxDisabledHover: [`${opacity.opacity75}`, `${opacity.opacity75}`],
384
+ opacityEntityBoxDisabledHover: [opacity.opacity75.toString(), opacity.opacity75.toString()],
345
385
  // :focus
346
- opacityEntityBoxDisabledFocus: [`${opacity.opacity75}`, `${opacity.opacity75}`],
386
+ opacityEntityBoxDisabledFocus: [opacity.opacity75.toString(), opacity.opacity75.toString()],
347
387
  // :drag
348
- opacityEntityBoxDisabledDrag: [`${opacity.opacity40}`, `${opacity.opacity40}`],
388
+ opacityEntityBoxDisabledDrag: [opacity.opacity40.toString(), opacity.opacity40.toString()],
349
389
  // Entity Old
350
- entityCardBgColor: [white, baseDark[5]],
351
- entityCardSelectedColor: [getOpacities(base[2]).opacity80, getOpacities(baseDark[6]).opacity50],
352
- entityCardHoverColor: [getOpacities(base[2]).opacity80, getOpacities(baseDark[6]).opacity50],
353
- entityCardDoneColor: [getOpacities(base[4]).opacity30, getOpacities(baseDark[5]).opacity30],
390
+ entityCardBgColor: raised.level3,
391
+ entityCardSelectedColor: [alpha(base[2], 0.8), alpha(baseDark[6], 0.5)],
392
+ entityCardHoverColor: [alpha(base[2], 0.8), alpha(baseDark[6], 0.5)],
393
+ entityCardDoneColor: [alpha(base[4], 0.3), alpha(baseDark[5], 0.3)],
354
394
  entityCardShadow: [
355
- `0 0 0 1px ${getOpacities(base[10]).opacity10}, 0 2px 4px -4px ${getOpacities(base[10]).opacity20}`,
356
- `0 0 0 1px ${getOpacities(baseDark[2]).opacity10}, 0 2px 4px -4px ${getOpacities(baseDark[2]).opacity20}`,
395
+ `0 0 0 1px ${alpha(base[10], 0.1)}, 0 2px 4px -4px ${alpha(base[10], 0.2)}`,
396
+ `0 0 0 1px ${alpha(baseDark[2], 0.1)}, 0 2px 4px -4px ${alpha(baseDark[2], 0.2)}`,
357
397
  ],
358
398
  entityCardShadowHover: [
359
- `0 0 0 1px ${getOpacities(base[10]).opacity10}, 0 2px 4px -4px ${getOpacities(base[10]).opacity20}`,
360
- `0 0 0 1px ${getOpacities(baseDark[2]).opacity10}, 0 2px 4px -4px ${getOpacities(baseDark[2]).opacity20}`,
399
+ `0 0 0 1px ${alpha(base[10], 0.1)}, 0 2px 4px -4px ${alpha(base[10], 0.2)}`,
400
+ `0 0 0 1px ${alpha(baseDark[2], 0.1)}, 0 2px 4px -4px ${alpha(baseDark[2], 0.2)}`,
361
401
  ],
362
- colorBgSegmentedControl: [getOpacities(base[5]).opacity80, getOpacities(baseDark[3]).opacity80],
363
- colorBgMenuHeaderAvatar: [white, baseDark[2]],
402
+ colorBgSegmentedControl: [alpha(base[5], 0.8), alpha(baseDark[3], 0.8)],
403
+ colorBgMenuHeaderAvatar: surface.level0elevated,
364
404
  shadowMenuHeaderAvatar: [
365
- `0px 1px 4px ${getOpacities(base[11]).opacity10}, 0 0 0 0.5px ${getOpacities(base[5]).opacity50}`,
366
- `0 0 0 1px ${getOpacities(baseDark[9]).opacity20}`,
405
+ `0px 1px 4px ${alpha(base[11], 0.1)}, 0 0 0 0.5px ${alpha(base[5], 0.5)}`,
406
+ `0 0 0 1px ${alpha(baseDark[9], 0.2)}`,
367
407
  ],
368
408
  // Main Menu Items Styles and States
369
409
  // Dragged
370
- opacityMenuItemDragged: [`${opacity.opacity40}`, `${opacity.opacity40}`],
410
+ opacityMenuItemDragged: [opacity.opacity40.toString(), opacity.opacity40.toString()],
371
411
  colorBgMenuItemSelectedDragged: [accent[6], accentDark[6]],
372
412
  // Default
373
- colorTextMenuItem: [getOpacities(base[12]).opacity90, getOpacities(baseDark[12]).opacity90],
413
+ colorTextMenuItem: [alpha(base[12], 0.9), alpha(baseDark[12], 0.9)],
374
414
 
375
415
  colorBgMenuItem: [transparent, transparent],
376
416
  // :hover
@@ -378,31 +418,31 @@ export function makeThemeDefs({
378
418
  // :focus
379
419
  colorBgMenuItemFocus: [base[6], baseDark[5]],
380
420
  // Selected
381
- colorBgMenuItemSelected: [getOpacities(accent[5]).opacity80, accentDark[3]],
421
+ colorBgMenuItemSelected: [alpha(accent[5], 0.8), accentDark[3]],
382
422
  // :hover
383
- colorBgMenuItemSelectedHover: [getOpacities(accent[6]).opacity70, accentDark[5]],
423
+ colorBgMenuItemSelectedHover: [alpha(accent[6], 0.7), accentDark[5]],
384
424
  // :focus, :focus:hover
385
425
  colorBgPinnedFieldsLabel: [base[11], baseDark[11]],
386
426
  colorBgObjectEditorSeparator: [base[12], baseDark[12]],
387
427
  colorBgMenuItemSelectedFocused: [accent[6], accentDark[5]],
388
- colorBgFieldEditorContainer: [base[2], baseDark[3]],
428
+ colorBgFieldEditorContainer: surface.level2_3,
389
429
  colorBgFieldEditorLinkEqualSign: [base[6], baseDark[2]],
390
- allowedDropColor: [base[4], baseDark[4]],
391
- relationViewBgColor: [base[2], baseDark[3]],
430
+ allowedDropColor: surface.level4,
431
+ relationViewBgColor: surface.level2_3,
392
432
 
393
433
  mySpaceIconColor: [swatches["gray-light"], swatches["gray-light"]],
394
- mySpaceIconBg: [getOpacities(swatches["gray-light"]).opacity20, getOpacities(swatches["gray-light"]).opacity20],
434
+ mySpaceIconBg: [alpha(swatches["gray-light"], 0.2), alpha(swatches["gray-light"], 0.2)],
395
435
  privateIconColor: [swatches.green, swatches.green],
396
- privateIconBg: [getOpacities(swatches.green).opacity20, getOpacities(swatches.green).opacity20],
436
+ privateIconBg: [alpha(swatches.green, 0.2), alpha(swatches.green, 0.2)],
397
437
  favoritesIconColor: [swatches.yellow, swatches.yellow],
398
- favoritesIconBg: [getOpacities(swatches.yellow).opacity20, getOpacities(swatches.yellow).opacity20],
438
+ favoritesIconBg: [alpha(swatches.yellow, 0.2), alpha(swatches.yellow, 0.2)],
399
439
 
400
440
  // Unit
401
- unitBg: [base[3], baseDark[6]],
441
+ unitBg: surface.level3_6,
402
442
  unitBgHover: [base[4], baseDark[7]],
403
443
 
404
444
  // Badges
405
- colorBgBadgeNeutral: [getOpacities(accent[5]).opacity70, getOpacities(accentDark[4]).opacity80],
445
+ colorBgBadgeNeutral: [alpha(accent[5], 0.7), alpha(accentDark[4], 0.8)],
406
446
  colorBgBadgeSuccess: [teal[5], tealDark[5]],
407
447
  colorBgBadgeWarning: [yellow[5], yellowDark[5]],
408
448
  colorBgBadgeError: [red[5], redDark[5]],
@@ -411,40 +451,37 @@ export function makeThemeDefs({
411
451
  colorTextBadgeWarning: [yellow[11], yellowDark[11]],
412
452
  colorTextBadgeError: [red[11], redDark[11]],
413
453
  // FIXME: lack of baseDark usage; same values!
414
- badgeBgColor: [getOpacities(base[10]).opacity20, getOpacities(base[10]).opacity20],
454
+ badgeBgColor: [alpha(base[10], 0.2), alpha(base[10], 0.2)],
415
455
  tooltipBgColor: [baseDark[5], baseDark[6]],
416
456
  todayMarkerColor: [red[8], redDark[6]],
417
- viewBgOverlayColor: [getOpacities(base[8]).opacity20, getOpacities(baseDark[1]).opacity60],
418
- floatEditorMenuBg: [base[1], baseDark[6]],
457
+ viewBgOverlayColor: [alpha(base[8], 0.2), alpha(baseDark[1], 0.6)],
458
+ floatEditorMenuBg: surface.level1_6,
419
459
  floatEditorActiveColor: [accent[11], accentDark[11]],
420
- commentColor: [getOpacities(yellow[6]).opacity60, getOpacities(yellowDark[9]).opacity40],
421
- cellBackgroundColor: [base[2], baseDark[2]],
422
- cellBackgroundHoverColor: [getOpacities(base[6]).opacity30, getOpacities(baseDark[6]).opacity30],
423
- cellBorderColor: [getOpacities(base[8]).opacity50, getOpacities(baseDark[9]).opacity50],
424
- cellPinnedBorderColor: [getOpacities(base[8]).opacity70, getOpacities(baseDark[9]).opacity70],
425
- tableRowWarningColor: [getOpacities(yellow[6]).opacity60, getOpacities(yellowDark[9]).opacity40],
426
- errorBgColor: [getOpacities(red[9]).opacity20, getOpacities(redDark[9]).opacity60],
460
+ commentColor: [alpha(yellow[6], 0.6), alpha(yellowDark[9], 0.4)],
461
+ cellBackgroundColor: surface.level2,
462
+ cellBackgroundHoverColor: [alpha(base[6], 0.3), alpha(baseDark[6], 0.3)],
463
+ cellBorderColor: [alpha(base[8], 0.5), alpha(baseDark[9], 0.5)],
464
+ cellPinnedBorderColor: [alpha(base[8], 0.7), alpha(baseDark[9], 0.7)],
465
+ tableRowWarningColor: [alpha(yellow[6], 0.6), alpha(yellowDark[9], 0.4)],
466
+ errorBgColor: [alpha(red[9], 0.2), alpha(redDark[9], 0.6)],
427
467
  errorTextColor: [red[11], red[7]],
428
468
  errorButtonColor: [red[9], redDark[10]],
429
- warningBgColor: [getOpacities(yellow[6]).opacity60, getOpacities(yellowDark[8]).opacity60],
469
+ warningBgColor: [alpha(yellow[6], 0.6), alpha(yellowDark[8], 0.6)],
430
470
  warningButtonColor: [yellow[11], yellowDark[11]],
431
- infoBox: [getOpacities(yellow[4]).opacity50, getOpacities(yellowDark[9]).opacity20],
432
- appCardBgColor: [white, baseDark[2]],
433
- appCardHoverColor: [getOpacities(base[1]).opacity95, baseDark[2]],
434
- modalBg: [getOpacities(base[11]).opacity20, getOpacities(baseDark[2]).opacity50],
435
- modalContentBg: [white, baseDark[3]],
471
+ infoBox: [alpha(yellow[4], 0.5), alpha(yellowDark[9], 0.2)],
472
+ appCardBgColor: surface.level0elevated,
473
+ appCardHoverColor: [alpha(base[1], 0.95), baseDark[2]],
474
+ modalBg: [alpha(base[11], 0.2), alpha(baseDark[2], 0.5)],
475
+ modalContentBg: raised.level1,
436
476
  progressIconBg: [blackA[7], whiteA[7]],
437
477
  progressIconFill: [blackA[11], whiteA[11]],
438
- formBg: [base[2], baseDark[2]],
439
- formHeaderShadow: [
440
- `${getOpacities(base[10]).opacity10} 0px 0px 6px`,
441
- `${getOpacities(baseDark[1]).opacity40} 0px 0px 6px`,
442
- ],
443
- formEditorFieldBg: [base[3], baseDark[4]],
444
- filterGroup1Bg: [base[2], baseDark[6]],
445
- filterGroup2Bg: [base[3], baseDark[7]],
478
+ formBg: surface.level2,
479
+ formHeaderShadow: [`${alpha(base[10], 0.1)} 0px 0px 6px`, `${alpha(baseDark[1], 0.4)} 0px 0px 6px`],
480
+ formEditorFieldBg: surface.level3_4,
481
+ filterGroup1Bg: surface.level2_6,
482
+ filterGroup2Bg: surface.level3_7,
446
483
  filterGroupBorder: [blackA[3], whiteA[3]],
447
- colorBgNotificationHover: [base[3], baseDark[4]],
484
+ colorBgNotificationHover: surface.level3_4,
448
485
  colorBgNotificationSelected: [accent[3], accentDark[4]],
449
486
  colorBgNotificationSelectedHover: [accent[4], accentDark[6]],
450
487
  disabledInversedTextColor: [shades.opacity25, lights.opacity25],
@@ -452,20 +489,19 @@ export function makeThemeDefs({
452
489
  danger: [red[9], redDark[10]],
453
490
  active: [red[9], redDark[10]],
454
491
  warning: [yellow[9], yellowDark[8]],
455
- cardBg: [white, baseDark[6]],
492
+ cardBg: raised.level4,
456
493
  selectedImageBorder: [blackA[8], whiteA[11]],
457
494
  transparent: [transparent, transparent],
458
495
  shades: [lights, shades],
459
496
  lights: [shades, lights],
460
497
  separators: [separators, inversedSeparators],
461
- // FIXME: lack of baseDark scale usage, same values!
462
- progressBg: [base[4], base[4]],
498
+ progressBg: [base[4], base[4]], // FIXME surface.level4?
463
499
  progressText: [base[11], base[11]],
464
500
  progressFillBg: [base[11], base[11]],
465
501
  progressFillText: [white, white],
466
- progressBarFillNeutral: [getOpacities(base[9]).opacity20, getOpacities(baseDark[9]).opacity20],
502
+ progressBarFillNeutral: [alpha(base[9], 0.2), alpha(baseDark[9], 0.2)],
467
503
  progressBarFill: [accent[9], accentDark[10]],
468
- progressBarBg: [getOpacities(accent[9]).opacity25, getOpacities(accentDark[10]).opacity25],
504
+ progressBarBg: [alpha(accent[9], 0.25), alpha(accentDark[10], 0.25)],
469
505
  // FIXME: lack of inverse scale usage, same values!
470
506
  colorPickerSwatchBorder: [blackA[7], blackA[7]],
471
507
  colorBorderRichTextMedia: [blackA[7], blackA[7]],
@@ -475,22 +511,22 @@ export function makeThemeDefs({
475
511
  colorBgDropLine: [accent[8], accentDark[8]],
476
512
 
477
513
  // Views
478
- viewBg: [base[1], baseDark[1]],
479
- viewSecondaryBg: [base[2], baseDark[2]],
514
+ viewBg: surface.level1,
515
+ viewSecondaryBg: surface.level2,
480
516
  viewHighlightBg: [accent[3], accentDark[3]],
481
517
 
482
518
  // Board
483
- boardBg: [base[1], baseDark[1]],
484
- boardBgWithOpacity80: [getOpacities(base[1]).opacity80, getOpacities(baseDark[1]).opacity80],
485
- boardAxisBgHover: [base[4], baseDark[4]],
519
+ boardBg: surface.level1,
520
+ boardBgWithOpacity80: [alpha(base[1], 0.8), alpha(baseDark[1], 0.8)],
521
+ boardAxisBgHover: surface.level4,
486
522
 
487
523
  // Grid
488
- gridHeaderBgColor: [base[2], baseDark[3]],
489
- gridHeaderHoverBgColor: [base[3], baseDark[4]],
524
+ gridHeaderBgColor: surface.level2_3,
525
+ gridHeaderHoverBgColor: surface.level3_4,
490
526
  gridHeaderTextColor: [base[10], baseDark[11]],
491
- gridCellBgColor: [white, baseDark[2]],
527
+ gridCellBgColor: surface.level0elevated,
492
528
  gridCellBorderColor: [base[5], baseDark[6]],
493
- gridDisabledCellBgColor: [base[2], baseDark[3]],
529
+ gridDisabledCellBgColor: surface.level2_3,
494
530
  gridSelectedCellBgColor: [accent[3], accentDark[3]],
495
531
  gridHighlightedCellBgColor: [accent[4], accentDark[5]],
496
532
  gridSelectedCellBorderColor: [accent[6], accentDark[7]],
@@ -503,25 +539,25 @@ export function makeThemeDefs({
503
539
  timelineDependencyHoverBgColor: [accent[8], accentDark[8]],
504
540
  timelineDependencyOverlapBgColor: [red[9], redDark[9]],
505
541
  timelineDependencyOverlapHoverBgColor: [red[11], redDark[11]],
506
- timelineCellBgColor: [base[1], baseDark[1]],
507
- timelineCellWeekendBgColor: [base[2], baseDark[2]],
542
+ timelineCellBgColor: surface.level1,
543
+ timelineCellWeekendBgColor: surface.level2,
508
544
  timelineCellTodayBgColor: [accent[4], accentDark[2]],
509
- timelineCreateEntityPlaceholderBgColor: [getOpacities(base[11]).opacity20, baseDark[7]],
545
+ timelineCreateEntityPlaceholderBgColor: [alpha(base[11], 0.2), baseDark[7]],
510
546
 
511
547
  // #region buttons
512
548
  // solid
513
549
  colorBgButtonSolidAccentDefault: [accent[9], accentDark[9]],
514
550
  colorBgButtonSolidAccentHover: [accent[11], accentDark[10]],
515
551
  colorBgButtonSolidNeutralDefault: [base[12], baseDark[12]],
516
- colorBgButtonSolidNeutralHover: [getOpacities(base[12]).opacity85, white],
552
+ colorBgButtonSolidNeutralHover: [alpha(base[12], 0.85), white],
517
553
  colorBgButtonSolidDestructiveDefault: [red[9], redDark[9]],
518
554
  colorBgButtonSolidDestructiveHover: [red[11], redDark[10]],
519
555
  colorTextButtonSolidAccent: [white, white],
520
- colorTextButtonSolidAccentActive: [getOpacities(white).opacity80, getOpacities(white).opacity80],
556
+ colorTextButtonSolidAccentActive: [alpha(white, 0.8), alpha(white, 0.8)],
521
557
  colorTextButtonSolidNeutral: [white, baseDark[2]],
522
- colorTextButtonSolidNeutralActive: [white, getOpacities(baseDark[2]).opacity80],
558
+ colorTextButtonSolidNeutralActive: [white, alpha(baseDark[2], 0.8)],
523
559
  colorTextButtonSolidDestructive: [white, white],
524
- colorTextButtonSolidDestructiveActive: [getOpacities(white).opacity80, getOpacities(white).opacity80],
560
+ colorTextButtonSolidDestructiveActive: [alpha(white, 0.8), alpha(white, 0.8)],
525
561
  colorIconButtonSolidAccent: [white, white],
526
562
  colorIconButtonSolidNeutral: [white, baseDark[8]],
527
563
  colorIconButtonSolidDestructive: [white, white],
@@ -529,18 +565,18 @@ export function makeThemeDefs({
529
565
  colorBorderButtonOutlineAccentDefault: [accent[8], accentDark[8]],
530
566
  colorBorderButtonOutlineNeutralDefault: [base[8], baseDark[7]],
531
567
  colorBorderButtonOutlineDestructiveDefault: [red[7], redDark[7]],
532
- colorBgButtonOutlineAccentDefault: [white, baseDark[1]],
568
+ colorBgButtonOutlineAccentDefault: surface.level0,
533
569
  colorBgButtonOutlineAccentHover: [accent[3], accentDark[3]],
534
- colorBgButtonOutlineNeutralDefault: [white, baseDark[1]],
535
- colorBgButtonOutlineNeutralHover: [base[4], baseDark[4]],
536
- colorBgButtonOutlineDestructiveDefault: [white, baseDark[1]],
570
+ colorBgButtonOutlineNeutralDefault: surface.level0,
571
+ colorBgButtonOutlineNeutralHover: surface.level4,
572
+ colorBgButtonOutlineDestructiveDefault: surface.level0,
537
573
  colorBgButtonOutlineDestructiveHover: [red[4], redDark[4]],
538
574
  colorTextButtonOutlineAccent: [accent[11], accentDark[11]],
539
- colorTextButtonOutlineAccentActive: [getOpacities(accent[11]).opacity80, getOpacities(accentDark[11]).opacity80],
575
+ colorTextButtonOutlineAccentActive: [alpha(accent[11], 0.8), alpha(accentDark[11], 0.8)],
540
576
  colorTextButtonOutlineNeutral: [base[11], baseDark[11]],
541
- colorTextButtonOutlineNeutralActive: [getOpacities(base[12]).opacity80, getOpacities(baseDark[12]).opacity80],
577
+ colorTextButtonOutlineNeutralActive: [alpha(base[12], 0.8), alpha(baseDark[12], 0.8)],
542
578
  colorTextButtonOutlineDestructive: [red[11], redDark[11]],
543
- colorTextButtonOutlineDestructiveActive: [getOpacities(red[11]).opacity80, getOpacities(redDark[11]).opacity80],
579
+ colorTextButtonOutlineDestructiveActive: [alpha(red[11], 0.8), alpha(redDark[11], 0.8)],
544
580
  colorIconButtonOutlineAccent: [accent[11], accentDark[11]],
545
581
  colorIconButtonOutlineNeutral: [base[11], baseDark[11]],
546
582
  colorIconButtonOutlineDestructive: [red[11], redDark[11]],
@@ -552,38 +588,38 @@ export function makeThemeDefs({
552
588
  colorBgButtonSoftDestructiveDefault: [red[4], redDark[4]],
553
589
  colorBgButtonSoftDestructiveHover: [red[6], redDark[6]],
554
590
  colorTextButtonSoftAccent: [accent[11], accentDark[11]],
555
- colorTextButtonSoftAccentActive: [getOpacities(accent[11]).opacity80, getOpacities(accentDark[11]).opacity80],
591
+ colorTextButtonSoftAccentActive: [alpha(accent[11], 0.8), alpha(accentDark[11], 0.8)],
556
592
  colorTextButtonSoftNeutral: [base[11], baseDark[11]],
557
- colorTextButtonSoftNeutralActive: [getOpacities(base[11]).opacity80, getOpacities(baseDark[11]).opacity80],
593
+ colorTextButtonSoftNeutralActive: [alpha(base[11], 0.8), alpha(baseDark[11], 0.8)],
558
594
  colorTextButtonSoftDestructive: [red[11], redDark[11]],
559
- colorTextButtonSoftDestructiveActive: [getOpacities(red[11]).opacity80, getOpacities(redDark[11]).opacity80],
595
+ colorTextButtonSoftDestructiveActive: [alpha(red[11], 0.8), alpha(redDark[11], 0.8)],
560
596
  colorIconButtonSoftAccent: [accent[11], accentDark[11]],
561
597
  colorIconButtonSoftNeutral: [base[11], baseDark[11]],
562
598
  colorIconButtonSoftDestructive: [red[11], redDark[11]],
563
599
  // ghost
564
600
  colorBgButtonGhostAccentDefault: [transparent, transparent],
565
- colorBgButtonGhostAccentHover: [getOpacities(accent[4]).opacity80, getOpacities(accentDark[4]).opacity80],
601
+ colorBgButtonGhostAccentHover: [alpha(accent[4], 0.8), alpha(accentDark[4], 0.8)],
566
602
  colorBgButtonGhostNeutralDefault: [transparent, transparent],
567
- colorBgButtonGhostNeutralHover: [getOpacities(base[7]).opacity50, getOpacities(baseDark[6]).opacity80],
603
+ colorBgButtonGhostNeutralHover: [alpha(base[7], 0.5), alpha(baseDark[6], 0.8)],
568
604
  colorBgButtonGhostDestructiveDefault: [transparent, transparent],
569
605
  colorBgButtonGhostDestructiveHover: [red[4], redDark[4]],
570
606
  colorTextButtonGhostAccent: [accent[11], accentDark[11]],
571
- colorTextButtonGhostAccentActive: [getOpacities(accent[11]).opacity80, getOpacities(accentDark[11]).opacity80],
607
+ colorTextButtonGhostAccentActive: [alpha(accent[11], 0.8), alpha(accentDark[11], 0.8)],
572
608
  colorTextButtonGhostNeutral: [base[11], baseDark[11]],
573
- colorTextButtonGhostNeutralActive: [getOpacities(base[11]).opacity80, getOpacities(baseDark[11]).opacity80],
609
+ colorTextButtonGhostNeutralActive: [alpha(base[11], 0.8), alpha(baseDark[11], 0.8)],
574
610
  colorTextButtonGhostDestructive: [red[11], redDark[11]],
575
- colorTextButtonGhostDestructiveActive: [getOpacities(red[11]).opacity80, getOpacities(redDark[11]).opacity80],
611
+ colorTextButtonGhostDestructiveActive: [alpha(red[11], 0.8), alpha(redDark[11], 0.8)],
576
612
  colorIconButtonGhostAccent: [accent[11], accentDark[11]],
577
613
  colorIconButtonGhostNeutral: [base[11], baseDark[11]],
578
614
  colorIconButtonGhostDestructive: [red[11], redDark[11]],
579
615
  // #endregion
580
616
 
581
- colorBorderAccentFocusRing: [getOpacities(accent[9]).opacity30, getOpacities(accent[9]).opacity30],
582
- colorBorderNeutralFocusRing: [getOpacities(base[9]).opacity30, getOpacities(base[9]).opacity30],
583
- colorBorderDestructiveFocusRing: [getOpacities(red[9]).opacity30, getOpacities(red[9]).opacity30],
617
+ colorBorderAccentFocusRing: [alpha(accent[9], 0.3), alpha(accent[9], 0.3)],
618
+ colorBorderNeutralFocusRing: [alpha(base[9], 0.3), alpha(base[9], 0.3)],
619
+ colorBorderDestructiveFocusRing: [alpha(red[9], 0.3), alpha(red[9], 0.3)],
584
620
 
585
- colorBgReactionsDefault: [white, baseDark[2]],
586
- colorBgReactionsHover: [base[3], baseDark[6]],
621
+ colorBgReactionsDefault: surface.level0elevated,
622
+ colorBgReactionsHover: surface.level3_6,
587
623
  colorBorderReactionsHover: [base[8], baseDark[9]],
588
624
  colorBgReactionsSelectedDefault: [accent[3], accentDark[8]],
589
625
  colorBorderReactionsSelectedDefault: [accent[8], accentDark[8]],
@@ -591,74 +627,76 @@ export function makeThemeDefs({
591
627
  colorBgReactionsSelectedHover: [accent[2], accent[10]],
592
628
  colorBorderReactionsSelectedHover: [accent[9], accent[10]],
593
629
  colorTextReactionsSelected: [accent[10], baseDark[12]],
594
- colorBgToastDefault: [base[1], baseDark[1]],
595
- colorBgDbTabHover: [base[3], baseDark[4]],
630
+ colorBgToastDefault: surface.level1,
631
+ colorBgDbTabHover: surface.level3_4,
596
632
  colorBgDbTabFocus: [base[6], baseDark[6]],
597
- colorBgTabHover: [getOpacities(base[11]).opacity10, getOpacities(baseDark[11]).opacity10],
633
+ colorBgTabHover: [alpha(base[11], 0.1), alpha(baseDark[11], 0.1)],
598
634
 
599
635
  // Chat
600
636
  colorBgMessageContainer: [blackA[3], baseDark[6]],
601
- colorBgMessageContainerHover: [base[2], baseDark[3]],
637
+ colorBgMessageContainerHover: surface.level2_3,
602
638
  colorBgEntityAvatarDefault: [accent[1], accentDark[1]],
603
639
  colorBgEntityAvatarHover: [accent[3], accentDark[3]],
604
640
  colorTextEntityAvatarDefault: [accent[8], accentDark[8]],
605
641
  colorTextEntityAvatarHover: [accent[9], accentDark[9]],
606
642
 
607
643
  // Text editor
608
- colorBgEditorImageZoomed: [base[3], baseDark[6]],
644
+ colorBgEditorImageZoomed: surface.level3_6,
609
645
  colorMermaidPrimaryColor: [base[2], baseDark[8]],
610
646
  colorMermaidPrimaryBorderColor: [base[9], baseDark[9]],
611
647
  colorMermaidLineColor: [base[10], baseDark[9]],
612
648
 
613
649
  //Whiteboard
614
- colorBgWhiteboard: [white, baseDark[1]],
650
+ colorBgWhiteboard: surface.level0,
615
651
  colorGridDotWhiteboard: [base[6], baseDark[6]],
616
652
  colorSelectionWhiteboardBorderEnabled: [accent[8], accentDark[8]],
617
653
  colorHighlightWhiteboardSelection: [accent[8], accentDark[8]],
618
- colorHighlightWhiteboardSelectionLocked: [getOpacities(base[9]).opacity50, getOpacities(baseDark[9]).opacity50],
619
- colorSelectionWhiteboardBorderDisabled: [getOpacities(base[9]).opacity50, getOpacities(baseDark[9]).opacity50],
620
- colorPlaceholderWhiteboardDefault: [getOpacities(accent[8]).opacity20, getOpacities(accentDark[8]).opacity20],
654
+ colorHighlightWhiteboardSelectionLocked: [alpha(base[9], 0.5), alpha(baseDark[9], 0.5)],
655
+ colorSelectionWhiteboardBorderDisabled: [alpha(base[9], 0.5), alpha(baseDark[9], 0.5)],
656
+ colorPlaceholderWhiteboardDefault: [alpha(accent[8], 0.2), alpha(accentDark[8], 0.2)],
621
657
  colorLinkPointWhiteboardDefault: [accent[8], accentDark[8]],
622
658
  colorLinkPointWhiteboardFillDefault: [white, blackish],
623
- colorMapWhiteboardPreviewDefault: [getOpacities(accent[8]).opacity40, getOpacities(accentDark[8]).opacity40],
624
- colorCardWhiteboardShadowDefault: [getOpacities(base[11]).opacity5, getOpacities(baseDark[11]).opacity5],
625
- colorCardWhiteboardBgDefault: [white, baseDark[5]],
626
- colorCardWhiteboardBorderDefault: [getOpacities(base[12]).opacity20, getOpacities(baseDark[12]).opacity20],
627
- colorUnitHeaderWhiteboardDefault: [getOpacities(base[12]).opacity60, getOpacities(baseDark[12]).opacity60],
628
- colorUnitWhiteboardBgDefault: [base[3], baseDark[6]],
629
- colorUnitWhiteboardBorderDefault: [getOpacities(base[12]).opacity20, getOpacities(baseDark[12]).opacity25],
630
- colorSectionWhiteboardBgInactive: [base[2], baseDark[2]],
659
+ colorMapWhiteboardPreviewDefault: [alpha(accent[8], 0.4), alpha(accentDark[8], 0.4)],
660
+ colorCardWhiteboardShadowDefault: [alpha(base[11], 0.05), alpha(baseDark[11], 0.05)],
661
+ colorCardWhiteboardBgDefault: raised.level3,
662
+ colorCardWhiteboardBorderDefault: [alpha(base[12], 0.2), alpha(baseDark[12], 0.2)],
663
+ colorUnitHeaderWhiteboardDefault: [alpha(base[12], 0.6), alpha(baseDark[12], 0.6)],
664
+ colorUnitWhiteboardBgDefault: surface.level3_6,
665
+ colorUnitWhiteboardBorderDefault: [alpha(base[12], 0.2), alpha(baseDark[12], 0.25)],
666
+ colorSectionWhiteboardBgInactive: surface.level2,
631
667
  colorSectionWhiteboardBorderInactive: [base[6], baseDark[6]],
632
- colorEmbedWhiteboardEditBorder: [getOpacities(teal[8]).opacity90, getOpacities(tealDark[8]).opacity90],
668
+ colorEmbedWhiteboardEditBorder: [alpha(teal[8], 0.9), alpha(tealDark[8], 0.9)],
633
669
  colorTextWhiteboardDefault: [base[12], baseDark[12]],
634
670
  colorTextWhiteboardDisabled: [base[9], baseDark[9]],
635
- colorTextWhiteboardAccent: [getOpacities(base[12]).opacity60, getOpacities(baseDark[1]).opacity60],
671
+ colorTextWhiteboardAccent: [alpha(base[12], 0.6), alpha(baseDark[1], 0.6)],
636
672
  colorTextWhiteboardInversedDefault: [white, white],
637
- instrumentsMenuBg: [getOpacities(white).opacity100, getOpacities(baseDark[4]).opacity100],
673
+ instrumentsMenuBg: raised.level2,
638
674
  instrumentsMenuShadow: [
639
- `0px 0px 1px 0px ${getOpacities(base[11]).opacity20}, 0px 4px 6px 0px ${
640
- getOpacities(base[11]).opacity5
641
- }, 0px 3px 12px 0px ${getOpacities(base[11]).opacity10}`,
642
- `0px 0px 1px 0px ${getOpacities(baseDark[6]).opacity100}, 0px 4px 6px 0px ${
643
- getOpacities(baseDark[1]).opacity5
644
- }, 0px 3px 12px 0px ${getOpacities(baseDark[1]).opacity15}`,
645
- ],
646
- commentBubbleBg: [white, baseDark[6]],
675
+ `0px 0px 1px 0px ${alpha(base[11], 0.2)}, 0px 4px 6px 0px ${alpha(base[11], 0.05)}, 0px 3px 12px 0px ${alpha(
676
+ base[11],
677
+ 0.1
678
+ )}`,
679
+ `0px 0px 1px 0px ${baseDark[6]}, 0px 4px 6px 0px ${alpha(baseDark[1], 0.05)}, 0px 3px 12px 0px ${alpha(
680
+ baseDark[1],
681
+ 0.15
682
+ )}`,
683
+ ],
684
+ commentBubbleBg: raised.level4,
647
685
  commentsPanelShadow: [
648
- `0 0 0 1px ${getOpacities(base[10]).opacity10}, 0 2px 4px -4px ${getOpacities(base[10]).opacity20}`,
649
- `0 0 0 1px ${getOpacities(baseDark[2]).opacity10}, 0 2px 4px -4px ${getOpacities(baseDark[2]).opacity20}`,
686
+ `0 0 0 1px ${alpha(base[10], 0.1)}, 0 2px 4px -4px ${alpha(base[10], 0.2)}`,
687
+ `0 0 0 1px ${alpha(baseDark[2], 0.1)}, 0 2px 4px -4px ${alpha(baseDark[2], 0.2)}`,
650
688
  ],
651
- searchFiltersBg: [base[1], baseDark[2]],
652
- selectedColorBorder: [getOpacities(base[6]).opacity25, getOpacities(base[6]).opacity25],
689
+ searchFiltersBg: surface.level1_1,
690
+ selectedColorBorder: [alpha(base[6], 0.25), alpha(base[6], 0.25)],
653
691
 
654
692
  // SegmentedControl
655
- colorBgSegmentedControlDefault: [base[3], baseDark[1]],
656
- colorBgSegmentedControlActive: [base[1], baseDark[6]],
657
- colorBgSegmentedControlHover: [base[5], baseDark[4]],
693
+ colorBgSegmentedControlDefault: surface.level3_1,
694
+ colorBgSegmentedControlActive: surface.level1_6,
695
+ colorBgSegmentedControlHover: surface.level5_4,
658
696
  colorBorderSegmentedControlDefault: [base[6], baseDark[7]],
659
697
 
660
698
  // Chargebee info
661
- colorBgChargebeeInfoBox: [base[3], baseDark[1]],
699
+ colorBgChargebeeInfoBox: surface.level3_1,
662
700
 
663
701
  // Various found direct palette references
664
702
  // FIXME: lack of redDark scale usage, same values!
@@ -666,31 +704,31 @@ export function makeThemeDefs({
666
704
  colorBgErrorMessage: [red[8], red[8]],
667
705
 
668
706
  // Logo/illustration specific colors
669
- colorBorderLogoGrid: [base[4], baseDark[4]],
670
- colorBorderLogoGridSubtle: [getOpacities(base[4]).opacity20, baseDark[4]],
671
- colorBorderLogoGridMedium: [getOpacities(base[4]).opacity40, baseDark[4]],
707
+ colorBorderLogoGrid: surface.level4,
708
+ colorBorderLogoGridSubtle: [alpha(base[4], 0.2), baseDark[4]],
709
+ colorBorderLogoGridMedium: [alpha(base[4], 0.4), baseDark[4]],
672
710
  colorStrokeLogoDashed: [base[6], baseDark[8]],
673
- colorBgLogoCardTransparent: [white, baseDark[2]],
711
+ colorBgLogoCardTransparent: surface.level0elevated,
674
712
  colorBgLogoCardDark: [base[8], baseDark[8]],
675
- colorBgLogoCardMedium: [base[4], baseDark[4]],
713
+ colorBgLogoCardMedium: surface.level4,
676
714
 
677
715
  // Preloader / chrome
678
- scrollbar: [getOpacities(base[9]).opacity50, getOpacities(baseDark[7]).opacity50],
716
+ scrollbar: [alpha(base[9], 0.5), alpha(baseDark[7], 0.5)],
679
717
  } as const satisfies ThemeColorsDef;
680
718
 
681
719
  const fns = {
682
720
  getEnumBackground: {
683
- light: (color: string) => a11yColor(getOpacities(color).opacity15, white, 1),
684
- dark: (color: string) => a11yColor(getOpacities(color).opacity30, blackish, 1.3),
721
+ light: (color: string) => a11yColor(alpha(color, 0.15), white, 1),
722
+ dark: (color: string) => a11yColor(alpha(color, 0.3), blackish, 1.3),
685
723
  },
686
724
  getAppIconBackground: {
687
- light: (color: string) => a11yColor(getOpacities(color).opacity15, white, 1),
688
- dark: (color: string) => a11yColor(getOpacities(color).opacity30, blackish, 1.3),
689
- light2: (color: string) => a11yColor(getOpacities(color).opacity30, blackish, 1.3),
725
+ light: (color: string) => a11yColor(alpha(color, 0.15), white, 1),
726
+ dark: (color: string) => a11yColor(alpha(color, 0.3), blackish, 1.3),
727
+ light2: (color: string) => a11yColor(alpha(color, 0.3), blackish, 1.3),
690
728
  },
691
729
  getIconColor: {
692
- light: (color: string) => a11yColor(getOpacities(color).opacity95, white, 3),
693
- dark: (color: string) => a11yColor(getOpacities(color).opacity95, blackish, 5),
730
+ light: (color: string) => a11yColor(alpha(color, 0.95), white, 3),
731
+ dark: (color: string) => a11yColor(alpha(color, 0.95), blackish, 5),
694
732
  },
695
733
  getLinkedHighlightBackground: {
696
734
  light: (color: string) => produceColor(color, [(c) => setAlpha(c, 0.3), (c) => setLuminanceChroma(c, 0.6)]),