@fibery/ui-kit 1.15.0 → 1.17.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/package.json +8 -6
- package/src/Button/actions-button-compact.tsx +13 -0
- package/src/Button/actions-button.tsx +30 -0
- package/src/Button/button-base.tsx +2 -12
- package/src/Button/button.tsx +3 -34
- package/src/Select/components.tsx +6 -0
- package/src/Select/styles.ts +9 -4
- package/src/antd/styles.ts +5 -5
- package/src/designSystem.ts +11 -26
- package/src/emoji-picker/app-icon-picker.tsx +31 -26
- package/src/emoji-picker/emoji-picker-content-with-color.tsx +110 -0
- package/src/emoji-picker/emoji-picker.tsx +34 -39
- package/src/emoji-picker/icon-emoji-picker.tsx +3 -14
- package/src/emoji-picker/primitives/category.tsx +82 -25
- package/src/emoji-picker/primitives/emoji.tsx +7 -49
- package/src/emoji-picker/primitives/footer.tsx +3 -1
- package/src/emoji-picker/primitives/grid.tsx +56 -24
- package/src/emoji-picker/primitives/search.tsx +21 -11
- package/src/emoji-picker/primitives/skin-tone.tsx +18 -12
- package/src/emoji-picker/stores/emoji-data-store.tsx +0 -1
- package/src/emoji-picker/stores/lazy-icon-data-store.tsx +19 -30
- package/src/icons/ast/AiAssistant.ts +1 -1
- package/src/icons/ast/AiAvatar.ts +1 -1
- package/src/icons/ast/AppDetails.ts +1 -1
- package/src/icons/ast/AppTemplates.ts +1 -1
- package/src/icons/ast/BellCircle.ts +8 -0
- package/src/icons/ast/BellX.ts +8 -0
- package/src/icons/ast/Bolt.ts +8 -0
- package/src/icons/ast/CheckCircle.ts +8 -0
- package/src/icons/ast/ClockForward.ts +8 -0
- package/src/icons/ast/ColorCodingFilled.ts +8 -0
- package/src/icons/ast/Delete.ts +1 -1
- package/src/icons/ast/EmojiDelete.ts +8 -0
- package/src/icons/ast/ExtensionAssignments.ts +1 -1
- package/src/icons/ast/Fields.ts +1 -1
- package/src/icons/ast/Figma.ts +8 -0
- package/src/icons/ast/FocusMode.ts +1 -1
- package/src/icons/ast/GoogleDrive.ts +8 -0
- package/src/icons/ast/GoogleMap.ts +8 -0
- package/src/icons/ast/InvitePeople.ts +1 -1
- package/src/icons/ast/Loom.ts +8 -0
- package/src/icons/ast/Miro.ts +8 -0
- package/src/icons/ast/Mixpanel.ts +8 -0
- package/src/icons/ast/RicheditorBlockCode.ts +1 -1
- package/src/icons/ast/RicheditorBlockEmbed.ts +8 -0
- package/src/icons/ast/RicheditorImageZoom.ts +1 -1
- package/src/icons/ast/RicheditorMarkCode.ts +1 -1
- package/src/icons/ast/RicheditorOpenLink.ts +1 -1
- package/src/icons/ast/Shared.ts +1 -1
- package/src/icons/ast/Twitter.ts +8 -0
- package/src/icons/ast/Youtube.ts +8 -0
- package/src/icons/ast/index.tsx +16 -0
- package/src/icons/react/BellCircle.tsx +12 -0
- package/src/icons/react/BellX.tsx +12 -0
- package/src/icons/react/Bolt.tsx +12 -0
- package/src/icons/react/CheckCircle.tsx +12 -0
- package/src/icons/react/ClockForward.tsx +12 -0
- package/src/icons/react/ColorCodingFilled.tsx +12 -0
- package/src/icons/react/EmojiDelete.tsx +12 -0
- package/src/icons/react/Figma.tsx +12 -0
- package/src/icons/react/GoogleDrive.tsx +12 -0
- package/src/icons/react/GoogleMap.tsx +12 -0
- package/src/icons/react/Loom.tsx +12 -0
- package/src/icons/react/Miro.tsx +12 -0
- package/src/icons/react/Mixpanel.tsx +12 -0
- package/src/icons/react/RicheditorBlockEmbed.tsx +12 -0
- package/src/icons/react/Twitter.tsx +12 -0
- package/src/icons/react/Youtube.tsx +12 -0
- package/src/icons/react/index.tsx +16 -0
- package/src/tooltip.tsx +75 -53
- package/src/Button/icon-button-with-tooltip.tsx +0 -15
- package/src/emoji-picker/index.tsx +0 -5
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This icon file is generated automatically.
|
|
2
|
+
|
|
3
|
+
import FigmaSvg from '../ast/Figma';
|
|
4
|
+
import { Icon } from '../Icon';
|
|
5
|
+
import { IconBaseProps } from '../types';
|
|
6
|
+
|
|
7
|
+
const Figma = (
|
|
8
|
+
props: IconBaseProps,
|
|
9
|
+
): JSX.Element => <Icon {...props} icon={FigmaSvg} />;
|
|
10
|
+
|
|
11
|
+
Figma.displayName = 'Figma';
|
|
12
|
+
export default Figma;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This icon file is generated automatically.
|
|
2
|
+
|
|
3
|
+
import GoogleDriveSvg from '../ast/GoogleDrive';
|
|
4
|
+
import { Icon } from '../Icon';
|
|
5
|
+
import { IconBaseProps } from '../types';
|
|
6
|
+
|
|
7
|
+
const GoogleDrive = (
|
|
8
|
+
props: IconBaseProps,
|
|
9
|
+
): JSX.Element => <Icon {...props} icon={GoogleDriveSvg} />;
|
|
10
|
+
|
|
11
|
+
GoogleDrive.displayName = 'GoogleDrive';
|
|
12
|
+
export default GoogleDrive;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This icon file is generated automatically.
|
|
2
|
+
|
|
3
|
+
import GoogleMapSvg from '../ast/GoogleMap';
|
|
4
|
+
import { Icon } from '../Icon';
|
|
5
|
+
import { IconBaseProps } from '../types';
|
|
6
|
+
|
|
7
|
+
const GoogleMap = (
|
|
8
|
+
props: IconBaseProps,
|
|
9
|
+
): JSX.Element => <Icon {...props} icon={GoogleMapSvg} />;
|
|
10
|
+
|
|
11
|
+
GoogleMap.displayName = 'GoogleMap';
|
|
12
|
+
export default GoogleMap;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This icon file is generated automatically.
|
|
2
|
+
|
|
3
|
+
import LoomSvg from '../ast/Loom';
|
|
4
|
+
import { Icon } from '../Icon';
|
|
5
|
+
import { IconBaseProps } from '../types';
|
|
6
|
+
|
|
7
|
+
const Loom = (
|
|
8
|
+
props: IconBaseProps,
|
|
9
|
+
): JSX.Element => <Icon {...props} icon={LoomSvg} />;
|
|
10
|
+
|
|
11
|
+
Loom.displayName = 'Loom';
|
|
12
|
+
export default Loom;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This icon file is generated automatically.
|
|
2
|
+
|
|
3
|
+
import MiroSvg from '../ast/Miro';
|
|
4
|
+
import { Icon } from '../Icon';
|
|
5
|
+
import { IconBaseProps } from '../types';
|
|
6
|
+
|
|
7
|
+
const Miro = (
|
|
8
|
+
props: IconBaseProps,
|
|
9
|
+
): JSX.Element => <Icon {...props} icon={MiroSvg} />;
|
|
10
|
+
|
|
11
|
+
Miro.displayName = 'Miro';
|
|
12
|
+
export default Miro;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This icon file is generated automatically.
|
|
2
|
+
|
|
3
|
+
import MixpanelSvg from '../ast/Mixpanel';
|
|
4
|
+
import { Icon } from '../Icon';
|
|
5
|
+
import { IconBaseProps } from '../types';
|
|
6
|
+
|
|
7
|
+
const Mixpanel = (
|
|
8
|
+
props: IconBaseProps,
|
|
9
|
+
): JSX.Element => <Icon {...props} icon={MixpanelSvg} />;
|
|
10
|
+
|
|
11
|
+
Mixpanel.displayName = 'Mixpanel';
|
|
12
|
+
export default Mixpanel;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This icon file is generated automatically.
|
|
2
|
+
|
|
3
|
+
import RicheditorBlockEmbedSvg from '../ast/RicheditorBlockEmbed';
|
|
4
|
+
import { Icon } from '../Icon';
|
|
5
|
+
import { IconBaseProps } from '../types';
|
|
6
|
+
|
|
7
|
+
const RicheditorBlockEmbed = (
|
|
8
|
+
props: IconBaseProps,
|
|
9
|
+
): JSX.Element => <Icon {...props} icon={RicheditorBlockEmbedSvg} />;
|
|
10
|
+
|
|
11
|
+
RicheditorBlockEmbed.displayName = 'RicheditorBlockEmbed';
|
|
12
|
+
export default RicheditorBlockEmbed;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This icon file is generated automatically.
|
|
2
|
+
|
|
3
|
+
import TwitterSvg from '../ast/Twitter';
|
|
4
|
+
import { Icon } from '../Icon';
|
|
5
|
+
import { IconBaseProps } from '../types';
|
|
6
|
+
|
|
7
|
+
const Twitter = (
|
|
8
|
+
props: IconBaseProps,
|
|
9
|
+
): JSX.Element => <Icon {...props} icon={TwitterSvg} />;
|
|
10
|
+
|
|
11
|
+
Twitter.displayName = 'Twitter';
|
|
12
|
+
export default Twitter;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This icon file is generated automatically.
|
|
2
|
+
|
|
3
|
+
import YoutubeSvg from '../ast/Youtube';
|
|
4
|
+
import { Icon } from '../Icon';
|
|
5
|
+
import { IconBaseProps } from '../types';
|
|
6
|
+
|
|
7
|
+
const Youtube = (
|
|
8
|
+
props: IconBaseProps,
|
|
9
|
+
): JSX.Element => <Icon {...props} icon={YoutubeSvg} />;
|
|
10
|
+
|
|
11
|
+
Youtube.displayName = 'Youtube';
|
|
12
|
+
export default Youtube;
|
|
@@ -34,10 +34,16 @@ export { default as Atom } from './Atom';
|
|
|
34
34
|
export { default as Back } from './Back';
|
|
35
35
|
export { default as BacklogIcon } from './BacklogIcon';
|
|
36
36
|
export { default as BatchActionsIcon } from './BatchActionsIcon';
|
|
37
|
+
export { default as BellCircle } from './BellCircle';
|
|
38
|
+
export { default as BellX } from './BellX';
|
|
39
|
+
export { default as Bolt } from './Bolt';
|
|
37
40
|
export { default as Cards } from './Cards';
|
|
41
|
+
export { default as CheckCircle } from './CheckCircle';
|
|
38
42
|
export { default as Checked } from './Checked';
|
|
39
43
|
export { default as ClearValue } from './ClearValue';
|
|
44
|
+
export { default as ClockForward } from './ClockForward';
|
|
40
45
|
export { default as Close } from './Close';
|
|
46
|
+
export { default as ColorCodingFilled } from './ColorCodingFilled';
|
|
41
47
|
export { default as ColorCoding } from './ColorCoding';
|
|
42
48
|
export { default as Columns2 } from './Columns2';
|
|
43
49
|
export { default as Columns4 } from './Columns4';
|
|
@@ -53,6 +59,7 @@ export { default as DragBlockHandle } from './DragBlockHandle';
|
|
|
53
59
|
export { default as DragHandle } from './DragHandle';
|
|
54
60
|
export { default as DynamicFilterValue } from './DynamicFilterValue';
|
|
55
61
|
export { default as Email } from './Email';
|
|
62
|
+
export { default as EmojiDelete } from './EmojiDelete';
|
|
56
63
|
export { default as ExtensionAssignments } from './ExtensionAssignments';
|
|
57
64
|
export { default as ExtensionAvatar } from './ExtensionAvatar';
|
|
58
65
|
export { default as ExtensionComments } from './ExtensionComments';
|
|
@@ -64,6 +71,7 @@ export { default as FavoritesMenu } from './FavoritesMenu';
|
|
|
64
71
|
export { default as Favorites } from './Favorites';
|
|
65
72
|
export { default as FiberyMono } from './FiberyMono';
|
|
66
73
|
export { default as Fields } from './Fields';
|
|
74
|
+
export { default as Figma } from './Figma';
|
|
67
75
|
export { default as FileUpload } from './FileUpload';
|
|
68
76
|
export { default as Filter } from './Filter';
|
|
69
77
|
export { default as FocusModeOff } from './FocusModeOff';
|
|
@@ -73,6 +81,8 @@ export { default as FormWithoutCover } from './FormWithoutCover';
|
|
|
73
81
|
export { default as Github } from './Github';
|
|
74
82
|
export { default as Gitlab } from './Gitlab';
|
|
75
83
|
export { default as Globe } from './Globe';
|
|
84
|
+
export { default as GoogleDrive } from './GoogleDrive';
|
|
85
|
+
export { default as GoogleMap } from './GoogleMap';
|
|
76
86
|
export { default as Hide } from './Hide';
|
|
77
87
|
export { default as Hint } from './Hint';
|
|
78
88
|
export { default as Home } from './Home';
|
|
@@ -85,11 +95,14 @@ export { default as LeftPanel } from './LeftPanel';
|
|
|
85
95
|
export { default as Levels } from './Levels';
|
|
86
96
|
export { default as LineDivider } from './LineDivider';
|
|
87
97
|
export { default as Lock } from './Lock';
|
|
98
|
+
export { default as Loom } from './Loom';
|
|
88
99
|
export { default as Markdown } from './Markdown';
|
|
89
100
|
export { default as MenuCollapser } from './MenuCollapser';
|
|
90
101
|
export { default as MessagePlusSquare } from './MessagePlusSquare';
|
|
91
102
|
export { default as Milestones } from './Milestones';
|
|
92
103
|
export { default as Minus } from './Minus';
|
|
104
|
+
export { default as Miro } from './Miro';
|
|
105
|
+
export { default as Mixpanel } from './Mixpanel';
|
|
93
106
|
export { default as MoreCompact } from './MoreCompact';
|
|
94
107
|
export { default as More } from './More';
|
|
95
108
|
export { default as MySpace } from './MySpace';
|
|
@@ -112,6 +125,7 @@ export { default as Restore } from './Restore';
|
|
|
112
125
|
export { default as RicheditorActionsMore } from './RicheditorActionsMore';
|
|
113
126
|
export { default as RicheditorBlockCallout } from './RicheditorBlockCallout';
|
|
114
127
|
export { default as RicheditorBlockCode } from './RicheditorBlockCode';
|
|
128
|
+
export { default as RicheditorBlockEmbed } from './RicheditorBlockEmbed';
|
|
115
129
|
export { default as RicheditorBlockEntity } from './RicheditorBlockEntity';
|
|
116
130
|
export { default as RicheditorBlockFile } from './RicheditorBlockFile';
|
|
117
131
|
export { default as RicheditorBlockH1 } from './RicheditorBlockH1';
|
|
@@ -172,6 +186,7 @@ export { default as SortOnTop } from './SortOnTop';
|
|
|
172
186
|
export { default as Sort } from './Sort';
|
|
173
187
|
export { default as Spinner } from './Spinner';
|
|
174
188
|
export { default as Templates } from './Templates';
|
|
189
|
+
export { default as Twitter } from './Twitter';
|
|
175
190
|
export { default as TypeBoolean } from './TypeBoolean';
|
|
176
191
|
export { default as TypeButton } from './TypeButton';
|
|
177
192
|
export { default as TypeCheckbox } from './TypeCheckbox';
|
|
@@ -210,3 +225,4 @@ export { default as ViewTable } from './ViewTable';
|
|
|
210
225
|
export { default as ViewTimeline } from './ViewTimeline';
|
|
211
226
|
export { default as Views } from './Views';
|
|
212
227
|
export { default as Warning } from './Warning';
|
|
228
|
+
export { default as Youtube } from './Youtube';
|
package/src/tooltip.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {css, cx} from "@linaria/core";
|
|
2
2
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
|
-
import type
|
|
3
|
+
import {forwardRef, type ReactNode, type SyntheticEvent} from "react";
|
|
4
4
|
import {border, fontWeight, lineHeight, space, themeVars, tooltipDelay} from "./designSystem";
|
|
5
5
|
|
|
6
6
|
const preventDefaultAndStopPropagation = (e: SyntheticEvent) => {
|
|
@@ -93,7 +93,7 @@ export const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps> =
|
|
|
93
93
|
<TooltipPrimitive.Provider disableHoverableContent skipDelayDuration={150} {...props} />
|
|
94
94
|
);
|
|
95
95
|
|
|
96
|
-
export type TooltipProps = {
|
|
96
|
+
export type TooltipProps = Omit<React.ComponentPropsWithoutRef<"button">, "title"> & {
|
|
97
97
|
title?: ReactNode;
|
|
98
98
|
description?: ReactNode;
|
|
99
99
|
content?: ReactNode;
|
|
@@ -111,54 +111,76 @@ export type TooltipProps = {
|
|
|
111
111
|
keepOnClick?: boolean;
|
|
112
112
|
};
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
114
|
+
/**
|
|
115
|
+
* NOTE:
|
|
116
|
+
* When used together with other triggers (Collapsible, ActionsMenu...) of radix-based component it might
|
|
117
|
+
* overwrite [data-state] attribute of trigger element and make styling a bit harder. As a workaround you might:
|
|
118
|
+
* 1. Make sure that Tooltip is the lowest trigger. Usually we don't care about data-state of tooltip's trigger (e.g. `<CollapsibleTrigger asChilde><Tooltip><Button/></Tooltip></CollapsibleTrigger>`)
|
|
119
|
+
* 2. Use controlled state of components and add classes for open states
|
|
120
|
+
*
|
|
121
|
+
* Ref: https://github.com/radix-ui/primitives/issues/602
|
|
122
|
+
*/
|
|
123
|
+
export const Tooltip = forwardRef<HTMLButtonElement, TooltipProps>(
|
|
124
|
+
(
|
|
125
|
+
{
|
|
126
|
+
title,
|
|
127
|
+
description,
|
|
128
|
+
content = (title || description) && (
|
|
129
|
+
<>
|
|
130
|
+
<TooltipTitle>{title}</TooltipTitle>
|
|
131
|
+
<TooltipDescription>{description}</TooltipDescription>
|
|
132
|
+
</>
|
|
133
|
+
),
|
|
134
|
+
side,
|
|
135
|
+
sideOffset = space.xs,
|
|
136
|
+
align,
|
|
137
|
+
alignOffset,
|
|
138
|
+
instant,
|
|
139
|
+
children,
|
|
140
|
+
whiteBg,
|
|
141
|
+
visible,
|
|
142
|
+
onVisibleChange,
|
|
143
|
+
keepOnClick,
|
|
144
|
+
disabled,
|
|
145
|
+
|
|
146
|
+
...triggerProps
|
|
147
|
+
},
|
|
148
|
+
ref
|
|
149
|
+
) => {
|
|
150
|
+
const keepOnClickProps = keepOnClick
|
|
151
|
+
? {
|
|
152
|
+
onPointerDown: (e: React.PointerEvent<HTMLButtonElement>) => {
|
|
153
|
+
preventDefaultAndStopPropagation(e);
|
|
154
|
+
triggerProps.onPointerDown?.(e);
|
|
155
|
+
},
|
|
156
|
+
onClick: (e: React.MouseEvent<HTMLButtonElement>) => {
|
|
157
|
+
preventDefaultAndStopPropagation(e);
|
|
158
|
+
triggerProps.onClick?.(e);
|
|
159
|
+
},
|
|
160
|
+
}
|
|
161
|
+
: null;
|
|
162
|
+
|
|
163
|
+
return (
|
|
164
|
+
<TooltipPrimitive.Root
|
|
165
|
+
delayDuration={instant ? 0 : tooltipDelay.enter}
|
|
166
|
+
open={disabled ? false : Boolean(content) && visible}
|
|
167
|
+
onOpenChange={onVisibleChange}
|
|
168
|
+
>
|
|
169
|
+
<TooltipPrimitive.Trigger ref={ref} {...triggerProps} {...keepOnClickProps} asChild>
|
|
170
|
+
{children}
|
|
171
|
+
</TooltipPrimitive.Trigger>
|
|
172
|
+
<TooltipPrimitive.Portal>
|
|
173
|
+
<TooltipPrimitive.Content
|
|
174
|
+
side={side}
|
|
175
|
+
sideOffset={sideOffset}
|
|
176
|
+
align={align}
|
|
177
|
+
alignOffset={alignOffset}
|
|
178
|
+
className={cx(tooltipStyle, whiteBg && whiteBgStyle)}
|
|
179
|
+
>
|
|
180
|
+
{content}
|
|
181
|
+
</TooltipPrimitive.Content>
|
|
182
|
+
</TooltipPrimitive.Portal>
|
|
183
|
+
</TooltipPrimitive.Root>
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import {forwardRef} from "react";
|
|
2
|
-
import {Tooltip, TooltipProps} from "../tooltip";
|
|
3
|
-
import {IconButton, IconButtonProps} from "./icon-button";
|
|
4
|
-
|
|
5
|
-
type IconButtonTooltipProps = Pick<TooltipProps, "title" | "description" | "content" | "side">;
|
|
6
|
-
|
|
7
|
-
export const IconButtonWithTooltip = forwardRef<HTMLButtonElement, IconButtonTooltipProps & IconButtonProps>(
|
|
8
|
-
function IconButtonWithTooltip({title, description, content, side, ...props}, ref) {
|
|
9
|
-
return (
|
|
10
|
-
<Tooltip title={title} description={description} content={content} side={side}>
|
|
11
|
-
<IconButton ref={ref} {...props} />
|
|
12
|
-
</Tooltip>
|
|
13
|
-
);
|
|
14
|
-
}
|
|
15
|
-
);
|