@fibery/ui-kit 1.36.2 → 1.37.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 (186) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/package.json +1 -1
  3. package/src/action-badge.tsx +5 -4
  4. package/src/actions-menu/actions-menu-confirmation.tsx +1 -12
  5. package/src/actions-menu/actions-menu-item.tsx +1 -1
  6. package/src/antd/ant-modal.tsx +17 -2
  7. package/src/antd/input.tsx +4 -3
  8. package/src/app-icon-with-fallback.tsx +5 -8
  9. package/src/app-icon-wrapper.tsx +4 -4
  10. package/src/appIcons.json +20 -0
  11. package/src/badge.tsx +14 -7
  12. package/src/beta-badge.tsx +12 -8
  13. package/src/button/actions-button-compact.tsx +1 -1
  14. package/src/button/base-button.tsx +2 -1
  15. package/src/button/button.tsx +89 -2
  16. package/src/button/icon-button.tsx +4 -2
  17. package/src/button/select-button.tsx +23 -8
  18. package/src/card-container.tsx +29 -65
  19. package/src/card-hidden-link.tsx +52 -0
  20. package/src/collapsible-section.tsx +13 -3
  21. package/src/color-picker/index.js +65 -60
  22. package/src/color-picker/swatch.tsx +28 -14
  23. package/src/command-menu/index.tsx +2 -2
  24. package/src/count-badge.tsx +57 -0
  25. package/src/date-picker/date-range-input.tsx +1 -1
  26. package/src/date-picker/fake-date-input.tsx +1 -1
  27. package/src/date-picker/relative-date-picker.tsx +1 -1
  28. package/src/date-picker/single-date-input.tsx +1 -1
  29. package/src/date-picker/utils.ts +9 -2
  30. package/src/design-system.ts +72 -41
  31. package/src/emoji-picker/emoji-picker-content-with-color.tsx +3 -9
  32. package/src/emoji-picker/icon-emoji-picker.tsx +75 -69
  33. package/src/emoji-picker/primitives/header.tsx +1 -0
  34. package/src/emoji-picker/primitives/search.tsx +12 -13
  35. package/src/error-alert/error-alert.tsx +19 -7
  36. package/src/field-app-icon.tsx +29 -0
  37. package/src/field-container.tsx +4 -2
  38. package/src/field-icon.tsx +26 -0
  39. package/src/field-type-icon.tsx +82 -0
  40. package/src/guide-link.tsx +4 -3
  41. package/src/hint.tsx +10 -1
  42. package/src/html-styles.ts +15 -13
  43. package/src/icons/ast/AiFiberyBuild.ts +8 -0
  44. package/src/icons/ast/Anthropic.ts +1 -1
  45. package/src/icons/ast/Apple.ts +8 -0
  46. package/src/icons/ast/ArrowBottom.ts +1 -1
  47. package/src/icons/ast/ArrowForward.ts +1 -1
  48. package/src/icons/ast/ArrowLeft.ts +1 -1
  49. package/src/icons/ast/ArrowRight.ts +1 -1
  50. package/src/icons/ast/ArrowTop.ts +1 -1
  51. package/src/icons/ast/Crosshair.ts +8 -0
  52. package/src/icons/ast/Document.ts +8 -0
  53. package/src/icons/ast/EntityCreate.ts +8 -0
  54. package/src/icons/ast/ExpandAll.ts +8 -0
  55. package/src/icons/ast/FiberyDesktopApp.ts +8 -0
  56. package/src/icons/ast/FileDownload.ts +8 -0
  57. package/src/icons/ast/GraduationCapFilled.ts +8 -0
  58. package/src/icons/ast/Home.ts +1 -1
  59. package/src/icons/ast/ImportFilled.ts +8 -0
  60. package/src/icons/ast/IntegrationsFilled.ts +8 -0
  61. package/src/icons/ast/LocationEdit.ts +8 -0
  62. package/src/icons/ast/MessagePlus.ts +8 -0
  63. package/src/icons/ast/OpenAi.ts +1 -1
  64. package/src/icons/ast/RicheditorMarkHighlight.ts +8 -0
  65. package/src/icons/ast/RicheditorMarkStrike.ts +1 -1
  66. package/src/icons/ast/RicheditorMarkUnderline.ts +1 -1
  67. package/src/icons/ast/SpaceApp.ts +8 -0
  68. package/src/icons/ast/SpaceGenerate.ts +8 -0
  69. package/src/icons/ast/SpaceScratch.ts +8 -0
  70. package/src/icons/ast/SpaceTemplate.ts +8 -0
  71. package/src/icons/ast/TableLayout.ts +8 -0
  72. package/src/icons/ast/TemplatesFilled.ts +8 -0
  73. package/src/icons/ast/ThumbsDown.ts +8 -0
  74. package/src/icons/ast/ThumbsUp.ts +8 -0
  75. package/src/icons/ast/ViewDashboard.ts +8 -0
  76. package/src/icons/ast/WarningTriangleFilled.ts +8 -0
  77. package/src/icons/ast/Windows.ts +8 -0
  78. package/src/icons/ast/index.tsx +25 -0
  79. package/src/icons/react/AiFiberyBuild.tsx +13 -0
  80. package/src/icons/react/Apple.tsx +13 -0
  81. package/src/icons/react/Crosshair.tsx +13 -0
  82. package/src/icons/react/Document.tsx +13 -0
  83. package/src/icons/react/EntityCreate.tsx +13 -0
  84. package/src/icons/react/ExpandAll.tsx +13 -0
  85. package/src/icons/react/FiberyDesktopApp.tsx +13 -0
  86. package/src/icons/react/FileDownload.tsx +13 -0
  87. package/src/icons/react/GraduationCapFilled.tsx +13 -0
  88. package/src/icons/react/ImportFilled.tsx +13 -0
  89. package/src/icons/react/IntegrationsFilled.tsx +13 -0
  90. package/src/icons/react/LocationEdit.tsx +13 -0
  91. package/src/icons/react/MessagePlus.tsx +13 -0
  92. package/src/icons/react/RicheditorMarkHighlight.tsx +13 -0
  93. package/src/icons/react/SpaceApp.tsx +13 -0
  94. package/src/icons/react/SpaceGenerate.tsx +13 -0
  95. package/src/icons/react/SpaceScratch.tsx +13 -0
  96. package/src/icons/react/SpaceTemplate.tsx +13 -0
  97. package/src/icons/react/TableLayout.tsx +13 -0
  98. package/src/icons/react/TemplatesFilled.tsx +13 -0
  99. package/src/icons/react/ThumbsDown.tsx +13 -0
  100. package/src/icons/react/ThumbsUp.tsx +13 -0
  101. package/src/icons/react/ViewDashboard.tsx +13 -0
  102. package/src/icons/react/WarningTriangleFilled.tsx +13 -0
  103. package/src/icons/react/Windows.tsx +13 -0
  104. package/src/icons/react/index.tsx +25 -0
  105. package/src/icons/svg/ai-fibery-build.svg +24 -0
  106. package/src/icons/svg/anthropic.svg +2 -14
  107. package/src/icons/svg/apple.svg +4 -0
  108. package/src/icons/svg/arrow-bottom.svg +1 -1
  109. package/src/icons/svg/arrow-forward.svg +1 -1
  110. package/src/icons/svg/arrow-left.svg +1 -1
  111. package/src/icons/svg/arrow-right.svg +1 -1
  112. package/src/icons/svg/arrow-top.svg +1 -1
  113. package/src/icons/svg/crosshair.svg +4 -0
  114. package/src/icons/svg/document.svg +4 -0
  115. package/src/icons/svg/entity-create.svg +3 -0
  116. package/src/icons/svg/expand-all.svg +3 -0
  117. package/src/icons/svg/fibery-desktop-app.svg +101 -0
  118. package/src/icons/svg/file-download.svg +4 -0
  119. package/src/icons/svg/go-to.svg +1 -3
  120. package/src/icons/svg/graduation-cap-filled.svg +4 -0
  121. package/src/icons/svg/home.svg +4 -2
  122. package/src/icons/svg/import-filled.svg +4 -0
  123. package/src/icons/svg/integrations-filled.svg +4 -0
  124. package/src/icons/svg/location-edit.svg +13 -0
  125. package/src/icons/svg/message-plus.svg +4 -0
  126. package/src/icons/svg/open-ai.svg +2 -7
  127. package/src/icons/svg/open-as-page.svg +2 -3
  128. package/src/icons/svg/richeditor/mark/code.svg +4 -5
  129. package/src/icons/svg/richeditor/mark/em.svg +3 -2
  130. package/src/icons/svg/richeditor/mark/highlight.svg +3 -0
  131. package/src/icons/svg/richeditor/mark/strike.svg +3 -2
  132. package/src/icons/svg/richeditor/mark/strong.svg +3 -2
  133. package/src/icons/svg/richeditor/mark/underline.svg +4 -2
  134. package/src/icons/svg/space-app.svg +3 -0
  135. package/src/icons/svg/space-generate.svg +3 -0
  136. package/src/icons/svg/space-scratch.svg +3 -0
  137. package/src/icons/svg/space-template.svg +3 -0
  138. package/src/icons/svg/table-layout.svg +3 -0
  139. package/src/icons/svg/templates-filled.svg +6 -0
  140. package/src/icons/svg/thumbs-down.svg +3 -0
  141. package/src/icons/svg/thumbs-up.svg +3 -0
  142. package/src/icons/svg/view-dashboard.svg +5 -0
  143. package/src/icons/svg/warning-triangle-filled.svg +3 -0
  144. package/src/icons/svg/windows.svg +15 -0
  145. package/src/integration-compact-info-button.tsx +3 -1
  146. package/src/layout-styles.ts +23 -0
  147. package/src/lists/list-row-surface.tsx +2 -1
  148. package/src/loaders.tsx +6 -6
  149. package/src/logo.tsx +16 -9
  150. package/src/mobile-styles.ts +2 -0
  151. package/src/new-badge.tsx +4 -7
  152. package/src/number-input/text-area-auto-sized.tsx +47 -0
  153. package/src/number-input/text-input-auto-sized.tsx +49 -0
  154. package/src/palette.ts +50 -50
  155. package/src/popup/index.tsx +1 -0
  156. package/src/rich-text-embed-error.tsx +2 -2
  157. package/src/select/{custom-select-partials → components}/menu.tsx +13 -7
  158. package/src/select/{custom-select-partials → components}/no-option-message.tsx +0 -1
  159. package/src/select/constants.ts +1 -0
  160. package/src/select/index.tsx +136 -145
  161. package/src/select/select-in-popover.tsx +101 -108
  162. package/src/select/styles.ts +60 -24
  163. package/src/shortcut-badge.tsx +1 -0
  164. package/src/tab-nav/tab-nav.tsx +12 -19
  165. package/src/theme-provider.tsx +9 -1
  166. package/src/tooltip-if-overflown.tsx +9 -3
  167. package/src/unit/index.tsx +9 -1
  168. package/src/unit/loading-unit-value.tsx +1 -0
  169. package/src/unit/maybe-unit-value.tsx +3 -3
  170. package/src/unit/primitive.tsx +58 -42
  171. package/src/unit/styles.ts +8 -12
  172. package/src/unit/types.ts +4 -2
  173. package/src/unit/unit-button-group.tsx +6 -11
  174. package/src/unit/unit-content.tsx +13 -5
  175. package/src/unit/unit-with-title.tsx +6 -1
  176. package/src/unit/unit-with-tooltip.tsx +24 -9
  177. package/src/use-is-phone.tsx +12 -0
  178. package/src/workflow-progress-icon.tsx +1 -1
  179. package/src/number-input/text-area-with-autosize.tsx +0 -91
  180. package/src/number-input/text-inline-input-with-autosize.tsx +0 -60
  181. package/src/use-is-phone.ts +0 -5
  182. /package/src/select/{custom-select-partials → components}/clear-indicator.tsx +0 -0
  183. /package/src/select/{custom-select-partials → components}/drop-down-indicator.tsx +0 -0
  184. /package/src/select/{custom-select-partials → components}/group-heading.tsx +0 -0
  185. /package/src/select/{custom-select-partials → components}/menu-list-virtualized.tsx +0 -0
  186. /package/src/select/{custom-select-partials → components}/option.tsx +0 -0
