@fibery/ui-kit 1.34.8 → 1.36.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 (610) hide show
  1. package/.eslintignore +3 -0
  2. package/.eslintrc +14 -0
  3. package/CHANGELOG.md +586 -0
  4. package/babel.config.js +3 -0
  5. package/config/jest/testFrameworkSetup.js +1 -0
  6. package/package.json +7 -41
  7. package/scripts/generate-icons.mjs +116 -0
  8. package/src/__mocks__/createInlineTheme.js +3 -0
  9. package/src/__mocks__/styleMock.js +1 -0
  10. package/src/a11y-color.ts +1 -1
  11. package/src/action-badge.tsx +63 -0
  12. package/src/actions-menu/actions-menu-sub-menu.tsx +3 -0
  13. package/src/actions-panel.tsx +50 -0
  14. package/src/ai/max-tokens.tsx +42 -0
  15. package/src/ai/model.tsx +79 -0
  16. package/src/ai/temperature.tsx +75 -0
  17. package/src/animated-height-container.tsx +82 -0
  18. package/src/animated-number.tsx +38 -0
  19. package/src/animations.tsx +62 -0
  20. package/src/antd/AutoComplete.d.ts +1 -0
  21. package/src/antd/AutoComplete.js +34 -0
  22. package/src/antd/Tabs.d.ts +5 -0
  23. package/src/antd/Tabs.js +58 -0
  24. package/src/antd/ant-modal.tsx +11 -0
  25. package/src/antd/ant-upload.tsx +73 -0
  26. package/src/antd/auto-width-transparent-textarea.tsx +56 -0
  27. package/src/antd/get-wrapper.tsx +11 -0
  28. package/src/antd/index.tsx +4 -0
  29. package/src/antd/input-number.tsx +51 -0
  30. package/src/antd/input.tsx +56 -0
  31. package/src/antd/styles.ts +6 -6
  32. package/src/antd/utils.tsx +43 -0
  33. package/src/app-icon-with-fallback.tsx +147 -0
  34. package/src/app-icon-wrapper.tsx +44 -0
  35. package/src/app-icon.tsx +52 -0
  36. package/src/app-mode.tsx +52 -0
  37. package/src/appIcons.json +13066 -0
  38. package/src/avatar.tsx +262 -0
  39. package/src/axis-header.tsx +160 -0
  40. package/src/badge.tsx +39 -0
  41. package/src/board-table-loader.tsx +106 -0
  42. package/src/box.tsx +444 -0
  43. package/src/breakpoints.tsx +59 -0
  44. package/src/button/base-button.tsx +1 -1
  45. package/src/button/icon-button.tsx +2 -2
  46. package/src/card-container.tsx +483 -0
  47. package/src/checkbox-multi-select.tsx +71 -0
  48. package/src/checkbox.tsx +232 -0
  49. package/src/collapsible/index.tsx +43 -0
  50. package/src/collapsible-section.tsx +69 -0
  51. package/src/color-picker/ColorPickerOrLoader.js +23 -0
  52. package/src/color-picker/SliderPointer.js +14 -0
  53. package/src/color-picker/index.js +118 -0
  54. package/src/color-picker/swatch.tsx +85 -0
  55. package/src/command-menu/index.tsx +176 -0
  56. package/src/comment.tsx +218 -0
  57. package/src/context-menu/index.tsx +134 -0
  58. package/src/copy-to-clipboard.ts +1 -0
  59. package/src/country-selector.tsx +29 -0
  60. package/src/date-picker/autocomplete.tsx +74 -0
  61. package/src/date-picker/constants.ts +3 -0
  62. package/src/date-picker/contexts.ts +7 -0
  63. package/src/date-picker/date-range-input.tsx +346 -0
  64. package/src/date-picker/date-range-picker-popup-content.tsx +190 -0
  65. package/src/date-picker/date-range-picker.tsx +124 -0
  66. package/src/date-picker/day-with-start-end-buttons.tsx +171 -0
  67. package/src/date-picker/fake-date-input.tsx +40 -0
  68. package/src/date-picker/get-weekends-for-month.ts +7 -0
  69. package/src/date-picker/rc-input-types.ts +11 -0
  70. package/src/date-picker/relative-date-picker.tsx +141 -0
  71. package/src/date-picker/single-date-input.tsx +239 -0
  72. package/src/date-picker/single-date-picker-popup-content.tsx +90 -0
  73. package/src/date-picker/single-date-picker.tsx +243 -0
  74. package/src/date-picker/styles.ts +262 -0
  75. package/src/date-picker/types.ts +56 -0
  76. package/src/date-picker/utils.ts +110 -0
  77. package/src/date-picker/with-popup-control.tsx +61 -0
  78. package/src/day-select/day-select.tsx +94 -0
  79. package/src/day-select/iso-week-day-select.tsx +15 -0
  80. package/src/day-select/mount-day-select.tsx +11 -0
  81. package/src/day-select/week-day-select.test.tsx +48 -0
  82. package/src/day-select/week-day-select.tsx +42 -0
  83. package/src/delayed.tsx +26 -0
  84. package/src/design-system.test.ts +24 -0
  85. package/src/design-system.ts +77 -39
  86. package/src/dnd.tsx +55 -0
  87. package/src/dropdown-menu/index.tsx +2 -3
  88. package/src/emoji-picker/app-icon-picker.tsx +1 -0
  89. package/src/emoji-picker/primitives/emoji.tsx +4 -2
  90. package/src/emoji-picker/primitives/render-config-provider.tsx +12 -0
  91. package/src/emoji.tsx +30 -0
  92. package/src/empty-state/empty-state-action.tsx +3 -0
  93. package/src/empty-state/empty-state-emoji.tsx +20 -0
  94. package/src/empty-state/empty-state.tsx +80 -0
  95. package/src/empty-value.tsx +21 -0
  96. package/src/errors.ts +29 -0
  97. package/src/favorites-icon.tsx +87 -0
  98. package/src/features.tsx +10 -0
  99. package/src/fibermoji-placeholder.tsx +180 -0
  100. package/src/field-container.tsx +213 -0
  101. package/src/file-item.tsx +151 -0
  102. package/src/form-utils.ts +7 -0
  103. package/src/format-date-from-now.ts +33 -0
  104. package/src/full-fibery-logo.tsx +26 -0
  105. package/src/get-trigger-node-popup-container.ts +7 -0
  106. package/src/guide-link.tsx +24 -0
  107. package/src/header-layout.tsx +33 -0
  108. package/src/hint.tsx +47 -0
  109. package/src/hoverable-via-display.tsx +29 -0
  110. package/src/hoverable.tsx +53 -0
  111. package/src/html-styles.ts +720 -0
  112. package/src/icons/ast/AccessTemplate.ts +8 -0
  113. package/src/icons/ast/AddDatabase.ts +8 -0
  114. package/src/icons/ast/AddIntegration.ts +8 -0
  115. package/src/icons/ast/AiSearch.ts +8 -0
  116. package/src/icons/ast/Asterisk.ts +8 -0
  117. package/src/icons/ast/Clean.ts +8 -0
  118. package/src/icons/ast/Copy.ts +1 -1
  119. package/src/icons/ast/CreditsFilled.ts +8 -0
  120. package/src/icons/ast/CrossCircle.ts +8 -0
  121. package/src/icons/ast/Duplicate.ts +1 -1
  122. package/src/icons/ast/Gift.ts +8 -0
  123. package/src/icons/ast/LevelPlus.ts +8 -0
  124. package/src/icons/ast/Markdown.ts +8 -0
  125. package/src/icons/ast/PeopleCheck.ts +8 -0
  126. package/src/icons/ast/PresentPlay.ts +8 -0
  127. package/src/icons/ast/PresentStop.ts +8 -0
  128. package/src/icons/ast/ResetPassword.ts +8 -0
  129. package/src/icons/ast/SettingsOff.ts +8 -0
  130. package/src/icons/ast/Template.ts +8 -0
  131. package/src/icons/ast/UserCheck.ts +8 -0
  132. package/src/icons/ast/UserGroupRemove.ts +8 -0
  133. package/src/icons/ast/UserX.ts +8 -0
  134. package/src/icons/ast/ViewGantt.ts +8 -0
  135. package/src/icons/ast/Views.ts +1 -1
  136. package/src/icons/ast/index.tsx +21 -0
  137. package/src/icons/react/AccessTemplate.tsx +13 -0
  138. package/src/icons/react/AddDatabase.tsx +13 -0
  139. package/src/icons/react/AddIntegration.tsx +13 -0
  140. package/src/icons/react/AiSearch.tsx +13 -0
  141. package/src/icons/react/Asterisk.tsx +13 -0
  142. package/src/icons/react/Clean.tsx +13 -0
  143. package/src/icons/react/CreditsFilled.tsx +13 -0
  144. package/src/icons/react/CrossCircle.tsx +13 -0
  145. package/src/icons/react/Gift.tsx +13 -0
  146. package/src/icons/react/LevelPlus.tsx +13 -0
  147. package/src/icons/react/Markdown.tsx +13 -0
  148. package/src/icons/react/PeopleCheck.tsx +13 -0
  149. package/src/icons/react/PresentPlay.tsx +13 -0
  150. package/src/icons/react/PresentStop.tsx +13 -0
  151. package/src/icons/react/ResetPassword.tsx +13 -0
  152. package/src/icons/react/SettingsOff.tsx +13 -0
  153. package/src/icons/react/Template.tsx +13 -0
  154. package/src/icons/react/UserCheck.tsx +13 -0
  155. package/src/icons/react/UserGroupRemove.tsx +13 -0
  156. package/src/icons/react/UserX.tsx +13 -0
  157. package/src/icons/react/ViewGantt.tsx +13 -0
  158. package/src/icons/react/index.tsx +21 -0
  159. package/src/icons/svg/abort.svg +3 -0
  160. package/src/icons/svg/access-template.svg +4 -0
  161. package/src/icons/svg/activity-log.svg +4 -0
  162. package/src/icons/svg/activity.svg +4 -0
  163. package/src/icons/svg/add-after.svg +4 -0
  164. package/src/icons/svg/add-before.svg +4 -0
  165. package/src/icons/svg/add-compact.svg +2 -0
  166. package/src/icons/svg/add-database.svg +3 -0
  167. package/src/icons/svg/add-group.svg +4 -0
  168. package/src/icons/svg/add-integration.svg +3 -0
  169. package/src/icons/svg/add-reactions.svg +8 -0
  170. package/src/icons/svg/add.svg +2 -0
  171. package/src/icons/svg/ai-assistant.svg +3 -0
  172. package/src/icons/svg/ai-avatar.svg +3 -0
  173. package/src/icons/svg/ai-search.svg +3 -0
  174. package/src/icons/svg/alert-triangle.svg +3 -0
  175. package/src/icons/svg/app-details.svg +7 -0
  176. package/src/icons/svg/app-store-one-color.svg +4 -0
  177. package/src/icons/svg/app-store.svg +4 -0
  178. package/src/icons/svg/app-templates.svg +7 -0
  179. package/src/icons/svg/app-webhooks.svg +2 -0
  180. package/src/icons/svg/app-wiki.svg +2 -0
  181. package/src/icons/svg/app.svg +2 -0
  182. package/src/icons/svg/appearance-auto.svg +3 -0
  183. package/src/icons/svg/appearance-dark.svg +3 -0
  184. package/src/icons/svg/appearance-light.svg +3 -0
  185. package/src/icons/svg/arrow-bar-left.svg +4 -0
  186. package/src/icons/svg/arrow-bar-right.svg +4 -0
  187. package/src/icons/svg/arrow-bottom.svg +3 -0
  188. package/src/icons/svg/arrow-collapse-vertical.svg +3 -0
  189. package/src/icons/svg/arrow-collapse.svg +3 -0
  190. package/src/icons/svg/arrow-forward.svg +3 -0
  191. package/src/icons/svg/arrow-left.svg +3 -0
  192. package/src/icons/svg/arrow-right.svg +3 -0
  193. package/src/icons/svg/arrow-top.svg +3 -0
  194. package/src/icons/svg/arrow-up-circle.svg +4 -0
  195. package/src/icons/svg/arrows-right-left.svg +3 -0
  196. package/src/icons/svg/ask-for-input.svg +6 -0
  197. package/src/icons/svg/asterisk.svg +3 -0
  198. package/src/icons/svg/atom.svg +4 -0
  199. package/src/icons/svg/automations-cancelled.svg +3 -0
  200. package/src/icons/svg/automations-disabled.svg +3 -0
  201. package/src/icons/svg/automations-error.svg +3 -0
  202. package/src/icons/svg/automations-in-progress.svg +3 -0
  203. package/src/icons/svg/automations-not-started.svg +3 -0
  204. package/src/icons/svg/automations-success.svg +3 -0
  205. package/src/icons/svg/back.svg +2 -0
  206. package/src/icons/svg/backlog-icon.svg +3 -0
  207. package/src/icons/svg/batch-actions-icon.svg +4 -0
  208. package/src/icons/svg/bell-circle.svg +4 -0
  209. package/src/icons/svg/bell-filled.svg +4 -0
  210. package/src/icons/svg/bell-off.svg +4 -0
  211. package/src/icons/svg/bell-ringing.svg +5 -0
  212. package/src/icons/svg/bell-x.svg +4 -0
  213. package/src/icons/svg/bolt.svg +3 -0
  214. package/src/icons/svg/bring-forward.svg +8 -0
  215. package/src/icons/svg/bring-to-front.svg +3 -0
  216. package/src/icons/svg/cards.svg +3 -0
  217. package/src/icons/svg/chat-ai.svg +5 -0
  218. package/src/icons/svg/chat.svg +3 -0
  219. package/src/icons/svg/check-circle-filled.svg +3 -0
  220. package/src/icons/svg/check-circle.svg +4 -0
  221. package/src/icons/svg/checked.svg +3 -0
  222. package/src/icons/svg/clean.svg +6 -0
  223. package/src/icons/svg/clear-input-filled.svg +3 -0
  224. package/src/icons/svg/clear-value.svg +6 -0
  225. package/src/icons/svg/clear.svg +6 -0
  226. package/src/icons/svg/clock-alarm.svg +6 -0
  227. package/src/icons/svg/clock-forward.svg +3 -0
  228. package/src/icons/svg/clock.svg +4 -0
  229. package/src/icons/svg/close.svg +4 -0
  230. package/src/icons/svg/collapse-all.svg +3 -0
  231. package/src/icons/svg/color-coding-filled.svg +3 -0
  232. package/src/icons/svg/color-coding.svg +4 -0
  233. package/src/icons/svg/columns-2.svg +3 -0
  234. package/src/icons/svg/columns-4.svg +3 -0
  235. package/src/icons/svg/columns.svg +3 -0
  236. package/src/icons/svg/comment-bubble.svg +3 -0
  237. package/src/icons/svg/copy.svg +5 -0
  238. package/src/icons/svg/create.svg +3 -0
  239. package/src/icons/svg/credits-filled.svg +3 -0
  240. package/src/icons/svg/cross-circle.svg +4 -0
  241. package/src/icons/svg/database-off.svg +3 -0
  242. package/src/icons/svg/database-stroke.svg +4 -0
  243. package/src/icons/svg/database.svg +4 -0
  244. package/src/icons/svg/delete.svg +6 -0
  245. package/src/icons/svg/demo.svg +2 -0
  246. package/src/icons/svg/dependency.svg +3 -0
  247. package/src/icons/svg/double-arrow-left.svg +2 -0
  248. package/src/icons/svg/double-arrow-right.svg +2 -0
  249. package/src/icons/svg/drag-block-handle-single.svg +5 -0
  250. package/src/icons/svg/drag-block-handle.svg +8 -0
  251. package/src/icons/svg/drag-handle.svg +2 -0
  252. package/src/icons/svg/duplicate.svg +5 -0
  253. package/src/icons/svg/dynamic-filter-value.svg +3 -0
  254. package/src/icons/svg/edit-value.svg +5 -0
  255. package/src/icons/svg/email.svg +3 -0
  256. package/src/icons/svg/emoji-delete.svg +5 -0
  257. package/src/icons/svg/entity-merge.svg +3 -0
  258. package/src/icons/svg/equation.svg +4 -0
  259. package/src/icons/svg/export.svg +4 -0
  260. package/src/icons/svg/extension/assignments.svg +7 -0
  261. package/src/icons/svg/extension/avatar.svg +2 -0
  262. package/src/icons/svg/extension/comments.svg +5 -0
  263. package/src/icons/svg/extension/files.svg +2 -0
  264. package/src/icons/svg/extension/references.svg +2 -0
  265. package/src/icons/svg/extension/workflow.svg +2 -0
  266. package/src/icons/svg/eye.svg +4 -0
  267. package/src/icons/svg/favorites-checked.svg +4 -0
  268. package/src/icons/svg/favorites-off.svg +4 -0
  269. package/src/icons/svg/favorites.svg +4 -0
  270. package/src/icons/svg/fibery-mono.svg +3 -0
  271. package/src/icons/svg/field-unit.svg +3 -0
  272. package/src/icons/svg/fields.svg +4 -0
  273. package/src/icons/svg/figma.svg +7 -0
  274. package/src/icons/svg/file-upload.svg +7 -0
  275. package/src/icons/svg/filter.svg +3 -0
  276. package/src/icons/svg/fit-to-screen.svg +5 -0
  277. package/src/icons/svg/focus-mode-off.svg +5 -0
  278. package/src/icons/svg/focus-mode.svg +5 -0
  279. package/src/icons/svg/folder.svg +4 -0
  280. package/src/icons/svg/form-with-cover.svg +7 -0
  281. package/src/icons/svg/form-without-cover.svg +6 -0
  282. package/src/icons/svg/fullscreen-mode-off-icon.svg +3 -0
  283. package/src/icons/svg/fullscreen-mode-on-icon.svg +3 -0
  284. package/src/icons/svg/fullscreen-mode-on.svg +4 -0
  285. package/src/icons/svg/gift.svg +3 -0
  286. package/src/icons/svg/github.svg +1 -0
  287. package/src/icons/svg/gitlab.svg +3 -0
  288. package/src/icons/svg/globe-simple.svg +3 -0
  289. package/src/icons/svg/globe.svg +3 -0
  290. package/src/icons/svg/go-to.svg +5 -0
  291. package/src/icons/svg/google-drive.svg +8 -0
  292. package/src/icons/svg/google-map.svg +7 -0
  293. package/src/icons/svg/headphones-ai.svg +4 -0
  294. package/src/icons/svg/headphones.svg +3 -0
  295. package/src/icons/svg/hide.svg +2 -0
  296. package/src/icons/svg/highlights.svg +3 -0
  297. package/src/icons/svg/hint.svg +4 -0
  298. package/src/icons/svg/home.svg +2 -0
  299. package/src/icons/svg/image-xmark.svg +2 -0
  300. package/src/icons/svg/import.svg +4 -0
  301. package/src/icons/svg/info-circle-filled.svg +3 -0
  302. package/src/icons/svg/info-circle.svg +6 -0
  303. package/src/icons/svg/integration.svg +2 -0
  304. package/src/icons/svg/integrations/integration-discourse-color.svg +8 -0
  305. package/src/icons/svg/integrations/integration-intercom-color.svg +3 -0
  306. package/src/icons/svg/integrations/integration-slack-color.svg +10 -0
  307. package/src/icons/svg/integrations/integration-zendesk-color.svg +6 -0
  308. package/src/icons/svg/invite-people.svg +6 -0
  309. package/src/icons/svg/items-timeline.svg +4 -0
  310. package/src/icons/svg/items.svg +3 -0
  311. package/src/icons/svg/jira.svg +3 -0
  312. package/src/icons/svg/key.svg +4 -0
  313. package/src/icons/svg/lab.svg +6 -0
  314. package/src/icons/svg/layout-double.svg +3 -0
  315. package/src/icons/svg/layout-single.svg +3 -0
  316. package/src/icons/svg/left-panel.svg +11 -0
  317. package/src/icons/svg/level-plus.svg +4 -0
  318. package/src/icons/svg/levels.svg +2 -0
  319. package/src/icons/svg/line-divider.svg +3 -0
  320. package/src/icons/svg/link.svg +6 -0
  321. package/src/icons/svg/lock-outline.svg +5 -0
  322. package/src/icons/svg/lock.svg +4 -0
  323. package/src/icons/svg/logout.svg +4 -0
  324. package/src/icons/svg/loom.svg +3 -0
  325. package/src/icons/svg/loupe-zoom-in.svg +3 -0
  326. package/src/icons/svg/loupe-zoom-out.svg +1 -0
  327. package/src/icons/svg/loupe-zoom.svg +3 -0
  328. package/src/icons/svg/many-people.svg +4 -0
  329. package/src/icons/svg/map-mode.svg +6 -0
  330. package/src/icons/svg/markdown.svg +3 -0
  331. package/src/icons/svg/menu-collapser.svg +2 -0
  332. package/src/icons/svg/message-plus-square.svg +4 -0
  333. package/src/icons/svg/milestones.svg +3 -0
  334. package/src/icons/svg/minus.svg +4 -0
  335. package/src/icons/svg/miro.svg +4 -0
  336. package/src/icons/svg/mirror-off.svg +8 -0
  337. package/src/icons/svg/mirror-on.svg +3 -0
  338. package/src/icons/svg/mixpanel.svg +3 -0
  339. package/src/icons/svg/monitor.svg +3 -0
  340. package/src/icons/svg/more-compact.svg +4 -0
  341. package/src/icons/svg/more.svg +4 -0
  342. package/src/icons/svg/move-bottom.svg +3 -0
  343. package/src/icons/svg/move-left.svg +3 -0
  344. package/src/icons/svg/move-right.svg +3 -0
  345. package/src/icons/svg/move-space.svg +5 -0
  346. package/src/icons/svg/move-top.svg +3 -0
  347. package/src/icons/svg/network-add.svg +5 -0
  348. package/src/icons/svg/network.svg +4 -0
  349. package/src/icons/svg/notifications.svg +2 -0
  350. package/src/icons/svg/obj-child.svg +2 -0
  351. package/src/icons/svg/obj-m2m.svg +2 -0
  352. package/src/icons/svg/obj-o2o.svg +2 -0
  353. package/src/icons/svg/obj-parent.svg +2 -0
  354. package/src/icons/svg/obj-self.svg +2 -0
  355. package/src/icons/svg/on-schedule.svg +3 -0
  356. package/src/icons/svg/open-as-page.svg +4 -0
  357. package/src/icons/svg/page-regular-mode.svg +5 -0
  358. package/src/icons/svg/page-wide-mode.svg +5 -0
  359. package/src/icons/svg/panel-add.svg +3 -0
  360. package/src/icons/svg/pencil.svg +5 -0
  361. package/src/icons/svg/people-check.svg +4 -0
  362. package/src/icons/svg/people.svg +7 -0
  363. package/src/icons/svg/photo.svg +2 -0
  364. package/src/icons/svg/pin-filled.svg +5 -0
  365. package/src/icons/svg/pin.svg +3 -0
  366. package/src/icons/svg/popup.svg +5 -0
  367. package/src/icons/svg/posts.svg +3 -0
  368. package/src/icons/svg/present-play.svg +4 -0
  369. package/src/icons/svg/present-stop.svg +3 -0
  370. package/src/icons/svg/private-items.svg +5 -0
  371. package/src/icons/svg/question.svg +4 -0
  372. package/src/icons/svg/refresh.svg +4 -0
  373. package/src/icons/svg/remove-people.svg +6 -0
  374. package/src/icons/svg/remove.svg +2 -0
  375. package/src/icons/svg/reply.svg +2 -0
  376. package/src/icons/svg/reset-password.svg +6 -0
  377. package/src/icons/svg/restore.svg +2 -0
  378. package/src/icons/svg/richeditor/actions/more.svg +2 -0
  379. package/src/icons/svg/richeditor/block/callout.svg +4 -0
  380. package/src/icons/svg/richeditor/block/code.svg +7 -0
  381. package/src/icons/svg/richeditor/block/embed.svg +4 -0
  382. package/src/icons/svg/richeditor/block/entity.svg +2 -0
  383. package/src/icons/svg/richeditor/block/file.svg +1 -0
  384. package/src/icons/svg/richeditor/block/h1.svg +2 -0
  385. package/src/icons/svg/richeditor/block/h2.svg +2 -0
  386. package/src/icons/svg/richeditor/block/h3.svg +2 -0
  387. package/src/icons/svg/richeditor/block/h4.svg +4 -0
  388. package/src/icons/svg/richeditor/block/mention.svg +2 -0
  389. package/src/icons/svg/richeditor/block/paragraph.svg +2 -0
  390. package/src/icons/svg/richeditor/block/quote.svg +2 -0
  391. package/src/icons/svg/richeditor/checklist/create.svg +2 -0
  392. package/src/icons/svg/richeditor/comment/create.svg +5 -0
  393. package/src/icons/svg/richeditor/entity-link/create.svg +2 -0
  394. package/src/icons/svg/richeditor/history/redo.svg +2 -0
  395. package/src/icons/svg/richeditor/history/undo.svg +2 -0
  396. package/src/icons/svg/richeditor/image/align-center.svg +2 -0
  397. package/src/icons/svg/richeditor/image/align-left.svg +2 -0
  398. package/src/icons/svg/richeditor/image/align-right.svg +2 -0
  399. package/src/icons/svg/richeditor/image/upload.svg +2 -0
  400. package/src/icons/svg/richeditor/image/wrap-center.svg +2 -0
  401. package/src/icons/svg/richeditor/image/wrap-left.svg +2 -0
  402. package/src/icons/svg/richeditor/image/wrap-right.svg +2 -0
  403. package/src/icons/svg/richeditor/image/zoom.svg +5 -0
  404. package/src/icons/svg/richeditor/link/create.svg +9 -0
  405. package/src/icons/svg/richeditor/linkedhighlight/create.svg +2 -0
  406. package/src/icons/svg/richeditor/list/bullet.svg +2 -0
  407. package/src/icons/svg/richeditor/list/indent.svg +2 -0
  408. package/src/icons/svg/richeditor/list/ordered.svg +2 -0
  409. package/src/icons/svg/richeditor/list/unindent.svg +2 -0
  410. package/src/icons/svg/richeditor/mark/code.svg +6 -0
  411. package/src/icons/svg/richeditor/mark/em.svg +2 -0
  412. package/src/icons/svg/richeditor/mark/strike.svg +2 -0
  413. package/src/icons/svg/richeditor/mark/strong.svg +2 -0
  414. package/src/icons/svg/richeditor/mark/text-background-color.svg +2 -0
  415. package/src/icons/svg/richeditor/mark/underline.svg +2 -0
  416. package/src/icons/svg/richeditor/open-link.svg +4 -0
  417. package/src/icons/svg/richeditor/table/create.svg +2 -0
  418. package/src/icons/svg/richeditor/unlink.svg +10 -0
  419. package/src/icons/svg/richeditor/video/upload.svg +2 -0
  420. package/src/icons/svg/right-panel.svg +11 -0
  421. package/src/icons/svg/rows.svg +3 -0
  422. package/src/icons/svg/rule-scheduled.svg +5 -0
  423. package/src/icons/svg/search-add.svg +4 -0
  424. package/src/icons/svg/search-remove.svg +4 -0
  425. package/src/icons/svg/search.svg +2 -0
  426. package/src/icons/svg/self-reference-off.svg +2 -0
  427. package/src/icons/svg/self-reference-on.svg +2 -0
  428. package/src/icons/svg/send-arrow.svg +3 -0
  429. package/src/icons/svg/send-backward.svg +8 -0
  430. package/src/icons/svg/send-to-back.svg +4 -0
  431. package/src/icons/svg/settings-off.svg +4 -0
  432. package/src/icons/svg/settings.svg +4 -0
  433. package/src/icons/svg/share.svg +5 -0
  434. package/src/icons/svg/shared.svg +7 -0
  435. package/src/icons/svg/shield-keyhole.svg +4 -0
  436. package/src/icons/svg/show-author.svg +5 -0
  437. package/src/icons/svg/sidebar-fields-opened.svg +3 -0
  438. package/src/icons/svg/sidebar-fields.svg +6 -0
  439. package/src/icons/svg/sidebar.svg +2 -0
  440. package/src/icons/svg/simple-compass.svg +5 -0
  441. package/src/icons/svg/slack-icon.svg +3 -0
  442. package/src/icons/svg/slack.svg +10 -0
  443. package/src/icons/svg/slide-menu-close.svg +4 -0
  444. package/src/icons/svg/slide-menu-open.svg +4 -0
  445. package/src/icons/svg/slide-menu.svg +5 -0
  446. package/src/icons/svg/smart-folder.svg +5 -0
  447. package/src/icons/svg/sort-on-bottom.svg +4 -0
  448. package/src/icons/svg/sort-on-top.svg +4 -0
  449. package/src/icons/svg/sort.svg +3 -0
  450. package/src/icons/svg/spinner.svg +2 -0
  451. package/src/icons/svg/success.svg +4 -0
  452. package/src/icons/svg/template.svg +3 -0
  453. package/src/icons/svg/templates.svg +4 -0
  454. package/src/icons/svg/terminal.svg +5 -0
  455. package/src/icons/svg/text-tool-align-bottom.svg +3 -0
  456. package/src/icons/svg/text-tool-align-middle.svg +3 -0
  457. package/src/icons/svg/text-tool-align-top.svg +3 -0
  458. package/src/icons/svg/twitter.svg +4 -0
  459. package/src/icons/svg/type/boolean.svg +2 -0
  460. package/src/icons/svg/type/button.svg +4 -0
  461. package/src/icons/svg/type/checkbox.svg +2 -0
  462. package/src/icons/svg/type/date.svg +2 -0
  463. package/src/icons/svg/type/email.svg +2 -0
  464. package/src/icons/svg/type/emoji.svg +2 -0
  465. package/src/icons/svg/type/formula.svg +2 -0
  466. package/src/icons/svg/type/function.svg +2 -0
  467. package/src/icons/svg/type/location.svg +4 -0
  468. package/src/icons/svg/type/lookup.svg +2 -0
  469. package/src/icons/svg/type/money.svg +2 -0
  470. package/src/icons/svg/type/multi-select.svg +2 -0
  471. package/src/icons/svg/type/number.svg +2 -0
  472. package/src/icons/svg/type/percent.svg +2 -0
  473. package/src/icons/svg/type/phone.svg +2 -0
  474. package/src/icons/svg/type/relation.svg +2 -0
  475. package/src/icons/svg/type/rich-text.svg +2 -0
  476. package/src/icons/svg/type/rule.svg +2 -0
  477. package/src/icons/svg/type/single-select.svg +2 -0
  478. package/src/icons/svg/type/text.svg +2 -0
  479. package/src/icons/svg/type/url.svg +9 -0
  480. package/src/icons/svg/units/avatar.svg +5 -0
  481. package/src/icons/svg/units/collection.svg +5 -0
  482. package/src/icons/svg/units/counter.svg +5 -0
  483. package/src/icons/svg/units/date.svg +5 -0
  484. package/src/icons/svg/units/db-badge-abbr.svg +4 -0
  485. package/src/icons/svg/units/db-badge-full.svg +4 -0
  486. package/src/icons/svg/units/db-icon.svg +4 -0
  487. package/src/icons/svg/units/field-icon-button.svg +5 -0
  488. package/src/icons/svg/units/field.svg +4 -0
  489. package/src/icons/svg/units/input.svg +5 -0
  490. package/src/icons/svg/units/progress-bar.svg +5 -0
  491. package/src/icons/svg/units/rich-text.svg +4 -0
  492. package/src/icons/svg/units/snippet.svg +5 -0
  493. package/src/icons/svg/unlink.svg +10 -0
  494. package/src/icons/svg/unlock-filled.svg +5 -0
  495. package/src/icons/svg/unlock-outline.svg +5 -0
  496. package/src/icons/svg/upgrade.svg +2 -0
  497. package/src/icons/svg/usb-flash-drive.svg +5 -0
  498. package/src/icons/svg/user-check.svg +3 -0
  499. package/src/icons/svg/user-group-remove.svg +5 -0
  500. package/src/icons/svg/user-group.svg +4 -0
  501. package/src/icons/svg/user-role.svg +4 -0
  502. package/src/icons/svg/user-x.svg +5 -0
  503. package/src/icons/svg/view-ai.svg +3 -0
  504. package/src/icons/svg/view-board.svg +2 -0
  505. package/src/icons/svg/view-calendar.svg +2 -0
  506. package/src/icons/svg/view-canvas.svg +2 -0
  507. package/src/icons/svg/view-chart.svg +2 -0
  508. package/src/icons/svg/view-details.svg +2 -0
  509. package/src/icons/svg/view-document.svg +2 -0
  510. package/src/icons/svg/view-feed.svg +3 -0
  511. package/src/icons/svg/view-form.svg +4 -0
  512. package/src/icons/svg/view-gantt.svg +5 -0
  513. package/src/icons/svg/view-list.svg +2 -0
  514. package/src/icons/svg/view-map.svg +3 -0
  515. package/src/icons/svg/view-page.svg +3 -0
  516. package/src/icons/svg/view-table.svg +2 -0
  517. package/src/icons/svg/view-timeline.svg +2 -0
  518. package/src/icons/svg/views.svg +11 -0
  519. package/src/icons/svg/warning-triangle.svg +4 -0
  520. package/src/icons/svg/warning.svg +2 -0
  521. package/src/icons/svg/workspace-map.svg +3 -0
  522. package/src/icons/svg/youtube.svg +4 -0
  523. package/src/icons/svg/zoom-in.svg +7 -0
  524. package/src/icons/svg/zoom-out.svg +7 -0
  525. package/src/is-android.ts +3 -0
  526. package/src/is-iOS.ts +8 -0
  527. package/src/is-in-popup.ts +15 -0
  528. package/src/layout.tsx +88 -0
  529. package/src/link-input/components/AntTextAreaWithCustomReadState.js +64 -0
  530. package/src/link-input/index.js +89 -0
  531. package/src/link-input/utils.js +13 -0
  532. package/src/logo.tsx +81 -0
  533. package/src/menu-item-actions.tsx +6 -0
  534. package/src/nested-menu-item.tsx +0 -0
  535. package/src/new-badge.tsx +16 -0
  536. package/src/new-card-placeholder.tsx +231 -0
  537. package/src/not-empty.ts +3 -0
  538. package/src/notification-dot.tsx +23 -0
  539. package/src/number-input/decimal.js +59 -0
  540. package/src/number-input/decimal.test.js +71 -0
  541. package/src/number-input/edit-unit-styles.ts +18 -0
  542. package/src/number-input/index.js +191 -0
  543. package/src/number-input/index.test.js +106 -0
  544. package/src/number-input/number-inline-input-with-autosize.tsx +156 -0
  545. package/src/number-input/number-input.tsx +152 -0
  546. package/src/number-input/stack.tsx +25 -0
  547. package/src/number-input/step-button.tsx +73 -0
  548. package/src/number-input/styles.ts +50 -0
  549. package/src/number-input/text-area-with-autosize.tsx +91 -0
  550. package/src/number-input/text-inline-input-with-autosize.tsx +60 -0
  551. package/src/online-users.tsx +238 -0
  552. package/src/palette.ts +2 -30
  553. package/src/platform.ts +4 -0
  554. package/src/popup/index.tsx +382 -0
  555. package/src/popup/modifiers.tsx +70 -0
  556. package/src/popup/popup-modifiers-context.ts +12 -0
  557. package/src/popup/popup-stack-context.tsx +44 -0
  558. package/src/popup/reference.ts +7 -0
  559. package/src/popup/styles.ts +62 -0
  560. package/src/popup/use-click-outside.ts +22 -0
  561. package/src/progress.tsx +14 -0
  562. package/src/reactions/get-word-divider.tsx +15 -0
  563. package/src/reactions/reaction-button.tsx +254 -0
  564. package/src/reactions/reaction-picker.tsx +126 -0
  565. package/src/reactions/reactions.tsx +30 -0
  566. package/src/ready-to-scroll-context.tsx +16 -0
  567. package/src/rich-input-loader.tsx +78 -0
  568. package/src/rich-text-embed-error.tsx +44 -0
  569. package/src/select/custom-select-partials/clear-indicator.tsx +4 -0
  570. package/src/select/custom-select-partials/group-heading.tsx +4 -5
  571. package/src/select/custom-select-partials/menu-list-virtualized.tsx +22 -4
  572. package/src/select/custom-select-partials/menu.tsx +5 -6
  573. package/src/select/index.tsx +39 -28
  574. package/src/select/select-in-popover.tsx +21 -16
  575. package/src/select/styles.ts +10 -2
  576. package/src/styles-utils.tsx +16 -0
  577. package/src/tab-nav/tab-nav.tsx +208 -0
  578. package/src/table.tsx +91 -0
  579. package/src/toast/primitives.tsx +6 -7
  580. package/src/toast/toast-action.tsx +7 -1
  581. package/src/toast/toast-queue.ts +2 -2
  582. package/src/toast/toast.tsx +78 -16
  583. package/src/toast/toaster.tsx +2 -17
  584. package/src/toast/utils/toastify-item-name.ts +16 -5
  585. package/src/tooltip.tsx +9 -0
  586. package/src/type-badge-box.tsx +42 -0
  587. package/src/type-badge.tsx +315 -0
  588. package/src/unit/as-string.tsx +1 -0
  589. package/src/unit/index.tsx +55 -0
  590. package/src/unit/loading-unit-value.tsx +13 -0
  591. package/src/unit/maybe-unit-value.tsx +9 -0
  592. package/src/unit/primitive.tsx +167 -0
  593. package/src/unit/required-indicator.svg +3 -0
  594. package/src/unit/styles.ts +165 -0
  595. package/src/unit/types.ts +31 -0
  596. package/src/unit/unit-button-group.tsx +38 -0
  597. package/src/unit/unit-content-layout.tsx +37 -0
  598. package/src/unit/unit-content.tsx +37 -0
  599. package/src/unit/unit-with-title.tsx +8 -0
  600. package/src/unit/unit-with-tooltip.tsx +60 -0
  601. package/src/use-is-support-hover.ts +5 -0
  602. package/src/use-long-press.tsx +79 -0
  603. package/src/use-me.tsx +11 -0
  604. package/src/use-navigation.tsx +11 -0
  605. package/src/use-why-did-you-update.tsx +78 -0
  606. package/src/utils-dom.ts +26 -0
  607. package/src/with-data.tsx +78 -0
  608. package/src/workflow-progress-icon.tsx +73 -0
  609. package/tsconfig.json +4 -0
  610. package/src/icons/get-icon-container-style.tsx +0 -13
