@griddo/ax 11.14.4-rc.0 → 11.14.5-rc.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 +2 -2
- package/src/api/sites.tsx +2 -2
- package/src/components/Fields/ImageField/index.tsx +52 -28
- package/src/components/Fields/ImageField/style.tsx +22 -13
- package/src/components/Fields/NoteField/index.tsx +1 -3
- package/src/components/Fields/NoteField/style.tsx +1 -0
- package/src/components/Fields/TextArea/style.tsx +5 -2
- package/src/components/Fields/ToggleField/index.tsx +3 -2
- package/src/components/FieldsBehavior/index.tsx +27 -3
- package/src/components/FieldsBehavior/style.tsx +9 -7
- package/src/components/FloatingNote/index.tsx +1 -1
- package/src/components/FloatingPanel/style.tsx +4 -1
- package/src/components/HeadingsPreviewModal/style.tsx +1 -1
- package/src/components/Icon/components/Party.js +16 -0
- package/src/components/Icon/svgs/Party.svg +3 -0
- package/src/components/Image/index.tsx +2 -1
- package/src/components/Image/utils.ts +3 -3
- package/src/components/MainWrapper/AppBar/atoms.tsx +118 -34
- package/src/components/MainWrapper/AppBar/index.tsx +64 -86
- package/src/components/MainWrapper/AppBar/style.tsx +5 -0
- package/src/components/MainWrapper/index.tsx +2 -41
- package/src/containers/Navigation/Defaults/reducer.tsx +2 -2
- package/src/containers/Sites/actions.tsx +2 -3
- package/src/modules/Content/index.tsx +26 -8
- package/src/modules/Content/style.tsx +5 -0
- package/src/modules/GlobalSettings/Robots/Item/RobotsPanel/index.tsx +34 -17
- package/src/modules/GlobalSettings/Robots/Item/RobotsPanel/style.tsx +37 -5
- package/src/modules/GlobalSettings/Robots/index.tsx +4 -3
- package/src/modules/Navigation/Defaults/DefaultsEditor/index.tsx +8 -17
- package/src/modules/Navigation/Defaults/Item/index.tsx +17 -19
- package/src/modules/Navigation/Defaults/index.tsx +5 -8
- package/src/modules/Settings/Globals/NavigationModules/index.tsx +1 -1
- package/src/modules/Settings/Globals/NavigationModules/style.tsx +1 -2
- package/src/modules/Settings/Globals/index.tsx +194 -73
- package/src/modules/Settings/Globals/style.tsx +67 -1
- package/src/modules/Settings/Integrations/IntegrationItem/index.tsx +2 -3
- package/src/modules/Sites/SitesList/GridView/GridSiteItem/index.tsx +13 -5
- package/src/modules/Sites/SitesList/GridView/GridSiteItem/style.tsx +16 -8
- package/src/modules/Sites/SitesList/ListView/BulkHeader/TableHeader/index.tsx +1 -0
- package/src/modules/Sites/SitesList/ListView/BulkHeader/TableHeader/style.tsx +7 -1
- package/src/modules/Sites/SitesList/ListView/ListSiteItem/index.tsx +8 -1
- package/src/modules/Sites/SitesList/ListView/ListSiteItem/style.tsx +7 -1
- package/src/modules/Sites/SitesList/SiteModal/index.tsx +77 -23
- package/src/modules/Sites/SitesList/atoms.tsx +4 -4
- package/src/modules/Sites/SitesList/index.tsx +9 -47
- package/src/modules/Sites/SitesList/style.tsx +8 -4
- package/src/modules/Users/UserForm/index.tsx +1 -1
- package/src/types/index.tsx +11 -22
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@griddo/ax",
|
|
3
3
|
"description": "Griddo Author Experience",
|
|
4
|
-
"version": "11.14.
|
|
4
|
+
"version": "11.14.5-rc.0",
|
|
5
5
|
"authors": [
|
|
6
6
|
"Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
|
|
7
7
|
"Diego M. Béjar <diego.bejar@secuoyas.com>",
|
|
@@ -219,5 +219,5 @@
|
|
|
219
219
|
"publishConfig": {
|
|
220
220
|
"access": "public"
|
|
221
221
|
},
|
|
222
|
-
"gitHead": "
|
|
222
|
+
"gitHead": "35106a4e094a9b210ac358d51ad5a2d80dbc6a2d"
|
|
223
223
|
}
|
package/src/api/sites.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AxiosResponse } from "axios";
|
|
2
|
-
import type { IGetGlobalPagesParams, IGetSitePagesParams, IGetSitesParams } from "@ax/types";
|
|
2
|
+
import type { IGetGlobalPagesParams, IGetSitePagesParams, IGetSitesParams, ISite } from "@ax/types";
|
|
3
3
|
import { template } from "./config";
|
|
4
4
|
import { sendRequest, type IServiceConfig, sendInitialRequest } from "./utils";
|
|
5
5
|
|
|
@@ -340,7 +340,7 @@ const deleteSite = async (siteID: number) => {
|
|
|
340
340
|
|
|
341
341
|
const createSite = async (data: any) => sendRequest(SERVICES.CREATE_SITE, { ...data });
|
|
342
342
|
|
|
343
|
-
const updateSite = (siteID: number, data:
|
|
343
|
+
const updateSite = (siteID: number, data: ISite) => {
|
|
344
344
|
const {
|
|
345
345
|
host,
|
|
346
346
|
endpoint: [prefix, suffix],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { memo, useEffect, useMemo,
|
|
1
|
+
import { memo, useEffect, useMemo, useState } from "react";
|
|
2
2
|
|
|
3
3
|
import { FieldsBehavior, Gallery, Icon, IconAction, Image, ImageDragAndDrop, Modal } from "@ax/components";
|
|
4
4
|
import { formatBytes, getFormattedDateWithTimezone } from "@ax/helpers";
|
|
@@ -21,15 +21,18 @@ const ImageField = (props: IImageFieldProps) => {
|
|
|
21
21
|
cropPreview = false,
|
|
22
22
|
fullWidth = false,
|
|
23
23
|
noGallery = false,
|
|
24
|
+
selectPosition = true,
|
|
25
|
+
previewHeight,
|
|
26
|
+
previewWidth,
|
|
27
|
+
objectFit = "cover",
|
|
24
28
|
} = props;
|
|
25
29
|
|
|
26
30
|
const isLinkableImage = selectedContent && selectedContent.component === "LinkableImage";
|
|
27
31
|
const hasImage = value && Object.prototype.hasOwnProperty.call(value, "url");
|
|
28
32
|
const isModalOpen = isLinkableImage && !hasImage;
|
|
29
|
-
const { isOpen, toggleModal } = useModal(isModalOpen);
|
|
30
|
-
const { isOpen: isOpenDD, toggleModal: toggleModalDD } = useModal(isModalOpen);
|
|
33
|
+
const { isOpen, toggleModal } = useModal(isModalOpen && !noGallery);
|
|
34
|
+
const { isOpen: isOpenDD, toggleModal: toggleModalDD } = useModal(isModalOpen && noGallery);
|
|
31
35
|
const [previewSrc, setPreviewSrc] = useState<string>();
|
|
32
|
-
const previewRef = useRef<HTMLDivElement>(null);
|
|
33
36
|
|
|
34
37
|
const imageUrl = value ? (typeof value === "string" ? value : value.url) : "";
|
|
35
38
|
const imagePosition = value && typeof value === "object" ? value.position : "center";
|
|
@@ -56,17 +59,20 @@ const ImageField = (props: IImageFieldProps) => {
|
|
|
56
59
|
}
|
|
57
60
|
};
|
|
58
61
|
|
|
62
|
+
const openImageSelector = () => {
|
|
63
|
+
setIsGalleryOpened?.();
|
|
64
|
+
noGallery ? toggleModalDD() : toggleModal();
|
|
65
|
+
};
|
|
66
|
+
|
|
59
67
|
const handleClick = () => {
|
|
60
68
|
if (!disabled) {
|
|
61
|
-
|
|
62
|
-
noGallery ? toggleModalDD() : toggleModal();
|
|
69
|
+
openImageSelector();
|
|
63
70
|
}
|
|
64
71
|
};
|
|
65
72
|
|
|
66
73
|
const handleChange = () => {
|
|
67
74
|
if (!disabled) {
|
|
68
|
-
|
|
69
|
-
noGallery ? toggleModalDD() : toggleModal();
|
|
75
|
+
openImageSelector();
|
|
70
76
|
}
|
|
71
77
|
};
|
|
72
78
|
|
|
@@ -87,7 +93,10 @@ const ImageField = (props: IImageFieldProps) => {
|
|
|
87
93
|
|
|
88
94
|
const handleUpload = (file: IImage[]) => getImageSelected(file[0]);
|
|
89
95
|
|
|
90
|
-
const imageElement = useMemo(
|
|
96
|
+
const imageElement = useMemo(
|
|
97
|
+
() => <Image url={previewSrc} width={previewWidth ? previewWidth.toString() : "320"} />,
|
|
98
|
+
[previewSrc, previewWidth],
|
|
99
|
+
);
|
|
91
100
|
|
|
92
101
|
return (
|
|
93
102
|
<>
|
|
@@ -114,25 +123,36 @@ const ImageField = (props: IImageFieldProps) => {
|
|
|
114
123
|
</S.ImageData>
|
|
115
124
|
</S.ImageDataWrapper>
|
|
116
125
|
)}
|
|
117
|
-
<S.Preview
|
|
118
|
-
{previewSrc
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
<S.
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
<S.
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
126
|
+
<S.Preview
|
|
127
|
+
preview={!!previewSrc}
|
|
128
|
+
data-testid="previewDiv"
|
|
129
|
+
customPreviewHeight={previewHeight}
|
|
130
|
+
customPreviewWidth={previewWidth}
|
|
131
|
+
>
|
|
132
|
+
{previewSrc && (
|
|
133
|
+
<S.ImageContainer objectFit={cropPreview ? "cover" : objectFit} cropPreview={cropPreview}>
|
|
134
|
+
{imageElement}
|
|
135
|
+
</S.ImageContainer>
|
|
136
|
+
)}
|
|
137
|
+
{selectPosition && (
|
|
138
|
+
<S.PositionWrapper>
|
|
139
|
+
<S.PositionTitle>
|
|
140
|
+
<Icon name="grid" size="16" />
|
|
141
|
+
<span>POSITION</span>
|
|
142
|
+
</S.PositionTitle>
|
|
143
|
+
<S.PositionGrid>
|
|
144
|
+
<S.Position onClick={handlePosition("left-top")} active={imagePosition === "left-top"} />
|
|
145
|
+
<S.Position onClick={handlePosition("top")} active={imagePosition === "top"} />
|
|
146
|
+
<S.Position onClick={handlePosition("right-top")} active={imagePosition === "right-top"} />
|
|
147
|
+
<S.Position onClick={handlePosition("left")} active={imagePosition === "left"} />
|
|
148
|
+
<S.Position onClick={handlePosition("center")} active={!imagePosition || imagePosition === "center"} />
|
|
149
|
+
<S.Position onClick={handlePosition("right")} active={imagePosition === "right"} />
|
|
150
|
+
<S.Position onClick={handlePosition("left-bottom")} active={imagePosition === "left-bottom"} />
|
|
151
|
+
<S.Position onClick={handlePosition("bottom")} active={imagePosition === "bottom"} />
|
|
152
|
+
<S.Position onClick={handlePosition("right-bottom")} active={imagePosition === "right-bottom"} />
|
|
153
|
+
</S.PositionGrid>
|
|
154
|
+
</S.PositionWrapper>
|
|
155
|
+
)}
|
|
136
156
|
<S.PreviewActions>
|
|
137
157
|
<IconAction icon="change" onClick={handleChange} />
|
|
138
158
|
<IconAction icon="delete" onClick={handleDelete} />
|
|
@@ -177,6 +197,10 @@ export interface IImageFieldProps {
|
|
|
177
197
|
cropPreview?: boolean;
|
|
178
198
|
fullWidth?: boolean;
|
|
179
199
|
noGallery?: boolean;
|
|
200
|
+
selectPosition?: boolean;
|
|
201
|
+
previewHeight?: number;
|
|
202
|
+
previewWidth?: number;
|
|
203
|
+
objectFit?: "contain" | "cover";
|
|
180
204
|
}
|
|
181
205
|
|
|
182
206
|
export default memo(ImageField);
|
|
@@ -110,14 +110,22 @@ const PositionWrapper = styled.div`
|
|
|
110
110
|
}
|
|
111
111
|
`;
|
|
112
112
|
|
|
113
|
-
const Preview = styled.div<{
|
|
113
|
+
const Preview = styled.div<{
|
|
114
|
+
preview: boolean;
|
|
115
|
+
customPreviewHeight?: number;
|
|
116
|
+
customPreviewWidth?: number;
|
|
117
|
+
computedImageHeight?: string | number;
|
|
118
|
+
}>`
|
|
114
119
|
position: relative;
|
|
115
|
-
min-height: ${(p) => `calc(${p.theme.spacing.l} * 2)`};
|
|
116
|
-
max-width: ${(p) => `calc(${p.theme.spacing.xl} * 5)`};
|
|
117
|
-
|
|
120
|
+
min-height: ${(p) => p.customPreviewHeight || (p.computedImageHeight ? p.computedImageHeight : `calc(${p.theme.spacing.l} * 2)`)};
|
|
121
|
+
max-width: ${(p) => (p.customPreviewWidth ? "none" : `calc(${p.theme.spacing.xl} * 5)`)};
|
|
122
|
+
height: ${(p) => `${p.customPreviewHeight}px`};
|
|
123
|
+
width: ${(p) => `${p.customPreviewWidth}px` || "100%"};
|
|
118
124
|
border: 1px solid ${(p) => p.theme.colors.uiLine};
|
|
119
125
|
border-radius: 4px;
|
|
120
|
-
|
|
126
|
+
background-color: ${(p) => p.theme.color.uiBackground02};
|
|
127
|
+
display: ${(p) => (p.preview ? `flex` : `none`)};
|
|
128
|
+
flex-direction: column;
|
|
121
129
|
overflow: hidden;
|
|
122
130
|
margin-bottom: ${(p) => p.theme.spacing.xxs};
|
|
123
131
|
:hover {
|
|
@@ -143,21 +151,22 @@ const ImageDataWrapper = styled.div`
|
|
|
143
151
|
max-width: ${(p) => `calc(${p.theme.spacing.xl} * 5)`};
|
|
144
152
|
`;
|
|
145
153
|
|
|
146
|
-
const ImageContainer = styled.div<{ cropPreview?: boolean }>`
|
|
154
|
+
const ImageContainer = styled.div<{ objectFit: "contain" | "cover"; cropPreview?: boolean }>`
|
|
147
155
|
display: flex;
|
|
148
156
|
justify-content: center;
|
|
149
157
|
align-items: center;
|
|
150
|
-
|
|
158
|
+
flex: 1;
|
|
151
159
|
width: 100%;
|
|
160
|
+
${(p) => (p.cropPreview ? "height: 180px;" : "min-height: 180px;")}
|
|
152
161
|
overflow: hidden;
|
|
153
162
|
|
|
154
|
-
img
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
height: 100%;
|
|
163
|
+
img,
|
|
164
|
+
picture,
|
|
165
|
+
svg {
|
|
166
|
+
display: block;
|
|
159
167
|
width: 100%;
|
|
160
|
-
|
|
168
|
+
height: 100%;
|
|
169
|
+
object-fit: ${(p) => p.objectFit};
|
|
161
170
|
`;
|
|
162
171
|
|
|
163
172
|
const FileName = styled.div`
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
1
|
import * as S from "./style";
|
|
4
2
|
|
|
5
3
|
const NoteField = (props: INoteFieldProps): JSX.Element => {
|
|
@@ -15,7 +13,7 @@ const NoteField = (props: INoteFieldProps): JSX.Element => {
|
|
|
15
13
|
};
|
|
16
14
|
|
|
17
15
|
export interface INoteFieldProps {
|
|
18
|
-
value: { title?: string; text:
|
|
16
|
+
value: { title?: string; text: React.ReactNode };
|
|
19
17
|
className?: string;
|
|
20
18
|
}
|
|
21
19
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
1
|
import TextareaAutosize from "react-textarea-autosize";
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
|
|
5
|
+
const TextArea = styled(TextareaAutosize)<{ $error: boolean | undefined }>`
|
|
5
6
|
${(p) => p.theme.textStyle.fieldContent};
|
|
6
7
|
border: 1px solid ${(p) => (p.$error === true ? p.theme.color.error : p.theme.color.uiLine)};
|
|
7
8
|
border-radius: 4px;
|
|
@@ -29,3 +30,5 @@ export const TextArea = styled(TextareaAutosize)<{ $error: boolean | undefined }
|
|
|
29
30
|
border-color: ${(p) => p.theme.color.interactiveDisabled};
|
|
30
31
|
}
|
|
31
32
|
`;
|
|
33
|
+
|
|
34
|
+
export { TextArea };
|
|
@@ -3,7 +3,7 @@ import { useMemo } from "react";
|
|
|
3
3
|
import * as S from "./style";
|
|
4
4
|
|
|
5
5
|
const ToggleField = (props: IToggleFieldProps): JSX.Element => {
|
|
6
|
-
const { name, value, disabled, onChange, size = "m", background = false, auxText } = props;
|
|
6
|
+
const { name, value, disabled, onChange, size = "m", background = false, auxText, className } = props;
|
|
7
7
|
|
|
8
8
|
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
9
9
|
const isChecked = e.target.checked;
|
|
@@ -15,7 +15,7 @@ const ToggleField = (props: IToggleFieldProps): JSX.Element => {
|
|
|
15
15
|
const id = useMemo(() => Math.random().toString(), []);
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
|
-
<S.Wrapper background={background} data-testid="toggle-field-wrapper">
|
|
18
|
+
<S.Wrapper background={background} className={className} data-testid="toggle-field-wrapper">
|
|
19
19
|
<S.Input
|
|
20
20
|
id={`toggle-${id}`}
|
|
21
21
|
type="checkbox"
|
|
@@ -40,6 +40,7 @@ export interface IToggleFieldProps {
|
|
|
40
40
|
size?: "s" | "m";
|
|
41
41
|
background?: boolean;
|
|
42
42
|
auxText?: string;
|
|
43
|
+
className?: string;
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
export default ToggleField;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
2
|
|
|
3
|
-
import { isEmptyContainer, getFieldByPath } from "@ax/helpers";
|
|
4
3
|
import { IconAction, Tooltip } from "@ax/components";
|
|
5
4
|
import { getValidity } from "@ax/forms";
|
|
5
|
+
import { getFieldByPath, isEmptyContainer } from "@ax/helpers";
|
|
6
|
+
import type { IErrorItem } from "@ax/types";
|
|
6
7
|
|
|
7
8
|
import * as S from "./style";
|
|
8
9
|
|
|
9
|
-
const FieldsBehavior = (props:
|
|
10
|
+
const FieldsBehavior = (props: IFieldsBehaviorProps): JSX.Element => {
|
|
10
11
|
const {
|
|
11
12
|
value,
|
|
12
13
|
fieldType,
|
|
@@ -123,4 +124,27 @@ const FieldsBehavior = (props: any): JSX.Element => {
|
|
|
123
124
|
);
|
|
124
125
|
};
|
|
125
126
|
|
|
127
|
+
interface IFieldsBehaviorProps {
|
|
128
|
+
value: any;
|
|
129
|
+
fieldType: string;
|
|
130
|
+
title?: string;
|
|
131
|
+
name?: string;
|
|
132
|
+
helptext?: string;
|
|
133
|
+
hideable?: boolean;
|
|
134
|
+
hideField?: () => void;
|
|
135
|
+
advanced?: boolean;
|
|
136
|
+
className?: string;
|
|
137
|
+
whiteList?: string[];
|
|
138
|
+
mandatory?: boolean;
|
|
139
|
+
disabled?: boolean;
|
|
140
|
+
filled?: boolean;
|
|
141
|
+
validators?: Record<string, unknown>;
|
|
142
|
+
error?: any; // TODO add type IErrorItem?
|
|
143
|
+
deleteError?: (error: IErrorItem) => void;
|
|
144
|
+
editorID?: string | number;
|
|
145
|
+
objKey?: string | number;
|
|
146
|
+
inversed?: boolean;
|
|
147
|
+
[key: string]: unknown;
|
|
148
|
+
}
|
|
149
|
+
|
|
126
150
|
export default FieldsBehavior;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const Label = styled.label<{ error: boolean | undefined; inversed: boolean }>`
|
|
4
4
|
${(p) => p.theme.textStyle.fieldLabel};
|
|
5
5
|
color: ${(p) =>
|
|
6
6
|
p.error === true
|
|
@@ -12,11 +12,11 @@ export const Label = styled.label<{ error: boolean | undefined; inversed: boolea
|
|
|
12
12
|
margin-bottom: ${(p) => p.theme.spacing.xs};
|
|
13
13
|
`;
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
const Asterisk = styled.span`
|
|
16
16
|
color: ${(p) => p.theme.color.error};
|
|
17
17
|
`;
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
const HelpText = styled.div<{ error: boolean | undefined; inversed: boolean }>`
|
|
20
20
|
${(p) => p.theme.textStyle.uiXS};
|
|
21
21
|
color: ${(p) =>
|
|
22
22
|
p.error === true
|
|
@@ -26,7 +26,7 @@ export const HelpText = styled.div<{ error: boolean | undefined; inversed: boole
|
|
|
26
26
|
: p.theme.color.textMediumEmphasis};
|
|
27
27
|
`;
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
const Header = styled.div`
|
|
30
30
|
position: absolute;
|
|
31
31
|
left: 0;
|
|
32
32
|
top: 0;
|
|
@@ -35,12 +35,12 @@ export const Header = styled.div`
|
|
|
35
35
|
justify-content: space-between;
|
|
36
36
|
`;
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
const Icons = styled.div`
|
|
39
39
|
opacity: 0;
|
|
40
40
|
display: flex;
|
|
41
41
|
`;
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
const Wrapper = styled.div<{ showTitle: boolean | undefined }>`
|
|
44
44
|
position: relative;
|
|
45
45
|
margin-bottom: ${(p) => p.theme.spacing.m};
|
|
46
46
|
padding-top: ${(p) => (p.showTitle ? p.theme.spacing.m : 0)};
|
|
@@ -66,7 +66,7 @@ export const Wrapper = styled.div<{ showTitle: boolean | undefined }>`
|
|
|
66
66
|
}
|
|
67
67
|
`;
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
const Content = styled.div<{ error: boolean | undefined; inversed: boolean }>`
|
|
70
70
|
&:focus-within {
|
|
71
71
|
& + div label {
|
|
72
72
|
color: ${(p) =>
|
|
@@ -78,3 +78,5 @@ export const Content = styled.div<{ error: boolean | undefined; inversed: boolea
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
`;
|
|
81
|
+
|
|
82
|
+
export { Label, Asterisk, HelpText, Header, Icons, Wrapper, Content };
|
|
@@ -30,6 +30,8 @@ export const Wrapper = styled.section<{
|
|
|
30
30
|
border: ${(p) => (p.secondary ? `1px solid ${p.theme.colors.uiLine}` : `none`)};
|
|
31
31
|
transform: ${(p) => (p.isOpen ? (p.isOpenedSecond ? `translateX(-384px)` : `translateX(0)`) : `translateX(100%)`)};
|
|
32
32
|
transition: transform 0.5s ease-in-out;
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
33
35
|
body.modal-open:not(&) {
|
|
34
36
|
overflow: hidden;
|
|
35
37
|
}
|
|
@@ -46,7 +48,8 @@ export const Wrapper = styled.section<{
|
|
|
46
48
|
`;
|
|
47
49
|
|
|
48
50
|
export const Content = styled.div`
|
|
49
|
-
|
|
51
|
+
flex: 1;
|
|
52
|
+
overflow: hidden;
|
|
50
53
|
`;
|
|
51
54
|
|
|
52
55
|
export const ButtonWrapper = styled.div`
|
|
@@ -5,7 +5,7 @@ import { getHeadColor } from "./utils";
|
|
|
5
5
|
const Wrapper = styled.div``;
|
|
6
6
|
|
|
7
7
|
const HeadingsWrapper = styled.div`
|
|
8
|
-
padding: ${(p) => `${p.theme.spacing.m} ${p.theme.spacing.m}
|
|
8
|
+
padding: ${(p) => `${p.theme.spacing.m} ${p.theme.spacing.m} ${p.theme.spacing.m} ${p.theme.spacing.s}`};
|
|
9
9
|
overflow-y: auto;
|
|
10
10
|
height: 100%;
|
|
11
11
|
width: 100%;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
const SvgParty = (props) => (
|
|
3
|
+
<svg
|
|
4
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
width={24}
|
|
6
|
+
height={24}
|
|
7
|
+
fill="none"
|
|
8
|
+
{...props}
|
|
9
|
+
>
|
|
10
|
+
<path
|
|
11
|
+
fill="#5057FF"
|
|
12
|
+
d="M2 22 7 8l9 9-14 5Zm3.3-3.3 7.05-2.5-4.55-4.55-2.5 7.05Zm9.25-6.15L13.5 11.5l5.6-5.6a2.624 2.624 0 0 1 1.925-.8c.75 0 1.392.267 1.925.8l.6.6-1.05 1.05-.6-.6a1.187 1.187 0 0 0-.875-.35c-.35 0-.642.117-.875.35l-5.6 5.6Zm-4-4L9.5 7.5l.6-.6c.233-.233.35-.517.35-.85 0-.333-.117-.617-.35-.85l-.65-.65L10.5 3.5l.65.65c.533.533.8 1.167.8 1.9 0 .733-.267 1.367-.8 1.9l-.6.6Zm2 2L11.5 9.5l3.6-3.6c.233-.233.35-.525.35-.875s-.117-.642-.35-.875l-1.6-1.6 1.05-1.05 1.6 1.6c.533.533.8 1.175.8 1.925s-.267 1.392-.8 1.925l-3.6 3.6Zm4 4L15.5 13.5l1.6-1.6a2.624 2.624 0 0 1 1.925-.8c.75 0 1.392.267 1.925.8l1.6 1.6-1.05 1.05-1.6-1.6a1.187 1.187 0 0 0-.875-.35c-.35 0-.642.117-.875.35l-1.6 1.6Z"
|
|
13
|
+
/>
|
|
14
|
+
</svg>
|
|
15
|
+
);
|
|
16
|
+
export default SvgParty;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M2 22L7 8L16 17L2 22ZM5.3 18.7L12.35 16.2L7.8 11.65L5.3 18.7ZM14.55 12.55L13.5 11.5L19.1 5.9C19.6333 5.36667 20.275 5.1 21.025 5.1C21.775 5.1 22.4167 5.36667 22.95 5.9L23.55 6.5L22.5 7.55L21.9 6.95C21.6667 6.71667 21.375 6.6 21.025 6.6C20.675 6.6 20.3833 6.71667 20.15 6.95L14.55 12.55ZM10.55 8.55L9.5 7.5L10.1 6.9C10.3333 6.66667 10.45 6.38333 10.45 6.05C10.45 5.71667 10.3333 5.43333 10.1 5.2L9.45 4.55L10.5 3.5L11.15 4.15C11.6833 4.68333 11.95 5.31667 11.95 6.05C11.95 6.78333 11.6833 7.41667 11.15 7.95L10.55 8.55ZM12.55 10.55L11.5 9.5L15.1 5.9C15.3333 5.66667 15.45 5.375 15.45 5.025C15.45 4.675 15.3333 4.38333 15.1 4.15L13.5 2.55L14.55 1.5L16.15 3.1C16.6833 3.63333 16.95 4.275 16.95 5.025C16.95 5.775 16.6833 6.41667 16.15 6.95L12.55 10.55ZM16.55 14.55L15.5 13.5L17.1 11.9C17.6333 11.3667 18.275 11.1 19.025 11.1C19.775 11.1 20.4167 11.3667 20.95 11.9L22.55 13.5L21.5 14.55L19.9 12.95C19.6667 12.7167 19.375 12.6 19.025 12.6C18.675 12.6 18.3833 12.7167 18.15 12.95L16.55 14.55Z" fill="#5057FF"/>
|
|
3
|
+
</svg>
|
|
@@ -28,10 +28,11 @@ const Image = (props: ICloudinaryImageProps | GriddoImageCommonProps) => {
|
|
|
28
28
|
|
|
29
29
|
export interface ICloudinaryImageProps {
|
|
30
30
|
url: string;
|
|
31
|
-
width
|
|
31
|
+
width?: number;
|
|
32
32
|
height?: number;
|
|
33
33
|
quality?: number;
|
|
34
34
|
alt?: string;
|
|
35
|
+
crop?: "cover" | "contain" | "fill" | "inside" | "outside";
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
export default Image;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ICloudinaryImageProps } from "./index";
|
|
1
|
+
import type { ICloudinaryImageProps } from "./index";
|
|
2
2
|
|
|
3
3
|
// The string to split up the cloudinary url
|
|
4
4
|
const CLOUDINARY_SEPARATOR = "image/upload";
|
|
@@ -18,7 +18,7 @@ function createCloudinaryUrl({ props, retina = true }: ICreateCloudinaryUrl): st
|
|
|
18
18
|
// w_100 for width: 100, etc..
|
|
19
19
|
// * 2 = full retina
|
|
20
20
|
const cloudinaryParms = concatCloudinaryParams({
|
|
21
|
-
w: props.width * (retina ? 2 : 1),
|
|
21
|
+
w: props.width && props.width * (retina ? 2 : 1),
|
|
22
22
|
h: props.height && props.height * (retina ? 2 : 1),
|
|
23
23
|
q: props.quality,
|
|
24
24
|
c: "fill",
|
|
@@ -39,7 +39,7 @@ function concatCloudinaryParams(params: ICloudinaryParams) {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
interface ICloudinaryParams {
|
|
42
|
-
w
|
|
42
|
+
w?: number;
|
|
43
43
|
h?: number;
|
|
44
44
|
q?: number;
|
|
45
45
|
c: "fill" | "fit";
|