@@ -27,6 +27,7 @@ export const typeSizes = [30, 24, 18, 16, 14, 12, 10, 8] as const;
27
27
  export const fontWeight = {
28
28
  light: 310, // 300 basic, 310 experiment with a variable Inter
29
29
  regular: 410, // 400 basic, 410 experiment with a variable Inter
30
+ mediumLight: 450,
30
31
  medium: 500,
31
32
  semibold: 600,
32
33
  bold: 700,
@@ -129,7 +130,7 @@ const stateColors = {
129
130
  const brandColors = {
130
131
  red: "#FF5400",
131
132
  green: "#08BD9F",
132
- blue: "#4568FB",
133
+ blue: "#4978D4",
133
134
  } as const;
134
135
 
135
136
  export const getDarkenColor = _.memoize((color: string): string => {
@@ -141,58 +142,55 @@ export const themeColors = {
141
142
  brandColors: [brandColors, brandColors],
142
143
  stateColors: [stateColors, stateColors],
143
144
  colorAI: ["hsla(271, 57%, 61%, 1)", "hsla(272, 43%, 50%, 1)"],
144
- colorBgAI: ["hsla(271, 57%, 61%, 0.1)", "hsla(272, 43%, 50%, 0.1)"],
145
+ colorBgAI: ["hsla(271, 57%, 61%, 0.09)", "hsla(272, 43%, 50%, 0.2)"],
145
146
  colorSubtleBgAI: ["hsla(271, 57%, 61%, 0.05)", "hsla(272, 43%, 50%, 0.1)"],
146
147
 
148
+ // Elevations
149
+ surfaceElevationS: [`0 2px 4px 0 ${blackA.blackA3}`, `0 2px 4px 0 ${whiteA.whiteA3}`],
150
+ surfaceElevationM: [`0 4px 8px 0 ${blackA.blackA5}`, `0 4px 8px 0 ${whiteA.whiteA5}`],
151
+ surfaceElevationL: [`0 8px 12px 0 ${blackA.blackA5}`, `0 8px 12px 0 ${whiteA.whiteA5}`],
152
+
147
153
  // Shadows and effects / Elevation
148
154
  shadow50: [
149
- `
150
- 0px 0px 0px 0.5px ${getOpacities(slate.slate12).opacity5}
151
- `,
155
+ `0px 0px 0px 0.5px ${getOpacities(slate.slate12).opacity5}`,
152
156
  `0px 0px 0px 0.5px ${getOpacities(slateDark.slate12).opacity15}`,
153
157
  ],
154
158
  shadow100: [
155
- `
156
- 0px 1px 4px 0px ${getOpacities(slate.slate12).opacity5}
157
- `,
159
+ `0px 1px 4px 0px ${getOpacities(slate.slate12).opacity5}`,
158
160
  `0px 1px 4px 0px ${getOpacities(slate.slate12).opacity10}`,
159
161
  ],
160
162
  shadow200: [
161
- `
162
- 0px 2px 6px 0px ${getOpacities(slate.slate12).opacity5}
163
- `,
163
+ `0px 2px 6px 0px ${getOpacities(slate.slate12).opacity5}`,
164
164
  `0px 2px 6px 0px ${getOpacities(slate.slate12).opacity10}`,
165
165
  ],
166
166
  shadow300: [
167
- `
168
- 0px 3px 6px -3px ${getOpacities(slate.slate12).opacity10}, 0px 8px 20px -4px ${
167
+ `0px 3px 6px -3px ${getOpacities(slate.slate12).opacity10}, 0px 8px 20px -4px ${
169
168
  getOpacities(slate.slate12).opacity15
170
- }
171
- `,
169
+ }`,
172
170
  `0px 3px 6px -3px ${getOpacities(slate.slate12).opacity10}, 0px 8px 20px -4px ${
173
171
  getOpacities(slate.slate12).opacity15
174
172
  }`,
175
173
  ],
176
174
  shadow400: [
177
- `
178
- 0px 0px 1px 0px ${getOpacities(slate.slate12).opacity20}, 0px 16px 40px 0px ${getOpacities(slate.slate12).opacity15}
179
- `,
175
+ `0px 0px 1px 0px ${getOpacities(slate.slate12).opacity20}, 0px 16px 40px 0px ${
176
+ getOpacities(slate.slate12).opacity15
177
+ }`,
180
178
  `0px 0px 1px 0px ${getOpacities(slate.slate12).opacity20}, 0px 16px 40px 0px ${
181
179
  getOpacities(slate.slate12).opacity15
182
180
  }`,
183
181
  ],
184
182
  shadow500: [
185
- `
186
- 0px 0px 1px 0px ${getOpacities(slate.slate12).opacity20}, 0px 20px 50px 0px ${getOpacities(slate.slate12).opacity15}
187
- `,
183
+ `0px 0px 1px 0px ${getOpacities(slate.slate12).opacity20}, 0px 20px 50px 0px ${
184
+ getOpacities(slate.slate12).opacity15
185
+ }`,
188
186
  `0px 0px 1px 0px ${getOpacities(slate.slate12).opacity20}, 0px 20px 50px 0px ${
189
187
  getOpacities(slate.slate12).opacity15
190
188
  }`,
191
189
  ],
192
190
  shadow600: [
193
- `
194
- 0px 0px 1px 0px ${getOpacities(slate.slate12).opacity20}, 0px 26px 80px 0px ${getOpacities(slate.slate12).opacity20}
195
- `,
191
+ `0px 0px 1px 0px ${getOpacities(slate.slate12).opacity20}, 0px 26px 80px 0px ${
192
+ getOpacities(slate.slate12).opacity20
193
+ }`,
196
194
  `0px 0px 1px 0px ${getOpacities(slate.slate12).opacity20}, 0px 26px 80px 0px ${
197
195
  getOpacities(slate.slate12).opacity20
198
196
  }`,
@@ -213,10 +211,6 @@ export const themeColors = {
213
211
  getOpacities(slateDark.slate1).opacity5
214
212
  }, 0px 10px 26px 0px ${getOpacities(slateDark.slate1).opacity15}`,
215
213
  ],
216
- shadowModal: [
217
- `${getOpacities(slate.slate10).opacity20} 0px 16px 70px`,
218
- `${getOpacities(slateDark.slate1).opacity40} 0px 16px 70px`,
219
- ],
220
214
  shadowSidebar: [
221
215
  `-3px 0px 10px 0px ${getOpacities(slate.slate10).opacity10}`,
222
216
  `-3px 0px 10px 0px ${getOpacities(slateDark.slate1).opacity80}`,
@@ -248,7 +242,7 @@ export const themeColors = {
248
242
  menuSelectedTextColor: [slate.slate2, slate.slate2],
249
243
  menuFooterColor: [getOpacities(whiteA.whiteA0).opacity20, getOpacities(slateDark.slate3).opacity40],
250
244
  menuFooterHoverColor: [getOpacities(whiteA.whiteA0).opacity60, slateDark.slate4],
251
- menuIconColor: [getOpacities(slate.slate11).opacity90, getOpacities(slateDark.slate11).opacity90],
245
+ menuIconColor: [getOpacities(slate.slate12).opacity70, getOpacities(slateDark.slate12).opacity70],
252
246
  menuSelectedIconColor: [getOpacities(slate.slate1).opacity90, getOpacities(slate.slate1).opacity90],
253
247
  textColor: [slateDark.slate5, slate.slate6],
254
248
  textSelectionColor: [getOpacities(blue.blue10).opacity20, getOpacities(blueDark.blue10).opacity40],
@@ -284,8 +278,8 @@ export const themeColors = {
284
278
  entityNodeBgColor: [slate.slate2, slateDark.slate3],
285
279
  shortcutTextColor: [slate.slate9, slateDark.slate11],
286
280
  shortcutBorderColor: [
287
- `0.5px solid ${getOpacities(slate.slate8).opacity50}`,
288
- `0.5px solid ${getOpacities(slateDark.slate10).opacity20}`,
281
+ `1px solid ${getOpacities(slate.slate8).opacity50}`,
282
+ `1px solid ${getOpacities(slateDark.slate10).opacity20}`,
289
283
  ],
290
284
 
291
285
  // Input
@@ -326,7 +320,7 @@ export const themeColors = {
326
320
  buttonPrimaryColor: [indigo.indigo9, indigoDark.indigo9],
327
321
  buttonColor: [slate.slate10, slateDark.slate10],
328
322
  buttonPrimaryTextColor: [slate.slate2, slate.slate6],
329
- checkboxColor: [slate.slate11, slateDark.slate11],
323
+ checkboxColor: [getOpacities(slate.slate12).opacity70, getOpacities(slateDark.slate12).opacity70],
330
324
  colorBorderBlockQuote: [slate.slate11, slateDark.slate11],
331
325
 
332
326
  // Actions menu
@@ -356,8 +350,9 @@ export const themeColors = {
356
350
  ],
357
351
  actionMenuSeparatorColor: [getOpacities(blackA.blackA0).opacity10, getOpacities(whiteA.whiteA0).opacity15],
358
352
  separatorColor: [getOpacities(blackA.blackA0).opacity10, getOpacities(whiteA.whiteA0).opacity10],
353
+ separatorColorDimmed: [getOpacities(blackA.blackA0).opacity5, getOpacities(whiteA.whiteA0).opacity5],
359
354
  separatorBreadcrumbsColor: [slate.slate8, slateDark.slate8],
360
- iconColor: [slate.slate10, slateDark.slate10],
355
+ iconColor: [getOpacities(slate.slate12).opacity70, getOpacities(slateDark.slate12).opacity70],
361
356
  appIconColor: [getOpacities(slate.slate2).opacity90, getOpacities(slate.slate2).opacity70],
362
357
  appIconBgColor: [getOpacities(slate.slate1).opacity90, getOpacities(slate.slate2).opacity50],
363
358
  mentionBgColor: [getOpacities(slate.slate7).opacity30, getOpacities(slateDark.slate7).opacity40],
@@ -458,7 +453,7 @@ export const themeColors = {
458
453
  `0 0 0 1px ${getOpacities(slate.slate10).opacity10}, 0 2px 4px -4px ${getOpacities(slate.slate10).opacity20}`,
459
454
  `0 0 0 1px ${getOpacities(slateDark.slate2).opacity10}, 0 2px 4px -4px ${getOpacities(slateDark.slate2).opacity20}`,
460
455
  ],
461
-
456
+ colorBgSegmentedControl: [getOpacities(slate.slate5).opacity80, getOpacities(slateDark.slate3).opacity80],
462
457
  colorBgMenuHeaderAvatar: [whiteA.whiteA0, slateDark.slate2],
463
458
  shadowMenuHeaderAvatar: [
464
459
  `0px 1px 4px ${getOpacities(slate.slate11).opacity10}, 0 0 0 0.5px ${getOpacities(slate.slate5).opacity50}`,
@@ -476,9 +471,9 @@ export const themeColors = {
476
471
  // :focus
477
472
  colorBgMenuItemFocus: [slate.slate6, slateDark.slate5],
478
473
  // Selected
479
- colorBgMenuItemSelected: [indigo.indigo5, indigoDark.indigo3],
474
+ colorBgMenuItemSelected: [getOpacities(indigo.indigo5).opacity80, indigoDark.indigo3],
480
475
  // :hover
481
- colorBgMenuItemSelectedHover: [indigo.indigo6, indigoDark.indigo5],
476
+ colorBgMenuItemSelectedHover: [getOpacities(indigo.indigo6).opacity70, indigoDark.indigo5],
482
477
  // :focus, :focus:hover
483
478
  colorBgPinnedFieldsLabel: [slate.slate11, slateDark.slate11],
484
479
  colorBgObjectEditorSeparator: [slate.slate12, slateDark.slate12],
@@ -500,7 +495,7 @@ export const themeColors = {
500
495
  unitBgHover: [slate.slate4, slateDark.slate7],
501
496
 
502
497
  // Badges
503
- colorBgBadgeNeutral: [getOpacities(indigo.indigo4).opacity90, getOpacities(indigoDark.indigo4).opacity80],
498
+ colorBgBadgeNeutral: [getOpacities(indigo.indigo5).opacity70, getOpacities(indigoDark.indigo4).opacity80],
504
499
  colorBgBadgeSuccess: [teal.teal5, tealDark.teal5],
505
500
  colorBgBadgeWarning: [yellow.yellow5, yellowDark.yellow5],
506
501
  colorBgBadgeError: [red.red5, redDark.red5],
@@ -532,8 +527,8 @@ export const themeColors = {
532
527
  appCardHoverColor: [getOpacities(slate.slate1).opacity95, slateDark.slate2],
533
528
  modalBg: [getOpacities(slate.slate11).opacity20, getOpacities(slateDark.slate2).opacity50],
534
529
  modalContentBg: [whiteA.whiteA0, slateDark.slate3],
535
- progressIconBg: [getOpacities(slate.slate8).opacity50, getOpacities(slateDark.slate10).opacity20],
536
- progressIconFill: [slate.slate11, slateDark.slate11],
530
+ progressIconBg: [blackA.blackA7, whiteA.whiteA7],
531
+ progressIconFill: [blackA.blackA11, whiteA.whiteA11],
537
532
  selectedColorBorder: [getOpacities(slate.slate6).opacity25, getOpacities(slate.slate6).opacity25],
538
533
  formBg: [slate.slate2, slateDark.slate2],
539
534
  formHeaderShadow: [
@@ -573,6 +568,9 @@ export const themeColors = {
573
568
  colorBorderRichTextMedia: [blackA.blackA7, blackA.blackA7],
574
569
  richTextTableBorder: [blackA.blackA5, whiteA.whiteA7],
575
570
 
571
+ // Drag and drop
572
+ colorBgDropLine: [indigo.indigo7, indigoDark.indigo7],
573
+
576
574
  // Grid
577
575
  gridHeaderBgColor: [slate.slate2, slateDark.slate3],
578
576
  gridHeaderHoverBgColor: [slate.slate3, slateDark.slate4],
@@ -594,7 +592,8 @@ export const themeColors = {
594
592
  timelineDependencyOverlapHoverBgColor: [red.red11, redDark.red11],
595
593
  timelineCellBgColor: [slate.slate1, slateDark.slate1],
596
594
  timelineCellWeekendBgColor: [slate.slate2, slateDark.slate2],
597
- timelineCellTodayBgColor: [indigo.indigo2, indigoDark.indigo2],
595
+ timelineCellTodayBgColor: [indigo.indigo4, indigoDark.indigo2],
596
+ timelineCreateEntityPlaceholderBgColor: [getOpacities(slate.slate11).opacity20, slateDark.slate7],
598
597
 
599
598
  // #region buttons
600
599
  // solid
@@ -699,7 +698,7 @@ export const themeColors = {
699
698
  colorBgTabHover: [getOpacities(slate.slate11).opacity10, getOpacities(slateDark.slate11).opacity10],
700
699
 
701
700
  // Chat
702
- colorBgMessageContainer: [slate.slate3, slateDark.slate6],
701
+ colorBgMessageContainer: [blackA.blackA3, slateDark.slate6],
703
702
  colorBgMessageContainerHover: [slate.slate2, slateDark.slate3],
704
703
  colorBgEntityAvatarDefault: [indigo.indigo1, indigoDark.indigo1],
705
704
  colorBgEntityAvatarHover: [indigo.indigo3, indigoDark.indigo3],
@@ -912,6 +911,10 @@ export const getEnumBackgroundColor = _.memoize(
912
911
  (themeMode, color) => `${themeMode}-${color}`
913
912
  );
914
913
 
914
+ export const getEnumTextColor = (color: string) => {
915
+ return `color-mix(in srgb, ${color} 25%, ${themeVars.textColor} 75%)`;
916
+ };
917
+
915
918
  // TODO: fix color for light2. It should same as 'dark' only on dark menu but same as 'light' on other parts of application
916
919
  export const getAppIconBackgroundColor = (mode: ThemeMode, color: string) =>
917
920
  getThemeValue(mode, {
@@ -976,6 +979,8 @@ export const spaceNestedTreeInterval = 0;
976
979
  export const layout = {
977
980
  logoSize: 18,
978
981
  menuDefaultWidth: 243,
982
+ fiberyAiSidebarDefaultWidth: 420,
983
+ fiberyAiSidebarMaxWidth: 920,
979
984
  desktopToolbarHeight: 32,
980
985
  desktopMenuMinWidth: 240,
981
986
  collapsedMenuMinWidth: 47,
@@ -991,7 +996,9 @@ export const layout = {
991
996
  enumItemHeight: 32,
992
997
  menuItemHeight: 32,
993
998
  newMenuItemHeight: 28, // I'm ok
999
+ mobileSidebarMenuItemHeight: 44,
994
1000
  newMenuIconSize: 18,
1001
+ mobileSidebarIconSize: 20,
995
1002
  viewHeaderHeight: space.s12 * 7,
996
1003
  viewHeaderCompactHeight: 52,
997
1004
  columnMinWidth: 240,
@@ -1019,6 +1026,16 @@ export const layout = {
1019
1026
  unitHeight: 18,
1020
1027
  } as const;
1021
1028
 
1029
+ export const sidebarMenuItemHeightVar = `--${varPrefix}-layout-sidebarMenuItemHeight`;
1030
+ export const sidebarMenuIconSizeVar = `--${varPrefix}-layout-sidebarMenuIconSize`;
1031
+ export const listRowSurfaceFontSizeVar = `--${varPrefix}-layout-listRowSurfaceFontSize`;
1032
+
1033
+ export const layoutVars = {
1034
+ sidebarMenuItemHeight: `var(${sidebarMenuItemHeightVar})`,
1035
+ sidebarMenuIconSize: `var(${sidebarMenuIconSizeVar})`,
1036
+ listRowSurfaceFontSize: `var(${listRowSurfaceFontSizeVar})`,
1037
+ };
1038
+
1022
1039
  export const border = {
1023
1040
  radius0: 0,
1024
1041
  radius1: 1,
@@ -1197,6 +1214,13 @@ export const textStyles = {
1197
1214
  fontWeight: fontWeight.regular,
1198
1215
  color: themeVars.textColor,
1199
1216
  },
1217
+ heading8: {
1218
+ fontFamily,
1219
+ fontSize: typeSizes[6],
1220
+ lineHeight: lineHeight.heading,
1221
+ fontWeight: fontWeight.medium,
1222
+ color: themeVars.textColor,
1223
+ },
1200
1224
  big: {
1201
1225
  fontFamily,
1202
1226
  fontSize: typeSizes[3],
@@ -1268,4 +1292,11 @@ export const textStyles = {
1268
1292
  fontFeatureSettings: '"tnum" 0',
1269
1293
  },
1270
1294
  },
1295
+ inherit: {
1296
+ fontFamily: "inherit",
1297
+ fontSize: "inherit",
1298
+ lineHeight: "inherit",
1299
+ fontWeight: "inherit",
1300
+ color: "inherit",
1301
+ },
1271
1302
  } as const;
@@ -1,17 +1,15 @@
1
1
  import {css} from "@linaria/core";
2
2
  import {useRef, useState} from "react";
3
- import {IconButton} from "../button/icon-button";
4
3
  import {CollapsibleContent, CollapsibleRoot, CollapsibleTrigger} from "../collapsible";
5
4
  import {ColorPicker} from "../color-picker";
6
- import {getIconColor, space} from "../design-system";
7
- import ColorCoding from "../icons/react/ColorCoding";
8
- import ColorCodingFilled from "../icons/react/ColorCodingFilled";
5
+ import {getIconColor, space, themeVars} from "../design-system";
9
6
  import {useThemeMode} from "../theme-provider";
10
7
  import {Tooltip} from "../tooltip";
11
8
  import {$TSFixMe} from "../tsfixme";
12
9
  import {EmojiPickerGrid, type EmojiPickerGridHandle, EmojiPickerGridProps} from "./primitives/grid";
13
10
  import {EmojiPickerHeader} from "./primitives/header";
14
11
  import {EmojiPickerSearch} from "./primitives/search";
12
+ import {Swatch} from "../color-picker/swatch";
15
13
 
16
14
  const colorPickerWrapperCss = css`
17
15
  padding-top: ${space.s12}px;
@@ -23,16 +21,12 @@ const ColorPickerCollapsibleTrigger: React.FC<ColorPickerCollapsibleTrigger> = (
23
21
  const themeMode = useThemeMode();
24
22
  const iconColor = color ? getIconColor(themeMode, color) : undefined;
25
23
 
26
- const Icon = opened ? ColorCoding : ColorCodingFilled;
27
-
28
24
  const label = opened ? "Hide color picker" : "Show color picker";
29
25
 
30
26
  return (
31
27
  <CollapsibleTrigger asChild>
32
28
  <Tooltip title={label}>
33
- <IconButton data-testid="emoji-picker-color-trigger" size="small">
34
- <Icon color={iconColor} />
35
- </IconButton>
29
+ <Swatch data-testid="emoji-picker-color-trigger" size="small" color={iconColor || themeVars.iconColor} />
36
30
  </Tooltip>
37
31
  </CollapsibleTrigger>
38
32
  );
@@ -1,22 +1,18 @@
1
1
  import {css} from "@linaria/core";
2
2
  import {compact} from "lodash";
3
- import {AntTabs} from "../antd/Tabs";
4
3
  import {Button} from "../button/button";
5
- import {space, textStyles} from "../design-system";
4
+ import {colors, space} from "../design-system";
6
5
  import EmojiDelete from "../icons/react/EmojiDelete";
7
6
  import {$TSFixMe} from "../tsfixme";
8
7
  import {AppIconPicker, AppIconPickerProps} from "./app-icon-picker";
9
8
  import {EmojiPicker, EmojiPickerProps} from "./emoji-picker";
9
+ import {TabNavItem, TabNavLink, TabNavList, TabNavRoot} from "../tab-nav/tab-nav";
10
+ import {useState} from "react";
10
11
 
11
- const TabHeader: React.FC<React.PropsWithChildren> = ({children}) => (
12
- <div
13
- className={css`
14
- ${textStyles.heading5}
15
- `}
16
- >
17
- {children}
18
- </div>
19
- );
12
+ const tabNavRootStyle = css`
13
+ padding: ${space.s4}px ${space.s12}px 0 ${space.s12}px;
14
+ box-shadow: inset 0 -1px ${colors.shades.opacity5};
15
+ `;
20
16
 
21
17
  type TabKey = "icons" | "emojis";
22
18
 
@@ -49,65 +45,75 @@ export const IconEmojiPicker: React.FC<IconEmojiPickerProps> = ({
49
45
  color,
50
46
  getHoverColor,
51
47
  }) => {
48
+ const items = compact([
49
+ onEmojiSelect && {
50
+ key: "emojis" as const,
51
+ label: "Emojis",
52
+ children: (
53
+ <>
54
+ <EmojiPicker
55
+ emojiSize={emojiSize}
56
+ color={color}
57
+ onColorSelect={showColorPickerOnTabs.includes("emojis") ? onColorSelect : undefined}
58
+ onCustomCategorySettings={onCustomEmojisSettings}
59
+ onAddCustomEmoji={onCreateClick}
60
+ getHoverColor={getHoverColor}
61
+ onSelect={onEmojiSelect}
62
+ showSkinTones
63
+ />
64
+ </>
65
+ ),
66
+ },
67
+ onIconSelect && {
68
+ key: "icons" as const,
69
+ label: "Icons",
70
+ children: (
71
+ <AppIconPicker
72
+ color={color}
73
+ onColorSelect={showColorPickerOnTabs.includes("icons") ? onColorSelect : undefined}
74
+ getHoverColor={getHoverColor}
75
+ onSelect={onIconSelect}
76
+ />
77
+ ),
78
+ },
79
+ ]);
80
+
81
+ const firstTab = items[0];
82
+ const [activeTab, setActiveTab] = useState(defaultTab || firstTab?.key);
83
+
52
84
  return (
53
- <AntTabs
54
- wrapClassName={css`
55
- height: 100%;
56
- & .ant-tabs,
57
- & .ant-tabs-content,
58
- & .ant-tabs-tabpane,
59
- & .ant-tabs-content-holder {
60
- height: 100%;
61
- }
85
+ <div
86
+ className={css`
87
+ display: flex;
88
+ flex-direction: column;
62
89
  `}
63
- animated={false}
64
- destroyInactiveTabPane
65
- defaultActiveKey={defaultTab}
66
- items={compact([
67
- onEmojiSelect && {
68
- key: "emojis",
69
- label: <TabHeader>Emojis</TabHeader>,
70
- children: (
71
- <>
72
- <EmojiPicker
73
- emojiSize={emojiSize}
74
- color={color}
75
- onColorSelect={showColorPickerOnTabs.includes("emojis") ? onColorSelect : undefined}
76
- onCustomCategorySettings={onCustomEmojisSettings}
77
- onAddCustomEmoji={onCreateClick}
78
- getHoverColor={getHoverColor}
79
- onSelect={onEmojiSelect}
80
- showSkinTones
81
- />
82
- </>
83
- ),
84
- },
85
- onIconSelect && {
86
- key: "icons",
87
- label: <TabHeader>Icons</TabHeader>,
88
- children: (
89
- <AppIconPicker
90
- color={color}
91
- onColorSelect={showColorPickerOnTabs.includes("icons") ? onColorSelect : undefined}
92
- getHoverColor={getHoverColor}
93
- onSelect={onIconSelect}
94
- />
95
- ),
96
- },
97
- ])}
98
- tabBarExtraContent={
99
- onReset ? (
100
- <div
101
- className={css`
102
- padding-right: ${space.s12}px;
103
- `}
104
- >
105
- <Button variant="outline" color="neutral" iconStart={<EmojiDelete />} size={"small"} onClick={onReset}>
106
- {resetLabel}
107
- </Button>
108
- </div>
109
- ) : null
110
- }
111
- />
90
+ >
91
+ <TabNavRoot className={tabNavRootStyle}>
92
+ <div
93
+ className={css`
94
+ display: flex;
95
+ justify-content: space-between;
96
+ `}
97
+ >
98
+ <TabNavList>
99
+ {items.map((item) => {
100
+ return (
101
+ <TabNavLink key={item.key} active={item.key === activeTab} onSelect={() => setActiveTab(item.key)}>
102
+ {item.label}
103
+ </TabNavLink>
104
+ );
105
+ })}
106
+ </TabNavList>
107
+ {onReset && (
108
+ <TabNavItem>
109
+ <Button size="small" variant="ghost" color="neutral" iconStart={<EmojiDelete />} onClick={onReset}>
110
+ {resetLabel}
111
+ </Button>
112
+ </TabNavItem>
113
+ )}
114
+ </div>
115
+ </TabNavRoot>
116
+ {items.find((item) => item.key === activeTab)?.children}
117
+ </div>
112
118
  );
113
119
  };
@@ -6,6 +6,7 @@ const pickerHeader = css`
6
6
  padding: ${space.s12}px ${contentHorizontalPadding}px ${space.s6}px ${contentHorizontalPadding}px;
7
7
  position: relative;
8
8
  `;
9
+
9
10
  export const EmojiPickerHeader: React.FC<React.PropsWithChildren> = ({children}) => {
10
11
  return <div className={pickerHeader}>{children}</div>;
11
12
  };
@@ -4,7 +4,6 @@ import {css, cx} from "@linaria/core";
4
4
  import {startTransition, useId, useRef} from "react";
5
5
  import {IconButton} from "../../button/icon-button";
6
6
  import {border, space, textStyles, themeVars} from "../../design-system";
7
- import Close from "../../icons/react/Close";
8
7
  import Search from "../../icons/react/Search";
9
8
  import {useEmojiDataStore} from "../stores/emoji-data-store";
10
9
  import type {EmojiPickerGridHandle} from "./grid";
@@ -12,6 +11,7 @@ import {useEmojiPreview, useSetEmojiPreview} from "./preview-provider";
12
11
  import {useEmojiPickerCtx, useEmojiPickerI18N} from "./root";
13
12
  import {useFoundEmojis, useSetFoundEmojis} from "./search-provider";
14
13
  import {useEmojiSkin} from "./skin-provider";
14
+ import ClearInputFilled from "../../icons/react/ClearInputFilled";
15
15
 
16
16
  const searchCss = css`
17
17
  ${textStyles.regular}
@@ -24,8 +24,8 @@ const searchCss = css`
24
24
 
25
25
  display: flex;
26
26
  align-items: center;
27
- padding-left: ${space.s8}px;
28
- gap: ${space.s2}px;
27
+ padding: 0 ${space.s4}px;
28
+ gap: ${space.s4}px;
29
29
 
30
30
  /* For screenreaders only, via https://stackoverflow.com/a/19758620 */
31
31
  & .sr-only {
@@ -64,7 +64,6 @@ const searchIconCss = css`
64
64
  const extraActionSlotCss = css`
65
65
  background-color: var(--fibery-emoji-hover-color, ${themeVars.inputCopyBgColor});
66
66
  border-radius: ${border.radius5}px;
67
- margin-right: ${space.s4}px;
68
67
  `;
69
68
 
70
69
  export type EmojiPickerSearchProps = {
@@ -157,15 +156,9 @@ export const EmojiPickerSearch: React.FC<EmojiPickerSearchProps> = ({
157
156
 
158
157
  return (
159
158
  <section className={cx(searchCss, className)} aria-label={i18n.search}>
160
- {foundEmojis ? (
161
- <IconButton size="small" onClick={clearSearch}>
162
- <Close />
163
- </IconButton>
164
- ) : (
165
- <span className={searchIconCss}>
166
- <Search iconSize={16} />
167
- </span>
168
- )}
159
+ <span className={searchIconCss}>
160
+ <Search iconSize={16} />
161
+ </span>
169
162
 
170
163
  <input
171
164
  ref={setRefs}
@@ -189,6 +182,12 @@ export const EmojiPickerSearch: React.FC<EmojiPickerSearchProps> = ({
189
182
  {i18n.search}
190
183
  </label>
191
184
 
185
+ {foundEmojis && (
186
+ <IconButton size="small" onClick={clearSearch}>
187
+ <ClearInputFilled />
188
+ </IconButton>
189
+ )}
190
+
192
191
  {extraAction ? <div className={extraActionSlotCss}>{extraAction}</div> : null}
193
192
  </section>
194
193
  );
@@ -1,16 +1,16 @@
1
1
  import {css} from "@linaria/core";
2
2
  import {IconButton} from "../button/icon-button";
3
- import {border, layout, space, textStyles, themeVars} from "../design-system";
3
+ import {border, fontWeight, layout, space, textStyles, themeVars, typeSizes} from "../design-system";
4
4
  import CloseIcon from "../icons/react/Close";
5
- import WarningIcon from "../icons/react/WarningTriangle";
5
+ import WarningFilledIcon from "../icons/react/WarningTriangleFilled";
6
6
  import {useTheme} from "../theme-provider";
7
7
  import {ErrorAlertActionElement} from "./error-alert-action";
8
8
 
9
9
  const errorAlert = css`
10
10
  background-color: ${themeVars.errorBgColor};
11
- padding: ${space.s8}px ${space.s8}px ${space.s8}px ${space.s12}px;
11
+ padding: ${space.s12}px;
12
12
  min-height: ${layout.itemHeight}px;
13
- border-radius: ${border.radius6}px;
13
+ border-radius: ${border.radius8}px;
14
14
  display: flex;
15
15
  gap: ${space.s8}px;
16
16
  align-items: center;
@@ -22,14 +22,26 @@ const infoStyle = css`
22
22
 
23
23
  display: flex;
24
24
  flex-direction: column;
25
+ gap: ${space.s4}px;
26
+ padding: 0 ${space.s4}px;
27
+ justify-content: center;
28
+ align-items: flex-start;
25
29
  `;
26
30
 
27
31
  const messageStyle = css`
28
- ${textStyles.regular};
32
+ ${{
33
+ ...textStyles.regular,
34
+ fontSize: typeSizes[5],
35
+ fontWeight: fontWeight.medium,
36
+ color: themeVars.errorTextColor,
37
+ }};
29
38
  `;
30
39
 
31
40
  const descriptionStyle = css`
32
- ${textStyles.small};
41
+ ${{
42
+ ...textStyles.small,
43
+ color: themeVars.errorTextColor,
44
+ }};
33
45
  `;
34
46
 
35
47
  export type ErrorAlertProps = {
@@ -43,7 +55,7 @@ export const ErrorAlert: React.FC<ErrorAlertProps> = ({message, description, act
43
55
 
44
56
  return (
45
57
  <div className={errorAlert}>
46
- <WarningIcon color={theme.errorButtonColor} iconSize={16} containerSize={16} />
58
+ <WarningFilledIcon color={theme.errorButtonColor} iconSize={16} containerSize={16} />
47
59
  <div className={infoStyle}>
48
60
  <span className={messageStyle}>{message}</span>
49
61
  {description ? <span className={descriptionStyle}>{description}</span> : null}
@@ -0,0 +1,29 @@
1
+ import {AppIconWithFallback} from "./app-icon-with-fallback";
2
+
3
+ const appIconPrefix = ":app-icon/";
4
+
5
+ export const makeFieldAppIcon = (iconName: string) => appIconPrefix + iconName;
6
+
7
+ export const isAppIcon = (name: string) => name.startsWith(appIconPrefix);
8
+ export const getAppIconName = (appIconName: string) => appIconName.slice(appIconPrefix.length);
9
+
10
+ export function FieldAppIcon({
11
+ iconName,
12
+ color,
13
+ containerSize,
14
+ iconSize,
15
+ }: {
16
+ iconName: string;
17
+ color?: string;
18
+ containerSize?: number;
19
+ iconSize?: number;
20
+ }) {
21
+ return (
22
+ <AppIconWithFallback
23
+ name={getAppIconName(iconName)}
24
+ color={color}
25
+ containerSize={containerSize}
26
+ iconSize={iconSize}
27
+ />
28
+ );
29
+ }
@@ -21,10 +21,11 @@ type Props = {
21
21
  collapsible?: boolean;
22
22
  collapsed?: boolean;
23
23
  onCollapseChange?: (collapsed: boolean) => void;
24
+ badge?: ReactNode;
24
25
  children: ReactNode;
25
26
  };
26
27
 
27
- export const FieldContainer = ({label, collapsible = false, collapsed, onCollapseChange, children}: Props) => {
28
+ export const FieldContainer = ({label, collapsible = false, collapsed, onCollapseChange, badge, children}: Props) => {
28
29
  return (
29
30
  <CollapsibleSection
30
31
  label={label ? <div className={labelStyle}>{label}</div> : undefined}
@@ -32,6 +33,7 @@ export const FieldContainer = ({label, collapsible = false, collapsed, onCollaps
32
33
  collapsed={collapsed}
33
34
  collapsedDefault={true}
34
35
  onCollapsedChange={onCollapseChange}
36
+ badge={badge}
35
37
  >
36
38
  <div
37
39
  className={
@@ -192,7 +194,7 @@ const checkboxFieldContainerStyle = css`
192
194
  const checkboxFieldLabelStyle = css`
193
195
  ${{
194
196
  ...textStyles.heading6,
195
- paddingTop: space.s2,
197
+ paddingTop: space.s1,
196
198
  }}
197
199
  `;
198
200