grommet 2.23.0 → 2.25.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 +2 -7
- package/components/Accordion/Accordion.js +1 -1
- package/components/Accordion/propTypes.js +1 -1
- package/components/Accordion/stories/CustomThemed/Custom.js +3 -2
- package/components/AccordionPanel/AccordionPanel.js +2 -1
- package/components/Anchor/Anchor.js +3 -4
- package/components/Anchor/propTypes.js +1 -1
- package/components/Avatar/Avatar.js +1 -1
- package/components/Box/Box.js +1 -1
- package/components/Box/StyledBox.js +1 -1
- package/components/Box/propTypes.js +1 -1
- package/components/Button/Button.js +1 -1
- package/components/Button/propTypes.js +2 -2
- package/components/Button/stories/Basic.js +1 -1
- package/components/Button/stories/Fill.js +1 -1
- package/components/Button/stories/Kind.js +1 -1
- package/components/Calendar/Calendar.js +233 -293
- package/components/Calendar/index.d.ts +2 -2
- package/components/Calendar/propTypes.js +1 -1
- package/components/Calendar/stories/ShowAdjacentDays.js +1 -1
- package/components/Calendar/utils.js +16 -129
- package/components/Card/Card.js +1 -1
- package/components/Card/stories/CustomThemed/Clickable.js +1 -1
- package/components/Card/stories/CustomThemed/RichFooter.js +1 -1
- package/components/Card/stories/CustomThemed/Themed.js +1 -1
- package/components/CardBody/CardBody.js +1 -1
- package/components/CardFooter/CardFooter.js +1 -1
- package/components/CardHeader/CardHeader.js +1 -1
- package/components/Carousel/Carousel.js +1 -1
- package/components/Carousel/propTypes.js +1 -1
- package/components/Carousel/stories/CustomThemed/Custom.js +1 -1
- package/components/Chart/Chart.js +1 -1
- package/components/Chart/calcs.js +44 -27
- package/components/Chart/index.d.ts +28 -2
- package/components/Chart/propTypes.js +1 -1
- package/components/Chart/stories/Rich.js +1 -1
- package/components/Chart/stories/Scan.js +11 -9
- package/components/Chart/stories/Window.js +1 -1
- package/components/Chart/stories/data.js +16 -17
- package/components/CheckBox/CheckBox.js +4 -3
- package/components/CheckBox/stories/CustomThemed/Custom.js +1 -1
- package/components/CheckBox/stories/CustomThemed/CustomToggle.js +1 -1
- package/components/CheckBox/stories/NoLabel.js +1 -1
- package/components/CheckBox/stories/Simple.js +1 -1
- package/components/CheckBoxGroup/CheckBoxGroup.js +1 -1
- package/components/CheckBoxGroup/index.d.ts +1 -3
- package/components/Clock/Analog.js +1 -1
- package/components/Clock/Clock.js +1 -1
- package/components/Clock/Digital.js +1 -1
- package/components/Clock/propTypes.js +1 -1
- package/components/Collapsible/stories/Nested.js +1 -1
- package/components/Collapsible/stories/Simple.js +1 -1
- package/components/DataChart/DataChart.js +11 -42
- package/components/DataChart/Detail.js +18 -11
- package/components/DataChart/Legend.js +1 -1
- package/components/DataChart/Swatch.js +64 -23
- package/components/DataChart/XAxis.js +1 -1
- package/components/DataChart/YGuide.js +1 -1
- package/components/DataChart/propTypes.js +1 -1
- package/components/DataChart/stories/Legend.js +6 -2
- package/components/DataChart/stories/Pad.js +54 -0
- package/components/DataChart/utils.js +11 -1
- package/components/DataTable/Body.js +11 -5
- package/components/DataTable/Cell.js +1 -1
- package/components/DataTable/DataTable.js +1 -1
- package/components/DataTable/ExpanderCell.js +1 -1
- package/components/DataTable/Footer.js +1 -1
- package/components/DataTable/GroupedBody.js +1 -1
- package/components/DataTable/Header.js +1 -1
- package/components/DataTable/Resizer.js +1 -1
- package/components/DataTable/Sorter.js +1 -1
- package/components/DataTable/propTypes.js +1 -1
- package/components/DataTable/stories/Controlled.js +1 -1
- package/components/DataTable/stories/ControlledGrouped.js +1 -1
- package/components/DataTable/stories/CustomThemed/Fill.js +1 -1
- package/components/DataTable/stories/GroupedOnSelect.js +1 -1
- package/components/DataTable/stories/OnUpdate.js +1 -1
- package/components/DataTable/stories/Served.js +1 -1
- package/components/DataTable/stories/Sort.js +1 -1
- package/components/DataTable/stories/SpaceX.js +6 -4
- package/components/DataTable/stories/SpaceXUngrouped.js +4 -2
- package/components/DataTable/stories/Tunable.js +1 -1
- package/components/DataTable/stories/data.js +1 -1
- package/components/DataTable/stories/rowDetails.js +1 -1
- package/components/DateInput/DateInput.js +89 -92
- package/components/DateInput/index.d.ts +1 -0
- package/components/DateInput/propTypes.js +1 -0
- package/components/DateInput/stories/Format.js +14 -1
- package/components/DateInput/utils.js +31 -6
- package/components/Diagram/Diagram.js +1 -1
- package/components/Diagram/stories/Animated.js +1 -1
- package/components/Diagram/stories/Progressing.js +1 -1
- package/components/Distribution/Distribution.js +1 -1
- package/components/Distribution/propTypes.js +1 -1
- package/components/Drop/Drop.js +1 -1
- package/components/Drop/DropContainer.js +7 -3
- package/components/DropButton/DropButton.js +1 -1
- package/components/DropButton/propTypes.js +1 -1
- package/components/FileInput/FileInput.js +28 -9
- package/components/FileInput/StyledFileInput.js +1 -1
- package/components/FileInput/index.d.ts +6 -1
- package/components/FileInput/stories/Multiple.js +1 -0
- package/components/FocusedContainer.js +1 -1
- package/components/Footer/Footer.js +1 -1
- package/components/Footer/stories/DoubleFooter.js +1 -1
- package/components/Footer/stories/Sitemap.js +1 -1
- package/components/Form/Form.js +7 -2
- package/components/Form/stories/ArrayOfFormFields.js +1 -1
- package/components/Form/stories/CustomThemed/FieldSpacingOptions.js +1 -1
- package/components/Form/stories/HelpAndError.js +1 -1
- package/components/FormField/FormField.js +26 -29
- package/components/Grid/Grid.js +5 -3
- package/components/Grid/README.md +0 -2
- package/components/Grid/index.d.ts +9 -3
- package/components/Grid/propTypes.js +1 -1
- package/components/Grid/stories/CustomThemed/Responsive.js +1 -1
- package/components/Grid/stories/typescript/App.tsx +42 -48
- package/components/Grommet/Grommet.js +1 -1
- package/components/Header/Header.js +1 -1
- package/components/Heading/Heading.js +1 -1
- package/components/Heading/propTypes.js +1 -1
- package/components/Image/Image.js +5 -3
- package/components/Image/propTypes.js +1 -1
- package/components/InfiniteScroll/stories/Basics.js +1 -1
- package/components/InfiniteScroll/stories/ClassChildren.js +1 -1
- package/components/InfiniteScroll/stories/Marker.js +1 -1
- package/components/InfiniteScroll/stories/Show.js +1 -1
- package/components/InfiniteScroll/stories/ShowAfter.js +1 -1
- package/components/InfiniteScroll/stories/ShowBefore.js +1 -1
- package/components/Layer/Layer.js +2 -2
- package/components/Layer/LayerContainer.js +7 -3
- package/components/List/List.js +104 -41
- package/components/List/index.d.ts +3 -1
- package/components/List/propTypes.js +4 -2
- package/components/List/stories/Disabled.js +33 -0
- package/components/Main/Main.js +1 -1
- package/components/Markdown/Markdown.js +1 -1
- package/components/MaskedInput/MaskedInput.js +37 -28
- package/components/Menu/Menu.js +105 -61
- package/components/Menu/index.d.ts +2 -2
- package/components/Menu/propTypes.js +2 -2
- package/components/Menu/stories/Grouped.js +52 -0
- package/components/Meter/Bar.js +1 -1
- package/components/Meter/Circle.js +5 -3
- package/components/Meter/Meter.js +1 -1
- package/components/Meter/propTypes.js +1 -1
- package/components/NameValueList/NameValueList.js +1 -1
- package/components/NameValuePair/NameValuePair.js +1 -1
- package/components/Nav/Nav.js +1 -1
- package/components/Nav/stories/CustomThemed/JustifySidebar.js +1 -1
- package/components/Nav/stories/Sidebar.js +1 -1
- package/components/Notification/Notification.js +18 -9
- package/components/Notification/index.d.ts +2 -1
- package/components/Notification/propTypes.js +2 -1
- package/components/Page/Page.js +1 -1
- package/components/PageContent/PageContent.js +1 -1
- package/components/PageHeader/PageHeader.js +80 -0
- package/components/PageHeader/index.d.ts +26 -0
- package/components/PageHeader/index.js +8 -0
- package/components/PageHeader/propTypes.js +30 -0
- package/components/PageHeader/stories/Custom.js +47 -0
- package/components/PageHeader/stories/MultipleActions.js +79 -0
- package/components/PageHeader/stories/Responsive.js +37 -0
- package/components/PageHeader/stories/Simple.js +36 -0
- package/components/Pagination/PageControl.js +1 -1
- package/components/Pagination/Pagination.js +1 -1
- package/components/Pagination/propTypes.js +1 -1
- package/components/Paragraph/Paragraph.js +1 -1
- package/components/Paragraph/StyledParagraph.js +7 -1
- package/components/Paragraph/index.d.ts +1 -0
- package/components/Paragraph/propTypes.js +2 -1
- package/components/Paragraph/stories/MaxLines.js +37 -0
- package/components/RadioButton/RadioButton.js +1 -1
- package/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/components/RadioButtonGroup/index.d.ts +2 -1
- package/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +1 -1
- package/components/RadioButtonGroup/stories/Disabled.js +1 -1
- package/components/RangeInput/RangeInput.js +1 -1
- package/components/RangeSelector/EdgeControl.js +1 -1
- package/components/RangeSelector/RangeSelector.js +1 -1
- package/components/RangeSelector/stories/CustomThemed/Custom.js +1 -1
- package/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +1 -1
- package/components/RangeSelector/stories/Step.js +1 -1
- package/components/RangeSelector/stories/Vertical.js +1 -1
- package/components/RoutedAnchor/RoutedAnchor.js +2 -2
- package/components/RoutedButton/RoutedButton.js +2 -2
- package/components/Select/Select.js +11 -32
- package/components/Select/SelectContainer.js +34 -37
- package/components/Select/propTypes.js +1 -1
- package/components/Select/stories/components/SearchBorderBox.js +1 -1
- package/components/Select/stories/components/SearchInput.js +1 -1
- package/components/Sidebar/Sidebar.js +1 -1
- package/components/Sidebar/stories/Labels.js +1 -1
- package/components/SkipLink/SkipLink.js +1 -1
- package/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
- package/components/Spinner/Spinner.js +1 -1
- package/components/Stack/Stack.js +1 -1
- package/components/Stack/propTypes.js +1 -1
- package/components/Tab/StyledTab.js +2 -2
- package/components/Tab/Tab.js +35 -17
- package/components/Table/StyledTable.js +1 -1
- package/components/Table/propTypes.js +1 -1
- package/components/TableBody/TableBody.js +1 -1
- package/components/TableCell/TableCell.js +1 -1
- package/components/TableFooter/TableFooter.js +1 -1
- package/components/TableHeader/TableHeader.js +1 -1
- package/components/TableRow/TableRow.js +1 -1
- package/components/Tabs/Tabs.js +233 -11
- package/components/Tabs/propTypes.js +1 -1
- package/components/Tabs/stories/Responsive.js +18 -0
- package/components/Tag/Tag.js +1 -1
- package/components/Tag/propTypes.js +1 -1
- package/components/Text/Text.js +1 -1
- package/components/Text/propTypes.js +1 -1
- package/components/TextArea/TextArea.js +1 -1
- package/components/TextArea/stories/NonResizable.js +1 -1
- package/components/TextArea/stories/Simple.js +1 -1
- package/components/TextInput/TextInput.js +33 -4
- package/components/TextInput/stories/DefaultSuggestion.js +1 -0
- package/components/TextInput/stories/InsideFormField.js +1 -1
- package/components/TextInput/stories/Suggestions.js +1 -0
- package/components/TextInput/stories/WithTags.js +1 -1
- package/components/Tip/Tip.js +22 -29
- package/components/Video/StyledVideo.js +2 -2
- package/components/Video/Video.js +101 -47
- package/components/Video/index.d.ts +1 -0
- package/components/Video/propTypes.js +2 -2
- package/components/Video/stories/typescript/ControlsBelow.tsx +6 -2
- package/components/WorldMap/WorldMap.js +1 -1
- package/components/WorldMap/propTypes.js +1 -1
- package/components/WorldMap/stories/Places.js +1 -1
- package/components/index.d.ts +1 -0
- package/components/index.js +8 -0
- package/contexts/AnnounceContext/stories/Assertive.js +1 -1
- package/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
- package/es6/all/stories/AllComponents.js +2 -7
- package/es6/components/Accordion/Accordion.js +1 -1
- package/es6/components/Accordion/propTypes.js +1 -1
- package/es6/components/Accordion/stories/CustomThemed/Custom.js +3 -2
- package/es6/components/AccordionPanel/AccordionPanel.js +2 -1
- package/es6/components/Anchor/Anchor.js +3 -4
- package/es6/components/Anchor/propTypes.js +1 -1
- package/es6/components/Avatar/Avatar.js +1 -1
- package/es6/components/Box/Box.js +1 -1
- package/es6/components/Box/StyledBox.js +1 -1
- package/es6/components/Box/propTypes.js +1 -1
- package/es6/components/Button/Button.js +1 -1
- package/es6/components/Button/propTypes.js +2 -2
- package/es6/components/Button/stories/Basic.js +1 -1
- package/es6/components/Button/stories/Fill.js +1 -1
- package/es6/components/Button/stories/Kind.js +1 -1
- package/es6/components/Calendar/Calendar.js +231 -293
- package/es6/components/Calendar/index.d.ts +2 -2
- package/es6/components/Calendar/propTypes.js +1 -1
- package/es6/components/Calendar/stories/ShowAdjacentDays.js +1 -1
- package/es6/components/Calendar/utils.js +13 -114
- package/es6/components/Card/Card.js +1 -1
- package/es6/components/Card/stories/CustomThemed/Clickable.js +1 -1
- package/es6/components/Card/stories/CustomThemed/RichFooter.js +1 -1
- package/es6/components/Card/stories/CustomThemed/Themed.js +1 -1
- package/es6/components/CardBody/CardBody.js +1 -1
- package/es6/components/CardFooter/CardFooter.js +1 -1
- package/es6/components/CardHeader/CardHeader.js +1 -1
- package/es6/components/Carousel/Carousel.js +1 -1
- package/es6/components/Carousel/propTypes.js +1 -1
- package/es6/components/Carousel/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/Chart/Chart.js +1 -1
- package/es6/components/Chart/calcs.js +44 -27
- package/es6/components/Chart/index.d.ts +28 -2
- package/es6/components/Chart/propTypes.js +1 -1
- package/es6/components/Chart/stories/Rich.js +1 -1
- package/es6/components/Chart/stories/Scan.js +10 -9
- package/es6/components/Chart/stories/Window.js +1 -1
- package/es6/components/Chart/stories/data.js +16 -17
- package/es6/components/CheckBox/CheckBox.js +4 -3
- package/es6/components/CheckBox/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/CheckBox/stories/CustomThemed/CustomToggle.js +1 -1
- package/es6/components/CheckBox/stories/NoLabel.js +1 -1
- package/es6/components/CheckBox/stories/Simple.js +1 -1
- package/es6/components/CheckBoxGroup/CheckBoxGroup.js +1 -1
- package/es6/components/CheckBoxGroup/index.d.ts +1 -3
- package/es6/components/Clock/Analog.js +1 -1
- package/es6/components/Clock/Clock.js +1 -1
- package/es6/components/Clock/Digital.js +1 -1
- package/es6/components/Clock/propTypes.js +1 -1
- package/es6/components/Collapsible/stories/Nested.js +1 -1
- package/es6/components/Collapsible/stories/Simple.js +1 -1
- package/es6/components/DataChart/DataChart.js +13 -44
- package/es6/components/DataChart/Detail.js +20 -10
- package/es6/components/DataChart/Legend.js +1 -1
- package/es6/components/DataChart/Swatch.js +64 -23
- package/es6/components/DataChart/XAxis.js +1 -1
- package/es6/components/DataChart/YGuide.js +1 -1
- package/es6/components/DataChart/propTypes.js +1 -1
- package/es6/components/DataChart/stories/Legend.js +6 -2
- package/es6/components/DataChart/stories/Pad.js +42 -0
- package/es6/components/DataChart/utils.js +7 -0
- package/es6/components/DataTable/Body.js +10 -5
- package/es6/components/DataTable/Cell.js +1 -1
- package/es6/components/DataTable/DataTable.js +1 -1
- package/es6/components/DataTable/ExpanderCell.js +1 -1
- package/es6/components/DataTable/Footer.js +1 -1
- package/es6/components/DataTable/GroupedBody.js +1 -1
- package/es6/components/DataTable/Header.js +1 -1
- package/es6/components/DataTable/Resizer.js +1 -1
- package/es6/components/DataTable/Sorter.js +1 -1
- package/es6/components/DataTable/propTypes.js +1 -1
- package/es6/components/DataTable/stories/Controlled.js +1 -1
- package/es6/components/DataTable/stories/ControlledGrouped.js +1 -1
- package/es6/components/DataTable/stories/CustomThemed/Fill.js +1 -1
- package/es6/components/DataTable/stories/GroupedOnSelect.js +1 -1
- package/es6/components/DataTable/stories/OnUpdate.js +1 -1
- package/es6/components/DataTable/stories/Served.js +1 -1
- package/es6/components/DataTable/stories/Sort.js +1 -1
- package/es6/components/DataTable/stories/SpaceX.js +6 -4
- package/es6/components/DataTable/stories/SpaceXUngrouped.js +4 -2
- package/es6/components/DataTable/stories/Tunable.js +1 -1
- package/es6/components/DataTable/stories/data.js +1 -1
- package/es6/components/DataTable/stories/rowDetails.js +1 -1
- package/es6/components/DateInput/DateInput.js +85 -88
- package/es6/components/DateInput/index.d.ts +1 -0
- package/es6/components/DateInput/propTypes.js +1 -0
- package/es6/components/DateInput/stories/Format.js +14 -1
- package/es6/components/DateInput/utils.js +30 -8
- package/es6/components/Diagram/Diagram.js +1 -1
- package/es6/components/Diagram/stories/Animated.js +1 -1
- package/es6/components/Diagram/stories/Progressing.js +1 -1
- package/es6/components/Distribution/Distribution.js +1 -1
- package/es6/components/Distribution/propTypes.js +1 -1
- package/es6/components/Drop/Drop.js +1 -1
- package/es6/components/Drop/DropContainer.js +5 -3
- package/es6/components/DropButton/DropButton.js +1 -1
- package/es6/components/DropButton/propTypes.js +1 -1
- package/es6/components/FileInput/FileInput.js +28 -9
- package/es6/components/FileInput/StyledFileInput.js +1 -1
- package/es6/components/FileInput/index.d.ts +6 -1
- package/es6/components/FileInput/stories/Multiple.js +1 -0
- package/es6/components/FocusedContainer.js +1 -1
- package/es6/components/Footer/Footer.js +1 -1
- package/es6/components/Footer/stories/DoubleFooter.js +1 -1
- package/es6/components/Footer/stories/Sitemap.js +1 -1
- package/es6/components/Form/Form.js +7 -2
- package/es6/components/Form/stories/ArrayOfFormFields.js +1 -1
- package/es6/components/Form/stories/CustomThemed/FieldSpacingOptions.js +1 -1
- package/es6/components/Form/stories/HelpAndError.js +1 -1
- package/es6/components/FormField/FormField.js +26 -30
- package/es6/components/Grid/Grid.js +5 -3
- package/es6/components/Grid/README.md +0 -2
- package/es6/components/Grid/index.d.ts +9 -3
- package/es6/components/Grid/propTypes.js +1 -1
- package/es6/components/Grid/stories/CustomThemed/Responsive.js +1 -1
- package/es6/components/Grid/stories/typescript/App.tsx +42 -48
- package/es6/components/Grommet/Grommet.js +1 -1
- package/es6/components/Header/Header.js +1 -1
- package/es6/components/Heading/Heading.js +1 -1
- package/es6/components/Heading/propTypes.js +1 -1
- package/es6/components/Image/Image.js +5 -3
- package/es6/components/Image/propTypes.js +1 -1
- package/es6/components/InfiniteScroll/stories/Basics.js +1 -1
- package/es6/components/InfiniteScroll/stories/ClassChildren.js +1 -1
- package/es6/components/InfiniteScroll/stories/Marker.js +1 -1
- package/es6/components/InfiniteScroll/stories/Show.js +1 -1
- package/es6/components/InfiniteScroll/stories/ShowAfter.js +1 -1
- package/es6/components/InfiniteScroll/stories/ShowBefore.js +1 -1
- package/es6/components/Layer/Layer.js +2 -2
- package/es6/components/Layer/LayerContainer.js +5 -3
- package/es6/components/List/List.js +105 -42
- package/es6/components/List/index.d.ts +3 -1
- package/es6/components/List/propTypes.js +4 -2
- package/es6/components/List/stories/Disabled.js +20 -0
- package/es6/components/Main/Main.js +1 -1
- package/es6/components/Markdown/Markdown.js +1 -1
- package/es6/components/MaskedInput/MaskedInput.js +38 -29
- package/es6/components/Menu/Menu.js +106 -61
- package/es6/components/Menu/index.d.ts +2 -2
- package/es6/components/Menu/propTypes.js +2 -2
- package/es6/components/Menu/stories/Grouped.js +40 -0
- package/es6/components/Meter/Bar.js +1 -1
- package/es6/components/Meter/Circle.js +5 -3
- package/es6/components/Meter/Meter.js +1 -1
- package/es6/components/Meter/propTypes.js +1 -1
- package/es6/components/NameValueList/NameValueList.js +1 -1
- package/es6/components/NameValuePair/NameValuePair.js +1 -1
- package/es6/components/Nav/Nav.js +1 -1
- package/es6/components/Nav/stories/CustomThemed/JustifySidebar.js +1 -1
- package/es6/components/Nav/stories/Sidebar.js +1 -1
- package/es6/components/Notification/Notification.js +18 -9
- package/es6/components/Notification/index.d.ts +2 -1
- package/es6/components/Notification/propTypes.js +2 -1
- package/es6/components/Page/Page.js +1 -1
- package/es6/components/PageContent/PageContent.js +1 -1
- package/es6/components/PageHeader/PageHeader.js +63 -0
- package/es6/components/PageHeader/index.d.ts +26 -0
- package/es6/components/PageHeader/index.js +1 -0
- package/es6/components/PageHeader/propTypes.js +19 -0
- package/es6/components/PageHeader/stories/Custom.js +32 -0
- package/es6/components/PageHeader/stories/MultipleActions.js +63 -0
- package/es6/components/PageHeader/stories/Responsive.js +25 -0
- package/es6/components/PageHeader/stories/Simple.js +24 -0
- package/es6/components/Pagination/PageControl.js +1 -1
- package/es6/components/Pagination/Pagination.js +1 -1
- package/es6/components/Pagination/propTypes.js +1 -1
- package/es6/components/Paragraph/Paragraph.js +1 -1
- package/es6/components/Paragraph/StyledParagraph.js +8 -1
- package/es6/components/Paragraph/index.d.ts +1 -0
- package/es6/components/Paragraph/propTypes.js +2 -1
- package/es6/components/Paragraph/stories/MaxLines.js +24 -0
- package/es6/components/RadioButton/RadioButton.js +1 -1
- package/es6/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/es6/components/RadioButtonGroup/index.d.ts +2 -1
- package/es6/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +1 -1
- package/es6/components/RadioButtonGroup/stories/Disabled.js +1 -1
- package/es6/components/RangeInput/RangeInput.js +1 -1
- package/es6/components/RangeSelector/EdgeControl.js +1 -1
- package/es6/components/RangeSelector/RangeSelector.js +1 -1
- package/es6/components/RangeSelector/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +1 -1
- package/es6/components/RangeSelector/stories/Step.js +1 -1
- package/es6/components/RangeSelector/stories/Vertical.js +1 -1
- package/es6/components/RoutedAnchor/RoutedAnchor.js +2 -2
- package/es6/components/RoutedButton/RoutedButton.js +2 -2
- package/es6/components/Select/Select.js +12 -33
- package/es6/components/Select/SelectContainer.js +35 -38
- package/es6/components/Select/propTypes.js +1 -1
- package/es6/components/Select/stories/components/SearchBorderBox.js +1 -1
- package/es6/components/Select/stories/components/SearchInput.js +1 -1
- package/es6/components/Sidebar/Sidebar.js +1 -1
- package/es6/components/Sidebar/stories/Labels.js +1 -1
- package/es6/components/SkipLink/SkipLink.js +1 -1
- package/es6/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
- package/es6/components/Spinner/Spinner.js +1 -1
- package/es6/components/Stack/Stack.js +1 -1
- package/es6/components/Stack/propTypes.js +1 -1
- package/es6/components/Tab/StyledTab.js +2 -2
- package/es6/components/Tab/Tab.js +35 -18
- package/es6/components/Table/StyledTable.js +1 -1
- package/es6/components/Table/propTypes.js +1 -1
- package/es6/components/TableBody/TableBody.js +1 -1
- package/es6/components/TableCell/TableCell.js +1 -1
- package/es6/components/TableFooter/TableFooter.js +1 -1
- package/es6/components/TableHeader/TableHeader.js +1 -1
- package/es6/components/TableRow/TableRow.js +1 -1
- package/es6/components/Tabs/Tabs.js +229 -12
- package/es6/components/Tabs/propTypes.js +1 -1
- package/es6/components/Tabs/stories/Responsive.js +18 -0
- package/es6/components/Tag/Tag.js +1 -1
- package/es6/components/Tag/propTypes.js +1 -1
- package/es6/components/Text/Text.js +1 -1
- package/es6/components/Text/propTypes.js +1 -1
- package/es6/components/TextArea/TextArea.js +1 -1
- package/es6/components/TextArea/stories/NonResizable.js +1 -1
- package/es6/components/TextArea/stories/Simple.js +1 -1
- package/es6/components/TextInput/TextInput.js +33 -4
- package/es6/components/TextInput/stories/DefaultSuggestion.js +1 -0
- package/es6/components/TextInput/stories/InsideFormField.js +1 -1
- package/es6/components/TextInput/stories/Suggestions.js +1 -0
- package/es6/components/TextInput/stories/WithTags.js +1 -1
- package/es6/components/Tip/Tip.js +22 -29
- package/es6/components/Video/StyledVideo.js +2 -2
- package/es6/components/Video/Video.js +100 -47
- package/es6/components/Video/index.d.ts +1 -0
- package/es6/components/Video/propTypes.js +2 -2
- package/es6/components/Video/stories/typescript/ControlsBelow.tsx +6 -2
- package/es6/components/WorldMap/WorldMap.js +1 -1
- package/es6/components/WorldMap/propTypes.js +1 -1
- package/es6/components/WorldMap/stories/Places.js +1 -1
- package/es6/components/index.d.ts +1 -0
- package/es6/components/index.js +1 -0
- package/es6/contexts/AnnounceContext/stories/Assertive.js +1 -1
- package/es6/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
- package/es6/index.d.ts +1 -0
- package/es6/languages/default.json +4 -1
- package/es6/themes/base.d.ts +74 -34
- package/es6/themes/base.js +99 -3
- package/es6/utils/index.js +2 -1
- package/es6/utils/object.js +1 -1
- package/es6/utils/pagination.js +1 -1
- package/es6/utils/use-keyboard.js +25 -0
- package/grommet.min.js +1 -1
- package/grommet.min.js.map +1 -1
- package/index.d.ts +1 -0
- package/languages/default.json +4 -1
- package/package.json +65 -59
- package/themes/base.d.ts +74 -34
- package/themes/base.js +100 -3
- package/utils/index.js +8 -0
- package/utils/object.js +1 -1
- package/utils/pagination.js +1 -1
- package/utils/use-keyboard.js +34 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
var _excluded = ["actions", "gridProps", "parent", "responsive", "subtitle", "title"];
|
|
2
|
+
|
|
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
|
+
|
|
5
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
|
+
|
|
7
|
+
import React, { forwardRef, useContext } from 'react';
|
|
8
|
+
import { ThemeContext } from 'styled-components';
|
|
9
|
+
import { Box } from '../Box';
|
|
10
|
+
import { Header } from '../Header';
|
|
11
|
+
import { Heading } from '../Heading';
|
|
12
|
+
import { Grid } from '../Grid';
|
|
13
|
+
import { Paragraph } from '../Paragraph';
|
|
14
|
+
import { ResponsiveContext } from '../../contexts/ResponsiveContext';
|
|
15
|
+
var PageHeader = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
16
|
+
var actions = _ref.actions,
|
|
17
|
+
gridPropsProp = _ref.gridProps,
|
|
18
|
+
parent = _ref.parent,
|
|
19
|
+
responsive = _ref.responsive,
|
|
20
|
+
subtitle = _ref.subtitle,
|
|
21
|
+
title = _ref.title,
|
|
22
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
23
|
+
|
|
24
|
+
var theme = useContext(ThemeContext);
|
|
25
|
+
var breakpoint = useContext(ResponsiveContext);
|
|
26
|
+
|
|
27
|
+
var actionsProps = _extends({}, theme.pageHeader.actions);
|
|
28
|
+
|
|
29
|
+
var gridProps = theme.pageHeader[breakpoint] || theme.pageHeader.medium;
|
|
30
|
+
|
|
31
|
+
if (responsive && theme.pageHeader.responsive.breakpoints.includes(breakpoint)) {
|
|
32
|
+
gridProps = _extends({}, gridProps, theme.pageHeader.responsive);
|
|
33
|
+
actionsProps = _extends({}, actionsProps, theme.pageHeader.responsive.actions);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var _gridProps = gridProps,
|
|
37
|
+
areas = _gridProps.areas,
|
|
38
|
+
columns = _gridProps.columns,
|
|
39
|
+
gap = _gridProps.gap,
|
|
40
|
+
rows = _gridProps.rows;
|
|
41
|
+
return /*#__PURE__*/React.createElement(Header, _extends({
|
|
42
|
+
ref: ref,
|
|
43
|
+
direction: "column",
|
|
44
|
+
gap: "none",
|
|
45
|
+
pad: theme.pageHeader.pad
|
|
46
|
+
}, rest), /*#__PURE__*/React.createElement(Grid, _extends({
|
|
47
|
+
columns: columns,
|
|
48
|
+
rows: rows,
|
|
49
|
+
areas: areas,
|
|
50
|
+
gap: gap,
|
|
51
|
+
fill: "horizontal"
|
|
52
|
+
}, gridPropsProp), /*#__PURE__*/React.createElement(Box, _extends({
|
|
53
|
+
gridArea: "parent"
|
|
54
|
+
}, theme.pageHeader.parent), parent), /*#__PURE__*/React.createElement(Box, {
|
|
55
|
+
gridArea: "title"
|
|
56
|
+
}, typeof title === 'string' ? /*#__PURE__*/React.createElement(Heading, theme.pageHeader.title, title) : title), /*#__PURE__*/React.createElement(Box, {
|
|
57
|
+
gridArea: "subtitle"
|
|
58
|
+
}, typeof subtitle === 'string' ? /*#__PURE__*/React.createElement(Paragraph, theme.pageHeader.subtitle, subtitle) : subtitle), /*#__PURE__*/React.createElement(Box, _extends({
|
|
59
|
+
gridArea: "actions"
|
|
60
|
+
}, actionsProps), actions)));
|
|
61
|
+
});
|
|
62
|
+
PageHeader.displayName = 'PageHeader';
|
|
63
|
+
export { PageHeader };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
A11yTitleType,
|
|
4
|
+
AlignSelfType,
|
|
5
|
+
GridAreaType,
|
|
6
|
+
MarginType,
|
|
7
|
+
} from '../../utils';
|
|
8
|
+
|
|
9
|
+
import { GridProps } from '../Grid';
|
|
10
|
+
export interface PageHeaderProps {
|
|
11
|
+
a11yTitle?: A11yTitleType;
|
|
12
|
+
alignSelf?: AlignSelfType;
|
|
13
|
+
gridArea?: GridAreaType;
|
|
14
|
+
margin?: MarginType;
|
|
15
|
+
actions?: JSX.Element;
|
|
16
|
+
gridProps?: GridProps;
|
|
17
|
+
parent?: JSX.Element;
|
|
18
|
+
responsive?: boolean;
|
|
19
|
+
subtitle?: string | JSX.Element;
|
|
20
|
+
title?: string | JSX.Element;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare const PageHeader: React.FC<PageHeaderProps>;
|
|
24
|
+
export type PageHeaderType = PageHeaderProps;
|
|
25
|
+
|
|
26
|
+
export { PageHeader };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PageHeader } from './PageHeader';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { genericProps } from '../../utils/general-prop-types';
|
|
5
|
+
import { GridPropTypes } from '../Grid/propTypes';
|
|
6
|
+
var PropType = {};
|
|
7
|
+
|
|
8
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
9
|
+
PropType = _extends({}, genericProps, {
|
|
10
|
+
actions: PropTypes.element,
|
|
11
|
+
gridProps: GridPropTypes,
|
|
12
|
+
parent: PropTypes.element,
|
|
13
|
+
responsive: PropTypes.bool,
|
|
14
|
+
subtitle: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
15
|
+
title: PropTypes.oneOfType([PropTypes.string, PropTypes.element])
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export var PageHeaderPropTypes = PropType;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Anchor, Box, Button, grommet, Grommet, PageHeader, Page, PageContent } from 'grommet';
|
|
3
|
+
import { deepMerge } from 'grommet/utils';
|
|
4
|
+
import { FormPrevious } from "grommet-icons/es6/icons/FormPrevious";
|
|
5
|
+
var customTheme = deepMerge(grommet, {
|
|
6
|
+
pageHeader: {
|
|
7
|
+
medium: {
|
|
8
|
+
areas: [['parent', 'parent'], ['title', 'null'], ['subtitle', 'null'], ['actions', 'actions']]
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
export var Custom = function Custom() {
|
|
13
|
+
return /*#__PURE__*/React.createElement(Grommet, {
|
|
14
|
+
theme: customTheme
|
|
15
|
+
}, /*#__PURE__*/React.createElement(Page, null, /*#__PURE__*/React.createElement(PageContent, null, /*#__PURE__*/React.createElement(PageHeader, {
|
|
16
|
+
title: "Permissions",
|
|
17
|
+
subtitle: "View and assign permissions.",
|
|
18
|
+
actions: /*#__PURE__*/React.createElement(Box, {
|
|
19
|
+
alignSelf: "start"
|
|
20
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
21
|
+
label: "Edit",
|
|
22
|
+
primary: true
|
|
23
|
+
})),
|
|
24
|
+
parent: /*#__PURE__*/React.createElement(Anchor, {
|
|
25
|
+
icon: /*#__PURE__*/React.createElement(FormPrevious, null),
|
|
26
|
+
label: "Settings"
|
|
27
|
+
})
|
|
28
|
+
}))));
|
|
29
|
+
};
|
|
30
|
+
export default {
|
|
31
|
+
title: 'Layout/PageHeader/Custom Themed/Custom'
|
|
32
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
|
+
import { Anchor, Box, Button, Menu, PageHeader, Page, PageContent, ResponsiveContext } from 'grommet';
|
|
3
|
+
import { More } from "grommet-icons/es6/icons/More";
|
|
4
|
+
var actions = [{
|
|
5
|
+
label: 'Get Started',
|
|
6
|
+
primary: true
|
|
7
|
+
}, {
|
|
8
|
+
label: 'Follow',
|
|
9
|
+
secondary: true
|
|
10
|
+
}, {
|
|
11
|
+
label: 'File Issue',
|
|
12
|
+
secondary: true
|
|
13
|
+
}];
|
|
14
|
+
var controls = {
|
|
15
|
+
small: /*#__PURE__*/React.createElement(Menu, {
|
|
16
|
+
dropAlign: {
|
|
17
|
+
top: 'bottom',
|
|
18
|
+
right: 'right'
|
|
19
|
+
},
|
|
20
|
+
items: actions.map(function (action) {
|
|
21
|
+
return {
|
|
22
|
+
label: action.label
|
|
23
|
+
};
|
|
24
|
+
}),
|
|
25
|
+
icon: /*#__PURE__*/React.createElement(More, null)
|
|
26
|
+
}),
|
|
27
|
+
medium: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, actions[0]), /*#__PURE__*/React.createElement(Menu, {
|
|
28
|
+
dropAlign: {
|
|
29
|
+
top: 'bottom',
|
|
30
|
+
right: 'right'
|
|
31
|
+
},
|
|
32
|
+
items: actions.slice(1),
|
|
33
|
+
icon: /*#__PURE__*/React.createElement(More, null)
|
|
34
|
+
})),
|
|
35
|
+
large: actions.map(function (action) {
|
|
36
|
+
return /*#__PURE__*/React.createElement(Button, action);
|
|
37
|
+
})
|
|
38
|
+
};
|
|
39
|
+
export var MultipleActions = function MultipleActions() {
|
|
40
|
+
var size = useContext(ResponsiveContext);
|
|
41
|
+
return (
|
|
42
|
+
/*#__PURE__*/
|
|
43
|
+
// Uncomment <Grommet> lines when using outside of storybook
|
|
44
|
+
// <Grommet theme={...}>
|
|
45
|
+
React.createElement(Page, null, /*#__PURE__*/React.createElement(PageContent, null, /*#__PURE__*/React.createElement(PageHeader, {
|
|
46
|
+
title: "Grommet",
|
|
47
|
+
subtitle: "Grommet helps you build responsive and accessible \n mobile-first projects for the web with an easy to use component \n library.",
|
|
48
|
+
actions: /*#__PURE__*/React.createElement(Box, {
|
|
49
|
+
direction: "row",
|
|
50
|
+
gap: "small",
|
|
51
|
+
align: "center"
|
|
52
|
+
}, controls[size]),
|
|
53
|
+
parent: /*#__PURE__*/React.createElement(Anchor, {
|
|
54
|
+
label: "Parent Page"
|
|
55
|
+
})
|
|
56
|
+
}))) // </Grommet>
|
|
57
|
+
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
MultipleActions.storyName = 'Multiple Actions';
|
|
61
|
+
export default {
|
|
62
|
+
title: 'Layout/PageHeader/Multiple Actions'
|
|
63
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Anchor, Button, PageHeader, Page, PageContent } from 'grommet';
|
|
3
|
+
export var Responsive = function Responsive() {
|
|
4
|
+
return (
|
|
5
|
+
/*#__PURE__*/
|
|
6
|
+
// Uncomment <Grommet> lines when using outside of storybook
|
|
7
|
+
// <Grommet theme={...}>
|
|
8
|
+
React.createElement(Page, null, /*#__PURE__*/React.createElement(PageContent, null, /*#__PURE__*/React.createElement(PageHeader, {
|
|
9
|
+
title: "Grommet",
|
|
10
|
+
subtitle: "Responsive allows PageHeader layout to switch to a \n single column at responsive breakpoints specified in the theme.",
|
|
11
|
+
actions: /*#__PURE__*/React.createElement(Button, {
|
|
12
|
+
label: "Get Started",
|
|
13
|
+
primary: true
|
|
14
|
+
}),
|
|
15
|
+
parent: /*#__PURE__*/React.createElement(Anchor, {
|
|
16
|
+
label: "Parent Page"
|
|
17
|
+
}),
|
|
18
|
+
responsive: true
|
|
19
|
+
}))) // </Grommet>
|
|
20
|
+
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
export default {
|
|
24
|
+
title: 'Layout/PageHeader/Responsive'
|
|
25
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Anchor, Button, PageHeader, Page, PageContent } from 'grommet';
|
|
3
|
+
export var Simple = function Simple() {
|
|
4
|
+
return (
|
|
5
|
+
/*#__PURE__*/
|
|
6
|
+
// Uncomment <Grommet> lines when using outside of storybook
|
|
7
|
+
// <Grommet theme={...}>
|
|
8
|
+
React.createElement(Page, null, /*#__PURE__*/React.createElement(PageContent, null, /*#__PURE__*/React.createElement(PageHeader, {
|
|
9
|
+
title: "Grommet",
|
|
10
|
+
subtitle: "Grommet helps you build responsive and accessible \n mobile-first projects for the web with an easy to use component \n library.",
|
|
11
|
+
actions: /*#__PURE__*/React.createElement(Button, {
|
|
12
|
+
label: "Get Started",
|
|
13
|
+
primary: true
|
|
14
|
+
}),
|
|
15
|
+
parent: /*#__PURE__*/React.createElement(Anchor, {
|
|
16
|
+
label: "Parent Page"
|
|
17
|
+
})
|
|
18
|
+
}))) // </Grommet>
|
|
19
|
+
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
export default {
|
|
23
|
+
title: 'Layout/PageHeader/Simple'
|
|
24
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["control", "separator", "size"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["a11yTitle", "aria-label", "numberItems", "numberEdgePages", "numberMiddlePages", "onChange", "page", "size", "step"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { genericProps } from '../../utils/general-prop-types';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["color", "fill"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
@@ -14,10 +14,17 @@ var sizeStyle = function sizeStyle(props) {
|
|
|
14
14
|
var fontFamily = css(["font-family:", ";"], function (props) {
|
|
15
15
|
return props.theme.paragraph.font.family;
|
|
16
16
|
});
|
|
17
|
+
|
|
18
|
+
var maxlinesStyle = function maxlinesStyle(props) {
|
|
19
|
+
return props.maxLines && css(["display:-webkit-box;-webkit-line-clamp:", ";-webkit-box-orient:vertical;overflow:hidden;"], props.maxLines);
|
|
20
|
+
};
|
|
21
|
+
|
|
17
22
|
var StyledParagraph = styled.p.withConfig({
|
|
18
23
|
displayName: "StyledParagraph",
|
|
19
24
|
componentId: "sc-tbetod-0"
|
|
20
|
-
})(["", " ", " ", " ", " ", " ", ""], genericStyles, function (props) {
|
|
25
|
+
})(["", " ", " ", " ", " ", " ", " ", ""], genericStyles, function (props) {
|
|
26
|
+
return maxlinesStyle(props);
|
|
27
|
+
}, function (props) {
|
|
21
28
|
return sizeStyle(props);
|
|
22
29
|
}, function (props) {
|
|
23
30
|
return props.textAlign && textAlignStyle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { colorPropType, genericProps } from '../../utils/general-prop-types';
|
|
@@ -8,6 +8,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
8
8
|
PropType = _extends({}, genericProps, {
|
|
9
9
|
color: colorPropType,
|
|
10
10
|
fill: PropTypes.bool,
|
|
11
|
+
maxLines: PropTypes.number,
|
|
11
12
|
responsive: PropTypes.bool,
|
|
12
13
|
size: PropTypes.oneOfType([PropTypes.oneOf(['small', 'medium', 'large', 'xlarge', 'xxlarge']), PropTypes.string]),
|
|
13
14
|
textAlign: PropTypes.oneOf(['start', 'center', 'end', 'justify'])
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Box, Paragraph } from 'grommet';
|
|
3
|
+
var text = "\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod\ntempor incididunt ut labore et dolore magna aliqua.\n";
|
|
4
|
+
export var Maxlines = function Maxlines() {
|
|
5
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
6
|
+
fill: true,
|
|
7
|
+
align: "center",
|
|
8
|
+
justify: "center",
|
|
9
|
+
pad: "large"
|
|
10
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
11
|
+
border: true,
|
|
12
|
+
width: "small",
|
|
13
|
+
pad: {
|
|
14
|
+
horizontal: 'small'
|
|
15
|
+
}
|
|
16
|
+
}, /*#__PURE__*/React.createElement(Paragraph, {
|
|
17
|
+
maxLines: 3
|
|
18
|
+
}, text)), /*#__PURE__*/React.createElement(Paragraph, {
|
|
19
|
+
maxLines: 3
|
|
20
|
+
}, text));
|
|
21
|
+
};
|
|
22
|
+
export default {
|
|
23
|
+
title: 'Type/Paragraph/Maxlines'
|
|
24
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["a11yTitle", "checked", "children", "disabled", "focus", "focusIndicator", "id", "label", "name", "onChange"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["children", "defaultValue", "disabled", "focusIndicator", "name", "onChange", "options", "value", "gap"],
|
|
2
2
|
_excluded2 = ["disabled", "id", "label", "value"];
|
|
3
3
|
|
|
4
|
-
function _extends() { _extends = Object.assign
|
|
4
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
5
|
|
|
6
6
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
7
7
|
|
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { BoxProps } from '../Box/index';
|
|
3
3
|
|
|
4
4
|
export interface RadioButtonGroupProps {
|
|
5
|
+
children?: Function;
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
name: string;
|
|
7
8
|
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
@@ -22,7 +23,7 @@ export interface RadioButtonGroupProps {
|
|
|
22
23
|
export interface RadioButtonGroupExtendedProps
|
|
23
24
|
extends RadioButtonGroupProps,
|
|
24
25
|
BoxProps,
|
|
25
|
-
Omit<JSX.IntrinsicElements['div'], 'onClick' | 'onChange'> {}
|
|
26
|
+
Omit<JSX.IntrinsicElements['div'], 'children' | 'onClick' | 'onChange'> {}
|
|
26
27
|
|
|
27
28
|
declare const RadioButtonGroup: React.FC<RadioButtonGroupExtendedProps>;
|
|
28
29
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["value"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["value"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["a11yTitle", "color", "focus", "focusIndicator", "name", "onChange", "onFocus", "onBlur", "value", "step", "min", "max"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["color", "direction", "edge", "onDecrease", "onIncrease", "thickness"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["color", "direction", "invert", "max", "messages", "min", "onChange", "opacity", "round", "size", "step", "values"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["direction"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["direction"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["direction"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["direction"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var _excluded = ["path", "method"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
7
7
|
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
8
8
|
|
|
9
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
9
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
10
10
|
|
|
11
11
|
import React, { Component } from 'react';
|
|
12
12
|
import PropTypes from 'prop-types';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var _excluded = ["href", "path", "method", "onClick"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
7
7
|
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
8
8
|
|
|
9
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
9
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
10
10
|
|
|
11
11
|
import React, { Component } from 'react';
|
|
12
12
|
import PropTypes from 'prop-types';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var _excluded = ["a11yTitle", "aria-label", "alignSelf", "children", "clear", "closeOnChange", "defaultValue", "disabled", "disabledKey", "dropAlign", "dropHeight", "dropProps", "dropTarget", "emptySearchMessage", "focusIndicator", "gridArea", "id", "icon", "labelKey", "margin", "messages", "multiple", "name", "onBlur", "onChange", "onClick", "onClose", "onFocus", "onKeyDown", "onMore", "onOpen", "onSearch", "open", "options", "placeholder", "plain", "replace", "searchPlaceholder", "selected", "size", "value", "valueKey", "valueLabel"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
7
7
|
import React, { forwardRef, isValidElement, useCallback, useContext, useMemo, useState, useRef, useEffect } from 'react';
|
|
8
8
|
import styled, { ThemeContext } from 'styled-components';
|
|
9
|
-
import { controlBorderStyle, normalizeColor } from '../../utils';
|
|
9
|
+
import { controlBorderStyle, normalizeColor, useKeyboard } from '../../utils';
|
|
10
10
|
import { defaultProps } from '../../default-props';
|
|
11
11
|
import { Box } from '../Box';
|
|
12
12
|
import { DropButton } from '../DropButton';
|
|
@@ -102,26 +102,7 @@ var Select = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
102
102
|
// see set initial focus code in SelectContainer.js
|
|
103
103
|
|
|
104
104
|
|
|
105
|
-
var
|
|
106
|
-
usingKeyboard = _useState[0],
|
|
107
|
-
setUsingKeyboard = _useState[1];
|
|
108
|
-
|
|
109
|
-
var onMouseDown = function onMouseDown() {
|
|
110
|
-
return setUsingKeyboard(false);
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
var onKeyPress = function onKeyPress() {
|
|
114
|
-
return setUsingKeyboard(true);
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
useEffect(function () {
|
|
118
|
-
document.addEventListener('mousedown', onMouseDown);
|
|
119
|
-
document.addEventListener('keydown', onKeyPress);
|
|
120
|
-
return function () {
|
|
121
|
-
document.removeEventListener('mousedown', onMouseDown);
|
|
122
|
-
document.removeEventListener('keydown', onKeyPress);
|
|
123
|
-
};
|
|
124
|
-
}, []); // value is used for what we receive in valueProp and the basis for
|
|
105
|
+
var usingKeyboard = useKeyboard(); // value is used for what we receive in valueProp and the basis for
|
|
125
106
|
// what we send with onChange
|
|
126
107
|
// When 'valueKey' sets 'reduce', the value(s) here should match
|
|
127
108
|
// what the 'valueKey' would return for the corresponding
|
|
@@ -152,14 +133,14 @@ var Select = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
152
133
|
return valueKey && valueKey.reduce ? value : applyKey(value, valueKey);
|
|
153
134
|
}, [value, valueKey]); // search input value
|
|
154
135
|
|
|
155
|
-
var
|
|
156
|
-
search =
|
|
157
|
-
setSearch =
|
|
136
|
+
var _useState = useState(),
|
|
137
|
+
search = _useState[0],
|
|
138
|
+
setSearch = _useState[1]; // All select option indices and values
|
|
158
139
|
|
|
159
140
|
|
|
160
|
-
var
|
|
161
|
-
allOptions =
|
|
162
|
-
setAllOptions =
|
|
141
|
+
var _useState2 = useState(optionsProp),
|
|
142
|
+
allOptions = _useState2[0],
|
|
143
|
+
setAllOptions = _useState2[1]; // Track changes to options property, except when options are being
|
|
163
144
|
// updated due to search activity. Allows option's initial index value
|
|
164
145
|
// to be referenced when filtered by search.
|
|
165
146
|
|
|
@@ -190,9 +171,9 @@ var Select = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
190
171
|
return result;
|
|
191
172
|
}, [allOptions, selected, valueKey, valuedValue]);
|
|
192
173
|
|
|
193
|
-
var
|
|
194
|
-
open =
|
|
195
|
-
setOpen =
|
|
174
|
+
var _useState3 = useState(propOpen),
|
|
175
|
+
open = _useState3[0],
|
|
176
|
+
setOpen = _useState3[1];
|
|
196
177
|
|
|
197
178
|
useEffect(function () {
|
|
198
179
|
return setOpen(propOpen);
|
|
@@ -267,8 +248,6 @@ var Select = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
267
248
|
|
|
268
249
|
onChange(adjustedEvent);
|
|
269
250
|
}
|
|
270
|
-
|
|
271
|
-
setSearch();
|
|
272
251
|
}, [closeOnChange, onChange, onRequestClose, setValue, triggerChangeEvent]);
|
|
273
252
|
var SelectIcon;
|
|
274
253
|
|