@danske/sapphire-react-lab 0.83.0 → 0.84.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js +1049 -808
- package/build/cjs/index.js.map +1 -1
- package/build/esm/FileDropzone/i18n/da-DK.js +7 -0
- package/build/esm/FileDropzone/i18n/da-DK.js.map +1 -0
- package/build/esm/FileDropzone/i18n/de-DE.js +7 -0
- package/build/esm/FileDropzone/i18n/de-DE.js.map +1 -0
- package/build/esm/FileDropzone/i18n/en-US.js +7 -0
- package/build/esm/FileDropzone/i18n/en-US.js.map +1 -0
- package/build/esm/FileDropzone/i18n/fi-FI.js +7 -0
- package/build/esm/FileDropzone/i18n/fi-FI.js.map +1 -0
- package/build/esm/FileDropzone/i18n/index.js +20 -0
- package/build/esm/FileDropzone/i18n/index.js.map +1 -0
- package/build/esm/FileDropzone/i18n/nb-NO.js +7 -0
- package/build/esm/FileDropzone/i18n/nb-NO.js.map +1 -0
- package/build/esm/FileDropzone/i18n/pl-PL.js +7 -0
- package/build/esm/FileDropzone/i18n/pl-PL.js.map +1 -0
- package/build/esm/FileDropzone/i18n/sv-SE.js +7 -0
- package/build/esm/FileDropzone/i18n/sv-SE.js.map +1 -0
- package/build/esm/FileDropzone/src/FileDropzone.js +122 -0
- package/build/esm/FileDropzone/src/FileDropzone.js.map +1 -0
- package/build/esm/FileDropzone/src/FileTrigger.js +74 -0
- package/build/esm/FileDropzone/src/FileTrigger.js.map +1 -0
- package/build/esm/FileDropzone/src/utils.js +20 -0
- package/build/esm/FileDropzone/src/utils.js.map +1 -0
- package/build/esm/index.js +2 -0
- package/build/esm/index.js.map +1 -1
- package/build/index.d.ts +49 -2
- package/package.json +4 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"da-DK.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"de-DE.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en-US.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fi-FI.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import da from './da-DK.js';
|
|
2
|
+
import en from './en-US.js';
|
|
3
|
+
import de from './de-DE.js';
|
|
4
|
+
import fi from './fi-FI.js';
|
|
5
|
+
import no from './nb-NO.js';
|
|
6
|
+
import pl from './pl-PL.js';
|
|
7
|
+
import se from './sv-SE.js';
|
|
8
|
+
|
|
9
|
+
var intlMessages = {
|
|
10
|
+
"da-DK": da,
|
|
11
|
+
"en-US": en,
|
|
12
|
+
"de-DE": de,
|
|
13
|
+
"fi-FI": fi,
|
|
14
|
+
"nb-NO": no,
|
|
15
|
+
"pl-PL": pl,
|
|
16
|
+
"sv-SE": se
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { intlMessages as default };
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/FileDropzone/i18n/index.ts"],"sourcesContent":["import da from './da-DK.json';\nimport en from './en-US.json';\nimport de from './de-DE.json';\nimport fi from './fi-FI.json';\nimport no from './nb-NO.json';\nimport pl from './pl-PL.json';\nimport se from './sv-SE.json';\n\nexport default {\n 'da-DK': da,\n 'en-US': en,\n 'de-DE': de,\n 'fi-FI': fi,\n 'nb-NO': no,\n 'pl-PL': pl,\n 'sv-SE': se,\n};\n"],"names":[],"mappings":";;;;;;;;AAQA,mBAAe;AAAA,EACb,OAAS,EAAA,EAAA;AAAA,EACT,OAAS,EAAA,EAAA;AAAA,EACT,OAAS,EAAA,EAAA;AAAA,EACT,OAAS,EAAA,EAAA;AAAA,EACT,OAAS,EAAA,EAAA;AAAA,EACT,OAAS,EAAA,EAAA;AAAA,EACT,OAAS,EAAA,EAAA;AAAA,CAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nb-NO.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pl-PL.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sv-SE.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { useSapphireStyleProps, useButton, Icon, Heading } from '@danske/sapphire-react';
|
|
4
|
+
import styles from '@danske/sapphire-css/components/dropzone/dropzone.module.css';
|
|
5
|
+
import { Upload } from '@danske/sapphire-icons/react';
|
|
6
|
+
import { Body } from '../../Typography/src/Body.js';
|
|
7
|
+
import { useHover, usePress, Pressable } from '@react-aria/interactions';
|
|
8
|
+
import { useId, mergeProps } from '@react-aria/utils';
|
|
9
|
+
import { FileTrigger } from './FileTrigger.js';
|
|
10
|
+
import { useDrop, useClipboard } from '@react-aria/dnd';
|
|
11
|
+
import { convertFileListToFileDropItems } from './utils.js';
|
|
12
|
+
import { useFocusRing } from '@react-aria/focus';
|
|
13
|
+
import { useMessageFormatter } from '@react-aria/i18n';
|
|
14
|
+
import intlMessages from '../i18n/index.js';
|
|
15
|
+
|
|
16
|
+
var __defProp = Object.defineProperty;
|
|
17
|
+
var __defProps = Object.defineProperties;
|
|
18
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
19
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
20
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
21
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
22
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
23
|
+
var __spreadValues = (a, b) => {
|
|
24
|
+
for (var prop in b || (b = {}))
|
|
25
|
+
if (__hasOwnProp.call(b, prop))
|
|
26
|
+
__defNormalProp(a, prop, b[prop]);
|
|
27
|
+
if (__getOwnPropSymbols)
|
|
28
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
29
|
+
if (__propIsEnum.call(b, prop))
|
|
30
|
+
__defNormalProp(a, prop, b[prop]);
|
|
31
|
+
}
|
|
32
|
+
return a;
|
|
33
|
+
};
|
|
34
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
35
|
+
const FileDropzone = React.forwardRef(function DropzoneWrapper(props, ref) {
|
|
36
|
+
const {
|
|
37
|
+
isDisabled = false,
|
|
38
|
+
hasError,
|
|
39
|
+
renderInstruction,
|
|
40
|
+
onFileSelectOpen = () => null,
|
|
41
|
+
acceptedFileTypes,
|
|
42
|
+
allowsMultiple,
|
|
43
|
+
onDrop = () => null
|
|
44
|
+
} = props;
|
|
45
|
+
const id = useId();
|
|
46
|
+
const paragraphId = props["aria-label"] ? void 0 : id;
|
|
47
|
+
const format = useMessageFormatter(intlMessages);
|
|
48
|
+
const pressableRef = useRef(null);
|
|
49
|
+
const { hoverProps, isHovered } = useHover({ isDisabled });
|
|
50
|
+
const { styleProps } = useSapphireStyleProps(props);
|
|
51
|
+
const {
|
|
52
|
+
dropProps,
|
|
53
|
+
dropButtonProps,
|
|
54
|
+
isDropTarget: isDropping
|
|
55
|
+
} = useDrop(__spreadProps(__spreadValues({}, props), {
|
|
56
|
+
ref: pressableRef,
|
|
57
|
+
hasDropButton: true,
|
|
58
|
+
isDisabled
|
|
59
|
+
}));
|
|
60
|
+
const { buttonProps } = useButton(__spreadProps(__spreadValues({}, dropButtonProps), { elementType: "div" }), pressableRef);
|
|
61
|
+
const { focusProps, isFocusVisible } = useFocusRing();
|
|
62
|
+
const { pressProps, isPressed } = usePress({});
|
|
63
|
+
const { clipboardProps } = useClipboard({
|
|
64
|
+
isDisabled,
|
|
65
|
+
onPaste: (items) => onDrop({
|
|
66
|
+
type: "drop",
|
|
67
|
+
items,
|
|
68
|
+
x: 0,
|
|
69
|
+
y: 0,
|
|
70
|
+
dropOperation: "copy"
|
|
71
|
+
})
|
|
72
|
+
});
|
|
73
|
+
const ariaLabel = props["aria-label"] || "Dropzone";
|
|
74
|
+
const onFileTriggerSelect = (files) => {
|
|
75
|
+
onDrop({
|
|
76
|
+
type: "drop",
|
|
77
|
+
items: convertFileListToFileDropItems(files),
|
|
78
|
+
x: 0,
|
|
79
|
+
y: 0,
|
|
80
|
+
dropOperation: "copy"
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
return /* @__PURE__ */ React.createElement(FileTrigger, {
|
|
84
|
+
acceptedFileTypes,
|
|
85
|
+
allowsMultiple,
|
|
86
|
+
onSelect: onFileTriggerSelect,
|
|
87
|
+
isDisabled
|
|
88
|
+
}, /* @__PURE__ */ React.createElement(Pressable, {
|
|
89
|
+
ref: pressableRef,
|
|
90
|
+
onPress: onFileSelectOpen
|
|
91
|
+
}, /* @__PURE__ */ React.createElement("div", __spreadProps(__spreadValues({}, mergeProps(dropProps, hoverProps, clipboardProps, focusProps, buttonProps, pressProps)), {
|
|
92
|
+
ref,
|
|
93
|
+
style: __spreadValues({}, styleProps.style),
|
|
94
|
+
className: clsx(styles["sapphire-dropzone"], styles["js-focus"], styles["js-hover"], {
|
|
95
|
+
[styles["is-hover"]]: isHovered && !isDropping,
|
|
96
|
+
[styles["is-active"]]: isPressed,
|
|
97
|
+
[styles["is-disabled"]]: isDisabled,
|
|
98
|
+
[styles["is-focus"]]: isFocusVisible,
|
|
99
|
+
[styles["sapphire-dropzone--dropping"]]: isDropping,
|
|
100
|
+
[styles["sapphire-dropzone--error"]]: hasError
|
|
101
|
+
}, styleProps.className),
|
|
102
|
+
"aria-label": ariaLabel,
|
|
103
|
+
"aria-invalid": hasError,
|
|
104
|
+
"aria-describedby": paragraphId
|
|
105
|
+
}), /* @__PURE__ */ React.createElement("div", {
|
|
106
|
+
className: clsx(styles["sapphire-dropzone__content"])
|
|
107
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
108
|
+
className: clsx(styles["sapphire-dropzone__icon"])
|
|
109
|
+
}, /* @__PURE__ */ React.createElement(Icon, null, /* @__PURE__ */ React.createElement(Upload, null))), /* @__PURE__ */ React.createElement("div", {
|
|
110
|
+
className: clsx(styles["sapphire-dropzone__heading"])
|
|
111
|
+
}, /* @__PURE__ */ React.createElement(Heading, {
|
|
112
|
+
level: 6
|
|
113
|
+
}, isDropping ? format("dropzone-heading-dropping") : format("dropzone-heading-default"))), /* @__PURE__ */ React.createElement("div", {
|
|
114
|
+
id: paragraphId,
|
|
115
|
+
className: clsx(styles["sapphire-dropzone__paragraph"])
|
|
116
|
+
}, /* @__PURE__ */ React.createElement(Body, {
|
|
117
|
+
level: 2
|
|
118
|
+
}, renderInstruction(isDropping)))))));
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
export { FileDropzone };
|
|
122
|
+
//# sourceMappingURL=FileDropzone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileDropzone.js","sources":["../../../../src/FileDropzone/src/FileDropzone.tsx"],"sourcesContent":["import React, { ForwardedRef, useRef } from 'react';\nimport clsx from 'clsx';\nimport {\n Heading,\n Icon,\n SapphireStyleProps,\n useButton,\n useSapphireStyleProps,\n} from '@danske/sapphire-react';\nimport styles from '@danske/sapphire-css/components/dropzone/dropzone.module.css';\nimport { Upload } from '@danske/sapphire-icons/react';\nimport { Body } from '../../Typography/src/Body';\nimport {\n HoverProps,\n Pressable,\n useHover,\n usePress,\n} from '@react-aria/interactions';\nimport { mergeProps, useId } from '@react-aria/utils';\nimport { FileSelectProps, FileTrigger } from './FileTrigger';\nimport { DropOptions, useClipboard, useDrop } from '@react-aria/dnd';\nimport { convertFileListToFileDropItems } from './utils';\nimport { useFocusRing } from '@react-aria/focus';\nimport { AriaLabelingProps } from '@react-types/shared';\nimport { useMessageFormatter } from '@react-aria/i18n';\nimport intlMessages from '../i18n';\n\nexport interface FileDropzoneProps\n extends SapphireStyleProps,\n Omit<DropOptions, 'hasDropButton'>,\n HoverProps,\n FileSelectProps,\n AriaLabelingProps {\n /**\n * Whether the dropzone has an error\n * @default false\n */\n hasError?: boolean;\n /**\n * The body text of the dropzone which can contain the instructions for the files to be uploaded.\n * Can be rendered differently based on the `isDropping` parameter, which is true if a file is about to be dropped in the zone.\n * @param isDropping - boolean that marks whether a payload is about to be dropped in the dropzone.\n */\n renderInstruction: (isDropping: boolean) => string;\n /**\n * Function that is called when the file select is opened on press, before any file is selected.\n * @default \"() => null\"\n */\n onFileSelectOpen?: () => void;\n}\n\nexport const FileDropzone = React.forwardRef(function DropzoneWrapper(\n props: FileDropzoneProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n const {\n isDisabled = false,\n hasError,\n renderInstruction,\n onFileSelectOpen = () => null,\n acceptedFileTypes,\n allowsMultiple,\n onDrop = () => null,\n } = props;\n\n const id = useId();\n const paragraphId = props['aria-label'] ? undefined : id;\n const format = useMessageFormatter(intlMessages);\n const pressableRef = useRef(null);\n const { hoverProps, isHovered } = useHover({ isDisabled });\n const { styleProps } = useSapphireStyleProps(props);\n const {\n dropProps,\n dropButtonProps,\n isDropTarget: isDropping,\n } = useDrop({\n ...props,\n ref: pressableRef,\n hasDropButton: true,\n isDisabled,\n });\n const { buttonProps } = useButton(\n { ...dropButtonProps, elementType: 'div' },\n pressableRef\n );\n const { focusProps, isFocusVisible } = useFocusRing();\n const { pressProps, isPressed } = usePress({});\n\n const { clipboardProps } = useClipboard({\n isDisabled,\n onPaste: (items) =>\n onDrop({\n type: 'drop',\n items,\n x: 0,\n y: 0,\n dropOperation: 'copy',\n }),\n });\n\n const ariaLabel: string = props['aria-label'] || 'Dropzone';\n\n const onFileTriggerSelect = (files: FileList | null) => {\n onDrop({\n type: 'drop',\n items: convertFileListToFileDropItems(files),\n x: 0,\n y: 0,\n dropOperation: 'copy',\n });\n };\n\n return (\n <FileTrigger\n acceptedFileTypes={acceptedFileTypes}\n allowsMultiple={allowsMultiple}\n onSelect={onFileTriggerSelect}\n isDisabled={isDisabled}\n >\n <Pressable ref={pressableRef} onPress={onFileSelectOpen}>\n <div\n {...mergeProps(\n dropProps,\n hoverProps,\n clipboardProps,\n focusProps,\n buttonProps,\n pressProps\n )}\n ref={ref}\n style={{ ...styleProps.style }}\n className={clsx(\n styles['sapphire-dropzone'],\n styles['js-focus'],\n styles['js-hover'],\n {\n [styles['is-hover']]: isHovered && !isDropping,\n [styles['is-active']]: isPressed,\n [styles['is-disabled']]: isDisabled,\n [styles['is-focus']]: isFocusVisible,\n [styles['sapphire-dropzone--dropping']]: isDropping,\n [styles['sapphire-dropzone--error']]: hasError,\n },\n styleProps.className\n )}\n aria-label={ariaLabel}\n aria-invalid={hasError}\n aria-describedby={paragraphId}\n >\n <div className={clsx(styles['sapphire-dropzone__content'])}>\n <div className={clsx(styles['sapphire-dropzone__icon'])}>\n <Icon>\n <Upload />\n </Icon>\n </div>\n <div className={clsx(styles['sapphire-dropzone__heading'])}>\n <Heading level={6}>\n {isDropping\n ? format('dropzone-heading-dropping')\n : format('dropzone-heading-default')}\n </Heading>\n </div>\n <div\n id={paragraphId}\n className={clsx(styles['sapphire-dropzone__paragraph'])}\n >\n <Body level={2}>{renderInstruction(isDropping)}</Body>\n </div>\n </div>\n </div>\n </Pressable>\n </FileTrigger>\n );\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDO,MAAM,YAAe,GAAA,KAAA,CAAM,UAAW,CAAA,SAAA,eAAA,CAC3C,OACA,GACA,EAAA;AACA,EAAM,MAAA;AAAA,IACJ,UAAa,GAAA,KAAA;AAAA,IACb,QAAA;AAAA,I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GAAA,cAAA;AAAA,MAAA,CACrB,OAAO,6BAAiC,CAAA,GAAA,UAAA;AAAA,MAAA,CACxC,OAAO,0BAA8B,CAAA,GAAA,QAAA;AAAA,KAAA,EAExC,UAAW,CAAA,SAAA,CAAA;AAAA,IAEb,YAAY,EAAA,SAAA;AAAA,IACZ,cAAc,EAAA,QAAA;AAAA,IACd,kBAAkB,EAAA,WAAA;AAAA,GAAA,CAAA,sCAEjB,KAAD,EAAA;AAAA,IAAK,SAAA,EAAW,KAAK,MAAO,CAAA,4BAAA,CAAA,CAAA;AAAA,GAAA,sCACzB,KAAD,EAAA;AAAA,IAAK,SAAA,EAAW,KAAK,MAAO,CAAA,yBAAA,CAAA,CAAA;AAAA,GAAA,sCACzB,IAAD,EAAA,IAAA,sCACG,MAAD,EAAA,IAAA,CAAA,CAAA,CAAA,sCAGH,KAAD,EAAA;AAAA,IAAK,SAAA,EAAW,KAAK,MAAO,CAAA,4BAAA,CAAA,CAAA;AAAA,GAAA,sCACzB,OAAD,EAAA;AAAA,IAAS,KAAO,EAAA,CAAA;AAAA,GAAA,EACb,aACG,MAAO,CAAA,2BAAA,CAAA,GACP,MAAO,CAAA,0BAAA,CAAA,CAAA,CAAA,sCAGd,KAAD,EAAA;AAAA,IACE,EAAI,EAAA,WAAA;AAAA,IACJ,SAAA,EAAW,KAAK,MAAO,CAAA,8BAAA,CAAA,CAAA;AAAA,GAAA,sCAEtB,IAAD,EAAA;AAAA,IAAM,KAAO,EAAA,CAAA;AAAA,GAAA,EAAI,iBAAkB,CAAA,UAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA;;;;"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useObjectRef, filterDOMProps } from '@react-aria/utils';
|
|
3
|
+
import { PressResponder } from '@react-aria/interactions';
|
|
4
|
+
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __defProps = Object.defineProperties;
|
|
7
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __objRest = (source, exclude) => {
|
|
25
|
+
var target = {};
|
|
26
|
+
for (var prop in source)
|
|
27
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
if (source != null && __getOwnPropSymbols)
|
|
30
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
31
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
32
|
+
target[prop] = source[prop];
|
|
33
|
+
}
|
|
34
|
+
return target;
|
|
35
|
+
};
|
|
36
|
+
const HiddenFileInput = React.forwardRef(function InputWrapper(props, ref) {
|
|
37
|
+
return /* @__PURE__ */ React.createElement("input", __spreadProps(__spreadValues({}, props), {
|
|
38
|
+
ref,
|
|
39
|
+
type: "file",
|
|
40
|
+
style: { display: "none" }
|
|
41
|
+
}));
|
|
42
|
+
});
|
|
43
|
+
const FileTrigger = React.forwardRef(function FileTriggerWrapper(props, ref) {
|
|
44
|
+
const _a = props, {
|
|
45
|
+
acceptedFileTypes,
|
|
46
|
+
allowsMultiple = false,
|
|
47
|
+
onSelect = () => null,
|
|
48
|
+
children,
|
|
49
|
+
isDisabled = false
|
|
50
|
+
} = _a, rest = __objRest(_a, [
|
|
51
|
+
"acceptedFileTypes",
|
|
52
|
+
"allowsMultiple",
|
|
53
|
+
"onSelect",
|
|
54
|
+
"children",
|
|
55
|
+
"isDisabled"
|
|
56
|
+
]);
|
|
57
|
+
const inputRef = useObjectRef(ref);
|
|
58
|
+
const domProps = filterDOMProps(rest);
|
|
59
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(PressResponder, {
|
|
60
|
+
onPress: () => {
|
|
61
|
+
var _a2;
|
|
62
|
+
(_a2 = inputRef.current) == null ? void 0 : _a2.click();
|
|
63
|
+
}
|
|
64
|
+
}, children), /* @__PURE__ */ React.createElement(HiddenFileInput, __spreadProps(__spreadValues({}, domProps), {
|
|
65
|
+
disabled: isDisabled,
|
|
66
|
+
ref: inputRef,
|
|
67
|
+
accept: acceptedFileTypes == null ? void 0 : acceptedFileTypes.toString(),
|
|
68
|
+
onChange: (e) => onSelect == null ? void 0 : onSelect(e.target.files),
|
|
69
|
+
multiple: allowsMultiple
|
|
70
|
+
})));
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
export { FileTrigger };
|
|
74
|
+
//# sourceMappingURL=FileTrigger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileTrigger.js","sources":["../../../../src/FileDropzone/src/FileTrigger.tsx"],"sourcesContent":["import React, { ForwardedRef } from 'react';\nimport { filterDOMProps, useObjectRef } from '@react-aria/utils';\nimport { PressResponder } from '@react-aria/interactions';\n\nexport interface FileSelectProps {\n /**\n * List of file types that are allowed to be selected using the file select.\n * When no list is passed, all file types will be allowed to be selected.\n * @default \"\"\n */\n acceptedFileTypes?: string[];\n /**\n * Whether multiple files are allowed to be selected using the file select.\n * @default \"false\"\n */\n allowsMultiple?: boolean;\n}\n\nexport interface FileTriggerProps extends FileSelectProps {\n /**\n * Callback for file selection.\n * @param files - the list of selected files\n * @default \"() => null\"\n */\n onSelect?: (files: FileList | null) => void;\n isDisabled?: boolean;\n children?: React.ReactNode;\n}\n\nconst HiddenFileInput = React.forwardRef(function InputWrapper(\n props: React.HTMLProps<HTMLInputElement>,\n ref: ForwardedRef<HTMLInputElement>\n) {\n return <input {...props} ref={ref} type=\"file\" style={{ display: 'none' }} />;\n});\n\nexport const FileTrigger = React.forwardRef(function FileTriggerWrapper(\n props: FileTriggerProps,\n ref: ForwardedRef<HTMLInputElement>\n) {\n const {\n acceptedFileTypes,\n allowsMultiple = false,\n onSelect = () => null,\n children,\n isDisabled = false,\n ...rest\n } = props;\n const inputRef = useObjectRef(ref);\n const domProps = filterDOMProps(rest);\n\n return (\n <>\n <PressResponder\n onPress={() => {\n inputRef.current?.click();\n }}\n >\n {children}\n </PressResponder>\n <HiddenFileInput\n {...domProps}\n disabled={isDisabled}\n ref={inputRef}\n accept={acceptedFileTypes?.toString()}\n onChange={(e) => onSelect?.((e.target as HTMLInputElement).files)}\n multiple={allowsMultiple}\n />\n </>\n );\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAM,eAAkB,GAAA,KAAA,CAAM,UAAW,CAAA,SAAA,YAAA,CACvC,OACA,GACA,EAAA;AACA,EAAO,uBAAA,KAAA,CAAA,aAAA,CAAC,OAAD,EAAA,aAAA,CAAA,cAAA,CAAA,EAAA,EAAW,KAAX,CAAA,EAAA;AAAA,IAAkB,GAAA;AAAA,IAAU,IAAK,EAAA,MAAA;AAAA,IAAO,KAAA,EAAO,EAAE,OAAS,EAAA,MAAA,EAAA;AAAA,GAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA;AAG5D,MAAM,WAAc,GAAA,KAAA,CAAM,UAAW,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|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const convertFileListToFileDropItems = (fileList) => {
|
|
2
|
+
if (!fileList) {
|
|
3
|
+
return [];
|
|
4
|
+
}
|
|
5
|
+
return Array.from(fileList).map((file) => ({
|
|
6
|
+
kind: "file",
|
|
7
|
+
type: file.type,
|
|
8
|
+
name: file.name,
|
|
9
|
+
getFile: () => Promise.resolve(file),
|
|
10
|
+
getText: () => new Promise((resolve, reject) => {
|
|
11
|
+
const reader = new FileReader();
|
|
12
|
+
reader.onload = () => resolve(reader.result);
|
|
13
|
+
reader.onerror = () => reject(reader.error);
|
|
14
|
+
reader.readAsText(file);
|
|
15
|
+
})
|
|
16
|
+
}));
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { convertFileListToFileDropItems };
|
|
20
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../src/FileDropzone/src/utils.ts"],"sourcesContent":["import { FileDropItem } from '@react-types/shared';\n\nexport const convertFileListToFileDropItems = (\n fileList: FileList | null\n): FileDropItem[] => {\n if (!fileList) {\n return [];\n }\n\n return Array.from(fileList).map((file) => ({\n kind: 'file',\n type: file.type,\n name: file.name,\n getFile: () => Promise.resolve(file),\n getText: () =>\n new Promise<string>((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => resolve(reader.result as string);\n reader.onerror = () => reject(reader.error);\n reader.readAsText(file);\n }),\n }));\n};\n"],"names":[],"mappings":"AAEa,MAAA,8BAAA,GAAiC,CAC5C,QACmB,KAAA;AACnB,EAAA,IAAI,CAAC,QAAU,EAAA;AACb,IAAO,OAAA,EAAA,CAAA;AAAA,GAAA;AAGT,EAAA,OAAO,KAAM,CAAA,IAAA,CAAK,QAAU,CAAA,CAAA,GAAA,CAAI,CAAC,IAAU,MAAA;AAAA,IACzC,IAAM,EAAA,MAAA;AAAA,IACN,MAAM,IAAK,CAAA,IAAA;AAAA,IACX,MAAM,IAAK,CAAA,IAAA;AAAA,IACX,OAAA,EAAS,MAAM,OAAA,CAAQ,OAAQ,CAAA,IAAA,CAAA;AAAA,IAC/B,SAAS,MACP,IAAI,OAAgB,CAAA,CAAC,SAAS,MAAW,KAAA;AACvC,MAAA,MAAM,SAAS,IAAI,UAAA,EAAA,CAAA;AACnB,MAAO,MAAA,CAAA,MAAA,GAAS,MAAM,OAAA,CAAQ,MAAO,CAAA,MAAA,CAAA,CAAA;AACrC,MAAO,MAAA,CAAA,OAAA,GAAU,MAAM,MAAA,CAAO,MAAO,CAAA,KAAA,CAAA,CAAA;AACrC,MAAA,MAAA,CAAO,UAAW,CAAA,IAAA,CAAA,CAAA;AAAA,KAAA,CAAA;AAAA,GAAA,CAAA,CAAA,CAAA;AAAA;;;;"}
|
package/build/esm/index.js
CHANGED
|
@@ -17,6 +17,8 @@ export { Accordion } from './Accordion/index.js';
|
|
|
17
17
|
export { Typography } from './Typography/index.js';
|
|
18
18
|
export { Fieldset } from './Fieldset/src/Fieldset.js';
|
|
19
19
|
export { Avatar } from './Avatar/src/Avatar.js';
|
|
20
|
+
export { FileDropzone } from './FileDropzone/src/FileDropzone.js';
|
|
21
|
+
export { FileTrigger } from './FileDropzone/src/FileTrigger.js';
|
|
20
22
|
export { AlertDialog } from './AlertDialog/src/AlertDialog.js';
|
|
21
23
|
export { NumberField } from './NumberField/src/NumberField.js';
|
|
22
24
|
export { useLocale } from '@react-aria/i18n';
|
package/build/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _react_types_shared from '@react-types/shared';
|
|
2
|
-
import { PressEvents, Validation, RangeValue, HelpTextProps, LabelableProps, CollectionBase, DOMProps, Expandable, ItemProps, FocusableRefValue } from '@react-types/shared';
|
|
2
|
+
import { PressEvents, Validation, RangeValue, HelpTextProps, LabelableProps, CollectionBase, DOMProps, Expandable, ItemProps, AriaLabelingProps, FocusableRefValue } from '@react-types/shared';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default, { ReactNode, ComponentType, RefObject } from 'react';
|
|
5
5
|
import { AriaToggleButtonProps } from '@react-aria/button';
|
|
@@ -13,6 +13,8 @@ import { ComboBoxProps } from '@react-types/combobox';
|
|
|
13
13
|
import { AriaSearchFieldProps } from '@react-aria/searchfield';
|
|
14
14
|
import { AriaToastRegionProps } from '@react-aria/toast';
|
|
15
15
|
import { ToastState } from '@react-stately/toast';
|
|
16
|
+
import { HoverProps } from '@react-aria/interactions';
|
|
17
|
+
import { DropOptions } from '@react-aria/dnd';
|
|
16
18
|
import { AriaModalOverlayProps } from '@react-aria/overlays';
|
|
17
19
|
import { AriaNumberFieldProps } from '@react-aria/numberfield';
|
|
18
20
|
export { useLocale } from '@react-aria/i18n';
|
|
@@ -786,6 +788,51 @@ declare type SapphireAvatarProps = SapphireStyleProps & {
|
|
|
786
788
|
});
|
|
787
789
|
declare const Avatar: ({ monogram, icon, color, size, ...props }: SapphireAvatarProps) => React__default.ReactElement;
|
|
788
790
|
|
|
791
|
+
interface FileSelectProps {
|
|
792
|
+
/**
|
|
793
|
+
* List of file types that are allowed to be selected using the file select.
|
|
794
|
+
* When no list is passed, all file types will be allowed to be selected.
|
|
795
|
+
* @default ""
|
|
796
|
+
*/
|
|
797
|
+
acceptedFileTypes?: string[];
|
|
798
|
+
/**
|
|
799
|
+
* Whether multiple files are allowed to be selected using the file select.
|
|
800
|
+
* @default "false"
|
|
801
|
+
*/
|
|
802
|
+
allowsMultiple?: boolean;
|
|
803
|
+
}
|
|
804
|
+
interface FileTriggerProps extends FileSelectProps {
|
|
805
|
+
/**
|
|
806
|
+
* Callback for file selection.
|
|
807
|
+
* @param files - the list of selected files
|
|
808
|
+
* @default "() => null"
|
|
809
|
+
*/
|
|
810
|
+
onSelect?: (files: FileList | null) => void;
|
|
811
|
+
isDisabled?: boolean;
|
|
812
|
+
children?: React__default.ReactNode;
|
|
813
|
+
}
|
|
814
|
+
declare const FileTrigger: React__default.ForwardRefExoticComponent<FileTriggerProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
815
|
+
|
|
816
|
+
interface FileDropzoneProps extends SapphireStyleProps, Omit<DropOptions, 'hasDropButton'>, HoverProps, FileSelectProps, AriaLabelingProps {
|
|
817
|
+
/**
|
|
818
|
+
* Whether the dropzone has an error
|
|
819
|
+
* @default false
|
|
820
|
+
*/
|
|
821
|
+
hasError?: boolean;
|
|
822
|
+
/**
|
|
823
|
+
* The body text of the dropzone which can contain the instructions for the files to be uploaded.
|
|
824
|
+
* Can be rendered differently based on the `isDropping` parameter, which is true if a file is about to be dropped in the zone.
|
|
825
|
+
* @param isDropping - boolean that marks whether a payload is about to be dropped in the dropzone.
|
|
826
|
+
*/
|
|
827
|
+
renderInstruction: (isDropping: boolean) => string;
|
|
828
|
+
/**
|
|
829
|
+
* Function that is called when the file select is opened on press, before any file is selected.
|
|
830
|
+
* @default "() => null"
|
|
831
|
+
*/
|
|
832
|
+
onFileSelectOpen?: () => void;
|
|
833
|
+
}
|
|
834
|
+
declare const FileDropzone: React__default.ForwardRefExoticComponent<Omit<FileDropzoneProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
835
|
+
|
|
789
836
|
declare type SapphireAlertDialogProps = AriaModalOverlayProps & SapphireStyleProps & Pick<DialogProps, 'isOpen' | 'onClose'> & Omit<SapphireFeedbackMessageProps, 'heading' | 'actions'> & {
|
|
790
837
|
/**
|
|
791
838
|
*
|
|
@@ -879,4 +926,4 @@ interface NumberFieldProps extends SapphireNumberFieldProps, PressEvents, Sapphi
|
|
|
879
926
|
}
|
|
880
927
|
declare const NumberField: React__default.ForwardRefExoticComponent<NumberFieldProps & React__default.RefAttributes<NumberFieldRef>>;
|
|
881
928
|
|
|
882
|
-
export { _Accordion as Accordion, AlertDialog, Avatar, Calendar, CalendarView, DateField, DateFieldProps, DateRangeField, DateRangeFieldProps, FeedbackMessage, Fieldset, FieldsetProps, FilterDropdown, NotificationBadge, NotificationBadgeProps, NumberField, NumberFieldProps, NumberFieldRef, PredefinedDateRange, RangeCalendar, SapphireAccordionHeadingProps, SapphireAccordionItemProps, SapphireAccordionProps, SapphireAlertDialogProps, SapphireAvatarProps, SapphireCalendarProps, SapphireFeedbackMessageProps, SapphireFilterDropdownProps, SapphireRangeCalendarProps, SapphireSearchFieldProps, SapphireToggleButtonProps, SearchField, ShowToastFn, ShowToastOptions, Spinner, SpinnerProps, ToastProvider, ToastProviderProps, ToggleButton, Typography, TypographyBodyProps, TypographyCaptionProps, TypographyHeadingProps, TypographySubheadingProps, isDateOutsideValidRange, isEndDateBeforeStartDate, useShowToast };
|
|
929
|
+
export { _Accordion as Accordion, AlertDialog, Avatar, Calendar, CalendarView, DateField, DateFieldProps, DateRangeField, DateRangeFieldProps, FeedbackMessage, Fieldset, FieldsetProps, FileDropzone, FileDropzoneProps, FileTrigger, FileTriggerProps, FilterDropdown, NotificationBadge, NotificationBadgeProps, NumberField, NumberFieldProps, NumberFieldRef, PredefinedDateRange, RangeCalendar, SapphireAccordionHeadingProps, SapphireAccordionItemProps, SapphireAccordionProps, SapphireAlertDialogProps, SapphireAvatarProps, SapphireCalendarProps, SapphireFeedbackMessageProps, SapphireFilterDropdownProps, SapphireRangeCalendarProps, SapphireSearchFieldProps, SapphireToggleButtonProps, SearchField, ShowToastFn, ShowToastOptions, Spinner, SpinnerProps, ToastProvider, ToastProviderProps, ToggleButton, Typography, TypographyBodyProps, TypographyCaptionProps, TypographyHeadingProps, TypographySubheadingProps, isDateOutsideValidRange, isEndDateBeforeStartDate, useShowToast };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danske/sapphire-react-lab",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.84.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"description": "Experimental React components of the Sapphire Design System from Danske Bank A/S",
|
|
6
6
|
"exports": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"cross-env": "^7.0.3"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@danske/sapphire-css": "^28.0
|
|
39
|
+
"@danske/sapphire-css": "^28.1.0",
|
|
40
40
|
"@internationalized/date": "^3.5.2",
|
|
41
41
|
"@internationalized/string": "^3.2.1",
|
|
42
42
|
"@react-aria/accordion": "^3.0.0-alpha.27",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"@react-aria/combobox": "^3.8.4",
|
|
46
46
|
"@react-aria/datepicker": "^3.9.3",
|
|
47
47
|
"@react-aria/dialog": "^3.5.12",
|
|
48
|
+
"@react-aria/dnd": "^3.6.1",
|
|
48
49
|
"@react-aria/focus": "^3.16.2",
|
|
49
50
|
"@react-aria/i18n": "^3.10.2",
|
|
50
51
|
"@react-aria/interactions": "^3.21.1",
|
|
@@ -71,5 +72,5 @@
|
|
|
71
72
|
"clsx": "^1.1.1",
|
|
72
73
|
"react-transition-group": "^4.4.5"
|
|
73
74
|
},
|
|
74
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "07a564af42921a372a62519265afe48ec303efdb"
|
|
75
76
|
}
|