@stokr/components-library 3.0.36 → 3.0.37
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/auth/index.js +9 -9
- package/dist/components/2FA/login-with-otp-flow.js +1 -1
- package/dist/components/BlogPost/BlogPost.js +1 -1
- package/dist/components/BlogPost/BlogPost.styles.js +1 -1
- package/dist/components/Button/GlareButton.js +1 -1
- package/dist/components/ConfirmModal/ConfirmModal.js +4 -4
- package/dist/components/Country/CountrySelect.js +117 -0
- package/dist/components/Header/Header.js +2 -3
- package/dist/components/InfoBox/InfoBox.js +22 -18
- package/dist/components/Input/InputPassword.js +0 -1
- package/dist/components/Input/Select.js +183 -81
- package/dist/components/Input/Select.styles.js +111 -1
- package/dist/components/LearnMoreSection/LearnMore.js +1 -1
- package/dist/components/MainMenu/MainMenu.js +1 -1
- package/dist/components/Modal/NewVentureModal/NewVentureModal.js +1 -1
- package/dist/components/Modal/PaymentModal.js +1 -2
- package/dist/components/Newsletter/Newsletter.styles.js +1 -1
- package/dist/components/RefreshButton/RefreshButton.js +0 -1
- package/dist/components/Snackbar/Snackbar.styles.js +1 -1
- package/dist/components/TabsNav/TabsNav.js +0 -2
- package/dist/components/TaxResidenceCard/TaxResidenceCard.js +209 -0
- package/dist/components/TaxResidenceCard/TaxResidenceCard.styles.js +169 -0
- package/dist/components/TeamOverview/TeamOverview.js +0 -1
- package/dist/components/ToDoList/ToDoListTask.js +0 -20
- package/dist/components/VerifyEmailModal/VerifyEmailModal.js +1 -15
- package/dist/components/headerHo/HeaderHo.js +5 -22
- package/dist/context/AuthContext.js +7 -7
- package/dist/index.js +137 -130
- package/dist/static/images/globe.svg +16 -0
- package/dist/static/images/globe.svg.js +5 -0
- package/dist/static/images/trash.svg +17 -0
- package/dist/static/images/trash.svg.js +5 -0
- package/dist/utils/customHooks.js +1 -1
- package/dist/utils/get-cookie-domain.js +0 -4
- package/dist/utils/set-redirect-cookie.js +0 -4
- package/package.json +153 -145
|
@@ -1,105 +1,165 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useEffect } from "react";
|
|
3
2
|
import PropTypes from "prop-types";
|
|
4
|
-
import ReactSelect, { components } from "react-select";
|
|
5
|
-
import CreatableSelect from "react-select/creatable";
|
|
6
3
|
import { Wrapper, Label } from "./Input.styles.js";
|
|
4
|
+
import { useState, useMemo } from "react";
|
|
5
|
+
import CreatableSelect from "react-select/creatable";
|
|
6
|
+
import ReactSelect, { components } from "react-select";
|
|
7
7
|
import { IoniconsStyles } from "../../styles/ioniconsStyles.js";
|
|
8
|
-
import { SelectContainer, SelectOption,
|
|
8
|
+
import { SelectContainer, SelectMenu, SelectControl, SelectedChipsWrapper, SelectedChipsTitle, SelectedChipsList, SelectedChip, SelectedChipLabel, SelectedChipRemove, SelectOption, OptionRow, OptionLabel, OptionCheckbox, SelectMenuList, SelectIcon, OptionIcon } from "./Select.styles.js";
|
|
9
9
|
import { SelectValueContainer, SelectWrapper } from "./Select.styles.js";
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
const renderIcon = (icon) => {
|
|
11
|
+
if (!icon) return null;
|
|
12
|
+
if (typeof icon === "string") {
|
|
13
|
+
return /* @__PURE__ */ jsx(OptionIcon, { children: /* @__PURE__ */ jsx("img", { src: icon, alt: "" }) });
|
|
14
|
+
}
|
|
15
|
+
return /* @__PURE__ */ jsx(OptionIcon, { children: icon });
|
|
13
16
|
};
|
|
17
|
+
const buildOptionStyle = (multiple) => (_base, state) => {
|
|
18
|
+
if (multiple) {
|
|
19
|
+
return {
|
|
20
|
+
cursor: "pointer",
|
|
21
|
+
padding: "10px 14px",
|
|
22
|
+
fontSize: 13,
|
|
23
|
+
lineHeight: "18px",
|
|
24
|
+
border: 0,
|
|
25
|
+
color: "#202020",
|
|
26
|
+
transition: "background-color 0.12s ease",
|
|
27
|
+
fontWeight: state.isSelected ? 600 : 400,
|
|
28
|
+
backgroundColor: state.isSelected ? "rgba(0, 80, 202, 0.08)" : state.isFocused ? "#f5f7fb" : "transparent"
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
...SelectOption,
|
|
33
|
+
cursor: "pointer",
|
|
34
|
+
fontWeight: state.isSelected || state.isFocused ? "bold" : "normal"
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
const DropdownIndicator = (props) => /* @__PURE__ */ jsx(components.DropdownIndicator, { ...props, children: /* @__PURE__ */ jsx(SelectIcon, { isMenuOpen: props.selectProps.menuIsOpen }) });
|
|
14
38
|
DropdownIndicator.propTypes = {
|
|
15
39
|
selectProps: PropTypes.instanceOf(Object).isRequired
|
|
16
40
|
};
|
|
17
|
-
const
|
|
41
|
+
const ScrollableMenuList = (props) => {
|
|
18
42
|
const { children, selectProps } = props;
|
|
19
43
|
const { maxMenuHeight = 300 } = selectProps;
|
|
20
44
|
return /* @__PURE__ */ jsx(SelectMenuList, { autoHeight: true, autoHeightMax: maxMenuHeight, fullHeight: true, children });
|
|
21
45
|
};
|
|
22
|
-
|
|
23
|
-
children: PropTypes.node.isRequired
|
|
46
|
+
ScrollableMenuList.propTypes = {
|
|
47
|
+
children: PropTypes.node.isRequired,
|
|
48
|
+
selectProps: PropTypes.instanceOf(Object).isRequired
|
|
49
|
+
};
|
|
50
|
+
const ControlWithDataCy = (props) => {
|
|
51
|
+
const cy = props.selectProps?.dataCy;
|
|
52
|
+
if (!cy) return /* @__PURE__ */ jsx(components.Control, { ...props });
|
|
53
|
+
return /* @__PURE__ */ jsx(components.Control, { ...props, innerProps: { ...props.innerProps, "data-cy": cy } });
|
|
54
|
+
};
|
|
55
|
+
ControlWithDataCy.propTypes = {
|
|
56
|
+
innerProps: PropTypes.instanceOf(Object),
|
|
57
|
+
selectProps: PropTypes.instanceOf(Object).isRequired
|
|
58
|
+
};
|
|
59
|
+
const SingleOption = (props) => /* @__PURE__ */ jsx(components.Option, { ...props, children: /* @__PURE__ */ jsxs(OptionRow, { children: [
|
|
60
|
+
renderIcon(props.data?.icon),
|
|
61
|
+
/* @__PURE__ */ jsx(OptionLabel, { children: props.label })
|
|
62
|
+
] }) });
|
|
63
|
+
SingleOption.propTypes = {
|
|
64
|
+
data: PropTypes.instanceOf(Object),
|
|
65
|
+
label: PropTypes.node
|
|
66
|
+
};
|
|
67
|
+
const MultiOption = (props) => /* @__PURE__ */ jsx(components.Option, { ...props, children: /* @__PURE__ */ jsxs(OptionRow, { children: [
|
|
68
|
+
/* @__PURE__ */ jsx(OptionCheckbox, { checked: props.isSelected, children: props.isSelected ? "✓" : "" }),
|
|
69
|
+
renderIcon(props.data?.icon),
|
|
70
|
+
/* @__PURE__ */ jsx(OptionLabel, { children: props.label })
|
|
71
|
+
] }) });
|
|
72
|
+
MultiOption.propTypes = {
|
|
73
|
+
data: PropTypes.instanceOf(Object),
|
|
74
|
+
label: PropTypes.node,
|
|
75
|
+
isSelected: PropTypes.bool
|
|
76
|
+
};
|
|
77
|
+
const SingleValueWithIcon = (props) => /* @__PURE__ */ jsx(components.SingleValue, { ...props, children: /* @__PURE__ */ jsxs(OptionRow, { children: [
|
|
78
|
+
renderIcon(props.data?.icon),
|
|
79
|
+
/* @__PURE__ */ jsx(OptionLabel, { children: props.data?.label })
|
|
80
|
+
] }) });
|
|
81
|
+
SingleValueWithIcon.propTypes = {
|
|
82
|
+
data: PropTypes.instanceOf(Object).isRequired
|
|
24
83
|
};
|
|
25
|
-
function createControlWithDataCy(dataCy) {
|
|
26
|
-
return function ControlWithDataCy(ctlProps) {
|
|
27
|
-
return /* @__PURE__ */ jsx(components.Control, { ...ctlProps, innerProps: { ...ctlProps.innerProps, "data-cy": dataCy } });
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
84
|
const Select = (props) => {
|
|
31
85
|
const {
|
|
32
86
|
id,
|
|
33
87
|
name,
|
|
34
88
|
label = "",
|
|
35
89
|
options,
|
|
36
|
-
|
|
90
|
+
value = "",
|
|
91
|
+
placeholder = "",
|
|
37
92
|
error = false,
|
|
38
93
|
touched = false,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
menuHeight,
|
|
94
|
+
disabled = false,
|
|
95
|
+
search = false,
|
|
42
96
|
creatable = false,
|
|
43
|
-
|
|
97
|
+
multiple = false,
|
|
98
|
+
menuHeight,
|
|
99
|
+
selectedLabel = "Selected",
|
|
100
|
+
formatCreateLabel,
|
|
44
101
|
dataCy,
|
|
102
|
+
onChange,
|
|
103
|
+
onBlur,
|
|
104
|
+
onFocus,
|
|
45
105
|
...otherProps
|
|
46
106
|
} = props;
|
|
47
|
-
const [labelUp, setLabelUp] = useState(!!value);
|
|
48
107
|
const [hasFocus, setHasFocus] = useState(false);
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const onFocus = (_e) => {
|
|
53
|
-
props.onFocus?.({ name, value });
|
|
54
|
-
if (search || creatable) {
|
|
55
|
-
setHasFocus(true);
|
|
56
|
-
}
|
|
108
|
+
const handleFocus = () => {
|
|
109
|
+
onFocus?.({ name, value });
|
|
110
|
+
setHasFocus(true);
|
|
57
111
|
};
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
setTimeout(() =>
|
|
61
|
-
setHasFocus(false);
|
|
62
|
-
}, 1);
|
|
112
|
+
const handleBlur = () => {
|
|
113
|
+
onBlur?.({ name, value });
|
|
114
|
+
setTimeout(() => setHasFocus(false), 0);
|
|
63
115
|
};
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
value:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
116
|
+
const handleChange = (selected) => {
|
|
117
|
+
if (multiple) {
|
|
118
|
+
const arr = Array.isArray(selected) ? selected : [];
|
|
119
|
+
onChange?.({ name, value: arr.map((o) => o.value) });
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
onChange?.({ name, value: selected?.value ?? "" });
|
|
123
|
+
};
|
|
124
|
+
const removeValue = (val) => {
|
|
125
|
+
const arr = Array.isArray(value) ? value.filter((v) => v !== val) : [];
|
|
126
|
+
onChange?.({ name, value: arr });
|
|
72
127
|
};
|
|
73
128
|
const SelectComponent = creatable ? CreatableSelect : ReactSelect;
|
|
74
|
-
const selectStyles =
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
...
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
129
|
+
const selectStyles = useMemo(
|
|
130
|
+
() => ({
|
|
131
|
+
control: () => SelectControl,
|
|
132
|
+
menu: (base) => ({ ...base, marginTop: 0, zIndex: 1e3, ...SelectMenu }),
|
|
133
|
+
option: buildOptionStyle(multiple),
|
|
134
|
+
selectContainer: () => SelectContainer,
|
|
135
|
+
valueContainer: (base) => ({ ...base, padding: 0 })
|
|
81
136
|
}),
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
137
|
+
[multiple]
|
|
138
|
+
);
|
|
139
|
+
const selectComponents = useMemo(
|
|
140
|
+
() => ({
|
|
141
|
+
DropdownIndicator,
|
|
142
|
+
IndicatorSeparator: null,
|
|
143
|
+
MenuList: ScrollableMenuList,
|
|
144
|
+
Option: multiple ? MultiOption : SingleOption,
|
|
145
|
+
SingleValue: SingleValueWithIcon,
|
|
146
|
+
...dataCy && { Control: ControlWithDataCy }
|
|
86
147
|
}),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
};
|
|
99
|
-
const currentValue = creatable ? options?.find((option) => option.value === value) || (value ? { value, label: value } : null) : options?.find((option) => option.value === value);
|
|
148
|
+
[multiple, dataCy]
|
|
149
|
+
);
|
|
150
|
+
const currentValue = useMemo(() => {
|
|
151
|
+
if (multiple) {
|
|
152
|
+
const arr = Array.isArray(value) ? value : [];
|
|
153
|
+
return arr.map((v) => options?.find((o) => o.value === v)).filter(Boolean);
|
|
154
|
+
}
|
|
155
|
+
if (creatable) {
|
|
156
|
+
return options?.find((o) => o.value === value) || (value ? { value, label: value } : null);
|
|
157
|
+
}
|
|
158
|
+
return options?.find((o) => o.value === value) || null;
|
|
159
|
+
}, [multiple, creatable, value, options]);
|
|
100
160
|
return /* @__PURE__ */ jsxs(Wrapper, { children: [
|
|
101
161
|
/* @__PURE__ */ jsx(IoniconsStyles, {}),
|
|
102
|
-
label && /* @__PURE__ */ jsx(Label, { isUp:
|
|
162
|
+
label && /* @__PURE__ */ jsx(Label, { isUp: Boolean(label), active: hasFocus, error: error && touched, htmlFor: id, children: label }),
|
|
103
163
|
/* @__PURE__ */ jsx(
|
|
104
164
|
SelectComponent,
|
|
105
165
|
{
|
|
@@ -107,44 +167,86 @@ const Select = (props) => {
|
|
|
107
167
|
id,
|
|
108
168
|
name,
|
|
109
169
|
options,
|
|
110
|
-
isDisabled: disabled,
|
|
111
|
-
onChange,
|
|
112
|
-
onBlur,
|
|
113
|
-
onFocus,
|
|
114
170
|
value: currentValue,
|
|
115
|
-
placeholder
|
|
116
|
-
|
|
171
|
+
placeholder,
|
|
172
|
+
isMulti: multiple,
|
|
173
|
+
isDisabled: disabled,
|
|
174
|
+
isSearchable: search,
|
|
175
|
+
isClearable: !multiple,
|
|
176
|
+
backspaceRemovesValue: !multiple,
|
|
177
|
+
controlShouldRenderValue: !multiple,
|
|
178
|
+
closeMenuOnSelect: !multiple,
|
|
179
|
+
hideSelectedOptions: false,
|
|
117
180
|
maxMenuHeight: menuHeight,
|
|
181
|
+
onChange: handleChange,
|
|
182
|
+
onBlur: handleBlur,
|
|
183
|
+
onFocus: handleFocus,
|
|
118
184
|
styles: selectStyles,
|
|
119
185
|
components: selectComponents,
|
|
186
|
+
dataCy,
|
|
120
187
|
...creatable && {
|
|
121
|
-
formatCreateLabel: formatCreateLabel || ((
|
|
188
|
+
formatCreateLabel: formatCreateLabel || ((input) => `Create "${input}"`)
|
|
122
189
|
}
|
|
123
190
|
}
|
|
124
|
-
)
|
|
191
|
+
),
|
|
192
|
+
multiple && currentValue.length > 0 && /* @__PURE__ */ jsxs(SelectedChipsWrapper, { "data-cy": dataCy ? `${dataCy}-chips` : void 0, children: [
|
|
193
|
+
/* @__PURE__ */ jsxs(SelectedChipsTitle, { children: [
|
|
194
|
+
selectedLabel,
|
|
195
|
+
" (",
|
|
196
|
+
currentValue.length,
|
|
197
|
+
")"
|
|
198
|
+
] }),
|
|
199
|
+
/* @__PURE__ */ jsx(SelectedChipsList, { children: currentValue.map((opt) => /* @__PURE__ */ jsxs(SelectedChip, { children: [
|
|
200
|
+
renderIcon(opt.icon),
|
|
201
|
+
/* @__PURE__ */ jsx(SelectedChipLabel, { children: opt.label }),
|
|
202
|
+
/* @__PURE__ */ jsx(
|
|
203
|
+
SelectedChipRemove,
|
|
204
|
+
{
|
|
205
|
+
onClick: () => removeValue(opt.value),
|
|
206
|
+
"aria-label": `Remove ${typeof opt.label === "string" ? opt.label : opt.value}`,
|
|
207
|
+
disabled,
|
|
208
|
+
children: "✕"
|
|
209
|
+
}
|
|
210
|
+
)
|
|
211
|
+
] }, opt.key ?? opt.value)) })
|
|
212
|
+
] })
|
|
125
213
|
] });
|
|
126
214
|
};
|
|
127
215
|
Select.propTypes = {
|
|
128
216
|
id: PropTypes.string.isRequired,
|
|
129
217
|
name: PropTypes.string.isRequired,
|
|
130
218
|
label: PropTypes.string,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
219
|
+
/** string|number for single mode, array for multi mode */
|
|
220
|
+
value: PropTypes.oneOfType([
|
|
221
|
+
PropTypes.string,
|
|
222
|
+
PropTypes.number,
|
|
223
|
+
PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))
|
|
224
|
+
]),
|
|
134
225
|
options: PropTypes.arrayOf(
|
|
135
226
|
PropTypes.shape({
|
|
136
|
-
key: PropTypes.string
|
|
227
|
+
key: PropTypes.string,
|
|
137
228
|
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
|
|
138
|
-
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired
|
|
229
|
+
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired,
|
|
230
|
+
/** URL string (rendered as <img>) or a React node (e.g. an SVG flag) shown left of the label */
|
|
231
|
+
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.node])
|
|
139
232
|
})
|
|
140
233
|
).isRequired,
|
|
234
|
+
placeholder: PropTypes.string,
|
|
235
|
+
error: PropTypes.bool,
|
|
236
|
+
touched: PropTypes.bool,
|
|
237
|
+
disabled: PropTypes.bool,
|
|
141
238
|
search: PropTypes.bool,
|
|
142
239
|
creatable: PropTypes.bool,
|
|
240
|
+
/** Multi-select: checkbox options + chips list rendered below the field. */
|
|
241
|
+
multiple: PropTypes.bool,
|
|
242
|
+
menuHeight: PropTypes.number,
|
|
243
|
+
/** Heading shown above the chips list in multi mode (default: "Selected"). */
|
|
244
|
+
selectedLabel: PropTypes.string,
|
|
143
245
|
formatCreateLabel: PropTypes.func,
|
|
144
246
|
onChange: PropTypes.func,
|
|
145
247
|
onBlur: PropTypes.func,
|
|
146
248
|
onFocus: PropTypes.func,
|
|
147
|
-
/** Playwright / autocapture: selector on the react-select control */
|
|
249
|
+
/** Playwright / autocapture: `data-cy` selector on the react-select control. */
|
|
148
250
|
dataCy: PropTypes.string
|
|
149
251
|
};
|
|
150
252
|
export {
|
|
@@ -96,6 +96,106 @@ const SelectIcon = styled.i.withConfig({
|
|
|
96
96
|
`}
|
|
97
97
|
}
|
|
98
98
|
`;
|
|
99
|
+
const OptionRow = styled.div`
|
|
100
|
+
display: flex;
|
|
101
|
+
align-items: center;
|
|
102
|
+
gap: 12px;
|
|
103
|
+
width: 100%;
|
|
104
|
+
`;
|
|
105
|
+
const OptionCheckbox = styled.span.withConfig({
|
|
106
|
+
shouldForwardProp: (prop) => !["checked"].includes(prop)
|
|
107
|
+
})`
|
|
108
|
+
display: inline-flex;
|
|
109
|
+
align-items: center;
|
|
110
|
+
justify-content: center;
|
|
111
|
+
width: 18px;
|
|
112
|
+
height: 18px;
|
|
113
|
+
border: 1.5px solid ${({ checked }) => checked ? "#0050ca" : "#c1c1c1"};
|
|
114
|
+
border-radius: 3px;
|
|
115
|
+
background-color: ${({ checked }) => checked ? "#0050ca" : "#fff"};
|
|
116
|
+
color: #fff;
|
|
117
|
+
font-size: 12px;
|
|
118
|
+
font-weight: 700;
|
|
119
|
+
line-height: 1;
|
|
120
|
+
flex-shrink: 0;
|
|
121
|
+
transition:
|
|
122
|
+
background-color 0.15s,
|
|
123
|
+
border-color 0.15s;
|
|
124
|
+
`;
|
|
125
|
+
const OptionIcon = styled.span`
|
|
126
|
+
display: inline-flex;
|
|
127
|
+
align-items: center;
|
|
128
|
+
justify-content: center;
|
|
129
|
+
width: 20px;
|
|
130
|
+
height: 14px;
|
|
131
|
+
overflow: hidden;
|
|
132
|
+
flex-shrink: 0;
|
|
133
|
+
border-radius: 2px;
|
|
134
|
+
|
|
135
|
+
& > img,
|
|
136
|
+
& > svg {
|
|
137
|
+
width: 100%;
|
|
138
|
+
height: 100%;
|
|
139
|
+
object-fit: cover;
|
|
140
|
+
display: block;
|
|
141
|
+
}
|
|
142
|
+
`;
|
|
143
|
+
const OptionLabel = styled.span`
|
|
144
|
+
flex: 1;
|
|
145
|
+
min-width: 0;
|
|
146
|
+
white-space: nowrap;
|
|
147
|
+
overflow: hidden;
|
|
148
|
+
text-overflow: ellipsis;
|
|
149
|
+
`;
|
|
150
|
+
const SelectedChipsWrapper = styled.div`
|
|
151
|
+
margin-top: 18px;
|
|
152
|
+
`;
|
|
153
|
+
const SelectedChipsTitle = styled.div`
|
|
154
|
+
font-size: 11px;
|
|
155
|
+
letter-spacing: 1.5px;
|
|
156
|
+
text-transform: uppercase;
|
|
157
|
+
color: #666;
|
|
158
|
+
margin-bottom: 8px;
|
|
159
|
+
`;
|
|
160
|
+
const SelectedChipsList = styled.div`
|
|
161
|
+
display: flex;
|
|
162
|
+
flex-wrap: wrap;
|
|
163
|
+
gap: 8px;
|
|
164
|
+
`;
|
|
165
|
+
const SelectedChip = styled.div`
|
|
166
|
+
display: inline-flex;
|
|
167
|
+
align-items: center;
|
|
168
|
+
gap: 8px;
|
|
169
|
+
padding: 6px 10px;
|
|
170
|
+
border: 1px solid #e1e1e1;
|
|
171
|
+
border-radius: 20px;
|
|
172
|
+
background-color: #fff;
|
|
173
|
+
font-size: 12px;
|
|
174
|
+
line-height: 16px;
|
|
175
|
+
color: #202020;
|
|
176
|
+
`;
|
|
177
|
+
const SelectedChipLabel = styled.span`
|
|
178
|
+
white-space: nowrap;
|
|
179
|
+
`;
|
|
180
|
+
const SelectedChipRemove = styled.button.attrs({ type: "button" })`
|
|
181
|
+
display: inline-flex;
|
|
182
|
+
align-items: center;
|
|
183
|
+
justify-content: center;
|
|
184
|
+
border: 0;
|
|
185
|
+
background: transparent;
|
|
186
|
+
padding: 0;
|
|
187
|
+
margin: 0 0 0 2px;
|
|
188
|
+
cursor: pointer;
|
|
189
|
+
color: #888;
|
|
190
|
+
font-size: 14px;
|
|
191
|
+
line-height: 1;
|
|
192
|
+
width: 14px;
|
|
193
|
+
height: 14px;
|
|
194
|
+
|
|
195
|
+
&:hover {
|
|
196
|
+
color: #202020;
|
|
197
|
+
}
|
|
198
|
+
`;
|
|
99
199
|
const SelectWrapper = styled.div.withConfig({
|
|
100
200
|
shouldForwardProp: (props) => !["minWidth", "noMargin"].includes(props)
|
|
101
201
|
})`
|
|
@@ -137,6 +237,10 @@ const SelectWrapper = styled.div.withConfig({
|
|
|
137
237
|
}
|
|
138
238
|
`;
|
|
139
239
|
export {
|
|
240
|
+
OptionCheckbox,
|
|
241
|
+
OptionIcon,
|
|
242
|
+
OptionLabel,
|
|
243
|
+
OptionRow,
|
|
140
244
|
SelectContainer,
|
|
141
245
|
SelectControl,
|
|
142
246
|
SelectIcon,
|
|
@@ -144,5 +248,11 @@ export {
|
|
|
144
248
|
SelectMenuList,
|
|
145
249
|
SelectOption,
|
|
146
250
|
SelectValueContainer,
|
|
147
|
-
SelectWrapper
|
|
251
|
+
SelectWrapper,
|
|
252
|
+
SelectedChip,
|
|
253
|
+
SelectedChipLabel,
|
|
254
|
+
SelectedChipRemove,
|
|
255
|
+
SelectedChipsList,
|
|
256
|
+
SelectedChipsTitle,
|
|
257
|
+
SelectedChipsWrapper
|
|
148
258
|
};
|
|
@@ -13,8 +13,8 @@ import { getMedia } from "../../styles/rwd.js";
|
|
|
13
13
|
import "../LearnMorePage/LearnMore.js";
|
|
14
14
|
import { Container, TitleContainer, SidebarSubHeading, TabTitle, Arrow, TabNav, TabArrow } from "./LearnMore.styles.js";
|
|
15
15
|
import stdin_default$1 from "./LearnMoreItem.js";
|
|
16
|
-
import { learnMoreCategoryPropTypes, learnMorePostPropTypes } from "../LearnMorePage/LearnMore.propTypes.js";
|
|
17
16
|
import { Tab } from "../Tabs/Tabs.styles.js";
|
|
17
|
+
import { learnMoreCategoryPropTypes, learnMorePostPropTypes } from "../LearnMorePage/LearnMore.propTypes.js";
|
|
18
18
|
class LearnMoreSection extends PureComponent {
|
|
19
19
|
state = {
|
|
20
20
|
activeTab: 0,
|
|
@@ -6,9 +6,9 @@ import { StyledMainMenu, MainMenuContainer, MainMenuOptions, MainMenuOption, Exp
|
|
|
6
6
|
import { Button } from "../Button/Button.styles.js";
|
|
7
7
|
import { IoniconsStyles } from "../../styles/ioniconsStyles.js";
|
|
8
8
|
import { getConfig } from "../../runtime-config.js";
|
|
9
|
-
import { navigateToHref } from "../../routing/navigate-app.js";
|
|
10
9
|
import { withRouter } from "../../utils/withRouter.js";
|
|
11
10
|
import { hasLoggedInSession } from "../../utils/user-identity.js";
|
|
11
|
+
import { navigateToHref } from "../../routing/navigate-app.js";
|
|
12
12
|
class MainMenuClass extends PureComponent {
|
|
13
13
|
state = {
|
|
14
14
|
isSettingsActive: false,
|
|
@@ -16,8 +16,8 @@ import stdin_default$1 from "../../Checkbox/Checkbox.js";
|
|
|
16
16
|
import { Button } from "../../Button/Button.styles.js";
|
|
17
17
|
import { useNewVentureForm } from "../../../hooks/useNewVentureForm.js";
|
|
18
18
|
import { getConfig } from "../../../runtime-config.js";
|
|
19
|
-
import { navigateToHref } from "../../../routing/navigate-app.js";
|
|
20
19
|
import { ModalInner } from "../Modal.styles.js";
|
|
20
|
+
import { navigateToHref } from "../../../routing/navigate-app.js";
|
|
21
21
|
import { FormField, FormError } from "../../Form/Form.styles.js";
|
|
22
22
|
const defaultProject = {
|
|
23
23
|
_id: "",
|
|
@@ -56,8 +56,7 @@ const PaymentModal = ({
|
|
|
56
56
|
formatAmountInLink = true,
|
|
57
57
|
transactionCostMessage,
|
|
58
58
|
paymentLink: paymentLinkProp,
|
|
59
|
-
showKYCWarningBox = true
|
|
60
|
-
...props
|
|
59
|
+
showKYCWarningBox = true
|
|
61
60
|
}) => {
|
|
62
61
|
const { projectData, tokenAmount, tokenSymbol, createdAt, tokenDecimals = 2, GAID, currencyType } = data;
|
|
63
62
|
let newTokenAmount = tokenAmount;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
2
|
import rwd, { rwdMax } from "../../styles/rwd.js";
|
|
3
|
-
import { BASE_MARGIN, MAX_WIDTH, GRAY_BASE_HEX,
|
|
3
|
+
import { RED_BASE_HEX, BASE_MARGIN, MAX_WIDTH, GRAY_BASE_HEX, WHITE_HEX } from "../../constants/style.js";
|
|
4
4
|
import { Button } from "../Button/Button.styles.js";
|
|
5
5
|
const withMarginsCss = css`
|
|
6
6
|
padding-left: ${BASE_MARGIN * 2}px;
|
|
@@ -2,7 +2,6 @@ import { jsxs, jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import stdin_default$1 from "../SvgIcons/RefreshSvg.js";
|
|
5
|
-
import "../SvgIcons/SocialInstagram.js";
|
|
6
5
|
import { StyledButton, IconWrap, Content } from "./RefreshButton.styles.js";
|
|
7
6
|
const RefreshButton = (props) => {
|
|
8
7
|
const { children } = props;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import React__default from "react";
|
|
3
|
-
import { default as default2 } from "./TabNav.js";
|
|
4
3
|
import PropTypes from "prop-types";
|
|
5
4
|
import { StyledTabs, Scroll, TabsWrapper } from "./TabsNav.styles.js";
|
|
6
5
|
import { LinkText, StyledTab } from "./TabsNav.styles.js";
|
|
@@ -23,7 +22,6 @@ export {
|
|
|
23
22
|
Scroll,
|
|
24
23
|
StyledTab,
|
|
25
24
|
StyledTabs,
|
|
26
|
-
default2 as TabNav,
|
|
27
25
|
TabsNav,
|
|
28
26
|
TabsWrapper,
|
|
29
27
|
stdin_default as default
|