@@ -0,0 +1,213 @@
1
+ import {css, cx} from "@linaria/core";
2
+ import {styled} from "@linaria/react";
3
+ import {FC, PropsWithChildren, ReactNode, useEffect, useRef, useState} from "react";
4
+ import screenfull from "screenfull";
5
+ import {border, space, textStyles, themeVars} from "./design-system";
6
+ import {IconButton} from "./button/icon-button";
7
+ import FocusModeIcon from "./icons/react/FocusMode";
8
+ import FocusModeOffIcon from "./icons/react/FocusModeOff";
9
+ import {Tooltip} from "./tooltip";
10
+ import {CollapsibleSection} from "./collapsible-section";
11
+
12
+ const labelStyle = css`
13
+ ${{...textStyles.heading6}};
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: space-between;
17
+ `;
18
+
19
+ type Props = {
20
+ label?: string;
21
+ collapsible?: boolean;
22
+ collapsed?: boolean;
23
+ onCollapseChange?: (collapsed: boolean) => void;
24
+ children: ReactNode;
25
+ };
26
+
27
+ export const FieldContainer = ({label, collapsible = false, collapsed, onCollapseChange, children}: Props) => {
28
+ return (
29
+ <CollapsibleSection
30
+ label={label ? <div className={labelStyle}>{label}</div> : undefined}
31
+ collapsible={collapsible}
32
+ collapsed={collapsed}
33
+ collapsedDefault={true}
34
+ onCollapsedChange={onCollapseChange}
35
+ >
36
+ <div
37
+ className={
38
+ label &&
39
+ css`
40
+ margin-top: ${space.s12}px;
41
+ `
42
+ }
43
+ >
44
+ {children}
45
+ </div>
46
+ </CollapsibleSection>
47
+ );
48
+ };
49
+
50
+ const fullscreenModeContainerStyle = css`
51
+ background: ${themeVars.panelBg};
52
+ padding: ${space.s8}px ${space.s6 + space.s12}px;
53
+ `;
54
+
55
+ const fullscreenModeContentStyle = css`
56
+ margin: auto;
57
+ max-width: 1400px;
58
+ `;
59
+
60
+ const fullscreenButton = css`
61
+ position: absolute;
62
+ top: 4px;
63
+ right: 4px;
64
+ z-index: 1;
65
+ `;
66
+
67
+ const fullscreenWithOptionsButton = css`
68
+ &.${fullscreenButton} {
69
+ right: 46px;
70
+ }
71
+ `;
72
+
73
+ export const FieldFullscreenSupportContainer: FC<
74
+ PropsWithChildren<{
75
+ label?: string;
76
+ description?: ReactNode;
77
+ withOptions?: boolean;
78
+ disabled?: boolean;
79
+ onToggleFullscreenMode: (isFullscreen: boolean) => void;
80
+ fullScreenButtonPosition?: {top: number; right: number};
81
+ }>
82
+ > = ({
83
+ label,
84
+ onToggleFullscreenMode,
85
+ withOptions = false,
86
+ disabled = false,
87
+ children,
88
+ description,
89
+ fullScreenButtonPosition,
90
+ }) => {
91
+ const ref = useRef<HTMLDivElement>(null);
92
+ const [isFullscreen, setIsFullscreen] = useState(false);
93
+
94
+ function toggleFullscreen() {
95
+ if (!screenfull.element) {
96
+ screenfull.request(ref.current || undefined).catch((err) => {
97
+ alert(`Error attempting to enable full-screen mode: ${err.message} (${err.name})`);
98
+ });
99
+ } else {
100
+ screenfull.exit();
101
+ }
102
+ }
103
+
104
+ useEffect(() => {
105
+ const listener = () => {
106
+ setIsFullscreen(Boolean(screenfull.element));
107
+ onToggleFullscreenMode(Boolean(screenfull.element));
108
+ };
109
+ if (screenfull.isEnabled) {
110
+ screenfull.on("change", listener);
111
+ }
112
+ return () => {
113
+ if (screenfull.isEnabled) {
114
+ screenfull.off("change", listener);
115
+ }
116
+ };
117
+ }, [onToggleFullscreenMode]);
118
+
119
+ const fullscreen = (
120
+ <div className={cx(fullscreenButton, withOptions && fullscreenWithOptionsButton)} style={fullScreenButtonPosition}>
121
+ {disabled ? (
122
+ <IconButton
123
+ disabled={disabled}
124
+ className={isFullscreen ? "actions-visible" : "actions-hidden"}
125
+ size={"small"}
126
+ onClick={toggleFullscreen}
127
+ >
128
+ {isFullscreen ? <FocusModeOffIcon /> : <FocusModeIcon />}
129
+ </IconButton>
130
+ ) : (
131
+ <Tooltip side="bottom" title={isFullscreen ? "Exit full screen" : "Full screen"}>
132
+ <IconButton
133
+ className={isFullscreen ? "actions-visible" : "actions-hidden"}
134
+ size={"small"}
135
+ onClick={toggleFullscreen}
136
+ >
137
+ {isFullscreen ? <FocusModeOffIcon /> : <FocusModeIcon />}
138
+ </IconButton>
139
+ </Tooltip>
140
+ )}
141
+ </div>
142
+ );
143
+ return (
144
+ <div className={cx(isFullscreen && fullscreenModeContainerStyle)} ref={ref}>
145
+ <div
146
+ className={cx(
147
+ css`
148
+ position: relative;
149
+ `,
150
+ isFullscreen && fullscreenModeContentStyle
151
+ )}
152
+ >
153
+ <FieldContainer label={label}>
154
+ {description ?? null}
155
+ <div
156
+ className={css`
157
+ position: relative;
158
+ `}
159
+ >
160
+ {screenfull.isEnabled ? fullscreen : null}
161
+ {children}
162
+ </div>
163
+ </FieldContainer>
164
+ </div>
165
+ </div>
166
+ );
167
+ };
168
+
169
+ const fieldStackStyle = css`
170
+ ${{
171
+ display: "grid",
172
+ gridGap: space.s16,
173
+ padding: space.s20,
174
+ borderRadius: border.radius6,
175
+ }}
176
+ `;
177
+
178
+ export const FieldListContainerNoBg: FC<PropsWithChildren> = (props) => {
179
+ const {children} = props;
180
+ return <div className={fieldStackStyle}>{children}</div>;
181
+ };
182
+
183
+ const checkboxFieldContainerStyle = css`
184
+ ${{
185
+ display: "grid",
186
+ gridGap: space.s8,
187
+ gridTemplateColumns: "auto 1fr",
188
+ cursor: "pointer",
189
+ }}
190
+ `;
191
+
192
+ const checkboxFieldLabelStyle = css`
193
+ ${{
194
+ ...textStyles.heading6,
195
+ paddingTop: space.s2,
196
+ }}
197
+ `;
198
+
199
+ export const CheckboxFieldContainer = ({label, children}: {label?: string; children: ReactNode}) => {
200
+ return (
201
+ <div>
202
+ <label className={checkboxFieldContainerStyle}>
203
+ <div>{children}</div>
204
+ {label && <div className={checkboxFieldLabelStyle}>{label}</div>}
205
+ </label>
206
+ </div>
207
+ );
208
+ };
209
+
210
+ export const FieldCard = styled.div`
211
+ background-color: ${themeVars.actionMenuBg};
212
+ border-radius: ${border.radius6}px;
213
+ `;
@@ -0,0 +1,151 @@
1
+ import {css, cx} from "@linaria/core";
2
+ import {PureComponent} from "react";
3
+ import {ActionsMenu, ActionsMenuItem} from "./actions-menu";
4
+ import {ActionsButtonCompact} from "./button/actions-button-compact";
5
+ import {Item} from "./item";
6
+ import {border, colors, fontWeight, space, textStyles, themeVars} from "./design-system";
7
+ import {makeButtonColors} from "./button/make-button-colors";
8
+
9
+ const fileItemStyle = css`
10
+ ${{
11
+ display: "block",
12
+ height: "100%",
13
+ backgroundColor: themeVars.entityCardBgColor,
14
+ backgroundSize: "cover",
15
+ textDecoration: "none",
16
+ borderRadius: border.radius6,
17
+ boxShadow: themeVars.entityCardShadow,
18
+ "&:focus": {textDecoration: "none"},
19
+ }}
20
+ `;
21
+
22
+ const overlayStyle = css`
23
+ ${{
24
+ width: "100%",
25
+ height: "100%",
26
+ padding: space.s12,
27
+ overflow: "hidden",
28
+ color: themeVars.textColor,
29
+ borderRadius: border.radius6,
30
+ }}
31
+ `;
32
+
33
+ const nameStyle = css`
34
+ ${{
35
+ wordBreak: "break-word",
36
+ textDecoration: "none",
37
+ height: textStyles.regular.fontSize * textStyles.regular.lineHeight * 5,
38
+ overflow: "hidden",
39
+ marginTop: space.s2,
40
+ }}
41
+ `;
42
+
43
+ const imageOverlayStyle = css`
44
+ ${{
45
+ background: "linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0) 100%)",
46
+ backgroundSize: "100% 200%",
47
+ backgroundPosition: "0 100%",
48
+ transition: "0.2s all ease-in-out",
49
+ color: themeVars.transparent,
50
+ borderRadius: border.radius6,
51
+ "&:hover": {
52
+ backgroundPosition: "0% 0%",
53
+ color: colors.inversedTextColor,
54
+ },
55
+ }}
56
+ `;
57
+
58
+ const fileOverlayStyle = css`
59
+ ${{
60
+ background: "transparent",
61
+ }}
62
+ `;
63
+
64
+ export type FileItemType = {
65
+ name: string;
66
+ url: string;
67
+ thumbnailUrl: string | null;
68
+ status?: string;
69
+ };
70
+
71
+ export type FileItemProps = {
72
+ data: FileItemType;
73
+ onRemoveClick: (x: FileItemType) => void;
74
+ disabled?: boolean;
75
+ };
76
+
77
+ export class FileItem extends PureComponent<FileItemProps> {
78
+ _renderStatus() {
79
+ const {status} = this.props.data;
80
+ if (status === "done" || status === "remove-error") {
81
+ return "";
82
+ }
83
+ let statusText = `status=${status}`;
84
+ if (status === "deleting") {
85
+ statusText = "Deleting…";
86
+ }
87
+ if (status === "uploading") {
88
+ statusText = "Uploading…";
89
+ }
90
+ return <b>{statusText}</b>;
91
+ }
92
+
93
+ render() {
94
+ const {name, url, thumbnailUrl, status} = this.props.data;
95
+
96
+ const isActive = status === "uploading" || status === "deleting";
97
+ const isBackgroundReady = thumbnailUrl && !isActive;
98
+
99
+ return (
100
+ <a
101
+ href={url}
102
+ rel="noopener noreferrer nofollow"
103
+ target="_blank"
104
+ style={isBackgroundReady ? {backgroundImage: `url(${thumbnailUrl})`} : {}}
105
+ className={cx(
106
+ fileItemStyle,
107
+ isActive &&
108
+ css`
109
+ ${{backgroundColor: themeVars.entityCardSelectedColor}}
110
+ `
111
+ )}
112
+ >
113
+ <div className={cx(overlayStyle, isBackgroundReady ? imageOverlayStyle : fileOverlayStyle)}>
114
+ <Item
115
+ multiline
116
+ textClassName={nameStyle}
117
+ rightContainer={
118
+ <ActionsMenu
119
+ trigger={
120
+ <ActionsButtonCompact
121
+ style={isBackgroundReady ? makeButtonColors(colors.inversedTextColor, "ghost") : undefined}
122
+ />
123
+ }
124
+ >
125
+ <a download={name} href={url}>
126
+ <ActionsMenuItem>Download</ActionsMenuItem>
127
+ </a>
128
+ <ActionsMenuItem
129
+ onSelect={() => this.props.onRemoveClick(this.props.data)}
130
+ dangerous
131
+ disabled={this.props.disabled}
132
+ >
133
+ Delete
134
+ </ActionsMenuItem>
135
+ </ActionsMenu>
136
+ }
137
+ >
138
+ <div
139
+ className={css`
140
+ ${fontWeight}
141
+ `}
142
+ >
143
+ {this._renderStatus()}
144
+ </div>
145
+ {name}
146
+ </Item>
147
+ </div>
148
+ </a>
149
+ );
150
+ }
151
+ }
@@ -0,0 +1,7 @@
1
+ import {KeyboardEvent} from "react";
2
+
3
+ export const ignoreEnter = (e: KeyboardEvent) => {
4
+ if (e.keyCode === 13) {
5
+ e.preventDefault();
6
+ }
7
+ };
@@ -0,0 +1,33 @@
1
+ import moment from "moment";
2
+
3
+ const currentLocale = moment.locale();
4
+ // both locale and defineLocale update the global locale
5
+ moment.locale("en-for-comments", {
6
+ relativeTime: {
7
+ future: "in %s",
8
+ past: "%s ago",
9
+ s: "seconds",
10
+ ss: "%ss",
11
+ m: "a minute",
12
+ mm: "%dm",
13
+ h: "an hour",
14
+ hh: "%dh",
15
+ d: "a day",
16
+ dd: "%dd",
17
+ M: "a month",
18
+ MM: "%dM",
19
+ y: "a year",
20
+ yy: "%dY",
21
+ },
22
+ });
23
+ // so revert back to the original one
24
+ moment.locale(currentLocale);
25
+
26
+ export function formatDateFromNow(date?: string, options: {format?: string} = {}) {
27
+ const momentDate = moment(date);
28
+ momentDate.locale("en-for-comments");
29
+ return {
30
+ formatted: momentDate.format(options.format ?? "MMMM Do YYYY, h:mm:ss a"),
31
+ relative: momentDate.fromNow(),
32
+ };
33
+ }
@@ -0,0 +1,26 @@
1
+ import {themeVars} from "./design-system";
2
+
3
+ export function FullFiberyLogo({
4
+ color = themeVars.colorBgButtonSolidNeutralDefault,
5
+ height = 24,
6
+ }: {
7
+ color?: string;
8
+ height?: number;
9
+ }) {
10
+ return (
11
+ <svg height={height} fill={color} viewBox="0 0 84 24" xmlns="http://www.w3.org/2000/svg">
12
+ <path d="M4.47617 19.175C4.0702 19.174 3.67216 19.0613 3.32468 18.849C2.9772 18.6368 2.69336 18.3329 2.50359 17.97C2.31381 17.6072 2.22523 17.1989 2.24734 16.789C2.26945 16.3791 2.40141 15.983 2.6291 15.6432L10.9365 3.31319C11.2812 2.84489 11.7915 2.52931 12.3608 2.43234C12.9301 2.33537 13.5145 2.4645 13.9919 2.79277C14.4693 3.12104 14.8029 3.62309 14.923 4.19411C15.0431 4.76512 14.9405 5.36099 14.6365 5.85731L6.32915 18.1873C6.12351 18.4924 5.84711 18.7419 5.5241 18.9141C5.20109 19.0863 4.84131 19.1759 4.47617 19.175Z" />
13
+ <path d="M8.95854 4.71531L7.88341 3.54367C7.47931 3.10291 6.91859 2.84252 6.32462 2.81978C5.73064 2.79705 5.15207 3.01384 4.71617 3.42245C4.28027 3.83107 4.02275 4.39804 4.00027 4.99864C3.97778 5.59925 4.19218 6.18428 4.59628 6.62505L5.15561 7.23432L7.37468 7.06611L8.95854 4.71531Z" />
14
+ <path d="M14.6436 7.38037L17.0851 7.1953C17.2092 7.1859 17.3336 7.18701 17.4569 7.19845C17.5856 7.2099 17.7138 7.23266 17.8403 7.26693C18.414 7.42241 18.9031 7.80198 19.2001 8.32213C19.497 8.84228 19.5775 9.46039 19.4237 10.0405C19.2699 10.6206 18.8946 11.1152 18.3801 11.4155L7.74384 17.6212L14.6436 7.38037Z" />
15
+ <path d="M10.589 21.6009C10.1096 21.6017 9.64263 21.447 9.25663 21.1596C8.87063 20.8722 8.58595 20.4672 8.44442 20.0041L7.98002 18.4798L10.4175 17.0576L12.4965 17.8837L12.7365 18.6692C12.9112 19.2431 12.8535 19.8637 12.576 20.3946C12.2985 20.9255 11.8239 21.3233 11.2565 21.5006C11.0401 21.5674 10.8152 21.6012 10.589 21.6009Z" />
16
+ <path d="M16.3317 13.6071L11.3629 16.5061L15.4549 18.132C15.716 18.2335 15.9937 18.2843 16.2734 18.2816V18.2801C16.7948 18.2798 17.2998 18.0956 17.7012 17.7591C18.1026 17.4227 18.3754 16.9551 18.4724 16.437C18.5694 15.919 18.4845 15.383 18.2325 14.9214C17.9805 14.4599 17.5771 14.1017 17.0918 13.9087L16.3317 13.6071Z" />
17
+ <path d="M6.76034 7.97792L3.53552 12.7643L2.71111 12.8268C2.65487 12.8313 2.59863 12.8328 2.54239 12.8328C1.96233 12.8336 1.40459 12.6067 0.986621 12.2C0.568653 11.7933 0.32307 11.2385 0.301587 10.6524C0.280103 10.0662 0.484396 9.49453 0.871446 9.05766C1.2585 8.62078 1.7981 8.35283 2.37663 8.31022L6.76034 7.97792Z" />
18
+ <path d="M26.699 18.785V4.85854H35.5134V6.95034H28.8789V10.757H34.6604V12.83H28.8789V18.785H26.699Z" />
19
+ <path d="M38.471 7.28955C37.6559 7.28955 37.0304 6.68651 37.0304 5.87617C37.0304 5.08468 37.6559 4.50049 38.471 4.50049C39.2482 4.50049 39.8548 5.08468 39.8548 5.87617C39.8548 6.68651 39.2482 7.28955 38.471 7.28955ZM39.4757 18.785H37.3906V8.62754H39.4757V18.785Z" />
20
+ <path d="M47.7011 8.38255C50.6203 8.38255 52.8002 10.7382 52.8002 13.7157C52.8002 16.6932 50.6203 19.03 47.6822 19.03C46.1657 19.03 45.0284 18.3327 44.2322 17.3339V18.785H42.1661V4.50049H44.2512V10.0974C45.0663 9.07982 46.1847 8.38255 47.7011 8.38255ZM47.4168 17.0889C49.3882 17.0889 50.6582 15.5625 50.6582 13.6968C50.6582 11.85 49.3882 10.3047 47.4168 10.3047C45.4264 10.3047 44.1564 11.8689 44.1564 13.6968C44.1564 15.5625 45.4264 17.0889 47.4168 17.0889Z" />
21
+ <path d="M64.5129 13.5084C64.5129 13.923 64.475 14.2245 64.4371 14.5072H56.4567C56.7411 15.9582 57.7457 17.1643 59.8498 17.1643C61.025 17.1643 62.4088 16.712 63.3187 16.0713L64.1906 17.5978C63.2618 18.3139 61.6127 19.0111 59.774 19.0111C55.926 19.0111 54.2958 16.354 54.2958 13.678C54.2958 10.6628 56.3809 8.38255 59.5086 8.38255C62.3709 8.38255 64.5129 10.2859 64.5129 13.5084ZM59.5086 10.1728C57.9163 10.1728 56.76 11.247 56.4567 12.8111H62.4088C62.2382 11.1905 61.044 10.1728 59.5086 10.1728Z" />
22
+ <path d="M66.5641 18.785V8.62754H68.5544V10.0786C69.18 8.91021 70.1467 8.36371 71.4547 8.36371C71.8148 8.36371 72.2318 8.4014 72.6678 8.53331L72.4783 10.5497C72.0992 10.4178 71.72 10.3613 71.3599 10.3613C69.8813 10.3613 68.6492 11.3224 68.6492 13.5838V18.785H66.5641Z" />
23
+ <path d="M81.4053 8.62754H83.699L79.4719 19.7084C78.562 22.1017 77.3867 23.1005 75.6618 23.1005C74.9604 23.1005 74.3538 22.9497 73.9179 22.6671L74.2211 20.8768C74.6003 21.0464 75.0552 21.1971 75.4912 21.1971C76.3063 21.1971 76.9508 20.726 77.5005 19.4634L77.8227 18.7096L73.3871 8.62754H75.7945L78.7895 15.9582L81.4053 8.62754Z" />
24
+ </svg>
25
+ );
26
+ }
@@ -0,0 +1,7 @@
1
+ import {assert} from "@fibery/helpers/utils/trace";
2
+
3
+ export const getTriggerNodePopupContainer = (triggerNode: HTMLElement) => {
4
+ // TODO reproduce or consider falling back to document.body in case trigger is unmounted
5
+ assert(triggerNode, "triggerNode");
6
+ return triggerNode;
7
+ };
@@ -0,0 +1,24 @@
1
+ import {Button} from "./button/button";
2
+ import {ButtonSize} from "./button/base-button";
3
+ import HintIcon from "./icons/react/Hint";
4
+ import {IconButton} from "./button/icon-button";
5
+
6
+ type GuideLinkProps = React.PropsWithChildren<{
7
+ href: string;
8
+ size?: ButtonSize;
9
+ }>;
10
+ export const GuideLink: React.FC<GuideLinkProps> = ({href, children, size = "small"}) => {
11
+ return (
12
+ <a href={href} rel="noreferrer" target={"_blank"}>
13
+ {children ? (
14
+ <Button iconStart={<HintIcon />} variant="ghost" color="neutral" size={size}>
15
+ {children}
16
+ </Button>
17
+ ) : (
18
+ <IconButton size={size}>
19
+ <HintIcon />
20
+ </IconButton>
21
+ )}
22
+ </a>
23
+ );
24
+ };
@@ -0,0 +1,33 @@
1
+ import {css} from "@linaria/core";
2
+ import {ReactNode} from "react";
3
+ import {space, textStyles, themeVars} from "./design-system";
4
+
5
+ const containerStyle = css`
6
+ padding: ${space.s8}px;
7
+ border-bottom: 1px solid ${themeVars.separatorColor};
8
+ `;
9
+
10
+ const topGridCompactStyle = css`
11
+ ${textStyles.regular}
12
+ display: flex;
13
+ align-items: center;
14
+ justify-content: space-between;
15
+ `;
16
+
17
+ export function HeaderLayout({actions, children}: {actions?: ReactNode; children: ReactNode}) {
18
+ return (
19
+ <div className={containerStyle}>
20
+ <div className={topGridCompactStyle}>
21
+ <div
22
+ className={css`
23
+ ${textStyles.heading4}
24
+ position: relative;
25
+ `}
26
+ >
27
+ {children}
28
+ </div>
29
+ <div>{actions}</div>
30
+ </div>
31
+ </div>
32
+ );
33
+ }
package/src/hint.tsx ADDED
@@ -0,0 +1,47 @@
1
+ import {space, themeVars} from "./design-system";
2
+ import {css} from "@linaria/core";
3
+ import {FC, ReactNode} from "react";
4
+ import {Item} from "./item";
5
+ import {Tooltip, TooltipProps} from "./tooltip";
6
+ import HintIcon from "./icons/react/Hint";
7
+
8
+ const hintContainerStyle = css`
9
+ margin-left: ${space.s2}px;
10
+ `;
11
+
12
+ interface HintProps {
13
+ text?: ReactNode;
14
+ title?: ReactNode;
15
+ description?: ReactNode;
16
+ multiline?: boolean;
17
+ tooltipSide?: TooltipProps["side"];
18
+ tooltipAlign?: TooltipProps["align"];
19
+ children?: ReactNode;
20
+ }
21
+
22
+ export const Hint: FC<HintProps> = ({
23
+ children,
24
+ text,
25
+ title,
26
+ description,
27
+ multiline,
28
+ tooltipSide = "top",
29
+ tooltipAlign = "center",
30
+ }) => {
31
+ return (
32
+ <Item
33
+ inline
34
+ multiline={multiline}
35
+ containerClassName={hintContainerStyle}
36
+ rightContainer={
37
+ <Tooltip title={text || title} description={description} side={tooltipSide} align={tooltipAlign}>
38
+ <div>
39
+ <HintIcon viewBox={"0 0 20 20"} color={themeVars.iconColor} containerSize={20} iconSize={18} />
40
+ </div>
41
+ </Tooltip>
42
+ }
43
+ >
44
+ {children}
45
+ </Item>
46
+ );
47
+ };
@@ -0,0 +1,29 @@
1
+ import cn from "classnames";
2
+ import {css} from "@linaria/core";
3
+ import {FC, ReactNode} from "react";
4
+
5
+ const hoverableStyle = css`
6
+ display: none;
7
+ `;
8
+
9
+ export const hoverableParentStyle = {
10
+ "&:hover .hoverable": {
11
+ display: "block",
12
+ },
13
+ "&:hover .hidden-on-hover": {
14
+ display: "none",
15
+ },
16
+ };
17
+
18
+ interface HoverableProps {
19
+ active?: boolean;
20
+ children?: ReactNode;
21
+ }
22
+
23
+ export const Hoverable: FC<HoverableProps> = ({children, active}) => (
24
+ <div className={cn("hoverable", !active && hoverableStyle)}>{children}</div>
25
+ );
26
+
27
+ export const HiddenOnHover: FC<{children?: ReactNode}> = ({children}) => (
28
+ <div className="hidden-on-hover">{children}</div>
29
+ );
@@ -0,0 +1,53 @@
1
+ import {css} from "@linaria/core";
2
+ import cx from "classnames";
3
+ import {FC, ReactNode} from "react";
4
+
5
+ const hoverableClassName = css`
6
+ ${{
7
+ opacity: 0,
8
+ width: 0,
9
+ overflow: "hidden",
10
+ pointerEvents: "none",
11
+ }}
12
+ `;
13
+
14
+ export const hoverableHiddenStyle = {
15
+ opacity: 0,
16
+ width: 0,
17
+ overflow: "hidden",
18
+ pointerEvents: "none",
19
+ };
20
+
21
+ export const hoverableParentStyle = {
22
+ "&:hover .hoverable": {
23
+ opacity: 1,
24
+ width: "auto",
25
+ overflow: "visible",
26
+ pointerEvents: "auto",
27
+ },
28
+ "&:hover .hidden-on-hover": hoverableHiddenStyle,
29
+ "&:hover .invisible-on-hover": {
30
+ visibility: "hidden",
31
+ },
32
+ };
33
+
34
+ export const forceHiddenParentStyle = {
35
+ ".hidden-on-hover": hoverableHiddenStyle,
36
+ };
37
+
38
+ interface HoverableProps {
39
+ active?: boolean;
40
+ children?: ReactNode;
41
+ }
42
+
43
+ export const Hoverable: FC<HoverableProps> = ({children, active = false}) => (
44
+ <div className={cx("hoverable", {[hoverableClassName]: !active})}>{children}</div>
45
+ );
46
+
47
+ export const HiddenOnHover: FC<{children?: ReactNode}> = ({children}) => (
48
+ <div className="hidden-on-hover">{children}</div>
49
+ );
50
+
51
+ export const InvisibleOnHover: FC<{children?: ReactNode}> = ({children}) => (
52
+ <div className="invisible-on-hover">{children}</div>
53
+ );