@dreamcommerce/aurora 2.8.4-2 → 2.8.4-4
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/packages/aurora/src/components/dropdown/components/search.js +5 -1
- package/build/cjs/packages/aurora/src/components/dropdown/components/search.js.map +1 -1
- package/build/cjs/packages/aurora/src/components/image_picker/components/image_preview.js +1 -0
- package/build/cjs/packages/aurora/src/components/image_picker/components/image_preview.js.map +1 -1
- package/build/esm/packages/aurora/src/components/dropdown/components/search.js +6 -2
- package/build/esm/packages/aurora/src/components/dropdown/components/search.js.map +1 -1
- package/build/esm/packages/aurora/src/components/image_picker/components/image_preview.js +1 -0
- package/build/esm/packages/aurora/src/components/image_picker/components/image_preview.js.map +1 -1
- package/package.json +1 -1
|
@@ -27,8 +27,12 @@ onKeyUp }) => {
|
|
|
27
27
|
const { toggleDropdown, isOpen } = index.useDropdownContext();
|
|
28
28
|
const ref = React.useRef(null);
|
|
29
29
|
use_keyboard_open_close.useKeyboardOpenClose(toggleDropdown, isOpen, ref);
|
|
30
|
+
const [value, setValue] = React.useState('');
|
|
31
|
+
const handleOnChange = (event) => {
|
|
32
|
+
setValue(event.target.value);
|
|
33
|
+
};
|
|
30
34
|
return (React__default['default'].createElement("aside", { className: main_module['default'][css_classes.cssDropdownSearch], ref: ref },
|
|
31
|
-
React__default['default'].createElement(input['default'], { placeholder: "Szukaj", padding: "small", onKeyUp: onKeyUp, autoFocus: true })));
|
|
35
|
+
React__default['default'].createElement(input['default'], { placeholder: "Szukaj", padding: "small", onKeyUp: onKeyUp, onChange: handleOnChange, value: value, autoFocus: true })));
|
|
32
36
|
};
|
|
33
37
|
|
|
34
38
|
exports.default = Search;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -12,6 +12,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
13
|
|
|
14
14
|
const ImagePreview = ({ isValid, file, onError, onLoad }) => {
|
|
15
|
+
console.log('ImagePreview', file.fileUrl);
|
|
15
16
|
return (React__default['default'].createElement("div", { className: main_module['default'][css_classes['default'].imagePickerImagePreviewWrapper] }, isValid ? (React__default['default'].createElement("img", { alt: "", src: (file === null || file === void 0 ? void 0 : file.fileUrl) || '', onError: onError, onLoad: onLoad, className: main_module['default'][css_classes['default'].imagePickerImagePreview] })) : (React__default['default'].createElement(icon_wrong_file_format['default'], { className: main_module['default'][css_classes['default'].imagePickerWrongFileFormatIcon] }))));
|
|
16
17
|
};
|
|
17
18
|
|
package/build/cjs/packages/aurora/src/components/image_picker/components/image_preview.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useRef } from 'react';
|
|
1
|
+
import React, { useRef, useState } from 'react';
|
|
2
2
|
import { useDropdownContext } from '../context/index.js';
|
|
3
3
|
import Input from '../../controls/components/input.js';
|
|
4
4
|
import { cssDropdownSearch } from '../css_classes.js';
|
|
@@ -19,8 +19,12 @@ onKeyUp }) => {
|
|
|
19
19
|
const { toggleDropdown, isOpen } = useDropdownContext();
|
|
20
20
|
const ref = useRef(null);
|
|
21
21
|
useKeyboardOpenClose(toggleDropdown, isOpen, ref);
|
|
22
|
+
const [value, setValue] = useState('');
|
|
23
|
+
const handleOnChange = (event) => {
|
|
24
|
+
setValue(event.target.value);
|
|
25
|
+
};
|
|
22
26
|
return (React.createElement("aside", { className: cssClasses[cssDropdownSearch], ref: ref },
|
|
23
|
-
React.createElement(Input, { placeholder: "Szukaj", padding: "small", onKeyUp: onKeyUp, autoFocus: true })));
|
|
27
|
+
React.createElement(Input, { placeholder: "Szukaj", padding: "small", onKeyUp: onKeyUp, onChange: handleOnChange, value: value, autoFocus: true })));
|
|
24
28
|
};
|
|
25
29
|
|
|
26
30
|
export default Search;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
@@ -4,6 +4,7 @@ import styles from '../../../css/image_picker/main.module.less.js';
|
|
|
4
4
|
import IconWrongFileFormat from '../../../assets/icon_wrong_file_format.js';
|
|
5
5
|
|
|
6
6
|
const ImagePreview = ({ isValid, file, onError, onLoad }) => {
|
|
7
|
+
console.log('ImagePreview', file.fileUrl);
|
|
7
8
|
return (React.createElement("div", { className: styles[CSS_CLASSES.imagePickerImagePreviewWrapper] }, isValid ? (React.createElement("img", { alt: "", src: (file === null || file === void 0 ? void 0 : file.fileUrl) || '', onError: onError, onLoad: onLoad, className: styles[CSS_CLASSES.imagePickerImagePreview] })) : (React.createElement(IconWrongFileFormat, { className: styles[CSS_CLASSES.imagePickerWrongFileFormatIcon] }))));
|
|
8
9
|
};
|
|
9
10
|
|
package/build/esm/packages/aurora/src/components/image_picker/components/image_preview.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|
|
1
|
+
{"version":3,"file":null,"sources":[null],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;"}
|