@fibery/ui-kit 1.4.1 → 1.7.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.
Files changed (71) hide show
  1. package/index.ts +0 -1
  2. package/package.json +39 -23
  3. package/src/Item.tsx +8 -2
  4. package/src/Pallete.ts +191 -191
  5. package/src/Select/components.tsx +22 -21
  6. package/src/Select/index.tsx +98 -30
  7. package/src/Select/select-control-settings-context.tsx +20 -0
  8. package/src/Select/select-in-popover.tsx +333 -0
  9. package/src/Select/styles.ts +27 -1
  10. package/src/ThemeProvider.tsx +1 -1
  11. package/src/antd/styles.ts +5 -7
  12. package/src/designSystem.ts +129 -91
  13. package/src/error-alert.tsx +2 -2
  14. package/src/icons/Icon.tsx +17 -12
  15. package/src/icons/ast/AddGroup.ts +8 -0
  16. package/src/icons/ast/AiAssistant.ts +8 -0
  17. package/src/icons/ast/AiAvatar.ts +8 -0
  18. package/src/icons/ast/ArrowBottom.ts +1 -1
  19. package/src/icons/ast/ArrowCollapse.ts +1 -1
  20. package/src/icons/ast/ArrowCollapseVertical.ts +1 -1
  21. package/src/icons/ast/ArrowLeft.ts +1 -1
  22. package/src/icons/ast/ArrowRight.ts +1 -1
  23. package/src/icons/ast/ArrowTop.ts +1 -1
  24. package/src/icons/ast/Atom.ts +8 -0
  25. package/src/icons/ast/Copy.ts +8 -0
  26. package/src/icons/ast/DynamicFilterValue.ts +8 -0
  27. package/src/icons/ast/ExtensionAssignments.ts +1 -1
  28. package/src/icons/ast/FileUpload.ts +8 -0
  29. package/src/icons/ast/FormWithCover.ts +8 -0
  30. package/src/icons/ast/FormWithoutCover.ts +8 -0
  31. package/src/icons/ast/Github.ts +3 -27
  32. package/src/icons/ast/Gitlab.ts +3 -25
  33. package/src/icons/ast/Hint.ts +1 -1
  34. package/src/icons/ast/Jira.ts +8 -0
  35. package/src/icons/ast/Markdown.ts +8 -0
  36. package/src/icons/ast/Minus.ts +8 -0
  37. package/src/icons/ast/MoreCompact.ts +1 -1
  38. package/src/icons/ast/RicheditorBlockFile.ts +8 -0
  39. package/src/icons/ast/RicheditorBlockH4.ts +1 -1
  40. package/src/icons/ast/SimpleCompass.ts +8 -0
  41. package/src/icons/ast/Templates.ts +8 -0
  42. package/src/icons/ast/TypeLocation.ts +8 -0
  43. package/src/icons/ast/ViewForm.ts +8 -0
  44. package/src/icons/ast/ViewMap.ts +8 -0
  45. package/src/icons/ast/index.tsx +199 -181
  46. package/src/icons/react/AddGroup.tsx +12 -0
  47. package/src/icons/react/AiAssistant.tsx +12 -0
  48. package/src/icons/react/AiAvatar.tsx +12 -0
  49. package/src/icons/react/Atom.tsx +12 -0
  50. package/src/icons/react/Copy.tsx +12 -0
  51. package/src/icons/react/DynamicFilterValue.tsx +12 -0
  52. package/src/icons/react/FileUpload.tsx +12 -0
  53. package/src/icons/react/FormWithCover.tsx +12 -0
  54. package/src/icons/react/FormWithoutCover.tsx +12 -0
  55. package/src/icons/react/Github.tsx +8 -6
  56. package/src/icons/react/Gitlab.tsx +8 -6
  57. package/src/icons/react/Jira.tsx +12 -0
  58. package/src/icons/react/Markdown.tsx +12 -0
  59. package/src/icons/react/Minus.tsx +12 -0
  60. package/src/icons/react/RicheditorBlockFile.tsx +12 -0
  61. package/src/icons/react/SimpleCompass.tsx +12 -0
  62. package/src/icons/react/Templates.tsx +12 -0
  63. package/src/icons/react/TypeLocation.tsx +12 -0
  64. package/src/icons/react/ViewForm.tsx +12 -0
  65. package/src/icons/react/ViewMap.tsx +12 -0
  66. package/src/icons/react/index.tsx +199 -181
  67. package/src/tooltip.tsx +132 -152
  68. package/src/Button.d.ts +0 -26
  69. package/src/Button.js +0 -360
  70. package/src/antd/ant-tooltip.tsx +0 -5
  71. package/src/icons/IconAsBackground.tsx +0 -15
@@ -1,5 +1,5 @@
1
1
  import {css} from "@linaria/core";
2
- import {colors, layout, opacity, border, shadows, space, textStyles, themeVars, transition} from "../designSystem";
2
+ import {colors, layout, border, shadows, space, textStyles, themeVars, transition} from "../designSystem";
3
3
 
