@webiny/ui 0.0.0-mt-3 → 0.0.0-unstable.3386f66516
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/Accordion.d.ts +5 -5
- package/Accordion/Accordion.js +27 -17
- 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 +24 -8
- package/Accordion/AccordionItem.js +107 -79
- package/Accordion/AccordionItem.js.map +1 -0
- package/Accordion/AccordionItemActions.d.ts +8 -0
- package/Accordion/AccordionItemActions.js +36 -0
- package/Accordion/AccordionItemActions.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 +22 -11
- 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 +39 -24
- package/Button/Button.js +62 -51
- 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 +15 -9
- 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 +5 -8
- package/CodeEditor/CodeEditor.js +56 -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/DataTable/DataTable.d.ts +25 -0
- package/DataTable/DataTable.js +167 -0
- package/DataTable/DataTable.js.map +1 -0
- package/DataTable/DataTable.stories.d.ts +1 -0
- package/DataTable/DataTable.stories.js +77 -0
- package/DataTable/DataTable.stories.js.map +1 -0
- package/DataTable/README.md +72 -0
- package/DataTable/index.d.ts +1 -0
- package/DataTable/index.js +18 -0
- package/DataTable/index.js.map +1 -0
- package/DataTable/styled.d.ts +2 -0
- package/DataTable/styled.js +18 -0
- package/DataTable/styled.js.map +1 -0
- package/DelayedOnChange/DelayedOnChange.d.ts +40 -0
- package/DelayedOnChange/DelayedOnChange.js +129 -0
- package/DelayedOnChange/DelayedOnChange.js.map +1 -0
- package/DelayedOnChange/index.d.ts +2 -0
- package/DelayedOnChange/index.js +23 -0
- package/DelayedOnChange/index.js.map +1 -0
- package/DelayedOnChange/withDelayedOnChange.d.ts +3 -0
- package/DelayedOnChange/withDelayedOnChange.js +37 -0
- package/DelayedOnChange/withDelayedOnChange.js.map +1 -0
- package/Dialog/Dialog.d.ts +22 -30
- package/Dialog/Dialog.js +78 -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 +22 -10
- 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 +5 -19
- package/Input/Input.js +119 -127
- 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 +104 -101
- 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 +53 -50
- 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 +61 -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/Skeleton/README.md +21 -0
- package/Skeleton/Skeleton.d.ts +4 -0
- package/Skeleton/Skeleton.js +25 -0
- package/Skeleton/Skeleton.js.map +1 -0
- package/Skeleton/Skeleton.stories.d.ts +1 -0
- package/Skeleton/Skeleton.stories.js +28 -0
- package/Skeleton/Skeleton.stories.js.map +1 -0
- package/Skeleton/index.d.ts +1 -0
- package/Skeleton/index.js +18 -0
- package/Skeleton/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 +3 -7
- 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 +7 -2
- package/Tabs/Tab.js +40 -10
- package/Tabs/Tab.js.map +1 -0
- package/Tabs/Tabs.d.ts +44 -21
- package/Tabs/Tabs.js +137 -124
- 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 +9 -21
- package/Tags/Tags.js +115 -120
- 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 +5 -5
- 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 +57 -63
- package/styles.scss +3 -4
- package/types.d.ts +4 -4
- package/types.js +5 -1
- package/types.js.map +1 -0
- package/Chips/ChipIcon.d.ts +0 -4
- package/Chips/ChipIcon.js +0 -8
- package/rmwc/textfield/code/index.d.ts +0 -135
- package/rmwc/textfield/code/index.js +0 -571
- package/rmwc/textfield/next/index.d.ts +0 -135
- package/rmwc/textfield/next/index.js +0 -560
- package/rmwc/textfield/package.json +0 -45
package/Alert/Alert.js
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
|
|
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.Alert = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _emotion = require("emotion");
|
|
15
|
+
|
|
2
16
|
var _excluded = ["title", "type", "children"];
|
|
3
|
-
|
|
4
|
-
import { css } from "emotion";
|
|
5
|
-
var alertStyles = /*#__PURE__*/css({
|
|
17
|
+
var alertStyles = /*#__PURE__*/(0, _emotion.css)({
|
|
6
18
|
borderLeft: "3px solid red",
|
|
7
19
|
margin: "5px 0 15px 0",
|
|
8
20
|
padding: "2px 0 2px 10px",
|
|
@@ -13,7 +25,7 @@ var alertStyles = /*#__PURE__*/css({
|
|
|
13
25
|
marginBottom: 5
|
|
14
26
|
},
|
|
15
27
|
".webiny-ui-alert__message": {
|
|
16
|
-
lineHeight: "
|
|
28
|
+
lineHeight: "120%",
|
|
17
29
|
fontSize: 14,
|
|
18
30
|
color: "var(--mdc-theme-on-surface)"
|
|
19
31
|
},
|
|
@@ -38,15 +50,14 @@ var Alert = function Alert(props) {
|
|
|
38
50
|
var title = props.title,
|
|
39
51
|
type = props.type,
|
|
40
52
|
children = props.children,
|
|
41
|
-
rest =
|
|
42
|
-
|
|
43
|
-
return /*#__PURE__*/React.createElement("div", Object.assign({}, rest, {
|
|
53
|
+
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
54
|
+
return /*#__PURE__*/_react.default.createElement("div", Object.assign({}, rest, {
|
|
44
55
|
className: alertStyles + " webiny-ui-alert webiny-ui-alert--" + type
|
|
45
|
-
}), /*#__PURE__*/
|
|
56
|
+
}), /*#__PURE__*/_react.default.createElement("p", {
|
|
46
57
|
className: "webiny-ui-alert__title"
|
|
47
|
-
}, title), /*#__PURE__*/
|
|
58
|
+
}, title), /*#__PURE__*/_react.default.createElement("p", {
|
|
48
59
|
className: "webiny-ui-alert__message"
|
|
49
60
|
}, children));
|
|
50
61
|
};
|
|
51
62
|
|
|
52
|
-
|
|
63
|
+
exports.Alert = Alert;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["alertStyles","css","borderLeft","margin","padding","fontWeight","lineHeight","color","marginBottom","fontSize","borderColor","Alert","props","title","type","children","rest"],"sources":["Alert.tsx"],"sourcesContent":["import React from \"react\";\nimport { css } from \"emotion\";\n\nconst alertStyles = css({\n borderLeft: \"3px solid red\",\n margin: \"5px 0 15px 0\",\n padding: \"2px 0 2px 10px\",\n \".webiny-ui-alert__title\": {\n fontWeight: 600,\n lineHeight: \"150%\",\n color: \"var(--mdc-theme-on-surface)\",\n marginBottom: 5\n },\n \".webiny-ui-alert__message\": {\n lineHeight: \"120%\",\n fontSize: 14,\n color: \"var(--mdc-theme-on-surface)\"\n },\n \"&.webiny-ui-alert--success\": {\n borderColor: \"#21CEAF\"\n },\n \"&.webiny-ui-alert--info\": {\n borderColor: \"#29A9DB\"\n },\n \"&.webiny-ui-alert--warning\": {\n borderColor: \"#F45C3C\"\n },\n \"&.webiny-ui-alert--danger\": {\n borderColor: \"#E4495C\"\n }\n});\n\nexport type AlertType = \"success\" | \"info\" | \"warning\" | \"danger\";\n\nexport interface AlertProps {\n // Alert title.\n title: string;\n\n // Alert type.\n type: AlertType;\n\n // Alert message.\n children?: React.ReactNode;\n\n // CSS class name\n className?: string;\n\n // Style object\n style?: React.CSSProperties;\n}\n\n/**\n * Use Alert component to display user's avatar.\n */\nconst Alert: React.FC<AlertProps> = props => {\n const { title, type, children, ...rest } = props;\n\n return (\n <div {...rest} className={alertStyles + \" webiny-ui-alert webiny-ui-alert--\" + type}>\n <p className={\"webiny-ui-alert__title\"}>{title}</p>\n <p className={\"webiny-ui-alert__message\"}>{children}</p>\n </div>\n );\n};\n\nexport { Alert };\n"],"mappings":";;;;;;;;;;;AAAA;;AACA;;;AAEA,IAAMA,WAAW,gBAAG,IAAAC,YAAA,EAAI;EACpBC,UAAU,EAAE,eADQ;EAEpBC,MAAM,EAAE,cAFY;EAGpBC,OAAO,EAAE,gBAHW;EAIpB,2BAA2B;IACvBC,UAAU,EAAE,GADW;IAEvBC,UAAU,EAAE,MAFW;IAGvBC,KAAK,EAAE,6BAHgB;IAIvBC,YAAY,EAAE;EAJS,CAJP;EAUpB,6BAA6B;IACzBF,UAAU,EAAE,MADa;IAEzBG,QAAQ,EAAE,EAFe;IAGzBF,KAAK,EAAE;EAHkB,CAVT;EAepB,8BAA8B;IAC1BG,WAAW,EAAE;EADa,CAfV;EAkBpB,2BAA2B;IACvBA,WAAW,EAAE;EADU,CAlBP;EAqBpB,8BAA8B;IAC1BA,WAAW,EAAE;EADa,CArBV;EAwBpB,6BAA6B;IACzBA,WAAW,EAAE;EADY;AAxBT,CAAJ,uBAApB;;AAgDA;AACA;AACA;AACA,IAAMC,KAA2B,GAAG,SAA9BA,KAA8B,CAAAC,KAAK,EAAI;EACzC,IAAQC,KAAR,GAA2CD,KAA3C,CAAQC,KAAR;EAAA,IAAeC,IAAf,GAA2CF,KAA3C,CAAeE,IAAf;EAAA,IAAqBC,QAArB,GAA2CH,KAA3C,CAAqBG,QAArB;EAAA,IAAkCC,IAAlC,0CAA2CJ,KAA3C;EAEA,oBACI,sDAASI,IAAT;IAAe,SAAS,EAAEhB,WAAW,GAAG,oCAAd,GAAqDc;EAA/E,iBACI;IAAG,SAAS,EAAE;EAAd,GAAyCD,KAAzC,CADJ,eAEI;IAAG,SAAS,EAAE;EAAd,GAA2CE,QAA3C,CAFJ,CADJ;AAMH,CATD"}
|
package/Alert/Alert.stories.js
CHANGED
|
@@ -1,29 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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("./README.md"));
|
|
12
|
+
|
|
13
|
+
var _Alert = require("./Alert");
|
|
14
|
+
|
|
15
|
+
var story = (0, _react2.storiesOf)("Components/Alert", module);
|
|
7
16
|
story.add("usage", function () {
|
|
8
|
-
return /*#__PURE__*/
|
|
17
|
+
return /*#__PURE__*/_react.default.createElement(_Story.Story, null, /*#__PURE__*/_react.default.createElement(_Story.StoryReadme, null, _README.default), /*#__PURE__*/_react.default.createElement(_Story.StorySandbox, null, /*#__PURE__*/_react.default.createElement(_Story.StorySandboxExample, {
|
|
9
18
|
title: "Info"
|
|
10
|
-
}, /*#__PURE__*/
|
|
19
|
+
}, /*#__PURE__*/_react.default.createElement(_Alert.Alert, {
|
|
11
20
|
title: "Something went wrong!",
|
|
12
21
|
type: "info"
|
|
13
|
-
}, "We failed to fetch your data.")), /*#__PURE__*/
|
|
22
|
+
}, "We failed to fetch your data.")), /*#__PURE__*/_react.default.createElement(_Story.StorySandboxCode, null, /*#__PURE__*/_react.default.createElement(_Alert.Alert, {
|
|
14
23
|
title: "Something went wrong!",
|
|
15
24
|
type: "info"
|
|
16
|
-
}, "We failed to fetch your data."))), /*#__PURE__*/
|
|
25
|
+
}, "We failed to fetch your data."))), /*#__PURE__*/_react.default.createElement(_Story.StorySandbox, null, /*#__PURE__*/_react.default.createElement(_Story.StorySandboxExample, {
|
|
17
26
|
title: "Danger"
|
|
18
|
-
}, /*#__PURE__*/
|
|
27
|
+
}, /*#__PURE__*/_react.default.createElement(_Alert.Alert, {
|
|
19
28
|
title: "Something went wrong!",
|
|
20
29
|
type: "danger"
|
|
21
|
-
}, "Please contact support!")), /*#__PURE__*/
|
|
30
|
+
}, "Please contact support!")), /*#__PURE__*/_react.default.createElement(_Story.StorySandboxCode, null, /*#__PURE__*/_react.default.createElement(_Alert.Alert, {
|
|
22
31
|
title: "Something went wrong!",
|
|
23
32
|
type: "danger"
|
|
24
33
|
}, "Please contact support!"))));
|
|
25
34
|
}, {
|
|
26
35
|
info: {
|
|
27
|
-
propTables: [Alert]
|
|
36
|
+
propTables: [_Alert.Alert]
|
|
28
37
|
}
|
|
29
38
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["story","storiesOf","module","add","readme","info","propTables","Alert"],"sources":["Alert.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 \"./README.md\";\n\nimport { Alert } from \"./Alert\";\n\nconst story = storiesOf(\"Components/Alert\", module);\n\nstory.add(\n \"usage\",\n () => {\n return (\n <Story>\n <StoryReadme>{readme}</StoryReadme>\n <StorySandbox>\n <StorySandboxExample title={\"Info\"}>\n <Alert title={\"Something went wrong!\"} type={\"info\"}>\n We failed to fetch your data.\n </Alert>\n </StorySandboxExample>\n <StorySandboxCode>\n <Alert title={\"Something went wrong!\"} type={\"info\"}>\n We failed to fetch your data.\n </Alert>\n </StorySandboxCode>\n </StorySandbox>\n <StorySandbox>\n <StorySandboxExample title={\"Danger\"}>\n <Alert title={\"Something went wrong!\"} type={\"danger\"}>\n Please contact support!\n </Alert>\n </StorySandboxExample>\n <StorySandboxCode>\n <Alert title={\"Something went wrong!\"} type={\"danger\"}>\n Please contact support!\n </Alert>\n </StorySandboxCode>\n </StorySandbox>\n </Story>\n );\n },\n { info: { propTables: [Alert] } }\n);\n"],"mappings":";;;;AAAA;;AACA;;AACA;;AAOA;;AAEA;;AAEA,IAAMA,KAAK,GAAG,IAAAC,iBAAA,EAAU,kBAAV,EAA8BC,MAA9B,CAAd;AAEAF,KAAK,CAACG,GAAN,CACI,OADJ,EAEI,YAAM;EACF,oBACI,6BAAC,YAAD,qBACI,6BAAC,kBAAD,QAAcC,eAAd,CADJ,eAEI,6BAAC,mBAAD,qBACI,6BAAC,0BAAD;IAAqB,KAAK,EAAE;EAA5B,gBACI,6BAAC,YAAD;IAAO,KAAK,EAAE,uBAAd;IAAuC,IAAI,EAAE;EAA7C,mCADJ,CADJ,eAMI,6BAAC,uBAAD,qBACI,6BAAC,YAAD;IAAO,KAAK,EAAE,uBAAd;IAAuC,IAAI,EAAE;EAA7C,mCADJ,CANJ,CAFJ,eAcI,6BAAC,mBAAD,qBACI,6BAAC,0BAAD;IAAqB,KAAK,EAAE;EAA5B,gBACI,6BAAC,YAAD;IAAO,KAAK,EAAE,uBAAd;IAAuC,IAAI,EAAE;EAA7C,6BADJ,CADJ,eAMI,6BAAC,uBAAD,qBACI,6BAAC,YAAD;IAAO,KAAK,EAAE,uBAAd;IAAuC,IAAI,EAAE;EAA7C,6BADJ,CANJ,CAdJ,CADJ;AA6BH,CAhCL,EAiCI;EAAEC,IAAI,EAAE;IAAEC,UAAU,EAAE,CAACC,YAAD;EAAd;AAAR,CAjCJ"}
|
package/Alert/index.js
CHANGED
|
@@ -1 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _Alert = require("./Alert");
|
|
8
|
+
|
|
9
|
+
Object.keys(_Alert).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _Alert[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _Alert[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Alert\";\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -1,37 +1,30 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { AutoCompleteBaseProps } from "./types";
|
|
3
3
|
export declare enum Placement {
|
|
4
4
|
top = "top",
|
|
5
5
|
bottom = "bottom"
|
|
6
6
|
}
|
|
7
|
-
export
|
|
7
|
+
export interface AutoCompleteProps extends Omit<AutoCompleteBaseProps, "onChange"> {
|
|
8
8
|
placement?: Placement;
|
|
9
|
-
onChange?: (value: any, selection
|
|
9
|
+
onChange?: (value: any, selection?: any) => void;
|
|
10
10
|
loading?: boolean;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
noResultFound?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
interface State {
|
|
13
14
|
inputValue: string;
|
|
14
|
-
}
|
|
15
|
-
declare class AutoComplete extends React.Component<
|
|
16
|
-
static defaultProps:
|
|
17
|
-
|
|
18
|
-
textProp: string;
|
|
19
|
-
options: any[];
|
|
20
|
-
placement: Placement;
|
|
21
|
-
renderItem(item: any): JSX.Element;
|
|
22
|
-
};
|
|
23
|
-
state: {
|
|
24
|
-
inputValue: string;
|
|
25
|
-
};
|
|
15
|
+
}
|
|
16
|
+
declare class AutoComplete extends React.Component<AutoCompleteProps, State> {
|
|
17
|
+
static defaultProps: Partial<AutoCompleteProps>;
|
|
18
|
+
state: State;
|
|
26
19
|
/**
|
|
27
20
|
* Helps us trigger some of the downshift's methods (eg. clearSelection) and helps us to avoid adding state.
|
|
28
21
|
*/
|
|
29
22
|
downshift: any;
|
|
30
|
-
componentDidUpdate(previousProps:
|
|
23
|
+
componentDidUpdate(previousProps: AutoCompleteProps): void;
|
|
31
24
|
/**
|
|
32
25
|
* Renders options - based on user's input. It will try to match input text with available options.
|
|
33
26
|
*/
|
|
34
|
-
renderOptions
|
|
27
|
+
private renderOptions;
|
|
35
28
|
render(): JSX.Element;
|
|
36
29
|
}
|
|
37
30
|
export { AutoComplete };
|
|
@@ -1,30 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var
|
|
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.Placement = exports.AutoComplete = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
|
+
|
|
12
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
+
|
|
14
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
15
|
+
|
|
16
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
17
|
+
|
|
18
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
19
|
+
|
|
20
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
21
|
+
|
|
22
|
+
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
23
|
+
|
|
24
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
25
|
+
|
|
26
|
+
var _isEqual2 = _interopRequireDefault(require("lodash/isEqual"));
|
|
27
|
+
|
|
28
|
+
var _react = _interopRequireDefault(require("react"));
|
|
29
|
+
|
|
30
|
+
var _downshift = _interopRequireDefault(require("downshift"));
|
|
31
|
+
|
|
32
|
+
var _Input = require("../Input");
|
|
33
|
+
|
|
34
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
35
|
+
|
|
36
|
+
var _Elevation = require("../Elevation");
|
|
37
|
+
|
|
38
|
+
var _Typography = require("../Typography");
|
|
39
|
+
|
|
40
|
+
var _keycode = _interopRequireDefault(require("keycode"));
|
|
41
|
+
|
|
42
|
+
var _styles = require("./styles");
|
|
43
|
+
|
|
44
|
+
var _utils = require("./utils");
|
|
45
|
+
|
|
46
|
+
var _reactSpinnerMaterial = _interopRequireDefault(require("react-spinner-material"));
|
|
47
|
+
|
|
48
|
+
var _emotion = require("emotion");
|
|
49
|
+
|
|
50
|
+
var _excluded = ["className", "options", "onChange", "value", "onInput", "validation", "placement"],
|
|
11
51
|
_excluded2 = ["getInputProps", "openMenu"];
|
|
12
|
-
|
|
13
|
-
import Downshift from "downshift";
|
|
14
|
-
import { Input } from "../Input";
|
|
15
|
-
import classNames from "classnames";
|
|
16
|
-
import { Elevation } from "../Elevation";
|
|
17
|
-
import { Typography } from "../Typography";
|
|
18
|
-
import keycode from "keycode";
|
|
19
|
-
import { autoCompleteStyle, suggestionList } from "./styles";
|
|
20
|
-
import { getOptionValue, getOptionText, findInAliases } from "./utils";
|
|
21
|
-
import MaterialSpinner from "react-spinner-material";
|
|
22
|
-
import { css } from "emotion";
|
|
23
|
-
var menuStyles = /*#__PURE__*/css({
|
|
52
|
+
var menuStyles = /*#__PURE__*/(0, _emotion.css)({
|
|
24
53
|
top: "unset !important",
|
|
25
54
|
bottom: 75
|
|
26
55
|
}, "label:menuStyles;");
|
|
27
|
-
var listStyles = /*#__PURE__*/css({
|
|
56
|
+
var listStyles = /*#__PURE__*/(0, _emotion.css)({
|
|
28
57
|
"&.autocomplete__options-list": {
|
|
29
58
|
listStyle: "none",
|
|
30
59
|
paddingLeft: 0,
|
|
@@ -33,48 +62,58 @@ var listStyles = /*#__PURE__*/css({
|
|
|
33
62
|
}
|
|
34
63
|
}
|
|
35
64
|
}, "label:listStyles;");
|
|
36
|
-
|
|
65
|
+
var Placement;
|
|
66
|
+
exports.Placement = Placement;
|
|
37
67
|
|
|
38
68
|
(function (Placement) {
|
|
39
69
|
Placement["top"] = "top";
|
|
40
70
|
Placement["bottom"] = "bottom";
|
|
41
|
-
})(Placement || (Placement = {}));
|
|
71
|
+
})(Placement || (exports.Placement = Placement = {}));
|
|
42
72
|
|
|
43
|
-
function Spinner() {
|
|
44
|
-
return /*#__PURE__*/
|
|
73
|
+
var Spinner = function Spinner() {
|
|
74
|
+
return /*#__PURE__*/_react.default.createElement(_reactSpinnerMaterial.default, {
|
|
45
75
|
size: 24,
|
|
46
|
-
spinnerColor: "
|
|
76
|
+
spinnerColor: "var(--mdc-theme-primary)",
|
|
47
77
|
spinnerWidth: 2,
|
|
48
78
|
visible: true
|
|
49
79
|
});
|
|
50
|
-
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
var OptionsList = function OptionsList(_ref) {
|
|
83
|
+
var placement = _ref.placement,
|
|
84
|
+
getMenuProps = _ref.getMenuProps,
|
|
85
|
+
children = _ref.children;
|
|
86
|
+
return /*#__PURE__*/_react.default.createElement(_Elevation.Elevation, {
|
|
87
|
+
z: 1,
|
|
88
|
+
className: (0, _classnames.default)((0, _defineProperty2.default)({}, menuStyles, placement === Placement.top))
|
|
89
|
+
}, /*#__PURE__*/_react.default.createElement("ul", Object.assign({
|
|
90
|
+
className: (0, _classnames.default)("autocomplete__options-list", listStyles)
|
|
91
|
+
}, getMenuProps()), children));
|
|
92
|
+
};
|
|
51
93
|
|
|
52
94
|
var AutoComplete = /*#__PURE__*/function (_React$Component) {
|
|
53
|
-
|
|
95
|
+
(0, _inherits2.default)(AutoComplete, _React$Component);
|
|
54
96
|
|
|
55
|
-
var _super =
|
|
97
|
+
var _super = (0, _createSuper2.default)(AutoComplete);
|
|
56
98
|
|
|
57
99
|
function AutoComplete() {
|
|
58
100
|
var _this;
|
|
59
101
|
|
|
60
|
-
|
|
102
|
+
(0, _classCallCheck2.default)(this, AutoComplete);
|
|
61
103
|
|
|
62
104
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
63
105
|
args[_key] = arguments[_key];
|
|
64
106
|
}
|
|
65
107
|
|
|
66
108
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
67
|
-
|
|
68
|
-
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
109
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
|
|
69
110
|
inputValue: ""
|
|
70
111
|
});
|
|
71
|
-
|
|
72
|
-
_defineProperty(_assertThisInitialized(_this), "downshift", /*#__PURE__*/React.createRef());
|
|
73
|
-
|
|
112
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "downshift", /*#__PURE__*/_react.default.createRef());
|
|
74
113
|
return _this;
|
|
75
114
|
}
|
|
76
115
|
|
|
77
|
-
|
|
116
|
+
(0, _createClass2.default)(AutoComplete, [{
|
|
78
117
|
key: "componentDidUpdate",
|
|
79
118
|
value: function componentDidUpdate(previousProps) {
|
|
80
119
|
var _this2 = this;
|
|
@@ -84,7 +123,7 @@ var AutoComplete = /*#__PURE__*/function (_React$Component) {
|
|
|
84
123
|
options = _this$props.options;
|
|
85
124
|
var previousValue = previousProps.value;
|
|
86
125
|
|
|
87
|
-
if (!
|
|
126
|
+
if (!(0, _isEqual2.default)(value, previousValue)) {
|
|
88
127
|
var item = null;
|
|
89
128
|
|
|
90
129
|
if (value) {
|
|
@@ -92,7 +131,7 @@ var AutoComplete = /*#__PURE__*/function (_React$Component) {
|
|
|
92
131
|
item = value;
|
|
93
132
|
} else {
|
|
94
133
|
item = options.find(function (option) {
|
|
95
|
-
return value === getOptionValue(option, _this2.props);
|
|
134
|
+
return value === (0, _utils.getOptionValue)(option, _this2.props);
|
|
96
135
|
}) || null;
|
|
97
136
|
}
|
|
98
137
|
}
|
|
@@ -107,20 +146,33 @@ var AutoComplete = /*#__PURE__*/function (_React$Component) {
|
|
|
107
146
|
|
|
108
147
|
}, {
|
|
109
148
|
key: "renderOptions",
|
|
110
|
-
value: function renderOptions(
|
|
149
|
+
value: function renderOptions(_ref2) {
|
|
111
150
|
var _this3 = this;
|
|
112
151
|
|
|
113
|
-
var options =
|
|
114
|
-
isOpen =
|
|
115
|
-
highlightedIndex =
|
|
116
|
-
selectedItem =
|
|
117
|
-
getMenuProps =
|
|
118
|
-
getItemProps =
|
|
119
|
-
placement =
|
|
152
|
+
var options = _ref2.options,
|
|
153
|
+
isOpen = _ref2.isOpen,
|
|
154
|
+
highlightedIndex = _ref2.highlightedIndex,
|
|
155
|
+
selectedItem = _ref2.selectedItem,
|
|
156
|
+
getMenuProps = _ref2.getMenuProps,
|
|
157
|
+
getItemProps = _ref2.getItemProps,
|
|
158
|
+
placement = _ref2.placement;
|
|
120
159
|
|
|
121
160
|
if (!isOpen) {
|
|
122
161
|
return null;
|
|
123
162
|
}
|
|
163
|
+
/**
|
|
164
|
+
* Suggest user to start typing when there are no options available to choose from.
|
|
165
|
+
*/
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
if (!this.state.inputValue && !options.length) {
|
|
169
|
+
return /*#__PURE__*/_react.default.createElement(OptionsList, {
|
|
170
|
+
placement: placement,
|
|
171
|
+
getMenuProps: getMenuProps
|
|
172
|
+
}, /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement(_Typography.Typography, {
|
|
173
|
+
use: "body2"
|
|
174
|
+
}, "Start typing to find entry")));
|
|
175
|
+
}
|
|
124
176
|
|
|
125
177
|
var renderItem = this.props.renderItem;
|
|
126
178
|
var filtered = options.filter(function (item) {
|
|
@@ -130,48 +182,44 @@ var AutoComplete = /*#__PURE__*/function (_React$Component) {
|
|
|
130
182
|
}
|
|
131
183
|
|
|
132
184
|
if (item.aliases) {
|
|
133
|
-
return findInAliases(item, _this3.state.inputValue);
|
|
185
|
+
return (0, _utils.findInAliases)(item, _this3.state.inputValue);
|
|
134
186
|
}
|
|
135
187
|
|
|
136
|
-
return getOptionText(item, _this3.props).toLowerCase().includes(_this3.state.inputValue.toLowerCase());
|
|
188
|
+
return (0, _utils.getOptionText)(item, _this3.props).toLowerCase().includes(_this3.state.inputValue.toLowerCase());
|
|
137
189
|
});
|
|
138
190
|
|
|
139
191
|
if (!filtered.length) {
|
|
140
|
-
return /*#__PURE__*/
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}, /*#__PURE__*/
|
|
144
|
-
className: classNames("autocomplete__options-list", listStyles)
|
|
145
|
-
}, getMenuProps()), /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement(Typography, {
|
|
192
|
+
return /*#__PURE__*/_react.default.createElement(OptionsList, {
|
|
193
|
+
placement: placement,
|
|
194
|
+
getMenuProps: getMenuProps
|
|
195
|
+
}, /*#__PURE__*/_react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement(_Typography.Typography, {
|
|
146
196
|
use: "body2"
|
|
147
|
-
}, "No results.")))
|
|
197
|
+
}, "No results."), this.props.noResultFound));
|
|
148
198
|
}
|
|
149
199
|
|
|
150
|
-
return /*#__PURE__*/
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
},
|
|
154
|
-
className: classNames("autocomplete__options-list", listStyles)
|
|
155
|
-
}, getMenuProps()), filtered.map(function (item, index) {
|
|
200
|
+
return /*#__PURE__*/_react.default.createElement(OptionsList, {
|
|
201
|
+
placement: placement,
|
|
202
|
+
getMenuProps: getMenuProps
|
|
203
|
+
}, filtered.map(function (item, index) {
|
|
156
204
|
var _itemClassNames;
|
|
157
205
|
|
|
158
|
-
var itemValue = getOptionValue(item, _this3.props); // Base classes.
|
|
206
|
+
var itemValue = (0, _utils.getOptionValue)(item, _this3.props); // Base classes.
|
|
159
207
|
|
|
160
|
-
var itemClassNames = (_itemClassNames = {},
|
|
208
|
+
var itemClassNames = (_itemClassNames = {}, (0, _defineProperty2.default)(_itemClassNames, _styles.suggestionList, true), (0, _defineProperty2.default)(_itemClassNames, "highlighted", highlightedIndex === index), (0, _defineProperty2.default)(_itemClassNames, "selected", false), _itemClassNames); // Add "selected" class if the item is selected.
|
|
161
209
|
|
|
162
|
-
if (selectedItem && getOptionValue(selectedItem, _this3.props) === itemValue) {
|
|
210
|
+
if (selectedItem && (0, _utils.getOptionValue)(selectedItem, _this3.props) === itemValue) {
|
|
163
211
|
itemClassNames.selected = true;
|
|
164
212
|
} // Render the item.
|
|
165
213
|
|
|
166
214
|
|
|
167
|
-
return /*#__PURE__*/
|
|
215
|
+
return /*#__PURE__*/_react.default.createElement("li", Object.assign({
|
|
168
216
|
key: itemValue
|
|
169
217
|
}, getItemProps({
|
|
170
218
|
index: index,
|
|
171
219
|
item: item,
|
|
172
|
-
className:
|
|
220
|
+
className: (0, _classnames.default)(itemClassNames)
|
|
173
221
|
})), renderItem.call(_this3, item, index));
|
|
174
|
-
}))
|
|
222
|
+
}));
|
|
175
223
|
}
|
|
176
224
|
}, {
|
|
177
225
|
key: "render",
|
|
@@ -183,21 +231,19 @@ var AutoComplete = /*#__PURE__*/function (_React$Component) {
|
|
|
183
231
|
options = _this$props2.options,
|
|
184
232
|
_onChange = _this$props2.onChange,
|
|
185
233
|
value = _this$props2.value,
|
|
186
|
-
valueProp = _this$props2.valueProp,
|
|
187
|
-
textProp = _this$props2.textProp,
|
|
188
234
|
onInput = _this$props2.onInput,
|
|
189
235
|
_this$props2$validati = _this$props2.validation,
|
|
190
236
|
validation = _this$props2$validati === void 0 ? {
|
|
191
|
-
isValid: null
|
|
237
|
+
isValid: null,
|
|
238
|
+
message: null
|
|
192
239
|
} : _this$props2$validati,
|
|
193
240
|
placement = _this$props2.placement,
|
|
194
|
-
otherInputProps =
|
|
195
|
-
|
|
241
|
+
otherInputProps = (0, _objectWithoutProperties2.default)(_this$props2, _excluded); // Downshift related props.
|
|
196
242
|
|
|
197
243
|
var downshiftProps = {
|
|
198
|
-
className: autoCompleteStyle,
|
|
244
|
+
className: _styles.autoCompleteStyle,
|
|
199
245
|
itemToString: function itemToString(item) {
|
|
200
|
-
return getOptionText(item, _this4.props);
|
|
246
|
+
return (0, _utils.getOptionText)(item, _this4.props);
|
|
201
247
|
},
|
|
202
248
|
defaultSelectedItem: value,
|
|
203
249
|
onChange: function onChange(selection) {
|
|
@@ -205,27 +251,26 @@ var AutoComplete = /*#__PURE__*/function (_React$Component) {
|
|
|
205
251
|
return;
|
|
206
252
|
}
|
|
207
253
|
|
|
208
|
-
_onChange(getOptionValue(selection, _this4.props), selection);
|
|
254
|
+
_onChange((0, _utils.getOptionValue)(selection, _this4.props), selection);
|
|
209
255
|
|
|
210
256
|
_this4.setState(function (state) {
|
|
211
|
-
return
|
|
257
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
|
|
212
258
|
inputValue: ""
|
|
213
259
|
});
|
|
214
260
|
});
|
|
215
261
|
}
|
|
216
262
|
};
|
|
217
|
-
return /*#__PURE__*/
|
|
218
|
-
className:
|
|
219
|
-
}, /*#__PURE__*/
|
|
263
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
264
|
+
className: (0, _classnames.default)(_styles.autoCompleteStyle, className)
|
|
265
|
+
}, /*#__PURE__*/_react.default.createElement(_downshift.default, Object.assign({}, downshiftProps, {
|
|
220
266
|
ref: this.downshift
|
|
221
|
-
}), function (
|
|
222
|
-
var getInputProps =
|
|
223
|
-
openMenu =
|
|
224
|
-
rest =
|
|
225
|
-
|
|
226
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Input, getInputProps(_objectSpread(_objectSpread({
|
|
267
|
+
}), function (_ref3) {
|
|
268
|
+
var getInputProps = _ref3.getInputProps,
|
|
269
|
+
openMenu = _ref3.openMenu,
|
|
270
|
+
rest = (0, _objectWithoutProperties2.default)(_ref3, _excluded2);
|
|
271
|
+
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Input.Input, getInputProps((0, _objectSpread2.default)((0, _objectSpread2.default)({
|
|
227
272
|
// This prop is above `otherInputProps` since it can be overridden by the user.
|
|
228
|
-
trailingIcon: _this4.props.loading && /*#__PURE__*/
|
|
273
|
+
trailingIcon: _this4.props.loading && /*#__PURE__*/_react.default.createElement(Spinner, null)
|
|
229
274
|
}, otherInputProps), {}, {
|
|
230
275
|
// @ts-ignore
|
|
231
276
|
validation: validation,
|
|
@@ -241,10 +286,12 @@ var AutoComplete = /*#__PURE__*/function (_React$Component) {
|
|
|
241
286
|
otherInputProps.onFocus && otherInputProps.onFocus(ev);
|
|
242
287
|
},
|
|
243
288
|
onKeyDown: function onKeyDown(ev) {
|
|
244
|
-
var keyCode =
|
|
289
|
+
var keyCode = (0, _keycode.default)(ev);
|
|
245
290
|
|
|
246
291
|
if (keyCode === "backspace") {
|
|
247
|
-
_onChange
|
|
292
|
+
if (_onChange) {
|
|
293
|
+
_onChange(null);
|
|
294
|
+
}
|
|
248
295
|
|
|
249
296
|
setTimeout(function () {
|
|
250
297
|
return openMenu();
|
|
@@ -252,7 +299,7 @@ var AutoComplete = /*#__PURE__*/function (_React$Component) {
|
|
|
252
299
|
}
|
|
253
300
|
},
|
|
254
301
|
onKeyUp: function onKeyUp(ev) {
|
|
255
|
-
var keyCode =
|
|
302
|
+
var keyCode = (0, _keycode.default)(ev);
|
|
256
303
|
var target = ev.currentTarget;
|
|
257
304
|
var inputValue = target.value || ""; // If user pressed 'esc', 'enter' or similar...
|
|
258
305
|
|
|
@@ -266,34 +313,36 @@ var AutoComplete = /*#__PURE__*/function (_React$Component) {
|
|
|
266
313
|
}
|
|
267
314
|
|
|
268
315
|
_this4.setState(function (state) {
|
|
269
|
-
return
|
|
316
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, state), {}, {
|
|
270
317
|
inputValue: inputValue
|
|
271
318
|
});
|
|
272
319
|
}, function () {
|
|
273
320
|
onInput && onInput(inputValue);
|
|
274
321
|
});
|
|
275
322
|
}
|
|
276
|
-
}))), !otherInputProps.disabled && !otherInputProps.readOnly && _this4.renderOptions(
|
|
323
|
+
}))), !otherInputProps.disabled && !otherInputProps.readOnly && _this4.renderOptions((0, _objectSpread2.default)((0, _objectSpread2.default)({}, rest), {}, {
|
|
277
324
|
options: options,
|
|
278
325
|
placement: placement
|
|
279
326
|
})));
|
|
280
327
|
}));
|
|
281
328
|
}
|
|
282
329
|
}]);
|
|
283
|
-
|
|
284
330
|
return AutoComplete;
|
|
285
|
-
}(
|
|
331
|
+
}(_react.default.Component);
|
|
286
332
|
|
|
287
|
-
|
|
333
|
+
exports.AutoComplete = AutoComplete;
|
|
334
|
+
(0, _defineProperty2.default)(AutoComplete, "defaultProps", {
|
|
288
335
|
valueProp: "id",
|
|
289
336
|
textProp: "name",
|
|
290
337
|
options: [],
|
|
291
338
|
placement: Placement.bottom,
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* We cast this as AutoComplete because renderItem() is executed via .call() where AutoComplete instance is assigned as this.
|
|
342
|
+
*/
|
|
292
343
|
renderItem: function renderItem(item) {
|
|
293
|
-
return /*#__PURE__*/
|
|
344
|
+
return /*#__PURE__*/_react.default.createElement(_Typography.Typography, {
|
|
294
345
|
use: "body2"
|
|
295
|
-
}, getOptionText(item, this.props));
|
|
346
|
+
}, (0, _utils.getOptionText)(item, this.props));
|
|
296
347
|
}
|
|
297
|
-
});
|
|
298
|
-
|
|
299
|
-
export { AutoComplete };
|
|
348
|
+
});
|