@ainias42/react-bootstrap-mobile 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Components/ActionSheet/ActionSheet.d.ts +1 -1
- package/dist/Components/ErrorBoundary.d.ts +18 -0
- package/dist/Components/FormElements/Button/Button.d.ts +4 -1
- package/dist/Components/FormElements/Button/Button.stories.d.ts +8 -2
- package/dist/Components/Icon/BaseIcon.d.ts +15 -0
- package/dist/Components/Icon/DoubleIcon.d.ts +1 -1
- package/dist/Components/Icon/Icon.d.ts +4 -13
- package/dist/Components/Icon/Icon.stories.d.ts +1 -1
- package/dist/Components/Layout/BaseBlock.d.ts +10 -0
- package/dist/Components/Layout/BaseInlineBlock.d.ts +10 -0
- package/dist/Components/Layout/Block.d.ts +4 -10
- package/dist/Components/Layout/Flex.d.ts +6 -1
- package/dist/Components/Layout/InlineBlock.d.ts +4 -10
- package/dist/Components/Layout/View.d.ts +1 -1
- package/dist/Components/Menu/Menu.d.ts +1 -1
- package/dist/Components/Menu/MenuItem.d.ts +1 -1
- package/dist/Components/Menu/Submenu.d.ts +1 -1
- package/dist/Components/Menu/useHoverMenu.d.ts +17 -0
- package/dist/Components/SpoilerList/Spoiler/Spoiler.d.ts +1 -1
- package/dist/Components/TabBar/TabBar.d.ts +1 -1
- package/dist/Components/Title/HoverTitle.d.ts +9 -0
- package/dist/Components/Title/Title.stories.d.ts +11 -0
- package/dist/Components/Title/withTitle.d.ts +6 -0
- package/dist/Components/TopBar/TopBar.d.ts +1 -1
- package/dist/index.css +6 -5
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.js +707 -447
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/Components/ActionSheet/ActionSheet.tsx +12 -10
- package/src/Components/Colors.stories.tsx +7 -7
- package/src/Components/Dialog/ButtonDialog.tsx +9 -9
- package/src/Components/Dialog/Dialog.tsx +6 -6
- package/src/Components/Dialog/DialogBackground.tsx +5 -5
- package/src/Components/Dialog/DialogContainer.tsx +3 -3
- package/src/Components/ErrorBoundary.tsx +46 -0
- package/src/Components/FormElements/Button/Button.tsx +2 -2
- package/src/Components/FormElements/Error/FormError.tsx +6 -6
- package/src/Components/FormElements/Input/FileInput/MultipleFileInput.tsx +7 -7
- package/src/Components/FormElements/Input/PasswordInput/PasswordInput.tsx +2 -2
- package/src/Components/FormElements/SearchSelectInput/SearchSelectInput.tsx +9 -9
- package/src/Components/Hooks/useDelayed.ts +5 -4
- package/src/Components/Icon/{Icon.tsx → BaseIcon.tsx} +6 -4
- package/src/Components/Icon/DoubleIcon.tsx +7 -7
- package/src/Components/Icon/Icon.stories.tsx +3 -3
- package/src/Components/Icon/Icon.ts +4 -0
- package/src/Components/Layout/{Block.tsx → BaseBlock.tsx} +2 -3
- package/src/Components/Layout/{InlineBlock.tsx → BaseInlineBlock.tsx} +2 -2
- package/src/Components/Layout/Block.ts +4 -0
- package/src/Components/Layout/Flex.tsx +16 -0
- package/src/Components/Layout/Grid/Grid.tsx +3 -3
- package/src/Components/Layout/Grid/GridItem.tsx +3 -3
- package/src/Components/Layout/InlineBlock.ts +4 -0
- package/src/Components/Layout/layout.module.scss +13 -0
- package/src/Components/LoadingArea/LoadingArea.stories.tsx +3 -3
- package/src/Components/Menu/HoverMenu.stories.tsx +3 -3
- package/src/Components/Menu/HoverMenu.tsx +8 -28
- package/src/Components/Menu/Menu.tsx +4 -4
- package/src/Components/Menu/MenuDivider.tsx +2 -2
- package/src/Components/Menu/MenuItem.tsx +6 -6
- package/src/Components/Menu/Submenu.tsx +7 -7
- package/src/Components/Menu/menu.module.scss +3 -2
- package/src/Components/Menu/useHoverMenu.ts +36 -0
- package/src/Components/SizeCalculator/SizeCalculator.tsx +3 -3
- package/src/Components/SpoilerList/Spoiler/Spoiler.tsx +9 -9
- package/src/Components/SpoilerList/SpoilerList.tsx +3 -3
- package/src/Components/TabBar/TabBar.tsx +3 -3
- package/src/Components/Title/HoverTitle.tsx +97 -0
- package/src/Components/Title/Title.stories.tsx +95 -0
- package/src/Components/Title/hoverTitle.module.scss +8 -0
- package/src/Components/Title/withTitle.module.scss +7 -0
- package/src/Components/Title/withTitle.tsx +48 -0
- package/src/Components/TopBar/MoreButton.tsx +3 -3
- package/src/Components/TopBar/TopBar.tsx +6 -6
- package/src/WrongChildError.ts +1 -0
- package/src/helper/withRestrictedChildren.tsx +3 -1
- package/src/index.ts +7 -0
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { Children, Component, Fragment, cloneElement, createContext, createElement, default as default_0, isValidElement, memo, useCallback, useContext, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState } from "react";
|
|
1
2
|
import { ArrayHelper, JsonHelper, ObjectHelper, PromiseWithHandlers, Random } from "@ainias42/js-helper";
|
|
2
|
-
import { Children, Fragment, cloneElement, createContext, createElement, default as default_0, isValidElement, memo, useCallback, useContext, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState } from "react";
|
|
3
3
|
import { default as default_1 } from "classnames";
|
|
4
4
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
5
5
|
import { faChevronDown, faChevronRight, faChevronUp, faCircleXmark, faEllipsisH, faEllipsisV, faEye, faEyeSlash, faFile, faPlus, faTimes, faTimesCircle } from "@fortawesome/free-solid-svg-icons";
|
|
@@ -56,20 +56,8 @@ class WrongChildError extends Error {
|
|
|
56
56
|
this.childValue = child;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
;//
|
|
60
|
-
|
|
61
|
-
(function (Flavor) {
|
|
62
|
-
Flavor["Accent"] = "flavor-accent";
|
|
63
|
-
Flavor["Basic"] = "flavor-basic";
|
|
64
|
-
Flavor["Destructive"] = "flavor-destructive";
|
|
65
|
-
Flavor["Constructive"] = "flavor-constructive";
|
|
66
|
-
})(Flavor || (Flavor = {}));
|
|
67
|
-
;// ./src/helper/Characters.ts
|
|
68
|
-
const Characters = {
|
|
69
|
-
NBSP: '\u00A0',
|
|
70
|
-
PATH_DELIMITER: '/',
|
|
71
|
-
MIDDLE_DOT: '\u00B7'
|
|
72
|
-
};
|
|
59
|
+
;// external "react"
|
|
60
|
+
|
|
73
61
|
;// external "@ainias42/js-helper"
|
|
74
62
|
|
|
75
63
|
;// ./src/helper/memoComparator.ts
|
|
@@ -87,26 +75,6 @@ function memoComparator(prevProps, nextProps) {
|
|
|
87
75
|
return prevProps[key] === nextProps[key];
|
|
88
76
|
});
|
|
89
77
|
}
|
|
90
|
-
;// ./src/helper/nonEmptyString.ts
|
|
91
|
-
|
|
92
|
-
function nonEmptyString(str, other = Characters.NBSP) {
|
|
93
|
-
if (!str) {
|
|
94
|
-
return other;
|
|
95
|
-
}
|
|
96
|
-
return str;
|
|
97
|
-
}
|
|
98
|
-
;// external "react"
|
|
99
|
-
|
|
100
|
-
;// ./src/helper/useDeepShallow.ts
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
function useDeepShallow(selector, depth = -1) {
|
|
104
|
-
const prev = useRef(undefined);
|
|
105
|
-
return state => {
|
|
106
|
-
const next = selector(state);
|
|
107
|
-
return JsonHelper.deepEqual(prev.current, next, depth) ? prev.current : prev.current = next;
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
78
|
;// ./src/helper/withRestrictedChildren.tsx
|
|
111
79
|
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
112
80
|
var t = {};
|
|
@@ -153,7 +121,9 @@ function withRestrictedChildren(Component, defaultAllowChildren) {
|
|
|
153
121
|
return (
|
|
154
122
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
155
123
|
// @ts-ignore
|
|
156
|
-
default_0.createElement(Component, Object.assign({}, newProps
|
|
124
|
+
default_0.createElement(Component, Object.assign({}, newProps, {
|
|
125
|
+
__allowChildren: __allowChildren
|
|
126
|
+
}), children)
|
|
157
127
|
);
|
|
158
128
|
};
|
|
159
129
|
hocComponent.displayName = displayName;
|
|
@@ -169,49 +139,6 @@ function withMemo(component, defaultAllowChildren) {
|
|
|
169
139
|
memoizedComponent.displayName = `Memoized(${component.displayName || component.name})`;
|
|
170
140
|
return memoizedComponent;
|
|
171
141
|
}
|
|
172
|
-
;// ./src/helper/withRenderBrowserOnly.tsx
|
|
173
|
-
var withRenderBrowserOnly_rest = undefined && undefined.__rest || function (s, e) {
|
|
174
|
-
var t = {};
|
|
175
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
176
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
177
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
178
|
-
}
|
|
179
|
-
return t;
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
function withRenderBrowserOnly(Component) {
|
|
183
|
-
const displayName = `WithRenderBrowserOnly(${Component.displayName || Component.name})`;
|
|
184
|
-
function HocComponent(_a, ref) {
|
|
185
|
-
var {
|
|
186
|
-
children
|
|
187
|
-
} = _a,
|
|
188
|
-
props = withRenderBrowserOnly_rest(_a, ["children"]);
|
|
189
|
-
const [isBrowser, setIsBrowser] = useState(false);
|
|
190
|
-
useEffect(() => setIsBrowser(true), []);
|
|
191
|
-
if (!isBrowser) {
|
|
192
|
-
return null;
|
|
193
|
-
}
|
|
194
|
-
const newProps = props;
|
|
195
|
-
if (ref && Object.keys(ref).length > 0) {
|
|
196
|
-
newProps.ref = ref;
|
|
197
|
-
}
|
|
198
|
-
return (
|
|
199
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
200
|
-
// @ts-ignore
|
|
201
|
-
default_0.createElement(Component, Object.assign({}, newProps), children)
|
|
202
|
-
);
|
|
203
|
-
}
|
|
204
|
-
HocComponent.displayName = displayName;
|
|
205
|
-
return HocComponent;
|
|
206
|
-
}
|
|
207
|
-
;// ./src/WindowContext/WindowContext.ts
|
|
208
|
-
|
|
209
|
-
const WindowContext = default_0.createContext(undefined);
|
|
210
|
-
WindowContext.displayName = 'WindowContext';
|
|
211
|
-
function useWindow() {
|
|
212
|
-
var _a;
|
|
213
|
-
return (_a = useContext(WindowContext)) !== null && _a !== void 0 ? _a : typeof window !== 'undefined' ? window : undefined;
|
|
214
|
-
}
|
|
215
142
|
;// ./src/Components/Layout/View.tsx
|
|
216
143
|
var View_rest = undefined && undefined.__rest || function (s, e) {
|
|
217
144
|
var t = {};
|
|
@@ -257,31 +184,378 @@ var ViewWithoutListeners_rest = undefined && undefined.__rest || function (s, e)
|
|
|
257
184
|
|
|
258
185
|
|
|
259
186
|
|
|
260
|
-
const ViewWithoutListeners = withMemo(function ViewWithoutListeners(_a) {
|
|
187
|
+
const ViewWithoutListeners = withMemo(function ViewWithoutListeners(_a) {
|
|
188
|
+
// Variables
|
|
189
|
+
var {
|
|
190
|
+
children,
|
|
191
|
+
ref
|
|
192
|
+
} = _a,
|
|
193
|
+
props = ViewWithoutListeners_rest(_a, ["children", "ref"]);
|
|
194
|
+
// Refs
|
|
195
|
+
// States
|
|
196
|
+
// Selectors
|
|
197
|
+
// Callbacks
|
|
198
|
+
// Effects
|
|
199
|
+
// Other
|
|
200
|
+
// Render Functions
|
|
201
|
+
return createElement(View, Object.assign({}, props, {
|
|
202
|
+
ref: ref
|
|
203
|
+
}), children);
|
|
204
|
+
}, 'all');
|
|
205
|
+
;// external "classnames"
|
|
206
|
+
|
|
207
|
+
;// ./src/Components/Layout/layout.module.scss
|
|
208
|
+
// extracted by mini-css-extract-plugin
|
|
209
|
+
/* harmony default export */ const layout_module = ({"flex":"flex__Xtdxj","horizontal":"horizontal__HAxyH","unaligned":"unaligned__jkwMg","fillWidth":"fillWidth__LDtNS","fillHeight":"fillHeight__pkb_S","grow":"grow__GRH5E","weight0":"weight0__mAhm_","weight1":"weight1__Gvlqz","weight2":"weight2__KF4_k","weight3":"weight3__fZi1h","weight4":"weight4__SUChB","weight5":"weight5__fgiwz","weight6":"weight6__tBvFt","center":"center__JNiHZ","block":"block__OUDP2","inlineBlock":"inlineBlock__C1O3Y","inline":"inline__uUoNu"});
|
|
210
|
+
;// ./src/Components/Layout/BaseBlock.tsx
|
|
211
|
+
var BaseBlock_rest = undefined && undefined.__rest || function (s, e) {
|
|
212
|
+
var t = {};
|
|
213
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
214
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
215
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
216
|
+
}
|
|
217
|
+
return t;
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
const BaseBlock = withMemo(function Block(_a) {
|
|
225
|
+
// Variables
|
|
226
|
+
var {
|
|
227
|
+
children,
|
|
228
|
+
as = 'div',
|
|
229
|
+
className,
|
|
230
|
+
ref
|
|
231
|
+
} = _a,
|
|
232
|
+
props = BaseBlock_rest(_a, ["children", "as", "className", "ref"]);
|
|
233
|
+
// Refs
|
|
234
|
+
// States
|
|
235
|
+
// Selectors
|
|
236
|
+
// Callbacks
|
|
237
|
+
// Effects
|
|
238
|
+
// Other
|
|
239
|
+
// Render Functions
|
|
240
|
+
return createElement(ViewWithoutListeners, Object.assign({
|
|
241
|
+
className: default_1(layout_module.block, className),
|
|
242
|
+
as: as,
|
|
243
|
+
ref: ref
|
|
244
|
+
}, props), children);
|
|
245
|
+
});
|
|
246
|
+
;// ./src/Components/Layout/Inline.tsx
|
|
247
|
+
var Inline_rest = undefined && undefined.__rest || function (s, e) {
|
|
248
|
+
var t = {};
|
|
249
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
250
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
251
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
252
|
+
}
|
|
253
|
+
return t;
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
const Inline = withMemo(function Inline(_a) {
|
|
261
|
+
// Variables
|
|
262
|
+
var {
|
|
263
|
+
children,
|
|
264
|
+
as = 'span',
|
|
265
|
+
className
|
|
266
|
+
} = _a,
|
|
267
|
+
props = Inline_rest(_a, ["children", "as", "className"]);
|
|
268
|
+
// Refs
|
|
269
|
+
// States
|
|
270
|
+
// Selectors
|
|
271
|
+
// Callbacks
|
|
272
|
+
// Effects
|
|
273
|
+
// Other
|
|
274
|
+
// Render Functions
|
|
275
|
+
return createElement(ViewWithoutListeners, Object.assign({
|
|
276
|
+
className: default_1(layout_module.inline, className),
|
|
277
|
+
as: as
|
|
278
|
+
}, props), children);
|
|
279
|
+
});
|
|
280
|
+
;// ./src/Components/Text/text.module.scss
|
|
281
|
+
// extracted by mini-css-extract-plugin
|
|
282
|
+
/* harmony default export */ const text_module = ({"text":"text__ejS3o","block":"block__naLxK","heading":"heading__KU9xU","primaryDefault":"primaryDefault__Liz7y","primary":"primary__rEpob","secondary":"secondary__zUXeI","tertiary":"tertiary__UaTRx","xsmall":"xsmall__BCYOF","small":"small__AWNxX","medium":"medium__rHmhh","large":"large__ekCpY","xlarge":"xlarge__KP0mY","xxlarge":"xxlarge__Japom","emphasized":"emphasized__Gn24q"});
|
|
283
|
+
;// ./src/Components/Text/Text.tsx
|
|
284
|
+
var Text_rest = undefined && undefined.__rest || function (s, e) {
|
|
285
|
+
var t = {};
|
|
286
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
287
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
288
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
289
|
+
}
|
|
290
|
+
return t;
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
const TEXT_PRIO = {
|
|
298
|
+
primary: text_module.primary,
|
|
299
|
+
secondary: text_module.secondary,
|
|
300
|
+
tertiary: text_module.tertiary,
|
|
301
|
+
heading: text_module.heading
|
|
302
|
+
};
|
|
303
|
+
const TEXT_SIZE = {
|
|
304
|
+
xSmall: text_module.xsmall,
|
|
305
|
+
small: text_module.small,
|
|
306
|
+
medium: text_module.medium,
|
|
307
|
+
large: text_module.large,
|
|
308
|
+
xLarge: text_module.xlarge,
|
|
309
|
+
xxLarge: text_module.xxlarge
|
|
310
|
+
};
|
|
311
|
+
function Text(_a) {
|
|
312
|
+
var {
|
|
313
|
+
className,
|
|
314
|
+
children,
|
|
315
|
+
block = false,
|
|
316
|
+
prio,
|
|
317
|
+
emphasized = false,
|
|
318
|
+
size = TEXT_SIZE.medium,
|
|
319
|
+
as = 'span'
|
|
320
|
+
} = _a,
|
|
321
|
+
props = Text_rest(_a, ["className", "children", "block", "prio", "emphasized", "size", "as"]);
|
|
322
|
+
// Variables
|
|
323
|
+
prio = prio !== null && prio !== void 0 ? prio : text_module.primaryDefault;
|
|
324
|
+
// States
|
|
325
|
+
// Refs
|
|
326
|
+
// Callbacks
|
|
327
|
+
// Effects
|
|
328
|
+
// Other
|
|
329
|
+
Children.forEach(children, child => {
|
|
330
|
+
const type = typeof child;
|
|
331
|
+
if (type !== 'string' && type !== 'undefined' && type !== 'object' && type !== 'number' || type === 'object' && child !== null) {
|
|
332
|
+
throw new WrongChildError('string, number, undefined, null', type, child, 'Text');
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
// Render Functions
|
|
336
|
+
return createElement(Inline, Object.assign({
|
|
337
|
+
__allowChildren: "text",
|
|
338
|
+
as: as
|
|
339
|
+
}, props, {
|
|
340
|
+
className: default_1(text_module.text, {
|
|
341
|
+
[text_module.block]: block,
|
|
342
|
+
[text_module.emphasized]: emphasized
|
|
343
|
+
}, prio, size, className)
|
|
344
|
+
}), children);
|
|
345
|
+
}
|
|
346
|
+
const tmp = memo(Text);
|
|
347
|
+
|
|
348
|
+
;// ./src/Components/Text/heading.module.scss
|
|
349
|
+
// extracted by mini-css-extract-plugin
|
|
350
|
+
/* harmony default export */ const heading_module = ({"heading":"heading__oxEyT"});
|
|
351
|
+
;// ./src/Components/Text/Heading.tsx
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
function Heading({
|
|
358
|
+
children,
|
|
359
|
+
className,
|
|
360
|
+
style
|
|
361
|
+
}) {
|
|
362
|
+
// Variables
|
|
363
|
+
// Refs
|
|
364
|
+
// States
|
|
365
|
+
// Selectors
|
|
366
|
+
// Callbacks
|
|
367
|
+
// Effects
|
|
368
|
+
// Other
|
|
369
|
+
// Render Functions
|
|
370
|
+
return createElement(tmp, {
|
|
371
|
+
as: "h1",
|
|
372
|
+
size: TEXT_SIZE.xxLarge,
|
|
373
|
+
prio: TEXT_PRIO.heading,
|
|
374
|
+
className: default_1(heading_module.heading, className),
|
|
375
|
+
style: style
|
|
376
|
+
}, children);
|
|
377
|
+
}
|
|
378
|
+
// Need HeadingMemo for autocompletion of phpstorm
|
|
379
|
+
const HeadingMemo = withMemo(Heading, 'text');
|
|
380
|
+
|
|
381
|
+
;// ./src/Components/ErrorBoundary.tsx
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
class ErrorBoundary extends Component {
|
|
387
|
+
constructor() {
|
|
388
|
+
super(...arguments);
|
|
389
|
+
this.state = {
|
|
390
|
+
error: null
|
|
391
|
+
};
|
|
392
|
+
}
|
|
393
|
+
static getDerivedStateFromError(error) {
|
|
394
|
+
console.error('Got error', error);
|
|
395
|
+
return {
|
|
396
|
+
error
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
render() {
|
|
400
|
+
const {
|
|
401
|
+
error
|
|
402
|
+
} = this.state;
|
|
403
|
+
const {
|
|
404
|
+
children,
|
|
405
|
+
formatError,
|
|
406
|
+
showStack
|
|
407
|
+
} = this.props;
|
|
408
|
+
if (error) {
|
|
409
|
+
const message = (formatError === null || formatError === void 0 ? void 0 : formatError(error)) || String(error);
|
|
410
|
+
let stack;
|
|
411
|
+
if (error instanceof Error) {
|
|
412
|
+
stack = error.stack;
|
|
413
|
+
}
|
|
414
|
+
return default_0.createElement(BaseBlock, null, default_0.createElement(HeadingMemo, null, message), !!stack && showStack && default_0.createElement(tmp, {
|
|
415
|
+
style: {
|
|
416
|
+
whiteSpace: 'pre'
|
|
417
|
+
}
|
|
418
|
+
}, stack));
|
|
419
|
+
}
|
|
420
|
+
return children;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
;// ./src/Components/Flavor.ts
|
|
424
|
+
var Flavor;
|
|
425
|
+
(function (Flavor) {
|
|
426
|
+
Flavor["Accent"] = "flavor-accent";
|
|
427
|
+
Flavor["Basic"] = "flavor-basic";
|
|
428
|
+
Flavor["Destructive"] = "flavor-destructive";
|
|
429
|
+
Flavor["Constructive"] = "flavor-constructive";
|
|
430
|
+
})(Flavor || (Flavor = {}));
|
|
431
|
+
;// ./src/helper/Characters.ts
|
|
432
|
+
const Characters = {
|
|
433
|
+
NBSP: '\u00A0',
|
|
434
|
+
PATH_DELIMITER: '/',
|
|
435
|
+
MIDDLE_DOT: '\u00B7'
|
|
436
|
+
};
|
|
437
|
+
;// ./src/helper/nonEmptyString.ts
|
|
438
|
+
|
|
439
|
+
function nonEmptyString(str, other = Characters.NBSP) {
|
|
440
|
+
if (!str) {
|
|
441
|
+
return other;
|
|
442
|
+
}
|
|
443
|
+
return str;
|
|
444
|
+
}
|
|
445
|
+
;// ./src/helper/useDeepShallow.ts
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
function useDeepShallow(selector, depth = -1) {
|
|
449
|
+
const prev = useRef(undefined);
|
|
450
|
+
return state => {
|
|
451
|
+
const next = selector(state);
|
|
452
|
+
return JsonHelper.deepEqual(prev.current, next, depth) ? prev.current : prev.current = next;
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
;// ./src/helper/withRenderBrowserOnly.tsx
|
|
456
|
+
var withRenderBrowserOnly_rest = undefined && undefined.__rest || function (s, e) {
|
|
457
|
+
var t = {};
|
|
458
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
459
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
460
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
461
|
+
}
|
|
462
|
+
return t;
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
function withRenderBrowserOnly(Component) {
|
|
466
|
+
const displayName = `WithRenderBrowserOnly(${Component.displayName || Component.name})`;
|
|
467
|
+
function HocComponent(_a, ref) {
|
|
468
|
+
var {
|
|
469
|
+
children
|
|
470
|
+
} = _a,
|
|
471
|
+
props = withRenderBrowserOnly_rest(_a, ["children"]);
|
|
472
|
+
const [isBrowser, setIsBrowser] = useState(false);
|
|
473
|
+
useEffect(() => setIsBrowser(true), []);
|
|
474
|
+
if (!isBrowser) {
|
|
475
|
+
return null;
|
|
476
|
+
}
|
|
477
|
+
const newProps = props;
|
|
478
|
+
if (ref && Object.keys(ref).length > 0) {
|
|
479
|
+
newProps.ref = ref;
|
|
480
|
+
}
|
|
481
|
+
return (
|
|
482
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
483
|
+
// @ts-ignore
|
|
484
|
+
default_0.createElement(Component, Object.assign({}, newProps), children)
|
|
485
|
+
);
|
|
486
|
+
}
|
|
487
|
+
HocComponent.displayName = displayName;
|
|
488
|
+
return HocComponent;
|
|
489
|
+
}
|
|
490
|
+
;// ./src/WindowContext/WindowContext.ts
|
|
491
|
+
|
|
492
|
+
const WindowContext = default_0.createContext(undefined);
|
|
493
|
+
WindowContext.displayName = 'WindowContext';
|
|
494
|
+
function useWindow() {
|
|
495
|
+
var _a;
|
|
496
|
+
return (_a = useContext(WindowContext)) !== null && _a !== void 0 ? _a : typeof window !== 'undefined' ? window : undefined;
|
|
497
|
+
}
|
|
498
|
+
;// external "@fortawesome/react-fontawesome"
|
|
499
|
+
|
|
500
|
+
;// ./src/Components/Icon/icon.module.scss
|
|
501
|
+
// extracted by mini-css-extract-plugin
|
|
502
|
+
/* harmony default export */ const icon_module = ({"margin":"margin__Oq6ib","imgIcon":"imgIcon__B6ZP0","doubleIconContainer":"doubleIconContainer__TzWce","secondIcon":"secondIcon__YwXe_"});
|
|
503
|
+
;// ./src/Components/Icon/BaseIcon.tsx
|
|
504
|
+
var BaseIcon_rest = undefined && undefined.__rest || function (s, e) {
|
|
505
|
+
var t = {};
|
|
506
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
507
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
508
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
509
|
+
}
|
|
510
|
+
return t;
|
|
511
|
+
};
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
const BaseIcon = withMemo(function BaseIcon(_a) {
|
|
261
518
|
// Variables
|
|
262
519
|
var {
|
|
263
|
-
|
|
520
|
+
icon,
|
|
521
|
+
alt,
|
|
522
|
+
className,
|
|
523
|
+
noMargin = true,
|
|
524
|
+
style,
|
|
264
525
|
ref
|
|
265
526
|
} = _a,
|
|
266
|
-
props =
|
|
267
|
-
// Refs
|
|
527
|
+
props = BaseIcon_rest(_a, ["icon", "alt", "className", "noMargin", "style", "ref"]);
|
|
268
528
|
// States
|
|
269
|
-
//
|
|
529
|
+
// Refs
|
|
270
530
|
// Callbacks
|
|
271
531
|
// Effects
|
|
272
532
|
// Other
|
|
533
|
+
if (!alt && typeof icon === 'string') {
|
|
534
|
+
alt = icon;
|
|
535
|
+
}
|
|
273
536
|
// Render Functions
|
|
274
|
-
|
|
537
|
+
if (typeof icon === 'string' && (icon.includes('.') || icon.startsWith('data:'))) {
|
|
538
|
+
return createElement("img", {
|
|
539
|
+
src: icon,
|
|
540
|
+
alt: alt,
|
|
541
|
+
className: default_1(icon_module.imgIcon, className, {
|
|
542
|
+
[icon_module.margin]: !noMargin
|
|
543
|
+
}),
|
|
544
|
+
style: style,
|
|
545
|
+
ref: ref
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
return createElement(FontAwesomeIcon, Object.assign({}, props, {
|
|
549
|
+
icon: icon,
|
|
550
|
+
className: default_1(className, {
|
|
551
|
+
[icon_module.margin]: !noMargin
|
|
552
|
+
}),
|
|
553
|
+
style: style,
|
|
275
554
|
ref: ref
|
|
276
|
-
})
|
|
277
|
-
}
|
|
278
|
-
;//
|
|
279
|
-
|
|
280
|
-
;// ./src/Components/Layout/layout.module.scss
|
|
281
|
-
// extracted by mini-css-extract-plugin
|
|
282
|
-
/* harmony default export */ const layout_module = ({"flex":"flex__Xtdxj","horizontal":"horizontal__HAxyH","grow":"grow__GRH5E","weight0":"weight0__mAhm_","weight1":"weight1__Gvlqz","weight2":"weight2__KF4_k","weight3":"weight3__fZi1h","weight4":"weight4__SUChB","weight5":"weight5__fgiwz","weight6":"weight6__tBvFt","center":"center__JNiHZ","block":"block__OUDP2","inlineBlock":"inlineBlock__C1O3Y","inline":"inline__uUoNu"});
|
|
283
|
-
;// ./src/Components/Layout/Block.tsx
|
|
284
|
-
var Block_rest = undefined && undefined.__rest || function (s, e) {
|
|
555
|
+
}));
|
|
556
|
+
});
|
|
557
|
+
;// ./src/Components/Layout/BaseInlineBlock.tsx
|
|
558
|
+
var BaseInlineBlock_rest = undefined && undefined.__rest || function (s, e) {
|
|
285
559
|
var t = {};
|
|
286
560
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
287
561
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
@@ -294,15 +568,14 @@ var Block_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
294
568
|
|
|
295
569
|
|
|
296
570
|
|
|
297
|
-
const
|
|
571
|
+
const BaseInlineBlock = withMemo(function BaseInlineBlock(_a) {
|
|
298
572
|
// Variables
|
|
299
573
|
var {
|
|
300
574
|
children,
|
|
301
|
-
as = '
|
|
302
|
-
className
|
|
303
|
-
ref
|
|
575
|
+
as = 'span',
|
|
576
|
+
className
|
|
304
577
|
} = _a,
|
|
305
|
-
props =
|
|
578
|
+
props = BaseInlineBlock_rest(_a, ["children", "as", "className"]);
|
|
306
579
|
// Refs
|
|
307
580
|
// States
|
|
308
581
|
// Selectors
|
|
@@ -310,11 +583,10 @@ const Block = withMemo(function Block(_a) {
|
|
|
310
583
|
// Effects
|
|
311
584
|
// Other
|
|
312
585
|
// Render Functions
|
|
313
|
-
return createElement(ViewWithoutListeners, Object.assign({
|
|
314
|
-
className: default_1(layout_module.
|
|
315
|
-
as: as
|
|
316
|
-
|
|
317
|
-
}, props), children);
|
|
586
|
+
return createElement(ViewWithoutListeners, Object.assign({}, props, {
|
|
587
|
+
className: default_1(layout_module.inlineBlock, className),
|
|
588
|
+
as: as
|
|
589
|
+
}), children);
|
|
318
590
|
});
|
|
319
591
|
;// ./src/Components/Hooks/useComposedRef.ts
|
|
320
592
|
|
|
@@ -646,220 +918,37 @@ const Flex = withMemo(function Flex(_a) {
|
|
|
646
918
|
className,
|
|
647
919
|
horizontal = false,
|
|
648
920
|
ref,
|
|
649
|
-
grow = false
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
// Other
|
|
657
|
-
// Render Functions
|
|
658
|
-
return createElement(ViewWithoutListeners, Object.assign({
|
|
659
|
-
className: default_1(className, layout_module.flex, {
|
|
660
|
-
[layout_module.horizontal]: horizontal,
|
|
661
|
-
[layout_module.grow]: grow,
|
|
662
|
-
[layout_module.weight1]: grow
|
|
663
|
-
}),
|
|
664
|
-
as: as,
|
|
665
|
-
ref: ref
|
|
666
|
-
}, props), children);
|
|
667
|
-
});
|
|
668
|
-
;// external "@fortawesome/react-fontawesome"
|
|
669
|
-
|
|
670
|
-
;// ./src/Components/Icon/icon.module.scss
|
|
671
|
-
// extracted by mini-css-extract-plugin
|
|
672
|
-
/* harmony default export */ const icon_module = ({"margin":"margin__Oq6ib","imgIcon":"imgIcon__B6ZP0","doubleIconContainer":"doubleIconContainer__TzWce","secondIcon":"secondIcon__YwXe_"});
|
|
673
|
-
;// ./src/Components/Icon/Icon.tsx
|
|
674
|
-
var Icon_rest = undefined && undefined.__rest || function (s, e) {
|
|
675
|
-
var t = {};
|
|
676
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
677
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
678
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
679
|
-
}
|
|
680
|
-
return t;
|
|
681
|
-
};
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
const Icon = withMemo(function Icon(_a) {
|
|
688
|
-
// Variables
|
|
689
|
-
var {
|
|
690
|
-
icon,
|
|
691
|
-
alt,
|
|
692
|
-
className,
|
|
693
|
-
noMargin = true,
|
|
694
|
-
style,
|
|
695
|
-
title
|
|
696
|
-
} = _a,
|
|
697
|
-
props = Icon_rest(_a, ["icon", "alt", "className", "noMargin", "style", "title"]);
|
|
698
|
-
// States
|
|
699
|
-
// Refs
|
|
700
|
-
// Callbacks
|
|
701
|
-
// Effects
|
|
702
|
-
// Other
|
|
703
|
-
if (!alt && typeof icon === 'string') {
|
|
704
|
-
alt = icon;
|
|
705
|
-
}
|
|
706
|
-
// Render Functions
|
|
707
|
-
if (typeof icon === 'string' && (icon.includes('.') || icon.startsWith('data:'))) {
|
|
708
|
-
return createElement("img", {
|
|
709
|
-
src: icon,
|
|
710
|
-
alt: alt,
|
|
711
|
-
className: default_1(icon_module.imgIcon, className, {
|
|
712
|
-
[icon_module.margin]: !noMargin
|
|
713
|
-
}),
|
|
714
|
-
style: style,
|
|
715
|
-
title: title
|
|
716
|
-
});
|
|
717
|
-
}
|
|
718
|
-
return createElement(FontAwesomeIcon, Object.assign({}, props, {
|
|
719
|
-
icon: icon,
|
|
720
|
-
className: default_1(className, {
|
|
721
|
-
[icon_module.margin]: !noMargin
|
|
722
|
-
}),
|
|
723
|
-
style: style,
|
|
724
|
-
title: title
|
|
725
|
-
}));
|
|
726
|
-
});
|
|
727
|
-
;// ./src/Components/Layout/InlineBlock.tsx
|
|
728
|
-
var InlineBlock_rest = undefined && undefined.__rest || function (s, e) {
|
|
729
|
-
var t = {};
|
|
730
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
731
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
732
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
733
|
-
}
|
|
734
|
-
return t;
|
|
735
|
-
};
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
const InlineBlock = withMemo(function InlineBlock(_a) {
|
|
742
|
-
// Variables
|
|
743
|
-
var {
|
|
744
|
-
children,
|
|
745
|
-
as = 'span',
|
|
746
|
-
className
|
|
747
|
-
} = _a,
|
|
748
|
-
props = InlineBlock_rest(_a, ["children", "as", "className"]);
|
|
749
|
-
// Refs
|
|
750
|
-
// States
|
|
751
|
-
// Selectors
|
|
752
|
-
// Callbacks
|
|
753
|
-
// Effects
|
|
754
|
-
// Other
|
|
755
|
-
// Render Functions
|
|
756
|
-
return createElement(ViewWithoutListeners, Object.assign({}, props, {
|
|
757
|
-
className: default_1(layout_module.inlineBlock, className),
|
|
758
|
-
as: as
|
|
759
|
-
}), children);
|
|
760
|
-
});
|
|
761
|
-
;// ./src/Components/Layout/Inline.tsx
|
|
762
|
-
var Inline_rest = undefined && undefined.__rest || function (s, e) {
|
|
763
|
-
var t = {};
|
|
764
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
765
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
766
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
767
|
-
}
|
|
768
|
-
return t;
|
|
769
|
-
};
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
const Inline = withMemo(function Inline(_a) {
|
|
776
|
-
// Variables
|
|
777
|
-
var {
|
|
778
|
-
children,
|
|
779
|
-
as = 'span',
|
|
780
|
-
className
|
|
781
|
-
} = _a,
|
|
782
|
-
props = Inline_rest(_a, ["children", "as", "className"]);
|
|
783
|
-
// Refs
|
|
784
|
-
// States
|
|
785
|
-
// Selectors
|
|
786
|
-
// Callbacks
|
|
787
|
-
// Effects
|
|
788
|
-
// Other
|
|
789
|
-
// Render Functions
|
|
790
|
-
return createElement(ViewWithoutListeners, Object.assign({
|
|
791
|
-
className: default_1(layout_module.inline, className),
|
|
792
|
-
as: as
|
|
793
|
-
}, props), children);
|
|
794
|
-
});
|
|
795
|
-
;// ./src/Components/Text/text.module.scss
|
|
796
|
-
// extracted by mini-css-extract-plugin
|
|
797
|
-
/* harmony default export */ const text_module = ({"text":"text__ejS3o","block":"block__naLxK","heading":"heading__KU9xU","primaryDefault":"primaryDefault__Liz7y","primary":"primary__rEpob","secondary":"secondary__zUXeI","tertiary":"tertiary__UaTRx","xsmall":"xsmall__BCYOF","small":"small__AWNxX","medium":"medium__rHmhh","large":"large__ekCpY","xlarge":"xlarge__KP0mY","xxlarge":"xxlarge__Japom","emphasized":"emphasized__Gn24q"});
|
|
798
|
-
;// ./src/Components/Text/Text.tsx
|
|
799
|
-
var Text_rest = undefined && undefined.__rest || function (s, e) {
|
|
800
|
-
var t = {};
|
|
801
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
802
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
803
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
804
|
-
}
|
|
805
|
-
return t;
|
|
806
|
-
};
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
const TEXT_PRIO = {
|
|
813
|
-
primary: text_module.primary,
|
|
814
|
-
secondary: text_module.secondary,
|
|
815
|
-
tertiary: text_module.tertiary,
|
|
816
|
-
heading: text_module.heading
|
|
817
|
-
};
|
|
818
|
-
const TEXT_SIZE = {
|
|
819
|
-
xSmall: text_module.xsmall,
|
|
820
|
-
small: text_module.small,
|
|
821
|
-
medium: text_module.medium,
|
|
822
|
-
large: text_module.large,
|
|
823
|
-
xLarge: text_module.xlarge,
|
|
824
|
-
xxLarge: text_module.xxlarge
|
|
825
|
-
};
|
|
826
|
-
function Text(_a) {
|
|
827
|
-
var {
|
|
828
|
-
className,
|
|
829
|
-
children,
|
|
830
|
-
block = false,
|
|
831
|
-
prio,
|
|
832
|
-
emphasized = false,
|
|
833
|
-
size = TEXT_SIZE.medium,
|
|
834
|
-
as = 'span'
|
|
921
|
+
grow = false,
|
|
922
|
+
unaligned = false,
|
|
923
|
+
fill = false,
|
|
924
|
+
fillWidth = fill,
|
|
925
|
+
fillHeight = fill,
|
|
926
|
+
gap,
|
|
927
|
+
style
|
|
835
928
|
} = _a,
|
|
836
|
-
props =
|
|
837
|
-
// Variables
|
|
838
|
-
prio = prio !== null && prio !== void 0 ? prio : text_module.primaryDefault;
|
|
929
|
+
props = Flex_rest(_a, ["children", "as", "className", "horizontal", "ref", "grow", "unaligned", "fill", "fillWidth", "fillHeight", "gap", "style"]);
|
|
839
930
|
// States
|
|
840
931
|
// Refs
|
|
841
932
|
// Callbacks
|
|
842
933
|
// Effects
|
|
843
|
-
// Other
|
|
844
|
-
Children.forEach(children, child => {
|
|
845
|
-
const type = typeof child;
|
|
846
|
-
if (type !== 'string' && type !== 'undefined' && type !== 'object' && type !== 'number' || type === 'object' && child !== null) {
|
|
847
|
-
throw new WrongChildError('string, number, undefined, null', type, child, 'Text');
|
|
848
|
-
}
|
|
849
|
-
});
|
|
934
|
+
// Other
|
|
850
935
|
// Render Functions
|
|
851
|
-
return createElement(
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
[
|
|
857
|
-
[
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
936
|
+
return createElement(ViewWithoutListeners, Object.assign({
|
|
937
|
+
className: default_1(className, layout_module.flex, {
|
|
938
|
+
[layout_module.horizontal]: horizontal,
|
|
939
|
+
[layout_module.grow]: grow,
|
|
940
|
+
[layout_module.weight1]: grow,
|
|
941
|
+
[layout_module.unaligned]: unaligned,
|
|
942
|
+
[layout_module.fillWidth]: fillWidth,
|
|
943
|
+
[layout_module.fillHeight]: fillHeight
|
|
944
|
+
}),
|
|
945
|
+
style: Object.assign({
|
|
946
|
+
gap
|
|
947
|
+
}, style),
|
|
948
|
+
as: as,
|
|
949
|
+
ref: ref
|
|
950
|
+
}, props), children);
|
|
951
|
+
});
|
|
863
952
|
;// external "@fortawesome/free-solid-svg-icons"
|
|
864
953
|
|
|
865
954
|
;// ./src/scss/baseClasses.module.scss
|
|
@@ -920,9 +1009,9 @@ const ActionSheet = withMemo(function ActionSheet({
|
|
|
920
1009
|
}),
|
|
921
1010
|
onClick: onActionClick,
|
|
922
1011
|
onClickData: action
|
|
923
|
-
}, createElement(
|
|
1012
|
+
}, createElement(BaseInlineBlock, {
|
|
924
1013
|
className: actionSheet_module.actionIcon
|
|
925
|
-
}, action.icon ? createElement(
|
|
1014
|
+
}, action.icon ? createElement(BaseIcon, {
|
|
926
1015
|
icon: action.icon
|
|
927
1016
|
}) : null), createElement(tmp, {
|
|
928
1017
|
className: actionSheet_module.actionName
|
|
@@ -938,15 +1027,15 @@ const ActionSheet = withMemo(function ActionSheet({
|
|
|
938
1027
|
className: baseClasses_module.fullHeight
|
|
939
1028
|
}, createElement(Flex, {
|
|
940
1029
|
className: actionSheet_module.content
|
|
941
|
-
}, title ? createElement(
|
|
1030
|
+
}, title ? createElement(BaseBlock, {
|
|
942
1031
|
className: actionSheet_module.title
|
|
943
1032
|
}, createElement(tmp, null, title)) : null, actions.map(renderAction), createElement(Clickable, {
|
|
944
1033
|
className: actionSheet_module.cancel,
|
|
945
1034
|
onClick: () => console.log('Cancel clicked'),
|
|
946
1035
|
__allowChildren: "all"
|
|
947
|
-
}, createElement(
|
|
1036
|
+
}, createElement(BaseInlineBlock, {
|
|
948
1037
|
className: actionSheet_module.actionIcon
|
|
949
|
-
}, createElement(
|
|
1038
|
+
}, createElement(BaseIcon, {
|
|
950
1039
|
icon: faTimes
|
|
951
1040
|
})), cancelText))));
|
|
952
1041
|
});
|
|
@@ -1021,15 +1110,15 @@ function ButtonDialog({
|
|
|
1021
1110
|
// Effects
|
|
1022
1111
|
// Other
|
|
1023
1112
|
// Render Functions
|
|
1024
|
-
return createElement(
|
|
1113
|
+
return createElement(BaseBlock, {
|
|
1025
1114
|
className: default_1(buttonDialog_module.buttonDialog, className),
|
|
1026
1115
|
style: style
|
|
1027
|
-
}, !!title && createElement(
|
|
1116
|
+
}, !!title && createElement(BaseBlock, null, createElement(tmp, {
|
|
1028
1117
|
size: TEXT_SIZE.large,
|
|
1029
1118
|
className: buttonDialog_module.title
|
|
1030
|
-
}, title)), createElement(
|
|
1119
|
+
}, title)), createElement(BaseBlock, null, createElement(tmp, {
|
|
1031
1120
|
className: buttonDialog_module.message
|
|
1032
|
-
}, message)), extraContent, createElement(
|
|
1121
|
+
}, message)), extraContent, createElement(BaseBlock, {
|
|
1033
1122
|
className: buttonDialog_module.buttonContainer
|
|
1034
1123
|
}, buttons.map((b, i) => {
|
|
1035
1124
|
var _a;
|
|
@@ -1153,7 +1242,7 @@ function Dialog({
|
|
|
1153
1242
|
if (isClosed) {
|
|
1154
1243
|
return null;
|
|
1155
1244
|
}
|
|
1156
|
-
return createElement(
|
|
1245
|
+
return createElement(BaseBlock, {
|
|
1157
1246
|
className: default_1(dialog_module.dialogContainer, className),
|
|
1158
1247
|
__allowChildren: "all",
|
|
1159
1248
|
style: style
|
|
@@ -1161,7 +1250,7 @@ function Dialog({
|
|
|
1161
1250
|
onClick: onCurtainClick,
|
|
1162
1251
|
className: dialog_module.closeCurtain,
|
|
1163
1252
|
interactable: closable
|
|
1164
|
-
}), createElement(
|
|
1253
|
+
}), createElement(BaseInlineBlock, {
|
|
1165
1254
|
__allowChildren: "all",
|
|
1166
1255
|
className: dialog_module.dialog
|
|
1167
1256
|
}, Children.map(children, child => {
|
|
@@ -1213,39 +1302,6 @@ const Grow = withMemo(function Grow({
|
|
|
1213
1302
|
style: style
|
|
1214
1303
|
}, children);
|
|
1215
1304
|
});
|
|
1216
|
-
;// ./src/Components/Text/heading.module.scss
|
|
1217
|
-
// extracted by mini-css-extract-plugin
|
|
1218
|
-
/* harmony default export */ const heading_module = ({"heading":"heading__oxEyT"});
|
|
1219
|
-
;// ./src/Components/Text/Heading.tsx
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
function Heading({
|
|
1226
|
-
children,
|
|
1227
|
-
className,
|
|
1228
|
-
style
|
|
1229
|
-
}) {
|
|
1230
|
-
// Variables
|
|
1231
|
-
// Refs
|
|
1232
|
-
// States
|
|
1233
|
-
// Selectors
|
|
1234
|
-
// Callbacks
|
|
1235
|
-
// Effects
|
|
1236
|
-
// Other
|
|
1237
|
-
// Render Functions
|
|
1238
|
-
return createElement(tmp, {
|
|
1239
|
-
as: "h1",
|
|
1240
|
-
size: TEXT_SIZE.xxLarge,
|
|
1241
|
-
prio: TEXT_PRIO.heading,
|
|
1242
|
-
className: default_1(heading_module.heading, className),
|
|
1243
|
-
style: style
|
|
1244
|
-
}, children);
|
|
1245
|
-
}
|
|
1246
|
-
// Need HeadingMemo for autocompletion of phpstorm
|
|
1247
|
-
const HeadingMemo = withMemo(Heading, 'text');
|
|
1248
|
-
|
|
1249
1305
|
;// ./src/Components/Dialog/dialogBackground.module.scss
|
|
1250
1306
|
// extracted by mini-css-extract-plugin
|
|
1251
1307
|
/* harmony default export */ const dialogBackground_module = ({"dialogBackground":"dialogBackground__d53GC","title":"title___zJOu"});
|
|
@@ -1276,7 +1332,7 @@ const DialogBackground = withMemo(function DialogBackground({
|
|
|
1276
1332
|
// Effects
|
|
1277
1333
|
// Other
|
|
1278
1334
|
// Render Functions
|
|
1279
|
-
return createElement(
|
|
1335
|
+
return createElement(BaseBlock, {
|
|
1280
1336
|
__allowChildren: "all",
|
|
1281
1337
|
className: default_1(dialogBackground_module.dialogBackground, className),
|
|
1282
1338
|
style: style
|
|
@@ -1285,7 +1341,7 @@ const DialogBackground = withMemo(function DialogBackground({
|
|
|
1285
1341
|
className: dialogBackground_module.title
|
|
1286
1342
|
}, !!title && createElement(Grow, null, createElement(HeadingMemo, null, title)), !!onClose && createElement(Clickable, {
|
|
1287
1343
|
onClick: onClose
|
|
1288
|
-
}, createElement(
|
|
1344
|
+
}, createElement(BaseIcon, {
|
|
1289
1345
|
size: "lg",
|
|
1290
1346
|
icon: faCircleXmark
|
|
1291
1347
|
}))), children);
|
|
@@ -1353,7 +1409,7 @@ const DialogContainer = withMemo(function DialogContainer({
|
|
|
1353
1409
|
// Render Functions
|
|
1354
1410
|
return createElement(DialogProvider, {
|
|
1355
1411
|
value: showDialog
|
|
1356
|
-
}, children, createElement(
|
|
1412
|
+
}, children, createElement(BaseBlock, {
|
|
1357
1413
|
className: dialogClassName
|
|
1358
1414
|
}, dialogs.map(d => {
|
|
1359
1415
|
const DialogComponent = d.component;
|
|
@@ -1690,7 +1746,7 @@ function useDelayed(callback, dependencies, delay = 100, maxDelay = undefined) {
|
|
|
1690
1746
|
const maxDelayTimeout = useRef(undefined);
|
|
1691
1747
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1692
1748
|
const realCB = useCallback(callback, dependencies);
|
|
1693
|
-
|
|
1749
|
+
return useCallback((...newArgs) => {
|
|
1694
1750
|
argsRef.current = newArgs;
|
|
1695
1751
|
const triggerFunc = () => {
|
|
1696
1752
|
clearTimeout(mayDelayTimeoutRef.current);
|
|
@@ -1699,19 +1755,21 @@ function useDelayed(callback, dependencies, delay = 100, maxDelay = undefined) {
|
|
|
1699
1755
|
maxDelayTimeout.current = undefined;
|
|
1700
1756
|
if (argsRef.current !== undefined) {
|
|
1701
1757
|
realCB(...argsRef.current);
|
|
1758
|
+
argsRef.current = undefined;
|
|
1702
1759
|
}
|
|
1703
1760
|
};
|
|
1704
1761
|
if (timeoutRef.current) {
|
|
1705
1762
|
clearTimeout(timeoutRef.current);
|
|
1706
1763
|
}
|
|
1707
|
-
timeoutRef.current = setTimeout(
|
|
1764
|
+
timeoutRef.current = setTimeout(() => {
|
|
1765
|
+
triggerFunc();
|
|
1766
|
+
}, delay);
|
|
1708
1767
|
if (maxDelay && maxDelayTimeout.current === undefined) {
|
|
1709
1768
|
maxDelayTimeout.current = setTimeout(() => {
|
|
1710
1769
|
triggerFunc();
|
|
1711
1770
|
}, maxDelay);
|
|
1712
1771
|
}
|
|
1713
1772
|
}, [delay, maxDelay, realCB]);
|
|
1714
|
-
return func;
|
|
1715
1773
|
}
|
|
1716
1774
|
;// ./src/Components/Hooks/useDelayedEffect.ts
|
|
1717
1775
|
|
|
@@ -1941,17 +1999,238 @@ const DoubleIcon = withMemo(function DoubleIcon(_a) {
|
|
|
1941
1999
|
// Effects
|
|
1942
2000
|
// Other
|
|
1943
2001
|
// RenderFunctions
|
|
1944
|
-
return default_0.createElement(
|
|
2002
|
+
return default_0.createElement(BaseInlineBlock, {
|
|
1945
2003
|
className: icon_module.doubleIconContainer
|
|
1946
|
-
}, default_0.createElement(
|
|
2004
|
+
}, default_0.createElement(BaseIcon, Object.assign({}, otherProps, {
|
|
1947
2005
|
color: color
|
|
1948
|
-
})), default_0.createElement(
|
|
2006
|
+
})), default_0.createElement(BaseIcon, {
|
|
1949
2007
|
icon: secondIcon,
|
|
1950
2008
|
size: "xs",
|
|
1951
2009
|
className: icon_module.secondIcon,
|
|
1952
2010
|
color: secondIconColor !== null && secondIconColor !== void 0 ? secondIconColor : color
|
|
1953
2011
|
}));
|
|
1954
2012
|
});
|
|
2013
|
+
;// ./src/Components/Title/hoverTitle.module.scss
|
|
2014
|
+
// extracted by mini-css-extract-plugin
|
|
2015
|
+
/* harmony default export */ const hoverTitle_module = ({"title":"title__I36WU"});
|
|
2016
|
+
;// ./src/Components/Title/HoverTitle.tsx
|
|
2017
|
+
|
|
2018
|
+
|
|
2019
|
+
|
|
2020
|
+
|
|
2021
|
+
|
|
2022
|
+
|
|
2023
|
+
const HoverTitle = withMemo(function HoverTitle({
|
|
2024
|
+
children,
|
|
2025
|
+
baseElement,
|
|
2026
|
+
isOpen,
|
|
2027
|
+
onClose
|
|
2028
|
+
}) {
|
|
2029
|
+
// Refs
|
|
2030
|
+
const titleRef = useRef(null);
|
|
2031
|
+
// States/Variables/Selectors
|
|
2032
|
+
const [top, setTop] = useState(0);
|
|
2033
|
+
const [left, setLeft] = useState(0);
|
|
2034
|
+
const window = useWindow();
|
|
2035
|
+
// Callbacks
|
|
2036
|
+
// Effects
|
|
2037
|
+
useEffect(() => {
|
|
2038
|
+
if (!isOpen) {
|
|
2039
|
+
return undefined;
|
|
2040
|
+
}
|
|
2041
|
+
const listener = e => {
|
|
2042
|
+
var _a;
|
|
2043
|
+
if (!((_a = titleRef.current) === null || _a === void 0 ? void 0 : _a.contains(e.target))) {
|
|
2044
|
+
onClose();
|
|
2045
|
+
}
|
|
2046
|
+
};
|
|
2047
|
+
window === null || window === void 0 ? void 0 : window.addEventListener('mousedown', listener, {
|
|
2048
|
+
capture: true
|
|
2049
|
+
});
|
|
2050
|
+
window === null || window === void 0 ? void 0 : window.addEventListener('touchstart', listener, {
|
|
2051
|
+
capture: true
|
|
2052
|
+
});
|
|
2053
|
+
return () => {
|
|
2054
|
+
window === null || window === void 0 ? void 0 : window.removeEventListener('mousedown', listener, {
|
|
2055
|
+
capture: true
|
|
2056
|
+
});
|
|
2057
|
+
window === null || window === void 0 ? void 0 : window.removeEventListener('touchstart', listener, {
|
|
2058
|
+
capture: true
|
|
2059
|
+
});
|
|
2060
|
+
};
|
|
2061
|
+
}, [isOpen, onClose, window]);
|
|
2062
|
+
useClientLayoutEffect(() => {
|
|
2063
|
+
if (!titleRef.current || !baseElement.current || !isOpen) {
|
|
2064
|
+
return undefined;
|
|
2065
|
+
}
|
|
2066
|
+
const titleElement = titleRef.current;
|
|
2067
|
+
const base = baseElement.current;
|
|
2068
|
+
const updateInnerPositions = () => {
|
|
2069
|
+
var _a, _b;
|
|
2070
|
+
const computedStyleElement = base.getBoundingClientRect();
|
|
2071
|
+
const computedStyleTitle = getComputedStyle(titleElement);
|
|
2072
|
+
const height = Number.parseFloat(computedStyleTitle.height);
|
|
2073
|
+
let newY = computedStyleElement.top - height;
|
|
2074
|
+
if (newY < 0) {
|
|
2075
|
+
newY = computedStyleElement.top + computedStyleElement.height;
|
|
2076
|
+
}
|
|
2077
|
+
setTop(Math.min((_a = window === null || window === void 0 ? void 0 : window.innerHeight) !== null && _a !== void 0 ? _a : 1600, newY));
|
|
2078
|
+
const width = Number.parseFloat(computedStyleTitle.width);
|
|
2079
|
+
let newX = computedStyleElement.left;
|
|
2080
|
+
if (newX > ((_b = window === null || window === void 0 ? void 0 : window.innerWidth) !== null && _b !== void 0 ? _b : 0) - width) {
|
|
2081
|
+
newX -= width;
|
|
2082
|
+
}
|
|
2083
|
+
setLeft(Math.max(0, newX));
|
|
2084
|
+
};
|
|
2085
|
+
const observer = new ResizeObserver(() => {
|
|
2086
|
+
updateInnerPositions();
|
|
2087
|
+
});
|
|
2088
|
+
observer.observe(titleElement);
|
|
2089
|
+
observer.observe(base);
|
|
2090
|
+
updateInnerPositions();
|
|
2091
|
+
return () => {
|
|
2092
|
+
observer.disconnect();
|
|
2093
|
+
};
|
|
2094
|
+
}, [window, baseElement, isOpen]);
|
|
2095
|
+
// Other
|
|
2096
|
+
// RenderFunctions
|
|
2097
|
+
if (!isOpen || !children) {
|
|
2098
|
+
return null;
|
|
2099
|
+
}
|
|
2100
|
+
return default_0.createElement(BaseInlineBlock, {
|
|
2101
|
+
ref: titleRef,
|
|
2102
|
+
style: {
|
|
2103
|
+
top,
|
|
2104
|
+
left
|
|
2105
|
+
},
|
|
2106
|
+
className: hoverTitle_module.title
|
|
2107
|
+
}, children);
|
|
2108
|
+
});
|
|
2109
|
+
;// ./src/Components/Menu/useHoverMenu.ts
|
|
2110
|
+
|
|
2111
|
+
function useHoverMenu({
|
|
2112
|
+
openToSide,
|
|
2113
|
+
ref
|
|
2114
|
+
}) {
|
|
2115
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
2116
|
+
const [position, setPosition] = useState({
|
|
2117
|
+
x: 0,
|
|
2118
|
+
y: 0
|
|
2119
|
+
});
|
|
2120
|
+
const [offset, setOffset] = useState({
|
|
2121
|
+
x: 0,
|
|
2122
|
+
y: 0
|
|
2123
|
+
});
|
|
2124
|
+
// Dispatch
|
|
2125
|
+
// Callbacks
|
|
2126
|
+
const recalculatePosition = useCallback(() => {
|
|
2127
|
+
if (!ref.current) {
|
|
2128
|
+
return;
|
|
2129
|
+
}
|
|
2130
|
+
const {
|
|
2131
|
+
top,
|
|
2132
|
+
left,
|
|
2133
|
+
bottom,
|
|
2134
|
+
right,
|
|
2135
|
+
width,
|
|
2136
|
+
height
|
|
2137
|
+
} = ref.current.getBoundingClientRect();
|
|
2138
|
+
if (openToSide) {
|
|
2139
|
+
setPosition({
|
|
2140
|
+
x: right,
|
|
2141
|
+
y: top
|
|
2142
|
+
});
|
|
2143
|
+
setOffset({
|
|
2144
|
+
x: width,
|
|
2145
|
+
y: -height
|
|
2146
|
+
});
|
|
2147
|
+
} else {
|
|
2148
|
+
setPosition({
|
|
2149
|
+
x: left,
|
|
2150
|
+
y: bottom
|
|
2151
|
+
});
|
|
2152
|
+
setOffset({
|
|
2153
|
+
x: -width,
|
|
2154
|
+
y: height
|
|
2155
|
+
});
|
|
2156
|
+
}
|
|
2157
|
+
}, [openToSide, ref]);
|
|
2158
|
+
const close = useCallback(() => {
|
|
2159
|
+
setIsOpen(false);
|
|
2160
|
+
}, []);
|
|
2161
|
+
const open = useCallback(() => {
|
|
2162
|
+
recalculatePosition();
|
|
2163
|
+
setIsOpen(true);
|
|
2164
|
+
}, [recalculatePosition]);
|
|
2165
|
+
return {
|
|
2166
|
+
isOpen,
|
|
2167
|
+
position,
|
|
2168
|
+
open,
|
|
2169
|
+
close,
|
|
2170
|
+
offset
|
|
2171
|
+
};
|
|
2172
|
+
}
|
|
2173
|
+
;// ./src/Components/Title/withTitle.tsx
|
|
2174
|
+
var withTitle_rest = undefined && undefined.__rest || function (s, e) {
|
|
2175
|
+
var t = {};
|
|
2176
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
2177
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
2178
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
2179
|
+
}
|
|
2180
|
+
return t;
|
|
2181
|
+
};
|
|
2182
|
+
|
|
2183
|
+
|
|
2184
|
+
|
|
2185
|
+
|
|
2186
|
+
|
|
2187
|
+
|
|
2188
|
+
function withTitle(Comp) {
|
|
2189
|
+
return withMemo(_a => {
|
|
2190
|
+
var {
|
|
2191
|
+
title,
|
|
2192
|
+
ref
|
|
2193
|
+
} = _a,
|
|
2194
|
+
otherProps = withTitle_rest(_a, ["title", "ref"]);
|
|
2195
|
+
const titleRef = useRef(null);
|
|
2196
|
+
const composedRef = useComposedRef(titleRef, ref);
|
|
2197
|
+
const titleElement = typeof title === 'string' ? default_0.createElement(tmp, {
|
|
2198
|
+
size: TEXT_SIZE.small
|
|
2199
|
+
}, title.trim()) : title;
|
|
2200
|
+
const {
|
|
2201
|
+
isOpen,
|
|
2202
|
+
position,
|
|
2203
|
+
offset,
|
|
2204
|
+
open,
|
|
2205
|
+
close
|
|
2206
|
+
} = useHoverMenu({
|
|
2207
|
+
ref: titleRef
|
|
2208
|
+
});
|
|
2209
|
+
useEffect(() => {
|
|
2210
|
+
const element = titleRef.current;
|
|
2211
|
+
if (!element || !title) {
|
|
2212
|
+
return undefined;
|
|
2213
|
+
}
|
|
2214
|
+
element.addEventListener('mouseenter', open);
|
|
2215
|
+
element.addEventListener('mouseleave', close);
|
|
2216
|
+
return () => {
|
|
2217
|
+
element.removeEventListener('mouseenter', open);
|
|
2218
|
+
element.removeEventListener('mouseleave', close);
|
|
2219
|
+
};
|
|
2220
|
+
}, [close, open, title]);
|
|
2221
|
+
return default_0.createElement(default_0.Fragment, null, default_0.createElement(Comp, Object.assign({}, otherProps, {
|
|
2222
|
+
ref: composedRef
|
|
2223
|
+
})), default_0.createElement(HoverTitle, {
|
|
2224
|
+
baseElement: titleRef,
|
|
2225
|
+
isOpen: isOpen,
|
|
2226
|
+
onClose: close
|
|
2227
|
+
}, titleElement));
|
|
2228
|
+
});
|
|
2229
|
+
}
|
|
2230
|
+
;// ./src/Components/Icon/Icon.ts
|
|
2231
|
+
|
|
2232
|
+
|
|
2233
|
+
const Icon = withTitle(BaseIcon);
|
|
1955
2234
|
;// ./src/Components/Image/image.module.scss
|
|
1956
2235
|
// extracted by mini-css-extract-plugin
|
|
1957
2236
|
/* harmony default export */ const image_module = ({"image":"image__L7PA6"});
|
|
@@ -2043,6 +2322,14 @@ function InViewport({
|
|
|
2043
2322
|
}
|
|
2044
2323
|
const InViewportMemo = withMemo(InViewport);
|
|
2045
2324
|
|
|
2325
|
+
;// ./src/Components/Layout/Block.ts
|
|
2326
|
+
|
|
2327
|
+
|
|
2328
|
+
const Block = withTitle(BaseBlock);
|
|
2329
|
+
;// ./src/Components/Layout/InlineBlock.ts
|
|
2330
|
+
|
|
2331
|
+
|
|
2332
|
+
const InlineBlock = withTitle(BaseInlineBlock);
|
|
2046
2333
|
;// ./src/Components/LoadingCircle/loadingCircle.module.scss
|
|
2047
2334
|
// extracted by mini-css-extract-plugin
|
|
2048
2335
|
/* harmony default export */ const loadingCircle_module = ({"loadingCircle":"loadingCircle__XRvFa","spinner":"spinner__xIW3U","loadingCircleRotate":"loadingCircleRotate__DF8JT"});
|
|
@@ -2211,9 +2498,9 @@ const MenuItem = withMemo(function MenuItem(_a) {
|
|
|
2211
2498
|
onMouseEnter: onMouseEnterInner,
|
|
2212
2499
|
onMouseLeave: onMouseLeaveInner,
|
|
2213
2500
|
__allowChildren: "all"
|
|
2214
|
-
}), default_0.createElement(
|
|
2501
|
+
}), default_0.createElement(BaseBlock, {
|
|
2215
2502
|
className: default_1(menu_module.itemChildren)
|
|
2216
|
-
}, !!icon && default_0.createElement(
|
|
2503
|
+
}, !!icon && default_0.createElement(BaseIcon, {
|
|
2217
2504
|
icon: icon,
|
|
2218
2505
|
color: iconColor,
|
|
2219
2506
|
className: menu_module.icon
|
|
@@ -2332,7 +2619,7 @@ const Menu = withMemo(withRenderBrowserOnly(function Menu({
|
|
|
2332
2619
|
}
|
|
2333
2620
|
return createElement(Fragment, null, createPortal(createElement(MenuCloseContextProvider, {
|
|
2334
2621
|
value: onClose
|
|
2335
|
-
}, createElement(
|
|
2622
|
+
}, createElement(BaseBlock, {
|
|
2336
2623
|
className: default_1(className, menu_module.menu),
|
|
2337
2624
|
style: Object.assign(Object.assign({}, style), {
|
|
2338
2625
|
top: innerY,
|
|
@@ -2361,6 +2648,7 @@ const Menu = withMemo(withRenderBrowserOnly(function Menu({
|
|
|
2361
2648
|
|
|
2362
2649
|
|
|
2363
2650
|
|
|
2651
|
+
|
|
2364
2652
|
const HoverMenu = withMemo(function HoverMenu({
|
|
2365
2653
|
children,
|
|
2366
2654
|
items,
|
|
@@ -2373,57 +2661,22 @@ const HoverMenu = withMemo(function HoverMenu({
|
|
|
2373
2661
|
// Refs
|
|
2374
2662
|
// States/Variables/Selectors
|
|
2375
2663
|
const hoverItemRef = useRef(null);
|
|
2376
|
-
const
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2664
|
+
const {
|
|
2665
|
+
isOpen,
|
|
2666
|
+
position,
|
|
2667
|
+
offset,
|
|
2668
|
+
open,
|
|
2669
|
+
close
|
|
2670
|
+
} = useHoverMenu({
|
|
2671
|
+
ref: hoverItemRef,
|
|
2672
|
+
openToSide
|
|
2384
2673
|
});
|
|
2385
2674
|
// Dispatch
|
|
2386
2675
|
// Callbacks
|
|
2387
|
-
const
|
|
2388
|
-
|
|
2389
|
-
return;
|
|
2390
|
-
}
|
|
2391
|
-
const {
|
|
2392
|
-
top,
|
|
2393
|
-
left,
|
|
2394
|
-
bottom,
|
|
2395
|
-
right,
|
|
2396
|
-
width,
|
|
2397
|
-
height
|
|
2398
|
-
} = hoverItemRef.current.getBoundingClientRect();
|
|
2399
|
-
if (openToSide) {
|
|
2400
|
-
setPosition({
|
|
2401
|
-
x: right,
|
|
2402
|
-
y: top
|
|
2403
|
-
});
|
|
2404
|
-
setOffset({
|
|
2405
|
-
x: width,
|
|
2406
|
-
y: -height
|
|
2407
|
-
});
|
|
2408
|
-
} else {
|
|
2409
|
-
setPosition({
|
|
2410
|
-
x: left,
|
|
2411
|
-
y: bottom
|
|
2412
|
-
});
|
|
2413
|
-
setOffset({
|
|
2414
|
-
x: -width,
|
|
2415
|
-
y: height
|
|
2416
|
-
});
|
|
2417
|
-
}
|
|
2418
|
-
}, [openToSide]);
|
|
2419
|
-
const close = useCallback(() => {
|
|
2420
|
-
setIsOpen(false);
|
|
2676
|
+
const innerOnClose = useCallback(() => {
|
|
2677
|
+
close();
|
|
2421
2678
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
2422
|
-
}, [onClose]);
|
|
2423
|
-
const open = useCallback(() => {
|
|
2424
|
-
recalculatePosition();
|
|
2425
|
-
setIsOpen(true);
|
|
2426
|
-
}, [recalculatePosition]);
|
|
2679
|
+
}, [onClose, close]);
|
|
2427
2680
|
const onClickInner = useCallback(() => {
|
|
2428
2681
|
if ((onClick === null || onClick === void 0 ? void 0 : onClick()) !== false) {
|
|
2429
2682
|
open();
|
|
@@ -2434,7 +2687,7 @@ const HoverMenu = withMemo(function HoverMenu({
|
|
|
2434
2687
|
// RenderFunctions
|
|
2435
2688
|
return default_0.createElement(Clickable, {
|
|
2436
2689
|
onMouseEnter: open,
|
|
2437
|
-
onMouseLeave:
|
|
2690
|
+
onMouseLeave: innerOnClose,
|
|
2438
2691
|
useReactOnMouseLeave: true,
|
|
2439
2692
|
onClick: onClickInner,
|
|
2440
2693
|
className: default_1(menu_module.hoverMenu, {
|
|
@@ -2447,7 +2700,7 @@ const HoverMenu = withMemo(function HoverMenu({
|
|
|
2447
2700
|
x: position.x,
|
|
2448
2701
|
y: position.y,
|
|
2449
2702
|
isOpen: true,
|
|
2450
|
-
onClose:
|
|
2703
|
+
onClose: innerOnClose,
|
|
2451
2704
|
offsetX: offset.x,
|
|
2452
2705
|
offsetY: offset.y,
|
|
2453
2706
|
className: default_1({
|
|
@@ -2468,7 +2721,7 @@ const MenuDivider = withMemo(function MenuDivider() {
|
|
|
2468
2721
|
// Effects
|
|
2469
2722
|
// Other
|
|
2470
2723
|
// RenderFunctions
|
|
2471
|
-
return default_0.createElement(
|
|
2724
|
+
return default_0.createElement(BaseBlock, {
|
|
2472
2725
|
className: menu_module.divider
|
|
2473
2726
|
});
|
|
2474
2727
|
});
|
|
@@ -2553,13 +2806,13 @@ const Submenu = withMemo(function Submenu({
|
|
|
2553
2806
|
ref: submenuRef,
|
|
2554
2807
|
className: default_1(menu_module.itemChildren),
|
|
2555
2808
|
horizontal: true
|
|
2556
|
-
}, !!icon && default_0.createElement(
|
|
2809
|
+
}, !!icon && default_0.createElement(BaseIcon, {
|
|
2557
2810
|
icon: icon,
|
|
2558
2811
|
color: iconColor,
|
|
2559
2812
|
className: menu_module.icon
|
|
2560
|
-
}), default_0.createElement(Grow, null, default_0.createElement(tmp, null, label)), default_0.createElement(
|
|
2813
|
+
}), default_0.createElement(Grow, null, default_0.createElement(tmp, null, label)), default_0.createElement(BaseIcon, {
|
|
2561
2814
|
icon: faChevronRight
|
|
2562
|
-
})), default_0.createElement(
|
|
2815
|
+
})), default_0.createElement(BaseBlock, {
|
|
2563
2816
|
className: menu_module.container,
|
|
2564
2817
|
__allowChildren: "all",
|
|
2565
2818
|
ref: containerRef
|
|
@@ -2613,7 +2866,7 @@ function SizeCalculator({
|
|
|
2613
2866
|
}, [onSize]);
|
|
2614
2867
|
// Other
|
|
2615
2868
|
// Render Functions
|
|
2616
|
-
return createElement(
|
|
2869
|
+
return createElement(BaseInlineBlock, {
|
|
2617
2870
|
ref: ref,
|
|
2618
2871
|
__allowChildren: "all",
|
|
2619
2872
|
style: {
|
|
@@ -2673,7 +2926,7 @@ const Spoiler = withMemo(function Spoiler(_a) {
|
|
|
2673
2926
|
// Selectors
|
|
2674
2927
|
// Callbacks
|
|
2675
2928
|
const onClickListener = useListener('onClick', listenerProps);
|
|
2676
|
-
const toggleOpen = useCallback(
|
|
2929
|
+
const toggleOpen = useCallback(_ => {
|
|
2677
2930
|
if (open !== undefined) {
|
|
2678
2931
|
onClickListener === null || onClickListener === void 0 ? void 0 : onClickListener(!open);
|
|
2679
2932
|
} else {
|
|
@@ -2710,12 +2963,12 @@ const Spoiler = withMemo(function Spoiler(_a) {
|
|
|
2710
2963
|
horizontal: true
|
|
2711
2964
|
}, createElement(Grow, {
|
|
2712
2965
|
__allowChildren: "all"
|
|
2713
|
-
}, titleComponent), icon ? createElement(
|
|
2966
|
+
}, titleComponent), icon ? createElement(BaseIcon, {
|
|
2714
2967
|
icon: icon,
|
|
2715
2968
|
className: spoiler_module.icon
|
|
2716
|
-
}) : null)), createElement(
|
|
2969
|
+
}) : null)), createElement(BaseBlock, {
|
|
2717
2970
|
className: spoiler_module.bodyContainer
|
|
2718
|
-
}, createElement(
|
|
2971
|
+
}, createElement(BaseBlock, {
|
|
2719
2972
|
__allowChildren: "all",
|
|
2720
2973
|
className: spoiler_module.body
|
|
2721
2974
|
}, children)));
|
|
@@ -2769,7 +3022,7 @@ const SpoilerList = withMemo(function SpoilerList({
|
|
|
2769
3022
|
// Effects
|
|
2770
3023
|
// Other
|
|
2771
3024
|
// Render Functions
|
|
2772
|
-
return createElement(
|
|
3025
|
+
return createElement(BaseBlock, {
|
|
2773
3026
|
className: default_1(className),
|
|
2774
3027
|
style: style
|
|
2775
3028
|
}, data.map(item => createElement(Spoiler, Object.assign({
|
|
@@ -2854,7 +3107,7 @@ function getButtonComponents(buttons, activeTab, onSelect) {
|
|
|
2854
3107
|
active: isActive,
|
|
2855
3108
|
onClickData: index,
|
|
2856
3109
|
onClick: onSelect
|
|
2857
|
-
}, createElement(Inline, null, button.icon ? createElement(
|
|
3110
|
+
}, createElement(Inline, null, button.icon ? createElement(BaseIcon, {
|
|
2858
3111
|
icon: button.icon,
|
|
2859
3112
|
className: tabBar_module.buttonIcon
|
|
2860
3113
|
}) : null, button.title ? createElement(tmp, {
|
|
@@ -3218,10 +3471,10 @@ const MoreButton = withMemo(function MoreButton({
|
|
|
3218
3471
|
disabled: disabled,
|
|
3219
3472
|
className: className,
|
|
3220
3473
|
style: style
|
|
3221
|
-
}, createElement(
|
|
3474
|
+
}, createElement(BaseIcon, {
|
|
3222
3475
|
icon: faEllipsisH,
|
|
3223
3476
|
className: baseClasses_module.materialHidden
|
|
3224
|
-
}), createElement(
|
|
3477
|
+
}), createElement(BaseIcon, {
|
|
3225
3478
|
icon: faEllipsisV,
|
|
3226
3479
|
className: baseClasses_module.flatHidden
|
|
3227
3480
|
}));
|
|
@@ -3263,7 +3516,7 @@ function TopBar_getButtonComponents(buttons) {
|
|
|
3263
3516
|
}
|
|
3264
3517
|
let child = button.title;
|
|
3265
3518
|
if (button.icon) {
|
|
3266
|
-
child = createElement(
|
|
3519
|
+
child = createElement(BaseIcon, {
|
|
3267
3520
|
icon: button.icon
|
|
3268
3521
|
});
|
|
3269
3522
|
}
|
|
@@ -3361,7 +3614,7 @@ const TopBar = withMemo(function TopBar(_a) {
|
|
|
3361
3614
|
grow: true,
|
|
3362
3615
|
className: default_1(topBar_module.buttonContainer, topBar_module.left),
|
|
3363
3616
|
horizontal: true
|
|
3364
|
-
}, leftButtonComponents), createElement(
|
|
3617
|
+
}, leftButtonComponents), createElement(BaseBlock, {
|
|
3365
3618
|
className: topBar_module.titleContainer
|
|
3366
3619
|
}, createElement(tmp, {
|
|
3367
3620
|
className: topBar_module.title
|
|
@@ -3411,7 +3664,7 @@ var Button_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
3411
3664
|
|
|
3412
3665
|
|
|
3413
3666
|
|
|
3414
|
-
const Button =
|
|
3667
|
+
const Button = withTitle(function Button(_a) {
|
|
3415
3668
|
var {
|
|
3416
3669
|
children,
|
|
3417
3670
|
className,
|
|
@@ -3470,13 +3723,13 @@ const FormError = withMemo(function FormError({
|
|
|
3470
3723
|
return null;
|
|
3471
3724
|
}
|
|
3472
3725
|
if (inline) {
|
|
3473
|
-
return default_0.createElement(
|
|
3726
|
+
return default_0.createElement(BaseInlineBlock, {
|
|
3474
3727
|
className: formError_module.error
|
|
3475
3728
|
}, default_0.createElement(tmp, {
|
|
3476
3729
|
size: TEXT_SIZE.small
|
|
3477
3730
|
}, error));
|
|
3478
3731
|
}
|
|
3479
|
-
return default_0.createElement(
|
|
3732
|
+
return default_0.createElement(BaseBlock, {
|
|
3480
3733
|
className: formError_module.error
|
|
3481
3734
|
}, default_0.createElement(tmp, {
|
|
3482
3735
|
size: TEXT_SIZE.small
|
|
@@ -3969,9 +4222,9 @@ const MultipleFileInput = withMemo(function MultipleImageInput(_a) {
|
|
|
3969
4222
|
className: default_1(fileInput_module.previewImage)
|
|
3970
4223
|
});
|
|
3971
4224
|
}
|
|
3972
|
-
return createElement(
|
|
4225
|
+
return createElement(BaseBlock, {
|
|
3973
4226
|
className: fileInput_module.previewText
|
|
3974
|
-
}, createElement(
|
|
4227
|
+
}, createElement(BaseIcon, {
|
|
3975
4228
|
icon: faFile,
|
|
3976
4229
|
className: fileInput_module.previewTextIcon
|
|
3977
4230
|
}), createElement(tmp, null, file.name));
|
|
@@ -4003,7 +4256,7 @@ const MultipleFileInput = withMemo(function MultipleImageInput(_a) {
|
|
|
4003
4256
|
className: fileInput_module.previewRemove,
|
|
4004
4257
|
onClick: removeFile,
|
|
4005
4258
|
onClickData: index
|
|
4006
|
-
}, createElement(
|
|
4259
|
+
}, createElement(BaseIcon, {
|
|
4007
4260
|
icon: faTimesCircle
|
|
4008
4261
|
}))));
|
|
4009
4262
|
}), createElement(Grow, {
|
|
@@ -4018,7 +4271,7 @@ const MultipleFileInput = withMemo(function MultipleImageInput(_a) {
|
|
|
4018
4271
|
onDropData: maxFiles,
|
|
4019
4272
|
onClick: clickOnFile,
|
|
4020
4273
|
__allowChildren: "html"
|
|
4021
|
-
}, createElement(
|
|
4274
|
+
}, createElement(BaseIcon, {
|
|
4022
4275
|
icon: faPlus
|
|
4023
4276
|
}), createElement("input", Object.assign({}, props, {
|
|
4024
4277
|
ref: inputRef,
|
|
@@ -4486,7 +4739,7 @@ const PasswordInput = withMemo(function PasswordInput(_a) {
|
|
|
4486
4739
|
onClick: toggleVisible,
|
|
4487
4740
|
className: passwordInput_module.showButton,
|
|
4488
4741
|
interactable: false
|
|
4489
|
-
}, default_0.createElement(
|
|
4742
|
+
}, default_0.createElement(BaseIcon, {
|
|
4490
4743
|
icon: isVisible ? faEye : faEyeSlash
|
|
4491
4744
|
})));
|
|
4492
4745
|
});
|
|
@@ -5014,7 +5267,7 @@ const SearchSelectInput = withMemo(function SearchSelectInput({
|
|
|
5014
5267
|
if (!option) {
|
|
5015
5268
|
return null;
|
|
5016
5269
|
}
|
|
5017
|
-
const element = (_a = renderSelectedOption === null || renderSelectedOption === void 0 ? void 0 : renderSelectedOption(option)) !== null && _a !== void 0 ? _a : createElement(
|
|
5270
|
+
const element = (_a = renderSelectedOption === null || renderSelectedOption === void 0 ? void 0 : renderSelectedOption(option)) !== null && _a !== void 0 ? _a : createElement(BaseInlineBlock, {
|
|
5018
5271
|
className: seachSelectInput_module.tag
|
|
5019
5272
|
}, createElement(tmp, {
|
|
5020
5273
|
size: TEXT_SIZE.xSmall
|
|
@@ -5031,7 +5284,7 @@ const SearchSelectInput = withMemo(function SearchSelectInput({
|
|
|
5031
5284
|
const renderSelectableOption = (opt, index) => {
|
|
5032
5285
|
var _a;
|
|
5033
5286
|
const isActive = index === selectedIndex;
|
|
5034
|
-
const element = (_a = renderSelectableOptions === null || renderSelectableOptions === void 0 ? void 0 : renderSelectableOptions(opt, isActive, index, selectedIndex)) !== null && _a !== void 0 ? _a : createElement(
|
|
5287
|
+
const element = (_a = renderSelectableOptions === null || renderSelectableOptions === void 0 ? void 0 : renderSelectableOptions(opt, isActive, index, selectedIndex)) !== null && _a !== void 0 ? _a : createElement(BaseBlock, {
|
|
5035
5288
|
className: default_1(seachSelectInput_module.selectableOption, {
|
|
5036
5289
|
[seachSelectInput_module.active]: index === selectedIndex
|
|
5037
5290
|
})
|
|
@@ -5054,7 +5307,7 @@ const SearchSelectInput = withMemo(function SearchSelectInput({
|
|
|
5054
5307
|
}, label) : null, createElement(Flex, {
|
|
5055
5308
|
className: seachSelectInput_module.inputContainer,
|
|
5056
5309
|
horizontal: true
|
|
5057
|
-
}, createElement(
|
|
5310
|
+
}, createElement(BaseInlineBlock, null, values.map(renderOption)), createElement(Grow, {
|
|
5058
5311
|
__allowChildren: "html"
|
|
5059
5312
|
}, createElement("input", {
|
|
5060
5313
|
ref: inputRef,
|
|
@@ -5065,7 +5318,7 @@ const SearchSelectInput = withMemo(function SearchSelectInput({
|
|
|
5065
5318
|
onChange: onChange,
|
|
5066
5319
|
onKeyDown: onKeyPress,
|
|
5067
5320
|
onFocus: onFocus
|
|
5068
|
-
}))), createElement(
|
|
5321
|
+
}))), createElement(BaseInlineBlock, {
|
|
5069
5322
|
className: seachSelectInput_module.selectableOptionContainer,
|
|
5070
5323
|
style: suggestionsPosition
|
|
5071
5324
|
}, selectableOptions.map(renderSelectableOption)))
|
|
@@ -5103,7 +5356,7 @@ const Grid = withMemo(function Grid({
|
|
|
5103
5356
|
// Effects
|
|
5104
5357
|
// Other
|
|
5105
5358
|
// Render Functions
|
|
5106
|
-
return createElement(
|
|
5359
|
+
return createElement(BaseBlock, {
|
|
5107
5360
|
ref: ref,
|
|
5108
5361
|
style: appliedStyle,
|
|
5109
5362
|
className: default_1(grid_module.grid, className, {
|
|
@@ -5226,7 +5479,7 @@ function GridItem({
|
|
|
5226
5479
|
// Effects
|
|
5227
5480
|
// Other
|
|
5228
5481
|
// Render Functions
|
|
5229
|
-
return createElement(
|
|
5482
|
+
return createElement(BaseInlineBlock, {
|
|
5230
5483
|
style: style,
|
|
5231
5484
|
className: default_1(...classes.map(name => grid_module[name]), grid_module.item, className),
|
|
5232
5485
|
__allowChildren: __allowChildren
|
|
@@ -5352,6 +5605,13 @@ const GridItemMemo = withMemo(GridItem);
|
|
|
5352
5605
|
|
|
5353
5606
|
|
|
5354
5607
|
|
|
5355
|
-
|
|
5608
|
+
|
|
5609
|
+
|
|
5610
|
+
|
|
5611
|
+
|
|
5612
|
+
|
|
5613
|
+
|
|
5614
|
+
|
|
5615
|
+
export { ActionSheet, AlertDialog, BaseBlock, BaseIcon, BaseInlineBlock, Block, BreakpointNames, Breakpoints, Button, ButtonDialogMemo as ButtonDialog, ButtonType, CONTAINER_CLASSES, Card, Characters, Checkbox, Clickable, ColorInput, ColorInputController, ConfirmDialog, Container, DialogMemo as Dialog, DialogBackground, DialogContainer, DialogProvider, DoubleIcon, DragItemMemo as DragItem, DropArea, ErrorBoundary, FileInput, FileInputController, Flavor, Flex, FormError, FullScreen, Grid, GridItemMemo as GridItem, Grow, HeadingMemo as Heading, HiddenInput, HookForm, HoverMenu, HoverTitle, Icon, Image, InViewportMemo as InViewport, Inline, InlineBlock, Input, InputController, LoadingArea, LoadingCircle, MENU_CONTAINER_CLASS, Menu, MenuCloseContextProvider, MenuDivider, MenuItem, MoreButton, MultipleFileInput, MultipleFileInputController, PasswordInput, PasswordInputController, RESTRICT_CHILDREN, SearchSelectInput, Select, SelectController, SendFormContext, Size, SizeCalculatorMemo as SizeCalculator, Slider, SliderController, Spoiler, SpoilerList, Submenu, Switch, SwitchController, TEXT_PRIO, TEXT_SIZE, TabBar, TabBarButton, Table_tmp as Table, tmp as Text, Textarea, TextareaController, Toast, ToastContainerMemo as ToastContainer, ToastContext, TopBar, TopBarButton, View, ViewWithoutListeners, WindowContext, WrongChildError, memoComparator, nonEmptyString, treeshakeTest, useAlertDialog, useBreakpoint, useBreakpointSelect, useClientLayoutEffect, useComposedRef, useConfirmDialog, useDebounced, useDeepShallow, useDelayed, useDelayedEffect, useDelayedState, useDialog, useHoverMenu, useInViewport, useKeyListener, useKeyPressed, useKeyUpListener, useListener, useListenerWithExtractedProps, useMenu, useMenuClose, useMousePosition, useOnChangeDone, useOnMount, useOnce, useRerender, useSendFormContext, useSharedSelectedColor, useSpoilerGroup, useStrictEnabled, useToast, useWindow, useWindowDimensions, useYupResolver, withHookController, withMemo, withRenderBrowserOnly, withRestrictedChildren, withTitle };
|
|
5356
5616
|
|
|
5357
5617
|
//# sourceMappingURL=index.js.map
|