@codeleap/web 7.0.2 → 7.1.1
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/ActivityIndicator/index.js +16 -34
- package/dist/components/ActivityIndicator/index.js.map +1 -1
- package/dist/components/ActivityIndicator/styles.js +1 -2
- package/dist/components/ActivityIndicator/types.js +1 -2
- package/dist/components/Badge/index.js +24 -42
- package/dist/components/Badge/index.js.map +1 -1
- package/dist/components/Badge/styles.js +1 -2
- package/dist/components/Badge/types.js +1 -2
- package/dist/components/Button/index.js +19 -36
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Button/styles.js +1 -2
- package/dist/components/Button/types.js +1 -2
- package/dist/components/Calendar/index.js +12 -29
- package/dist/components/Calendar/index.js.map +1 -1
- package/dist/components/Calendar/styles.js +1 -2
- package/dist/components/Calendar/types.js +1 -2
- package/dist/components/Carousel/index.js +40 -82
- package/dist/components/Carousel/index.js.map +1 -1
- package/dist/components/Carousel/styles.js +1 -2
- package/dist/components/Carousel/types.js +1 -2
- package/dist/components/Checkbox/index.js +24 -42
- package/dist/components/Checkbox/index.js.map +1 -1
- package/dist/components/Checkbox/styles.js +1 -2
- package/dist/components/Checkbox/types.js +1 -2
- package/dist/components/Collapse/index.js +17 -35
- package/dist/components/Collapse/index.js.map +1 -1
- package/dist/components/Collapse/styles.js +1 -2
- package/dist/components/Collapse/types.js +1 -2
- package/dist/components/ColorPicker/index.js +33 -51
- package/dist/components/ColorPicker/index.js.map +1 -1
- package/dist/components/ColorPicker/styles.js +1 -2
- package/dist/components/ColorPicker/types.js +1 -2
- package/dist/components/CropPicker/hooks.d.ts +2 -2
- package/dist/components/CropPicker/hooks.js +17 -20
- package/dist/components/CropPicker/hooks.js.map +1 -1
- package/dist/components/CropPicker/index.js +22 -40
- package/dist/components/CropPicker/index.js.map +1 -1
- package/dist/components/CropPicker/styles.js +1 -2
- package/dist/components/CropPicker/types.js +1 -2
- package/dist/components/CropPicker/utils.js +3 -9
- package/dist/components/CropPicker/utils.js.map +1 -1
- package/dist/components/DatePicker/index.js +23 -40
- package/dist/components/DatePicker/index.js.map +1 -1
- package/dist/components/DatePicker/styles.js +1 -2
- package/dist/components/DatePicker/types.js +1 -2
- package/dist/components/Drawer/index.js +22 -40
- package/dist/components/Drawer/index.js.map +1 -1
- package/dist/components/Drawer/styles.js +1 -2
- package/dist/components/Drawer/types.js +1 -2
- package/dist/components/Dropzone/context.js +11 -16
- package/dist/components/Dropzone/context.js.map +1 -1
- package/dist/components/Dropzone/elements.js +13 -19
- package/dist/components/Dropzone/elements.js.map +1 -1
- package/dist/components/Dropzone/index.js +35 -53
- package/dist/components/Dropzone/index.js.map +1 -1
- package/dist/components/Dropzone/styles.js +1 -2
- package/dist/components/Dropzone/types.js +1 -2
- package/dist/components/Dropzone/useDropzone.js +3 -6
- package/dist/components/Dropzone/useDropzone.js.map +1 -1
- package/dist/components/EmptyPlaceholder/index.js +40 -61
- package/dist/components/EmptyPlaceholder/index.js.map +1 -1
- package/dist/components/EmptyPlaceholder/styles.js +1 -2
- package/dist/components/EmptyPlaceholder/types.js +1 -2
- package/dist/components/Field/context.js +11 -17
- package/dist/components/Field/context.js.map +1 -1
- package/dist/components/Field/elements.js +31 -39
- package/dist/components/Field/elements.js.map +1 -1
- package/dist/components/Field/index.js +23 -41
- package/dist/components/Field/index.js.map +1 -1
- package/dist/components/Field/styles.js +1 -2
- package/dist/components/Field/types.js +1 -2
- package/dist/components/Field/useFieldInput.d.ts +1 -1
- package/dist/components/Field/useFieldInput.js +8 -11
- package/dist/components/Field/useFieldInput.js.map +1 -1
- package/dist/components/FileInput/index.js +14 -32
- package/dist/components/FileInput/index.js.map +1 -1
- package/dist/components/FileInput/types.js +1 -2
- package/dist/components/Icon/index.js +26 -44
- package/dist/components/Icon/index.js.map +1 -1
- package/dist/components/Icon/styles.js +1 -2
- package/dist/components/Icon/types.js +1 -2
- package/dist/components/List/context.js +20 -25
- package/dist/components/List/context.js.map +1 -1
- package/dist/components/List/elements.d.ts.map +1 -1
- package/dist/components/List/elements.js +58 -82
- package/dist/components/List/elements.js.map +1 -1
- package/dist/components/List/index.d.ts.map +1 -1
- package/dist/components/List/index.js +19 -36
- package/dist/components/List/index.js.map +1 -1
- package/dist/components/List/scroll.d.ts.map +1 -1
- package/dist/components/List/scroll.js +20 -20
- package/dist/components/List/scroll.js.map +1 -1
- package/dist/components/List/styles.js +1 -2
- package/dist/components/List/types.d.ts +13 -4
- package/dist/components/List/types.d.ts.map +1 -1
- package/dist/components/List/types.js +1 -2
- package/dist/components/List/useScrollEdgeDetection.d.ts +12 -0
- package/dist/components/List/useScrollEdgeDetection.d.ts.map +1 -0
- package/dist/components/List/useScrollEdgeDetection.js +37 -0
- package/dist/components/List/useScrollEdgeDetection.js.map +1 -0
- package/dist/components/LoadingOverlay/index.js +20 -38
- package/dist/components/LoadingOverlay/index.js.map +1 -1
- package/dist/components/LoadingOverlay/styles.js +1 -2
- package/dist/components/LoadingOverlay/types.js +1 -2
- package/dist/components/MaskedTextInput/index.js +14 -32
- package/dist/components/MaskedTextInput/index.js.map +1 -1
- package/dist/components/MaskedTextInput/mask.js +1 -4
- package/dist/components/MaskedTextInput/mask.js.map +1 -1
- package/dist/components/MaskedTextInput/types.js +1 -2
- package/dist/components/Modal/context.js +9 -14
- package/dist/components/Modal/context.js.map +1 -1
- package/dist/components/Modal/elements.js +23 -31
- package/dist/components/Modal/elements.js.map +1 -1
- package/dist/components/Modal/index.js +22 -40
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/Modal/styles.js +1 -2
- package/dist/components/Modal/types.js +1 -2
- package/dist/components/NumberIncrement/index.js +29 -47
- package/dist/components/NumberIncrement/index.js.map +1 -1
- package/dist/components/NumberIncrement/styles.js +1 -2
- package/dist/components/NumberIncrement/types.js +1 -2
- package/dist/components/NumberIncrement/useNumberIncrement.js +21 -24
- package/dist/components/NumberIncrement/useNumberIncrement.js.map +1 -1
- package/dist/components/Overlay/index.js +21 -39
- package/dist/components/Overlay/index.js.map +1 -1
- package/dist/components/Overlay/styles.js +1 -2
- package/dist/components/Overlay/types.js +1 -2
- package/dist/components/PaginationButtons/index.js +26 -44
- package/dist/components/PaginationButtons/index.js.map +1 -1
- package/dist/components/PaginationButtons/styles.js +1 -2
- package/dist/components/PaginationButtons/types.js +1 -2
- package/dist/components/PaginationIndicator/ImperativePaginationIndicator.d.ts +13 -0
- package/dist/components/PaginationIndicator/ImperativePaginationIndicator.d.ts.map +1 -0
- package/dist/components/PaginationIndicator/ImperativePaginationIndicator.js +20 -0
- package/dist/components/PaginationIndicator/ImperativePaginationIndicator.js.map +1 -0
- package/dist/components/PaginationIndicator/index.d.ts +1 -0
- package/dist/components/PaginationIndicator/index.d.ts.map +1 -1
- package/dist/components/PaginationIndicator/index.js +25 -42
- package/dist/components/PaginationIndicator/index.js.map +1 -1
- package/dist/components/PaginationIndicator/styles.js +1 -2
- package/dist/components/PaginationIndicator/types.d.ts +9 -0
- package/dist/components/PaginationIndicator/types.d.ts.map +1 -1
- package/dist/components/PaginationIndicator/types.js +1 -2
- package/dist/components/Progress/Bar/Segmented.js +19 -23
- package/dist/components/Progress/Bar/Segmented.js.map +1 -1
- package/dist/components/Progress/Bar/index.js +29 -47
- package/dist/components/Progress/Bar/index.js.map +1 -1
- package/dist/components/Progress/Bar/styles.js +1 -2
- package/dist/components/Progress/Bar/types.js +1 -2
- package/dist/components/Progress/Circle/Segmented.js +22 -26
- package/dist/components/Progress/Circle/Segmented.js.map +1 -1
- package/dist/components/Progress/Circle/index.js +30 -48
- package/dist/components/Progress/Circle/index.js.map +1 -1
- package/dist/components/Progress/Circle/styles.js +1 -2
- package/dist/components/Progress/Circle/types.js +1 -2
- package/dist/components/Progress/index.js +2 -18
- package/dist/components/Progress/index.js.map +1 -1
- package/dist/components/Progress/utils.js +1 -4
- package/dist/components/Progress/utils.js.map +1 -1
- package/dist/components/RadioInput/index.js +26 -47
- package/dist/components/RadioInput/index.js.map +1 -1
- package/dist/components/RadioInput/styles.js +1 -2
- package/dist/components/RadioInput/types.js +1 -2
- package/dist/components/SearchInput/index.js +14 -51
- package/dist/components/SearchInput/index.js.map +1 -1
- package/dist/components/SectionFilters/index.js +38 -56
- package/dist/components/SectionFilters/index.js.map +1 -1
- package/dist/components/SectionFilters/styles.js +1 -2
- package/dist/components/SectionFilters/types.js +1 -2
- package/dist/components/Select/context.js +44 -50
- package/dist/components/Select/context.js.map +1 -1
- package/dist/components/Select/elements.js +23 -29
- package/dist/components/Select/elements.js.map +1 -1
- package/dist/components/Select/index.js +24 -41
- package/dist/components/Select/index.js.map +1 -1
- package/dist/components/Select/styles.js +1 -2
- package/dist/components/Select/types.js +1 -2
- package/dist/components/Select/useTriggerWidth.js +6 -9
- package/dist/components/Select/useTriggerWidth.js.map +1 -1
- package/dist/components/Slider/index.js +47 -68
- package/dist/components/Slider/index.js.map +1 -1
- package/dist/components/Slider/styles.js +1 -2
- package/dist/components/Slider/types.js +1 -2
- package/dist/components/Switch/index.js +22 -40
- package/dist/components/Switch/index.js.map +1 -1
- package/dist/components/Switch/styles.js +1 -2
- package/dist/components/Switch/types.js +1 -2
- package/dist/components/Tag/index.js +34 -55
- package/dist/components/Tag/index.js.map +1 -1
- package/dist/components/Tag/styles.js +1 -2
- package/dist/components/Tag/types.js +1 -2
- package/dist/components/Text/index.js +27 -48
- package/dist/components/Text/index.js.map +1 -1
- package/dist/components/Text/styles.js +1 -2
- package/dist/components/Text/types.js +1 -2
- package/dist/components/TextEditor/index.js +29 -50
- package/dist/components/TextEditor/index.js.map +1 -1
- package/dist/components/TextEditor/styles.js +1 -2
- package/dist/components/TextEditor/types.js +1 -2
- package/dist/components/TextInput/index.js +28 -49
- package/dist/components/TextInput/index.js.map +1 -1
- package/dist/components/TextInput/styles.js +1 -2
- package/dist/components/TextInput/types.js +1 -2
- package/dist/components/TextInput/useTextInput.d.ts +2 -2
- package/dist/components/TextInput/useTextInput.js +12 -15
- package/dist/components/TextInput/useTextInput.js.map +1 -1
- package/dist/components/Tooltip/index.js +33 -54
- package/dist/components/Tooltip/index.js.map +1 -1
- package/dist/components/Tooltip/styles.js +1 -2
- package/dist/components/Tooltip/types.js +1 -2
- package/dist/components/Touchable/index.js +23 -42
- package/dist/components/Touchable/index.js.map +1 -1
- package/dist/components/Touchable/styles.js +1 -2
- package/dist/components/Touchable/types.js +1 -2
- package/dist/components/View/index.js +15 -32
- package/dist/components/View/index.js.map +1 -1
- package/dist/components/View/styles.js +1 -2
- package/dist/components/View/types.js +1 -2
- package/dist/components/components.js +41 -57
- package/dist/components/components.js.map +1 -1
- package/dist/index.js +4 -20
- package/dist/index.js.map +1 -1
- package/dist/lib/ListMasonry.js +22 -31
- package/dist/lib/ListMasonry.js.map +1 -1
- package/dist/lib/ThemeVariables.js +6 -11
- package/dist/lib/ThemeVariables.js.map +1 -1
- package/dist/lib/WebStyleRegistry.js +3 -7
- package/dist/lib/WebStyleRegistry.js.map +1 -1
- package/dist/lib/hooks/index.js +22 -38
- package/dist/lib/hooks/index.js.map +1 -1
- package/dist/lib/hooks/useAnimatedStyle.js +5 -9
- package/dist/lib/hooks/useAnimatedStyle.js.map +1 -1
- package/dist/lib/hooks/useAnimatedVariantStyles.js +6 -9
- package/dist/lib/hooks/useAnimatedVariantStyles.js.map +1 -1
- package/dist/lib/hooks/useAsyncSelect.js +8 -11
- package/dist/lib/hooks/useAsyncSelect.js.map +1 -1
- package/dist/lib/hooks/useBreakpointMatch.js +19 -22
- package/dist/lib/hooks/useBreakpointMatch.js.map +1 -1
- package/dist/lib/hooks/useClick.js +7 -10
- package/dist/lib/hooks/useClick.js.map +1 -1
- package/dist/lib/hooks/useClickOutside.js +4 -7
- package/dist/lib/hooks/useClickOutside.js.map +1 -1
- package/dist/lib/hooks/useFileInput.js +3 -7
- package/dist/lib/hooks/useFileInput.js.map +1 -1
- package/dist/lib/hooks/useIsomorphicEffect.js +2 -5
- package/dist/lib/hooks/useIsomorphicEffect.js.map +1 -1
- package/dist/lib/hooks/useKeydown.js +9 -13
- package/dist/lib/hooks/useKeydown.js.map +1 -1
- package/dist/lib/hooks/useListFocus.js +4 -7
- package/dist/lib/hooks/useListFocus.js.map +1 -1
- package/dist/lib/hooks/useMediaQuery.js +8 -11
- package/dist/lib/hooks/useMediaQuery.js.map +1 -1
- package/dist/lib/hooks/usePageExitBlocker.js +6 -10
- package/dist/lib/hooks/usePageExitBlocker.js.map +1 -1
- package/dist/lib/hooks/usePagination.js +10 -13
- package/dist/lib/hooks/usePagination.js.map +1 -1
- package/dist/lib/hooks/usePopState.js +5 -9
- package/dist/lib/hooks/usePopState.js.map +1 -1
- package/dist/lib/hooks/usePopoverDismiss.js +5 -8
- package/dist/lib/hooks/usePopoverDismiss.js.map +1 -1
- package/dist/lib/hooks/useRefresh.js +9 -16
- package/dist/lib/hooks/useRefresh.js.map +1 -1
- package/dist/lib/hooks/useScrollEffect.js +3 -6
- package/dist/lib/hooks/useScrollEffect.js.map +1 -1
- package/dist/lib/hooks/useSearchParams.js +7 -10
- package/dist/lib/hooks/useSearchParams.js.map +1 -1
- package/dist/lib/hooks/useStaticAnimationStyles.js +3 -6
- package/dist/lib/hooks/useStaticAnimationStyles.js.map +1 -1
- package/dist/lib/hooks/useStylesFor.js +9 -13
- package/dist/lib/hooks/useStylesFor.js.map +1 -1
- package/dist/lib/hooks/useTouchableEvents.js +4 -7
- package/dist/lib/hooks/useTouchableEvents.js.map +1 -1
- package/dist/lib/hooks/useWindowFocus.js +7 -11
- package/dist/lib/hooks/useWindowFocus.js.map +1 -1
- package/dist/lib/hooks/useWindowSize.js +7 -10
- package/dist/lib/hooks/useWindowSize.js.map +1 -1
- package/dist/lib/index.js +6 -22
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/tools/index.js +3 -19
- package/dist/lib/tools/index.js.map +1 -1
- package/dist/lib/tools/localStorage.js +8 -12
- package/dist/lib/tools/localStorage.js.map +1 -1
- package/dist/lib/tools/mediaQuery.js +3 -8
- package/dist/lib/tools/mediaQuery.js.map +1 -1
- package/dist/lib/tools/modal.js +13 -18
- package/dist/lib/tools/modal.js.map +1 -1
- package/dist/lib/utils/attributes.js +3 -6
- package/dist/lib/utils/attributes.js.map +1 -1
- package/dist/lib/utils/cache.d.ts +2 -2
- package/dist/lib/utils/cache.js +4 -11
- package/dist/lib/utils/cache.js.map +1 -1
- package/dist/lib/utils/index.js +5 -21
- package/dist/lib/utils/index.js.map +1 -1
- package/dist/lib/utils/pollyfils/scroll.js +1 -5
- package/dist/lib/utils/pollyfils/scroll.js.map +1 -1
- package/dist/lib/utils/stopPropagation.js +1 -4
- package/dist/lib/utils/stopPropagation.js.map +1 -1
- package/dist/lib/utils/test.js +3 -7
- package/dist/lib/utils/test.js.map +1 -1
- package/dist/types/index.js +1 -17
- package/dist/types/index.js.map +1 -1
- package/dist/types/utility.js +1 -2
- package/package.json +17 -17
- package/src/components/List/elements.tsx +35 -13
- package/src/components/List/index.tsx +12 -4
- package/src/components/List/scroll.ts +8 -3
- package/src/components/List/types.ts +13 -4
- package/src/components/List/useScrollEdgeDetection.ts +59 -0
- package/src/components/PaginationIndicator/ImperativePaginationIndicator.tsx +35 -0
- package/src/components/PaginationIndicator/index.tsx +1 -0
- package/src/components/PaginationIndicator/types.ts +11 -0
- package/src/components/Touchable/index.tsx +2 -1
|
@@ -1,56 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.CropPicker = void 0;
|
|
18
|
-
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
19
|
-
const styles_1 = require("@codeleap/styles");
|
|
20
|
-
const WebStyleRegistry_1 = require("../../lib/WebStyleRegistry");
|
|
21
|
-
const useStylesFor_1 = require("../../lib/hooks/useStylesFor");
|
|
22
|
-
const View_1 = require("../View");
|
|
23
|
-
const ActivityIndicator_1 = require("../ActivityIndicator");
|
|
24
|
-
require("react-image-crop/dist/ReactCrop.css");
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useCompositionStyles } from '@codeleap/styles';
|
|
3
|
+
import { WebStyleRegistry } from '../../lib/WebStyleRegistry';
|
|
4
|
+
import { useStylesFor } from '../../lib/hooks/useStylesFor';
|
|
5
|
+
import { View } from '../View';
|
|
6
|
+
import { ActivityIndicator } from '../ActivityIndicator';
|
|
7
|
+
import 'react-image-crop/dist/ReactCrop.css';
|
|
25
8
|
const ReactCrop = require('react-image-crop').Component;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
9
|
+
export * from './styles';
|
|
10
|
+
export * from './types';
|
|
11
|
+
export * from './hooks';
|
|
29
12
|
/**
|
|
30
13
|
* Image crop editor that wraps react-image-crop and delegates all crop state to a `useCropPicker` handle.
|
|
31
14
|
* Renders a loading spinner while the image is being decoded; renders nothing when `handle` is not provided.
|
|
32
15
|
*/
|
|
33
|
-
const CropPicker = (props) => {
|
|
16
|
+
export const CropPicker = (props) => {
|
|
34
17
|
const { style, handle, reactCrop, aspect, children, } = {
|
|
35
|
-
...
|
|
18
|
+
...CropPicker.defaultProps,
|
|
36
19
|
...props,
|
|
37
20
|
};
|
|
38
|
-
const styles =
|
|
39
|
-
const compositionStyles =
|
|
21
|
+
const styles = useStylesFor(CropPicker.styleRegistryName, style);
|
|
22
|
+
const compositionStyles = useCompositionStyles(['indicator'], styles);
|
|
40
23
|
if (!handle)
|
|
41
24
|
return null;
|
|
42
25
|
const { image, crop, setRelativeCrop, handleCropChange, } = handle;
|
|
43
|
-
return ((
|
|
26
|
+
return (_jsxs(View, { style: styles.wrapper, children: [!image?.src ? (_jsx(ActivityIndicator, { style: compositionStyles.indicator, debugName: 'CropPickerLoading' })) : (_jsx(ReactCrop, { ...reactCrop, crop: crop, onChange: handleCropChange, onComplete: (_, relCrop) => setRelativeCrop(relCrop), style: styles.crop, aspect: aspect ?? reactCrop?.aspect, children: _jsx("img", { src: image.src,
|
|
44
27
|
// @ts-ignore
|
|
45
28
|
css: [styles?.image] }) })), children] }));
|
|
46
29
|
};
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return exports.CropPicker;
|
|
30
|
+
CropPicker.styleRegistryName = 'CropPicker';
|
|
31
|
+
CropPicker.elements = ['crop', 'image', 'wrapper', 'indicator'];
|
|
32
|
+
CropPicker.rootElement = 'crop';
|
|
33
|
+
CropPicker.withVariantTypes = (styles) => {
|
|
34
|
+
return CropPicker;
|
|
53
35
|
};
|
|
54
|
-
|
|
55
|
-
|
|
36
|
+
CropPicker.defaultProps = {};
|
|
37
|
+
WebStyleRegistry.registerComponent(CropPicker);
|
|
56
38
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/CropPicker/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/CropPicker/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAyC,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAC9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,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E,CAAC,MAAM,EAAE,KAAK,CAAC,GACpB,GACQ,CACb,EACA,QAAQ,IACJ,CACR,CAAA;AACH,CAAC,CAAA;AAED,UAAU,CAAC,iBAAiB,GAAG,YAAY,CAAA;AAC3C,UAAU,CAAC,QAAQ,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,CAAC,CAAA;AAC/D,UAAU,CAAC,WAAW,GAAG,MAAM,CAAA;AAC/B,UAAU,CAAC,gBAAgB,GAAG,CAAsB,MAAS,EAAE,EAAE;IAC/D,OAAO,UAAmF,CAAA;AAC5F,CAAC,CAAA;AAED,UAAU,CAAC,YAAY,GAAG,EAA8B,CAAA;AAExD,gBAAgB,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAA"}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.calculateProportionalDimensions = void 0;
|
|
4
|
-
exports.readImage = readImage;
|
|
5
|
-
exports.cropImage = cropImage;
|
|
6
1
|
/** Reads a `File` or `Blob` as a data-URL and resolves with a loaded `HTMLImageElement`. */
|
|
7
|
-
function readImage(file) {
|
|
2
|
+
export function readImage(file) {
|
|
8
3
|
return new Promise((resolve, reject) => {
|
|
9
4
|
const reader = new FileReader();
|
|
10
5
|
reader.onload = () => {
|
|
@@ -21,7 +16,7 @@ function readImage(file) {
|
|
|
21
16
|
* Renders the specified percentage-unit `crop` region of `image` onto an off-screen canvas and returns a `[dataURL, Blob]` tuple.
|
|
22
17
|
* The output blob is always `image/png` at quality 1.
|
|
23
18
|
*/
|
|
24
|
-
async function cropImage(image, crop) {
|
|
19
|
+
export async function cropImage(image, crop) {
|
|
25
20
|
if (!crop.width || !crop.height) {
|
|
26
21
|
throw new Error('Invalid crop dimensions');
|
|
27
22
|
}
|
|
@@ -50,7 +45,7 @@ async function cropImage(image, crop) {
|
|
|
50
45
|
* Scales natural image dimensions down to fit within a 600×400 display budget while preserving aspect ratio.
|
|
51
46
|
* Returns both the original natural dimensions and the calculated display dimensions.
|
|
52
47
|
*/
|
|
53
|
-
const calculateProportionalDimensions = (naturalWidth, naturalHeight) => {
|
|
48
|
+
export const calculateProportionalDimensions = (naturalWidth, naturalHeight) => {
|
|
54
49
|
const aspectRatio = naturalWidth / naturalHeight;
|
|
55
50
|
const maxWidth = 600;
|
|
56
51
|
const maxHeight = 400;
|
|
@@ -72,5 +67,4 @@ const calculateProportionalDimensions = (naturalWidth, naturalHeight) => {
|
|
|
72
67
|
aspectRatio,
|
|
73
68
|
};
|
|
74
69
|
};
|
|
75
|
-
exports.calculateProportionalDimensions = calculateProportionalDimensions;
|
|
76
70
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/CropPicker/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/CropPicker/utils.ts"],"names":[],"mappings":"AAEA,4FAA4F;AAC5F,MAAM,UAAU,SAAS,CAAC,IAAiB;IACzC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAA;QAE/B,MAAM,CAAC,MAAM,GAAG,GAAG,EAAE;YACnB,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAA;YACzB,KAAK,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;YACnC,KAAK,CAAC,OAAO,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC,CAAA;YAC/D,KAAK,CAAC,GAAG,GAAG,MAAM,CAAC,MAAgB,CAAA;QACrC,CAAC,CAAA;QAED,MAAM,CAAC,OAAO,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK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AA;AACH,CAAC,CAAA"}
|
|
@@ -1,40 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.DatePicker = DatePicker;
|
|
18
|
-
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
19
|
-
const react_1 = require("react");
|
|
20
|
-
const react_aria_components_1 = require("react-aria-components");
|
|
21
|
-
const date_1 = require("@internationalized/date");
|
|
22
|
-
const hooks_1 = require("@codeleap/hooks");
|
|
23
|
-
const form_1 = require("@codeleap/form");
|
|
24
|
-
const View_1 = require("../View");
|
|
25
|
-
const Calendar_1 = require("../Calendar");
|
|
26
|
-
const WebStyleRegistry_1 = require("../../lib/WebStyleRegistry");
|
|
27
|
-
const useStylesFor_1 = require("../../lib/hooks/useStylesFor");
|
|
28
|
-
const Field_1 = require("../Field");
|
|
29
|
-
__exportStar(require("./styles"), exports);
|
|
30
|
-
__exportStar(require("./types"), exports);
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { useRef } from 'react';
|
|
3
|
+
import { Popover } from 'react-aria-components';
|
|
4
|
+
import { CalendarDate, getLocalTimeZone } from '@internationalized/date';
|
|
5
|
+
import { useConditionalState } from '@codeleap/hooks';
|
|
6
|
+
import { fields } from '@codeleap/form';
|
|
7
|
+
import { View } from '../View';
|
|
8
|
+
import { Calendar } from '../Calendar';
|
|
9
|
+
import { WebStyleRegistry } from '../../lib/WebStyleRegistry';
|
|
10
|
+
import { useStylesFor } from '../../lib/hooks/useStylesFor';
|
|
11
|
+
import { useFieldInput } from '../Field';
|
|
12
|
+
export * from './styles';
|
|
13
|
+
export * from './types';
|
|
31
14
|
function dateToCalendarDate(date) {
|
|
32
15
|
if (!date)
|
|
33
16
|
return null;
|
|
34
|
-
return new
|
|
17
|
+
return new CalendarDate(date.getFullYear(), date.getMonth() + 1, date.getDate());
|
|
35
18
|
}
|
|
36
19
|
function calendarDateToDate(cal) {
|
|
37
|
-
return cal.toDate(
|
|
20
|
+
return cal.toDate(getLocalTimeZone());
|
|
38
21
|
}
|
|
39
22
|
function defaultFormatDate(date) {
|
|
40
23
|
return date.toLocaleDateString(undefined, { day: '2-digit', month: '2-digit', year: 'numeric' });
|
|
@@ -44,12 +27,12 @@ function defaultFormatDate(date) {
|
|
|
44
27
|
* Converts native `Date` values to/from `@internationalized/date` `CalendarDate` for the calendar; closes the popover after a date is selected.
|
|
45
28
|
* Uses: `View`, `Calendar`
|
|
46
29
|
*/
|
|
47
|
-
function DatePicker(props) {
|
|
30
|
+
export function DatePicker(props) {
|
|
48
31
|
const { value, onValueChange, field, style, defaultValue, renderTrigger, calendarProps, minDate, maxDate, disabled, visible: providedVisible, toggle: providedToggle, formatDate, label, helper, placeholder, forceError, } = { ...DatePicker.defaultProps, ...props };
|
|
49
|
-
const styles =
|
|
50
|
-
const triggerRef =
|
|
51
|
-
const [isOpen, setIsOpen] =
|
|
52
|
-
const { inputValue, onInputValueChange, validation } =
|
|
32
|
+
const styles = useStylesFor(DatePicker.styleRegistryName, style);
|
|
33
|
+
const triggerRef = useRef(null);
|
|
34
|
+
const [isOpen, setIsOpen] = useConditionalState(providedVisible, providedToggle, { initialValue: false });
|
|
35
|
+
const { inputValue, onInputValueChange, validation } = useFieldInput(field, fields.date, { value, onValueChange });
|
|
53
36
|
const hasError = validation?.showError || !!forceError;
|
|
54
37
|
const errorMessage = validation?.message || forceError;
|
|
55
38
|
const formattedValue = inputValue ? (formatDate ?? defaultFormatDate)(inputValue) : '';
|
|
@@ -57,7 +40,7 @@ function DatePicker(props) {
|
|
|
57
40
|
onInputValueChange(calendarDateToDate(date));
|
|
58
41
|
setIsOpen(false);
|
|
59
42
|
};
|
|
60
|
-
return ((
|
|
43
|
+
return (_jsxs(View, { style: styles.wrapper, children: [renderTrigger?.({
|
|
61
44
|
ref: triggerRef,
|
|
62
45
|
value: inputValue ?? null,
|
|
63
46
|
formattedValue,
|
|
@@ -70,7 +53,7 @@ function DatePicker(props) {
|
|
|
70
53
|
helper,
|
|
71
54
|
error: hasError ? errorMessage : undefined,
|
|
72
55
|
hasValue: !!inputValue,
|
|
73
|
-
}), (
|
|
56
|
+
}), _jsx(Popover, { triggerRef: triggerRef, isOpen: isOpen, onOpenChange: setIsOpen, css: styles.popover, children: _jsx(Calendar, { value: dateToCalendarDate(inputValue) ?? undefined, onChange: handleCalendarChange, minValue: dateToCalendarDate(minDate) ?? undefined, maxValue: dateToCalendarDate(maxDate) ?? undefined, defaultValue: dateToCalendarDate(defaultValue) ?? undefined, ...calendarProps }) })] }));
|
|
74
57
|
}
|
|
75
58
|
DatePicker.styleRegistryName = 'DatePicker';
|
|
76
59
|
DatePicker.elements = ['wrapper', 'popover', 'trigger'];
|
|
@@ -83,5 +66,5 @@ DatePicker.defaultProps = {
|
|
|
83
66
|
maxDate: new Date(),
|
|
84
67
|
disabled: false,
|
|
85
68
|
};
|
|
86
|
-
|
|
69
|
+
WebStyleRegistry.registerComponent(DatePicker);
|
|
87
70
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/DatePicker/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/DatePicker/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,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
8
|
-
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Drawer = void 0;
|
|
18
|
-
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
19
|
-
const react_aria_components_1 = require("react-aria-components");
|
|
20
|
-
const context_1 = require("../Modal/context");
|
|
21
|
-
const elements_1 = require("../Modal/elements");
|
|
22
|
-
const useStylesFor_1 = require("../../lib/hooks/useStylesFor");
|
|
23
|
-
const WebStyleRegistry_1 = require("../../lib/WebStyleRegistry");
|
|
24
|
-
__exportStar(require("./styles"), exports);
|
|
25
|
-
__exportStar(require("./types"), exports);
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { Modal as RACModal, Dialog } from 'react-aria-components';
|
|
3
|
+
import { ModalContext, useModalContext } from '../Modal/context';
|
|
4
|
+
import { ModalBackdrop, ModalBody, ModalFooter, ModalHeader } from '../Modal/elements';
|
|
5
|
+
import { useStylesFor } from '../../lib/hooks/useStylesFor';
|
|
6
|
+
import { WebStyleRegistry } from '../../lib/WebStyleRegistry';
|
|
7
|
+
export * from './styles';
|
|
8
|
+
export * from './types';
|
|
26
9
|
const DrawerProvider = ({ children, position: _position, ...props }) => {
|
|
27
|
-
const styles =
|
|
10
|
+
const styles = useStylesFor(Drawer.styleRegistryName, props.style);
|
|
28
11
|
const close = () => {
|
|
29
12
|
props.toggle?.();
|
|
30
13
|
props.onClose?.();
|
|
@@ -34,35 +17,34 @@ const DrawerProvider = ({ children, position: _position, ...props }) => {
|
|
|
34
17
|
styles: styles,
|
|
35
18
|
close,
|
|
36
19
|
};
|
|
37
|
-
return ((
|
|
20
|
+
return (_jsx(ModalContext.Provider, { value: value, children: children }));
|
|
38
21
|
};
|
|
39
22
|
const DrawerBox = ({ children, position }) => {
|
|
40
|
-
const { styles, props } =
|
|
23
|
+
const { styles, props } = useModalContext();
|
|
41
24
|
const resolvedAriaLabel = !props.title ? (props.debugName ?? 'Dialog') : undefined;
|
|
42
|
-
return ((
|
|
25
|
+
return (_jsx(RACModal, { css: styles.box, "data-position": position, children: _jsx(Dialog, { "aria-label": resolvedAriaLabel, children: children }) }));
|
|
43
26
|
};
|
|
44
27
|
/**
|
|
45
28
|
* Side-panel overlay that slides in from a configurable edge of the viewport.
|
|
46
29
|
* Shares the same dismiss mechanics as `Modal` (backdrop click, Escape key), controlled by `closable` et al.
|
|
47
30
|
* Uses: `ModalBackdrop`, `ModalBody`, `ModalFooter`, `ModalHeader`
|
|
48
31
|
*/
|
|
49
|
-
const Drawer = (props) => {
|
|
50
|
-
const { children, position, ...rest } = { ...
|
|
51
|
-
return ((
|
|
32
|
+
export const Drawer = (props) => {
|
|
33
|
+
const { children, position, ...rest } = { ...Drawer.defaultProps, ...props };
|
|
34
|
+
return (_jsx(DrawerProvider, { ...rest, position: position, children: _jsx(ModalBackdrop, { children: _jsxs(DrawerBox, { position: position, children: [_jsx(ModalHeader, {}), _jsx(ModalBody, { children: children }), _jsx(ModalFooter, {})] }) }) }));
|
|
52
35
|
};
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
return exports.Drawer;
|
|
36
|
+
Drawer.styleRegistryName = 'Drawer';
|
|
37
|
+
Drawer.elements = ['backdrop', 'box', 'header', 'body', 'footer', 'title', 'description'];
|
|
38
|
+
Drawer.rootElement = 'backdrop';
|
|
39
|
+
Drawer.withVariantTypes = (styles) => {
|
|
40
|
+
return Drawer;
|
|
59
41
|
};
|
|
60
|
-
|
|
42
|
+
Drawer.defaultProps = {
|
|
61
43
|
position: 'left',
|
|
62
44
|
closable: true,
|
|
63
45
|
showClose: false,
|
|
64
46
|
dismissOnBackdrop: true,
|
|
65
47
|
closeOnEscape: true,
|
|
66
48
|
};
|
|
67
|
-
|
|
49
|
+
WebStyleRegistry.registerComponent(Drawer);
|
|
68
50
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Drawer/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Drawer/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAChE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEtF,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAI7D,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AAEvB,MAAM,cAAc,GAAG,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAe,EAAE,EAAE;IAClF,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,iBAAiB,EAAE,KAAK,CAAC,KAAK,CAAC,CAAA;IAClE,MAAM,KAAK,GAAG,GAAG,EAAE;QACjB,KAAK,CAAC,MAAM,EAAE,EAAE,CAAA;QAChB,KAAK,CAAC,OAAO,EAAE,EAAE,CAAA;IACnB,CAAC,CAAA;IACD,MAAM,KAAK,GAAG;QACZ,KAAK;QACL,MAAM,EAAE,MAAuC;QAC/C,KAAK;KACN,CAAA;IACD,OAAO,CACL,KAAC,YAAY,CAAC,QAAQ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gB,GAAG,CAAsB,MAAS,EAAE,EAAE;IAC3D,OAAO,MAA2E,CAAA;AACpF,CAAC,CAAA;AAED,MAAM,CAAC,YAAY,GAAG;IACpB,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,IAAI;IACd,SAAS,EAAE,KAAK;IAChB,iBAAiB,EAAE,IAAI;IACvB,aAAa,EAAE,IAAI;CACI,CAAA;AAEzB,gBAAgB,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -1,44 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const useStylesFor_1 = require("../../lib/hooks/useStylesFor");
|
|
7
|
-
const useDropzone_1 = require("./useDropzone");
|
|
1
|
+
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { createContext, useContext } from 'react';
|
|
3
|
+
import { useStylesFor } from '../../lib/hooks/useStylesFor';
|
|
4
|
+
import { useDropzone } from './useDropzone';
|
|
8
5
|
function useDropzoneProvider(props) {
|
|
9
6
|
const { handle: externalHandle, style, children: _children, extensionProps = {}, ...dropzoneOptions } = props;
|
|
10
7
|
// Always call the hook — satisfies Rules of Hooks.
|
|
11
8
|
// When an external handle is provided its result is discarded.
|
|
12
|
-
const internalHandle =
|
|
9
|
+
const internalHandle = useDropzone(dropzoneOptions);
|
|
13
10
|
const handle = externalHandle ?? internalHandle;
|
|
14
|
-
const styles =
|
|
11
|
+
const styles = useStylesFor('Dropzone', style);
|
|
15
12
|
return {
|
|
16
13
|
handle,
|
|
17
14
|
styles: styles,
|
|
18
15
|
extensionProps,
|
|
19
16
|
};
|
|
20
17
|
}
|
|
21
|
-
|
|
18
|
+
export const DropzoneContext = createContext(null);
|
|
22
19
|
/**
|
|
23
20
|
* Reads the nearest `Dropzone.Provider` context value.
|
|
24
21
|
* Throws if called outside a `Dropzone.Provider` tree.
|
|
25
22
|
*/
|
|
26
|
-
const useDropzoneContext = () => {
|
|
27
|
-
const ctx =
|
|
23
|
+
export const useDropzoneContext = () => {
|
|
24
|
+
const ctx = useContext(DropzoneContext);
|
|
28
25
|
if (!ctx)
|
|
29
26
|
throw new Error('useDropzoneContext must be used inside Dropzone.Provider');
|
|
30
27
|
return ctx;
|
|
31
28
|
};
|
|
32
|
-
exports.useDropzoneContext = useDropzoneContext;
|
|
33
29
|
/**
|
|
34
30
|
* Wires a `DropzoneHandle` and resolved styles into React context for all
|
|
35
31
|
* Dropzone sub-components. Accepts either a pre-built `handle` prop (external
|
|
36
32
|
* control) or raw `UseDropzoneOptions` to have the Provider create a handle
|
|
37
33
|
* internally.
|
|
38
34
|
*/
|
|
39
|
-
const DropzoneProvider = (props) => {
|
|
35
|
+
export const DropzoneProvider = (props) => {
|
|
40
36
|
const value = useDropzoneProvider(props);
|
|
41
|
-
return ((
|
|
37
|
+
return (_jsx(DropzoneContext.Provider, { value: value, children: props.children }));
|
|
42
38
|
};
|
|
43
|
-
exports.DropzoneProvider = DropzoneProvider;
|
|
44
39
|
//# sourceMappingURL=context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/components/Dropzone/context.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/components/Dropzone/context.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAIjD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE3C,SAAS,mBAAmB,CAAC,KAA4B;IACvD,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,GAAG,EAA+B,EAAE,GAAG,eAAe,EAAE,GAAG,KAAK,CAAA;IAE1I,mDAAmD;IACnD,+DAA+D;IAC/D,MAAM,cAAc,GAAG,WAAW,CAAC,eAAe,CAAC,CAAA;IACnD,MAAM,MAAM,GAAG,cAAc,IAAI,cAAc,CAAA;IAE/C,MAAM,MAAM,GAAG,YAAY,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;IAE9C,OAAO;QACL,MAAM;QACN,MAAM,EAAE,MAA0C;QAClD,cAAc;KACf,CAAA;AACH,CAAC;AAID,MAAM,CAAC,MAAM,eAAe,GAAG,aAAa,CAA8B,IAAI,CAAC,CAAA;AAE/E;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAyB,EAAE;IAC3D,MAAM,GAAG,GAAG,UAAU,CAAC,eAAe,CAAC,CAAA;IACvC,IAAI,CAAC,GAAG;QAAE,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAA;IACrF,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAE,EAAE;IAC/D,MAAM,KAAK,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAA;IACxC,OAAO,CACL,KAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACnC,KAAK,CAAC,QAAQ,GACU,CAC5B,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const react_dom_1 = require("react-dom");
|
|
6
|
-
const View_1 = require("../View");
|
|
7
|
-
const context_1 = require("./context");
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { createPortal } from 'react-dom';
|
|
3
|
+
import { View } from '../View';
|
|
4
|
+
import { useDropzoneContext } from './context';
|
|
8
5
|
/**
|
|
9
6
|
* Droppable zone element. Applies `getRootProps` and `getInputProps` from the
|
|
10
7
|
* nearest `Dropzone.Provider` handle to a root `View` and a hidden `<input>`.
|
|
11
8
|
*
|
|
12
9
|
* Must be rendered inside `Dropzone.Provider`.
|
|
13
10
|
*/
|
|
14
|
-
const DropzoneWrapper = ({ children }) => {
|
|
15
|
-
const { handle, styles } =
|
|
16
|
-
return ((
|
|
11
|
+
export const DropzoneWrapper = ({ children }) => {
|
|
12
|
+
const { handle, styles } = useDropzoneContext();
|
|
13
|
+
return (_jsxs(View, { ...handle.dropzone.getRootProps(), style: styles.dropzone, children: [children, _jsx("input", { ...handle.dropzone.getInputProps() })] }));
|
|
17
14
|
};
|
|
18
|
-
exports.DropzoneWrapper = DropzoneWrapper;
|
|
19
15
|
/**
|
|
20
16
|
* Overlay rendered on top of `Dropzone.Wrapper` while a file is being dragged
|
|
21
17
|
* over this specific zone (`isDragActive`). Place it as a child of
|
|
@@ -26,13 +22,12 @@ exports.DropzoneWrapper = DropzoneWrapper;
|
|
|
26
22
|
*
|
|
27
23
|
* Must be rendered inside `Dropzone.Provider`.
|
|
28
24
|
*/
|
|
29
|
-
const DropzoneOverlay = ({ children }) => {
|
|
30
|
-
const { handle, styles } =
|
|
25
|
+
export const DropzoneOverlay = ({ children }) => {
|
|
26
|
+
const { handle, styles } = useDropzoneContext();
|
|
31
27
|
if (!handle.dropzone.isDragActive)
|
|
32
28
|
return null;
|
|
33
|
-
return ((
|
|
29
|
+
return (_jsx(View, { style: styles.overlay, children: _jsx(View, { style: styles.overlayInner, children: children }) }));
|
|
34
30
|
};
|
|
35
|
-
exports.DropzoneOverlay = DropzoneOverlay;
|
|
36
31
|
/**
|
|
37
32
|
* Full-page overlay rendered via a React portal into `document.body` while
|
|
38
33
|
* a file is being dragged anywhere on the document (`isDragGlobal`).
|
|
@@ -43,15 +38,14 @@ exports.DropzoneOverlay = DropzoneOverlay;
|
|
|
43
38
|
*
|
|
44
39
|
* Must be rendered inside `Dropzone.Provider`.
|
|
45
40
|
*/
|
|
46
|
-
const DropzoneFullscreenOverlay = ({ children }) => {
|
|
47
|
-
const { handle, styles } =
|
|
41
|
+
export const DropzoneFullscreenOverlay = ({ children }) => {
|
|
42
|
+
const { handle, styles } = useDropzoneContext();
|
|
48
43
|
if (!handle.dropzone.isDragGlobal)
|
|
49
44
|
return null;
|
|
50
45
|
if (typeof document === 'undefined')
|
|
51
46
|
return null;
|
|
52
47
|
// Spread getRootProps (minus ref) so drops on the fullscreen overlay are captured by this dropzone.
|
|
53
48
|
const { ref: _ref, ...rootProps } = handle.dropzone.getRootProps();
|
|
54
|
-
return
|
|
49
|
+
return createPortal(_jsx(View, { ...rootProps, style: styles.fullscreenOverlay, children: _jsx(View, { style: styles.fullscreenOverlayInner, children: children }) }), document.body);
|
|
55
50
|
};
|
|
56
|
-
exports.DropzoneFullscreenOverlay = DropzoneFullscreenOverlay;
|
|
57
51
|
//# sourceMappingURL=elements.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elements.js","sourceRoot":"","sources":["../../../src/components/Dropzone/elements.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"elements.js","sourceRoot":"","sources":["../../../src/components/Dropzone/elements.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,OAAO,EAAE,IAAI,EAAa,MAAM,SAAS,CAAA;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAO9C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,QAAQ,EAAwB,EAAE,EAAE;IACpE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,kBAAkB,EAAE,CAAA;IAC/C,OAAO,CACL,MAAC,IAAI,OAAM,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAyB,EAAE,KAAK,EAAE,MAAM,CAAC,QAAQ,aACrF,QAAQ,EACT,mBAAY,MAAM,CAAC,QAAQ,CAAC,aAAa,EAAkC,GAAI,IAC1E,CACR,CAAA;AACH,CAAC,CAAA;AAED;;;;;;;;;GASG;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