@fibery/ui-kit 1.36.1 → 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 (209) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/package.json +3 -3
  3. package/scripts/generate-icons.mjs +15 -1
  4. package/src/action-badge.tsx +5 -4
  5. package/src/actions-menu/actions-menu-confirmation.tsx +1 -12
  6. package/src/actions-menu/actions-menu-item.tsx +3 -3
  7. package/src/actions-menu/actions-menu-sub-command-menu.tsx +3 -0
  8. package/src/antd/ant-modal.tsx +17 -2
  9. package/src/antd/input.tsx +4 -3
  10. package/src/app-icon-with-fallback.tsx +5 -8
  11. package/src/app-icon-wrapper.tsx +4 -4
  12. package/src/appIcons.json +20 -0
  13. package/src/badge.tsx +14 -7
  14. package/src/beta-badge.tsx +21 -0
  15. package/src/button/actions-button-compact.tsx +1 -1
  16. package/src/button/base-button.tsx +4 -3
  17. package/src/button/button.tsx +89 -2
  18. package/src/button/icon-button.tsx +4 -2
  19. package/src/button/select-button.tsx +23 -8
  20. package/src/card-container.tsx +29 -65
  21. package/src/card-hidden-link.tsx +52 -0
  22. package/src/collapsible-section.tsx +13 -3
  23. package/src/color-picker/index.js +65 -60
  24. package/src/color-picker/swatch.tsx +28 -14
  25. package/src/command-menu/index.tsx +16 -11
  26. package/src/command-menu/nested-command-menu.tsx +8 -1
  27. package/src/context-menu/index.tsx +3 -3
  28. package/src/count-badge.tsx +57 -0
  29. package/src/date-picker/date-range-input.tsx +1 -1
  30. package/src/date-picker/fake-date-input.tsx +1 -1
  31. package/src/date-picker/relative-date-picker.tsx +1 -1
  32. package/src/date-picker/single-date-input.tsx +1 -1
  33. package/src/date-picker/utils.ts +9 -2
  34. package/src/design-system.ts +85 -50
  35. package/src/dropdown-menu/index.tsx +1 -1
  36. package/src/emoji-picker/emoji-picker-content-with-color.tsx +3 -9
  37. package/src/emoji-picker/icon-emoji-picker.tsx +75 -69
  38. package/src/emoji-picker/primitives/header.tsx +1 -0
  39. package/src/emoji-picker/primitives/search.tsx +12 -13
  40. package/src/error-alert/error-alert.tsx +19 -7
  41. package/src/field-app-icon.tsx +29 -0
  42. package/src/field-container.tsx +4 -2
  43. package/src/field-icon.tsx +26 -0
  44. package/src/field-type-icon.tsx +82 -0
  45. package/src/format-date-from-now.ts +1 -1
  46. package/src/guide-link.tsx +4 -3
  47. package/src/hint.tsx +10 -1
  48. package/src/html-styles.ts +15 -13
  49. package/src/icons/ast/AiFiberyBuild.ts +8 -0
  50. package/src/icons/ast/Anthropic.ts +8 -0
  51. package/src/icons/ast/Apple.ts +8 -0
  52. package/src/icons/ast/ArrowBottom.ts +1 -1
  53. package/src/icons/ast/ArrowForward.ts +1 -1
  54. package/src/icons/ast/ArrowLeft.ts +1 -1
  55. package/src/icons/ast/ArrowRight.ts +1 -1
  56. package/src/icons/ast/ArrowTop.ts +1 -1
  57. package/src/icons/ast/Crosshair.ts +8 -0
  58. package/src/icons/ast/Csv.ts +8 -0
  59. package/src/icons/ast/Document.ts +8 -0
  60. package/src/icons/ast/EntityCreate.ts +8 -0
  61. package/src/icons/ast/ExpandAll.ts +8 -0
  62. package/src/icons/ast/FiberyDesktopApp.ts +8 -0
  63. package/src/icons/ast/FiberyMono.ts +1 -1
  64. package/src/icons/ast/FileDownload.ts +8 -0
  65. package/src/icons/ast/GraduationCapFilled.ts +8 -0
  66. package/src/icons/ast/Home.ts +1 -1
  67. package/src/icons/ast/ImportFilled.ts +8 -0
  68. package/src/icons/ast/IntegrationsFilled.ts +8 -0
  69. package/src/icons/ast/LocationEdit.ts +8 -0
  70. package/src/icons/ast/MessagePlus.ts +8 -0
  71. package/src/icons/ast/OpenAi.ts +8 -0
  72. package/src/icons/ast/RicheditorMarkHighlight.ts +8 -0
  73. package/src/icons/ast/RicheditorMarkStrike.ts +1 -1
  74. package/src/icons/ast/RicheditorMarkUnderline.ts +1 -1
  75. package/src/icons/ast/SpaceApp.ts +8 -0
  76. package/src/icons/ast/SpaceGenerate.ts +8 -0
  77. package/src/icons/ast/SpaceList.ts +8 -0
  78. package/src/icons/ast/SpaceScratch.ts +8 -0
  79. package/src/icons/ast/SpaceTemplate.ts +8 -0
  80. package/src/icons/ast/SuggestIntegration.ts +8 -0
  81. package/src/icons/ast/TableLayout.ts +8 -0
  82. package/src/icons/ast/TemplatesFilled.ts +8 -0
  83. package/src/icons/ast/ThumbsDown.ts +8 -0
  84. package/src/icons/ast/ThumbsUp.ts +8 -0
  85. package/src/icons/ast/ViewDashboard.ts +8 -0
  86. package/src/icons/ast/WarningTriangleFilled.ts +8 -0
  87. package/src/icons/ast/Windows.ts +8 -0
  88. package/src/icons/ast/index.tsx +30 -0
  89. package/src/icons/react/AiFiberyBuild.tsx +13 -0
  90. package/src/icons/react/Anthropic.tsx +13 -0
  91. package/src/icons/react/Apple.tsx +13 -0
  92. package/src/icons/react/Crosshair.tsx +13 -0
  93. package/src/icons/react/Csv.tsx +13 -0
  94. package/src/icons/react/Document.tsx +13 -0
  95. package/src/icons/react/EntityCreate.tsx +13 -0
  96. package/src/icons/react/ExpandAll.tsx +13 -0
  97. package/src/icons/react/FiberyDesktopApp.tsx +13 -0
  98. package/src/icons/react/FileDownload.tsx +13 -0
  99. package/src/icons/react/GraduationCapFilled.tsx +13 -0
  100. package/src/icons/react/ImportFilled.tsx +13 -0
  101. package/src/icons/react/IntegrationsFilled.tsx +13 -0
  102. package/src/icons/react/LocationEdit.tsx +13 -0
  103. package/src/icons/react/MessagePlus.tsx +13 -0
  104. package/src/icons/react/OpenAi.tsx +13 -0
  105. package/src/icons/react/RicheditorMarkHighlight.tsx +13 -0
  106. package/src/icons/react/SpaceApp.tsx +13 -0
  107. package/src/icons/react/SpaceGenerate.tsx +13 -0
  108. package/src/icons/react/SpaceList.tsx +13 -0
  109. package/src/icons/react/SpaceScratch.tsx +13 -0
  110. package/src/icons/react/SpaceTemplate.tsx +13 -0
  111. package/src/icons/react/SuggestIntegration.tsx +13 -0
  112. package/src/icons/react/TableLayout.tsx +13 -0
  113. package/src/icons/react/TemplatesFilled.tsx +13 -0
  114. package/src/icons/react/ThumbsDown.tsx +13 -0
  115. package/src/icons/react/ThumbsUp.tsx +13 -0
  116. package/src/icons/react/ViewDashboard.tsx +13 -0
  117. package/src/icons/react/WarningTriangleFilled.tsx +13 -0
  118. package/src/icons/react/Windows.tsx +13 -0
  119. package/src/icons/react/index.tsx +30 -0
  120. package/src/icons/svg/ai-fibery-build.svg +24 -0
  121. package/src/icons/svg/anthropic.svg +3 -0
  122. package/src/icons/svg/apple.svg +4 -0
  123. package/src/icons/svg/arrow-bottom.svg +1 -1
  124. package/src/icons/svg/arrow-forward.svg +1 -1
  125. package/src/icons/svg/arrow-left.svg +1 -1
  126. package/src/icons/svg/arrow-right.svg +1 -1
  127. package/src/icons/svg/arrow-top.svg +1 -1
  128. package/src/icons/svg/crosshair.svg +4 -0
  129. package/src/icons/svg/csv.svg +3 -0
  130. package/src/icons/svg/document.svg +4 -0
  131. package/src/icons/svg/entity-create.svg +3 -0
  132. package/src/icons/svg/expand-all.svg +3 -0
  133. package/src/icons/svg/fibery-desktop-app.svg +101 -0
  134. package/src/icons/svg/fibery-mono.svg +6 -1
  135. package/src/icons/svg/file-download.svg +4 -0
  136. package/src/icons/svg/go-to.svg +1 -3
  137. package/src/icons/svg/graduation-cap-filled.svg +4 -0
  138. package/src/icons/svg/home.svg +4 -2
  139. package/src/icons/svg/import-filled.svg +4 -0
  140. package/src/icons/svg/integrations-filled.svg +4 -0
  141. package/src/icons/svg/location-edit.svg +13 -0
  142. package/src/icons/svg/message-plus.svg +4 -0
  143. package/src/icons/svg/open-ai.svg +3 -0
  144. package/src/icons/svg/open-as-page.svg +2 -3
  145. package/src/icons/svg/richeditor/mark/code.svg +4 -5
  146. package/src/icons/svg/richeditor/mark/em.svg +3 -2
  147. package/src/icons/svg/richeditor/mark/highlight.svg +3 -0
  148. package/src/icons/svg/richeditor/mark/strike.svg +3 -2
  149. package/src/icons/svg/richeditor/mark/strong.svg +3 -2
  150. package/src/icons/svg/richeditor/mark/underline.svg +4 -2
  151. package/src/icons/svg/space-app.svg +3 -0
  152. package/src/icons/svg/space-generate.svg +3 -0
  153. package/src/icons/svg/space-list.svg +4 -0
  154. package/src/icons/svg/space-scratch.svg +3 -0
  155. package/src/icons/svg/space-template.svg +3 -0
  156. package/src/icons/svg/suggest-integration.svg +4 -0
  157. package/src/icons/svg/table-layout.svg +3 -0
  158. package/src/icons/svg/templates-filled.svg +6 -0
  159. package/src/icons/svg/thumbs-down.svg +3 -0
  160. package/src/icons/svg/thumbs-up.svg +3 -0
  161. package/src/icons/svg/view-dashboard.svg +5 -0
  162. package/src/icons/svg/warning-triangle-filled.svg +3 -0
  163. package/src/icons/svg/windows.svg +15 -0
  164. package/src/icons/types.ts +2 -2
  165. package/src/integration-compact-info-button.tsx +3 -1
  166. package/src/layout-styles.ts +23 -0
  167. package/src/lists/list-row-surface.tsx +2 -1
  168. package/src/loaders.tsx +6 -6
  169. package/src/logo.tsx +23 -48
  170. package/src/mobile-styles.ts +2 -0
  171. package/src/new-badge.tsx +5 -6
  172. package/src/number-input/text-area-auto-sized.tsx +47 -0
  173. package/src/number-input/text-input-auto-sized.tsx +49 -0
  174. package/src/palette.ts +50 -50
  175. package/src/popup/index.tsx +1 -0
  176. package/src/rich-text-embed-error.tsx +2 -2
  177. package/src/select/{custom-select-partials → components}/menu.tsx +13 -7
  178. package/src/select/{custom-select-partials → components}/no-option-message.tsx +0 -1
  179. package/src/select/constants.ts +1 -0
  180. package/src/select/index.tsx +136 -145
  181. package/src/select/select-in-popover.tsx +103 -108
  182. package/src/select/styles.ts +60 -24
  183. package/src/shortcut-badge.tsx +1 -0
  184. package/src/tab-nav/tab-nav.tsx +12 -19
  185. package/src/theme-provider.tsx +9 -1
  186. package/src/toast/utils/toastify-item-name.ts +1 -1
  187. package/src/tooltip-if-overflown.tsx +9 -3
  188. package/src/type-badge-box.tsx +4 -2
  189. package/src/type-badge.tsx +20 -12
  190. package/src/unit/index.tsx +9 -1
  191. package/src/unit/loading-unit-value.tsx +1 -0
  192. package/src/unit/maybe-unit-value.tsx +3 -3
  193. package/src/unit/primitive.tsx +60 -41
  194. package/src/unit/styles.ts +12 -12
  195. package/src/unit/types.ts +5 -2
  196. package/src/unit/unit-button-group.tsx +6 -11
  197. package/src/unit/unit-content.tsx +13 -5
  198. package/src/unit/unit-with-title.tsx +6 -1
  199. package/src/unit/unit-with-tooltip.tsx +24 -9
  200. package/src/use-is-phone.tsx +12 -0
  201. package/src/workflow-progress-icon.tsx +1 -1
  202. package/src/number-input/text-area-with-autosize.tsx +0 -91
  203. package/src/number-input/text-inline-input-with-autosize.tsx +0 -60
  204. package/src/use-is-phone.ts +0 -5
  205. /package/src/select/{custom-select-partials → components}/clear-indicator.tsx +0 -0
  206. /package/src/select/{custom-select-partials → components}/drop-down-indicator.tsx +0 -0
  207. /package/src/select/{custom-select-partials → components}/group-heading.tsx +0 -0
  208. /package/src/select/{custom-select-partials → components}/menu-list-virtualized.tsx +0 -0
  209. /package/src/select/{custom-select-partials → components}/option.tsx +0 -0
