grommet 2.36.1 → 2.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all/stories/AllComponents.js +2 -2
- package/components/Accordion/Accordion.js +2 -2
- package/components/Accordion/stories/CustomHeader.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 +2 -2
- package/components/Anchor/Anchor.js +2 -2
- package/components/Anchor/StyledAnchor.js +2 -8
- package/components/Avatar/Avatar.js +2 -2
- package/components/Box/Box.js +2 -2
- package/components/Box/StyledBox.js +3 -3
- package/components/Box/stories/BackgroundThemed.js +1 -1
- package/components/Button/Badge.js +1 -1
- package/components/Button/BusyAnimation.js +3 -2
- package/components/Button/Button.js +3 -2
- package/components/Button/StyledButton.js +3 -2
- package/components/Button/StyledButtonKind.js +5 -5
- package/components/Button/stories/Busy.js +1 -1
- package/components/Calendar/Calendar.js +2 -2
- package/components/Calendar/StyledCalendar.js +7 -7
- package/components/Calendar/stories/ActiveDate.js +1 -1
- package/components/Calendar/stories/CustomDay.js +1 -1
- package/components/Calendar/stories/CustomHeader.js +1 -1
- package/components/Calendar/stories/CustomThemed/CustomSizeHeading.js +1 -1
- package/components/Calendar/stories/Dual.js +1 -1
- package/components/Calendar/stories/Multiple.js +1 -1
- package/components/Calendar/stories/ShowAdjacentDays.js +1 -1
- package/components/Calendar/stories/Simple.js +1 -1
- package/components/Card/Card.js +1 -1
- package/components/Card/stories/CustomThemed/Clickable.js +1 -1
- package/components/Card/stories/CustomThemed/Themed.js +1 -1
- package/components/CardBody/CardBody.js +1 -1
- package/components/CardFooter/CardFooter.js +1 -1
- package/components/CardHeader/CardHeader.js +1 -1
- package/components/Cards/Cards.js +2 -2
- package/components/Carousel/Carousel.js +2 -2
- package/components/Carousel/CarouselChild.js +1 -1
- package/components/Carousel/StyledCarousel.js +1 -1
- package/components/Carousel/stories/CustomThemed/Custom.js +1 -1
- package/components/Chart/Chart.js +2 -2
- package/components/Chart/StyledChart.js +2 -2
- package/components/Chart/stories/Rich.js +1 -1
- package/components/Chart/stories/Scan.js +1 -1
- package/components/Chart/stories/Window.js +1 -1
- package/components/Chart/stories/Zoom.js +1 -1
- package/components/CheckBox/CheckBox.js +2 -5
- package/components/CheckBox/StyledCheckBox.js +12 -11
- package/components/CheckBox/stories/CustomThemed/Custom.js +1 -1
- package/components/CheckBox/stories/CustomThemed/CustomToggle.js +1 -1
- package/components/CheckBox/stories/Indeterminate.js +1 -1
- package/components/CheckBox/stories/InsideButton.js +1 -1
- package/components/CheckBox/stories/NoLabel.js +2 -2
- package/components/CheckBox/stories/Simple.js +2 -2
- package/components/CheckBox/stories/WithStickyDiv.js +1 -1
- package/components/CheckBoxGroup/CheckBoxGroup.js +2 -2
- package/components/CheckBoxGroup/stories/Children.js +1 -1
- package/components/CheckBoxGroup/stories/InitialValues.js +1 -1
- package/components/Clock/Analog.js +2 -2
- package/components/Clock/Clock.js +2 -2
- package/components/Clock/Digital.js +2 -2
- package/components/Clock/StyledClock.js +8 -8
- package/components/Collapsible/Collapsible.js +1 -1
- package/components/Collapsible/stories/Nested.js +1 -1
- package/components/Data/Data.js +2 -2
- package/components/Data/DataForm.js +2 -2
- package/components/Data/stories/Infinite.js +2 -2
- package/components/Data/stories/Inline.js +2 -2
- package/components/Data/stories/OnSelect.js +264 -0
- package/components/Data/stories/SpaceX.js +2 -2
- package/components/Data/stories/StarWars.js +2 -2
- package/components/DataChart/DataChart.js +2 -2
- package/components/DataChart/Detail.js +1 -1
- package/components/DataChart/Legend.js +1 -1
- package/components/DataChart/Swatch.js +1 -1
- package/components/DataChart/XAxis.js +2 -2
- package/components/DataChart/XGuide.js +1 -1
- package/components/DataChart/YAxis.js +1 -1
- package/components/DataChart/YGuide.js +1 -1
- package/components/DataChart/stories/Prediction.js +1 -1
- package/components/DataClearFilters/DataClearFilters.js +2 -2
- package/components/DataClearFilters/stories/Simple.js +1 -1
- package/components/DataFilter/DataFilter.js +2 -2
- package/components/DataFilters/DataFilters.js +2 -2
- package/components/DataSearch/DataSearch.js +7 -2
- package/components/DataSort/DataSort.js +2 -2
- package/components/DataSummary/DataSummary.js +2 -2
- package/components/DataTable/Body.js +2 -2
- package/components/DataTable/Cell.js +2 -2
- package/components/DataTable/DataTable.js +11 -18
- package/components/DataTable/ExpanderCell.js +2 -2
- package/components/DataTable/Footer.js +2 -2
- package/components/DataTable/GroupedBody.js +2 -2
- package/components/DataTable/Header.js +24 -17
- package/components/DataTable/PlaceholderBody.js +1 -1
- package/components/DataTable/Resizer.js +1 -1
- package/components/DataTable/Searcher.js +1 -1
- package/components/DataTable/Sorter.js +1 -1
- package/components/DataTable/StyledDataTable.js +2 -2
- package/components/DataTable/index.d.ts +5 -1
- package/components/DataTable/stories/ControlledGrouped.js +1 -1
- package/components/DataTable/stories/CustomThemed/Custom.js +1 -1
- package/components/DataTable/stories/OnUpdate.js +1 -1
- package/components/DataTable/stories/SpaceX.js +2 -2
- package/components/DataTable/stories/SpaceXUngrouped.js +2 -2
- package/components/DataTableColumns/DataTableColumns.js +18 -4
- package/components/DataTableColumns/index.d.ts +9 -1
- package/components/DataTableColumns/propTypes.js +1 -0
- package/components/DataTableColumns/stories/Pinned.js +46 -0
- package/components/DataTableGroupBy/DataTableGroupBy.js +2 -2
- package/components/DataView/DataView.js +2 -2
- package/components/DateInput/DateInput.js +2 -2
- package/components/DateInput/stories/FormatInline.js +1 -1
- package/components/Diagram/Diagram.js +2 -2
- package/components/Diagram/StyledDiagram.js +3 -2
- package/components/Diagram/stories/Animated.js +1 -1
- package/components/Diagram/stories/Progressing.js +2 -2
- package/components/Distribution/Distribution.js +1 -1
- package/components/Drop/Drop.js +2 -2
- package/components/Drop/DropContainer.js +2 -4
- package/components/Drop/StyledDrop.js +3 -2
- package/components/Drop/stories/CustomThemed/Lazy.js +1 -1
- package/components/Drop/stories/CustomThemed/Themed.js +1 -1
- package/components/Drop/stories/Inline.js +1 -1
- package/components/Drop/stories/Meter.js +1 -1
- package/components/Drop/stories/Multiple.js +1 -1
- package/components/Drop/stories/Overflow.js +1 -1
- package/components/Drop/stories/Plain.js +1 -1
- package/components/Drop/stories/Progressive.js +1 -1
- package/components/Drop/stories/Simple.js +1 -1
- package/components/Drop/stories/Styled.js +1 -1
- package/components/Drop/stories/TrapFocus.js +1 -1
- package/components/DropButton/DropButton.js +2 -2
- package/components/FileInput/FileInput.js +2 -2
- package/components/FileInput/StyledFileInput.js +1 -1
- package/components/FocusedContainer.js +2 -2
- package/components/Form/Form.js +2 -2
- package/components/Form/FormContext.js +1 -1
- package/components/Form/stories/ArrayOfFormFields.js +1 -1
- package/components/Form/stories/Controlled.js +1 -1
- package/components/Form/stories/ControlledInput.js +1 -1
- package/components/Form/stories/ControlledInputLazy.js +1 -1
- package/components/Form/stories/ControlledLazy.js +1 -1
- package/components/Form/stories/CustomThemed/FieldBorderPosition.js +1 -1
- package/components/Form/stories/CustomThemed/FieldCustomStates.js +1 -1
- package/components/Form/stories/DynamicFields.js +1 -1
- package/components/Form/stories/FieldStates.js +1 -1
- package/components/Form/stories/SolicitedFeedback.js +1 -1
- package/components/Form/stories/UnsolicitedFeedback.js +1 -1
- package/components/Form/stories/ValidateOnChange.js +1 -1
- package/components/Form/stories/ValidateOnMount.js +1 -1
- package/components/FormField/FormField.js +3 -3
- package/components/FormField/stories/Simple.js +1 -1
- package/components/Grid/Grid.js +2 -2
- package/components/Grid/StyledGrid.js +2 -2
- package/components/Grid/stories/CustomThemed/Responsive.js +1 -1
- package/components/Grid/stories/ResponsiveCards.js +1 -1
- package/components/Grommet/Grommet.js +2 -2
- package/components/Grommet/StyledGrommet.js +2 -2
- package/components/Header/Header.js +2 -2
- package/components/Header/stories/Sticky.js +1 -1
- package/components/Heading/Heading.js +2 -2
- package/components/Heading/HeadingSkeleton.js +1 -1
- package/components/Heading/StyledHeading.js +2 -2
- package/components/Image/Image.js +2 -2
- package/components/Image/StyledImage.js +2 -2
- package/components/InfiniteScroll/InfiniteScroll.js +1 -1
- package/components/Keyboard/Keyboard.js +1 -1
- package/components/Layer/Layer.js +1 -1
- package/components/Layer/LayerContainer.js +3 -3
- package/components/Layer/StyledLayer.js +7 -7
- package/components/List/List.js +46 -22
- package/components/List/index.d.ts +20 -6
- package/components/List/propTypes.js +6 -1
- package/components/List/stories/Order.js +1 -1
- package/components/List/stories/Pinned.js +1 -1
- package/components/Markdown/Markdown.js +2 -2
- package/components/Markdown/stories/Override.js +2 -1
- package/components/MaskedInput/MaskedInput.js +2 -2
- package/components/MaskedInput/StyledMaskedInput.js +3 -3
- package/components/Menu/Menu.js +3 -3
- package/components/Meter/Bar.js +2 -2
- package/components/Meter/Circle.js +2 -2
- package/components/Meter/Meter.js +2 -2
- package/components/Meter/StyledMeter.js +2 -2
- package/components/Meter/stories/Circle.js +1 -1
- package/components/Meter/stories/VerticalBarMultiple.js +1 -1
- package/components/NameValueList/NameValueList.js +2 -2
- package/components/NameValuePair/NameValuePair.js +1 -1
- package/components/Nav/stories/CustomThemed/JustifySidebar.js +2 -2
- package/components/Nav/stories/Sidebar.js +2 -2
- package/components/Notification/Notification.js +2 -2
- package/components/Notification/stories/Global.js +1 -1
- package/components/Notification/stories/Title.js +1 -1
- package/components/Notification/stories/TitleAndMessage.js +1 -1
- package/components/Page/Page.js +2 -2
- package/components/Page/stories/PageNotificaton.js +1 -1
- package/components/PageContent/PageContent.js +2 -2
- package/components/PageHeader/PageHeader.js +2 -2
- package/components/PageHeader/stories/MultipleActions.js +1 -1
- package/components/Pagination/PageControl.js +2 -2
- package/components/Pagination/Pagination.js +5 -2
- package/components/Pagination/PaginationStep.js +2 -2
- package/components/Pagination/PaginationSummary.js +2 -2
- package/components/Pagination/StyledPageControl.js +2 -1
- package/components/Pagination/stories/Grid.js +1 -1
- package/components/Paragraph/Paragraph.js +2 -2
- package/components/Paragraph/ParagraphSkeleton.js +1 -1
- package/components/Paragraph/StyledParagraph.js +2 -2
- package/components/RadioButton/RadioButton.js +2 -5
- package/components/RadioButton/StyledRadioButton.js +9 -8
- package/components/RadioButtonGroup/RadioButtonGroup.js +2 -2
- package/components/RadioButtonGroup/stories/Children.js +1 -1
- package/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +2 -2
- package/components/RadioButtonGroup/stories/Disabled.js +2 -2
- package/components/RangeInput/RangeInput.js +3 -3
- package/components/RangeInput/StyledRangeInput.js +2 -2
- package/components/RangeSelector/EdgeControl.js +2 -2
- package/components/RangeSelector/RangeSelector.js +2 -2
- package/components/RangeSelector/stories/Basics.js +1 -1
- package/components/RangeSelector/stories/CustomThemed/Custom.js +2 -2
- package/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +2 -2
- package/components/RangeSelector/stories/Label.js +1 -1
- package/components/RangeSelector/stories/Simple.js +1 -1
- package/components/RangeSelector/stories/Step.js +2 -2
- package/components/RangeSelector/stories/Thin.js +1 -1
- package/components/RangeSelector/stories/Vertical.js +2 -2
- package/components/RoutedAnchor/RoutedAnchor.js +3 -3
- package/components/RoutedButton/RoutedButton.js +3 -3
- package/components/Select/DefaultSelectTextInput.js +2 -2
- package/components/Select/Select.js +2 -2
- package/components/Select/SelectContainer.js +2 -3
- package/components/Select/StyledSelect.js +4 -3
- package/components/Select/stories/ChildrenRender.js +1 -1
- package/components/Select/stories/Clear.js +1 -1
- package/components/Select/stories/Controlled.js +1 -1
- package/components/Select/stories/CustomThemed/CustomSearch.js +1 -1
- package/components/Select/stories/Disabled.js +1 -1
- package/components/Select/stories/InsideFormField.js +1 -1
- package/components/Select/stories/Multiple.js +1 -1
- package/components/Select/stories/ObjectOptions.js +1 -1
- package/components/Select/stories/Search.js +1 -1
- package/components/Select/stories/Simple.js +1 -1
- package/components/Select/stories/ValueLabel.js +1 -1
- package/components/Select/stories/components/SearchBorderBox.js +2 -2
- package/components/Select/stories/components/SearchInput.js +2 -2
- package/components/SelectMultiple/SelectMultiple.js +2 -2
- package/components/SelectMultiple/SelectMultipleContainer.js +1 -2
- package/components/SelectMultiple/SelectMultipleValue.js +1 -1
- package/components/SelectMultiple/SelectionSummary.js +1 -1
- package/components/SelectMultiple/stories/CustomMessages.js +1 -1
- package/components/SelectMultiple/stories/Default.js +1 -1
- package/components/SelectMultiple/stories/Disabled.js +1 -1
- package/components/SelectMultiple/stories/FormField.js +1 -1
- package/components/SelectMultiple/stories/Help.js +1 -1
- package/components/SelectMultiple/stories/Limited.js +1 -1
- package/components/SelectMultiple/stories/ObjectOptions.js +1 -1
- package/components/SelectMultiple/stories/ShowSelectedInline.js +1 -1
- package/components/Sidebar/Sidebar.js +1 -1
- package/components/Sidebar/stories/Labels.js +1 -1
- package/components/Skeleton/Skeleton.js +2 -2
- package/components/Skeleton/SkeletonContext.js +1 -1
- package/components/Skeleton/StyledSkeleton.js +6 -3
- package/components/Skeleton/stories/CustomThemed/Custom.js +1 -1
- package/components/Skeleton/stories/GridContainer.js +2 -2
- package/components/Skeleton/stories/Group.js +1 -1
- package/components/Skeleton/stories/Individual.js +2 -2
- package/components/SkipLink/SkipLink.js +2 -2
- package/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
- package/components/SkipLinks/SkipLinks.js +1 -1
- package/components/Spinner/Spinner.js +2 -2
- package/components/Spinner/stories/Animation.js +1 -1
- package/components/Spinner/stories/Announced.js +1 -1
- package/components/Stack/Stack.js +2 -2
- package/components/Stack/StyledStack.js +3 -3
- package/components/StarRating/StarRating.js +2 -2
- package/components/Tab/StyledTab.js +3 -2
- package/components/Tab/Tab.js +2 -4
- package/components/Table/StyledTable.js +8 -8
- package/components/Table/Table.js +2 -2
- package/components/Table/stories/InfiniteScrollInTable.js +1 -1
- package/components/TableBody/TableBody.js +1 -1
- package/components/TableCell/TableCell.js +2 -2
- package/components/TableFooter/TableFooter.js +1 -1
- package/components/TableHeader/TableHeader.js +1 -1
- package/components/TableRow/TableRow.js +1 -1
- package/components/Tabs/StyledTabs.js +5 -4
- package/components/Tabs/Tabs.js +2 -4
- package/components/Tabs/stories/CustomThemed/States.js +1 -1
- package/components/Tabs/stories/Responsive.js +1 -1
- package/components/Tag/Tag.js +2 -2
- package/components/Text/StyledText.js +2 -6
- package/components/Text/Text.js +2 -2
- package/components/Text/TextSkeleton.js +2 -2
- package/components/TextArea/StyledTextArea.js +2 -2
- package/components/TextArea/TextArea.js +2 -2
- package/components/TextArea/stories/CustomThemed/Themed.js +1 -1
- package/components/TextArea/stories/InsideFormField.js +1 -1
- package/components/TextArea/stories/NonResizable.js +1 -1
- package/components/TextArea/stories/Simple.js +1 -1
- package/components/TextInput/CopyButton.js +1 -1
- package/components/TextInput/StyledTextInput.js +6 -6
- package/components/TextInput/TextInput.js +2 -2
- package/components/TextInput/stories/InsideFormField.js +1 -1
- package/components/TextInput/stories/Simple.js +6 -1
- package/components/TextInput/stories/WithTags.js +1 -1
- package/components/ThumbsRating/ThumbsRating.js +1 -1
- package/components/Tip/Tip.js +1 -1
- package/components/Tip/stories/HeaderActions.js +1 -1
- package/components/ToggleGroup/README.md +2 -0
- package/components/ToggleGroup/StyledToggleGroup.js +36 -0
- package/components/ToggleGroup/ToggleGroup.js +165 -0
- package/components/ToggleGroup/index.d.ts +26 -0
- package/components/ToggleGroup/index.js +6 -0
- package/components/ToggleGroup/propTypes.js +21 -0
- package/components/ToggleGroup/stories/Controlled.js +31 -0
- package/components/ToggleGroup/stories/multiple.tsx +28 -0
- package/components/ToggleGroup/stories/simple.js +37 -0
- package/components/Toolbar/Toolbar.js +2 -2
- package/components/Video/StyledVideo.js +5 -5
- package/components/Video/Video.js +2 -2
- package/components/WorldMap/StyledWorldMap.js +1 -1
- package/components/WorldMap/WorldMap.js +2 -2
- package/components/index.d.ts +2 -0
- package/components/index.js +6 -0
- package/contexts/AnalyticsContext/AnalyticsContext.js +1 -1
- package/contexts/AnnounceContext/stories/Polite.js +1 -1
- package/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
- package/contexts/ThemeContext/stories/ThemeContextExtend.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 +1 -1
- package/es6/components/Anchor/Anchor.js +1 -1
- package/es6/components/Anchor/StyledAnchor.js +2 -8
- package/es6/components/Avatar/Avatar.js +1 -1
- package/es6/components/Box/Box.js +1 -1
- package/es6/components/Box/StyledBox.js +3 -3
- package/es6/components/Button/BusyAnimation.js +2 -1
- package/es6/components/Button/Button.js +2 -1
- package/es6/components/Button/StyledButton.js +2 -1
- package/es6/components/Button/StyledButtonKind.js +3 -4
- package/es6/components/Calendar/Calendar.js +1 -1
- package/es6/components/Calendar/StyledCalendar.js +7 -7
- package/es6/components/Card/stories/CustomThemed/Clickable.js +1 -1
- package/es6/components/Card/stories/CustomThemed/Themed.js +1 -1
- package/es6/components/Cards/Cards.js +1 -1
- package/es6/components/Carousel/Carousel.js +1 -1
- package/es6/components/Carousel/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/Chart/Chart.js +1 -1
- package/es6/components/Chart/StyledChart.js +2 -2
- package/es6/components/CheckBox/CheckBox.js +1 -4
- package/es6/components/CheckBox/StyledCheckBox.js +12 -11
- package/es6/components/CheckBox/stories/NoLabel.js +1 -1
- package/es6/components/CheckBox/stories/Simple.js +1 -1
- package/es6/components/CheckBoxGroup/CheckBoxGroup.js +1 -1
- package/es6/components/Clock/Analog.js +1 -1
- package/es6/components/Clock/Clock.js +1 -1
- package/es6/components/Clock/Digital.js +1 -1
- package/es6/components/Clock/StyledClock.js +8 -8
- package/es6/components/Collapsible/stories/Nested.js +1 -1
- package/es6/components/Data/Data.js +1 -1
- package/es6/components/Data/DataForm.js +1 -1
- package/es6/components/Data/stories/Infinite.js +1 -1
- package/es6/components/Data/stories/Inline.js +1 -1
- package/es6/components/Data/stories/OnSelect.js +258 -0
- package/es6/components/Data/stories/SpaceX.js +1 -1
- package/es6/components/Data/stories/StarWars.js +1 -1
- package/es6/components/DataChart/DataChart.js +1 -1
- package/es6/components/DataChart/XAxis.js +1 -1
- package/es6/components/DataClearFilters/DataClearFilters.js +1 -1
- package/es6/components/DataFilter/DataFilter.js +1 -1
- package/es6/components/DataFilters/DataFilters.js +1 -1
- package/es6/components/DataSearch/DataSearch.js +6 -1
- package/es6/components/DataSort/DataSort.js +1 -1
- package/es6/components/DataSummary/DataSummary.js +1 -1
- package/es6/components/DataTable/Body.js +1 -1
- package/es6/components/DataTable/Cell.js +1 -1
- package/es6/components/DataTable/DataTable.js +10 -17
- package/es6/components/DataTable/ExpanderCell.js +1 -1
- package/es6/components/DataTable/Footer.js +1 -1
- package/es6/components/DataTable/GroupedBody.js +1 -1
- package/es6/components/DataTable/Header.js +23 -16
- package/es6/components/DataTable/StyledDataTable.js +2 -2
- package/es6/components/DataTable/index.d.ts +5 -1
- package/es6/components/DataTable/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/DataTable/stories/SpaceX.js +1 -1
- package/es6/components/DataTable/stories/SpaceXUngrouped.js +1 -1
- package/es6/components/DataTableColumns/DataTableColumns.js +17 -3
- package/es6/components/DataTableColumns/index.d.ts +9 -1
- package/es6/components/DataTableColumns/propTypes.js +1 -0
- package/es6/components/DataTableColumns/stories/Pinned.js +42 -0
- package/es6/components/DataTableGroupBy/DataTableGroupBy.js +1 -1
- package/es6/components/DataView/DataView.js +1 -1
- package/es6/components/DateInput/DateInput.js +1 -1
- package/es6/components/Diagram/Diagram.js +1 -1
- package/es6/components/Diagram/StyledDiagram.js +2 -1
- package/es6/components/Diagram/stories/Progressing.js +1 -1
- package/es6/components/Distribution/Distribution.js +1 -1
- package/es6/components/Drop/Drop.js +1 -1
- package/es6/components/Drop/DropContainer.js +1 -3
- package/es6/components/Drop/StyledDrop.js +2 -1
- package/es6/components/DropButton/DropButton.js +1 -1
- package/es6/components/FileInput/FileInput.js +1 -1
- package/es6/components/FileInput/StyledFileInput.js +2 -2
- package/es6/components/FocusedContainer.js +1 -1
- package/es6/components/Form/Form.js +1 -1
- package/es6/components/FormField/FormField.js +2 -2
- package/es6/components/Grid/Grid.js +1 -1
- package/es6/components/Grid/StyledGrid.js +2 -2
- package/es6/components/Grid/stories/CustomThemed/Responsive.js +1 -1
- package/es6/components/Grommet/Grommet.js +1 -1
- package/es6/components/Grommet/StyledGrommet.js +2 -2
- package/es6/components/Header/Header.js +1 -1
- package/es6/components/Heading/Heading.js +1 -1
- package/es6/components/Heading/StyledHeading.js +2 -2
- package/es6/components/Image/Image.js +1 -1
- package/es6/components/Image/StyledImage.js +2 -2
- package/es6/components/Keyboard/Keyboard.js +1 -1
- package/es6/components/Layer/LayerContainer.js +3 -3
- package/es6/components/Layer/StyledLayer.js +6 -7
- package/es6/components/List/List.js +47 -23
- package/es6/components/List/index.d.ts +20 -6
- package/es6/components/List/propTypes.js +7 -2
- package/es6/components/Markdown/Markdown.js +1 -1
- package/es6/components/Markdown/stories/Override.js +2 -1
- package/es6/components/MaskedInput/MaskedInput.js +1 -1
- package/es6/components/MaskedInput/StyledMaskedInput.js +4 -4
- package/es6/components/Menu/Menu.js +2 -2
- package/es6/components/Meter/Bar.js +1 -1
- package/es6/components/Meter/Circle.js +1 -1
- package/es6/components/Meter/Meter.js +1 -1
- package/es6/components/Meter/StyledMeter.js +2 -2
- package/es6/components/NameValueList/NameValueList.js +1 -1
- package/es6/components/Nav/stories/CustomThemed/JustifySidebar.js +1 -1
- package/es6/components/Nav/stories/Sidebar.js +1 -1
- package/es6/components/Notification/Notification.js +1 -1
- package/es6/components/Page/Page.js +1 -1
- package/es6/components/PageContent/PageContent.js +1 -1
- package/es6/components/PageHeader/PageHeader.js +1 -1
- package/es6/components/Pagination/PageControl.js +1 -1
- package/es6/components/Pagination/Pagination.js +4 -1
- package/es6/components/Pagination/PaginationStep.js +1 -1
- package/es6/components/Pagination/PaginationSummary.js +1 -1
- package/es6/components/Pagination/StyledPageControl.js +2 -1
- package/es6/components/Paragraph/Paragraph.js +1 -1
- package/es6/components/Paragraph/StyledParagraph.js +2 -2
- package/es6/components/RadioButton/RadioButton.js +1 -4
- package/es6/components/RadioButton/StyledRadioButton.js +9 -8
- package/es6/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/es6/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +1 -1
- package/es6/components/RadioButtonGroup/stories/Disabled.js +1 -1
- package/es6/components/RangeInput/RangeInput.js +2 -2
- package/es6/components/RangeInput/StyledRangeInput.js +2 -2
- package/es6/components/RangeSelector/EdgeControl.js +1 -1
- package/es6/components/RangeSelector/RangeSelector.js +1 -1
- package/es6/components/RangeSelector/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +1 -1
- package/es6/components/RangeSelector/stories/Step.js +1 -1
- package/es6/components/RangeSelector/stories/Vertical.js +1 -1
- package/es6/components/RoutedAnchor/RoutedAnchor.js +2 -2
- package/es6/components/RoutedButton/RoutedButton.js +2 -2
- package/es6/components/Select/DefaultSelectTextInput.js +1 -1
- package/es6/components/Select/Select.js +1 -1
- package/es6/components/Select/SelectContainer.js +1 -2
- package/es6/components/Select/StyledSelect.js +5 -4
- package/es6/components/Select/stories/components/SearchBorderBox.js +1 -1
- package/es6/components/Select/stories/components/SearchInput.js +1 -1
- package/es6/components/SelectMultiple/SelectMultiple.js +1 -1
- package/es6/components/SelectMultiple/SelectMultipleContainer.js +0 -1
- package/es6/components/Sidebar/Sidebar.js +1 -1
- package/es6/components/Sidebar/stories/Labels.js +1 -1
- package/es6/components/Skeleton/Skeleton.js +1 -1
- package/es6/components/Skeleton/StyledSkeleton.js +7 -4
- package/es6/components/Skeleton/stories/GridContainer.js +1 -1
- package/es6/components/Skeleton/stories/Individual.js +1 -1
- package/es6/components/SkipLink/SkipLink.js +1 -1
- package/es6/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
- package/es6/components/Spinner/Spinner.js +1 -1
- package/es6/components/Stack/Stack.js +1 -1
- package/es6/components/Stack/StyledStack.js +3 -3
- package/es6/components/StarRating/StarRating.js +1 -1
- package/es6/components/Tab/StyledTab.js +2 -1
- package/es6/components/Tab/Tab.js +1 -3
- package/es6/components/Table/StyledTable.js +8 -8
- package/es6/components/Table/Table.js +1 -1
- package/es6/components/TableCell/TableCell.js +1 -1
- package/es6/components/Tabs/StyledTabs.js +5 -4
- package/es6/components/Tabs/Tabs.js +1 -3
- package/es6/components/Tag/Tag.js +1 -1
- package/es6/components/Text/StyledText.js +2 -6
- package/es6/components/Text/Text.js +1 -1
- package/es6/components/Text/TextSkeleton.js +1 -1
- package/es6/components/TextArea/StyledTextArea.js +2 -2
- package/es6/components/TextArea/TextArea.js +1 -1
- package/es6/components/TextInput/StyledTextInput.js +6 -6
- package/es6/components/TextInput/TextInput.js +1 -1
- package/es6/components/TextInput/stories/Simple.js +7 -2
- package/es6/components/TextInput/stories/WithTags.js +1 -1
- package/es6/components/ToggleGroup/README.md +2 -0
- package/es6/components/ToggleGroup/StyledToggleGroup.js +31 -0
- package/es6/components/ToggleGroup/ToggleGroup.js +160 -0
- package/es6/components/ToggleGroup/index.d.ts +26 -0
- package/es6/components/ToggleGroup/index.js +1 -0
- package/es6/components/ToggleGroup/propTypes.js +16 -0
- package/es6/components/ToggleGroup/stories/Controlled.js +25 -0
- package/es6/components/ToggleGroup/stories/multiple.tsx +28 -0
- package/es6/components/ToggleGroup/stories/simple.js +34 -0
- package/es6/components/Toolbar/Toolbar.js +1 -1
- package/es6/components/Video/StyledVideo.js +5 -5
- package/es6/components/Video/Video.js +1 -1
- package/es6/components/WorldMap/StyledWorldMap.js +2 -2
- package/es6/components/WorldMap/WorldMap.js +1 -1
- package/es6/components/index.d.ts +2 -0
- package/es6/components/index.js +1 -0
- package/es6/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
- package/es6/index.d.ts +1 -0
- package/es6/themes/base.d.ts +20 -1
- package/es6/themes/base.js +19 -0
- package/es6/utils/DOM.js +3 -1
- package/es6/utils/pagination.js +1 -1
- package/es6/utils/styles.js +7 -1
- package/es6/utils/useControlled.js +25 -0
- package/grommet.min.js +1 -1
- package/grommet.min.js.map +1 -1
- package/index.d.ts +1 -0
- package/package.json +39 -35
- package/themes/base.d.ts +20 -1
- package/themes/base.js +19 -0
- package/tools/release-stable.js +1 -1
- package/tools/release-styled-components-beta-stable.js +1 -1
- package/utils/DOM.js +3 -1
- package/utils/pagination.js +1 -1
- package/utils/styles.js +8 -2
- package/utils/useControlled.js +28 -0
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.ToggleGroup = void 0;
|
|
5
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
6
|
+
var _styledComponents = require("styled-components");
|
|
7
|
+
var _Box = require("../Box");
|
|
8
|
+
var _Keyboard = require("../Keyboard");
|
|
9
|
+
var _propTypes = require("./propTypes");
|
|
10
|
+
var _StyledToggleGroup = require("./StyledToggleGroup");
|
|
11
|
+
var _excluded = ["defaultValue", "multiple", "options", "onToggle", "value"];
|
|
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
|
+
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
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
16
|
+
var useControlled = function useControlled(_ref) {
|
|
17
|
+
var prop = _ref.prop,
|
|
18
|
+
defaultProp = _ref.defaultProp,
|
|
19
|
+
_ref$onChange = _ref.onChange,
|
|
20
|
+
onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange;
|
|
21
|
+
var _useState = (0, _react.useState)(defaultProp),
|
|
22
|
+
uncontrolledProp = _useState[0],
|
|
23
|
+
setUncontrolledProp = _useState[1];
|
|
24
|
+
var controlled = prop !== undefined;
|
|
25
|
+
var value = controlled ? prop : uncontrolledProp;
|
|
26
|
+
var handleChange = (0, _react.useCallback)(onChange, [onChange]);
|
|
27
|
+
var setValue = (0, _react.useCallback)(function (event) {
|
|
28
|
+
// only update internal value in uncontrolled cases
|
|
29
|
+
if (!controlled) {
|
|
30
|
+
setUncontrolledProp(event.value);
|
|
31
|
+
}
|
|
32
|
+
handleChange(event);
|
|
33
|
+
}, [controlled, setUncontrolledProp, handleChange]);
|
|
34
|
+
return [value, setValue];
|
|
35
|
+
};
|
|
36
|
+
var ToggleGroup = exports.ToggleGroup = function ToggleGroup(_ref2) {
|
|
37
|
+
var defaultValue = _ref2.defaultValue,
|
|
38
|
+
multiple = _ref2.multiple,
|
|
39
|
+
options = _ref2.options,
|
|
40
|
+
onToggle = _ref2.onToggle,
|
|
41
|
+
valueProp = _ref2.value,
|
|
42
|
+
rest = _objectWithoutPropertiesLoose(_ref2, _excluded);
|
|
43
|
+
var _useControlled = useControlled({
|
|
44
|
+
prop: valueProp,
|
|
45
|
+
defaultProp: defaultValue,
|
|
46
|
+
onChange: onToggle
|
|
47
|
+
}),
|
|
48
|
+
_useControlled$ = _useControlled[0],
|
|
49
|
+
value = _useControlled$ === void 0 ? multiple ? [] : '' : _useControlled$,
|
|
50
|
+
setValue = _useControlled[1];
|
|
51
|
+
var theme = (0, _react.useContext)(_styledComponents.ThemeContext);
|
|
52
|
+
var ref = (0, _react.useRef)();
|
|
53
|
+
var buttonRefs = (0, _react.useRef)([]);
|
|
54
|
+
var values = options == null ? void 0 : options.map(function (option) {
|
|
55
|
+
return typeof option === 'object' ? option.value : option;
|
|
56
|
+
});
|
|
57
|
+
var getFocusableIndex = (0, _react.useCallback)(function () {
|
|
58
|
+
var defaultIndex = 0;
|
|
59
|
+
if (value.length) {
|
|
60
|
+
// set earliest button that's part of value to active
|
|
61
|
+
// assume that value might not be ordered the same as options
|
|
62
|
+
defaultIndex = values.indexOf(values.find(function (option) {
|
|
63
|
+
return value.includes(option);
|
|
64
|
+
}));
|
|
65
|
+
}
|
|
66
|
+
return defaultIndex;
|
|
67
|
+
}, [value, values]);
|
|
68
|
+
var _useState2 = (0, _react.useState)(function () {
|
|
69
|
+
return getFocusableIndex();
|
|
70
|
+
}),
|
|
71
|
+
focusableIndex = _useState2[0],
|
|
72
|
+
setFocusableIndex = _useState2[1];
|
|
73
|
+
var onNext = function onNext(e) {
|
|
74
|
+
// prevent page scroll
|
|
75
|
+
e.preventDefault();
|
|
76
|
+
var nextIndex = focusableIndex + 1 <= options.length - 1 ? focusableIndex + 1 : 0;
|
|
77
|
+
setFocusableIndex(nextIndex);
|
|
78
|
+
buttonRefs.current[nextIndex].focus();
|
|
79
|
+
};
|
|
80
|
+
var onPrevious = function onPrevious(e) {
|
|
81
|
+
// prevent page scroll
|
|
82
|
+
e.preventDefault();
|
|
83
|
+
var nextIndex = focusableIndex - 1 >= 0 ? focusableIndex - 1 : options.length - 1;
|
|
84
|
+
setFocusableIndex(nextIndex);
|
|
85
|
+
buttonRefs.current[nextIndex].focus();
|
|
86
|
+
};
|
|
87
|
+
var handleToggle = function handleToggle(event, option) {
|
|
88
|
+
var adjustedEvent = event;
|
|
89
|
+
var nextValue;
|
|
90
|
+
if (!multiple) {
|
|
91
|
+
nextValue = option;
|
|
92
|
+
} else {
|
|
93
|
+
nextValue = value.includes(option) ? value.filter(function (item) {
|
|
94
|
+
return item !== option;
|
|
95
|
+
}) : [].concat(value, [option]);
|
|
96
|
+
}
|
|
97
|
+
adjustedEvent.value = nextValue;
|
|
98
|
+
setValue(adjustedEvent);
|
|
99
|
+
};
|
|
100
|
+
return /*#__PURE__*/_react["default"].createElement(_Keyboard.Keyboard, {
|
|
101
|
+
onUp: onPrevious,
|
|
102
|
+
onDown: onNext,
|
|
103
|
+
onLeft: onPrevious,
|
|
104
|
+
onRight: onNext
|
|
105
|
+
}, /*#__PURE__*/_react["default"].createElement(_Box.Box, _extends({
|
|
106
|
+
ref: ref,
|
|
107
|
+
alignSelf: "start",
|
|
108
|
+
direction: "row",
|
|
109
|
+
flex: false,
|
|
110
|
+
onBlur: function onBlur(e) {
|
|
111
|
+
if (!(ref != null && ref.current.contains(e.relatedTarget))) {
|
|
112
|
+
setFocusableIndex(getFocusableIndex());
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}, theme.toggleGroup.container, {
|
|
116
|
+
// match button rounding
|
|
117
|
+
responsive: false,
|
|
118
|
+
role: multiple ? 'group' : 'radiogroup'
|
|
119
|
+
}, rest), options == null ? void 0 : options.map(function (option, index) {
|
|
120
|
+
var label;
|
|
121
|
+
var icon;
|
|
122
|
+
var optionValue;
|
|
123
|
+
if (typeof option === 'object') {
|
|
124
|
+
icon = option.icon;
|
|
125
|
+
label = option.label;
|
|
126
|
+
optionValue = option.value;
|
|
127
|
+
} else {
|
|
128
|
+
label = option;
|
|
129
|
+
optionValue = option;
|
|
130
|
+
}
|
|
131
|
+
var active = Array.isArray(value) ? !!value.includes(optionValue) : value === optionValue;
|
|
132
|
+
var round = 0;
|
|
133
|
+
// round corners of first and last buttons to match container
|
|
134
|
+
if (typeof theme.toggleGroup.container.round === 'string' && (index === 0 || index === options.length - 1)) {
|
|
135
|
+
round = {
|
|
136
|
+
corner: index === 0 ? 'left' : 'right',
|
|
137
|
+
size: theme.toggleGroup.container.round
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
return /*#__PURE__*/_react["default"].createElement(_Box.Box, {
|
|
141
|
+
border: index < options.length - 1 ? {
|
|
142
|
+
side: 'right',
|
|
143
|
+
color: theme.toggleGroup.divider.color
|
|
144
|
+
} : undefined,
|
|
145
|
+
key: optionValue || index
|
|
146
|
+
}, /*#__PURE__*/_react["default"].createElement(_StyledToggleGroup.StyledButton, {
|
|
147
|
+
active: active,
|
|
148
|
+
"aria-pressed": multiple && active,
|
|
149
|
+
"aria-checked": !multiple && active,
|
|
150
|
+
icon: icon,
|
|
151
|
+
label: label,
|
|
152
|
+
onClick: function onClick(event) {
|
|
153
|
+
return handleToggle(event, optionValue);
|
|
154
|
+
},
|
|
155
|
+
ref: function ref(r) {
|
|
156
|
+
buttonRefs.current[index] = r;
|
|
157
|
+
},
|
|
158
|
+
role: !multiple ? 'radio' : undefined,
|
|
159
|
+
round: round,
|
|
160
|
+
tabIndex: index === focusableIndex ? '0' : '-1'
|
|
161
|
+
}));
|
|
162
|
+
})));
|
|
163
|
+
};
|
|
164
|
+
ToggleGroup.displayName = 'ToggleGroup';
|
|
165
|
+
ToggleGroup.propTypes = _propTypes.ToggleGroupPropTypes;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { BoxProps } from '../Box/index';
|
|
3
|
+
|
|
4
|
+
export interface ToggleGroupProps {
|
|
5
|
+
multiple?: boolean;
|
|
6
|
+
defaultValue?: string | string[];
|
|
7
|
+
onToggle?: (event: React.MouseEvent & { value?: string | string[] }) => void;
|
|
8
|
+
options?: (
|
|
9
|
+
| string
|
|
10
|
+
| {
|
|
11
|
+
icon?: React.ReactNode | JSX.Element;
|
|
12
|
+
label?: string | React.ReactNode;
|
|
13
|
+
value: string;
|
|
14
|
+
}
|
|
15
|
+
)[];
|
|
16
|
+
value?: string | string[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface ToggleGroupExtendedProps
|
|
20
|
+
extends ToggleGroupProps,
|
|
21
|
+
BoxProps,
|
|
22
|
+
Omit<JSX.IntrinsicElements['div'], keyof ToggleGroupProps> {}
|
|
23
|
+
|
|
24
|
+
declare const ToggleGroup: React.FC<ToggleGroupExtendedProps>;
|
|
25
|
+
|
|
26
|
+
export { ToggleGroup };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.ToggleGroupPropTypes = void 0;
|
|
5
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
6
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
7
|
+
var PropType = {};
|
|
8
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
9
|
+
PropType = {
|
|
10
|
+
defaultValue: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].arrayOf(_propTypes["default"].string)]),
|
|
11
|
+
multiple: _propTypes["default"].bool,
|
|
12
|
+
onToggle: _propTypes["default"].func,
|
|
13
|
+
options: _propTypes["default"].oneOfType([_propTypes["default"].arrayOf(_propTypes["default"].string), _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
|
14
|
+
icon: _propTypes["default"].oneOfType([_propTypes["default"].element, _propTypes["default"].node]),
|
|
15
|
+
label: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].element]),
|
|
16
|
+
value: _propTypes["default"].string
|
|
17
|
+
}))]),
|
|
18
|
+
value: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].arrayOf(_propTypes["default"].string)])
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
var ToggleGroupPropTypes = exports.ToggleGroupPropTypes = PropType;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = exports.Controlled = void 0;
|
|
5
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
6
|
+
var _grommet = require("grommet");
|
|
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); }
|
|
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; }
|
|
9
|
+
var Controlled = exports.Controlled = function Controlled() {
|
|
10
|
+
var _useState = (0, _react.useState)(['Option 2']),
|
|
11
|
+
value = _useState[0],
|
|
12
|
+
setValue = _useState[1];
|
|
13
|
+
return /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
|
|
14
|
+
direction: "row",
|
|
15
|
+
gap: "xlarge",
|
|
16
|
+
overflow: "auto"
|
|
17
|
+
}, /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
|
|
18
|
+
gap: "large",
|
|
19
|
+
pad: "large"
|
|
20
|
+
}, /*#__PURE__*/_react["default"].createElement(_grommet.Text, null, "In multiple selection mode, enforce at least one selection."), /*#__PURE__*/_react["default"].createElement(_grommet.ToggleGroup, {
|
|
21
|
+
options: ['Option 1', 'Option 2', 'Option 3'],
|
|
22
|
+
value: value,
|
|
23
|
+
onToggle: function onToggle(e) {
|
|
24
|
+
if (e.value.length) setValue(e.value);
|
|
25
|
+
},
|
|
26
|
+
multiple: true
|
|
27
|
+
})));
|
|
28
|
+
};
|
|
29
|
+
var _default = exports["default"] = {
|
|
30
|
+
title: 'Controls/ToggleGroup/Controlled'
|
|
31
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Box, ToggleGroup } from 'grommet';
|
|
3
|
+
import { Bold, Italic, Underline } from 'grommet-icons';
|
|
4
|
+
|
|
5
|
+
const options = [
|
|
6
|
+
{
|
|
7
|
+
icon: <Bold a11yTitle="Bold" />,
|
|
8
|
+
value: 'bold',
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
icon: <Italic a11yTitle="Italic" />,
|
|
12
|
+
value: 'italic',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
icon: <Underline a11yTitle="Underline" />,
|
|
16
|
+
value: 'underline',
|
|
17
|
+
},
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
export const Multiple = () => (
|
|
21
|
+
<Box pad="large">
|
|
22
|
+
<ToggleGroup a11yTitle="Format text" options={options} multiple />
|
|
23
|
+
</Box>
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
export default {
|
|
27
|
+
title: 'Controls/ToggleGroup/Multiple',
|
|
28
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = exports.Simple = void 0;
|
|
5
|
+
var _react = _interopRequireDefault(require("react"));
|
|
6
|
+
var _grommet = require("grommet");
|
|
7
|
+
var _grommetIcons = require("grommet-icons");
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
9
|
+
var options = [{
|
|
10
|
+
icon: /*#__PURE__*/_react["default"].createElement(_grommetIcons.List, {
|
|
11
|
+
a11yTitle: "List view"
|
|
12
|
+
}),
|
|
13
|
+
value: 'list'
|
|
14
|
+
}, {
|
|
15
|
+
icon: /*#__PURE__*/_react["default"].createElement(_grommetIcons.Table, {
|
|
16
|
+
a11yTitle: "Map view"
|
|
17
|
+
}),
|
|
18
|
+
value: 'table'
|
|
19
|
+
}, {
|
|
20
|
+
icon: /*#__PURE__*/_react["default"].createElement(_grommetIcons.MapLocation, {
|
|
21
|
+
a11yTitle: "Map view"
|
|
22
|
+
}),
|
|
23
|
+
value: 'map'
|
|
24
|
+
}];
|
|
25
|
+
var Simple = exports.Simple = function Simple() {
|
|
26
|
+
return /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
|
|
27
|
+
gap: "large",
|
|
28
|
+
pad: "large"
|
|
29
|
+
}, /*#__PURE__*/_react["default"].createElement(_grommet.ToggleGroup, {
|
|
30
|
+
a11yTitle: "Choose view",
|
|
31
|
+
options: options,
|
|
32
|
+
defaultValue: "list"
|
|
33
|
+
}));
|
|
34
|
+
};
|
|
35
|
+
var _default = exports["default"] = {
|
|
36
|
+
title: 'Controls/ToggleGroup/Simple'
|
|
37
|
+
};
|
|
@@ -9,9 +9,9 @@ var _propTypes = require("./propTypes");
|
|
|
9
9
|
var _responsive = require("../../utils/responsive");
|
|
10
10
|
var _excluded = ["children"];
|
|
11
11
|
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); }
|
|
12
|
-
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 &&
|
|
12
|
+
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; }
|
|
13
13
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
14
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
14
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
15
15
|
var defaultLayoutProps = {
|
|
16
16
|
direction: 'row',
|
|
17
17
|
align: 'start',
|
|
@@ -6,7 +6,7 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
|
6
6
|
var _utils = require("../../utils");
|
|
7
7
|
var _defaultProps = require("../../default-props");
|
|
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
|
-
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 &&
|
|
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
|
var FIT_MAP = {
|
|
11
11
|
cover: 'cover',
|
|
12
12
|
contain: 'contain'
|
|
@@ -16,7 +16,7 @@ var fitStyle = (0, _styledComponents.css)(["flex:1 1;min-height:0;object-fit:",
|
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
// z-index is for Safari so controls aren't hidden
|
|
19
|
-
var StyledVideo = exports.StyledVideo = _styledComponents["default"].video.withConfig({
|
|
19
|
+
var StyledVideo = exports.StyledVideo = _styledComponents["default"].video.withConfig(_utils.styledComponentsConfig).withConfig({
|
|
20
20
|
displayName: "StyledVideo",
|
|
21
21
|
componentId: "sc-w4v8h9-0"
|
|
22
22
|
})(["max-width:100%;z-index:1;", "::cue{background:", ";}", ";"], function (props) {
|
|
@@ -28,7 +28,7 @@ var StyledVideo = exports.StyledVideo = _styledComponents["default"].video.withC
|
|
|
28
28
|
});
|
|
29
29
|
StyledVideo.defaultProps = {};
|
|
30
30
|
Object.setPrototypeOf(StyledVideo.defaultProps, _defaultProps.defaultProps);
|
|
31
|
-
var StyledVideoContainer = exports.StyledVideoContainer = _styledComponents["default"].div.withConfig({
|
|
31
|
+
var StyledVideoContainer = exports.StyledVideoContainer = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).withConfig({
|
|
32
32
|
displayName: "StyledVideo__StyledVideoContainer",
|
|
33
33
|
componentId: "sc-w4v8h9-1"
|
|
34
34
|
})(["flex:1 1;display:flex;flex-direction:column;overflow:hidden;position:relative;", ";&:focus{", "}"], _utils.genericStyles, (0, _utils.focusStyle)());
|
|
@@ -37,7 +37,7 @@ Object.setPrototypeOf(StyledVideoContainer.defaultProps, _defaultProps.defaultPr
|
|
|
37
37
|
|
|
38
38
|
// z-index is for Safari so controls aren't hidden
|
|
39
39
|
var positionStyle = (0, _styledComponents.css)(["position:absolute;left:0;right:0;bottom:0;z-index:1;"]);
|
|
40
|
-
var StyledVideoControls = exports.StyledVideoControls = _styledComponents["default"].div.withConfig({
|
|
40
|
+
var StyledVideoControls = exports.StyledVideoControls = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).withConfig({
|
|
41
41
|
displayName: "StyledVideo__StyledVideoControls",
|
|
42
42
|
componentId: "sc-w4v8h9-2"
|
|
43
43
|
})(["flex:0 0;", " opacity:0;transition:opacity 0.3s;", ";"], function (props) {
|
|
@@ -54,7 +54,7 @@ var headStyle = (0, _styledComponents.css)(["::after{content:'';height:100%;widt
|
|
|
54
54
|
}, function (props) {
|
|
55
55
|
return props.value + "%";
|
|
56
56
|
});
|
|
57
|
-
var StyledVideoScrubber = exports.StyledVideoScrubber = _styledComponents["default"].div.withConfig({
|
|
57
|
+
var StyledVideoScrubber = exports.StyledVideoScrubber = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).withConfig({
|
|
58
58
|
displayName: "StyledVideo__StyledVideoScrubber",
|
|
59
59
|
componentId: "sc-w4v8h9-3"
|
|
60
60
|
})(["cursor:pointer;width:100%;height:100%;", ";&:focus{", "}"], function (props) {
|
|
@@ -20,9 +20,9 @@ var _MessageContext = require("../../contexts/MessageContext");
|
|
|
20
20
|
var _propTypes = require("./propTypes");
|
|
21
21
|
var _excluded = ["alignSelf", "autoPlay", "children", "controls", "gridArea", "loop", "margin", "messages", "mute", "onDurationChange", "onEnded", "onPause", "onPlay", "onTimeUpdate", "onVolumeChange", "skipInterval"];
|
|
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
|
-
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 &&
|
|
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() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
25
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
26
26
|
// Split the volume control into 6 segments. Empirically determined.
|
|
27
27
|
var VOLUME_STEP = 0.166667;
|
|
28
28
|
var formatTime = function formatTime(time) {
|
|
@@ -20,7 +20,7 @@ var fillStyle = function fillStyle(fillProp) {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
// undefined fillProp has width for backwards compatibility
|
|
23
|
-
var StyledWorldMap = exports.StyledWorldMap = _styledComponents["default"].svg.withConfig({
|
|
23
|
+
var StyledWorldMap = exports.StyledWorldMap = _styledComponents["default"].svg.withConfig(_utils.styledComponentsConfig).withConfig({
|
|
24
24
|
displayName: "StyledWorldMap",
|
|
25
25
|
componentId: "sc-had4c3-0"
|
|
26
26
|
})(["", " ", " ", ";"], _utils.genericStyles, function (props) {
|
|
@@ -14,9 +14,9 @@ var _excluded = ["fill", "color", "continents", "hoverColor", "onSelectPlace", "
|
|
|
14
14
|
_excluded3 = ["color", "onClick", "onHover"],
|
|
15
15
|
_excluded4 = ["color", "coords", "content", "dropProps", "key", "name", "onClick", "onHover"];
|
|
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
|
-
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 &&
|
|
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() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
19
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
20
20
|
// The graphic is drawn as a rectangular grid using coordinates spaced
|
|
21
21
|
// by FACTOR pixels.
|
|
22
22
|
var FACTOR = 10;
|
package/components/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export * from './Data';
|
|
|
21
21
|
export * from './DataChart';
|
|
22
22
|
export * from './DataFilter';
|
|
23
23
|
export * from './DataFilters';
|
|
24
|
+
export * from './DataClearFilters';
|
|
24
25
|
export * from './DataSearch';
|
|
25
26
|
export * from './DataSort';
|
|
26
27
|
export * from './DataSummary';
|
|
@@ -88,6 +89,7 @@ export * from './TextArea';
|
|
|
88
89
|
export * from './TextInput';
|
|
89
90
|
export * from './ThumbsRating';
|
|
90
91
|
export * from './Tip';
|
|
92
|
+
export * from './ToggleGroup';
|
|
91
93
|
export * from './Toolbar';
|
|
92
94
|
export * from './Video';
|
|
93
95
|
export * from './WorldMap';
|
package/components/index.js
CHANGED
|
@@ -553,6 +553,12 @@ Object.keys(_Toolbar).forEach(function (key) {
|
|
|
553
553
|
if (key in exports && exports[key] === _Toolbar[key]) return;
|
|
554
554
|
exports[key] = _Toolbar[key];
|
|
555
555
|
});
|
|
556
|
+
var _ToggleGroup = require("./ToggleGroup");
|
|
557
|
+
Object.keys(_ToggleGroup).forEach(function (key) {
|
|
558
|
+
if (key === "default" || key === "__esModule") return;
|
|
559
|
+
if (key in exports && exports[key] === _ToggleGroup[key]) return;
|
|
560
|
+
exports[key] = _ToggleGroup[key];
|
|
561
|
+
});
|
|
556
562
|
var _ThumbsRating = require("./ThumbsRating");
|
|
557
563
|
Object.keys(_ThumbsRating).forEach(function (key) {
|
|
558
564
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -4,7 +4,7 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.useAnalytics = exports.AnalyticsProvider = exports.AnalyticsContext = void 0;
|
|
5
5
|
var _react = _interopRequireWildcard(require("react"));
|
|
6
6
|
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); }
|
|
7
|
-
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 &&
|
|
7
|
+
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; }
|
|
8
8
|
var AnalyticsContext = exports.AnalyticsContext = /*#__PURE__*/_react["default"].createContext(function () {});
|
|
9
9
|
var useAnalytics = exports.useAnalytics = function useAnalytics() {
|
|
10
10
|
return (0, _react.useContext)(AnalyticsContext);
|
|
@@ -7,7 +7,7 @@ var _grommetIcons = require("grommet-icons");
|
|
|
7
7
|
var _themes = require("grommet/themes");
|
|
8
8
|
var _grommet = require("grommet");
|
|
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
|
-
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 &&
|
|
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
11
|
// used only for the grommet's font
|
|
12
12
|
|
|
13
13
|
var message = "Thank you for clicking the Announce Button,\nthis announcement is being broadcast on the Button's click.";
|
|
@@ -9,7 +9,7 @@ var _grommet = require("grommet");
|
|
|
9
9
|
var _excluded = ["children", "areas"];
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
11
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
12
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
12
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
13
13
|
var customBreakpoints = (0, _utils.deepMerge)(_themes.grommet, {
|
|
14
14
|
global: {
|
|
15
15
|
breakpoints: {
|
|
@@ -7,7 +7,7 @@ var _themes = require("grommet/themes");
|
|
|
7
7
|
var _utils = require("grommet/utils");
|
|
8
8
|
var _grommet = require("grommet");
|
|
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
|
-
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 &&
|
|
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
11
|
var customTheme = (0, _utils.deepMerge)(_themes.grommet, {
|
|
12
12
|
global: {
|
|
13
13
|
focus: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["id"],
|
|
2
2
|
_excluded2 = ["color"];
|
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
5
5
|
import React, { useState } from 'react';
|
|
6
6
|
import { Accordion, AccordionPanel, Anchor, Box, Button, Calendar, Chart, CheckBox, Clock, DataTable, Diagram, Distribution, FormField, Grid, Heading, MaskedInput, Menu, Meter, Paragraph, RadioButtonGroup, RangeInput, RangeSelector, Select, Stack, Tab, Tabs, Text, TextArea, TextInput, Video } from 'grommet';
|
|
7
7
|
import { FormNext } from "grommet-icons/es6/icons/FormNext";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["activeIndex", "animate", "children", "level", "multiple", "onActive"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
3
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
4
4
|
import React, { Children, forwardRef, useCallback, useState } from 'react';
|
|
5
5
|
import { AccordionPropTypes } from './propTypes';
|
|
6
6
|
import { Box } from '../Box';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["animate", "multiple"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
3
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { SubtractCircle } from "grommet-icons/es6/icons/SubtractCircle";
|
|
6
6
|
import { AddCircle } from "grommet-icons/es6/icons/AddCircle";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var _excluded = ["animate", "multiple"];
|
|
2
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
2
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Accordion, AccordionPanel, Box } from 'grommet';
|
|
5
5
|
export var Simple = function Simple(props) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["children", "header", "label", "onClick", "onMouseOut", "onMouseOver", "onFocus", "onBlur"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
3
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
4
4
|
import React, { forwardRef, useContext, useMemo, useState } from 'react';
|
|
5
5
|
import { ThemeContext } from 'styled-components';
|
|
6
6
|
import { defaultProps } from '../../default-props';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["a11yTitle", "aria-label", "children", "color", "disabled", "gap", "href", "icon", "label", "onBlur", "onClick", "onFocus", "reverse", "size"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
3
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
4
4
|
import React, { cloneElement, forwardRef, useCallback, useContext, useEffect, useState } from 'react';
|
|
5
5
|
import { ThemeContext } from 'styled-components';
|
|
6
6
|
import { defaultProps } from '../../default-props';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
|
-
import { focusStyle, genericStyles, normalizeColor } from '../../utils';
|
|
2
|
+
import { focusStyle, genericStyles, normalizeColor, styledComponentsConfig } from '../../utils';
|
|
3
3
|
import { defaultProps } from '../../default-props';
|
|
4
4
|
var disabledStyle = "\n opacity: 0.3;\n cursor: default;\n text-decoration: none;\n";
|
|
5
5
|
var sizeStyle = function sizeStyle(props) {
|
|
@@ -10,13 +10,7 @@ var sizeStyle = function sizeStyle(props) {
|
|
|
10
10
|
}
|
|
11
11
|
return css(["font-size:inherit;line-height:inherit;"]);
|
|
12
12
|
};
|
|
13
|
-
var StyledAnchor = styled.a.withConfig({
|
|
14
|
-
// prevent custom props from bleeding into DOM
|
|
15
|
-
// https://styled-components.com/docs/api#shouldforwardprop
|
|
16
|
-
shouldForwardProp: function shouldForwardProp(prop, defaultValidatorFn) {
|
|
17
|
-
return !['as', 'colorProp', 'focus', 'hasIcon', 'hasLabel', 'reverse'].includes(prop) && defaultValidatorFn(prop);
|
|
18
|
-
}
|
|
19
|
-
}).withConfig({
|
|
13
|
+
var StyledAnchor = styled.a.withConfig(styledComponentsConfig).withConfig({
|
|
20
14
|
displayName: "StyledAnchor",
|
|
21
15
|
componentId: "sc-1rp7lwl-0"
|
|
22
16
|
})(["box-sizing:border-box;display:inline-flex;", " color:", ";", " text-decoration:", ";cursor:pointer;", " ", " ", " ", " ", " ", ""], function (props) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["a11yTitle", "aria-label", "align", "children", "height", "justify", "round", "size", "src", "width"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
3
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
4
4
|
import React, { useCallback, useContext, useMemo } from 'react';
|
|
5
5
|
import { ThemeContext } from 'styled-components';
|
|
6
6
|
import { Image } from '../Image';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["a11yTitle", "background", "border", "children", "cssGap", "direction", "elevation", "fill", "gap", "kind", "onBlur", "onClick", "onFocus", "overflow", "responsive", "tag", "as", "wrap", "width", "height", "tabIndex", "skeleton"],
|
|
2
2
|
_excluded2 = ["colors", "size"];
|
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
5
5
|
import React, { Children, forwardRef, useContext, useEffect, useMemo, useState } from 'react';
|
|
6
6
|
import { ThemeContext } from 'styled-components';
|
|
7
7
|
import { defaultProps } from '../../default-props';
|