@webiny/ui 0.0.0-mt-2 → 0.0.0-unstable.06b2ede40f
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/Accordion/Accordion.d.ts +12 -8
- package/Accordion/Accordion.js +10 -28
- package/Accordion/Accordion.js.map +1 -0
- package/Accordion/AccordionItem.d.ts +100 -20
- package/Accordion/AccordionItem.js +34 -121
- package/Accordion/AccordionItem.js.map +1 -0
- package/Accordion/AccordionItemActions.d.ts +25 -0
- package/Accordion/AccordionItemActions.js +47 -0
- package/Accordion/AccordionItemActions.js.map +1 -0
- package/Accordion/index.js +3 -1
- package/Accordion/index.js.map +1 -0
- package/Alert/Alert.d.ts +7 -6
- package/Alert/Alert.js +17 -48
- package/Alert/Alert.js.map +1 -0
- package/Alert/index.js +3 -1
- package/Alert/index.js.map +1 -0
- package/AutoComplete/AutoComplete.d.ts +12 -30
- package/AutoComplete/AutoComplete.js +65 -292
- package/AutoComplete/AutoComplete.js.map +1 -0
- package/AutoComplete/MultiAutoComplete.d.ts +28 -54
- package/AutoComplete/MultiAutoComplete.js +79 -561
- package/AutoComplete/MultiAutoComplete.js.map +1 -0
- package/AutoComplete/index.js +3 -1
- package/AutoComplete/index.js.map +1 -0
- package/AutoComplete/types.d.ts +11 -10
- package/AutoComplete/types.js +3 -1
- package/AutoComplete/types.js.map +1 -0
- package/AutoComplete/utils.d.ts +11 -5
- package/AutoComplete/utils.js +8 -8
- package/AutoComplete/utils.js.map +1 -0
- package/Avatar/Avatar.d.ts +7 -12
- package/Avatar/Avatar.js +32 -75
- package/Avatar/Avatar.js.map +1 -0
- package/Avatar/index.js +3 -1
- package/Avatar/index.js.map +1 -0
- package/Button/Button.d.ts +40 -45
- package/Button/Button.js +13 -134
- package/Button/Button.js.map +1 -0
- package/Button/ButtonDefault.d.ts +7 -0
- package/Button/ButtonDefault.js +16 -0
- package/Button/ButtonDefault.js.map +1 -0
- package/Button/ButtonFloating.d.ts +7 -0
- package/Button/ButtonFloating.js +12 -0
- package/Button/ButtonFloating.js.map +1 -0
- package/Button/ButtonIcon.d.ts +9 -0
- package/Button/ButtonIcon.js +11 -0
- package/Button/ButtonIcon.js.map +1 -0
- package/Button/ButtonPrimary.d.ts +7 -0
- package/Button/ButtonPrimary.js +16 -0
- package/Button/ButtonPrimary.js.map +1 -0
- package/Button/ButtonSecondary.d.ts +7 -0
- package/Button/ButtonSecondary.js +16 -0
- package/Button/ButtonSecondary.js.map +1 -0
- package/Button/CopyButton.d.ts +17 -0
- package/Button/CopyButton.js +12 -0
- package/Button/CopyButton.js.map +1 -0
- package/Button/IconButton.d.ts +17 -0
- package/Button/IconButton.js +15 -0
- package/Button/IconButton.js.map +1 -0
- package/Button/index.d.ts +7 -2
- package/Button/index.js +9 -2
- package/Button/index.js.map +1 -0
- package/Button/useMappedButtonProps.d.ts +14 -0
- package/Button/useMappedButtonProps.js +21 -0
- package/Button/useMappedButtonProps.js.map +1 -0
- package/Carousel/Carousel.d.ts +7 -16
- package/Carousel/Carousel.js +12 -46
- package/Carousel/Carousel.js.map +1 -0
- package/Carousel/index.js +3 -1
- package/Carousel/index.js.map +1 -0
- package/Checkbox/Checkbox.d.ts +13 -17
- package/Checkbox/Checkbox.js +33 -71
- package/Checkbox/Checkbox.js.map +1 -0
- package/Checkbox/CheckboxGroup.d.ts +9 -5
- package/Checkbox/CheckboxGroup.js +47 -61
- package/Checkbox/CheckboxGroup.js.map +1 -0
- package/Checkbox/index.js +3 -1
- package/Checkbox/index.js.map +1 -0
- package/Chips/Chip.d.ts +35 -8
- package/Chips/Chip.js +50 -9
- package/Chips/Chip.js.map +1 -0
- package/Chips/Chips.d.ts +9 -5
- package/Chips/Chips.js +17 -16
- package/Chips/Chips.js.map +1 -0
- package/Chips/index.d.ts +0 -1
- package/Chips/index.js +2 -1
- package/Chips/index.js.map +1 -0
- package/CodeEditor/CodeEditor.d.ts +9 -17
- package/CodeEditor/CodeEditor.js +14 -86
- package/CodeEditor/CodeEditor.js.map +1 -0
- package/CodeEditor/index.js +3 -1
- package/CodeEditor/index.js.map +1 -0
- package/ColorPicker/ColorPicker.d.ts +8 -19
- package/ColorPicker/ColorPicker.js +26 -135
- package/ColorPicker/ColorPicker.js.map +1 -0
- package/ColorPicker/index.js +3 -1
- package/ColorPicker/index.js.map +1 -0
- package/ConfirmationDialog/ConfirmationDialog.d.ts +15 -15
- package/ConfirmationDialog/ConfirmationDialog.js +80 -153
- package/ConfirmationDialog/ConfirmationDialog.js.map +1 -0
- package/ConfirmationDialog/index.js +3 -1
- package/ConfirmationDialog/index.js.map +1 -0
- package/ConfirmationDialog/withConfirmation.d.ts +6 -6
- package/ConfirmationDialog/withConfirmation.js +12 -11
- package/ConfirmationDialog/withConfirmation.js.map +1 -0
- package/DataTable/DataTable.d.ts +57 -0
- package/DataTable/DataTable.js +65 -0
- package/DataTable/DataTable.js.map +1 -0
- package/DataTable/index.d.ts +1 -0
- package/DataTable/index.js +3 -0
- package/DataTable/index.js.map +1 -0
- package/DateTime/Date.d.ts +7 -0
- package/DateTime/Date.js +33 -0
- package/DateTime/Date.js.map +1 -0
- package/DateTime/index.d.ts +1 -0
- package/DateTime/index.js +3 -0
- package/DateTime/index.js.map +1 -0
- package/DelayedOnChange/index.d.ts +7 -0
- package/DelayedOnChange/index.js +9 -0
- package/DelayedOnChange/index.js.map +1 -0
- package/Dialog/Dialog.d.ts +51 -72
- package/Dialog/Dialog.js +73 -83
- package/Dialog/Dialog.js.map +1 -0
- package/Dialog/index.js +3 -1
- package/Dialog/index.js.map +1 -0
- package/Drawer/Drawer.d.ts +32 -23
- package/Drawer/Drawer.js +44 -12
- package/Drawer/Drawer.js.map +1 -0
- package/Drawer/index.js +3 -1
- package/Drawer/index.js.map +1 -0
- package/DynamicFieldset/index.d.ts +7 -1
- package/DynamicFieldset/index.js +9 -1
- package/DynamicFieldset/index.js.map +1 -0
- package/Elevation/Elevation.d.ts +8 -4
- package/Elevation/Elevation.js +15 -10
- package/Elevation/Elevation.js.map +1 -0
- package/Elevation/index.js +3 -1
- package/Elevation/index.js.map +1 -0
- package/FormElementMessage/FormElementMessage.d.ts +7 -3
- package/FormElementMessage/FormElementMessage.js +22 -11
- package/FormElementMessage/FormElementMessage.js.map +1 -0
- package/FormElementMessage/index.js +3 -1
- package/FormElementMessage/index.js.map +1 -0
- package/FullName/FullName.d.ts +5 -1
- package/FullName/FullName.js +12 -9
- package/FullName/FullName.js.map +1 -0
- package/FullName/index.js +3 -1
- package/FullName/index.js.map +1 -0
- package/Grid/Grid.d.ts +37 -12
- package/Grid/Grid.js +39 -10
- package/Grid/Grid.js.map +1 -0
- package/Grid/index.js +3 -1
- package/Grid/index.js.map +1 -0
- package/Helpers/ClassNames.d.ts +4 -3
- package/Helpers/ClassNames.js +14 -17
- package/Helpers/ClassNames.js.map +1 -0
- package/Helpers/index.js +3 -1
- package/Helpers/index.js.map +1 -0
- package/Icon/Icon.d.ts +11 -9
- package/Icon/Icon.js +10 -22
- package/Icon/Icon.js.map +1 -0
- package/Icon/index.js +3 -1
- package/Icon/index.js.map +1 -0
- package/Image/index.d.ts +6 -1
- package/Image/index.js +9 -1
- package/Image/index.js.map +1 -0
- package/ImageEditor/ImageEditor.d.ts +24 -41
- package/ImageEditor/ImageEditor.js +12 -333
- package/ImageEditor/ImageEditor.js.map +1 -0
- package/ImageEditor/index.js +3 -1
- package/ImageEditor/index.js.map +1 -0
- package/ImageUpload/Image.d.ts +12 -18
- package/ImageUpload/Image.js +14 -119
- package/ImageUpload/Image.js.map +1 -0
- package/ImageUpload/ImageEditorDialog.d.ts +14 -12
- package/ImageUpload/ImageEditorDialog.js +14 -94
- package/ImageUpload/ImageEditorDialog.js.map +1 -0
- package/ImageUpload/MultiImageUpload.d.ts +13 -47
- package/ImageUpload/MultiImageUpload.js +14 -383
- package/ImageUpload/MultiImageUpload.js.map +1 -0
- package/ImageUpload/SingleImageUpload.d.ts +12 -48
- package/ImageUpload/SingleImageUpload.js +14 -224
- package/ImageUpload/SingleImageUpload.js.map +1 -0
- package/ImageUpload/index.d.ts +2 -2
- package/ImageUpload/index.js +4 -2
- package/ImageUpload/index.js.map +1 -0
- package/Input/Input.d.ts +64 -22
- package/Input/Input.js +79 -142
- package/Input/Input.js.map +1 -0
- package/Input/index.js +3 -1
- package/Input/index.js.map +1 -0
- package/List/CollapsibleList/index.d.ts +20 -6
- package/List/CollapsibleList/index.js +11 -6
- package/List/CollapsibleList/index.js.map +1 -0
- package/List/DataList/DataList.d.ts +16 -61
- package/List/DataList/DataList.js +18 -312
- package/List/DataList/DataList.js.map +1 -0
- package/List/DataList/DataListModalOverlay/index.d.ts +12 -3
- package/List/DataList/DataListModalOverlay/index.js +16 -3
- package/List/DataList/DataListModalOverlay/index.js.map +1 -0
- package/List/DataList/DataListWithSections.d.ts +21 -0
- package/List/DataList/DataListWithSections.js +18 -0
- package/List/DataList/DataListWithSections.js.map +1 -0
- package/List/DataList/icons/index.d.ts +1 -15
- package/List/DataList/icons/index.js +3 -55
- package/List/DataList/icons/index.js.map +1 -0
- package/List/DataList/index.d.ts +1 -1
- package/List/DataList/index.js +4 -2
- package/List/DataList/index.js.map +1 -0
- package/List/DataList/types.d.ts +1 -28
- package/List/DataList/types.js +3 -1
- package/List/DataList/types.js.map +1 -0
- package/List/List/List.d.ts +51 -0
- package/List/List/List.js +16 -0
- package/List/List/List.js.map +1 -0
- package/List/List/ListItem.d.ts +61 -0
- package/List/List/ListItem.js +91 -0
- package/List/List/ListItem.js.map +1 -0
- package/List/List/ListItemAction.d.ts +9 -0
- package/List/List/ListItemAction.js +15 -0
- package/List/List/ListItemAction.js.map +1 -0
- package/List/List/ListItemGraphic.d.ts +18 -0
- package/List/List/ListItemGraphic.js +26 -0
- package/List/List/ListItemGraphic.js.map +1 -0
- package/List/List/ListItemMeta.d.ts +26 -0
- package/List/List/ListItemMeta.js +24 -0
- package/List/List/ListItemMeta.js.map +1 -0
- package/List/List/ListItemText.d.ts +42 -0
- package/List/List/ListItemText.js +51 -0
- package/List/List/ListItemText.js.map +1 -0
- package/List/List/index.d.ts +6 -0
- package/List/List/index.js +8 -0
- package/List/List/index.js.map +1 -0
- package/List/index.d.ts +2 -1
- package/List/index.js +5 -2
- package/List/index.js.map +1 -0
- package/Menu/Menu.d.ts +58 -28
- package/Menu/Menu.js +74 -119
- package/Menu/Menu.js.map +1 -0
- package/Menu/index.js +3 -1
- package/Menu/index.js.map +1 -0
- package/Mosaic/Mosaic.d.ts +7 -16
- package/Mosaic/Mosaic.js +10 -18
- package/Mosaic/Mosaic.js.map +1 -0
- package/Mosaic/index.js +3 -1
- package/Mosaic/index.js.map +1 -0
- package/Progress/CircularProgress.d.ts +13 -13
- package/Progress/CircularProgress.js +16 -60
- package/Progress/CircularProgress.js.map +1 -0
- package/Progress/index.d.ts +1 -1
- package/Progress/index.js +3 -1
- package/Progress/index.js.map +1 -0
- package/README.md +1 -3
- package/Radio/Radio.d.ts +8 -13
- package/Radio/Radio.js +35 -64
- package/Radio/Radio.js.map +1 -0
- package/Radio/RadioGroup.d.ts +10 -11
- package/Radio/RadioGroup.js +38 -54
- package/Radio/RadioGroup.js.map +1 -0
- package/Radio/index.js +3 -1
- package/Radio/index.js.map +1 -0
- package/RichTextEditor/RichTextEditor.d.ts +10 -25
- package/RichTextEditor/RichTextEditor.js +15 -134
- package/RichTextEditor/RichTextEditor.js.map +1 -0
- package/RichTextEditor/index.d.ts +3 -1
- package/RichTextEditor/index.js +3 -1
- package/RichTextEditor/index.js.map +1 -0
- package/Ripple/Ripple.d.ts +6 -6
- package/Ripple/Ripple.js +7 -10
- package/Ripple/Ripple.js.map +1 -0
- package/Ripple/index.js +3 -1
- package/Ripple/index.js.map +1 -0
- package/Scrollbar/Scrollbar.d.ts +6 -9
- package/Scrollbar/Scrollbar.js +8 -6
- package/Scrollbar/Scrollbar.js.map +1 -0
- package/Scrollbar/index.js +3 -1
- package/Scrollbar/index.js.map +1 -0
- package/Section/index.d.ts +10 -6
- package/Section/index.js +14 -46
- package/Section/index.js.map +1 -0
- package/Select/Select.d.ts +47 -14
- package/Select/Select.js +119 -48
- package/Select/Select.js.map +1 -0
- package/Select/index.js +3 -1
- package/Select/index.js.map +1 -0
- package/Skeleton/Skeleton.d.ts +27 -0
- package/Skeleton/Skeleton.js +19 -0
- package/Skeleton/Skeleton.js.map +1 -0
- package/Skeleton/index.d.ts +1 -0
- package/Skeleton/index.js +3 -0
- package/Skeleton/index.js.map +1 -0
- package/Slider/Slider.d.ts +13 -23
- package/Slider/Slider.js +46 -80
- package/Slider/Slider.js.map +1 -0
- package/Slider/index.js +3 -1
- package/Slider/index.js.map +1 -0
- package/Snackbar/Snackbar.d.ts +45 -12
- package/Snackbar/Snackbar.js +29 -51
- package/Snackbar/Snackbar.js.map +1 -0
- package/Snackbar/index.js +3 -1
- package/Snackbar/index.js.map +1 -0
- package/Switch/Switch.d.ts +22 -13
- package/Switch/Switch.js +25 -62
- package/Switch/Switch.js.map +1 -0
- package/Switch/index.js +3 -1
- package/Switch/index.js.map +1 -0
- package/Tabs/Tab.d.ts +30 -4
- package/Tabs/Tab.js +26 -9
- package/Tabs/Tab.js.map +1 -0
- package/Tabs/Tabs.d.ts +23 -22
- package/Tabs/Tabs.js +61 -138
- package/Tabs/Tabs.js.map +1 -0
- package/Tabs/index.js +3 -1
- package/Tabs/index.js.map +1 -0
- package/Tags/Tags.d.ts +18 -25
- package/Tags/Tags.js +12 -148
- package/Tags/Tags.js.map +1 -0
- package/Tags/index.js +3 -1
- package/Tags/index.js.map +1 -0
- package/TimeAgo/index.d.ts +7 -0
- package/TimeAgo/index.js +8 -0
- package/TimeAgo/index.js.map +1 -0
- package/Tooltip/Tooltip.d.ts +7 -18
- package/Tooltip/Tooltip.js +62 -57
- package/Tooltip/Tooltip.js.map +1 -0
- package/Tooltip/index.js +3 -1
- package/Tooltip/index.js.map +1 -0
- package/TopAppBar/TopAppBar.d.ts +28 -4
- package/TopAppBar/TopAppBar.js +34 -9
- package/TopAppBar/TopAppBar.js.map +1 -0
- package/TopAppBar/TopAppBarActionItem.d.ts +6 -4
- package/TopAppBar/TopAppBarActionItem.js +11 -6
- package/TopAppBar/TopAppBarActionItem.js.map +1 -0
- package/TopAppBar/TopAppBarNavigationIcon.d.ts +6 -4
- package/TopAppBar/TopAppBarNavigationIcon.js +11 -6
- package/TopAppBar/TopAppBarNavigationIcon.js.map +1 -0
- package/TopAppBar/TopAppBarPrimary.d.ts +8 -4
- package/TopAppBar/TopAppBarPrimary.js +12 -9
- package/TopAppBar/TopAppBarPrimary.js.map +1 -0
- package/TopAppBar/TopAppBarSecondary.d.ts +8 -4
- package/TopAppBar/TopAppBarSecondary.js +13 -11
- package/TopAppBar/TopAppBarSecondary.js.map +1 -0
- package/TopAppBar/TopAppBarSection.d.ts +13 -4
- package/TopAppBar/TopAppBarSection.js +9 -11
- package/TopAppBar/TopAppBarSection.js.map +1 -0
- package/TopAppBar/TopAppBarTitle.d.ts +8 -5
- package/TopAppBar/TopAppBarTitle.js +10 -11
- package/TopAppBar/TopAppBarTitle.js.map +1 -0
- package/TopAppBar/index.js +3 -1
- package/TopAppBar/index.js.map +1 -0
- package/Typography/Typography.d.ts +12 -7
- package/Typography/Typography.js +33 -7
- package/Typography/Typography.js.map +1 -0
- package/Typography/index.js +3 -1
- package/Typography/index.js.map +1 -0
- package/package.json +24 -103
- package/styles.scss +15 -42
- package/types.d.ts +6 -6
- package/types.js +3 -1
- package/types.js.map +1 -0
- package/Accordion/Accordion.stories.d.ts +0 -1
- package/Accordion/Accordion.stories.js +0 -43
- package/Accordion/README.md +0 -11
- package/Accordion/icons/round-keyboard_arrow_down-24px.svg +0 -16
- package/Accordion/icons/round-keyboard_arrow_up-24px.svg +0 -16
- package/Accordion/icons/round-settings-24px.svg +0 -21
- package/Alert/Alert.stories.d.ts +0 -1
- package/Alert/Alert.stories.js +0 -29
- package/Alert/README.md +0 -11
- package/AutoComplete/AutoComplete.stories.d.ts +0 -1
- package/AutoComplete/AutoComplete.stories.js +0 -76
- package/AutoComplete/AutoCompleteReadme.md +0 -11
- package/AutoComplete/MultiAutoComplete.stories.d.ts +0 -1
- package/AutoComplete/MultiAutoComplete.stories.js +0 -132
- package/AutoComplete/MultiAutoCompleteReadme.md +0 -11
- package/AutoComplete/icons/baseline-close-24px.svg +0 -4
- package/AutoComplete/icons/delete.svg +0 -12
- package/AutoComplete/icons/navigate_before-24px.svg +0 -1
- package/AutoComplete/icons/navigate_next-24px.svg +0 -1
- package/AutoComplete/icons/reorder_black_24dp.svg +0 -1
- package/AutoComplete/icons/skip_next-24px.svg +0 -1
- package/AutoComplete/icons/skip_previous-24px.svg +0 -1
- package/AutoComplete/icons/spinner.svg +0 -3
- package/AutoComplete/styles.d.ts +0 -2
- package/AutoComplete/styles.js +0 -37
- package/Avatar/Avatar.stories.d.ts +0 -1
- package/Avatar/Avatar.stories.js +0 -27
- package/Avatar/README.md +0 -11
- package/Button/Button.stories.d.ts +0 -1
- package/Button/Button.stories.js +0 -53
- package/Button/CopyButton/CopyButton.d.ts +0 -14
- package/Button/CopyButton/CopyButton.js +0 -32
- package/Button/CopyButton/CopyButton.stories.d.ts +0 -1
- package/Button/CopyButton/CopyButton.stories.js +0 -18
- package/Button/CopyButton/README.md +0 -11
- package/Button/IconButton/IconButton.d.ts +0 -39
- package/Button/IconButton/IconButton.js +0 -31
- package/Button/IconButton/IconButton.stories.d.ts +0 -1
- package/Button/IconButton/IconButton.stories.js +0 -38
- package/Button/IconButton/README.md +0 -15
- package/Button/README.md +0 -28
- package/Button/assets/baseline-cloud_done-24px.svg +0 -3
- package/Button/assets/file_copy-24px.svg +0 -1
- package/Button/assets/round-more_vert-24px.svg +0 -12
- package/Carousel/Carouser.stories.d.ts +0 -1
- package/Carousel/Carouser.stories.js +0 -29
- package/Carousel/README.md +0 -15
- package/Checkbox/Checkbox.stories.d.ts +0 -1
- package/Checkbox/Checkbox.stories.js +0 -28
- package/Checkbox/Checkbox.styles.d.ts +0 -6
- package/Checkbox/Checkbox.styles.js +0 -15
- package/Checkbox/CheckboxGroup.stories.d.ts +0 -1
- package/Checkbox/CheckboxGroup.stories.js +0 -55
- package/Checkbox/README_Checkbox.md +0 -15
- package/Checkbox/README_CheckboxGroup.md +0 -19
- package/Chips/ChipIcon.d.ts +0 -4
- package/Chips/ChipIcon.js +0 -8
- package/Chips/Chips.stories.d.ts +0 -1
- package/Chips/Chips.stories.js +0 -25
- package/Chips/README.md +0 -15
- package/Chips/icons/baseline-done-24px.svg +0 -4
- package/Chips/icons/baseline-email-24px.svg +0 -3
- package/Chips/styles.d.ts +0 -2
- package/Chips/styles.js +0 -17
- package/CodeEditor/CodeEditor.stories.d.ts +0 -2
- package/CodeEditor/CodeEditor.stories.js +0 -32
- package/CodeEditor/README.md +0 -21
- package/ColorPicker/ColorPicker.stories.d.ts +0 -1
- package/ColorPicker/ColorPicker.stories.js +0 -30
- package/ColorPicker/README.md +0 -11
- package/ConfirmationDialog/ConfirmationDialog.stories.d.ts +0 -1
- package/ConfirmationDialog/ConfirmationDialog.stories.js +0 -30
- package/ConfirmationDialog/README.md +0 -11
- package/Dialog/Dialog.stories.d.ts +0 -1
- package/Dialog/Dialog.stories.js +0 -30
- package/Dialog/README.md +0 -23
- package/Drawer/Drawer.stories.d.ts +0 -1
- package/Drawer/Drawer.stories.js +0 -23
- package/Drawer/README.md +0 -15
- package/DynamicFieldset/Fieldset.d.ts +0 -41
- package/DynamicFieldset/Fieldset.js +0 -143
- package/Elevation/Elevation.stories.d.ts +0 -1
- package/Elevation/Elevation.stories.js +0 -29
- package/Elevation/README.md +0 -15
- package/FullName/README.md +0 -11
- package/Grid/Grid.stories.d.ts +0 -1
- package/Grid/Grid.stories.js +0 -31
- package/Grid/README.md +0 -15
- package/Icon/Icon.stories.d.ts +0 -1
- package/Icon/Icon.stories.js +0 -27
- package/Icon/README.md +0 -11
- package/Icon/svg/baseline-autorenew-24px.svg +0 -4
- package/Icon/svg/baseline-cloud_done-24px.svg +0 -4
- package/Icon/svg/baseline-delete-24px.svg +0 -4
- package/Icon/svg/baseline-done-24px.svg +0 -4
- package/Image/Image.d.ts +0 -6
- package/Image/Image.js +0 -18
- package/Image/Image.stories.d.ts +0 -1
- package/Image/Image.stories.js +0 -21
- package/Image/README.md +0 -12
- package/ImageEditor/toolbar/crop.d.ts +0 -4
- package/ImageEditor/toolbar/crop.js +0 -69
- package/ImageEditor/toolbar/filter.d.ts +0 -3
- package/ImageEditor/toolbar/filter.js +0 -209
- package/ImageEditor/toolbar/flip.d.ts +0 -4
- package/ImageEditor/toolbar/flip.js +0 -96
- package/ImageEditor/toolbar/icons/crop.svg +0 -4
- package/ImageEditor/toolbar/icons/draw.svg +0 -4
- package/ImageEditor/toolbar/icons/filter.svg +0 -4
- package/ImageEditor/toolbar/icons/flip.svg +0 -4
- package/ImageEditor/toolbar/icons/index.d.ts +0 -8
- package/ImageEditor/toolbar/icons/index.js +0 -8
- package/ImageEditor/toolbar/icons/redo.svg +0 -4
- package/ImageEditor/toolbar/icons/rotateLeft.svg +0 -4
- package/ImageEditor/toolbar/icons/rotateRight.svg +0 -4
- package/ImageEditor/toolbar/icons/undo.svg +0 -4
- package/ImageEditor/toolbar/index.d.ts +0 -4
- package/ImageEditor/toolbar/index.js +0 -4
- package/ImageEditor/toolbar/rotate.d.ts +0 -4
- package/ImageEditor/toolbar/rotate.js +0 -145
- package/ImageEditor/toolbar/types.d.ts +0 -22
- package/ImageEditor/toolbar/types.js +0 -1
- package/ImageUpload/MultiImageUpload.stories.d.ts +0 -1
- package/ImageUpload/MultiImageUpload.stories.js +0 -66
- package/ImageUpload/README.md +0 -11
- package/ImageUpload/SingleImageUpload.stories.d.ts +0 -1
- package/ImageUpload/SingleImageUpload.stories.js +0 -43
- package/ImageUpload/icons/round-add_photo_alternate-24px.svg +0 -23
- package/ImageUpload/icons/round-close-24px.svg +0 -13
- package/ImageUpload/icons/round-edit-24px.svg +0 -4
- package/ImageUpload/image.jpeg +0 -0
- package/ImageUpload/styled.d.ts +0 -15
- package/ImageUpload/styled.js +0 -122
- package/Input/Input.stories.d.ts +0 -1
- package/Input/Input.stories.js +0 -104
- package/Input/README.md +0 -16
- package/Input/__tests__/Input.test.d.ts +0 -1
- package/Input/__tests__/Input.test.js +0 -113
- package/Input/svg/baseline-autorenew-24px.svg +0 -4
- package/Input/svg/baseline-cloud_done-24px.svg +0 -4
- package/Input/svg/baseline-delete-24px.svg +0 -4
- package/Input/svg/baseline-done-24px.svg +0 -4
- package/List/CollapsibleList/CollapsibleList.stories.d.ts +0 -1
- package/List/CollapsibleList/CollapsibleList.stories.js +0 -26
- package/List/CollapsibleList/README.md +0 -11
- package/List/CollapsibleList/index.css +0 -31
- package/List/DataList/DataList.stories.d.ts +0 -1
- package/List/DataList/DataList.stories.js +0 -107
- package/List/DataList/DataListModalOverlay/DataListModalOverlay.d.ts +0 -18
- package/List/DataList/DataListModalOverlay/DataListModalOverlay.js +0 -87
- package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.d.ts +0 -6
- package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.js +0 -21
- package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.d.ts +0 -6
- package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.js +0 -18
- package/List/DataList/Loader.d.ts +0 -3
- package/List/DataList/Loader.js +0 -57
- package/List/DataList/NoData.d.ts +0 -3
- package/List/DataList/NoData.js +0 -19
- package/List/DataList/README.md +0 -17
- package/List/DataList/icons/baseline-autorenew-24px.svg +0 -4
- package/List/DataList/icons/baseline-delete-24px.svg +0 -4
- package/List/DataList/icons/baseline-edit-24px.svg +0 -4
- package/List/DataList/icons/baseline-navigate_before-24px.svg +0 -4
- package/List/DataList/icons/baseline-navigate_next-24px.svg +0 -4
- package/List/DataList/icons/baseline-sort-24px.svg +0 -4
- package/List/DataList/icons/baseline-tune-24px.svg +0 -4
- package/List/DataList/icons/filter_alt-24px.svg +0 -1
- package/List/DataList/icons/round-more_vert-24px.svg +0 -12
- package/List/List.d.ts +0 -131
- package/List/List.js +0 -167
- package/List/List.stories.d.ts +0 -1
- package/List/List.stories.js +0 -47
- package/List/README.md +0 -22
- package/List/icons/baseline-autorenew-24px.svg +0 -4
- package/List/icons/baseline-cloud_done-24px.svg +0 -4
- package/List/icons/baseline-delete-24px.svg +0 -4
- package/List/icons/baseline-done-24px.svg +0 -4
- package/List/icons/baseline-email-24px.svg +0 -4
- package/List/icons/index.d.ts +0 -3
- package/List/icons/index.js +0 -3
- package/Menu/Menu.stories.d.ts +0 -1
- package/Menu/Menu.stories.js +0 -29
- package/Menu/README.md +0 -15
- package/Mosaic/Mosaic.stories.d.ts +0 -1
- package/Mosaic/Mosaic.stories.js +0 -75
- package/Mosaic/README.md +0 -15
- package/Progress/README.md +0 -19
- package/Progress/svg/circularProgress.svg +0 -3
- package/Radio/README.md +0 -17
- package/Radio/Radio.styles.d.ts +0 -6
- package/Radio/Radio.styles.js +0 -15
- package/Radio/RadioGroup.stories.d.ts +0 -1
- package/Radio/RadioGroup.stories.js +0 -55
- package/RichTextEditor/README.md +0 -10
- package/RichTextEditor/RichTextEditor.stories.d.ts +0 -1
- package/RichTextEditor/RichTextEditor.stories.js +0 -19
- package/RichTextEditor/createPropsFromConfig.d.ts +0 -5
- package/RichTextEditor/createPropsFromConfig.js +0 -18
- package/Ripple/README.md +0 -15
- package/Ripple/Ripple.stories.d.ts +0 -1
- package/Ripple/Ripple.stories.js +0 -71
- package/Ripple/svg/baseline-autorenew-24px.svg +0 -4
- package/Ripple/svg/baseline-cloud_done-24px.svg +0 -4
- package/Ripple/svg/baseline-delete-24px.svg +0 -4
- package/Ripple/svg/baseline-done-24px.svg +0 -4
- package/Scrollbar/README.md +0 -15
- package/Scrollbar/Scrollbar.stories.d.ts +0 -1
- package/Scrollbar/Scrollbar.stories.js +0 -20
- package/Section/README.md +0 -11
- package/Section/Section.stories.d.ts +0 -1
- package/Section/Section.stories.js +0 -25
- package/Select/README.md +0 -15
- package/Select/Select.stories.d.ts +0 -1
- package/Select/Select.stories.js +0 -46
- package/Slider/README.md +0 -15
- package/Slider/Slider.stories.d.ts +0 -1
- package/Slider/Slider.stories.js +0 -44
- package/Snackbar/README.md +0 -15
- package/Snackbar/Snackbar.stories.d.ts +0 -1
- package/Snackbar/Snackbar.stories.js +0 -77
- package/Switch/README.md +0 -15
- package/Switch/Switch.stories.d.ts +0 -1
- package/Switch/Switch.stories.js +0 -32
- package/Tabs/Tabs.stories.d.ts +0 -1
- package/Tabs/Tabs.stories.js +0 -41
- package/Tabs/svg/baseline-autorenew-24px.svg +0 -4
- package/Tabs/svg/baseline-cloud_done-24px.svg +0 -4
- package/Tabs/svg/baseline-delete-24px.svg +0 -4
- package/Tabs/svg/baseline-done-24px.svg +0 -4
- package/Tags/README.md +0 -15
- package/Tags/Tags.stories.d.ts +0 -1
- package/Tags/Tags.stories.js +0 -32
- package/Tags/icons/baseline-close-24px.svg +0 -4
- package/Tooltip/README.md +0 -15
- package/Tooltip/Tooltip.stories.d.ts +0 -1
- package/Tooltip/Tooltip.stories.js +0 -17
- package/Tooltip/style.scss +0 -97
- package/TopAppBar/README.md +0 -20
- package/TopAppBar/TopAppBar.stories.d.ts +0 -1
- package/TopAppBar/TopAppBar.stories.js +0 -56
- package/TopAppBar/icons/baseline-autorenew-24px.svg +0 -4
- package/TopAppBar/icons/baseline-cloud_done-24px.svg +0 -4
- package/TopAppBar/icons/baseline-delete-24px.svg +0 -4
- package/TopAppBar/icons/baseline-email-24px.svg +0 -4
- package/TopAppBar/icons/baseline-menu-24px.svg +0 -4
- package/TopProgressBar/README.md +0 -11
- package/TopProgressBar/TopProgressBar.d.ts +0 -15
- package/TopProgressBar/TopProgressBar.js +0 -9
- package/TopProgressBar/TopProgressBar.stories.d.ts +0 -1
- package/TopProgressBar/TopProgressBar.stories.js +0 -22
- package/TopProgressBar/hoc/index.d.ts +0 -1
- package/TopProgressBar/hoc/index.js +0 -1
- package/TopProgressBar/hoc/withTopProgressBar.d.ts +0 -3
- package/TopProgressBar/hoc/withTopProgressBar.js +0 -23
- package/TopProgressBar/index.d.ts +0 -1
- package/TopProgressBar/index.js +0 -1
- package/TopProgressBar/style.scss +0 -21
- package/Typography/README.md +0 -15
- package/Typography/Typography.stories.d.ts +0 -1
- package/Typography/Typography.stories.js +0 -67
- package/rmwc/textfield/code/index.d.ts +0 -135
- package/rmwc/textfield/code/index.js +0 -571
- package/rmwc/textfield/next/index.d.ts +0 -135
- package/rmwc/textfield/next/index.js +0 -560
- package/rmwc/textfield/package.json +0 -45
|
@@ -1,224 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import classNames from "classnames";
|
|
16
|
-
import Image from "./Image";
|
|
17
|
-
import ImageEditorDialog from "./ImageEditorDialog";
|
|
18
|
-
var ImageUploadWrapper = /*#__PURE__*/styled("div", {
|
|
19
|
-
target: "e96x95k0",
|
|
20
|
-
label: "ImageUploadWrapper"
|
|
21
|
-
})({
|
|
22
|
-
position: "relative",
|
|
23
|
-
".disabled": {
|
|
24
|
-
opacity: 0.75,
|
|
25
|
-
pointerEvents: "none"
|
|
26
|
-
},
|
|
27
|
-
".mdc-floating-label--float-above": {
|
|
28
|
-
transform: "scale(0.75)",
|
|
29
|
-
top: 10,
|
|
30
|
-
left: 10,
|
|
31
|
-
color: "var(--mdc-theme-text-secondary-on-background)"
|
|
32
|
-
},
|
|
33
|
-
".mdc-text-field-helper-text": {
|
|
34
|
-
color: "var(--mdc-theme-text-secondary-on-background)"
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
// Do not apply editing for following image types.
|
|
38
|
-
var noImageEditingTypes = ["image/svg+xml", "image/gif"];
|
|
39
|
-
export var SingleImageUpload = /*#__PURE__*/function (_React$Component) {
|
|
40
|
-
_inherits(SingleImageUpload, _React$Component);
|
|
41
|
-
|
|
42
|
-
var _super = _createSuper(SingleImageUpload);
|
|
43
|
-
|
|
44
|
-
function SingleImageUpload() {
|
|
45
|
-
var _this;
|
|
46
|
-
|
|
47
|
-
_classCallCheck(this, SingleImageUpload);
|
|
48
|
-
|
|
49
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
50
|
-
args[_key] = arguments[_key];
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
54
|
-
|
|
55
|
-
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
56
|
-
loading: false,
|
|
57
|
-
error: null,
|
|
58
|
-
imageEditor: {
|
|
59
|
-
open: false,
|
|
60
|
-
image: null
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
_defineProperty(_assertThisInitialized(_this), "handleFiles", function (images) {
|
|
65
|
-
var _this$props = _this.props,
|
|
66
|
-
onChange = _this$props.onChange,
|
|
67
|
-
imageEditor = _this$props.imageEditor;
|
|
68
|
-
var image = {
|
|
69
|
-
name: images[0].name,
|
|
70
|
-
type: images[0].type,
|
|
71
|
-
size: images[0].size,
|
|
72
|
-
src: images[0].src.base64
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
_this.setState({
|
|
76
|
-
error: null
|
|
77
|
-
}, function () {
|
|
78
|
-
if (imageEditor && !noImageEditingTypes.includes(image.type)) {
|
|
79
|
-
_this.setState({
|
|
80
|
-
imageEditor: {
|
|
81
|
-
image: image,
|
|
82
|
-
open: true
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
} else {
|
|
86
|
-
onChange && onChange(image);
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
_defineProperty(_assertThisInitialized(_this), "handleErrors", function (errors) {
|
|
92
|
-
var _errors = _slicedToArray(errors, 1),
|
|
93
|
-
error = _errors[0];
|
|
94
|
-
|
|
95
|
-
_this.setState({
|
|
96
|
-
error: error
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
return _this;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
_createClass(SingleImageUpload, [{
|
|
104
|
-
key: "render",
|
|
105
|
-
value: function render() {
|
|
106
|
-
var _this2 = this;
|
|
107
|
-
|
|
108
|
-
var _this$props2 = this.props,
|
|
109
|
-
className = _this$props2.className,
|
|
110
|
-
value = _this$props2.value,
|
|
111
|
-
validation = _this$props2.validation,
|
|
112
|
-
label = _this$props2.label,
|
|
113
|
-
description = _this$props2.description,
|
|
114
|
-
accept = _this$props2.accept,
|
|
115
|
-
maxSize = _this$props2.maxSize,
|
|
116
|
-
onChange = _this$props2.onChange,
|
|
117
|
-
imageEditor = _this$props2.imageEditor,
|
|
118
|
-
showRemoveImageButton = _this$props2.showRemoveImageButton,
|
|
119
|
-
renderImagePreview = _this$props2.renderImagePreview;
|
|
120
|
-
var imageEditorImageSrc = "";
|
|
121
|
-
|
|
122
|
-
if (this.state.imageEditor.image) {
|
|
123
|
-
imageEditorImageSrc = this.state.imageEditor.image.src;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
var src = value ? value.src : null;
|
|
127
|
-
return /*#__PURE__*/React.createElement(ImageUploadWrapper, {
|
|
128
|
-
className: classNames(className)
|
|
129
|
-
}, label && !src && /*#__PURE__*/React.createElement("div", {
|
|
130
|
-
className: "mdc-floating-label mdc-floating-label--float-above"
|
|
131
|
-
}, label), /*#__PURE__*/React.createElement(ImageEditorDialog, {
|
|
132
|
-
options: imageEditor,
|
|
133
|
-
open: this.state.imageEditor.open,
|
|
134
|
-
src: imageEditorImageSrc,
|
|
135
|
-
onClose: function onClose() {
|
|
136
|
-
_this2.setState(function (state) {
|
|
137
|
-
state.imageEditor.open = false;
|
|
138
|
-
return state;
|
|
139
|
-
});
|
|
140
|
-
},
|
|
141
|
-
onAccept: function onAccept(src) {
|
|
142
|
-
// We wrapped everything into setTimeout - prevents dialog freeze when larger image is selected.
|
|
143
|
-
setTimeout(function () {
|
|
144
|
-
_this2.setState({
|
|
145
|
-
loading: true
|
|
146
|
-
}, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
147
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
148
|
-
while (1) {
|
|
149
|
-
switch (_context.prev = _context.next) {
|
|
150
|
-
case 0:
|
|
151
|
-
_context.t0 = onChange;
|
|
152
|
-
|
|
153
|
-
if (!_context.t0) {
|
|
154
|
-
_context.next = 4;
|
|
155
|
-
break;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
_context.next = 4;
|
|
159
|
-
return onChange(_objectSpread(_objectSpread({}, _this2.state.imageEditor.image), {}, {
|
|
160
|
-
src: src
|
|
161
|
-
}));
|
|
162
|
-
|
|
163
|
-
case 4:
|
|
164
|
-
_this2.setState({
|
|
165
|
-
loading: false,
|
|
166
|
-
imageEditor: {
|
|
167
|
-
image: null,
|
|
168
|
-
open: false
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
case 5:
|
|
173
|
-
case "end":
|
|
174
|
-
return _context.stop();
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}, _callee);
|
|
178
|
-
})));
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
}), /*#__PURE__*/React.createElement(BrowseFiles, {
|
|
182
|
-
accept: accept,
|
|
183
|
-
maxSize: maxSize,
|
|
184
|
-
convertToBase64: true,
|
|
185
|
-
onSuccess: this.handleFiles,
|
|
186
|
-
onError: this.handleErrors
|
|
187
|
-
}, function (_ref2) {
|
|
188
|
-
var browseFiles = _ref2.browseFiles,
|
|
189
|
-
getDropZoneProps = _ref2.getDropZoneProps;
|
|
190
|
-
return /*#__PURE__*/React.createElement("div", getDropZoneProps(), /*#__PURE__*/React.createElement(Image, {
|
|
191
|
-
renderImagePreview: renderImagePreview,
|
|
192
|
-
loading: _this2.state.loading,
|
|
193
|
-
value: value,
|
|
194
|
-
removeImage: showRemoveImageButton ? onChange : null,
|
|
195
|
-
uploadImage: browseFiles,
|
|
196
|
-
editImage: browseFiles
|
|
197
|
-
}));
|
|
198
|
-
}), validation.isValid === false && /*#__PURE__*/React.createElement(FormElementMessage, {
|
|
199
|
-
error: true
|
|
200
|
-
}, validation.message), validation.isValid !== false && description && /*#__PURE__*/React.createElement(FormElementMessage, null, description), this.state.error && /*#__PURE__*/React.createElement(FormElementMessage, {
|
|
201
|
-
error: true
|
|
202
|
-
}, this.props.errorMessages[this.state.error.type] || this.props.errorMessages.default));
|
|
203
|
-
}
|
|
204
|
-
}]);
|
|
205
|
-
|
|
206
|
-
return SingleImageUpload;
|
|
207
|
-
}(React.Component);
|
|
208
|
-
|
|
209
|
-
_defineProperty(SingleImageUpload, "defaultProps", {
|
|
210
|
-
validation: {
|
|
211
|
-
isValid: null
|
|
212
|
-
},
|
|
213
|
-
maxSize: "10mb",
|
|
214
|
-
imageEditor: {},
|
|
215
|
-
accept: ["image/jpeg", "image/png", "image/gif", "image/svg+xml"],
|
|
216
|
-
showRemoveImageButton: true,
|
|
217
|
-
errorMessages: {
|
|
218
|
-
maxSizeExceeded: "Max size exceeded.",
|
|
219
|
-
multipleMaxSizeExceeded: "Selected fields exceed max file size.",
|
|
220
|
-
multipleNotAllowed: "Multiple selection not allowed.",
|
|
221
|
-
unsupportedFileType: "Unsupported file type.",
|
|
222
|
-
default: "An error occurred."
|
|
223
|
-
}
|
|
224
|
-
});
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Alert } from "@webiny/admin-ui";
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated This component is deprecated and will be removed in future releases.
|
|
5
|
+
* Please check the `FilePicker` component inside the `@webiny/admin-ui` package instead.
|
|
6
|
+
*/
|
|
7
|
+
export const SingleImageUpload = ({}) => {
|
|
8
|
+
return /*#__PURE__*/React.createElement(Alert, {
|
|
9
|
+
type: "danger",
|
|
10
|
+
variant: "strong"
|
|
11
|
+
}, "Deprecated component! The original code has been moved to `@webiny/admin-ui` package.");
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=SingleImageUpload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Alert","SingleImageUpload","createElement","type","variant"],"sources":["SingleImageUpload.tsx"],"sourcesContent":["import React from \"react\";\nimport type { FormComponentProps } from \"~/types\";\nimport { Alert } from \"@webiny/admin-ui\";\n\ninterface SingleImageUploadProps extends FormComponentProps {\n // Component label.\n label?: string;\n\n // Is component disabled?\n disabled?: boolean;\n\n // Description beneath the image.\n description?: string;\n\n // A className for the root element.\n className?: string;\n\n // Define a list of accepted image types.\n accept?: string[];\n\n // Define file's max allowed size (default is \"10mb\").\n // Uses \"bytes\" (https://www.npmjs.com/package/bytes) library to convert string notation to actual number.\n maxSize: string;\n\n // Image editor options.\n // Please check the docs of ImageEditor component for the list of all available options.\n imageEditor?: {\n [key: string]: any;\n };\n\n // Custom image preview renderer. By default images are rendered via simple <img> element.\n renderImagePreview?: () => React.ReactElement<any>;\n\n // Should remove image button (top right ✕) be shown? Default is set to `true`.\n showRemoveImageButton?: boolean;\n\n // Use these to customize error messages (eg. if i18n supported is needed).\n errorMessages: {\n maxSizeExceeded: string;\n unsupportedFileType: string;\n default: string;\n multipleNotAllowed: string;\n multipleMaxSizeExceeded: string;\n };\n}\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please check the `FilePicker` component inside the `@webiny/admin-ui` package instead.\n */\nexport const SingleImageUpload = ({}: SingleImageUploadProps) => {\n return (\n <Alert type=\"danger\" variant={\"strong\"}>\n {\n \"Deprecated component! The original code has been moved to `@webiny/admin-ui` package.\"\n }\n </Alert>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,KAAK,QAAQ,kBAAkB;AA4CxC;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAGA,CAAC,CAAyB,CAAC,KAAK;EAC7D,oBACIF,KAAA,CAAAG,aAAA,CAACF,KAAK;IAACG,IAAI,EAAC,QAAQ;IAACC,OAAO,EAAE;EAAS,GAE/B,uFAED,CAAC;AAEhB,CAAC","ignoreList":[]}
|
package/ImageUpload/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { SingleImageUpload } from "./SingleImageUpload";
|
|
2
2
|
export { MultiImageUpload } from "./MultiImageUpload";
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
3
|
+
export { Image } from "./Image";
|
|
4
|
+
export { ImageEditorDialog } from "./ImageEditorDialog";
|
package/ImageUpload/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { SingleImageUpload } from "./SingleImageUpload";
|
|
2
2
|
export { MultiImageUpload } from "./MultiImageUpload";
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
3
|
+
export { Image } from "./Image";
|
|
4
|
+
export { ImageEditorDialog } from "./ImageEditorDialog";
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SingleImageUpload","MultiImageUpload","Image","ImageEditorDialog"],"sources":["index.ts"],"sourcesContent":["export { SingleImageUpload } from \"./SingleImageUpload\";\nexport { MultiImageUpload } from \"./MultiImageUpload\";\nexport { Image } from \"./Image\";\nexport { ImageEditorDialog } from \"./ImageEditorDialog\";\n"],"mappings":"AAAA,SAASA,iBAAiB;AAC1B,SAASC,gBAAgB;AACzB,SAASC,KAAK;AACd,SAASC,iBAAiB","ignoreList":[]}
|
package/Input/Input.d.ts
CHANGED
|
@@ -1,8 +1,59 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { FormComponentProps } from "../types";
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type { FormComponentProps } from "../types";
|
|
4
|
+
export interface TextFieldHelperTextProps {
|
|
5
|
+
/** Make the help text always visible */
|
|
6
|
+
persistent?: boolean;
|
|
7
|
+
/** Make the help a validation message style */
|
|
8
|
+
validationMsg?: boolean;
|
|
9
|
+
/** Content for the help text */
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export interface TextFieldProps {
|
|
13
|
+
/** Sets the value for controlled TextFields. */
|
|
14
|
+
value?: string | number;
|
|
15
|
+
/** Adds help text to the field */
|
|
16
|
+
helpText?: React.ReactNode | TextFieldHelperTextProps;
|
|
17
|
+
/** Shows the character count, must be used in conjunction with maxLength. */
|
|
18
|
+
characterCount?: boolean;
|
|
19
|
+
/** Makes the TextField visually invalid. This is sometimes automatically applied in cases where required or pattern is used. */
|
|
20
|
+
invalid?: boolean;
|
|
21
|
+
/** Makes the Textfield disabled. */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/** Makes the Textfield required. */
|
|
24
|
+
required?: boolean;
|
|
25
|
+
/** Outline the TextField. */
|
|
26
|
+
outlined?: boolean;
|
|
27
|
+
/** How to align the text inside the TextField. Defaults to 'start'. */
|
|
28
|
+
align?: "start" | "end";
|
|
29
|
+
/** A label for the input. */
|
|
30
|
+
label?: React.ReactNode;
|
|
31
|
+
/** The label floats automatically based on value, but you can use this prop for manual control. */
|
|
32
|
+
floatLabel?: boolean;
|
|
33
|
+
/** Makes a multiline TextField. */
|
|
34
|
+
textarea?: boolean;
|
|
35
|
+
/** Makes the TextField fullwidth. */
|
|
36
|
+
fullwidth?: boolean;
|
|
37
|
+
/** Add a leading icon. */
|
|
38
|
+
icon?: any;
|
|
39
|
+
/** Add a trailing icon. */
|
|
40
|
+
trailingIcon?: any;
|
|
41
|
+
/** By default, props spread to the input. These props are for the component's root container. */
|
|
42
|
+
rootProps?: any;
|
|
43
|
+
/** A reference to the native input or textarea. */
|
|
44
|
+
inputRef?: React.Ref<HTMLInputElement | HTMLTextAreaElement | null>;
|
|
45
|
+
/** The type of input field to render, search, number, etc */
|
|
46
|
+
type?: string;
|
|
47
|
+
/** Add prefix. */
|
|
48
|
+
prefix?: string;
|
|
49
|
+
/** Add suffix. */
|
|
50
|
+
suffix?: string;
|
|
51
|
+
/** Advanced: A reference to the MDCFoundation. */
|
|
52
|
+
foundationRef?: any;
|
|
53
|
+
/** Make textarea resizeable */
|
|
54
|
+
resizeable?: boolean;
|
|
55
|
+
}
|
|
56
|
+
export type InputProps<TValue = any> = FormComponentProps<TValue> & TextFieldProps & {
|
|
6
57
|
autoComplete?: string;
|
|
7
58
|
rawOnChange?: boolean;
|
|
8
59
|
autoFocus?: boolean;
|
|
@@ -10,25 +61,16 @@ export declare type InputProps = FormComponentProps & TextFieldProps & {
|
|
|
10
61
|
description?: string | ReactElement;
|
|
11
62
|
rows?: number;
|
|
12
63
|
maxLength?: number;
|
|
13
|
-
onBlur?: (e: React.SyntheticEvent<
|
|
14
|
-
onKeyDown?: (e: React.SyntheticEvent<
|
|
64
|
+
onBlur?: (e: React.SyntheticEvent<any>) => any;
|
|
65
|
+
onKeyDown?: (e: React.SyntheticEvent<any>) => any;
|
|
15
66
|
onEnter?: () => any;
|
|
16
67
|
className?: string;
|
|
68
|
+
"data-testid"?: string;
|
|
69
|
+
size?: "small" | "medium" | "large";
|
|
70
|
+
children?: React.ReactNode;
|
|
17
71
|
};
|
|
18
72
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
73
|
+
* @deprecated This component is deprecated and will be removed in future releases.
|
|
74
|
+
* Please use the `Input` component from the `@webiny/admin-ui` package instead.
|
|
21
75
|
*/
|
|
22
|
-
export declare
|
|
23
|
-
static defaultProps: {
|
|
24
|
-
rawOnChange: boolean;
|
|
25
|
-
validation: {
|
|
26
|
-
isValid: any;
|
|
27
|
-
message: any;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
static rmwcProps: string[];
|
|
31
|
-
onChange: (e: React.SyntheticEvent<HTMLInputElement>) => void;
|
|
32
|
-
onBlur: (e: React.SyntheticEvent<HTMLInputElement>) => Promise<void>;
|
|
33
|
-
render(): JSX.Element;
|
|
34
|
-
}
|
|
76
|
+
export declare const Input: (props: InputProps) => React.JSX.Element;
|
package/Input/Input.js
CHANGED
|
@@ -1,152 +1,89 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
6
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
7
|
-
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
8
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
var _excluded = ["autoFocus", "value", "label", "description", "placeholder", "rows", "validation", "icon", "trailingIcon", "onEnter"];
|
|
10
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
11
|
-
import * as React from "react";
|
|
12
|
-
import { TextField } from "@rmwc/textfield";
|
|
13
|
-
import { FormElementMessage } from "../FormElementMessage";
|
|
1
|
+
import React, { useCallback, useMemo } from "react";
|
|
14
2
|
import pick from "lodash/pick";
|
|
15
|
-
|
|
3
|
+
import { Input as AdminInput, Textarea as AdminTextarea } from "@webiny/admin-ui";
|
|
16
4
|
/**
|
|
17
5
|
* Use Input component to store short string values, like first name, last name, e-mail etc.
|
|
18
6
|
* Additionally, with rows prop, it can also be turned into a text area, to store longer strings.
|
|
19
7
|
*/
|
|
20
|
-
export var Input = /*#__PURE__*/function (_React$Component) {
|
|
21
|
-
_inherits(Input, _React$Component);
|
|
22
|
-
|
|
23
|
-
var _super = _createSuper(Input);
|
|
24
|
-
|
|
25
|
-
function Input() {
|
|
26
|
-
var _this;
|
|
27
|
-
|
|
28
|
-
_classCallCheck(this, Input);
|
|
29
|
-
|
|
30
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
31
|
-
args[_key] = arguments[_key];
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
35
|
-
|
|
36
|
-
_defineProperty(_assertThisInitialized(_this), "onChange", function (e) {
|
|
37
|
-
var _this$props = _this.props,
|
|
38
|
-
onChange = _this$props.onChange,
|
|
39
|
-
rawOnChange = _this$props.rawOnChange;
|
|
40
|
-
|
|
41
|
-
if (!onChange) {
|
|
42
|
-
return;
|
|
43
|
-
} // @ts-ignore
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
onChange(rawOnChange ? e : e.target.value);
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
_defineProperty(_assertThisInitialized(_this), "onBlur", /*#__PURE__*/function () {
|
|
50
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(e) {
|
|
51
|
-
var _this$props2, validate, onBlur;
|
|
52
|
-
|
|
53
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
54
|
-
while (1) {
|
|
55
|
-
switch (_context.prev = _context.next) {
|
|
56
|
-
case 0:
|
|
57
|
-
_this$props2 = _this.props, validate = _this$props2.validate, onBlur = _this$props2.onBlur;
|
|
58
|
-
|
|
59
|
-
if (!validate) {
|
|
60
|
-
_context.next = 5;
|
|
61
|
-
break;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// Since we are accessing event in an async operation, we need to persist it.
|
|
65
|
-
// See https://reactjs.org/docs/events.html#event-pooling.
|
|
66
|
-
e.persist();
|
|
67
|
-
_context.next = 5;
|
|
68
|
-
return validate();
|
|
69
8
|
|
|
70
|
-
|
|
71
|
-
|
|
9
|
+
// IconProps directly passed to RMWC
|
|
10
|
+
const rmwcProps = ["label", "type", "disabled", "readOnly", "placeholder", "onKeyDown", "onEnter", "onKeyPress", "onKeyUp", "onFocus", "className", "maxLength", "characterCount", "autoComplete", "maxLength"];
|
|
72
11
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated This component is deprecated and will be removed in future releases.
|
|
14
|
+
* Please use the `Input` component from the `@webiny/admin-ui` package instead.
|
|
15
|
+
*/
|
|
16
|
+
export const Input = props => {
|
|
17
|
+
const {
|
|
18
|
+
autoFocus,
|
|
19
|
+
value,
|
|
20
|
+
description,
|
|
21
|
+
placeholder,
|
|
22
|
+
rows,
|
|
23
|
+
validation,
|
|
24
|
+
icon,
|
|
25
|
+
trailingIcon,
|
|
26
|
+
onBlur,
|
|
27
|
+
onChange,
|
|
28
|
+
rawOnChange,
|
|
29
|
+
required,
|
|
30
|
+
inputRef,
|
|
31
|
+
...rest
|
|
32
|
+
} = props;
|
|
33
|
+
let inputValue = value;
|
|
34
|
+
if (value === null || typeof value === "undefined") {
|
|
35
|
+
inputValue = "";
|
|
87
36
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
value: function render() {
|
|
92
|
-
var _this$props3 = this.props,
|
|
93
|
-
autoFocus = _this$props3.autoFocus,
|
|
94
|
-
value = _this$props3.value,
|
|
95
|
-
label = _this$props3.label,
|
|
96
|
-
description = _this$props3.description,
|
|
97
|
-
placeholder = _this$props3.placeholder,
|
|
98
|
-
rows = _this$props3.rows,
|
|
99
|
-
validation = _this$props3.validation,
|
|
100
|
-
icon = _this$props3.icon,
|
|
101
|
-
trailingIcon = _this$props3.trailingIcon,
|
|
102
|
-
onEnter = _this$props3.onEnter,
|
|
103
|
-
props = _objectWithoutProperties(_this$props3, _excluded);
|
|
104
|
-
|
|
105
|
-
var inputValue = value;
|
|
106
|
-
|
|
107
|
-
if (value === null || typeof value === "undefined") {
|
|
108
|
-
inputValue = "";
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TextField, Object.assign({}, pick(props, Input.rmwcProps), {
|
|
112
|
-
onKeyDown: function onKeyDown(e) {
|
|
113
|
-
if (typeof onEnter === "function" && e.key === "Enter") {
|
|
114
|
-
onEnter();
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
if (typeof props.onKeyDown === "function") {
|
|
118
|
-
for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
119
|
-
rest[_key2 - 1] = arguments[_key2];
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
return props.onKeyDown.apply(props, [e].concat(rest));
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
autoFocus: autoFocus,
|
|
126
|
-
textarea: Boolean(rows),
|
|
127
|
-
value: inputValue,
|
|
128
|
-
onChange: this.onChange,
|
|
129
|
-
onBlur: this.onBlur,
|
|
130
|
-
label: label,
|
|
131
|
-
icon: icon,
|
|
132
|
-
placeholder: !label && placeholder || undefined,
|
|
133
|
-
trailingIcon: trailingIcon,
|
|
134
|
-
rows: this.props.rows
|
|
135
|
-
})), validation.isValid === false && /*#__PURE__*/React.createElement(FormElementMessage, {
|
|
136
|
-
error: true
|
|
137
|
-
}, validation.message), validation.isValid !== false && description && /*#__PURE__*/React.createElement(FormElementMessage, null, description));
|
|
37
|
+
const size = useMemo(() => {
|
|
38
|
+
if (props.size === "medium") {
|
|
39
|
+
return "md";
|
|
138
40
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
41
|
+
if (props.size === "large") {
|
|
42
|
+
return "lg";
|
|
43
|
+
}
|
|
44
|
+
return "lg";
|
|
45
|
+
}, [props.size]);
|
|
46
|
+
const getValidIcon = useCallback(icon => {
|
|
47
|
+
if (/*#__PURE__*/React.isValidElement(icon)) {
|
|
48
|
+
return icon;
|
|
49
|
+
}
|
|
50
|
+
return undefined;
|
|
51
|
+
}, []);
|
|
52
|
+
if (Boolean(rows)) {
|
|
53
|
+
return /*#__PURE__*/React.createElement(AdminTextarea, Object.assign({}, pick(rest, rmwcProps), {
|
|
54
|
+
autoFocus: autoFocus,
|
|
55
|
+
value: inputValue,
|
|
56
|
+
onChange: onChange,
|
|
57
|
+
placeholder: placeholder,
|
|
58
|
+
size: size,
|
|
59
|
+
className: "webiny-ui-input",
|
|
60
|
+
"data-testid": props["data-testid"],
|
|
61
|
+
validation: validation,
|
|
62
|
+
description: description,
|
|
63
|
+
required: required,
|
|
64
|
+
rows: rows,
|
|
65
|
+
forwardEventOnChange: rawOnChange,
|
|
66
|
+
textareaRef: inputRef,
|
|
67
|
+
onBlur: onBlur
|
|
68
|
+
}));
|
|
149
69
|
}
|
|
150
|
-
})
|
|
151
|
-
|
|
152
|
-
|
|
70
|
+
return /*#__PURE__*/React.createElement(AdminInput, Object.assign({}, pick(rest, rmwcProps), {
|
|
71
|
+
autoFocus: autoFocus,
|
|
72
|
+
value: inputValue,
|
|
73
|
+
onChange: onChange,
|
|
74
|
+
startIcon: getValidIcon(icon),
|
|
75
|
+
endIcon: getValidIcon(trailingIcon),
|
|
76
|
+
placeholder: placeholder,
|
|
77
|
+
size: size,
|
|
78
|
+
className: "webiny-ui-input",
|
|
79
|
+
"data-testid": props["data-testid"],
|
|
80
|
+
validation: validation,
|
|
81
|
+
description: description,
|
|
82
|
+
required: required,
|
|
83
|
+
forwardEventOnChange: rawOnChange,
|
|
84
|
+
inputRef: inputRef,
|
|
85
|
+
onBlur: onBlur
|
|
86
|
+
}));
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
//# sourceMappingURL=Input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useCallback","useMemo","pick","Input","AdminInput","Textarea","AdminTextarea","rmwcProps","props","autoFocus","value","description","placeholder","rows","validation","icon","trailingIcon","onBlur","onChange","rawOnChange","required","inputRef","rest","inputValue","size","getValidIcon","isValidElement","undefined","Boolean","createElement","Object","assign","className","forwardEventOnChange","textareaRef","startIcon","endIcon"],"sources":["Input.tsx"],"sourcesContent":["import type { ReactElement } from \"react\";\nimport React, { useCallback, useMemo } from \"react\";\nimport pick from \"lodash/pick\";\nimport type { FormComponentProps } from \"~/types\";\nimport { Input as AdminInput, Textarea as AdminTextarea } from \"@webiny/admin-ui\";\n\nexport interface TextFieldHelperTextProps {\n /** Make the help text always visible */\n persistent?: boolean;\n /** Make the help a validation message style */\n validationMsg?: boolean;\n /** Content for the help text */\n children: React.ReactNode;\n}\n\nexport interface TextFieldProps {\n /** Sets the value for controlled TextFields. */\n value?: string | number;\n /** Adds help text to the field */\n helpText?: React.ReactNode | TextFieldHelperTextProps;\n /** Shows the character count, must be used in conjunction with maxLength. */\n characterCount?: boolean;\n /** Makes the TextField visually invalid. This is sometimes automatically applied in cases where required or pattern is used. */\n invalid?: boolean;\n /** Makes the Textfield disabled. */\n disabled?: boolean;\n /** Makes the Textfield required. */\n required?: boolean;\n /** Outline the TextField. */\n outlined?: boolean;\n /** How to align the text inside the TextField. Defaults to 'start'. */\n align?: \"start\" | \"end\";\n /** A label for the input. */\n label?: React.ReactNode;\n /** The label floats automatically based on value, but you can use this prop for manual control. */\n floatLabel?: boolean;\n /** Makes a multiline TextField. */\n textarea?: boolean;\n /** Makes the TextField fullwidth. */\n fullwidth?: boolean;\n /** Add a leading icon. */\n icon?: any;\n /** Add a trailing icon. */\n trailingIcon?: any;\n /** By default, props spread to the input. These props are for the component's root container. */\n rootProps?: any;\n /** A reference to the native input or textarea. */\n inputRef?: React.Ref<HTMLInputElement | HTMLTextAreaElement | null>;\n /** The type of input field to render, search, number, etc */\n type?: string;\n /** Add prefix. */\n prefix?: string;\n /** Add suffix. */\n suffix?: string;\n /** Advanced: A reference to the MDCFoundation. */\n foundationRef?: any;\n /** Make textarea resizeable */\n resizeable?: boolean;\n}\n\nexport type InputProps<TValue = any> = FormComponentProps<TValue> &\n TextFieldProps & {\n // Should this input be filled with browser values\n autoComplete?: string;\n\n // If true, will pass native `event` to the `onChange` callback\n rawOnChange?: boolean;\n\n // Auto-focus input\n autoFocus?: boolean;\n\n // Input placeholder\n placeholder?: string;\n\n // Description beneath the input.\n description?: string | ReactElement;\n\n // Converts input into a text area with given number of rows.\n rows?: number;\n\n maxLength?: number;\n\n // A callback that is executed when input focus is lost.\n onBlur?: (e: React.SyntheticEvent<any>) => any;\n\n onKeyDown?: (e: React.SyntheticEvent<any>) => any;\n\n // A callback that gets triggered when the user presses the \"Enter\" key.\n onEnter?: () => any;\n\n // CSS class name\n className?: string;\n\n // For testing purposes.\n \"data-testid\"?: string;\n\n // Size - small, medium or large\n size?: \"small\" | \"medium\" | \"large\";\n\n children?: React.ReactNode;\n };\n\n/**\n * Use Input component to store short string values, like first name, last name, e-mail etc.\n * Additionally, with rows prop, it can also be turned into a text area, to store longer strings.\n */\n\n// IconProps directly passed to RMWC\nconst rmwcProps = [\n \"label\",\n \"type\",\n \"disabled\",\n \"readOnly\",\n \"placeholder\",\n \"onKeyDown\",\n \"onEnter\",\n \"onKeyPress\",\n \"onKeyUp\",\n \"onFocus\",\n \"className\",\n \"maxLength\",\n \"characterCount\",\n \"autoComplete\",\n \"maxLength\"\n];\n\n/**\n * @deprecated This component is deprecated and will be removed in future releases.\n * Please use the `Input` component from the `@webiny/admin-ui` package instead.\n */\nexport const Input = (props: InputProps) => {\n const {\n autoFocus,\n value,\n description,\n placeholder,\n rows,\n validation,\n icon,\n trailingIcon,\n onBlur,\n onChange,\n rawOnChange,\n required,\n inputRef,\n ...rest\n } = props;\n\n let inputValue = value;\n if (value === null || typeof value === \"undefined\") {\n inputValue = \"\";\n }\n\n const size = useMemo(() => {\n if (props.size === \"medium\") {\n return \"md\";\n }\n\n if (props.size === \"large\") {\n return \"lg\";\n }\n\n return \"lg\";\n }, [props.size]);\n\n const getValidIcon = useCallback((icon: React.ReactNode) => {\n if (React.isValidElement(icon)) {\n return icon;\n }\n\n return undefined;\n }, []);\n\n if (Boolean(rows)) {\n return (\n <AdminTextarea\n {...pick(rest, rmwcProps)}\n autoFocus={autoFocus}\n value={inputValue}\n onChange={onChange}\n placeholder={placeholder}\n size={size}\n className={\"webiny-ui-input\"}\n data-testid={props[\"data-testid\"]}\n validation={validation}\n description={description}\n required={required}\n rows={rows}\n forwardEventOnChange={rawOnChange}\n textareaRef={inputRef as React.Ref<HTMLTextAreaElement> | undefined}\n onBlur={onBlur}\n />\n );\n }\n\n return (\n <AdminInput\n {...pick(rest, rmwcProps)}\n autoFocus={autoFocus}\n value={inputValue}\n onChange={onChange}\n startIcon={getValidIcon(icon)}\n endIcon={getValidIcon(trailingIcon)}\n placeholder={placeholder}\n size={size}\n className={\"webiny-ui-input\"}\n data-testid={props[\"data-testid\"]}\n validation={validation}\n description={description}\n required={required}\n forwardEventOnChange={rawOnChange}\n inputRef={inputRef as React.Ref<HTMLInputElement> | undefined}\n onBlur={onBlur}\n />\n );\n};\n"],"mappings":"AACA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AACnD,OAAOC,IAAI,MAAM,aAAa;AAE9B,SAASC,KAAK,IAAIC,UAAU,EAAEC,QAAQ,IAAIC,aAAa,QAAQ,kBAAkB;AAkGjF;AACA;AACA;AACA;;AAEA;AACA,MAAMC,SAAS,GAAG,CACd,OAAO,EACP,MAAM,EACN,UAAU,EACV,UAAU,EACV,aAAa,EACb,WAAW,EACX,SAAS,EACT,YAAY,EACZ,SAAS,EACT,SAAS,EACT,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,WAAW,CACd;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMJ,KAAK,GAAIK,KAAiB,IAAK;EACxC,MAAM;IACFC,SAAS;IACTC,KAAK;IACLC,WAAW;IACXC,WAAW;IACXC,IAAI;IACJC,UAAU;IACVC,IAAI;IACJC,YAAY;IACZC,MAAM;IACNC,QAAQ;IACRC,WAAW;IACXC,QAAQ;IACRC,QAAQ;IACR,GAAGC;EACP,CAAC,GAAGd,KAAK;EAET,IAAIe,UAAU,GAAGb,KAAK;EACtB,IAAIA,KAAK,KAAK,IAAI,IAAI,OAAOA,KAAK,KAAK,WAAW,EAAE;IAChDa,UAAU,GAAG,EAAE;EACnB;EAEA,MAAMC,IAAI,GAAGvB,OAAO,CAAC,MAAM;IACvB,IAAIO,KAAK,CAACgB,IAAI,KAAK,QAAQ,EAAE;MACzB,OAAO,IAAI;IACf;IAEA,IAAIhB,KAAK,CAACgB,IAAI,KAAK,OAAO,EAAE;MACxB,OAAO,IAAI;IACf;IAEA,OAAO,IAAI;EACf,CAAC,EAAE,CAAChB,KAAK,CAACgB,IAAI,CAAC,CAAC;EAEhB,MAAMC,YAAY,GAAGzB,WAAW,CAAEe,IAAqB,IAAK;IACxD,iBAAIhB,KAAK,CAAC2B,cAAc,CAACX,IAAI,CAAC,EAAE;MAC5B,OAAOA,IAAI;IACf;IAEA,OAAOY,SAAS;EACpB,CAAC,EAAE,EAAE,CAAC;EAEN,IAAIC,OAAO,CAACf,IAAI,CAAC,EAAE;IACf,oBACId,KAAA,CAAA8B,aAAA,CAACvB,aAAa,EAAAwB,MAAA,CAAAC,MAAA,KACN7B,IAAI,CAACoB,IAAI,EAAEf,SAAS,CAAC;MACzBE,SAAS,EAAEA,SAAU;MACrBC,KAAK,EAAEa,UAAW;MAClBL,QAAQ,EAAEA,QAAS;MACnBN,WAAW,EAAEA,WAAY;MACzBY,IAAI,EAAEA,IAAK;MACXQ,SAAS,EAAE,iBAAkB;MAC7B,eAAaxB,KAAK,CAAC,aAAa,CAAE;MAClCM,UAAU,EAAEA,UAAW;MACvBH,WAAW,EAAEA,WAAY;MACzBS,QAAQ,EAAEA,QAAS;MACnBP,IAAI,EAAEA,IAAK;MACXoB,oBAAoB,EAAEd,WAAY;MAClCe,WAAW,EAAEb,QAAuD;MACpEJ,MAAM,EAAEA;IAAO,EAClB,CAAC;EAEV;EAEA,oBACIlB,KAAA,CAAA8B,aAAA,CAACzB,UAAU,EAAA0B,MAAA,CAAAC,MAAA,KACH7B,IAAI,CAACoB,IAAI,EAAEf,SAAS,CAAC;IACzBE,SAAS,EAAEA,SAAU;IACrBC,KAAK,EAAEa,UAAW;IAClBL,QAAQ,EAAEA,QAAS;IACnBiB,SAAS,EAAEV,YAAY,CAACV,IAAI,CAAE;IAC9BqB,OAAO,EAAEX,YAAY,CAACT,YAAY,CAAE;IACpCJ,WAAW,EAAEA,WAAY;IACzBY,IAAI,EAAEA,IAAK;IACXQ,SAAS,EAAE,iBAAkB;IAC7B,eAAaxB,KAAK,CAAC,aAAa,CAAE;IAClCM,UAAU,EAAEA,UAAW;IACvBH,WAAW,EAAEA,WAAY;IACzBS,QAAQ,EAAEA,QAAS;IACnBa,oBAAoB,EAAEd,WAAY;IAClCE,QAAQ,EAAEA,QAAoD;IAC9DJ,MAAM,EAAEA;EAAO,EAClB,CAAC;AAEV,CAAC","ignoreList":[]}
|
package/Input/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Input\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -1,8 +1,22 @@
|
|
|
1
|
-
import "
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface CollapsibleListProps {
|
|
3
|
+
/** The handle that opens and closes the collapsible section. Usually a ListItem. */
|
|
4
|
+
handle: React.ReactElement<any>;
|
|
5
|
+
/** Starts the collapsible list as open. */
|
|
6
|
+
defaultOpen?: boolean;
|
|
7
|
+
/** Callback for when the collapsible list opens. */
|
|
8
|
+
onOpen?: () => void;
|
|
9
|
+
/** Callback for when the collapsible list closes. */
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
/** CollapsibleState */
|
|
12
|
+
open: boolean;
|
|
13
|
+
childrenStyle: React.CSSProperties;
|
|
14
|
+
/** Component props */
|
|
5
15
|
children: React.ReactNode;
|
|
6
|
-
}
|
|
7
|
-
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated This component is deprecated and will be removed in future releases.
|
|
19
|
+
* Please use the `List` component from the `@webiny/admin-ui` package instead.
|
|
20
|
+
*/
|
|
21
|
+
export declare const CollapsibleList: (props: CollapsibleListProps) => React.JSX.Element;
|
|
8
22
|
export default CollapsibleList;
|