@webiny/ui 0.0.0-mt-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/Accordion.d.ts +19 -0
- package/Accordion/Accordion.js +30 -0
- package/Accordion/Accordion.stories.d.ts +1 -0
- package/Accordion/Accordion.stories.js +43 -0
- package/Accordion/AccordionItem.d.ts +33 -0
- package/Accordion/AccordionItem.js +124 -0
- package/Accordion/README.md +11 -0
- package/Accordion/icons/round-keyboard_arrow_down-24px.svg +16 -0
- package/Accordion/icons/round-keyboard_arrow_up-24px.svg +16 -0
- package/Accordion/icons/round-settings-24px.svg +21 -0
- package/Accordion/index.d.ts +2 -0
- package/Accordion/index.js +2 -0
- package/Alert/Alert.d.ts +14 -0
- package/Alert/Alert.js +52 -0
- package/Alert/Alert.stories.d.ts +1 -0
- package/Alert/Alert.stories.js +29 -0
- package/Alert/README.md +11 -0
- package/Alert/index.d.ts +1 -0
- package/Alert/index.js +1 -0
- package/AutoComplete/AutoComplete.d.ts +37 -0
- package/AutoComplete/AutoComplete.js +299 -0
- package/AutoComplete/AutoComplete.stories.d.ts +1 -0
- package/AutoComplete/AutoComplete.stories.js +76 -0
- package/AutoComplete/AutoCompleteReadme.md +11 -0
- package/AutoComplete/MultiAutoComplete.d.ts +80 -0
- package/AutoComplete/MultiAutoComplete.js +569 -0
- package/AutoComplete/MultiAutoComplete.stories.d.ts +1 -0
- package/AutoComplete/MultiAutoComplete.stories.js +132 -0
- package/AutoComplete/MultiAutoCompleteReadme.md +11 -0
- package/AutoComplete/icons/baseline-close-24px.svg +4 -0
- package/AutoComplete/icons/delete.svg +12 -0
- package/AutoComplete/icons/navigate_before-24px.svg +1 -0
- package/AutoComplete/icons/navigate_next-24px.svg +1 -0
- package/AutoComplete/icons/reorder_black_24dp.svg +1 -0
- package/AutoComplete/icons/skip_next-24px.svg +1 -0
- package/AutoComplete/icons/skip_previous-24px.svg +1 -0
- package/AutoComplete/icons/spinner.svg +3 -0
- package/AutoComplete/index.d.ts +2 -0
- package/AutoComplete/index.js +2 -0
- package/AutoComplete/styles.d.ts +2 -0
- package/AutoComplete/styles.js +37 -0
- package/AutoComplete/types.d.ts +62 -0
- package/AutoComplete/types.js +1 -0
- package/AutoComplete/utils.d.ts +9 -0
- package/AutoComplete/utils.js +19 -0
- package/Avatar/Avatar.d.ts +49 -0
- package/Avatar/Avatar.js +80 -0
- package/Avatar/Avatar.stories.d.ts +1 -0
- package/Avatar/Avatar.stories.js +27 -0
- package/Avatar/README.md +11 -0
- package/Avatar/index.d.ts +1 -0
- package/Avatar/index.js +1 -0
- package/Button/Button.d.ts +58 -0
- package/Button/Button.js +139 -0
- package/Button/Button.stories.d.ts +1 -0
- package/Button/Button.stories.js +53 -0
- package/Button/CopyButton/CopyButton.d.ts +14 -0
- package/Button/CopyButton/CopyButton.js +32 -0
- package/Button/CopyButton/CopyButton.stories.d.ts +1 -0
- package/Button/CopyButton/CopyButton.stories.js +18 -0
- package/Button/CopyButton/README.md +11 -0
- package/Button/IconButton/IconButton.d.ts +39 -0
- package/Button/IconButton/IconButton.js +31 -0
- package/Button/IconButton/IconButton.stories.d.ts +1 -0
- package/Button/IconButton/IconButton.stories.js +38 -0
- package/Button/IconButton/README.md +15 -0
- package/Button/README.md +28 -0
- package/Button/assets/baseline-cloud_done-24px.svg +3 -0
- package/Button/assets/file_copy-24px.svg +1 -0
- package/Button/assets/round-more_vert-24px.svg +12 -0
- package/Button/index.d.ts +3 -0
- package/Button/index.js +3 -0
- package/Carousel/Carousel.d.ts +19 -0
- package/Carousel/Carousel.js +46 -0
- package/Carousel/Carouser.stories.d.ts +1 -0
- package/Carousel/Carouser.stories.js +29 -0
- package/Carousel/README.md +15 -0
- package/Carousel/index.d.ts +1 -0
- package/Carousel/index.js +1 -0
- package/Checkbox/Checkbox.d.ts +25 -0
- package/Checkbox/Checkbox.js +76 -0
- package/Checkbox/Checkbox.stories.d.ts +1 -0
- package/Checkbox/Checkbox.stories.js +28 -0
- package/Checkbox/Checkbox.styles.d.ts +6 -0
- package/Checkbox/Checkbox.styles.js +15 -0
- package/Checkbox/CheckboxGroup.d.ts +15 -0
- package/Checkbox/CheckboxGroup.js +63 -0
- package/Checkbox/CheckboxGroup.stories.d.ts +1 -0
- package/Checkbox/CheckboxGroup.stories.js +55 -0
- package/Checkbox/README_Checkbox.md +15 -0
- package/Checkbox/README_CheckboxGroup.md +19 -0
- package/Checkbox/index.d.ts +2 -0
- package/Checkbox/index.js +2 -0
- package/Chips/Chip.d.ts +9 -0
- package/Chips/Chip.js +10 -0
- package/Chips/ChipIcon.d.ts +4 -0
- package/Chips/ChipIcon.js +8 -0
- package/Chips/Chips.d.ts +21 -0
- package/Chips/Chips.js +17 -0
- package/Chips/Chips.stories.d.ts +1 -0
- package/Chips/Chips.stories.js +25 -0
- package/Chips/README.md +15 -0
- package/Chips/icons/baseline-done-24px.svg +4 -0
- package/Chips/icons/baseline-email-24px.svg +3 -0
- package/Chips/index.d.ts +3 -0
- package/Chips/index.js +3 -0
- package/Chips/styles.d.ts +2 -0
- package/Chips/styles.js +17 -0
- package/CodeEditor/CodeEditor.d.ts +22 -0
- package/CodeEditor/CodeEditor.js +88 -0
- package/CodeEditor/CodeEditor.stories.d.ts +2 -0
- package/CodeEditor/CodeEditor.stories.js +32 -0
- package/CodeEditor/README.md +21 -0
- package/CodeEditor/index.d.ts +1 -0
- package/CodeEditor/index.js +1 -0
- package/ColorPicker/ColorPicker.d.ts +25 -0
- package/ColorPicker/ColorPicker.js +140 -0
- package/ColorPicker/ColorPicker.stories.d.ts +1 -0
- package/ColorPicker/ColorPicker.stories.js +30 -0
- package/ColorPicker/README.md +11 -0
- package/ColorPicker/index.d.ts +1 -0
- package/ColorPicker/index.js +1 -0
- package/ConfirmationDialog/ConfirmationDialog.d.ts +45 -0
- package/ConfirmationDialog/ConfirmationDialog.js +164 -0
- package/ConfirmationDialog/ConfirmationDialog.stories.d.ts +1 -0
- package/ConfirmationDialog/ConfirmationDialog.stories.js +30 -0
- package/ConfirmationDialog/README.md +11 -0
- package/ConfirmationDialog/index.d.ts +2 -0
- package/ConfirmationDialog/index.js +2 -0
- package/ConfirmationDialog/withConfirmation.d.ts +11 -0
- package/ConfirmationDialog/withConfirmation.js +15 -0
- package/Dialog/Dialog.d.ts +88 -0
- package/Dialog/Dialog.js +101 -0
- package/Dialog/Dialog.stories.d.ts +1 -0
- package/Dialog/Dialog.stories.js +30 -0
- package/Dialog/README.md +23 -0
- package/Dialog/index.d.ts +1 -0
- package/Dialog/index.js +1 -0
- package/Drawer/Drawer.d.ts +47 -0
- package/Drawer/Drawer.js +25 -0
- package/Drawer/Drawer.stories.d.ts +1 -0
- package/Drawer/Drawer.stories.js +23 -0
- package/Drawer/README.md +15 -0
- package/Drawer/index.d.ts +1 -0
- package/Drawer/index.js +1 -0
- package/DynamicFieldset/Fieldset.d.ts +41 -0
- package/DynamicFieldset/Fieldset.js +143 -0
- package/DynamicFieldset/index.d.ts +1 -0
- package/DynamicFieldset/index.js +1 -0
- package/Elevation/Elevation.d.ts +13 -0
- package/Elevation/Elevation.js +13 -0
- package/Elevation/Elevation.stories.d.ts +1 -0
- package/Elevation/Elevation.stories.js +29 -0
- package/Elevation/README.md +15 -0
- package/Elevation/index.d.ts +1 -0
- package/Elevation/index.js +1 -0
- package/FormElementMessage/FormElementMessage.d.ts +8 -0
- package/FormElementMessage/FormElementMessage.js +13 -0
- package/FormElementMessage/index.d.ts +1 -0
- package/FormElementMessage/index.js +1 -0
- package/FullName/FullName.d.ts +8 -0
- package/FullName/FullName.js +21 -0
- package/FullName/README.md +11 -0
- package/FullName/index.d.ts +1 -0
- package/FullName/index.js +1 -0
- package/Grid/Grid.d.ts +33 -0
- package/Grid/Grid.js +20 -0
- package/Grid/Grid.stories.d.ts +1 -0
- package/Grid/Grid.stories.js +31 -0
- package/Grid/README.md +15 -0
- package/Grid/index.d.ts +1 -0
- package/Grid/index.js +1 -0
- package/Helpers/ClassNames.d.ts +10 -0
- package/Helpers/ClassNames.js +30 -0
- package/Helpers/index.d.ts +2 -0
- package/Helpers/index.js +2 -0
- package/Icon/Icon.d.ts +24 -0
- package/Icon/Icon.js +26 -0
- package/Icon/Icon.stories.d.ts +1 -0
- package/Icon/Icon.stories.js +27 -0
- package/Icon/README.md +11 -0
- package/Icon/index.d.ts +1 -0
- package/Icon/index.js +1 -0
- package/Icon/svg/baseline-autorenew-24px.svg +4 -0
- package/Icon/svg/baseline-cloud_done-24px.svg +4 -0
- package/Icon/svg/baseline-delete-24px.svg +4 -0
- package/Icon/svg/baseline-done-24px.svg +4 -0
- package/Image/Image.d.ts +6 -0
- package/Image/Image.js +18 -0
- package/Image/Image.stories.d.ts +1 -0
- package/Image/Image.stories.js +21 -0
- package/Image/README.md +12 -0
- package/Image/index.d.ts +1 -0
- package/Image/index.js +1 -0
- package/ImageEditor/ImageEditor.d.ts +47 -0
- package/ImageEditor/ImageEditor.js +335 -0
- package/ImageEditor/index.d.ts +1 -0
- package/ImageEditor/index.js +1 -0
- package/ImageEditor/toolbar/crop.d.ts +4 -0
- package/ImageEditor/toolbar/crop.js +69 -0
- package/ImageEditor/toolbar/filter.d.ts +3 -0
- package/ImageEditor/toolbar/filter.js +209 -0
- package/ImageEditor/toolbar/flip.d.ts +4 -0
- package/ImageEditor/toolbar/flip.js +96 -0
- package/ImageEditor/toolbar/icons/crop.svg +4 -0
- package/ImageEditor/toolbar/icons/draw.svg +4 -0
- package/ImageEditor/toolbar/icons/filter.svg +4 -0
- package/ImageEditor/toolbar/icons/flip.svg +4 -0
- package/ImageEditor/toolbar/icons/index.d.ts +8 -0
- package/ImageEditor/toolbar/icons/index.js +8 -0
- package/ImageEditor/toolbar/icons/redo.svg +4 -0
- package/ImageEditor/toolbar/icons/rotateLeft.svg +4 -0
- package/ImageEditor/toolbar/icons/rotateRight.svg +4 -0
- package/ImageEditor/toolbar/icons/undo.svg +4 -0
- package/ImageEditor/toolbar/index.d.ts +4 -0
- package/ImageEditor/toolbar/index.js +4 -0
- package/ImageEditor/toolbar/rotate.d.ts +4 -0
- package/ImageEditor/toolbar/rotate.js +145 -0
- package/ImageEditor/toolbar/types.d.ts +22 -0
- package/ImageEditor/toolbar/types.js +1 -0
- package/ImageUpload/Image.d.ts +26 -0
- package/ImageUpload/Image.js +119 -0
- package/ImageUpload/ImageEditorDialog.d.ts +19 -0
- package/ImageUpload/ImageEditorDialog.js +94 -0
- package/ImageUpload/MultiImageUpload.d.ts +61 -0
- package/ImageUpload/MultiImageUpload.js +383 -0
- package/ImageUpload/MultiImageUpload.stories.d.ts +1 -0
- package/ImageUpload/MultiImageUpload.stories.js +66 -0
- package/ImageUpload/README.md +11 -0
- package/ImageUpload/SingleImageUpload.d.ts +64 -0
- package/ImageUpload/SingleImageUpload.js +224 -0
- package/ImageUpload/SingleImageUpload.stories.d.ts +1 -0
- package/ImageUpload/SingleImageUpload.stories.js +43 -0
- package/ImageUpload/icons/round-add_photo_alternate-24px.svg +23 -0
- package/ImageUpload/icons/round-close-24px.svg +13 -0
- package/ImageUpload/icons/round-edit-24px.svg +4 -0
- package/ImageUpload/image.jpeg +0 -0
- package/ImageUpload/index.d.ts +4 -0
- package/ImageUpload/index.js +4 -0
- package/ImageUpload/styled.d.ts +15 -0
- package/ImageUpload/styled.js +122 -0
- package/Input/Input.d.ts +34 -0
- package/Input/Input.js +152 -0
- package/Input/Input.stories.d.ts +1 -0
- package/Input/Input.stories.js +104 -0
- package/Input/README.md +16 -0
- package/Input/__tests__/Input.test.d.ts +1 -0
- package/Input/__tests__/Input.test.js +113 -0
- package/Input/index.d.ts +1 -0
- package/Input/index.js +1 -0
- package/Input/svg/baseline-autorenew-24px.svg +4 -0
- package/Input/svg/baseline-cloud_done-24px.svg +4 -0
- package/Input/svg/baseline-delete-24px.svg +4 -0
- package/Input/svg/baseline-done-24px.svg +4 -0
- package/LICENSE +21 -0
- package/List/CollapsibleList/CollapsibleList.stories.d.ts +1 -0
- package/List/CollapsibleList/CollapsibleList.stories.js +26 -0
- package/List/CollapsibleList/README.md +11 -0
- package/List/CollapsibleList/index.css +31 -0
- package/List/CollapsibleList/index.d.ts +8 -0
- package/List/CollapsibleList/index.js +7 -0
- package/List/DataList/DataList.d.ts +61 -0
- package/List/DataList/DataList.js +312 -0
- package/List/DataList/DataList.stories.d.ts +1 -0
- package/List/DataList/DataList.stories.js +107 -0
- package/List/DataList/DataListModalOverlay/DataListModalOverlay.d.ts +18 -0
- package/List/DataList/DataListModalOverlay/DataListModalOverlay.js +87 -0
- package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.d.ts +6 -0
- package/List/DataList/DataListModalOverlay/DataListModalOverlayAction.js +21 -0
- package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.d.ts +6 -0
- package/List/DataList/DataListModalOverlay/DataListModalOverlayContext.js +18 -0
- package/List/DataList/DataListModalOverlay/index.d.ts +3 -0
- package/List/DataList/DataListModalOverlay/index.js +3 -0
- package/List/DataList/Loader.d.ts +3 -0
- package/List/DataList/Loader.js +57 -0
- package/List/DataList/NoData.d.ts +3 -0
- package/List/DataList/NoData.js +19 -0
- package/List/DataList/README.md +17 -0
- package/List/DataList/icons/baseline-autorenew-24px.svg +4 -0
- package/List/DataList/icons/baseline-delete-24px.svg +4 -0
- package/List/DataList/icons/baseline-edit-24px.svg +4 -0
- package/List/DataList/icons/baseline-navigate_before-24px.svg +4 -0
- package/List/DataList/icons/baseline-navigate_next-24px.svg +4 -0
- package/List/DataList/icons/baseline-sort-24px.svg +4 -0
- package/List/DataList/icons/baseline-tune-24px.svg +4 -0
- package/List/DataList/icons/filter_alt-24px.svg +1 -0
- package/List/DataList/icons/index.d.ts +15 -0
- package/List/DataList/icons/index.js +55 -0
- package/List/DataList/icons/round-more_vert-24px.svg +12 -0
- package/List/DataList/index.d.ts +3 -0
- package/List/DataList/index.js +3 -0
- package/List/DataList/types.d.ts +28 -0
- package/List/DataList/types.js +1 -0
- package/List/List.d.ts +131 -0
- package/List/List.js +167 -0
- package/List/List.stories.d.ts +1 -0
- package/List/List.stories.js +47 -0
- package/List/README.md +22 -0
- package/List/icons/baseline-autorenew-24px.svg +4 -0
- package/List/icons/baseline-cloud_done-24px.svg +4 -0
- package/List/icons/baseline-delete-24px.svg +4 -0
- package/List/icons/baseline-done-24px.svg +4 -0
- package/List/icons/baseline-email-24px.svg +4 -0
- package/List/icons/index.d.ts +3 -0
- package/List/icons/index.js +3 -0
- package/List/index.d.ts +3 -0
- package/List/index.js +3 -0
- package/Menu/Menu.d.ts +43 -0
- package/Menu/Menu.js +128 -0
- package/Menu/Menu.stories.d.ts +1 -0
- package/Menu/Menu.stories.js +29 -0
- package/Menu/README.md +15 -0
- package/Menu/index.d.ts +1 -0
- package/Menu/index.js +1 -0
- package/Mosaic/Mosaic.d.ts +19 -0
- package/Mosaic/Mosaic.js +19 -0
- package/Mosaic/Mosaic.stories.d.ts +1 -0
- package/Mosaic/Mosaic.stories.js +75 -0
- package/Mosaic/README.md +15 -0
- package/Mosaic/index.d.ts +1 -0
- package/Mosaic/index.js +1 -0
- package/Progress/CircularProgress.d.ts +19 -0
- package/Progress/CircularProgress.js +63 -0
- package/Progress/README.md +19 -0
- package/Progress/index.d.ts +1 -0
- package/Progress/index.js +1 -0
- package/Progress/svg/circularProgress.svg +3 -0
- package/README.md +28 -0
- package/Radio/README.md +17 -0
- package/Radio/Radio.d.ts +21 -0
- package/Radio/Radio.js +68 -0
- package/Radio/Radio.styles.d.ts +6 -0
- package/Radio/Radio.styles.js +15 -0
- package/Radio/RadioGroup.d.ts +20 -0
- package/Radio/RadioGroup.js +56 -0
- package/Radio/RadioGroup.stories.d.ts +1 -0
- package/Radio/RadioGroup.stories.js +55 -0
- package/Radio/index.d.ts +2 -0
- package/Radio/index.js +2 -0
- package/RichTextEditor/README.md +10 -0
- package/RichTextEditor/RichTextEditor.d.ts +27 -0
- package/RichTextEditor/RichTextEditor.js +136 -0
- package/RichTextEditor/RichTextEditor.stories.d.ts +1 -0
- package/RichTextEditor/RichTextEditor.stories.js +19 -0
- package/RichTextEditor/createPropsFromConfig.d.ts +5 -0
- package/RichTextEditor/createPropsFromConfig.js +18 -0
- package/RichTextEditor/index.d.ts +2 -0
- package/RichTextEditor/index.js +2 -0
- package/Ripple/README.md +15 -0
- package/Ripple/Ripple.d.ts +11 -0
- package/Ripple/Ripple.js +14 -0
- package/Ripple/Ripple.stories.d.ts +1 -0
- package/Ripple/Ripple.stories.js +71 -0
- package/Ripple/index.d.ts +1 -0
- package/Ripple/index.js +1 -0
- package/Ripple/svg/baseline-autorenew-24px.svg +4 -0
- package/Ripple/svg/baseline-cloud_done-24px.svg +4 -0
- package/Ripple/svg/baseline-delete-24px.svg +4 -0
- package/Ripple/svg/baseline-done-24px.svg +4 -0
- package/Scrollbar/README.md +15 -0
- package/Scrollbar/Scrollbar.d.ts +11 -0
- package/Scrollbar/Scrollbar.js +11 -0
- package/Scrollbar/Scrollbar.stories.d.ts +1 -0
- package/Scrollbar/Scrollbar.stories.js +20 -0
- package/Scrollbar/index.d.ts +1 -0
- package/Scrollbar/index.js +1 -0
- package/Section/README.md +11 -0
- package/Section/Section.stories.d.ts +1 -0
- package/Section/Section.stories.js +25 -0
- package/Section/index.d.ts +7 -0
- package/Section/index.js +48 -0
- package/Select/README.md +15 -0
- package/Select/Select.d.ts +22 -0
- package/Select/Select.js +60 -0
- package/Select/Select.stories.d.ts +1 -0
- package/Select/Select.stories.js +46 -0
- package/Select/index.d.ts +1 -0
- package/Select/index.js +1 -0
- package/Slider/README.md +15 -0
- package/Slider/Slider.d.ts +35 -0
- package/Slider/Slider.js +87 -0
- package/Slider/Slider.stories.d.ts +1 -0
- package/Slider/Slider.stories.js +44 -0
- package/Slider/index.d.ts +1 -0
- package/Slider/index.js +1 -0
- package/Snackbar/README.md +15 -0
- package/Snackbar/Snackbar.d.ts +15 -0
- package/Snackbar/Snackbar.js +54 -0
- package/Snackbar/Snackbar.stories.d.ts +1 -0
- package/Snackbar/Snackbar.stories.js +77 -0
- package/Snackbar/index.d.ts +1 -0
- package/Snackbar/index.js +1 -0
- package/Switch/README.md +15 -0
- package/Switch/Switch.d.ts +21 -0
- package/Switch/Switch.js +67 -0
- package/Switch/Switch.stories.d.ts +1 -0
- package/Switch/Switch.stories.js +32 -0
- package/Switch/index.d.ts +1 -0
- package/Switch/index.js +1 -0
- package/Tabs/README.md +19 -0
- package/Tabs/Tab.d.ts +14 -0
- package/Tabs/Tab.js +10 -0
- package/Tabs/Tabs.d.ts +41 -0
- package/Tabs/Tabs.js +145 -0
- package/Tabs/Tabs.stories.d.ts +1 -0
- package/Tabs/Tabs.stories.js +41 -0
- package/Tabs/index.d.ts +2 -0
- package/Tabs/index.js +2 -0
- package/Tabs/svg/baseline-autorenew-24px.svg +4 -0
- package/Tabs/svg/baseline-cloud_done-24px.svg +4 -0
- package/Tabs/svg/baseline-delete-24px.svg +4 -0
- package/Tabs/svg/baseline-done-24px.svg +4 -0
- package/Tags/README.md +15 -0
- package/Tags/Tags.d.ts +58 -0
- package/Tags/Tags.js +148 -0
- package/Tags/Tags.stories.d.ts +1 -0
- package/Tags/Tags.stories.js +32 -0
- package/Tags/icons/baseline-close-24px.svg +4 -0
- package/Tags/index.d.ts +1 -0
- package/Tags/index.js +1 -0
- package/Tooltip/README.md +15 -0
- package/Tooltip/Tooltip.d.ts +24 -0
- package/Tooltip/Tooltip.js +60 -0
- package/Tooltip/Tooltip.stories.d.ts +1 -0
- package/Tooltip/Tooltip.stories.js +17 -0
- package/Tooltip/index.d.ts +1 -0
- package/Tooltip/index.js +1 -0
- package/Tooltip/style.scss +97 -0
- package/TopAppBar/README.md +20 -0
- package/TopAppBar/TopAppBar.d.ts +18 -0
- package/TopAppBar/TopAppBar.js +13 -0
- package/TopAppBar/TopAppBar.stories.d.ts +1 -0
- package/TopAppBar/TopAppBar.stories.js +56 -0
- package/TopAppBar/TopAppBarActionItem.d.ts +5 -0
- package/TopAppBar/TopAppBarActionItem.js +8 -0
- package/TopAppBar/TopAppBarNavigationIcon.d.ts +5 -0
- package/TopAppBar/TopAppBarNavigationIcon.js +8 -0
- package/TopAppBar/TopAppBarPrimary.d.ts +5 -0
- package/TopAppBar/TopAppBarPrimary.js +15 -0
- package/TopAppBar/TopAppBarSecondary.d.ts +5 -0
- package/TopAppBar/TopAppBarSecondary.js +17 -0
- package/TopAppBar/TopAppBarSection.d.ts +18 -0
- package/TopAppBar/TopAppBarSection.js +13 -0
- package/TopAppBar/TopAppBarTitle.d.ts +10 -0
- package/TopAppBar/TopAppBarTitle.js +13 -0
- package/TopAppBar/icons/baseline-autorenew-24px.svg +4 -0
- package/TopAppBar/icons/baseline-cloud_done-24px.svg +4 -0
- package/TopAppBar/icons/baseline-delete-24px.svg +4 -0
- package/TopAppBar/icons/baseline-email-24px.svg +4 -0
- package/TopAppBar/icons/baseline-menu-24px.svg +4 -0
- package/TopAppBar/index.d.ts +7 -0
- package/TopAppBar/index.js +7 -0
- package/TopProgressBar/README.md +11 -0
- package/TopProgressBar/TopProgressBar.d.ts +15 -0
- package/TopProgressBar/TopProgressBar.js +9 -0
- package/TopProgressBar/TopProgressBar.stories.d.ts +1 -0
- package/TopProgressBar/TopProgressBar.stories.js +22 -0
- package/TopProgressBar/hoc/index.d.ts +1 -0
- package/TopProgressBar/hoc/index.js +1 -0
- package/TopProgressBar/hoc/withTopProgressBar.d.ts +3 -0
- package/TopProgressBar/hoc/withTopProgressBar.js +23 -0
- package/TopProgressBar/index.d.ts +1 -0
- package/TopProgressBar/index.js +1 -0
- package/TopProgressBar/style.scss +21 -0
- package/Typography/README.md +15 -0
- package/Typography/Typography.d.ts +13 -0
- package/Typography/Typography.js +11 -0
- package/Typography/Typography.stories.d.ts +1 -0
- package/Typography/Typography.stories.js +67 -0
- package/Typography/index.d.ts +1 -0
- package/Typography/index.js +1 -0
- package/package.json +142 -0
- package/rmwc/textfield/code/index.d.ts +135 -0
- package/rmwc/textfield/code/index.js +571 -0
- package/rmwc/textfield/next/index.d.ts +135 -0
- package/rmwc/textfield/next/index.js +560 -0
- package/rmwc/textfield/package.json +45 -0
- package/styles.scss +44 -0
- package/types.d.ts +12 -0
- package/types.js +1 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ListItem } from "../List";
|
|
3
|
+
import { AccordionItem } from "./AccordionItem";
|
|
4
|
+
export declare type AccordionProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Element displayed when accordion is expanded.
|
|
7
|
+
*/
|
|
8
|
+
children: React.ReactElement<typeof ListItem>[] | React.ReactElement<typeof AccordionItem>[];
|
|
9
|
+
/**
|
|
10
|
+
* Elevation number, default set to 2
|
|
11
|
+
*/
|
|
12
|
+
elevation?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Append a class name
|
|
15
|
+
*/
|
|
16
|
+
className?: string;
|
|
17
|
+
};
|
|
18
|
+
declare const Accordion: (props: AccordionProps) => JSX.Element;
|
|
19
|
+
export { Accordion };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
|
+
var _excluded = ["children", "elevation", "className"];
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { List } from "../List";
|
|
5
|
+
import { Elevation } from "../Elevation";
|
|
6
|
+
import { css } from "emotion";
|
|
7
|
+
import classNames from "classnames";
|
|
8
|
+
var listStyle = /*#__PURE__*/css({
|
|
9
|
+
"&.mdc-list": {
|
|
10
|
+
padding: 0
|
|
11
|
+
}
|
|
12
|
+
}, "label:listStyle;");
|
|
13
|
+
|
|
14
|
+
var Accordion = function Accordion(props) {
|
|
15
|
+
var children = props.children,
|
|
16
|
+
_props$elevation = props.elevation,
|
|
17
|
+
elevation = _props$elevation === void 0 ? 2 : _props$elevation,
|
|
18
|
+
className = props.className,
|
|
19
|
+
other = _objectWithoutProperties(props, _excluded);
|
|
20
|
+
|
|
21
|
+
return /*#__PURE__*/React.createElement(Elevation, {
|
|
22
|
+
z: elevation,
|
|
23
|
+
className: classNames("webiny-ui-accordion", className)
|
|
24
|
+
}, /*#__PURE__*/React.createElement(List, Object.assign({
|
|
25
|
+
twoLine: true,
|
|
26
|
+
className: listStyle
|
|
27
|
+
}, other), children));
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { Accordion };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { storiesOf } from "@storybook/react";
|
|
3
|
+
import { Story, StoryReadme, StorySandboxCode, StorySandbox, StorySandboxExample } from "@webiny/storybook-utils/Story";
|
|
4
|
+
import readme from "./README.md";
|
|
5
|
+
import { Accordion } from "./Accordion";
|
|
6
|
+
import { AccordionItem } from "./AccordionItem";
|
|
7
|
+
import { ReactComponent as SettingsIcon } from "@svgr/webpack!./icons/round-settings-24px.svg";
|
|
8
|
+
var story = storiesOf("Components/Accordion", module);
|
|
9
|
+
story.add("usage", function () {
|
|
10
|
+
return /*#__PURE__*/React.createElement(Story, null, /*#__PURE__*/React.createElement(StoryReadme, null, readme), /*#__PURE__*/React.createElement(StorySandbox, {
|
|
11
|
+
title: "Accordion"
|
|
12
|
+
}, /*#__PURE__*/React.createElement(StorySandboxExample, null, /*#__PURE__*/React.createElement(Accordion, null, /*#__PURE__*/React.createElement(AccordionItem, {
|
|
13
|
+
icon: /*#__PURE__*/React.createElement(SettingsIcon, null),
|
|
14
|
+
title: "Settings 1",
|
|
15
|
+
description: "Settings description",
|
|
16
|
+
open: true
|
|
17
|
+
}, /*#__PURE__*/React.createElement("div", null, "Inner child 1")), /*#__PURE__*/React.createElement(AccordionItem, {
|
|
18
|
+
icon: /*#__PURE__*/React.createElement(SettingsIcon, null),
|
|
19
|
+
title: "Settings 2",
|
|
20
|
+
description: "Settings description"
|
|
21
|
+
}, /*#__PURE__*/React.createElement("div", null, "Inner child 2")), /*#__PURE__*/React.createElement(AccordionItem, {
|
|
22
|
+
icon: /*#__PURE__*/React.createElement(SettingsIcon, null),
|
|
23
|
+
title: "Settings 3",
|
|
24
|
+
description: "Settings description"
|
|
25
|
+
}, /*#__PURE__*/React.createElement("div", null, "Inner child 3")))), /*#__PURE__*/React.createElement(StorySandboxCode, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Accordion, null, /*#__PURE__*/React.createElement(AccordionItem, {
|
|
26
|
+
icon: /*#__PURE__*/React.createElement(SettingsIcon, null),
|
|
27
|
+
title: "Settings 1",
|
|
28
|
+
description: "Settings description",
|
|
29
|
+
open: true
|
|
30
|
+
}, /*#__PURE__*/React.createElement("div", null, "Inner child 1")), /*#__PURE__*/React.createElement(AccordionItem, {
|
|
31
|
+
icon: /*#__PURE__*/React.createElement(SettingsIcon, null),
|
|
32
|
+
title: "Settings 2",
|
|
33
|
+
description: "Settings description"
|
|
34
|
+
}, /*#__PURE__*/React.createElement("div", null, "Inner child 2")), /*#__PURE__*/React.createElement(AccordionItem, {
|
|
35
|
+
icon: /*#__PURE__*/React.createElement(SettingsIcon, null),
|
|
36
|
+
title: "Settings 3",
|
|
37
|
+
description: "Settings description"
|
|
38
|
+
}, /*#__PURE__*/React.createElement("div", null, "Inner child 3")))))));
|
|
39
|
+
}, {
|
|
40
|
+
info: {
|
|
41
|
+
propTables: [Accordion, AccordionItem]
|
|
42
|
+
}
|
|
43
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare type AccordionItemProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Left side icon
|
|
5
|
+
*/
|
|
6
|
+
icon: React.ReactElement;
|
|
7
|
+
/**
|
|
8
|
+
* Accordion title
|
|
9
|
+
*/
|
|
10
|
+
title?: React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Optional description
|
|
13
|
+
*/
|
|
14
|
+
description?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Element displayed when accordion is expanded
|
|
17
|
+
*/
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Append a class name
|
|
21
|
+
*/
|
|
22
|
+
className?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Render item opened by default
|
|
25
|
+
*/
|
|
26
|
+
open?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* For testing purpose
|
|
29
|
+
*/
|
|
30
|
+
"data-testid"?: string;
|
|
31
|
+
};
|
|
32
|
+
declare const AccordionItem: (props: AccordionItemProps) => JSX.Element;
|
|
33
|
+
export { AccordionItem };
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
|
+
import React, { useState, useCallback, useEffect } from "react";
|
|
5
|
+
import { ListItem, ListItemGraphic, ListItemMeta } from "../List";
|
|
6
|
+
import Transition from "react-transition-group/Transition";
|
|
7
|
+
import { Icon } from "../Icon";
|
|
8
|
+
import styled from "@emotion/styled";
|
|
9
|
+
import { css } from "emotion";
|
|
10
|
+
import { Typography } from "../Typography";
|
|
11
|
+
import { ReactComponent as UpArrow } from "@svgr/webpack!./icons/round-keyboard_arrow_up-24px.svg";
|
|
12
|
+
import { ReactComponent as DownArrow } from "@svgr/webpack!./icons/round-keyboard_arrow_down-24px.svg";
|
|
13
|
+
import classNames from "classnames";
|
|
14
|
+
var Content = /*#__PURE__*/styled("div", {
|
|
15
|
+
target: "eypjd5u0",
|
|
16
|
+
label: "Content"
|
|
17
|
+
})({
|
|
18
|
+
width: "100%",
|
|
19
|
+
borderRight: "1px solid var(--mdc-theme-background)",
|
|
20
|
+
borderBottom: "1px solid var(--mdc-theme-background)",
|
|
21
|
+
borderLeft: "1px solid var(--mdc-theme-background)",
|
|
22
|
+
boxSizing: "border-box"
|
|
23
|
+
});
|
|
24
|
+
var listItem = /*#__PURE__*/css({
|
|
25
|
+
padding: "15px 20px",
|
|
26
|
+
cursor: "pointer",
|
|
27
|
+
borderBottom: "1px solid var(--mdc-theme-background)",
|
|
28
|
+
"&:last-child": {
|
|
29
|
+
borderBottom: "none"
|
|
30
|
+
},
|
|
31
|
+
".mdc-list-item__graphic": {
|
|
32
|
+
marginRight: 20
|
|
33
|
+
}
|
|
34
|
+
}, "label:listItem;");
|
|
35
|
+
var ListItemTitle = /*#__PURE__*/styled("div", {
|
|
36
|
+
target: "eypjd5u1",
|
|
37
|
+
label: "ListItemTitle"
|
|
38
|
+
})({
|
|
39
|
+
fontWeight: 600,
|
|
40
|
+
marginBottom: 5
|
|
41
|
+
});
|
|
42
|
+
var ListItemDescription = /*#__PURE__*/styled("div", {
|
|
43
|
+
target: "eypjd5u2",
|
|
44
|
+
label: "ListItemDescription"
|
|
45
|
+
})({});
|
|
46
|
+
var TitleContent = /*#__PURE__*/styled("div", {
|
|
47
|
+
target: "eypjd5u3",
|
|
48
|
+
label: "TitleContent"
|
|
49
|
+
})({
|
|
50
|
+
display: "flex",
|
|
51
|
+
flexDirection: "column"
|
|
52
|
+
});
|
|
53
|
+
var openedState = /*#__PURE__*/css({
|
|
54
|
+
backgroundColor: "var(--mdc-theme-on-background)"
|
|
55
|
+
}, "label:openedState;");
|
|
56
|
+
var duration = 150;
|
|
57
|
+
var defaultStyle = {
|
|
58
|
+
transition: "all ".concat(duration, "ms ease-in-out"),
|
|
59
|
+
opacity: 0,
|
|
60
|
+
height: 0,
|
|
61
|
+
pointerEvents: "none",
|
|
62
|
+
overflow: "hidden"
|
|
63
|
+
};
|
|
64
|
+
var transitionStyles = {
|
|
65
|
+
entering: {
|
|
66
|
+
opacity: 0,
|
|
67
|
+
height: 0,
|
|
68
|
+
padding: "20px 20px 20px 65px",
|
|
69
|
+
pointerEvents: "auto",
|
|
70
|
+
overflow: "initial"
|
|
71
|
+
},
|
|
72
|
+
entered: {
|
|
73
|
+
opacity: 1,
|
|
74
|
+
height: "auto",
|
|
75
|
+
padding: "20px 20px 20px 65px",
|
|
76
|
+
pointerEvents: "auto",
|
|
77
|
+
overflow: "initial"
|
|
78
|
+
},
|
|
79
|
+
exiting: {
|
|
80
|
+
height: "auto",
|
|
81
|
+
padding: "20px 20px 20px 65px",
|
|
82
|
+
pointerEvents: "auto",
|
|
83
|
+
overflow: "initial"
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
var AccordionItem = function AccordionItem(props) {
|
|
88
|
+
var _useState = useState(props.open ? props.open : false),
|
|
89
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
90
|
+
open = _useState2[0],
|
|
91
|
+
setState = _useState2[1];
|
|
92
|
+
|
|
93
|
+
var toggleState = useCallback(function () {
|
|
94
|
+
setState(!open);
|
|
95
|
+
}, [open]);
|
|
96
|
+
useEffect(function () {
|
|
97
|
+
setState(props.open);
|
|
98
|
+
}, [props.open]);
|
|
99
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
100
|
+
className: classNames("webiny-ui-accordion-item", props.className)
|
|
101
|
+
}, /*#__PURE__*/React.createElement(ListItem, {
|
|
102
|
+
className: classNames(listItem, _defineProperty({}, openedState, open), "webiny-ui-accordion-item__list-item"),
|
|
103
|
+
onClick: toggleState,
|
|
104
|
+
"data-testid": props["data-testid"]
|
|
105
|
+
}, props.icon && /*#__PURE__*/React.createElement(ListItemGraphic, null, /*#__PURE__*/React.createElement(Icon, {
|
|
106
|
+
icon: props.icon
|
|
107
|
+
})), /*#__PURE__*/React.createElement(TitleContent, {
|
|
108
|
+
className: "webiny-ui-accordion-item__title"
|
|
109
|
+
}, /*#__PURE__*/React.createElement(ListItemTitle, null, props.title), props.description && /*#__PURE__*/React.createElement(ListItemDescription, null, /*#__PURE__*/React.createElement(Typography, {
|
|
110
|
+
use: "subtitle2"
|
|
111
|
+
}, props.description))), /*#__PURE__*/React.createElement(ListItemMeta, null, /*#__PURE__*/React.createElement(Icon, {
|
|
112
|
+
icon: !open ? /*#__PURE__*/React.createElement(DownArrow, null) : /*#__PURE__*/React.createElement(UpArrow, null)
|
|
113
|
+
}))), /*#__PURE__*/React.createElement(Transition, {
|
|
114
|
+
in: open,
|
|
115
|
+
timeout: duration
|
|
116
|
+
}, function (state) {
|
|
117
|
+
return /*#__PURE__*/React.createElement(Content, {
|
|
118
|
+
style: _objectSpread(_objectSpread({}, defaultStyle), transitionStyles[state]),
|
|
119
|
+
className: "webiny-ui-accordion-item__content"
|
|
120
|
+
}, props.children);
|
|
121
|
+
}));
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export { AccordionItem };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px"
|
|
4
|
+
height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
|
5
|
+
<g id="Bounding_Boxes" display="none">
|
|
6
|
+
<g id="ui_x5F_spec_x5F_header_copy_3" display="inline">
|
|
7
|
+
</g>
|
|
8
|
+
<path display="inline" fill="none" d="M0,0h24v24H0V0z"/>
|
|
9
|
+
</g>
|
|
10
|
+
<g id="Rounded">
|
|
11
|
+
<g id="ui_x5F_spec_x5F_header_copy_6">
|
|
12
|
+
</g>
|
|
13
|
+
<path fill="currentColor" d="M8.12,9.29L12,13.17l3.88-3.88c0.39-0.39,1.02-0.39,1.41,0l0,0c0.39,0.39,0.39,1.02,0,1.41l-4.59,4.59
|
|
14
|
+
c-0.39,0.39-1.02,0.39-1.41,0l-4.59-4.59c-0.39-0.39-0.39-1.02,0-1.41l0,0C7.09,8.91,7.73,8.9,8.12,9.29z"/>
|
|
15
|
+
</g>
|
|
16
|
+
</svg>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="24px"
|
|
4
|
+
height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
|
|
5
|
+
<g id="Bounding_Boxes" display="none">
|
|
6
|
+
<g id="ui_x5F_spec_x5F_header_copy_3" display="inline">
|
|
7
|
+
</g>
|
|
8
|
+
<path display="inline" fill="none" d="M0,0h24v24H0V0z"/>
|
|
9
|
+
</g>
|
|
10
|
+
<g id="Rounded">
|
|
11
|
+
<g id="ui_x5F_spec_x5F_header_copy_6">
|
|
12
|
+
</g>
|
|
13
|
+
<path fill="currentColor" d="M8.12,14.71L12,10.83l3.88,3.88c0.39,0.39,1.02,0.39,1.41,0l0,0c0.39-0.39,0.39-1.02,0-1.41l-4.59-4.59
|
|
14
|
+
c-0.39-0.39-1.02-0.39-1.41,0l-4.59,4.59c-0.39,0.39-0.39,1.02,0,1.41l0,0C7.09,15.09,7.73,15.1,8.12,14.71z"/>
|
|
15
|
+
</g>
|
|
16
|
+
</svg>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<!-- Generator: Sketch 51.1 (57501) - http://www.bohemiancoding.com/sketch -->
|
|
4
|
+
<title>round-settings-24px (2)</title>
|
|
5
|
+
<desc>Created with Sketch.</desc>
|
|
6
|
+
<defs></defs>
|
|
7
|
+
<g id="Webiny---Site-Manager" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
8
|
+
<g id="Site-Settings" transform="translate(-291.000000, -161.000000)">
|
|
9
|
+
<g id="General-settings" transform="translate(264.000000, 151.000000)">
|
|
10
|
+
<g id="round-settings-24px-(2)" transform="translate(25.000000, 8.000000)">
|
|
11
|
+
<g id="Bounding_Boxes">
|
|
12
|
+
<polygon id="Shape" points="0 0 24 0 24 24 0 24"></polygon>
|
|
13
|
+
</g>
|
|
14
|
+
<g id="Rounded" transform="translate(2.000000, 2.000000)" fill="#4A4A4A" fill-rule="nonzero">
|
|
15
|
+
<path d="M17.43,10.98 C17.47,10.66 17.5,10.34 17.5,10 C17.5,9.66 17.47,9.34 17.43,9.02 L19.54,7.37 C19.73,7.22 19.78,6.95 19.66,6.73 L17.66,3.27 C17.54,3.05 17.27,2.97 17.05,3.05 L14.56,4.05 C14.04,3.65 13.48,3.32 12.87,3.07 L12.49,0.42 C12.46,0.18 12.25,0 12,0 L8,0 C7.75,0 7.54,0.18 7.51,0.42 L7.13,3.07 C6.52,3.32 5.96,3.66 5.44,4.05 L2.95,3.05 C2.72,2.96 2.46,3.05 2.34,3.27 L0.34,6.73 C0.21,6.95 0.27,7.22 0.46,7.37 L2.57,9.02 C2.53,9.34 2.5,9.67 2.5,10 C2.5,10.33 2.53,10.66 2.57,10.98 L0.46,12.63 C0.27,12.78 0.22,13.05 0.34,13.27 L2.34,16.73 C2.46,16.95 2.73,17.03 2.95,16.95 L5.44,15.95 C5.96,16.35 6.52,16.68 7.13,16.93 L7.51,19.58 C7.54,19.82 7.75,20 8,20 L12,20 C12.25,20 12.46,19.82 12.49,19.58 L12.87,16.93 C13.48,16.68 14.04,16.34 14.56,15.95 L17.05,16.95 C17.28,17.04 17.54,16.95 17.66,16.73 L19.66,13.27 C19.78,13.05 19.73,12.78 19.54,12.63 L17.43,10.98 Z M10,13.5 C8.07,13.5 6.5,11.93 6.5,10 C6.5,8.07 8.07,6.5 10,6.5 C11.93,6.5 13.5,8.07 13.5,10 C13.5,11.93 11.93,13.5 10,13.5 Z" id="Shape"></path>
|
|
16
|
+
</g>
|
|
17
|
+
</g>
|
|
18
|
+
</g>
|
|
19
|
+
</g>
|
|
20
|
+
</g>
|
|
21
|
+
</svg>
|
package/Alert/Alert.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export declare type AlertType = "success" | "info" | "warning" | "danger";
|
|
3
|
+
declare type AlertProps = {
|
|
4
|
+
title: string;
|
|
5
|
+
type: AlertType;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Use Alert component to display user's avatar.
|
|
12
|
+
*/
|
|
13
|
+
declare const Alert: (props: AlertProps) => JSX.Element;
|
|
14
|
+
export { Alert };
|
package/Alert/Alert.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
|
+
var _excluded = ["title", "type", "children"];
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { css } from "emotion";
|
|
5
|
+
var alertStyles = /*#__PURE__*/css({
|
|
6
|
+
borderLeft: "3px solid red",
|
|
7
|
+
margin: "5px 0 15px 0",
|
|
8
|
+
padding: "2px 0 2px 10px",
|
|
9
|
+
".webiny-ui-alert__title": {
|
|
10
|
+
fontWeight: 600,
|
|
11
|
+
lineHeight: "150%",
|
|
12
|
+
color: "var(--mdc-theme-on-surface)",
|
|
13
|
+
marginBottom: 5
|
|
14
|
+
},
|
|
15
|
+
".webiny-ui-alert__message": {
|
|
16
|
+
lineHeight: "100%",
|
|
17
|
+
fontSize: 14,
|
|
18
|
+
color: "var(--mdc-theme-on-surface)"
|
|
19
|
+
},
|
|
20
|
+
"&.webiny-ui-alert--success": {
|
|
21
|
+
borderColor: "#21CEAF"
|
|
22
|
+
},
|
|
23
|
+
"&.webiny-ui-alert--info": {
|
|
24
|
+
borderColor: "#29A9DB"
|
|
25
|
+
},
|
|
26
|
+
"&.webiny-ui-alert--warning": {
|
|
27
|
+
borderColor: "#F45C3C"
|
|
28
|
+
},
|
|
29
|
+
"&.webiny-ui-alert--danger": {
|
|
30
|
+
borderColor: "#E4495C"
|
|
31
|
+
}
|
|
32
|
+
}, "label:alertStyles;");
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Use Alert component to display user's avatar.
|
|
36
|
+
*/
|
|
37
|
+
var Alert = function Alert(props) {
|
|
38
|
+
var title = props.title,
|
|
39
|
+
type = props.type,
|
|
40
|
+
children = props.children,
|
|
41
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
42
|
+
|
|
43
|
+
return /*#__PURE__*/React.createElement("div", Object.assign({}, rest, {
|
|
44
|
+
className: alertStyles + " webiny-ui-alert webiny-ui-alert--" + type
|
|
45
|
+
}), /*#__PURE__*/React.createElement("p", {
|
|
46
|
+
className: "webiny-ui-alert__title"
|
|
47
|
+
}, title), /*#__PURE__*/React.createElement("p", {
|
|
48
|
+
className: "webiny-ui-alert__message"
|
|
49
|
+
}, children));
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export { Alert };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { storiesOf } from "@storybook/react";
|
|
3
|
+
import { Story, StoryReadme, StorySandboxCode, StorySandbox, StorySandboxExample } from "@webiny/storybook-utils/Story";
|
|
4
|
+
import readme from "./README.md";
|
|
5
|
+
import { Alert } from "./Alert";
|
|
6
|
+
var story = storiesOf("Components/Alert", module);
|
|
7
|
+
story.add("usage", function () {
|
|
8
|
+
return /*#__PURE__*/React.createElement(Story, null, /*#__PURE__*/React.createElement(StoryReadme, null, readme), /*#__PURE__*/React.createElement(StorySandbox, null, /*#__PURE__*/React.createElement(StorySandboxExample, {
|
|
9
|
+
title: "Info"
|
|
10
|
+
}, /*#__PURE__*/React.createElement(Alert, {
|
|
11
|
+
title: "Something went wrong!",
|
|
12
|
+
type: "info"
|
|
13
|
+
}, "We failed to fetch your data.")), /*#__PURE__*/React.createElement(StorySandboxCode, null, /*#__PURE__*/React.createElement(Alert, {
|
|
14
|
+
title: "Something went wrong!",
|
|
15
|
+
type: "info"
|
|
16
|
+
}, "We failed to fetch your data."))), /*#__PURE__*/React.createElement(StorySandbox, null, /*#__PURE__*/React.createElement(StorySandboxExample, {
|
|
17
|
+
title: "Danger"
|
|
18
|
+
}, /*#__PURE__*/React.createElement(Alert, {
|
|
19
|
+
title: "Something went wrong!",
|
|
20
|
+
type: "danger"
|
|
21
|
+
}, "Please contact support!")), /*#__PURE__*/React.createElement(StorySandboxCode, null, /*#__PURE__*/React.createElement(Alert, {
|
|
22
|
+
title: "Something went wrong!",
|
|
23
|
+
type: "danger"
|
|
24
|
+
}, "Please contact support!"))));
|
|
25
|
+
}, {
|
|
26
|
+
info: {
|
|
27
|
+
propTables: [Alert]
|
|
28
|
+
}
|
|
29
|
+
});
|
package/Alert/README.md
ADDED
package/Alert/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Alert";
|
package/Alert/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Alert";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { AutoCompleteBaseProps } from "./types";
|
|
3
|
+
export declare enum Placement {
|
|
4
|
+
top = "top",
|
|
5
|
+
bottom = "bottom"
|
|
6
|
+
}
|
|
7
|
+
export declare type Props = AutoCompleteBaseProps & {
|
|
8
|
+
placement?: Placement;
|
|
9
|
+
onChange?: (value: any, selection: any) => void;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
};
|
|
12
|
+
declare type State = {
|
|
13
|
+
inputValue: string;
|
|
14
|
+
};
|
|
15
|
+
declare class AutoComplete extends React.Component<Props, State> {
|
|
16
|
+
static defaultProps: {
|
|
17
|
+
valueProp: string;
|
|
18
|
+
textProp: string;
|
|
19
|
+
options: any[];
|
|
20
|
+
placement: Placement;
|
|
21
|
+
renderItem(item: any): JSX.Element;
|
|
22
|
+
};
|
|
23
|
+
state: {
|
|
24
|
+
inputValue: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Helps us trigger some of the downshift's methods (eg. clearSelection) and helps us to avoid adding state.
|
|
28
|
+
*/
|
|
29
|
+
downshift: any;
|
|
30
|
+
componentDidUpdate(previousProps: any): void;
|
|
31
|
+
/**
|
|
32
|
+
* Renders options - based on user's input. It will try to match input text with available options.
|
|
33
|
+
*/
|
|
34
|
+
renderOptions({ options, isOpen, highlightedIndex, selectedItem, getMenuProps, getItemProps, placement }: any): JSX.Element;
|
|
35
|
+
render(): JSX.Element;
|
|
36
|
+
}
|
|
37
|
+
export { AutoComplete };
|