4
4
  export const inputOverrides = {
5
5
  main: {
@@ -20,19 +20,18 @@ export const inputOverrides = {
20
20
  letterSpacing: 0,
21
21
  "::placeholder": {
22
22
  color: themeVars.inputPlaceholderTextColor,
23
- opacity: 1,
24
23
  },
25
24
  },
26
25
  hover: {
27
- boxShadow: `0 0 0 1px ${themeVars.opacity.regular} !important`,
26
+ boxShadow: `0 0 0 1px ${themeVars.opacity.opacity40} !important`,
28
27
  transition: `box-shadow ${transition}`,
29
28
  },
30
29
  focus: {
31
- boxShadow: `0 0 0 1px ${themeVars.opacity.light}, 0 0 0 3px ${themeVars.focus} !important`,
30
+ boxShadow: `0 0 0 1px ${themeVars.opacity.opacity25}, 0 0 0 3px ${themeVars.focus} !important`,
32
31
  transition: `box-shadow ${transition}`,
33
32
  },
34
33
  disabled: {
35
- color: `${themeVars.accentTextColor} !important`,
34
+ color: `${themeVars.accentTextColor}`,
36
35
  backgroundColor: `${themeVars.inputDisabledBgColor} !important`,
37
36
  borderColor: colors.transparent,
38
37
  boxShadow: `${themeVars.inputDisabledBorderColor} !important`,
@@ -110,8 +109,7 @@ export const inputStyles = css`
110
109
  "&& .ant-input-disabled, && .ant-input-disabled:hover, && .ant-input-disabled:focus, && .ant-input-disabled:active":
111
110
  inputOverrides.disabled,
112
111
  "&& input::placeholder, && textarea::placeholder": {
113
- color: themeVars.textColor,
114
- opacity: opacity.regular,
112
+ color: themeVars.inputPlaceholderTextColor,
115
113
  },
116
114
  "& .ant-input-affix-wrapper .ant-input-prefix": {left: space.s},
117
115
  "& .ant-input-affix-wrapper .ant-input:not(:first-child)": {paddingLeft: space.s + space.xl + space.m}, // Match TitlePreview spacing
@@ -10,7 +10,6 @@ import {
10
10
  indigoDark,
11
11
  red,
12
12
  redDark,
13
- sage,
14
13
  slate,
15
14
  slateDark,
16
15
  whiteA,
@@ -31,18 +30,6 @@ export const fontWeight = {
31
30
  const transparent = "rgba(255, 255, 255, 0)";
32
31
 
33
32
  export const opacity = {
34
- opaque: 1,
35
- overlay: 0.9,
36
- tiny: 0.8,
37
- tiniest: 0.7,
38
- half: 0.5,
39
- regular: 0.4,
40
- light: 0.25,
41
- notSoThin: 0.14,
42
- thin: 0.1,
43
- thinner: 0.07,
44
- hairline: 0.04,
45
- transparent: 0,
46
33
  opacity100: 1,
47
34
  opacity95: 0.95,
48
35
  opacity90: 0.9,
@@ -96,7 +83,7 @@ export const inversedSeparators = {
96
83
  } as const;
97
84
 
98
85
  export const fontFamily =
99
- "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif";
86
+ "ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica', 'Arial', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'";
100
87
 
101
88
  const stateColors = {
102
89
  success: "rgba(8, 189, 159, 1)",
@@ -112,27 +99,32 @@ const brandColors = {
112
99
  blue: "#4568FB",
113
100
  } as const;
114
101
 
115
- export const getDarkenColor = (color: string): string => {
102
+ export const getDarkenColor = _.memoize((color: string): string => {
116
103
  return makeChromaColor(color).darken(0.4).css();
117
- };
104
+ });
118
105
 
119
106
  const lightColors = {
120
107
  mode: "light",
121
108
  brandColors,
122
109
  stateColors,
123
- //light theme
124
110
  whiteColor: whiteA.whiteA0,
125
111
  blackColor: blackA.blackA0,
126
- mainBg: sage.sage3,
112
+ mainBg: slate.slate2,
127
113
  panelBg: whiteA.whiteA0,
128
- panelContentBg: sage.sage2,
114
+ panelContentBg: slate.slate2,
129
115
  pageBg: whiteA.whiteA0,
130
116
  pageContentBg: whiteA.whiteA0,
131
117
  sidebarBg: whiteA.whiteA0,
132
118
  sidebarShadow: `-3px 0px 10px 0px ${getOpacities(slate.slate10).opacity10}`,
133
- menuBg: sage.sage3,
119
+ menuBg: slate.slate2,
120
+ menuTextColor: slate.slate12,
121
+ menuItemHoverColor: slate.slate4,
122
+ menuItemSettingsHoverBg: slate.slate5,
123
+ menuSelectedTextColor: slate.slate2,
134
124
  menuFooterColor: getOpacities(whiteA.whiteA0).opacity20,
135
- menuFooterHoverColor: getOpacities(whiteA.whiteA0).opacity40,
125
+ menuFooterHoverColor: getOpacities(whiteA.whiteA0).opacity60,
126
+ menuIconColor: getOpacities(slate.slate10).opacity90,
127
+ menuSelectedIconColor: getOpacities(slate.slate1).opacity90,
136
128
  textColor: slateDark.slate3,
137
129
  textSelectionColor: getOpacities(blue.blue10).opacity20,
138
130
  accentTextColor: slate.slate10,
@@ -143,15 +135,15 @@ const lightColors = {
143
135
  linkHoverColor: indigo.indigo10,
144
136
  linkBorderHover: `1px solid ${getOpacities(indigo.indigo10).opacity80}`,
145
137
  codeColor: red.red9,
146
- codeBgColor: makeChromaColor("#F24461").luminance(0.92).css(),
147
- codeBlockBgColor: sage.sage3,
138
+ codeBgColor: slate.slate3,
139
+ codeBlockBgColor: slate.slate3,
148
140
  entityNodeColor: slateDark.slate3,
149
141
  entityNodeBorder: `1px solid ${getOpacities(slateDark.slate3).opacity30}`,
150
142
  entityNodeHoverColor: slateDark.slate7,
151
143
  entityNodeBorderHover: `1px solid ${getOpacities(slate.slate11).opacity80}`,
152
144
  entityNodeBgColor: slate.slate2,
153
145
  shortcutTextColor: slate.slate9,
154
- shortcutBorderColor: `1px solid ${getOpacities(slate.slate8).opacity20}`,
146
+ shortcutBorderColor: `1px solid ${getOpacities(slate.slate8).opacity50}`,
155
147
  inputBgColor: whiteA.whiteA0,
156
148
  inputDisabledBgColor: getOpacities(slate.slate6).opacity30,
157
149
  inputDisabledBorderColor: `0 0 0 1px ${getOpacities(slate.slate6).opacity20}`,
@@ -160,19 +152,17 @@ const lightColors = {
160
152
  inputBorderHoverColor: `0 0 0 1px ${getOpacities(slate.slate7).opacity100}`,
161
153
  inputBorderFocusColor: `0 0 0 1px ${getOpacities(slate.slate8).opacity100}`,
162
154
  inputBorderBlendMode: "multiply",
163
- inputPlaceholderTextColor: slate.slate10,
155
+ inputPlaceholderTextColor: slate.slate9,
164
156
  buttonColor: slate.slate10,
165
157
  buttonPrimaryTextColor: slate.slate2,
166
158
  checkboxColor: slate.slate10,
167
- menuTextColor: slate.slate12,
168
- selectedMenuTextColor: slate.slate2,
169
159
  actionMenuBg: whiteA.whiteA0,
170
160
  actionMenuInnerBg: whiteA.whiteA0,
171
161
  actionMenuShadow: `0 0 0 1px ${getOpacities(slate.slate10).opacity10}, 0 12px 16px -4px ${
172
162
  getOpacities(slate.slate10).opacity30
173
163
  }`,
174
- actionMenuHover: slate.slate3,
175
- actionMenuInnerHover: slate.slate3,
164
+ actionMenuHover: slate.slate4,
165
+ actionMenuInnerHover: slate.slate4,
176
166
  actionMenuButtonColor: whiteA.whiteA0,
177
167
  actionMenuButtonHoverColor: slate.slate1,
178
168
  actionMenuButtonShadow: `0 0 0 1px ${getOpacities(slate.slate10).opacity10}, 0 2px 4px -4px ${
@@ -182,14 +172,14 @@ const lightColors = {
182
172
  getOpacities(slate.slate10).opacity30
183
173
  }`,
184
174
  separatorColor: getOpacities(slate.slate4).opacity50,
175
+ separatorBreadcrumbsColor: slate.slate8,
185
176
  iconColor: slate.slate10,
186
- menuIconColor: getOpacities(slate.slate10).opacity90,
187
- selectedMenuIconColor: getOpacities(slate.slate1).opacity90,
188
- appIconColor: getOpacities(slate.slate1).opacity90,
177
+ appIconColor: getOpacities(slate.slate2).opacity90,
178
+ appIconBgColor: getOpacities(slate.slate1).opacity90,
189
179
  mentionBgColor: slate.slate3,
190
180
  entityCardBgColor: whiteA.whiteA0,
191
- entityCardSelectedColor: whiteA.whiteA0,
192
- entityCardHoverColor: getOpacities(slate.slate1).opacity95,
181
+ entityCardSelectedColor: getOpacities(slate.slate2).opacity80,
182
+ entityCardHoverColor: getOpacities(slate.slate2).opacity80,
193
183
  entityCardDoneColor: getOpacities(slate.slate4).opacity30,
194
184
  entityCardShadow: `0 0 0 1px ${getOpacities(slate.slate10).opacity10}, 0 2px 4px -4px ${
195
185
  getOpacities(slate.slate10).opacity20
@@ -197,6 +187,7 @@ const lightColors = {
197
187
  entityCardShadowHover: `0 0 0 1px ${getOpacities(slate.slate10).opacity10}, 0 2px 4px -4px ${
198
188
  getOpacities(slate.slate10).opacity20
199
189
  }`,
190
+ allowedDropColor: getOpacities(slate.slate3).opacity80,
200
191
  relationViewBgColor: slate.slate2,
201
192
  unitBg: slate.slate3,
202
193
  unitBgHover: slate.slate4,
@@ -206,13 +197,14 @@ const lightColors = {
206
197
  viewBgOverlayColor: getOpacities(slate.slate8).opacity20,
207
198
  floatEditorMenuBg: slate.slate1,
208
199
  floatEditorActiveColor: indigoDark.indigo10,
200
+ planBadgeBgColor: yellow.yellow10,
209
201
  commentColor: getOpacities(yellow.yellow6).opacity60,
210
- cellBackgroundColor: sage.sage2,
211
- cellBackgroundHoverColor: getOpacities(sage.sage6).opacity30,
202
+ cellBackgroundColor: slate.slate2,
203
+ cellBackgroundHoverColor: getOpacities(slate.slate6).opacity30,
212
204
  cellBorderColor: getOpacities(slate.slate8).opacity50,
213
205
  tableRowWarningColor: getOpacities(yellow.yellow6).opacity60,
214
- errorBgColor: getOpacities(red.red9).opacity60,
215
- errorTextColor: red.red12,
206
+ errorBgColor: getOpacities(red.red9).opacity20,
207
+ errorTextColor: red.red11,
216
208
  errorButtonColor: red.red9,
217
209
  warningBgColor: getOpacities(yellow.yellow6).opacity60,
218
210
  warningButtonColor: yellow.yellow11,
@@ -226,7 +218,7 @@ const lightColors = {
226
218
  getOpacities(slate.slate10).opacity30
227
219
  }`,
228
220
  modalBg: getOpacities(slate.slate11).opacity20,
229
- modalShadow: `${getOpacities(slate.slate10).opacity10} 0px 16px 70px`,
221
+ modalShadow: `${getOpacities(slate.slate10).opacity20} 0px 16px 70px`,
230
222
  modalContentBg: whiteA.whiteA0,
231
223
  progressIconBg: getOpacities(slate.slate12).opacity10,
232
224
  progressIconFill: getOpacities(slate.slate12).opacity80,
@@ -237,29 +229,44 @@ const lightColors = {
237
229
  getOpacities(slate.slate10).opacity20
238
230
  }`,
239
231
  selectedColorBorder: getOpacities(slate.slate6).opacity50,
232
+ formBg: slate.slate2,
233
+ formHeaderShadow: `${getOpacities(slate.slate10).opacity10} 0px 0px 6px`,
234
+ formEditorFieldBg: slate.slate3,
235
+ filterGroup1Bg: slate.slate2,
236
+ filterGroup2Bg: slate.slate3,
237
+ filterGroupBorder: blackA.blackA3,
240
238
  //end
241
- disabledInversedTextColor: shades.light,
239
+ disabledInversedTextColor: shades.opacity25,
242
240
  danger: brandColors.red,
243
241
  active: brandColors.red,
244
242
  warning: "#FFD41E",
245
243
  cardBg: "#FFFFFF",
246
244
  cardSelected: "#FFFB8F",
247
245
  cardSelectedHover: "rgba(240, 244, 247, 0.6)",
246
+ selectedImageBorder: blackA.blackA8,
248
247
  transparent,
249
248
  shades: lights,
250
249
  lights: shades,
251
250
  separators,
252
251
  inversedSeparators,
252
+ progressBg: slate.slate4,
253
+ progressText: slate.slate11,
254
+ progressFillBg: slate.slate11,
255
+ progressFillText: whiteA.whiteA0,
256
+ searchFiltersBg: slate.slate1,
253
257
  } as const;
254
258
 
255
259
  const darkMenu = {
256
260
  menuBg: slateDark.slate2,
257
- menuFooterColor: getOpacities(slateDark.slate3).opacity20,
258
- menuFooterHoverColor: getOpacities(slateDark.slate3).opacity40,
261
+ menuFooterColor: getOpacities(slateDark.slate3).opacity40,
262
+ menuFooterHoverColor: slateDark.slate4,
259
263
  menuTextColor: slate.slate8,
260
264
  menuIconColor: getOpacities(slate.slate10).opacity90,
261
- selectedMenuIconColor: getOpacities(slate.slate1).opacity90,
262
- selectedMenuTextColor: slate.slate2,
265
+ menuSelectedIconColor: getOpacities(slate.slate1).opacity90,
266
+ menuSelectedTextColor: slate.slate2,
267
+ menuItemHoverColor: slateDark.slate6,
268
+ menuItemSettingsHoverBg: slateDark.slate5,
269
+ appIconBgColor: getOpacities(slate.slate2).opacity50,
263
270
  };
264
271
 
265
272
  const light2Colors = {
@@ -272,7 +279,6 @@ const darkColors = {
272
279
  mode: "dark",
273
280
  brandColors,
274
281
  stateColors,
275
- //dark theme
276
282
  whiteColor: whiteA.whiteA0,
277
283
  blackColor: blackA.blackA0,
278
284
  mainBg: slateDark.slate1,
@@ -292,8 +298,8 @@ const darkColors = {
292
298
  linkHoverColor: indigoDark.indigo10,
293
299
  linkBorderHover: `1px solid ${getOpacities(indigoDark.indigo10).opacity80}`,
294
300
  codeColor: red.red8,
295
- codeBgColor: makeChromaColor(redDark.red3).luminance(0.05).darken(0.5).css(),
296
- codeBlockBgColor: slateDark.slate3,
301
+ codeBgColor: slateDark.slate4,
302
+ codeBlockBgColor: slateDark.slate4,
297
303
  entityNodeColor: slate.slate8,
298
304
  entityNodeBorder: `1px solid ${getOpacities(slate.slate8).opacity40}`,
299
305
  entityNodeHoverColor: slate.slate7,
@@ -309,7 +315,7 @@ const darkColors = {
309
315
  inputBorderHoverColor: `0 0 0 1px ${getOpacities(slateDark.slate8).opacity100}`,
310
316
  inputBorderFocusColor: `0 0 0 1px ${getOpacities(slateDark.slate9).opacity100}`,
311
317
  inputBorderBlendMode: "lighten",
312
- inputPlaceholderTextColor: slate.slate10,
318
+ inputPlaceholderTextColor: slateDark.slate9,
313
319
  buttonColor: slateDark.slate10,
314
320
  buttonPrimaryTextColor: slate.slate6,
315
321
  checkboxColor: slateDark.slate10,
@@ -329,11 +335,12 @@ const darkColors = {
329
335
  getOpacities(slateDark.slate2).opacity30
330
336
  }`,
331
337
  separatorColor: getOpacities(slateDark.slate8).opacity50,
338
+ separatorBreadcrumbsColor: slateDark.slate8,
332
339
  iconColor: slate.slate9,
333
340
  appIconColor: getOpacities(slate.slate2).opacity70,
334
341
  mentionBgColor: slateDark.slate5,
335
342
  entityCardBgColor: slateDark.slate5,
336
- entityCardSelectedColor: slateDark.slate5,
343
+ entityCardSelectedColor: getOpacities(slateDark.slate6).opacity50,
337
344
  entityCardHoverColor: getOpacities(slateDark.slate6).opacity50,
338
345
  entityCardDoneColor: getOpacities(slateDark.slate5).opacity30,
339
346
  entityCardShadow: `0 0 0 1px ${getOpacities(slateDark.slate2).opacity10}, 0 2px 4px -4px ${
@@ -342,22 +349,24 @@ const darkColors = {
342
349
  entityCardShadowHover: `0 0 0 1px ${getOpacities(slateDark.slate2).opacity10}, 0 2px 4px -4px ${
343
350
  getOpacities(slateDark.slate2).opacity20
344
351
  }`,
352
+ allowedDropColor: getOpacities(slateDark.slate3).opacity80,
345
353
  relationViewBgColor: slateDark.slate3,
346
354
  unitBg: slateDark.slate6,
347
355
  unitBgHover: slateDark.slate7,
348
356
  badgeBgColor: getOpacities(slate.slate10).opacity20,
349
- tooltipBgColor: slateDark.slate7,
357
+ tooltipBgColor: slateDark.slate6,
350
358
  todayMarkerColor: redDark.red6,
351
359
  viewBgOverlayColor: getOpacities(slateDark.slate1).opacity60,
352
360
  floatEditorMenuBg: slateDark.slate6,
353
361
  floatEditorActiveColor: indigoDark.indigo11,
362
+ planBadgeBgColor: yellowDark.yellow10,
354
363
  commentColor: getOpacities(yellowDark.yellow9).opacity40,
355
364
  cellBackgroundColor: slateDark.slate2,
356
365
  cellBackgroundHoverColor: getOpacities(slateDark.slate6).opacity30,
357
366
  cellBorderColor: getOpacities(slateDark.slate9).opacity50,
358
367
  tableRowWarningColor: getOpacities(yellowDark.yellow9).opacity40,
359
368
  errorBgColor: getOpacities(redDark.red9).opacity60,
360
- errorTextColor: redDark.red12,
369
+ errorTextColor: red.red7,
361
370
  errorButtonColor: redDark.red10,
362
371
  warningBgColor: getOpacities(yellowDark.yellow8).opacity60,
363
372
  warningButtonColor: yellowDark.yellow11,
@@ -373,26 +382,38 @@ const darkColors = {
373
382
  modalBg: getOpacities(slateDark.slate2).opacity50,
374
383
  modalShadow: `${getOpacities(slateDark.slate1).opacity40} 0px 16px 70px`,
375
384
  modalContentBg: slateDark.slate3,
376
- progressIconBg: getOpacities(slate.slate1).opacity10,
377
- progressIconFill: getOpacities(slate.slate1).opacity60,
378
- progressIconDoneBg: getOpacities(slate.slate1).opacity10,
379
- progressIconDoneFill: getOpacities(slate.slate1).opacity80,
385
+ progressIconBg: getOpacities(slateDark.slate12).opacity10,
386
+ progressIconFill: getOpacities(slateDark.slate12).opacity80,
387
+ progressIconDoneBg: getOpacities(slateDark.slate12).opacity90,
388
+ progressIconDoneFill: getOpacities(slateDark.slate1).opacity80,
380
389
  instrumentsMenuBg: getOpacities(slateDark.slate4).opacity95,
381
390
  instrumentsMenuShadow: `0px 2px 8px ${getOpacities(slate.slate2).opacity95}`,
382
391
  selectedColorBorder: getOpacities(slate.slate6).opacity20,
392
+ formBg: slateDark.slate2,
393
+ formHeaderShadow: `${getOpacities(slateDark.slate1).opacity40} 0px 0px 6px`,
394
+ formEditorFieldBg: slateDark.slate4,
395
+ filterGroup1Bg: slateDark.slate6,
396
+ filterGroup2Bg: slateDark.slate7,
397
+ filterGroupBorder: whiteA.whiteA3,
383
398
  //end
384
- disabledInversedTextColor: lights.light,
399
+ disabledInversedTextColor: lights.opacity25,
385
400
  danger: redDark.red9,
386
401
  active: brandColors.red,
387
402
  warning: "#FFD41E",
388
403
  cardBg: slateDark.slate6,
389
404
  cardSelected: slateDark.slate5,
390
405
  cardSelectedHover: slateDark.slate5,
406
+ selectedImageBorder: whiteA.whiteA11,
391
407
  transparent,
392
408
  shades,
393
409
  lights,
394
410
  separators: inversedSeparators,
395
411
  inversedSeparators: separators,
412
+ progressBg: slate.slate4,
413
+ progressText: slate.slate11,
414
+ progressFillBg: slate.slate11,
415
+ progressFillText: whiteA.whiteA0,
416
+ searchFiltersBg: slateDark.slate2,
396
417
  ...darkMenu,
397
418
  } as const;
398
419
 
@@ -498,33 +519,39 @@ export const getThemeColors: (themeColor: string, theme: ThemeMode) => ThemeColo
498
519
  (themeColor, theme) => themeColor + theme
499
520
  );
500
521
 
501
- export const getTextColor = (color: string): string => {
522
+ export const getTextColor = _.memoize((color: string): string => {
502
523
  return makeChromaColor(color).luminance() > 0.45 ? makeChromaColor(color).luminance(0.1).saturate(3).hex() : "white";
503
- };
524
+ });
504
525
 
505
- export const getBrightenColor = (color: string): string => {
526
+ export const getBrightenColor = _.memoize((color: string): string => {
506
527
  return makeChromaColor(color).brighten(0.15).hex();
507
- };
528
+ });
508
529
 
509
- export const getLinkedHighlightBackgroundColor = (themeColors: ThemeColors, color: string): string => {
510
- switch (themeColors.mode) {
511
- case "dark":
512
- return makeChromaColor(color).alpha(0.4).luminance(0.5).css();
513
- case "light":
514
- return makeChromaColor(color).alpha(0.3).luminance(0.6).css();
515
- default:
516
- return makeChromaColor(color).alpha(0.3).luminance(0.6).css();
517
- }
518
- };
530
+ export const getLinkedHighlightBackgroundColor = _.memoize(
531
+ (themeColors: ThemeColors, color: string): string => {
532
+ switch (themeColors.mode) {
533
+ case "dark":
534
+ return makeChromaColor(color).alpha(0.4).luminance(0.5).css();
535
+ case "light":
536
+ return makeChromaColor(color).alpha(0.3).luminance(0.6).css();
537
+ default:
538
+ return makeChromaColor(color).alpha(0.3).luminance(0.6).css();
539
+ }
540
+ },
541
+ (themeMode, color) => `${themeMode}-${color}`
542
+ );
519
543
 
520
- export const getEnumBackgroundColor = (themeMode: ThemeMode, color: string) => {
521
- switch (themeMode) {
522
- case "dark":
523
- return makeChromaColor(color).darken(2.2).alpha(0.5).saturate(1).css();
524
- default:
525
- return color;
526
- }
527
- };
544
+ export const getEnumBackgroundColor = _.memoize(
545
+ (themeMode: ThemeMode, color: string) => {
546
+ switch (themeMode) {
547
+ case "dark":
548
+ return makeChromaColor(color).darken(2.2).alpha(0.5).saturate(1).css();
549
+ default:
550
+ return color;
551
+ }
552
+ },
553
+ (themeMode, color) => `${themeMode}-${color}`
554
+ );
528
555
 
529
556
  export const cardTypeColors = [
530
557
  "#D40915",
@@ -547,25 +574,26 @@ export const cardTypeColors = [
547
574
 
548
575
  export const pastelColors = cardTypeColors.map((color) => makeChromaColor(color).luminance(0.8).hex());
549
576
 
577
+ export const dropCursorColor = chroma(brandColors.blue).alpha(0.7).css();
550
578
  export const colors = {
551
579
  ...getTypeColors(brandColors.green, "light"),
552
580
  brandColors,
553
581
  stateColors,
554
582
  textColor: "#2A3844",
555
- disabledTextColor: shades.regular,
583
+ disabledTextColor: shades.opacity40,
556
584
  inversedTextColor: "#FFFFFF",
557
- disabledInversedTextColor: lights.light,
558
- linkColor: brandColors.blue,
585
+ disabledInversedTextColor: lights.opacity25,
559
586
  danger: brandColors.red,
560
587
  active: brandColors.red,
561
588
  warning: "#FFD41E",
562
589
  cardBg: "#FFFFFF",
563
590
  cardSelected: "#FFFB8F",
564
591
  cardSelectedHover: "rgba(240, 244, 247, 0.6)",
592
+ selectedImageBorder: "rgba(42, 56, 68, 0.3)",
565
593
  unitBg: "rgba(220, 224, 228, 0.33)",
566
594
  infoBox: "rgba(255, 212, 0, 0.2)",
567
595
  errorBg: "rgba(255, 241, 240, 1)",
568
- timelineScaleSelectBorderColor: chroma("#FFFFFF").alpha(opacity.regular).css(),
596
+ timelineScaleSelectBorderColor: chroma("#FFFFFF").alpha(opacity.opacity40).css(),
569
597
  transparent,
570
598
  shades,
571
599
  lights,
@@ -589,6 +617,7 @@ export const layout = {
589
617
  menuItemMinWidth: 80,
590
618
  menuGroupHeaderIndent: 40, // I'm ok
591
619
  menuItemLevelIndent: 24,
620
+ listItemHeight: 38,
592
621
  itemHeight: 36,
593
622
  itemWithSubtitleHeight: 52,
594
623
  groupTitleHeight: 30,
@@ -614,6 +643,7 @@ export const layout = {
614
643
  checkboxSize: 17,
615
644
  fakeBoardWidth: 260,
616
645
  fakeBoardHeight: 160,
646
+ inlineInputHeight: 32,
617
647
  menuHeight: 32,
618
648
  popupTopMargin: 48,
619
649
  unitHeight: 18,
@@ -637,12 +667,12 @@ export const border = {
637
667
  export const lineHeight = {
638
668
  text: 1.6,
639
669
  regular: 1.5,
640
- heading: 1.225,
670
+ heading: 1.25,
641
671
  nowrap: 1,
642
672
  } as const;
643
673
 
644
674
  export const tooltipDelay = {
645
- enter: 0.4,
675
+ enter: 500,
646
676
  leave: 0,
647
677
  } as const;
648
678
 
@@ -655,8 +685,8 @@ export const viewBoxSize = "0 0 20 20";
655
685
  export const avatarSize = 24;
656
686
 
657
687
  export const shadows = {
658
- border: `0 0 0 1px ${shades.thin}`,
659
- inversedBorder: `0 0 0 1px ${lights.thin}`,
688
+ border: `0 0 0 1px ${shades.opacity10}`,
689
+ inversedBorder: `0 0 0 1px ${lights.opacity10}`,
660
690
  videoPreview: "0 4px 30px 4px rgba(0, 0, 0, .15)",
661
691
  } as const;
662
692
 
@@ -729,8 +759,16 @@ export const themeVars = Object.keys(getThemeColors(brandColors.green, "light"))
729
759
  return vars;
730
760
  }, {} as Record<string, string | {[k: string]: string}>) as ThemeColors;
731
761
 
732
- export const createInlineTheme = (theme: ThemeColors, rejectKeys = Object.keys(lightColors)) =>
733
- createInlineStyles<ThemeColors>(theme, rejectKeys);
762
+ const DEFAULT_REJECT_KEYS = Object.keys(lightColors);
763
+ export const createInlineTheme = _.memoize(
764
+ (theme: ThemeColors, rejectKeys = DEFAULT_REJECT_KEYS) => {
765
+ return createInlineStyles<ThemeColors>(theme, rejectKeys);
766
+ },
767
+ (theme, rejectKeys = DEFAULT_REJECT_KEYS) => {
768
+ const rejectKeysLabel = rejectKeys === DEFAULT_REJECT_KEYS ? "DEFAULT_REJECT_KEYS" : JSON.stringify(rejectKeys);
769
+ return `${theme.mode}__${theme.primary}__${rejectKeysLabel}`;
770
+ }
771
+ );
734
772
 
735
773
  export const textStyles = {
736
774
  heading1: {
@@ -814,7 +852,7 @@ export const textStyles = {
814
852
  textTransform: "none",
815
853
  },
816
854
  code: {
817
- fontFamily: "Consolas, Menlo, Courier, monospace",
855
+ fontFamily: '"SFMono-Regular", Menlo, Consolas, "PT Mono", "Liberation Mono", Courier, monospace',
818
856
  fontSize: typeSizes[4],
819
857
  lineHeight: lineHeight.regular,
820
858
  fontWeight: fontWeight.regular,
@@ -825,7 +863,7 @@ export const textStyles = {
825
863
  fontSize: typeSizes[7],
826
864
  lineHeight: lineHeight.regular,
827
865
  fontWeight: fontWeight.regular,
828
- color: colors.shades.light,
866
+ color: colors.shades.opacity25,
829
867
  },
830
868
  link: {
831
869
  color: themeVars.linkColor,
@@ -838,7 +876,7 @@ export const textStyles = {
838
876
  color: colors.inversedTextColor,
839
877
  cursor: "pointer",
840
878
  textDecoration: "underline",
841
- textDecorationColor: lights.light,
879
+ textDecorationColor: lights.opacity25,
842
880
  },
843
881
  note: {
844
882
  fontFamily,
@@ -1,8 +1,8 @@
1
1
  import {css} from "@linaria/core";
2
2
  import {layout, border, space, textStyles, themeVars} from "./designSystem";
3
- import {Button} from "./Button";
3
+ import {Button} from "./Button/button";
4
4
  import CloseIcon from "./icons/react/Close";
5
- import {useTheme} from "@fibery/ui-kit/src/ThemeProvider";
5
+ import {useTheme} from "./ThemeProvider";
6
6
 
7
7
  const errorAlert = css`
8
8
  background-color: ${themeVars.errorBgColor};
@@ -4,25 +4,30 @@ import {generateIconFromAst} from "./generateIconFromAst";
4
4
  import {IconProps} from "./types";
5
5
  import {getShiftStyle} from "./getShiftStyle";
6
6
  import {getIconContainerStyle} from "./getIconContainerStyle";
7
+ import {forwardRef} from "react";
7
8
 
8
9
  const iconStyle = css`
9
10
  shape-rendering: geometricprecision;
10
11
  border-radius: ${radius}px;
11
12
  `;
12
13
 
13
- export function Icon({
14
- icon,
15
- containerSize,
16
- color,
17
- viewBox = viewBoxSize,
18
- iconSize = defaultIconSize,
19
- onMouseDown,
20
- onMouseEnter,
21
- onMouseLeave,
22
- children,
23
- }: IconProps): JSX.Element {
14
+ export const Icon = forwardRef<HTMLSpanElement, IconProps>(function Icon(
15
+ {
16
+ icon,
17
+ containerSize,
18
+ color,
19
+ viewBox = viewBoxSize,
20
+ iconSize = defaultIconSize,
21
+ onMouseDown,
22
+ onMouseEnter,
23
+ onMouseLeave,
24
+ children,
25
+ },
26
+ ref
27
+ ): JSX.Element {
24
28
  return (
25
29
  <span
30
+ ref={ref}
26
31
  style={getIconContainerStyle(containerSize || iconSize, color)}
27
32
  onMouseDown={onMouseDown}
28
33
  onMouseEnter={onMouseEnter}
@@ -53,4 +58,4 @@ export function Icon({
53
58
  )}
54
59
  </span>
55
60
  );
56
- }
61
+ });
@@ -0,0 +1,8 @@
1
+
2
+ // This icon file is generated automatically.
3
+
4
+ import { IconDefinition } from '../types';
5
+
6
+ const AddGroup: IconDefinition = {"icon":{"type":"root","children":[{"type":"element","tagName":"svg","properties":{"width":20,"height":20},"children":[{"type":"element","tagName":"path","properties":{"d":"M9.25 6.75a.75.75 0 0 1 1.5 0v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5Z"},"children":[]},{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","clipRule":"evenodd","d":"M2 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4Zm2-.5h12a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H4a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5Z"},"children":[]}],"metadata":""}]},"name":"add-group"};
7
+
8
+ export default AddGroup;
@@ -0,0 +1,8 @@
1
+
2
+ // This icon file is generated automatically.
3
+
4
+ import { IconDefinition } from '../types';
5
+
6
+ const AiAssistant: IconDefinition = {"icon":{"type":"root","children":[{"type":"element","tagName":"svg","properties":{"width":20,"height":20},"children":[{"type":"element","tagName":"path","properties":{"d":"M3.27.185a.29.29 0 0 0-.54 0l-.522 1.358c-.09.235-.12.305-.16.36a.614.614 0 0 1-.144.146c-.056.04-.126.069-.36.159L.184 2.73a.29.29 0 0 0 0 .54l1.358.522c.235.09.305.12.36.16.057.04.106.088.146.144.04.056.069.126.159.36l.522 1.359a.29.29 0 0 0 .54 0l.522-1.358c.09-.235.12-.305.16-.36a.614.614 0 0 1 .144-.146c.056-.04.126-.069.36-.159l1.359-.522a.29.29 0 0 0 0-.54l-1.358-.522c-.235-.09-.305-.12-.36-.16a.614.614 0 0 1-.146-.144c-.04-.056-.069-.126-.159-.36L3.27.184Z"},"children":[]},{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","clipRule":"evenodd","d":"M10.833 1.7a.8.8 0 0 1 .747.513l1.445 3.757c.25.65.33.842.44.997.11.155.246.29.4.4.156.111.349.191.998.441l3.757 1.445a.8.8 0 0 1 0 1.494l-3.757 1.445c-.65.25-.842.33-.997.44-.155.11-.29.246-.4.4-.111.156-.191.348-.441.998l-1.445 3.757a.8.8 0 0 1-1.494 0L8.641 14.03c-.25-.65-.33-.842-.44-.997a1.699 1.699 0 0 0-.4-.4c-.156-.111-.348-.191-.998-.441l-3.757-1.445a.8.8 0 0 1 0-1.494l3.757-1.445c.65-.25.842-.33.998-.44a1.7 1.7 0 0 0 .4-.4c.11-.156.19-.349.44-.998l1.445-3.757a.8.8 0 0 1 .747-.513Zm0 3.028-.73 1.9c-.204.53-.356.926-.598 1.266a3.3 3.3 0 0 1-.777.778c-.341.242-.737.394-1.267.598l-1.9.73 1.901.73c.53.204.925.356 1.266.598.3.214.563.477.777.777.242.341.394.736.597 1.266l.731 1.9.731-1.9c.204-.53.355-.925.598-1.266.213-.3.476-.563.777-.777.34-.242.735-.394 1.265-.597l1.9-.731-1.898-.73c-.53-.204-.926-.356-1.267-.598a3.302 3.302 0 0 1-.777-.778c-.243-.34-.395-.736-.598-1.266l-.73-1.9Z"},"children":[]},{"type":"element","tagName":"path","properties":{"d":"M3 14a.29.29 0 0 1 .27.185l.522 1.358c.09.235.12.305.16.36.04.057.088.106.144.146.056.04.126.069.36.159l1.359.522a.29.29 0 0 1 0 .54l-1.358.522c-.235.09-.305.12-.36.16a.616.616 0 0 0-.146.144c-.04.056-.069.126-.159.36l-.522 1.359a.29.29 0 0 1-.54 0l-.522-1.359c-.09-.234-.12-.304-.16-.36a.616.616 0 0 0-.144-.145c-.056-.04-.126-.069-.36-.159L.184 17.27a.29.29 0 0 1 0-.54l1.358-.522c.235-.09.305-.12.36-.16a.614.614 0 0 0 .146-.144c.04-.056.069-.126.159-.36l.522-1.359A.29.29 0 0 1 3 14Z"},"children":[]}],"metadata":""}]},"name":"ai-assistant"};
7
+
8
+ export default AiAssistant;
@@ -0,0 +1,8 @@
1
+
2
+ // This icon file is generated automatically.
3
+
4
+ import { IconDefinition } from '../types';
5
+
6
+ const AiAvatar: IconDefinition = {"icon":{"type":"root","children":[{"type":"element","tagName":"svg","properties":{"width":20,"height":20},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","clipRule":"evenodd","d":"M10 20c5.523 0 10-4.477 10-10S15.523 0 10 0 0 4.477 0 10s4.477 10 10 10Zm0-15.833a.562.562 0 0 1 .525.36l1.016 2.64c.175.457.232.592.309.701.077.11.173.204.281.281.11.078.245.135.701.31l2.64 1.016a.562.562 0 0 1 0 1.05l-2.64 1.015c-.456.176-.591.232-.7.31a1.198 1.198 0 0 0-.281.28c-.078.11-.135.245-.31.702l-1.016 2.64a.562.562 0 0 1-1.05 0l-1.015-2.64c-.176-.457-.232-.592-.31-.7a1.194 1.194 0 0 0-.28-.282c-.11-.078-.245-.134-.702-.31l-2.64-1.015a.562.562 0 0 1 0-1.05l2.64-1.016c.457-.175.592-.232.701-.309.11-.077.204-.172.281-.281.078-.11.134-.245.31-.701l1.015-2.64A.562.562 0 0 1 10 4.166Zm0 2.128-.514 1.34c-.143.37-.25.647-.42.885-.15.211-.334.396-.545.546-.239.17-.516.277-.886.42L6.295 10l1.336.513c.372.143.65.25.89.42.21.15.396.335.546.546.17.24.277.517.42.89L10 13.704l.518-1.345c.141-.368.247-.642.416-.88.15-.21.335-.395.546-.546.24-.17.517-.277.89-.42L13.704 10l-1.338-.515c-.37-.142-.648-.25-.887-.419a2.321 2.321 0 0 1-.546-.546c-.17-.24-.277-.518-.42-.89L10 6.295Z"},"children":[]}],"metadata":""}]},"name":"ai-avatar"};
7
+
8
+ export default AiAvatar;
@@ -3,6 +3,6 @@
3
3
 
4
4
  import { IconDefinition } from '../types';
5
5
 
6
- const ArrowBottom: IconDefinition = {"icon":{"type":"root","children":[{"type":"element","tagName":"svg","properties":{"viewBox":"0 0 20 20"},"children":[{"type":"element","tagName":"path","properties":{"d":"M17.354 8.354a.5.5 0 1 0-.708-.708l.708.708ZM10.5 14.5l-.354.354a.5.5 0 0 0 .708 0L10.5 14.5ZM4.354 7.646a.5.5 0 0 0-.708.708l.708-.708Zm12.292 0-6.5 6.5.708.708 6.5-6.5-.708-.708Zm-5.792 6.5-6.5-6.5-.708.708 6.5 6.5.708-.708Z"},"children":[]}],"metadata":""}]},"name":"arrow-bottom"};
6
+ const ArrowBottom: IconDefinition = {"icon":{"type":"root","children":[{"type":"element","tagName":"svg","properties":{"viewBox":"0 0 20 20"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","clipRule":"evenodd","d":"M5.434 7.434a.8.8 0 0 1 1.132 0L10 10.87l3.434-3.435a.8.8 0 0 1 1.132 1.132l-4 4a.8.8 0 0 1-1.132 0l-4-4a.8.8 0 0 1 0-1.132Z"},"children":[]}],"metadata":""}]},"name":"arrow-bottom"};
7
7
 
8
8
  export default ArrowBottom;
@@ -3,6 +3,6 @@
3
3
 
4
4
  import { IconDefinition } from '../types';
5
5
 
6
- const ArrowCollapse: IconDefinition = {"icon":{"type":"root","children":[{"type":"element","tagName":"svg","properties":{"viewBox":"0 0 20 20"},"children":[{"type":"element","tagName":"path","properties":{"d":"M12.08 9.42a.7.7 0 0 1 0 .99l-3.67 3.67a.7.7 0 0 1-.99 0L7.24 13.9a.7.7 0 0 1 0-.99l2.649-2.642a.5.5 0 0 0 0-.708L7.242 6.919a.7.7 0 0 1-.001-.99l.179-.18a.7.7 0 0 1 .99 0l3.67 3.67Z"},"children":[]}],"metadata":""}]},"name":"arrow-collapse"};
6
+ const ArrowCollapse: IconDefinition = {"icon":{"type":"root","children":[{"type":"element","tagName":"svg","properties":{"viewBox":"0 0 20 20"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","clipRule":"evenodd","d":"M7.434 14.566a.8.8 0 0 1 0-1.132L10.87 10 7.434 6.566a.8.8 0 1 1 1.132-1.132l4 4a.8.8 0 0 1 0 1.132l-4 4a.8.8 0 0 1-1.132 0Z"},"children":[]}],"metadata":""}]},"name":"arrow-collapse"};
7
7
 
8
8
  export default ArrowCollapse;