grommet 2.39.0 → 2.40.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all/stories/AllComponents.js +1 -1
- package/components/Accordion/Accordion.js +1 -1
- package/components/Accordion/stories/CustomThemed/Custom.js +1 -1
- package/components/Accordion/stories/Simple.js +1 -1
- package/components/AccordionPanel/AccordionPanel.js +8 -4
- package/components/Anchor/Anchor.js +6 -4
- package/components/Anchor/StyledAnchor.js +1 -2
- package/components/Avatar/Avatar.js +8 -6
- package/components/Avatar/StyledAvatar.js +2 -3
- package/components/Box/Box.js +8 -6
- package/components/Box/StyledBox.js +5 -6
- package/components/Box/stories/BackgroundThemed.js +3 -2
- package/components/Button/Badge.js +8 -6
- package/components/Button/Button.js +7 -5
- package/components/Button/StyledButton.js +1 -2
- package/components/Button/StyledButtonKind.js +1 -2
- package/components/Calendar/Calendar.js +27 -23
- package/components/Calendar/StyledCalendar.js +4 -5
- package/components/Card/Card.js +3 -2
- package/components/Card/stories/CustomThemed/Clickable.js +1 -1
- package/components/Card/stories/CustomThemed/Themed.js +1 -1
- package/components/CardBody/CardBody.js +3 -2
- package/components/CardFooter/CardFooter.js +3 -2
- package/components/CardHeader/CardHeader.js +3 -2
- package/components/Cards/Cards.js +4 -3
- package/components/Carousel/Carousel.js +4 -3
- package/components/Carousel/stories/CustomThemed/Custom.js +1 -1
- package/components/Chart/Chart.js +6 -4
- package/components/Chart/StyledChart.js +1 -2
- package/components/CheckBox/CheckBox.js +9 -7
- package/components/CheckBox/StyledCheckBox.js +6 -7
- package/components/CheckBox/stories/NoLabel.js +1 -1
- package/components/CheckBox/stories/Simple.js +1 -1
- package/components/CheckBoxGroup/CheckBoxGroup.js +6 -4
- package/components/CheckBoxGroup/StyledCheckBoxGroup.js +1 -2
- package/components/Clock/Analog.js +11 -9
- package/components/Clock/Clock.js +1 -1
- package/components/Clock/Digital.js +12 -7
- package/components/Clock/StyledClock.js +5 -6
- package/components/Collapsible/Collapsible.js +3 -2
- package/components/Collapsible/stories/Nested.js +1 -1
- package/components/Data/Data.js +1 -1
- package/components/Data/DataForm.js +5 -5
- package/components/Data/filter.js +6 -6
- package/components/Data/index.d.ts +1 -3
- package/components/Data/propTypes.js +2 -1
- package/components/Data/stories/ComposedToolbar.js +2 -1
- package/components/Data/stories/Inline.js +1 -1
- package/components/Data/stories/Views.js +3 -0
- package/components/DataChart/DataChart.js +4 -3
- package/components/DataChart/Detail.js +3 -2
- package/components/DataChart/Swatch.js +3 -2
- package/components/DataChart/XAxis.js +1 -1
- package/components/DataClearFilters/DataClearFilters.js +4 -3
- package/components/DataFilter/DataFilter.js +4 -4
- package/components/DataFilters/DataFilters.js +4 -3
- package/components/DataSearch/DataSearch.js +4 -3
- package/components/DataSort/DataSort.js +4 -3
- package/components/DataSummary/DataSummary.js +1 -1
- package/components/DataTable/Body.js +6 -4
- package/components/DataTable/Cell.js +6 -4
- package/components/DataTable/DataTable.js +7 -5
- package/components/DataTable/ExpanderCell.js +4 -3
- package/components/DataTable/Footer.js +6 -3
- package/components/DataTable/GroupedBody.js +5 -2
- package/components/DataTable/Header.js +12 -11
- package/components/DataTable/Resizer.js +3 -2
- package/components/DataTable/Searcher.js +3 -2
- package/components/DataTable/Sorter.js +3 -2
- package/components/DataTable/StyledDataTable.js +4 -5
- package/components/DataTable/buildState.js +10 -10
- package/components/DataTableColumns/DataTableColumns.js +4 -3
- package/components/DataTableColumns/stories/DefaultValue.js +49 -0
- package/components/DataTableGroupBy/DataTableGroupBy.js +1 -1
- package/components/DataView/DataView.js +1 -1
- package/components/DateInput/DateInput.js +8 -7
- package/components/Diagram/Diagram.js +6 -4
- package/components/Diagram/StyledDiagram.js +1 -2
- package/components/Diagram/stories/Progressing.js +1 -1
- package/components/Distribution/Distribution.js +5 -5
- package/components/Drop/Drop.js +4 -3
- package/components/Drop/DropContainer.js +10 -6
- package/components/Drop/StyledDrop.js +1 -2
- package/components/DropButton/DropButton.js +1 -1
- package/components/FileInput/FileInput.js +15 -14
- package/components/FileInput/StyledFileInput.js +1 -2
- package/components/FocusedContainer.js +1 -1
- package/components/Form/Form.js +7 -7
- package/components/FormField/FormField.js +14 -11
- package/components/Grid/Grid.js +6 -3
- package/components/Grid/StyledGrid.js +1 -7
- package/components/Grid/stories/CustomThemed/Responsive.js +1 -1
- package/components/Grommet/Grommet.js +1 -1
- package/components/Grommet/StyledGrommet.js +1 -2
- package/components/Header/Header.js +4 -3
- package/components/Heading/Heading.js +5 -2
- package/components/Heading/HeadingSkeleton.js +3 -2
- package/components/Heading/StyledHeading.js +1 -2
- package/components/Image/Image.js +5 -2
- package/components/Image/StyledImage.js +1 -2
- package/components/InfiniteScroll/InfiniteScroll.js +1 -0
- package/components/Keyboard/Keyboard.js +1 -1
- package/components/Layer/LayerContainer.js +9 -7
- package/components/Layer/StyledLayer.js +3 -4
- package/components/List/List.js +14 -11
- package/components/List/index.d.ts +1 -0
- package/components/List/propTypes.js +1 -0
- package/components/Markdown/Markdown.js +1 -1
- package/components/MaskedInput/MaskedInput.js +10 -9
- package/components/MaskedInput/StyledMaskedInput.js +3 -4
- package/components/Menu/Menu.js +8 -7
- package/components/Meter/Bar.js +6 -4
- package/components/Meter/Circle.js +6 -4
- package/components/Meter/Meter.js +4 -3
- package/components/Meter/StyledMeter.js +1 -2
- package/components/NameValueList/NameValueList.js +4 -3
- package/components/NameValuePair/NameValuePair.js +3 -2
- package/components/Nav/stories/CustomThemed/JustifySidebar.js +1 -1
- package/components/Nav/stories/Sidebar.js +1 -1
- package/components/Notification/Notification.js +4 -3
- package/components/Page/Page.js +4 -3
- package/components/PageContent/PageContent.js +1 -1
- package/components/PageHeader/PageHeader.js +4 -3
- package/components/Pagination/PageControl.js +9 -7
- package/components/Pagination/Pagination.js +8 -7
- package/components/Pagination/PaginationStep.js +4 -3
- package/components/Pagination/PaginationSummary.js +1 -1
- package/components/Pagination/StyledPageControl.js +3 -4
- package/components/Paragraph/Paragraph.js +5 -2
- package/components/Paragraph/ParagraphSkeleton.js +3 -2
- package/components/Paragraph/StyledParagraph.js +1 -2
- package/components/RadioButton/RadioButton.js +12 -10
- package/components/RadioButton/StyledRadioButton.js +5 -6
- package/components/RadioButtonGroup/RadioButtonGroup.js +4 -3
- package/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +1 -1
- package/components/RadioButtonGroup/stories/Disabled.js +1 -1
- package/components/RangeInput/RangeInput.js +6 -4
- package/components/RangeInput/StyledRangeInput.js +1 -2
- package/components/RangeSelector/EdgeControl.js +4 -3
- package/components/RangeSelector/RangeSelector.js +4 -3
- 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 +1 -1
- package/components/RoutedButton/RoutedButton.js +1 -1
- package/components/Select/DefaultSelectTextInput.js +1 -1
- package/components/Select/Select.js +4 -3
- package/components/Select/SelectContainer.js +13 -10
- package/components/Select/StyledSelect.js +3 -4
- package/components/Select/stories/components/SearchBorderBox.js +1 -1
- package/components/Select/stories/components/SearchInput.js +1 -1
- package/components/Select/utils.js +10 -10
- package/components/SelectMultiple/SelectMultiple.js +8 -7
- package/components/SelectMultiple/SelectMultipleContainer.js +3 -2
- package/components/Sidebar/Sidebar.js +1 -1
- package/components/Sidebar/stories/Labels.js +1 -1
- package/components/Skeleton/Skeleton.js +6 -4
- package/components/Skeleton/StyledSkeleton.js +1 -2
- package/components/Skeleton/stories/GridContainer.js +1 -1
- package/components/Skeleton/stories/Group.js +3 -2
- package/components/Skeleton/stories/Individual.js +4 -3
- package/components/SkipLink/SkipLink.js +1 -1
- package/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
- package/components/SkipLinks/SkipLinks.js +3 -2
- package/components/Spinner/Spinner.js +4 -3
- package/components/Stack/Stack.js +5 -2
- package/components/Stack/StyledStack.js +1 -2
- package/components/StarRating/StarRating.js +4 -3
- package/components/Tab/StyledTab.js +1 -2
- package/components/Tab/Tab.js +6 -4
- package/components/Table/StyledTable.js +3 -4
- package/components/Table/Table.js +5 -2
- package/components/TableCell/TableCell.js +6 -4
- package/components/Tabs/StyledTabs.js +3 -4
- package/components/Tabs/Tabs.js +10 -8
- package/components/Tag/StyledTag.js +2 -3
- package/components/Tag/Tag.js +7 -5
- package/components/Text/StyledText.js +1 -2
- package/components/Text/Text.js +5 -2
- package/components/Text/TextSkeleton.js +4 -3
- package/components/TextArea/StyledTextArea.js +1 -2
- package/components/TextArea/TextArea.js +5 -2
- package/components/TextInput/CopyButton.js +8 -6
- package/components/TextInput/StyledTextInput.js +5 -6
- package/components/TextInput/TextInput.js +12 -11
- package/components/TextInput/stories/WithTags.js +1 -1
- package/components/ThumbsRating/ThumbsRating.js +3 -2
- package/components/Tip/Tip.js +8 -2
- package/components/Tip/index.d.ts +1 -0
- package/components/Tip/propTypes.js +2 -1
- package/components/ToggleGroup/StyledToggleGroup.js +1 -2
- package/components/ToggleGroup/ToggleGroup.js +7 -5
- package/components/Toolbar/Toolbar.js +1 -1
- package/components/Video/StyledVideo.js +4 -5
- package/components/Video/Video.js +8 -6
- package/components/WorldMap/StyledWorldMap.js +1 -2
- package/components/WorldMap/WorldMap.js +6 -4
- package/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
- package/es6/all/stories/AllComponents.js +1 -1
- package/es6/components/Accordion/Accordion.js +1 -1
- package/es6/components/Accordion/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/Accordion/stories/Simple.js +1 -1
- package/es6/components/AccordionPanel/AccordionPanel.js +8 -4
- package/es6/components/Anchor/Anchor.js +5 -3
- package/es6/components/Anchor/StyledAnchor.js +1 -2
- package/es6/components/Avatar/Avatar.js +7 -5
- package/es6/components/Avatar/StyledAvatar.js +2 -3
- package/es6/components/Box/Box.js +7 -5
- package/es6/components/Box/StyledBox.js +5 -6
- package/es6/components/Box/stories/BackgroundThemed.js +2 -1
- package/es6/components/Button/Badge.js +7 -5
- package/es6/components/Button/Button.js +6 -4
- package/es6/components/Button/StyledButton.js +1 -2
- package/es6/components/Button/StyledButtonKind.js +1 -2
- package/es6/components/Calendar/Calendar.js +27 -22
- package/es6/components/Calendar/StyledCalendar.js +4 -5
- package/es6/components/Card/Card.js +2 -1
- package/es6/components/Card/stories/CustomThemed/Clickable.js +1 -1
- package/es6/components/Card/stories/CustomThemed/Themed.js +1 -1
- package/es6/components/CardBody/CardBody.js +2 -1
- package/es6/components/CardFooter/CardFooter.js +2 -1
- package/es6/components/CardHeader/CardHeader.js +2 -1
- package/es6/components/Cards/Cards.js +3 -2
- package/es6/components/Carousel/Carousel.js +3 -2
- package/es6/components/Carousel/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/Chart/Chart.js +5 -3
- package/es6/components/Chart/StyledChart.js +1 -2
- package/es6/components/CheckBox/CheckBox.js +8 -6
- package/es6/components/CheckBox/StyledCheckBox.js +6 -7
- package/es6/components/CheckBox/stories/NoLabel.js +1 -1
- package/es6/components/CheckBox/stories/Simple.js +1 -1
- package/es6/components/CheckBoxGroup/CheckBoxGroup.js +5 -3
- package/es6/components/CheckBoxGroup/StyledCheckBoxGroup.js +1 -2
- package/es6/components/Clock/Analog.js +10 -8
- package/es6/components/Clock/Clock.js +1 -1
- package/es6/components/Clock/Digital.js +12 -7
- package/es6/components/Clock/StyledClock.js +5 -6
- package/es6/components/Collapsible/Collapsible.js +2 -1
- package/es6/components/Collapsible/stories/Nested.js +1 -1
- package/es6/components/Data/Data.js +1 -1
- package/es6/components/Data/DataForm.js +5 -5
- package/es6/components/Data/filter.js +6 -6
- package/es6/components/Data/index.d.ts +1 -3
- package/es6/components/Data/propTypes.js +2 -1
- package/es6/components/Data/stories/ComposedToolbar.js +2 -1
- package/es6/components/Data/stories/Inline.js +1 -1
- package/es6/components/Data/stories/Views.js +3 -0
- package/es6/components/DataChart/DataChart.js +3 -2
- package/es6/components/DataChart/Detail.js +2 -1
- package/es6/components/DataChart/Swatch.js +2 -1
- package/es6/components/DataChart/XAxis.js +1 -1
- package/es6/components/DataClearFilters/DataClearFilters.js +3 -2
- package/es6/components/DataFilter/DataFilter.js +4 -4
- package/es6/components/DataFilters/DataFilters.js +3 -2
- package/es6/components/DataSearch/DataSearch.js +3 -2
- package/es6/components/DataSort/DataSort.js +3 -2
- package/es6/components/DataSummary/DataSummary.js +1 -1
- package/es6/components/DataTable/Body.js +5 -3
- package/es6/components/DataTable/Cell.js +5 -3
- package/es6/components/DataTable/DataTable.js +6 -4
- package/es6/components/DataTable/ExpanderCell.js +3 -2
- package/es6/components/DataTable/Footer.js +6 -3
- package/es6/components/DataTable/GroupedBody.js +5 -2
- package/es6/components/DataTable/Header.js +11 -10
- package/es6/components/DataTable/Resizer.js +2 -1
- package/es6/components/DataTable/Searcher.js +2 -1
- package/es6/components/DataTable/Sorter.js +2 -1
- package/es6/components/DataTable/StyledDataTable.js +4 -5
- package/es6/components/DataTable/buildState.js +11 -10
- package/es6/components/DataTableColumns/DataTableColumns.js +3 -2
- package/es6/components/DataTableColumns/stories/DefaultValue.js +45 -0
- package/es6/components/DataTableGroupBy/DataTableGroupBy.js +1 -1
- package/es6/components/DataView/DataView.js +1 -1
- package/es6/components/DateInput/DateInput.js +7 -6
- package/es6/components/Diagram/Diagram.js +5 -3
- package/es6/components/Diagram/StyledDiagram.js +1 -2
- package/es6/components/Diagram/stories/Progressing.js +1 -1
- package/es6/components/Distribution/Distribution.js +6 -6
- package/es6/components/Drop/Drop.js +3 -2
- package/es6/components/Drop/DropContainer.js +9 -5
- package/es6/components/Drop/StyledDrop.js +1 -2
- package/es6/components/DropButton/DropButton.js +1 -1
- package/es6/components/FileInput/FileInput.js +14 -13
- package/es6/components/FileInput/StyledFileInput.js +1 -2
- package/es6/components/FocusedContainer.js +1 -1
- package/es6/components/Form/Form.js +7 -7
- package/es6/components/FormField/FormField.js +13 -10
- package/es6/components/Grid/Grid.js +6 -3
- package/es6/components/Grid/StyledGrid.js +1 -7
- package/es6/components/Grid/stories/CustomThemed/Responsive.js +1 -1
- package/es6/components/Grommet/Grommet.js +1 -1
- package/es6/components/Grommet/StyledGrommet.js +1 -2
- package/es6/components/Header/Header.js +3 -2
- package/es6/components/Heading/Heading.js +5 -2
- package/es6/components/Heading/HeadingSkeleton.js +2 -1
- package/es6/components/Heading/StyledHeading.js +1 -2
- package/es6/components/Image/Image.js +5 -2
- package/es6/components/Image/StyledImage.js +1 -2
- package/es6/components/InfiniteScroll/InfiniteScroll.js +1 -0
- package/es6/components/Keyboard/Keyboard.js +1 -1
- package/es6/components/Layer/LayerContainer.js +8 -6
- package/es6/components/Layer/StyledLayer.js +3 -4
- package/es6/components/List/List.js +13 -10
- package/es6/components/List/index.d.ts +1 -0
- package/es6/components/List/propTypes.js +1 -0
- package/es6/components/Markdown/Markdown.js +1 -1
- package/es6/components/MaskedInput/MaskedInput.js +9 -8
- package/es6/components/MaskedInput/StyledMaskedInput.js +3 -4
- package/es6/components/Menu/Menu.js +7 -6
- package/es6/components/Meter/Bar.js +5 -3
- package/es6/components/Meter/Circle.js +5 -3
- package/es6/components/Meter/Meter.js +3 -2
- package/es6/components/Meter/StyledMeter.js +1 -2
- package/es6/components/NameValueList/NameValueList.js +3 -2
- package/es6/components/NameValuePair/NameValuePair.js +2 -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 +3 -2
- package/es6/components/Page/Page.js +3 -2
- package/es6/components/PageContent/PageContent.js +1 -1
- package/es6/components/PageHeader/PageHeader.js +3 -2
- package/es6/components/Pagination/PageControl.js +8 -6
- package/es6/components/Pagination/Pagination.js +7 -6
- package/es6/components/Pagination/PaginationStep.js +3 -2
- package/es6/components/Pagination/PaginationSummary.js +1 -1
- package/es6/components/Pagination/StyledPageControl.js +3 -4
- package/es6/components/Paragraph/Paragraph.js +5 -2
- package/es6/components/Paragraph/ParagraphSkeleton.js +2 -1
- package/es6/components/Paragraph/StyledParagraph.js +1 -2
- package/es6/components/RadioButton/RadioButton.js +11 -9
- package/es6/components/RadioButton/StyledRadioButton.js +5 -6
- package/es6/components/RadioButtonGroup/RadioButtonGroup.js +3 -2
- 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 +5 -3
- package/es6/components/RangeInput/StyledRangeInput.js +1 -2
- package/es6/components/RangeSelector/EdgeControl.js +3 -2
- package/es6/components/RangeSelector/RangeSelector.js +3 -2
- 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 +1 -1
- package/es6/components/RoutedButton/RoutedButton.js +1 -1
- package/es6/components/Select/DefaultSelectTextInput.js +1 -1
- package/es6/components/Select/Select.js +3 -2
- package/es6/components/Select/SelectContainer.js +12 -9
- package/es6/components/Select/StyledSelect.js +3 -4
- package/es6/components/Select/stories/components/SearchBorderBox.js +1 -1
- package/es6/components/Select/stories/components/SearchInput.js +1 -1
- package/es6/components/Select/utils.js +11 -10
- package/es6/components/SelectMultiple/SelectMultiple.js +7 -6
- package/es6/components/SelectMultiple/SelectMultipleContainer.js +2 -1
- package/es6/components/Sidebar/Sidebar.js +1 -1
- package/es6/components/Sidebar/stories/Labels.js +1 -1
- package/es6/components/Skeleton/Skeleton.js +5 -3
- package/es6/components/Skeleton/StyledSkeleton.js +1 -2
- package/es6/components/Skeleton/stories/GridContainer.js +1 -1
- package/es6/components/Skeleton/stories/Group.js +2 -1
- package/es6/components/Skeleton/stories/Individual.js +3 -2
- package/es6/components/SkipLink/SkipLink.js +1 -1
- package/es6/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
- package/es6/components/SkipLinks/SkipLinks.js +2 -1
- package/es6/components/Spinner/Spinner.js +3 -2
- package/es6/components/Stack/Stack.js +5 -2
- package/es6/components/Stack/StyledStack.js +1 -2
- package/es6/components/StarRating/StarRating.js +3 -2
- package/es6/components/Tab/StyledTab.js +1 -2
- package/es6/components/Tab/Tab.js +5 -3
- package/es6/components/Table/StyledTable.js +3 -4
- package/es6/components/Table/Table.js +5 -2
- package/es6/components/TableCell/TableCell.js +5 -3
- package/es6/components/Tabs/StyledTabs.js +3 -4
- package/es6/components/Tabs/Tabs.js +9 -7
- package/es6/components/Tag/StyledTag.js +2 -3
- package/es6/components/Tag/Tag.js +6 -4
- package/es6/components/Text/StyledText.js +1 -2
- package/es6/components/Text/Text.js +5 -2
- package/es6/components/Text/TextSkeleton.js +3 -2
- package/es6/components/TextArea/StyledTextArea.js +1 -2
- package/es6/components/TextArea/TextArea.js +5 -2
- package/es6/components/TextInput/CopyButton.js +7 -5
- package/es6/components/TextInput/StyledTextInput.js +5 -6
- package/es6/components/TextInput/TextInput.js +11 -10
- package/es6/components/TextInput/stories/WithTags.js +1 -1
- package/es6/components/ThumbsRating/ThumbsRating.js +2 -1
- package/es6/components/Tip/Tip.js +8 -2
- package/es6/components/Tip/index.d.ts +1 -0
- package/es6/components/Tip/propTypes.js +2 -1
- package/es6/components/ToggleGroup/StyledToggleGroup.js +1 -2
- package/es6/components/ToggleGroup/ToggleGroup.js +6 -4
- package/es6/components/Toolbar/Toolbar.js +1 -1
- package/es6/components/Video/StyledVideo.js +4 -5
- package/es6/components/Video/Video.js +7 -5
- package/es6/components/WorldMap/StyledWorldMap.js +1 -2
- package/es6/components/WorldMap/WorldMap.js +5 -3
- package/es6/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
- package/es6/utils/DOM.js +7 -5
- package/es6/utils/background.js +4 -4
- package/es6/utils/colors.js +3 -2
- package/es6/utils/mixins.js +3 -2
- package/es6/utils/object.js +3 -2
- package/es6/utils/pagination.js +1 -1
- package/es6/utils/styles.js +1 -1
- package/es6/utils/use-debounce.js +2 -1
- package/es6/utils/useThemeValue.js +15 -6
- package/grommet.min.js +1 -1
- package/grommet.min.js.map +1 -1
- package/package.json +37 -37
- package/utils/DOM.js +4 -4
- package/utils/background.js +4 -4
- package/utils/colors.js +2 -2
- package/utils/mixins.js +2 -2
- package/utils/object.js +2 -2
- package/utils/pagination.js +1 -1
- package/utils/styles.js +1 -1
- package/utils/use-debounce.js +3 -2
- package/utils/useThemeValue.js +12 -3
|
@@ -7,13 +7,13 @@ var _CheckBox = require("../CheckBox");
|
|
|
7
7
|
var _FormContext = require("../Form/FormContext");
|
|
8
8
|
var _StyledCheckBoxGroup = require("./StyledCheckBoxGroup");
|
|
9
9
|
var _propTypes = require("./propTypes");
|
|
10
|
-
var
|
|
10
|
+
var _useThemeValue2 = require("../../utils/useThemeValue");
|
|
11
11
|
var _excluded = ["children", "defaultValue", "value", "disabled", "focusIndicator", "gap", "labelKey", "valueKey", "onChange", "options", "name"],
|
|
12
12
|
_excluded2 = ["value"];
|
|
13
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
14
14
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
15
15
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
16
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
16
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
17
17
|
var CheckBoxGroup = exports.CheckBoxGroup = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
18
18
|
var children = _ref.children,
|
|
19
19
|
defaultValue = _ref.defaultValue,
|
|
@@ -29,7 +29,9 @@ var CheckBoxGroup = exports.CheckBoxGroup = /*#__PURE__*/(0, _react.forwardRef)(
|
|
|
29
29
|
name = _ref.name,
|
|
30
30
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
31
31
|
var formContext = (0, _react.useContext)(_FormContext.FormContext);
|
|
32
|
-
var
|
|
32
|
+
var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
|
|
33
|
+
theme = _useThemeValue.theme,
|
|
34
|
+
passThemeFlag = _useThemeValue.passThemeFlag;
|
|
33
35
|
|
|
34
36
|
// In case option is a string, normalize it to be an object
|
|
35
37
|
var options = optionsProp.map(function (option) {
|
|
@@ -72,7 +74,7 @@ var CheckBoxGroup = exports.CheckBoxGroup = /*#__PURE__*/(0, _react.forwardRef)(
|
|
|
72
74
|
role: "group"
|
|
73
75
|
}, theme.checkBoxGroup.container, {
|
|
74
76
|
gap: gap || (theme.checkBoxGroup.container && theme.checkBoxGroup.container.gap ? theme.checkBoxGroup.container.gap : 'small') // consistent with RadioButtonGroup default
|
|
75
|
-
}, rest), options.map(function (option, index) {
|
|
77
|
+
}, passThemeFlag, rest), options.map(function (option, index) {
|
|
76
78
|
var optionValue = option.value;
|
|
77
79
|
var label = labelKey ? option[labelKey] : option.label;
|
|
78
80
|
var valueOption = valueKey ? option[valueKey] : optionValue;
|
|
@@ -4,9 +4,8 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.StyledCheckBoxGroup = void 0;
|
|
5
5
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
6
6
|
var _Box = require("../Box");
|
|
7
|
-
var _defaultProps = require("../../default-props");
|
|
8
7
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
-
var StyledCheckBoxGroup = exports.StyledCheckBoxGroup = (0, _styledComponents["default"])(_Box.Box).
|
|
8
|
+
var StyledCheckBoxGroup = exports.StyledCheckBoxGroup = (0, _styledComponents["default"])(_Box.Box).withConfig({
|
|
10
9
|
displayName: "StyledCheckBoxGroup",
|
|
11
10
|
componentId: "sc-2nhc5d-0"
|
|
12
11
|
})(["", ""], function (props) {
|
|
@@ -5,12 +5,12 @@ exports.Analog = void 0;
|
|
|
5
5
|
var _react = _interopRequireWildcard(require("react"));
|
|
6
6
|
var _utils = require("../../utils");
|
|
7
7
|
var _StyledClock = require("./StyledClock");
|
|
8
|
-
var
|
|
8
|
+
var _useThemeValue2 = require("../../utils/useThemeValue");
|
|
9
9
|
var _excluded = ["elements", "precision"];
|
|
10
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
11
11
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
12
12
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
13
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
13
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
14
14
|
// this will serve both minutes and hours (360 / 6)
|
|
15
15
|
var ANGLE_UNIT = 6;
|
|
16
16
|
// 360 / 12
|
|
@@ -41,7 +41,9 @@ var Analog = exports.Analog = /*#__PURE__*/(0, _react.forwardRef)(function (_ref
|
|
|
41
41
|
var elements = _ref2.elements,
|
|
42
42
|
precision = _ref2.precision,
|
|
43
43
|
rest = _objectWithoutPropertiesLoose(_ref2, _excluded);
|
|
44
|
-
var
|
|
44
|
+
var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
|
|
45
|
+
theme = _useThemeValue.theme,
|
|
46
|
+
passThemeFlag = _useThemeValue.passThemeFlag;
|
|
45
47
|
var _useMemo = (0, _react.useMemo)(function () {
|
|
46
48
|
return getClockState(elements);
|
|
47
49
|
}, [elements]),
|
|
@@ -58,7 +60,7 @@ var Analog = exports.Analog = /*#__PURE__*/(0, _react.forwardRef)(function (_ref
|
|
|
58
60
|
var halfSize = size / 2;
|
|
59
61
|
var secondHand;
|
|
60
62
|
if (precision === 'seconds') {
|
|
61
|
-
secondHand = /*#__PURE__*/_react["default"].createElement(_StyledClock.StyledSecond, {
|
|
63
|
+
secondHand = /*#__PURE__*/_react["default"].createElement(_StyledClock.StyledSecond, _extends({
|
|
62
64
|
x1: halfSize,
|
|
63
65
|
y1: halfSize,
|
|
64
66
|
x2: halfSize,
|
|
@@ -69,11 +71,11 @@ var Analog = exports.Analog = /*#__PURE__*/(0, _react.forwardRef)(function (_ref
|
|
|
69
71
|
transform: "rotate(" + secondAngle + "deg)",
|
|
70
72
|
transformOrigin: halfSize + "px " + halfSize + "px"
|
|
71
73
|
}
|
|
72
|
-
});
|
|
74
|
+
}, passThemeFlag));
|
|
73
75
|
}
|
|
74
76
|
var minuteHand;
|
|
75
77
|
if (precision === 'seconds' || precision === 'minutes') {
|
|
76
|
-
minuteHand = /*#__PURE__*/_react["default"].createElement(_StyledClock.StyledMinute, {
|
|
78
|
+
minuteHand = /*#__PURE__*/_react["default"].createElement(_StyledClock.StyledMinute, _extends({
|
|
77
79
|
x1: halfSize,
|
|
78
80
|
y1: halfSize,
|
|
79
81
|
x2: halfSize,
|
|
@@ -84,7 +86,7 @@ var Analog = exports.Analog = /*#__PURE__*/(0, _react.forwardRef)(function (_ref
|
|
|
84
86
|
transform: "rotate(" + minuteAngle + "deg)",
|
|
85
87
|
transformOrigin: halfSize + "px " + halfSize + "px"
|
|
86
88
|
}
|
|
87
|
-
});
|
|
89
|
+
}, passThemeFlag));
|
|
88
90
|
}
|
|
89
91
|
return /*#__PURE__*/_react["default"].createElement(_StyledClock.StyledAnalog, _extends({
|
|
90
92
|
ref: ref,
|
|
@@ -93,7 +95,7 @@ var Analog = exports.Analog = /*#__PURE__*/(0, _react.forwardRef)(function (_ref
|
|
|
93
95
|
height: size,
|
|
94
96
|
preserveAspectRatio: "xMidYMid meet",
|
|
95
97
|
viewBox: "0 0 " + size + " " + size
|
|
96
|
-
}, rest), secondHand, minuteHand, /*#__PURE__*/_react["default"].createElement(_StyledClock.StyledHour, {
|
|
98
|
+
}, passThemeFlag, rest), secondHand, minuteHand, /*#__PURE__*/_react["default"].createElement(_StyledClock.StyledHour, _extends({
|
|
97
99
|
x1: halfSize,
|
|
98
100
|
y1: halfSize,
|
|
99
101
|
x2: halfSize,
|
|
@@ -104,6 +106,6 @@ var Analog = exports.Analog = /*#__PURE__*/(0, _react.forwardRef)(function (_ref
|
|
|
104
106
|
transform: "rotate(" + hourAngle + "deg)",
|
|
105
107
|
transformOrigin: halfSize + "px " + halfSize + "px"
|
|
106
108
|
}
|
|
107
|
-
}));
|
|
109
|
+
}, passThemeFlag)));
|
|
108
110
|
});
|
|
109
111
|
Analog.displayName = 'Analog';
|
|
@@ -10,7 +10,7 @@ var _excluded = ["hourLimit", "onChange", "precision", "run", "size", "time", "t
|
|
|
10
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
11
11
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
12
12
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
13
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
13
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
14
14
|
var TIME_REGEXP = /T([0-9]{2}):([0-9]{2})(?::([0-9.,]{2,}))?/;
|
|
15
15
|
var DURATION_REGEXP = /^(-|\+)?P.*T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?$/;
|
|
16
16
|
var parseTime = function parseTime(time, hourLimit) {
|
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.Digital = void 0;
|
|
5
5
|
var _react = _interopRequireWildcard(require("react"));
|
|
6
|
+
var _useThemeValue3 = require("../../utils/useThemeValue");
|
|
6
7
|
var _Box = require("../Box");
|
|
7
8
|
var _StyledClock = require("./StyledClock");
|
|
8
9
|
var _excluded = ["elements", "precision", "run", "size"];
|
|
9
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
10
11
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
12
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
11
13
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
12
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
|
|
13
14
|
var Digit = function Digit(_ref) {
|
|
14
15
|
var number = _ref.number,
|
|
15
16
|
run = _ref.run,
|
|
@@ -20,6 +21,8 @@ var Digit = function Digit(_ref) {
|
|
|
20
21
|
var _useState2 = (0, _react.useState)(),
|
|
21
22
|
changing = _useState2[0],
|
|
22
23
|
setChanging = _useState2[1];
|
|
24
|
+
var _useThemeValue = (0, _useThemeValue3.useThemeValue)(),
|
|
25
|
+
passThemeFlag = _useThemeValue.passThemeFlag;
|
|
23
26
|
(0, _react.useEffect)(function () {
|
|
24
27
|
if (number !== previous) {
|
|
25
28
|
setChanging(true);
|
|
@@ -35,23 +38,25 @@ var Digit = function Digit(_ref) {
|
|
|
35
38
|
}, [number, previous]);
|
|
36
39
|
if (changing) {
|
|
37
40
|
var direction = run === 'backward' ? 'down' : 'up';
|
|
38
|
-
return /*#__PURE__*/_react["default"].createElement(_StyledClock.StyledDigitalDigit, {
|
|
41
|
+
return /*#__PURE__*/_react["default"].createElement(_StyledClock.StyledDigitalDigit, _extends({}, passThemeFlag, {
|
|
39
42
|
size: size
|
|
40
|
-
}, /*#__PURE__*/_react["default"].createElement(_StyledClock.StyledDigitalPrevious, {
|
|
43
|
+
}), /*#__PURE__*/_react["default"].createElement(_StyledClock.StyledDigitalPrevious, {
|
|
41
44
|
direction: direction
|
|
42
45
|
}, Math.floor(previous)), /*#__PURE__*/_react["default"].createElement(_StyledClock.StyledDigitalNext, {
|
|
43
46
|
direction: direction
|
|
44
47
|
}, Math.floor(number)));
|
|
45
48
|
}
|
|
46
|
-
return /*#__PURE__*/_react["default"].createElement(_StyledClock.StyledDigitalDigit, {
|
|
49
|
+
return /*#__PURE__*/_react["default"].createElement(_StyledClock.StyledDigitalDigit, _extends({
|
|
47
50
|
size: size
|
|
48
|
-
}, Math.floor(number));
|
|
51
|
+
}, passThemeFlag), Math.floor(number));
|
|
49
52
|
};
|
|
50
53
|
var Element = function Element(_ref2) {
|
|
51
54
|
var number = _ref2.number,
|
|
52
55
|
run = _ref2.run,
|
|
53
56
|
sep = _ref2.sep,
|
|
54
57
|
size = _ref2.size;
|
|
58
|
+
var _useThemeValue2 = (0, _useThemeValue3.useThemeValue)(),
|
|
59
|
+
passThemeFlag = _useThemeValue2.passThemeFlag;
|
|
55
60
|
var tens = Math.floor(number / 10);
|
|
56
61
|
var ones = number % 10;
|
|
57
62
|
var result = [/*#__PURE__*/_react["default"].createElement(Digit, {
|
|
@@ -66,10 +71,10 @@ var Element = function Element(_ref2) {
|
|
|
66
71
|
number: ones
|
|
67
72
|
})];
|
|
68
73
|
if (sep) {
|
|
69
|
-
result.unshift( /*#__PURE__*/_react["default"].createElement(_StyledClock.StyledDigitalDigit, {
|
|
74
|
+
result.unshift( /*#__PURE__*/_react["default"].createElement(_StyledClock.StyledDigitalDigit, _extends({
|
|
70
75
|
key: "sep",
|
|
71
76
|
size: size
|
|
72
|
-
}, ":"));
|
|
77
|
+
}, passThemeFlag), ":"));
|
|
73
78
|
}
|
|
74
79
|
return result;
|
|
75
80
|
};
|
|
@@ -4,10 +4,9 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.StyledSecond = exports.StyledMinute = exports.StyledHour = exports.StyledDigitalPrevious = exports.StyledDigitalNext = exports.StyledDigitalDigit = exports.StyledAnalog = void 0;
|
|
5
5
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
6
6
|
var _utils = require("../../utils");
|
|
7
|
-
var _defaultProps = require("../../default-props");
|
|
8
7
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
9
8
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
10
|
-
var StyledHour = exports.StyledHour = _styledComponents["default"].line.withConfig(_utils.styledComponentsConfig).
|
|
9
|
+
var StyledHour = exports.StyledHour = _styledComponents["default"].line.withConfig(_utils.styledComponentsConfig).withConfig({
|
|
11
10
|
displayName: "StyledClock__StyledHour",
|
|
12
11
|
componentId: "sc-y4xw8s-0"
|
|
13
12
|
})(["stroke-width:", ";stroke:", ";transition:stroke 1s ease-out;"], function (props) {
|
|
@@ -15,7 +14,7 @@ var StyledHour = exports.StyledHour = _styledComponents["default"].line.withConf
|
|
|
15
14
|
}, function (props) {
|
|
16
15
|
return (0, _utils.normalizeColor)(props.theme.clock.analog.hour.color, props.theme);
|
|
17
16
|
});
|
|
18
|
-
var StyledMinute = exports.StyledMinute = _styledComponents["default"].line.withConfig(_utils.styledComponentsConfig).
|
|
17
|
+
var StyledMinute = exports.StyledMinute = _styledComponents["default"].line.withConfig(_utils.styledComponentsConfig).withConfig({
|
|
19
18
|
displayName: "StyledClock__StyledMinute",
|
|
20
19
|
componentId: "sc-y4xw8s-1"
|
|
21
20
|
})(["stroke-width:", ";stroke:", ";transition:stroke 1s ease-out;"], function (props) {
|
|
@@ -23,7 +22,7 @@ var StyledMinute = exports.StyledMinute = _styledComponents["default"].line.with
|
|
|
23
22
|
}, function (props) {
|
|
24
23
|
return (0, _utils.normalizeColor)(props.theme.clock.analog.minute.color, props.theme);
|
|
25
24
|
});
|
|
26
|
-
var StyledSecond = exports.StyledSecond = _styledComponents["default"].line.withConfig(_utils.styledComponentsConfig).
|
|
25
|
+
var StyledSecond = exports.StyledSecond = _styledComponents["default"].line.withConfig(_utils.styledComponentsConfig).withConfig({
|
|
27
26
|
displayName: "StyledClock__StyledSecond",
|
|
28
27
|
componentId: "sc-y4xw8s-2"
|
|
29
28
|
})(["stroke-width:", ";stroke:", ";transition:stroke 1s ease-out;"], function (props) {
|
|
@@ -31,7 +30,7 @@ var StyledSecond = exports.StyledSecond = _styledComponents["default"].line.with
|
|
|
31
30
|
}, function (props) {
|
|
32
31
|
return (0, _utils.normalizeColor)(props.theme.clock.analog.second.color, props.theme);
|
|
33
32
|
});
|
|
34
|
-
var StyledAnalog = exports.StyledAnalog = _styledComponents["default"].svg.withConfig(_utils.styledComponentsConfig).
|
|
33
|
+
var StyledAnalog = exports.StyledAnalog = _styledComponents["default"].svg.withConfig(_utils.styledComponentsConfig).withConfig({
|
|
35
34
|
displayName: "StyledClock__StyledAnalog",
|
|
36
35
|
componentId: "sc-y4xw8s-3"
|
|
37
36
|
})(["width:", ";height:", ";", " ", ";"], function (props) {
|
|
@@ -47,7 +46,7 @@ var sizeStyle = function sizeStyle(props) {
|
|
|
47
46
|
var data = props.theme.clock.digital.text[size] || {};
|
|
48
47
|
return (0, _styledComponents.css)(["font-size:", ";line-height:", ";"], data.size || props.theme.clock.digital.text.medium.size, data.height || props.theme.clock.digital.text.medium.height);
|
|
49
48
|
};
|
|
50
|
-
var StyledDigitalDigit = exports.StyledDigitalDigit = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).
|
|
49
|
+
var StyledDigitalDigit = exports.StyledDigitalDigit = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).withConfig({
|
|
51
50
|
displayName: "StyledClock__StyledDigitalDigit",
|
|
52
51
|
componentId: "sc-y4xw8s-4"
|
|
53
52
|
})(["position:relative;width:0.8em;text-align:center;overflow:hidden;", ";"], function (props) {
|
|
@@ -8,7 +8,7 @@ var _useIsomorphicLayoutEffect = require("../../utils/use-isomorphic-layout-effe
|
|
|
8
8
|
var _utils = require("../../utils");
|
|
9
9
|
var _Box = require("../Box");
|
|
10
10
|
var _propTypes = require("./propTypes");
|
|
11
|
-
var
|
|
11
|
+
var _useThemeValue2 = require("../../utils/useThemeValue");
|
|
12
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
14
14
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
@@ -23,7 +23,8 @@ var Collapsible = exports.Collapsible = /*#__PURE__*/(0, _react.forwardRef)(func
|
|
|
23
23
|
var children = _ref.children,
|
|
24
24
|
direction = _ref.direction,
|
|
25
25
|
openArg = _ref.open;
|
|
26
|
-
var
|
|
26
|
+
var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
|
|
27
|
+
theme = _useThemeValue.theme;
|
|
27
28
|
var _useState = (0, _react.useState)(openArg),
|
|
28
29
|
open = _useState[0],
|
|
29
30
|
setOpen = _useState[1];
|
|
@@ -8,7 +8,7 @@ var _grommet = require("grommet");
|
|
|
8
8
|
var _excluded = ["label", "open", "submenu"];
|
|
9
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
10
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
11
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
11
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
12
12
|
var MenuButton = function MenuButton(_ref) {
|
|
13
13
|
var label = _ref.label,
|
|
14
14
|
open = _ref.open,
|
package/components/Data/Data.js
CHANGED
|
@@ -18,7 +18,7 @@ var _excluded = ["children", "data", "defaultView", "filteredTotal", "id", "mess
|
|
|
18
18
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
19
19
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
20
20
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
21
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
21
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
22
22
|
var defaultDefaultView = {
|
|
23
23
|
search: ''
|
|
24
24
|
};
|
|
@@ -16,7 +16,7 @@ var _excluded = ["children", "footer", "onDone", "pad", "updateOn"];
|
|
|
16
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
17
17
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
18
18
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
19
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
19
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
20
20
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
21
21
|
var MaxForm = (0, _styledComponents["default"])(_Form.Form).withConfig({
|
|
22
22
|
displayName: "DataForm__MaxForm",
|
|
@@ -48,7 +48,7 @@ var viewFormKeyMap = {
|
|
|
48
48
|
|
|
49
49
|
// flatten nested objects.
|
|
50
50
|
// For example: { a: { b: v, c: z } } -> { 'a.b': v, 'a.c': z }
|
|
51
|
-
var
|
|
51
|
+
var _flatten = function flatten(formValue, options) {
|
|
52
52
|
var result = JSON.parse(JSON.stringify(formValue));
|
|
53
53
|
Object.keys(result).forEach(function (i) {
|
|
54
54
|
// We check the type of the i using
|
|
@@ -56,7 +56,7 @@ var flatten = function flatten(formValue, options) {
|
|
|
56
56
|
// call the function again
|
|
57
57
|
// ignore _range situations
|
|
58
58
|
if (typeof result[i] === 'object' && !Array.isArray(result[i]) && (options != null && options.full || !result[i][formRangeKey])) {
|
|
59
|
-
var temp =
|
|
59
|
+
var temp = _flatten(result[i], options);
|
|
60
60
|
Object.keys(temp).forEach(function (j) {
|
|
61
61
|
// Store temp in result
|
|
62
62
|
// ignore empty arrays
|
|
@@ -131,7 +131,7 @@ var formValueToView = function formValueToView(value, views) {
|
|
|
131
131
|
});
|
|
132
132
|
|
|
133
133
|
// flatten any nested objects
|
|
134
|
-
var flatValue =
|
|
134
|
+
var flatValue = _flatten(valueCopy);
|
|
135
135
|
result.properties = _extends({}, result.properties || {}, flatValue);
|
|
136
136
|
|
|
137
137
|
// convert any ranges
|
|
@@ -157,7 +157,7 @@ var clearEmpty = function clearEmpty(formValue, pendingReset) {
|
|
|
157
157
|
// { a: b: { _range: [0, 100] } } ==> a.b._range: [0, 100]
|
|
158
158
|
if (typeof value[k] === 'object' && !Array.isArray(value[k])) {
|
|
159
159
|
var _pendingReset$current;
|
|
160
|
-
var filterName = k + "." + Object.keys(
|
|
160
|
+
var filterName = k + "." + Object.keys(_flatten(value[k], {
|
|
161
161
|
full: true
|
|
162
162
|
}))[0];
|
|
163
163
|
if (pendingReset != null && (_pendingReset$current = pendingReset.current) != null && _pendingReset$current.has(filterName)) {
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.filter = void 0;
|
|
5
5
|
// TODO: share with DataTable, List, Cards, etc.
|
|
6
|
-
var
|
|
6
|
+
var _datumValue = function datumValue(datum, property) {
|
|
7
7
|
if (!property) return undefined;
|
|
8
8
|
var parts = property.split('.');
|
|
9
9
|
if (parts.length === 1) return datum[property];
|
|
10
10
|
if (!datum[parts[0]]) return undefined;
|
|
11
|
-
return
|
|
11
|
+
return _datumValue(datum[parts[0]], parts.slice(1).join('.'));
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
// This is where we filter the data internally, when the caller doesn't
|
|
@@ -33,7 +33,7 @@ var filter = exports.filter = function filter(data, view, properties) {
|
|
|
33
33
|
// check whether it matches any search
|
|
34
34
|
if (searchExp) {
|
|
35
35
|
var searchWith = function searchWith(property) {
|
|
36
|
-
var value =
|
|
36
|
+
var value = _datumValue(datum, property);
|
|
37
37
|
if (value === undefined) return false;
|
|
38
38
|
return searchExp.test(value);
|
|
39
39
|
};
|
|
@@ -46,7 +46,7 @@ var filter = exports.filter = function filter(data, view, properties) {
|
|
|
46
46
|
matched = !Object.keys(view.properties).some(function (property) {
|
|
47
47
|
// returning true means it doesn't match the filter,
|
|
48
48
|
var filterValue = view.properties[property];
|
|
49
|
-
var value =
|
|
49
|
+
var value = _datumValue(datum, property);
|
|
50
50
|
|
|
51
51
|
// range case
|
|
52
52
|
if (typeof (filterValue == null ? void 0 : filterValue.min) === 'number' || typeof (filterValue == null ? void 0 : filterValue.max) === 'number') return typeof value !== 'number' || value < filterValue.min || value > filterValue.max;
|
|
@@ -83,8 +83,8 @@ var filter = exports.filter = function filter(data, view, properties) {
|
|
|
83
83
|
var before = sortDesc ? -1 : 1;
|
|
84
84
|
var after = sortDesc ? 1 : -1;
|
|
85
85
|
filteredData.sort(function (d1, d2) {
|
|
86
|
-
var d1Val =
|
|
87
|
-
var d2Val =
|
|
86
|
+
var d1Val = _datumValue(d1, prop);
|
|
87
|
+
var d2Val = _datumValue(d2, prop);
|
|
88
88
|
// sort strings via locale case insensitive
|
|
89
89
|
if (typeof d1Val === 'string' && typeof d2Val === 'string' || typeof d1Val === 'string' && !d2Val || typeof d2Val === 'string' && !d1Val) {
|
|
90
90
|
var sortResult = (d1Val || '').localeCompare(d2Val || '', undefined, {
|
|
@@ -10,7 +10,8 @@ var viewType = _propTypes["default"].shape({
|
|
|
10
10
|
sort: _propTypes["default"].shape({
|
|
11
11
|
direction: _propTypes["default"].oneOf(['asc', 'desc']),
|
|
12
12
|
property: _propTypes["default"].string
|
|
13
|
-
})
|
|
13
|
+
}),
|
|
14
|
+
columns: _propTypes["default"].arrayOf(_propTypes["default"].string)
|
|
14
15
|
});
|
|
15
16
|
var PropType = {};
|
|
16
17
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -60,7 +60,8 @@ var ComposedToolbar = exports.ComposedToolbar = function ComposedToolbar() {
|
|
|
60
60
|
}, /*#__PURE__*/_react["default"].createElement(_grommet.DataTable, {
|
|
61
61
|
alignSelf: "start",
|
|
62
62
|
columns: _data.columns,
|
|
63
|
-
sortable: true
|
|
63
|
+
sortable: true,
|
|
64
|
+
primaryKey: "name"
|
|
64
65
|
}))))
|
|
65
66
|
// </Grommet>
|
|
66
67
|
);
|
|
@@ -8,7 +8,7 @@ var _Data = require("../Data");
|
|
|
8
8
|
var _excluded = ["search"];
|
|
9
9
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
10
10
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
11
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
11
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
12
12
|
var sizes = ['small', 'medium', 'large'];
|
|
13
13
|
var DATA = [];
|
|
14
14
|
for (var i = 0; i < 11; i += 1) {
|
|
@@ -17,7 +17,7 @@ var _XGuide = require("./XGuide");
|
|
|
17
17
|
var _YGuide = require("./YGuide");
|
|
18
18
|
var _utils2 = require("./utils");
|
|
19
19
|
var _propTypes = require("./propTypes");
|
|
20
|
-
var
|
|
20
|
+
var _useThemeValue2 = require("../../utils/useThemeValue");
|
|
21
21
|
var _excluded = ["a11yTitle", "axis", "bounds", "chart", "data", "detail", "direction", "gap", "guide", "legend", "offset", "placeholder", "pad", "series", "size"],
|
|
22
22
|
_excluded2 = ["property"],
|
|
23
23
|
_excluded3 = ["property", "type", "x", "y"],
|
|
@@ -25,7 +25,7 @@ var _excluded = ["a11yTitle", "axis", "bounds", "chart", "data", "detail", "dire
|
|
|
25
25
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
26
26
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
27
27
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
28
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
28
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
29
29
|
var stackedChartType = {
|
|
30
30
|
areas: 'area',
|
|
31
31
|
bars: 'bar',
|
|
@@ -61,7 +61,8 @@ var DataChart = exports.DataChart = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
61
61
|
seriesProp = _ref.series,
|
|
62
62
|
size = _ref.size,
|
|
63
63
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
64
|
-
var
|
|
64
|
+
var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
|
|
65
|
+
theme = _useThemeValue.theme;
|
|
65
66
|
|
|
66
67
|
// legend interaction, if any
|
|
67
68
|
var _useState = (0, _react.useState)(),
|
|
@@ -11,7 +11,7 @@ var _Keyboard = require("../Keyboard");
|
|
|
11
11
|
var _Text = require("../Text");
|
|
12
12
|
var _utils = require("../../utils");
|
|
13
13
|
var _Swatch = require("./Swatch");
|
|
14
|
-
var
|
|
14
|
+
var _useThemeValue2 = require("../../utils/useThemeValue");
|
|
15
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
16
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
@@ -30,7 +30,8 @@ var Detail = exports.Detail = function Detail(_ref) {
|
|
|
30
30
|
seriesStyles = _ref.seriesStyles,
|
|
31
31
|
renderValue = _ref.renderValue,
|
|
32
32
|
thickness = _ref.thickness;
|
|
33
|
-
var
|
|
33
|
+
var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
|
|
34
|
+
theme = _useThemeValue.theme;
|
|
34
35
|
var _useState = (0, _react.useState)(),
|
|
35
36
|
detailIndex = _useState[0],
|
|
36
37
|
setDetailIndex = _useState[1];
|
|
@@ -4,7 +4,7 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.Swatch = void 0;
|
|
5
5
|
var _react = _interopRequireDefault(require("react"));
|
|
6
6
|
var _utils = require("../../utils");
|
|
7
|
-
var
|
|
7
|
+
var _useThemeValue2 = require("../../utils/useThemeValue");
|
|
8
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
9
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
10
10
|
var Swatch = exports.Swatch = function Swatch(_ref) {
|
|
@@ -16,7 +16,8 @@ var Swatch = exports.Swatch = function Swatch(_ref) {
|
|
|
16
16
|
round = _ref.round,
|
|
17
17
|
thickness = _ref.thickness,
|
|
18
18
|
type = _ref.type;
|
|
19
|
-
var
|
|
19
|
+
var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
|
|
20
|
+
theme = _useThemeValue.theme;
|
|
20
21
|
var dim = parseInt(theme.global.spacing, 10) / 2;
|
|
21
22
|
var half = dim / 2;
|
|
22
23
|
var height = dim;
|
|
@@ -10,7 +10,7 @@ var _excluded = ["values", "pad", "renderValue", "serie", "theme", "thickness"];
|
|
|
10
10
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
11
11
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
12
12
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
13
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
13
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
14
14
|
var onlyHorizontalPad = function onlyHorizontalPad(pad) {
|
|
15
15
|
var result;
|
|
16
16
|
if (pad) {
|
|
@@ -7,17 +7,18 @@ var _propTypes = require("./propTypes");
|
|
|
7
7
|
var _Button = require("../Button");
|
|
8
8
|
var _DataContext = require("../../contexts/DataContext");
|
|
9
9
|
var _MessageContext = require("../../contexts/MessageContext");
|
|
10
|
-
var
|
|
10
|
+
var _useThemeValue2 = require("../../utils/useThemeValue");
|
|
11
11
|
var _excluded = ["onClick"];
|
|
12
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
13
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
14
14
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
15
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
15
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
16
16
|
var DataClearFilters = exports.DataClearFilters = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
17
17
|
var _theme$data$button;
|
|
18
18
|
var _onClick = _ref.onClick,
|
|
19
19
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
20
|
-
var
|
|
20
|
+
var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
|
|
21
|
+
theme = _useThemeValue.theme;
|
|
21
22
|
var _useContext = (0, _react.useContext)(_MessageContext.MessageContext),
|
|
22
23
|
format = _useContext.format;
|
|
23
24
|
var _useContext2 = (0, _react.useContext)(_DataContext.DataContext),
|
|
@@ -16,20 +16,20 @@ var _excluded = ["children", "options", "property", "range"];
|
|
|
16
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
18
18
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
19
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
19
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
20
20
|
// empirical constants for when we change inputs
|
|
21
21
|
var maxCheckBoxGroupOptions = 4;
|
|
22
22
|
var minSelectSearchOptions = 10;
|
|
23
23
|
var defaultRangeSteps = 20;
|
|
24
|
-
var
|
|
24
|
+
var _getValueAt = function getValueAt(valueObject, pathArg) {
|
|
25
25
|
if (!pathArg || valueObject === undefined) return undefined;
|
|
26
26
|
var path = Array.isArray(pathArg) ? pathArg : pathArg.split('.');
|
|
27
27
|
if (path.length === 1) return valueObject[path];
|
|
28
|
-
return
|
|
28
|
+
return _getValueAt(valueObject[path.shift()], path);
|
|
29
29
|
};
|
|
30
30
|
var generateOptions = function generateOptions(data, property) {
|
|
31
31
|
return Array.from(new Set(data.map(function (d) {
|
|
32
|
-
return
|
|
32
|
+
return _getValueAt(d, property);
|
|
33
33
|
}))).filter(function (v) {
|
|
34
34
|
return v !== undefined && v !== '';
|
|
35
35
|
})
|
|
@@ -17,12 +17,12 @@ var _Layer = require("../Layer");
|
|
|
17
17
|
var _DataContext = require("../../contexts/DataContext");
|
|
18
18
|
var _MessageContext = require("../../contexts/MessageContext");
|
|
19
19
|
var _propTypes = require("./propTypes");
|
|
20
|
-
var
|
|
20
|
+
var _useThemeValue2 = require("../../utils/useThemeValue");
|
|
21
21
|
var _excluded = ["drop", "children", "clearFilters", "heading", "layer", "updateOn"];
|
|
22
22
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
23
23
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
24
24
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
25
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
25
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
26
26
|
var dropProps = {
|
|
27
27
|
align: {
|
|
28
28
|
top: 'bottom',
|
|
@@ -53,7 +53,8 @@ var DataFilters = exports.DataFilters = function DataFilters(_ref) {
|
|
|
53
53
|
view = _useContext.view;
|
|
54
54
|
var _useContext2 = (0, _react.useContext)(_MessageContext.MessageContext),
|
|
55
55
|
format = _useContext2.format;
|
|
56
|
-
var
|
|
56
|
+
var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
|
|
57
|
+
theme = _useThemeValue.theme;
|
|
57
58
|
var _useState = (0, _react.useState)(),
|
|
58
59
|
showContent = _useState[0],
|
|
59
60
|
setShowContent = _useState[1];
|