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
|
@@ -15,11 +15,11 @@ var _propTypes = require("./propTypes");
|
|
|
15
15
|
var _StyledCalendar = require("./StyledCalendar");
|
|
16
16
|
var _utils = require("./utils");
|
|
17
17
|
var _dates = require("../../utils/dates");
|
|
18
|
-
var
|
|
18
|
+
var _useThemeValue3 = require("../../utils/useThemeValue");
|
|
19
19
|
var _excluded = ["activeDate", "animate", "bounds", "children", "date", "dates", "daysOfWeek", "disabled", "initialFocus", "fill", "firstDayOfWeek", "header", "locale", "messages", "onReference", "onSelect", "range", "reference", "showAdjacentDays", "size", "timestamp"];
|
|
20
20
|
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); }
|
|
21
21
|
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; }
|
|
22
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
22
|
+
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; }
|
|
23
23
|
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); }
|
|
24
24
|
var headingPadMap = {
|
|
25
25
|
small: 'xsmall',
|
|
@@ -57,7 +57,7 @@ var currentlySelectedString = function currentlySelectedString(value, locale) {
|
|
|
57
57
|
|
|
58
58
|
// calendar value may be a single date, multiple dates, a range of dates
|
|
59
59
|
// supplied as ISOstrings.
|
|
60
|
-
var
|
|
60
|
+
var _normalizeInput = function normalizeInput(dateValue) {
|
|
61
61
|
var result;
|
|
62
62
|
if (dateValue instanceof Date) {
|
|
63
63
|
result = dateValue;
|
|
@@ -67,12 +67,12 @@ var normalizeInput = function normalizeInput(dateValue) {
|
|
|
67
67
|
result = (0, _dates.setHoursWithOffset)(dateValue);
|
|
68
68
|
} else if (Array.isArray(dateValue)) {
|
|
69
69
|
result = dateValue.map(function (d) {
|
|
70
|
-
return
|
|
70
|
+
return _normalizeInput(d);
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
return result;
|
|
74
74
|
};
|
|
75
|
-
var
|
|
75
|
+
var _normalizeOutput = function normalizeOutput(dateValue, outputFormat) {
|
|
76
76
|
var result;
|
|
77
77
|
var normalize = function normalize(value) {
|
|
78
78
|
var normalizedValue = value.toISOString();
|
|
@@ -88,7 +88,7 @@ var normalizeOutput = function normalizeOutput(dateValue, outputFormat) {
|
|
|
88
88
|
result = undefined;
|
|
89
89
|
} else {
|
|
90
90
|
result = dateValue.map(function (d) {
|
|
91
|
-
return
|
|
91
|
+
return _normalizeOutput(d, outputFormat);
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
return result;
|
|
@@ -144,12 +144,12 @@ var disabledCalendarNextMonthButton = function disabledCalendarNextMonthButton(d
|
|
|
144
144
|
var firstBound = new Date(bounds[0]);
|
|
145
145
|
return !(0, _utils.sameDayOrAfter)(firstBound, reference) && !(0, _utils.betweenDates)(date, bounds);
|
|
146
146
|
};
|
|
147
|
-
var
|
|
147
|
+
var _getOutputFormat = exports.getOutputFormat = function getOutputFormat(dates) {
|
|
148
148
|
if (typeof dates === 'string' && (dates == null ? void 0 : dates.indexOf('T')) === -1) {
|
|
149
149
|
return 'no timezone';
|
|
150
150
|
}
|
|
151
151
|
if (Array.isArray(dates)) {
|
|
152
|
-
return
|
|
152
|
+
return _getOutputFormat(dates[0]);
|
|
153
153
|
}
|
|
154
154
|
return 'date timezone';
|
|
155
155
|
};
|
|
@@ -169,20 +169,22 @@ var CalendarDay = function CalendarDay(_ref) {
|
|
|
169
169
|
otherMonth = _ref.otherMonth,
|
|
170
170
|
_ref$buttonProps = _ref.buttonProps,
|
|
171
171
|
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps;
|
|
172
|
+
var _useThemeValue = (0, _useThemeValue3.useThemeValue)(),
|
|
173
|
+
passThemeFlag = _useThemeValue.passThemeFlag;
|
|
172
174
|
return /*#__PURE__*/_react["default"].createElement(_StyledCalendar.StyledDayContainer, {
|
|
173
175
|
role: "gridcell",
|
|
174
176
|
sizeProp: size,
|
|
175
177
|
fillContainer: fill
|
|
176
178
|
}, /*#__PURE__*/_react["default"].createElement(CalendarDayButton, _extends({
|
|
177
179
|
fill: fill
|
|
178
|
-
}, buttonProps), /*#__PURE__*/_react["default"].createElement(_StyledCalendar.StyledDay, {
|
|
180
|
+
}, buttonProps), /*#__PURE__*/_react["default"].createElement(_StyledCalendar.StyledDay, _extends({
|
|
179
181
|
disabledProp: buttonProps.disabled,
|
|
180
182
|
inRange: isInRange,
|
|
181
183
|
otherMonth: otherMonth,
|
|
182
184
|
isSelected: isSelected,
|
|
183
185
|
sizeProp: size,
|
|
184
186
|
fillContainer: fill
|
|
185
|
-
}, children)));
|
|
187
|
+
}, passThemeFlag), children)));
|
|
186
188
|
};
|
|
187
189
|
var CalendarCustomDay = function CalendarCustomDay(_ref2) {
|
|
188
190
|
var children = _ref2.children,
|
|
@@ -232,7 +234,9 @@ var Calendar = exports.Calendar = /*#__PURE__*/(0, _react.forwardRef)(function (
|
|
|
232
234
|
size = _ref3$size === void 0 ? 'medium' : _ref3$size,
|
|
233
235
|
timestampProp = _ref3.timestamp,
|
|
234
236
|
rest = _objectWithoutPropertiesLoose(_ref3, _excluded);
|
|
235
|
-
var
|
|
237
|
+
var _useThemeValue2 = (0, _useThemeValue3.useThemeValue)(),
|
|
238
|
+
theme = _useThemeValue2.theme,
|
|
239
|
+
passThemeFlag = _useThemeValue2.passThemeFlag;
|
|
236
240
|
var announce = (0, _react.useContext)(_AnnounceContext.AnnounceContext);
|
|
237
241
|
var _useContext = (0, _react.useContext)(_MessageContext.MessageContext),
|
|
238
242
|
format = _useContext.format;
|
|
@@ -265,26 +269,26 @@ var Calendar = exports.Calendar = /*#__PURE__*/(0, _react.forwardRef)(function (
|
|
|
265
269
|
(0, _react.useEffect)(function () {
|
|
266
270
|
if (activeDateProp) setActiveDate(activeDateProp);
|
|
267
271
|
}, [activeDateProp]);
|
|
268
|
-
var _useState3 = (0, _react.useState)(
|
|
272
|
+
var _useState3 = (0, _react.useState)(_normalizeInput(dateProp || datesProp)),
|
|
269
273
|
value = _useState3[0],
|
|
270
274
|
setValue = _useState3[1];
|
|
271
275
|
(0, _react.useEffect)(function () {
|
|
272
276
|
var val = dateProp || datesProp;
|
|
273
|
-
setValue(
|
|
277
|
+
setValue(_normalizeInput(val));
|
|
274
278
|
}, [dateProp, datesProp]);
|
|
275
|
-
var _useState4 = (0, _react.useState)(getReference(
|
|
279
|
+
var _useState4 = (0, _react.useState)(getReference(_normalizeInput(referenceProp), value)),
|
|
276
280
|
reference = _useState4[0],
|
|
277
281
|
setReference = _useState4[1];
|
|
278
282
|
(0, _react.useEffect)(function () {
|
|
279
283
|
if (value) {
|
|
280
|
-
setReference(getReference(
|
|
284
|
+
setReference(getReference(_normalizeInput(referenceProp), value));
|
|
281
285
|
}
|
|
282
286
|
}, [referenceProp, value]);
|
|
283
|
-
var _useState5 = (0, _react.useState)(
|
|
287
|
+
var _useState5 = (0, _react.useState)(_getOutputFormat(dateProp || datesProp)),
|
|
284
288
|
outputFormat = _useState5[0],
|
|
285
289
|
setOutputFormat = _useState5[1];
|
|
286
290
|
(0, _react.useEffect)(function () {
|
|
287
|
-
setOutputFormat(
|
|
291
|
+
setOutputFormat(_getOutputFormat(dateProp || datesProp));
|
|
288
292
|
}, [dateProp, datesProp]);
|
|
289
293
|
|
|
290
294
|
// normalize bounds
|
|
@@ -488,7 +492,7 @@ var Calendar = exports.Calendar = /*#__PURE__*/(0, _react.forwardRef)(function (
|
|
|
488
492
|
nextValue = selectedDate;
|
|
489
493
|
}
|
|
490
494
|
if (onSelect) {
|
|
491
|
-
nextValue =
|
|
495
|
+
nextValue = _normalizeOutput(nextValue, outputFormat);
|
|
492
496
|
onSelect(nextValue);
|
|
493
497
|
}
|
|
494
498
|
}, [handleRange, onSelect, outputFormat, range, value]);
|
|
@@ -649,7 +653,7 @@ var Calendar = exports.Calendar = /*#__PURE__*/(0, _react.forwardRef)(function (
|
|
|
649
653
|
} else if (selectedState === 1) {
|
|
650
654
|
inRange = true;
|
|
651
655
|
}
|
|
652
|
-
var dayDisabled = (0, _utils.withinDates)(day,
|
|
656
|
+
var dayDisabled = (0, _utils.withinDates)(day, _normalizeInput(disabled)) || bounds && !(0, _utils.betweenDates)(day, _normalizeInput(bounds));
|
|
653
657
|
if (!firstDayInMonth && !dayDisabled && day.getMonth() === reference.getMonth()) {
|
|
654
658
|
firstDayInMonth = dateObject;
|
|
655
659
|
}
|
|
@@ -720,7 +724,7 @@ var Calendar = exports.Calendar = /*#__PURE__*/(0, _react.forwardRef)(function (
|
|
|
720
724
|
ref: ref,
|
|
721
725
|
sizeProp: size,
|
|
722
726
|
fillContainer: fill
|
|
723
|
-
}, rest), /*#__PURE__*/_react["default"].createElement(_Box.Box, {
|
|
727
|
+
}, passThemeFlag, rest), /*#__PURE__*/_react["default"].createElement(_Box.Box, {
|
|
724
728
|
fill: fill
|
|
725
729
|
}, header ? header({
|
|
726
730
|
date: reference,
|
|
@@ -785,7 +789,7 @@ var Calendar = exports.Calendar = /*#__PURE__*/(0, _react.forwardRef)(function (
|
|
|
785
789
|
changeReference(active);
|
|
786
790
|
}
|
|
787
791
|
}
|
|
788
|
-
}, /*#__PURE__*/_react["default"].createElement(_StyledCalendar.StyledWeeksContainer, {
|
|
792
|
+
}, /*#__PURE__*/_react["default"].createElement(_StyledCalendar.StyledWeeksContainer, _extends({
|
|
789
793
|
tabIndex: 0,
|
|
790
794
|
role: "grid",
|
|
791
795
|
"aria-label": reference.toLocaleDateString(locale, {
|
|
@@ -807,11 +811,11 @@ var Calendar = exports.Calendar = /*#__PURE__*/(0, _react.forwardRef)(function (
|
|
|
807
811
|
setFocus(false);
|
|
808
812
|
setActive(undefined);
|
|
809
813
|
}
|
|
810
|
-
}, /*#__PURE__*/_react["default"].createElement(_StyledCalendar.StyledWeeks, {
|
|
814
|
+
}, passThemeFlag), /*#__PURE__*/_react["default"].createElement(_StyledCalendar.StyledWeeks, _extends({
|
|
811
815
|
slide: slide,
|
|
812
816
|
sizeProp: size,
|
|
813
817
|
fillContainer: fill
|
|
814
|
-
}, weeks)))));
|
|
818
|
+
}, passThemeFlag), weeks)))));
|
|
815
819
|
});
|
|
816
820
|
Calendar.displayName = 'Calendar';
|
|
817
821
|
Calendar.propTypes = _propTypes.CalendarPropTypes;
|
|
@@ -4,7 +4,6 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.StyledWeeksContainer = exports.StyledWeeks = exports.StyledWeek = exports.StyledDayContainer = exports.StyledDay = exports.StyledCalendar = 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
9
|
var sizeStyle = function sizeStyle(props) {
|
|
@@ -14,7 +13,7 @@ var sizeStyle = function sizeStyle(props) {
|
|
|
14
13
|
return p.fillContainer && 'height: 100%;';
|
|
15
14
|
});
|
|
16
15
|
};
|
|
17
|
-
var StyledCalendar = exports.StyledCalendar = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).
|
|
16
|
+
var StyledCalendar = exports.StyledCalendar = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).withConfig({
|
|
18
17
|
displayName: "StyledCalendar",
|
|
19
18
|
componentId: "sc-1y4xhmp-0"
|
|
20
19
|
})(["", " ", " ", ""], _utils.genericStyles, function (props) {
|
|
@@ -26,7 +25,7 @@ var weeksContainerSizeStyle = function weeksContainerSizeStyle(props) {
|
|
|
26
25
|
var height = props.fillContainer ? '100%' : (0, _utils.parseMetricToNum)(props.theme.calendar[props.sizeProp].daySize) * 6 + "px";
|
|
27
26
|
return "\n height: " + height + ";\n\n ";
|
|
28
27
|
};
|
|
29
|
-
var StyledWeeksContainer = exports.StyledWeeksContainer = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).
|
|
28
|
+
var StyledWeeksContainer = exports.StyledWeeksContainer = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).withConfig({
|
|
30
29
|
displayName: "StyledCalendar__StyledWeeksContainer",
|
|
31
30
|
componentId: "sc-1y4xhmp-1"
|
|
32
31
|
})(["overflow:hidden;", " ", ";"], function (props) {
|
|
@@ -52,7 +51,7 @@ var slideStyle = function slideStyle(props) {
|
|
|
52
51
|
var weeksSizeStyle = function weeksSizeStyle() {
|
|
53
52
|
return (0, _styledComponents.css)(["display:flex;flex-direction:column;height:100%;"]);
|
|
54
53
|
};
|
|
55
|
-
var StyledWeeks = exports.StyledWeeks = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).
|
|
54
|
+
var StyledWeeks = exports.StyledWeeks = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).withConfig({
|
|
56
55
|
displayName: "StyledCalendar__StyledWeeks",
|
|
57
56
|
componentId: "sc-1y4xhmp-2"
|
|
58
57
|
})(["position:relative;", " ", ";"], function (props) {
|
|
@@ -79,7 +78,7 @@ var daySizeStyle = function daySizeStyle(props) {
|
|
|
79
78
|
var data = props.theme.calendar[props.sizeProp];
|
|
80
79
|
return (0, _styledComponents.css)(["width:", ";height:", ";"], props.fillContainer ? '100%' : data.daySize, props.fillContainer ? '100%' : data.daySize);
|
|
81
80
|
};
|
|
82
|
-
var StyledDay = exports.StyledDay = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).
|
|
81
|
+
var StyledDay = exports.StyledDay = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).withConfig({
|
|
83
82
|
displayName: "StyledCalendar__StyledDay",
|
|
84
83
|
componentId: "sc-1y4xhmp-5"
|
|
85
84
|
})(["display:flex;justify-content:center;align-items:center;", " ", " ", " ", " ", " ", ""], function (props) {
|
package/components/Card/Card.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.Card = void 0;
|
|
5
5
|
var _react = _interopRequireWildcard(require("react"));
|
|
6
6
|
var _Box = require("../Box");
|
|
7
|
-
var
|
|
7
|
+
var _useThemeValue2 = require("../../utils/useThemeValue");
|
|
8
8
|
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
9
|
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
10
|
function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
|
|
@@ -12,7 +12,8 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
|
|
|
12
12
|
var Card = exports.Card = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
13
13
|
var _theme$card$hover;
|
|
14
14
|
var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
15
|
-
var
|
|
15
|
+
var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
|
|
16
|
+
theme = _useThemeValue.theme;
|
|
16
17
|
return /*#__PURE__*/_react["default"].createElement(_Box.Box, _extends({
|
|
17
18
|
overflow: "hidden",
|
|
18
19
|
kind: _extends({
|
|
@@ -8,7 +8,7 @@ var _grommet = require("grommet");
|
|
|
8
8
|
var _excluded = ["children", "title", "subTitle", "size"];
|
|
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 theme = {
|
|
13
13
|
themeMode: 'dark',
|
|
14
14
|
global: {
|
|
@@ -8,7 +8,7 @@ var _grommet = require("grommet");
|
|
|
8
8
|
var _excluded = ["children", "title", "subTitle", "size"];
|
|
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 data = [{
|
|
13
13
|
color: 'blue',
|
|
14
14
|
icon: /*#__PURE__*/_react["default"].createElement(_grommetIcons.Wifi, {
|
|
@@ -4,13 +4,14 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.CardBody = void 0;
|
|
5
5
|
var _react = _interopRequireDefault(require("react"));
|
|
6
6
|
var _Box = require("../Box");
|
|
7
|
-
var
|
|
7
|
+
var _useThemeValue2 = require("../../utils/useThemeValue");
|
|
8
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
9
|
function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
|
|
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
11
|
var CardBody = exports.CardBody = function CardBody(_ref) {
|
|
12
12
|
var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
13
|
-
var
|
|
13
|
+
var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
|
|
14
|
+
theme = _useThemeValue.theme;
|
|
14
15
|
return /*#__PURE__*/_react["default"].createElement(_Box.Box, _extends({
|
|
15
16
|
flex: true
|
|
16
17
|
}, theme.card.body, rest));
|
|
@@ -4,13 +4,14 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.CardFooter = void 0;
|
|
5
5
|
var _react = _interopRequireDefault(require("react"));
|
|
6
6
|
var _Footer = require("../Footer");
|
|
7
|
-
var
|
|
7
|
+
var _useThemeValue2 = require("../../utils/useThemeValue");
|
|
8
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
9
|
function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
|
|
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
11
|
// Needs to have a CardBody or a flex container when Card uses a fixed height.
|
|
12
12
|
var CardFooter = exports.CardFooter = function CardFooter(_ref) {
|
|
13
13
|
var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
14
|
-
var
|
|
14
|
+
var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
|
|
15
|
+
theme = _useThemeValue.theme;
|
|
15
16
|
return /*#__PURE__*/_react["default"].createElement(_Footer.Footer, _extends({}, theme.card.footer, rest));
|
|
16
17
|
};
|
|
@@ -4,12 +4,13 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.CardHeader = void 0;
|
|
5
5
|
var _react = _interopRequireDefault(require("react"));
|
|
6
6
|
var _Header = require("../Header");
|
|
7
|
-
var
|
|
7
|
+
var _useThemeValue2 = require("../../utils/useThemeValue");
|
|
8
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
9
|
function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
|
|
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
11
|
var CardHeader = exports.CardHeader = function CardHeader(_ref) {
|
|
12
12
|
var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
13
|
-
var
|
|
13
|
+
var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
|
|
14
|
+
theme = _useThemeValue.theme;
|
|
14
15
|
return /*#__PURE__*/_react["default"].createElement(_Header.Header, _extends({}, theme.card.header, rest));
|
|
15
16
|
};
|
|
@@ -12,12 +12,12 @@ var _InfiniteScroll = require("../InfiniteScroll");
|
|
|
12
12
|
var _Pagination = require("../Pagination");
|
|
13
13
|
var _utils = require("../../utils");
|
|
14
14
|
var _propTypes = require("./propTypes");
|
|
15
|
-
var
|
|
15
|
+
var _useThemeValue2 = require("../../utils/useThemeValue");
|
|
16
16
|
var _excluded = ["as", "children", "data", "margin", "onMore", "pad", "paginate", "show", "size", "step"];
|
|
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
19
|
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); }
|
|
20
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
20
|
+
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; }
|
|
21
21
|
var emptyData = [];
|
|
22
22
|
var Cards = exports.Cards = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
|
|
23
23
|
var _ref$as = _ref.as,
|
|
@@ -34,7 +34,8 @@ var Cards = exports.Cards = /*#__PURE__*/_react["default"].forwardRef(function (
|
|
|
34
34
|
_ref$step = _ref.step,
|
|
35
35
|
step = _ref$step === void 0 ? paginate ? 50 : undefined : _ref$step,
|
|
36
36
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
37
|
-
var
|
|
37
|
+
var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
|
|
38
|
+
theme = _useThemeValue.theme;
|
|
38
39
|
var _useContext = (0, _react.useContext)(_DataContext.DataContext),
|
|
39
40
|
contextData = _useContext.data;
|
|
40
41
|
var data = dataProp || contextData || emptyData;
|
|
@@ -11,12 +11,12 @@ var _Keyboard = require("../Keyboard");
|
|
|
11
11
|
var _StyledCarousel = require("./StyledCarousel");
|
|
12
12
|
var _CarouselChild = require("./CarouselChild");
|
|
13
13
|
var _propTypes = require("./propTypes");
|
|
14
|
-
var
|
|
14
|
+
var _useThemeValue2 = require("../../utils/useThemeValue");
|
|
15
15
|
var _excluded = ["activeChild", "initialChild", "onChild", "play", "children", "controls", "height", "fill", "width", "onFocus", "onBlur", "wrap"];
|
|
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
|
var Carousel = exports.Carousel = function Carousel(_ref) {
|
|
21
21
|
var activeChild = _ref.activeChild,
|
|
22
22
|
_ref$initialChild = _ref.initialChild,
|
|
@@ -33,7 +33,8 @@ var Carousel = exports.Carousel = function Carousel(_ref) {
|
|
|
33
33
|
onBlur = _ref.onBlur,
|
|
34
34
|
wrap = _ref.wrap,
|
|
35
35
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
36
|
-
var
|
|
36
|
+
var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
|
|
37
|
+
theme = _useThemeValue.theme;
|
|
37
38
|
var _useContext = (0, _react.useContext)(_MessageContext.MessageContext),
|
|
38
39
|
format = _useContext.format;
|
|
39
40
|
var timerRef = (0, _react.useRef)();
|
|
@@ -8,7 +8,7 @@ var _grommet = require("grommet");
|
|
|
8
8
|
var _excluded = ["controls"];
|
|
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 customTheme = {
|
|
13
13
|
carousel: {
|
|
14
14
|
animation: {
|
|
@@ -8,14 +8,14 @@ var _utils = require("../../utils");
|
|
|
8
8
|
var _StyledChart = require("./StyledChart");
|
|
9
9
|
var _utils2 = require("./utils");
|
|
10
10
|
var _propTypes = require("./propTypes");
|
|
11
|
-
var
|
|
11
|
+
var _useThemeValue2 = require("../../utils/useThemeValue");
|
|
12
12
|
var _excluded = ["a11yTitle", "bounds", "color", "dash", "direction", "gap", "id", "onClick", "onHover", "opacity", "overflow", "pad", "pattern", "point", "round", "size", "thickness", "type", "values"],
|
|
13
13
|
_excluded2 = ["color", "label", "onHover", "opacity", "thickness", "value"],
|
|
14
14
|
_excluded3 = ["color", "label", "onHover", "opacity", "thickness", "value"];
|
|
15
15
|
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); }
|
|
16
16
|
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; }
|
|
17
17
|
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); }
|
|
18
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
18
|
+
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; }
|
|
19
19
|
var gradientMaskColor = '#ffffff';
|
|
20
20
|
|
|
21
21
|
// use constants so re-renders don't re-trigger effects
|
|
@@ -51,7 +51,9 @@ var Chart = exports.Chart = /*#__PURE__*/_react["default"].forwardRef(function (
|
|
|
51
51
|
valuesProp = _ref$values === void 0 ? defaultValues : _ref$values,
|
|
52
52
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
53
53
|
var containerRef = (0, _utils.useForwardedRef)(ref);
|
|
54
|
-
var
|
|
54
|
+
var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
|
|
55
|
+
theme = _useThemeValue.theme,
|
|
56
|
+
passThemeFlag = _useThemeValue.passThemeFlag;
|
|
55
57
|
var values = (0, _react.useMemo)(function () {
|
|
56
58
|
return (0, _utils2.normalizeValues)(valuesProp);
|
|
57
59
|
}, [valuesProp]);
|
|
@@ -573,7 +575,7 @@ var Chart = exports.Chart = /*#__PURE__*/_react["default"].forwardRef(function (
|
|
|
573
575
|
width: size === 'full' ? '100%' : size.width,
|
|
574
576
|
height: size === 'full' ? '100%' : size.height,
|
|
575
577
|
typeProp: type // prevent adding to DOM
|
|
576
|
-
}, rest), defs.length && /*#__PURE__*/_react["default"].createElement("defs", null, defs), useGradient ? gradientRect : drawing);
|
|
578
|
+
}, passThemeFlag, rest), defs.length && /*#__PURE__*/_react["default"].createElement("defs", null, defs), useGradient ? gradientRect : drawing);
|
|
577
579
|
});
|
|
578
580
|
Chart.displayName = 'Chart';
|
|
579
581
|
Chart.propTypes = _propTypes.ChartPropTypes;
|
|
@@ -4,7 +4,6 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.StyledChart = 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
9
|
var animateStyle = function animateStyle(_ref) {
|
|
@@ -16,7 +15,7 @@ var animateStyle = function animateStyle(_ref) {
|
|
|
16
15
|
animateBounds = ['stroke-dashoffset: 200%;', 'stroke-dashoffset: 0%;'];else if (typeProp === 'point') animateBounds = ['opacity: 0;', 'opacity: 1;'];else animateBounds = ['transform: scaleY(0);', 'transform: scaleY(1);'];
|
|
17
16
|
return (0, _styledComponents.css)(["", " animation:", " ", " forwards;", ""], typeProp === 'line' && 'stroke-dasharray: 200%;', (0, _styledComponents.keyframes)(["from{", "}to{", "}"], animateBounds[0], animateBounds[1]), theme.global.animation.duration, (typeProp === 'bar' || typeProp === 'area') && 'transform-origin: center bottom 0;');
|
|
18
17
|
};
|
|
19
|
-
var StyledChart = exports.StyledChart = _styledComponents["default"].svg.withConfig(_utils.styledComponentsConfig).
|
|
18
|
+
var StyledChart = exports.StyledChart = _styledComponents["default"].svg.withConfig(_utils.styledComponentsConfig).withConfig({
|
|
20
19
|
displayName: "StyledChart",
|
|
21
20
|
componentId: "sc-1nae0gf-0"
|
|
22
21
|
})(["display:block;max-width:100%;overflow:visible;", " ", " ", ";"], _utils.genericStyles, function (props) {
|
|
@@ -8,12 +8,12 @@ var _FormContext = require("../Form/FormContext");
|
|
|
8
8
|
var _propTypes = require("./propTypes");
|
|
9
9
|
var _StyledCheckBox = require("./StyledCheckBox");
|
|
10
10
|
var _utils = require("../../utils");
|
|
11
|
-
var
|
|
11
|
+
var _useThemeValue2 = require("../../utils/useThemeValue");
|
|
12
12
|
var _excluded = ["a11yTitle", "aria-label", "checked", "children", "defaultChecked", "disabled", "fill", "focus", "focusIndicator", "id", "label", "name", "onBlur", "onChange", "onFocus", "onMouseEnter", "onMouseLeave", "onMouseOut", "onMouseOver", "pad", "reverse", "toggle", "indeterminate"];
|
|
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 stopLabelClick = function stopLabelClick(event) {
|
|
18
18
|
// prevents clicking on the label trigging the event twice
|
|
19
19
|
// https://stackoverflow.com/questions/24501497/why-the-onclick-element-will-trigger-twice-for-label-element
|
|
@@ -49,7 +49,9 @@ var CheckBox = exports.CheckBox = /*#__PURE__*/(0, _react.forwardRef)(function (
|
|
|
49
49
|
toggle = _ref.toggle,
|
|
50
50
|
indeterminate = _ref.indeterminate,
|
|
51
51
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
52
|
-
var
|
|
52
|
+
var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
|
|
53
|
+
theme = _useThemeValue.theme,
|
|
54
|
+
passThemeFlag = _useThemeValue.passThemeFlag;
|
|
53
55
|
var formContext = (0, _react.useContext)(_FormContext.FormContext);
|
|
54
56
|
var _formContext$useFormI = formContext.useFormInput({
|
|
55
57
|
name: name,
|
|
@@ -102,7 +104,7 @@ var CheckBox = exports.CheckBox = /*#__PURE__*/(0, _react.forwardRef)(function (
|
|
|
102
104
|
if (checked) {
|
|
103
105
|
borderColor = (0, _utils.normalizeColor)(theme.checkBox.color || 'control', theme);
|
|
104
106
|
}
|
|
105
|
-
var visual = toggle ? /*#__PURE__*/_react["default"].createElement(_StyledCheckBox.StyledCheckBoxToggle, themeableProps, /*#__PURE__*/_react["default"].createElement(_StyledCheckBox.StyledCheckBoxKnob, themeableProps)) : /*#__PURE__*/_react["default"].createElement(_StyledCheckBox.StyledCheckBoxBox, _extends({
|
|
107
|
+
var visual = toggle ? /*#__PURE__*/_react["default"].createElement(_StyledCheckBox.StyledCheckBoxToggle, _extends({}, passThemeFlag, themeableProps), /*#__PURE__*/_react["default"].createElement(_StyledCheckBox.StyledCheckBoxKnob, _extends({}, passThemeFlag, themeableProps))) : /*#__PURE__*/_react["default"].createElement(_StyledCheckBox.StyledCheckBoxBox, _extends({
|
|
106
108
|
align: "center",
|
|
107
109
|
justify: "center",
|
|
108
110
|
width: theme.checkBox.size,
|
|
@@ -112,7 +114,7 @@ var CheckBox = exports.CheckBox = /*#__PURE__*/(0, _react.forwardRef)(function (
|
|
|
112
114
|
color: borderColor
|
|
113
115
|
},
|
|
114
116
|
round: theme.checkBox.check.radius
|
|
115
|
-
}, themeableProps), !indeterminate && checked && (CheckedIcon ? /*#__PURE__*/_react["default"].createElement(CheckedIcon, {
|
|
117
|
+
}, passThemeFlag, themeableProps), !indeterminate && checked && (CheckedIcon ? /*#__PURE__*/_react["default"].createElement(CheckedIcon, {
|
|
116
118
|
theme: theme,
|
|
117
119
|
as: _StyledCheckBox.StyledCheckBoxIcon
|
|
118
120
|
}) : /*#__PURE__*/_react["default"].createElement(_StyledCheckBox.StyledCheckBoxIcon, _extends({
|
|
@@ -140,7 +142,7 @@ var CheckBox = exports.CheckBox = /*#__PURE__*/(0, _react.forwardRef)(function (
|
|
|
140
142
|
margin: label && (_ref2 = {}, _ref2[side] = theme.checkBox.gap || 'small', _ref2)
|
|
141
143
|
}, themeableProps), /*#__PURE__*/_react["default"].createElement(_StyledCheckBox.StyledCheckBoxInput, _extends({
|
|
142
144
|
"aria-label": ariaLabel || a11yTitle
|
|
143
|
-
}, rest, {
|
|
145
|
+
}, passThemeFlag, rest, {
|
|
144
146
|
ref: ref,
|
|
145
147
|
type: "checkbox"
|
|
146
148
|
}, (0, _object.removeUndefined)({
|
|
@@ -191,7 +193,7 @@ var CheckBox = exports.CheckBox = /*#__PURE__*/(0, _react.forwardRef)(function (
|
|
|
191
193
|
onMouseOut: function onMouseOut(event) {
|
|
192
194
|
return _onMouseOut == null ? void 0 : _onMouseOut(event);
|
|
193
195
|
}
|
|
194
|
-
}, themeableProps), first, second);
|
|
196
|
+
}, passThemeFlag, themeableProps), first, second);
|
|
195
197
|
});
|
|
196
198
|
CheckBox.displayName = 'CheckBox';
|
|
197
199
|
CheckBox.propTypes = _propTypes.CheckBoxPropTypes;
|
|
@@ -4,7 +4,6 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.StyledCheckBoxToggle = exports.StyledCheckBoxKnob = exports.StyledCheckBoxInput = exports.StyledCheckBoxIcon = exports.StyledCheckBoxContainer = exports.StyledCheckBoxBox = exports.StyledCheckBox = void 0;
|
|
5
5
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
6
6
|
var _utils = require("../../utils");
|
|
7
|
-
var _defaultProps = require("../../default-props");
|
|
8
7
|
var _Box = require("../Box");
|
|
9
8
|
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
9
|
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; }
|
|
@@ -25,7 +24,7 @@ var hoverStyle = (0, _styledComponents.css)(["&:hover input:not([disabled]) + di
|
|
|
25
24
|
var _props$theme$checkBox3;
|
|
26
25
|
return (0, _utils.normalizeColor)(!props.disabled && ((_props$theme$checkBox3 = props.theme.checkBox.hover) == null || (_props$theme$checkBox3 = _props$theme$checkBox3.background) == null ? void 0 : _props$theme$checkBox3.color), props.theme);
|
|
27
26
|
});
|
|
28
|
-
var StyledCheckBoxIcon = exports.StyledCheckBoxIcon = _styledComponents["default"].svg.withConfig(_utils.styledComponentsConfig).
|
|
27
|
+
var StyledCheckBoxIcon = exports.StyledCheckBoxIcon = _styledComponents["default"].svg.withConfig(_utils.styledComponentsConfig).withConfig({
|
|
29
28
|
displayName: "StyledCheckBox__StyledCheckBoxIcon",
|
|
30
29
|
componentId: "sc-1dbk5ju-0"
|
|
31
30
|
})(["box-sizing:border-box;stroke-width:", ";stroke:", ";width:", ";height:", ";", ";"], function (props) {
|
|
@@ -39,7 +38,7 @@ var StyledCheckBoxIcon = exports.StyledCheckBoxIcon = _styledComponents["default
|
|
|
39
38
|
}, function (props) {
|
|
40
39
|
return props.theme.checkBox.icon.extend;
|
|
41
40
|
});
|
|
42
|
-
var StyledCheckBoxContainer = exports.StyledCheckBoxContainer = _styledComponents["default"].label.withConfig(_utils.styledComponentsConfig).
|
|
41
|
+
var StyledCheckBoxContainer = exports.StyledCheckBoxContainer = _styledComponents["default"].label.withConfig(_utils.styledComponentsConfig).withConfig({
|
|
43
42
|
displayName: "StyledCheckBox__StyledCheckBoxContainer",
|
|
44
43
|
componentId: "sc-1dbk5ju-1"
|
|
45
44
|
})(["display:flex;flex-direction:row;align-items:", ";user-select:none;-webkit-user-select:none;", " ", " ", " ", " ", " ", " ", ""], function (props) {
|
|
@@ -58,7 +57,7 @@ var StyledCheckBoxContainer = exports.StyledCheckBoxContainer = _styledComponent
|
|
|
58
57
|
}, function (props) {
|
|
59
58
|
return props.theme.checkBox.extend;
|
|
60
59
|
});
|
|
61
|
-
var StyledCheckBoxInput = exports.StyledCheckBoxInput = _styledComponents["default"].input.withConfig(_utils.styledComponentsConfig).
|
|
60
|
+
var StyledCheckBoxInput = exports.StyledCheckBoxInput = _styledComponents["default"].input.withConfig(_utils.styledComponentsConfig).withConfig({
|
|
62
61
|
displayName: "StyledCheckBox__StyledCheckBoxInput",
|
|
63
62
|
componentId: "sc-1dbk5ju-2"
|
|
64
63
|
})(["opacity:0;-moz-appearance:none;width:0;height:0;margin:0;", " &:checked + span > span{", ":calc( ", " - ", " );background:", ";}"], function (props) {
|
|
@@ -72,7 +71,7 @@ var StyledCheckBoxInput = exports.StyledCheckBoxInput = _styledComponents["defau
|
|
|
72
71
|
}, function (props) {
|
|
73
72
|
return (0, _utils.normalizeColor)(props.theme.checkBox.color || 'control', props.theme);
|
|
74
73
|
});
|
|
75
|
-
var StyledCheckBoxBox = exports.StyledCheckBoxBox = (0, _styledComponents["default"])(_Box.Box).
|
|
74
|
+
var StyledCheckBoxBox = exports.StyledCheckBoxBox = (0, _styledComponents["default"])(_Box.Box).withConfig({
|
|
76
75
|
displayName: "StyledCheckBox__StyledCheckBoxBox",
|
|
77
76
|
componentId: "sc-1dbk5ju-3"
|
|
78
77
|
})(["", ";", ";"], function (props) {
|
|
@@ -80,7 +79,7 @@ var StyledCheckBoxBox = exports.StyledCheckBoxBox = (0, _styledComponents["defau
|
|
|
80
79
|
}, function (props) {
|
|
81
80
|
return props.theme.checkBox.check.extend;
|
|
82
81
|
});
|
|
83
|
-
var StyledCheckBoxToggle = exports.StyledCheckBoxToggle = _styledComponents["default"].span.withConfig(_utils.styledComponentsConfig).
|
|
82
|
+
var StyledCheckBoxToggle = exports.StyledCheckBoxToggle = _styledComponents["default"].span.withConfig(_utils.styledComponentsConfig).withConfig({
|
|
84
83
|
displayName: "StyledCheckBox__StyledCheckBoxToggle",
|
|
85
84
|
componentId: "sc-1dbk5ju-4"
|
|
86
85
|
})(["box-sizing:border-box;vertical-align:middle;display:inline-block;width:", ";height:", ";border:", " solid;border-color:", ";border-radius:", ";background-color:", ";", ";", ";"], function (props) {
|
|
@@ -100,7 +99,7 @@ var StyledCheckBoxToggle = exports.StyledCheckBoxToggle = _styledComponents["def
|
|
|
100
99
|
}, function (props) {
|
|
101
100
|
return props.theme.checkBox.toggle.extend;
|
|
102
101
|
});
|
|
103
|
-
var StyledCheckBoxKnob = exports.StyledCheckBoxKnob = _styledComponents["default"].span.withConfig(_utils.styledComponentsConfig).
|
|
102
|
+
var StyledCheckBoxKnob = exports.StyledCheckBoxKnob = _styledComponents["default"].span.withConfig(_utils.styledComponentsConfig).withConfig({
|
|
104
103
|
displayName: "StyledCheckBox__StyledCheckBoxKnob",
|
|
105
104
|
componentId: "sc-1dbk5ju-5"
|
|
106
105
|
})(["box-sizing:border-box;position:relative;display:inherit;top:-", ";", ":-", ";transition:all 0.3s;width:", ";height:", ";background:", ";border-radius:", ";", ";"], function (props) {
|
|
@@ -8,7 +8,7 @@ var _excluded = ["checked"];
|
|
|
8
8
|
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
9
|
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
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 SimpleCheckBox = function SimpleCheckBox(_ref) {
|
|
13
13
|
var checkedProp = _ref.checked,
|
|
14
14
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
@@ -8,7 +8,7 @@ var _excluded = ["checked"];
|
|
|
8
8
|
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
9
|
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
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 SimpleCheckBox = function SimpleCheckBox(_ref) {
|
|
13
13
|
var checkedProp = _ref.checked,
|
|
14
14
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|