@wistia/vhs 5.0.5 → 6.0.0-beta.08c60b5a.4cbb83d
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/index.d.ts +7 -605
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1372 -2064
- package/dist/index.js.map +1 -1
- package/package.json +24 -24
package/dist/index.js
CHANGED
|
@@ -1,32 +1,31 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/vhs
|
|
3
|
+
* @license @wistia/vhs v6.0.0-beta.08c60b5a.4cbb83d
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2021-2026, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
7
7
|
* This source code is unlicensed, all rights reserved.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { hasKey, isArray, isBoolean, isEmptyString, isFunction, isNil, isNonEmptyArray, isNonEmptyString, isNotNil, isNotUndefined, isNumber, isString as isString$1, isUndefined } from "@wistia/type-guards";
|
|
11
|
-
import { addDays, addMonths, addYears, compareAsc, differenceInCalendarDays, differenceInDays, eachDayOfInterval, eachMonthOfInterval, endOfDay, endOfMonth, getDay, getDaysInMonth, getYear, isAfter, isBefore, isEqual, isFuture, isSameDay, isValid, isWithinInterval, startOfDay, startOfMonth } from "date-fns";
|
|
12
|
-
import { daysInWeek } from "date-fns/constants";
|
|
13
|
-
import { ThemeProvider, createGlobalStyle, css, keyframes, styled, useTheme as useTheme$1 } from "styled-components";
|
|
14
|
-
import { darken, getValueAndUnit, transparentize } from "polished";
|
|
15
10
|
import { LiveAnnouncer, LiveMessage } from "react-aria-live";
|
|
16
11
|
import { AnimatePresence, MotionConfig, motion } from "motion/react";
|
|
12
|
+
import { ThemeProvider, createGlobalStyle, css, keyframes, styled, useTheme as useTheme$1 } from "styled-components";
|
|
17
13
|
import { designTokens } from "@wistia/vhs-design-tokens";
|
|
14
|
+
import { hasKey, isArray, isBoolean, isEmptyString, isFunction, isNil, isNonEmptyArray, isNonEmptyString, isNotNil, isNotUndefined, isNumber, isString, isUndefined } from "@wistia/type-guards";
|
|
18
15
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
19
16
|
import { Children, Fragment as Fragment$1, cloneElement, createContext, forwardRef, isValidElement, memo, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
20
17
|
import { createPortal } from "react-dom";
|
|
21
18
|
import { debounce } from "throttle-debounce";
|
|
19
|
+
import { darken, getValueAndUnit, transparentize } from "polished";
|
|
22
20
|
import { Field, Form as Form$1, Formik, useFormikContext, useFormikContext as useFormikContext$1 } from "formik";
|
|
23
|
-
import isEqual
|
|
21
|
+
import isEqual from "react-fast-compare";
|
|
24
22
|
import { Editable, ReactEditor, Slate, useFocused, useSelected, useSlate, withReact } from "slate-react";
|
|
25
23
|
import { Editor, Element, Node, Path, Range, Text as Text$1, Transforms, createEditor } from "slate";
|
|
26
24
|
import { withHistory } from "slate-history";
|
|
27
25
|
import { isHotkey } from "is-hotkey";
|
|
28
26
|
import { jsx as jsx$1 } from "slate-hyperscript";
|
|
29
27
|
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuItemIndicator, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup as MenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "@radix-ui/react-dropdown-menu";
|
|
28
|
+
import { addDays, addMonths, addYears, compareAsc, differenceInDays, eachDayOfInterval, eachMonthOfInterval, endOfDay, endOfMonth, getDay, getDaysInMonth, getYear, isAfter, isBefore, isEqual as isEqual$1, isFuture, isSameDay, isValid, isWithinInterval, startOfDay, startOfMonth } from "date-fns";
|
|
30
29
|
import ReactSlider from "react-slider";
|
|
31
30
|
//#region \0rolldown/runtime.js
|
|
32
31
|
var __defProp = Object.defineProperty;
|
|
@@ -40,1522 +39,685 @@ var __exportAll = (all, no_symbols) => {
|
|
|
40
39
|
return target;
|
|
41
40
|
};
|
|
42
41
|
//#endregion
|
|
43
|
-
//#region src/
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
*/
|
|
87
|
-
const padTimeInteger = (num) => num.toString().padStart(2, "0");
|
|
88
|
-
/**
|
|
89
|
-
* @param {*} date - possible date value - unknown type
|
|
90
|
-
* @returns {boolean} - whether it is a date object
|
|
91
|
-
*/
|
|
92
|
-
const isDate = (date) => date instanceof Date;
|
|
93
|
-
/**
|
|
94
|
-
* @param {*} date - a Date object - could be unknown though
|
|
95
|
-
* @returns {boolean} - whether it's a valid date
|
|
96
|
-
*/
|
|
97
|
-
const isInvalidDate = (date) => !isDate(date) || date.getTime() === 0;
|
|
98
|
-
/**
|
|
99
|
-
* Converts a Date object into a date only string.
|
|
100
|
-
*
|
|
101
|
-
* e.g. Jun 3, 2021
|
|
102
|
-
* @param {*} date a Date object you want to convert into a string - gracefully handles any input
|
|
103
|
-
* @param {object} options -
|
|
104
|
-
* @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone
|
|
105
|
-
* @returns {string} a formatted date string
|
|
106
|
-
*/
|
|
107
|
-
const dateOnlyString = (date, { timeZone = defaultTimeZone } = {}) => {
|
|
108
|
-
if (!isDate(date) || isInvalidDate(date)) return "";
|
|
109
|
-
try {
|
|
110
|
-
return new Intl.DateTimeFormat(defaultLocales, {
|
|
111
|
-
dateStyle: "medium",
|
|
112
|
-
timeZone
|
|
113
|
-
}).format(date);
|
|
114
|
-
} catch (error) {
|
|
115
|
-
console.error(error);
|
|
116
|
-
return "";
|
|
42
|
+
//#region src/theme.ts
|
|
43
|
+
const zIndex1 = 100;
|
|
44
|
+
const zIndex2 = 200;
|
|
45
|
+
const zIndex3 = 300;
|
|
46
|
+
const zIndex5 = 500;
|
|
47
|
+
const theme = {
|
|
48
|
+
breakpoint: { ...designTokens.breakpoint },
|
|
49
|
+
color: { ...designTokens.color },
|
|
50
|
+
duration: { ...designTokens.duration },
|
|
51
|
+
easing: { ...designTokens.easing },
|
|
52
|
+
font: {
|
|
53
|
+
family: {
|
|
54
|
+
default: "InterVariable, Helvetica, Arial, sans-serif",
|
|
55
|
+
monospace: designTokens.font.family.monospace
|
|
56
|
+
},
|
|
57
|
+
size: designTokens.font.size,
|
|
58
|
+
weight: Object.fromEntries(Object.entries(designTokens.font.weight).map(([key, value]) => [key, Number(value)]))
|
|
59
|
+
},
|
|
60
|
+
shadow: { ...designTokens.shadow },
|
|
61
|
+
spacing: { ...designTokens.spacing },
|
|
62
|
+
zIndex: {
|
|
63
|
+
ModalCloseButton: zIndex1,
|
|
64
|
+
Backdrop: zIndex2,
|
|
65
|
+
ActionModal: zIndex3,
|
|
66
|
+
FullScreenModal: zIndex3,
|
|
67
|
+
RangeSelector: zIndex5,
|
|
68
|
+
MenuComponent: zIndex5,
|
|
69
|
+
Toast: zIndex5,
|
|
70
|
+
Tooltip: zIndex5,
|
|
71
|
+
BackdropElevated: zIndex5
|
|
72
|
+
},
|
|
73
|
+
button: { borderRadius: "4px" },
|
|
74
|
+
buttonGroup: { gap: "16px" },
|
|
75
|
+
headline: {
|
|
76
|
+
family: designTokens.font.family,
|
|
77
|
+
headline1: { weight: designTokens.font.weight.bold },
|
|
78
|
+
headline2: { weight: designTokens.font.weight.medium },
|
|
79
|
+
headline3: { weight: designTokens.font.weight.bold }
|
|
80
|
+
},
|
|
81
|
+
paper: {
|
|
82
|
+
elevation0: designTokens.shadow.elevation0,
|
|
83
|
+
elevation1: designTokens.shadow.elevation1,
|
|
84
|
+
elevation2: designTokens.shadow.elevation2
|
|
117
85
|
}
|
|
118
86
|
};
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region src/private/helpers/objectHelpers/isObject.ts
|
|
119
89
|
/**
|
|
120
|
-
*
|
|
90
|
+
* Determines if a given value is an object
|
|
121
91
|
*
|
|
122
|
-
*
|
|
123
|
-
* @
|
|
124
|
-
* @param {object} options -
|
|
125
|
-
* @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone
|
|
126
|
-
* @returns {string} a formatted date string
|
|
92
|
+
* @param {*} value - value of any type
|
|
93
|
+
* @returns {boolean} - whether value is an object
|
|
127
94
|
*/
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
return new Intl.DateTimeFormat(defaultLocales, {
|
|
132
|
-
year: "numeric",
|
|
133
|
-
month: "2-digit",
|
|
134
|
-
day: "2-digit",
|
|
135
|
-
timeZone
|
|
136
|
-
}).format(date);
|
|
137
|
-
} catch (error) {
|
|
138
|
-
console.error(error);
|
|
139
|
-
return "";
|
|
140
|
-
}
|
|
141
|
-
};
|
|
95
|
+
const isObject = (value) => value !== null && value !== void 0 && (Object.getPrototypeOf(value) === null || value.constructor === Object);
|
|
96
|
+
//#endregion
|
|
97
|
+
//#region src/private/helpers/objectHelpers/merge.ts
|
|
142
98
|
/**
|
|
143
|
-
*
|
|
99
|
+
* Merges two or more objects
|
|
144
100
|
*
|
|
145
|
-
*
|
|
146
|
-
* @param {
|
|
147
|
-
* @
|
|
148
|
-
* @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone
|
|
149
|
-
* @returns {string} a formatted date string
|
|
101
|
+
* @param {Object} target - object that subsequent objects will be merged into
|
|
102
|
+
* @param {...Object} sources - one or more objects
|
|
103
|
+
* @returns {Object} - new object
|
|
150
104
|
*/
|
|
151
|
-
const
|
|
152
|
-
if (!
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
})
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}, {});
|
|
163
|
-
return `${partsAsObject.year}-${partsAsObject.month}-${partsAsObject.day}`;
|
|
164
|
-
} catch (error) {
|
|
165
|
-
console.error(error);
|
|
166
|
-
return "";
|
|
167
|
-
}
|
|
105
|
+
const merge = (target, ...sources) => {
|
|
106
|
+
if (!isNonEmptyArray(sources)) return target;
|
|
107
|
+
const output = { ...target };
|
|
108
|
+
sources.forEach((source) => {
|
|
109
|
+
if (isObject(source)) Object.keys(source).forEach((key) => {
|
|
110
|
+
if (isObject(source[key])) if (output[key] === null || output[key] === void 0) output[key] = { ...source[key] };
|
|
111
|
+
else output[key] = merge(output[key], source[key]);
|
|
112
|
+
else output[key] = source[key];
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
return output;
|
|
168
116
|
};
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
* @returns {string} a formatted date string
|
|
177
|
-
*/
|
|
178
|
-
const monthDayStringNumeric = (date, { timeZone = defaultTimeZone } = {}) => {
|
|
179
|
-
if (!isDate(date) || isInvalidDate(date)) return "";
|
|
180
|
-
try {
|
|
181
|
-
return new Intl.DateTimeFormat(defaultLocales, {
|
|
182
|
-
month: "2-digit",
|
|
183
|
-
day: "2-digit",
|
|
184
|
-
timeZone
|
|
185
|
-
}).format(date);
|
|
186
|
-
} catch (error) {
|
|
187
|
-
console.error(error);
|
|
188
|
-
return "";
|
|
189
|
-
}
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region src/providers/VHSThemeProvider.tsx
|
|
119
|
+
const VHSThemeProvider = ({ children, theme: overrideTheme }) => {
|
|
120
|
+
return /* @__PURE__ */ jsx(ThemeProvider, {
|
|
121
|
+
theme: merge(theme, overrideTheme),
|
|
122
|
+
children
|
|
123
|
+
});
|
|
190
124
|
};
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region src/providers/WrapperProvider.tsx
|
|
127
|
+
const WrapperContext = createContext({});
|
|
128
|
+
const useWrappers = () => useContext(WrapperContext);
|
|
129
|
+
const WrapperProvider = WrapperContext.Provider;
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region src/private/helpers/coerceToBoolean/coerceToBoolean.ts
|
|
191
132
|
/**
|
|
192
|
-
* Converts a
|
|
133
|
+
* Converts a boolean string value `value` into a boolean. If passed
|
|
134
|
+
* something other than 'true' or 'false' will coerce value to boolean.
|
|
193
135
|
*
|
|
194
|
-
*
|
|
195
|
-
* @
|
|
196
|
-
* @param {object} options -
|
|
197
|
-
* @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone
|
|
198
|
-
* @returns {string} a formatted date string
|
|
136
|
+
* @param {*} value - a value of any type
|
|
137
|
+
* @returns {boolean} - that value as a boolean
|
|
199
138
|
*/
|
|
200
|
-
const
|
|
201
|
-
if (
|
|
202
|
-
|
|
203
|
-
return new Intl.DateTimeFormat(defaultLocales, {
|
|
204
|
-
weekday: "long",
|
|
205
|
-
timeZone
|
|
206
|
-
}).format(date);
|
|
207
|
-
} catch (error) {
|
|
208
|
-
console.error(error);
|
|
209
|
-
return "";
|
|
210
|
-
}
|
|
139
|
+
const coerceToBoolean = (value) => {
|
|
140
|
+
if (value === "true" || value === "false") return value === "true";
|
|
141
|
+
return Boolean(value);
|
|
211
142
|
};
|
|
143
|
+
//#endregion
|
|
144
|
+
//#region src/hooks/useTheme/useTheme.ts
|
|
145
|
+
const useTheme = () => useTheme$1();
|
|
146
|
+
//#endregion
|
|
147
|
+
//#region src/private/helpers/isClient/isClient.ts
|
|
212
148
|
/**
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
* e.g. 7:30 AM
|
|
216
|
-
* @param {*} date a Date object you want to convert into a string - gracefully handles any value
|
|
217
|
-
* @param {object} options -
|
|
218
|
-
* @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone
|
|
219
|
-
* @returns {string} a formatted date string
|
|
149
|
+
* @returns {boolean} - whether running in a browser environment
|
|
220
150
|
*/
|
|
221
|
-
const
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
151
|
+
const isClient = () => typeof window !== "undefined" && typeof document !== "undefined";
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region src/private/hooks/useWindowSize/useWindowSize.ts
|
|
154
|
+
const useWindowSize = (interval = 0) => {
|
|
155
|
+
const [dimensions, setDimensions] = useState({
|
|
156
|
+
width: isClient() ? window.innerWidth : 0,
|
|
157
|
+
height: isClient() ? window.innerHeight : 0
|
|
158
|
+
});
|
|
159
|
+
useLayoutEffect(() => {
|
|
160
|
+
const handleResize = debounce(interval, () => setDimensions({
|
|
161
|
+
width: window.innerWidth,
|
|
162
|
+
height: window.innerHeight
|
|
163
|
+
}));
|
|
164
|
+
window.addEventListener("resize", handleResize);
|
|
165
|
+
return () => window.removeEventListener("resize", handleResize);
|
|
166
|
+
}, [interval]);
|
|
167
|
+
return dimensions;
|
|
232
168
|
};
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
const baseOptions = {
|
|
252
|
-
month: "short",
|
|
253
|
-
day: "numeric",
|
|
254
|
-
hour: "numeric",
|
|
255
|
-
minute: "2-digit",
|
|
256
|
-
timeZone
|
|
257
|
-
};
|
|
258
|
-
const options = omitYear ? baseOptions : {
|
|
259
|
-
...baseOptions,
|
|
260
|
-
year: "numeric"
|
|
261
|
-
};
|
|
262
|
-
return formattedDate.toLocaleDateString(defaultLocales, options);
|
|
263
|
-
} catch (error) {
|
|
264
|
-
console.error(error);
|
|
265
|
-
return "";
|
|
266
|
-
}
|
|
169
|
+
//#endregion
|
|
170
|
+
//#region src/private/hooks/useMq/useMq.ts
|
|
171
|
+
const REM_SIZE = 16;
|
|
172
|
+
const useMq = () => {
|
|
173
|
+
const viewportWidth = useWindowSize().width / REM_SIZE;
|
|
174
|
+
const theme = useTheme();
|
|
175
|
+
return {
|
|
176
|
+
isXsAndUp: true,
|
|
177
|
+
isSmAndUp: viewportWidth >= Number.parseFloat(theme.breakpoint.sm),
|
|
178
|
+
isMdAndUp: viewportWidth >= Number.parseFloat(theme.breakpoint.md),
|
|
179
|
+
isLgAndUp: viewportWidth >= Number.parseFloat(theme.breakpoint.lg),
|
|
180
|
+
isXlAndUp: viewportWidth >= Number.parseFloat(theme.breakpoint.xl),
|
|
181
|
+
isXsAndDown: viewportWidth < Number.parseFloat(theme.breakpoint.sm),
|
|
182
|
+
isSmAndDown: viewportWidth < Number.parseFloat(theme.breakpoint.md),
|
|
183
|
+
isMdAndDown: viewportWidth < Number.parseFloat(theme.breakpoint.lg),
|
|
184
|
+
isLgAndDown: viewportWidth < Number.parseFloat(theme.breakpoint.xl),
|
|
185
|
+
isXlAndDown: true
|
|
186
|
+
};
|
|
267
187
|
};
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
* an updated/created timestamp.
|
|
276
|
-
*
|
|
277
|
-
* @param {*} date - a Date object you want to convert into a string - gracefully handles any value
|
|
278
|
-
* @param {object} options -
|
|
279
|
-
* @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone
|
|
280
|
-
* @returns {string} a formatted date string
|
|
281
|
-
*/
|
|
282
|
-
const dateTimeStringForSentence = (date, { timeZone = defaultTimeZone } = {}) => {
|
|
283
|
-
if (!isDate(date) || isInvalidDate(date)) return "";
|
|
284
|
-
try {
|
|
285
|
-
const { year, month, day, hour, minute, dayPeriod } = new Intl.DateTimeFormat(defaultLocales, {
|
|
286
|
-
month: "long",
|
|
287
|
-
day: "numeric",
|
|
288
|
-
year: "numeric",
|
|
289
|
-
hour: "numeric",
|
|
290
|
-
minute: "2-digit",
|
|
291
|
-
timeZone
|
|
292
|
-
}).formatToParts(date).reduce((acc, part) => {
|
|
293
|
-
if (part.type !== "literal") acc[part.type] = part.value;
|
|
294
|
-
return acc;
|
|
295
|
-
}, {});
|
|
296
|
-
return `${month} ${day}, ${year}, ${hour}:${minute} ${dayPeriod}`;
|
|
297
|
-
} catch (error) {
|
|
298
|
-
console.error(error);
|
|
299
|
-
return "";
|
|
300
|
-
}
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region src/components/Toast/ToastAnimation.tsx
|
|
190
|
+
const toastPositionOffset = 24;
|
|
191
|
+
const toastPositionStyles = {
|
|
192
|
+
bottom: toastPositionOffset,
|
|
193
|
+
left: toastPositionOffset,
|
|
194
|
+
position: "fixed"
|
|
301
195
|
};
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
*
|
|
306
|
-
* e.g. June 3, 2021
|
|
307
|
-
*
|
|
308
|
-
* @param {*} date - a Date object you want to convert into a string - gracefully handles any value
|
|
309
|
-
* @param {object} options -
|
|
310
|
-
* @param {string} options.timeZone - the timezone you want date displayed in, defaults to current users time zone
|
|
311
|
-
* @returns {string} a formatted date string
|
|
312
|
-
*/
|
|
313
|
-
const dateOnlyStringForSentence = (date, { timeZone = defaultTimeZone } = {}) => {
|
|
314
|
-
if (!isDate(date) || isInvalidDate(date)) return "";
|
|
315
|
-
try {
|
|
316
|
-
return new Intl.DateTimeFormat(defaultLocales, {
|
|
317
|
-
dateStyle: "long",
|
|
318
|
-
timeZone
|
|
319
|
-
}).format(date);
|
|
320
|
-
} catch (error) {
|
|
321
|
-
console.error(error);
|
|
322
|
-
return "";
|
|
323
|
-
}
|
|
196
|
+
const toastWidth = {
|
|
197
|
+
minWidth: "352px",
|
|
198
|
+
width: "400px"
|
|
324
199
|
};
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
*
|
|
336
|
-
* Yesterday, 6:22 AM
|
|
337
|
-
*
|
|
338
|
-
* Nov 11, 11:32 AM
|
|
339
|
-
*
|
|
340
|
-
* Feb 23, 2020, 1:55 PM
|
|
341
|
-
*
|
|
342
|
-
* or when `includeTime` is false:
|
|
343
|
-
*
|
|
344
|
-
* Today
|
|
345
|
-
*
|
|
346
|
-
* Yesterday
|
|
347
|
-
*
|
|
348
|
-
* on Thursday
|
|
349
|
-
*
|
|
350
|
-
* Nov 11
|
|
351
|
-
*
|
|
352
|
-
* Feb 23, 2020
|
|
353
|
-
*
|
|
354
|
-
* NOTE: timeAgoString doesn't support multiple time zones since doing so would
|
|
355
|
-
* complicate calculations for whether to use "Today" or "Yesterday".
|
|
356
|
-
* @param {Date} date - the date relative to now
|
|
357
|
-
* @param {object} options -
|
|
358
|
-
* @param {Date} options.nowAnchor - The date used to calculate relative to now. Defaults to current date but can be overwritten for tests.
|
|
359
|
-
* @param {boolean} options.includeTime - Whether to include the time in the output. Defaults to true.
|
|
360
|
-
* @returns {string} - a string representation of the date.
|
|
361
|
-
*/
|
|
362
|
-
const timeAgoString = (date, { nowAnchor = /* @__PURE__ */ new Date(), includeTime = true } = {}) => {
|
|
363
|
-
if (isInvalidDate(date)) return "";
|
|
364
|
-
const minutesAgo = (nowAnchor.valueOf() - date.valueOf()) / (secondsInMinute * milisecondsInSecond);
|
|
365
|
-
const minutesAgoRounded = Math.round(minutesAgo);
|
|
366
|
-
const differenceInDays = differenceInCalendarDays(nowAnchor, date);
|
|
367
|
-
const isSameYear = date.getFullYear() === nowAnchor.getFullYear();
|
|
368
|
-
if (minutesAgo < 0) return dateTimeString(date);
|
|
369
|
-
if (minutesAgo < 1) return "< 1 minute ago";
|
|
370
|
-
if (minutesAgoRounded < 2) return "1 minute ago";
|
|
371
|
-
if (minutesAgoRounded <= minutesInHour) return `${minutesAgoRounded} minutes ago`;
|
|
372
|
-
if (differenceInDays === 0) return includeTime ? `Today, ${Intl.DateTimeFormat(defaultLocales, {
|
|
373
|
-
hour: "numeric",
|
|
374
|
-
minute: "2-digit"
|
|
375
|
-
}).format(date)}` : "Today";
|
|
376
|
-
if (differenceInDays === 1) return includeTime ? `Yesterday, ${Intl.DateTimeFormat(defaultLocales, {
|
|
377
|
-
hour: "numeric",
|
|
378
|
-
minute: "2-digit"
|
|
379
|
-
}).format(date)}` : "Yesterday";
|
|
380
|
-
if (differenceInDays < daysInWeek && !includeTime) return `on ${dayOfWeekString(date)}`;
|
|
381
|
-
return includeTime ? dateTimeString(date, { omitYear: isSameYear }) : dateOnlyString(date, { omitYear: isSameYear });
|
|
382
|
-
};
|
|
383
|
-
/**
|
|
384
|
-
* Given a date, shows the UTC offset.
|
|
385
|
-
* @param {Date} date a Date object for calculating offset.
|
|
386
|
-
* @returns {string} - string representing the UTC offset
|
|
387
|
-
*/
|
|
388
|
-
const dateUTCOffset = (date) => {
|
|
389
|
-
const offsetInHours = date.getTimezoneOffset() / minutesInHour * -1;
|
|
390
|
-
const hours = Math.round(offsetInHours);
|
|
391
|
-
const minutes = (offsetInHours - hours) * minutesInHour;
|
|
392
|
-
return `${hours >= 0 ? "+" : ""}${`${hours}`.padStart(2, "0")}:${`${minutes}`.padStart(2, "0")}`;
|
|
393
|
-
};
|
|
394
|
-
/**
|
|
395
|
-
* @typedef {Object} Duration
|
|
396
|
-
* @property {number} seconds - number of seconds
|
|
397
|
-
* @property {number} minutes - number of minutes
|
|
398
|
-
* @property {number} hours - number of hours
|
|
399
|
-
*/
|
|
400
|
-
/**
|
|
401
|
-
* Returns an object representing the duration in seconds, minutes and hours.
|
|
402
|
-
*
|
|
403
|
-
* @param {number} numberOfMilliseconds - number of milliseconds
|
|
404
|
-
* @returns {Duration} -
|
|
405
|
-
*/
|
|
406
|
-
const buildTimeDuration = (numberOfMilliseconds) => {
|
|
407
|
-
const numberOfSeconds = Math.floor(numberOfMilliseconds / milisecondsInSecond);
|
|
408
|
-
const numberOfMinutes = Math.floor(numberOfSeconds / secondsInMinute);
|
|
409
|
-
const numberOfHours = Math.floor(numberOfMinutes / minutesInHour);
|
|
410
|
-
return {
|
|
411
|
-
seconds: numberOfSeconds - numberOfMinutes * secondsInMinute,
|
|
412
|
-
minutes: numberOfMinutes - numberOfHours * minutesInHour,
|
|
413
|
-
hours: numberOfHours
|
|
414
|
-
};
|
|
415
|
-
};
|
|
416
|
-
/**
|
|
417
|
-
* A string representation of a duration for a media. Assumes most medias
|
|
418
|
-
* are under an hour so only shows hours if media is over hour.
|
|
419
|
-
*
|
|
420
|
-
* @param {number} numberOfMilliseconds - number of milliseconds
|
|
421
|
-
* @returns {string} - a string representation for duration
|
|
422
|
-
*/
|
|
423
|
-
const mediaDurationString = (numberOfMilliseconds) => {
|
|
424
|
-
const { hours, minutes, seconds } = buildTimeDuration(numberOfMilliseconds);
|
|
425
|
-
if (hours < 1) return `${minutes}:${padTimeInteger(seconds)}`;
|
|
426
|
-
return `${hours}:${padTimeInteger(minutes)}:${padTimeInteger(seconds)}`;
|
|
427
|
-
};
|
|
428
|
-
/**
|
|
429
|
-
* A string representation of a duration for a user session. Assumes that
|
|
430
|
-
* sessions may or may not be more than an hour. To prevent confusion all
|
|
431
|
-
* times show hours, even those that are less than an hour.
|
|
432
|
-
*
|
|
433
|
-
* @param {number} numberOfMilliseconds - number of milliseconds
|
|
434
|
-
* @returns {string} - a string representation of duration
|
|
435
|
-
*/
|
|
436
|
-
const sessionDurationString = (numberOfMilliseconds) => {
|
|
437
|
-
const { hours, minutes, seconds } = buildTimeDuration(numberOfMilliseconds);
|
|
438
|
-
return `${hours}:${padTimeInteger(minutes)}:${padTimeInteger(seconds)}`;
|
|
439
|
-
};
|
|
440
|
-
/**
|
|
441
|
-
* @typedef {Object} WistiaDateTimeObject
|
|
442
|
-
* @property {number} minutes - number of minutes
|
|
443
|
-
* @property {number} hours - number of hours
|
|
444
|
-
* @property {number} dayOfMonth - day of the month
|
|
445
|
-
* @property {number} year - year
|
|
446
|
-
* @property {number} month - month
|
|
447
|
-
*/
|
|
448
|
-
/**
|
|
449
|
-
* @param {Date | null | undefined} date - a Date object
|
|
450
|
-
* @returns {WistiaDateTimeObject | null} - replaceMe
|
|
451
|
-
*/
|
|
452
|
-
const dateToDateTime = (date) => {
|
|
453
|
-
if (!isDate(date)) return null;
|
|
454
|
-
return {
|
|
455
|
-
year: date.getFullYear(),
|
|
456
|
-
month: date.getMonth(),
|
|
457
|
-
dayOfMonth: date.getDate(),
|
|
458
|
-
hours: date.getHours(),
|
|
459
|
-
minutes: date.getMinutes()
|
|
460
|
-
};
|
|
461
|
-
};
|
|
462
|
-
/**
|
|
463
|
-
* @param {Partial<WistiaDateTimeObject> | null} dateTime - a dateTime object
|
|
464
|
-
* @returns {Date | null} - the converted date or null if anything is missing
|
|
465
|
-
*/
|
|
466
|
-
const dateTimeToDate = (dateTime) => {
|
|
467
|
-
const { year, month, dayOfMonth, hours, minutes } = dateTime ?? {};
|
|
468
|
-
if (year !== void 0 && month !== void 0 && dayOfMonth !== void 0) return new Date(year, month, dayOfMonth, hours ?? 0, minutes ?? 0);
|
|
469
|
-
return null;
|
|
470
|
-
};
|
|
471
|
-
/**
|
|
472
|
-
* @param {Partial<WistiaDateTimeObject>} dateTime - a dateTime object
|
|
473
|
-
* @returns {string | null} - string with the ISO-8601 string or null
|
|
474
|
-
*/
|
|
475
|
-
const dateTimeToISO = (dateTime) => dateTimeToDate(dateTime)?.toISOString() ?? null;
|
|
476
|
-
/**
|
|
477
|
-
* @param {Date} dateTime - a dateTime object
|
|
478
|
-
* @param {boolean} toISOString - whether the return value should be an ISO string
|
|
479
|
-
* @returns {string | Date | null} - string or date depending on if toIsoString is true or false. Could be null if there's an error.
|
|
480
|
-
*/
|
|
481
|
-
const dateTimeRounded = (dateTime, toISOString = true) => {
|
|
482
|
-
const first30Min = dateTime.getMinutes() <= halfAnHourInMinutes;
|
|
483
|
-
const hours = first30Min ? dateTime.getHours() : dateTime.getHours() + 1;
|
|
484
|
-
const minutes = first30Min ? halfAnHourInMinutes : 0;
|
|
485
|
-
const dateWithTime = {
|
|
486
|
-
...dateToDateTime(dateTime),
|
|
487
|
-
hours,
|
|
488
|
-
minutes
|
|
200
|
+
const toastMobileWidth = { width: `calc(100% - ${toastPositionOffset * 2}px)` };
|
|
201
|
+
const ToastAnimation = ({ children, in: inProp, renderInPlace }) => {
|
|
202
|
+
const { isSmAndUp } = useMq();
|
|
203
|
+
const { duration, zIndex } = useTheme();
|
|
204
|
+
const durationInSeconds = Number.parseInt(duration.expressive.fast, 10) / 1e3;
|
|
205
|
+
const toastStyle = {
|
|
206
|
+
...toastPositionStyles,
|
|
207
|
+
...isSmAndUp ? toastWidth : toastMobileWidth,
|
|
208
|
+
willChange: "auto",
|
|
209
|
+
zIndex: zIndex.Toast
|
|
489
210
|
};
|
|
490
|
-
if (
|
|
491
|
-
return
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
return string;
|
|
509
|
-
};
|
|
510
|
-
//#endregion
|
|
511
|
-
//#region src/helpers/datetimeHelpers/index.ts
|
|
512
|
-
const datetimeHelpers = {
|
|
513
|
-
isDate,
|
|
514
|
-
dateOnlyString,
|
|
515
|
-
dateOnlyStringNumeric,
|
|
516
|
-
dateOnlyISOString,
|
|
517
|
-
monthDayStringNumeric,
|
|
518
|
-
dayOfWeekString,
|
|
519
|
-
timeOnlyString,
|
|
520
|
-
dateTimeString,
|
|
521
|
-
dateTimeStringForSentence,
|
|
522
|
-
dateOnlyStringForSentence,
|
|
523
|
-
timeAgoString,
|
|
524
|
-
dateUTCOffset,
|
|
525
|
-
buildTimeDuration,
|
|
526
|
-
mediaDurationString,
|
|
527
|
-
sessionDurationString,
|
|
528
|
-
dateToDateTime,
|
|
529
|
-
dateTimeToDate,
|
|
530
|
-
dateTimeToISO,
|
|
531
|
-
dateTimeRounded,
|
|
532
|
-
millisecondsToDurationISOString
|
|
533
|
-
};
|
|
534
|
-
//#endregion
|
|
535
|
-
//#region src/helpers/getBackgroundGradient/getBackgroundGradient.ts
|
|
536
|
-
const gradients = {
|
|
537
|
-
defaultDarkOne: css`
|
|
538
|
-
background-color: #222d66;
|
|
539
|
-
background-image:
|
|
540
|
-
radial-gradient(farthest-corner at top right, #222d66, transparent 70%),
|
|
541
|
-
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
|
|
542
|
-
radial-gradient(farthest-corner at bottom left, #6b84ff, transparent 57%),
|
|
543
|
-
radial-gradient(farthest-corner at top left, #2949e5, transparent 68%);
|
|
544
|
-
`,
|
|
545
|
-
defaultDarkTwo: css`
|
|
546
|
-
background-color: #222d66;
|
|
547
|
-
background-image:
|
|
548
|
-
radial-gradient(farthest-corner at top left, #6b84ff, transparent 100%),
|
|
549
|
-
radial-gradient(farthest-corner at bottom left, #222d66, transparent 57%),
|
|
550
|
-
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
|
|
551
|
-
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
552
|
-
`,
|
|
553
|
-
defaultLightOne: css`
|
|
554
|
-
background-color: #ccd5ff;
|
|
555
|
-
background-image:
|
|
556
|
-
radial-gradient(farthest-corner at bottom right, #ccd5ff, transparent 55%),
|
|
557
|
-
radial-gradient(farthest-corner at top left, #ccd5ff, transparent 65%),
|
|
558
|
-
radial-gradient(farthest-corner at top right, #6b84ff, transparent 50%),
|
|
559
|
-
radial-gradient(farthest-corner at bottom left, #f7f8ff, transparent 50%);
|
|
560
|
-
`,
|
|
561
|
-
defaultLightTwo: css`
|
|
562
|
-
background-color: #ccd5ff;
|
|
563
|
-
background-image:
|
|
564
|
-
radial-gradient(ellipse at top, #ccd5ff, transparent),
|
|
565
|
-
radial-gradient(ellipse at bottom, #6b84ff, transparent);
|
|
566
|
-
`,
|
|
567
|
-
defaultMidOne: css`
|
|
568
|
-
background-color: #6b84ff;
|
|
569
|
-
background-image:
|
|
570
|
-
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%),
|
|
571
|
-
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
|
|
572
|
-
radial-gradient(farthest-corner at top left, #6b84ff, transparent 80%),
|
|
573
|
-
radial-gradient(farthest-corner at bottom left, #222d66, transparent 57%);
|
|
574
|
-
`,
|
|
575
|
-
defaultMidTwo: css`
|
|
576
|
-
background-color: #6b84ff;
|
|
577
|
-
background-image:
|
|
578
|
-
radial-gradient(ellipse at top, #2949e5, transparent),
|
|
579
|
-
radial-gradient(ellipse at bottom, #ccd5ff, transparent);
|
|
580
|
-
`,
|
|
581
|
-
green: css`
|
|
582
|
-
background-color: #fafffa;
|
|
583
|
-
background-image:
|
|
584
|
-
radial-gradient(farthest-corner at bottom left, #b0e5a5, transparent 50%),
|
|
585
|
-
radial-gradient(farthest-corner at top right, #268713, transparent 50%),
|
|
586
|
-
radial-gradient(farthest-corner at top left, #44b62d, transparent 65%),
|
|
587
|
-
radial-gradient(farthest-corner at bottom right, #44b62d, transparent 55%);
|
|
588
|
-
`,
|
|
589
|
-
greenWithPop: css`
|
|
590
|
-
background-color: #fafffa;
|
|
591
|
-
background-image:
|
|
592
|
-
radial-gradient(farthest-corner at bottom left, #b0e5a5, transparent 50%),
|
|
593
|
-
radial-gradient(farthest-corner at top right, #2949e5, transparent 50%),
|
|
594
|
-
radial-gradient(farthest-corner at top left, #44b62d, transparent 65%),
|
|
595
|
-
radial-gradient(farthest-corner at bottom right, #44b62d, transparent 55%);
|
|
596
|
-
`,
|
|
597
|
-
pink: css`
|
|
598
|
-
background-color: #fffff0;
|
|
599
|
-
background-image:
|
|
600
|
-
radial-gradient(farthest-corner at bottom left, #ffc7e8, transparent 50%),
|
|
601
|
-
radial-gradient(farthest-corner at top right, #e0128e, transparent 70%),
|
|
602
|
-
radial-gradient(farthest-corner at top left, #ff40b3, transparent 65%),
|
|
603
|
-
radial-gradient(farthest-corner at bottom right, #ff40b3, transparent 55%);
|
|
604
|
-
`,
|
|
605
|
-
pinkWithPop: css`
|
|
606
|
-
background-color: #fffff0;
|
|
607
|
-
background-image:
|
|
608
|
-
radial-gradient(farthest-corner at top right, #e0128e, transparent 70%),
|
|
609
|
-
radial-gradient(farthest-corner at top left, #ff40b3, transparent 65%),
|
|
610
|
-
radial-gradient(farthest-corner at bottom right, #ff40b3, transparent 55%),
|
|
611
|
-
radial-gradient(farthest-corner at bottom left, #2949e5, transparent 50%);
|
|
612
|
-
`,
|
|
613
|
-
playfulGradientOne: css`
|
|
614
|
-
background-color: #f7f8ff;
|
|
615
|
-
background-image:
|
|
616
|
-
radial-gradient(farthest-corner at top left, #d65cff, transparent 68%),
|
|
617
|
-
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
|
|
618
|
-
radial-gradient(farthest-corner at bottom left, #ffc7e8, transparent 57%),
|
|
619
|
-
radial-gradient(farthest-corner at top right, #ffcaba, transparent 70%);
|
|
620
|
-
`,
|
|
621
|
-
playfulGradientTwo: css`
|
|
622
|
-
background-color: #f7f8ff;
|
|
623
|
-
background-image:
|
|
624
|
-
radial-gradient(farthest-corner at top left, #44b62d, transparent 68%),
|
|
625
|
-
radial-gradient(farthest-corner at bottom right, #eff18d, transparent 50%),
|
|
626
|
-
radial-gradient(farthest-corner at bottom left, #ccd5ff, transparent 57%),
|
|
627
|
-
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
628
|
-
`,
|
|
629
|
-
purple: css`
|
|
630
|
-
background-color: #f2caff;
|
|
631
|
-
background-image:
|
|
632
|
-
radial-gradient(ellipse at 0% 100%, #f9e5ff, transparent 50%),
|
|
633
|
-
radial-gradient(ellipse at 100% 0%, #e093fa, transparent 70%);
|
|
634
|
-
`,
|
|
635
|
-
purpleWithPop: css`
|
|
636
|
-
background-color: #f2caff;
|
|
637
|
-
background-image:
|
|
638
|
-
radial-gradient(farthest-corner at bottom left, #f2caff, transparent 50%),
|
|
639
|
-
radial-gradient(farthest-corner at top left, #d65cff, transparent 65%),
|
|
640
|
-
radial-gradient(farthest-corner at bottom right, #d65cff, transparent 55%),
|
|
641
|
-
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
642
|
-
`,
|
|
643
|
-
yellow: css`
|
|
644
|
-
background-color: #fffff0;
|
|
645
|
-
background-image:
|
|
646
|
-
radial-gradient(farthest-corner at bottom left, #eff18d, transparent 50%),
|
|
647
|
-
radial-gradient(farthest-corner at top right, #bcbf19, transparent 70%),
|
|
648
|
-
radial-gradient(farthest-corner at top left, #e8ec1e, transparent 65%),
|
|
649
|
-
radial-gradient(farthest-corner at bottom right, #e8ec1e, transparent 55%);
|
|
650
|
-
`,
|
|
651
|
-
yellowWithPop: css`
|
|
652
|
-
background-color: #fffff0;
|
|
653
|
-
background-image:
|
|
654
|
-
radial-gradient(farthest-corner at bottom left, #eff18d, transparent 50%),
|
|
655
|
-
radial-gradient(farthest-corner at top right, #bcbf19, transparent 70%),
|
|
656
|
-
radial-gradient(farthest-corner at top left, #e8ec1e, transparent 65%),
|
|
657
|
-
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 55%);
|
|
658
|
-
`
|
|
659
|
-
};
|
|
660
|
-
const gradientMap = Object.keys(gradients);
|
|
661
|
-
/**
|
|
662
|
-
* Retrieves the CSS background gradient corresponding to the given gradient name.
|
|
663
|
-
* If the specified gradient name is not found, the default gradient ('defaultDarkOne') is returned.
|
|
664
|
-
* @param {GradientName} gradientName - The name of the gradient to retrieve.
|
|
665
|
-
* @returns {FlattenSimpleInterpolation} The CSS string representing the specified gradient.
|
|
666
|
-
*/
|
|
667
|
-
const getBackgroundGradient = (gradientName) => {
|
|
668
|
-
return isNotNil(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
|
|
669
|
-
};
|
|
670
|
-
//#endregion
|
|
671
|
-
//#region src/helpers/getBackgroundGradient/getSemiRandomBackgroundGradient.ts
|
|
672
|
-
const MULTIPLIER = 31;
|
|
673
|
-
/**
|
|
674
|
-
* Retrieves a semi-random background gradient based on the given id.
|
|
675
|
-
*
|
|
676
|
-
* @param {string} id - The id to use to generate the semi-random background gradient.
|
|
677
|
-
* @returns {GradientName} gradientName
|
|
678
|
-
*/
|
|
679
|
-
const getSemiRandomBackgroundGradient = (id) => {
|
|
680
|
-
if (!(typeof id === "string" && id)) return gradientMap[0];
|
|
681
|
-
const hashCode = Array.from(id).reduce((num, char) => Math.imul(MULTIPLIER, num) + char.charCodeAt(0) || 0, 0);
|
|
682
|
-
return gradientMap[Math.abs(hashCode) % gradientMap.length];
|
|
211
|
+
if (renderInPlace) return /* @__PURE__ */ jsx(Fragment, { children });
|
|
212
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { children: inProp ? /* @__PURE__ */ jsx(motion.div, {
|
|
213
|
+
animate: {
|
|
214
|
+
opacity: 1,
|
|
215
|
+
y: "0%"
|
|
216
|
+
},
|
|
217
|
+
exit: {
|
|
218
|
+
opacity: 0,
|
|
219
|
+
y: "100%"
|
|
220
|
+
},
|
|
221
|
+
initial: {
|
|
222
|
+
opacity: 0,
|
|
223
|
+
y: "100%"
|
|
224
|
+
},
|
|
225
|
+
style: toastStyle,
|
|
226
|
+
transition: { duration: durationInSeconds },
|
|
227
|
+
children
|
|
228
|
+
}) : null });
|
|
683
229
|
};
|
|
684
230
|
//#endregion
|
|
685
|
-
//#region src/
|
|
686
|
-
const
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
return `@media (max-width: ${Math.max(value - breakpointBuffer, 0)}${unit})`;
|
|
690
|
-
};
|
|
691
|
-
const xsAndUp = ({ theme }) => `@media (min-width: ${theme.breakpoint.xs})`;
|
|
692
|
-
const smAndUp = ({ theme }) => `@media (min-width: ${theme.breakpoint.sm})`;
|
|
693
|
-
const mdAndUp = ({ theme }) => `@media (min-width: ${theme.breakpoint.md})`;
|
|
694
|
-
const lgAndUp = ({ theme }) => `@media (min-width: ${theme.breakpoint.lg})`;
|
|
695
|
-
const xlAndUp = ({ theme }) => `@media (min-width: ${theme.breakpoint.xl})`;
|
|
696
|
-
const xsAndDown = ({ theme }) => getMaxWidth(theme.breakpoint.xs);
|
|
697
|
-
const smAndDown = ({ theme }) => getMaxWidth(theme.breakpoint.sm);
|
|
698
|
-
const mdAndDown = ({ theme }) => getMaxWidth(theme.breakpoint.md);
|
|
699
|
-
const lgAndDown = ({ theme }) => getMaxWidth(theme.breakpoint.lg);
|
|
700
|
-
const xlAndDown = ({ theme }) => getMaxWidth(theme.breakpoint.xl);
|
|
701
|
-
const mq = {
|
|
702
|
-
xsAndUp,
|
|
703
|
-
smAndUp,
|
|
704
|
-
mdAndUp,
|
|
705
|
-
lgAndUp,
|
|
706
|
-
xlAndUp,
|
|
707
|
-
xsAndDown,
|
|
708
|
-
smAndDown,
|
|
709
|
-
mdAndDown,
|
|
710
|
-
lgAndDown,
|
|
711
|
-
xlAndDown
|
|
231
|
+
//#region src/hooks/useThemeColor/useThemeColor.ts
|
|
232
|
+
const getColor = (colors, colorName) => {
|
|
233
|
+
if (!colors.hasOwnProperty(colorName)) throw new Error(`\`${String(colorName)}\` is not a defined theme color, check argument passed to \`useThemeColor\``);
|
|
234
|
+
return colors[colorName];
|
|
712
235
|
};
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
* @returns {boolean} - whether value is an object
|
|
720
|
-
*/
|
|
721
|
-
const isObject = (value) => value !== null && value !== void 0 && (Object.getPrototypeOf(value) === null || value.constructor === Object);
|
|
722
|
-
//#endregion
|
|
723
|
-
//#region src/helpers/objectHelpers/deepFreeze.ts
|
|
724
|
-
/**
|
|
725
|
-
* Recursively Object.freeze() objects
|
|
726
|
-
*
|
|
727
|
-
* @param {Object} obj - any object to freeze
|
|
728
|
-
* @returns {Object} - new object
|
|
729
|
-
*/
|
|
730
|
-
const deepFreeze = (obj) => {
|
|
731
|
-
Object.freeze(obj);
|
|
732
|
-
Object.getOwnPropertyNames(obj).forEach((prop) => {
|
|
733
|
-
if (Object.prototype.hasOwnProperty.call(obj, prop) && (typeof obj === "function" ? prop !== "caller" && prop !== "callee" && prop !== "arguments" : true) && obj[prop] !== null && (typeof obj[prop] === "object" || typeof obj[prop] === "function") && !Object.isFrozen(obj[prop])) deepFreeze(obj[prop]);
|
|
734
|
-
});
|
|
735
|
-
return obj;
|
|
236
|
+
const useThemeColor = (colorName = null) => {
|
|
237
|
+
const colors = useTheme().color;
|
|
238
|
+
if (!isNonEmptyArray(Object.keys({ ...colors }))) throw new Error("The `useThemeColor` hook could not find any defined colors. A possible cause of this error is that your component is not wrapped in a theme provider such as `<VHSProvider />`");
|
|
239
|
+
if (colorName === null) return colors;
|
|
240
|
+
if (Array.isArray(colorName)) return colorName.map((color) => getColor(colors, color));
|
|
241
|
+
return getColor(colors, colorName);
|
|
736
242
|
};
|
|
737
243
|
//#endregion
|
|
738
|
-
//#region src/
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
244
|
+
//#region src/components/Icon/iconMap.ts
|
|
245
|
+
const iconMap$1 = {
|
|
246
|
+
"ab-test": "AbTestIcon",
|
|
247
|
+
"all-content": "AllContentIcon",
|
|
248
|
+
archived: "ArchivedIcon",
|
|
249
|
+
"arrow-down": "ArrowDownIcon",
|
|
250
|
+
"arrow-left": "ArrowLeftIcon",
|
|
251
|
+
"arrow-right": "ArrowRightIcon",
|
|
252
|
+
"arrow-up": "ArrowUpIcon",
|
|
253
|
+
asterisk: "AsteriskIcon",
|
|
254
|
+
audience: "AudienceIcon",
|
|
255
|
+
calendar: "CalendarIcon",
|
|
256
|
+
camera: "CameraIcon",
|
|
257
|
+
"caret-down": "CaretDownIcon",
|
|
258
|
+
"caret-left": "CaretLeftIcon",
|
|
259
|
+
"caret-right": "CaretRightIcon",
|
|
260
|
+
"caret-up": "CaretUpIcon",
|
|
261
|
+
channel: "ChannelIcon",
|
|
262
|
+
checkmark: "CheckmarkIcon",
|
|
263
|
+
"checkmark-circle": "CheckmarkCircleIcon",
|
|
264
|
+
"checkmark-circle-outline": "CheckmarkCircleOutlineIcon",
|
|
265
|
+
"checkmark-circle-three-quarters": "CheckmarkCircleThreeQuartersIcon",
|
|
266
|
+
"checkmark-underlined": "CheckmarkUnderlinedIcon",
|
|
267
|
+
close: "CloseIcon",
|
|
268
|
+
"close-circle": "CloseCircleIcon",
|
|
269
|
+
"collect-video": "CollectVideoIcon",
|
|
270
|
+
collection: "CollectionIcon",
|
|
271
|
+
comment: "CommentIcon",
|
|
272
|
+
community: "CommunityIcon",
|
|
273
|
+
"contact-us": "ContactUsIcon",
|
|
274
|
+
copy: "CopyIcon",
|
|
275
|
+
"copy-disabled": "CopyDisabledIcon",
|
|
276
|
+
create: "CreateIcon",
|
|
277
|
+
delete: "DeleteIcon",
|
|
278
|
+
"delete-sm": "DeleteSmIcon",
|
|
279
|
+
"dottie-clock": "DottieClockIcon",
|
|
280
|
+
download: "DownloadIcon",
|
|
281
|
+
draggable: "DraggableIcon",
|
|
282
|
+
edit: "PencilIcon",
|
|
283
|
+
ellipsis: "EllipsisIcon",
|
|
284
|
+
"ellipsis-vertical": "EllipsisVerticalIcon",
|
|
285
|
+
embed: "EmbedIcon",
|
|
286
|
+
episodes: "EpisodesIcon",
|
|
287
|
+
error: "TriangleIcon",
|
|
288
|
+
expand: "ExpandIcon",
|
|
289
|
+
export: "DownloadIcon",
|
|
290
|
+
favorite: "FavoriteIcon",
|
|
291
|
+
"favorite-outline": "FavoriteOutlineIcon",
|
|
292
|
+
filter: "FilterIcon",
|
|
293
|
+
gear: "GearIcon",
|
|
294
|
+
"getting-started": "GettingStartedIcon",
|
|
295
|
+
globe: "GlobeIcon",
|
|
296
|
+
"grid-view": "GridViewIcon",
|
|
297
|
+
"group-record": "GroupRecordIcon",
|
|
298
|
+
hamburger: "HamburgerIcon",
|
|
299
|
+
hazard: "HazardIcon",
|
|
300
|
+
"help-center": "HelpCenterIcon",
|
|
301
|
+
hide: "HideIcon",
|
|
302
|
+
home: "HomeIcon",
|
|
303
|
+
hourglass: "HourglassIcon",
|
|
304
|
+
import: "ImportIcon",
|
|
305
|
+
info: "InfoIcon",
|
|
306
|
+
integrations: "IntegrationsIcon",
|
|
307
|
+
invite: "InviteIcon",
|
|
308
|
+
"invite-to-record": "InviteToRecordIcon",
|
|
309
|
+
"lightning-bolt": "LightningBoltIcon",
|
|
310
|
+
link: "LinkIcon",
|
|
311
|
+
"list-view": "ListViewIcon",
|
|
312
|
+
live: "LiveIcon",
|
|
313
|
+
lock: "LockIcon",
|
|
314
|
+
logout: "LogoutIcon",
|
|
315
|
+
media: "MediaIcon",
|
|
316
|
+
megaphone: "MegaphoneIcon",
|
|
317
|
+
"more-options": "MoreOptionsIcon",
|
|
318
|
+
"open-new": "OpenNewIcon",
|
|
319
|
+
overview: "OverviewIcon",
|
|
320
|
+
paint: "PaintIcon",
|
|
321
|
+
pencil: "PencilIcon",
|
|
322
|
+
play: "PlayIcon",
|
|
323
|
+
playlist: "PlaylistIcon",
|
|
324
|
+
podcast: "PodcastIcon",
|
|
325
|
+
preview: "PreviewIcon",
|
|
326
|
+
"private-user-sessions": "PrivateUserSessionsIcon",
|
|
327
|
+
project: "ProjectIcon",
|
|
328
|
+
"question-mark": "QuestionMarkIcon",
|
|
329
|
+
react: "ReactIcon",
|
|
330
|
+
record: "RecordIcon",
|
|
331
|
+
redo: "RedoIcon",
|
|
332
|
+
"remove-from-channel": "RemoveFromChannelIcon",
|
|
333
|
+
replace: "ReplaceIcon",
|
|
334
|
+
reply: "ReplyIcon",
|
|
335
|
+
"save-copy": "CopyIcon",
|
|
336
|
+
scissors: "ScissorsIcon",
|
|
337
|
+
search: "SearchIcon",
|
|
338
|
+
send: "SendIcon",
|
|
339
|
+
settings: "SettingsIcon",
|
|
340
|
+
share: "ShareIcon",
|
|
341
|
+
soapbox: "SoapboxIcon",
|
|
342
|
+
sort: "SortIcon",
|
|
343
|
+
sparkle: "SparkleIcon",
|
|
344
|
+
spinner: "SpinnerIcon",
|
|
345
|
+
stats: "StatsIcon",
|
|
346
|
+
"switch-accounts": "SwitchAccountsIcon",
|
|
347
|
+
tag: "TagIcon",
|
|
348
|
+
team: "TeamIcon",
|
|
349
|
+
"thumbs-down": "ThumbsDownIcon",
|
|
350
|
+
"thumbs-up": "ThumbsUpIcon",
|
|
351
|
+
triangle: "TriangleIcon",
|
|
352
|
+
undo: "UndoIcon",
|
|
353
|
+
unlock: "UnlockIcon",
|
|
354
|
+
upload: "UploadIcon",
|
|
355
|
+
"users-permissions": "UsersPermissionsIcon",
|
|
356
|
+
"view-stream": "ViewStreamIcon",
|
|
357
|
+
wand: "WandIcon",
|
|
358
|
+
"zoom-in": "ZoomInIcon",
|
|
359
|
+
"zoom-out": "ZoomOutIcon"
|
|
757
360
|
};
|
|
758
361
|
//#endregion
|
|
759
|
-
//#region src/
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
const selectKeys = (obj, keys) => keys.reduce((obj2, key) => {
|
|
768
|
-
if (Object.prototype.hasOwnProperty.call(obj, key)) obj2[key] = obj[key];
|
|
769
|
-
return obj2;
|
|
770
|
-
}, {});
|
|
771
|
-
//#endregion
|
|
772
|
-
//#region src/helpers/objectHelpers/index.ts
|
|
773
|
-
const objectHelpers = {
|
|
774
|
-
isObject,
|
|
775
|
-
deepFreeze,
|
|
776
|
-
merge,
|
|
777
|
-
selectKeys
|
|
778
|
-
};
|
|
362
|
+
//#region src/components/Icon/icons/AbTestIcon.tsx
|
|
363
|
+
const AbTestIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
364
|
+
...props,
|
|
365
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
366
|
+
d: "M8.78042 2.11118C6.86612 2.34876 6.94137 3.15354 6.99208 3.69591V3.69599C6.99476 3.72465 6.99738 3.75258 6.99962 3.77965C7.04436 4.31904 7.55048 5.39025 8.78042 5.39025H8.79735L8.79731 5.40433C8.79731 5.40433 9.05197 8.22842 8.79731 9.662C8.63183 10.5935 8.18982 11.2329 7.69474 11.865C8.39927 11.9016 9.14688 11.9764 9.93037 12.0994C10.4699 12.1842 10.8383 12.6879 10.753 13.2246C10.6678 13.7612 10.1613 14.1276 9.62166 14.0428C8.33927 13.8413 7.1731 13.7835 6.16316 13.812C5.48376 14.6589 4.44391 15.9821 3.58432 17.1925C5.12252 17.2343 7.05517 17.2692 9.48309 17.1438C10.0287 17.1157 10.4939 17.5327 10.5222 18.0753C10.5504 18.6178 10.1312 19.0805 9.58566 19.1086C6.78798 19.253 4.53527 19.189 2.90579 19.1426C2.71222 19.1371 2.52744 19.1319 2.35159 19.1273C1.49048 20.8558 2.24968 21.573 4.20714 21.7855C6.33564 22.0165 18.0133 22.1217 19.9478 21.7855C21.8825 21.4493 22.5323 19.9214 21.5397 18.6499C20.547 17.3783 17.7768 13.4113 16.9172 11.9984C16.7004 11.642 16.4948 11.3282 16.3083 11.0435C15.7556 10.1997 15.3708 9.61242 15.36 8.93404L15.3601 5.40433L15.36 5.39025H15.3746C16.8928 5.34284 17.0231 4.6562 17.0231 3.75071C17.0231 2.84523 16.285 2.11118 15.3746 2.11118C15.3746 2.11118 10.7959 1.86103 8.78042 2.11118Z",
|
|
367
|
+
fill: "currentColor"
|
|
368
|
+
})
|
|
369
|
+
});
|
|
779
370
|
//#endregion
|
|
780
|
-
//#region src/
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
const camelCase = (str = "") => str.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g, (match, index) => {
|
|
788
|
-
if (Number(match) === 0) return "";
|
|
789
|
-
return index === 0 ? match.toLowerCase() : match.toUpperCase();
|
|
371
|
+
//#region src/components/Icon/icons/AllContentIcon.tsx
|
|
372
|
+
const AllContentIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
373
|
+
...props,
|
|
374
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
375
|
+
d: "m3.09059 3.5023c.5523 0 1 .4477 1 1l-.00092.70188c-.01018 3.93536-.10142 7.15092-.08848 9.77572.0068 1.3587.0426 2.4727.1299 3.3301.071.6968.16857 1.1263.25679 1.3643l.00412.0107.04589.0175c.01953.007.04171.0145.06676.0224l.08404.025c.2655.0742.6435.1409 1.1387.1952.9865.1081 2.3084.1539 3.8524.1644 3.14371.0213 6.85261-.0993 10.44111-.0993l.1166.0067c.4974.0578.8834.4805.8834.9933 0 .5522-.4477 1-1 1l-.738.0017c-3.232.0147-6.8753.1168-9.71671.0976-1.558-.0106-2.9641-.0566-4.0568-.1763-.5444-.0597-1.0437-.141-1.4591-.2571-.3702-.1035-.8555-.2808-1.185-.649l-.05731-.0703-.05079-.0751-.10286-.186c-.29118-.5812-.4296-1.3656-.51294-2.183-.0974-.9568-.1333-2.1494-.1402-3.5229-.0133-2.6853.0894-6.4106.0894-10.4876l.00673-.11652c.05776-.49735.48042-.88338.99327-.88338zm6.5557-1.37637.53051.02595c1.8616.09188 3.7138.19142 3.7138.19142s1.0423-.01829 2.2175-.02072l.4451-.0001c.8957.00155 1.802.01442 2.3355.05302 2.564.2222 2.6272 1.1409 2.7026 2.237.0118.172.024.3485.0461.5273.2722 2.1214.4627 4.9141.4627 6.5213 0 1.6393-.0545 5.1864-.245 5.4757-.2721.4178-.7348.9964-2.6398.8357-1.5154-.1278-7.0949-.2353-9.79337-.2416l-.43309-.0001c-.46931.0011-.80752.0065-.95905.0167-.9525.0643-2.0683-.0643-2.2588-1.125-.17942-.9182-.22215-3.2602-.2137-5.7009l.00427-.7725c.01347-1.80295.04985-3.58372.07493-4.8122.0148-.7225.0256-1.254.0256-1.4866 0-.0124-.0004-.0308-.001-.0543-.0081-.3442-.0425-1.796.8683-1.796.39926 0 1.70989.05778 3.1169.12593zm1.68581 5.01357c-.0356.94577-.0413 3.5445-.0421 5.0123l-.0002.688c0 .1695.1692.2755.3172.1907.9725-.551 3.89-2.2463 4.7145-3.327.0846-.106.0423-.2543-.0634-.3179l-4.6089-2.4156c-.148-.0848-.3171.0212-.3171.1695z",
|
|
376
|
+
fill: "currentColor"
|
|
377
|
+
})
|
|
790
378
|
});
|
|
791
379
|
//#endregion
|
|
792
|
-
//#region src/
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
if (value === "true" || value === "false") return value === "true";
|
|
802
|
-
return Boolean(value);
|
|
803
|
-
};
|
|
380
|
+
//#region src/components/Icon/icons/ArchivedIcon.tsx
|
|
381
|
+
const ArchivedIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
382
|
+
...props,
|
|
383
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
384
|
+
clipRule: "evenodd",
|
|
385
|
+
d: "m1.73061 4.12674c-.00015-.04078-.00031-.08299-.0006-.12674.00196-.01564.00388-.03112.00579-.04645.14457-1.16135.18151-1.45809 3.76421-1.95355 4.033-.558 11.67499-.278 15.49699.892.433.133 1.003.608 1.003 1.108 0 .63366.0008.64812.0016.66226.0007.01356.0014.02683.0014.58474-.1073.53269-.783.38874-1.8549.16039-.8357-.17804-1.9122-.40739-3.1481-.40739-.9352 0-2.0855-.03207-3.3103-.06622-2.7041-.07539-5.7715-.16091-7.68969.06622-.93175.05647-1.70731.17102-2.3234.26202-.91133.1346-1.47374.21767-1.6766-.01502-.26635-.30625-.26743-.59442-.2694-1.12026zm.38218 9.34776.0002.0065c.027.913.053 1.802.033 2.573l-.01.316-.00009.0031c-.05397 1.901-.10965 3.8622.37509 4.4189.34.39 1.277.743 3.591.743 2.315 0 11.63801.264 12.80501.403 1.168.14 2.548.112 2.739-.836.303-1.4255.306-4.3452.308-6.2904v-.0386c0-.625 0-1.147.01-1.48.031-1.25-.024-1.967-.081-2.702-.021-.266-.042-.534-.059-.83-.005-.146-.008-.281-.01-.406l-.0001-.00311c-.0169-.82786-.0249-1.21719-.8169-1.45989-3.822-1.171-11.46401-1.45-15.49701-.892-3.195.442-3.233.992-3.297 1.935-.00056.00797-.00112.01597-.00168.024-.00848.12097-.01744.24897-.03432.384-.14378 1.1792-.09814 2.6835-.0542 4.1315zm5.0572-1.8505c-.316-.349-.254-1.079-.149-1.376.114-.297 3.05201-.268 5.00901-.214 1.5006.0502 2.997.1864 4.482.408.298.052.613.705.465 1.175l-.023.075c-.037.13-.075.263-.17.274-.36.012-6.747-.068-6.747-.068s-2.55201.074-2.86701-.274z",
|
|
386
|
+
fill: "currentColor"
|
|
387
|
+
})
|
|
388
|
+
});
|
|
804
389
|
//#endregion
|
|
805
|
-
//#region src/
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
const coerceToString = (value) => value === null || value === void 0 ? "" : String(value);
|
|
390
|
+
//#region src/components/Icon/icons/ArrowDownIcon.tsx
|
|
391
|
+
const ArrowDownIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
392
|
+
...props,
|
|
393
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
394
|
+
d: "m19.7685 14.8636c.615-.555.6637-1.5035.1087-2.1185-.555-.6151-1.5035-.6637-2.1185-.1088l-4.2587 3.8429v-12.27446c0-.82845-.6716-1.5-1.5-1.5s-1.5.67155-1.5 1.5v12.27446l-4.25874-3.8429c-.615-.555-1.56345-.5063-2.11845.1088-.555.615-.5064 1.5635.10875 2.1185l6.76354 6.1031c.5709.5152 1.4389.5152 2.0098 0z",
|
|
395
|
+
fill: "currentColor"
|
|
396
|
+
})
|
|
397
|
+
});
|
|
814
398
|
//#endregion
|
|
815
|
-
//#region src/
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
399
|
+
//#region src/components/Icon/icons/ArrowLeftIcon.tsx
|
|
400
|
+
const ArrowLeftIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
401
|
+
...props,
|
|
402
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
403
|
+
d: "M9.1653 19.7974C9.72028 20.4124 10.6688 20.4611 11.2838 19.9061C11.8989 19.3512 11.9476 18.4027 11.3926 17.7876L7.54974 13.5289L19.8242 13.5289C20.6526 13.5289 21.3242 12.8573 21.3242 12.0289C21.3242 11.2005 20.6526 10.5289 19.8242 10.5289L7.54975 10.5289L11.3926 6.27019C11.9476 5.65519 11.8989 4.70674 11.2838 4.15174C10.6688 3.59674 9.72028 3.64534 9.16529 4.26049L3.06217 11.024C2.54703 11.5949 2.54703 12.4629 3.06217 13.0338L9.1653 19.7974Z",
|
|
404
|
+
fill: "currentColor"
|
|
405
|
+
})
|
|
406
|
+
});
|
|
823
407
|
//#endregion
|
|
824
|
-
//#region src/
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
if (!isString(str)) return false;
|
|
833
|
-
try {
|
|
834
|
-
const url = new URL(str);
|
|
835
|
-
return url.protocol === "http:" || url.protocol === "https:";
|
|
836
|
-
} catch {
|
|
837
|
-
return false;
|
|
838
|
-
}
|
|
839
|
-
};
|
|
408
|
+
//#region src/components/Icon/icons/ArrowRightIcon.tsx
|
|
409
|
+
const ArrowRightIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
410
|
+
...props,
|
|
411
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
412
|
+
d: "M14.8347 4.26044C14.2797 3.6454 13.3312 3.59671 12.7162 4.15169C12.1011 4.70668 12.0524 5.65517 12.6074 6.27022L16.4502 10.5289L4.17581 10.5289C3.34736 10.5289 2.67581 11.2005 2.67581 12.0289C2.67581 12.8573 3.34736 13.5289 4.17581 13.5289L16.4502 13.5289L12.6074 17.7877C12.0524 18.4027 12.1011 19.3511 12.7161 19.9061C13.3312 20.4611 14.2797 20.4125 14.8347 19.7974L20.9378 13.0338C21.453 12.4629 21.453 11.5949 20.9378 11.024L14.8347 4.26044Z",
|
|
413
|
+
fill: "currentColor"
|
|
414
|
+
})
|
|
415
|
+
});
|
|
840
416
|
//#endregion
|
|
841
|
-
//#region src/
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
const protocolAndDomain = /^(?:\w+:)?\/\/(\S+)$/;
|
|
850
|
-
const localhostDomain = /^localhost[:?\d]*(?:[^:?\d]\S*)?$/;
|
|
851
|
-
const nonLocalhostDomain = /^[^\s.]+\.\S{2,}$/;
|
|
852
|
-
if (!isString(str)) return false;
|
|
853
|
-
const match = protocolAndDomain.exec(str);
|
|
854
|
-
if (!match) return false;
|
|
855
|
-
const remaining = match[1];
|
|
856
|
-
if (remaining === void 0 || !remaining) return false;
|
|
857
|
-
return localhostDomain.test(remaining) || nonLocalhostDomain.test(remaining);
|
|
858
|
-
};
|
|
417
|
+
//#region src/components/Icon/icons/ArrowUpIcon.tsx
|
|
418
|
+
const ArrowUpIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
419
|
+
...props,
|
|
420
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
421
|
+
d: "M4.23151 9.19422C3.61647 9.7492 3.56778 10.6977 4.12276 11.3127C4.67775 11.9278 5.62624 11.9765 6.24129 11.4215L10.5 7.57866L10.5 19.8531C10.5 20.6815 11.1716 21.3531 12 21.3531C12.8284 21.3531 13.5 20.6815 13.5 19.8531L13.5 7.57867L17.7587 11.4215C18.3737 11.9765 19.3222 11.9278 19.8772 11.3128C20.4322 10.6977 20.3836 9.7492 19.7684 9.19422L13.0049 3.09109C12.434 2.57595 11.566 2.57595 10.9951 3.09109L4.23151 9.19422",
|
|
422
|
+
fill: "currentColor"
|
|
423
|
+
})
|
|
424
|
+
});
|
|
859
425
|
//#endregion
|
|
860
|
-
//#region src/
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
426
|
+
//#region src/components/Icon/icons/AsteriskIcon.tsx
|
|
427
|
+
const AsteriskIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
428
|
+
...props,
|
|
429
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
430
|
+
d: "M14.4425 22L13.9358 15.3633L19.5575 19.0908L22 14.9542L15.3642 11.9542L22 9L19.5575 4.86333L13.9358 8.63667L14.4425 2H9.5575L10.0183 8.68167L4.39667 4.90917L2 9.04583L8.4975 12L2 14.9092L4.39667 19L10.0183 15.2725L9.5575 22H14.4425Z",
|
|
431
|
+
fill: "currentColor"
|
|
432
|
+
})
|
|
433
|
+
});
|
|
868
434
|
//#endregion
|
|
869
|
-
//#region src/
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
//#endregion
|
|
878
|
-
//#region src/helpers/stringHelpers/stripExtension.ts
|
|
879
|
-
/**
|
|
880
|
-
* Removes file extension from string
|
|
881
|
-
*
|
|
882
|
-
* @param {string} str - string to have file extension removed from
|
|
883
|
-
* @returns {string} - string with file extension removed
|
|
884
|
-
*/
|
|
885
|
-
const stripExtension = (str) => (str || "").replace(/\.[^/.]{1,4}$/, "");
|
|
435
|
+
//#region src/components/Icon/icons/AudienceIcon.tsx
|
|
436
|
+
const AudienceIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
437
|
+
...props,
|
|
438
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
439
|
+
d: "m11.1744 3.04659c2.6835 2.33688 2.1425 8.06531-2.85234 7.99341-4.99483-.0719-5.03082-5.26362-3.69418-7.27726 1.33665-2.01364 4.64706-2.37021 6.54652-.71615zm8.511 8.47051c1.505 1.3105 1.2016 4.523-1.5995 4.4827-2.8011-.0404-2.8213-2.9519-2.0717-4.0811s2.6061-1.3292 3.6712-.4016zm-16.99799 10.3336c-.32545.0141-.61759-.3577-.6444-.8086-.15145-2.3574.04693-5.2652 1.4129-7.0804 2.86859-3.7922 9.46089-1.5366 10.60059 2.1134.236.7357.4008 1.5352.4961 2.3645.1371-.16.2718-.3099.3984-.4466 1.7601-1.8904 5.8048-.766 6.5041 1.0535.2965.751.4096 1.6354.3492 2.5077-.0098.2438-.2089.4477-.4506.4458h-7.4492-.0132-.0022-.4484c-.0235.0008-.0471-.0016-.0706-.0069z",
|
|
440
|
+
fill: "currentColor"
|
|
441
|
+
})
|
|
442
|
+
});
|
|
886
443
|
//#endregion
|
|
887
|
-
//#region src/
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
return `${str.slice(0, maxChars - 3)}...`;
|
|
898
|
-
};
|
|
444
|
+
//#region src/components/Icon/icons/CalendarIcon.tsx
|
|
445
|
+
const CalendarIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
446
|
+
...props,
|
|
447
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
448
|
+
clipRule: "evenodd",
|
|
449
|
+
d: "m7.5 2.9895c.82843 0 1.5.67157 1.5 1.5v1.51041l6 .00003c0-.00001 0 .00001 0 0v-1.51044c0-.82843.6716-1.5 1.5-1.5s1.5.67157 1.5 1.5v1.51041c0-.00001 0 .00001 0 0l1.5.00003c.8284 0 1.5.67157 1.5 1.5v1.5c0 .82843-.6716 1.49996-1.5 1.49996h-15c-.82843 0-1.5-.67153-1.5-1.49996v-1.5c0-.82843.67157-1.5 1.5-1.5h1.5v-1.51044c0-.82843.67157-1.5 1.5-1.5zm-3 9.0104c-.82843 0-1.5.6716-1.5 1.5v6c0 .8285.67157 1.5 1.5 1.5h15c.8284 0 1.5-.6715 1.5-1.5v-6c0-.8284-.6716-1.5-1.5-1.5z",
|
|
450
|
+
fill: "currentColor",
|
|
451
|
+
fillRule: "evenodd"
|
|
452
|
+
})
|
|
453
|
+
});
|
|
899
454
|
//#endregion
|
|
900
|
-
//#region src/
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
camelCase,
|
|
911
|
-
coerceToBoolean,
|
|
912
|
-
coerceToString,
|
|
913
|
-
isHttpUrl,
|
|
914
|
-
isString,
|
|
915
|
-
isUrl,
|
|
916
|
-
lowerFirst,
|
|
917
|
-
removeNewlines,
|
|
918
|
-
stripExtension,
|
|
919
|
-
truncate,
|
|
920
|
-
upperFirst
|
|
921
|
-
};
|
|
455
|
+
//#region src/components/Icon/icons/CameraIcon.tsx
|
|
456
|
+
const CameraIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
457
|
+
...props,
|
|
458
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
459
|
+
clipRule: "evenodd",
|
|
460
|
+
d: "M11.3162 20.979C11.6222 20.9857 11.9282 20.9924 12.2342 21V20.992C12.276 20.992 12.3178 20.9924 12.3595 20.9928C12.443 20.9935 12.5264 20.9942 12.6096 20.992C12.9666 20.9825 13.3235 20.9735 13.6805 20.9645C14.6678 20.9395 15.6552 20.9144 16.6423 20.8803C17.3374 20.8559 18.032 20.8127 18.7251 20.7569C19.3748 20.7048 20.0238 20.6415 20.6727 20.5783C20.9177 20.5544 21.1626 20.5305 21.4076 20.5072C21.8887 20.4612 22.2848 20.0971 22.3749 19.624C22.5973 18.4536 22.7728 17.2761 22.8625 16.0887C22.9258 15.2478 22.9671 14.403 22.9784 13.5597C22.9883 12.8257 22.9578 12.0898 22.9174 11.3563C22.8803 10.6899 22.8278 10.023 22.7433 9.36129C22.6605 8.71089 22.5531 8.06362 22.4457 7.41667C22.4215 7.27097 22.3974 7.12528 22.3735 6.97958C22.2928 6.48916 21.8624 6.12123 21.3663 6.08228C21.0761 6.05955 20.7863 6.03115 20.4965 6.00274C20.2656 5.98012 20.0347 5.9575 19.8036 5.93773C19.2277 5.88845 18.6514 5.84434 18.0747 5.80586C17.9794 5.79929 17.9418 5.76737 17.9151 5.67868L17.8955 5.61308C17.7345 5.07457 17.5734 4.53581 17.3998 4.00139C17.2445 3.5227 16.7784 3.15664 16.3077 3.1313C16.1265 3.12155 15.9453 3.11126 15.7641 3.10098C15.1608 3.06675 14.5575 3.03253 13.9537 3.01773C12.2178 2.97502 10.4823 3.00787 8.75008 3.13365C8.62103 3.14303 8.48634 3.17917 8.36901 3.23455C8.02173 3.39833 7.773 3.66208 7.65567 4.03236C7.56181 4.32848 7.47105 4.62568 7.38028 4.92287C7.3013 5.18146 7.22232 5.44004 7.14131 5.69792C7.12817 5.73922 7.07937 5.79131 7.04041 5.79741C6.95316 5.81131 6.86434 5.81585 6.77551 5.82041C6.73533 5.82246 6.69516 5.82452 6.65512 5.82744C6.53247 5.83652 6.40978 5.84531 6.28709 5.8541C5.96567 5.87712 5.64421 5.90015 5.32324 5.92834C5.07994 5.94972 4.83701 5.97418 4.59413 5.99864C4.29308 6.02896 3.99209 6.05927 3.69053 6.08368C3.21982 6.1217 2.78478 6.49432 2.70453 6.96316C2.66943 7.16876 2.63372 7.37429 2.59802 7.57982C2.47619 8.28117 2.35434 8.98263 2.25634 9.68746C2.15263 10.4327 2.06674 11.1841 2.03202 11.9354C1.99259 12.782 1.9879 13.6329 2.02732 14.479C2.06674 15.3322 2.1545 16.1854 2.26714 17.032C2.35101 17.6614 2.46316 18.287 2.5753 18.9124C2.61877 19.1549 2.66224 19.3973 2.70406 19.64C2.77868 20.0708 3.19542 20.4636 3.61263 20.5044C3.69683 20.5127 3.78099 20.5213 3.86514 20.5298C4.03332 20.5469 4.20149 20.564 4.37008 20.579C4.58912 20.5986 4.80813 20.6188 5.02715 20.639C5.58193 20.6903 6.13681 20.7416 6.69266 20.7813C7.51863 20.8404 8.34601 20.8897 9.17386 20.9207C9.88781 20.9476 10.602 20.9633 11.3162 20.979ZM6.3909 12.7131C6.41718 9.38992 9.19264 6.63089 12.5083 6.64872C15.8811 6.66703 18.5796 9.38664 18.5707 12.7375C18.5618 16.0676 15.807 18.8534 12.4721 18.8328C9.15556 18.8121 6.36462 16.0512 6.3909 12.7131ZM16.2261 12.7248C16.2383 10.658 14.5539 8.99148 12.4754 8.99524L12.4749 8.99571C10.4006 8.99899 8.72848 10.6655 8.73318 12.7243C8.73834 14.7935 10.4217 16.4942 12.4806 16.4867C14.5619 16.4792 16.2139 14.8104 16.2261 12.7248Z",
|
|
461
|
+
fill: "currentColor",
|
|
462
|
+
fillRule: "evenodd"
|
|
463
|
+
})
|
|
464
|
+
});
|
|
922
465
|
//#endregion
|
|
923
|
-
//#region src/
|
|
924
|
-
const
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
duration: { ...designTokens.duration },
|
|
932
|
-
easing: { ...designTokens.easing },
|
|
933
|
-
font: {
|
|
934
|
-
family: {
|
|
935
|
-
default: "InterVariable, Helvetica, Arial, sans-serif",
|
|
936
|
-
monospace: designTokens.font.family.monospace
|
|
937
|
-
},
|
|
938
|
-
size: designTokens.font.size,
|
|
939
|
-
weight: Object.fromEntries(Object.entries(designTokens.font.weight).map(([key, value]) => [key, Number(value)]))
|
|
940
|
-
},
|
|
941
|
-
shadow: { ...designTokens.shadow },
|
|
942
|
-
spacing: { ...designTokens.spacing },
|
|
943
|
-
zIndex: {
|
|
944
|
-
ModalCloseButton: zIndex1,
|
|
945
|
-
Backdrop: zIndex2,
|
|
946
|
-
ActionModal: zIndex3,
|
|
947
|
-
FullScreenModal: zIndex3,
|
|
948
|
-
RangeSelector: zIndex5,
|
|
949
|
-
MenuComponent: zIndex5,
|
|
950
|
-
Toast: zIndex5,
|
|
951
|
-
Tooltip: zIndex5,
|
|
952
|
-
BackdropElevated: zIndex5
|
|
953
|
-
},
|
|
954
|
-
button: { borderRadius: "4px" },
|
|
955
|
-
buttonGroup: { gap: "16px" },
|
|
956
|
-
headline: {
|
|
957
|
-
family: designTokens.font.family,
|
|
958
|
-
headline1: { weight: designTokens.font.weight.bold },
|
|
959
|
-
headline2: { weight: designTokens.font.weight.medium },
|
|
960
|
-
headline3: { weight: designTokens.font.weight.bold }
|
|
961
|
-
},
|
|
962
|
-
paper: {
|
|
963
|
-
elevation0: designTokens.shadow.elevation0,
|
|
964
|
-
elevation1: designTokens.shadow.elevation1,
|
|
965
|
-
elevation2: designTokens.shadow.elevation2
|
|
966
|
-
}
|
|
967
|
-
};
|
|
466
|
+
//#region src/components/Icon/icons/CaretDownIcon.tsx
|
|
467
|
+
const CaretDownIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
468
|
+
...props,
|
|
469
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
470
|
+
d: "m2.68581 7.2381c.52393-.57331 1.39057-.64667 2.00074-.19312l.11843.09775 7.19402 6.57527 7.196-6.57527c.5733-.52393 1.443-.51915 2.01-.01262l.1092.10799c.5239.57331.5191 1.44304.0126 2.01l-.108.10918-8.2069 7.50002c-.5348.4887-1.3351.5213-1.9053.0977l-.1185-.0977-8.20691-7.50002c-.61154-.55886-.65424-1.50764-.09538-2.11918z",
|
|
471
|
+
fill: "currentColor"
|
|
472
|
+
})
|
|
473
|
+
});
|
|
968
474
|
//#endregion
|
|
969
|
-
//#region src/
|
|
970
|
-
const
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
}
|
|
475
|
+
//#region src/components/Icon/icons/CaretLeftIcon.tsx
|
|
476
|
+
const CaretLeftIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
477
|
+
...props,
|
|
478
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
479
|
+
d: "m16.7619 2.68582c.5733.52393.6467 1.39057.1931 2.00074l-.0977.11844-6.5753 7.194 6.5753 7.196c.5239.5733.5191 1.443.0126 2.01l-.108.1092c-.5733.5239-1.443.5191-2.01.0126l-.1092-.108-7.49998-8.2069c-.48873-.5348-.52131-1.3351-.09775-1.9053l.09775-.1185 7.49998-8.2069c.5589-.61153 1.5077-.65423 2.1192-.09538z",
|
|
480
|
+
fill: "currentColor"
|
|
481
|
+
})
|
|
482
|
+
});
|
|
976
483
|
//#endregion
|
|
977
|
-
//#region src/
|
|
978
|
-
const
|
|
979
|
-
|
|
980
|
-
|
|
484
|
+
//#region src/components/Icon/icons/CaretRightIcon.tsx
|
|
485
|
+
const CaretRightIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
486
|
+
...props,
|
|
487
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
488
|
+
d: "m7.23808 21.3142c-.57331-.524-.64667-1.3906-.19312-2.0008l.09774-.1184 6.5753-7.194-6.57529-7.196c-.52393-.57331-.51915-1.44303-.01262-2.01l.10799-.10917c.57331-.52393 1.44303-.51915 2.01-.01262l.10917.10799 7.50005 8.2069c.4887.5348.5213 1.3351.0977 1.9053l-.0977.1185-7.50004 8.2069c-.55886.6115-1.50765.6542-2.11918.0954z",
|
|
489
|
+
fill: "currentColor"
|
|
490
|
+
})
|
|
491
|
+
});
|
|
981
492
|
//#endregion
|
|
982
|
-
//#region src/
|
|
983
|
-
const
|
|
493
|
+
//#region src/components/Icon/icons/CaretUpIcon.tsx
|
|
494
|
+
const CaretUpIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
495
|
+
...props,
|
|
496
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
497
|
+
d: "m21.3141 16.7619c-.5239.5733-1.3905.6467-2.0007.1931l-.1184-.0977-7.194-6.5753-7.19602 6.5753c-.57331.5239-1.44304.5191-2.01.0126l-.10918-.108c-.52393-.5733-.51915-1.443-.01261-2.01l.10798-.1092 8.20683-7.49998c.5348-.48873 1.3352-.52131 1.9054-.09775l.1184.09775 8.207 7.49998c.6115.5589.6542 1.5077.0953 2.1192z",
|
|
498
|
+
fill: "currentColor"
|
|
499
|
+
})
|
|
500
|
+
});
|
|
984
501
|
//#endregion
|
|
985
|
-
//#region src/
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
*/
|
|
989
|
-
|
|
502
|
+
//#region src/components/Icon/icons/ChannelIcon.tsx
|
|
503
|
+
const ChannelIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
504
|
+
...props,
|
|
505
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
506
|
+
clipRule: "evenodd",
|
|
507
|
+
d: "m5.64571 1.19092c-.44678-.324663-1.07216-.225666-1.39682.22112-.32466.44678-.22567 1.07215.22111 1.39682 1.28625.93467 2.48092 2.19849 3.54704 3.39817-1.62947-.00332-2.92814.02027-3.46778.08086-1.98082.22241-2.2359 1.3046-2.45624 2.97122-.22035 1.66659.01731 8.61489.2821 10.20679s1.03019 2.2578 3.23903 2.2185c1.36389-.0243 5.14395.102 8.22435.2049 1.9081.0637 3.5484.1185 4.1789.123l.0126.0001c1.6426.0116 2.973.0211 3.5839-1.2509.6125-1.2752.3643-9.5706.2662-11.15071-.0982-1.58008-.6322-2.71681-1.8871-2.99303-.4032-.08875-1.9372-.17748-3.8995-.24967.9793-1.0846 2.1361-2.34437 3.5284-3.63478.405-.37542.4291-1.00813.0536-1.41319-.3754-.405062-1.0081-.429086-1.4132-.05366-1.61 1.49224-2.9274 2.95491-3.9684 4.11064-.1937.21508-.3778.41955-.5525.61158-.0947.10407-.1859.20373-.2738.29896-.9155-.02314-1.8546-.0422-2.7663-.056-.1596-.18054-.3281-.37314-.5061-.57663l-.1089-.12441c-1.18229-1.35084-2.71275-3.08411-4.44059-4.33968zm9.86039 12.42148c-1.0777 1.4126-4.8912 3.6285-6.16234 4.3486-.19344.1108-.41451-.0277-.41451-.2493 0-1.468 0-5.9827.05527-7.4507 0-.1939.22107-.3324.4145-.2216l6.02418 3.1576c.1382.0831.1934.2769.0829.4154z",
|
|
508
|
+
fill: "currentColor",
|
|
509
|
+
fillRule: "evenodd"
|
|
510
|
+
})
|
|
511
|
+
});
|
|
990
512
|
//#endregion
|
|
991
|
-
//#region src/
|
|
992
|
-
const
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
}));
|
|
1002
|
-
window.addEventListener("resize", handleResize);
|
|
1003
|
-
return () => window.removeEventListener("resize", handleResize);
|
|
1004
|
-
}, [interval]);
|
|
1005
|
-
return dimensions;
|
|
1006
|
-
};
|
|
513
|
+
//#region src/components/Icon/icons/CheckmarkCircleIcon.tsx
|
|
514
|
+
const CheckmarkCircleIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
515
|
+
...props,
|
|
516
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
517
|
+
clipRule: "evenodd",
|
|
518
|
+
d: "m21.8158 14.5648c3.0982-10.94829-8.8224-15.41821-15.39746-10.85188-4.65388 3.23212-6.673329 10.24658-3.15895 14.34028 3.51439 4.0936 15.45811 7.4598 18.55641-3.4884zm-4.1007-5.8658c.3861-.39496.3788-1.02808-.0161-1.41413-.395-.38604-1.0281-.37882-1.4141.01613l-6.127 6.2684-2.44277-2.4992c-.38605-.3949-1.01917-.4021-1.41413-.0161-.39495.3861-.40217 1.0192-.01612 1.4141l3.15789 3.2308c.18815.1925.44596.301.71513.301.2692 0 .527-.1085.7151-.301z",
|
|
519
|
+
fill: "currentColor",
|
|
520
|
+
fillRule: "evenodd"
|
|
521
|
+
})
|
|
522
|
+
});
|
|
1007
523
|
//#endregion
|
|
1008
|
-
//#region src/
|
|
1009
|
-
const
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
isXlAndDown: true
|
|
1024
|
-
};
|
|
1025
|
-
};
|
|
524
|
+
//#region src/components/Icon/icons/CheckmarkCircleOutlineIcon.tsx
|
|
525
|
+
const CheckmarkCircleOutlineIcon = ({ ...props }) => /* @__PURE__ */ jsxs("svg", {
|
|
526
|
+
...props,
|
|
527
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
528
|
+
clipRule: "evenodd",
|
|
529
|
+
d: "M11.25 2.5C6.41751 2.5 2.5 6.41751 2.5 11.25C2.5 16.0825 6.41751 20 11.25 20C16.0825 20 20 16.0825 20 11.25C20 6.41751 16.0825 2.5 11.25 2.5ZM0 11.25C0 5.0368 5.0368 0 11.25 0C17.4632 0 22.5 5.0368 22.5 11.25C22.5 17.4632 17.4632 22.5 11.25 22.5C5.0368 22.5 0 17.4632 0 11.25Z",
|
|
530
|
+
fill: "currentColor",
|
|
531
|
+
fillRule: "evenodd"
|
|
532
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
533
|
+
clipRule: "evenodd",
|
|
534
|
+
d: "M17.1237 7.35609C17.6174 7.83865 17.6265 8.63005 17.1439 9.12374L10.3018 16.1237C10.0666 16.3644 9.74436 16.5 9.4079 16.5C9.07143 16.5 8.74918 16.3644 8.51399 16.1237L5.35609 12.893C4.87354 12.3993 4.88256 11.6079 5.37626 11.1253C5.86995 10.6428 6.66135 10.6518 7.14391 11.1455L9.4079 13.4617L15.3561 7.37626C15.8386 6.88256 16.6301 6.87354 17.1237 7.35609Z",
|
|
535
|
+
fill: "currentColor",
|
|
536
|
+
fillRule: "evenodd"
|
|
537
|
+
})]
|
|
538
|
+
});
|
|
1026
539
|
//#endregion
|
|
1027
|
-
//#region src/components/
|
|
1028
|
-
const
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
minWidth: "352px",
|
|
1036
|
-
width: "400px"
|
|
1037
|
-
};
|
|
1038
|
-
const toastMobileWidth = { width: `calc(100% - ${toastPositionOffset * 2}px)` };
|
|
1039
|
-
const ToastAnimation = ({ children, in: inProp, renderInPlace }) => {
|
|
1040
|
-
const { isSmAndUp } = useMq();
|
|
1041
|
-
const { duration, zIndex } = useTheme();
|
|
1042
|
-
const durationInSeconds = Number.parseInt(duration.expressive.fast, 10) / 1e3;
|
|
1043
|
-
const toastStyle = {
|
|
1044
|
-
...toastPositionStyles,
|
|
1045
|
-
...isSmAndUp ? toastWidth : toastMobileWidth,
|
|
1046
|
-
willChange: "auto",
|
|
1047
|
-
zIndex: zIndex.Toast
|
|
1048
|
-
};
|
|
1049
|
-
if (renderInPlace) return /* @__PURE__ */ jsx(Fragment, { children });
|
|
1050
|
-
return /* @__PURE__ */ jsx(AnimatePresence, { children: inProp ? /* @__PURE__ */ jsx(motion.div, {
|
|
1051
|
-
animate: {
|
|
1052
|
-
opacity: 1,
|
|
1053
|
-
y: "0%"
|
|
1054
|
-
},
|
|
1055
|
-
exit: {
|
|
1056
|
-
opacity: 0,
|
|
1057
|
-
y: "100%"
|
|
1058
|
-
},
|
|
1059
|
-
initial: {
|
|
1060
|
-
opacity: 0,
|
|
1061
|
-
y: "100%"
|
|
1062
|
-
},
|
|
1063
|
-
style: toastStyle,
|
|
1064
|
-
transition: { duration: durationInSeconds },
|
|
1065
|
-
children
|
|
1066
|
-
}) : null });
|
|
1067
|
-
};
|
|
540
|
+
//#region src/components/Icon/icons/CheckmarkCircleThreeQuartersIcon.tsx
|
|
541
|
+
const CheckmarkCircleThreeQuartersIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
542
|
+
...props,
|
|
543
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
544
|
+
d: "m5.06066 10.1406c1.02693-3.83255 4.96634-6.10695 8.79884-5.08003.8844.23699 1.7935-.28787 2.0305-1.1723.237-.88444-.2879-1.79352-1.1723-2.0305-5.60142-1.500892-11.35896 1.82322-12.85985 7.42462-1.500884 5.60141 1.82323 11.35891 7.42463 12.85981 5.60142 1.5009 11.35892-1.8232 12.85982-7.4246.237-.8844-.2879-1.7935-1.1723-2.0305s-1.7935.2879-2.0305 1.1723c-1.0269 3.8325-4.9663 6.1069-8.7988 5.08-3.83257-1.0269-6.10696-4.9663-5.08004-8.7988zm16.57534-2.98696c.6582-.63651.6758-1.68609.0392-2.34429-.6365-.65821-1.686-.67579-2.3442-.03928l-7.5698 7.32023-2.17928-2.46975c-.60581-.68657-1.65349-.75203-2.34005-.14621-.68656.60576-.75202 1.65346-.14621 2.34006l2.94474 3.3372c.8339.9451 2.2881 1.0027 3.1942.1265z",
|
|
545
|
+
fill: "currentColor"
|
|
546
|
+
})
|
|
547
|
+
});
|
|
1068
548
|
//#endregion
|
|
1069
|
-
//#region src/
|
|
1070
|
-
const
|
|
1071
|
-
if (!colors.hasOwnProperty(colorName)) throw new Error(`\`${String(colorName)}\` is not a defined theme color, check argument passed to \`useThemeColor\``);
|
|
1072
|
-
return colors[colorName];
|
|
1073
|
-
};
|
|
1074
|
-
const useThemeColor = (colorName = null) => {
|
|
1075
|
-
const colors = useTheme().color;
|
|
1076
|
-
if (!Object.keys({ ...colors }).length) throw new Error("The `useThemeColor` hook could not find any defined colors. A possible cause of this error is that your component is not wrapped in a theme provider such as `<VHSProvider />`");
|
|
1077
|
-
if (colorName === null) return colors;
|
|
1078
|
-
if (Array.isArray(colorName)) return colorName.map((color) => getColor(colors, color));
|
|
1079
|
-
return getColor(colors, colorName);
|
|
1080
|
-
};
|
|
1081
|
-
//#endregion
|
|
1082
|
-
//#region src/components/Icon/iconMap.ts
|
|
1083
|
-
const iconMap$1 = {
|
|
1084
|
-
"ab-test": "AbTestIcon",
|
|
1085
|
-
"all-content": "AllContentIcon",
|
|
1086
|
-
archived: "ArchivedIcon",
|
|
1087
|
-
"arrow-down": "ArrowDownIcon",
|
|
1088
|
-
"arrow-left": "ArrowLeftIcon",
|
|
1089
|
-
"arrow-right": "ArrowRightIcon",
|
|
1090
|
-
"arrow-up": "ArrowUpIcon",
|
|
1091
|
-
asterisk: "AsteriskIcon",
|
|
1092
|
-
audience: "AudienceIcon",
|
|
1093
|
-
calendar: "CalendarIcon",
|
|
1094
|
-
camera: "CameraIcon",
|
|
1095
|
-
"caret-down": "CaretDownIcon",
|
|
1096
|
-
"caret-left": "CaretLeftIcon",
|
|
1097
|
-
"caret-right": "CaretRightIcon",
|
|
1098
|
-
"caret-up": "CaretUpIcon",
|
|
1099
|
-
channel: "ChannelIcon",
|
|
1100
|
-
checkmark: "CheckmarkIcon",
|
|
1101
|
-
"checkmark-circle": "CheckmarkCircleIcon",
|
|
1102
|
-
"checkmark-circle-outline": "CheckmarkCircleOutlineIcon",
|
|
1103
|
-
"checkmark-circle-three-quarters": "CheckmarkCircleThreeQuartersIcon",
|
|
1104
|
-
"checkmark-underlined": "CheckmarkUnderlinedIcon",
|
|
1105
|
-
close: "CloseIcon",
|
|
1106
|
-
"close-circle": "CloseCircleIcon",
|
|
1107
|
-
"collect-video": "CollectVideoIcon",
|
|
1108
|
-
collection: "CollectionIcon",
|
|
1109
|
-
comment: "CommentIcon",
|
|
1110
|
-
community: "CommunityIcon",
|
|
1111
|
-
"contact-us": "ContactUsIcon",
|
|
1112
|
-
copy: "CopyIcon",
|
|
1113
|
-
"copy-disabled": "CopyDisabledIcon",
|
|
1114
|
-
create: "CreateIcon",
|
|
1115
|
-
delete: "DeleteIcon",
|
|
1116
|
-
"delete-sm": "DeleteSmIcon",
|
|
1117
|
-
"dottie-clock": "DottieClockIcon",
|
|
1118
|
-
download: "DownloadIcon",
|
|
1119
|
-
draggable: "DraggableIcon",
|
|
1120
|
-
edit: "PencilIcon",
|
|
1121
|
-
ellipsis: "EllipsisIcon",
|
|
1122
|
-
"ellipsis-vertical": "EllipsisVerticalIcon",
|
|
1123
|
-
embed: "EmbedIcon",
|
|
1124
|
-
episodes: "EpisodesIcon",
|
|
1125
|
-
error: "TriangleIcon",
|
|
1126
|
-
expand: "ExpandIcon",
|
|
1127
|
-
export: "DownloadIcon",
|
|
1128
|
-
favorite: "FavoriteIcon",
|
|
1129
|
-
"favorite-outline": "FavoriteOutlineIcon",
|
|
1130
|
-
filter: "FilterIcon",
|
|
1131
|
-
gear: "GearIcon",
|
|
1132
|
-
"getting-started": "GettingStartedIcon",
|
|
1133
|
-
globe: "GlobeIcon",
|
|
1134
|
-
"grid-view": "GridViewIcon",
|
|
1135
|
-
"group-record": "GroupRecordIcon",
|
|
1136
|
-
hamburger: "HamburgerIcon",
|
|
1137
|
-
hazard: "HazardIcon",
|
|
1138
|
-
"help-center": "HelpCenterIcon",
|
|
1139
|
-
hide: "HideIcon",
|
|
1140
|
-
home: "HomeIcon",
|
|
1141
|
-
hourglass: "HourglassIcon",
|
|
1142
|
-
import: "ImportIcon",
|
|
1143
|
-
info: "InfoIcon",
|
|
1144
|
-
integrations: "IntegrationsIcon",
|
|
1145
|
-
invite: "InviteIcon",
|
|
1146
|
-
"invite-to-record": "InviteToRecordIcon",
|
|
1147
|
-
"lightning-bolt": "LightningBoltIcon",
|
|
1148
|
-
link: "LinkIcon",
|
|
1149
|
-
"list-view": "ListViewIcon",
|
|
1150
|
-
live: "LiveIcon",
|
|
1151
|
-
lock: "LockIcon",
|
|
1152
|
-
logout: "LogoutIcon",
|
|
1153
|
-
media: "MediaIcon",
|
|
1154
|
-
megaphone: "MegaphoneIcon",
|
|
1155
|
-
"more-options": "MoreOptionsIcon",
|
|
1156
|
-
"open-new": "OpenNewIcon",
|
|
1157
|
-
overview: "OverviewIcon",
|
|
1158
|
-
paint: "PaintIcon",
|
|
1159
|
-
pencil: "PencilIcon",
|
|
1160
|
-
play: "PlayIcon",
|
|
1161
|
-
playlist: "PlaylistIcon",
|
|
1162
|
-
podcast: "PodcastIcon",
|
|
1163
|
-
preview: "PreviewIcon",
|
|
1164
|
-
"private-user-sessions": "PrivateUserSessionsIcon",
|
|
1165
|
-
project: "ProjectIcon",
|
|
1166
|
-
"question-mark": "QuestionMarkIcon",
|
|
1167
|
-
react: "ReactIcon",
|
|
1168
|
-
record: "RecordIcon",
|
|
1169
|
-
redo: "RedoIcon",
|
|
1170
|
-
"remove-from-channel": "RemoveFromChannelIcon",
|
|
1171
|
-
replace: "ReplaceIcon",
|
|
1172
|
-
reply: "ReplyIcon",
|
|
1173
|
-
"save-copy": "CopyIcon",
|
|
1174
|
-
scissors: "ScissorsIcon",
|
|
1175
|
-
search: "SearchIcon",
|
|
1176
|
-
send: "SendIcon",
|
|
1177
|
-
settings: "SettingsIcon",
|
|
1178
|
-
share: "ShareIcon",
|
|
1179
|
-
soapbox: "SoapboxIcon",
|
|
1180
|
-
sort: "SortIcon",
|
|
1181
|
-
sparkle: "SparkleIcon",
|
|
1182
|
-
spinner: "SpinnerIcon",
|
|
1183
|
-
stats: "StatsIcon",
|
|
1184
|
-
"switch-accounts": "SwitchAccountsIcon",
|
|
1185
|
-
tag: "TagIcon",
|
|
1186
|
-
team: "TeamIcon",
|
|
1187
|
-
"thumbs-down": "ThumbsDownIcon",
|
|
1188
|
-
"thumbs-up": "ThumbsUpIcon",
|
|
1189
|
-
triangle: "TriangleIcon",
|
|
1190
|
-
undo: "UndoIcon",
|
|
1191
|
-
unlock: "UnlockIcon",
|
|
1192
|
-
upload: "UploadIcon",
|
|
1193
|
-
"users-permissions": "UsersPermissionsIcon",
|
|
1194
|
-
"view-stream": "ViewStreamIcon",
|
|
1195
|
-
wand: "WandIcon",
|
|
1196
|
-
"zoom-in": "ZoomInIcon",
|
|
1197
|
-
"zoom-out": "ZoomOutIcon"
|
|
1198
|
-
};
|
|
1199
|
-
//#endregion
|
|
1200
|
-
//#region src/components/Icon/icons/AbTestIcon.tsx
|
|
1201
|
-
const AbTestIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
549
|
+
//#region src/components/Icon/icons/CheckmarkIcon.tsx
|
|
550
|
+
const CheckmarkIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1202
551
|
...props,
|
|
1203
552
|
children: /* @__PURE__ */ jsx("path", {
|
|
1204
|
-
d: "
|
|
553
|
+
d: "m8.79289 18.7054-6.50001-6.5374c-.39051-.3927-.39051-1.0295 0-1.4223l1.41418-1.42238c.39051-.39279 1.02371-.39279 1.41422 0l4.37872 4.40388 9.3787-9.43263c.3905-.39276 1.0237-.39276 1.4142 0l1.4142 1.42235c.3905.39275.3905 1.02956 0 1.42235l-11.5 11.56613c-.39054.3928-1.0237.3928-1.41421 0z",
|
|
1205
554
|
fill: "currentColor"
|
|
1206
555
|
})
|
|
1207
556
|
});
|
|
1208
557
|
//#endregion
|
|
1209
|
-
//#region src/components/Icon/icons/
|
|
1210
|
-
const
|
|
558
|
+
//#region src/components/Icon/icons/CheckmarkUnderlinedIcon.tsx
|
|
559
|
+
const CheckmarkUnderlinedIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1211
560
|
...props,
|
|
1212
561
|
children: /* @__PURE__ */ jsx("path", {
|
|
1213
|
-
d: "
|
|
562
|
+
d: "M9.54401 12.95L17.994 4.49995C18.194 4.29995 18.4315 4.19995 18.7065 4.19995C18.9815 4.19995 19.219 4.29995 19.419 4.49995C19.619 4.69995 19.719 4.93745 19.719 5.21245C19.719 5.48745 19.619 5.72495 19.419 5.92495L10.244 15.1C10.044 15.3 9.81067 15.4 9.54401 15.4C9.27734 15.4 9.04401 15.3 8.84401 15.1L4.56901 10.825C4.36901 10.625 4.27317 10.3875 4.28151 10.1125C4.28984 9.83745 4.39401 9.59995 4.59401 9.39995C4.79401 9.19995 5.03151 9.09995 5.30651 9.09995C5.58151 9.09995 5.81901 9.19995 6.01901 9.39995L9.54401 12.95ZM5.99401 19.8C5.71067 19.8 5.47317 19.7041 5.28151 19.5125C5.08984 19.3208 4.99401 19.0833 4.99401 18.8C4.99401 18.5166 5.08984 18.2791 5.28151 18.0875C5.47317 17.8958 5.71067 17.8 5.99401 17.8H17.994C18.2773 17.8 18.5148 17.8958 18.7065 18.0875C18.8982 18.2791 18.994 18.5166 18.994 18.8C18.994 19.0833 18.8982 19.3208 18.7065 19.5125C18.5148 19.7041 18.2773 19.8 17.994 19.8H5.99401Z",
|
|
1214
563
|
fill: "currentColor"
|
|
1215
564
|
})
|
|
1216
565
|
});
|
|
1217
566
|
//#endregion
|
|
1218
|
-
//#region src/components/Icon/icons/
|
|
1219
|
-
const
|
|
567
|
+
//#region src/components/Icon/icons/CloseCircleIcon.tsx
|
|
568
|
+
const CloseCircleIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1220
569
|
...props,
|
|
1221
570
|
children: /* @__PURE__ */ jsx("path", {
|
|
1222
571
|
clipRule: "evenodd",
|
|
1223
|
-
d: "
|
|
1224
|
-
fill: "currentColor"
|
|
572
|
+
d: "M13.8186 20.4731C4.60239 22.893 -2.98829 15.5818 3.31523 6.74072C9.6261 -2.10038 19.5705 4.8504 21.402 9.84467C23.2334 14.8389 19.0556 19.105 13.8186 20.4731Z \n M15.0413 8.87414C15.4318 8.48355 15.4318 7.85028 15.0413 7.45969C14.6508 7.0691 14.0178 7.0691 13.6273 7.45969L11.0001 10.0878L8.37284 7.4597C7.98238 7.06911 7.34932 7.06911 6.95886 7.4597C6.5684 7.85029 6.5684 8.48356 6.95886 8.87415L9.5861 11.5023L6.95886 14.1304C6.5684 14.5209 6.5684 15.1542 6.95886 15.5448C7.34932 15.9354 7.98238 15.9354 8.37284 15.5448L11.0001 12.9167L13.6273 15.5448C14.0178 15.9354 14.6508 15.9354 15.0413 15.5448C15.4318 15.1542 15.4318 14.521 15.0413 14.1304L12.4141 11.5023L15.0413 8.87414Z",
|
|
573
|
+
fill: "currentColor",
|
|
574
|
+
fillRule: "evenodd"
|
|
1225
575
|
})
|
|
1226
576
|
});
|
|
1227
577
|
//#endregion
|
|
1228
|
-
//#region src/components/Icon/icons/
|
|
1229
|
-
const
|
|
578
|
+
//#region src/components/Icon/icons/CloseIcon.tsx
|
|
579
|
+
const CloseIcon$1 = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1230
580
|
...props,
|
|
1231
581
|
children: /* @__PURE__ */ jsx("path", {
|
|
1232
|
-
d: "
|
|
582
|
+
d: "m17.7742 19.618c.5091.5093 1.3347.5093 1.8439 0 .5091-.5091.5091-1.3347 0-1.8438l-5.7742-5.7742 5.7742-5.77422c.5091-.50918.5091-1.3347 0-1.84387-.5092-.50917-1.3348-.50917-1.8439 0l-5.7742 5.77419-5.77426-5.77422c-.50917-.50917-1.33469-.50917-1.84387 0-.50916.50917-.50916 1.3347 0 1.84386l5.77423 5.77426-5.77421 5.7742c-.50918.5092-.50918 1.3347 0 1.8439.50916.5092 1.33469.5092 1.84385 0l5.77426-5.7742z",
|
|
1233
583
|
fill: "currentColor"
|
|
1234
584
|
})
|
|
1235
585
|
});
|
|
1236
586
|
//#endregion
|
|
1237
|
-
//#region src/components/Icon/icons/
|
|
1238
|
-
const
|
|
587
|
+
//#region src/components/Icon/icons/CollectVideoIcon.tsx
|
|
588
|
+
const CollectVideoIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1239
589
|
...props,
|
|
1240
590
|
children: /* @__PURE__ */ jsx("path", {
|
|
1241
|
-
|
|
591
|
+
clipRule: "evenodd",
|
|
592
|
+
d: "M12 6.85714H3V4.92857C3 3.864 3.864 3 4.92857 3H8.74072C9.17014 3 9.57257 3.21471 9.81043 3.57214L12 6.85714ZM3 6.85718H19.0714C20.136 6.85718 21 7.72118 21 8.78575V13.1438C20.9149 13.1202 20.8253 13.1077 20.7328 13.1077H13.3066L14.7071 11.7071C15.0976 11.3166 15.0976 10.6834 14.7071 10.2929C14.3166 9.90237 13.6834 9.90237 13.2929 10.2929L10.2929 13.2929C10.1054 13.4804 10 13.7348 10 14C10 14.2652 10.1054 14.5196 10.2929 14.7071L13.2929 17.7071C13.6834 18.0976 14.3166 18.0976 14.7071 17.7071C15.0976 17.3166 15.0976 16.6834 14.7071 16.2929L13.5219 15.1077H20.7328C20.8253 15.1077 20.9149 15.0951 21 15.0716V17.1429C21 19.272 19.272 21 17.1429 21H6.85714C4.728 21 3 19.272 3 17.1429V6.85718Z",
|
|
593
|
+
fill: "currentColor",
|
|
594
|
+
fillRule: "evenodd"
|
|
595
|
+
})
|
|
596
|
+
});
|
|
597
|
+
//#endregion
|
|
598
|
+
//#region src/components/Icon/icons/CommentIcon.tsx
|
|
599
|
+
const CommentIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
600
|
+
...props,
|
|
601
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
602
|
+
clipRule: "evenodd",
|
|
603
|
+
d: "M2.0994 10.6931C2.04002 8.22692 1.96942 5.29509 2.11584 4.25593C2.13365 4.13216 2.14292 4.01528 2.1517 3.90469C2.21613 3.09248 2.25369 2.61894 5.44865 2.23843C9.48199 1.75807 17.1241 1.99825 20.9452 3.007C21.7385 3.21574 21.7461 3.55147 21.7624 4.26645C21.7648 4.37414 21.7675 4.49044 21.773 4.6162C21.8367 5.57691 22.0066 10.2604 21.9641 11.7255C21.9538 12.0123 21.9535 12.4616 21.9532 13.001V13.001C21.9522 14.6749 21.9507 17.2153 21.6457 18.4505C21.4546 19.2671 20.0748 19.2911 18.9073 19.171C18.4972 19.1289 17.0813 19.0734 15.3164 19.0193C14.4586 19.7428 13.2551 20.8268 12.6703 21.669C12.4667 21.9623 12.1951 22 11.9708 22C11.7566 22 11.6986 21.9343 11.3756 21.5684L11.3281 21.5147C10.6506 20.7484 9.58149 19.5267 9.00085 18.8624C7.74516 18.8383 6.69432 18.8234 6.10233 18.8234C3.78846 18.8234 2.85054 18.5199 2.51089 18.1837C2.02619 17.7038 2.08219 16.014 2.13647 14.3759L2.14543 14.1031C2.16606 13.462 2.13471 12.1599 2.0994 10.6931ZM4.33635 7.16713C4.33635 7.16713 3.83065 8.24157 4.01326 8.52809C4.14949 8.74182 8.25659 8.84926 10.9526 8.91979L10.9527 8.91979C11.8709 8.94381 12.6253 8.96354 13.0036 8.98174C14.1695 9.05337 17.7376 8.83848 19.2126 8.74298C19.24 8.74161 19.2672 8.74047 19.2943 8.73935C19.7381 8.72089 20.1152 8.7052 19.943 7.69241C19.9149 7.5014 19.8166 7.38202 19.634 7.38202C19.044 7.38202 9.89913 7.38202 7.90439 7.191L7.64546 7.16615C5.81529 6.99024 4.8063 6.89326 4.33635 7.16713ZM19.8977 11.4732C20.0908 11.7527 19.6254 12.8452 19.6254 12.8452C19.166 13.1363 18.1541 13.0769 16.3186 12.9692C16.2338 12.9642 16.1473 12.9591 16.059 12.9539C14.0586 12.8372 4.92114 13.177 4.33049 13.199L4.33037 13.199C4.14788 13.2058 4.04518 13.0901 4.01001 12.9003C3.80035 11.8946 4.17656 11.8649 4.61942 11.83C4.64638 11.8278 4.67359 11.8257 4.70093 11.8233C6.17134 11.673 9.72893 11.3257 10.8967 11.3539C11.2754 11.3581 12.0301 11.3498 12.9486 11.3396C15.6454 11.3099 19.7536 11.2646 19.8977 11.4732Z",
|
|
604
|
+
fill: "currentColor",
|
|
605
|
+
fillRule: "evenodd"
|
|
606
|
+
})
|
|
607
|
+
});
|
|
608
|
+
//#endregion
|
|
609
|
+
//#region src/components/Icon/icons/CommunityIcon.tsx
|
|
610
|
+
const CommunityIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
611
|
+
...props,
|
|
612
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
613
|
+
d: "m14.8307 3.14077c.3645.16757.686.31534.9541.40981l.0186.00652c1.2355.43528 5.3747 1.89346 6.0303 4.36204.5612 2.11356-.3999 4.17296-1.3677 6.24656-.1682.3606-.3367.7217-.4975 1.0835-.0379.0854-.0756.1704-.1132.255-1.4657 3.3022-2.6018 5.8617-4.6582 6.3731-2.1092.5247-5.1606-.7312-7.71054-1.9147-.05102-.0244-.10251-.0491-.15441-.0738-1.99154-.951-4.60465-2.1987-5.20489-4.1987-.61588-2.0523 1.14517-6.02627 2.25161-7.92519.20562-.35289.40011-.72469.59807-1.10314.86724-1.65795 1.80113-3.44328 4.02973-4.32392 2.19233-.86633 4.35703.12865 5.82403.80292zm-2.2269 2.13686c-.5027-.24679-1.1143-.04716-1.366.44591l-.6538 1.281-1.30983-.64294c-.50277-.24679-1.11436-.04714-1.36603.44591-.25167.49306-.04812 1.09282.45465 1.33961l1.3098.64293-1.50554 2.94955-1.44199-.7078c-.50276-.2468-1.11435-.0471-1.36602.4459-.25167.4931-.04812 1.0928.45465 1.3396l1.44198.7078-.77998 1.5281c-.25167.4931-.04812 1.0929.45464 1.3396.50277.2468 1.11436.0472 1.36603-.4459l.77999-1.5281 2.98935 1.4674-.7622 1.4931c-.2517.4931-.0481 1.0929.4547 1.3397.5027.2467 1.1143.0471 1.366-.446l.7622-1.4931 1.4413.7075c.5028.2468 1.1144.0471 1.366-.446.2517-.4929.0482-1.0928-.4546-1.3396l-1.4414-.7074 1.5055-2.9496 1.5735.7724c.5028.2468 1.1144.0472 1.3661-.4459.2516-.4931.0481-1.0928-.4546-1.3396l-1.5736-.7724.6717-1.31597c.2518-.49306.0482-1.09282-.4546-1.33961-.5027-.24679-1.1143-.04715-1.366.4459l-.6718 1.31598-2.9892-1.46736.6538-1.281c.2517-.49306.0481-1.09283-.4547-1.33961zm1.8788 5.87347-1.5055 2.9496-2.98937-1.4674 1.50557-2.94954z",
|
|
1242
614
|
fill: "currentColor"
|
|
1243
615
|
})
|
|
1244
616
|
});
|
|
1245
617
|
//#endregion
|
|
1246
|
-
//#region src/components/Icon/icons/
|
|
1247
|
-
const
|
|
618
|
+
//#region src/components/Icon/icons/ContactUsIcon.tsx
|
|
619
|
+
const ContactUsIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1248
620
|
...props,
|
|
1249
621
|
children: /* @__PURE__ */ jsx("path", {
|
|
1250
|
-
d: "
|
|
622
|
+
d: "m2 7.13053c1.02794.75462 2.30848 1.82137 3.61006 2.90567 0 0 5.06424 3.9629 5.81564 3.9629 1.8549 0 3.7992-1.8146 5.1678-2.8746 1.3176-1.0205 2.7467-2.21282 4.0625-3.31055.1651-.13774.3285-.27408.4895-.40831-.0011.22999.0035.44719.0315.64131.3947 2.63975.4326 8.17435 0 11.09695-.3145.4144-.8493.9882-3.0513.8288s-11.82778-.2869-12.92877-.2231c-1.101.0637-2.39073-.0638-2.61093-1.1158-.40264-1.7682-.5511-8.74247-.586-11.50327zm16.4311-2.99936c1.2812.09529 1.9619.48357 2.322 1.00077-.4574.37757-.9338.77506-1.4207 1.18138-1.2989 1.0838-2.6732 2.23056-3.9636 3.22999-.9655.74789-1.8517 1.38729-2.5896 1.83539-.3691.2242-.6815.3884-.9342.4939-.2367.0989-.3632.1358-.5917.0084-.2306-.1286-.5322-.3283-.8998-.5958-.73248-.5331-1.63926-1.2708-2.61739-2.08202-.26991-.22385-.54604-.45404-.8253-.68686-.21657-.18055-.43504-.36268-.65398-.54466l-.65679-.54374c-1.20143-.98965-2.37365-1.92213-3.27827-2.50838.22838-.42619.59195-.78832 1.14091-.78831 1.57531.00002 3.21902-.03191 4.885-.06428 3.39902-.06604 6.89072-.13388 10.08342.06422z",
|
|
1251
623
|
fill: "currentColor"
|
|
1252
624
|
})
|
|
1253
625
|
});
|
|
1254
626
|
//#endregion
|
|
1255
|
-
//#region src/components/Icon/icons/
|
|
1256
|
-
const
|
|
627
|
+
//#region src/components/Icon/icons/CopyDisabledIcon.tsx
|
|
628
|
+
const CopyDisabledIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1257
629
|
...props,
|
|
1258
630
|
children: /* @__PURE__ */ jsx("path", {
|
|
1259
|
-
d: "
|
|
631
|
+
d: "m23.7071 1.70711c.3905-.39053.3905-1.023692 0-1.414217-.3905-.3905241-1.0237-.3905241-1.4142 0l-22.000007 22.000007c-.3905238.3905-.3905242 1.0237 0 1.4142.390524.3905 1.023687.3905 1.414217 0zm-5.0845.29289c.1737 0 .3443.01298.5109.03803l-3.3066 3.30661h-8.21351c-.93263 0-1.68869-.74873-1.68869-1.67232 0-.92361.75606-1.67232 1.68869-1.67232zm-14.9339 4.94911h10.5338l-12.2225 12.22249v-10.55017c0-.92359.75605-1.67232 1.6887-1.67232zm13.5095 2.68113-12.36977 12.36976h10.68107c.9327 0 1.6887-.7487 1.6887-1.6723zm4.7671-4.76707-3.3427 3.34265v8.10658c0 .9235.756 1.6724 1.6887 1.6724s1.6887-.7489 1.6887-1.6724v-10.96776c0-.1635-.0118-.32425-.0347-.48147z",
|
|
1260
632
|
fill: "currentColor"
|
|
1261
633
|
})
|
|
1262
634
|
});
|
|
1263
635
|
//#endregion
|
|
1264
|
-
//#region src/components/Icon/icons/
|
|
1265
|
-
const
|
|
636
|
+
//#region src/components/Icon/icons/CopyIcon.tsx
|
|
637
|
+
const CopyIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1266
638
|
...props,
|
|
1267
639
|
children: /* @__PURE__ */ jsx("path", {
|
|
1268
|
-
d: "
|
|
640
|
+
d: "m18.6226 16.3124c0 .9235.756 1.6724 1.6887 1.6724s1.6887-.7489 1.6887-1.6724v-10.96776c0-1.8472-1.5122-3.34464-3.3774-3.34464h-11.00921c-.93263 0-1.68869.74871-1.68869 1.67232 0 .92359.75606 1.67232 1.68869 1.67232h11.00921zm-3.1131 5.6876c.9327 0 1.6887-.7487 1.6887-1.6723v-11.70627c0-.92359-.756-1.67232-1.6887-1.67232h-11.8208c-.93265 0-1.6887.74873-1.6887 1.67232v11.70627c0 .9236.75605 1.6723 1.6887 1.6723z",
|
|
1269
641
|
fill: "currentColor"
|
|
1270
642
|
})
|
|
1271
643
|
});
|
|
1272
644
|
//#endregion
|
|
1273
|
-
//#region src/components/Icon/icons/
|
|
1274
|
-
const
|
|
645
|
+
//#region src/components/Icon/icons/CreateIcon.tsx
|
|
646
|
+
const CreateIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1275
647
|
...props,
|
|
1276
648
|
children: /* @__PURE__ */ jsx("path", {
|
|
1277
|
-
d: "
|
|
649
|
+
d: "m10.3966 3.60341c0-.88553.7179-1.60341 1.6034-1.60341s1.6034.71788 1.6034 1.60341v6.79319h6.7932c.8856 0 1.6034.7179 1.6034 1.6034 0 .8856-.7178 1.6034-1.6034 1.6034h-6.7932v6.7932c0 .8856-.7179 1.6034-1.6034 1.6034s-1.6034-.7178-1.6034-1.6034v-6.7932h-6.7932c-.88554 0-1.6034-.7178-1.6034-1.6034 0-.8855.71786-1.6034 1.6034-1.6034h6.7932z",
|
|
1278
650
|
fill: "currentColor"
|
|
1279
651
|
})
|
|
1280
652
|
});
|
|
1281
653
|
//#endregion
|
|
1282
|
-
//#region src/components/Icon/icons/
|
|
1283
|
-
const
|
|
654
|
+
//#region src/components/Icon/icons/DeleteIcon.tsx
|
|
655
|
+
const DeleteIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1284
656
|
...props,
|
|
1285
657
|
children: /* @__PURE__ */ jsx("path", {
|
|
1286
|
-
|
|
1287
|
-
|
|
658
|
+
d: "m14.904 2.36857c.6808.18014 1.0637 1.89327 1.3326 3.11843 1.0626.02303 2.1802.06975 3.3652.15126.5509.0379.9669.51528.929 1.06626-.0379.55099-.5153.96692-1.0663.92902-3.2573-.22405-5.9961-.17824-8.5308-.1036-.3474.01023-.6918.02104-1.03385.03178-2.1416.06726-4.18778.13153-6.28166.02989-.55163-.02678-.97711-.49568-.95034-1.04731.02678-.55164.49568-.97712 1.04731-.95034 1.04212.05058 2.0709.0584 3.11959.04482.08961-.94493.83902-2.66045 1.49748-3.27021.72917-.67525 5.56337-.2668 6.57177 0zm-8.53971 18.93913c-.38411-1.7907-1.43613-8.7724-1.60784-10.1112-.01239-.0967-.02523-.1887-.03746-.2764-.1573-1.12763-.21516-1.5424 2.05023-1.84784 2.71293-.36579 9.32588-.45722 11.89608.31093.5336.15895.5387.4146.5496.95901.0017.082.0035.1706.0072.2664 0 2.8358-.6932 5.8331-1.3554 8.6963-.1564.6763-.3112 1.3453-.4546 2.0028-.1285.6219-1.0566.6401-1.842.5487-.7853-.0915-5.4362-.2926-6.99265-.2926-1.55635 0-1.98471 0-2.21316-.2561zm8.97891-9.2246c-.0298-.5515-.501-.9744-1.0525-.9446s-.9744.501-.9446 1.0525c.0309.5711-.027 1.5863-.123 2.7715-.0544.6721-.1166 1.3496-.1763 2.0013-.0459.5008-.0905.9868-.1291 1.4427-.0465.5504.3619 1.0342.9122 1.0807.5503.0466 1.0342-.3618 1.0807-.9122.0351-.4152.0789-.8939.1249-1.3962l.0002-.0017.0001-.0015c.0616-.6734.1271-1.3892.1808-2.0516.094-1.1611.166-2.312.1266-3.0409zm-5.56465 7.4093c.55025.0479 1.03505-.3594 1.08295-.9096.0632-.7272.0291-1.8798-.0269-3.0434-.0319-.6643-.0739-1.3823-.1135-2.0578-.0295-.504-.0576-.985-.0791-1.4014-.0285-.5516-.4987-.9756-1.05025-.9472-.55156.0285-.97562.4987-.94716 1.0502.02358.4571.05217.944.08167 1.4462.03835.653.07827 1.3328.11063 2.006.0571 1.1878.08163 2.2042.03206 2.7741-.04786.5502.3594 1.035.9096 1.0829z",
|
|
659
|
+
fill: "currentColor"
|
|
660
|
+
})
|
|
661
|
+
});
|
|
662
|
+
//#endregion
|
|
663
|
+
//#region src/components/Icon/icons/DeleteSmIcon.tsx
|
|
664
|
+
const DeleteSmIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
665
|
+
...props,
|
|
666
|
+
children: /* @__PURE__ */ jsxs("g", {
|
|
1288
667
|
fill: "currentColor",
|
|
1289
|
-
|
|
668
|
+
children: [/* @__PURE__ */ jsx("path", { d: "m9.05042 2c-.64391 0-1.23256.35667-1.52052.92132l-1.23015 2.41201h-1.59974c-.9389 0-1.70001.74619-1.70001 1.66667 0 .92047.76111 1.66667 1.70001 1.66667h14.59999c.9389 0 1.7-.7462 1.7-1.66667 0-.92048-.7611-1.66667-1.7-1.66667h-1.8003l-1.2301-2.41201c-.288-.56465-.8765-.92132-1.5205-.92132z" }), /* @__PURE__ */ jsx("path", { d: "m6.63212 10c-.9389 0-1.63212.7462-1.63212 1.6667v8.8333c0 .9205.36086 1.5 1.29975 1.5h11.19995c.9389 0 1.5003-.5795 1.5003-1.5l-.1-8.8333c0-.9205-.4611-1.6667-1.4-1.6667z" })]
|
|
1290
669
|
})
|
|
1291
670
|
});
|
|
1292
671
|
//#endregion
|
|
1293
|
-
//#region src/components/Icon/icons/
|
|
1294
|
-
const
|
|
672
|
+
//#region src/components/Icon/icons/DottieClockIcon.tsx
|
|
673
|
+
const DottieClockIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1295
674
|
...props,
|
|
1296
675
|
children: /* @__PURE__ */ jsx("path", {
|
|
1297
676
|
clipRule: "evenodd",
|
|
1298
|
-
d: "
|
|
677
|
+
d: "M10 18.8889C9.54004 18.8889 9.16671 18.5155 9.16671 18.0555C9.16671 17.5955 9.54004 17.2222 10 17.2222C13.9823 17.2222 17.2223 13.9822 17.2223 9.99997C17.2223 6.01775 13.9823 2.77775 10 2.77775C9.54004 2.77775 9.16671 2.40442 9.16671 1.94442C9.16671 1.48442 9.54004 1.11108 10 1.11108C14.9012 1.11108 18.8889 5.09886 18.8889 9.99997C18.8889 14.9011 14.9012 18.8889 10 18.8889ZM13.61 13.3333C13.4478 13.3333 13.2812 13.2855 13.1367 13.1855L9.5256 10.6855C9.30115 10.53 9.16671 10.2733 9.16671 9.99997V5.27775C9.16671 4.81775 9.54004 4.44442 10 4.44442C10.46 4.44442 10.8334 4.81775 10.8334 5.27775V9.56331L14.0856 11.8144C14.4645 12.0766 14.5589 12.5955 14.2956 12.9733C14.1334 13.2066 13.8745 13.3322 13.61 13.3322V13.3333ZM5.13676 15.6966C5.13676 16.1568 4.76366 16.5299 4.30343 16.5299C3.84319 16.5299 3.47009 16.1568 3.47009 15.6966C3.47009 15.2363 3.84319 14.8632 4.30343 14.8632C4.76366 14.8632 5.13676 15.2363 5.13676 15.6966ZM1.94442 10.8333C2.40465 10.8333 2.77775 10.4602 2.77775 9.99994C2.77775 9.5397 2.40465 9.16661 1.94442 9.16661C1.48418 9.16661 1.11108 9.5397 1.11108 9.99994C1.11108 10.4602 1.48418 10.8333 1.94442 10.8333ZM5.13676 4.30332C5.13676 4.76356 4.76366 5.13666 4.30343 5.13666C3.84319 5.13666 3.47009 4.76356 3.47009 4.30332C3.47009 3.84309 3.84319 3.46999 4.30343 3.46999C4.76366 3.46999 5.13676 3.84309 5.13676 4.30332ZM6.91777 18.2755C7.378 18.2755 7.7511 17.9024 7.7511 17.4422C7.7511 16.9819 7.378 16.6088 6.91777 16.6088C6.45753 16.6088 6.08443 16.9819 6.08443 17.4422C6.08443 17.9024 6.45753 18.2755 6.91777 18.2755ZM3.39115 13.0822C3.39115 13.5425 3.01806 13.9155 2.55782 13.9155C2.09758 13.9155 1.72449 13.5425 1.72449 13.0822C1.72449 12.622 2.09758 12.2489 2.55782 12.2489C3.01806 12.2489 3.39115 12.622 3.39115 13.0822ZM2.55782 7.751C3.01806 7.751 3.39115 7.3779 3.39115 6.91766C3.39115 6.45743 3.01806 6.08433 2.55782 6.08433C2.09758 6.08433 1.72449 6.45743 1.72449 6.91766C1.72449 7.3779 2.09758 7.751 2.55782 7.751ZM7.7511 2.55772C7.7511 3.01796 7.378 3.39105 6.91777 3.39105C6.45753 3.39105 6.08443 3.01796 6.08443 2.55772C6.08443 2.09748 6.45753 1.72439 6.91777 1.72439C7.378 1.72439 7.7511 2.09748 7.7511 2.55772Z",
|
|
1299
678
|
fill: "currentColor",
|
|
1300
679
|
fillRule: "evenodd"
|
|
1301
680
|
})
|
|
1302
681
|
});
|
|
1303
682
|
//#endregion
|
|
1304
|
-
//#region src/components/Icon/icons/
|
|
1305
|
-
const
|
|
683
|
+
//#region src/components/Icon/icons/DownloadIcon.tsx
|
|
684
|
+
const DownloadIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1306
685
|
...props,
|
|
1307
686
|
children: /* @__PURE__ */ jsx("path", {
|
|
1308
|
-
d: "
|
|
687
|
+
d: "m8.60831 3.62342c0-.89747.72755-1.625 1.62499-1.625h3.25c.8974 0 1.6249.72753 1.6249 1.625l-.0733 5.37819h2.169c1.5012 0 2.1996 1.86149 1.0688 2.84899l-5.4188 4.7324c-.6123.5347-1.5256.5347-2.1378 0l-5.41894-4.7324c-1.13072-.9875-.43233-2.84899 1.06891-2.84899h2.16889zm-4.94834 15.12818c-.89747 0-1.625.7275-1.625 1.625s.72753 1.625 1.625 1.625h16.68003c.8975 0 1.625-.7275 1.625-1.625s-.7275-1.625-1.625-1.625z",
|
|
1309
688
|
fill: "currentColor"
|
|
1310
689
|
})
|
|
1311
690
|
});
|
|
1312
691
|
//#endregion
|
|
1313
|
-
//#region src/components/Icon/icons/
|
|
1314
|
-
const
|
|
692
|
+
//#region src/components/Icon/icons/DraggableIcon.tsx
|
|
693
|
+
const DraggableIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1315
694
|
...props,
|
|
1316
695
|
children: /* @__PURE__ */ jsx("path", {
|
|
1317
|
-
d: "
|
|
696
|
+
d: "m8.4 22c-.66 0-1.225-.2448-1.695-.7344s-.705-1.0781-.705-1.7656.235-1.276.705-1.7656 1.035-.7344 1.695-.7344 1.225.2448 1.695.7344.705 1.0781.705 1.7656-.235 1.276-.705 1.7656-1.035.7344-1.695.7344zm7.2 0c-.66 0-1.225-.2448-1.695-.7344s-.705-1.0781-.705-1.7656.235-1.276.705-1.7656 1.035-.7344 1.695-.7344 1.225.2448 1.695.7344.705 1.0781.705 1.7656-.235 1.276-.705 1.7656-1.035.7344-1.695.7344zm-7.2-7.5c-.66 0-1.225-.2448-1.695-.7344s-.705-1.0781-.705-1.7656.235-1.276.705-1.7656c.47-.48961 1.035-.7344 1.695-.7344s1.225.24479 1.695.7344c.47.4896.705 1.0781.705 1.7656s-.235 1.276-.705 1.7656-1.035.7344-1.695.7344zm7.2 0c-.66 0-1.225-.2448-1.695-.7344s-.705-1.0781-.705-1.7656.235-1.276.705-1.7656c.47-.48961 1.035-.7344 1.695-.7344s1.225.24479 1.695.7344c.47.4896.705 1.0781.705 1.7656s-.235 1.276-.705 1.7656-1.035.7344-1.695.7344zm-7.2-7.5c-.66 0-1.225-.24479-1.695-.73437-.47-.48959-.705-1.07813-.705-1.76563s.235-1.27604.705-1.76562c.47-.48959 1.035-.73438 1.695-.73438s1.225.24479 1.695.73438c.47.48958.705 1.07812.705 1.76562s-.235 1.27604-.705 1.76563c-.47.48958-1.035.73437-1.695.73437zm7.2 0c-.66 0-1.225-.24479-1.695-.73437-.47-.48959-.705-1.07813-.705-1.76563s.235-1.27604.705-1.76562c.47-.48959 1.035-.73438 1.695-.73438s1.225.24479 1.695.73438c.47.48958.705 1.07812.705 1.76562s-.235 1.27604-.705 1.76563c-.47.48958-1.035.73437-1.695.73437z",
|
|
1318
697
|
fill: "currentColor"
|
|
1319
698
|
})
|
|
1320
699
|
});
|
|
1321
700
|
//#endregion
|
|
1322
|
-
//#region src/components/Icon/icons/
|
|
1323
|
-
const
|
|
701
|
+
//#region src/components/Icon/icons/EllipsisIcon.tsx
|
|
702
|
+
const EllipsisIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1324
703
|
...props,
|
|
1325
704
|
children: /* @__PURE__ */ jsx("path", {
|
|
1326
|
-
d: "
|
|
705
|
+
d: "m6.8654 12.0577c0 1.2745-1.03319 2.3077-2.3077 2.3077s-2.3077-1.0332-2.3077-2.3077 1.03319-2.3077 2.3077-2.3077 2.3077 1.0332 2.3077 2.3077zm7.6923 0c0 1.2745-1.0331 2.3077-2.3077 2.3077-1.2745 0-2.30766-1.0332-2.30766-2.3077s1.03316-2.3077 2.30766-2.3077c1.2746 0 2.3077 1.0332 2.3077 2.3077zm5.3846 2.3077c1.2746 0 2.3077-1.0332 2.3077-2.3077s-1.0331-2.3077-2.3077-2.3077c-1.2745 0-2.3077 1.0332-2.3077 2.3077s1.0332 2.3077 2.3077 2.3077z",
|
|
1327
706
|
fill: "currentColor"
|
|
1328
707
|
})
|
|
1329
708
|
});
|
|
1330
709
|
//#endregion
|
|
1331
|
-
//#region src/components/Icon/icons/
|
|
1332
|
-
const
|
|
710
|
+
//#region src/components/Icon/icons/EllipsisVerticalIcon.tsx
|
|
711
|
+
const EllipsisVerticalIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1333
712
|
...props,
|
|
1334
713
|
children: /* @__PURE__ */ jsx("path", {
|
|
1335
|
-
d: "
|
|
714
|
+
d: "m12.25 6.67311c-1.2745 0-2.30769-1.03319-2.30769-2.30771 0-1.27451 1.03319-2.3077 2.30769-2.3077s2.3077 1.03319 2.3077 2.3077c0 1.27452-1.0332 2.30771-2.3077 2.30771zm0 7.69229c-1.2745 0-2.30769-1.0331-2.30769-2.3077 0-1.2745 1.03319-2.30766 2.30769-2.30766s2.3077 1.03316 2.3077 2.30766c0 1.2746-1.0332 2.3077-2.3077 2.3077zm-2.30769 5.3846c0 1.2746 1.03319 2.3077 2.30769 2.3077s2.3077-1.0331 2.3077-2.3077c0-1.2745-1.0332-2.3077-2.3077-2.3077s-2.30769 1.0332-2.30769 2.3077z",
|
|
1336
715
|
fill: "currentColor"
|
|
1337
716
|
})
|
|
1338
717
|
});
|
|
1339
718
|
//#endregion
|
|
1340
|
-
//#region src/components/Icon/icons/
|
|
1341
|
-
const
|
|
1342
|
-
...props,
|
|
1343
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
1344
|
-
clipRule: "evenodd",
|
|
1345
|
-
d: "m5.64571 1.19092c-.44678-.324663-1.07216-.225666-1.39682.22112-.32466.44678-.22567 1.07215.22111 1.39682 1.28625.93467 2.48092 2.19849 3.54704 3.39817-1.62947-.00332-2.92814.02027-3.46778.08086-1.98082.22241-2.2359 1.3046-2.45624 2.97122-.22035 1.66659.01731 8.61489.2821 10.20679s1.03019 2.2578 3.23903 2.2185c1.36389-.0243 5.14395.102 8.22435.2049 1.9081.0637 3.5484.1185 4.1789.123l.0126.0001c1.6426.0116 2.973.0211 3.5839-1.2509.6125-1.2752.3643-9.5706.2662-11.15071-.0982-1.58008-.6322-2.71681-1.8871-2.99303-.4032-.08875-1.9372-.17748-3.8995-.24967.9793-1.0846 2.1361-2.34437 3.5284-3.63478.405-.37542.4291-1.00813.0536-1.41319-.3754-.405062-1.0081-.429086-1.4132-.05366-1.61 1.49224-2.9274 2.95491-3.9684 4.11064-.1937.21508-.3778.41955-.5525.61158-.0947.10407-.1859.20373-.2738.29896-.9155-.02314-1.8546-.0422-2.7663-.056-.1596-.18054-.3281-.37314-.5061-.57663l-.1089-.12441c-1.18229-1.35084-2.71275-3.08411-4.44059-4.33968zm9.86039 12.42148c-1.0777 1.4126-4.8912 3.6285-6.16234 4.3486-.19344.1108-.41451-.0277-.41451-.2493 0-1.468 0-5.9827.05527-7.4507 0-.1939.22107-.3324.4145-.2216l6.02418 3.1576c.1382.0831.1934.2769.0829.4154z",
|
|
1346
|
-
fill: "currentColor",
|
|
1347
|
-
fillRule: "evenodd"
|
|
1348
|
-
})
|
|
1349
|
-
});
|
|
1350
|
-
//#endregion
|
|
1351
|
-
//#region src/components/Icon/icons/CheckmarkCircleIcon.tsx
|
|
1352
|
-
const CheckmarkCircleIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1353
|
-
...props,
|
|
1354
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
1355
|
-
clipRule: "evenodd",
|
|
1356
|
-
d: "m21.8158 14.5648c3.0982-10.94829-8.8224-15.41821-15.39746-10.85188-4.65388 3.23212-6.673329 10.24658-3.15895 14.34028 3.51439 4.0936 15.45811 7.4598 18.55641-3.4884zm-4.1007-5.8658c.3861-.39496.3788-1.02808-.0161-1.41413-.395-.38604-1.0281-.37882-1.4141.01613l-6.127 6.2684-2.44277-2.4992c-.38605-.3949-1.01917-.4021-1.41413-.0161-.39495.3861-.40217 1.0192-.01612 1.4141l3.15789 3.2308c.18815.1925.44596.301.71513.301.2692 0 .527-.1085.7151-.301z",
|
|
1357
|
-
fill: "currentColor",
|
|
1358
|
-
fillRule: "evenodd"
|
|
1359
|
-
})
|
|
1360
|
-
});
|
|
1361
|
-
//#endregion
|
|
1362
|
-
//#region src/components/Icon/icons/CheckmarkCircleOutlineIcon.tsx
|
|
1363
|
-
const CheckmarkCircleOutlineIcon = ({ ...props }) => /* @__PURE__ */ jsxs("svg", {
|
|
1364
|
-
...props,
|
|
1365
|
-
children: [/* @__PURE__ */ jsx("path", {
|
|
1366
|
-
clipRule: "evenodd",
|
|
1367
|
-
d: "M11.25 2.5C6.41751 2.5 2.5 6.41751 2.5 11.25C2.5 16.0825 6.41751 20 11.25 20C16.0825 20 20 16.0825 20 11.25C20 6.41751 16.0825 2.5 11.25 2.5ZM0 11.25C0 5.0368 5.0368 0 11.25 0C17.4632 0 22.5 5.0368 22.5 11.25C22.5 17.4632 17.4632 22.5 11.25 22.5C5.0368 22.5 0 17.4632 0 11.25Z",
|
|
1368
|
-
fill: "currentColor",
|
|
1369
|
-
fillRule: "evenodd"
|
|
1370
|
-
}), /* @__PURE__ */ jsx("path", {
|
|
1371
|
-
clipRule: "evenodd",
|
|
1372
|
-
d: "M17.1237 7.35609C17.6174 7.83865 17.6265 8.63005 17.1439 9.12374L10.3018 16.1237C10.0666 16.3644 9.74436 16.5 9.4079 16.5C9.07143 16.5 8.74918 16.3644 8.51399 16.1237L5.35609 12.893C4.87354 12.3993 4.88256 11.6079 5.37626 11.1253C5.86995 10.6428 6.66135 10.6518 7.14391 11.1455L9.4079 13.4617L15.3561 7.37626C15.8386 6.88256 16.6301 6.87354 17.1237 7.35609Z",
|
|
1373
|
-
fill: "currentColor",
|
|
1374
|
-
fillRule: "evenodd"
|
|
1375
|
-
})]
|
|
1376
|
-
});
|
|
1377
|
-
//#endregion
|
|
1378
|
-
//#region src/components/Icon/icons/CheckmarkCircleThreeQuartersIcon.tsx
|
|
1379
|
-
const CheckmarkCircleThreeQuartersIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1380
|
-
...props,
|
|
1381
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
1382
|
-
d: "m5.06066 10.1406c1.02693-3.83255 4.96634-6.10695 8.79884-5.08003.8844.23699 1.7935-.28787 2.0305-1.1723.237-.88444-.2879-1.79352-1.1723-2.0305-5.60142-1.500892-11.35896 1.82322-12.85985 7.42462-1.500884 5.60141 1.82323 11.35891 7.42463 12.85981 5.60142 1.5009 11.35892-1.8232 12.85982-7.4246.237-.8844-.2879-1.7935-1.1723-2.0305s-1.7935.2879-2.0305 1.1723c-1.0269 3.8325-4.9663 6.1069-8.7988 5.08-3.83257-1.0269-6.10696-4.9663-5.08004-8.7988zm16.57534-2.98696c.6582-.63651.6758-1.68609.0392-2.34429-.6365-.65821-1.686-.67579-2.3442-.03928l-7.5698 7.32023-2.17928-2.46975c-.60581-.68657-1.65349-.75203-2.34005-.14621-.68656.60576-.75202 1.65346-.14621 2.34006l2.94474 3.3372c.8339.9451 2.2881 1.0027 3.1942.1265z",
|
|
1383
|
-
fill: "currentColor"
|
|
1384
|
-
})
|
|
1385
|
-
});
|
|
1386
|
-
//#endregion
|
|
1387
|
-
//#region src/components/Icon/icons/CheckmarkIcon.tsx
|
|
1388
|
-
const CheckmarkIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1389
|
-
...props,
|
|
1390
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
1391
|
-
d: "m8.79289 18.7054-6.50001-6.5374c-.39051-.3927-.39051-1.0295 0-1.4223l1.41418-1.42238c.39051-.39279 1.02371-.39279 1.41422 0l4.37872 4.40388 9.3787-9.43263c.3905-.39276 1.0237-.39276 1.4142 0l1.4142 1.42235c.3905.39275.3905 1.02956 0 1.42235l-11.5 11.56613c-.39054.3928-1.0237.3928-1.41421 0z",
|
|
1392
|
-
fill: "currentColor"
|
|
1393
|
-
})
|
|
1394
|
-
});
|
|
1395
|
-
//#endregion
|
|
1396
|
-
//#region src/components/Icon/icons/CheckmarkUnderlinedIcon.tsx
|
|
1397
|
-
const CheckmarkUnderlinedIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1398
|
-
...props,
|
|
1399
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
1400
|
-
d: "M9.54401 12.95L17.994 4.49995C18.194 4.29995 18.4315 4.19995 18.7065 4.19995C18.9815 4.19995 19.219 4.29995 19.419 4.49995C19.619 4.69995 19.719 4.93745 19.719 5.21245C19.719 5.48745 19.619 5.72495 19.419 5.92495L10.244 15.1C10.044 15.3 9.81067 15.4 9.54401 15.4C9.27734 15.4 9.04401 15.3 8.84401 15.1L4.56901 10.825C4.36901 10.625 4.27317 10.3875 4.28151 10.1125C4.28984 9.83745 4.39401 9.59995 4.59401 9.39995C4.79401 9.19995 5.03151 9.09995 5.30651 9.09995C5.58151 9.09995 5.81901 9.19995 6.01901 9.39995L9.54401 12.95ZM5.99401 19.8C5.71067 19.8 5.47317 19.7041 5.28151 19.5125C5.08984 19.3208 4.99401 19.0833 4.99401 18.8C4.99401 18.5166 5.08984 18.2791 5.28151 18.0875C5.47317 17.8958 5.71067 17.8 5.99401 17.8H17.994C18.2773 17.8 18.5148 17.8958 18.7065 18.0875C18.8982 18.2791 18.994 18.5166 18.994 18.8C18.994 19.0833 18.8982 19.3208 18.7065 19.5125C18.5148 19.7041 18.2773 19.8 17.994 19.8H5.99401Z",
|
|
1401
|
-
fill: "currentColor"
|
|
1402
|
-
})
|
|
1403
|
-
});
|
|
1404
|
-
//#endregion
|
|
1405
|
-
//#region src/components/Icon/icons/CloseCircleIcon.tsx
|
|
1406
|
-
const CloseCircleIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1407
|
-
...props,
|
|
1408
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
1409
|
-
clipRule: "evenodd",
|
|
1410
|
-
d: "M13.8186 20.4731C4.60239 22.893 -2.98829 15.5818 3.31523 6.74072C9.6261 -2.10038 19.5705 4.8504 21.402 9.84467C23.2334 14.8389 19.0556 19.105 13.8186 20.4731Z \n M15.0413 8.87414C15.4318 8.48355 15.4318 7.85028 15.0413 7.45969C14.6508 7.0691 14.0178 7.0691 13.6273 7.45969L11.0001 10.0878L8.37284 7.4597C7.98238 7.06911 7.34932 7.06911 6.95886 7.4597C6.5684 7.85029 6.5684 8.48356 6.95886 8.87415L9.5861 11.5023L6.95886 14.1304C6.5684 14.5209 6.5684 15.1542 6.95886 15.5448C7.34932 15.9354 7.98238 15.9354 8.37284 15.5448L11.0001 12.9167L13.6273 15.5448C14.0178 15.9354 14.6508 15.9354 15.0413 15.5448C15.4318 15.1542 15.4318 14.521 15.0413 14.1304L12.4141 11.5023L15.0413 8.87414Z",
|
|
1411
|
-
fill: "currentColor",
|
|
1412
|
-
fillRule: "evenodd"
|
|
1413
|
-
})
|
|
1414
|
-
});
|
|
1415
|
-
//#endregion
|
|
1416
|
-
//#region src/components/Icon/icons/CloseIcon.tsx
|
|
1417
|
-
const CloseIcon$1 = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1418
|
-
...props,
|
|
1419
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
1420
|
-
d: "m17.7742 19.618c.5091.5093 1.3347.5093 1.8439 0 .5091-.5091.5091-1.3347 0-1.8438l-5.7742-5.7742 5.7742-5.77422c.5091-.50918.5091-1.3347 0-1.84387-.5092-.50917-1.3348-.50917-1.8439 0l-5.7742 5.77419-5.77426-5.77422c-.50917-.50917-1.33469-.50917-1.84387 0-.50916.50917-.50916 1.3347 0 1.84386l5.77423 5.77426-5.77421 5.7742c-.50918.5092-.50918 1.3347 0 1.8439.50916.5092 1.33469.5092 1.84385 0l5.77426-5.7742z",
|
|
1421
|
-
fill: "currentColor"
|
|
1422
|
-
})
|
|
1423
|
-
});
|
|
1424
|
-
//#endregion
|
|
1425
|
-
//#region src/components/Icon/icons/CollectVideoIcon.tsx
|
|
1426
|
-
const CollectVideoIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1427
|
-
...props,
|
|
1428
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
1429
|
-
clipRule: "evenodd",
|
|
1430
|
-
d: "M12 6.85714H3V4.92857C3 3.864 3.864 3 4.92857 3H8.74072C9.17014 3 9.57257 3.21471 9.81043 3.57214L12 6.85714ZM3 6.85718H19.0714C20.136 6.85718 21 7.72118 21 8.78575V13.1438C20.9149 13.1202 20.8253 13.1077 20.7328 13.1077H13.3066L14.7071 11.7071C15.0976 11.3166 15.0976 10.6834 14.7071 10.2929C14.3166 9.90237 13.6834 9.90237 13.2929 10.2929L10.2929 13.2929C10.1054 13.4804 10 13.7348 10 14C10 14.2652 10.1054 14.5196 10.2929 14.7071L13.2929 17.7071C13.6834 18.0976 14.3166 18.0976 14.7071 17.7071C15.0976 17.3166 15.0976 16.6834 14.7071 16.2929L13.5219 15.1077H20.7328C20.8253 15.1077 20.9149 15.0951 21 15.0716V17.1429C21 19.272 19.272 21 17.1429 21H6.85714C4.728 21 3 19.272 3 17.1429V6.85718Z",
|
|
1431
|
-
fill: "currentColor",
|
|
1432
|
-
fillRule: "evenodd"
|
|
1433
|
-
})
|
|
1434
|
-
});
|
|
1435
|
-
//#endregion
|
|
1436
|
-
//#region src/components/Icon/icons/CommentIcon.tsx
|
|
1437
|
-
const CommentIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1438
|
-
...props,
|
|
1439
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
1440
|
-
clipRule: "evenodd",
|
|
1441
|
-
d: "M2.0994 10.6931C2.04002 8.22692 1.96942 5.29509 2.11584 4.25593C2.13365 4.13216 2.14292 4.01528 2.1517 3.90469C2.21613 3.09248 2.25369 2.61894 5.44865 2.23843C9.48199 1.75807 17.1241 1.99825 20.9452 3.007C21.7385 3.21574 21.7461 3.55147 21.7624 4.26645C21.7648 4.37414 21.7675 4.49044 21.773 4.6162C21.8367 5.57691 22.0066 10.2604 21.9641 11.7255C21.9538 12.0123 21.9535 12.4616 21.9532 13.001V13.001C21.9522 14.6749 21.9507 17.2153 21.6457 18.4505C21.4546 19.2671 20.0748 19.2911 18.9073 19.171C18.4972 19.1289 17.0813 19.0734 15.3164 19.0193C14.4586 19.7428 13.2551 20.8268 12.6703 21.669C12.4667 21.9623 12.1951 22 11.9708 22C11.7566 22 11.6986 21.9343 11.3756 21.5684L11.3281 21.5147C10.6506 20.7484 9.58149 19.5267 9.00085 18.8624C7.74516 18.8383 6.69432 18.8234 6.10233 18.8234C3.78846 18.8234 2.85054 18.5199 2.51089 18.1837C2.02619 17.7038 2.08219 16.014 2.13647 14.3759L2.14543 14.1031C2.16606 13.462 2.13471 12.1599 2.0994 10.6931ZM4.33635 7.16713C4.33635 7.16713 3.83065 8.24157 4.01326 8.52809C4.14949 8.74182 8.25659 8.84926 10.9526 8.91979L10.9527 8.91979C11.8709 8.94381 12.6253 8.96354 13.0036 8.98174C14.1695 9.05337 17.7376 8.83848 19.2126 8.74298C19.24 8.74161 19.2672 8.74047 19.2943 8.73935C19.7381 8.72089 20.1152 8.7052 19.943 7.69241C19.9149 7.5014 19.8166 7.38202 19.634 7.38202C19.044 7.38202 9.89913 7.38202 7.90439 7.191L7.64546 7.16615C5.81529 6.99024 4.8063 6.89326 4.33635 7.16713ZM19.8977 11.4732C20.0908 11.7527 19.6254 12.8452 19.6254 12.8452C19.166 13.1363 18.1541 13.0769 16.3186 12.9692C16.2338 12.9642 16.1473 12.9591 16.059 12.9539C14.0586 12.8372 4.92114 13.177 4.33049 13.199L4.33037 13.199C4.14788 13.2058 4.04518 13.0901 4.01001 12.9003C3.80035 11.8946 4.17656 11.8649 4.61942 11.83C4.64638 11.8278 4.67359 11.8257 4.70093 11.8233C6.17134 11.673 9.72893 11.3257 10.8967 11.3539C11.2754 11.3581 12.0301 11.3498 12.9486 11.3396C15.6454 11.3099 19.7536 11.2646 19.8977 11.4732Z",
|
|
1442
|
-
fill: "currentColor",
|
|
1443
|
-
fillRule: "evenodd"
|
|
1444
|
-
})
|
|
1445
|
-
});
|
|
1446
|
-
//#endregion
|
|
1447
|
-
//#region src/components/Icon/icons/CommunityIcon.tsx
|
|
1448
|
-
const CommunityIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1449
|
-
...props,
|
|
1450
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
1451
|
-
d: "m14.8307 3.14077c.3645.16757.686.31534.9541.40981l.0186.00652c1.2355.43528 5.3747 1.89346 6.0303 4.36204.5612 2.11356-.3999 4.17296-1.3677 6.24656-.1682.3606-.3367.7217-.4975 1.0835-.0379.0854-.0756.1704-.1132.255-1.4657 3.3022-2.6018 5.8617-4.6582 6.3731-2.1092.5247-5.1606-.7312-7.71054-1.9147-.05102-.0244-.10251-.0491-.15441-.0738-1.99154-.951-4.60465-2.1987-5.20489-4.1987-.61588-2.0523 1.14517-6.02627 2.25161-7.92519.20562-.35289.40011-.72469.59807-1.10314.86724-1.65795 1.80113-3.44328 4.02973-4.32392 2.19233-.86633 4.35703.12865 5.82403.80292zm-2.2269 2.13686c-.5027-.24679-1.1143-.04716-1.366.44591l-.6538 1.281-1.30983-.64294c-.50277-.24679-1.11436-.04714-1.36603.44591-.25167.49306-.04812 1.09282.45465 1.33961l1.3098.64293-1.50554 2.94955-1.44199-.7078c-.50276-.2468-1.11435-.0471-1.36602.4459-.25167.4931-.04812 1.0928.45465 1.3396l1.44198.7078-.77998 1.5281c-.25167.4931-.04812 1.0929.45464 1.3396.50277.2468 1.11436.0472 1.36603-.4459l.77999-1.5281 2.98935 1.4674-.7622 1.4931c-.2517.4931-.0481 1.0929.4547 1.3397.5027.2467 1.1143.0471 1.366-.446l.7622-1.4931 1.4413.7075c.5028.2468 1.1144.0471 1.366-.446.2517-.4929.0482-1.0928-.4546-1.3396l-1.4414-.7074 1.5055-2.9496 1.5735.7724c.5028.2468 1.1144.0472 1.3661-.4459.2516-.4931.0481-1.0928-.4546-1.3396l-1.5736-.7724.6717-1.31597c.2518-.49306.0482-1.09282-.4546-1.33961-.5027-.24679-1.1143-.04715-1.366.4459l-.6718 1.31598-2.9892-1.46736.6538-1.281c.2517-.49306.0481-1.09283-.4547-1.33961zm1.8788 5.87347-1.5055 2.9496-2.98937-1.4674 1.50557-2.94954z",
|
|
1452
|
-
fill: "currentColor"
|
|
1453
|
-
})
|
|
1454
|
-
});
|
|
1455
|
-
//#endregion
|
|
1456
|
-
//#region src/components/Icon/icons/ContactUsIcon.tsx
|
|
1457
|
-
const ContactUsIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1458
|
-
...props,
|
|
1459
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
1460
|
-
d: "m2 7.13053c1.02794.75462 2.30848 1.82137 3.61006 2.90567 0 0 5.06424 3.9629 5.81564 3.9629 1.8549 0 3.7992-1.8146 5.1678-2.8746 1.3176-1.0205 2.7467-2.21282 4.0625-3.31055.1651-.13774.3285-.27408.4895-.40831-.0011.22999.0035.44719.0315.64131.3947 2.63975.4326 8.17435 0 11.09695-.3145.4144-.8493.9882-3.0513.8288s-11.82778-.2869-12.92877-.2231c-1.101.0637-2.39073-.0638-2.61093-1.1158-.40264-1.7682-.5511-8.74247-.586-11.50327zm16.4311-2.99936c1.2812.09529 1.9619.48357 2.322 1.00077-.4574.37757-.9338.77506-1.4207 1.18138-1.2989 1.0838-2.6732 2.23056-3.9636 3.22999-.9655.74789-1.8517 1.38729-2.5896 1.83539-.3691.2242-.6815.3884-.9342.4939-.2367.0989-.3632.1358-.5917.0084-.2306-.1286-.5322-.3283-.8998-.5958-.73248-.5331-1.63926-1.2708-2.61739-2.08202-.26991-.22385-.54604-.45404-.8253-.68686-.21657-.18055-.43504-.36268-.65398-.54466l-.65679-.54374c-1.20143-.98965-2.37365-1.92213-3.27827-2.50838.22838-.42619.59195-.78832 1.14091-.78831 1.57531.00002 3.21902-.03191 4.885-.06428 3.39902-.06604 6.89072-.13388 10.08342.06422z",
|
|
1461
|
-
fill: "currentColor"
|
|
1462
|
-
})
|
|
1463
|
-
});
|
|
1464
|
-
//#endregion
|
|
1465
|
-
//#region src/components/Icon/icons/CopyDisabledIcon.tsx
|
|
1466
|
-
const CopyDisabledIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1467
|
-
...props,
|
|
1468
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
1469
|
-
d: "m23.7071 1.70711c.3905-.39053.3905-1.023692 0-1.414217-.3905-.3905241-1.0237-.3905241-1.4142 0l-22.000007 22.000007c-.3905238.3905-.3905242 1.0237 0 1.4142.390524.3905 1.023687.3905 1.414217 0zm-5.0845.29289c.1737 0 .3443.01298.5109.03803l-3.3066 3.30661h-8.21351c-.93263 0-1.68869-.74873-1.68869-1.67232 0-.92361.75606-1.67232 1.68869-1.67232zm-14.9339 4.94911h10.5338l-12.2225 12.22249v-10.55017c0-.92359.75605-1.67232 1.6887-1.67232zm13.5095 2.68113-12.36977 12.36976h10.68107c.9327 0 1.6887-.7487 1.6887-1.6723zm4.7671-4.76707-3.3427 3.34265v8.10658c0 .9235.756 1.6724 1.6887 1.6724s1.6887-.7489 1.6887-1.6724v-10.96776c0-.1635-.0118-.32425-.0347-.48147z",
|
|
1470
|
-
fill: "currentColor"
|
|
1471
|
-
})
|
|
1472
|
-
});
|
|
1473
|
-
//#endregion
|
|
1474
|
-
//#region src/components/Icon/icons/CopyIcon.tsx
|
|
1475
|
-
const CopyIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1476
|
-
...props,
|
|
1477
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
1478
|
-
d: "m18.6226 16.3124c0 .9235.756 1.6724 1.6887 1.6724s1.6887-.7489 1.6887-1.6724v-10.96776c0-1.8472-1.5122-3.34464-3.3774-3.34464h-11.00921c-.93263 0-1.68869.74871-1.68869 1.67232 0 .92359.75606 1.67232 1.68869 1.67232h11.00921zm-3.1131 5.6876c.9327 0 1.6887-.7487 1.6887-1.6723v-11.70627c0-.92359-.756-1.67232-1.6887-1.67232h-11.8208c-.93265 0-1.6887.74873-1.6887 1.67232v11.70627c0 .9236.75605 1.6723 1.6887 1.6723z",
|
|
1479
|
-
fill: "currentColor"
|
|
1480
|
-
})
|
|
1481
|
-
});
|
|
1482
|
-
//#endregion
|
|
1483
|
-
//#region src/components/Icon/icons/CreateIcon.tsx
|
|
1484
|
-
const CreateIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1485
|
-
...props,
|
|
1486
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
1487
|
-
d: "m10.3966 3.60341c0-.88553.7179-1.60341 1.6034-1.60341s1.6034.71788 1.6034 1.60341v6.79319h6.7932c.8856 0 1.6034.7179 1.6034 1.6034 0 .8856-.7178 1.6034-1.6034 1.6034h-6.7932v6.7932c0 .8856-.7179 1.6034-1.6034 1.6034s-1.6034-.7178-1.6034-1.6034v-6.7932h-6.7932c-.88554 0-1.6034-.7178-1.6034-1.6034 0-.8855.71786-1.6034 1.6034-1.6034h6.7932z",
|
|
1488
|
-
fill: "currentColor"
|
|
1489
|
-
})
|
|
1490
|
-
});
|
|
1491
|
-
//#endregion
|
|
1492
|
-
//#region src/components/Icon/icons/DeleteIcon.tsx
|
|
1493
|
-
const DeleteIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1494
|
-
...props,
|
|
1495
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
1496
|
-
d: "m14.904 2.36857c.6808.18014 1.0637 1.89327 1.3326 3.11843 1.0626.02303 2.1802.06975 3.3652.15126.5509.0379.9669.51528.929 1.06626-.0379.55099-.5153.96692-1.0663.92902-3.2573-.22405-5.9961-.17824-8.5308-.1036-.3474.01023-.6918.02104-1.03385.03178-2.1416.06726-4.18778.13153-6.28166.02989-.55163-.02678-.97711-.49568-.95034-1.04731.02678-.55164.49568-.97712 1.04731-.95034 1.04212.05058 2.0709.0584 3.11959.04482.08961-.94493.83902-2.66045 1.49748-3.27021.72917-.67525 5.56337-.2668 6.57177 0zm-8.53971 18.93913c-.38411-1.7907-1.43613-8.7724-1.60784-10.1112-.01239-.0967-.02523-.1887-.03746-.2764-.1573-1.12763-.21516-1.5424 2.05023-1.84784 2.71293-.36579 9.32588-.45722 11.89608.31093.5336.15895.5387.4146.5496.95901.0017.082.0035.1706.0072.2664 0 2.8358-.6932 5.8331-1.3554 8.6963-.1564.6763-.3112 1.3453-.4546 2.0028-.1285.6219-1.0566.6401-1.842.5487-.7853-.0915-5.4362-.2926-6.99265-.2926-1.55635 0-1.98471 0-2.21316-.2561zm8.97891-9.2246c-.0298-.5515-.501-.9744-1.0525-.9446s-.9744.501-.9446 1.0525c.0309.5711-.027 1.5863-.123 2.7715-.0544.6721-.1166 1.3496-.1763 2.0013-.0459.5008-.0905.9868-.1291 1.4427-.0465.5504.3619 1.0342.9122 1.0807.5503.0466 1.0342-.3618 1.0807-.9122.0351-.4152.0789-.8939.1249-1.3962l.0002-.0017.0001-.0015c.0616-.6734.1271-1.3892.1808-2.0516.094-1.1611.166-2.312.1266-3.0409zm-5.56465 7.4093c.55025.0479 1.03505-.3594 1.08295-.9096.0632-.7272.0291-1.8798-.0269-3.0434-.0319-.6643-.0739-1.3823-.1135-2.0578-.0295-.504-.0576-.985-.0791-1.4014-.0285-.5516-.4987-.9756-1.05025-.9472-.55156.0285-.97562.4987-.94716 1.0502.02358.4571.05217.944.08167 1.4462.03835.653.07827 1.3328.11063 2.006.0571 1.1878.08163 2.2042.03206 2.7741-.04786.5502.3594 1.035.9096 1.0829z",
|
|
1497
|
-
fill: "currentColor"
|
|
1498
|
-
})
|
|
1499
|
-
});
|
|
1500
|
-
//#endregion
|
|
1501
|
-
//#region src/components/Icon/icons/DeleteSmIcon.tsx
|
|
1502
|
-
const DeleteSmIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1503
|
-
...props,
|
|
1504
|
-
children: /* @__PURE__ */ jsxs("g", {
|
|
1505
|
-
fill: "currentColor",
|
|
1506
|
-
children: [/* @__PURE__ */ jsx("path", { d: "m9.05042 2c-.64391 0-1.23256.35667-1.52052.92132l-1.23015 2.41201h-1.59974c-.9389 0-1.70001.74619-1.70001 1.66667 0 .92047.76111 1.66667 1.70001 1.66667h14.59999c.9389 0 1.7-.7462 1.7-1.66667 0-.92048-.7611-1.66667-1.7-1.66667h-1.8003l-1.2301-2.41201c-.288-.56465-.8765-.92132-1.5205-.92132z" }), /* @__PURE__ */ jsx("path", { d: "m6.63212 10c-.9389 0-1.63212.7462-1.63212 1.6667v8.8333c0 .9205.36086 1.5 1.29975 1.5h11.19995c.9389 0 1.5003-.5795 1.5003-1.5l-.1-8.8333c0-.9205-.4611-1.6667-1.4-1.6667z" })]
|
|
1507
|
-
})
|
|
1508
|
-
});
|
|
1509
|
-
//#endregion
|
|
1510
|
-
//#region src/components/Icon/icons/DottieClockIcon.tsx
|
|
1511
|
-
const DottieClockIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1512
|
-
...props,
|
|
1513
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
1514
|
-
clipRule: "evenodd",
|
|
1515
|
-
d: "M10 18.8889C9.54004 18.8889 9.16671 18.5155 9.16671 18.0555C9.16671 17.5955 9.54004 17.2222 10 17.2222C13.9823 17.2222 17.2223 13.9822 17.2223 9.99997C17.2223 6.01775 13.9823 2.77775 10 2.77775C9.54004 2.77775 9.16671 2.40442 9.16671 1.94442C9.16671 1.48442 9.54004 1.11108 10 1.11108C14.9012 1.11108 18.8889 5.09886 18.8889 9.99997C18.8889 14.9011 14.9012 18.8889 10 18.8889ZM13.61 13.3333C13.4478 13.3333 13.2812 13.2855 13.1367 13.1855L9.5256 10.6855C9.30115 10.53 9.16671 10.2733 9.16671 9.99997V5.27775C9.16671 4.81775 9.54004 4.44442 10 4.44442C10.46 4.44442 10.8334 4.81775 10.8334 5.27775V9.56331L14.0856 11.8144C14.4645 12.0766 14.5589 12.5955 14.2956 12.9733C14.1334 13.2066 13.8745 13.3322 13.61 13.3322V13.3333ZM5.13676 15.6966C5.13676 16.1568 4.76366 16.5299 4.30343 16.5299C3.84319 16.5299 3.47009 16.1568 3.47009 15.6966C3.47009 15.2363 3.84319 14.8632 4.30343 14.8632C4.76366 14.8632 5.13676 15.2363 5.13676 15.6966ZM1.94442 10.8333C2.40465 10.8333 2.77775 10.4602 2.77775 9.99994C2.77775 9.5397 2.40465 9.16661 1.94442 9.16661C1.48418 9.16661 1.11108 9.5397 1.11108 9.99994C1.11108 10.4602 1.48418 10.8333 1.94442 10.8333ZM5.13676 4.30332C5.13676 4.76356 4.76366 5.13666 4.30343 5.13666C3.84319 5.13666 3.47009 4.76356 3.47009 4.30332C3.47009 3.84309 3.84319 3.46999 4.30343 3.46999C4.76366 3.46999 5.13676 3.84309 5.13676 4.30332ZM6.91777 18.2755C7.378 18.2755 7.7511 17.9024 7.7511 17.4422C7.7511 16.9819 7.378 16.6088 6.91777 16.6088C6.45753 16.6088 6.08443 16.9819 6.08443 17.4422C6.08443 17.9024 6.45753 18.2755 6.91777 18.2755ZM3.39115 13.0822C3.39115 13.5425 3.01806 13.9155 2.55782 13.9155C2.09758 13.9155 1.72449 13.5425 1.72449 13.0822C1.72449 12.622 2.09758 12.2489 2.55782 12.2489C3.01806 12.2489 3.39115 12.622 3.39115 13.0822ZM2.55782 7.751C3.01806 7.751 3.39115 7.3779 3.39115 6.91766C3.39115 6.45743 3.01806 6.08433 2.55782 6.08433C2.09758 6.08433 1.72449 6.45743 1.72449 6.91766C1.72449 7.3779 2.09758 7.751 2.55782 7.751ZM7.7511 2.55772C7.7511 3.01796 7.378 3.39105 6.91777 3.39105C6.45753 3.39105 6.08443 3.01796 6.08443 2.55772C6.08443 2.09748 6.45753 1.72439 6.91777 1.72439C7.378 1.72439 7.7511 2.09748 7.7511 2.55772Z",
|
|
1516
|
-
fill: "currentColor",
|
|
1517
|
-
fillRule: "evenodd"
|
|
1518
|
-
})
|
|
1519
|
-
});
|
|
1520
|
-
//#endregion
|
|
1521
|
-
//#region src/components/Icon/icons/DownloadIcon.tsx
|
|
1522
|
-
const DownloadIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1523
|
-
...props,
|
|
1524
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
1525
|
-
d: "m8.60831 3.62342c0-.89747.72755-1.625 1.62499-1.625h3.25c.8974 0 1.6249.72753 1.6249 1.625l-.0733 5.37819h2.169c1.5012 0 2.1996 1.86149 1.0688 2.84899l-5.4188 4.7324c-.6123.5347-1.5256.5347-2.1378 0l-5.41894-4.7324c-1.13072-.9875-.43233-2.84899 1.06891-2.84899h2.16889zm-4.94834 15.12818c-.89747 0-1.625.7275-1.625 1.625s.72753 1.625 1.625 1.625h16.68003c.8975 0 1.625-.7275 1.625-1.625s-.7275-1.625-1.625-1.625z",
|
|
1526
|
-
fill: "currentColor"
|
|
1527
|
-
})
|
|
1528
|
-
});
|
|
1529
|
-
//#endregion
|
|
1530
|
-
//#region src/components/Icon/icons/DraggableIcon.tsx
|
|
1531
|
-
const DraggableIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1532
|
-
...props,
|
|
1533
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
1534
|
-
d: "m8.4 22c-.66 0-1.225-.2448-1.695-.7344s-.705-1.0781-.705-1.7656.235-1.276.705-1.7656 1.035-.7344 1.695-.7344 1.225.2448 1.695.7344.705 1.0781.705 1.7656-.235 1.276-.705 1.7656-1.035.7344-1.695.7344zm7.2 0c-.66 0-1.225-.2448-1.695-.7344s-.705-1.0781-.705-1.7656.235-1.276.705-1.7656 1.035-.7344 1.695-.7344 1.225.2448 1.695.7344.705 1.0781.705 1.7656-.235 1.276-.705 1.7656-1.035.7344-1.695.7344zm-7.2-7.5c-.66 0-1.225-.2448-1.695-.7344s-.705-1.0781-.705-1.7656.235-1.276.705-1.7656c.47-.48961 1.035-.7344 1.695-.7344s1.225.24479 1.695.7344c.47.4896.705 1.0781.705 1.7656s-.235 1.276-.705 1.7656-1.035.7344-1.695.7344zm7.2 0c-.66 0-1.225-.2448-1.695-.7344s-.705-1.0781-.705-1.7656.235-1.276.705-1.7656c.47-.48961 1.035-.7344 1.695-.7344s1.225.24479 1.695.7344c.47.4896.705 1.0781.705 1.7656s-.235 1.276-.705 1.7656-1.035.7344-1.695.7344zm-7.2-7.5c-.66 0-1.225-.24479-1.695-.73437-.47-.48959-.705-1.07813-.705-1.76563s.235-1.27604.705-1.76562c.47-.48959 1.035-.73438 1.695-.73438s1.225.24479 1.695.73438c.47.48958.705 1.07812.705 1.76562s-.235 1.27604-.705 1.76563c-.47.48958-1.035.73437-1.695.73437zm7.2 0c-.66 0-1.225-.24479-1.695-.73437-.47-.48959-.705-1.07813-.705-1.76563s.235-1.27604.705-1.76562c.47-.48959 1.035-.73438 1.695-.73438s1.225.24479 1.695.73438c.47.48958.705 1.07812.705 1.76562s-.235 1.27604-.705 1.76563c-.47.48958-1.035.73437-1.695.73437z",
|
|
1535
|
-
fill: "currentColor"
|
|
1536
|
-
})
|
|
1537
|
-
});
|
|
1538
|
-
//#endregion
|
|
1539
|
-
//#region src/components/Icon/icons/EllipsisIcon.tsx
|
|
1540
|
-
const EllipsisIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1541
|
-
...props,
|
|
1542
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
1543
|
-
d: "m6.8654 12.0577c0 1.2745-1.03319 2.3077-2.3077 2.3077s-2.3077-1.0332-2.3077-2.3077 1.03319-2.3077 2.3077-2.3077 2.3077 1.0332 2.3077 2.3077zm7.6923 0c0 1.2745-1.0331 2.3077-2.3077 2.3077-1.2745 0-2.30766-1.0332-2.30766-2.3077s1.03316-2.3077 2.30766-2.3077c1.2746 0 2.3077 1.0332 2.3077 2.3077zm5.3846 2.3077c1.2746 0 2.3077-1.0332 2.3077-2.3077s-1.0331-2.3077-2.3077-2.3077c-1.2745 0-2.3077 1.0332-2.3077 2.3077s1.0332 2.3077 2.3077 2.3077z",
|
|
1544
|
-
fill: "currentColor"
|
|
1545
|
-
})
|
|
1546
|
-
});
|
|
1547
|
-
//#endregion
|
|
1548
|
-
//#region src/components/Icon/icons/EllipsisVerticalIcon.tsx
|
|
1549
|
-
const EllipsisVerticalIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1550
|
-
...props,
|
|
1551
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
1552
|
-
d: "m12.25 6.67311c-1.2745 0-2.30769-1.03319-2.30769-2.30771 0-1.27451 1.03319-2.3077 2.30769-2.3077s2.3077 1.03319 2.3077 2.3077c0 1.27452-1.0332 2.30771-2.3077 2.30771zm0 7.69229c-1.2745 0-2.30769-1.0331-2.30769-2.3077 0-1.2745 1.03319-2.30766 2.30769-2.30766s2.3077 1.03316 2.3077 2.30766c0 1.2746-1.0332 2.3077-2.3077 2.3077zm-2.30769 5.3846c0 1.2746 1.03319 2.3077 2.30769 2.3077s2.3077-1.0331 2.3077-2.3077c0-1.2745-1.0332-2.3077-2.3077-2.3077s-2.30769 1.0332-2.30769 2.3077z",
|
|
1553
|
-
fill: "currentColor"
|
|
1554
|
-
})
|
|
1555
|
-
});
|
|
1556
|
-
//#endregion
|
|
1557
|
-
//#region src/components/Icon/icons/EmbedIcon.tsx
|
|
1558
|
-
const EmbedIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
719
|
+
//#region src/components/Icon/icons/EmbedIcon.tsx
|
|
720
|
+
const EmbedIcon = (props) => /* @__PURE__ */ jsx("svg", {
|
|
1559
721
|
...props,
|
|
1560
722
|
children: /* @__PURE__ */ jsx("path", {
|
|
1561
723
|
d: "m13.7617 2c.0584 0 .12.00417.18.01417.6751.1 1.1442.745 1.0451 1.43166l-2.5243 17.47497c-.09.6259-.6225 1.0792-1.2251 1.0792-.0591 0-.1191-.005-.18-.0142-.6733-.1-1.14336-.745-1.0442-1.4316l2.5226-17.4767c.09-.625.6242-1.0775 1.2251-1.0775zm-7.00456 5c.31886 0 .63772.12667.87943.38167.48343.50833.48343 1.33916 0 1.8475l-2.63657 2.77083 2.63743 2.7708c.48343.5084.48343 1.3409 0 1.8492-.24172.2533-.56057.38-.87943.38-.318 0-.63771-.1267-.87857-.38l-3.51686-3.6967c-.48343-.5083-.48343-1.3391 0-1.8466l3.51686-3.69503c.24086-.255.56057-.38167.87771-.38167zm10.48556 0c.3179 0 .6376.12667.8784.38167l3.5164 3.69503c.4833.5083.4833 1.3391 0 1.8466l-3.5164 3.6967c-.2408.2533-.5605.38-.8784.38-.3188 0-.6376-.1267-.8793-.38-.4834-.5083-.4834-1.3408 0-1.8475l2.6362-2.7725-2.6371-2.77083c-.4833-.50834-.4833-1.33917 0-1.8475.2417-.255.5605-.38167.8793-.38167z",
|
|
@@ -3389,531 +2551,99 @@ const GlobalStyle$1 = createGlobalStyle`
|
|
|
3389
2551
|
* 2. Change font properties to 'inherit' in Safari.
|
|
3390
2552
|
*/
|
|
3391
2553
|
|
|
3392
|
-
::-webkit-file-upload-button {
|
|
3393
|
-
appearance: auto; /* 1 */
|
|
3394
|
-
font: inherit; /* 2 */
|
|
3395
|
-
}
|
|
3396
|
-
|
|
3397
|
-
/* Interactive
|
|
3398
|
-
========================================================================== */
|
|
3399
|
-
|
|
3400
|
-
/*
|
|
3401
|
-
* Add the correct display in Edge, IE 10+, and Firefox.
|
|
3402
|
-
*/
|
|
3403
|
-
|
|
3404
|
-
details {
|
|
3405
|
-
display: block;
|
|
3406
|
-
}
|
|
3407
|
-
|
|
3408
|
-
/*
|
|
3409
|
-
* Add the correct display in all browsers.
|
|
3410
|
-
*/
|
|
3411
|
-
|
|
3412
|
-
summary {
|
|
3413
|
-
display: list-item;
|
|
3414
|
-
}
|
|
3415
|
-
|
|
3416
|
-
/* Misc
|
|
3417
|
-
========================================================================== */
|
|
3418
|
-
|
|
3419
|
-
/**
|
|
3420
|
-
* Add the correct display in IE 10+.
|
|
3421
|
-
*/
|
|
3422
|
-
|
|
3423
|
-
template {
|
|
3424
|
-
display: none;
|
|
3425
|
-
}
|
|
3426
|
-
|
|
3427
|
-
/**
|
|
3428
|
-
* Add the correct display in IE 10.
|
|
3429
|
-
*/
|
|
3430
|
-
|
|
3431
|
-
[hidden] {
|
|
3432
|
-
display: none;
|
|
3433
|
-
}
|
|
3434
|
-
`}
|
|
3435
|
-
${css`
|
|
3436
|
-
/**
|
|
3437
|
-
* 1. Change from 'content-box' so that 'width' calculations are unaffected by 'padding' or 'border'
|
|
3438
|
-
* 2. Ensure the iOS tap highlight is transparent
|
|
3439
|
-
*/
|
|
3440
|
-
html {
|
|
3441
|
-
box-sizing: border-box; /* 1 */
|
|
3442
|
-
-webkit-tap-highlight-color: rgb(0 0 0 / 0%); /* 2 */
|
|
3443
|
-
}
|
|
3444
|
-
|
|
3445
|
-
/**
|
|
3446
|
-
* 1. See: https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/
|
|
3447
|
-
*/
|
|
3448
|
-
*,
|
|
3449
|
-
*::before,
|
|
3450
|
-
*::after {
|
|
3451
|
-
box-sizing: inherit; /* 1 */
|
|
3452
|
-
}
|
|
3453
|
-
|
|
3454
|
-
/**
|
|
3455
|
-
* 1. Without this fonts are too heavy weight in OS X Firefox
|
|
3456
|
-
* 2. Design decision
|
|
3457
|
-
* 3. Preferable for the body to fill viewport, even when empty
|
|
3458
|
-
*/
|
|
3459
|
-
body {
|
|
3460
|
-
-moz-osx-font-smoothing: grayscale; /* 1 */
|
|
3461
|
-
-webkit-font-smoothing: antialiased; /* 2 */
|
|
3462
|
-
color: ${({ theme }) => theme.color.grey900};
|
|
3463
|
-
font-family: ${({ theme }) => theme.font.family.default};
|
|
3464
|
-
font-size: ${({ theme }) => theme.font.size.default};
|
|
3465
|
-
font-weight: ${({ theme }) => theme.font.weight.regular};
|
|
3466
|
-
line-height: 1.5;
|
|
3467
|
-
min-height: 100vh; /* 3 */
|
|
3468
|
-
}
|
|
3469
|
-
`}
|
|
3470
|
-
`;
|
|
3471
|
-
//#endregion
|
|
3472
|
-
//#region src/providers/VHSProvider.tsx
|
|
3473
|
-
const VHSProvider = ({ children, theme = {}, globalStylesIncluded = true, skipAnimations = false, Link }) => {
|
|
3474
|
-
return /* @__PURE__ */ jsxs(VHSThemeProvider, {
|
|
3475
|
-
theme,
|
|
3476
|
-
children: [globalStylesIncluded ? /* @__PURE__ */ jsx(GlobalStyle$1, {}) : null, /* @__PURE__ */ jsx(LiveAnnouncer, { children: /* @__PURE__ */ jsx(MotionConfig, {
|
|
3477
|
-
reducedMotion: skipAnimations ? "always" : "user",
|
|
3478
|
-
children: /* @__PURE__ */ jsx(WrapperProvider, {
|
|
3479
|
-
value: { Link },
|
|
3480
|
-
children: /* @__PURE__ */ jsx(ModalProvider, { children: /* @__PURE__ */ jsx(ToastProvider, { children }) })
|
|
3481
|
-
})
|
|
3482
|
-
}) })]
|
|
3483
|
-
});
|
|
3484
|
-
};
|
|
3485
|
-
//#endregion
|
|
3486
|
-
//#region src/hooks/useBoolean/useBoolean.ts
|
|
3487
|
-
const useBoolean = (initialValue = false) => {
|
|
3488
|
-
const [value, setValue] = useState(initialValue);
|
|
3489
|
-
return [
|
|
3490
|
-
value,
|
|
3491
|
-
useCallback(() => setValue((val) => !val), []),
|
|
3492
|
-
useCallback(() => setValue(true), []),
|
|
3493
|
-
useCallback(() => setValue(false), []),
|
|
3494
|
-
setValue
|
|
3495
|
-
];
|
|
3496
|
-
};
|
|
3497
|
-
//#endregion
|
|
3498
|
-
//#region src/private/hooks/useTimedToggle/useTimedToggle.ts
|
|
3499
|
-
const useTimedToggle = (initialValue) => {
|
|
3500
|
-
const [value, setValue] = useState(false);
|
|
3501
|
-
const timeoutRef = useRef(void 0);
|
|
3502
|
-
const initialValueRef = useRef(initialValue);
|
|
3503
|
-
const toggleValue = (timeout) => {
|
|
3504
|
-
clearTimeout(timeoutRef.current);
|
|
3505
|
-
setValue(!initialValueRef.current);
|
|
3506
|
-
timeoutRef.current = window.setTimeout(() => setValue(initialValueRef.current), timeout);
|
|
3507
|
-
};
|
|
3508
|
-
useEffect(() => () => clearTimeout(timeoutRef.current), []);
|
|
3509
|
-
return [value, toggleValue];
|
|
3510
|
-
};
|
|
3511
|
-
//#endregion
|
|
3512
|
-
//#region src/hooks/useClipboard/useClipboard.ts
|
|
3513
|
-
const useClipboard = (textToCopy, timeout = 1500) => {
|
|
3514
|
-
const [hasCopied, toggleHasCopied] = useTimedToggle(false);
|
|
3515
|
-
const [failedToCopy, toggleFailedToCopy] = useTimedToggle(false);
|
|
3516
|
-
return [
|
|
3517
|
-
useCallback(async () => {
|
|
3518
|
-
try {
|
|
3519
|
-
await copyToClipboard(textToCopy);
|
|
3520
|
-
if (timeout && timeout > 0) toggleHasCopied(timeout);
|
|
3521
|
-
} catch (error) {
|
|
3522
|
-
if (error instanceof Error) toggleFailedToCopy(timeout);
|
|
3523
|
-
}
|
|
3524
|
-
}, [
|
|
3525
|
-
textToCopy,
|
|
3526
|
-
timeout,
|
|
3527
|
-
toggleHasCopied,
|
|
3528
|
-
toggleFailedToCopy
|
|
3529
|
-
]),
|
|
3530
|
-
hasCopied,
|
|
3531
|
-
failedToCopy
|
|
3532
|
-
];
|
|
3533
|
-
};
|
|
3534
|
-
//#endregion
|
|
3535
|
-
//#region src/hooks/useElementObserver/useElementObserver.ts
|
|
3536
|
-
const initialRect = {
|
|
3537
|
-
width: 0,
|
|
3538
|
-
height: 0,
|
|
3539
|
-
top: 0,
|
|
3540
|
-
left: 0,
|
|
3541
|
-
bottom: 0,
|
|
3542
|
-
right: 0,
|
|
3543
|
-
x: 0,
|
|
3544
|
-
y: 0
|
|
3545
|
-
};
|
|
3546
|
-
const useElementObserver = () => {
|
|
3547
|
-
const ref = useRef(null);
|
|
3548
|
-
const [rect, setRect] = useState(initialRect);
|
|
3549
|
-
useLayoutEffect(() => {
|
|
3550
|
-
if (!ref.current) return;
|
|
3551
|
-
const observer = new window.ResizeObserver((entries) => {
|
|
3552
|
-
if (entries[0]) {
|
|
3553
|
-
const { width, height, top, left, bottom, right, x, y } = entries[0].contentRect;
|
|
3554
|
-
setRect({
|
|
3555
|
-
width,
|
|
3556
|
-
height,
|
|
3557
|
-
top,
|
|
3558
|
-
left,
|
|
3559
|
-
bottom,
|
|
3560
|
-
right,
|
|
3561
|
-
x,
|
|
3562
|
-
y
|
|
3563
|
-
});
|
|
3564
|
-
}
|
|
3565
|
-
});
|
|
3566
|
-
observer.observe(ref.current);
|
|
3567
|
-
return () => {
|
|
3568
|
-
observer.disconnect();
|
|
3569
|
-
};
|
|
3570
|
-
}, []);
|
|
3571
|
-
return [ref, rect];
|
|
3572
|
-
};
|
|
3573
|
-
//#endregion
|
|
3574
|
-
//#region src/hooks/useEvent/useEvent.ts
|
|
3575
|
-
const isEventTargetSupported = (eventTarget) => Boolean(typeof eventTarget === "object" && eventTarget?.addEventListener);
|
|
3576
|
-
const useEvent = (eventName, eventHandler, eventTarget = window, eventOptions = {}) => {
|
|
3577
|
-
const savedEventHandler = useRef(void 0);
|
|
3578
|
-
const savedEventOptions = useRef(void 0);
|
|
3579
|
-
useEffect(() => {
|
|
3580
|
-
savedEventHandler.current = eventHandler;
|
|
3581
|
-
}, [eventHandler]);
|
|
3582
|
-
useEffect(() => {
|
|
3583
|
-
savedEventOptions.current = eventOptions;
|
|
3584
|
-
}, [eventOptions]);
|
|
3585
|
-
useEffect(() => {
|
|
3586
|
-
if (!eventName || !isEventTargetSupported(eventTarget)) return;
|
|
3587
|
-
const eventListener = (event) => {
|
|
3588
|
-
if (savedEventHandler.current !== void 0) return savedEventHandler.current(event);
|
|
3589
|
-
return () => {};
|
|
3590
|
-
};
|
|
3591
|
-
eventTarget.addEventListener(eventName, eventListener, savedEventOptions.current);
|
|
3592
|
-
return () => {
|
|
3593
|
-
eventTarget.removeEventListener(eventName, eventListener, savedEventOptions.current);
|
|
3594
|
-
};
|
|
3595
|
-
}, [
|
|
3596
|
-
eventName,
|
|
3597
|
-
eventTarget,
|
|
3598
|
-
savedEventOptions
|
|
3599
|
-
]);
|
|
3600
|
-
};
|
|
3601
|
-
//#endregion
|
|
3602
|
-
//#region src/hooks/useFocusTrap/helpers.ts
|
|
3603
|
-
const FOCUSABLE_ELEMENT_SELECTORS = "a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, [tabindex=\"0\"], [contenteditable]";
|
|
3604
|
-
const isHiddenElement = (element) => {
|
|
3605
|
-
const { display, visibility } = window.getComputedStyle(element);
|
|
3606
|
-
const isHidden = display === "none" || element.style.display === "none" || visibility === "none" || element.style.visibility === "hidden";
|
|
3607
|
-
return element.offsetWidth <= 0 && element.offsetHeight <= 0 || isHidden;
|
|
3608
|
-
};
|
|
3609
|
-
const isVisibleElement = (element) => {
|
|
3610
|
-
let parentElement = element;
|
|
3611
|
-
while (parentElement) {
|
|
3612
|
-
if (parentElement === document.body) break;
|
|
3613
|
-
if (isHiddenElement(parentElement)) return false;
|
|
3614
|
-
parentElement = parentElement.parentNode;
|
|
3615
|
-
}
|
|
3616
|
-
return true;
|
|
3617
|
-
};
|
|
3618
|
-
const getElementTabIndex = (element) => {
|
|
3619
|
-
const tabIndex = element.getAttribute("tabindex");
|
|
3620
|
-
return Number.parseInt(tabIndex ?? void 0, 10);
|
|
3621
|
-
};
|
|
3622
|
-
const isTabIndexNaN = (element) => {
|
|
3623
|
-
const tabIndex = getElementTabIndex(element);
|
|
3624
|
-
return Number.isNaN(tabIndex);
|
|
3625
|
-
};
|
|
3626
|
-
const isFocusableElement = (element) => {
|
|
3627
|
-
const tabbableNodeRegEx = /input|select|textarea|button|object/;
|
|
3628
|
-
const nodeName = element.nodeName.toLowerCase();
|
|
3629
|
-
const isTabIndexNotNaN = !isTabIndexNaN(element);
|
|
3630
|
-
const isFocusable = tabbableNodeRegEx.test(nodeName) && !element.disabled || (element instanceof HTMLAnchorElement ? element.href || isTabIndexNotNaN : isTabIndexNotNaN);
|
|
3631
|
-
return Boolean(isFocusable) && isVisibleElement(element);
|
|
3632
|
-
};
|
|
3633
|
-
const isTabbableElement = (element) => {
|
|
3634
|
-
const tabIndex = getElementTabIndex(element);
|
|
3635
|
-
return (isTabIndexNaN(element) || tabIndex >= 0) && isFocusableElement(element);
|
|
3636
|
-
};
|
|
3637
|
-
const findTabbableDescendants = (element) => Array.from(element.querySelectorAll(FOCUSABLE_ELEMENT_SELECTORS)).filter(isTabbableElement);
|
|
3638
|
-
const focusLaterElements = [];
|
|
3639
|
-
let focusElement = null;
|
|
3640
|
-
let needToFocus = false;
|
|
3641
|
-
const handleBlur = () => {
|
|
3642
|
-
needToFocus = true;
|
|
3643
|
-
};
|
|
3644
|
-
const handleFocus = () => {
|
|
3645
|
-
if (needToFocus) {
|
|
3646
|
-
needToFocus = false;
|
|
3647
|
-
if (!focusElement) return;
|
|
3648
|
-
if (focusElement.contains(document.activeElement)) return;
|
|
3649
|
-
(findTabbableDescendants(focusElement)[0] ?? focusElement).focus();
|
|
3650
|
-
}
|
|
3651
|
-
};
|
|
3652
|
-
const markForFocusLater = () => {
|
|
3653
|
-
const element = document.activeElement;
|
|
3654
|
-
if (element !== null) focusLaterElements.push(element);
|
|
3655
|
-
};
|
|
3656
|
-
const returnFocus = () => {
|
|
3657
|
-
let toFocus = null;
|
|
3658
|
-
try {
|
|
3659
|
-
toFocus = focusLaterElements.pop();
|
|
3660
|
-
if (toFocus) toFocus.focus();
|
|
3661
|
-
} catch {
|
|
3662
|
-
console.warn(`You tried to return focus to ${coerceToString(toFocus)} but it is not in the DOM anymore`);
|
|
3663
|
-
}
|
|
3664
|
-
};
|
|
3665
|
-
const setupScopedFocus = (element) => {
|
|
3666
|
-
focusElement = element;
|
|
3667
|
-
document.addEventListener("focusout", handleBlur, false);
|
|
3668
|
-
document.addEventListener("focusin", handleFocus, true);
|
|
3669
|
-
};
|
|
3670
|
-
const teardownScopedFocus = () => {
|
|
3671
|
-
focusElement = null;
|
|
3672
|
-
document.removeEventListener("focusout", handleBlur);
|
|
3673
|
-
document.removeEventListener("focusin", handleFocus);
|
|
3674
|
-
};
|
|
3675
|
-
const scopeTab = (node, event) => {
|
|
3676
|
-
const tabbable = findTabbableDescendants(node);
|
|
3677
|
-
if (!tabbable.length) {
|
|
3678
|
-
event.preventDefault();
|
|
3679
|
-
return;
|
|
3680
|
-
}
|
|
3681
|
-
if (!(tabbable[event.shiftKey ? 0 : tabbable.length - 1] === document.activeElement || node === document.activeElement)) return;
|
|
3682
|
-
event.preventDefault();
|
|
3683
|
-
const target = tabbable[event.shiftKey ? tabbable.length - 1 : 0];
|
|
3684
|
-
if (target) target.focus();
|
|
3685
|
-
};
|
|
3686
|
-
const createAriaHider = (containerNode, selector) => {
|
|
3687
|
-
selector ??= "body > :not(script)";
|
|
3688
|
-
const rootNodes = Array.from(document.querySelectorAll(selector)).map((node) => {
|
|
3689
|
-
if (node.contains(containerNode)) return;
|
|
3690
|
-
const ariaHidden = node.getAttribute("aria-hidden");
|
|
3691
|
-
if (ariaHidden === null || ariaHidden === "false") node.setAttribute("aria-hidden", "true");
|
|
3692
|
-
return {
|
|
3693
|
-
node,
|
|
3694
|
-
ariaHidden
|
|
3695
|
-
};
|
|
3696
|
-
});
|
|
3697
|
-
return () => {
|
|
3698
|
-
rootNodes.forEach((item) => {
|
|
3699
|
-
if (!item) return;
|
|
3700
|
-
if (item.ariaHidden === null) item.node.removeAttribute("aria-hidden");
|
|
3701
|
-
else item.node.setAttribute("aria-hidden", item.ariaHidden);
|
|
3702
|
-
});
|
|
3703
|
-
};
|
|
3704
|
-
};
|
|
3705
|
-
//#endregion
|
|
3706
|
-
//#region src/hooks/useFocusTrap/useFocusTrap.ts
|
|
3707
|
-
const isRef = (val) => {
|
|
3708
|
-
return val !== null && typeof val === "object" && "current" in val;
|
|
3709
|
-
};
|
|
3710
|
-
const useFocusTrap = (active = true, options = {}) => {
|
|
3711
|
-
const ref = useRef(null);
|
|
3712
|
-
const restoreAriaRef = useRef(null);
|
|
3713
|
-
const setRef = useCallback((node) => {
|
|
3714
|
-
if (restoreAriaRef.current !== null) restoreAriaRef.current();
|
|
3715
|
-
if (ref.current) {
|
|
3716
|
-
returnFocus();
|
|
3717
|
-
teardownScopedFocus();
|
|
3718
|
-
}
|
|
3719
|
-
if (active && node !== null && node !== void 0) {
|
|
3720
|
-
setupScopedFocus(node);
|
|
3721
|
-
markForFocusLater();
|
|
3722
|
-
const processNode = (node2) => {
|
|
3723
|
-
restoreAriaRef.current = !(options.disableAriaHider ?? false) ? createAriaHider(node2) : null;
|
|
3724
|
-
let focusElement = null;
|
|
3725
|
-
if (isNotUndefined(options.focusSelector)) if (isRef(options.focusSelector)) focusElement = options.focusSelector.current;
|
|
3726
|
-
else focusElement = typeof options.focusSelector === "string" ? node2.querySelector(options.focusSelector) : options.focusSelector;
|
|
3727
|
-
if (!focusElement) {
|
|
3728
|
-
const children = Array.from(node2.querySelectorAll(FOCUSABLE_ELEMENT_SELECTORS));
|
|
3729
|
-
focusElement = children.find(isTabbableElement) ?? children.find(isFocusableElement) ?? null;
|
|
3730
|
-
if (!focusElement && isFocusableElement(node2)) focusElement = node2;
|
|
3731
|
-
}
|
|
3732
|
-
if (focusElement) focusElement.focus();
|
|
3733
|
-
if (!focusElement) console.warn("[useFocusTrap]: Failed to find a focusable element after activating the focus trap. Make sure to include at an element that can recieve focus. As a fallback, you can also set \"tabIndex={-1}\" on the focus trap node.", node2);
|
|
3734
|
-
};
|
|
3735
|
-
setTimeout(() => {
|
|
3736
|
-
if (node.ownerDocument) processNode(node);
|
|
3737
|
-
if (!node.ownerDocument) console.warn("[useFocusTrap]: The focus trap is not part of the DOM yet, so it is unable to correctly set focus. Make sure to render the ref node.", node);
|
|
3738
|
-
});
|
|
3739
|
-
ref.current = node;
|
|
3740
|
-
} else ref.current = null;
|
|
3741
|
-
}, [
|
|
3742
|
-
active,
|
|
3743
|
-
options.focusSelector,
|
|
3744
|
-
options.disableAriaHider
|
|
3745
|
-
]);
|
|
3746
|
-
useEffect(() => {
|
|
3747
|
-
if (!active) return;
|
|
3748
|
-
const handleKeyDown = (event) => {
|
|
3749
|
-
if (event.key === "Tab" && ref.current) scopeTab(ref.current, event);
|
|
3750
|
-
};
|
|
3751
|
-
document.addEventListener("keydown", handleKeyDown);
|
|
3752
|
-
return () => {
|
|
3753
|
-
document.removeEventListener("keydown", handleKeyDown);
|
|
3754
|
-
};
|
|
3755
|
-
}, [active]);
|
|
3756
|
-
return setRef;
|
|
3757
|
-
};
|
|
3758
|
-
//#endregion
|
|
3759
|
-
//#region src/hooks/useForceUpdate/useForceUpdate.ts
|
|
3760
|
-
const useForceUpdate = () => {
|
|
3761
|
-
const [, dispatch] = useState(Object.create(null));
|
|
3762
|
-
return useCallback(() => {
|
|
3763
|
-
dispatch(Object.create(null));
|
|
3764
|
-
}, [dispatch]);
|
|
3765
|
-
};
|
|
3766
|
-
//#endregion
|
|
3767
|
-
//#region src/hooks/useIsHovered/useIsHovered.ts
|
|
3768
|
-
const useIsHovered = () => {
|
|
3769
|
-
const [isHovered, setIsHovered] = useState(false);
|
|
3770
|
-
const onFocus = () => setIsHovered(true);
|
|
3771
|
-
const onMouseEnter = () => setIsHovered(true);
|
|
3772
|
-
const onMouseMove = () => setIsHovered(true);
|
|
3773
|
-
const onBlur = () => setIsHovered(false);
|
|
3774
|
-
const onMouseLeave = () => setIsHovered(false);
|
|
3775
|
-
const hoverProps = {
|
|
3776
|
-
onFocus,
|
|
3777
|
-
onMouseEnter,
|
|
3778
|
-
onBlur,
|
|
3779
|
-
onMouseLeave
|
|
3780
|
-
};
|
|
3781
|
-
if (!isHovered) hoverProps.onMouseMove = onMouseMove;
|
|
3782
|
-
return [
|
|
3783
|
-
isHovered,
|
|
3784
|
-
hoverProps,
|
|
3785
|
-
setIsHovered
|
|
3786
|
-
];
|
|
3787
|
-
};
|
|
3788
|
-
//#endregion
|
|
3789
|
-
//#region src/hooks/useKey/useKey.ts
|
|
3790
|
-
const createKeyPredicate = (keyFilter) => {
|
|
3791
|
-
if (typeof keyFilter === "function") return keyFilter;
|
|
3792
|
-
if (typeof keyFilter === "string") return (event) => event.key === keyFilter;
|
|
3793
|
-
if (keyFilter !== null && keyFilter !== void 0 && keyFilter) return () => true;
|
|
3794
|
-
return () => false;
|
|
3795
|
-
};
|
|
3796
|
-
const useKey = (key, eventHandler, options = {}, dependencies = [key]) => {
|
|
3797
|
-
const { eventName = "keydown", eventTarget, eventOptions } = options;
|
|
3798
|
-
useEvent(eventName, useMemo(() => {
|
|
3799
|
-
const predicate = createKeyPredicate(key);
|
|
3800
|
-
return (handlerEvent) => {
|
|
3801
|
-
if ([
|
|
3802
|
-
"INPUT",
|
|
3803
|
-
"TEXTAREA",
|
|
3804
|
-
"SELECT"
|
|
3805
|
-
].includes(document.activeElement?.nodeName ?? "") || document.activeElement?.isContentEditable) return;
|
|
3806
|
-
if (predicate(handlerEvent)) return eventHandler(handlerEvent);
|
|
3807
|
-
};
|
|
3808
|
-
}, dependencies), eventTarget, eventOptions);
|
|
3809
|
-
};
|
|
3810
|
-
//#endregion
|
|
3811
|
-
//#region src/hooks/useKeyPress/useKeyPress.ts
|
|
3812
|
-
const useKeyPress = (keyFilter) => {
|
|
3813
|
-
const [state, setState] = useState([false, null]);
|
|
3814
|
-
useKey(keyFilter, (event) => setState([true, event]), { eventName: "keydown" }, [state]);
|
|
3815
|
-
useKey(keyFilter, (event) => setState([false, event]), { eventName: "keyup" }, [state]);
|
|
3816
|
-
return state;
|
|
3817
|
-
};
|
|
3818
|
-
//#endregion
|
|
3819
|
-
//#region src/private/hooks/useUpdateEffect/useUpdateEffect.ts
|
|
3820
|
-
const useUpdateEffect = (effect, dependencies) => {
|
|
3821
|
-
const isInitialMount = useRef(true);
|
|
3822
|
-
useEffect(() => {
|
|
3823
|
-
if (isInitialMount.current) {
|
|
3824
|
-
isInitialMount.current = false;
|
|
3825
|
-
return () => {};
|
|
3826
|
-
}
|
|
3827
|
-
return effect();
|
|
3828
|
-
}, dependencies);
|
|
3829
|
-
};
|
|
3830
|
-
//#endregion
|
|
3831
|
-
//#region src/hooks/useKeyPressOnce/useKeyPressOnce.ts
|
|
3832
|
-
const useKeyPressOnce = (key, keydownHandler, keyupHandler) => {
|
|
3833
|
-
const [pressed, event] = useKeyPress(key);
|
|
3834
|
-
useUpdateEffect(() => {
|
|
3835
|
-
if (!pressed && keyupHandler && event !== null) keyupHandler(event);
|
|
3836
|
-
else if (pressed && keydownHandler && event !== null) keydownHandler(event);
|
|
3837
|
-
return () => {};
|
|
3838
|
-
}, [pressed]);
|
|
3839
|
-
};
|
|
3840
|
-
//#endregion
|
|
3841
|
-
//#region src/hooks/useLocalStorage/useLocalStorage.ts
|
|
3842
|
-
const useLocalStorage = (key, initialValue, storage = window.localStorage) => {
|
|
3843
|
-
const [storedValue, setStoredValue] = useState(() => {
|
|
3844
|
-
try {
|
|
3845
|
-
const item = storage.getItem(key);
|
|
3846
|
-
return item !== null && Boolean(item) ? JSON.parse(item) : initialValue;
|
|
3847
|
-
} catch (error) {
|
|
3848
|
-
console.log(error);
|
|
3849
|
-
return initialValue;
|
|
3850
|
-
}
|
|
3851
|
-
});
|
|
3852
|
-
const setValue = (value) => {
|
|
3853
|
-
try {
|
|
3854
|
-
const valueToStore = value instanceof Function ? value(storedValue) : value;
|
|
3855
|
-
setStoredValue(valueToStore);
|
|
3856
|
-
storage.setItem(key, JSON.stringify(valueToStore));
|
|
3857
|
-
} catch (error) {
|
|
3858
|
-
console.error(error);
|
|
3859
|
-
}
|
|
3860
|
-
};
|
|
3861
|
-
const removeValue = () => {
|
|
3862
|
-
storage.removeItem(key);
|
|
3863
|
-
setStoredValue(void 0);
|
|
3864
|
-
};
|
|
3865
|
-
return [
|
|
3866
|
-
storedValue,
|
|
3867
|
-
setValue,
|
|
3868
|
-
removeValue
|
|
3869
|
-
];
|
|
3870
|
-
};
|
|
3871
|
-
//#endregion
|
|
3872
|
-
//#region src/hooks/useMergedRefs/useMergedRefs.ts
|
|
3873
|
-
const useMergedRefs = (refs) => (element) => {
|
|
3874
|
-
refs.forEach((ref) => {
|
|
3875
|
-
if (typeof ref === "function") ref(element);
|
|
3876
|
-
else if (ref != null) ref.current = element;
|
|
3877
|
-
});
|
|
3878
|
-
};
|
|
3879
|
-
//#endregion
|
|
3880
|
-
//#region src/hooks/useOnClickOutside/useOnClickOutside.ts
|
|
3881
|
-
const useOnClickOutside = (ref, handler) => {
|
|
3882
|
-
useEffect(() => {
|
|
3883
|
-
const listener = (event) => {
|
|
3884
|
-
if (!ref.current || ref.current.contains(event.target)) return;
|
|
3885
|
-
handler(event);
|
|
3886
|
-
};
|
|
3887
|
-
document.addEventListener("mousedown", listener);
|
|
3888
|
-
document.addEventListener("touchstart", listener);
|
|
3889
|
-
return () => {
|
|
3890
|
-
document.removeEventListener("mousedown", listener);
|
|
3891
|
-
document.removeEventListener("touchstart", listener);
|
|
3892
|
-
};
|
|
3893
|
-
}, [ref, handler]);
|
|
3894
|
-
};
|
|
3895
|
-
//#endregion
|
|
3896
|
-
//#region src/hooks/usePreventScroll/usePreventScroll.ts
|
|
3897
|
-
const usePreventScroll = (locked) => {
|
|
3898
|
-
useLayoutEffect(() => {
|
|
3899
|
-
if (locked) {
|
|
3900
|
-
const originalStyle = window.getComputedStyle(document.body).overflow;
|
|
3901
|
-
document.body.style.overflow = "hidden";
|
|
3902
|
-
return () => {
|
|
3903
|
-
document.body.style.overflow = originalStyle;
|
|
3904
|
-
};
|
|
3905
|
-
}
|
|
3906
|
-
return () => {};
|
|
3907
|
-
}, [locked]);
|
|
3908
|
-
};
|
|
2554
|
+
::-webkit-file-upload-button {
|
|
2555
|
+
appearance: auto; /* 1 */
|
|
2556
|
+
font: inherit; /* 2 */
|
|
2557
|
+
}
|
|
2558
|
+
|
|
2559
|
+
/* Interactive
|
|
2560
|
+
========================================================================== */
|
|
2561
|
+
|
|
2562
|
+
/*
|
|
2563
|
+
* Add the correct display in Edge, IE 10+, and Firefox.
|
|
2564
|
+
*/
|
|
2565
|
+
|
|
2566
|
+
details {
|
|
2567
|
+
display: block;
|
|
2568
|
+
}
|
|
2569
|
+
|
|
2570
|
+
/*
|
|
2571
|
+
* Add the correct display in all browsers.
|
|
2572
|
+
*/
|
|
2573
|
+
|
|
2574
|
+
summary {
|
|
2575
|
+
display: list-item;
|
|
2576
|
+
}
|
|
2577
|
+
|
|
2578
|
+
/* Misc
|
|
2579
|
+
========================================================================== */
|
|
2580
|
+
|
|
2581
|
+
/**
|
|
2582
|
+
* Add the correct display in IE 10+.
|
|
2583
|
+
*/
|
|
2584
|
+
|
|
2585
|
+
template {
|
|
2586
|
+
display: none;
|
|
2587
|
+
}
|
|
2588
|
+
|
|
2589
|
+
/**
|
|
2590
|
+
* Add the correct display in IE 10.
|
|
2591
|
+
*/
|
|
2592
|
+
|
|
2593
|
+
[hidden] {
|
|
2594
|
+
display: none;
|
|
2595
|
+
}
|
|
2596
|
+
`}
|
|
2597
|
+
${css`
|
|
2598
|
+
/**
|
|
2599
|
+
* 1. Change from 'content-box' so that 'width' calculations are unaffected by 'padding' or 'border'
|
|
2600
|
+
* 2. Ensure the iOS tap highlight is transparent
|
|
2601
|
+
*/
|
|
2602
|
+
html {
|
|
2603
|
+
box-sizing: border-box; /* 1 */
|
|
2604
|
+
-webkit-tap-highlight-color: rgb(0 0 0 / 0%); /* 2 */
|
|
2605
|
+
}
|
|
2606
|
+
|
|
2607
|
+
/**
|
|
2608
|
+
* 1. See: https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/
|
|
2609
|
+
*/
|
|
2610
|
+
*,
|
|
2611
|
+
*::before,
|
|
2612
|
+
*::after {
|
|
2613
|
+
box-sizing: inherit; /* 1 */
|
|
2614
|
+
}
|
|
2615
|
+
|
|
2616
|
+
/**
|
|
2617
|
+
* 1. Without this fonts are too heavy weight in OS X Firefox
|
|
2618
|
+
* 2. Design decision
|
|
2619
|
+
* 3. Preferable for the body to fill viewport, even when empty
|
|
2620
|
+
*/
|
|
2621
|
+
body {
|
|
2622
|
+
-moz-osx-font-smoothing: grayscale; /* 1 */
|
|
2623
|
+
-webkit-font-smoothing: antialiased; /* 2 */
|
|
2624
|
+
color: ${({ theme }) => theme.color.grey900};
|
|
2625
|
+
font-family: ${({ theme }) => theme.font.family.default};
|
|
2626
|
+
font-size: ${({ theme }) => theme.font.size.default};
|
|
2627
|
+
font-weight: ${({ theme }) => theme.font.weight.regular};
|
|
2628
|
+
line-height: 1.5;
|
|
2629
|
+
min-height: 100vh; /* 3 */
|
|
2630
|
+
}
|
|
2631
|
+
`}
|
|
2632
|
+
`;
|
|
3909
2633
|
//#endregion
|
|
3910
|
-
//#region src/
|
|
3911
|
-
const
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
2634
|
+
//#region src/providers/VHSProvider.tsx
|
|
2635
|
+
const DEFAULT_THEME = {};
|
|
2636
|
+
const VHSProvider = ({ children, theme = DEFAULT_THEME, globalStylesIncluded = true, skipAnimations = false, Link }) => {
|
|
2637
|
+
return /* @__PURE__ */ jsxs(VHSThemeProvider, {
|
|
2638
|
+
theme,
|
|
2639
|
+
children: [globalStylesIncluded ? /* @__PURE__ */ jsx(GlobalStyle$1, {}) : null, /* @__PURE__ */ jsx(LiveAnnouncer, { children: /* @__PURE__ */ jsx(MotionConfig, {
|
|
2640
|
+
reducedMotion: skipAnimations ? "always" : "user",
|
|
2641
|
+
children: /* @__PURE__ */ jsx(WrapperProvider, {
|
|
2642
|
+
value: { Link },
|
|
2643
|
+
children: /* @__PURE__ */ jsx(ModalProvider, { children: /* @__PURE__ */ jsx(ToastProvider, { children }) })
|
|
2644
|
+
})
|
|
2645
|
+
}) })]
|
|
3915
2646
|
});
|
|
3916
|
-
return ref.current;
|
|
3917
2647
|
};
|
|
3918
2648
|
//#endregion
|
|
3919
2649
|
//#region src/private/components/ModalAnimation/ModalAnimation.tsx
|
|
@@ -3930,6 +2660,15 @@ const ModalAnimation = ({ children }) => {
|
|
|
3930
2660
|
}, child.key)) : null });
|
|
3931
2661
|
};
|
|
3932
2662
|
//#endregion
|
|
2663
|
+
//#region src/private/hooks/usePreviousValue/usePreviousValue.ts
|
|
2664
|
+
const usePreviousValue = (value) => {
|
|
2665
|
+
const ref = useRef(void 0);
|
|
2666
|
+
useEffect(() => {
|
|
2667
|
+
ref.current = value;
|
|
2668
|
+
});
|
|
2669
|
+
return ref.current;
|
|
2670
|
+
};
|
|
2671
|
+
//#endregion
|
|
3933
2672
|
//#region src/components/ModalBase/ModalBase.tsx
|
|
3934
2673
|
const LOCKED_SCROLL_CLASSNAME = "is-scroll-locked";
|
|
3935
2674
|
const GlobalStyle = createGlobalStyle`
|
|
@@ -3938,8 +2677,7 @@ const GlobalStyle = createGlobalStyle`
|
|
|
3938
2677
|
}
|
|
3939
2678
|
`;
|
|
3940
2679
|
const getFocusableElements = (root = document) => {
|
|
3941
|
-
|
|
3942
|
-
return Array.from(potentialElements).filter((element) => window.getComputedStyle(element).getPropertyValue("display") !== "none");
|
|
2680
|
+
return [...isNotNil(root) ? root.querySelectorAll("button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])") : []].filter((element) => window.getComputedStyle(element).getPropertyValue("display") !== "none");
|
|
3943
2681
|
};
|
|
3944
2682
|
const keepFocusWithinModal = (modalRoot, event) => {
|
|
3945
2683
|
const focusable = getFocusableElements(modalRoot.current);
|
|
@@ -3948,7 +2686,7 @@ const keepFocusWithinModal = (modalRoot, event) => {
|
|
|
3948
2686
|
return;
|
|
3949
2687
|
}
|
|
3950
2688
|
const firstFocusable = focusable[0];
|
|
3951
|
-
const lastFocusable = focusable
|
|
2689
|
+
const lastFocusable = focusable.at(-1);
|
|
3952
2690
|
if (focusable.length === 1) {
|
|
3953
2691
|
event.preventDefault();
|
|
3954
2692
|
firstFocusable.focus();
|
|
@@ -3980,7 +2718,7 @@ const ModalBaseContent = ({ className, initialShownState = false, isDismissible
|
|
|
3980
2718
|
const modalRoot = useRef(modalEl);
|
|
3981
2719
|
const attemptHide = useCallback(() => {
|
|
3982
2720
|
if (isNotUndefined(onBeforeHide)) {
|
|
3983
|
-
const { shouldShowMessage, message } = Object(onBeforeHide());
|
|
2721
|
+
const { shouldShowMessage, message } = new Object(onBeforeHide());
|
|
3984
2722
|
if (shouldShowMessage) {
|
|
3985
2723
|
if (!window.confirm(message)) return;
|
|
3986
2724
|
}
|
|
@@ -4014,7 +2752,7 @@ const ModalBaseContent = ({ className, initialShownState = false, isDismissible
|
|
|
4014
2752
|
};
|
|
4015
2753
|
if (isShown) {
|
|
4016
2754
|
const focusable = getFocusableElements(modalRoot.current);
|
|
4017
|
-
if (!focusable.
|
|
2755
|
+
if (!focusable.some((element) => element === document.activeElement)) {
|
|
4018
2756
|
const firstFocusable = focusable[0];
|
|
4019
2757
|
if (firstFocusable) firstFocusable.focus();
|
|
4020
2758
|
}
|
|
@@ -4030,7 +2768,7 @@ const ModalBaseContent = ({ className, initialShownState = false, isDismissible
|
|
|
4030
2768
|
}, [isShown, wasJustShown]);
|
|
4031
2769
|
useEffect(() => {
|
|
4032
2770
|
const modalRootEl = modalRoot.current;
|
|
4033
|
-
document.body.
|
|
2771
|
+
document.body.append(modalRootEl);
|
|
4034
2772
|
return () => modalRootEl.remove();
|
|
4035
2773
|
}, []);
|
|
4036
2774
|
useEffect(() => () => {
|
|
@@ -4056,11 +2794,40 @@ const ModalBaseContent = ({ className, initialShownState = false, isDismissible
|
|
|
4056
2794
|
] });
|
|
4057
2795
|
};
|
|
4058
2796
|
const ModalBase = (props) => {
|
|
4059
|
-
if (!isEqual
|
|
2797
|
+
if (!isEqual(useModalProviderContext(), {})) return /* @__PURE__ */ jsx(ModalBaseContent, { ...props });
|
|
4060
2798
|
return /* @__PURE__ */ jsx(ModalProvider, { children: /* @__PURE__ */ jsx(ModalBaseContent, { ...props }) });
|
|
4061
2799
|
};
|
|
4062
2800
|
ModalBase.displayName = "ModalBase_VHS";
|
|
4063
2801
|
//#endregion
|
|
2802
|
+
//#region src/private/helpers/mq/mq.ts
|
|
2803
|
+
const getMaxWidth = (breakpoint) => {
|
|
2804
|
+
const breakpointBuffer = .0025;
|
|
2805
|
+
const [value, unit] = getValueAndUnit(breakpoint);
|
|
2806
|
+
return `@media (max-width: ${Math.max(value - breakpointBuffer, 0)}${unit})`;
|
|
2807
|
+
};
|
|
2808
|
+
const xsAndUp = ({ theme }) => `@media (min-width: ${theme.breakpoint.xs})`;
|
|
2809
|
+
const smAndUp = ({ theme }) => `@media (min-width: ${theme.breakpoint.sm})`;
|
|
2810
|
+
const mdAndUp = ({ theme }) => `@media (min-width: ${theme.breakpoint.md})`;
|
|
2811
|
+
const lgAndUp = ({ theme }) => `@media (min-width: ${theme.breakpoint.lg})`;
|
|
2812
|
+
const xlAndUp = ({ theme }) => `@media (min-width: ${theme.breakpoint.xl})`;
|
|
2813
|
+
const xsAndDown = ({ theme }) => getMaxWidth(theme.breakpoint.xs);
|
|
2814
|
+
const smAndDown = ({ theme }) => getMaxWidth(theme.breakpoint.sm);
|
|
2815
|
+
const mdAndDown = ({ theme }) => getMaxWidth(theme.breakpoint.md);
|
|
2816
|
+
const lgAndDown = ({ theme }) => getMaxWidth(theme.breakpoint.lg);
|
|
2817
|
+
const xlAndDown = ({ theme }) => getMaxWidth(theme.breakpoint.xl);
|
|
2818
|
+
const mq = {
|
|
2819
|
+
xsAndUp,
|
|
2820
|
+
smAndUp,
|
|
2821
|
+
mdAndUp,
|
|
2822
|
+
lgAndUp,
|
|
2823
|
+
xlAndUp,
|
|
2824
|
+
xsAndDown,
|
|
2825
|
+
smAndDown,
|
|
2826
|
+
mdAndDown,
|
|
2827
|
+
lgAndDown,
|
|
2828
|
+
xlAndDown
|
|
2829
|
+
};
|
|
2830
|
+
//#endregion
|
|
4064
2831
|
//#region src/components/ButtonGroup/ButtonGroup.tsx
|
|
4065
2832
|
const getAlignment = (align) => {
|
|
4066
2833
|
if (align === "center") return "center";
|
|
@@ -4454,7 +3221,7 @@ const TooltipContent = ({ id, active, direction, children, forceState, shouldWra
|
|
|
4454
3221
|
const Truncate = ({ children, maxChars, terminator = "...", breakOnWords = false }) => {
|
|
4455
3222
|
if (isNil(children)) return null;
|
|
4456
3223
|
const canBeTruncated = children.length + terminator.length >= maxChars;
|
|
4457
|
-
if (!isString
|
|
3224
|
+
if (!isString(children) || maxChars <= 0 || !canBeTruncated) return /* @__PURE__ */ jsx(Fragment, { children });
|
|
4458
3225
|
let truncatedChild = children.slice(0, maxChars - terminator.length);
|
|
4459
3226
|
if (breakOnWords) {
|
|
4460
3227
|
const index = Math.max(truncatedChild.lastIndexOf(" "), truncatedChild.lastIndexOf("\n"));
|
|
@@ -4511,7 +3278,7 @@ const Tooltip = ({ label, direction = "top", duration = 2e3, eventType = "hover"
|
|
|
4511
3278
|
timer,
|
|
4512
3279
|
duration
|
|
4513
3280
|
]);
|
|
4514
|
-
if (isString
|
|
3281
|
+
if (isString(label) && label.length === 0) return /* @__PURE__ */ jsx(Fragment, { children });
|
|
4515
3282
|
let tooltipLabel = label;
|
|
4516
3283
|
if (maxChars !== null) tooltipLabel = /* @__PURE__ */ jsx(Truncate, {
|
|
4517
3284
|
breakOnWords: true,
|
|
@@ -4602,7 +3369,7 @@ const disabledStyle$6 = css`
|
|
|
4602
3369
|
&:focus {
|
|
4603
3370
|
background-color: transparent;
|
|
4604
3371
|
|
|
4605
|
-
svg {
|
|
3372
|
+
& svg {
|
|
4606
3373
|
color: ${({ $iconButtonColor }) => transparentize(.5, $iconButtonColor)};
|
|
4607
3374
|
}
|
|
4608
3375
|
}
|
|
@@ -4619,7 +3386,7 @@ const iconButtonStyle = css`
|
|
|
4619
3386
|
&:focus-visible {
|
|
4620
3387
|
background-color: ${({ $iconButtonColor }) => transparentize(.8, $iconButtonColor)};
|
|
4621
3388
|
|
|
4622
|
-
svg {
|
|
3389
|
+
& svg {
|
|
4623
3390
|
color: ${({ $iconButtonColor }) => $iconButtonColor};
|
|
4624
3391
|
}
|
|
4625
3392
|
}
|
|
@@ -4627,7 +3394,7 @@ const iconButtonStyle = css`
|
|
|
4627
3394
|
&:active {
|
|
4628
3395
|
background-color: ${({ $iconButtonColor }) => transparentize(.6, $iconButtonColor)};
|
|
4629
3396
|
|
|
4630
|
-
svg {
|
|
3397
|
+
& svg {
|
|
4631
3398
|
color: ${({ $iconButtonColor }) => $iconButtonColor};
|
|
4632
3399
|
}
|
|
4633
3400
|
}
|
|
@@ -4637,66 +3404,201 @@ const getIconButtonColor = (colorOverride, componentStyle, allThemeColors) => {
|
|
|
4637
3404
|
if (componentStyle === "dark") return allThemeColors.grey700;
|
|
4638
3405
|
return "#fff";
|
|
4639
3406
|
};
|
|
4640
|
-
const IconButtonComponent = styled.button`
|
|
4641
|
-
${buttonResetStyle}
|
|
4642
|
-
${iconButtonStyle}
|
|
4643
|
-
transition: all ${({ theme }) => theme.duration.productive.moderate};
|
|
4644
|
-
${({ disabled }) => disabled ? disabledStyle$6 : void 0}
|
|
4645
|
-
${({ size }) => {
|
|
4646
|
-
if (size === "sm") return smSizeStyle;
|
|
4647
|
-
if (size === "md") return mdSizeStyle;
|
|
4648
|
-
return lgSizeStyle;
|
|
4649
|
-
}};
|
|
4650
|
-
`;
|
|
4651
|
-
const IconButton = forwardRef(({ colorOverride, componentStyle = "dark", disabled = false, icon, label, onClick, preventTooltip = false, size = "md", tooltipDirection = "top", ...otherProps }, ref) => {
|
|
4652
|
-
const iconButtonColor = getIconButtonColor(colorOverride, componentStyle, useThemeColor());
|
|
4653
|
-
const Button = useMemo(() => /* @__PURE__ */ jsxs(IconButtonComponent, {
|
|
4654
|
-
ref,
|
|
4655
|
-
$componentStyle: componentStyle,
|
|
4656
|
-
$iconButtonColor: iconButtonColor,
|
|
4657
|
-
disabled,
|
|
4658
|
-
onClick,
|
|
4659
|
-
size,
|
|
4660
|
-
...otherProps,
|
|
4661
|
-
children: [/* @__PURE__ */ jsx(Fragment, { children: icon }), /* @__PURE__ */ jsx(ScreenReaderOnly, { children: label })]
|
|
4662
|
-
}), [
|
|
4663
|
-
componentStyle,
|
|
4664
|
-
disabled,
|
|
4665
|
-
icon,
|
|
4666
|
-
iconButtonColor,
|
|
4667
|
-
label,
|
|
4668
|
-
onClick,
|
|
4669
|
-
otherProps,
|
|
4670
|
-
ref,
|
|
4671
|
-
size
|
|
4672
|
-
]);
|
|
4673
|
-
if (preventTooltip) return Button;
|
|
4674
|
-
return /* @__PURE__ */ jsx(Tooltip, {
|
|
4675
|
-
direction: tooltipDirection,
|
|
4676
|
-
label,
|
|
4677
|
-
children: Button
|
|
4678
|
-
});
|
|
4679
|
-
});
|
|
4680
|
-
IconButton.displayName = "IconButton_VHS";
|
|
4681
|
-
//#endregion
|
|
4682
|
-
//#region src/private/components/ModalCloseButton/ModalCloseButton.tsx
|
|
4683
|
-
const ModalCloseButton$1 = ({ onClick, closeIconColorOverride }) => /* @__PURE__ */ jsx(IconButton, {
|
|
4684
|
-
"aria-label": "Close",
|
|
4685
|
-
colorOverride: closeIconColorOverride,
|
|
4686
|
-
icon: /* @__PURE__ */ jsx(Icon, {
|
|
4687
|
-
size: "sm",
|
|
4688
|
-
type: "close"
|
|
4689
|
-
}),
|
|
4690
|
-
onClick,
|
|
4691
|
-
preventTooltip: true,
|
|
4692
|
-
style: {
|
|
4693
|
-
position: "absolute",
|
|
4694
|
-
right: "16px",
|
|
4695
|
-
top: "16px",
|
|
4696
|
-
zIndex: 1
|
|
4697
|
-
}
|
|
4698
|
-
});
|
|
4699
|
-
ModalCloseButton$1.displayName = "ModalCloseButton";
|
|
3407
|
+
const IconButtonComponent = styled.button`
|
|
3408
|
+
${buttonResetStyle}
|
|
3409
|
+
${iconButtonStyle}
|
|
3410
|
+
transition: all ${({ theme }) => theme.duration.productive.moderate};
|
|
3411
|
+
${({ disabled }) => disabled ? disabledStyle$6 : void 0}
|
|
3412
|
+
${({ size }) => {
|
|
3413
|
+
if (size === "sm") return smSizeStyle;
|
|
3414
|
+
if (size === "md") return mdSizeStyle;
|
|
3415
|
+
return lgSizeStyle;
|
|
3416
|
+
}};
|
|
3417
|
+
`;
|
|
3418
|
+
const IconButton = forwardRef(({ colorOverride, componentStyle = "dark", disabled = false, icon, label, onClick, preventTooltip = false, size = "md", tooltipDirection = "top", ...otherProps }, ref) => {
|
|
3419
|
+
const iconButtonColor = getIconButtonColor(colorOverride, componentStyle, useThemeColor());
|
|
3420
|
+
const Button = useMemo(() => /* @__PURE__ */ jsxs(IconButtonComponent, {
|
|
3421
|
+
ref,
|
|
3422
|
+
$componentStyle: componentStyle,
|
|
3423
|
+
$iconButtonColor: iconButtonColor,
|
|
3424
|
+
disabled,
|
|
3425
|
+
onClick,
|
|
3426
|
+
size,
|
|
3427
|
+
...otherProps,
|
|
3428
|
+
children: [/* @__PURE__ */ jsx(Fragment, { children: icon }), /* @__PURE__ */ jsx(ScreenReaderOnly, { children: label })]
|
|
3429
|
+
}), [
|
|
3430
|
+
componentStyle,
|
|
3431
|
+
disabled,
|
|
3432
|
+
icon,
|
|
3433
|
+
iconButtonColor,
|
|
3434
|
+
label,
|
|
3435
|
+
onClick,
|
|
3436
|
+
otherProps,
|
|
3437
|
+
ref,
|
|
3438
|
+
size
|
|
3439
|
+
]);
|
|
3440
|
+
if (preventTooltip) return Button;
|
|
3441
|
+
return /* @__PURE__ */ jsx(Tooltip, {
|
|
3442
|
+
direction: tooltipDirection,
|
|
3443
|
+
label,
|
|
3444
|
+
children: Button
|
|
3445
|
+
});
|
|
3446
|
+
});
|
|
3447
|
+
IconButton.displayName = "IconButton_VHS";
|
|
3448
|
+
//#endregion
|
|
3449
|
+
//#region src/private/components/ModalCloseButton/ModalCloseButton.tsx
|
|
3450
|
+
const ModalCloseButton$1 = ({ onClick, closeIconColorOverride }) => /* @__PURE__ */ jsx(IconButton, {
|
|
3451
|
+
"aria-label": "Close",
|
|
3452
|
+
colorOverride: closeIconColorOverride,
|
|
3453
|
+
icon: /* @__PURE__ */ jsx(Icon, {
|
|
3454
|
+
size: "sm",
|
|
3455
|
+
type: "close"
|
|
3456
|
+
}),
|
|
3457
|
+
onClick,
|
|
3458
|
+
preventTooltip: true,
|
|
3459
|
+
style: {
|
|
3460
|
+
position: "absolute",
|
|
3461
|
+
right: "16px",
|
|
3462
|
+
top: "16px",
|
|
3463
|
+
zIndex: 1
|
|
3464
|
+
}
|
|
3465
|
+
});
|
|
3466
|
+
ModalCloseButton$1.displayName = "ModalCloseButton";
|
|
3467
|
+
//#endregion
|
|
3468
|
+
//#region src/private/helpers/getBackgroundGradient/getBackgroundGradient.ts
|
|
3469
|
+
const gradients = {
|
|
3470
|
+
defaultDarkOne: css`
|
|
3471
|
+
background-color: #222d66;
|
|
3472
|
+
background-image:
|
|
3473
|
+
radial-gradient(farthest-corner at top right, #222d66, transparent 70%),
|
|
3474
|
+
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
|
|
3475
|
+
radial-gradient(farthest-corner at bottom left, #6b84ff, transparent 57%),
|
|
3476
|
+
radial-gradient(farthest-corner at top left, #2949e5, transparent 68%);
|
|
3477
|
+
`,
|
|
3478
|
+
defaultDarkTwo: css`
|
|
3479
|
+
background-color: #222d66;
|
|
3480
|
+
background-image:
|
|
3481
|
+
radial-gradient(farthest-corner at top left, #6b84ff, transparent 100%),
|
|
3482
|
+
radial-gradient(farthest-corner at bottom left, #222d66, transparent 57%),
|
|
3483
|
+
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
|
|
3484
|
+
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
3485
|
+
`,
|
|
3486
|
+
defaultLightOne: css`
|
|
3487
|
+
background-color: #ccd5ff;
|
|
3488
|
+
background-image:
|
|
3489
|
+
radial-gradient(farthest-corner at bottom right, #ccd5ff, transparent 55%),
|
|
3490
|
+
radial-gradient(farthest-corner at top left, #ccd5ff, transparent 65%),
|
|
3491
|
+
radial-gradient(farthest-corner at top right, #6b84ff, transparent 50%),
|
|
3492
|
+
radial-gradient(farthest-corner at bottom left, #f7f8ff, transparent 50%);
|
|
3493
|
+
`,
|
|
3494
|
+
defaultLightTwo: css`
|
|
3495
|
+
background-color: #ccd5ff;
|
|
3496
|
+
background-image:
|
|
3497
|
+
radial-gradient(ellipse at top, #ccd5ff, transparent),
|
|
3498
|
+
radial-gradient(ellipse at bottom, #6b84ff, transparent);
|
|
3499
|
+
`,
|
|
3500
|
+
defaultMidOne: css`
|
|
3501
|
+
background-color: #6b84ff;
|
|
3502
|
+
background-image:
|
|
3503
|
+
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%),
|
|
3504
|
+
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
|
|
3505
|
+
radial-gradient(farthest-corner at top left, #6b84ff, transparent 80%),
|
|
3506
|
+
radial-gradient(farthest-corner at bottom left, #222d66, transparent 57%);
|
|
3507
|
+
`,
|
|
3508
|
+
defaultMidTwo: css`
|
|
3509
|
+
background-color: #6b84ff;
|
|
3510
|
+
background-image:
|
|
3511
|
+
radial-gradient(ellipse at top, #2949e5, transparent),
|
|
3512
|
+
radial-gradient(ellipse at bottom, #ccd5ff, transparent);
|
|
3513
|
+
`,
|
|
3514
|
+
green: css`
|
|
3515
|
+
background-color: #fafffa;
|
|
3516
|
+
background-image:
|
|
3517
|
+
radial-gradient(farthest-corner at bottom left, #b0e5a5, transparent 50%),
|
|
3518
|
+
radial-gradient(farthest-corner at top right, #268713, transparent 50%),
|
|
3519
|
+
radial-gradient(farthest-corner at top left, #44b62d, transparent 65%),
|
|
3520
|
+
radial-gradient(farthest-corner at bottom right, #44b62d, transparent 55%);
|
|
3521
|
+
`,
|
|
3522
|
+
greenWithPop: css`
|
|
3523
|
+
background-color: #fafffa;
|
|
3524
|
+
background-image:
|
|
3525
|
+
radial-gradient(farthest-corner at bottom left, #b0e5a5, transparent 50%),
|
|
3526
|
+
radial-gradient(farthest-corner at top right, #2949e5, transparent 50%),
|
|
3527
|
+
radial-gradient(farthest-corner at top left, #44b62d, transparent 65%),
|
|
3528
|
+
radial-gradient(farthest-corner at bottom right, #44b62d, transparent 55%);
|
|
3529
|
+
`,
|
|
3530
|
+
pink: css`
|
|
3531
|
+
background-color: #fffff0;
|
|
3532
|
+
background-image:
|
|
3533
|
+
radial-gradient(farthest-corner at bottom left, #ffc7e8, transparent 50%),
|
|
3534
|
+
radial-gradient(farthest-corner at top right, #e0128e, transparent 70%),
|
|
3535
|
+
radial-gradient(farthest-corner at top left, #ff40b3, transparent 65%),
|
|
3536
|
+
radial-gradient(farthest-corner at bottom right, #ff40b3, transparent 55%);
|
|
3537
|
+
`,
|
|
3538
|
+
pinkWithPop: css`
|
|
3539
|
+
background-color: #fffff0;
|
|
3540
|
+
background-image:
|
|
3541
|
+
radial-gradient(farthest-corner at top right, #e0128e, transparent 70%),
|
|
3542
|
+
radial-gradient(farthest-corner at top left, #ff40b3, transparent 65%),
|
|
3543
|
+
radial-gradient(farthest-corner at bottom right, #ff40b3, transparent 55%),
|
|
3544
|
+
radial-gradient(farthest-corner at bottom left, #2949e5, transparent 50%);
|
|
3545
|
+
`,
|
|
3546
|
+
playfulGradientOne: css`
|
|
3547
|
+
background-color: #f7f8ff;
|
|
3548
|
+
background-image:
|
|
3549
|
+
radial-gradient(farthest-corner at top left, #d65cff, transparent 68%),
|
|
3550
|
+
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 50%),
|
|
3551
|
+
radial-gradient(farthest-corner at bottom left, #ffc7e8, transparent 57%),
|
|
3552
|
+
radial-gradient(farthest-corner at top right, #ffcaba, transparent 70%);
|
|
3553
|
+
`,
|
|
3554
|
+
playfulGradientTwo: css`
|
|
3555
|
+
background-color: #f7f8ff;
|
|
3556
|
+
background-image:
|
|
3557
|
+
radial-gradient(farthest-corner at top left, #44b62d, transparent 68%),
|
|
3558
|
+
radial-gradient(farthest-corner at bottom right, #eff18d, transparent 50%),
|
|
3559
|
+
radial-gradient(farthest-corner at bottom left, #ccd5ff, transparent 57%),
|
|
3560
|
+
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
3561
|
+
`,
|
|
3562
|
+
purple: css`
|
|
3563
|
+
background-color: #f2caff;
|
|
3564
|
+
background-image:
|
|
3565
|
+
radial-gradient(ellipse at 0% 100%, #f9e5ff, transparent 50%),
|
|
3566
|
+
radial-gradient(ellipse at 100% 0%, #e093fa, transparent 70%);
|
|
3567
|
+
`,
|
|
3568
|
+
purpleWithPop: css`
|
|
3569
|
+
background-color: #f2caff;
|
|
3570
|
+
background-image:
|
|
3571
|
+
radial-gradient(farthest-corner at bottom left, #f2caff, transparent 50%),
|
|
3572
|
+
radial-gradient(farthest-corner at top left, #d65cff, transparent 65%),
|
|
3573
|
+
radial-gradient(farthest-corner at bottom right, #d65cff, transparent 55%),
|
|
3574
|
+
radial-gradient(farthest-corner at top right, #2949e5, transparent 70%);
|
|
3575
|
+
`,
|
|
3576
|
+
yellow: css`
|
|
3577
|
+
background-color: #fffff0;
|
|
3578
|
+
background-image:
|
|
3579
|
+
radial-gradient(farthest-corner at bottom left, #eff18d, transparent 50%),
|
|
3580
|
+
radial-gradient(farthest-corner at top right, #bcbf19, transparent 70%),
|
|
3581
|
+
radial-gradient(farthest-corner at top left, #e8ec1e, transparent 65%),
|
|
3582
|
+
radial-gradient(farthest-corner at bottom right, #e8ec1e, transparent 55%);
|
|
3583
|
+
`,
|
|
3584
|
+
yellowWithPop: css`
|
|
3585
|
+
background-color: #fffff0;
|
|
3586
|
+
background-image:
|
|
3587
|
+
radial-gradient(farthest-corner at bottom left, #eff18d, transparent 50%),
|
|
3588
|
+
radial-gradient(farthest-corner at top right, #bcbf19, transparent 70%),
|
|
3589
|
+
radial-gradient(farthest-corner at top left, #e8ec1e, transparent 65%),
|
|
3590
|
+
radial-gradient(farthest-corner at bottom right, #2949e5, transparent 55%);
|
|
3591
|
+
`
|
|
3592
|
+
};
|
|
3593
|
+
/**
|
|
3594
|
+
* Retrieves the CSS background gradient corresponding to the given gradient name.
|
|
3595
|
+
* If the specified gradient name is not found, the default gradient ('defaultDarkOne') is returned.
|
|
3596
|
+
* @param {GradientName} gradientName - The name of the gradient to retrieve.
|
|
3597
|
+
* @returns {FlattenSimpleInterpolation} The CSS string representing the specified gradient.
|
|
3598
|
+
*/
|
|
3599
|
+
const getBackgroundGradient = (gradientName) => {
|
|
3600
|
+
return isNotNil(gradientName) ? gradients[gradientName] : gradients.defaultDarkOne;
|
|
3601
|
+
};
|
|
4700
3602
|
//#endregion
|
|
4701
3603
|
//#region src/components/ActionModal/getModalBackgroundGradient.ts
|
|
4702
3604
|
const getModalBackgroundGradient = (illustrationBackgroundColor) => {
|
|
@@ -4897,7 +3799,7 @@ const colorVariants = {
|
|
|
4897
3799
|
};
|
|
4898
3800
|
const colorVariantKeys = Object.keys(colorVariants);
|
|
4899
3801
|
const multiplier = 31;
|
|
4900
|
-
const hashCode = (str) =>
|
|
3802
|
+
const hashCode = (str) => [...str].reduce((sum, char) => Math.trunc(Math.imul(multiplier, sum) + (char.codePointAt(0) ?? 0)), 0);
|
|
4901
3803
|
const generateContactAvatarColors = ({ seed, themeColors }) => {
|
|
4902
3804
|
return colorVariants[colorVariantKeys[Math.abs(hashCode(seed)) % colorVariantKeys.length]].map((themeColorToken) => themeColors[themeColorToken]).filter((color) => color !== void 0);
|
|
4903
3805
|
};
|
|
@@ -4907,9 +3809,9 @@ const containsEmojiCharacter = (char) => {
|
|
|
4907
3809
|
return /<a?:.+?:\d{18}>|\p{Extended_Pictographic}/gu.test(char);
|
|
4908
3810
|
};
|
|
4909
3811
|
const formatInitialsForDisplay = (initials) => {
|
|
4910
|
-
if (isNil(initials) || isEmptyString(initials) || isString
|
|
3812
|
+
if (isNil(initials) || isEmptyString(initials) || isString(initials) && containsEmojiCharacter(initials)) return "U";
|
|
4911
3813
|
if (typeof initials !== "string") return "U";
|
|
4912
|
-
return initials.
|
|
3814
|
+
return initials.slice(0, 1).toUpperCase();
|
|
4913
3815
|
};
|
|
4914
3816
|
//#endregion
|
|
4915
3817
|
//#region src/components/Avatar/Avatar.tsx
|
|
@@ -5020,7 +3922,7 @@ const shouldWrap = (src) => {
|
|
|
5020
3922
|
};
|
|
5021
3923
|
const getBackgroundImageValue = (src) => {
|
|
5022
3924
|
if (src !== void 0 && Array.isArray(src)) return src.map((imageSrc) => shouldWrap(imageSrc) ? `url('${imageSrc}')` : imageSrc).join(", ");
|
|
5023
|
-
if (src !== void 0 && src !== "" && isString
|
|
3925
|
+
if (src !== void 0 && src !== "" && isString(src)) return shouldWrap(src) ? `url('${src}')` : src;
|
|
5024
3926
|
};
|
|
5025
3927
|
const getOverflowStyle = (overflow) => {
|
|
5026
3928
|
if (overflow !== "") {
|
|
@@ -5431,7 +4333,7 @@ const UnstyledLinkComponent = styled.a`
|
|
|
5431
4333
|
`;
|
|
5432
4334
|
const appendParams = (href, params) => {
|
|
5433
4335
|
const keys = Object.keys(params);
|
|
5434
|
-
if (!keys
|
|
4336
|
+
if (!isNonEmptyArray(keys)) return href;
|
|
5435
4337
|
const url = new URL(href);
|
|
5436
4338
|
keys.forEach((key) => {
|
|
5437
4339
|
url.searchParams.set(key, params[key]);
|
|
@@ -5750,7 +4652,8 @@ LabelDescription.displayName = "LabelDescription_VHS";
|
|
|
5750
4652
|
const StyledFormFieldWrapper = styled.div`
|
|
5751
4653
|
width: 100%;
|
|
5752
4654
|
`;
|
|
5753
|
-
const
|
|
4655
|
+
const DEFAULT_LABEL_PROPS$8 = {};
|
|
4656
|
+
const FormFieldWrapper = ({ disabled = false, error = null, label = null, labelDescription = null, labelProps = DEFAULT_LABEL_PROPS$8, labelType = "label", name, children, labelId = null, ...otherProps }) => {
|
|
5754
4657
|
const computedId = labelId ?? `group-id-${name}`;
|
|
5755
4658
|
const computedAriaLabelledby = labelType === "legend" ? computedId : null;
|
|
5756
4659
|
const combinedLabelProps = {
|
|
@@ -5788,7 +4691,8 @@ const StyledOptionContainer$1 = styled.div`
|
|
|
5788
4691
|
flex-direction: ${({ direction }) => direction === "row" ? "row" : "column"};
|
|
5789
4692
|
gap: ${({ direction, theme }) => direction === "row" ? theme.spacing.space04 : theme.spacing.space01};
|
|
5790
4693
|
`;
|
|
5791
|
-
const
|
|
4694
|
+
const DEFAULT_LABEL_PROPS$7 = {};
|
|
4695
|
+
const CheckboxGroup = ({ direction = "column", disabled = false, error, label, labelDescription, labelProps = DEFAULT_LABEL_PROPS$7, name, onChange, options, value = false, ...otherProps }) => /* @__PURE__ */ jsx(FormFieldWrapper, {
|
|
5792
4696
|
disabled,
|
|
5793
4697
|
error,
|
|
5794
4698
|
label,
|
|
@@ -5903,6 +4807,45 @@ const CloseButton = ({ onClick, ...otherProps }) => /* @__PURE__ */ jsx(Button$1
|
|
|
5903
4807
|
});
|
|
5904
4808
|
CloseButton.displayName = "CloseButton_VHS";
|
|
5905
4809
|
//#endregion
|
|
4810
|
+
//#region src/private/hooks/useElementObserver/useElementObserver.ts
|
|
4811
|
+
const initialRect = {
|
|
4812
|
+
width: 0,
|
|
4813
|
+
height: 0,
|
|
4814
|
+
top: 0,
|
|
4815
|
+
left: 0,
|
|
4816
|
+
bottom: 0,
|
|
4817
|
+
right: 0,
|
|
4818
|
+
x: 0,
|
|
4819
|
+
y: 0
|
|
4820
|
+
};
|
|
4821
|
+
const useElementObserver = () => {
|
|
4822
|
+
const ref = useRef(null);
|
|
4823
|
+
const [rect, setRect] = useState(initialRect);
|
|
4824
|
+
useLayoutEffect(() => {
|
|
4825
|
+
if (!ref.current) return;
|
|
4826
|
+
const observer = new window.ResizeObserver((entries) => {
|
|
4827
|
+
if (entries[0]) {
|
|
4828
|
+
const { width, height, top, left, bottom, right, x, y } = entries[0].contentRect;
|
|
4829
|
+
setRect({
|
|
4830
|
+
width,
|
|
4831
|
+
height,
|
|
4832
|
+
top,
|
|
4833
|
+
left,
|
|
4834
|
+
bottom,
|
|
4835
|
+
right,
|
|
4836
|
+
x,
|
|
4837
|
+
y
|
|
4838
|
+
});
|
|
4839
|
+
}
|
|
4840
|
+
});
|
|
4841
|
+
observer.observe(ref.current);
|
|
4842
|
+
return () => {
|
|
4843
|
+
observer.disconnect();
|
|
4844
|
+
};
|
|
4845
|
+
}, []);
|
|
4846
|
+
return [ref, rect];
|
|
4847
|
+
};
|
|
4848
|
+
//#endregion
|
|
5906
4849
|
//#region src/components/CollapsibleGroup/CollapsibleGroup.tsx
|
|
5907
4850
|
const DARKENING_AMOUNT = .08;
|
|
5908
4851
|
const BAR_HEIGHT = 48;
|
|
@@ -5915,6 +4858,10 @@ const CARET_DIRECTION_UP = "up";
|
|
|
5915
4858
|
const CARET_DIRECTION_DOWN = "down";
|
|
5916
4859
|
const CARET_DIRECTION_LEFT = "left";
|
|
5917
4860
|
const CARET_DIRECTION_RIGHT = "right";
|
|
4861
|
+
const DEFAULT_CARET_DIRECTION = {
|
|
4862
|
+
open: CARET_DIRECTION_DOWN,
|
|
4863
|
+
closed: CARET_DIRECTION_RIGHT
|
|
4864
|
+
};
|
|
5918
4865
|
const StyledCollapsibleGroup = styled.div`
|
|
5919
4866
|
& + & {
|
|
5920
4867
|
margin-top: ${({ theme }) => theme.spacing.space01};
|
|
@@ -6041,10 +4988,7 @@ const ActionControl = ({ children, showActionsOnHover }) => {
|
|
|
6041
4988
|
children
|
|
6042
4989
|
});
|
|
6043
4990
|
};
|
|
6044
|
-
const CollapsibleGroup = ({ actions, backgroundColor, caretDirection = {
|
|
6045
|
-
open: CARET_DIRECTION_DOWN,
|
|
6046
|
-
closed: CARET_DIRECTION_RIGHT
|
|
6047
|
-
}, children = null, contentPadding = null, hideCaret = false, id, isOpen, label, layout = "leading", onOpenChange, showActionsOnHover = true, showTransition = false, variant, ...otherProps }) => {
|
|
4991
|
+
const CollapsibleGroup = ({ actions, backgroundColor, caretDirection = DEFAULT_CARET_DIRECTION, children = null, contentPadding = null, hideCaret = false, id, isOpen, label, layout = "leading", onOpenChange, showActionsOnHover = true, showTransition = false, variant, ...otherProps }) => {
|
|
6048
4992
|
const [open, setOpen] = useState(isOpen ?? false);
|
|
6049
4993
|
const [dimensions, setDimensions] = useState({
|
|
6050
4994
|
width: void 0,
|
|
@@ -6259,7 +5203,8 @@ const errorsTitle = (count) => {
|
|
|
6259
5203
|
const scrollToField = (fieldName) => {
|
|
6260
5204
|
document.getElementById(`fieldset-${fieldName}`)?.scrollIntoView({ behavior: "smooth" });
|
|
6261
5205
|
};
|
|
6262
|
-
const
|
|
5206
|
+
const DEFAULT_ERRORS = {};
|
|
5207
|
+
const FieldErrorsList = ({ errors = DEFAULT_ERRORS, statusError }) => /* @__PURE__ */ jsxs(ErrorOrderedList, { children: [isNonEmptyString(statusError) ? /* @__PURE__ */ jsx(ErrorText, { children: statusError }) : null, Object.keys(errors).map((field) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(ErrorLink, {
|
|
6263
5208
|
"data-testid": `form-global-error-${field}`,
|
|
6264
5209
|
onClick: (event) => {
|
|
6265
5210
|
event.preventDefault();
|
|
@@ -6514,7 +5459,9 @@ const inputTypeMap = {
|
|
|
6514
5459
|
};
|
|
6515
5460
|
//#endregion
|
|
6516
5461
|
//#region src/private/components/FormConnectorCheckboxGroup/FormConnectorCheckboxGroup.tsx
|
|
6517
|
-
const
|
|
5462
|
+
const DEFAULT_LABEL_PROPS$6 = {};
|
|
5463
|
+
const DEFAULT_OPTIONS = [];
|
|
5464
|
+
const FormConnectorCheckboxGroup = ({ direction = "column", disabled = false, field: { name, value }, form: { errors, setFieldValue }, label, labelDescription, labelProps = DEFAULT_LABEL_PROPS$6, onChangeCustom, options = DEFAULT_OPTIONS }) => {
|
|
6518
5465
|
const onChangeSingle = (event, optionValue) => {
|
|
6519
5466
|
setFieldValue(optionValue, event.target.checked);
|
|
6520
5467
|
};
|
|
@@ -6523,7 +5470,7 @@ const FormConnectorCheckboxGroup = ({ direction = "column", disabled = false, fi
|
|
|
6523
5470
|
if (isArray(fieldValues)) if (event.target.checked) fieldValues.push(optionValue);
|
|
6524
5471
|
else {
|
|
6525
5472
|
const index = fieldValues.indexOf(optionValue);
|
|
6526
|
-
if (index
|
|
5473
|
+
if (index !== -1) fieldValues.splice(index, 1);
|
|
6527
5474
|
}
|
|
6528
5475
|
setFieldValue(optionValue, fieldValues);
|
|
6529
5476
|
};
|
|
@@ -6548,7 +5495,8 @@ const FormConnectorCheckboxGroup = ({ direction = "column", disabled = false, fi
|
|
|
6548
5495
|
FormConnectorCheckboxGroup.displayName = "FormConnectorCheckboxGroup";
|
|
6549
5496
|
//#endregion
|
|
6550
5497
|
//#region src/private/components/FormConnectorCustomField/FormConnectorCustomField.tsx
|
|
6551
|
-
const
|
|
5498
|
+
const DEFAULT_LABEL_PROPS$5 = {};
|
|
5499
|
+
const FormConnectorCustomField = ({ customComponent: Element, field, form, label = "", labelDescription, labelProps = DEFAULT_LABEL_PROPS$5, ...otherProps }) => {
|
|
6552
5500
|
const { name } = field;
|
|
6553
5501
|
const { errors } = form;
|
|
6554
5502
|
return /* @__PURE__ */ jsx(FormFieldWrapper, {
|
|
@@ -6566,6 +5514,16 @@ const FormConnectorCustomField = ({ customComponent: Element, field, form, label
|
|
|
6566
5514
|
};
|
|
6567
5515
|
FormConnectorCustomField.displayName = "FormConnectorCustomField";
|
|
6568
5516
|
//#endregion
|
|
5517
|
+
//#region src/private/helpers/coerceToString/coerceToString.ts
|
|
5518
|
+
/**
|
|
5519
|
+
* Coerces a value `value` into a string. If passed a null or undefined
|
|
5520
|
+
* value, returns an empty string.
|
|
5521
|
+
*
|
|
5522
|
+
* @param {*} value - a value of any type
|
|
5523
|
+
* @returns {string} - that value as a string
|
|
5524
|
+
*/
|
|
5525
|
+
const coerceToString = (value) => value === null || value === void 0 ? "" : String(value);
|
|
5526
|
+
//#endregion
|
|
6569
5527
|
//#region src/components/Input/InputStyledComponent.tsx
|
|
6570
5528
|
const focusStyle$1 = css`
|
|
6571
5529
|
border-color: ${({ theme }) => theme.color.brandBlue500};
|
|
@@ -6670,6 +5628,39 @@ const InputStyledComponent = styled.input`
|
|
|
6670
5628
|
${({ readOnly }) => readOnly && readOnlyStyle};
|
|
6671
5629
|
`;
|
|
6672
5630
|
//#endregion
|
|
5631
|
+
//#region src/private/helpers/copyToClipboard/copyToClipboard.ts
|
|
5632
|
+
/**
|
|
5633
|
+
* Copies a string to user's clipboard for easy pasting in another location
|
|
5634
|
+
*
|
|
5635
|
+
* @param {string} textToCopy - the string that will be copied to users clipboard
|
|
5636
|
+
* @returns {Promise} - Promise object that represents the copied string
|
|
5637
|
+
*/
|
|
5638
|
+
const copyToClipboard = async (textToCopy) => {
|
|
5639
|
+
if (navigator.clipboard) return navigator.clipboard.writeText(textToCopy).catch((error) => {
|
|
5640
|
+
if (error instanceof Error) throw error;
|
|
5641
|
+
throw new DOMException("The clipboard is not accessible", "NotAllowedError");
|
|
5642
|
+
});
|
|
5643
|
+
const span = document.createElement("span");
|
|
5644
|
+
span.textContent = textToCopy;
|
|
5645
|
+
span.style.whiteSpace = "pre";
|
|
5646
|
+
document.body.append(span);
|
|
5647
|
+
const selection = window.getSelection();
|
|
5648
|
+
const range = window.document.createRange();
|
|
5649
|
+
selection?.removeAllRanges();
|
|
5650
|
+
range.selectNode(span);
|
|
5651
|
+
selection?.addRange(range);
|
|
5652
|
+
let success = false;
|
|
5653
|
+
try {
|
|
5654
|
+
success = window.document.execCommand("copy");
|
|
5655
|
+
} catch (error) {
|
|
5656
|
+
console.error("error", error);
|
|
5657
|
+
}
|
|
5658
|
+
selection?.removeAllRanges();
|
|
5659
|
+
span.remove();
|
|
5660
|
+
if (success) return;
|
|
5661
|
+
throw new DOMException("The request is not allowed", "NotAllowedError");
|
|
5662
|
+
};
|
|
5663
|
+
//#endregion
|
|
6673
5664
|
//#region src/components/Input/ClickToCopy.tsx
|
|
6674
5665
|
const clickToCopyWrapperEnabledStyles = css`
|
|
6675
5666
|
input {
|
|
@@ -6768,7 +5759,7 @@ const ClickToCopy = ({ inputComponent: InputStyledComponent, inputProps, onClick
|
|
|
6768
5759
|
//#endregion
|
|
6769
5760
|
//#region src/components/Input/timePositionUtils.ts
|
|
6770
5761
|
const SEC_AND_MIN_MAX = 60;
|
|
6771
|
-
const stripInvalidCharacters = (string) => string.
|
|
5762
|
+
const stripInvalidCharacters = (string) => string.replaceAll(/[^0-9:]/g, "");
|
|
6772
5763
|
const parseNumber = (string) => string ? Number.parseFloat(string) : 0;
|
|
6773
5764
|
const timeUnitsToString = (seconds, minutes, hours) => {
|
|
6774
5765
|
let formattedString = isNotNil(hours) && Number(hours) > 0 ? `${hours}:` : "";
|
|
@@ -6776,7 +5767,7 @@ const timeUnitsToString = (seconds, minutes, hours) => {
|
|
|
6776
5767
|
return formattedString;
|
|
6777
5768
|
};
|
|
6778
5769
|
const formatString = (string) => {
|
|
6779
|
-
const [initialSeconds, initialMinutes, initialHours] = string.split(":").
|
|
5770
|
+
const [initialSeconds, initialMinutes, initialHours] = string.split(":").toReversed().map((stringNumber) => parseNumber(stringNumber));
|
|
6780
5771
|
let seconds = 0;
|
|
6781
5772
|
let minutes = 0;
|
|
6782
5773
|
if (isNotNil(initialSeconds)) {
|
|
@@ -6794,10 +5785,18 @@ const formatString = (string) => {
|
|
|
6794
5785
|
return timeUnitsToString(seconds, minutes, hours);
|
|
6795
5786
|
};
|
|
6796
5787
|
const timePositionFormat = (value) => {
|
|
6797
|
-
if (isNil(value) || !isString
|
|
5788
|
+
if (isNil(value) || !isString(value)) return "0:00";
|
|
6798
5789
|
return formatString(stripInvalidCharacters(value));
|
|
6799
5790
|
};
|
|
6800
5791
|
//#endregion
|
|
5792
|
+
//#region src/private/hooks/useMergedRefs/useMergedRefs.ts
|
|
5793
|
+
const useMergedRefs = (refs) => (element) => {
|
|
5794
|
+
refs.forEach((ref) => {
|
|
5795
|
+
if (typeof ref === "function") ref(element);
|
|
5796
|
+
else if (ref != null) ref.current = element;
|
|
5797
|
+
});
|
|
5798
|
+
};
|
|
5799
|
+
//#endregion
|
|
6801
5800
|
//#region src/components/Input/Input.tsx
|
|
6802
5801
|
const INPUT_TYPES_WITH_ICONS = new Set(["search"]);
|
|
6803
5802
|
const InputWrapper = styled.div`
|
|
@@ -6970,7 +5969,8 @@ const StyledOptionContainer = styled.div`
|
|
|
6970
5969
|
flex-direction: ${({ direction }) => direction === "row" ? "row" : "column"};
|
|
6971
5970
|
gap: ${({ direction, theme }) => direction === "row" ? theme.spacing.space04 : theme.spacing.space01};
|
|
6972
5971
|
`;
|
|
6973
|
-
const
|
|
5972
|
+
const DEFAULT_LABEL_PROPS$4 = {};
|
|
5973
|
+
const RadioGroup = ({ direction = "column", disabled = false, error, label, labelDescription, labelProps = DEFAULT_LABEL_PROPS$4, name, onChange, options, value, ...otherProps }) => /* @__PURE__ */ jsx(FormFieldWrapper, {
|
|
6974
5974
|
disabled,
|
|
6975
5975
|
error,
|
|
6976
5976
|
label,
|
|
@@ -6996,7 +5996,8 @@ const RadioGroup = ({ direction = "column", disabled = false, error, label, labe
|
|
|
6996
5996
|
RadioGroup.displayName = "RadioGroup_VHS";
|
|
6997
5997
|
//#endregion
|
|
6998
5998
|
//#region src/private/components/FormConnectorRadioGroup/FormConnectorRadioGroup.tsx
|
|
6999
|
-
const
|
|
5999
|
+
const DEFAULT_LABEL_PROPS$3 = {};
|
|
6000
|
+
const FormConnectorRadioGroup = ({ direction = "column", disabled = false, field: { name }, form: { errors, values, setFieldValue }, label = "", labelDescription, labelProps = DEFAULT_LABEL_PROPS$3, onChangeCustom, options }) => {
|
|
7000
6001
|
const handleOnChange = useCallback((_event, optionValue) => {
|
|
7001
6002
|
setFieldValue(name, optionValue);
|
|
7002
6003
|
if (onChangeCustom) onChangeCustom(optionValue);
|
|
@@ -7164,7 +6165,8 @@ const Select = forwardRef(({ ariaLabel, disabled = false, forceState, fullWidth
|
|
|
7164
6165
|
Select.displayName = "Select_VHS";
|
|
7165
6166
|
//#endregion
|
|
7166
6167
|
//#region src/private/components/FormConnectorSelect/FormConnectorSelect.tsx
|
|
7167
|
-
const
|
|
6168
|
+
const DEFAULT_LABEL_PROPS$2 = {};
|
|
6169
|
+
const FormConnectorSelect = ({ disabled = false, field: { name, value, onChange, onBlur }, form: { errors }, label, labelDescription, labelProps = DEFAULT_LABEL_PROPS$2, options, placeholder, onChangeCustom, ...otherProps }) => {
|
|
7168
6170
|
const getValue = (val) => {
|
|
7169
6171
|
if (isNil(val)) return "";
|
|
7170
6172
|
if (isBoolean(val)) return coerceToString(value);
|
|
@@ -7196,7 +6198,8 @@ const FormConnectorSelect = ({ disabled = false, field: { name, value, onChange,
|
|
|
7196
6198
|
FormConnectorSelect.displayName = "FormConnectorSelect";
|
|
7197
6199
|
//#endregion
|
|
7198
6200
|
//#region src/private/components/FormConnectorHidden/FormConnectorHidden.tsx
|
|
7199
|
-
const
|
|
6201
|
+
const DEFAULT_FORM = {};
|
|
6202
|
+
const FormConnectorHidden = ({ field: { name, value, onChange }, form: { setFieldValue } = DEFAULT_FORM, onChangeCustom, valueState = "", ...otherProps }) => {
|
|
7200
6203
|
useEffect(() => {
|
|
7201
6204
|
if (!valueState && isNil(value)) return;
|
|
7202
6205
|
if (valueState !== value && isNotUndefined(setFieldValue)) setFieldValue(name, valueState);
|
|
@@ -7242,7 +6245,7 @@ const escapeHtml = (stringToEscape) => {
|
|
|
7242
6245
|
let index;
|
|
7243
6246
|
let lastIndex = 0;
|
|
7244
6247
|
for (index = match.index; index < str.length; index++) {
|
|
7245
|
-
const charCode = str.
|
|
6248
|
+
const charCode = str.codePointAt(index);
|
|
7246
6249
|
if (charCode === doubleQuoteChar) escape = """;
|
|
7247
6250
|
else if (charCode === ampersandChar) escape = "&";
|
|
7248
6251
|
else if (charCode === singleQuoteChar) escape = "'";
|
|
@@ -7250,12 +6253,12 @@ const escapeHtml = (stringToEscape) => {
|
|
|
7250
6253
|
else if (charCode === greaterThanChar) escape = ">";
|
|
7251
6254
|
else escape = "";
|
|
7252
6255
|
if (escape !== "") {
|
|
7253
|
-
if (lastIndex !== index) html += str.
|
|
6256
|
+
if (lastIndex !== index) html += str.slice(lastIndex, index);
|
|
7254
6257
|
lastIndex = index + 1;
|
|
7255
6258
|
html += escape;
|
|
7256
6259
|
}
|
|
7257
6260
|
}
|
|
7258
|
-
return lastIndex !== index ? html + str.
|
|
6261
|
+
return lastIndex !== index ? html + str.slice(lastIndex, index) : html;
|
|
7259
6262
|
};
|
|
7260
6263
|
//#endregion
|
|
7261
6264
|
//#region src/components/RichTextEditor/serializers.ts
|
|
@@ -7363,20 +6366,20 @@ const TEXT_TAGS = {
|
|
|
7363
6366
|
const isTextNode = (el) => el.nodeType === 3;
|
|
7364
6367
|
const isElement = (el) => el.nodeType === 1;
|
|
7365
6368
|
const isCodeBlock = (element) => element.nodeName === "CODE";
|
|
7366
|
-
const isInlineCodeBlock = (element, elementChildren) => isCodeBlock(element) && isNotNil(elementChildren[0]) &&
|
|
6369
|
+
const isInlineCodeBlock = (element, elementChildren) => isCodeBlock(element) && isNotNil(elementChildren[0]) && !/\n/.test(elementChildren[0]);
|
|
7367
6370
|
const shouldCreateBlock = (el, children) => !isInlineCodeBlock(el, children) && isNotNil(ELEMENT_TAGS[el.nodeName]);
|
|
7368
6371
|
const shouldCreateText = (el, children) => isInlineCodeBlock(el, children) || isNotNil(TEXT_TAGS[el.nodeName]);
|
|
7369
|
-
const htmlChildIsEmptyText = (child) => isNotNil(child) && !isString
|
|
6372
|
+
const htmlChildIsEmptyText = (child) => isNotNil(child) && !isString(child) && child.text?.trim() === "";
|
|
7370
6373
|
const createEditorBlockElements = (children, el) => {
|
|
7371
6374
|
const { nodeName } = el;
|
|
7372
|
-
if (nodeName !== "IMG" && children.length === 1 && !isString
|
|
6375
|
+
if (nodeName !== "IMG" && children.length === 1 && !isString(children[0]) && isNotNil(children[0].text) && children[0].text?.trim() === "") return jsx$1("element", ELEMENT_TAGS.P(), emptyTextNode$1);
|
|
7373
6376
|
return jsx$1("element", ELEMENT_TAGS[nodeName](el), children);
|
|
7374
6377
|
};
|
|
7375
6378
|
const createEditorTextElements = (children, el) => {
|
|
7376
6379
|
const { nodeName } = el;
|
|
7377
6380
|
const attrs = TEXT_TAGS[nodeName]();
|
|
7378
6381
|
return children.map((child) => {
|
|
7379
|
-
if (!isString
|
|
6382
|
+
if (!isString(child) && isNotNil(child) && isNotNil(child.children)) return addAttrsToChildren(child, attrs);
|
|
7380
6383
|
if (htmlChildIsEmptyText(child)) return jsx$1("text", {}, emptyTextNode$1);
|
|
7381
6384
|
return jsx$1("text", attrs, child);
|
|
7382
6385
|
});
|
|
@@ -7385,8 +6388,8 @@ const blockWithOnlyTextChildren = (el) => el.nodeName === "BLOCKQUOTE" || el.nod
|
|
|
7385
6388
|
const getNodeChildren = (el, mapper) => {
|
|
7386
6389
|
let children = [];
|
|
7387
6390
|
if (isCodeBlock(el)) children = [...el.childNodes].map((node) => isTextNode(node) ? node.textContent : node.outerHTML);
|
|
7388
|
-
else if (blockWithOnlyTextChildren(el)) children = [...el.childNodes].filter((node) => node.textContent?.trim() !== "").flatMap(mapper);
|
|
7389
|
-
else children = [...el.childNodes].flatMap(mapper);
|
|
6391
|
+
else if (blockWithOnlyTextChildren(el)) children = [...el.childNodes].filter((node) => node.textContent?.trim() !== "").flatMap((node) => mapper(node));
|
|
6392
|
+
else children = [...el.childNodes].flatMap((node) => mapper(node));
|
|
7390
6393
|
return children;
|
|
7391
6394
|
};
|
|
7392
6395
|
const deserializeHTMLNode = (el) => {
|
|
@@ -7412,7 +6415,7 @@ const rteDeserializeHTML = (htmlString) => {
|
|
|
7412
6415
|
type: "paragraph",
|
|
7413
6416
|
children: [{ text: fragment[0].text }]
|
|
7414
6417
|
}];
|
|
7415
|
-
const lastNodeOfFragment = isArray(fragment) ? fragment
|
|
6418
|
+
const lastNodeOfFragment = isArray(fragment) ? fragment.at(-1) : void 0;
|
|
7416
6419
|
if (isArray(fragment) && Element.isElement(lastNodeOfFragment) && lastNodeOfFragment.type !== "paragraph") return [...fragment, {
|
|
7417
6420
|
type: "paragraph",
|
|
7418
6421
|
children: [{ text: "" }]
|
|
@@ -7589,6 +6592,25 @@ const toggleMark = (editor, format) => {
|
|
|
7589
6592
|
else Editor.addMark(editor, format, true);
|
|
7590
6593
|
};
|
|
7591
6594
|
//#endregion
|
|
6595
|
+
//#region src/private/helpers/isUrl/isUrl.ts
|
|
6596
|
+
/**
|
|
6597
|
+
* Loosely validates a URL string
|
|
6598
|
+
*
|
|
6599
|
+
* @param {*} str - a string to validate - could be an unknown type
|
|
6600
|
+
* @return {boolean} - whether string appears to be a url
|
|
6601
|
+
*/
|
|
6602
|
+
const isUrl = (str) => {
|
|
6603
|
+
const protocolAndDomain = /^(?:\w+:)?\/\/(\S+)$/;
|
|
6604
|
+
const localhostDomain = /^localhost[:?\d]*(?:[^:?\d]\S*)?$/;
|
|
6605
|
+
const nonLocalhostDomain = /^[^\s.]+\.\S{2,}$/;
|
|
6606
|
+
if (!isString(str)) return false;
|
|
6607
|
+
const match = protocolAndDomain.exec(str);
|
|
6608
|
+
if (!match) return false;
|
|
6609
|
+
const remaining = match[1];
|
|
6610
|
+
if (remaining === void 0 || !remaining) return false;
|
|
6611
|
+
return localhostDomain.test(remaining) || nonLocalhostDomain.test(remaining);
|
|
6612
|
+
};
|
|
6613
|
+
//#endregion
|
|
7592
6614
|
//#region src/components/RichTextEditor/utilities/withImagesPlugin.ts
|
|
7593
6615
|
const emptyTextNode = { text: "" };
|
|
7594
6616
|
const imageExtensions = [
|
|
@@ -7726,7 +6748,7 @@ const newLine = {
|
|
|
7726
6748
|
}]
|
|
7727
6749
|
};
|
|
7728
6750
|
const isLastChildBlankText = (listChildren) => {
|
|
7729
|
-
if (listChildren.length === 1) return (listChildren
|
|
6751
|
+
if (listChildren.length === 1) return (listChildren.at(-1)?.text)?.trim() === "";
|
|
7730
6752
|
return listChildren.find((el) => el.type === "link")?.children[0]?.text?.trim() === "";
|
|
7731
6753
|
};
|
|
7732
6754
|
const handleListEscape = (editor) => {
|
|
@@ -7966,14 +6988,15 @@ const getSelectedText = (editor) => {
|
|
|
7966
6988
|
const noTextSelected = (editor) => {
|
|
7967
6989
|
return getSelectedText(editor).trim() === "";
|
|
7968
6990
|
};
|
|
7969
|
-
const
|
|
6991
|
+
const DEFAULT_ENABLED_FORMATS = [
|
|
7970
6992
|
"BOLD",
|
|
7971
6993
|
"ITALIC",
|
|
7972
6994
|
"HEADING_1",
|
|
7973
6995
|
"LINK",
|
|
7974
6996
|
"BULLETED_LIST",
|
|
7975
6997
|
"IMAGE"
|
|
7976
|
-
]
|
|
6998
|
+
];
|
|
6999
|
+
const EditorButtons = ({ enabledFormats = DEFAULT_ENABLED_FORMATS, disabled = false }) => {
|
|
7977
7000
|
const editor = useSlate();
|
|
7978
7001
|
return /* @__PURE__ */ jsxs(ButtonContainer, { children: [
|
|
7979
7002
|
enabledFormats.includes(rteFormatTypes.BOLD) && /* @__PURE__ */ jsx(EditorButton, {
|
|
@@ -8103,7 +7126,7 @@ const RichTextEditor = ({ enabledFormats = Object.values(rteFormatTypes), value
|
|
|
8103
7126
|
return isNonEmptyString(text);
|
|
8104
7127
|
};
|
|
8105
7128
|
useEffect(() => {
|
|
8106
|
-
const isDefaultValue = isEqual
|
|
7129
|
+
const isDefaultValue = isEqual(value, defaultValue);
|
|
8107
7130
|
const valueString = rteSerializeToHTML(value);
|
|
8108
7131
|
const editorChildrenString = rteSerializeToHTML(editor.children);
|
|
8109
7132
|
/** if we have an external value and the text editor is not empty (and therefore valid) and the value string and children string is not equal to one another, we can safely update the editor. */
|
|
@@ -8129,7 +7152,7 @@ const RichTextEditor = ({ enabledFormats = Object.values(rteFormatTypes), value
|
|
|
8129
7152
|
toggleBlock(editor, "image");
|
|
8130
7153
|
Transforms.removeNodes(editor, { at: selection });
|
|
8131
7154
|
Transforms.move(editor, { reverse: true });
|
|
8132
|
-
const spanElement = editor.children.
|
|
7155
|
+
const spanElement = editor.children.find((child) => Element.isElement(child) && child.type === "span");
|
|
8133
7156
|
if (Element.isElement(spanElement) && spanElement.type === "span" && isNotNil(spanElement.children) && isNotNil(spanElement.children[0]) && isNotNil(spanElement.children[0].text) && spanElement.children[0].text.trim() !== "") Transforms.setNodes(editor, { type: "paragraph" }, {
|
|
8134
7157
|
match: (node) => Element.isElement(node) && node.type === "span" && isNotNil(node.children) && Text$1.isText(node.children[0]) && isNotNil(node.children[0].text) && node.children[0].text.trim() !== "",
|
|
8135
7158
|
split: true,
|
|
@@ -8182,7 +7205,8 @@ RichTextEditor.displayName = "RichTextEditor_VHS";
|
|
|
8182
7205
|
const Wrapper = styled.div`
|
|
8183
7206
|
margin-top: ${({ theme }) => theme.spacing.space02};
|
|
8184
7207
|
`;
|
|
8185
|
-
const
|
|
7208
|
+
const DEFAULT_LABEL_PROPS$1 = {};
|
|
7209
|
+
const FormConnectorRichTextEditor = ({ field: { name, value, onChange }, form: { errors }, label, labelDescription, labelProps = DEFAULT_LABEL_PROPS$1, placeholder = "", disabled = false, enabledFormats = Object.values(rteFormatTypes), useExternalValue = false, height, ...otherProps }) => {
|
|
8186
7210
|
const [rteValue, setRTEValue] = useState(rteDeserializeHTML(coerceToString(value)));
|
|
8187
7211
|
const labelId = isNotUndefined(label) ? `${name}-label-id` : void 0;
|
|
8188
7212
|
useEffect(() => {
|
|
@@ -8227,7 +7251,7 @@ const FormFieldSet = styled.fieldset`
|
|
|
8227
7251
|
padding: 0;
|
|
8228
7252
|
|
|
8229
7253
|
&[disabled] {
|
|
8230
|
-
label {
|
|
7254
|
+
& label {
|
|
8231
7255
|
pointer-events: none;
|
|
8232
7256
|
}
|
|
8233
7257
|
}
|
|
@@ -8235,6 +7259,7 @@ const FormFieldSet = styled.fieldset`
|
|
|
8235
7259
|
const FieldWrapper = styled(Field)`
|
|
8236
7260
|
resize: ${({ $resize }) => $resize};
|
|
8237
7261
|
`;
|
|
7262
|
+
const DEFAULT_LABEL_PROPS = {};
|
|
8238
7263
|
const fieldsMap = {
|
|
8239
7264
|
FormConnectorCheckboxGroup,
|
|
8240
7265
|
FormConnectorCustomField,
|
|
@@ -8244,7 +7269,7 @@ const fieldsMap = {
|
|
|
8244
7269
|
FormConnectorHidden,
|
|
8245
7270
|
FormConnectorRichTextEditor
|
|
8246
7271
|
};
|
|
8247
|
-
const FormField = forwardRef(({ resize = "vertical", customComponent, direction = "column", disabled = false, label, labelDescription, labelProps =
|
|
7272
|
+
const FormField = forwardRef(({ resize = "vertical", customComponent, direction = "column", disabled = false, label, labelDescription, labelProps = DEFAULT_LABEL_PROPS, name = "", onChangeCustom, options, placeholder = null, type, ...otherProps }, ref) => /* @__PURE__ */ jsx(FormFieldSet, {
|
|
8248
7273
|
disabled,
|
|
8249
7274
|
id: `fieldset-${name}`,
|
|
8250
7275
|
children: /* @__PURE__ */ jsx(FieldWrapper, {
|
|
@@ -8568,11 +7593,11 @@ const renderListFromArray = (listItems, variant, otherProps) => {
|
|
|
8568
7593
|
const List = ({ children, items, variant, ...otherProps }) => {
|
|
8569
7594
|
const listVariant = variant ?? "bullets";
|
|
8570
7595
|
if (isNotNil(children)) {
|
|
8571
|
-
if (Array.isArray(children) && !children
|
|
7596
|
+
if (Array.isArray(children) && !isNonEmptyArray(children)) return null;
|
|
8572
7597
|
return renderListComponent(children, listVariant, otherProps);
|
|
8573
7598
|
}
|
|
8574
7599
|
if (isNotNil(items)) {
|
|
8575
|
-
if (!items
|
|
7600
|
+
if (!isNonEmptyArray(items)) return null;
|
|
8576
7601
|
return renderListFromArray(items, listVariant, otherProps);
|
|
8577
7602
|
}
|
|
8578
7603
|
return null;
|
|
@@ -8634,7 +7659,8 @@ const menuContentCss = css`
|
|
|
8634
7659
|
const MenuContent = styled(DropdownMenuContent)`
|
|
8635
7660
|
${menuContentCss}
|
|
8636
7661
|
`;
|
|
8637
|
-
const
|
|
7662
|
+
const DEFAULT_TRIGGER_PROPS = {};
|
|
7663
|
+
const Menu = ({ align = "start", children, trigger, label, isOpen, triggerProps = DEFAULT_TRIGGER_PROPS, onOpenChange, onInteractOutside, ...props }) => {
|
|
8638
7664
|
return /* @__PURE__ */ jsxs(DropdownMenu, {
|
|
8639
7665
|
modal: false,
|
|
8640
7666
|
...isNotNil(onOpenChange) && isNotNil(isOpen) ? {
|
|
@@ -8754,6 +7780,10 @@ const NoIconContainer = styled.div`
|
|
|
8754
7780
|
text-align: center;
|
|
8755
7781
|
width: 0;
|
|
8756
7782
|
`;
|
|
7783
|
+
const DEFAULT_INDICATOR = /* @__PURE__ */ jsx(Icon, {
|
|
7784
|
+
size: "sm",
|
|
7785
|
+
type: "checkmark"
|
|
7786
|
+
});
|
|
8757
7787
|
const MenuItem = ({ children, label, description, badge, icon, renderAs, href, target, variant = "primary", ...props }) => {
|
|
8758
7788
|
const as = renderAs ?? (isNotUndefined(href) ? "a" : "div");
|
|
8759
7789
|
const targetProp = as === "a" && isNonEmptyString(target) ? { target } : {};
|
|
@@ -8781,10 +7811,7 @@ const MenuItem = ({ children, label, description, badge, icon, renderAs, href, t
|
|
|
8781
7811
|
})
|
|
8782
7812
|
});
|
|
8783
7813
|
};
|
|
8784
|
-
const CheckboxMenuItem = ({ children, label, description, badge, icon, indicator =
|
|
8785
|
-
size: "sm",
|
|
8786
|
-
type: "checkmark"
|
|
8787
|
-
}), ...props }) => {
|
|
7814
|
+
const CheckboxMenuItem = ({ children, label, description, badge, icon, indicator = DEFAULT_INDICATOR, ...props }) => {
|
|
8788
7815
|
return /* @__PURE__ */ jsx(DropdownMenuCheckboxItem, {
|
|
8789
7816
|
...props,
|
|
8790
7817
|
asChild: true,
|
|
@@ -8802,10 +7829,7 @@ const CheckboxMenuItem = ({ children, label, description, badge, icon, indicator
|
|
|
8802
7829
|
] }), /* @__PURE__ */ jsx(DropdownMenuItemIndicator, { children: indicator })] })
|
|
8803
7830
|
});
|
|
8804
7831
|
};
|
|
8805
|
-
const RadioMenuItem = ({ children, label, badge, description, icon, indicator =
|
|
8806
|
-
size: "sm",
|
|
8807
|
-
type: "checkmark"
|
|
8808
|
-
}), ...props }) => {
|
|
7832
|
+
const RadioMenuItem = ({ children, label, badge, description, icon, indicator = DEFAULT_INDICATOR, ...props }) => {
|
|
8809
7833
|
return /* @__PURE__ */ jsx(DropdownMenuRadioItem, {
|
|
8810
7834
|
...props,
|
|
8811
7835
|
asChild: true,
|
|
@@ -8902,6 +7926,22 @@ const SubMenu = ({ label, icon, description, children }) => {
|
|
|
8902
7926
|
}), /* @__PURE__ */ jsx(StyledMobileSubMenuItems, { children: isExpanded ? children : null })] });
|
|
8903
7927
|
};
|
|
8904
7928
|
//#endregion
|
|
7929
|
+
//#region src/private/hooks/useOnClickOutside/useOnClickOutside.ts
|
|
7930
|
+
const useOnClickOutside = (ref, handler) => {
|
|
7931
|
+
useEffect(() => {
|
|
7932
|
+
const listener = (event) => {
|
|
7933
|
+
if (!ref.current || ref.current.contains(event.target)) return;
|
|
7934
|
+
handler(event);
|
|
7935
|
+
};
|
|
7936
|
+
document.addEventListener("mousedown", listener);
|
|
7937
|
+
document.addEventListener("touchstart", listener);
|
|
7938
|
+
return () => {
|
|
7939
|
+
document.removeEventListener("mousedown", listener);
|
|
7940
|
+
document.removeEventListener("touchstart", listener);
|
|
7941
|
+
};
|
|
7942
|
+
}, [ref, handler]);
|
|
7943
|
+
};
|
|
7944
|
+
//#endregion
|
|
8905
7945
|
//#region src/private/components/Menu/Menu.tsx
|
|
8906
7946
|
const MENU_WIDTH_OPTIONS = ["fullWidth", "maxItem"];
|
|
8907
7947
|
const GUTTER_WIDTH = "8px";
|
|
@@ -8991,8 +8031,8 @@ const MenuItem$1 = styled.div`
|
|
|
8991
8031
|
}
|
|
8992
8032
|
|
|
8993
8033
|
/* support FileSelect; this prevents an inner button or link from inheriting unwanted space */
|
|
8994
|
-
button,
|
|
8995
|
-
a {
|
|
8034
|
+
& button,
|
|
8035
|
+
& a {
|
|
8996
8036
|
padding: 0;
|
|
8997
8037
|
}
|
|
8998
8038
|
|
|
@@ -9059,6 +8099,18 @@ const Menu$1 = forwardRef(({ items, menuHeader, width = "fullWidth", onClick, on
|
|
|
9059
8099
|
});
|
|
9060
8100
|
Menu$1.displayName = "Menu";
|
|
9061
8101
|
//#endregion
|
|
8102
|
+
//#region src/private/hooks/useBoolean/useBoolean.ts
|
|
8103
|
+
const useBoolean = (initialValue = false) => {
|
|
8104
|
+
const [value, setValue] = useState(initialValue);
|
|
8105
|
+
return [
|
|
8106
|
+
value,
|
|
8107
|
+
useCallback(() => setValue((val) => !val), []),
|
|
8108
|
+
useCallback(() => setValue(true), []),
|
|
8109
|
+
useCallback(() => setValue(false), []),
|
|
8110
|
+
setValue
|
|
8111
|
+
];
|
|
8112
|
+
};
|
|
8113
|
+
//#endregion
|
|
9062
8114
|
//#region src/components/MenuButton/MenuHeader.tsx
|
|
9063
8115
|
const HeaderAndButton = styled.div`
|
|
9064
8116
|
align-items: center;
|
|
@@ -9188,6 +8240,257 @@ const MenuButton = ({ label, menuAlignment = "right", menuItems, menuPosition =
|
|
|
9188
8240
|
};
|
|
9189
8241
|
MenuButton.displayName = "MenuButton_VHS";
|
|
9190
8242
|
//#endregion
|
|
8243
|
+
//#region src/private/hooks/useEvent/useEvent.ts
|
|
8244
|
+
const isEventTargetSupported = (eventTarget) => Boolean(typeof eventTarget === "object" && eventTarget?.addEventListener);
|
|
8245
|
+
const useEvent = (eventName, eventHandler, eventTarget = window, eventOptions = {}) => {
|
|
8246
|
+
const savedEventHandler = useRef(void 0);
|
|
8247
|
+
const savedEventOptions = useRef(void 0);
|
|
8248
|
+
useEffect(() => {
|
|
8249
|
+
savedEventHandler.current = eventHandler;
|
|
8250
|
+
}, [eventHandler]);
|
|
8251
|
+
useEffect(() => {
|
|
8252
|
+
savedEventOptions.current = eventOptions;
|
|
8253
|
+
}, [eventOptions]);
|
|
8254
|
+
useEffect(() => {
|
|
8255
|
+
if (!eventName || !isEventTargetSupported(eventTarget)) return;
|
|
8256
|
+
const eventListener = (event) => {
|
|
8257
|
+
if (savedEventHandler.current !== void 0) return savedEventHandler.current(event);
|
|
8258
|
+
return () => {};
|
|
8259
|
+
};
|
|
8260
|
+
eventTarget.addEventListener(eventName, eventListener, savedEventOptions.current);
|
|
8261
|
+
return () => {
|
|
8262
|
+
eventTarget.removeEventListener(eventName, eventListener, savedEventOptions.current);
|
|
8263
|
+
};
|
|
8264
|
+
}, [
|
|
8265
|
+
eventName,
|
|
8266
|
+
eventTarget,
|
|
8267
|
+
savedEventOptions
|
|
8268
|
+
]);
|
|
8269
|
+
};
|
|
8270
|
+
//#endregion
|
|
8271
|
+
//#region src/private/hooks/useKey/useKey.ts
|
|
8272
|
+
const createKeyPredicate = (keyFilter) => {
|
|
8273
|
+
if (typeof keyFilter === "function") return keyFilter;
|
|
8274
|
+
if (typeof keyFilter === "string") return (event) => event.key === keyFilter;
|
|
8275
|
+
if (keyFilter !== null && keyFilter !== void 0 && keyFilter) return () => true;
|
|
8276
|
+
return () => false;
|
|
8277
|
+
};
|
|
8278
|
+
const useKey = (key, eventHandler, options = {}, dependencies = [key]) => {
|
|
8279
|
+
const { eventName = "keydown", eventTarget, eventOptions } = options;
|
|
8280
|
+
useEvent(eventName, useMemo(() => {
|
|
8281
|
+
const predicate = createKeyPredicate(key);
|
|
8282
|
+
return (handlerEvent) => {
|
|
8283
|
+
if ([
|
|
8284
|
+
"INPUT",
|
|
8285
|
+
"TEXTAREA",
|
|
8286
|
+
"SELECT"
|
|
8287
|
+
].includes(document.activeElement?.nodeName ?? "") || document.activeElement?.isContentEditable) return;
|
|
8288
|
+
if (predicate(handlerEvent)) return eventHandler(handlerEvent);
|
|
8289
|
+
};
|
|
8290
|
+
}, dependencies), eventTarget, eventOptions);
|
|
8291
|
+
};
|
|
8292
|
+
//#endregion
|
|
8293
|
+
//#region src/private/hooks/useKeyPress/useKeyPress.ts
|
|
8294
|
+
const useKeyPress = (keyFilter) => {
|
|
8295
|
+
const [state, setState] = useState([false, null]);
|
|
8296
|
+
useKey(keyFilter, (event) => setState([true, event]), { eventName: "keydown" }, [state]);
|
|
8297
|
+
useKey(keyFilter, (event) => setState([false, event]), { eventName: "keyup" }, [state]);
|
|
8298
|
+
return state;
|
|
8299
|
+
};
|
|
8300
|
+
//#endregion
|
|
8301
|
+
//#region src/private/hooks/useUpdateEffect/useUpdateEffect.ts
|
|
8302
|
+
const useUpdateEffect = (effect, dependencies) => {
|
|
8303
|
+
const isInitialMount = useRef(true);
|
|
8304
|
+
useEffect(() => {
|
|
8305
|
+
if (isInitialMount.current) {
|
|
8306
|
+
isInitialMount.current = false;
|
|
8307
|
+
return () => {};
|
|
8308
|
+
}
|
|
8309
|
+
return effect();
|
|
8310
|
+
}, dependencies);
|
|
8311
|
+
};
|
|
8312
|
+
//#endregion
|
|
8313
|
+
//#region src/private/hooks/useKeyPressOnce/useKeyPressOnce.ts
|
|
8314
|
+
const useKeyPressOnce = (key, keydownHandler, keyupHandler) => {
|
|
8315
|
+
const [pressed, event] = useKeyPress(key);
|
|
8316
|
+
useUpdateEffect(() => {
|
|
8317
|
+
if (!pressed && keyupHandler && event !== null) keyupHandler(event);
|
|
8318
|
+
else if (pressed && keydownHandler && event !== null) keydownHandler(event);
|
|
8319
|
+
return () => {};
|
|
8320
|
+
}, [pressed]);
|
|
8321
|
+
};
|
|
8322
|
+
//#endregion
|
|
8323
|
+
//#region src/private/hooks/usePreventScroll/usePreventScroll.ts
|
|
8324
|
+
const usePreventScroll = (locked) => {
|
|
8325
|
+
useLayoutEffect(() => {
|
|
8326
|
+
if (locked) {
|
|
8327
|
+
const originalStyle = window.getComputedStyle(document.body).overflow;
|
|
8328
|
+
document.body.style.overflow = "hidden";
|
|
8329
|
+
return () => {
|
|
8330
|
+
document.body.style.overflow = originalStyle;
|
|
8331
|
+
};
|
|
8332
|
+
}
|
|
8333
|
+
return () => {};
|
|
8334
|
+
}, [locked]);
|
|
8335
|
+
};
|
|
8336
|
+
//#endregion
|
|
8337
|
+
//#region src/private/hooks/useFocusTrap/helpers.ts
|
|
8338
|
+
const FOCUSABLE_ELEMENT_SELECTORS = "a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, [tabindex=\"0\"], [contenteditable]";
|
|
8339
|
+
const isHiddenElement = (element) => {
|
|
8340
|
+
const { display, visibility } = window.getComputedStyle(element);
|
|
8341
|
+
const isHidden = display === "none" || element.style.display === "none" || visibility === "none" || element.style.visibility === "hidden";
|
|
8342
|
+
return element.offsetWidth <= 0 && element.offsetHeight <= 0 || isHidden;
|
|
8343
|
+
};
|
|
8344
|
+
const isVisibleElement = (element) => {
|
|
8345
|
+
let parentElement = element;
|
|
8346
|
+
while (parentElement) {
|
|
8347
|
+
if (parentElement === document.body) break;
|
|
8348
|
+
if (isHiddenElement(parentElement)) return false;
|
|
8349
|
+
parentElement = parentElement.parentNode;
|
|
8350
|
+
}
|
|
8351
|
+
return true;
|
|
8352
|
+
};
|
|
8353
|
+
const getElementTabIndex = (element) => {
|
|
8354
|
+
const tabIndex = element.getAttribute("tabindex");
|
|
8355
|
+
return Number.parseInt(tabIndex ?? void 0, 10);
|
|
8356
|
+
};
|
|
8357
|
+
const isTabIndexNaN = (element) => {
|
|
8358
|
+
const tabIndex = getElementTabIndex(element);
|
|
8359
|
+
return Number.isNaN(tabIndex);
|
|
8360
|
+
};
|
|
8361
|
+
const isFocusableElement = (element) => {
|
|
8362
|
+
const tabbableNodeRegEx = /input|select|textarea|button|object/;
|
|
8363
|
+
const nodeName = element.nodeName.toLowerCase();
|
|
8364
|
+
const isTabIndexNotNaN = !isTabIndexNaN(element);
|
|
8365
|
+
const isFocusable = tabbableNodeRegEx.test(nodeName) && !element.disabled || (element instanceof HTMLAnchorElement ? element.href || isTabIndexNotNaN : isTabIndexNotNaN);
|
|
8366
|
+
return Boolean(isFocusable) && isVisibleElement(element);
|
|
8367
|
+
};
|
|
8368
|
+
const isTabbableElement = (element) => {
|
|
8369
|
+
const tabIndex = getElementTabIndex(element);
|
|
8370
|
+
return (isTabIndexNaN(element) || tabIndex >= 0) && isFocusableElement(element);
|
|
8371
|
+
};
|
|
8372
|
+
const findTabbableDescendants = (element) => [...element.querySelectorAll(FOCUSABLE_ELEMENT_SELECTORS)].filter((el) => isTabbableElement(el));
|
|
8373
|
+
const focusLaterElements = [];
|
|
8374
|
+
let focusElement = null;
|
|
8375
|
+
let needToFocus = false;
|
|
8376
|
+
const handleBlur = () => {
|
|
8377
|
+
needToFocus = true;
|
|
8378
|
+
};
|
|
8379
|
+
const handleFocus = () => {
|
|
8380
|
+
if (needToFocus) {
|
|
8381
|
+
needToFocus = false;
|
|
8382
|
+
if (!focusElement) return;
|
|
8383
|
+
if (focusElement.contains(document.activeElement)) return;
|
|
8384
|
+
(findTabbableDescendants(focusElement)[0] ?? focusElement).focus();
|
|
8385
|
+
}
|
|
8386
|
+
};
|
|
8387
|
+
const markForFocusLater = () => {
|
|
8388
|
+
const element = document.activeElement;
|
|
8389
|
+
if (element !== null) focusLaterElements.push(element);
|
|
8390
|
+
};
|
|
8391
|
+
const returnFocus = () => {
|
|
8392
|
+
let toFocus = null;
|
|
8393
|
+
try {
|
|
8394
|
+
toFocus = focusLaterElements.pop();
|
|
8395
|
+
if (toFocus) toFocus.focus();
|
|
8396
|
+
} catch {
|
|
8397
|
+
console.warn(`You tried to return focus to ${coerceToString(toFocus)} but it is not in the DOM anymore`);
|
|
8398
|
+
}
|
|
8399
|
+
};
|
|
8400
|
+
const setupScopedFocus = (element) => {
|
|
8401
|
+
focusElement = element;
|
|
8402
|
+
document.addEventListener("focusout", handleBlur, false);
|
|
8403
|
+
document.addEventListener("focusin", handleFocus, true);
|
|
8404
|
+
};
|
|
8405
|
+
const teardownScopedFocus = () => {
|
|
8406
|
+
focusElement = null;
|
|
8407
|
+
document.removeEventListener("focusout", handleBlur);
|
|
8408
|
+
document.removeEventListener("focusin", handleFocus);
|
|
8409
|
+
};
|
|
8410
|
+
const scopeTab = (node, event) => {
|
|
8411
|
+
const tabbable = findTabbableDescendants(node);
|
|
8412
|
+
if (!isNonEmptyArray(tabbable)) {
|
|
8413
|
+
event.preventDefault();
|
|
8414
|
+
return;
|
|
8415
|
+
}
|
|
8416
|
+
if (!(tabbable[event.shiftKey ? 0 : tabbable.length - 1] === document.activeElement || node === document.activeElement)) return;
|
|
8417
|
+
event.preventDefault();
|
|
8418
|
+
const target = tabbable[event.shiftKey ? tabbable.length - 1 : 0];
|
|
8419
|
+
if (target) target.focus();
|
|
8420
|
+
};
|
|
8421
|
+
const createAriaHider = (containerNode, selector) => {
|
|
8422
|
+
selector ??= "body > :not(script)";
|
|
8423
|
+
const rootNodes = [...document.querySelectorAll(selector)].map((node) => {
|
|
8424
|
+
if (node.contains(containerNode)) return;
|
|
8425
|
+
const ariaHidden = node.getAttribute("aria-hidden");
|
|
8426
|
+
if (ariaHidden === null || ariaHidden === "false") node.setAttribute("aria-hidden", "true");
|
|
8427
|
+
return {
|
|
8428
|
+
node,
|
|
8429
|
+
ariaHidden
|
|
8430
|
+
};
|
|
8431
|
+
});
|
|
8432
|
+
return () => {
|
|
8433
|
+
rootNodes.forEach((item) => {
|
|
8434
|
+
if (!item) return;
|
|
8435
|
+
if (item.ariaHidden === null) item.node.removeAttribute("aria-hidden");
|
|
8436
|
+
else item.node.setAttribute("aria-hidden", item.ariaHidden);
|
|
8437
|
+
});
|
|
8438
|
+
};
|
|
8439
|
+
};
|
|
8440
|
+
//#endregion
|
|
8441
|
+
//#region src/private/hooks/useFocusTrap/useFocusTrap.ts
|
|
8442
|
+
const isRef = (val) => {
|
|
8443
|
+
return val !== null && typeof val === "object" && "current" in val;
|
|
8444
|
+
};
|
|
8445
|
+
const useFocusTrap = (active = true, options = {}) => {
|
|
8446
|
+
const ref = useRef(null);
|
|
8447
|
+
const restoreAriaRef = useRef(null);
|
|
8448
|
+
const setRef = useCallback((node) => {
|
|
8449
|
+
if (restoreAriaRef.current !== null) restoreAriaRef.current();
|
|
8450
|
+
if (ref.current) {
|
|
8451
|
+
returnFocus();
|
|
8452
|
+
teardownScopedFocus();
|
|
8453
|
+
}
|
|
8454
|
+
if (active && node !== null && node !== void 0) {
|
|
8455
|
+
setupScopedFocus(node);
|
|
8456
|
+
markForFocusLater();
|
|
8457
|
+
const processNode = (node2) => {
|
|
8458
|
+
restoreAriaRef.current = !(options.disableAriaHider ?? false) ? createAriaHider(node2) : null;
|
|
8459
|
+
let focusElement = null;
|
|
8460
|
+
if (isNotUndefined(options.focusSelector)) if (isRef(options.focusSelector)) focusElement = options.focusSelector.current;
|
|
8461
|
+
else focusElement = typeof options.focusSelector === "string" ? node2.querySelector(options.focusSelector) : options.focusSelector;
|
|
8462
|
+
if (!focusElement) {
|
|
8463
|
+
const children = [...node2.querySelectorAll(FOCUSABLE_ELEMENT_SELECTORS)];
|
|
8464
|
+
focusElement = children.find((element) => isTabbableElement(element)) ?? children.find((element) => isFocusableElement(element)) ?? null;
|
|
8465
|
+
if (!focusElement && isFocusableElement(node2)) focusElement = node2;
|
|
8466
|
+
}
|
|
8467
|
+
if (focusElement) focusElement.focus();
|
|
8468
|
+
if (!focusElement) console.warn("[useFocusTrap]: Failed to find a focusable element after activating the focus trap. Make sure to include at an element that can recieve focus. As a fallback, you can also set \"tabIndex={-1}\" on the focus trap node.", node2);
|
|
8469
|
+
};
|
|
8470
|
+
setTimeout(() => {
|
|
8471
|
+
if (node.ownerDocument) processNode(node);
|
|
8472
|
+
if (!node.ownerDocument) console.warn("[useFocusTrap]: The focus trap is not part of the DOM yet, so it is unable to correctly set focus. Make sure to render the ref node.", node);
|
|
8473
|
+
});
|
|
8474
|
+
ref.current = node;
|
|
8475
|
+
} else ref.current = null;
|
|
8476
|
+
}, [
|
|
8477
|
+
active,
|
|
8478
|
+
options.focusSelector,
|
|
8479
|
+
options.disableAriaHider
|
|
8480
|
+
]);
|
|
8481
|
+
useEffect(() => {
|
|
8482
|
+
if (!active) return;
|
|
8483
|
+
const handleKeyDown = (event) => {
|
|
8484
|
+
if (event.key === "Tab" && ref.current) scopeTab(ref.current, event);
|
|
8485
|
+
};
|
|
8486
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
8487
|
+
return () => {
|
|
8488
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
8489
|
+
};
|
|
8490
|
+
}, [active]);
|
|
8491
|
+
return setRef;
|
|
8492
|
+
};
|
|
8493
|
+
//#endregion
|
|
9191
8494
|
//#region src/components/Modal/Dialog.tsx
|
|
9192
8495
|
const Dialog = styled.div`
|
|
9193
8496
|
background-color: white;
|
|
@@ -9309,7 +8612,7 @@ const Modal = (props) => {
|
|
|
9309
8612
|
const modalRoot = useRef(modalEl);
|
|
9310
8613
|
useEffect(() => {
|
|
9311
8614
|
const modalRootEl = modalRoot.current;
|
|
9312
|
-
document.body.
|
|
8615
|
+
document.body.append(modalRootEl);
|
|
9313
8616
|
return () => modalRootEl.remove();
|
|
9314
8617
|
}, []);
|
|
9315
8618
|
return createPortal(/* @__PURE__ */ jsx(ModalAnimation, { children: props.isOpen ? /* @__PURE__ */ jsx(ModalContent, {
|
|
@@ -9727,7 +9030,7 @@ const isInRange = (range, day) => {
|
|
|
9727
9030
|
};
|
|
9728
9031
|
const makeRange = (firstDate, secondDate) => {
|
|
9729
9032
|
if (firstDate instanceof Date && isNotNil(secondDate)) {
|
|
9730
|
-
const [start, end] = [firstDate, secondDate].
|
|
9033
|
+
const [start, end] = [firstDate, secondDate].toSorted((left, right) => compareAsc(left, right));
|
|
9731
9034
|
if (isNotNil(start) && isNotNil(end)) return {
|
|
9732
9035
|
start,
|
|
9733
9036
|
end: endOfDay(end)
|
|
@@ -9745,10 +9048,12 @@ const useRange = (firstDate, secondDate) => {
|
|
|
9745
9048
|
]);
|
|
9746
9049
|
return range;
|
|
9747
9050
|
};
|
|
9748
|
-
const
|
|
9051
|
+
const DEFAULT_RANGE$1 = {
|
|
9749
9052
|
end: /* @__PURE__ */ new Date(),
|
|
9750
9053
|
start: /* @__PURE__ */ new Date()
|
|
9751
|
-
}
|
|
9054
|
+
};
|
|
9055
|
+
const NOOP = () => {};
|
|
9056
|
+
const RangeSelectorCalendar = ({ range = DEFAULT_RANGE$1, rangePartToShow = "", onChange, onIsValidChange = NOOP, earliestDate, latestDate, shouldPreventFuture = false }) => {
|
|
9752
9057
|
const thisMonth = useMemo(() => startOfMonth(/* @__PURE__ */ new Date()), []);
|
|
9753
9058
|
const [displayDate, setDisplayDate] = useState(isNotNil(range.end) ? range.end : thisMonth);
|
|
9754
9059
|
const [{ firstDate, secondDate }, setDates] = useState({});
|
|
@@ -9782,8 +9087,8 @@ const RangeSelectorCalendar = ({ range = {
|
|
|
9782
9087
|
useEffect(() => {
|
|
9783
9088
|
if (isValidRange$1(range)) {
|
|
9784
9089
|
let date = void 0;
|
|
9785
|
-
if (priorInternalRange && !isEqual(range.start, priorInternalRange.start)) date = range.start;
|
|
9786
|
-
if (priorInternalRange && !isEqual(range.end, priorInternalRange.end)) date = range.end;
|
|
9090
|
+
if (priorInternalRange && !isEqual$1(range.start, priorInternalRange.start)) date = range.start;
|
|
9091
|
+
if (priorInternalRange && !isEqual$1(range.end, priorInternalRange.end)) date = range.end;
|
|
9787
9092
|
if (date) setDisplayDateDebounced(date);
|
|
9788
9093
|
setDates({
|
|
9789
9094
|
firstDate: range.start,
|
|
@@ -9863,7 +9168,8 @@ const ErrorMessage = styled.li`
|
|
|
9863
9168
|
color: ${({ theme }) => theme.color.error600};
|
|
9864
9169
|
font-size: 12px;
|
|
9865
9170
|
`;
|
|
9866
|
-
const
|
|
9171
|
+
const DEFAULT_MESSAGES = [];
|
|
9172
|
+
const ErrorMessages = ({ messages = DEFAULT_MESSAGES }) => /* @__PURE__ */ jsx(ErrorMessagesList, { children: messages.map((message) => /* @__PURE__ */ jsx(ErrorMessage, { children: message }, message)) });
|
|
9867
9173
|
//#endregion
|
|
9868
9174
|
//#region src/private/components/RangeSelectorInput/constants.ts
|
|
9869
9175
|
const DIVIDER_STRING = " - ";
|
|
@@ -9958,7 +9264,7 @@ const getValueParts = (value) => {
|
|
|
9958
9264
|
year2: isNonEmptyString(year2Val) ? year2Val : ""
|
|
9959
9265
|
};
|
|
9960
9266
|
};
|
|
9961
|
-
const dateOnlyStringNumeric
|
|
9267
|
+
const dateOnlyStringNumeric = (date) => {
|
|
9962
9268
|
if (!isValid(date)) return "";
|
|
9963
9269
|
try {
|
|
9964
9270
|
return new Intl.DateTimeFormat(["en-US"], {
|
|
@@ -10015,8 +9321,8 @@ const getFieldId = ([start], positions) => {
|
|
|
10015
9321
|
return isNotNil(currentPosition) && isNotNil(currentPosition.id) ? currentPosition.id : "";
|
|
10016
9322
|
};
|
|
10017
9323
|
const getMaxValue = (valueParts, part) => {
|
|
10018
|
-
const partType = part.
|
|
10019
|
-
const index = part.
|
|
9324
|
+
const partType = part.slice(0, -1);
|
|
9325
|
+
const index = part.at(-1) ?? "";
|
|
10020
9326
|
const monthsInYear = 12;
|
|
10021
9327
|
const maxDaysInMonth = 31;
|
|
10022
9328
|
switch (partType) {
|
|
@@ -10036,16 +9342,16 @@ const getMaxValue = (valueParts, part) => {
|
|
|
10036
9342
|
}
|
|
10037
9343
|
};
|
|
10038
9344
|
const getErrors = ({ range, maxDate, minDate }) => {
|
|
10039
|
-
const startString = dateOnlyStringNumeric
|
|
10040
|
-
const endString = dateOnlyStringNumeric
|
|
9345
|
+
const startString = dateOnlyStringNumeric(range.start);
|
|
9346
|
+
const endString = dateOnlyStringNumeric(range.end);
|
|
10041
9347
|
const errorMessages = [];
|
|
10042
9348
|
if (isNotNil(maxDate)) {
|
|
10043
|
-
const maxString = dateOnlyStringNumeric
|
|
9349
|
+
const maxString = dateOnlyStringNumeric(maxDate);
|
|
10044
9350
|
if (isBefore(maxDate, range.start)) errorMessages.push(`${startString} is after maximum of ${maxString}`);
|
|
10045
9351
|
if (isBefore(maxDate, range.end)) errorMessages.push(`${endString} is after maximum of ${maxString}`);
|
|
10046
9352
|
}
|
|
10047
9353
|
if (minDate) {
|
|
10048
|
-
const minString = dateOnlyStringNumeric
|
|
9354
|
+
const minString = dateOnlyStringNumeric(minDate);
|
|
10049
9355
|
if (isBefore(range.start, minDate)) errorMessages.push(`${startString} is before minimum of ${minString}`);
|
|
10050
9356
|
if (isBefore(range.end, minDate)) errorMessages.push(`${endString} is before minimum of ${minString}`);
|
|
10051
9357
|
}
|
|
@@ -10053,7 +9359,7 @@ const getErrors = ({ range, maxDate, minDate }) => {
|
|
|
10053
9359
|
return errorMessages;
|
|
10054
9360
|
};
|
|
10055
9361
|
const orderRange = (range) => {
|
|
10056
|
-
const [start, end] = [range.start, range.end].
|
|
9362
|
+
const [start, end] = [range.start, range.end].toSorted((left, right) => compareAsc(left, right));
|
|
10057
9363
|
return {
|
|
10058
9364
|
start,
|
|
10059
9365
|
end
|
|
@@ -10165,7 +9471,7 @@ const getNextValue = ({ event, currentSelection, keyCount, valueParts, selection
|
|
|
10165
9471
|
let nextKeyCount = keyCount;
|
|
10166
9472
|
let shouldApply = false;
|
|
10167
9473
|
const id = getFieldId(currentSelection, DATE_PART_POSITIONS);
|
|
10168
|
-
const type = id.
|
|
9474
|
+
const type = id.slice(0, -1);
|
|
10169
9475
|
if (isANum(event)) {
|
|
10170
9476
|
event.preventDefault();
|
|
10171
9477
|
nextValue = datePartsToString(validateDays(applyNumKey(valueParts, id, type, event.key, keyCount)));
|
|
@@ -10197,11 +9503,11 @@ const getNextSelection = ({ event, currentSelection }) => {
|
|
|
10197
9503
|
let nextSelection = void 0;
|
|
10198
9504
|
if (isMoveRightChar(event)) {
|
|
10199
9505
|
nextSelection = getSelectionFromMove(currentSelection, 1, DATE_PART_POSITIONS);
|
|
10200
|
-
if (!isEqual
|
|
9506
|
+
if (!isEqual(nextSelection, currentSelection)) event.preventDefault();
|
|
10201
9507
|
}
|
|
10202
9508
|
if (isMoveLeftChar(event)) {
|
|
10203
9509
|
nextSelection = getSelectionFromMove(currentSelection, -1, DATE_PART_POSITIONS);
|
|
10204
|
-
if (!isEqual
|
|
9510
|
+
if (!isEqual(nextSelection, currentSelection)) event.preventDefault();
|
|
10205
9511
|
}
|
|
10206
9512
|
return {
|
|
10207
9513
|
nextSelection,
|
|
@@ -10247,7 +9553,7 @@ const RangeSelectorInput = ({ onChange, onSelectedRangePartChange, range, earlie
|
|
|
10247
9553
|
});
|
|
10248
9554
|
if (isValidRange(nextRange)) {
|
|
10249
9555
|
setValue(rangeToString(nextRange));
|
|
10250
|
-
if (!errors
|
|
9556
|
+
if (!isNonEmptyArray(errors) && isNotUndefined(onChange)) onChange(orderRange(nextRange));
|
|
10251
9557
|
}
|
|
10252
9558
|
setErrorMessages(errors);
|
|
10253
9559
|
}, [
|
|
@@ -10282,7 +9588,7 @@ const RangeSelectorInput = ({ onChange, onSelectedRangePartChange, range, earlie
|
|
|
10282
9588
|
ref,
|
|
10283
9589
|
onSelectedRangePartChange
|
|
10284
9590
|
]);
|
|
10285
|
-
return /* @__PURE__ */ jsxs("div", { children: [
|
|
9591
|
+
return /* @__PURE__ */ jsxs("div", { children: [isNonEmptyArray(errorMessages) && /* @__PURE__ */ jsx(ErrorMessages, { messages: errorMessages }), /* @__PURE__ */ jsx(Input$1, {
|
|
10286
9592
|
ref,
|
|
10287
9593
|
$width: width,
|
|
10288
9594
|
"data-testid": "range-selector-input",
|
|
@@ -10365,6 +9671,11 @@ const formatDate = (date) => date.toLocaleDateString("en-US", {
|
|
|
10365
9671
|
});
|
|
10366
9672
|
const formatFunc = ({ start, end }) => `${formatDate(start)} - ${formatDate(end)}`;
|
|
10367
9673
|
const isSameRange = (r1, r2) => isSameDay(r1.start, r2.start) && isSameDay(r1.end, r2.end);
|
|
9674
|
+
const DEFAULT_PRESETS = [];
|
|
9675
|
+
const DEFAULT_RANGE = {
|
|
9676
|
+
end: /* @__PURE__ */ new Date(),
|
|
9677
|
+
start: /* @__PURE__ */ new Date()
|
|
9678
|
+
};
|
|
10368
9679
|
const CalendarPadding = styled.div`
|
|
10369
9680
|
padding: ${({ theme }) => `0 ${theme.spacing.space03}`};
|
|
10370
9681
|
`;
|
|
@@ -10460,10 +9771,7 @@ const Label$1 = styled.span`
|
|
|
10460
9771
|
width: calc(100% + 40px);
|
|
10461
9772
|
}
|
|
10462
9773
|
`;
|
|
10463
|
-
const RangeSelector = ({ align = "left", buttonVariant = "secondary", earliestDate, latestDate, format = formatFunc, fullWidth = false, footerText, onChange, presets =
|
|
10464
|
-
end: /* @__PURE__ */ new Date(),
|
|
10465
|
-
start: /* @__PURE__ */ new Date()
|
|
10466
|
-
}, shouldPreventFuture = false, customTriggerComponent, width, ...props }) => {
|
|
9774
|
+
const RangeSelector = ({ align = "left", buttonVariant = "secondary", earliestDate, latestDate, format = formatFunc, fullWidth = false, footerText, onChange, presets = DEFAULT_PRESETS, range = DEFAULT_RANGE, shouldPreventFuture = false, customTriggerComponent, width, ...props }) => {
|
|
10467
9775
|
const [internalRange, setInternalRange] = useState(range);
|
|
10468
9776
|
const [isOpen, setIsOpen] = useState(false);
|
|
10469
9777
|
const [isCurrentCalendarValid, setIsCurrentCalendarValid] = useState(true);
|
|
@@ -10511,10 +9819,10 @@ const RangeSelector = ({ align = "left", buttonVariant = "secondary", earliestDa
|
|
|
10511
9819
|
textAlign: "left",
|
|
10512
9820
|
variant: buttonVariant === "input" ? "tertiary" : buttonVariant
|
|
10513
9821
|
}), isOpen ? /* @__PURE__ */ jsxs(Selector, {
|
|
10514
|
-
$hasPresets:
|
|
9822
|
+
$hasPresets: isNonEmptyArray(presets),
|
|
10515
9823
|
align,
|
|
10516
9824
|
children: [
|
|
10517
|
-
/* @__PURE__ */ jsxs(SelectorInner, { children: [
|
|
9825
|
+
/* @__PURE__ */ jsxs(SelectorInner, { children: [isNonEmptyArray(presets) && /* @__PURE__ */ jsx(List, {
|
|
10518
9826
|
"data-testid": "presets",
|
|
10519
9827
|
style: {
|
|
10520
9828
|
marginBottom: 0,
|
|
@@ -10572,7 +9880,7 @@ const RangeSelector = ({ align = "left", buttonVariant = "secondary", earliestDa
|
|
|
10572
9880
|
children: "Cancel"
|
|
10573
9881
|
}), /* @__PURE__ */ jsx(Button, {
|
|
10574
9882
|
"data-testid": "apply-button",
|
|
10575
|
-
disabled:
|
|
9883
|
+
disabled: isNonEmptyArray(errors) || !isCurrentCalendarValid,
|
|
10576
9884
|
onMouseUp: () => {
|
|
10577
9885
|
if (onChange) onChange(internalRange);
|
|
10578
9886
|
setIsOpen(false);
|
|
@@ -10648,10 +9956,10 @@ const Slider = ({ ariaLabel, ariaLabelledby, ariaValuetext, disabled = false, in
|
|
|
10648
9956
|
"data-testid": dataTestId,
|
|
10649
9957
|
disabled,
|
|
10650
9958
|
children: /* @__PURE__ */ jsx(ReactSlider, {
|
|
10651
|
-
...isString
|
|
10652
|
-
...isString
|
|
9959
|
+
...isString(ariaLabel) || isNonEmptyArray(ariaLabel) ? { ariaLabel } : {},
|
|
9960
|
+
...isString(ariaLabelledby) || isNonEmptyArray(ariaLabelledby) ? { ariaLabelledby } : {},
|
|
10653
9961
|
...isFunction(ariaValuetext) && { ariaValuetext: (state) => ariaValuetext(state) },
|
|
10654
|
-
...isString
|
|
9962
|
+
...isString(ariaValuetext) && { ariaValuetext },
|
|
10655
9963
|
...isNumber(initialValue) || isNonEmptyArray(initialValue) ? { defaultValue: initialValue } : {},
|
|
10656
9964
|
disabled,
|
|
10657
9965
|
marks: step,
|
|
@@ -10973,7 +10281,7 @@ const ThumbnailCollage = ({ thumbnailUrls, gradientBackground = "defaultMidOne",
|
|
|
10973
10281
|
return /* @__PURE__ */ jsx(ThumbnailCollageContainer, {
|
|
10974
10282
|
role: "presentation",
|
|
10975
10283
|
...props,
|
|
10976
|
-
children: thumbnailUrls
|
|
10284
|
+
children: isNonEmptyArray(thumbnailUrls) ? thumbnailUrls.map((thumbnailUrl) => /* @__PURE__ */ jsx(CollageImage, { $thumbnailUrl: thumbnailUrl }, thumbnailUrl)) : /* @__PURE__ */ jsx(CollageImage, { $backgroundGradient: gradientBackground })
|
|
10977
10285
|
});
|
|
10978
10286
|
};
|
|
10979
10287
|
//#endregion
|
|
@@ -11007,7 +10315,7 @@ const WistiaLogoComponent = styled.svg`
|
|
|
11007
10315
|
max-width: 100%;
|
|
11008
10316
|
|
|
11009
10317
|
&:hover {
|
|
11010
|
-
path {
|
|
10318
|
+
& path {
|
|
11011
10319
|
${({ $hoverColor }) => $hoverColor !== void 0 ? `fill: ${$hoverColor}` : null};
|
|
11012
10320
|
}
|
|
11013
10321
|
}
|
|
@@ -11053,6 +10361,6 @@ const WistiaLogo = ({ description, height = 100, hoverColor, href, iconOnly = fa
|
|
|
11053
10361
|
};
|
|
11054
10362
|
WistiaLogo.displayName = "WistiaLogo_VHS";
|
|
11055
10363
|
//#endregion
|
|
11056
|
-
export { ActionModal, Avatar, Backdrop, BackgroundImage, Badge, Banner, Box, Button, ButtonGroup, ButtonLink, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickArea, CloseButton, CollapsibleGroup, Divider, Ellipsis, FileSelect, Form, FormButtons, FormField, FormFieldError, FormGlobalError, FullScreenModal, Icon, IconButton, Image, Input, KeyboardShortcut, Label, LabelDescription, Link, LinkButton, List, ListItem, Menu, MenuButton, MenuItem, MenuLabel, MenuRadioGroup, Modal, ModalBase, ModalBody, ModalCloseButton, ModalFooter, ModalHeader, Paper, ProgressBar, Radio, RadioGroup, RadioMenuItem, RangeSelector, RichTextEditor, ScreenReaderOnly, Select, Slider, Stack, SubMenu, Switch, Text, Thumbnail, ThumbnailCollage, Toast, ToastProvider, Tooltip, Truncate, VHSProvider, WistiaLogo,
|
|
10364
|
+
export { ActionModal, Avatar, Backdrop, BackgroundImage, Badge, Banner, Box, Button, ButtonGroup, ButtonLink, Checkbox, CheckboxGroup, CheckboxMenuItem, ClickArea, CloseButton, CollapsibleGroup, Divider, Ellipsis, FileSelect, Form, FormButtons, FormField, FormFieldError, FormGlobalError, FullScreenModal, Icon, IconButton, Image, Input, KeyboardShortcut, Label, LabelDescription, Link, LinkButton, List, ListItem, Menu, MenuButton, MenuItem, MenuLabel, MenuRadioGroup, Modal, ModalBase, ModalBody, ModalCloseButton, ModalFooter, ModalHeader, Paper, ProgressBar, Radio, RadioGroup, RadioMenuItem, RangeSelector, RichTextEditor, ScreenReaderOnly, Select, Slider, Stack, SubMenu, Switch, Text, Thumbnail, ThumbnailCollage, Toast, ToastProvider, Tooltip, Truncate, VHSProvider, WistiaLogo, ellipsisFlexParentStyle, ellipsisStyle, iconSizeMap, rteDeserializeHTML, rteFormatTypes, rteSerializeToHTML, screenReaderOnlyStyle, useFormikContext, useTheme, useThemeColor, useToast };
|
|
11057
10365
|
|
|
11058
10366
|
//# sourceMappingURL=index.js.map
|