@fibery/ui-kit 1.36.2 → 1.38.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 +20 -0
- package/package.json +8 -5
- 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 +19 -7
- package/src/actions-menu/actions-menu-props.tsx +4 -0
- package/src/actions-menu/actions-menu-sub-command-menu.tsx +7 -4
- package/src/actions-menu/actions-menu-sub-menu.tsx +9 -3
- package/src/actions-menu/actions-menu.tsx +24 -8
- package/src/actions-panel.tsx +12 -2
- 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/axis-header.tsx +136 -76
- package/src/badge.tsx +14 -7
- package/src/beta-badge.tsx +12 -8
- package/src/box.tsx +1 -1
- package/src/breadcrumb.tsx +78 -0
- package/src/button/actions-button-compact.tsx +5 -2
- package/src/button/base-button.tsx +7 -4
- package/src/button/button-group.tsx +1 -1
- package/src/button/button.tsx +120 -2
- package/src/button/icon-button.tsx +13 -2
- package/src/button/select-button.tsx +27 -8
- package/src/card-container.tsx +36 -69
- 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 +29 -14
- package/src/command-menu/index.tsx +5 -5
- package/src/context-menu/index.tsx +10 -1
- package/src/count-badge.tsx +57 -0
- package/src/date-picker/date-range-input.tsx +1 -1
- package/src/date-picker/date-range-picker.tsx +6 -3
- package/src/date-picker/fake-date-input.tsx +1 -1
- package/src/date-picker/relative-date-picker.tsx +7 -3
- package/src/date-picker/single-date-input.tsx +1 -1
- package/src/date-picker/single-date-picker.tsx +8 -5
- package/src/date-picker/styles.ts +32 -26
- package/src/date-picker/types.ts +3 -1
- package/src/date-picker/utils.ts +9 -2
- package/src/day-select/day-select.tsx +21 -75
- package/src/day-select/iso-week-day-select.tsx +1 -1
- package/src/day-select/mount-day-select.tsx +2 -2
- package/src/day-select/week-day-select.tsx +1 -5
- package/src/design-system.ts +91 -51
- package/src/dropdown-menu/index.tsx +8 -1
- package/src/emoji-picker/app-icon-picker.tsx +6 -4
- package/src/emoji-picker/emoji-picker-content-with-color.tsx +3 -9
- package/src/emoji-picker/emoji-picker-preview-footer.tsx +1 -1
- package/src/emoji-picker/emoji-picker.tsx +3 -0
- package/src/emoji-picker/emoji.tsx +2 -1
- package/src/emoji-picker/icon-emoji-picker.tsx +83 -68
- package/src/emoji-picker/primitives/footer.tsx +0 -1
- package/src/emoji-picker/primitives/header.tsx +1 -0
- package/src/emoji-picker/primitives/search.tsx +12 -13
- package/src/emoji-picker/primitives/skin-tone.tsx +1 -0
- package/src/emoji-picker/use-responsive-emoji-size.ts +11 -0
- package/src/emoji-picker/utils/emoji-set.ts +2 -1
- package/src/empty-state/empty-state.tsx +6 -0
- 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 +29 -0
- package/src/field-type-icon.tsx +82 -0
- package/src/file-item.tsx +164 -47
- package/src/guide-link.tsx +4 -3
- package/src/hint.tsx +10 -1
- package/src/html-styles.ts +23 -13
- package/src/icons/ast/ActivityFilled.ts +8 -0
- package/src/icons/ast/AiAssistantFilled.ts +8 -0
- package/src/icons/ast/AiFiberyBuild.ts +8 -0
- package/src/icons/ast/Anthropic.ts +1 -1
- 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/CollapseAllHorizontal.ts +8 -0
- package/src/icons/ast/Crosshair.ts +8 -0
- package/src/icons/ast/DateRange.ts +1 -1
- package/src/icons/ast/Document.ts +8 -0
- package/src/icons/ast/EntityCreate.ts +8 -0
- package/src/icons/ast/EntityCreateFilled.ts +8 -0
- package/src/icons/ast/ExpandAll.ts +8 -0
- package/src/icons/ast/ExpandAllHorizontal.ts +8 -0
- package/src/icons/ast/FiberyDesktopApp.ts +8 -0
- package/src/icons/ast/FileDownload.ts +8 -0
- package/src/icons/ast/GlobeUnpublish.ts +8 -0
- package/src/icons/ast/GraduationCapFilled.ts +8 -0
- package/src/icons/ast/Home.ts +1 -1
- package/src/icons/ast/HomeFilled.ts +8 -0
- package/src/icons/ast/ImportFilled.ts +8 -0
- package/src/icons/ast/IntegrationsFilled.ts +8 -0
- package/src/icons/ast/KeyboardHideDown.ts +8 -0
- package/src/icons/ast/LayoutMultiple.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 +1 -1
- package/src/icons/ast/RicheditorHistoryRedo.ts +1 -1
- package/src/icons/ast/RicheditorHistoryUndo.ts +1 -1
- 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/SearchFilled.ts +8 -0
- package/src/icons/ast/SettingsFilled.ts +8 -0
- package/src/icons/ast/SlideMenuFilled.ts +8 -0
- package/src/icons/ast/SpaceApp.ts +8 -0
- package/src/icons/ast/SpaceGenerate.ts +8 -0
- package/src/icons/ast/SpaceScratch.ts +8 -0
- package/src/icons/ast/SpaceTemplate.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/TypeDate.ts +1 -1
- 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 +37 -0
- package/src/icons/react/ActivityFilled.tsx +13 -0
- package/src/icons/react/AiAssistantFilled.tsx +13 -0
- package/src/icons/react/AiFiberyBuild.tsx +13 -0
- package/src/icons/react/Apple.tsx +13 -0
- package/src/icons/react/CollapseAllHorizontal.tsx +13 -0
- package/src/icons/react/Crosshair.tsx +13 -0
- package/src/icons/react/Document.tsx +13 -0
- package/src/icons/react/EntityCreate.tsx +13 -0
- package/src/icons/react/EntityCreateFilled.tsx +13 -0
- package/src/icons/react/ExpandAll.tsx +13 -0
- package/src/icons/react/ExpandAllHorizontal.tsx +13 -0
- package/src/icons/react/FiberyDesktopApp.tsx +13 -0
- package/src/icons/react/FileDownload.tsx +13 -0
- package/src/icons/react/GlobeUnpublish.tsx +13 -0
- package/src/icons/react/GraduationCapFilled.tsx +13 -0
- package/src/icons/react/HomeFilled.tsx +13 -0
- package/src/icons/react/ImportFilled.tsx +13 -0
- package/src/icons/react/IntegrationsFilled.tsx +13 -0
- package/src/icons/react/KeyboardHideDown.tsx +13 -0
- package/src/icons/react/LayoutMultiple.tsx +13 -0
- package/src/icons/react/LocationEdit.tsx +13 -0
- package/src/icons/react/MessagePlus.tsx +13 -0
- package/src/icons/react/RicheditorMarkHighlight.tsx +13 -0
- package/src/icons/react/SearchFilled.tsx +13 -0
- package/src/icons/react/SettingsFilled.tsx +13 -0
- package/src/icons/react/SlideMenuFilled.tsx +13 -0
- package/src/icons/react/SpaceApp.tsx +13 -0
- package/src/icons/react/SpaceGenerate.tsx +13 -0
- package/src/icons/react/SpaceScratch.tsx +13 -0
- package/src/icons/react/SpaceTemplate.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 +37 -0
- package/src/icons/svg/activity-filled.svg +4 -0
- package/src/icons/svg/ai-assistant-filled.svg +3 -0
- package/src/icons/svg/ai-fibery-build.svg +24 -0
- package/src/icons/svg/anthropic.svg +2 -14
- 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/collapse-all-horizontal.svg +3 -0
- package/src/icons/svg/crosshair.svg +4 -0
- package/src/icons/svg/date-range.svg +3 -3
- package/src/icons/svg/document.svg +4 -0
- package/src/icons/svg/entity-create-filled.svg +4 -0
- package/src/icons/svg/entity-create.svg +3 -0
- package/src/icons/svg/expand-all-horizontal.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/file-download.svg +4 -0
- package/src/icons/svg/globe-unpublish.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-filled.svg +3 -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/keyboard-hide-down.svg +1 -0
- package/src/icons/svg/layout-multiple.svg +3 -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 +2 -7
- package/src/icons/svg/open-as-page.svg +2 -3
- package/src/icons/svg/richeditor/history/redo.svg +3 -2
- package/src/icons/svg/richeditor/history/undo.svg +3 -2
- 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/search-filled.svg +3 -0
- package/src/icons/svg/settings-filled.svg +3 -0
- package/src/icons/svg/slide-menu-filled.svg +1 -0
- package/src/icons/svg/space-app.svg +3 -0
- package/src/icons/svg/space-generate.svg +3 -0
- package/src/icons/svg/space-scratch.svg +3 -0
- package/src/icons/svg/space-template.svg +3 -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/type/date.svg +3 -2
- 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/images-gallery/images-gallery.tsx +254 -0
- package/src/images-gallery/zoom.tsx +112 -0
- package/src/integration-compact-info-button.tsx +3 -1
- package/src/is-in-popup.ts +1 -1
- package/src/layout-styles.ts +43 -0
- package/src/lists/actions-menu-row-surface.tsx +3 -1
- package/src/lists/list-row-surface.tsx +9 -2
- package/src/loaders.tsx +6 -6
- package/src/logo.tsx +16 -9
- package/src/mobile-keyboard-aware-popup.tsx +87 -0
- package/src/mobile-styles.ts +10 -0
- package/src/modal-menu/contexts/modal-menu-context.tsx +22 -0
- package/src/modal-menu/contexts/modal-submenu-context.tsx +16 -0
- package/src/modal-menu/index.tsx +14 -0
- package/src/modal-menu/modal-menu-content.tsx +68 -0
- package/src/modal-menu/modal-menu-group.tsx +10 -0
- package/src/modal-menu/modal-menu-item.tsx +37 -0
- package/src/modal-menu/modal-menu-label.tsx +24 -0
- package/src/modal-menu/modal-menu-root.tsx +57 -0
- package/src/modal-menu/modal-menu-separator.tsx +14 -0
- package/src/modal-menu/modal-menu-trigger.tsx +37 -0
- package/src/modal-menu/modal-submenu-content.tsx +49 -0
- package/src/modal-menu/modal-submenu-trigger.tsx +34 -0
- package/src/modal-menu/modal-submenu.tsx +17 -0
- package/src/new-badge.tsx +4 -7
- package/src/number-input/text-area-auto-sized.tsx +47 -0
- package/src/number-input/text-input-auto-sized.tsx +49 -0
- package/src/online-users.tsx +3 -3
- package/src/palette.ts +50 -50
- package/src/popover/index.tsx +687 -0
- package/src/popover/mobile-popup-context.tsx +29 -0
- package/src/{popup → popover}/modifiers.tsx +0 -7
- package/src/{popup → popover}/popup-modifiers-context.ts +3 -3
- package/src/reactions/reaction-button.tsx +30 -45
- package/src/reactions/reaction-picker.tsx +39 -45
- 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 +143 -148
- package/src/select/select-in-popover.tsx +119 -138
- package/src/select/styles.ts +60 -24
- package/src/shortcut-badge.tsx +1 -0
- package/src/tab-nav/tab-nav.tsx +47 -28
- package/src/theme-provider.tsx +9 -1
- package/src/toast/primitives.tsx +8 -1
- package/src/toggle-button/round-toggle-button.tsx +23 -0
- package/src/toggle-button/toggle-button-group.tsx +34 -0
- package/src/toggle-button/toggle-button.tsx +164 -0
- package/src/toggle.tsx +3 -3
- package/src/tooltip-if-overflown.tsx +9 -3
- package/src/tooltip.tsx +2 -2
- 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 +58 -42
- package/src/unit/styles.ts +10 -14
- package/src/unit/types.ts +4 -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 +37 -0
- package/src/use-is-support-hover.ts +1 -1
- package/src/use-on-screen-keyboard-data.tsx +66 -0
- package/src/workflow-progress-icon.tsx +17 -23
- 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/popup/index.tsx +0 -382
- package/src/use-is-phone.ts +0 -5
- /package/src/{popup → popover}/popup-stack-context.tsx +0 -0
- /package/src/{popup → popover}/reference.ts +0 -0
- /package/src/{popup → popover}/styles.ts +0 -0
- /package/src/{popup → popover}/use-click-outside.ts +0 -0
- /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/design-system.ts
CHANGED
|
@@ -27,6 +27,7 @@ export const typeSizes = [30, 24, 18, 16, 14, 12, 10, 8] as const;
|
|
|
27
27
|
export const fontWeight = {
|
|
28
28
|
light: 310, // 300 basic, 310 experiment with a variable Inter
|
|
29
29
|
regular: 410, // 400 basic, 410 experiment with a variable Inter
|
|
30
|
+
mediumLight: 450,
|
|
30
31
|
medium: 500,
|
|
31
32
|
semibold: 600,
|
|
32
33
|
bold: 700,
|
|
@@ -129,7 +130,7 @@ const stateColors = {
|
|
|
129
130
|
const brandColors = {
|
|
130
131
|
red: "#FF5400",
|
|
131
132
|
green: "#08BD9F",
|
|
132
|
-
blue: "#
|
|
133
|
+
blue: "#4978D4",
|
|
133
134
|
} as const;
|
|
134
135
|
|
|
135
136
|
export const getDarkenColor = _.memoize((color: string): string => {
|
|
@@ -141,58 +142,55 @@ export const themeColors = {
|
|
|
141
142
|
brandColors: [brandColors, brandColors],
|
|
142
143
|
stateColors: [stateColors, stateColors],
|
|
143
144
|
colorAI: ["hsla(271, 57%, 61%, 1)", "hsla(272, 43%, 50%, 1)"],
|
|
144
|
-
colorBgAI: ["hsla(271, 57%, 61%, 0.
|
|
145
|
+
colorBgAI: ["hsla(271, 57%, 61%, 0.09)", "hsla(272, 43%, 50%, 0.2)"],
|
|
145
146
|
colorSubtleBgAI: ["hsla(271, 57%, 61%, 0.05)", "hsla(272, 43%, 50%, 0.1)"],
|
|
146
147
|
|
|
148
|
+
// Elevations
|
|
149
|
+
surfaceElevationS: [`0 2px 4px 0 ${blackA.blackA3}`, `0 2px 4px 0 ${whiteA.whiteA3}`],
|
|
150
|
+
surfaceElevationM: [`0 4px 8px 0 ${blackA.blackA5}`, `0 4px 8px 0 ${whiteA.whiteA5}`],
|
|
151
|
+
surfaceElevationL: [`0 8px 12px 0 ${blackA.blackA5}`, `0 8px 12px 0 ${whiteA.whiteA5}`],
|
|
152
|
+
|
|
147
153
|
// Shadows and effects / Elevation
|
|
148
154
|
shadow50: [
|
|
149
|
-
`
|
|
150
|
-
0px 0px 0px
|
|
151
|
-
`,
|
|
152
|
-
`0px 0px 0px 0.5px ${getOpacities(slateDark.slate12).opacity15}`,
|
|
155
|
+
`0px 0px 0px 1px ${getOpacities(slate.slate12).opacity5}`,
|
|
156
|
+
`0px 0px 0px 1px ${getOpacities(slateDark.slate12).opacity10}`,
|
|
153
157
|
],
|
|
154
158
|
shadow100: [
|
|
155
|
-
`
|
|
156
|
-
0px 1px 4px 0px ${getOpacities(slate.slate12).opacity5}
|
|
157
|
-
`,
|
|
159
|
+
`0px 1px 4px 0px ${getOpacities(slate.slate12).opacity5}`,
|
|
158
160
|
`0px 1px 4px 0px ${getOpacities(slate.slate12).opacity10}`,
|
|
159
161
|
],
|
|
160
162
|
shadow200: [
|
|
161
|
-
`
|
|
162
|
-
0px 2px 6px 0px ${getOpacities(slate.slate12).opacity5}
|
|
163
|
-
`,
|
|
163
|
+
`0px 2px 6px 0px ${getOpacities(slate.slate12).opacity5}`,
|
|
164
164
|
`0px 2px 6px 0px ${getOpacities(slate.slate12).opacity10}`,
|
|
165
165
|
],
|
|
166
166
|
shadow300: [
|
|
167
|
-
`
|
|
168
|
-
0px 3px 6px -3px ${getOpacities(slate.slate12).opacity10}, 0px 8px 20px -4px ${
|
|
167
|
+
`0px 3px 6px -3px ${getOpacities(slate.slate12).opacity10}, 0px 8px 20px -4px ${
|
|
169
168
|
getOpacities(slate.slate12).opacity15
|
|
170
|
-
}
|
|
171
|
-
`,
|
|
169
|
+
}`,
|
|
172
170
|
`0px 3px 6px -3px ${getOpacities(slate.slate12).opacity10}, 0px 8px 20px -4px ${
|
|
173
171
|
getOpacities(slate.slate12).opacity15
|
|
174
172
|
}`,
|
|
175
173
|
],
|
|
176
174
|
shadow400: [
|
|
177
|
-
`
|
|
178
|
-
|
|
179
|
-
`,
|
|
175
|
+
`0px 0px 1px 0px ${getOpacities(slate.slate12).opacity20}, 0px 16px 40px 0px ${
|
|
176
|
+
getOpacities(slate.slate12).opacity15
|
|
177
|
+
}`,
|
|
180
178
|
`0px 0px 1px 0px ${getOpacities(slate.slate12).opacity20}, 0px 16px 40px 0px ${
|
|
181
179
|
getOpacities(slate.slate12).opacity15
|
|
182
180
|
}`,
|
|
183
181
|
],
|
|
184
182
|
shadow500: [
|
|
185
|
-
`
|
|
186
|
-
|
|
187
|
-
`,
|
|
183
|
+
`0px 0px 1px 0px ${getOpacities(slate.slate12).opacity20}, 0px 20px 50px 0px ${
|
|
184
|
+
getOpacities(slate.slate12).opacity15
|
|
185
|
+
}`,
|
|
188
186
|
`0px 0px 1px 0px ${getOpacities(slate.slate12).opacity20}, 0px 20px 50px 0px ${
|
|
189
187
|
getOpacities(slate.slate12).opacity15
|
|
190
188
|
}`,
|
|
191
189
|
],
|
|
192
190
|
shadow600: [
|
|
193
|
-
`
|
|
194
|
-
|
|
195
|
-
`,
|
|
191
|
+
`0px 0px 1px 0px ${getOpacities(slate.slate12).opacity20}, 0px 26px 80px 0px ${
|
|
192
|
+
getOpacities(slate.slate12).opacity20
|
|
193
|
+
}`,
|
|
196
194
|
`0px 0px 1px 0px ${getOpacities(slate.slate12).opacity20}, 0px 26px 80px 0px ${
|
|
197
195
|
getOpacities(slate.slate12).opacity20
|
|
198
196
|
}`,
|
|
@@ -213,10 +211,6 @@ export const themeColors = {
|
|
|
213
211
|
getOpacities(slateDark.slate1).opacity5
|
|
214
212
|
}, 0px 10px 26px 0px ${getOpacities(slateDark.slate1).opacity15}`,
|
|
215
213
|
],
|
|
216
|
-
shadowModal: [
|
|
217
|
-
`${getOpacities(slate.slate10).opacity20} 0px 16px 70px`,
|
|
218
|
-
`${getOpacities(slateDark.slate1).opacity40} 0px 16px 70px`,
|
|
219
|
-
],
|
|
220
214
|
shadowSidebar: [
|
|
221
215
|
`-3px 0px 10px 0px ${getOpacities(slate.slate10).opacity10}`,
|
|
222
216
|
`-3px 0px 10px 0px ${getOpacities(slateDark.slate1).opacity80}`,
|
|
@@ -237,7 +231,9 @@ export const themeColors = {
|
|
|
237
231
|
mainBg: [slate.slate3, slateDark.slateBase],
|
|
238
232
|
panelBg: [whiteA.whiteA0, slateDark.slate1],
|
|
239
233
|
panelContentBg: [slate.slate2, slateDark.slate1],
|
|
234
|
+
panelContentBgOpacity80: [getOpacities(slate.slate2).opacity80, getOpacities(slateDark.slate1).opacity80],
|
|
240
235
|
colorBgRelationContainer: [slate.slate2, slateDark.slate1],
|
|
236
|
+
colorBgAISidebarContent: [slate.slate1, slateDark.slate1],
|
|
241
237
|
pageBg: [whiteA.whiteA0, slateDark.slate1],
|
|
242
238
|
pageContentBg: [whiteA.whiteA0, slateDark.slate2],
|
|
243
239
|
colorBgPopup: [whiteA.whiteA0, slateDark.slate4],
|
|
@@ -248,7 +244,7 @@ export const themeColors = {
|
|
|
248
244
|
menuSelectedTextColor: [slate.slate2, slate.slate2],
|
|
249
245
|
menuFooterColor: [getOpacities(whiteA.whiteA0).opacity20, getOpacities(slateDark.slate3).opacity40],
|
|
250
246
|
menuFooterHoverColor: [getOpacities(whiteA.whiteA0).opacity60, slateDark.slate4],
|
|
251
|
-
menuIconColor: [getOpacities(slate.
|
|
247
|
+
menuIconColor: [getOpacities(slate.slate12).opacity70, getOpacities(slateDark.slate12).opacity70],
|
|
252
248
|
menuSelectedIconColor: [getOpacities(slate.slate1).opacity90, getOpacities(slate.slate1).opacity90],
|
|
253
249
|
textColor: [slateDark.slate5, slate.slate6],
|
|
254
250
|
textSelectionColor: [getOpacities(blue.blue10).opacity20, getOpacities(blueDark.blue10).opacity40],
|
|
@@ -269,6 +265,8 @@ export const themeColors = {
|
|
|
269
265
|
codeColor: [red.red9, red.red8],
|
|
270
266
|
codeBgColor: [slate.slate3, slateDark.slate4],
|
|
271
267
|
codeBlockBgColor: [slate.slate3, slateDark.slate4],
|
|
268
|
+
addedDiffTextColor: [teal.teal9, tealDark.teal11],
|
|
269
|
+
removedDiffTextColor: [red.red11, redDark.red11],
|
|
272
270
|
|
|
273
271
|
// Entity
|
|
274
272
|
entityNodeColor: [slateDark.slate3, slate.slate8],
|
|
@@ -284,8 +282,8 @@ export const themeColors = {
|
|
|
284
282
|
entityNodeBgColor: [slate.slate2, slateDark.slate3],
|
|
285
283
|
shortcutTextColor: [slate.slate9, slateDark.slate11],
|
|
286
284
|
shortcutBorderColor: [
|
|
287
|
-
`
|
|
288
|
-
`
|
|
285
|
+
`1px solid ${getOpacities(slate.slate8).opacity50}`,
|
|
286
|
+
`1px solid ${getOpacities(slateDark.slate10).opacity20}`,
|
|
289
287
|
],
|
|
290
288
|
|
|
291
289
|
// Input
|
|
@@ -326,7 +324,7 @@ export const themeColors = {
|
|
|
326
324
|
buttonPrimaryColor: [indigo.indigo9, indigoDark.indigo9],
|
|
327
325
|
buttonColor: [slate.slate10, slateDark.slate10],
|
|
328
326
|
buttonPrimaryTextColor: [slate.slate2, slate.slate6],
|
|
329
|
-
checkboxColor: [slate.
|
|
327
|
+
checkboxColor: [getOpacities(slate.slate12).opacity70, getOpacities(slateDark.slate12).opacity70],
|
|
330
328
|
colorBorderBlockQuote: [slate.slate11, slateDark.slate11],
|
|
331
329
|
|
|
332
330
|
// Actions menu
|
|
@@ -356,8 +354,9 @@ export const themeColors = {
|
|
|
356
354
|
],
|
|
357
355
|
actionMenuSeparatorColor: [getOpacities(blackA.blackA0).opacity10, getOpacities(whiteA.whiteA0).opacity15],
|
|
358
356
|
separatorColor: [getOpacities(blackA.blackA0).opacity10, getOpacities(whiteA.whiteA0).opacity10],
|
|
357
|
+
separatorColorDimmed: [getOpacities(blackA.blackA0).opacity5, getOpacities(whiteA.whiteA0).opacity5],
|
|
359
358
|
separatorBreadcrumbsColor: [slate.slate8, slateDark.slate8],
|
|
360
|
-
iconColor: [slate.
|
|
359
|
+
iconColor: [getOpacities(slate.slate12).opacity70, getOpacities(slateDark.slate12).opacity70],
|
|
361
360
|
appIconColor: [getOpacities(slate.slate2).opacity90, getOpacities(slate.slate2).opacity70],
|
|
362
361
|
appIconBgColor: [getOpacities(slate.slate1).opacity90, getOpacities(slate.slate2).opacity50],
|
|
363
362
|
mentionBgColor: [getOpacities(slate.slate7).opacity30, getOpacities(slateDark.slate7).opacity40],
|
|
@@ -458,7 +457,7 @@ export const themeColors = {
|
|
|
458
457
|
`0 0 0 1px ${getOpacities(slate.slate10).opacity10}, 0 2px 4px -4px ${getOpacities(slate.slate10).opacity20}`,
|
|
459
458
|
`0 0 0 1px ${getOpacities(slateDark.slate2).opacity10}, 0 2px 4px -4px ${getOpacities(slateDark.slate2).opacity20}`,
|
|
460
459
|
],
|
|
461
|
-
|
|
460
|
+
colorBgSegmentedControl: [getOpacities(slate.slate5).opacity80, getOpacities(slateDark.slate3).opacity80],
|
|
462
461
|
colorBgMenuHeaderAvatar: [whiteA.whiteA0, slateDark.slate2],
|
|
463
462
|
shadowMenuHeaderAvatar: [
|
|
464
463
|
`0px 1px 4px ${getOpacities(slate.slate11).opacity10}, 0 0 0 0.5px ${getOpacities(slate.slate5).opacity50}`,
|
|
@@ -476,16 +475,16 @@ export const themeColors = {
|
|
|
476
475
|
// :focus
|
|
477
476
|
colorBgMenuItemFocus: [slate.slate6, slateDark.slate5],
|
|
478
477
|
// Selected
|
|
479
|
-
colorBgMenuItemSelected: [indigo.indigo5, indigoDark.indigo3],
|
|
478
|
+
colorBgMenuItemSelected: [getOpacities(indigo.indigo5).opacity80, indigoDark.indigo3],
|
|
480
479
|
// :hover
|
|
481
|
-
colorBgMenuItemSelectedHover: [indigo.indigo6, indigoDark.indigo5],
|
|
480
|
+
colorBgMenuItemSelectedHover: [getOpacities(indigo.indigo6).opacity70, indigoDark.indigo5],
|
|
482
481
|
// :focus, :focus:hover
|
|
483
482
|
colorBgPinnedFieldsLabel: [slate.slate11, slateDark.slate11],
|
|
484
483
|
colorBgObjectEditorSeparator: [slate.slate12, slateDark.slate12],
|
|
485
484
|
colorBgMenuItemSelectedFocused: [indigo.indigo6, indigoDark.indigo5],
|
|
486
485
|
colorBgFieldEditorContainer: [slate.slate2, slateDark.slate3],
|
|
487
486
|
colorBgFieldEditorLinkEqualSign: [slate.slate6, slateDark.slate2],
|
|
488
|
-
allowedDropColor: [
|
|
487
|
+
allowedDropColor: [slate.slate4, slateDark.slate4],
|
|
489
488
|
relationViewBgColor: [slate.slate2, slateDark.slate3],
|
|
490
489
|
|
|
491
490
|
mySpaceIconColor: [swatches["gray-light"], swatches["gray-light"]],
|
|
@@ -500,7 +499,7 @@ export const themeColors = {
|
|
|
500
499
|
unitBgHover: [slate.slate4, slateDark.slate7],
|
|
501
500
|
|
|
502
501
|
// Badges
|
|
503
|
-
colorBgBadgeNeutral: [getOpacities(indigo.
|
|
502
|
+
colorBgBadgeNeutral: [getOpacities(indigo.indigo5).opacity70, getOpacities(indigoDark.indigo4).opacity80],
|
|
504
503
|
colorBgBadgeSuccess: [teal.teal5, tealDark.teal5],
|
|
505
504
|
colorBgBadgeWarning: [yellow.yellow5, yellowDark.yellow5],
|
|
506
505
|
colorBgBadgeError: [red.red5, redDark.red5],
|
|
@@ -532,8 +531,8 @@ export const themeColors = {
|
|
|
532
531
|
appCardHoverColor: [getOpacities(slate.slate1).opacity95, slateDark.slate2],
|
|
533
532
|
modalBg: [getOpacities(slate.slate11).opacity20, getOpacities(slateDark.slate2).opacity50],
|
|
534
533
|
modalContentBg: [whiteA.whiteA0, slateDark.slate3],
|
|
535
|
-
progressIconBg: [
|
|
536
|
-
progressIconFill: [
|
|
534
|
+
progressIconBg: [blackA.blackA7, whiteA.whiteA7],
|
|
535
|
+
progressIconFill: [blackA.blackA11, whiteA.whiteA11],
|
|
537
536
|
selectedColorBorder: [getOpacities(slate.slate6).opacity25, getOpacities(slate.slate6).opacity25],
|
|
538
537
|
formBg: [slate.slate2, slateDark.slate2],
|
|
539
538
|
formHeaderShadow: [
|
|
@@ -573,6 +572,14 @@ export const themeColors = {
|
|
|
573
572
|
colorBorderRichTextMedia: [blackA.blackA7, blackA.blackA7],
|
|
574
573
|
richTextTableBorder: [blackA.blackA5, whiteA.whiteA7],
|
|
575
574
|
|
|
575
|
+
// Drag and drop
|
|
576
|
+
colorBgDropLine: [indigo.indigo8, indigoDark.indigo8],
|
|
577
|
+
|
|
578
|
+
// Board
|
|
579
|
+
boardBg: [slate.slate1, slateDark.slate1],
|
|
580
|
+
boardBgWithOpacity80: [getOpacities(slate.slate1).opacity80, getOpacities(slateDark.slate1).opacity80],
|
|
581
|
+
boardAxisBgHover: [slate.slate4, slateDark.slate4],
|
|
582
|
+
|
|
576
583
|
// Grid
|
|
577
584
|
gridHeaderBgColor: [slate.slate2, slateDark.slate3],
|
|
578
585
|
gridHeaderHoverBgColor: [slate.slate3, slateDark.slate4],
|
|
@@ -594,7 +601,8 @@ export const themeColors = {
|
|
|
594
601
|
timelineDependencyOverlapHoverBgColor: [red.red11, redDark.red11],
|
|
595
602
|
timelineCellBgColor: [slate.slate1, slateDark.slate1],
|
|
596
603
|
timelineCellWeekendBgColor: [slate.slate2, slateDark.slate2],
|
|
597
|
-
timelineCellTodayBgColor: [indigo.
|
|
604
|
+
timelineCellTodayBgColor: [indigo.indigo4, indigoDark.indigo2],
|
|
605
|
+
timelineCreateEntityPlaceholderBgColor: [getOpacities(slate.slate11).opacity20, slateDark.slate7],
|
|
598
606
|
|
|
599
607
|
// #region buttons
|
|
600
608
|
// solid
|
|
@@ -685,8 +693,8 @@ export const themeColors = {
|
|
|
685
693
|
colorBorderNeutralFocusRing: [getOpacities(slate.slate9).opacity30, getOpacities(slate.slate9).opacity30],
|
|
686
694
|
colorBorderDestructiveFocusRing: [getOpacities(red.red9).opacity30, getOpacities(red.red9).opacity30],
|
|
687
695
|
|
|
688
|
-
colorBgReactionsDefault: [
|
|
689
|
-
colorBgReactionsHover: [
|
|
696
|
+
colorBgReactionsDefault: [whiteA.whiteA0, slateDark.slate2],
|
|
697
|
+
colorBgReactionsHover: [slate.slate3, slateDark.slate6],
|
|
690
698
|
colorBorderReactionsHover: [slate.slate8, slateDark.slate9],
|
|
691
699
|
colorBgReactionsSelectedDefault: [indigo.indigo3, indigoDark.indigo8],
|
|
692
700
|
colorBorderReactionsSelectedDefault: [indigo.indigo8, indigoDark.indigo8],
|
|
@@ -699,7 +707,7 @@ export const themeColors = {
|
|
|
699
707
|
colorBgTabHover: [getOpacities(slate.slate11).opacity10, getOpacities(slateDark.slate11).opacity10],
|
|
700
708
|
|
|
701
709
|
// Chat
|
|
702
|
-
colorBgMessageContainer: [
|
|
710
|
+
colorBgMessageContainer: [blackA.blackA3, slateDark.slate6],
|
|
703
711
|
colorBgMessageContainerHover: [slate.slate2, slateDark.slate3],
|
|
704
712
|
colorBgEntityAvatarDefault: [indigo.indigo1, indigoDark.indigo1],
|
|
705
713
|
colorBgEntityAvatarHover: [indigo.indigo3, indigoDark.indigo3],
|
|
@@ -707,7 +715,7 @@ export const themeColors = {
|
|
|
707
715
|
colorTextEntityAvatarHover: [indigo.indigo9, indigoDark.indigo9],
|
|
708
716
|
|
|
709
717
|
// Text editor
|
|
710
|
-
colorBgEditorImageZoomed: [
|
|
718
|
+
colorBgEditorImageZoomed: [slate.slate3, slateDark.slate6],
|
|
711
719
|
|
|
712
720
|
//Whiteboard
|
|
713
721
|
instrumentsMenuBg: [getOpacities(whiteA.whiteA0).opacity100, getOpacities(slateDark.slate4).opacity100],
|
|
@@ -808,15 +816,12 @@ function getTypeColors(themeColor: string, theme: ThemeMode) {
|
|
|
808
816
|
} catch (e) {
|
|
809
817
|
color = brandColors.green;
|
|
810
818
|
}
|
|
811
|
-
const boardBg = chroma(color).luminance(0.85).desaturate(0.2).set("hsl.h", "+2");
|
|
812
819
|
|
|
813
820
|
const lightTypeColors = {
|
|
814
821
|
primary: color,
|
|
815
822
|
opacity: getOpacities(color),
|
|
816
823
|
darkenPrimary: getDarkenColor(color),
|
|
817
824
|
brightenPrimary: chroma(color).luminance(0.92).desaturate(0.1).alpha(0.98).css(),
|
|
818
|
-
boardBg: boardBg.hex(),
|
|
819
|
-
boardBgOverlay: boardBg.alpha(0.8).css(),
|
|
820
825
|
headerBg: chroma(color).luminance(0.7).desaturate(0.5).set("hsl.h", "+2").css(),
|
|
821
826
|
detailsBg: chroma(color).alpha(0.5).luminance(0.85).hex(),
|
|
822
827
|
focus: chroma(color).alpha(0.25).css(),
|
|
@@ -828,8 +833,6 @@ function getTypeColors(themeColor: string, theme: ThemeMode) {
|
|
|
828
833
|
opacity: getOpacities(color),
|
|
829
834
|
darkenPrimary: getDarkenColor(color),
|
|
830
835
|
brightenPrimary: chroma(color).luminance(0.92).desaturate(0.1).alpha(0.98).css(),
|
|
831
|
-
boardBg: boardBg.hex(),
|
|
832
|
-
boardBgOverlay: boardBg.alpha(0.8).css(),
|
|
833
836
|
headerBg: chroma(color).luminance(0.7).desaturate(0.5).set("hsl.h", "+2").css(),
|
|
834
837
|
detailsBg: chroma(color).alpha(0.03).luminance(0.8).desaturate(0.8).darken(0.1).hex(),
|
|
835
838
|
focus: chroma(color).alpha(0.25).css(),
|
|
@@ -912,6 +915,10 @@ export const getEnumBackgroundColor = _.memoize(
|
|
|
912
915
|
(themeMode, color) => `${themeMode}-${color}`
|
|
913
916
|
);
|
|
914
917
|
|
|
918
|
+
export const getEnumTextColor = (color: string) => {
|
|
919
|
+
return `color-mix(in srgb, ${color} 25%, ${themeVars.textColor} 75%)`;
|
|
920
|
+
};
|
|
921
|
+
|
|
915
922
|
// TODO: fix color for light2. It should same as 'dark' only on dark menu but same as 'light' on other parts of application
|
|
916
923
|
export const getAppIconBackgroundColor = (mode: ThemeMode, color: string) =>
|
|
917
924
|
getThemeValue(mode, {
|
|
@@ -948,6 +955,7 @@ export const space = {
|
|
|
948
955
|
s2: 2,
|
|
949
956
|
s3: 3,
|
|
950
957
|
s4: 4,
|
|
958
|
+
s5: 5,
|
|
951
959
|
s6: 6,
|
|
952
960
|
s8: 8,
|
|
953
961
|
s10: 10,
|
|
@@ -976,6 +984,8 @@ export const spaceNestedTreeInterval = 0;
|
|
|
976
984
|
export const layout = {
|
|
977
985
|
logoSize: 18,
|
|
978
986
|
menuDefaultWidth: 243,
|
|
987
|
+
fiberyAiSidebarDefaultWidth: 420,
|
|
988
|
+
fiberyAiSidebarMaxWidth: 920,
|
|
979
989
|
desktopToolbarHeight: 32,
|
|
980
990
|
desktopMenuMinWidth: 240,
|
|
981
991
|
collapsedMenuMinWidth: 47,
|
|
@@ -985,13 +995,17 @@ export const layout = {
|
|
|
985
995
|
menuGroupHeaderIndent: 28, // I'm ok
|
|
986
996
|
menuItemLevelIndent: 24,
|
|
987
997
|
listItemHeight: 38,
|
|
998
|
+
mobileListItemHeight: 44,
|
|
988
999
|
itemHeight: 36,
|
|
989
1000
|
itemWithSubtitleHeight: 52,
|
|
990
1001
|
groupTitleHeight: 30,
|
|
991
1002
|
enumItemHeight: 32,
|
|
992
1003
|
menuItemHeight: 32,
|
|
1004
|
+
mobileMenuItemHeight: 44,
|
|
993
1005
|
newMenuItemHeight: 28, // I'm ok
|
|
1006
|
+
mobileSidebarMenuItemHeight: 44,
|
|
994
1007
|
newMenuIconSize: 18,
|
|
1008
|
+
mobileSidebarIconSize: 20,
|
|
995
1009
|
viewHeaderHeight: space.s12 * 7,
|
|
996
1010
|
viewHeaderCompactHeight: 52,
|
|
997
1011
|
columnMinWidth: 240,
|
|
@@ -1019,6 +1033,18 @@ export const layout = {
|
|
|
1019
1033
|
unitHeight: 18,
|
|
1020
1034
|
} as const;
|
|
1021
1035
|
|
|
1036
|
+
export const menuItemHeightVar = `--${varPrefix}-layout-menuItemHeight`;
|
|
1037
|
+
export const sidebarMenuItemHeightVar = `--${varPrefix}-layout-sidebarMenuItemHeight`;
|
|
1038
|
+
export const sidebarMenuIconSizeVar = `--${varPrefix}-layout-sidebarMenuIconSize`;
|
|
1039
|
+
export const listRowSurfaceFontSizeVar = `--${varPrefix}-layout-listRowSurfaceFontSize`;
|
|
1040
|
+
|
|
1041
|
+
export const layoutVars = {
|
|
1042
|
+
menuItemHeight: `var(${menuItemHeightVar})`,
|
|
1043
|
+
sidebarMenuItemHeight: `var(${sidebarMenuItemHeightVar})`,
|
|
1044
|
+
sidebarMenuIconSize: `var(${sidebarMenuIconSizeVar})`,
|
|
1045
|
+
listRowSurfaceFontSize: `var(${listRowSurfaceFontSizeVar})`,
|
|
1046
|
+
};
|
|
1047
|
+
|
|
1022
1048
|
export const border = {
|
|
1023
1049
|
radius0: 0,
|
|
1024
1050
|
radius1: 1,
|
|
@@ -1197,6 +1223,13 @@ export const textStyles = {
|
|
|
1197
1223
|
fontWeight: fontWeight.regular,
|
|
1198
1224
|
color: themeVars.textColor,
|
|
1199
1225
|
},
|
|
1226
|
+
heading8: {
|
|
1227
|
+
fontFamily,
|
|
1228
|
+
fontSize: typeSizes[6],
|
|
1229
|
+
lineHeight: lineHeight.heading,
|
|
1230
|
+
fontWeight: fontWeight.medium,
|
|
1231
|
+
color: themeVars.textColor,
|
|
1232
|
+
},
|
|
1200
1233
|
big: {
|
|
1201
1234
|
fontFamily,
|
|
1202
1235
|
fontSize: typeSizes[3],
|
|
@@ -1268,4 +1301,11 @@ export const textStyles = {
|
|
|
1268
1301
|
fontFeatureSettings: '"tnum" 0',
|
|
1269
1302
|
},
|
|
1270
1303
|
},
|
|
1304
|
+
inherit: {
|
|
1305
|
+
fontFamily: "inherit",
|
|
1306
|
+
fontSize: "inherit",
|
|
1307
|
+
lineHeight: "inherit",
|
|
1308
|
+
fontWeight: "inherit",
|
|
1309
|
+
color: "inherit",
|
|
1310
|
+
},
|
|
1271
1311
|
} as const;
|
|
@@ -4,6 +4,7 @@ import {styled} from "@linaria/react";
|
|
|
4
4
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
5
5
|
import {forwardRef} from "react";
|
|
6
6
|
import {border, layout, space, textStyles, themeVars} from "../design-system";
|
|
7
|
+
import {mobileRootSelector} from "../mobile-styles";
|
|
7
8
|
|
|
8
9
|
export const Root = (dropdownMenuProps: DropdownMenuPrimitive.DropdownMenuProps) => (
|
|
9
10
|
<DropdownMenuPrimitive.Root dir="ltr" modal={false} {...dropdownMenuProps} />
|
|
@@ -22,7 +23,7 @@ const rowItemStyles = {
|
|
|
22
23
|
margin: `0px ${space.s4}px`,
|
|
23
24
|
cursor: "pointer",
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
'&:hover,&[data-highlighted],&[aria-expanded="true"]': {
|
|
26
27
|
marginLeft: 4,
|
|
27
28
|
marginRight: 4,
|
|
28
29
|
backgroundColor: themeVars.colorBgActionsMenuItemHover,
|
|
@@ -37,6 +38,12 @@ const rowItemStyles = {
|
|
|
37
38
|
backgroundColor: "unset",
|
|
38
39
|
},
|
|
39
40
|
},
|
|
41
|
+
|
|
42
|
+
[`${mobileRootSelector} &`]: {
|
|
43
|
+
...textStyles.big,
|
|
44
|
+
minHeight: layout.mobileMenuItemHeight,
|
|
45
|
+
padding: `0px ${space.s12}px`,
|
|
46
|
+
},
|
|
40
47
|
};
|
|
41
48
|
|
|
42
49
|
const dropdownMenuContentStyles = css`
|
|
@@ -12,6 +12,7 @@ const i18n = {search: "Search icon...", notfound: "No Icons Found"};
|
|
|
12
12
|
|
|
13
13
|
export type AppIconPickerProps = {
|
|
14
14
|
color?: string;
|
|
15
|
+
emojiSize?: number;
|
|
15
16
|
getHoverColor?: (color: string) => string | undefined;
|
|
16
17
|
colors?: string[];
|
|
17
18
|
onColorSelect?: (c: $TSFixMe) => void;
|
|
@@ -27,6 +28,7 @@ export const AppIconPicker: React.FC<AppIconPickerProps> = ({
|
|
|
27
28
|
onColorSelect,
|
|
28
29
|
getHoverColor,
|
|
29
30
|
autoFocus = true,
|
|
31
|
+
emojiSize = 20,
|
|
30
32
|
}) => {
|
|
31
33
|
const themeMode = useThemeMode();
|
|
32
34
|
|
|
@@ -35,8 +37,8 @@ export const AppIconPicker: React.FC<AppIconPickerProps> = ({
|
|
|
35
37
|
<svg
|
|
36
38
|
style={{
|
|
37
39
|
display: "block",
|
|
38
|
-
width:
|
|
39
|
-
height:
|
|
40
|
+
width: emojiSize,
|
|
41
|
+
height: emojiSize,
|
|
40
42
|
fill: color ? getIconColor(themeMode, color) : undefined,
|
|
41
43
|
}}
|
|
42
44
|
viewBox="0 0 24 24"
|
|
@@ -44,12 +46,12 @@ export const AppIconPicker: React.FC<AppIconPickerProps> = ({
|
|
|
44
46
|
<use href={(emoji as CustomEmoji).imageUrl} />
|
|
45
47
|
</svg>
|
|
46
48
|
),
|
|
47
|
-
[color, themeMode]
|
|
49
|
+
[color, themeMode, emojiSize]
|
|
48
50
|
);
|
|
49
51
|
|
|
50
52
|
return (
|
|
51
53
|
<EmojiPickerRoot i18n={i18n} onEmojiSelect={onSelect}>
|
|
52
|
-
<EmojiPickerContent emojiHoverColor={color ? getHoverColor?.(color) : undefined} emojiSize={
|
|
54
|
+
<EmojiPickerContent emojiHoverColor={color ? getHoverColor?.(color) : undefined} emojiSize={emojiSize}>
|
|
53
55
|
<LazyIconDataStore fallback={<div style={{height: "302px"}}></div>}>
|
|
54
56
|
<EmojiPickerContentWithColor
|
|
55
57
|
color={color}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import {css} from "@linaria/core";
|
|
2
2
|
import {useRef, useState} from "react";
|
|
3
|
-
import {IconButton} from "../button/icon-button";
|
|
4
3
|
import {CollapsibleContent, CollapsibleRoot, CollapsibleTrigger} from "../collapsible";
|
|
5
4
|
import {ColorPicker} from "../color-picker";
|
|
6
|
-
import {getIconColor, space} from "../design-system";
|
|
7
|
-
import ColorCoding from "../icons/react/ColorCoding";
|
|
8
|
-
import ColorCodingFilled from "../icons/react/ColorCodingFilled";
|
|
5
|
+
import {getIconColor, space, themeVars} from "../design-system";
|
|
9
6
|
import {useThemeMode} from "../theme-provider";
|
|
10
7
|
import {Tooltip} from "../tooltip";
|
|
11
8
|
import {$TSFixMe} from "../tsfixme";
|
|
12
9
|
import {EmojiPickerGrid, type EmojiPickerGridHandle, EmojiPickerGridProps} from "./primitives/grid";
|
|
13
10
|
import {EmojiPickerHeader} from "./primitives/header";
|
|
14
11
|
import {EmojiPickerSearch} from "./primitives/search";
|
|
12
|
+
import {Swatch} from "../color-picker/swatch";
|
|
15
13
|
|
|
16
14
|
const colorPickerWrapperCss = css`
|
|
17
15
|
padding-top: ${space.s12}px;
|
|
@@ -23,16 +21,12 @@ const ColorPickerCollapsibleTrigger: React.FC<ColorPickerCollapsibleTrigger> = (
|
|
|
23
21
|
const themeMode = useThemeMode();
|
|
24
22
|
const iconColor = color ? getIconColor(themeMode, color) : undefined;
|
|
25
23
|
|
|
26
|
-
const Icon = opened ? ColorCoding : ColorCodingFilled;
|
|
27
|
-
|
|
28
24
|
const label = opened ? "Hide color picker" : "Show color picker";
|
|
29
25
|
|
|
30
26
|
return (
|
|
31
27
|
<CollapsibleTrigger asChild>
|
|
32
28
|
<Tooltip title={label}>
|
|
33
|
-
<
|
|
34
|
-
<Icon color={iconColor} />
|
|
35
|
-
</IconButton>
|
|
29
|
+
<Swatch data-testid="emoji-picker-color-trigger" size="small" color={iconColor || themeVars.iconColor} />
|
|
36
30
|
</Tooltip>
|
|
37
31
|
</CollapsibleTrigger>
|
|
38
32
|
);
|
|
@@ -70,7 +70,7 @@ export const EmojiPickerPreviewFooter: React.FC<{
|
|
|
70
70
|
{emojiPreview ? (
|
|
71
71
|
<EmojiPreview emoji={emojiPreview.emoji} />
|
|
72
72
|
) : onAddCustomEmoji ? (
|
|
73
|
-
<Button variant="outline" color="neutral" size="small" onClick={onAddCustomEmoji}>
|
|
73
|
+
<Button variant="outline" color="neutral" size="small" supportMobile onClick={onAddCustomEmoji}>
|
|
74
74
|
Add Emoji
|
|
75
75
|
</Button>
|
|
76
76
|
) : null}
|
|
@@ -19,6 +19,7 @@ export type EmojiPickerProps = {
|
|
|
19
19
|
onSelect: (emoji: EmojiItem) => void;
|
|
20
20
|
showSkinTones?: boolean;
|
|
21
21
|
searchRef?: React.RefObject<HTMLInputElement>;
|
|
22
|
+
searchAutofocus?: boolean;
|
|
22
23
|
};
|
|
23
24
|
export const EmojiPicker: React.FC<EmojiPickerProps> = ({
|
|
24
25
|
onSelect,
|
|
@@ -30,6 +31,7 @@ export const EmojiPicker: React.FC<EmojiPickerProps> = ({
|
|
|
30
31
|
getHoverColor,
|
|
31
32
|
showSkinTones,
|
|
32
33
|
searchRef,
|
|
34
|
+
searchAutofocus,
|
|
33
35
|
emojiSize = 20,
|
|
34
36
|
}) => {
|
|
35
37
|
const showFooter = Boolean(onAddCustomEmoji) || showSkinTones;
|
|
@@ -43,6 +45,7 @@ export const EmojiPicker: React.FC<EmojiPickerProps> = ({
|
|
|
43
45
|
getHoverColor={getHoverColor}
|
|
44
46
|
onColorSelect={onColorSelect}
|
|
45
47
|
searchRef={searchRef}
|
|
48
|
+
searchAutofocus={searchAutofocus}
|
|
46
49
|
/>
|
|
47
50
|
|
|
48
51
|
{showFooter ? (
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import {isAndroid} from "../is-android";
|
|
1
2
|
import {Emoji as EmojiPrimitive, EmojiProps as EmojiPrimitiveProps} from "./primitives/emoji";
|
|
2
3
|
import {isApple} from "./utils/emoji-set";
|
|
3
4
|
import {detectEmojiSupportLevel} from "./utils/emoji-support";
|
|
4
5
|
|
|
5
6
|
export type EmojiProps = EmojiPrimitiveProps;
|
|
6
7
|
export const Emoji: React.FC<EmojiPrimitiveProps> = (props) => {
|
|
7
|
-
return <EmojiPrimitive version={detectEmojiSupportLevel()} native={isApple()} {...props} />;
|
|
8
|
+
return <EmojiPrimitive version={detectEmojiSupportLevel()} native={isApple() || isAndroid()} {...props} />;
|
|
8
9
|
};
|