grommet 2.24.0 → 2.25.0
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/all/stories/AllComponents.js +2 -7
- package/components/Accordion/Accordion.js +1 -1
- package/components/Accordion/propTypes.js +1 -1
- package/components/Accordion/stories/CustomThemed/Custom.js +3 -2
- package/components/AccordionPanel/AccordionPanel.js +2 -1
- package/components/Anchor/Anchor.js +1 -1
- package/components/Anchor/propTypes.js +1 -1
- package/components/Avatar/Avatar.js +1 -1
- package/components/Box/Box.js +1 -1
- package/components/Box/StyledBox.js +1 -1
- package/components/Box/propTypes.js +1 -1
- package/components/Button/Button.js +1 -1
- package/components/Button/propTypes.js +2 -2
- package/components/Button/stories/Basic.js +1 -1
- package/components/Button/stories/Fill.js +1 -1
- package/components/Button/stories/Kind.js +1 -1
- package/components/Calendar/Calendar.js +1 -1
- package/components/Calendar/index.d.ts +2 -2
- package/components/Calendar/propTypes.js +1 -1
- package/components/Calendar/stories/ShowAdjacentDays.js +1 -1
- package/components/Card/Card.js +1 -1
- package/components/Card/stories/CustomThemed/Clickable.js +1 -1
- package/components/Card/stories/CustomThemed/RichFooter.js +1 -1
- package/components/Card/stories/CustomThemed/Themed.js +1 -1
- package/components/CardBody/CardBody.js +1 -1
- package/components/CardFooter/CardFooter.js +1 -1
- package/components/CardHeader/CardHeader.js +1 -1
- package/components/Carousel/Carousel.js +1 -1
- package/components/Carousel/propTypes.js +1 -1
- package/components/Carousel/stories/CustomThemed/Custom.js +1 -1
- package/components/Chart/Chart.js +1 -1
- package/components/Chart/index.d.ts +28 -2
- package/components/Chart/propTypes.js +1 -1
- package/components/Chart/stories/Rich.js +1 -1
- package/components/Chart/stories/Window.js +1 -1
- package/components/CheckBox/CheckBox.js +1 -1
- package/components/CheckBox/stories/CustomThemed/Custom.js +1 -1
- package/components/CheckBox/stories/CustomThemed/CustomToggle.js +1 -1
- package/components/CheckBox/stories/NoLabel.js +1 -1
- package/components/CheckBox/stories/Simple.js +1 -1
- package/components/CheckBoxGroup/CheckBoxGroup.js +1 -1
- package/components/Clock/Analog.js +1 -1
- package/components/Clock/Clock.js +1 -1
- package/components/Clock/Digital.js +1 -1
- package/components/Clock/propTypes.js +1 -1
- package/components/Collapsible/stories/Nested.js +1 -1
- package/components/Collapsible/stories/Simple.js +1 -1
- package/components/DataChart/DataChart.js +9 -28
- package/components/DataChart/Legend.js +1 -1
- package/components/DataChart/Swatch.js +64 -23
- package/components/DataChart/XAxis.js +1 -1
- package/components/DataChart/YGuide.js +1 -1
- package/components/DataChart/propTypes.js +1 -1
- package/components/DataChart/stories/Legend.js +6 -2
- package/components/DataChart/utils.js +11 -1
- package/components/DataTable/Body.js +11 -5
- package/components/DataTable/Cell.js +1 -1
- package/components/DataTable/DataTable.js +1 -1
- package/components/DataTable/ExpanderCell.js +1 -1
- package/components/DataTable/Footer.js +1 -1
- package/components/DataTable/GroupedBody.js +1 -1
- package/components/DataTable/Header.js +1 -1
- package/components/DataTable/Resizer.js +1 -1
- package/components/DataTable/Sorter.js +1 -1
- package/components/DataTable/propTypes.js +1 -1
- package/components/DataTable/stories/Controlled.js +1 -1
- package/components/DataTable/stories/ControlledGrouped.js +1 -1
- package/components/DataTable/stories/CustomThemed/Fill.js +1 -1
- package/components/DataTable/stories/GroupedOnSelect.js +1 -1
- package/components/DataTable/stories/OnUpdate.js +1 -1
- package/components/DataTable/stories/Served.js +1 -1
- package/components/DataTable/stories/Sort.js +1 -1
- package/components/DataTable/stories/Tunable.js +1 -1
- package/components/DataTable/stories/data.js +1 -1
- package/components/DataTable/stories/rowDetails.js +1 -1
- package/components/DateInput/DateInput.js +29 -24
- package/components/DateInput/index.d.ts +1 -0
- package/components/DateInput/propTypes.js +1 -0
- package/components/DateInput/stories/Format.js +14 -1
- package/components/DateInput/utils.js +1 -1
- package/components/Diagram/Diagram.js +1 -1
- package/components/Diagram/stories/Animated.js +1 -1
- package/components/Diagram/stories/Progressing.js +1 -1
- package/components/Distribution/Distribution.js +1 -1
- package/components/Distribution/propTypes.js +1 -1
- package/components/Drop/Drop.js +1 -1
- package/components/Drop/DropContainer.js +1 -1
- package/components/DropButton/DropButton.js +1 -1
- package/components/DropButton/propTypes.js +1 -1
- package/components/FileInput/FileInput.js +26 -8
- package/components/FileInput/stories/Multiple.js +1 -0
- package/components/FocusedContainer.js +1 -1
- package/components/Footer/Footer.js +1 -1
- package/components/Footer/stories/DoubleFooter.js +1 -1
- package/components/Footer/stories/Sitemap.js +1 -1
- package/components/Form/Form.js +1 -1
- package/components/Form/stories/ArrayOfFormFields.js +1 -1
- package/components/Form/stories/CustomThemed/FieldSpacingOptions.js +1 -1
- package/components/FormField/FormField.js +1 -1
- package/components/Grid/Grid.js +5 -3
- package/components/Grid/README.md +0 -2
- package/components/Grid/index.d.ts +4 -2
- package/components/Grid/propTypes.js +1 -1
- package/components/Grid/stories/CustomThemed/Responsive.js +1 -1
- package/components/Grid/stories/typescript/App.tsx +42 -48
- package/components/Grommet/Grommet.js +1 -1
- package/components/Header/Header.js +1 -1
- package/components/Heading/Heading.js +1 -1
- package/components/Heading/propTypes.js +1 -1
- package/components/Image/Image.js +1 -1
- package/components/Image/propTypes.js +1 -1
- package/components/InfiniteScroll/stories/Basics.js +1 -1
- package/components/InfiniteScroll/stories/ClassChildren.js +1 -1
- package/components/InfiniteScroll/stories/Marker.js +1 -1
- package/components/InfiniteScroll/stories/Show.js +1 -1
- package/components/InfiniteScroll/stories/ShowAfter.js +1 -1
- package/components/InfiniteScroll/stories/ShowBefore.js +1 -1
- package/components/Layer/Layer.js +1 -1
- package/components/Layer/LayerContainer.js +1 -1
- package/components/List/List.js +1 -1
- package/components/List/propTypes.js +1 -1
- package/components/Main/Main.js +1 -1
- package/components/Markdown/Markdown.js +1 -1
- package/components/MaskedInput/MaskedInput.js +37 -28
- package/components/Menu/Menu.js +105 -61
- package/components/Menu/index.d.ts +2 -2
- package/components/Menu/propTypes.js +2 -2
- package/components/Menu/stories/Grouped.js +52 -0
- package/components/Meter/Bar.js +1 -1
- package/components/Meter/Circle.js +5 -3
- package/components/Meter/Meter.js +1 -1
- package/components/Meter/propTypes.js +1 -1
- package/components/NameValueList/NameValueList.js +1 -1
- package/components/NameValuePair/NameValuePair.js +1 -1
- package/components/Nav/Nav.js +1 -1
- package/components/Nav/stories/CustomThemed/JustifySidebar.js +1 -1
- package/components/Nav/stories/Sidebar.js +1 -1
- package/components/Notification/Notification.js +1 -1
- package/components/Notification/index.d.ts +1 -1
- package/components/Notification/propTypes.js +1 -1
- package/components/Page/Page.js +1 -1
- package/components/PageContent/PageContent.js +1 -1
- package/components/PageHeader/PageHeader.js +1 -1
- package/components/PageHeader/propTypes.js +1 -1
- package/components/Pagination/PageControl.js +1 -1
- package/components/Pagination/Pagination.js +1 -1
- package/components/Pagination/propTypes.js +1 -1
- package/components/Paragraph/Paragraph.js +1 -1
- package/components/Paragraph/StyledParagraph.js +7 -1
- package/components/Paragraph/index.d.ts +1 -0
- package/components/Paragraph/propTypes.js +2 -1
- package/components/Paragraph/stories/MaxLines.js +37 -0
- package/components/RadioButton/RadioButton.js +1 -1
- package/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +1 -1
- package/components/RadioButtonGroup/stories/Disabled.js +1 -1
- package/components/RangeInput/RangeInput.js +1 -1
- package/components/RangeSelector/EdgeControl.js +1 -1
- package/components/RangeSelector/RangeSelector.js +1 -1
- package/components/RangeSelector/stories/CustomThemed/Custom.js +1 -1
- package/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +1 -1
- package/components/RangeSelector/stories/Step.js +1 -1
- package/components/RangeSelector/stories/Vertical.js +1 -1
- package/components/RoutedAnchor/RoutedAnchor.js +2 -2
- package/components/RoutedButton/RoutedButton.js +2 -2
- package/components/Select/Select.js +11 -30
- package/components/Select/SelectContainer.js +1 -1
- package/components/Select/propTypes.js +1 -1
- package/components/Select/stories/components/SearchBorderBox.js +1 -1
- package/components/Select/stories/components/SearchInput.js +1 -1
- package/components/Sidebar/Sidebar.js +1 -1
- package/components/Sidebar/stories/Labels.js +1 -1
- package/components/SkipLink/SkipLink.js +1 -1
- package/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
- package/components/Spinner/Spinner.js +1 -1
- package/components/Stack/Stack.js +1 -1
- package/components/Stack/propTypes.js +1 -1
- package/components/Tab/StyledTab.js +2 -2
- package/components/Tab/Tab.js +35 -17
- package/components/Table/propTypes.js +1 -1
- package/components/TableBody/TableBody.js +1 -1
- package/components/TableCell/TableCell.js +1 -1
- package/components/TableFooter/TableFooter.js +1 -1
- package/components/TableHeader/TableHeader.js +1 -1
- package/components/TableRow/TableRow.js +1 -1
- package/components/Tabs/Tabs.js +231 -10
- package/components/Tabs/propTypes.js +1 -1
- package/components/Tabs/stories/Responsive.js +18 -0
- package/components/Tag/Tag.js +1 -1
- package/components/Tag/propTypes.js +1 -1
- package/components/Text/Text.js +1 -1
- package/components/Text/propTypes.js +1 -1
- package/components/TextArea/TextArea.js +1 -1
- package/components/TextArea/stories/NonResizable.js +1 -1
- package/components/TextArea/stories/Simple.js +1 -1
- package/components/TextInput/TextInput.js +1 -1
- package/components/TextInput/stories/InsideFormField.js +1 -1
- package/components/TextInput/stories/WithTags.js +1 -1
- package/components/Tip/Tip.js +4 -23
- package/components/Video/Video.js +1 -1
- package/components/Video/propTypes.js +1 -1
- package/components/WorldMap/WorldMap.js +1 -1
- package/components/WorldMap/propTypes.js +1 -1
- package/components/WorldMap/stories/Places.js +1 -1
- package/contexts/AnnounceContext/stories/Assertive.js +1 -1
- package/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
- package/es6/all/stories/AllComponents.js +2 -7
- package/es6/components/Accordion/Accordion.js +1 -1
- package/es6/components/Accordion/propTypes.js +1 -1
- package/es6/components/Accordion/stories/CustomThemed/Custom.js +3 -2
- package/es6/components/AccordionPanel/AccordionPanel.js +2 -1
- package/es6/components/Anchor/Anchor.js +1 -1
- package/es6/components/Anchor/propTypes.js +1 -1
- package/es6/components/Avatar/Avatar.js +1 -1
- package/es6/components/Box/Box.js +1 -1
- package/es6/components/Box/StyledBox.js +1 -1
- package/es6/components/Box/propTypes.js +1 -1
- package/es6/components/Button/Button.js +1 -1
- package/es6/components/Button/propTypes.js +2 -2
- package/es6/components/Button/stories/Basic.js +1 -1
- package/es6/components/Button/stories/Fill.js +1 -1
- package/es6/components/Button/stories/Kind.js +1 -1
- package/es6/components/Calendar/Calendar.js +1 -1
- package/es6/components/Calendar/index.d.ts +2 -2
- package/es6/components/Calendar/propTypes.js +1 -1
- package/es6/components/Calendar/stories/ShowAdjacentDays.js +1 -1
- package/es6/components/Card/Card.js +1 -1
- package/es6/components/Card/stories/CustomThemed/Clickable.js +1 -1
- package/es6/components/Card/stories/CustomThemed/RichFooter.js +1 -1
- package/es6/components/Card/stories/CustomThemed/Themed.js +1 -1
- package/es6/components/CardBody/CardBody.js +1 -1
- package/es6/components/CardFooter/CardFooter.js +1 -1
- package/es6/components/CardHeader/CardHeader.js +1 -1
- package/es6/components/Carousel/Carousel.js +1 -1
- package/es6/components/Carousel/propTypes.js +1 -1
- package/es6/components/Carousel/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/Chart/Chart.js +1 -1
- package/es6/components/Chart/index.d.ts +28 -2
- package/es6/components/Chart/propTypes.js +1 -1
- package/es6/components/Chart/stories/Rich.js +1 -1
- package/es6/components/Chart/stories/Window.js +1 -1
- package/es6/components/CheckBox/CheckBox.js +1 -1
- package/es6/components/CheckBox/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/CheckBox/stories/CustomThemed/CustomToggle.js +1 -1
- package/es6/components/CheckBox/stories/NoLabel.js +1 -1
- package/es6/components/CheckBox/stories/Simple.js +1 -1
- package/es6/components/CheckBoxGroup/CheckBoxGroup.js +1 -1
- package/es6/components/Clock/Analog.js +1 -1
- package/es6/components/Clock/Clock.js +1 -1
- package/es6/components/Clock/Digital.js +1 -1
- package/es6/components/Clock/propTypes.js +1 -1
- package/es6/components/Collapsible/stories/Nested.js +1 -1
- package/es6/components/Collapsible/stories/Simple.js +1 -1
- package/es6/components/DataChart/DataChart.js +10 -30
- package/es6/components/DataChart/Legend.js +1 -1
- package/es6/components/DataChart/Swatch.js +64 -23
- package/es6/components/DataChart/XAxis.js +1 -1
- package/es6/components/DataChart/YGuide.js +1 -1
- package/es6/components/DataChart/propTypes.js +1 -1
- package/es6/components/DataChart/stories/Legend.js +6 -2
- package/es6/components/DataChart/utils.js +7 -0
- package/es6/components/DataTable/Body.js +10 -5
- package/es6/components/DataTable/Cell.js +1 -1
- package/es6/components/DataTable/DataTable.js +1 -1
- package/es6/components/DataTable/ExpanderCell.js +1 -1
- package/es6/components/DataTable/Footer.js +1 -1
- package/es6/components/DataTable/GroupedBody.js +1 -1
- package/es6/components/DataTable/Header.js +1 -1
- package/es6/components/DataTable/Resizer.js +1 -1
- package/es6/components/DataTable/Sorter.js +1 -1
- package/es6/components/DataTable/propTypes.js +1 -1
- package/es6/components/DataTable/stories/Controlled.js +1 -1
- package/es6/components/DataTable/stories/ControlledGrouped.js +1 -1
- package/es6/components/DataTable/stories/CustomThemed/Fill.js +1 -1
- package/es6/components/DataTable/stories/GroupedOnSelect.js +1 -1
- package/es6/components/DataTable/stories/OnUpdate.js +1 -1
- package/es6/components/DataTable/stories/Served.js +1 -1
- package/es6/components/DataTable/stories/Sort.js +1 -1
- package/es6/components/DataTable/stories/Tunable.js +1 -1
- package/es6/components/DataTable/stories/data.js +1 -1
- package/es6/components/DataTable/stories/rowDetails.js +1 -1
- package/es6/components/DateInput/DateInput.js +28 -24
- package/es6/components/DateInput/index.d.ts +1 -0
- package/es6/components/DateInput/propTypes.js +1 -0
- package/es6/components/DateInput/stories/Format.js +14 -1
- package/es6/components/DateInput/utils.js +1 -1
- package/es6/components/Diagram/Diagram.js +1 -1
- package/es6/components/Diagram/stories/Animated.js +1 -1
- package/es6/components/Diagram/stories/Progressing.js +1 -1
- package/es6/components/Distribution/Distribution.js +1 -1
- package/es6/components/Distribution/propTypes.js +1 -1
- package/es6/components/Drop/Drop.js +1 -1
- package/es6/components/Drop/DropContainer.js +1 -1
- package/es6/components/DropButton/DropButton.js +1 -1
- package/es6/components/DropButton/propTypes.js +1 -1
- package/es6/components/FileInput/FileInput.js +26 -8
- package/es6/components/FileInput/stories/Multiple.js +1 -0
- package/es6/components/FocusedContainer.js +1 -1
- package/es6/components/Footer/Footer.js +1 -1
- package/es6/components/Footer/stories/DoubleFooter.js +1 -1
- package/es6/components/Footer/stories/Sitemap.js +1 -1
- package/es6/components/Form/Form.js +1 -1
- package/es6/components/Form/stories/ArrayOfFormFields.js +1 -1
- package/es6/components/Form/stories/CustomThemed/FieldSpacingOptions.js +1 -1
- package/es6/components/FormField/FormField.js +1 -1
- package/es6/components/Grid/Grid.js +5 -3
- package/es6/components/Grid/README.md +0 -2
- package/es6/components/Grid/index.d.ts +4 -2
- package/es6/components/Grid/propTypes.js +1 -1
- package/es6/components/Grid/stories/CustomThemed/Responsive.js +1 -1
- package/es6/components/Grid/stories/typescript/App.tsx +42 -48
- package/es6/components/Grommet/Grommet.js +1 -1
- package/es6/components/Header/Header.js +1 -1
- package/es6/components/Heading/Heading.js +1 -1
- package/es6/components/Heading/propTypes.js +1 -1
- package/es6/components/Image/Image.js +1 -1
- package/es6/components/Image/propTypes.js +1 -1
- package/es6/components/InfiniteScroll/stories/Basics.js +1 -1
- package/es6/components/InfiniteScroll/stories/ClassChildren.js +1 -1
- package/es6/components/InfiniteScroll/stories/Marker.js +1 -1
- package/es6/components/InfiniteScroll/stories/Show.js +1 -1
- package/es6/components/InfiniteScroll/stories/ShowAfter.js +1 -1
- package/es6/components/InfiniteScroll/stories/ShowBefore.js +1 -1
- package/es6/components/Layer/Layer.js +1 -1
- package/es6/components/Layer/LayerContainer.js +1 -1
- package/es6/components/List/List.js +1 -1
- package/es6/components/List/propTypes.js +1 -1
- package/es6/components/Main/Main.js +1 -1
- package/es6/components/Markdown/Markdown.js +1 -1
- package/es6/components/MaskedInput/MaskedInput.js +38 -29
- package/es6/components/Menu/Menu.js +106 -61
- package/es6/components/Menu/index.d.ts +2 -2
- package/es6/components/Menu/propTypes.js +2 -2
- package/es6/components/Menu/stories/Grouped.js +40 -0
- package/es6/components/Meter/Bar.js +1 -1
- package/es6/components/Meter/Circle.js +5 -3
- package/es6/components/Meter/Meter.js +1 -1
- package/es6/components/Meter/propTypes.js +1 -1
- package/es6/components/NameValueList/NameValueList.js +1 -1
- package/es6/components/NameValuePair/NameValuePair.js +1 -1
- package/es6/components/Nav/Nav.js +1 -1
- package/es6/components/Nav/stories/CustomThemed/JustifySidebar.js +1 -1
- package/es6/components/Nav/stories/Sidebar.js +1 -1
- package/es6/components/Notification/Notification.js +1 -1
- package/es6/components/Notification/index.d.ts +1 -1
- package/es6/components/Notification/propTypes.js +1 -1
- package/es6/components/Page/Page.js +1 -1
- package/es6/components/PageContent/PageContent.js +1 -1
- package/es6/components/PageHeader/PageHeader.js +1 -1
- package/es6/components/PageHeader/propTypes.js +1 -1
- package/es6/components/Pagination/PageControl.js +1 -1
- package/es6/components/Pagination/Pagination.js +1 -1
- package/es6/components/Pagination/propTypes.js +1 -1
- package/es6/components/Paragraph/Paragraph.js +1 -1
- package/es6/components/Paragraph/StyledParagraph.js +8 -1
- package/es6/components/Paragraph/index.d.ts +1 -0
- package/es6/components/Paragraph/propTypes.js +2 -1
- package/es6/components/Paragraph/stories/MaxLines.js +24 -0
- package/es6/components/RadioButton/RadioButton.js +1 -1
- package/es6/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/es6/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +1 -1
- package/es6/components/RadioButtonGroup/stories/Disabled.js +1 -1
- package/es6/components/RangeInput/RangeInput.js +1 -1
- package/es6/components/RangeSelector/EdgeControl.js +1 -1
- package/es6/components/RangeSelector/RangeSelector.js +1 -1
- package/es6/components/RangeSelector/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +1 -1
- package/es6/components/RangeSelector/stories/Step.js +1 -1
- package/es6/components/RangeSelector/stories/Vertical.js +1 -1
- package/es6/components/RoutedAnchor/RoutedAnchor.js +2 -2
- package/es6/components/RoutedButton/RoutedButton.js +2 -2
- package/es6/components/Select/Select.js +12 -31
- package/es6/components/Select/SelectContainer.js +1 -1
- package/es6/components/Select/propTypes.js +1 -1
- package/es6/components/Select/stories/components/SearchBorderBox.js +1 -1
- package/es6/components/Select/stories/components/SearchInput.js +1 -1
- package/es6/components/Sidebar/Sidebar.js +1 -1
- package/es6/components/Sidebar/stories/Labels.js +1 -1
- package/es6/components/SkipLink/SkipLink.js +1 -1
- package/es6/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
- package/es6/components/Spinner/Spinner.js +1 -1
- package/es6/components/Stack/Stack.js +1 -1
- package/es6/components/Stack/propTypes.js +1 -1
- package/es6/components/Tab/StyledTab.js +2 -2
- package/es6/components/Tab/Tab.js +35 -18
- package/es6/components/Table/propTypes.js +1 -1
- package/es6/components/TableBody/TableBody.js +1 -1
- package/es6/components/TableCell/TableCell.js +1 -1
- package/es6/components/TableFooter/TableFooter.js +1 -1
- package/es6/components/TableHeader/TableHeader.js +1 -1
- package/es6/components/TableRow/TableRow.js +1 -1
- package/es6/components/Tabs/Tabs.js +227 -11
- package/es6/components/Tabs/propTypes.js +1 -1
- package/es6/components/Tabs/stories/Responsive.js +18 -0
- package/es6/components/Tag/Tag.js +1 -1
- package/es6/components/Tag/propTypes.js +1 -1
- package/es6/components/Text/Text.js +1 -1
- package/es6/components/Text/propTypes.js +1 -1
- package/es6/components/TextArea/TextArea.js +1 -1
- package/es6/components/TextArea/stories/NonResizable.js +1 -1
- package/es6/components/TextArea/stories/Simple.js +1 -1
- package/es6/components/TextInput/TextInput.js +1 -1
- package/es6/components/TextInput/stories/InsideFormField.js +1 -1
- package/es6/components/TextInput/stories/WithTags.js +1 -1
- package/es6/components/Tip/Tip.js +4 -23
- package/es6/components/Video/Video.js +1 -1
- package/es6/components/Video/propTypes.js +1 -1
- package/es6/components/WorldMap/WorldMap.js +1 -1
- package/es6/components/WorldMap/propTypes.js +1 -1
- package/es6/components/WorldMap/stories/Places.js +1 -1
- package/es6/contexts/AnnounceContext/stories/Assertive.js +1 -1
- package/es6/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
- package/es6/index.d.ts +1 -0
- package/es6/themes/base.d.ts +14 -0
- package/es6/themes/base.js +21 -1
- package/es6/utils/index.js +2 -1
- package/es6/utils/object.js +1 -1
- package/es6/utils/pagination.js +1 -1
- package/es6/utils/use-keyboard.js +25 -0
- package/grommet.min.js +1 -1
- package/grommet.min.js.map +1 -1
- package/index.d.ts +1 -0
- package/package.json +26 -26
- package/themes/base.d.ts +14 -0
- package/themes/base.js +21 -1
- package/utils/index.js +8 -0
- package/utils/object.js +1 -1
- package/utils/pagination.js +1 -1
- package/utils/use-keyboard.js +34 -0
|
@@ -2,7 +2,7 @@ var _excluded = ["a11yTitle", "axis", "bounds", "chart", "data", "detail", "gap"
|
|
|
2
2
|
_excluded2 = ["property", "type", "x", "y"],
|
|
3
3
|
_excluded3 = ["property"];
|
|
4
4
|
|
|
5
|
-
function _extends() { _extends = Object.assign
|
|
5
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
6
6
|
|
|
7
7
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
8
8
|
|
|
@@ -21,7 +21,7 @@ import { XAxis } from './XAxis';
|
|
|
21
21
|
import { YAxis } from './YAxis';
|
|
22
22
|
import { XGuide } from './XGuide';
|
|
23
23
|
import { YGuide } from './YGuide';
|
|
24
|
-
import { createDateFormat, halfPad, heightYGranularity, points } from './utils';
|
|
24
|
+
import { createDateFormat, halfPad, heightYGranularity, largestSize, points } from './utils';
|
|
25
25
|
import { DataChartPropTypes } from './propTypes';
|
|
26
26
|
var stackedChartType = {
|
|
27
27
|
areas: 'area',
|
|
@@ -366,8 +366,10 @@ var DataChart = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
366
366
|
|
|
367
367
|
charts.forEach(function (_ref6, index) {
|
|
368
368
|
var color = _ref6.color,
|
|
369
|
+
dash = _ref6.dash,
|
|
369
370
|
point = _ref6.point,
|
|
370
371
|
property = _ref6.property,
|
|
372
|
+
round = _ref6.round,
|
|
371
373
|
thickness = _ref6.thickness,
|
|
372
374
|
type = _ref6.type;
|
|
373
375
|
var calcThickness = chartProps[index].thickness;
|
|
@@ -389,6 +391,9 @@ var DataChart = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
389
391
|
if (pColor && !result[p].color) result[p].color = pColor;
|
|
390
392
|
if (point && !result[p].point) result[p].point = point;else if (type === 'point') result[p].point = false;
|
|
391
393
|
if ((thickness || calcThickness) && !result[p].thickness) result[p].thickness = thickness || calcThickness;
|
|
394
|
+
if (round !== undefined && result[p].round === undefined) result[p].round = round;
|
|
395
|
+
if (dash !== undefined && result[p].dash === undefined) result[p].dash = dash;
|
|
396
|
+
if (result[p].type === undefined) result[p].type = type;
|
|
392
397
|
});
|
|
393
398
|
}
|
|
394
399
|
}); // set color for any non-aspect properties we don't have one for yet
|
|
@@ -454,8 +459,8 @@ var DataChart = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
454
459
|
charts.forEach(function (_ref7, index) {
|
|
455
460
|
var type = _ref7.type;
|
|
456
461
|
var thickness = chartProps[index].thickness;
|
|
457
|
-
result.horizontal = halfPad[thickness];
|
|
458
|
-
if (type && type !== 'bar') result.vertical = halfPad[thickness];
|
|
462
|
+
result.horizontal = largestSize(result.horizontal, halfPad[thickness]);
|
|
463
|
+
if (type && type !== 'bar') result.vertical = largestSize(result.vertical, halfPad[thickness]);
|
|
459
464
|
});
|
|
460
465
|
return result;
|
|
461
466
|
}, [chartProps, charts, padProp]); // calculate the thickness in pixels of each chart
|
|
@@ -659,7 +664,6 @@ var DataChart = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
659
664
|
activeProperty: activeProperty,
|
|
660
665
|
axis: axis,
|
|
661
666
|
data: data,
|
|
662
|
-
pad: pad,
|
|
663
667
|
series: series,
|
|
664
668
|
seriesStyles: seriesStyles,
|
|
665
669
|
renderValue: renderValue,
|
|
@@ -670,31 +674,7 @@ var DataChart = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
670
674
|
seriesStyles: seriesStyles,
|
|
671
675
|
activeProperty: activeProperty,
|
|
672
676
|
setActiveProperty: setActiveProperty
|
|
673
|
-
}) : null;
|
|
674
|
-
|
|
675
|
-
if (!Grid.available) {
|
|
676
|
-
var _content = stackElement;
|
|
677
|
-
|
|
678
|
-
if (xAxisElement) {
|
|
679
|
-
_content = /*#__PURE__*/React.createElement(Box, null, _content, xAxisElement);
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
if (yAxisElement) {
|
|
683
|
-
_content = /*#__PURE__*/React.createElement(Box, {
|
|
684
|
-
direction: "row"
|
|
685
|
-
}, /*#__PURE__*/React.createElement(Box, null, yAxisElement, /*#__PURE__*/React.createElement(Box, {
|
|
686
|
-
ref: spacerRef,
|
|
687
|
-
flex: false
|
|
688
|
-
})), _content);
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
if (legendElement) {
|
|
692
|
-
_content = /*#__PURE__*/React.createElement(Box, null, _content, legendElement);
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
return _content;
|
|
696
|
-
}
|
|
697
|
-
|
|
677
|
+
}) : null;
|
|
698
678
|
var content = /*#__PURE__*/React.createElement(Grid, _extends({
|
|
699
679
|
ref: ref,
|
|
700
680
|
"aria-label": a11yTitle,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React, { useMemo } from 'react';
|
|
4
4
|
import { Box } from '../Box';
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
1
3
|
import React, { useContext } from 'react';
|
|
2
4
|
import { ThemeContext } from 'styled-components';
|
|
3
5
|
import { normalizeColor, parseMetricToNum } from '../../utils';
|
|
@@ -5,12 +7,19 @@ import { normalizeColor, parseMetricToNum } from '../../utils';
|
|
|
5
7
|
var Swatch = function Swatch(_ref) {
|
|
6
8
|
var aspect = _ref.aspect,
|
|
7
9
|
color = _ref.color,
|
|
10
|
+
dash = _ref.dash,
|
|
8
11
|
point = _ref.point,
|
|
9
|
-
|
|
12
|
+
round = _ref.round,
|
|
13
|
+
thickness = _ref.thickness,
|
|
14
|
+
type = _ref.type;
|
|
10
15
|
var theme = useContext(ThemeContext);
|
|
11
16
|
var dim = parseInt(theme.global.spacing, 10) / 2;
|
|
12
17
|
var half = dim / 2;
|
|
18
|
+
var height = dim;
|
|
13
19
|
var width = dim;
|
|
20
|
+
var normalizedColor = color ? normalizeColor(color.color || color, theme) : undefined;
|
|
21
|
+
var fill = normalizedColor;
|
|
22
|
+
var stroke = 'none';
|
|
14
23
|
var content;
|
|
15
24
|
if (aspect === 'x') content = /*#__PURE__*/React.createElement("path", {
|
|
16
25
|
d: "M 0 " + half + " L " + dim + " " + half,
|
|
@@ -43,34 +52,66 @@ var Swatch = function Swatch(_ref) {
|
|
|
43
52
|
height: dim,
|
|
44
53
|
fill: "#000",
|
|
45
54
|
opacity: 0.8
|
|
46
|
-
}));else if (point
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
}));else if (point) {
|
|
56
|
+
if (point === 'circle') content = /*#__PURE__*/React.createElement("circle", {
|
|
57
|
+
cx: half,
|
|
58
|
+
cy: half,
|
|
59
|
+
r: half
|
|
60
|
+
});else {
|
|
61
|
+
var d;
|
|
62
|
+
if (point === 'diamond') d = "M " + half + " 0 L " + dim + " " + half + " L " + half + " " + dim + " L 0 " + half + " Z";else if (point === 'star') {
|
|
63
|
+
var off1 = half / 3;
|
|
64
|
+
var off2 = off1 * 2;
|
|
65
|
+
d = "M " + half + " 0 L " + (half - off2) + " " + dim + " L " + dim + " " + (half - off1) + " L 0 " + (half - off1) + " L " + (half + off2) + " " + dim + " Z";
|
|
66
|
+
} else if (point === 'triangle') d = "M " + half + " 0 L " + dim + " " + dim + " L 0 " + dim + " Z";else if (point === 'triangleDown') d = "M 0 0 L " + dim + " 0 L " + half + " " + dim + " Z";else if (point === 'square') d = "M 0 0 L " + dim + " 0 L " + dim + " " + dim + " L 0 " + dim + " Z";
|
|
67
|
+
if (d) content = /*#__PURE__*/React.createElement("path", {
|
|
68
|
+
d: d
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
} else if (type === 'area') {
|
|
72
|
+
if (round) content = /*#__PURE__*/React.createElement("circle", {
|
|
73
|
+
cx: half,
|
|
74
|
+
cy: half,
|
|
75
|
+
r: half
|
|
76
|
+
});else content = /*#__PURE__*/React.createElement("rect", {
|
|
77
|
+
x: 0,
|
|
78
|
+
y: 0,
|
|
79
|
+
width: width,
|
|
80
|
+
height: height
|
|
64
81
|
});
|
|
82
|
+
} else {
|
|
83
|
+
// draw a line oriented based on the type and then match style
|
|
84
|
+
var strokeWidth = parseMetricToNum(theme.global.edgeSize[thickness]) || dim;
|
|
85
|
+
|
|
86
|
+
var _d;
|
|
87
|
+
|
|
88
|
+
if (type === 'line' || type === 'area') {
|
|
89
|
+
width = Math.max(width, strokeWidth * 4);
|
|
90
|
+
height = strokeWidth;
|
|
91
|
+
_d = "M 0 " + height / 2 + " L " + width + " " + height / 2;
|
|
92
|
+
} else {
|
|
93
|
+
width = strokeWidth;
|
|
94
|
+
_d = "M " + width / 2 + " 0 L " + width / 2 + " " + dim;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
fill = 'none';
|
|
98
|
+
stroke = normalizedColor;
|
|
99
|
+
var strokeProps = {};
|
|
100
|
+
if (round) strokeProps.strokeLinecap = 'round';
|
|
101
|
+
if (dash) strokeProps.strokeDasharray = round ? strokeWidth + " " + strokeWidth * 1.5 : strokeWidth * 2 + " " + strokeWidth / 2;
|
|
102
|
+
content = /*#__PURE__*/React.createElement("path", _extends({
|
|
103
|
+
d: _d,
|
|
104
|
+
strokeWidth: strokeWidth
|
|
105
|
+
}, strokeProps));
|
|
65
106
|
}
|
|
66
107
|
var opacity = color && color.opacity ? theme.global.opacity[color.opacity] : undefined;
|
|
67
108
|
return /*#__PURE__*/React.createElement("svg", {
|
|
68
109
|
width: width,
|
|
69
|
-
height:
|
|
70
|
-
viewBox: "0 0 " + width + " " +
|
|
71
|
-
fill:
|
|
110
|
+
height: height,
|
|
111
|
+
viewBox: "0 0 " + width + " " + height,
|
|
112
|
+
fill: fill,
|
|
72
113
|
opacity: opacity,
|
|
73
|
-
stroke:
|
|
114
|
+
stroke: stroke
|
|
74
115
|
}, content);
|
|
75
116
|
};
|
|
76
117
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["values", "pad", "renderValue", "serie"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React, { forwardRef } from 'react';
|
|
4
4
|
import { Box } from '../Box';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { genericProps, padPropType, pointPropType } from '../../utils/general-prop-types';
|
|
@@ -7,7 +7,7 @@ for (var i = 1; i < 8; i += 1) {
|
|
|
7
7
|
data.push({
|
|
8
8
|
date: "2020-07-" + (i % 30 + 1).toString().padStart(2, 0),
|
|
9
9
|
percent: Math.abs(v * 100),
|
|
10
|
-
amount:
|
|
10
|
+
amount: Math.round(Math.abs(v * 50))
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -36,10 +36,14 @@ export var Legend = function Legend() {
|
|
|
36
36
|
label: 'Amount'
|
|
37
37
|
}],
|
|
38
38
|
chart: ['percent', {
|
|
39
|
+
type: 'line',
|
|
39
40
|
property: 'amount',
|
|
40
|
-
thickness: '
|
|
41
|
+
thickness: 'xsmall',
|
|
42
|
+
dash: true,
|
|
43
|
+
round: true
|
|
41
44
|
}],
|
|
42
45
|
legend: true,
|
|
46
|
+
detail: true,
|
|
43
47
|
axis: {
|
|
44
48
|
x: {
|
|
45
49
|
property: 'date',
|
|
@@ -39,6 +39,13 @@ export var doublePad = {
|
|
|
39
39
|
xsmall: 'small',
|
|
40
40
|
xxsmall: 'xsmall'
|
|
41
41
|
};
|
|
42
|
+
var orderedSizes = ['xlarge', 'large', 'medium', 'small', 'xsmall', 'xxsmall', 'hair'];
|
|
43
|
+
export var largestSize = function largestSize(size1, size2) {
|
|
44
|
+
if (size1 && !size2) return size1;
|
|
45
|
+
if (size2 && !size1) return size2;
|
|
46
|
+
if (orderedSizes.indexOf(size1) < orderedSizes.indexOf(size2)) return size1;
|
|
47
|
+
return size2;
|
|
48
|
+
};
|
|
42
49
|
export var createDateFormat = function createDateFormat(firstValue, lastValue, full) {
|
|
43
50
|
var dateFormat;
|
|
44
51
|
var startDate = new Date(firstValue);
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
var _excluded = ["cellProps", "columns", "data", "disabled", "onMore", "replace", "onClickRow", "onSelect", "pinnedOffset", "primaryProperty", "rowProps", "selected", "rowDetails", "show", "size", "step", "rowExpand", "setRowExpand", "verticalAlign"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
7
7
|
/* eslint-disable no-underscore-dangle */
|
|
8
8
|
import React, { forwardRef, memo, useContext } from 'react';
|
|
9
9
|
import { ThemeContext } from 'styled-components';
|
|
10
|
+
import { useKeyboard } from '../../utils';
|
|
10
11
|
import { CheckBox } from '../CheckBox';
|
|
11
12
|
import { InfiniteScroll } from '../InfiniteScroll';
|
|
12
13
|
import { TableRow } from '../TableRow';
|
|
@@ -130,6 +131,8 @@ var Row = /*#__PURE__*/memo(function (_ref) {
|
|
|
130
131
|
}, rowDetails(data[index]))));
|
|
131
132
|
});
|
|
132
133
|
var Body = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
134
|
+
var _ref3;
|
|
135
|
+
|
|
133
136
|
var cellPropsProp = _ref2.cellProps,
|
|
134
137
|
columns = _ref2.columns,
|
|
135
138
|
data = _ref2.data,
|
|
@@ -159,7 +162,11 @@ var Body = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
159
162
|
|
|
160
163
|
var _React$useState2 = React.useState(),
|
|
161
164
|
lastActive = _React$useState2[0],
|
|
162
|
-
setLastActive = _React$useState2[1];
|
|
165
|
+
setLastActive = _React$useState2[1]; // Determine if using a keyboard to cover focus behavior
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
var usingKeyboard = useKeyboard();
|
|
169
|
+
var onFocusActive = (_ref3 = active != null ? active : lastActive) != null ? _ref3 : usingKeyboard ? 0 : undefined;
|
|
163
170
|
|
|
164
171
|
var selectRow = function selectRow() {
|
|
165
172
|
var _data$active;
|
|
@@ -206,9 +213,7 @@ var Body = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
206
213
|
size: size,
|
|
207
214
|
tabIndex: onClickRow ? 0 : undefined,
|
|
208
215
|
onFocus: function onFocus() {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
return setActive((_ref3 = active != null ? active : lastActive) != null ? _ref3 : 0);
|
|
216
|
+
return setActive(onFocusActive);
|
|
212
217
|
},
|
|
213
218
|
onBlur: function onBlur() {
|
|
214
219
|
setLastActive(active);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["background", "border", "column", "datum", "pad", "pin", "pinnedOffset", "primaryProperty", "scope", "verticalAlign"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["background", "border", "columns", "data", "disabled", "fill", "groupBy", "onClickRow", "onMore", "onSearch", "onSelect", "onSort", "onUpdate", "replace", "pad", "paginate", "pin", "placeholder", "primaryKey", "resizeable", "rowProps", "select", "show", "size", "sort", "sortable", "rowDetails", "step", "verticalAlign"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["context", "expanded", "onToggle", "pad"],
|
|
2
2
|
_excluded2 = ["background", "border", "context"];
|
|
3
3
|
|
|
4
|
-
function _extends() { _extends = Object.assign
|
|
4
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
5
|
|
|
6
6
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["cellProps", "columns", "fill", "footerValues", "groups", "onSelect", "pin", "pinnedOffset", "primaryProperty", "selected", "verticalAlign"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["cellProps", "columns", "data", "disabled", "groupBy", "groups", "groupState", "pinnedOffset", "primaryProperty", "onMore", "onSelect", "onToggle", "onUpdate", "replace", "rowProps", "selected", "size", "step", "verticalAlign"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["background", "border", "color", "font", "gap", "pad", "units"],
|
|
2
2
|
_excluded2 = ["cellProps", "columns", "data", "disabled", "fill", "filtering", "filters", "groupBy", "groups", "groupState", "onFilter", "onFiltering", "onResize", "onSelect", "onSort", "onToggle", "onWidths", "pin", "pinnedOffset", "primaryProperty", "selected", "rowDetails", "sort", "widths", "verticalAlign"];
|
|
3
3
|
|
|
4
|
-
function _extends() { _extends = Object.assign
|
|
4
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
5
|
|
|
6
6
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
7
7
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React, { useCallback, useContext, useEffect, useRef, useState } from 'react';
|
|
4
4
|
import styled, { ThemeContext } from 'styled-components';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React, { useContext } from 'react';
|
|
4
4
|
import styled, { ThemeContext } from 'styled-components';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { genericProps } from '../../utils/general-prop-types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Box, DataTable, CheckBox } from 'grommet'; // Source code for the data can be found here
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
4
|
import { DataTable } from 'grommet'; // Source code for the data can be found here
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Grommet, Box, DataTable } from 'grommet';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Box, DataTable } from 'grommet'; // Source code for the data can be found here
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
/* eslint-disable no-param-reassign */
|
|
4
4
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Box, DataTable } from 'grommet'; // Source code for the data can be found here
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Box, DataTable } from 'grommet';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Box, DataTable } from 'grommet'; // Source code for the data can be found here
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Box, Meter, Text, Tip } from 'grommet';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Box, DataTable, CheckBox } from 'grommet'; // Source code for the data can be found here
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var _excluded = ["buttonProps", "calendarProps", "defaultValue", "disabled", "dropProps", "format", "id", "icon", "inline", "inputProps", "name", "onChange", "onFocus", "plain", "value", "messages"],
|
|
1
|
+
var _excluded = ["buttonProps", "calendarProps", "defaultValue", "disabled", "dropProps", "format", "id", "icon", "inline", "inputProps", "name", "onChange", "onFocus", "plain", "reverse", "value", "messages"],
|
|
2
2
|
_excluded2 = ["icon"];
|
|
3
3
|
|
|
4
|
-
function _extends() { _extends = Object.assign
|
|
4
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
5
|
|
|
6
6
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
7
7
|
|
|
@@ -39,6 +39,8 @@ var DateInput = /*#__PURE__*/forwardRef(function (_ref, refArg) {
|
|
|
39
39
|
_onChange = _ref.onChange,
|
|
40
40
|
_onFocus = _ref.onFocus,
|
|
41
41
|
plain = _ref.plain,
|
|
42
|
+
_ref$reverse = _ref.reverse,
|
|
43
|
+
reverseProp = _ref$reverse === void 0 ? false : _ref$reverse,
|
|
42
44
|
valueArg = _ref.value,
|
|
43
45
|
messages = _ref.messages,
|
|
44
46
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
@@ -107,14 +109,19 @@ var DateInput = /*#__PURE__*/forwardRef(function (_ref, refArg) {
|
|
|
107
109
|
|
|
108
110
|
if (MaskedInputIcon) {
|
|
109
111
|
console.warn("Customizing the DateInput icon through inputProps is deprecated. \nUse the icon prop instead.");
|
|
110
|
-
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
var reverse = reverseProp || restOfInputProps.reverse;
|
|
115
|
+
var calendarDropdownAlign = {
|
|
116
|
+
top: 'bottom',
|
|
117
|
+
left: 'left'
|
|
118
|
+
}; // We need to distinguish between the caller changing a Form value
|
|
111
119
|
// and the user typing a date that he isn't finished with yet.
|
|
112
120
|
// To handle this, we see if we have a value and the text value
|
|
113
121
|
// associated with it doesn't align to it, then we update the text value.
|
|
114
122
|
// We compare using textToValue to avoid "06/01/2021" not
|
|
115
123
|
// matching "06/1/2021".
|
|
116
124
|
|
|
117
|
-
|
|
118
125
|
useEffect(function () {
|
|
119
126
|
if (schema && value !== undefined) {
|
|
120
127
|
var nextTextValue = valueToText(normalizedDate, schema);
|
|
@@ -204,10 +211,7 @@ var DateInput = /*#__PURE__*/forwardRef(function (_ref, refArg) {
|
|
|
204
211
|
ref: ref,
|
|
205
212
|
id: id,
|
|
206
213
|
dropProps: _extends({
|
|
207
|
-
align:
|
|
208
|
-
top: 'bottom',
|
|
209
|
-
left: 'left'
|
|
210
|
-
}
|
|
214
|
+
align: calendarDropdownAlign
|
|
211
215
|
}, dropProps),
|
|
212
216
|
dropContent: calendar,
|
|
213
217
|
icon: icon || MaskedInputIcon || /*#__PURE__*/React.createElement(CalendarIcon, {
|
|
@@ -216,6 +220,18 @@ var DateInput = /*#__PURE__*/forwardRef(function (_ref, refArg) {
|
|
|
216
220
|
}, buttonProps));
|
|
217
221
|
}
|
|
218
222
|
|
|
223
|
+
var calendarButton = /*#__PURE__*/React.createElement(Button, {
|
|
224
|
+
onClick: open ? closeCalendar : openCalendar,
|
|
225
|
+
plain: true,
|
|
226
|
+
icon: icon || MaskedInputIcon || /*#__PURE__*/React.createElement(CalendarIcon, {
|
|
227
|
+
size: iconSize
|
|
228
|
+
}),
|
|
229
|
+
margin: reverse ? {
|
|
230
|
+
left: 'small'
|
|
231
|
+
} : {
|
|
232
|
+
right: 'small'
|
|
233
|
+
}
|
|
234
|
+
});
|
|
219
235
|
var input = /*#__PURE__*/React.createElement(FormContext.Provider, {
|
|
220
236
|
key: "input" // don't let MaskedInput drive the Form
|
|
221
237
|
,
|
|
@@ -234,7 +250,7 @@ var DateInput = /*#__PURE__*/forwardRef(function (_ref, refArg) {
|
|
|
234
250
|
round: "xxsmall",
|
|
235
251
|
direction: "row",
|
|
236
252
|
fill: true
|
|
237
|
-
}, /*#__PURE__*/React.createElement(MaskedInput, _extends({
|
|
253
|
+
}, reverse && calendarButton, /*#__PURE__*/React.createElement(MaskedInput, _extends({
|
|
238
254
|
ref: ref,
|
|
239
255
|
id: id,
|
|
240
256
|
name: name,
|
|
@@ -287,16 +303,7 @@ var DateInput = /*#__PURE__*/forwardRef(function (_ref, refArg) {
|
|
|
287
303
|
}));
|
|
288
304
|
if (_onFocus) _onFocus(event);
|
|
289
305
|
}
|
|
290
|
-
})),
|
|
291
|
-
onClick: open ? closeCalendar : openCalendar,
|
|
292
|
-
plain: true,
|
|
293
|
-
icon: icon || MaskedInputIcon || /*#__PURE__*/React.createElement(CalendarIcon, {
|
|
294
|
-
size: iconSize
|
|
295
|
-
}),
|
|
296
|
-
margin: {
|
|
297
|
-
right: 'small'
|
|
298
|
-
}
|
|
299
|
-
}))));
|
|
306
|
+
})), !reverse && calendarButton)));
|
|
300
307
|
|
|
301
308
|
if (inline) {
|
|
302
309
|
return /*#__PURE__*/React.createElement(Box, null, input, calendar);
|
|
@@ -311,11 +318,8 @@ var DateInput = /*#__PURE__*/forwardRef(function (_ref, refArg) {
|
|
|
311
318
|
}, /*#__PURE__*/React.createElement(Drop, _extends({
|
|
312
319
|
overflow: "visible",
|
|
313
320
|
id: id ? id + "__drop" : undefined,
|
|
314
|
-
target:
|
|
315
|
-
align: _extends({
|
|
316
|
-
top: 'bottom',
|
|
317
|
-
left: 'left'
|
|
318
|
-
}, dropProps),
|
|
321
|
+
target: containerRef.current,
|
|
322
|
+
align: _extends({}, calendarDropdownAlign, dropProps),
|
|
319
323
|
onEsc: closeCalendar,
|
|
320
324
|
onClickOutside: function onClickOutside(_ref4) {
|
|
321
325
|
var target = _ref4.target;
|