@webiny/ui 0.0.0-mt-3 → 0.0.0-unstable.5e7233243f
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 +4 -4
- package/Accordion/Accordion.js +27 -13
- package/Accordion/Accordion.js.map +1 -0
- package/Accordion/Accordion.stories.js +34 -23
- package/Accordion/Accordion.stories.js.map +1 -0
- package/Accordion/AccordionItem.d.ts +8 -8
- package/Accordion/AccordionItem.js +67 -38
- package/Accordion/AccordionItem.js.map +1 -0
- package/Accordion/index.js +31 -2
- package/Accordion/index.js.map +1 -0
- package/Alert/Alert.d.ts +4 -4
- package/Alert/Alert.js +21 -10
- package/Alert/Alert.js.map +1 -0
- package/Alert/Alert.stories.js +22 -13
- package/Alert/Alert.stories.js.map +1 -0
- package/Alert/index.js +18 -1
- package/Alert/index.js.map +1 -0
- package/AutoComplete/AutoComplete.d.ts +12 -19
- package/AutoComplete/AutoComplete.js +150 -101
- package/AutoComplete/AutoComplete.js.map +1 -0
- package/AutoComplete/AutoComplete.stories.js +27 -17
- package/AutoComplete/AutoComplete.stories.js.map +1 -0
- package/AutoComplete/MultiAutoComplete.d.ts +44 -40
- package/AutoComplete/MultiAutoComplete.js +317 -248
- package/AutoComplete/MultiAutoComplete.js.map +1 -0
- package/AutoComplete/MultiAutoComplete.stories.js +39 -28
- package/AutoComplete/MultiAutoComplete.stories.js.map +1 -0
- package/AutoComplete/index.js +31 -2
- package/AutoComplete/index.js.map +1 -0
- package/AutoComplete/styles.js +14 -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 +21 -6
- package/AutoComplete/utils.js.map +1 -0
- package/Avatar/Avatar.d.ts +5 -11
- package/Avatar/Avatar.js +39 -19
- package/Avatar/Avatar.js.map +1 -0
- package/Avatar/Avatar.stories.js +19 -10
- package/Avatar/Avatar.stories.js.map +1 -0
- package/Avatar/index.js +18 -1
- package/Avatar/index.js.map +1 -0
- package/Button/Button.d.ts +9 -23
- package/Button/Button.js +57 -41
- package/Button/Button.js.map +1 -0
- package/Button/Button.stories.js +42 -29
- package/Button/Button.stories.js.map +1 -0
- package/Button/Button.styles.d.ts +6 -0
- package/Button/Button.styles.js +15 -0
- package/Button/Button.styles.js.map +1 -0
- package/Button/CopyButton/CopyButton.d.ts +4 -7
- package/Button/CopyButton/CopyButton.js +24 -14
- package/Button/CopyButton/CopyButton.js.map +1 -0
- package/Button/CopyButton/CopyButton.stories.js +20 -10
- package/Button/CopyButton/CopyButton.stories.js.map +1 -0
- package/Button/IconButton/IconButton.d.ts +4 -7
- package/Button/IconButton/IconButton.js +14 -7
- package/Button/IconButton/IconButton.js.map +1 -0
- package/Button/IconButton/IconButton.stories.js +31 -19
- package/Button/IconButton/IconButton.stories.js.map +1 -0
- package/Button/index.js +44 -3
- package/Button/index.js.map +1 -0
- package/Carousel/Carousel.d.ts +3 -3
- package/Carousel/Carousel.js +34 -21
- package/Carousel/Carousel.js.map +1 -0
- package/Carousel/Carouser.stories.js +27 -17
- package/Carousel/Carouser.stories.js.map +1 -0
- package/Carousel/index.js +15 -1
- package/Carousel/index.js.map +1 -0
- package/Checkbox/Checkbox.d.ts +5 -9
- package/Checkbox/Checkbox.js +42 -28
- package/Checkbox/Checkbox.js.map +1 -0
- package/Checkbox/Checkbox.stories.js +27 -16
- package/Checkbox/Checkbox.stories.js.map +1 -0
- package/Checkbox/Checkbox.styles.js +11 -4
- package/Checkbox/Checkbox.styles.js.map +1 -0
- package/Checkbox/CheckboxGroup.d.ts +2 -2
- package/Checkbox/CheckboxGroup.js +36 -20
- package/Checkbox/CheckboxGroup.js.map +1 -0
- package/Checkbox/CheckboxGroup.stories.js +29 -18
- package/Checkbox/CheckboxGroup.stories.js.map +1 -0
- package/Checkbox/index.js +23 -2
- package/Checkbox/index.js.map +1 -0
- package/Chips/Chip.d.ts +3 -8
- package/Chips/Chip.js +21 -7
- package/Chips/Chip.js.map +1 -0
- package/Chips/Chips.d.ts +4 -4
- package/Chips/Chips.js +29 -12
- package/Chips/Chips.js.map +1 -0
- package/Chips/Chips.stories.js +33 -18
- package/Chips/Chips.stories.js.map +1 -0
- package/Chips/index.d.ts +0 -1
- package/Chips/index.js +31 -3
- package/Chips/index.js.map +1 -0
- package/Chips/styles.js +21 -9
- package/Chips/styles.js.map +1 -0
- package/CodeEditor/CodeEditor.d.ts +3 -8
- package/CodeEditor/CodeEditor.js +52 -35
- package/CodeEditor/CodeEditor.js.map +1 -0
- package/CodeEditor/CodeEditor.stories.js +30 -17
- package/CodeEditor/CodeEditor.stories.js.map +1 -0
- package/CodeEditor/index.js +18 -1
- package/CodeEditor/index.js.map +1 -0
- package/ColorPicker/ColorPicker.d.ts +9 -10
- package/ColorPicker/ColorPicker.js +63 -51
- package/ColorPicker/ColorPicker.js.map +1 -0
- package/ColorPicker/ColorPicker.stories.js +26 -15
- package/ColorPicker/ColorPicker.stories.js.map +1 -0
- package/ColorPicker/index.js +18 -1
- package/ColorPicker/index.js.map +1 -0
- package/ConfirmationDialog/ConfirmationDialog.d.ts +13 -13
- package/ConfirmationDialog/ConfirmationDialog.js +57 -45
- package/ConfirmationDialog/ConfirmationDialog.js.map +1 -0
- package/ConfirmationDialog/ConfirmationDialog.stories.js +22 -12
- package/ConfirmationDialog/ConfirmationDialog.stories.js.map +1 -0
- package/ConfirmationDialog/index.js +31 -2
- package/ConfirmationDialog/index.js.map +1 -0
- package/ConfirmationDialog/withConfirmation.d.ts +2 -2
- package/ConfirmationDialog/withConfirmation.js +19 -6
- package/ConfirmationDialog/withConfirmation.js.map +1 -0
- package/Dialog/Dialog.d.ts +22 -30
- package/Dialog/Dialog.js +75 -39
- package/Dialog/Dialog.js.map +1 -0
- package/Dialog/Dialog.stories.js +26 -16
- package/Dialog/Dialog.stories.js.map +1 -0
- package/Dialog/index.js +18 -1
- package/Dialog/index.js.map +1 -0
- package/Drawer/Drawer.d.ts +1 -1
- package/Drawer/Drawer.js +20 -6
- package/Drawer/Drawer.js.map +1 -0
- package/Drawer/Drawer.stories.js +26 -15
- package/Drawer/Drawer.stories.js.map +1 -0
- package/Drawer/index.js +18 -1
- package/Drawer/index.js.map +1 -0
- package/DynamicFieldset/Fieldset.d.ts +26 -16
- package/DynamicFieldset/Fieldset.js +82 -60
- package/DynamicFieldset/Fieldset.js.map +1 -0
- package/DynamicFieldset/index.js +15 -1
- package/DynamicFieldset/index.js.map +1 -0
- package/Elevation/Elevation.d.ts +1 -1
- package/Elevation/Elevation.js +17 -6
- package/Elevation/Elevation.js.map +1 -0
- package/Elevation/Elevation.stories.js +27 -16
- package/Elevation/Elevation.stories.js.map +1 -0
- package/Elevation/index.js +18 -1
- package/Elevation/index.js.map +1 -0
- package/FormElementMessage/FormElementMessage.d.ts +1 -1
- package/FormElementMessage/FormElementMessage.js +15 -5
- package/FormElementMessage/FormElementMessage.js.map +1 -0
- package/FormElementMessage/index.js +13 -1
- package/FormElementMessage/index.js.map +1 -0
- package/FullName/FullName.js +8 -1
- package/FullName/FullName.js.map +1 -0
- package/FullName/index.js +18 -1
- package/FullName/index.js.map +1 -0
- package/Grid/Grid.d.ts +1 -1
- package/Grid/Grid.js +26 -9
- package/Grid/Grid.js.map +1 -0
- package/Grid/Grid.stories.js +21 -12
- package/Grid/Grid.stories.js.map +1 -0
- package/Grid/index.js +18 -1
- package/Grid/index.js.map +1 -0
- package/Helpers/ClassNames.d.ts +4 -3
- package/Helpers/ClassNames.js +21 -10
- package/Helpers/ClassNames.js.map +1 -0
- package/Helpers/index.js +13 -2
- package/Helpers/index.js.map +1 -0
- package/Icon/Icon.d.ts +3 -6
- package/Icon/Icon.js +19 -10
- package/Icon/Icon.js.map +1 -0
- package/Icon/Icon.stories.js +33 -20
- package/Icon/Icon.stories.js.map +1 -0
- package/Icon/index.js +18 -1
- package/Icon/index.js.map +1 -0
- package/Image/Image.d.ts +5 -4
- package/Image/Image.js +19 -9
- package/Image/Image.js.map +1 -0
- package/Image/Image.stories.js +21 -11
- package/Image/Image.stories.js.map +1 -0
- package/Image/index.js +18 -1
- package/Image/index.js.map +1 -0
- package/ImageEditor/ImageEditor.d.ts +33 -34
- package/ImageEditor/ImageEditor.js +110 -83
- package/ImageEditor/ImageEditor.js.map +1 -0
- package/ImageEditor/index.js +18 -1
- package/ImageEditor/index.js.map +1 -0
- package/ImageEditor/toolbar/crop.js +34 -15
- package/ImageEditor/toolbar/crop.js.map +1 -0
- package/ImageEditor/toolbar/filter.js +76 -47
- package/ImageEditor/toolbar/filter.js.map +1 -0
- package/ImageEditor/toolbar/flip.js +35 -16
- package/ImageEditor/toolbar/flip.js.map +1 -0
- package/ImageEditor/toolbar/icons/index.js +69 -8
- package/ImageEditor/toolbar/icons/index.js.map +1 -0
- package/ImageEditor/toolbar/index.js +39 -4
- package/ImageEditor/toolbar/index.js.map +1 -0
- package/ImageEditor/toolbar/rotate.js +65 -36
- 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 +57 -35
- package/ImageUpload/Image.js.map +1 -0
- package/ImageUpload/ImageEditorDialog.d.ts +11 -6
- package/ImageUpload/ImageEditorDialog.js +54 -31
- package/ImageUpload/ImageEditorDialog.js.map +1 -0
- package/ImageUpload/MultiImageUpload.d.ts +10 -31
- package/ImageUpload/MultiImageUpload.js +117 -81
- package/ImageUpload/MultiImageUpload.js.map +1 -0
- package/ImageUpload/MultiImageUpload.stories.js +26 -15
- package/ImageUpload/MultiImageUpload.stories.js.map +1 -0
- package/ImageUpload/SingleImageUpload.d.ts +16 -37
- package/ImageUpload/SingleImageUpload.js +85 -54
- package/ImageUpload/SingleImageUpload.js.map +1 -0
- package/ImageUpload/SingleImageUpload.stories.js +27 -16
- package/ImageUpload/SingleImageUpload.stories.js.map +1 -0
- package/ImageUpload/index.js +39 -4
- package/ImageUpload/index.js.map +1 -0
- package/ImageUpload/styled.d.ts +20 -14
- package/ImageUpload/styled.js +29 -15
- package/ImageUpload/styled.js.map +1 -0
- package/Input/Input.d.ts +4 -8
- package/Input/Input.js +70 -41
- package/Input/Input.js.map +1 -0
- package/Input/Input.stories.js +62 -46
- package/Input/Input.stories.js.map +1 -0
- package/Input/__tests__/Input.test.js +65 -48
- package/Input/__tests__/Input.test.js.map +1 -0
- package/Input/index.js +18 -1
- package/Input/index.js.map +1 -0
- package/List/CollapsibleList/CollapsibleList.stories.js +27 -16
- package/List/CollapsibleList/CollapsibleList.stories.js.map +1 -0
- package/List/CollapsibleList/index.d.ts +2 -2
- package/List/CollapsibleList/index.js +21 -6
- package/List/CollapsibleList/index.js.map +1 -0
- package/List/DataList/DataList.d.ts +24 -43
- package/List/DataList/DataList.js +112 -68
- package/List/DataList/DataList.js.map +1 -0
- package/List/DataList/DataList.stories.js +37 -25
- package/List/DataList/DataList.stories.js.map +1 -0
- package/List/DataList/DataListModalOverlay/DataListModalOverlay.d.ts +8 -8
- package/List/DataList/DataListModalOverlay/DataListModalOverlay.js +29 -10
- package/List/DataList/DataListModalOverlay/DataListModalOverlay.js.map +1 -0
- package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.d.ts +3 -3
- package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.js +27 -9
- package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.js.map +1 -0
- package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.d.ts +9 -4
- package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.js +29 -8
- package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.js.map +1 -0
- package/List/DataList/DataListModalOverlay/index.js +35 -3
- package/List/DataList/DataListModalOverlay/index.js.map +1 -0
- package/List/DataList/DataListWithSections.d.ts +45 -0
- package/List/DataList/DataListWithSections.js +356 -0
- package/List/DataList/DataListWithSections.js.map +1 -0
- package/List/DataList/Loader.d.ts +2 -2
- package/List/DataList/Loader.js +29 -12
- package/List/DataList/Loader.js.map +1 -0
- package/List/DataList/NoData.d.ts +2 -2
- package/List/DataList/NoData.js +19 -6
- package/List/DataList/NoData.js.map +1 -0
- package/List/DataList/icons/index.d.ts +1 -1
- package/List/DataList/icons/index.js +83 -38
- package/List/DataList/icons/index.js.map +1 -0
- package/List/DataList/index.d.ts +1 -0
- package/List/DataList/index.js +64 -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 +92 -49
- package/List/List.js.map +1 -0
- package/List/List.stories.js +52 -37
- package/List/List.stories.js.map +1 -0
- package/List/icons/index.js +23 -3
- package/List/icons/index.js.map +1 -0
- package/List/index.d.ts +1 -1
- package/List/index.js +74 -3
- package/List/index.js.map +1 -0
- package/Menu/Menu.d.ts +14 -21
- package/Menu/Menu.js +57 -49
- package/Menu/Menu.js.map +1 -0
- package/Menu/Menu.stories.js +24 -14
- package/Menu/Menu.stories.js.map +1 -0
- package/Menu/index.js +18 -1
- package/Menu/index.js.map +1 -0
- package/Mosaic/Mosaic.d.ts +4 -14
- package/Mosaic/Mosaic.js +22 -5
- package/Mosaic/Mosaic.js.map +1 -0
- package/Mosaic/Mosaic.stories.js +37 -28
- package/Mosaic/Mosaic.stories.js.map +1 -0
- package/Mosaic/index.js +18 -1
- package/Mosaic/index.js.map +1 -0
- package/Progress/CircularProgress.d.ts +8 -16
- package/Progress/CircularProgress.js +38 -20
- package/Progress/CircularProgress.js.map +1 -0
- package/Progress/index.js +15 -1
- package/Progress/index.js.map +1 -0
- package/Radio/Radio.d.ts +2 -6
- package/Radio/Radio.js +42 -28
- package/Radio/Radio.js.map +1 -0
- package/Radio/Radio.styles.js +11 -4
- package/Radio/Radio.styles.js.map +1 -0
- package/Radio/RadioGroup.d.ts +1 -6
- package/Radio/RadioGroup.js +38 -26
- package/Radio/RadioGroup.js.map +1 -0
- package/Radio/RadioGroup.stories.js +29 -18
- package/Radio/RadioGroup.stories.js.map +1 -0
- package/Radio/index.js +23 -2
- package/Radio/index.js.map +1 -0
- package/RichTextEditor/RichTextEditor.d.ts +13 -9
- package/RichTextEditor/RichTextEditor.js +92 -57
- package/RichTextEditor/RichTextEditor.js.map +1 -0
- package/RichTextEditor/RichTextEditor.stories.js +22 -11
- package/RichTextEditor/RichTextEditor.stories.js.map +1 -0
- package/RichTextEditor/createPropsFromConfig.d.ts +11 -1
- package/RichTextEditor/createPropsFromConfig.js +20 -5
- package/RichTextEditor/createPropsFromConfig.js.map +1 -0
- package/RichTextEditor/index.d.ts +1 -0
- package/RichTextEditor/index.js +30 -2
- package/RichTextEditor/index.js.map +1 -0
- package/Ripple/Ripple.d.ts +4 -5
- package/Ripple/Ripple.js +16 -5
- package/Ripple/Ripple.js.map +1 -0
- package/Ripple/Ripple.stories.js +57 -42
- package/Ripple/Ripple.stories.js.map +1 -0
- package/Ripple/index.js +18 -1
- package/Ripple/index.js.map +1 -0
- package/Scrollbar/Scrollbar.d.ts +5 -5
- package/Scrollbar/Scrollbar.js +14 -4
- package/Scrollbar/Scrollbar.js.map +1 -0
- package/Scrollbar/Scrollbar.stories.js +18 -9
- package/Scrollbar/Scrollbar.stories.js.map +1 -0
- package/Scrollbar/index.js +18 -1
- package/Scrollbar/index.js.map +1 -0
- package/Section/Section.stories.js +22 -12
- package/Section/Section.stories.js.map +1 -0
- package/Section/index.d.ts +4 -5
- package/Section/index.js +30 -15
- package/Section/index.js.map +1 -0
- package/Select/Select.d.ts +7 -10
- package/Select/Select.js +101 -23
- package/Select/Select.js.map +1 -0
- package/Select/Select.stories.js +36 -25
- package/Select/Select.stories.js.map +1 -0
- package/Select/index.js +18 -1
- package/Select/index.js.map +1 -0
- package/Slider/Slider.d.ts +1 -6
- package/Slider/Slider.js +47 -33
- package/Slider/Slider.js.map +1 -0
- package/Slider/Slider.stories.js +27 -16
- package/Slider/Slider.stories.js.map +1 -0
- package/Slider/index.js +15 -1
- package/Slider/index.js.map +1 -0
- package/Snackbar/Snackbar.d.ts +5 -7
- package/Snackbar/Snackbar.js +38 -23
- package/Snackbar/Snackbar.js.map +1 -0
- package/Snackbar/Snackbar.stories.js +44 -30
- package/Snackbar/Snackbar.stories.js.map +1 -0
- package/Snackbar/index.js +19 -1
- package/Snackbar/index.js.map +1 -0
- package/Switch/Switch.d.ts +2 -6
- package/Switch/Switch.js +48 -33
- package/Switch/Switch.js.map +1 -0
- package/Switch/Switch.stories.js +27 -16
- package/Switch/Switch.stories.js.map +1 -0
- package/Switch/index.js +18 -1
- package/Switch/index.js.map +1 -0
- package/Tabs/Tab.d.ts +6 -2
- package/Tabs/Tab.js +37 -10
- package/Tabs/Tab.js.map +1 -0
- package/Tabs/Tabs.d.ts +43 -21
- package/Tabs/Tabs.js +131 -125
- package/Tabs/Tabs.js.map +1 -0
- package/Tabs/Tabs.stories.js +34 -22
- package/Tabs/Tabs.stories.js.map +1 -0
- package/Tabs/index.js +31 -2
- package/Tabs/index.js.map +1 -0
- package/Tags/Tags.d.ts +5 -10
- package/Tags/Tags.js +71 -47
- package/Tags/Tags.js.map +1 -0
- package/Tags/Tags.stories.js +27 -16
- package/Tags/Tags.stories.js.map +1 -0
- package/Tags/index.js +18 -1
- package/Tags/index.js.map +1 -0
- package/Tooltip/Tooltip.d.ts +9 -8
- package/Tooltip/Tooltip.js +44 -25
- package/Tooltip/Tooltip.js.map +1 -0
- package/Tooltip/Tooltip.stories.js +20 -11
- package/Tooltip/Tooltip.stories.js.map +1 -0
- package/Tooltip/index.js +18 -1
- package/Tooltip/index.js.map +1 -0
- package/TopAppBar/TopAppBar.d.ts +1 -1
- package/TopAppBar/TopAppBar.js +18 -7
- package/TopAppBar/TopAppBar.js.map +1 -0
- package/TopAppBar/TopAppBar.stories.js +39 -25
- package/TopAppBar/TopAppBar.stories.js.map +1 -0
- package/TopAppBar/TopAppBarActionItem.d.ts +1 -1
- package/TopAppBar/TopAppBarActionItem.js +14 -4
- package/TopAppBar/TopAppBarActionItem.js.map +1 -0
- package/TopAppBar/TopAppBarNavigationIcon.d.ts +1 -1
- package/TopAppBar/TopAppBarNavigationIcon.js +14 -4
- package/TopAppBar/TopAppBarNavigationIcon.js.map +1 -0
- package/TopAppBar/TopAppBarPrimary.js +18 -7
- package/TopAppBar/TopAppBarPrimary.js.map +1 -0
- package/TopAppBar/TopAppBarSecondary.js +18 -7
- package/TopAppBar/TopAppBarSecondary.js.map +1 -0
- package/TopAppBar/TopAppBarSection.d.ts +1 -1
- package/TopAppBar/TopAppBarSection.js +18 -7
- package/TopAppBar/TopAppBarSection.js.map +1 -0
- package/TopAppBar/TopAppBarTitle.d.ts +1 -1
- package/TopAppBar/TopAppBarTitle.js +18 -7
- package/TopAppBar/TopAppBarTitle.js.map +1 -0
- package/TopAppBar/index.js +96 -7
- package/TopAppBar/index.js.map +1 -0
- package/TopProgressBar/TopProgressBar.d.ts +7 -7
- package/TopProgressBar/TopProgressBar.js +20 -7
- package/TopProgressBar/TopProgressBar.js.map +1 -0
- package/TopProgressBar/TopProgressBar.stories.js +22 -12
- package/TopProgressBar/TopProgressBar.stories.js.map +1 -0
- package/TopProgressBar/hoc/index.js +15 -1
- package/TopProgressBar/hoc/index.js.map +1 -0
- package/TopProgressBar/hoc/withTopProgressBar.d.ts +1 -1
- package/TopProgressBar/hoc/withTopProgressBar.js +16 -5
- package/TopProgressBar/hoc/withTopProgressBar.js.map +1 -0
- package/TopProgressBar/index.js +18 -1
- package/TopProgressBar/index.js.map +1 -0
- package/Typography/Typography.d.ts +4 -4
- package/Typography/Typography.js +14 -4
- package/Typography/Typography.js.map +1 -0
- package/Typography/Typography.stories.js +43 -34
- package/Typography/Typography.stories.js.map +1 -0
- package/Typography/index.js +18 -1
- package/Typography/index.js.map +1 -0
- package/package.json +53 -61
- package/styles.scss +1 -1
- package/types.d.ts +2 -2
- 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
package/Dialog/Dialog.js
CHANGED
|
@@ -1,29 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.DialogTitle = exports.DialogContent = exports.DialogCancel = exports.DialogButton = exports.DialogActions = exports.DialogAccept = exports.Dialog = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
|
|
12
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
|
+
|
|
14
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
15
|
+
|
|
16
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
17
|
+
|
|
18
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
19
|
+
|
|
20
|
+
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
21
|
+
|
|
22
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
23
|
+
|
|
24
|
+
var _react = _interopRequireDefault(require("react"));
|
|
25
|
+
|
|
26
|
+
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
27
|
+
|
|
28
|
+
var _dialog = require("@rmwc/dialog");
|
|
29
|
+
|
|
30
|
+
var _Helpers = require("../Helpers");
|
|
31
|
+
|
|
8
32
|
var _excluded = ["children"];
|
|
9
|
-
import * as React from "react";
|
|
10
|
-
import ReactDOM from "react-dom";
|
|
11
|
-
import { Dialog as RmwcDialog, DialogContent as RmwcDialogContent, DialogTitle as RmwcDialogTitle, DialogActions as RmwcDialogActions, DialogButton as RmwcDialogButton } from "@rmwc/dialog";
|
|
12
|
-
import { getClasses } from "../Helpers";
|
|
13
|
-
export var Dialog = /*#__PURE__*/function (_React$Component) {
|
|
14
|
-
_inherits(Dialog, _React$Component);
|
|
15
33
|
|
|
16
|
-
|
|
34
|
+
var Dialog = /*#__PURE__*/function (_React$Component) {
|
|
35
|
+
(0, _inherits2.default)(Dialog, _React$Component);
|
|
36
|
+
|
|
37
|
+
var _super = (0, _createSuper2.default)(Dialog);
|
|
17
38
|
|
|
18
39
|
function Dialog(props) {
|
|
19
40
|
var _this;
|
|
20
41
|
|
|
21
|
-
|
|
22
|
-
|
|
42
|
+
(0, _classCallCheck2.default)(this, Dialog);
|
|
23
43
|
_this = _super.call(this, props);
|
|
44
|
+
/**
|
|
45
|
+
* We can safely cast
|
|
46
|
+
*/
|
|
24
47
|
|
|
25
|
-
|
|
26
|
-
|
|
48
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "container", void 0);
|
|
27
49
|
_this.container = document.getElementById("dialog-container");
|
|
28
50
|
|
|
29
51
|
if (!_this.container) {
|
|
@@ -38,64 +60,78 @@ export var Dialog = /*#__PURE__*/function (_React$Component) {
|
|
|
38
60
|
return _this;
|
|
39
61
|
}
|
|
40
62
|
|
|
41
|
-
|
|
63
|
+
(0, _createClass2.default)(Dialog, [{
|
|
42
64
|
key: "render",
|
|
43
65
|
value: function render() {
|
|
44
66
|
var _this$props = this.props,
|
|
45
67
|
children = _this$props.children,
|
|
46
|
-
props =
|
|
47
|
-
|
|
68
|
+
props = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
48
69
|
var container = this.container; // Let's pass "permanent" / "persistent" / "temporary" flags as "mode" prop instead.
|
|
49
70
|
|
|
50
|
-
return /*#__PURE__*/
|
|
71
|
+
return /*#__PURE__*/_reactDom.default.createPortal( /*#__PURE__*/_react.default.createElement(_dialog.Dialog, (0, _Helpers.getClasses)(props, "webiny-ui-dialog"), children), container);
|
|
51
72
|
}
|
|
52
73
|
}]);
|
|
53
|
-
|
|
54
74
|
return Dialog;
|
|
55
|
-
}(
|
|
75
|
+
}(_react.default.Component);
|
|
76
|
+
|
|
77
|
+
exports.Dialog = Dialog;
|
|
56
78
|
|
|
57
79
|
/**
|
|
58
80
|
* Dialog's header, which can accept DialogHeaderTitle component or any other set of components.
|
|
59
81
|
*/
|
|
60
|
-
|
|
61
|
-
return /*#__PURE__*/
|
|
82
|
+
var DialogTitle = function DialogTitle(props) {
|
|
83
|
+
return /*#__PURE__*/_react.default.createElement(_dialog.DialogTitle, (0, _Helpers.getClasses)(props, "webiny-ui-dialog__title"));
|
|
62
84
|
};
|
|
63
85
|
|
|
86
|
+
exports.DialogTitle = DialogTitle;
|
|
87
|
+
|
|
64
88
|
/**
|
|
65
89
|
* A simple component for showing dialog's body.
|
|
66
90
|
*/
|
|
67
|
-
|
|
68
|
-
return /*#__PURE__*/
|
|
91
|
+
var DialogContent = function DialogContent(props) {
|
|
92
|
+
return /*#__PURE__*/_react.default.createElement(_dialog.DialogContent, (0, _Helpers.getClasses)(props, "webiny-ui-dialog__content"));
|
|
69
93
|
};
|
|
70
94
|
|
|
95
|
+
exports.DialogContent = DialogContent;
|
|
96
|
+
|
|
71
97
|
/**
|
|
72
98
|
* Can be used to show accept and cancel buttons.
|
|
73
99
|
*/
|
|
74
|
-
|
|
75
|
-
return /*#__PURE__*/
|
|
100
|
+
var DialogActions = function DialogActions(props) {
|
|
101
|
+
return /*#__PURE__*/_react.default.createElement(_dialog.DialogActions, (0, _Helpers.getClasses)(props, "webiny-ui-dialog__actions"));
|
|
76
102
|
};
|
|
77
103
|
|
|
104
|
+
exports.DialogActions = DialogActions;
|
|
105
|
+
|
|
78
106
|
/**
|
|
79
107
|
* Use this to show a simple button.
|
|
80
108
|
*/
|
|
81
|
-
|
|
82
|
-
return /*#__PURE__*/
|
|
109
|
+
var DialogButton = function DialogButton(props) {
|
|
110
|
+
return /*#__PURE__*/_react.default.createElement(_dialog.DialogButton, (0, _Helpers.getClasses)(props, "webiny-ui-dialog__button"));
|
|
83
111
|
};
|
|
84
112
|
|
|
113
|
+
exports.DialogButton = DialogButton;
|
|
114
|
+
|
|
85
115
|
/**
|
|
86
116
|
* Use this to close the dialog without taking any additional action.
|
|
87
117
|
*/
|
|
88
|
-
|
|
89
|
-
return /*#__PURE__*/
|
|
90
|
-
action: "close"
|
|
118
|
+
var DialogCancel = function DialogCancel(props) {
|
|
119
|
+
return /*#__PURE__*/_react.default.createElement(DialogButton, Object.assign({}, (0, _Helpers.getClasses)(props, "webiny-ui-dialog__button webiny-ui-dialog__button--cancel"), {
|
|
120
|
+
action: "close",
|
|
121
|
+
"data-testid": "dialog-cancel"
|
|
91
122
|
}), props.children);
|
|
92
123
|
};
|
|
93
124
|
|
|
125
|
+
exports.DialogCancel = DialogCancel;
|
|
126
|
+
|
|
94
127
|
/**
|
|
95
128
|
* Use this to close the dialog without taking any additional action.
|
|
96
129
|
*/
|
|
97
|
-
|
|
98
|
-
return /*#__PURE__*/
|
|
99
|
-
action: "accept"
|
|
130
|
+
var DialogAccept = function DialogAccept(props) {
|
|
131
|
+
return /*#__PURE__*/_react.default.createElement(DialogButton, Object.assign({}, (0, _Helpers.getClasses)(props, "webiny-ui-dialog__button webiny-ui-dialog__button--accept"), {
|
|
132
|
+
action: "accept",
|
|
133
|
+
"data-testid": "dialog-accept"
|
|
100
134
|
}), props.children);
|
|
101
|
-
};
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
exports.DialogAccept = DialogAccept;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Dialog","props","container","document","getElementById","createElement","setAttribute","body","appendChild","children","ReactDOM","createPortal","getClasses","React","Component","DialogTitle","DialogContent","DialogActions","DialogButton","DialogCancel","DialogAccept"],"sources":["Dialog.tsx"],"sourcesContent":["import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport {\n Dialog as RmwcDialog,\n DialogProps as RmwcDialogProps,\n DialogOnCloseEventT,\n DialogContent as RmwcDialogContent,\n DialogContentProps as RmwcDialogContentProps,\n DialogTitle as RmwcDialogTitle,\n DialogTitleProps as RmwcDialogTitleProps,\n DialogActions as RmwcDialogActions,\n DialogActionsProps as RmwcDialogActionsProps,\n DialogButton as RmwcDialogButton,\n DialogButtonProps as RmwcDialogButtonProps\n} from \"@rmwc/dialog\";\nimport { getClasses } from \"~/Helpers\";\n\nexport type DialogOnClose = (event: DialogOnCloseEventT) => void;\n\nexport interface DialogProps extends RmwcDialogProps {\n className?: string;\n\n // Component's custom in-line styles.\n style?: React.CSSProperties;\n\n // If true, dialog will be permanently fixed inside of a view (works for temporary and persistent modes).\n open?: boolean;\n\n onClose?: (evt: DialogOnCloseEventT) => void;\n\n preventOutsideDismiss?: boolean;\n}\n\nexport class Dialog extends React.Component<DialogProps> {\n container: HTMLElement;\n\n constructor(props: DialogProps) {\n super(props);\n /**\n * We can safely cast\n */\n this.container = document.getElementById(\"dialog-container\") as HTMLElement;\n\n if (!this.container) {\n this.container = document.createElement(\"div\");\n this.container.setAttribute(\"id\", \"dialog-container\");\n const container = this.container;\n document.body && document.body.appendChild(container);\n }\n }\n\n public override render() {\n const { children, ...props } = this.props;\n const container = this.container;\n\n // Let's pass \"permanent\" / \"persistent\" / \"temporary\" flags as \"mode\" prop instead.\n return ReactDOM.createPortal(\n <RmwcDialog {...getClasses(props, \"webiny-ui-dialog\")}>{children}</RmwcDialog>,\n container\n );\n }\n}\n\nexport interface DialogTitleProps extends RmwcDialogTitleProps {\n /**\n * Title text.\n */\n children: React.ReactNode[] | React.ReactNode;\n}\n\n/**\n * Dialog's header, which can accept DialogHeaderTitle component or any other set of components.\n */\nexport const DialogTitle: React.FC<DialogTitleProps> = props => (\n <RmwcDialogTitle {...getClasses(props, \"webiny-ui-dialog__title\")} />\n);\n\nexport type DialogContentProps = RmwcDialogContentProps & {\n /**\n * Dialog content.\n */\n children: React.ReactNode[] | React.ReactNode;\n\n className?: string;\n};\n\n/**\n * A simple component for showing dialog's body.\n */\nexport const DialogContent: React.FC<DialogContentProps> = props => (\n <RmwcDialogContent {...getClasses(props, \"webiny-ui-dialog__content\")} />\n);\n\nexport interface DialogActionsProps extends RmwcDialogActionsProps {\n /**\n * Action buttons.\n */\n children: React.ReactNode[] | React.ReactNode;\n\n // Dialog component's custom in-line styles.\n style?: React.CSSProperties;\n}\n\n/**\n * Can be used to show accept and cancel buttons.\n */\nexport const DialogActions: React.FC<DialogActionsProps> = props => (\n <RmwcDialogActions {...getClasses(props, \"webiny-ui-dialog__actions\")} />\n);\n\ninterface DialogButtonProps extends RmwcDialogButtonProps {\n /**\n * Callback to execute then button is clicked.\n */\n onClick?: (e: React.MouseEvent) => void;\n\n className?: string;\n}\n\n/**\n * Use this to show a simple button.\n */\nexport const DialogButton: React.FC<DialogButtonProps> = props => (\n <RmwcDialogButton {...getClasses(props, \"webiny-ui-dialog__button\")} />\n);\n\ninterface DialogCancelProps extends RmwcDialogButtonProps {\n /**\n * Callback to execute then button is clicked.\n */\n onClick?: (e: React.MouseEvent) => void;\n}\n\n/**\n * Use this to close the dialog without taking any additional action.\n */\nexport const DialogCancel: React.FC<DialogCancelProps> = props => {\n return (\n <DialogButton\n {...getClasses(props, \"webiny-ui-dialog__button webiny-ui-dialog__button--cancel\")}\n action=\"close\"\n data-testid=\"dialog-cancel\"\n >\n {props.children}\n </DialogButton>\n );\n};\n\ninterface DialogAcceptProps extends RmwcDialogButtonProps {\n /**\n * Callback to execute then button is clicked.\n */\n onClick?: (e: React.MouseEvent) => void;\n}\n\n/**\n * Use this to close the dialog without taking any additional action.\n */\nexport const DialogAccept: React.FC<DialogAcceptProps> = props => {\n return (\n <DialogButton\n {...getClasses(props, \"webiny-ui-dialog__button webiny-ui-dialog__button--accept\")}\n action=\"accept\"\n data-testid=\"dialog-accept\"\n >\n {props.children}\n </DialogButton>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAaA;;;;IAkBaA,M;;;;;EAGT,gBAAYC,KAAZ,EAAgC;IAAA;;IAAA;IAC5B,0BAAMA,KAAN;IACA;AACR;AACA;;IAJoC;IAK5B,MAAKC,SAAL,GAAiBC,QAAQ,CAACC,cAAT,CAAwB,kBAAxB,CAAjB;;IAEA,IAAI,CAAC,MAAKF,SAAV,EAAqB;MACjB,MAAKA,SAAL,GAAiBC,QAAQ,CAACE,aAAT,CAAuB,KAAvB,CAAjB;;MACA,MAAKH,SAAL,CAAeI,YAAf,CAA4B,IAA5B,EAAkC,kBAAlC;;MACA,IAAMJ,SAAS,GAAG,MAAKA,SAAvB;MACAC,QAAQ,CAACI,IAAT,IAAiBJ,QAAQ,CAACI,IAAT,CAAcC,WAAd,CAA0BN,SAA1B,CAAjB;IACH;;IAZ2B;EAa/B;;;;WAED,kBAAyB;MACrB,kBAA+B,KAAKD,KAApC;MAAA,IAAQQ,QAAR,eAAQA,QAAR;MAAA,IAAqBR,KAArB;MACA,IAAMC,SAAS,GAAG,KAAKA,SAAvB,CAFqB,CAIrB;;MACA,oBAAOQ,iBAAA,CAASC,YAAT,eACH,6BAAC,cAAD,EAAgB,IAAAC,mBAAA,EAAWX,KAAX,EAAkB,kBAAlB,CAAhB,EAAwDQ,QAAxD,CADG,EAEHP,SAFG,CAAP;IAIH;;;EA3BuBW,cAAA,CAAMC,S;;;;AAqClC;AACA;AACA;AACO,IAAMC,WAAuC,GAAG,SAA1CA,WAA0C,CAAAd,KAAK;EAAA,oBACxD,6BAAC,mBAAD,EAAqB,IAAAW,mBAAA,EAAWX,KAAX,EAAkB,yBAAlB,CAArB,CADwD;AAAA,CAArD;;;;AAaP;AACA;AACA;AACO,IAAMe,aAA2C,GAAG,SAA9CA,aAA8C,CAAAf,KAAK;EAAA,oBAC5D,6BAAC,qBAAD,EAAuB,IAAAW,mBAAA,EAAWX,KAAX,EAAkB,2BAAlB,CAAvB,CAD4D;AAAA,CAAzD;;;;AAcP;AACA;AACA;AACO,IAAMgB,aAA2C,GAAG,SAA9CA,aAA8C,CAAAhB,KAAK;EAAA,oBAC5D,6BAAC,qBAAD,EAAuB,IAAAW,mBAAA,EAAWX,KAAX,EAAkB,2BAAlB,CAAvB,CAD4D;AAAA,CAAzD;;;;AAaP;AACA;AACA;AACO,IAAMiB,YAAyC,GAAG,SAA5CA,YAA4C,CAAAjB,KAAK;EAAA,oBAC1D,6BAAC,oBAAD,EAAsB,IAAAW,mBAAA,EAAWX,KAAX,EAAkB,0BAAlB,CAAtB,CAD0D;AAAA,CAAvD;;;;AAWP;AACA;AACA;AACO,IAAMkB,YAAyC,GAAG,SAA5CA,YAA4C,CAAAlB,KAAK,EAAI;EAC9D,oBACI,6BAAC,YAAD,oBACQ,IAAAW,mBAAA,EAAWX,KAAX,EAAkB,2DAAlB,CADR;IAEI,MAAM,EAAC,OAFX;IAGI,eAAY;EAHhB,IAKKA,KAAK,CAACQ,QALX,CADJ;AASH,CAVM;;;;AAmBP;AACA;AACA;AACO,IAAMW,YAAyC,GAAG,SAA5CA,YAA4C,CAAAnB,KAAK,EAAI;EAC9D,oBACI,6BAAC,YAAD,oBACQ,IAAAW,mBAAA,EAAWX,KAAX,EAAkB,2DAAlB,CADR;IAEI,MAAM,EAAC,QAFX;IAGI,eAAY;EAHhB,IAKKA,KAAK,CAACQ,QALX,CADJ;AASH,CAVM"}
|
package/Dialog/Dialog.stories.js
CHANGED
|
@@ -1,30 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
var _react = _interopRequireDefault(require("react"));
|
|
6
|
+
|
|
7
|
+
var _react2 = require("@storybook/react");
|
|
8
|
+
|
|
9
|
+
var _Story = require("@webiny/storybook-utils/Story");
|
|
10
|
+
|
|
11
|
+
var _README = _interopRequireDefault(require("./../Dialog/README.md"));
|
|
12
|
+
|
|
13
|
+
var _addonKnobs = require("@storybook/addon-knobs");
|
|
14
|
+
|
|
15
|
+
var _ = require(".");
|
|
16
|
+
|
|
17
|
+
var story = (0, _react2.storiesOf)("Components/Dialog", module);
|
|
18
|
+
story.addDecorator(_addonKnobs.withKnobs);
|
|
9
19
|
story.add("usage", function () {
|
|
10
|
-
var open = boolean("Open", false);
|
|
11
|
-
return /*#__PURE__*/
|
|
20
|
+
var open = (0, _addonKnobs.boolean)("Open", false);
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement(_Story.Story, null, /*#__PURE__*/_react.default.createElement(_Story.StoryReadme, null, _README.default), /*#__PURE__*/_react.default.createElement(_Story.StorySandbox, {
|
|
12
22
|
title: "dialog"
|
|
13
|
-
}, /*#__PURE__*/
|
|
23
|
+
}, /*#__PURE__*/_react.default.createElement(_Story.StorySandboxExample, {
|
|
14
24
|
title: "A list with all possible options"
|
|
15
|
-
}, "Toggle ", /*#__PURE__*/
|
|
25
|
+
}, "Toggle ", /*#__PURE__*/_react.default.createElement("code", null, "open"), " prop via the bottom knobs.", /*#__PURE__*/_react.default.createElement("br", null), /*#__PURE__*/_react.default.createElement("br", null), "Note that instead of using ", /*#__PURE__*/_react.default.createElement("code", null, "DialogFooter.Button"), " with", " ", /*#__PURE__*/_react.default.createElement("code", null, "accept"), " or ", /*#__PURE__*/_react.default.createElement("code", null, "cancel"), " prop, you can use a shorter", " ", /*#__PURE__*/_react.default.createElement("code", null, "DialogAccept"), " and ", /*#__PURE__*/_react.default.createElement("code", null, "DialogCancel"), " components respectively.", /*#__PURE__*/_react.default.createElement(_.Dialog, {
|
|
16
26
|
open: open
|
|
17
|
-
}, /*#__PURE__*/
|
|
27
|
+
}, /*#__PURE__*/_react.default.createElement(_.DialogTitle, null, "Delete confirmation"), /*#__PURE__*/_react.default.createElement(_.DialogContent, null, "Are you sure you want to delete?"), /*#__PURE__*/_react.default.createElement(_.DialogActions, null, /*#__PURE__*/_react.default.createElement(_.DialogCancel, {
|
|
18
28
|
onClick: function onClick() {
|
|
19
29
|
return console.log("Cancel");
|
|
20
30
|
}
|
|
21
|
-
}, "Cancel"), /*#__PURE__*/
|
|
31
|
+
}, "Cancel"), /*#__PURE__*/_react.default.createElement(_.DialogAccept, {
|
|
22
32
|
onClick: function onClick() {
|
|
23
33
|
return console.log("Accept");
|
|
24
34
|
}
|
|
25
|
-
}, "OK")))), /*#__PURE__*/
|
|
35
|
+
}, "OK")))), /*#__PURE__*/_react.default.createElement(_Story.StorySandboxCode, null, "\n <Dialog open={".concat(open, "}>\n <DialogTitle>\n Delete confirmation\n </DialogTitle>\n <DialogBody>Are you sure you want to delete?</DialogBody>\n <DialogFooter>\n <DialogCancel onClick={() => console.log(\"Cancel\")}>Cancel</DialogCancel>\n <DialogAccept onClick={() => console.log(\"Accept\")}>OK</DialogAccept>\n </DialogFooter>\n </Dialog>\n "))));
|
|
26
36
|
}, {
|
|
27
37
|
info: {
|
|
28
|
-
propTables: [Dialog, DialogButton, DialogAccept, DialogCancel, DialogActions, DialogTitle, DialogContent]
|
|
38
|
+
propTables: [_.Dialog, _.DialogButton, _.DialogAccept, _.DialogCancel, _.DialogActions, _.DialogTitle, _.DialogContent]
|
|
29
39
|
}
|
|
30
40
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["story","storiesOf","module","addDecorator","withKnobs","add","open","boolean","readme","console","log","info","propTables","Dialog","DialogButton","DialogAccept","DialogCancel","DialogActions","DialogTitle","DialogContent"],"sources":["Dialog.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 \"./../Dialog/README.md\";\nimport { withKnobs, boolean } from \"@storybook/addon-knobs\";\n\nimport {\n Dialog,\n DialogButton,\n DialogAccept,\n DialogCancel,\n DialogActions,\n DialogTitle,\n DialogContent\n} from \".\";\n\nconst story = storiesOf(\"Components/Dialog\", module);\nstory.addDecorator(withKnobs);\n\nstory.add(\n \"usage\",\n () => {\n const open = boolean(\"Open\", false);\n\n return (\n <Story>\n <StoryReadme>{readme}</StoryReadme>\n <StorySandbox title={\"dialog\"}>\n <StorySandboxExample title={\"A list with all possible options\"}>\n Toggle <code>open</code> prop via the bottom knobs.\n <br />\n <br />\n Note that instead of using <code>DialogFooter.Button</code> with{\" \"}\n <code>accept</code> or <code>cancel</code> prop, you can use a shorter{\" \"}\n <code>DialogAccept</code> and <code>DialogCancel</code> components\n respectively.\n <Dialog open={open}>\n <DialogTitle>Delete confirmation</DialogTitle>\n <DialogContent>Are you sure you want to delete?</DialogContent>\n <DialogActions>\n <DialogCancel onClick={() => console.log(\"Cancel\")}>\n Cancel\n </DialogCancel>\n <DialogAccept onClick={() => console.log(\"Accept\")}>\n OK\n </DialogAccept>\n </DialogActions>\n </Dialog>\n </StorySandboxExample>\n <StorySandboxCode>\n {`\n <Dialog open={${open}}>\n <DialogTitle>\n Delete confirmation\n </DialogTitle>\n <DialogBody>Are you sure you want to delete?</DialogBody>\n <DialogFooter>\n <DialogCancel onClick={() => console.log(\"Cancel\")}>Cancel</DialogCancel>\n <DialogAccept onClick={() => console.log(\"Accept\")}>OK</DialogAccept>\n </DialogFooter>\n </Dialog>\n `}\n </StorySandboxCode>\n </StorySandbox>\n </Story>\n );\n },\n {\n info: {\n propTables: [\n Dialog,\n DialogButton,\n DialogAccept,\n DialogCancel,\n DialogActions,\n DialogTitle,\n DialogContent\n ]\n }\n }\n);\n"],"mappings":";;;;AAAA;;AACA;;AACA;;AAOA;;AACA;;AAEA;;AAUA,IAAMA,KAAK,GAAG,IAAAC,iBAAA,EAAU,mBAAV,EAA+BC,MAA/B,CAAd;AACAF,KAAK,CAACG,YAAN,CAAmBC,qBAAnB;AAEAJ,KAAK,CAACK,GAAN,CACI,OADJ,EAEI,YAAM;EACF,IAAMC,IAAI,GAAG,IAAAC,mBAAA,EAAQ,MAAR,EAAgB,KAAhB,CAAb;EAEA,oBACI,6BAAC,YAAD,qBACI,6BAAC,kBAAD,QAAcC,eAAd,CADJ,eAEI,6BAAC,mBAAD;IAAc,KAAK,EAAE;EAArB,gBACI,6BAAC,0BAAD;IAAqB,KAAK,EAAE;EAA5B,2BACW,kDADX,8CAEI,wCAFJ,eAGI,wCAHJ,8CAI+B,iEAJ/B,WAIqE,GAJrE,eAKI,oDALJ,uBAK2B,oDAL3B,kCAK2E,GAL3E,eAMI,0DANJ,wBAMkC,0DANlC,4CAQI,6BAAC,QAAD;IAAQ,IAAI,EAAEF;EAAd,gBACI,6BAAC,aAAD,8BADJ,eAEI,6BAAC,eAAD,2CAFJ,eAGI,6BAAC,eAAD,qBACI,6BAAC,cAAD;IAAc,OAAO,EAAE;MAAA,OAAMG,OAAO,CAACC,GAAR,CAAY,QAAZ,CAAN;IAAA;EAAvB,YADJ,eAII,6BAAC,cAAD;IAAc,OAAO,EAAE;MAAA,OAAMD,OAAO,CAACC,GAAR,CAAY,QAAZ,CAAN;IAAA;EAAvB,QAJJ,CAHJ,CARJ,CADJ,eAsBI,6BAAC,uBAAD,sDAEgBJ,IAFhB,+iBAtBJ,CAFJ,CADJ;AA0CH,CA/CL,EAgDI;EACIK,IAAI,EAAE;IACFC,UAAU,EAAE,CACRC,QADQ,EAERC,cAFQ,EAGRC,cAHQ,EAIRC,cAJQ,EAKRC,eALQ,EAMRC,aANQ,EAORC,eAPQ;EADV;AADV,CAhDJ"}
|
package/Dialog/index.js
CHANGED
|
@@ -1 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _Dialog = require("./Dialog");
|
|
8
|
+
|
|
9
|
+
Object.keys(_Dialog).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _Dialog[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _Dialog[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Dialog\";\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
package/Drawer/Drawer.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { DrawerProps as RmwcDrawerProps, DrawerHeaderProps as RmwcDrawerHeaderProps, DrawerContentProps as RmwcDrawerContentProps } from "@rmwc/drawer";
|
|
3
3
|
declare type DrawerHeaderProps = RmwcDrawerHeaderProps & {
|
|
4
4
|
children: any;
|
package/Drawer/Drawer.js
CHANGED
|
@@ -1,25 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.DrawerHeader = exports.DrawerContent = exports.Drawer = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _drawer = require("@rmwc/drawer");
|
|
3
13
|
|
|
4
14
|
/**
|
|
5
15
|
* Shows header of the drawer.
|
|
6
16
|
*/
|
|
7
17
|
var DrawerHeader = function DrawerHeader(props) {
|
|
8
|
-
return /*#__PURE__*/
|
|
18
|
+
return /*#__PURE__*/_react.default.createElement(_drawer.DrawerHeader, props);
|
|
9
19
|
};
|
|
10
20
|
|
|
21
|
+
exports.DrawerHeader = DrawerHeader;
|
|
22
|
+
|
|
11
23
|
/**
|
|
12
24
|
* Shows drawer content. It can be anything, but commonly a List component would suffice here.
|
|
13
25
|
*/
|
|
14
26
|
var DrawerContent = function DrawerContent(props) {
|
|
15
|
-
return /*#__PURE__*/
|
|
27
|
+
return /*#__PURE__*/_react.default.createElement(_drawer.DrawerContent, props);
|
|
16
28
|
};
|
|
17
29
|
|
|
30
|
+
exports.DrawerContent = DrawerContent;
|
|
31
|
+
|
|
18
32
|
/**
|
|
19
33
|
* Use Drawer component to display navigation for the whole app or just a small section of it.
|
|
20
34
|
*/
|
|
21
35
|
var Drawer = function Drawer(props) {
|
|
22
|
-
return /*#__PURE__*/
|
|
36
|
+
return /*#__PURE__*/_react.default.createElement(_drawer.Drawer, props);
|
|
23
37
|
};
|
|
24
38
|
|
|
25
|
-
|
|
39
|
+
exports.Drawer = Drawer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DrawerHeader","props","DrawerContent","Drawer"],"sources":["Drawer.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n Drawer as RmwcDrawer,\n DrawerContent as RmwcDrawerContent,\n DrawerHeader as RmwcDrawerHeader,\n DrawerProps as RmwcDrawerProps,\n DrawerHeaderProps as RmwcDrawerHeaderProps,\n DrawerContentProps as RmwcDrawerContentProps\n} from \"@rmwc/drawer\";\n\ntype DrawerHeaderProps = RmwcDrawerHeaderProps & {\n children: any;\n className?: string;\n};\n\n/**\n * Shows header of the drawer.\n */\nconst DrawerHeader = (props: DrawerHeaderProps) => <RmwcDrawerHeader {...props} />;\n\nexport type DrawerContentProps = RmwcDrawerContentProps & {\n /**\n * Drawer direction.\n */\n dir?: string;\n /**\n * Drawer content.\n */\n children: React.ReactNode;\n\n /**\n * CSS class name\n */\n className?: string;\n};\n\n/**\n * Shows drawer content. It can be anything, but commonly a List component would suffice here.\n */\nconst DrawerContent = (props: DrawerContentProps) => <RmwcDrawerContent {...props} />;\n\ntype DrawerProps = RmwcDrawerProps & {\n /**\n * Drawer direction.\n */\n dir?: string;\n /**\n * Drawer content.\n */\n children: React.ReactNode;\n\n /**\n * CSS class name\n */\n className?: string;\n};\n/**\n * Use Drawer component to display navigation for the whole app or just a small section of it.\n */\nconst Drawer = (props: DrawerProps) => {\n return <RmwcDrawer {...props} />;\n};\n\nexport { Drawer, DrawerHeader, DrawerContent };\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAcA;AACA;AACA;AACA,IAAMA,YAAY,GAAG,SAAfA,YAAe,CAACC,KAAD;EAAA,oBAA8B,6BAAC,oBAAD,EAAsBA,KAAtB,CAA9B;AAAA,CAArB;;;;AAkBA;AACA;AACA;AACA,IAAMC,aAAa,GAAG,SAAhBA,aAAgB,CAACD,KAAD;EAAA,oBAA+B,6BAAC,qBAAD,EAAuBA,KAAvB,CAA/B;AAAA,CAAtB;;;;AAiBA;AACA;AACA;AACA,IAAME,MAAM,GAAG,SAATA,MAAS,CAACF,KAAD,EAAwB;EACnC,oBAAO,6BAAC,cAAD,EAAgBA,KAAhB,CAAP;AACH,CAFD"}
|
package/Drawer/Drawer.stories.js
CHANGED
|
@@ -1,23 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
var _react = _interopRequireDefault(require("react"));
|
|
6
|
+
|
|
7
|
+
var _react2 = require("@storybook/react");
|
|
8
|
+
|
|
9
|
+
var _Story = require("@webiny/storybook-utils/Story");
|
|
10
|
+
|
|
11
|
+
var _List = require("./../List");
|
|
12
|
+
|
|
13
|
+
var _README = _interopRequireDefault(require("./../Drawer/README.md"));
|
|
14
|
+
|
|
15
|
+
var _addonKnobs = require("@storybook/addon-knobs");
|
|
16
|
+
|
|
17
|
+
var _Drawer = require("./Drawer");
|
|
18
|
+
|
|
19
|
+
var story = (0, _react2.storiesOf)("Components/Drawer", module);
|
|
20
|
+
story.addDecorator(_addonKnobs.withKnobs);
|
|
10
21
|
story.add("usage", function () {
|
|
11
|
-
var open = boolean("Open", true);
|
|
12
|
-
return /*#__PURE__*/
|
|
22
|
+
var open = (0, _addonKnobs.boolean)("Open", true);
|
|
23
|
+
return /*#__PURE__*/_react.default.createElement(_Story.Story, null, /*#__PURE__*/_react.default.createElement(_Story.StoryReadme, null, _README.default), /*#__PURE__*/_react.default.createElement(_Story.StorySandbox, {
|
|
13
24
|
title: "drawer"
|
|
14
|
-
}, /*#__PURE__*/
|
|
25
|
+
}, /*#__PURE__*/_react.default.createElement(_Story.StorySandboxExample, {
|
|
15
26
|
title: "A list with all possible options"
|
|
16
|
-
}, /*#__PURE__*/
|
|
27
|
+
}, /*#__PURE__*/_react.default.createElement(_Drawer.Drawer, {
|
|
17
28
|
open: open
|
|
18
|
-
}, /*#__PURE__*/
|
|
29
|
+
}, /*#__PURE__*/_react.default.createElement(_Drawer.DrawerHeader, null, "Main Menu"), /*#__PURE__*/_react.default.createElement(_Drawer.DrawerContent, null, /*#__PURE__*/_react.default.createElement(_List.List, null, /*#__PURE__*/_react.default.createElement(_List.ListItem, null, "Users"), /*#__PURE__*/_react.default.createElement(_List.ListItem, null, "Companies"), /*#__PURE__*/_react.default.createElement(_List.ListItem, null, "Brands"), /*#__PURE__*/_react.default.createElement(_List.ListItem, null, "ACL"), /*#__PURE__*/_react.default.createElement(_List.ListItem, null, "Settings"))))), /*#__PURE__*/_react.default.createElement(_Story.StorySandboxCode, null, "\n <Drawer>\n <DrawerHeader>Main Menu</DrawerHeader>\n <DrawerContent>\n <List>\n <ListItem>Users</ListItem>\n <ListItem>Companies</ListItem>\n <ListItem>Brands</ListItem>\n <ListItem>ACL</ListItem>\n <ListItem>Settings</ListItem>\n </List>\n </DrawerContent>\n </Drawer>\n ")));
|
|
19
30
|
}, {
|
|
20
31
|
info: {
|
|
21
|
-
propTables: [Drawer, DrawerHeader, DrawerContent]
|
|
32
|
+
propTables: [_Drawer.Drawer, _Drawer.DrawerHeader, _Drawer.DrawerContent]
|
|
22
33
|
}
|
|
23
34
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["story","storiesOf","module","addDecorator","withKnobs","add","open","boolean","readme","info","propTables","Drawer","DrawerHeader","DrawerContent"],"sources":["Drawer.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 { List, ListItem } from \"./../List\";\n\nimport readme from \"./../Drawer/README.md\";\nimport { withKnobs, boolean } from \"@storybook/addon-knobs\";\nimport { Drawer, DrawerHeader, DrawerContent } from \"./Drawer\";\n\nconst story = storiesOf(\"Components/Drawer\", module);\nstory.addDecorator(withKnobs);\n\nstory.add(\n \"usage\",\n () => {\n const open = boolean(\"Open\", true);\n\n return (\n <Story>\n <StoryReadme>{readme}</StoryReadme>\n <StorySandbox title={\"drawer\"}>\n <StorySandboxExample title={\"A list with all possible options\"}>\n <Drawer open={open}>\n <DrawerHeader>Main Menu</DrawerHeader>\n <DrawerContent>\n <List>\n <ListItem>Users</ListItem>\n <ListItem>Companies</ListItem>\n <ListItem>Brands</ListItem>\n <ListItem>ACL</ListItem>\n <ListItem>Settings</ListItem>\n </List>\n </DrawerContent>\n </Drawer>\n </StorySandboxExample>\n <StorySandboxCode>\n {`\n <Drawer>\n <DrawerHeader>Main Menu</DrawerHeader>\n <DrawerContent>\n <List>\n <ListItem>Users</ListItem>\n <ListItem>Companies</ListItem>\n <ListItem>Brands</ListItem>\n <ListItem>ACL</ListItem>\n <ListItem>Settings</ListItem>\n </List>\n </DrawerContent>\n </Drawer>\n `}\n </StorySandboxCode>\n </StorySandbox>\n </Story>\n );\n },\n { info: { propTables: [Drawer, DrawerHeader, DrawerContent] } }\n);\n"],"mappings":";;;;AAAA;;AACA;;AACA;;AAOA;;AAEA;;AACA;;AACA;;AAEA,IAAMA,KAAK,GAAG,IAAAC,iBAAA,EAAU,mBAAV,EAA+BC,MAA/B,CAAd;AACAF,KAAK,CAACG,YAAN,CAAmBC,qBAAnB;AAEAJ,KAAK,CAACK,GAAN,CACI,OADJ,EAEI,YAAM;EACF,IAAMC,IAAI,GAAG,IAAAC,mBAAA,EAAQ,MAAR,EAAgB,IAAhB,CAAb;EAEA,oBACI,6BAAC,YAAD,qBACI,6BAAC,kBAAD,QAAcC,eAAd,CADJ,eAEI,6BAAC,mBAAD;IAAc,KAAK,EAAE;EAArB,gBACI,6BAAC,0BAAD;IAAqB,KAAK,EAAE;EAA5B,gBACI,6BAAC,cAAD;IAAQ,IAAI,EAAEF;EAAd,gBACI,6BAAC,oBAAD,oBADJ,eAEI,6BAAC,qBAAD,qBACI,6BAAC,UAAD,qBACI,6BAAC,cAAD,gBADJ,eAEI,6BAAC,cAAD,oBAFJ,eAGI,6BAAC,cAAD,iBAHJ,eAII,6BAAC,cAAD,cAJJ,eAKI,6BAAC,cAAD,mBALJ,CADJ,CAFJ,CADJ,CADJ,eAeI,6BAAC,uBAAD,4mBAfJ,CAFJ,CADJ;AAqCH,CA1CL,EA2CI;EAAEG,IAAI,EAAE;IAAEC,UAAU,EAAE,CAACC,cAAD,EAASC,oBAAT,EAAuBC,qBAAvB;EAAd;AAAR,CA3CJ"}
|
package/Drawer/index.js
CHANGED
|
@@ -1 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _Drawer = require("./Drawer");
|
|
8
|
+
|
|
9
|
+
Object.keys(_Drawer).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _Drawer[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _Drawer[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Drawer\";\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1,28 +1,38 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface ChildrenRenderPropRowCallableParams {
|
|
3
|
+
index: number;
|
|
4
|
+
data: any;
|
|
5
|
+
}
|
|
6
|
+
interface ChildrenRenderPropRowCallable {
|
|
7
|
+
(params: ChildrenRenderPropRowCallableParams): React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
interface ChildrenRenderPropHeaderCallable {
|
|
10
|
+
(): React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
interface ChildrenRenderPropEmptyCallable {
|
|
13
|
+
(): React.ReactNode;
|
|
14
|
+
}
|
|
2
15
|
interface ChildrenRenderProp {
|
|
3
16
|
actions: {
|
|
4
17
|
add: Function;
|
|
5
18
|
remove: Function;
|
|
6
19
|
};
|
|
7
|
-
header:
|
|
8
|
-
row:
|
|
9
|
-
empty:
|
|
20
|
+
header: (cb: ChildrenRenderPropHeaderCallable) => React.ReactNode;
|
|
21
|
+
row: (cb: ChildrenRenderPropRowCallable) => React.ReactNode;
|
|
22
|
+
empty: (cb: ChildrenRenderPropEmptyCallable) => React.ReactNode;
|
|
10
23
|
}
|
|
11
|
-
|
|
12
|
-
value?:
|
|
24
|
+
interface FieldsetProps {
|
|
25
|
+
value?: any[];
|
|
13
26
|
description?: string;
|
|
14
27
|
validation?: {
|
|
15
28
|
isValid: null | boolean;
|
|
16
29
|
message?: string;
|
|
17
30
|
};
|
|
18
|
-
onChange
|
|
31
|
+
onChange: Function;
|
|
19
32
|
children: (props: ChildrenRenderProp) => React.ReactNode;
|
|
20
|
-
}
|
|
33
|
+
}
|
|
21
34
|
declare class Fieldset extends React.Component<FieldsetProps> {
|
|
22
|
-
static defaultProps:
|
|
23
|
-
value: any[];
|
|
24
|
-
description: any;
|
|
25
|
-
};
|
|
35
|
+
static defaultProps: Partial<FieldsetProps>;
|
|
26
36
|
header: React.ReactNode;
|
|
27
37
|
rows: React.ReactNode;
|
|
28
38
|
empty: React.ReactNode;
|
|
@@ -32,10 +42,10 @@ declare class Fieldset extends React.Component<FieldsetProps> {
|
|
|
32
42
|
};
|
|
33
43
|
removeData: (index: number) => void;
|
|
34
44
|
addData: (index?: number) => void;
|
|
35
|
-
renderHeader: (cb: () => React.ReactNode) =>
|
|
36
|
-
renderRow: (cb:
|
|
37
|
-
renderEmpty: (cb: () => React.ReactNode) =>
|
|
38
|
-
renderComponent():
|
|
45
|
+
renderHeader: (cb: () => React.ReactNode) => React.ReactNode;
|
|
46
|
+
renderRow: (cb: ChildrenRenderPropRowCallable) => React.ReactNode;
|
|
47
|
+
renderEmpty: (cb: () => React.ReactNode) => React.ReactNode;
|
|
48
|
+
renderComponent(): React.ReactNode;
|
|
39
49
|
render(): JSX.Element;
|
|
40
50
|
}
|
|
41
51
|
export default Fieldset;
|