@webiny/ui 0.0.0-mt-2 → 0.0.0-unstable.085ff6572f
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 +5 -5
- package/Accordion/Accordion.js +22 -22
- package/Accordion/Accordion.js.map +1 -0
- package/Accordion/Accordion.stories.js +26 -23
- package/Accordion/Accordion.stories.js.map +1 -0
- package/Accordion/AccordionItem.d.ts +27 -8
- package/Accordion/AccordionItem.js +91 -84
- package/Accordion/AccordionItem.js.map +1 -0
- package/Accordion/AccordionItemActions.d.ts +8 -0
- package/Accordion/AccordionItemActions.js +28 -0
- package/Accordion/AccordionItemActions.js.map +1 -0
- package/Accordion/index.js +27 -2
- package/Accordion/index.js.map +1 -0
- package/Alert/Alert.d.ts +4 -4
- package/Alert/Alert.js +19 -15
- package/Alert/Alert.js.map +1 -0
- package/Alert/Alert.stories.js +16 -13
- package/Alert/Alert.stories.js.map +1 -0
- package/Alert/index.js +16 -1
- package/Alert/index.js.map +1 -0
- package/AutoComplete/AutoComplete.d.ts +13 -19
- package/AutoComplete/AutoComplete.js +150 -149
- package/AutoComplete/AutoComplete.js.map +1 -0
- package/AutoComplete/AutoComplete.stories.js +20 -17
- package/AutoComplete/AutoComplete.stories.js.map +1 -0
- package/AutoComplete/MultiAutoComplete.d.ts +44 -40
- package/AutoComplete/MultiAutoComplete.js +304 -311
- package/AutoComplete/MultiAutoComplete.js.map +1 -0
- package/AutoComplete/MultiAutoComplete.stories.js +31 -28
- package/AutoComplete/MultiAutoComplete.stories.js.map +1 -0
- package/AutoComplete/index.js +27 -2
- package/AutoComplete/index.js.map +1 -0
- package/AutoComplete/styles.js +33 -4
- package/AutoComplete/styles.js.map +1 -0
- package/AutoComplete/types.d.ts +4 -3
- package/AutoComplete/types.js +5 -1
- package/AutoComplete/types.js.map +1 -0
- package/AutoComplete/utils.d.ts +11 -5
- package/AutoComplete/utils.js +15 -8
- package/AutoComplete/utils.js.map +1 -0
- package/Avatar/Avatar.d.ts +5 -11
- package/Avatar/Avatar.js +37 -28
- package/Avatar/Avatar.js.map +1 -0
- package/Avatar/Avatar.stories.js +13 -10
- package/Avatar/Avatar.stories.js.map +1 -0
- package/Avatar/index.js +16 -1
- package/Avatar/index.js.map +1 -0
- package/Button/Button.d.ts +39 -24
- package/Button/Button.js +74 -83
- package/Button/Button.js.map +1 -0
- package/Button/Button.stories.js +32 -29
- package/Button/Button.stories.js.map +1 -0
- package/Button/Button.styles.d.ts +6 -0
- package/Button/Button.styles.js +13 -0
- package/Button/Button.styles.js.map +1 -0
- package/Button/CopyButton/CopyButton.d.ts +4 -7
- package/Button/CopyButton/CopyButton.js +18 -18
- package/Button/CopyButton/CopyButton.js.map +1 -0
- package/Button/CopyButton/CopyButton.stories.js +13 -10
- package/Button/CopyButton/CopyButton.stories.js.map +1 -0
- package/Button/IconButton/IconButton.d.ts +4 -7
- package/Button/IconButton/IconButton.js +16 -15
- package/Button/IconButton/IconButton.js.map +1 -0
- package/Button/IconButton/IconButton.stories.js +22 -19
- package/Button/IconButton/IconButton.stories.js.map +1 -0
- package/Button/index.js +38 -3
- package/Button/index.js.map +1 -0
- package/Carousel/Carousel.d.ts +3 -3
- package/Carousel/Carousel.js +24 -25
- package/Carousel/Carousel.js.map +1 -0
- package/Carousel/Carouser.stories.js +20 -17
- package/Carousel/Carouser.stories.js.map +1 -0
- package/Carousel/index.js +13 -1
- package/Carousel/index.js.map +1 -0
- package/Checkbox/Checkbox.d.ts +6 -9
- package/Checkbox/Checkbox.js +40 -44
- package/Checkbox/Checkbox.js.map +1 -0
- package/Checkbox/Checkbox.stories.js +19 -16
- package/Checkbox/Checkbox.stories.js.map +1 -0
- package/Checkbox/Checkbox.styles.js +9 -4
- package/Checkbox/Checkbox.styles.js.map +1 -0
- package/Checkbox/CheckboxGroup.d.ts +2 -2
- package/Checkbox/CheckboxGroup.js +34 -35
- package/Checkbox/CheckboxGroup.js.map +1 -0
- package/Checkbox/CheckboxGroup.stories.js +23 -20
- package/Checkbox/CheckboxGroup.stories.js.map +1 -0
- package/Checkbox/index.js +20 -2
- package/Checkbox/index.js.map +1 -0
- package/Chips/Chip.d.ts +3 -8
- package/Chips/Chip.js +15 -8
- package/Chips/Chip.js.map +1 -0
- package/Chips/Chips.d.ts +4 -4
- package/Chips/Chips.js +21 -14
- package/Chips/Chips.js.map +1 -0
- package/Chips/Chips.stories.js +25 -18
- package/Chips/Chips.stories.js.map +1 -0
- package/Chips/index.d.ts +0 -1
- package/Chips/index.js +27 -3
- package/Chips/index.js.map +1 -0
- package/Chips/styles.js +19 -9
- package/Chips/styles.js.map +1 -0
- package/CodeEditor/CodeEditor.d.ts +5 -8
- package/CodeEditor/CodeEditor.js +42 -49
- package/CodeEditor/CodeEditor.js.map +1 -0
- package/CodeEditor/CodeEditor.stories.js +20 -17
- package/CodeEditor/CodeEditor.stories.js.map +1 -0
- package/CodeEditor/index.js +16 -1
- package/CodeEditor/index.js.map +1 -0
- package/ColorPicker/ColorPicker.d.ts +9 -10
- package/ColorPicker/ColorPicker.js +54 -66
- package/ColorPicker/ColorPicker.js.map +1 -0
- package/ColorPicker/ColorPicker.stories.js +18 -15
- package/ColorPicker/ColorPicker.stories.js.map +1 -0
- package/ColorPicker/index.js +16 -1
- package/ColorPicker/index.js.map +1 -0
- package/ConfirmationDialog/ConfirmationDialog.d.ts +13 -13
- package/ConfirmationDialog/ConfirmationDialog.js +76 -96
- package/ConfirmationDialog/ConfirmationDialog.js.map +1 -0
- package/ConfirmationDialog/ConfirmationDialog.stories.js +15 -12
- package/ConfirmationDialog/ConfirmationDialog.stories.js.map +1 -0
- package/ConfirmationDialog/index.js +27 -2
- package/ConfirmationDialog/index.js.map +1 -0
- package/ConfirmationDialog/withConfirmation.d.ts +2 -2
- package/ConfirmationDialog/withConfirmation.js +14 -6
- package/ConfirmationDialog/withConfirmation.js.map +1 -0
- package/DataTable/DataTable.d.ts +75 -0
- package/DataTable/DataTable.js +198 -0
- package/DataTable/DataTable.js.map +1 -0
- package/DataTable/DataTable.stories.d.ts +1 -0
- package/DataTable/DataTable.stories.js +74 -0
- package/DataTable/DataTable.stories.js.map +1 -0
- package/DataTable/README.md +72 -0
- package/DataTable/index.d.ts +1 -0
- package/DataTable/index.js +16 -0
- package/DataTable/index.js.map +1 -0
- package/DataTable/styled.d.ts +30 -0
- package/DataTable/styled.js +36 -0
- package/DataTable/styled.js.map +1 -0
- package/DelayedOnChange/DelayedOnChange.d.ts +40 -0
- package/DelayedOnChange/DelayedOnChange.js +113 -0
- package/DelayedOnChange/DelayedOnChange.js.map +1 -0
- package/DelayedOnChange/index.d.ts +2 -0
- package/DelayedOnChange/index.js +20 -0
- package/DelayedOnChange/index.js.map +1 -0
- package/DelayedOnChange/withDelayedOnChange.d.ts +3 -0
- package/DelayedOnChange/withDelayedOnChange.js +31 -0
- package/DelayedOnChange/withDelayedOnChange.js.map +1 -0
- package/Dialog/Dialog.d.ts +22 -30
- package/Dialog/Dialog.js +59 -55
- package/Dialog/Dialog.js.map +1 -0
- package/Dialog/Dialog.stories.js +19 -16
- package/Dialog/Dialog.stories.js.map +1 -0
- package/Dialog/index.js +16 -1
- package/Dialog/index.js.map +1 -0
- package/Drawer/Drawer.d.ts +1 -1
- package/Drawer/Drawer.js +14 -9
- package/Drawer/Drawer.js.map +1 -0
- package/Drawer/Drawer.stories.js +18 -15
- package/Drawer/Drawer.stories.js.map +1 -0
- package/Drawer/index.js +16 -1
- package/Drawer/index.js.map +1 -0
- package/DynamicFieldset/Fieldset.d.ts +26 -16
- package/DynamicFieldset/Fieldset.js +69 -74
- package/DynamicFieldset/Fieldset.js.map +1 -0
- package/DynamicFieldset/index.js +13 -1
- package/DynamicFieldset/index.js.map +1 -0
- package/Elevation/Elevation.d.ts +1 -1
- package/Elevation/Elevation.js +12 -6
- package/Elevation/Elevation.js.map +1 -0
- package/Elevation/Elevation.stories.js +19 -16
- package/Elevation/Elevation.stories.js.map +1 -0
- package/Elevation/index.js +16 -1
- package/Elevation/index.js.map +1 -0
- package/FormElementMessage/FormElementMessage.d.ts +1 -1
- package/FormElementMessage/FormElementMessage.js +11 -6
- package/FormElementMessage/FormElementMessage.js.map +1 -0
- package/FormElementMessage/index.js +12 -1
- package/FormElementMessage/index.js.map +1 -0
- package/FullName/FullName.js +7 -7
- package/FullName/FullName.js.map +1 -0
- package/FullName/index.js +16 -1
- package/FullName/index.js.map +1 -0
- package/Grid/Grid.d.ts +1 -1
- package/Grid/Grid.js +19 -10
- package/Grid/Grid.js.map +1 -0
- package/Grid/Grid.stories.js +15 -12
- package/Grid/Grid.stories.js.map +1 -0
- package/Grid/index.js +16 -1
- package/Grid/index.js.map +1 -0
- package/Helpers/ClassNames.d.ts +4 -3
- package/Helpers/ClassNames.js +16 -14
- package/Helpers/ClassNames.js.map +1 -0
- package/Helpers/index.js +12 -2
- package/Helpers/index.js.map +1 -0
- package/Icon/Icon.d.ts +3 -6
- package/Icon/Icon.js +15 -12
- package/Icon/Icon.js.map +1 -0
- package/Icon/Icon.stories.js +23 -20
- package/Icon/Icon.stories.js.map +1 -0
- package/Icon/index.js +16 -1
- package/Icon/index.js.map +1 -0
- package/Image/Image.d.ts +5 -4
- package/Image/Image.js +17 -13
- package/Image/Image.js.map +1 -0
- package/Image/Image.stories.js +14 -11
- package/Image/Image.stories.js.map +1 -0
- package/Image/index.js +16 -1
- package/Image/index.js.map +1 -0
- package/ImageEditor/ImageEditor.d.ts +33 -34
- package/ImageEditor/ImageEditor.js +129 -163
- package/ImageEditor/ImageEditor.js.map +1 -0
- package/ImageEditor/index.js +16 -1
- package/ImageEditor/index.js.map +1 -0
- package/ImageEditor/toolbar/crop.js +26 -22
- package/ImageEditor/toolbar/crop.js.map +1 -0
- package/ImageEditor/toolbar/filter.js +63 -59
- package/ImageEditor/toolbar/filter.js.map +1 -0
- package/ImageEditor/toolbar/flip.js +27 -25
- package/ImageEditor/toolbar/flip.js.map +1 -0
- package/ImageEditor/toolbar/icons/index.js +61 -8
- package/ImageEditor/toolbar/icons/index.js.map +1 -0
- package/ImageEditor/toolbar/index.js +34 -4
- package/ImageEditor/toolbar/index.js.map +1 -0
- package/ImageEditor/toolbar/rotate.js +55 -61
- package/ImageEditor/toolbar/rotate.js.map +1 -0
- package/ImageEditor/toolbar/types.d.ts +23 -12
- package/ImageEditor/toolbar/types.js +5 -1
- package/ImageEditor/toolbar/types.js.map +1 -0
- package/ImageUpload/Image.d.ts +6 -6
- package/ImageUpload/Image.js +52 -54
- package/ImageUpload/Image.js.map +1 -0
- package/ImageUpload/ImageEditorDialog.d.ts +11 -6
- package/ImageUpload/ImageEditorDialog.js +47 -46
- package/ImageUpload/ImageEditorDialog.js.map +1 -0
- package/ImageUpload/MultiImageUpload.d.ts +10 -31
- package/ImageUpload/MultiImageUpload.js +194 -222
- package/ImageUpload/MultiImageUpload.js.map +1 -0
- package/ImageUpload/MultiImageUpload.stories.js +18 -15
- package/ImageUpload/MultiImageUpload.stories.js.map +1 -0
- package/ImageUpload/SingleImageUpload.d.ts +16 -37
- package/ImageUpload/SingleImageUpload.js +96 -106
- package/ImageUpload/SingleImageUpload.js.map +1 -0
- package/ImageUpload/SingleImageUpload.stories.js +19 -16
- package/ImageUpload/SingleImageUpload.stories.js.map +1 -0
- package/ImageUpload/index.js +34 -4
- package/ImageUpload/index.js.map +1 -0
- package/ImageUpload/styled.d.ts +30 -14
- package/ImageUpload/styled.js +25 -16
- package/ImageUpload/styled.js.map +1 -0
- package/Input/Input.d.ts +6 -19
- package/Input/Input.js +102 -141
- package/Input/Input.js.map +1 -0
- package/Input/Input.stories.js +49 -46
- package/Input/Input.stories.js.map +1 -0
- package/Input/__tests__/Input.test.js +54 -63
- package/Input/__tests__/Input.test.js.map +1 -0
- package/Input/index.js +16 -1
- package/Input/index.js.map +1 -0
- package/Input/styled.d.ts +4 -0
- package/Input/styled.js +12 -0
- package/Input/styled.js.map +1 -0
- package/List/CollapsibleList/CollapsibleList.stories.js +19 -16
- package/List/CollapsibleList/CollapsibleList.stories.js.map +1 -0
- package/List/CollapsibleList/index.d.ts +2 -2
- package/List/CollapsibleList/index.js +15 -6
- package/List/CollapsibleList/index.js.map +1 -0
- package/List/DataList/DataList.d.ts +24 -43
- package/List/DataList/DataList.js +87 -122
- package/List/DataList/DataList.js.map +1 -0
- package/List/DataList/DataList.stories.js +30 -26
- package/List/DataList/DataList.stories.js.map +1 -0
- package/List/DataList/DataListModalOverlay/DataListModalOverlay.d.ts +14 -12
- package/List/DataList/DataListModalOverlay/DataListModalOverlay.js +29 -20
- package/List/DataList/DataListModalOverlay/DataListModalOverlay.js.map +1 -0
- package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.d.ts +3 -3
- package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.js +20 -13
- package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.js.map +1 -0
- package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.d.ts +9 -4
- package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.js +24 -12
- package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.js.map +1 -0
- package/List/DataList/DataListModalOverlay/index.js +32 -3
- package/List/DataList/DataListModalOverlay/index.js.map +1 -0
- package/List/DataList/DataListWithSections.d.ts +45 -0
- package/List/DataList/DataListWithSections.js +312 -0
- package/List/DataList/DataListWithSections.js.map +1 -0
- package/List/DataList/Loader.d.ts +2 -2
- package/List/DataList/Loader.js +48 -52
- package/List/DataList/Loader.js.map +1 -0
- package/List/DataList/NoData.d.ts +2 -2
- package/List/DataList/NoData.js +14 -8
- package/List/DataList/NoData.js.map +1 -0
- package/List/DataList/icons/index.d.ts +1 -1
- package/List/DataList/icons/index.js +54 -38
- package/List/DataList/icons/index.js.map +1 -0
- package/List/DataList/index.d.ts +1 -0
- package/List/DataList/index.js +58 -3
- package/List/DataList/index.js.map +1 -0
- package/List/DataList/types.d.ts +1 -1
- package/List/DataList/types.js +5 -1
- package/List/DataList/types.js.map +1 -0
- package/List/List.d.ts +3 -2
- package/List/List.js +66 -62
- package/List/List.js.map +1 -0
- package/List/List.stories.js +40 -37
- package/List/List.stories.js.map +1 -0
- package/List/icons/index.js +20 -3
- package/List/icons/index.js.map +1 -0
- package/List/index.d.ts +1 -1
- package/List/index.js +70 -3
- package/List/index.js.map +1 -0
- package/Menu/Menu.d.ts +14 -21
- package/Menu/Menu.js +49 -62
- package/Menu/Menu.js.map +1 -0
- package/Menu/Menu.stories.js +17 -14
- package/Menu/Menu.stories.js.map +1 -0
- package/Menu/index.js +16 -1
- package/Menu/index.js.map +1 -0
- package/Mosaic/Mosaic.d.ts +4 -14
- package/Mosaic/Mosaic.js +20 -7
- package/Mosaic/Mosaic.js.map +1 -0
- package/Mosaic/Mosaic.stories.js +31 -28
- package/Mosaic/Mosaic.stories.js.map +1 -0
- package/Mosaic/index.js +16 -1
- package/Mosaic/index.js.map +1 -0
- package/Progress/CircularProgress.d.ts +8 -16
- package/Progress/CircularProgress.js +32 -22
- package/Progress/CircularProgress.js.map +1 -0
- package/Progress/index.js +13 -1
- package/Progress/index.js.map +1 -0
- package/Radio/Radio.d.ts +2 -6
- package/Radio/Radio.js +36 -41
- package/Radio/Radio.js.map +1 -0
- package/Radio/Radio.styles.js +9 -4
- package/Radio/Radio.styles.js.map +1 -0
- package/Radio/RadioGroup.d.ts +1 -6
- package/Radio/RadioGroup.js +30 -34
- package/Radio/RadioGroup.js.map +1 -0
- package/Radio/RadioGroup.stories.js +23 -20
- package/Radio/RadioGroup.stories.js.map +1 -0
- package/Radio/index.js +20 -2
- package/Radio/index.js.map +1 -0
- package/RichTextEditor/RichTextEditor.d.ts +13 -9
- package/RichTextEditor/RichTextEditor.js +79 -78
- package/RichTextEditor/RichTextEditor.js.map +1 -0
- package/RichTextEditor/RichTextEditor.stories.js +15 -11
- package/RichTextEditor/RichTextEditor.stories.js.map +1 -0
- package/RichTextEditor/createPropsFromConfig.d.ts +11 -1
- package/RichTextEditor/createPropsFromConfig.js +16 -5
- package/RichTextEditor/createPropsFromConfig.js.map +1 -0
- package/RichTextEditor/index.d.ts +1 -0
- package/RichTextEditor/index.js +27 -2
- package/RichTextEditor/index.js.map +1 -0
- package/Ripple/Ripple.d.ts +4 -5
- package/Ripple/Ripple.js +11 -6
- package/Ripple/Ripple.js.map +1 -0
- package/Ripple/Ripple.stories.js +45 -42
- package/Ripple/Ripple.stories.js.map +1 -0
- package/Ripple/index.js +16 -1
- package/Ripple/index.js.map +1 -0
- package/Scrollbar/Scrollbar.d.ts +5 -5
- package/Scrollbar/Scrollbar.js +10 -5
- package/Scrollbar/Scrollbar.js.map +1 -0
- package/Scrollbar/Scrollbar.stories.js +12 -9
- package/Scrollbar/Scrollbar.stories.js.map +1 -0
- package/Scrollbar/index.js +16 -1
- package/Scrollbar/index.js.map +1 -0
- package/Section/Section.stories.js +15 -12
- package/Section/Section.stories.js.map +1 -0
- package/Section/index.d.ts +4 -5
- package/Section/index.js +23 -18
- package/Section/index.js.map +1 -0
- package/Select/Select.d.ts +8 -10
- package/Select/Select.js +79 -39
- package/Select/Select.js.map +1 -0
- package/Select/Select.stories.js +28 -25
- package/Select/Select.stories.js.map +1 -0
- package/Select/index.js +16 -1
- package/Select/index.js.map +1 -0
- package/Select/styled.d.ts +8 -0
- package/Select/styled.js +18 -0
- package/Select/styled.js.map +1 -0
- package/Skeleton/README.md +21 -0
- package/Skeleton/Skeleton.d.ts +8 -0
- package/Skeleton/Skeleton.js +22 -0
- package/Skeleton/Skeleton.js.map +1 -0
- package/Skeleton/Skeleton.stories.d.ts +1 -0
- package/Skeleton/Skeleton.stories.js +22 -0
- package/Skeleton/Skeleton.stories.js.map +1 -0
- package/Skeleton/index.d.ts +1 -0
- package/Skeleton/index.js +16 -0
- package/Skeleton/index.js.map +1 -0
- package/Slider/Slider.d.ts +1 -6
- package/Slider/Slider.js +39 -47
- package/Slider/Slider.js.map +1 -0
- package/Slider/Slider.stories.js +20 -17
- package/Slider/Slider.stories.js.map +1 -0
- package/Slider/index.js +13 -1
- package/Slider/index.js.map +1 -0
- package/Snackbar/Snackbar.d.ts +5 -7
- package/Snackbar/Snackbar.js +29 -33
- package/Snackbar/Snackbar.js.map +1 -0
- package/Snackbar/Snackbar.stories.js +29 -38
- package/Snackbar/Snackbar.stories.js.map +1 -0
- package/Snackbar/index.js +18 -1
- package/Snackbar/index.js.map +1 -0
- package/Switch/Switch.d.ts +3 -7
- package/Switch/Switch.js +35 -43
- package/Switch/Switch.js.map +1 -0
- package/Switch/Switch.stories.js +19 -16
- package/Switch/Switch.stories.js.map +1 -0
- package/Switch/index.js +16 -1
- package/Switch/index.js.map +1 -0
- package/Tabs/Tab.d.ts +7 -2
- package/Tabs/Tab.js +30 -9
- package/Tabs/Tab.js.map +1 -0
- package/Tabs/Tabs.d.ts +44 -21
- package/Tabs/Tabs.js +128 -129
- package/Tabs/Tabs.js.map +1 -0
- package/Tabs/Tabs.stories.js +25 -23
- package/Tabs/Tabs.stories.js.map +1 -0
- package/Tabs/index.js +27 -2
- package/Tabs/index.js.map +1 -0
- package/Tags/Tags.d.ts +9 -21
- package/Tags/Tags.js +95 -124
- package/Tags/Tags.js.map +1 -0
- package/Tags/Tags.stories.js +19 -16
- package/Tags/Tags.stories.js.map +1 -0
- package/Tags/index.js +16 -1
- package/Tags/index.js.map +1 -0
- package/Tooltip/Tooltip.d.ts +9 -8
- package/Tooltip/Tooltip.js +33 -33
- package/Tooltip/Tooltip.js.map +1 -0
- package/Tooltip/Tooltip.stories.js +14 -11
- package/Tooltip/Tooltip.stories.js.map +1 -0
- package/Tooltip/index.js +16 -1
- package/Tooltip/index.js.map +1 -0
- package/TopAppBar/TopAppBar.d.ts +1 -1
- package/TopAppBar/TopAppBar.js +13 -9
- package/TopAppBar/TopAppBar.js.map +1 -0
- package/TopAppBar/TopAppBar.stories.js +31 -30
- package/TopAppBar/TopAppBar.stories.js.map +1 -0
- package/TopAppBar/TopAppBarActionItem.d.ts +1 -1
- package/TopAppBar/TopAppBarActionItem.js +10 -5
- package/TopAppBar/TopAppBarActionItem.js.map +1 -0
- package/TopAppBar/TopAppBarNavigationIcon.d.ts +1 -1
- package/TopAppBar/TopAppBarNavigationIcon.js +10 -5
- package/TopAppBar/TopAppBarNavigationIcon.js.map +1 -0
- package/TopAppBar/TopAppBarPrimary.js +13 -9
- package/TopAppBar/TopAppBarPrimary.js.map +1 -0
- package/TopAppBar/TopAppBarSecondary.js +15 -11
- package/TopAppBar/TopAppBarSecondary.js.map +1 -0
- package/TopAppBar/TopAppBarSection.d.ts +1 -1
- package/TopAppBar/TopAppBarSection.js +13 -9
- package/TopAppBar/TopAppBarSection.js.map +1 -0
- package/TopAppBar/TopAppBarTitle.d.ts +1 -1
- package/TopAppBar/TopAppBarTitle.js +13 -9
- package/TopAppBar/TopAppBarTitle.js.map +1 -0
- package/TopAppBar/index.js +82 -7
- package/TopAppBar/index.js.map +1 -0
- package/TopProgressBar/TopProgressBar.d.ts +7 -7
- package/TopProgressBar/TopProgressBar.js +15 -7
- package/TopProgressBar/TopProgressBar.js.map +1 -0
- package/TopProgressBar/TopProgressBar.stories.js +16 -13
- package/TopProgressBar/TopProgressBar.stories.js.map +1 -0
- package/TopProgressBar/hoc/index.js +13 -1
- package/TopProgressBar/hoc/index.js.map +1 -0
- package/TopProgressBar/hoc/withTopProgressBar.d.ts +1 -1
- package/TopProgressBar/hoc/withTopProgressBar.js +14 -9
- package/TopProgressBar/hoc/withTopProgressBar.js.map +1 -0
- package/TopProgressBar/index.js +16 -1
- package/TopProgressBar/index.js.map +1 -0
- package/Typography/Typography.d.ts +5 -5
- package/Typography/Typography.js +10 -5
- package/Typography/Typography.js.map +1 -0
- package/Typography/Typography.stories.js +37 -34
- package/Typography/Typography.stories.js.map +1 -0
- package/Typography/index.js +16 -1
- package/Typography/index.js.map +1 -0
- package/package.json +76 -81
- package/styles.scss +3 -4
- package/types.d.ts +4 -4
- package/types.js +5 -1
- package/types.js.map +1 -0
- package/Chips/ChipIcon.d.ts +0 -4
- package/Chips/ChipIcon.js +0 -8
- 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,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
interface ChildrenRenderProp {
|
|
3
|
-
showConfirmation: (onAccept?:
|
|
3
|
+
showConfirmation: (onAccept?: () => void, onCancel?: () => void) => any;
|
|
4
4
|
}
|
|
5
5
|
interface ConfirmationCallbacks {
|
|
6
|
-
onAccept
|
|
7
|
-
onCancel
|
|
6
|
+
onAccept?: () => void;
|
|
7
|
+
onCancel?: () => void;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
interface Props {
|
|
10
10
|
title?: React.ReactNode;
|
|
11
11
|
message?: React.ReactNode;
|
|
12
12
|
loading?: React.ReactNode;
|
|
@@ -14,15 +14,15 @@ declare type Props = {
|
|
|
14
14
|
children: (props: ChildrenRenderProp) => React.ReactNode;
|
|
15
15
|
disableConfirm?: boolean;
|
|
16
16
|
style?: React.CSSProperties;
|
|
17
|
-
}
|
|
18
|
-
|
|
17
|
+
}
|
|
18
|
+
interface ConfirmationDialogState {
|
|
19
19
|
show: boolean;
|
|
20
20
|
loading: boolean;
|
|
21
|
-
}
|
|
21
|
+
}
|
|
22
22
|
/**
|
|
23
23
|
* Use ConfirmationDialog component to display a list of choices, once the handler is triggered.
|
|
24
24
|
*/
|
|
25
|
-
declare class ConfirmationDialog extends React.Component<Props,
|
|
25
|
+
declare class ConfirmationDialog extends React.Component<Props, ConfirmationDialogState> {
|
|
26
26
|
static defaultProps: {
|
|
27
27
|
title: string;
|
|
28
28
|
message: string;
|
|
@@ -36,10 +36,10 @@ declare class ConfirmationDialog extends React.Component<Props, State> {
|
|
|
36
36
|
};
|
|
37
37
|
componentDidMount(): void;
|
|
38
38
|
componentWillUnmount(): void;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
private readonly showConfirmation;
|
|
40
|
+
private readonly hideConfirmation;
|
|
41
|
+
private readonly onAccept;
|
|
42
|
+
private readonly onCancel;
|
|
43
43
|
render(): JSX.Element;
|
|
44
44
|
}
|
|
45
45
|
export { ConfirmationDialog };
|
|
@@ -1,128 +1,111 @@
|
|
|
1
|
-
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
7
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
9
|
-
import * as React from "react";
|
|
10
|
-
import noop from "lodash/noop";
|
|
11
|
-
import { Dialog, DialogButton, DialogCancel, DialogActions, DialogTitle, DialogContent } from "./../Dialog";
|
|
12
|
-
import { CircularProgress } from "../Progress";
|
|
1
|
+
"use strict";
|
|
13
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ConfirmationDialog = void 0;
|
|
8
|
+
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
9
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
13
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
|
+
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
15
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
+
var _react = _interopRequireDefault(require("react"));
|
|
17
|
+
var _Dialog = require("./../Dialog");
|
|
18
|
+
var _Progress = require("../Progress");
|
|
19
|
+
var _Button = require("../Button");
|
|
14
20
|
/**
|
|
15
21
|
* Use ConfirmationDialog component to display a list of choices, once the handler is triggered.
|
|
16
22
|
*/
|
|
17
23
|
var ConfirmationDialog = /*#__PURE__*/function (_React$Component) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var _super = _createSuper(ConfirmationDialog);
|
|
21
|
-
|
|
24
|
+
(0, _inherits2.default)(ConfirmationDialog, _React$Component);
|
|
25
|
+
var _super = (0, _createSuper2.default)(ConfirmationDialog);
|
|
22
26
|
function ConfirmationDialog() {
|
|
23
27
|
var _this;
|
|
24
|
-
|
|
25
|
-
_classCallCheck(this, ConfirmationDialog);
|
|
26
|
-
|
|
28
|
+
(0, _classCallCheck2.default)(this, ConfirmationDialog);
|
|
27
29
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
28
30
|
args[_key] = arguments[_key];
|
|
29
31
|
}
|
|
30
|
-
|
|
31
32
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
onCancel:
|
|
33
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "__isMounted", false);
|
|
34
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "callbacks", {
|
|
35
|
+
onAccept: function onAccept() {
|
|
36
|
+
return void 0;
|
|
37
|
+
},
|
|
38
|
+
onCancel: function onCancel() {
|
|
39
|
+
return void 0;
|
|
40
|
+
}
|
|
38
41
|
});
|
|
39
|
-
|
|
40
|
-
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
42
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
|
|
41
43
|
show: false,
|
|
42
44
|
loading: false
|
|
43
45
|
});
|
|
44
|
-
|
|
45
|
-
_defineProperty(_assertThisInitialized(_this), "showConfirmation", function (onAccept, onCancel) {
|
|
46
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "showConfirmation", function (onAccept, onCancel) {
|
|
46
47
|
_this.callbacks = {
|
|
47
48
|
onAccept: onAccept,
|
|
48
49
|
onCancel: onCancel
|
|
49
50
|
};
|
|
50
|
-
|
|
51
51
|
_this.setState({
|
|
52
52
|
show: true
|
|
53
53
|
});
|
|
54
54
|
});
|
|
55
|
-
|
|
56
|
-
_defineProperty(_assertThisInitialized(_this), "hideConfirmation", function () {
|
|
55
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "hideConfirmation", function () {
|
|
57
56
|
_this.setState({
|
|
58
57
|
show: false
|
|
59
58
|
});
|
|
60
59
|
});
|
|
61
|
-
|
|
62
|
-
_defineProperty(_assertThisInitialized(_this), "onAccept", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
60
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onAccept", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
|
63
61
|
var onAccept;
|
|
64
|
-
return
|
|
65
|
-
while (1) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
62
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
63
|
+
while (1) switch (_context.prev = _context.next) {
|
|
64
|
+
case 0:
|
|
65
|
+
onAccept = _this.callbacks.onAccept;
|
|
66
|
+
if (!(typeof onAccept === "function")) {
|
|
67
|
+
_context.next = 6;
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
_this.setState({
|
|
71
|
+
loading: true
|
|
72
|
+
});
|
|
73
|
+
_context.next = 5;
|
|
74
|
+
return onAccept();
|
|
75
|
+
case 5:
|
|
76
|
+
if (_this.__isMounted) {
|
|
75
77
|
_this.setState({
|
|
76
|
-
loading:
|
|
78
|
+
loading: false,
|
|
79
|
+
show: false
|
|
77
80
|
});
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
case 5:
|
|
83
|
-
if (_this.__isMounted) {
|
|
84
|
-
_this.setState({
|
|
85
|
-
loading: false,
|
|
86
|
-
show: false
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
case 6:
|
|
91
|
-
case "end":
|
|
92
|
-
return _context.stop();
|
|
93
|
-
}
|
|
81
|
+
}
|
|
82
|
+
case 6:
|
|
83
|
+
case "end":
|
|
84
|
+
return _context.stop();
|
|
94
85
|
}
|
|
95
86
|
}, _callee);
|
|
96
87
|
})));
|
|
97
|
-
|
|
98
|
-
_defineProperty(_assertThisInitialized(_this), "onCancel", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
88
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onCancel", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2() {
|
|
99
89
|
var onCancel;
|
|
100
|
-
return
|
|
101
|
-
while (1) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
if (!(typeof onCancel === "function")) {
|
|
107
|
-
_context2.next = 4;
|
|
108
|
-
break;
|
|
109
|
-
}
|
|
110
|
-
|
|
90
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
|
|
91
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
92
|
+
case 0:
|
|
93
|
+
onCancel = _this.callbacks.onCancel;
|
|
94
|
+
if (!(typeof onCancel === "function")) {
|
|
111
95
|
_context2.next = 4;
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
_context2.next = 4;
|
|
99
|
+
return onCancel();
|
|
100
|
+
case 4:
|
|
101
|
+
case "end":
|
|
102
|
+
return _context2.stop();
|
|
118
103
|
}
|
|
119
104
|
}, _callee2);
|
|
120
105
|
})));
|
|
121
|
-
|
|
122
106
|
return _this;
|
|
123
107
|
}
|
|
124
|
-
|
|
125
|
-
_createClass(ConfirmationDialog, [{
|
|
108
|
+
(0, _createClass2.default)(ConfirmationDialog, [{
|
|
126
109
|
key: "componentDidMount",
|
|
127
110
|
value: function componentDidMount() {
|
|
128
111
|
this.__isMounted = true;
|
|
@@ -135,14 +118,14 @@ var ConfirmationDialog = /*#__PURE__*/function (_React$Component) {
|
|
|
135
118
|
}, {
|
|
136
119
|
key: "render",
|
|
137
120
|
value: function render() {
|
|
138
|
-
return /*#__PURE__*/
|
|
121
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Dialog.Dialog, {
|
|
139
122
|
style: this.props.style,
|
|
140
123
|
open: this.state.show,
|
|
141
124
|
onClose: this.hideConfirmation,
|
|
142
125
|
"data-testid": this.props["data-testid"]
|
|
143
|
-
}, this.state.loading ? this.props.loading : null, /*#__PURE__*/
|
|
126
|
+
}, this.state.loading ? this.props.loading : null, /*#__PURE__*/_react.default.createElement(_Dialog.DialogTitle, null, this.props.title), /*#__PURE__*/_react.default.createElement(_Dialog.DialogContent, null, this.props.message), /*#__PURE__*/_react.default.createElement(_Dialog.DialogActions, null, /*#__PURE__*/_react.default.createElement(_Dialog.DialogCancel, {
|
|
144
127
|
onClick: this.onCancel
|
|
145
|
-
}, "Cancel"), /*#__PURE__*/
|
|
128
|
+
}, "Cancel"), /*#__PURE__*/_react.default.createElement(_Button.ButtonPrimary, {
|
|
146
129
|
"data-testid": "confirmationdialog-confirm-action",
|
|
147
130
|
onClick: this.onAccept,
|
|
148
131
|
disabled: this.props.disableConfirm
|
|
@@ -151,14 +134,11 @@ var ConfirmationDialog = /*#__PURE__*/function (_React$Component) {
|
|
|
151
134
|
}));
|
|
152
135
|
}
|
|
153
136
|
}]);
|
|
154
|
-
|
|
155
137
|
return ConfirmationDialog;
|
|
156
|
-
}(
|
|
157
|
-
|
|
158
|
-
|
|
138
|
+
}(_react.default.Component);
|
|
139
|
+
exports.ConfirmationDialog = ConfirmationDialog;
|
|
140
|
+
(0, _defineProperty2.default)(ConfirmationDialog, "defaultProps", {
|
|
159
141
|
title: "Confirmation",
|
|
160
142
|
message: "Are you sure you want to continue?",
|
|
161
|
-
loading: /*#__PURE__*/
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
export { ConfirmationDialog };
|
|
143
|
+
loading: /*#__PURE__*/_react.default.createElement(_Progress.CircularProgress, null)
|
|
144
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ConfirmationDialog","onAccept","onCancel","show","loading","callbacks","setState","__isMounted","props","style","state","hideConfirmation","title","message","disableConfirm","children","showConfirmation","React","Component"],"sources":["ConfirmationDialog.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { Dialog, DialogCancel, DialogActions, DialogTitle, DialogContent } from \"./../Dialog\";\n\nimport { CircularProgress } from \"../Progress\";\nimport { ButtonPrimary } from \"~/Button\";\n\ninterface ChildrenRenderProp {\n showConfirmation: (onAccept?: () => void, onCancel?: () => void) => any;\n}\n\ninterface ConfirmationCallbacks {\n onAccept?: () => void;\n onCancel?: () => void;\n}\n\ninterface Props {\n // Title of confirmation dialog\n title?: React.ReactNode;\n\n // Message of confirmation dialog\n message?: React.ReactNode;\n\n // This element will be rendered during loading\n loading?: React.ReactNode;\n\n // For testing purposes\n \"data-testid\"?: string;\n\n // An element that will trigger the confirmation dialog.\n children: (props: ChildrenRenderProp) => React.ReactNode;\n\n // Is `Confirm` button disabled\n disableConfirm?: boolean;\n\n // Dialog component's custom in-line styles.\n style?: React.CSSProperties;\n}\n\ninterface ConfirmationDialogState {\n show: boolean;\n loading: boolean;\n}\n\n/**\n * Use ConfirmationDialog component to display a list of choices, once the handler is triggered.\n */\nclass ConfirmationDialog extends React.Component<Props, ConfirmationDialogState> {\n static defaultProps = {\n title: \"Confirmation\",\n message: \"Are you sure you want to continue?\",\n loading: <CircularProgress />\n };\n\n __isMounted = false;\n\n callbacks: ConfirmationCallbacks = {\n onAccept: () => {\n return void 0;\n },\n onCancel: () => {\n return void 0;\n }\n };\n\n public override state = {\n show: false,\n loading: false\n };\n\n public override componentDidMount() {\n this.__isMounted = true;\n }\n\n public override componentWillUnmount() {\n this.__isMounted = false;\n }\n\n private readonly showConfirmation = (onAccept?: () => void, onCancel?: () => void) => {\n this.callbacks = {\n onAccept,\n onCancel\n };\n this.setState({ show: true });\n };\n\n private readonly hideConfirmation = () => {\n this.setState({ show: false });\n };\n\n private readonly onAccept = async () => {\n const { onAccept } = this.callbacks;\n if (typeof onAccept === \"function\") {\n this.setState({ loading: true });\n await onAccept();\n if (this.__isMounted) {\n this.setState({ loading: false, show: false });\n }\n }\n };\n\n private readonly onCancel = async () => {\n const { onCancel } = this.callbacks;\n if (typeof onCancel === \"function\") {\n await onCancel();\n }\n };\n\n public override render() {\n return (\n <React.Fragment>\n <Dialog\n style={this.props.style}\n open={this.state.show}\n onClose={this.hideConfirmation}\n data-testid={this.props[\"data-testid\"]}\n >\n {this.state.loading ? this.props.loading : null}\n <DialogTitle>{this.props.title}</DialogTitle>\n <DialogContent>{this.props.message}</DialogContent>\n <DialogActions>\n <DialogCancel onClick={this.onCancel}>Cancel</DialogCancel>\n <ButtonPrimary\n data-testid=\"confirmationdialog-confirm-action\"\n onClick={this.onAccept}\n disabled={this.props.disableConfirm}\n >\n Confirm\n </ButtonPrimary>\n </DialogActions>\n </Dialog>\n {this.props.children({\n showConfirmation: this.showConfirmation\n })}\n </React.Fragment>\n );\n }\n}\n\nexport { ConfirmationDialog };\n"],"mappings":"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"}
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _react = _interopRequireDefault(require("react"));
|
|
5
|
+
var _react2 = require("@storybook/react");
|
|
6
|
+
var _Story = require("@webiny/storybook-utils/Story");
|
|
7
|
+
var _README = _interopRequireDefault(require("./../ConfirmationDialog/README.md"));
|
|
8
|
+
var _Button = require("./../Button");
|
|
9
|
+
var _ConfirmationDialog = require("./ConfirmationDialog");
|
|
10
|
+
var story = (0, _react2.storiesOf)("Components/ConfirmationDialog", module);
|
|
8
11
|
story.add("usage", function () {
|
|
9
|
-
return /*#__PURE__*/
|
|
12
|
+
return /*#__PURE__*/_react.default.createElement(_Story.Story, null, /*#__PURE__*/_react.default.createElement(_Story.StoryReadme, null, _README.default), /*#__PURE__*/_react.default.createElement(_Story.StorySandbox, {
|
|
10
13
|
title: "Icon with and without ConfirmationDialog"
|
|
11
|
-
}, /*#__PURE__*/
|
|
14
|
+
}, /*#__PURE__*/_react.default.createElement(_Story.StorySandboxExample, null, /*#__PURE__*/_react.default.createElement(_ConfirmationDialog.ConfirmationDialog, {
|
|
12
15
|
title: "Pay Invoice",
|
|
13
16
|
message: "Are you sure you want pay this invoice?"
|
|
14
17
|
}, function (_ref) {
|
|
15
18
|
var showConfirmation = _ref.showConfirmation;
|
|
16
|
-
return /*#__PURE__*/
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement(_Button.ButtonPrimary, {
|
|
17
20
|
onClick: function onClick() {
|
|
18
21
|
showConfirmation(function () {
|
|
19
22
|
return console.log("Confirm");
|
|
@@ -22,9 +25,9 @@ story.add("usage", function () {
|
|
|
22
25
|
});
|
|
23
26
|
}
|
|
24
27
|
}, "Pay Invoice");
|
|
25
|
-
})), /*#__PURE__*/
|
|
28
|
+
})), /*#__PURE__*/_react.default.createElement(_Story.StorySandboxCode, null, "\n <ConfirmationDialog\n title=\"Pay Invoice\"\n message=\"Are you sure you want pay this invoice?\"\n >\n {({ showConfirmation }) => {\n return (\n <ButtonPrimary\n onClick={() => {\n showConfirmation(\n () => console.log(\"Confirm\"),\n () => console.log(\"Cancel\")\n );\n }}\n >\n Pay Invoice\n </ButtonPrimary>\n );\n }}\n </ConfirmationDialog>\n ")));
|
|
26
29
|
}, {
|
|
27
30
|
info: {
|
|
28
|
-
propTables: [ConfirmationDialog]
|
|
31
|
+
propTables: [_ConfirmationDialog.ConfirmationDialog]
|
|
29
32
|
}
|
|
30
33
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["story","storiesOf","module","add","readme","showConfirmation","console","log","info","propTables","ConfirmationDialog"],"sources":["ConfirmationDialog.stories.tsx"],"sourcesContent":["import React from \"react\";\nimport { storiesOf } from \"@storybook/react\";\nimport {\n Story,\n StoryReadme,\n StorySandboxCode,\n StorySandbox,\n StorySandboxExample\n} from \"@webiny/storybook-utils/Story\";\nimport readme from \"./../ConfirmationDialog/README.md\";\nimport { ButtonPrimary } from \"./../Button\";\nimport { ConfirmationDialog } from \"./ConfirmationDialog\";\n\nconst story = storiesOf(\"Components/ConfirmationDialog\", module);\n\nstory.add(\n \"usage\",\n () => {\n return (\n <Story>\n <StoryReadme>{readme}</StoryReadme>\n <StorySandbox title={\"Icon with and without ConfirmationDialog\"}>\n <StorySandboxExample>\n <ConfirmationDialog\n title=\"Pay Invoice\"\n message=\"Are you sure you want pay this invoice?\"\n >\n {({ showConfirmation }) => {\n return (\n <ButtonPrimary\n onClick={() => {\n showConfirmation(\n () => console.log(\"Confirm\"),\n () => console.log(\"Cancel\")\n );\n }}\n >\n Pay Invoice\n </ButtonPrimary>\n );\n }}\n </ConfirmationDialog>\n </StorySandboxExample>\n <StorySandboxCode>\n {`\n <ConfirmationDialog\n title=\"Pay Invoice\"\n message=\"Are you sure you want pay this invoice?\"\n >\n {({ showConfirmation }) => {\n return (\n <ButtonPrimary\n onClick={() => {\n showConfirmation(\n () => console.log(\"Confirm\"),\n () => console.log(\"Cancel\")\n );\n }}\n >\n Pay Invoice\n </ButtonPrimary>\n );\n }}\n </ConfirmationDialog>\n `}\n </StorySandboxCode>\n </StorySandbox>\n </Story>\n );\n },\n { info: { propTables: [ConfirmationDialog] } }\n);\n"],"mappings":";;;AAAA;AACA;AACA;AAOA;AACA;AACA;AAEA,IAAMA,KAAK,GAAG,IAAAC,iBAAS,EAAC,+BAA+B,EAAEC,MAAM,CAAC;AAEhEF,KAAK,CAACG,GAAG,CACL,OAAO,EACP,YAAM;EACF,oBACI,6BAAC,YAAK,qBACF,6BAAC,kBAAW,QAAEC,eAAM,CAAe,eACnC,6BAAC,mBAAY;IAAC,KAAK,EAAE;EAA2C,gBAC5D,6BAAC,0BAAmB,qBAChB,6BAAC,sCAAkB;IACf,KAAK,EAAC,aAAa;IACnB,OAAO,EAAC;EAAyC,GAEhD,gBAA0B;IAAA,IAAvBC,gBAAgB,QAAhBA,gBAAgB;IAChB,oBACI,6BAAC,qBAAa;MACV,OAAO,EAAE,mBAAM;QACXA,gBAAgB,CACZ;UAAA,OAAMC,OAAO,CAACC,GAAG,CAAC,SAAS,CAAC;QAAA,GAC5B;UAAA,OAAMD,OAAO,CAACC,GAAG,CAAC,QAAQ,CAAC;QAAA,EAC9B;MACL;IAAE,GACL,aAED,CAAgB;EAExB,CAAC,CACgB,CACH,eACtB,6BAAC,uBAAgB,o7BAsBE,CACR,CACX;AAEhB,CAAC,EACD;EAAEC,IAAI,EAAE;IAAEC,UAAU,EAAE,CAACC,sCAAkB;EAAE;AAAE,CAAC,CACjD"}
|
|
@@ -1,2 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _ConfirmationDialog = require("./ConfirmationDialog");
|
|
7
|
+
Object.keys(_ConfirmationDialog).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _ConfirmationDialog[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _ConfirmationDialog[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _withConfirmation = require("./withConfirmation");
|
|
18
|
+
Object.keys(_withConfirmation).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _withConfirmation[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function get() {
|
|
24
|
+
return _withConfirmation[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./ConfirmationDialog\";\nexport * from \"./withConfirmation\";\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
declare type ConfirmationProps = {
|
|
3
3
|
title?: React.ReactNode;
|
|
4
4
|
message?: React.ReactNode;
|
|
5
5
|
};
|
|
6
|
-
declare type WithConfirmationParams = (props: any) => ConfirmationProps;
|
|
6
|
+
declare type WithConfirmationParams = (props: Record<string, any>) => ConfirmationProps;
|
|
7
7
|
export declare type WithConfirmationProps = {
|
|
8
8
|
showConfirmation: (confirm: Function, cancel: Function) => void;
|
|
9
9
|
};
|
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.withConfirmation = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _ConfirmationDialog = require("./ConfirmationDialog");
|
|
10
|
+
var withConfirmation = function withConfirmation(dialogProps) {
|
|
4
11
|
return function (Component) {
|
|
5
12
|
return function withConfirmationRender(ownProps) {
|
|
6
13
|
var props = typeof dialogProps === "function" ? dialogProps(ownProps) : dialogProps;
|
|
7
|
-
return /*#__PURE__*/
|
|
14
|
+
return /*#__PURE__*/_react.default.createElement(_ConfirmationDialog.ConfirmationDialog, props, function (_ref) {
|
|
8
15
|
var showConfirmation = _ref.showConfirmation;
|
|
9
|
-
return /*#__PURE__*/
|
|
16
|
+
return /*#__PURE__*/_react.default.createElement(Component, Object.assign({}, ownProps, {
|
|
10
17
|
showConfirmation: showConfirmation
|
|
11
18
|
}));
|
|
12
19
|
});
|
|
13
20
|
};
|
|
14
21
|
};
|
|
15
|
-
};
|
|
22
|
+
};
|
|
23
|
+
exports.withConfirmation = withConfirmation;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["withConfirmation","dialogProps","Component","withConfirmationRender","ownProps","props","showConfirmation"],"sources":["withConfirmation.tsx"],"sourcesContent":["import React from \"react\";\nimport { ConfirmationDialog } from \"./ConfirmationDialog\";\n\ntype ConfirmationProps = {\n title?: React.ReactNode;\n message?: React.ReactNode;\n};\n\ntype WithConfirmationParams = (props: Record<string, any>) => ConfirmationProps;\n\nexport type WithConfirmationProps = {\n showConfirmation: (confirm: Function, cancel: Function) => void;\n};\n\nexport const withConfirmation = (dialogProps: WithConfirmationParams): Function => {\n return (Component: typeof React.Component) => {\n return function withConfirmationRender(ownProps: Record<string, any>) {\n const props = typeof dialogProps === \"function\" ? dialogProps(ownProps) : dialogProps;\n return (\n <ConfirmationDialog {...props}>\n {({ showConfirmation }) => (\n <Component {...ownProps} showConfirmation={showConfirmation} />\n )}\n </ConfirmationDialog>\n );\n };\n };\n};\n"],"mappings":";;;;;;;AAAA;AACA;AAaO,IAAMA,gBAAgB,GAAG,SAAnBA,gBAAgB,CAAIC,WAAmC,EAAe;EAC/E,OAAO,UAACC,SAAiC,EAAK;IAC1C,OAAO,SAASC,sBAAsB,CAACC,QAA6B,EAAE;MAClE,IAAMC,KAAK,GAAG,OAAOJ,WAAW,KAAK,UAAU,GAAGA,WAAW,CAACG,QAAQ,CAAC,GAAGH,WAAW;MACrF,oBACI,6BAAC,sCAAkB,EAAKI,KAAK,EACxB;QAAA,IAAGC,gBAAgB,QAAhBA,gBAAgB;QAAA,oBAChB,6BAAC,SAAS,oBAAKF,QAAQ;UAAE,gBAAgB,EAAEE;QAAiB,GAAG;MAAA,CAClE,CACgB;IAE7B,CAAC;EACL,CAAC;AACL,CAAC;AAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DataTableCellProps } from "@rmwc/data-table";
|
|
3
|
+
import { OnChangeFn, SortingState, Row } from "@tanstack/react-table";
|
|
4
|
+
import "@rmwc/data-table/data-table.css";
|
|
5
|
+
interface Column<T> {
|
|
6
|
+
header: string | number | JSX.Element;
|
|
7
|
+
cell?: (row: T) => string | number | JSX.Element;
|
|
8
|
+
meta?: DataTableCellProps;
|
|
9
|
+
className?: string;
|
|
10
|
+
enableSorting?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare type Columns<T> = {
|
|
13
|
+
[P in keyof T]?: Column<T>;
|
|
14
|
+
};
|
|
15
|
+
export declare type DefaultData = {
|
|
16
|
+
id: string;
|
|
17
|
+
selectable?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export declare type Sorting = SortingState;
|
|
20
|
+
export declare type OnSortingChange = OnChangeFn<Sorting>;
|
|
21
|
+
interface Props<T> {
|
|
22
|
+
/**
|
|
23
|
+
* Show or hide borders.
|
|
24
|
+
*/
|
|
25
|
+
bordered?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Controls whether "select all" action is allowed.
|
|
28
|
+
*/
|
|
29
|
+
canSelectAllRows?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Columns definition.
|
|
32
|
+
*/
|
|
33
|
+
columns: Columns<T>;
|
|
34
|
+
/**
|
|
35
|
+
* Data to display into DataTable body.
|
|
36
|
+
*/
|
|
37
|
+
data: T[];
|
|
38
|
+
/**
|
|
39
|
+
* Callback that is called to determine if the row is selectable.
|
|
40
|
+
*/
|
|
41
|
+
isRowSelectable?: (row: Row<T>) => boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Render the skeleton state at the initial data loading.
|
|
44
|
+
*/
|
|
45
|
+
loadingInitial?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Callback that receives the selected rows.
|
|
48
|
+
*/
|
|
49
|
+
onSelectRow?: (rows: T[]) => void;
|
|
50
|
+
/**
|
|
51
|
+
* Callback that receives current sorting state.
|
|
52
|
+
*/
|
|
53
|
+
onSortingChange?: OnSortingChange;
|
|
54
|
+
/**
|
|
55
|
+
* Selected rows.
|
|
56
|
+
*/
|
|
57
|
+
selectedRows?: T[];
|
|
58
|
+
/**
|
|
59
|
+
* Sorting state.
|
|
60
|
+
*/
|
|
61
|
+
sorting?: Sorting;
|
|
62
|
+
/**
|
|
63
|
+
* The number of columns to affix to the side of the table when scrolling.
|
|
64
|
+
*/
|
|
65
|
+
stickyColumns?: number;
|
|
66
|
+
/**
|
|
67
|
+
* The number of rows to affix to the top of the table when scrolling.
|
|
68
|
+
*/
|
|
69
|
+
stickyRows?: number;
|
|
70
|
+
}
|
|
71
|
+
export interface ColumnDirectionProps {
|
|
72
|
+
direction?: "asc" | "desc";
|
|
73
|
+
}
|
|
74
|
+
export declare const DataTable: <T extends Object & DefaultData>({ data, columns, onSelectRow, loadingInitial, stickyColumns, stickyRows, bordered, sorting, onSortingChange, isRowSelectable, canSelectAllRows, selectedRows }: Props<T>) => JSX.Element;
|
|
75
|
+
export {};
|