@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.
- package/CHANGELOG.md +15 -0
- package/package.json +3 -3
- package/scripts/generate-icons.mjs +15 -1
- package/src/action-badge.tsx +5 -4
- package/src/actions-menu/actions-menu-confirmation.tsx +1 -12
- package/src/actions-menu/actions-menu-item.tsx +3 -3
- package/src/actions-menu/actions-menu-sub-command-menu.tsx +3 -0
- package/src/antd/ant-modal.tsx +17 -2
- package/src/antd/input.tsx +4 -3
- package/src/app-icon-with-fallback.tsx +5 -8
- package/src/app-icon-wrapper.tsx +4 -4
- package/src/appIcons.json +20 -0
- package/src/badge.tsx +14 -7
- package/src/beta-badge.tsx +21 -0
- package/src/button/actions-button-compact.tsx +1 -1
- package/src/button/base-button.tsx +4 -3
- package/src/button/button.tsx +89 -2
- package/src/button/icon-button.tsx +4 -2
- package/src/button/select-button.tsx +23 -8
- package/src/card-container.tsx +29 -65
- package/src/card-hidden-link.tsx +52 -0
- package/src/collapsible-section.tsx +13 -3
- package/src/color-picker/index.js +65 -60
- package/src/color-picker/swatch.tsx +28 -14
- package/src/command-menu/index.tsx +16 -11
- package/src/command-menu/nested-command-menu.tsx +8 -1
- package/src/context-menu/index.tsx +3 -3
- package/src/count-badge.tsx +57 -0
- package/src/date-picker/date-range-input.tsx +1 -1
- package/src/date-picker/fake-date-input.tsx +1 -1
- package/src/date-picker/relative-date-picker.tsx +1 -1
- package/src/date-picker/single-date-input.tsx +1 -1
- package/src/date-picker/utils.ts +9 -2
- package/src/design-system.ts +85 -50
- package/src/dropdown-menu/index.tsx +1 -1
- package/src/emoji-picker/emoji-picker-content-with-color.tsx +3 -9
- package/src/emoji-picker/icon-emoji-picker.tsx +75 -69
- package/src/emoji-picker/primitives/header.tsx +1 -0
- package/src/emoji-picker/primitives/search.tsx +12 -13
- package/src/error-alert/error-alert.tsx +19 -7
- package/src/field-app-icon.tsx +29 -0
- package/src/field-container.tsx +4 -2
- package/src/field-icon.tsx +26 -0
- package/src/field-type-icon.tsx +82 -0
- package/src/format-date-from-now.ts +1 -1
- package/src/guide-link.tsx +4 -3
- package/src/hint.tsx +10 -1
- package/src/html-styles.ts +15 -13
- package/src/icons/ast/AiFiberyBuild.ts +8 -0
- package/src/icons/ast/Anthropic.ts +8 -0
- package/src/icons/ast/Apple.ts +8 -0
- package/src/icons/ast/ArrowBottom.ts +1 -1
- package/src/icons/ast/ArrowForward.ts +1 -1
- package/src/icons/ast/ArrowLeft.ts +1 -1
- package/src/icons/ast/ArrowRight.ts +1 -1
- package/src/icons/ast/ArrowTop.ts +1 -1
- package/src/icons/ast/Crosshair.ts +8 -0
- package/src/icons/ast/Csv.ts +8 -0
- package/src/icons/ast/Document.ts +8 -0
- package/src/icons/ast/EntityCreate.ts +8 -0
- package/src/icons/ast/ExpandAll.ts +8 -0
- package/src/icons/ast/FiberyDesktopApp.ts +8 -0
- package/src/icons/ast/FiberyMono.ts +1 -1
- package/src/icons/ast/FileDownload.ts +8 -0
- package/src/icons/ast/GraduationCapFilled.ts +8 -0
- package/src/icons/ast/Home.ts +1 -1
- package/src/icons/ast/ImportFilled.ts +8 -0
- package/src/icons/ast/IntegrationsFilled.ts +8 -0
- package/src/icons/ast/LocationEdit.ts +8 -0
- package/src/icons/ast/MessagePlus.ts +8 -0
- package/src/icons/ast/OpenAi.ts +8 -0
- package/src/icons/ast/RicheditorMarkHighlight.ts +8 -0
- package/src/icons/ast/RicheditorMarkStrike.ts +1 -1
- package/src/icons/ast/RicheditorMarkUnderline.ts +1 -1
- package/src/icons/ast/SpaceApp.ts +8 -0
- package/src/icons/ast/SpaceGenerate.ts +8 -0
- package/src/icons/ast/SpaceList.ts +8 -0
- package/src/icons/ast/SpaceScratch.ts +8 -0
- package/src/icons/ast/SpaceTemplate.ts +8 -0
- package/src/icons/ast/SuggestIntegration.ts +8 -0
- package/src/icons/ast/TableLayout.ts +8 -0
- package/src/icons/ast/TemplatesFilled.ts +8 -0
- package/src/icons/ast/ThumbsDown.ts +8 -0
- package/src/icons/ast/ThumbsUp.ts +8 -0
- package/src/icons/ast/ViewDashboard.ts +8 -0
- package/src/icons/ast/WarningTriangleFilled.ts +8 -0
- package/src/icons/ast/Windows.ts +8 -0
- package/src/icons/ast/index.tsx +30 -0
- package/src/icons/react/AiFiberyBuild.tsx +13 -0
- package/src/icons/react/Anthropic.tsx +13 -0
- package/src/icons/react/Apple.tsx +13 -0
- package/src/icons/react/Crosshair.tsx +13 -0
- package/src/icons/react/Csv.tsx +13 -0
- package/src/icons/react/Document.tsx +13 -0
- package/src/icons/react/EntityCreate.tsx +13 -0
- package/src/icons/react/ExpandAll.tsx +13 -0
- package/src/icons/react/FiberyDesktopApp.tsx +13 -0
- package/src/icons/react/FileDownload.tsx +13 -0
- package/src/icons/react/GraduationCapFilled.tsx +13 -0
- package/src/icons/react/ImportFilled.tsx +13 -0
- package/src/icons/react/IntegrationsFilled.tsx +13 -0
- package/src/icons/react/LocationEdit.tsx +13 -0
- package/src/icons/react/MessagePlus.tsx +13 -0
- package/src/icons/react/OpenAi.tsx +13 -0
- package/src/icons/react/RicheditorMarkHighlight.tsx +13 -0
- package/src/icons/react/SpaceApp.tsx +13 -0
- package/src/icons/react/SpaceGenerate.tsx +13 -0
- package/src/icons/react/SpaceList.tsx +13 -0
- package/src/icons/react/SpaceScratch.tsx +13 -0
- package/src/icons/react/SpaceTemplate.tsx +13 -0
- package/src/icons/react/SuggestIntegration.tsx +13 -0
- package/src/icons/react/TableLayout.tsx +13 -0
- package/src/icons/react/TemplatesFilled.tsx +13 -0
- package/src/icons/react/ThumbsDown.tsx +13 -0
- package/src/icons/react/ThumbsUp.tsx +13 -0
- package/src/icons/react/ViewDashboard.tsx +13 -0
- package/src/icons/react/WarningTriangleFilled.tsx +13 -0
- package/src/icons/react/Windows.tsx +13 -0
- package/src/icons/react/index.tsx +30 -0
- package/src/icons/svg/ai-fibery-build.svg +24 -0
- package/src/icons/svg/anthropic.svg +3 -0
- package/src/icons/svg/apple.svg +4 -0
- package/src/icons/svg/arrow-bottom.svg +1 -1
- package/src/icons/svg/arrow-forward.svg +1 -1
- package/src/icons/svg/arrow-left.svg +1 -1
- package/src/icons/svg/arrow-right.svg +1 -1
- package/src/icons/svg/arrow-top.svg +1 -1
- package/src/icons/svg/crosshair.svg +4 -0
- package/src/icons/svg/csv.svg +3 -0
- package/src/icons/svg/document.svg +4 -0
- package/src/icons/svg/entity-create.svg +3 -0
- package/src/icons/svg/expand-all.svg +3 -0
- package/src/icons/svg/fibery-desktop-app.svg +101 -0
- package/src/icons/svg/fibery-mono.svg +6 -1
- package/src/icons/svg/file-download.svg +4 -0
- package/src/icons/svg/go-to.svg +1 -3
- package/src/icons/svg/graduation-cap-filled.svg +4 -0
- package/src/icons/svg/home.svg +4 -2
- package/src/icons/svg/import-filled.svg +4 -0
- package/src/icons/svg/integrations-filled.svg +4 -0
- package/src/icons/svg/location-edit.svg +13 -0
- package/src/icons/svg/message-plus.svg +4 -0
- package/src/icons/svg/open-ai.svg +3 -0
- package/src/icons/svg/open-as-page.svg +2 -3
- package/src/icons/svg/richeditor/mark/code.svg +4 -5
- package/src/icons/svg/richeditor/mark/em.svg +3 -2
- package/src/icons/svg/richeditor/mark/highlight.svg +3 -0
- package/src/icons/svg/richeditor/mark/strike.svg +3 -2
- package/src/icons/svg/richeditor/mark/strong.svg +3 -2
- package/src/icons/svg/richeditor/mark/underline.svg +4 -2
- package/src/icons/svg/space-app.svg +3 -0
- package/src/icons/svg/space-generate.svg +3 -0
- package/src/icons/svg/space-list.svg +4 -0
- package/src/icons/svg/space-scratch.svg +3 -0
- package/src/icons/svg/space-template.svg +3 -0
- package/src/icons/svg/suggest-integration.svg +4 -0
- package/src/icons/svg/table-layout.svg +3 -0
- package/src/icons/svg/templates-filled.svg +6 -0
- package/src/icons/svg/thumbs-down.svg +3 -0
- package/src/icons/svg/thumbs-up.svg +3 -0
- package/src/icons/svg/view-dashboard.svg +5 -0
- package/src/icons/svg/warning-triangle-filled.svg +3 -0
- package/src/icons/svg/windows.svg +15 -0
- package/src/icons/types.ts +2 -2
- package/src/integration-compact-info-button.tsx +3 -1
- package/src/layout-styles.ts +23 -0
- package/src/lists/list-row-surface.tsx +2 -1
- package/src/loaders.tsx +6 -6
- package/src/logo.tsx +23 -48
- package/src/mobile-styles.ts +2 -0
- package/src/new-badge.tsx +5 -6
- package/src/number-input/text-area-auto-sized.tsx +47 -0
- package/src/number-input/text-input-auto-sized.tsx +49 -0
- package/src/palette.ts +50 -50
- package/src/popup/index.tsx +1 -0
- package/src/rich-text-embed-error.tsx +2 -2
- package/src/select/{custom-select-partials → components}/menu.tsx +13 -7
- package/src/select/{custom-select-partials → components}/no-option-message.tsx +0 -1
- package/src/select/constants.ts +1 -0
- package/src/select/index.tsx +136 -145
- package/src/select/select-in-popover.tsx +103 -108
- package/src/select/styles.ts +60 -24
- package/src/shortcut-badge.tsx +1 -0
- package/src/tab-nav/tab-nav.tsx +12 -19
- package/src/theme-provider.tsx +9 -1
- package/src/toast/utils/toastify-item-name.ts +1 -1
- package/src/tooltip-if-overflown.tsx +9 -3
- package/src/type-badge-box.tsx +4 -2
- package/src/type-badge.tsx +20 -12
- package/src/unit/index.tsx +9 -1
- package/src/unit/loading-unit-value.tsx +1 -0
- package/src/unit/maybe-unit-value.tsx +3 -3
- package/src/unit/primitive.tsx +60 -41
- package/src/unit/styles.ts +12 -12
- package/src/unit/types.ts +5 -2
- package/src/unit/unit-button-group.tsx +6 -11
- package/src/unit/unit-content.tsx +13 -5
- package/src/unit/unit-with-title.tsx +6 -1
- package/src/unit/unit-with-tooltip.tsx +24 -9
- package/src/use-is-phone.tsx +12 -0
- package/src/workflow-progress-icon.tsx +1 -1
- package/src/number-input/text-area-with-autosize.tsx +0 -91
- package/src/number-input/text-inline-input-with-autosize.tsx +0 -60
- package/src/use-is-phone.ts +0 -5
- /package/src/select/{custom-select-partials → components}/clear-indicator.tsx +0 -0
- /package/src/select/{custom-select-partials → components}/drop-down-indicator.tsx +0 -0
- /package/src/select/{custom-select-partials → components}/group-heading.tsx +0 -0
- /package/src/select/{custom-select-partials → components}/menu-list-virtualized.tsx +0 -0
- /package/src/select/{custom-select-partials → components}/option.tsx +0 -0
package/src/logo.tsx
CHANGED
|
@@ -8,74 +8,49 @@ interface LogoProps {
|
|
|
8
8
|
|
|
9
9
|
export const Logo: FC<LogoProps> = ({size = 40}) => {
|
|
10
10
|
return (
|
|
11
|
-
<svg width={size} height={size} viewBox="0 0
|
|
11
|
+
<svg width={size} height={size} viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg">
|
|
12
12
|
<path
|
|
13
|
-
d="
|
|
14
|
-
fill="
|
|
13
|
+
d="M3.5181 14.7077C2.61266 14.1545 2.35441 12.906 2.93813 12.0346L9.86469 1.75412C10.4517 0.956677 11.5947 0.758115 12.4123 1.3202C13.2317 1.88362 13.468 3.02927 12.9497 3.87537L6.02318 14.156C5.48027 14.9614 4.35607 15.2196 3.5181 14.7077Z"
|
|
14
|
+
fill="#4FC5B3"
|
|
15
15
|
/>
|
|
16
16
|
<path
|
|
17
|
-
d="
|
|
18
|
-
fill="
|
|
17
|
+
d="M12.9561 5.1453L14.9917 4.99099C15.7033 4.93713 16.4005 5.30922 16.7552 5.93053C17.2619 6.8181 16.9569 7.99294 16.0715 8.50971L7.20312 13.6839L12.9561 5.1453Z"
|
|
18
|
+
fill="#4FC5B3"
|
|
19
19
|
/>
|
|
20
20
|
<path
|
|
21
|
-
d="
|
|
22
|
-
fill="
|
|
21
|
+
d="M7.78663 15.671L7.39941 14.4001L9.43178 13.2144L11.1651 13.9031L11.3653 14.5581C11.6625 15.5343 11.1102 16.6129 10.1313 16.9189C9.14845 17.2223 8.08489 16.6471 7.78663 15.671Z"
|
|
22
|
+
fill="#4FC5B3"
|
|
23
23
|
/>
|
|
24
24
|
<path
|
|
25
|
-
d="
|
|
26
|
-
fill="
|
|
25
|
+
d="M14.3627 10.3369L10.2197 12.7541L13.6316 14.1098C14.7147 14.5312 15.9366 13.8227 16.1475 12.6966C16.3113 11.8216 15.8264 10.9185 14.9964 10.5884L14.3627 10.3369Z"
|
|
26
|
+
fill="#4FC5B3"
|
|
27
27
|
/>
|
|
28
28
|
<path
|
|
29
|
-
d="
|
|
30
|
-
fill="
|
|
29
|
+
d="M6.38255 5.64331L3.69375 9.63411C3.41895 9.65492 3.14154 9.69117 2.86569 9.69117C1.86572 9.69255 1.03376 8.8668 0.997336 7.87321C0.960913 6.87944 1.73006 5.99385 2.72749 5.92037L6.38255 5.64331Z"
|
|
30
|
+
fill="#4FC5B3"
|
|
31
31
|
/>
|
|
32
32
|
<path
|
|
33
|
-
d="
|
|
34
|
-
fill="
|
|
33
|
+
d="M7.31897 1.94643L8.21539 2.92332L6.84973 4.95028L5.10078 5.08672L4.57821 4.51563C3.88603 3.76067 3.93057 2.54616 4.67816 1.84536C5.42435 1.14589 6.62812 1.19291 7.31897 1.94643Z"
|
|
34
|
+
fill="#4FC5B3"
|
|
35
35
|
/>
|
|
36
|
-
<path
|
|
37
|
-
d="M32.081 59.9018H32.0813C32.7547 59.9028 33.4245 59.8022 34.0686 59.6033C35.7574 59.0755 37.1703 57.8914 37.9966 56.3106C38.823 54.7296 38.9949 52.8816 38.4745 51.1724L32.081 59.9018ZM32.081 59.9018C30.6542 59.9042 29.2641 59.4439 28.115 58.5882M32.081 59.9018L28.115 58.5882M51.6889 36.8545C53.1333 37.4289 54.3344 38.4952 55.0848 39.8695C55.8353 41.2439 56.0879 42.8401 55.7991 44.3828C55.5103 45.9255 54.6981 47.3177 53.503 48.3194C52.3077 49.3212 50.8045 49.8741 49.2527 49.8749L49.2518 49.8749C48.4196 49.8829 47.5933 49.7319 46.8164 49.4297L46.8166 49.4297L46.7804 49.521C47.569 49.8278 48.4078 49.9812 49.2528 49.973C50.8279 49.9722 52.3533 49.411 53.566 48.3946C54.7787 47.3782 55.6026 45.9658 55.8956 44.4009C56.1886 42.836 55.9323 41.2168 55.171 39.8225C54.4096 38.4282 53.191 37.3463 51.7252 36.7633M51.6889 36.8545L51.689 36.8545L51.7252 36.7633M51.6889 36.8545L51.7252 36.7633M51.6889 36.8545L49.4371 35.9608M51.7252 36.7633L49.4289 35.852L49.4783 35.9367L49.4371 35.9608M49.4371 35.9608L34.6426 44.5926M49.4371 35.9608L34.6426 44.5926M34.6426 44.5926L46.816 49.4295L34.6426 44.5926ZM20.3208 18.9605L20.3907 18.8568L7.273 19.8511C5.52536 19.9798 3.89531 20.7893 2.7261 22.109C1.55688 23.4287 0.939748 25.1557 1.00465 26.9263C1.06954 28.6969 1.81141 30.373 3.07402 31.6016C4.33664 32.8302 6.02147 33.5154 7.77374 33.5129L20.4456 18.951L20.3208 18.9605ZM20.3208 18.9605L7.28042 19.949L7.28021 19.949C5.55826 20.0758 3.95193 20.8734 2.79956 22.1741C1.64717 23.4748 1.03875 25.1772 1.10273 26.9227C1.16671 28.6683 1.89807 30.3204 3.14247 31.5312C4.38684 32.7421 6.0471 33.4172 7.77361 33.4148H7.77374C7.94196 33.4148 8.10911 33.4103 8.27562 33.397L8.27601 33.397L10.719 33.2118M20.3208 18.9605L10.719 33.2118M10.719 33.2118L10.6924 33.2512L10.7738 33.3061L10.7664 33.2082L10.719 33.2118ZM28.115 58.5882C26.9658 57.7326 26.1182 56.5268 25.6967 55.1477L28.115 58.5882ZM52.819 16.5904L52.8194 16.5904C53.2023 16.6245 53.5841 16.6923 53.9605 16.7943C55.6681 17.2571 57.1244 18.387 58.0086 19.9358C58.8928 21.4846 59.1324 23.3253 58.6745 25.0529C58.2166 26.7804 57.0988 28.253 55.5675 29.1468L23.8076 47.6769L44.3843 17.1365L51.7122 16.581C52.0816 16.553 52.4518 16.5563 52.819 16.5904ZM52.8281 16.4926C53.2167 16.5272 53.6042 16.596 53.9861 16.6995C55.7192 17.1692 57.1968 18.3158 58.0938 19.8871C58.9909 21.4584 59.2338 23.3256 58.7693 25.078C58.3048 26.8305 57.1709 28.3245 55.617 29.2316L52.8281 16.4926ZM37.7633 48.8446L38.4745 51.1723L25.6967 55.1476L24.3164 50.6173L31.5714 46.3844L37.7633 48.8446ZM23.8357 5.51852L23.8358 5.51855L27.0312 9.00085L22.1531 16.2411L15.9116 16.728L14.0506 14.6942L14.0506 14.6942C12.8474 13.3818 12.2089 11.6397 12.2758 9.85108C12.3428 8.06243 13.1097 6.37417 14.4075 5.15761C15.7052 3.94109 17.4275 3.29586 19.1955 3.36352C20.9634 3.43118 22.6326 4.20622 23.8357 5.51852ZM13.6156 52.5737C12.4073 52.5706 11.2225 52.2352 10.1881 51.6033C9.15366 50.9715 8.30859 50.0669 7.74349 48.9863C7.17839 47.9058 6.9146 46.6901 6.98044 45.4694C7.04628 44.2488 7.43925 43.0694 8.11715 42.0575C8.11717 42.0575 8.1172 42.0574 8.11722 42.0574L33.2111 4.81244C34.2375 3.41902 35.7561 2.48031 37.45 2.1918C39.1446 1.90318 40.884 2.28749 42.3052 3.26472C43.7265 4.24198 44.7199 5.73676 45.0775 7.43724C45.4351 9.13704 45.1298 10.9107 44.2255 12.3882L19.1315 49.6333C18.5192 50.5416 17.6963 51.2845 16.7348 51.797C15.7733 52.3096 14.7024 52.5762 13.6156 52.5737Z"
|
|
38
|
-
stroke="white"
|
|
39
|
-
strokeOpacity={0.1}
|
|
40
|
-
strokeWidth={0.196305}
|
|
41
|
-
/>
|
|
42
|
-
<defs>
|
|
43
|
-
<linearGradient id="paint0_linear_2845_2276" x1={30} y1={2} x2={30} y2={60} gradientUnits="userSpaceOnUse">
|
|
44
|
-
<stop stopColor="#7FE8D4" />
|
|
45
|
-
<stop offset={1} stopColor="#1FA192" />
|
|
46
|
-
</linearGradient>
|
|
47
|
-
<linearGradient id="paint1_linear_2845_2276" x1={30} y1={2} x2={30} y2={60} gradientUnits="userSpaceOnUse">
|
|
48
|
-
<stop stopColor="#7FE8D4" />
|
|
49
|
-
<stop offset={1} stopColor="#1FA192" />
|
|
50
|
-
</linearGradient>
|
|
51
|
-
<linearGradient id="paint2_linear_2845_2276" x1={30} y1={2} x2={30} y2={60} gradientUnits="userSpaceOnUse">
|
|
52
|
-
<stop stopColor="#7FE8D4" />
|
|
53
|
-
<stop offset={1} stopColor="#1FA192" />
|
|
54
|
-
</linearGradient>
|
|
55
|
-
<linearGradient id="paint3_linear_2845_2276" x1={30} y1={2} x2={30} y2={60} gradientUnits="userSpaceOnUse">
|
|
56
|
-
<stop stopColor="#7FE8D4" />
|
|
57
|
-
<stop offset={1} stopColor="#1FA192" />
|
|
58
|
-
</linearGradient>
|
|
59
|
-
<linearGradient id="paint4_linear_2845_2276" x1={30} y1={2} x2={30} y2={60} gradientUnits="userSpaceOnUse">
|
|
60
|
-
<stop stopColor="#7FE8D4" />
|
|
61
|
-
<stop offset={1} stopColor="#1FA192" />
|
|
62
|
-
</linearGradient>
|
|
63
|
-
<linearGradient id="paint5_linear_2845_2276" x1={30} y1={2} x2={30} y2={60} gradientUnits="userSpaceOnUse">
|
|
64
|
-
<stop stopColor="#7FE8D4" />
|
|
65
|
-
<stop offset={1} stopColor="#1FA192" />
|
|
66
|
-
</linearGradient>
|
|
67
|
-
</defs>
|
|
68
36
|
</svg>
|
|
69
37
|
);
|
|
70
38
|
};
|
|
71
39
|
|
|
72
|
-
const logoPadding = (layout.newMenuIconSize - layout.logoSize) / 2;
|
|
73
|
-
|
|
74
40
|
export const logoContainerStyle = css`
|
|
75
41
|
${{
|
|
76
|
-
padding: logoPadding,
|
|
77
42
|
width: layout.newMenuIconSize,
|
|
78
43
|
height: layout.newMenuIconSize,
|
|
79
44
|
lineHeight: 0,
|
|
80
45
|
}}
|
|
81
46
|
`;
|
|
47
|
+
|
|
48
|
+
export const mobileLogoSize = 28;
|
|
49
|
+
|
|
50
|
+
export const mobileLogoContainerStyle = css`
|
|
51
|
+
${{
|
|
52
|
+
width: mobileLogoSize,
|
|
53
|
+
height: mobileLogoSize,
|
|
54
|
+
lineHeight: 0,
|
|
55
|
+
}}
|
|
56
|
+
`;
|
package/src/new-badge.tsx
CHANGED
|
@@ -2,14 +2,13 @@ import {css} from "@linaria/core";
|
|
|
2
2
|
import {space, textStyles, themeVars} from "./design-system";
|
|
3
3
|
|
|
4
4
|
const newBadgeStyle = css`
|
|
5
|
-
${textStyles.
|
|
5
|
+
${textStyles.heading8}
|
|
6
6
|
display: inline-block;
|
|
7
|
-
padding: ${space.
|
|
8
|
-
color: ${themeVars.
|
|
9
|
-
background-color: ${themeVars.
|
|
10
|
-
border: 1px solid ${themeVars.colorBorderButtonOutlineAccentDefault};
|
|
7
|
+
padding: ${space.s2}px 5px;
|
|
8
|
+
color: ${themeVars.colorTextBadgeNeutral};
|
|
9
|
+
background-color: ${themeVars.colorBgBadgeNeutral};
|
|
11
10
|
vertical-align: text-top;
|
|
12
|
-
border-radius:
|
|
11
|
+
border-radius: ${space.s4}px;
|
|
13
12
|
`;
|
|
14
13
|
|
|
15
14
|
type Props = {children: React.ReactNode};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {useEffect, useMemo, useRef} from "react";
|
|
2
|
+
import {stopPropagation} from "@fibery/react/src/stop-propagation";
|
|
3
|
+
import {hiddenCss, inputCss, textAreaCss} from "./styles";
|
|
4
|
+
import {css, cx} from "@linaria/core";
|
|
5
|
+
import {Stack} from "./stack";
|
|
6
|
+
import {invalidInputClass} from "./edit-unit-styles";
|
|
7
|
+
|
|
8
|
+
type Props = {
|
|
9
|
+
width?: number;
|
|
10
|
+
invalid?: boolean;
|
|
11
|
+
autoSelect?: boolean;
|
|
12
|
+
} & React.ComponentProps<"textarea">;
|
|
13
|
+
|
|
14
|
+
export const TextAreaAutoSized = ({value, placeholder, invalid, autoSelect, ...rest}: Props) => {
|
|
15
|
+
const ref = useRef<HTMLTextAreaElement>(null);
|
|
16
|
+
const initialValue = useRef(value);
|
|
17
|
+
|
|
18
|
+
const hiddenValue = useMemo(() => {
|
|
19
|
+
return !value || !initialValue.current ? placeholder : value;
|
|
20
|
+
}, [placeholder, value]);
|
|
21
|
+
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
if (autoSelect && ref.current) {
|
|
24
|
+
ref.current.select();
|
|
25
|
+
}
|
|
26
|
+
}, [autoSelect]);
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<Stack
|
|
30
|
+
className={css`
|
|
31
|
+
width: 100%;
|
|
32
|
+
`}
|
|
33
|
+
bottom={<div className={cx(inputCss, textAreaCss, hiddenCss)}>{hiddenValue}</div>}
|
|
34
|
+
top={
|
|
35
|
+
<textarea
|
|
36
|
+
ref={ref}
|
|
37
|
+
rows={1} // Allows textarea to shrink to 1 row if there is only 1 row (otherwise it has min 2 by default)
|
|
38
|
+
value={value}
|
|
39
|
+
placeholder={placeholder}
|
|
40
|
+
onClick={stopPropagation}
|
|
41
|
+
{...rest}
|
|
42
|
+
className={cx(inputCss, textAreaCss, invalid && invalidInputClass)}
|
|
43
|
+
/>
|
|
44
|
+
}
|
|
45
|
+
/>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {stopPropagation} from "@fibery/react/src/stop-propagation";
|
|
2
|
+
import {Stack} from "./stack";
|
|
3
|
+
import {cx} from "@linaria/core";
|
|
4
|
+
import {hiddenCss, inputCss, textInlineCss} from "./styles";
|
|
5
|
+
import {invalidInputClass} from "./edit-unit-styles";
|
|
6
|
+
import {useEffect, useMemo, useRef} from "react";
|
|
7
|
+
|
|
8
|
+
type Props = {
|
|
9
|
+
value?: string;
|
|
10
|
+
width?: number;
|
|
11
|
+
invalid?: boolean;
|
|
12
|
+
autoSelect?: boolean;
|
|
13
|
+
} & Omit<React.ComponentProps<"input">, "value">;
|
|
14
|
+
|
|
15
|
+
export const TextInputAutoSized = ({value, placeholder, invalid, autoSelect, ...rest}: Props) => {
|
|
16
|
+
const ref = useRef<HTMLInputElement>(null);
|
|
17
|
+
|
|
18
|
+
const hiddenValue = useMemo(() => {
|
|
19
|
+
let hiddenValue = placeholder || "";
|
|
20
|
+
if (value && value.length > hiddenValue.length - 1) {
|
|
21
|
+
hiddenValue = value;
|
|
22
|
+
}
|
|
23
|
+
return hiddenValue;
|
|
24
|
+
}, [placeholder, value]);
|
|
25
|
+
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
if (autoSelect && ref.current) {
|
|
28
|
+
ref.current.select();
|
|
29
|
+
}
|
|
30
|
+
}, [autoSelect]);
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<Stack
|
|
34
|
+
bottom={<div className={cx(inputCss, textInlineCss, hiddenCss)}>{hiddenValue}</div>}
|
|
35
|
+
top={
|
|
36
|
+
<input
|
|
37
|
+
ref={ref}
|
|
38
|
+
size={1} // Allows input to shrink (otherwise it has size 20 by default)
|
|
39
|
+
value={value || ""}
|
|
40
|
+
type="text"
|
|
41
|
+
placeholder={placeholder}
|
|
42
|
+
onClick={stopPropagation}
|
|
43
|
+
{...rest}
|
|
44
|
+
className={cx(inputCss, invalid && invalidInputClass)}
|
|
45
|
+
/>
|
|
46
|
+
}
|
|
47
|
+
/>
|
|
48
|
+
);
|
|
49
|
+
};
|
package/src/palette.ts
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
export const slate = {
|
|
2
|
-
slateBase: "hsl(0, 0%,
|
|
3
|
-
slate1: "hsl(206,
|
|
4
|
-
slate2: "hsl(210,
|
|
5
|
-
slate3: "hsl(209,
|
|
6
|
-
slate4: "hsl(209,
|
|
7
|
-
slate5: "hsl(208,
|
|
8
|
-
slate6: "hsl(208,
|
|
9
|
-
slate7: "hsl(207,
|
|
10
|
-
slate8: "hsl(205,
|
|
11
|
-
slate9: "hsl(205,
|
|
12
|
-
slate10: "hsl(205,
|
|
13
|
-
slate11: "hsl(204,
|
|
14
|
-
slate12: "hsl(200,
|
|
2
|
+
slateBase: "hsl(0, 0%, 100%)",
|
|
3
|
+
slate1: "hsl(206, 0%, 99%)",
|
|
4
|
+
slate2: "hsl(210, 0%, 97%)",
|
|
5
|
+
slate3: "hsl(209, 0%, 95%)",
|
|
6
|
+
slate4: "hsl(209, 0%, 93%)",
|
|
7
|
+
slate5: "hsl(208, 0%, 91%)",
|
|
8
|
+
slate6: "hsl(208, 0%, 89%)",
|
|
9
|
+
slate7: "hsl(207, 0%, 86%)",
|
|
10
|
+
slate8: "hsl(205, 0%, 78%)",
|
|
11
|
+
slate9: "hsl(205, 0%, 62%)",
|
|
12
|
+
slate10: "hsl(205, 0%, 47%)",
|
|
13
|
+
slate11: "hsl(204, 0%, 37%)",
|
|
14
|
+
slate12: "hsl(200, 0%, 9%)",
|
|
15
15
|
} as const;
|
|
16
16
|
|
|
17
17
|
export const slateDark = {
|
|
18
|
-
slateBase: "hsl(0, 0%,
|
|
19
|
-
slate1: "hsl(200,
|
|
20
|
-
slate2: "hsl(195,
|
|
21
|
-
slate3: "hsl(197,
|
|
22
|
-
slate4: "hsl(198,
|
|
23
|
-
slate5: "hsl(199,
|
|
24
|
-
slate6: "hsl(201,
|
|
25
|
-
slate7: "hsl(203,
|
|
26
|
-
slate8: "hsl(207,
|
|
27
|
-
slate9: "hsl(206,
|
|
28
|
-
slate10: "hsl(206,
|
|
29
|
-
slate11: "hsl(206,
|
|
30
|
-
slate12: "hsl(210,
|
|
18
|
+
slateBase: "hsl(0, 0%, 5%)",
|
|
19
|
+
slate1: "hsl(200, 0%, 9%)",
|
|
20
|
+
slate2: "hsl(195, 0%, 11%)",
|
|
21
|
+
slate3: "hsl(197, 0%, 14%)",
|
|
22
|
+
slate4: "hsl(198, 0%, 16%)",
|
|
23
|
+
slate5: "hsl(199, 0%, 18%)",
|
|
24
|
+
slate6: "hsl(201, 0%, 20%)",
|
|
25
|
+
slate7: "hsl(203, 0%, 24%)",
|
|
26
|
+
slate8: "hsl(207, 0%, 32%)",
|
|
27
|
+
slate9: "hsl(206, 0%, 44%)",
|
|
28
|
+
slate10: "hsl(206, 0%, 50%)",
|
|
29
|
+
slate11: "hsl(206, 0%, 63%)",
|
|
30
|
+
slate12: "hsl(210, 0%, 93%)",
|
|
31
31
|
} as const;
|
|
32
32
|
|
|
33
33
|
export const teal = {
|
|
@@ -61,33 +61,33 @@ export const tealDark = {
|
|
|
61
61
|
} as const;
|
|
62
62
|
|
|
63
63
|
export const indigo = {
|
|
64
|
-
indigo1: "hsl(
|
|
65
|
-
indigo2: "hsl(
|
|
66
|
-
indigo3: "hsl(
|
|
67
|
-
indigo4: "hsl(
|
|
68
|
-
indigo5: "hsl(
|
|
69
|
-
indigo6: "hsl(
|
|
70
|
-
indigo7: "hsl(
|
|
71
|
-
indigo8: "hsl(
|
|
72
|
-
indigo9: "hsl(
|
|
73
|
-
indigo10: "hsl(
|
|
74
|
-
indigo11: "hsl(
|
|
75
|
-
indigo12: "hsl(
|
|
64
|
+
indigo1: "hsl(220, 60%, 99%)",
|
|
65
|
+
indigo2: "hsl(220, 90%, 99%)",
|
|
66
|
+
indigo3: "hsl(220, 88%, 97%)",
|
|
67
|
+
indigo4: "hsl(220, 83%, 95%)",
|
|
68
|
+
indigo5: "hsl(220, 77%, 92%)",
|
|
69
|
+
indigo6: "hsl(220, 72%, 88%)",
|
|
70
|
+
indigo7: "hsl(220, 67%, 82%)",
|
|
71
|
+
indigo8: "hsl(220, 65%, 75%)",
|
|
72
|
+
indigo9: "hsl(220, 62%, 56%)",
|
|
73
|
+
indigo10: "hsl(220, 59%, 51%)",
|
|
74
|
+
indigo11: "hsl(220, 55%, 45%)",
|
|
75
|
+
indigo12: "hsl(220, 62%, 17%)",
|
|
76
76
|
} as const;
|
|
77
77
|
|
|
78
78
|
export const indigoDark = {
|
|
79
|
-
indigo1: "hsl(
|
|
80
|
-
indigo2: "hsl(
|
|
81
|
-
indigo3: "hsl(
|
|
82
|
-
indigo4: "hsl(
|
|
83
|
-
indigo5: "hsl(
|
|
84
|
-
indigo6: "hsl(
|
|
85
|
-
indigo7: "hsl(
|
|
86
|
-
indigo8: "hsl(
|
|
87
|
-
indigo9: "hsl(
|
|
88
|
-
indigo10: "hsl(
|
|
89
|
-
indigo11: "hsl(
|
|
90
|
-
indigo12: "hsl(
|
|
79
|
+
indigo1: "hsl(222, 24%, 10%)",
|
|
80
|
+
indigo2: "hsl(222, 36%, 13%)",
|
|
81
|
+
indigo3: "hsl(222, 43%, 18%)",
|
|
82
|
+
indigo4: "hsl(222, 47%, 21%)",
|
|
83
|
+
indigo5: "hsl(222, 45%, 24%)",
|
|
84
|
+
indigo6: "hsl(222, 43%, 28%)",
|
|
85
|
+
indigo7: "hsl(222, 50%, 35%)",
|
|
86
|
+
indigo8: "hsl(222, 55%, 44%)",
|
|
87
|
+
indigo9: "hsl(222, 60%, 56%)",
|
|
88
|
+
indigo10: "hsl(222, 65%, 62%)",
|
|
89
|
+
indigo11: "hsl(222, 70%, 76%)",
|
|
90
|
+
indigo12: "hsl(222, 83%, 96%)",
|
|
91
91
|
} as const;
|
|
92
92
|
|
|
93
93
|
export const red = {
|
package/src/popup/index.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import {border, space, themeVars} from "./design-system";
|
|
|
3
3
|
import ImageXmark from "./icons/react/ImageXmark";
|
|
4
4
|
import {type ReactNode} from "react";
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
export const richTextEmbedErrorStyle = css`
|
|
7
7
|
height: 380px;
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
@@ -36,7 +36,7 @@ type Props = {
|
|
|
36
36
|
|
|
37
37
|
export const RichTextEmbedError = ({isSelected, label}: Props) => {
|
|
38
38
|
return (
|
|
39
|
-
<div className={cx(
|
|
39
|
+
<div className={cx(richTextEmbedErrorStyle, isSelected && selectedStyle)}>
|
|
40
40
|
<ImageXmark iconSize={32} color={themeVars.disabledTextColor} />
|
|
41
41
|
<div className={textStyle}>{label}</div>
|
|
42
42
|
</div>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {css} from "@linaria/core";
|
|
2
|
-
import cn from "classnames";
|
|
1
|
+
import {css, cx} from "@linaria/core";
|
|
3
2
|
import {CSSObjectWithLabel, MenuProps, components} from "react-select";
|
|
4
3
|
import {border, themeVars} from "../../design-system";
|
|
5
4
|
import {GroupBase} from "../index";
|
|
@@ -15,7 +14,8 @@ export const MenuNulledStyles: CSSObjectWithLabel = {
|
|
|
15
14
|
paddingTop: "",
|
|
16
15
|
paddingBottom: "",
|
|
17
16
|
};
|
|
18
|
-
|
|
17
|
+
|
|
18
|
+
const menuCss = css`
|
|
19
19
|
color: ${themeVars.disabledTextColor};
|
|
20
20
|
z-index: 1050;
|
|
21
21
|
background-color: ${themeVars.colorBgSelectMenu};
|
|
@@ -24,8 +24,14 @@ const MenuRootClass = css`
|
|
|
24
24
|
overflow: hidden;
|
|
25
25
|
`;
|
|
26
26
|
|
|
27
|
-
export function Menu<
|
|
28
|
-
props
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
export function Menu<T, U extends boolean, V extends GroupBase<T>>(props: MenuProps<T, U, V>) {
|
|
28
|
+
return <components.Menu {...props} className={cx(menuCss, "react-select-menu", props.className)} />;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const menuTransparentCss = css`
|
|
32
|
+
background-color: ${themeVars.transparent};
|
|
33
|
+
`;
|
|
34
|
+
|
|
35
|
+
export function MenuTransparent<T, U extends boolean, V extends GroupBase<T>>(props: MenuProps<T, U, V>) {
|
|
36
|
+
return <components.Menu {...props} className={cx(menuTransparentCss, "react-select-menu", props.className)} />;
|
|
31
37
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const SELECT_IN_POPOVER_VALUE_MAX_HEIGHT = 116;
|