@mezzanine-ui/react 0.7.2 → 0.8.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/Form/useAutoCompleteValueControl.d.ts +2 -2
- package/Form/useAutoCompleteValueControl.js +9 -5
- package/Form/useInputWithTagsModeValue.d.ts +37 -0
- package/Form/useInputWithTagsModeValue.js +88 -0
- package/Form/useSelectValueControl.d.ts +25 -8
- package/Form/useSelectValueControl.js +38 -20
- package/Icon/Icon.js +1 -0
- package/Input/Input.d.ts +28 -0
- package/Input/Input.js +26 -3
- package/Select/AutoComplete.js +5 -3
- package/Select/Option.js +13 -1
- package/Select/Select.d.ts +90 -12
- package/Select/Select.js +8 -3
- package/Select/SelectTrigger.d.ts +37 -9
- package/Select/SelectTrigger.js +29 -5
- package/Select/typings.d.ts +2 -2
- package/Table/TableBodyRow.js +4 -3
- package/Table/sorting/useTableSorting.js +2 -1
- package/Upload/UploadInput.js +2 -0
- package/Upload/UploadPicture.d.ts +48 -0
- package/Upload/UploadPicture.js +52 -0
- package/Upload/UploadPictureBlock.d.ts +13 -0
- package/Upload/UploadPictureBlock.js +86 -0
- package/Upload/UploadPictureWall.d.ts +71 -0
- package/Upload/UploadPictureWall.js +156 -0
- package/Upload/UploadPictureWallItem.d.ts +13 -0
- package/Upload/UploadPictureWallItem.js +19 -0
- package/Upload/index.d.ts +3 -0
- package/Upload/index.js +3 -0
- package/index.d.ts +2 -3
- package/index.js +4 -1
- package/package.json +3 -3
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MouseEventHandler } from 'react';
|
|
2
|
+
import { ImageUploader } from '@mezzanine-ui/core/upload';
|
|
3
|
+
import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types';
|
|
4
|
+
export interface UploadPictureWallItemProps extends Omit<NativeElementPropsWithoutKeyAndRef<'div'>, 'value' | 'onChange' | 'children'> {
|
|
5
|
+
accept?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
imageLoader: ImageUploader;
|
|
8
|
+
multiple?: boolean;
|
|
9
|
+
onDelete?: MouseEventHandler;
|
|
10
|
+
onUpload?: (files: File[]) => void;
|
|
11
|
+
}
|
|
12
|
+
declare const UploadPictureWallItem: (props: UploadPictureWallItemProps) => JSX.Element;
|
|
13
|
+
export default UploadPictureWallItem;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useRef, useEffect } from 'react';
|
|
3
|
+
import { uploadPictureWallClasses } from '@mezzanine-ui/core/upload';
|
|
4
|
+
import UploadPictureBlock from './UploadPictureBlock.js';
|
|
5
|
+
import cx from 'clsx';
|
|
6
|
+
|
|
7
|
+
const UploadPictureWallItem = (props) => {
|
|
8
|
+
const { accept, disabled, imageLoader, multiple, onDelete, onUpload, } = props;
|
|
9
|
+
const loader = useRef(imageLoader);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
if (!loader.current.getPreview()) {
|
|
12
|
+
loader.current.setPreview();
|
|
13
|
+
}
|
|
14
|
+
}, []);
|
|
15
|
+
return (jsx("div", Object.assign({ className: cx(uploadPictureWallClasses.item) }, { children: jsx(UploadPictureBlock, { accept: accept, disabled: disabled, imageLoader: loader.current, multiple: multiple, onDelete: onDelete, onUpload: onUpload }, void 0) }), void 0));
|
|
16
|
+
};
|
|
17
|
+
var UploadPictureWallItem$1 = UploadPictureWallItem;
|
|
18
|
+
|
|
19
|
+
export { UploadPictureWallItem$1 as default };
|
package/Upload/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export type { UploadResultSize, UploadResultStatus, } from '@mezzanine-ui/core/upload';
|
|
2
2
|
export { UploadButtonProps, default as UploadButton } from './UploadButton';
|
|
3
|
+
export { UploadPictureControl, UploadPictureProps, default as UploadPicture } from './UploadPicture';
|
|
4
|
+
export { UploadPictureBlockProps, default as UploadPictureBlock } from './UploadPictureBlock';
|
|
5
|
+
export { UploadPictureWallControl, UploadPictureWallProps, default as UploadPictureWall } from './UploadPictureWall';
|
|
3
6
|
export { UploadResultProps, default as UploadResult } from './UploadResult';
|
package/Upload/index.js
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
export { default as UploadButton } from './UploadButton.js';
|
|
2
|
+
export { default as UploadPicture } from './UploadPicture.js';
|
|
3
|
+
export { default as UploadPictureBlock } from './UploadPictureBlock.js';
|
|
4
|
+
export { default as UploadPictureWall } from './UploadPictureWall.js';
|
|
2
5
|
export { default as UploadResult } from './UploadResult.js';
|
package/index.d.ts
CHANGED
|
@@ -43,8 +43,7 @@ export { DropdownProps, default as Dropdown, } from './Dropdown';
|
|
|
43
43
|
export { NavigationItem, NavigationItemProps, NavigationSubMenu, NavigationSubMenuProps, NavigationSubMenuChild, NavigationSubMenuChildren, NavigationChild, NavigationChildren, NavigationProps, default as Navigation, } from './Navigation';
|
|
44
44
|
export { AppBarChild, AppBarChildren, AppBarBrand, AppBarBrandProps, AppBarMain, AppBarMainProps, AppBarSupport, AppBarSupportProps, default as AppBar, } from './AppBar';
|
|
45
45
|
export { PageFooterProps, default as PageFooter, } from './PageFooter';
|
|
46
|
-
export { StepProps, default as
|
|
47
|
-
export { StepperProps, default as Stepper, } from './Stepper';
|
|
46
|
+
export { StepProps, StepperProps, Step, default as Stepper, } from './Stepper';
|
|
48
47
|
/**
|
|
49
48
|
* Data Display
|
|
50
49
|
*/
|
|
@@ -67,7 +66,7 @@ export { AutoComplete, AutoCompleteProps, SelectValue, TreeSelectOption, SelectC
|
|
|
67
66
|
export { SwitchSize, SwitchProps, default as Switch, } from './Switch';
|
|
68
67
|
export { TextareaSize, TextareaProps, default as Textarea, } from './Textarea';
|
|
69
68
|
export { TextFieldSize, TextFieldProps, default as TextField, } from './TextField';
|
|
70
|
-
export { UploadButtonProps, UploadButton, UploadResultProps, UploadResultSize, UploadResultStatus, UploadResult, } from './Upload';
|
|
69
|
+
export { UploadButtonProps, UploadButton, UploadPictureControl, UploadPictureProps, UploadPicture, UploadPictureWallControl, UploadPictureWallProps, UploadPictureWall, UploadResultProps, UploadResultSize, UploadResultStatus, UploadResult, } from './Upload';
|
|
71
70
|
export { useTabKeyClose, UsePickerDocumentEventCloseProps, usePickerDocumentEventClose, UsePickerValueProps, usePickerValue, UseRangePickerValueProps, useRangePickerValue, PickerTriggerProps, PickerTrigger, RangePickerTriggerProps, RangePickerTrigger, } from './Picker';
|
|
72
71
|
export { DatePickerCalendarProps, DatePickerCalendar, DatePickerProps, default as DatePicker, } from './DatePicker';
|
|
73
72
|
export { useDateRangeCalendarControls, UseDateRangePickerValueProps, useDateRangePickerValue, DateRangePickerCalendarProps, DateRangePickerCalendar, DateRangePickerProps, default as DateRangePicker, } from './DateRangePicker';
|
package/index.js
CHANGED
|
@@ -45,7 +45,8 @@ export { default as AppBarMain } from './AppBar/AppBarMain.js';
|
|
|
45
45
|
export { default as AppBarSupport } from './AppBar/AppBarSupport.js';
|
|
46
46
|
export { default as AppBar } from './AppBar/AppBar.js';
|
|
47
47
|
export { default as PageFooter } from './PageFooter/PageFooter.js';
|
|
48
|
-
export { default as Step
|
|
48
|
+
export { default as Step } from './Stepper/Step.js';
|
|
49
|
+
export { default as Stepper } from './Stepper/Stepper.js';
|
|
49
50
|
export { default as AccordionSummary } from './Accordion/AccordionSummary.js';
|
|
50
51
|
export { default as AccordionDetails } from './Accordion/AccordionDetails.js';
|
|
51
52
|
export { default as Accordion } from './Accordion/Accordion.js';
|
|
@@ -88,6 +89,8 @@ export { default as Switch } from './Switch/Switch.js';
|
|
|
88
89
|
export { default as Textarea } from './Textarea/Textarea.js';
|
|
89
90
|
export { default as TextField } from './TextField/TextField.js';
|
|
90
91
|
export { default as UploadButton } from './Upload/UploadButton.js';
|
|
92
|
+
export { default as UploadPicture } from './Upload/UploadPicture.js';
|
|
93
|
+
export { default as UploadPictureWall } from './Upload/UploadPictureWall.js';
|
|
91
94
|
export { default as UploadResult } from './Upload/UploadResult.js';
|
|
92
95
|
export { useTabKeyClose } from './Picker/useTabKeyClose.js';
|
|
93
96
|
export { usePickerDocumentEventClose } from './Picker/usePickerDocumentEventClose.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mezzanine-ui/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "React components for mezzanine-ui",
|
|
5
5
|
"author": "Mezzanine",
|
|
6
6
|
"repository": {
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"react-dom": "^17.0.1"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@mezzanine-ui/core": "^0.
|
|
36
|
-
"@mezzanine-ui/icons": "^0.
|
|
35
|
+
"@mezzanine-ui/core": "^0.8.1",
|
|
36
|
+
"@mezzanine-ui/icons": "^0.7.3",
|
|
37
37
|
"@mezzanine-ui/system": "^0.7.0",
|
|
38
38
|
"@popperjs/core": "^2.9.2",
|
|
39
39
|
"@types/react-transition-group": "4.4.1",
|