@qoretechnologies/reqore 0.25.10 → 0.26.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/__tests__/effect.test.tsx +70 -0
- package/dist/components/Button/index.d.ts +3 -2
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +15 -14
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/ControlGroup/index.d.ts.map +1 -1
- package/dist/components/ControlGroup/index.js +4 -1
- package/dist/components/ControlGroup/index.js.map +1 -1
- package/dist/components/Effect/index.d.ts +29 -0
- package/dist/components/Effect/index.d.ts.map +1 -0
- package/dist/components/Effect/index.js +117 -0
- package/dist/components/Effect/index.js.map +1 -0
- package/dist/components/Header/index.d.ts +14 -8
- package/dist/components/Header/index.d.ts.map +1 -1
- package/dist/components/Header/index.js +52 -33
- package/dist/components/Header/index.js.map +1 -1
- package/dist/components/Input/index.d.ts +3 -2
- package/dist/components/Input/index.d.ts.map +1 -1
- package/dist/components/Input/index.js +8 -7
- package/dist/components/Input/index.js.map +1 -1
- package/dist/components/Menu/index.js +1 -1
- package/dist/components/Menu/index.js.map +1 -1
- package/dist/components/Menu/item.d.ts +5 -11
- package/dist/components/Menu/item.d.ts.map +1 -1
- package/dist/components/Menu/item.js +4 -4
- package/dist/components/Menu/item.js.map +1 -1
- package/dist/components/Message/index.d.ts +3 -6
- package/dist/components/Message/index.d.ts.map +1 -1
- package/dist/components/Message/index.js +2 -1
- package/dist/components/Message/index.js.map +1 -1
- package/dist/components/Notifications/notification.d.ts +3 -2
- package/dist/components/Notifications/notification.d.ts.map +1 -1
- package/dist/components/Notifications/notification.js +3 -2
- package/dist/components/Notifications/notification.js.map +1 -1
- package/dist/components/Panel/index.d.ts +3 -1
- package/dist/components/Panel/index.d.ts.map +1 -1
- package/dist/components/Panel/index.js +14 -16
- package/dist/components/Panel/index.js.map +1 -1
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/Popover/index.js +0 -2
- package/dist/components/Popover/index.js.map +1 -1
- package/dist/components/Tabs/item.d.ts +1 -1
- package/dist/components/Tabs/item.d.ts.map +1 -1
- package/dist/components/Tabs/item.js +6 -5
- package/dist/components/Tabs/item.js.map +1 -1
- package/dist/components/Tag/index.d.ts +2 -2
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Tag/index.js +6 -4
- package/dist/components/Tag/index.js.map +1 -1
- package/dist/components/Textarea/index.d.ts +2 -2
- package/dist/components/Textarea/index.d.ts.map +1 -1
- package/dist/components/Textarea/index.js +8 -7
- package/dist/components/Textarea/index.js.map +1 -1
- package/dist/constants/sizes.d.ts +7 -0
- package/dist/constants/sizes.d.ts.map +1 -1
- package/dist/constants/sizes.js +8 -1
- package/dist/constants/sizes.js.map +1 -1
- package/dist/constants/theme.d.ts +1 -0
- package/dist/constants/theme.d.ts.map +1 -1
- package/dist/constants/theme.js.map +1 -1
- package/dist/containers/ReqoreProvider.d.ts +2 -2
- package/dist/containers/ReqoreProvider.d.ts.map +1 -1
- package/dist/containers/ReqoreProvider.js +7 -5
- package/dist/containers/ReqoreProvider.js.map +1 -1
- package/dist/containers/UIProvider.d.ts +9 -3
- package/dist/containers/UIProvider.d.ts.map +1 -1
- package/dist/containers/UIProvider.js +3 -2
- package/dist/containers/UIProvider.js.map +1 -1
- package/dist/context/ReqoreContext.d.ts +2 -0
- package/dist/context/ReqoreContext.d.ts.map +1 -1
- package/dist/context/ReqoreContext.js +4 -1
- package/dist/context/ReqoreContext.js.map +1 -1
- package/dist/helpers/colors.js +1 -1
- package/dist/helpers/colors.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/types/global.d.ts +13 -0
- package/dist/types/global.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/components/Button/index.tsx +34 -23
- package/src/components/ControlGroup/index.tsx +1 -0
- package/src/components/Effect/index.tsx +134 -0
- package/src/components/Header/index.tsx +33 -28
- package/src/components/Input/index.tsx +15 -7
- package/src/components/Menu/index.tsx +1 -1
- package/src/components/Menu/item.tsx +8 -17
- package/src/components/Message/index.tsx +13 -5
- package/src/components/Notifications/notification.tsx +6 -3
- package/src/components/Panel/index.tsx +27 -25
- package/src/components/Popover/index.tsx +0 -13
- package/src/components/Tabs/item.tsx +92 -79
- package/src/components/Tag/index.tsx +16 -7
- package/src/components/Textarea/index.tsx +14 -7
- package/src/constants/sizes.ts +8 -0
- package/src/constants/theme.ts +1 -0
- package/src/containers/ReqoreProvider.tsx +16 -8
- package/src/containers/UIProvider.tsx +15 -13
- package/src/context/ReqoreContext.tsx +5 -0
- package/src/helpers/colors.ts +1 -1
- package/src/index.tsx +10 -1
- package/src/mock/collectionData.tsx +55 -2
- package/src/stories/Button/Button.stories.tsx +15 -2
- package/src/stories/Header/Header.stories.tsx +71 -0
- package/src/stories/Input/Input.stories.tsx +12 -0
- package/src/stories/Menu/Menu.stories.tsx +14 -0
- package/src/stories/Message/Message.stories.tsx +13 -0
- package/src/stories/Notifications/Notification.stories.tsx +7 -2
- package/src/stories/Panel/Panel.stories.tsx +37 -1
- package/src/stories/Tabs/Tabs.stories.tsx +23 -23
- package/src/stories/Tag/Tag.stories.tsx +16 -0
- package/src/stories/TextArea/TextArea.stories.tsx +18 -0
- package/src/types/global.ts +14 -0
- package/tests.json +1 -1
|
@@ -13,8 +13,10 @@ import {
|
|
|
13
13
|
IReqoreIntent,
|
|
14
14
|
IReqoreReadOnly,
|
|
15
15
|
IWithReqoreCustomTheme,
|
|
16
|
+
IWithReqoreEffect,
|
|
16
17
|
IWithReqoreTooltip,
|
|
17
18
|
} from '../../types/global';
|
|
19
|
+
import { StyledEffect } from '../Effect';
|
|
18
20
|
import { IReqoreInputStyle } from '../Input';
|
|
19
21
|
import ReqoreInputClearButton from '../InputClearButton';
|
|
20
22
|
|
|
@@ -24,7 +26,8 @@ export interface IReqoreTextareaProps
|
|
|
24
26
|
IReqoreDisabled,
|
|
25
27
|
IWithReqoreCustomTheme,
|
|
26
28
|
IWithReqoreTooltip,
|
|
27
|
-
IReqoreIntent
|
|
29
|
+
IReqoreIntent,
|
|
30
|
+
IWithReqoreEffect {
|
|
28
31
|
autoFocus?: boolean;
|
|
29
32
|
width?: number;
|
|
30
33
|
height?: number;
|
|
@@ -53,7 +56,7 @@ export const StyledTextareaWrapper = styled.div<IReqoreTextareaStyle>`
|
|
|
53
56
|
overflow: hidden;
|
|
54
57
|
`;
|
|
55
58
|
|
|
56
|
-
export const StyledTextarea = styled
|
|
59
|
+
export const StyledTextarea = styled(StyledEffect)<IReqoreTextareaStyle>`
|
|
57
60
|
height: 100%;
|
|
58
61
|
width: 100%;
|
|
59
62
|
font-size: ${({ _size }) => TEXT_FROM_SIZE[_size]}px;
|
|
@@ -62,15 +65,16 @@ export const StyledTextarea = styled.textarea<IReqoreTextareaStyle>`
|
|
|
62
65
|
resize: none;
|
|
63
66
|
|
|
64
67
|
background-color: ${({ theme, minimal }: IReqoreInputStyle) =>
|
|
65
|
-
minimal ? 'transparent' : rgba(theme.main, 0.
|
|
66
|
-
color: ${({ theme }: IReqoreInputStyle) =>
|
|
68
|
+
minimal ? 'transparent' : rgba(theme.main, 0.1)};
|
|
69
|
+
color: ${({ theme }: IReqoreInputStyle) =>
|
|
70
|
+
getReadableColor(theme, undefined, undefined, true, theme.originalMain)};
|
|
67
71
|
|
|
68
72
|
transition: all 0.2s ease-out;
|
|
69
73
|
|
|
70
74
|
&:active,
|
|
71
75
|
&:focus {
|
|
72
76
|
background-color: ${({ theme, minimal }: IReqoreInputStyle) =>
|
|
73
|
-
minimal ? 'transparent' : rgba(theme.main, 0.
|
|
77
|
+
minimal ? 'transparent' : rgba(theme.main, 0.15)};
|
|
74
78
|
}
|
|
75
79
|
|
|
76
80
|
border-radius: ${({ minimal, rounded, _size }) =>
|
|
@@ -96,12 +100,14 @@ export const StyledTextarea = styled.textarea<IReqoreTextareaStyle>`
|
|
|
96
100
|
|
|
97
101
|
&::placeholder {
|
|
98
102
|
transition: all 0.2s ease-out;
|
|
99
|
-
color: ${({ theme }) =>
|
|
103
|
+
color: ${({ theme }) =>
|
|
104
|
+
rgba(getReadableColor(theme, undefined, undefined, true, theme.originalMain), 0.3)};
|
|
100
105
|
}
|
|
101
106
|
|
|
102
107
|
&:focus {
|
|
103
108
|
&::placeholder {
|
|
104
|
-
color: ${({ theme }) =>
|
|
109
|
+
color: ${({ theme }) =>
|
|
110
|
+
rgba(getReadableColor(theme, undefined, undefined, true, theme.originalMain), 0.5)};
|
|
105
111
|
}
|
|
106
112
|
}
|
|
107
113
|
|
|
@@ -146,6 +152,7 @@ const ReqoreInput = forwardRef(
|
|
|
146
152
|
>
|
|
147
153
|
<StyledTextarea
|
|
148
154
|
{...rest}
|
|
155
|
+
as='textarea'
|
|
149
156
|
className={`${className || ''} reqore-control reqore-textarea`}
|
|
150
157
|
_size={size}
|
|
151
158
|
ref={targetRef}
|
package/src/constants/sizes.ts
CHANGED
package/src/constants/theme.ts
CHANGED
|
@@ -2,10 +2,8 @@ import { size } from 'lodash';
|
|
|
2
2
|
import React, { useRef, useState } from 'react';
|
|
3
3
|
import { useMedia } from 'react-use';
|
|
4
4
|
import shortid from 'shortid';
|
|
5
|
-
import { ReqoreModal } from '..';
|
|
6
|
-
import ReqoreNotificationsWrapper
|
|
7
|
-
IReqoreNotificationsPosition,
|
|
8
|
-
} from '../components/Notifications';
|
|
5
|
+
import { ReqoreModal, ReqoreTextEffect } from '..';
|
|
6
|
+
import ReqoreNotificationsWrapper from '../components/Notifications';
|
|
9
7
|
import ReqoreNotification, {
|
|
10
8
|
IReqoreNotificationType,
|
|
11
9
|
} from '../components/Notifications/notification';
|
|
@@ -13,6 +11,7 @@ import { TSizes } from '../constants/sizes';
|
|
|
13
11
|
import { TReqoreIntent } from '../constants/theme';
|
|
14
12
|
import ReqoreContext from '../context/ReqoreContext';
|
|
15
13
|
import { IReqoreIconName } from '../types/icons';
|
|
14
|
+
import { IReqoreOptions } from './UIProvider';
|
|
16
15
|
|
|
17
16
|
export interface IReqoreNotificationData {
|
|
18
17
|
title?: string;
|
|
@@ -32,7 +31,7 @@ export interface IReqoreNotificationData {
|
|
|
32
31
|
|
|
33
32
|
export interface IReqoreNotifications {
|
|
34
33
|
children: any;
|
|
35
|
-
|
|
34
|
+
options?: IReqoreOptions;
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
export interface IReqoreConfirmationModal {
|
|
@@ -48,7 +47,7 @@ export interface IReqoreConfirmationModal {
|
|
|
48
47
|
intent?: TReqoreIntent;
|
|
49
48
|
}
|
|
50
49
|
|
|
51
|
-
const ReqoreProvider: React.FC<IReqoreNotifications> = ({ children,
|
|
50
|
+
const ReqoreProvider: React.FC<IReqoreNotifications> = ({ children, options }) => {
|
|
52
51
|
const [notifications, setNotifications] = useState<IReqoreNotificationData[] | null>([]);
|
|
53
52
|
const [confirmationModal, setConfirmationModal] = useState<IReqoreConfirmationModal>({});
|
|
54
53
|
const latestZIndex = useRef<number>(9000);
|
|
@@ -110,6 +109,8 @@ const ReqoreProvider: React.FC<IReqoreNotifications> = ({ children, position })
|
|
|
110
109
|
});
|
|
111
110
|
};
|
|
112
111
|
|
|
112
|
+
console.log(options);
|
|
113
|
+
|
|
113
114
|
return (
|
|
114
115
|
<>
|
|
115
116
|
<ReqoreContext.Provider
|
|
@@ -122,10 +123,11 @@ const ReqoreProvider: React.FC<IReqoreNotifications> = ({ children, position })
|
|
|
122
123
|
isTablet,
|
|
123
124
|
isMobileOrTablet,
|
|
124
125
|
getAndIncreaseZIndex,
|
|
126
|
+
animations: options?.animations || { buttons: true },
|
|
125
127
|
}}
|
|
126
128
|
>
|
|
127
129
|
{size(notifications) > 0 ? (
|
|
128
|
-
<ReqoreNotificationsWrapper position={
|
|
130
|
+
<ReqoreNotificationsWrapper position={options?.notificationsPosition}>
|
|
129
131
|
{notifications.map((notification) => (
|
|
130
132
|
<ReqoreNotification
|
|
131
133
|
{...notification}
|
|
@@ -159,6 +161,7 @@ const ReqoreProvider: React.FC<IReqoreNotifications> = ({ children, position })
|
|
|
159
161
|
flat
|
|
160
162
|
opacity={0.9}
|
|
161
163
|
blur={2}
|
|
164
|
+
width='500px'
|
|
162
165
|
intent={confirmationModal.intent}
|
|
163
166
|
label={confirmationModal.title || 'Confirm your action'}
|
|
164
167
|
icon='ErrorWarningFill'
|
|
@@ -184,7 +187,12 @@ const ReqoreProvider: React.FC<IReqoreNotifications> = ({ children, position })
|
|
|
184
187
|
},
|
|
185
188
|
]}
|
|
186
189
|
>
|
|
187
|
-
|
|
190
|
+
<ReqoreTextEffect
|
|
191
|
+
as='p'
|
|
192
|
+
effect={{ textAlign: 'center', weight: 'bold', textSize: 'big' }}
|
|
193
|
+
>
|
|
194
|
+
{confirmationModal.description || 'Are you sure you want to proceed?'}
|
|
195
|
+
</ReqoreTextEffect>
|
|
188
196
|
</ReqoreModal>
|
|
189
197
|
</ReqoreContext.Provider>
|
|
190
198
|
</>
|
|
@@ -10,38 +10,40 @@ import { buildTheme } from '../helpers/colors';
|
|
|
10
10
|
import PopoverProvider from './PopoverProvider';
|
|
11
11
|
import ReqoreProvider from './ReqoreProvider';
|
|
12
12
|
|
|
13
|
+
export interface IReqoreOptions {
|
|
14
|
+
withSidebar?: boolean;
|
|
15
|
+
notificationsPosition?: IReqoreNotificationsPosition;
|
|
16
|
+
uiScale?: number;
|
|
17
|
+
animations?: {
|
|
18
|
+
buttons?: boolean;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
13
21
|
export interface IReqoreUIProviderProps {
|
|
14
22
|
children: any;
|
|
15
23
|
theme?: Partial<IReqoreTheme>;
|
|
16
|
-
|
|
17
|
-
withSidebar?: boolean;
|
|
18
|
-
uiScale?: number;
|
|
24
|
+
options?: IReqoreOptions;
|
|
19
25
|
}
|
|
20
26
|
|
|
21
27
|
const StyledPortal = styled.div`
|
|
22
28
|
z-index: 9999;
|
|
23
29
|
`;
|
|
24
30
|
|
|
25
|
-
const ReqoreUIProvider: React.FC<IReqoreUIProviderProps> = ({
|
|
26
|
-
children,
|
|
27
|
-
theme,
|
|
28
|
-
notificationsPosition,
|
|
29
|
-
withSidebar,
|
|
30
|
-
uiScale,
|
|
31
|
-
}) => {
|
|
31
|
+
const ReqoreUIProvider: React.FC<IReqoreUIProviderProps> = ({ children, theme, options }) => {
|
|
32
32
|
const [modalPortal, setModalPortal] = useState<any>(false);
|
|
33
33
|
|
|
34
34
|
const _theme: Partial<IReqoreTheme> = cloneDeep(theme || {});
|
|
35
35
|
const _defaultTheme: IReqoreTheme = cloneDeep(DEFAULT_THEME);
|
|
36
36
|
const rebuiltTheme: IReqoreTheme = buildTheme(merge(_defaultTheme, _theme));
|
|
37
37
|
|
|
38
|
+
console.log(options);
|
|
39
|
+
|
|
38
40
|
return (
|
|
39
41
|
<>
|
|
40
42
|
<ThemeContext.Provider value={{ ...rebuiltTheme }}>
|
|
41
|
-
<ReqoreLayoutWrapper withSidebar={withSidebar}>
|
|
43
|
+
<ReqoreLayoutWrapper withSidebar={options?.withSidebar}>
|
|
42
44
|
{modalPortal ? (
|
|
43
|
-
<ReqoreProvider
|
|
44
|
-
<PopoverProvider uiScale={uiScale}>{children}</PopoverProvider>
|
|
45
|
+
<ReqoreProvider options={options}>
|
|
46
|
+
<PopoverProvider uiScale={options?.uiScale}>{children}</PopoverProvider>
|
|
45
47
|
</ReqoreProvider>
|
|
46
48
|
) : null}
|
|
47
49
|
</ReqoreLayoutWrapper>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createContext } from 'react';
|
|
2
2
|
import { IReqoreConfirmationModal, IReqoreNotificationData } from '../containers/ReqoreProvider';
|
|
3
|
+
import { IReqoreOptions } from '../containers/UIProvider';
|
|
3
4
|
|
|
4
5
|
export interface IReqoreContext {
|
|
5
6
|
readonly confirmAction: (data: IReqoreConfirmationModal) => void;
|
|
@@ -10,6 +11,7 @@ export interface IReqoreContext {
|
|
|
10
11
|
readonly isTablet?: boolean;
|
|
11
12
|
readonly isMobileOrTablet?: boolean;
|
|
12
13
|
readonly getAndIncreaseZIndex?: () => number;
|
|
14
|
+
readonly animations?: IReqoreOptions['animations'];
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
export default createContext<IReqoreContext>({
|
|
@@ -17,4 +19,7 @@ export default createContext<IReqoreContext>({
|
|
|
17
19
|
notifications: null,
|
|
18
20
|
addNotification: null,
|
|
19
21
|
removeNotification: null,
|
|
22
|
+
animations: {
|
|
23
|
+
buttons: true,
|
|
24
|
+
},
|
|
20
25
|
});
|
package/src/helpers/colors.ts
CHANGED
|
@@ -122,7 +122,7 @@ export const mergeThemes = (element: string, theme: IReqoreTheme, customTheme: a
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
if (element === 'main' && customTheme) {
|
|
125
|
-
merge(clonedTheme, { main: customTheme.main });
|
|
125
|
+
merge(clonedTheme, { main: customTheme.main, originalMain: clonedTheme.main });
|
|
126
126
|
} else {
|
|
127
127
|
merge(clonedTheme, { [element]: customTheme || {} });
|
|
128
128
|
}
|
package/src/index.tsx
CHANGED
|
@@ -12,7 +12,16 @@ export { default as ReqoreControlGroup } from './components/ControlGroup';
|
|
|
12
12
|
export { ReqoreDrawer } from './components/Drawer';
|
|
13
13
|
export { default as ReqoreDropdown } from './components/Dropdown';
|
|
14
14
|
export { ReqoreDropdownDivider, ReqoreDropdownItem } from './components/Dropdown/item';
|
|
15
|
-
export {
|
|
15
|
+
export { ReqoreEffect, ReqoreTextEffect } from './components/Effect';
|
|
16
|
+
export {
|
|
17
|
+
ReqoreH1,
|
|
18
|
+
ReqoreH2,
|
|
19
|
+
ReqoreH3,
|
|
20
|
+
ReqoreH4,
|
|
21
|
+
ReqoreH5,
|
|
22
|
+
ReqoreH6,
|
|
23
|
+
ReqoreHeading,
|
|
24
|
+
} from './components/Header';
|
|
16
25
|
export { default as ReqoreIcon } from './components/Icon';
|
|
17
26
|
export { default as ReqoreInput } from './components/Input';
|
|
18
27
|
export { default as ReqoreLayoutContent } from './components/Layout/content';
|
|
@@ -4,6 +4,7 @@ import { ReqoreH1 } from '../components/Header';
|
|
|
4
4
|
import ReqoreMessage from '../components/Message';
|
|
5
5
|
import { ReqoreP } from '../components/Paragraph';
|
|
6
6
|
import { ReqoreSpacer } from '../components/Spacer';
|
|
7
|
+
import ReqoreTag from '../components/Tag';
|
|
7
8
|
|
|
8
9
|
export default [
|
|
9
10
|
{
|
|
@@ -80,6 +81,15 @@ export default [
|
|
|
80
81
|
content:
|
|
81
82
|
'Hello I am a test item content and I am very long so I will wrap to the next line and I will be very long. Hello I am a test item content and I am very long so I will wrap to the next line and I will be very long. Hello I am a test item content and I am very long so I will wrap to the next line and I will be very long. Hello I am a test item content and I am very long so I will wrap to the next line and I will be very long. Hello I am a test item content and I am very long so I will wrap to the next line and I will be very long. Hello I am a test item content and I am very long so I will wrap to the next line and I will be very long',
|
|
82
83
|
expandable: true,
|
|
84
|
+
contentEffect: {
|
|
85
|
+
gradient: {
|
|
86
|
+
colors: { 0: '#3b065e', 100: '#00d3c8' },
|
|
87
|
+
direction: 'to right bottom',
|
|
88
|
+
},
|
|
89
|
+
uppercase: true,
|
|
90
|
+
weight: 'thin',
|
|
91
|
+
spaced: 2,
|
|
92
|
+
},
|
|
83
93
|
expandedContent: (
|
|
84
94
|
<>
|
|
85
95
|
<ReqoreMessage intent='info'>Hello I am a custom content</ReqoreMessage>
|
|
@@ -167,8 +177,51 @@ export default [
|
|
|
167
177
|
},
|
|
168
178
|
{
|
|
169
179
|
label: 'I have intent!',
|
|
170
|
-
content:
|
|
171
|
-
|
|
180
|
+
content: (
|
|
181
|
+
<p>
|
|
182
|
+
'Well would you look at that. Lorem ipsum dolor{' '}
|
|
183
|
+
<ReqoreTag label='dolor' icon='Briefcase3Line' /> <ReqoreTag label='sit amet' />,
|
|
184
|
+
consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis
|
|
185
|
+
natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis,
|
|
186
|
+
ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec
|
|
187
|
+
pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut,
|
|
188
|
+
imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer
|
|
189
|
+
tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus.
|
|
190
|
+
Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante,
|
|
191
|
+
dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius
|
|
192
|
+
laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur
|
|
193
|
+
ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget
|
|
194
|
+
condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam
|
|
195
|
+
quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante
|
|
196
|
+
tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam
|
|
197
|
+
sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh.
|
|
198
|
+
Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus
|
|
199
|
+
nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus
|
|
200
|
+
quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras
|
|
201
|
+
ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci
|
|
202
|
+
luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Nam
|
|
203
|
+
pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis,
|
|
204
|
+
ipsum. Sed aliquam ultrices mauris. Integer ante arcu, accumsan a, consectetuer eget,
|
|
205
|
+
posuere ut, mauris. Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc. Nunc
|
|
206
|
+
nonummy metus. Vestibulum volutpat pretium libero. Cras id dui. Aenean ut eros et nisl
|
|
207
|
+
sagittis vestibulum. Nullam nulla eros, ultricies sit amet, nonummy id, imperdiet feugiat,
|
|
208
|
+
pede. Sed lectus. Donec mollis hendrerit risus. Phasellus nec sem in justo pellentesque
|
|
209
|
+
facilisis. Etiam imperdiet imperdiet orci. Nunc nec neque. Phasellus leo dolor, tempus non,
|
|
210
|
+
auctor et, hendrerit quis, nisi. Curabitur ligula sapien, tincidunt non, euismod vitae,
|
|
211
|
+
posuere imperdiet, leo. Maecenas malesuada. Praesent congue erat at massa. Sed cursus turpis
|
|
212
|
+
vitae tortor. Donec posuere vulputate arcu. Phasellus accumsan cursus velit. Vestibulum ante
|
|
213
|
+
ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed aliquam, nisi
|
|
214
|
+
quis porttitor congue, elit erat euismod orci, ac placerat dolor lectus quis orci. Phasellus
|
|
215
|
+
consectetuer vestibulum elit. Aenean tellus metus, bibendum sed, posuere ac, mattis non,
|
|
216
|
+
nunc. Vestibulum fringilla pede sit amet augue. In turpis. Pellentesque posuere. Praesent
|
|
217
|
+
turpis. Aenean posuere, tortor sed cursus feugiat, nunc augue blandit nunc, eu sollicitudin
|
|
218
|
+
urna dolor sagittis lacus. Donec elit libero, sodales nec, volutpat a, suscipit non, turpis.
|
|
219
|
+
Nullam sagittis. Suspendisse pulvinar, augue ac venenatis condimentum, sem libero volutpat
|
|
220
|
+
nibh, nec pellentesque velit pede quis nunc. Vestibulum ante ipsum primis in faucibus orci
|
|
221
|
+
luctus et ultrices posuere cubilia Curae; Fusce id purus. Ut varius tincidunt libero.
|
|
222
|
+
Phasellus dolor. Maecenas vestibulum mollis'
|
|
223
|
+
</p>
|
|
224
|
+
),
|
|
172
225
|
expandable: true,
|
|
173
226
|
intent: 'info',
|
|
174
227
|
},
|
|
@@ -25,8 +25,8 @@ const Template: ComponentStory<typeof ReqoreButton> = (buttonProps) => {
|
|
|
25
25
|
<ReqoreButton {...buttonProps} active tooltip='hello'>
|
|
26
26
|
Active
|
|
27
27
|
</ReqoreButton>
|
|
28
|
-
<ReqoreButton {...buttonProps} flat>
|
|
29
|
-
Flat
|
|
28
|
+
<ReqoreButton {...buttonProps} flat={false}>
|
|
29
|
+
Not Flat
|
|
30
30
|
</ReqoreButton>
|
|
31
31
|
<ReqoreButton {...buttonProps} minimal>
|
|
32
32
|
Minimal
|
|
@@ -70,3 +70,16 @@ export const Muted = Template.bind({});
|
|
|
70
70
|
Muted.args = {
|
|
71
71
|
intent: 'muted',
|
|
72
72
|
};
|
|
73
|
+
export const Effect: ComponentStory<typeof ReqoreButton> = Template.bind({});
|
|
74
|
+
Effect.args = {
|
|
75
|
+
effect: {
|
|
76
|
+
gradient: {
|
|
77
|
+
direction: 'to right bottom',
|
|
78
|
+
colors: { 0: '#33023c', 100: '#0a487b' },
|
|
79
|
+
},
|
|
80
|
+
spaced: 2,
|
|
81
|
+
uppercase: true,
|
|
82
|
+
weight: 'thick',
|
|
83
|
+
textSize: 'small',
|
|
84
|
+
},
|
|
85
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react/types-6-0';
|
|
2
|
+
import { IReqoreHeadingProps } from '../../components/Header';
|
|
3
|
+
import { ReqoreHeading } from '../../index';
|
|
4
|
+
import { IntentArg } from '../utils/args';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Components/Heading',
|
|
8
|
+
argTypes: {
|
|
9
|
+
...IntentArg,
|
|
10
|
+
},
|
|
11
|
+
} as Meta;
|
|
12
|
+
|
|
13
|
+
const Template: Story<IReqoreHeadingProps> = (args) => {
|
|
14
|
+
return (
|
|
15
|
+
<>
|
|
16
|
+
<ReqoreHeading size={1} {...args}>
|
|
17
|
+
This is a heading
|
|
18
|
+
</ReqoreHeading>
|
|
19
|
+
<ReqoreHeading size={2} {...args}>
|
|
20
|
+
This is a heading
|
|
21
|
+
</ReqoreHeading>
|
|
22
|
+
<ReqoreHeading size={3} {...args}>
|
|
23
|
+
This is a heading
|
|
24
|
+
</ReqoreHeading>
|
|
25
|
+
<ReqoreHeading size={4} {...args}>
|
|
26
|
+
This is a heading
|
|
27
|
+
</ReqoreHeading>
|
|
28
|
+
<ReqoreHeading size={5} {...args}>
|
|
29
|
+
This is a heading
|
|
30
|
+
</ReqoreHeading>
|
|
31
|
+
<ReqoreHeading size={6} {...args}>
|
|
32
|
+
This is a heading
|
|
33
|
+
</ReqoreHeading>
|
|
34
|
+
</>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const Basic = Template.bind({});
|
|
39
|
+
export const Success = Template.bind({});
|
|
40
|
+
Success.args = {
|
|
41
|
+
intent: 'success',
|
|
42
|
+
};
|
|
43
|
+
export const Danger = Template.bind({});
|
|
44
|
+
Danger.args = {
|
|
45
|
+
intent: 'danger',
|
|
46
|
+
};
|
|
47
|
+
export const Warning = Template.bind({});
|
|
48
|
+
Warning.args = {
|
|
49
|
+
intent: 'warning',
|
|
50
|
+
};
|
|
51
|
+
export const Info = Template.bind({});
|
|
52
|
+
Info.args = {
|
|
53
|
+
intent: 'info',
|
|
54
|
+
};
|
|
55
|
+
export const Pending = Template.bind({});
|
|
56
|
+
Pending.args = {
|
|
57
|
+
intent: 'pending',
|
|
58
|
+
};
|
|
59
|
+
export const Muted = Template.bind({});
|
|
60
|
+
Muted.args = {
|
|
61
|
+
intent: 'muted',
|
|
62
|
+
};
|
|
63
|
+
export const Effect = Template.bind({});
|
|
64
|
+
Effect.args = {
|
|
65
|
+
effect: {
|
|
66
|
+
gradient: { colors: { 0: '#5e0acc', 100: '#c008c0' } },
|
|
67
|
+
spaced: 4,
|
|
68
|
+
weight: 'bold',
|
|
69
|
+
uppercase: true,
|
|
70
|
+
},
|
|
71
|
+
};
|
|
@@ -108,3 +108,15 @@ export const Muted = Template.bind({});
|
|
|
108
108
|
Muted.args = {
|
|
109
109
|
intent: 'muted',
|
|
110
110
|
};
|
|
111
|
+
|
|
112
|
+
export const Effect = Template.bind({});
|
|
113
|
+
Effect.args = {
|
|
114
|
+
effect: {
|
|
115
|
+
gradient: {
|
|
116
|
+
colors: {
|
|
117
|
+
0: '#56345e',
|
|
118
|
+
100: 'transparent',
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
};
|
|
@@ -95,6 +95,20 @@ const Template: Story<IReqoreMenuProps> = (args) => {
|
|
|
95
95
|
<ReqoreMenuItem icon='DualSim1Line' rightIcon='MoneyEuroBoxLine' selected>
|
|
96
96
|
I am selected!
|
|
97
97
|
</ReqoreMenuItem>
|
|
98
|
+
<ReqoreMenuItem
|
|
99
|
+
icon='FireLine'
|
|
100
|
+
rightIcon='ArrowRightDownLine'
|
|
101
|
+
effect={{
|
|
102
|
+
gradient: {
|
|
103
|
+
colors: {
|
|
104
|
+
0: '#000000',
|
|
105
|
+
100: 'transparent',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
}}
|
|
109
|
+
>
|
|
110
|
+
Fancy
|
|
111
|
+
</ReqoreMenuItem>
|
|
98
112
|
</ReqoreMenu>
|
|
99
113
|
);
|
|
100
114
|
};
|
|
@@ -57,3 +57,16 @@ CustomTheme.args = {
|
|
|
57
57
|
main: '#6e1295',
|
|
58
58
|
},
|
|
59
59
|
};
|
|
60
|
+
|
|
61
|
+
export const Effect: Story<IReqoreMessageProps> = Template.bind({});
|
|
62
|
+
Effect.args = {
|
|
63
|
+
effect: {
|
|
64
|
+
gradient: {
|
|
65
|
+
colors: {
|
|
66
|
+
0: '#00e3e8',
|
|
67
|
+
100: '#eb0e8c',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
color: '#000000',
|
|
71
|
+
},
|
|
72
|
+
};
|
|
@@ -6,7 +6,7 @@ import ReqoreNotification, {
|
|
|
6
6
|
IReqoreNotificationProps,
|
|
7
7
|
} from '../../components/Notifications/notification';
|
|
8
8
|
import { IReqoreUIProviderProps } from '../../containers/UIProvider';
|
|
9
|
-
import { ReqoreUIProvider } from '../../index';
|
|
9
|
+
import { ReqoreTag, ReqoreUIProvider } from '../../index';
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
12
|
title: 'Components/Notifications/Item',
|
|
@@ -35,7 +35,12 @@ const Template: Story<IReqoreNotificationProps & IReqoreUIProviderProps> = ({
|
|
|
35
35
|
{...args}
|
|
36
36
|
type='success'
|
|
37
37
|
title='Simple notification'
|
|
38
|
-
content=
|
|
38
|
+
content={
|
|
39
|
+
<ReqoreTag
|
|
40
|
+
label='Custom content in notification'
|
|
41
|
+
effect={{ gradient: { colors: { 0: '#a11c58', 100: '#ff47a3' } } }}
|
|
42
|
+
/>
|
|
43
|
+
}
|
|
39
44
|
onClick={noop}
|
|
40
45
|
/>
|
|
41
46
|
<ReqoreNotification
|
|
@@ -28,6 +28,12 @@ export default {
|
|
|
28
28
|
name: 'Collapsible',
|
|
29
29
|
description: 'If the panel should be collapsible',
|
|
30
30
|
}),
|
|
31
|
+
...createArg('minimal', {
|
|
32
|
+
type: 'boolean',
|
|
33
|
+
defaultValue: false,
|
|
34
|
+
name: 'Minimal',
|
|
35
|
+
description: 'If the panel should be minimal',
|
|
36
|
+
}),
|
|
31
37
|
...createArg('label', {
|
|
32
38
|
type: 'string',
|
|
33
39
|
defaultValue: 'Reqore panel component',
|
|
@@ -36,7 +42,7 @@ export default {
|
|
|
36
42
|
}),
|
|
37
43
|
...createArg('opacity', {
|
|
38
44
|
type: 'number',
|
|
39
|
-
defaultValue:
|
|
45
|
+
defaultValue: undefined,
|
|
40
46
|
name: 'Opacity',
|
|
41
47
|
description: 'The opacity of the panel',
|
|
42
48
|
}),
|
|
@@ -133,3 +139,33 @@ export const Opaque: Story<IReqorePanelProps> = Template.bind({});
|
|
|
133
139
|
Opaque.args = {
|
|
134
140
|
opacity: 0,
|
|
135
141
|
};
|
|
142
|
+
|
|
143
|
+
export const Minimal: Story<IReqorePanelProps> = Template.bind({});
|
|
144
|
+
Minimal.args = {
|
|
145
|
+
minimal: true,
|
|
146
|
+
flat: true,
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
export const WithEffect: Story<IReqorePanelProps> = Template.bind({});
|
|
150
|
+
WithEffect.args = {
|
|
151
|
+
minimal: true,
|
|
152
|
+
flat: true,
|
|
153
|
+
contentEffect: {
|
|
154
|
+
gradient: {
|
|
155
|
+
type: 'radial',
|
|
156
|
+
shape: 'ellipse',
|
|
157
|
+
colors: { 0: '#670079', 100: '#180222' },
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
headerEffect: {
|
|
161
|
+
gradient: {
|
|
162
|
+
type: 'linear',
|
|
163
|
+
colors: { 0: '#3b065e', 100: '#00d3c8' },
|
|
164
|
+
direction: 'to right bottom',
|
|
165
|
+
},
|
|
166
|
+
uppercase: true,
|
|
167
|
+
weight: 'normal',
|
|
168
|
+
spaced: 2,
|
|
169
|
+
},
|
|
170
|
+
headerSize: 2,
|
|
171
|
+
};
|
|
@@ -83,6 +83,18 @@ export default {
|
|
|
83
83
|
name: 'Fill',
|
|
84
84
|
description: 'If the tabs should fill the container',
|
|
85
85
|
}),
|
|
86
|
+
...createArg('fillParent', {
|
|
87
|
+
type: 'boolean',
|
|
88
|
+
defaultValue: false,
|
|
89
|
+
name: 'Fill Parent',
|
|
90
|
+
description: 'If the tabs should fill the parent container',
|
|
91
|
+
}),
|
|
92
|
+
...createArg('wrapTabNames', {
|
|
93
|
+
type: 'boolean',
|
|
94
|
+
defaultValue: false,
|
|
95
|
+
name: 'Wrap Tab Names',
|
|
96
|
+
description: 'If the tab names should wrap',
|
|
97
|
+
}),
|
|
86
98
|
...createArg('vertical', {
|
|
87
99
|
type: 'boolean',
|
|
88
100
|
defaultValue: false,
|
|
@@ -195,39 +207,27 @@ Vertical.args = {
|
|
|
195
207
|
|
|
196
208
|
export const VerticalWithWrapping = Template.bind({});
|
|
197
209
|
VerticalWithWrapping.args = {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
fillParent: true,
|
|
202
|
-
wrapTabNames: true,
|
|
203
|
-
},
|
|
210
|
+
vertical: true,
|
|
211
|
+
fillParent: true,
|
|
212
|
+
wrapTabNames: true,
|
|
204
213
|
};
|
|
205
214
|
|
|
206
215
|
export const VerticalFill = Template.bind({});
|
|
207
216
|
VerticalFill.args = {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
fill: true,
|
|
212
|
-
fillParent: true,
|
|
213
|
-
},
|
|
217
|
+
vertical: true,
|
|
218
|
+
fill: true,
|
|
219
|
+
fillParent: true,
|
|
214
220
|
};
|
|
215
221
|
|
|
216
222
|
export const VerticalCustomWidth = Template.bind({});
|
|
217
223
|
VerticalCustomWidth.args = {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
fillParent: true,
|
|
223
|
-
width: '300px',
|
|
224
|
-
},
|
|
224
|
+
vertical: true,
|
|
225
|
+
fill: true,
|
|
226
|
+
fillParent: true,
|
|
227
|
+
width: '300px',
|
|
225
228
|
};
|
|
226
229
|
|
|
227
230
|
export const Flat = Template.bind({});
|
|
228
231
|
Flat.args = {
|
|
229
|
-
|
|
230
|
-
...tabs,
|
|
231
|
-
flat: true,
|
|
232
|
-
},
|
|
232
|
+
flat: true,
|
|
233
233
|
};
|