@qoretechnologies/reqore 0.37.7 → 0.37.8
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/dist/components/Button/index.d.ts +3 -0
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +4 -4
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Effect/index.d.ts +1 -0
- package/dist/components/Effect/index.d.ts.map +1 -1
- package/dist/components/Effect/index.js +2 -1
- package/dist/components/Effect/index.js.map +1 -1
- package/dist/components/Icon/index.d.ts +1 -0
- package/dist/components/Icon/index.d.ts.map +1 -1
- package/dist/components/Icon/index.js +5 -2
- package/dist/components/Icon/index.js.map +1 -1
- package/dist/components/Message/index.d.ts +2 -0
- package/dist/components/Message/index.d.ts.map +1 -1
- package/dist/components/Message/index.js +2 -2
- package/dist/components/Message/index.js.map +1 -1
- package/dist/components/Spinner/index.d.ts +3 -1
- package/dist/components/Spinner/index.d.ts.map +1 -1
- package/dist/components/Spinner/index.js +2 -2
- package/dist/components/Spinner/index.js.map +1 -1
- package/dist/components/Tag/index.d.ts +3 -0
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Tag/index.js +2 -2
- package/dist/components/Tag/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Button/index.tsx +8 -2
- package/src/components/Effect/index.tsx +7 -3
- package/src/components/Icon/index.tsx +4 -2
- package/src/components/Message/index.tsx +5 -1
- package/src/components/Spinner/index.tsx +4 -0
- package/src/components/Tag/index.tsx +7 -1
- package/src/stories/Button/Button.stories.tsx +2 -0
- package/src/stories/Icon/Icon.stories.tsx +13 -0
- package/tests.json +1 -1
|
@@ -74,6 +74,7 @@ export interface IReqoreEffect extends IReqoreEffectFilters {
|
|
|
74
74
|
color: TReqoreEffectColor;
|
|
75
75
|
inset?: boolean;
|
|
76
76
|
blur?: number;
|
|
77
|
+
opacity?: number;
|
|
77
78
|
};
|
|
78
79
|
interactive?: boolean;
|
|
79
80
|
}
|
|
@@ -233,12 +234,15 @@ export const StyledEffect = styled.span`
|
|
|
233
234
|
effect.glow.color === 'main' ? 'main:lighten:2' : effect.glow.color
|
|
234
235
|
);
|
|
235
236
|
const blur = effect.glow.blur || 0;
|
|
237
|
+
const opacity = effect.glow.opacity || 1;
|
|
236
238
|
|
|
237
239
|
return css`
|
|
238
240
|
color: ${Colors.LIGHT};
|
|
239
|
-
text-shadow: 0 0 ${blur}px ${color}, 0 0 ${blur + 5}px ${color
|
|
240
|
-
0 0
|
|
241
|
-
0 0
|
|
241
|
+
text-shadow: 0 0 ${blur}px ${rgba(color, opacity)}, 0 0 ${blur + 5}px ${rgba(color, opacity)},
|
|
242
|
+
0 0 ${blur + 10}px ${rgba(color, opacity)},
|
|
243
|
+
0 0 1px ${rgba(getReadableColorFrom(color), opacity)},
|
|
244
|
+
0 0 2px ${rgba(getReadableColorFrom(color), opacity)},
|
|
245
|
+
0 0 3px ${rgba(getReadableColorFrom(color), opacity)};
|
|
242
246
|
`;
|
|
243
247
|
}}
|
|
244
248
|
|
|
@@ -27,15 +27,16 @@ export interface IReqoreIconProps
|
|
|
27
27
|
margin?: 'right' | 'left' | 'both';
|
|
28
28
|
image?: string;
|
|
29
29
|
rounded?: boolean;
|
|
30
|
+
rotation?: number;
|
|
30
31
|
animation?: 'spin' | 'heartbeat';
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
const SpinKeyframes = keyframes`
|
|
34
35
|
0% {
|
|
35
|
-
|
|
36
|
+
rotate: 0deg;
|
|
36
37
|
}
|
|
37
38
|
100% {
|
|
38
|
-
|
|
39
|
+
rotate: 360deg;
|
|
39
40
|
}
|
|
40
41
|
`;
|
|
41
42
|
|
|
@@ -49,6 +50,7 @@ export const StyledIconWrapper = styled(StyledEffect)<{ margin: 'right' | 'left'
|
|
|
49
50
|
overflow: hidden;
|
|
50
51
|
|
|
51
52
|
border-radius: ${({ rounded }) => (rounded ? '50%' : undefined)};
|
|
53
|
+
rotate: ${({ rotation }) => (rotation ? `${rotation}deg` : undefined)};
|
|
52
54
|
|
|
53
55
|
${({ margin, size }) =>
|
|
54
56
|
margin &&
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
import { IReqoreIconName } from '../../types/icons';
|
|
22
22
|
import { TReqoreEffectColor } from '../Effect';
|
|
23
23
|
import { ReqoreHeading } from '../Header';
|
|
24
|
-
import ReqoreIcon from '../Icon';
|
|
24
|
+
import ReqoreIcon, { IReqoreIconProps } from '../Icon';
|
|
25
25
|
import {
|
|
26
26
|
StyledIconWrapper,
|
|
27
27
|
StyledNotificationContent,
|
|
@@ -46,6 +46,7 @@ export interface IReqoreMessageProps
|
|
|
46
46
|
children: any;
|
|
47
47
|
icon?: IReqoreIconName;
|
|
48
48
|
iconColor?: TReqoreEffectColor;
|
|
49
|
+
iconProps?: IReqoreIconProps;
|
|
49
50
|
onClose?: () => any;
|
|
50
51
|
onClick?: () => any;
|
|
51
52
|
duration?: number;
|
|
@@ -81,6 +82,7 @@ const ReqoreMessage = memo(
|
|
|
81
82
|
tooltip,
|
|
82
83
|
fixed,
|
|
83
84
|
fluid,
|
|
85
|
+
iconProps,
|
|
84
86
|
...rest
|
|
85
87
|
},
|
|
86
88
|
ref
|
|
@@ -159,6 +161,7 @@ const ReqoreMessage = memo(
|
|
|
159
161
|
iconColor={iconColor}
|
|
160
162
|
type={5}
|
|
161
163
|
iconMargin={flat && minimal ? 'right' : 'both'}
|
|
164
|
+
iconProps={iconProps}
|
|
162
165
|
/>
|
|
163
166
|
) : (
|
|
164
167
|
<ReqoreIcon
|
|
@@ -166,6 +169,7 @@ const ReqoreMessage = memo(
|
|
|
166
169
|
margin={flat && minimal ? 'right' : 'both'}
|
|
167
170
|
size={size}
|
|
168
171
|
color={iconColor}
|
|
172
|
+
{...iconProps}
|
|
169
173
|
/>
|
|
170
174
|
)}
|
|
171
175
|
</StyledIconWrapper>
|
|
@@ -5,6 +5,7 @@ import { TReqoreIntent } from '../../constants/theme';
|
|
|
5
5
|
import { IWithReqoreEffect } from '../../types/global';
|
|
6
6
|
import ReqoreControlGroup, { IReqoreControlGroupProps } from '../ControlGroup';
|
|
7
7
|
import { IReqoreEffect, TReqoreEffectColor } from '../Effect';
|
|
8
|
+
import { IReqoreIconProps } from '../Icon';
|
|
8
9
|
|
|
9
10
|
export interface IReqoreSpinnerProps
|
|
10
11
|
extends Omit<IReqoreControlGroupProps, 'children' | 'size'>,
|
|
@@ -17,6 +18,7 @@ export interface IReqoreSpinnerProps
|
|
|
17
18
|
labelEffect?: IReqoreEffect;
|
|
18
19
|
iconMargin?: 'right' | 'left' | 'both';
|
|
19
20
|
centered?: boolean;
|
|
21
|
+
iconProps?: IReqoreIconProps;
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
export const ReqoreSpinner = ({
|
|
@@ -29,6 +31,7 @@ export const ReqoreSpinner = ({
|
|
|
29
31
|
effect,
|
|
30
32
|
iconMargin,
|
|
31
33
|
centered,
|
|
34
|
+
iconProps,
|
|
32
35
|
...rest
|
|
33
36
|
}: IReqoreSpinnerProps) => {
|
|
34
37
|
const renderContent = useCallback(() => {
|
|
@@ -41,6 +44,7 @@ export const ReqoreSpinner = ({
|
|
|
41
44
|
animation='spin'
|
|
42
45
|
className='reqore-spinner'
|
|
43
46
|
margin={iconMargin || (children ? 'right' : undefined)}
|
|
47
|
+
{...iconProps}
|
|
44
48
|
/>
|
|
45
49
|
);
|
|
46
50
|
}, [size, intent, type, children, iconColor]);
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
TReqoreEffectColor,
|
|
39
39
|
TReqoreHexColor,
|
|
40
40
|
} from '../Effect';
|
|
41
|
-
import ReqoreIcon from '../Icon';
|
|
41
|
+
import ReqoreIcon, { IReqoreIconProps } from '../Icon';
|
|
42
42
|
|
|
43
43
|
export interface IReqoreTagAction extends IWithReqoreTooltip, IReqoreDisabled, IReqoreIntent {
|
|
44
44
|
icon: IReqoreIconName;
|
|
@@ -61,10 +61,12 @@ export interface IReqoreTagProps
|
|
|
61
61
|
onRemoveClick?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
62
62
|
onClick?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
63
63
|
icon?: IReqoreIconName;
|
|
64
|
+
leftIconProps?: IReqoreIconProps;
|
|
64
65
|
rightIcon?: IReqoreIconName;
|
|
65
66
|
iconColor?: TReqoreEffectColor;
|
|
66
67
|
leftIconColor?: TReqoreEffectColor;
|
|
67
68
|
rightIconColor?: TReqoreEffectColor;
|
|
69
|
+
rightIconProps?: IReqoreIconProps;
|
|
68
70
|
color?: TReqoreEffectColor;
|
|
69
71
|
actions?: IReqoreTagAction[];
|
|
70
72
|
width?: string;
|
|
@@ -261,6 +263,8 @@ const ReqoreTag = forwardRef<HTMLSpanElement, IReqoreTagProps>(
|
|
|
261
263
|
iconColor,
|
|
262
264
|
labelEffect,
|
|
263
265
|
labelKeyEffect,
|
|
266
|
+
leftIconProps,
|
|
267
|
+
rightIconProps,
|
|
264
268
|
...rest
|
|
265
269
|
}: IReqoreTagProps,
|
|
266
270
|
ref
|
|
@@ -323,6 +327,7 @@ const ReqoreTag = forwardRef<HTMLSpanElement, IReqoreTagProps>(
|
|
|
323
327
|
size={size}
|
|
324
328
|
margin={label || labelKey ? 'left' : 'both'}
|
|
325
329
|
color={leftIconColor || iconColor}
|
|
330
|
+
{...leftIconProps}
|
|
326
331
|
/>
|
|
327
332
|
)}
|
|
328
333
|
{labelKey && (
|
|
@@ -370,6 +375,7 @@ const ReqoreTag = forwardRef<HTMLSpanElement, IReqoreTagProps>(
|
|
|
370
375
|
size={size}
|
|
371
376
|
margin={label || (icon && !labelKey) ? 'right' : 'both'}
|
|
372
377
|
color={rightIconColor || iconColor}
|
|
378
|
+
{...rightIconProps}
|
|
373
379
|
/>
|
|
374
380
|
)}
|
|
375
381
|
</StyledTagContentWrapper>
|
|
@@ -139,6 +139,8 @@ const Template: StoryFn<typeof ReqoreButton> = (buttonProps) => {
|
|
|
139
139
|
<ReqoreControlGroup wrap>
|
|
140
140
|
<ReqoreButton
|
|
141
141
|
{...buttonProps}
|
|
142
|
+
leftIconProps={{ rotation: 180 }}
|
|
143
|
+
rightIconProps={{ rotation: 270 }}
|
|
142
144
|
description='This is a very interesting description for a button, I like it very much'
|
|
143
145
|
iconColor='#38fdb2'
|
|
144
146
|
>
|
|
@@ -63,6 +63,13 @@ export const Basic: Story = {
|
|
|
63
63
|
effect={{ opacity: 0.5 }}
|
|
64
64
|
margin='both'
|
|
65
65
|
/>
|
|
66
|
+
<ReqoreIcon
|
|
67
|
+
icon='SignalTowerFill'
|
|
68
|
+
size='20px'
|
|
69
|
+
color='#8d2a5c'
|
|
70
|
+
rotation={90}
|
|
71
|
+
margin='both'
|
|
72
|
+
/>
|
|
66
73
|
</ReqorePanel>
|
|
67
74
|
<br />
|
|
68
75
|
<ReqorePanel label='Image' flat minimal>
|
|
@@ -119,6 +126,12 @@ export const Basic: Story = {
|
|
|
119
126
|
effect={{ saturate: 150 }}
|
|
120
127
|
margin='both'
|
|
121
128
|
/>
|
|
129
|
+
<ReqoreIcon
|
|
130
|
+
image='https://avatars.githubusercontent.com/u/44835090?s=400&u=371120ce0755102d2e432f11ad9aa0378c871b45&v=4'
|
|
131
|
+
size='40px'
|
|
132
|
+
rotation={180}
|
|
133
|
+
margin='both'
|
|
134
|
+
/>
|
|
122
135
|
</ReqorePanel>
|
|
123
136
|
<br />
|
|
124
137
|
<ReqorePanel label='Margined' flat minimal>
|