@@ -1,60 +0,0 @@
1
- import {CSSProperties, useRef} from "react";
2
- import {stopPropagation} from "@fibery/react/src/stop-propagation";
3
- import {Stack} from "./stack";
4
- import {cx} from "@linaria/core";
5
- import {hiddenCss, inputCss, textInlineCss} from "./styles";
6
- import {invalidInputClass} from "./edit-unit-styles";
7
-
8
- export const TextInlineInputWithAutosize = ({
9
- value,
10
- onFocus,
11
- onBlur,
12
- onChange,
13
- onKeyDown,
14
- autoFocus,
15
- placeholder,
16
- invalid,
17
- ...rest
18
- }: {
19
- value: string | null;
20
- onFocus?: React.FocusEventHandler<HTMLInputElement>;
21
- onBlur?: React.FocusEventHandler<HTMLInputElement>;
22
- onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;
23
- onChange: (value: string | number) => void;
24
- placeholder: string;
25
- autoFocus: boolean;
26
- style?: CSSProperties;
27
- width?: number;
28
- invalid?: boolean;
29
- }) => {
30
- const inputRef = useRef<HTMLInputElement>(null);
31
-
32
- let hiddenValue = placeholder || "";
33
- if (value && value.length > hiddenValue.length - 1) {
34
- hiddenValue = value;
35
- }
36
-
37
- return (
38
- <Stack
39
- bottom={<div className={cx(inputCss, textInlineCss, hiddenCss)}>{hiddenValue}</div>}
40
- top={
41
- <input
42
- // Allow input to shrink (otherwise it has size 20 by default)
43
- size={1}
44
- autoFocus={autoFocus}
45
- ref={inputRef}
46
- value={value || ""}
47
- onFocus={onFocus}
48
- onBlur={onBlur}
49
- onChange={(e) => onChange?.(e.target.value)}
50
- onKeyDown={onKeyDown}
51
- type="text"
52
- placeholder={placeholder}
53
- onClick={stopPropagation}
54
- {...rest}
55
- className={cx(inputCss, invalid && invalidInputClass)}
56
- />
57
- }
58
- />
59
- );
60
- };
@@ -1,5 +0,0 @@
1
- import {useIsMediaQueryMatched} from "./use-is-media-query-matched";
2
-
3
- export function useIsPhone() {
4
- return useIsMediaQueryMatched("(max-width: 420px), (max-height: 420px)");
5
- }