grommet 2.22.0 → 2.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all/stories/AllComponents.js +2 -7
- package/components/Accordion/Accordion.js +1 -1
- package/components/Accordion/propTypes.js +1 -1
- package/components/Accordion/stories/CustomThemed/Custom.js +3 -2
- package/components/AccordionPanel/AccordionPanel.js +2 -1
- package/components/Anchor/Anchor.js +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 +2 -2
- package/components/Button/Button.js +1 -1
- package/components/Button/index.d.ts +15 -16
- package/components/Button/propTypes.js +2 -2
- package/components/Button/stories/Basic.js +1 -1
- package/components/Button/stories/Fill.js +1 -1
- package/components/Button/stories/Kind.js +1 -1
- package/components/Calendar/Calendar.js +1 -1
- package/components/Calendar/index.d.ts +2 -2
- package/components/Calendar/propTypes.js +1 -1
- package/components/Calendar/stories/ShowAdjacentDays.js +1 -1
- package/components/Card/Card.js +1 -1
- package/components/Card/stories/CustomThemed/Clickable.js +1 -1
- package/components/Card/stories/CustomThemed/RichFooter.js +1 -1
- package/components/Card/stories/CustomThemed/Themed.js +1 -1
- package/components/CardBody/CardBody.js +1 -1
- package/components/CardFooter/CardFooter.js +1 -1
- package/components/CardHeader/CardHeader.js +1 -1
- package/components/Carousel/Carousel.js +1 -1
- package/components/Carousel/propTypes.js +1 -1
- package/components/Carousel/stories/CustomThemed/Custom.js +1 -1
- package/components/Chart/Chart.js +1 -1
- package/components/Chart/index.d.ts +28 -2
- package/components/Chart/propTypes.js +1 -1
- package/components/Chart/stories/Rich.js +1 -1
- package/components/Chart/stories/Window.js +1 -1
- package/components/CheckBox/CheckBox.js +2 -2
- package/components/CheckBox/StyledCheckBox.js +6 -2
- package/components/CheckBox/index.d.ts +2 -1
- package/components/CheckBox/stories/CustomThemed/Custom.js +1 -1
- package/components/CheckBox/stories/CustomThemed/CustomToggle.js +1 -1
- package/components/CheckBox/stories/NoLabel.js +1 -1
- package/components/CheckBox/stories/Simple.js +1 -1
- package/components/CheckBoxGroup/CheckBoxGroup.js +1 -1
- package/components/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 +35 -43
- package/components/DataChart/Legend.js +1 -1
- package/components/DataChart/Swatch.js +64 -23
- package/components/DataChart/XAxis.js +19 -7
- package/components/DataChart/YGuide.js +1 -1
- package/components/DataChart/index.d.ts +1 -1
- package/components/DataChart/propTypes.js +4 -2
- package/components/DataChart/stories/Legend.js +6 -2
- package/components/DataChart/stories/Offset.js +6 -1
- package/components/DataChart/utils.js +11 -1
- package/components/DataTable/Body.js +84 -26
- package/components/DataTable/Cell.js +11 -5
- package/components/DataTable/DataTable.js +15 -6
- package/components/DataTable/ExpanderCell.js +1 -1
- package/components/DataTable/Footer.js +7 -4
- package/components/DataTable/GroupedBody.js +23 -7
- package/components/DataTable/Header.js +86 -41
- package/components/DataTable/Resizer.js +1 -1
- package/components/DataTable/Sorter.js +1 -1
- package/components/DataTable/StyledDataTable.js +2 -2
- package/components/DataTable/index.d.ts +14 -2
- package/components/DataTable/propTypes.js +10 -3
- 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/Units.js +41 -2
- package/components/DataTable/stories/VerticalAlign.js +51 -0
- package/components/DataTable/stories/data.js +1 -1
- package/components/DataTable/stories/rowDetails.js +1 -1
- package/components/DataTable/stories/typescript/Clickable.tsx +1 -0
- package/components/DataTable/stories/typescript/OnSelect.tsx +5 -10
- package/components/DateInput/DateInput.js +29 -24
- package/components/DateInput/index.d.ts +1 -0
- package/components/DateInput/propTypes.js +1 -0
- package/components/DateInput/stories/Format.js +14 -1
- package/components/DateInput/utils.js +1 -1
- package/components/Diagram/Diagram.js +1 -1
- package/components/Diagram/stories/Animated.js +1 -1
- package/components/Diagram/stories/Progressing.js +1 -1
- package/components/Distribution/Distribution.js +1 -1
- package/components/Distribution/propTypes.js +1 -1
- package/components/Drop/Drop.js +1 -1
- package/components/Drop/DropContainer.js +12 -5
- package/components/Drop/index.d.ts +2 -0
- package/components/DropButton/DropButton.js +1 -1
- package/components/DropButton/propTypes.js +1 -1
- package/components/FileInput/FileInput.js +26 -8
- 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/index.d.ts +2 -2
- package/components/Footer/stories/DoubleFooter.js +1 -1
- package/components/Footer/stories/Sitemap.js +1 -1
- package/components/Form/Form.js +1 -1
- package/components/Form/stories/ArrayOfFormFields.js +1 -1
- package/components/Form/stories/CustomThemed/FieldSpacingOptions.js +1 -1
- package/components/Form/stories/HelpAndError.js +1 -1
- package/components/FormField/FormField.js +1 -1
- package/components/FormField/index.d.ts +4 -1
- 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 +63 -8
- package/components/Header/index.d.ts +8 -2
- package/components/Header/propTypes.js +19 -0
- package/components/Header/stories/Sticky.js +134 -0
- package/components/Heading/Heading.js +1 -1
- package/components/Heading/propTypes.js +1 -1
- package/components/Image/Image.js +1 -1
- package/components/Image/propTypes.js +1 -1
- package/components/InfiniteScroll/index.d.ts +1 -0
- 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/Keyboard/index.d.ts +1 -0
- package/components/Layer/Layer.js +2 -2
- package/components/Layer/LayerContainer.js +7 -3
- package/components/List/List.js +108 -42
- package/components/List/index.d.ts +4 -1
- package/components/List/propTypes.js +4 -2
- package/components/List/stories/Basic.js +1 -0
- package/components/List/stories/Disabled.js +33 -0
- package/components/Main/Main.js +1 -1
- package/components/Main/index.d.ts +2 -2
- package/components/Markdown/Markdown.js +1 -1
- package/components/MaskedInput/MaskedInput.js +37 -28
- package/components/Menu/Menu.js +108 -63
- package/components/Menu/index.d.ts +4 -3
- package/components/Menu/propTypes.js +2 -2
- package/components/Menu/stories/Grouped.js +52 -0
- package/components/Menu/stories/Simple.js +1 -0
- package/components/Menu/stories/typescript/Children.tsx +1 -1
- 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/NameValueList/index.d.ts +4 -1
- package/components/NameValuePair/NameValuePair.js +1 -1
- package/components/Nav/Nav.js +1 -1
- package/components/Nav/index.d.ts +2 -2
- 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/Page/index.d.ts +2 -2
- package/components/PageContent/PageContent.js +1 -1
- package/components/PageContent/index.d.ts +2 -2
- 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/RadioButton/index.d.ts +2 -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/Thin.js +1 -9
- 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 +27 -11
- package/components/Select/propTypes.js +1 -1
- package/components/Select/stories/Clear.js +27 -2
- 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/Spinner/index.d.ts +2 -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 +9 -5
- package/components/TableFooter/TableFooter.js +1 -1
- package/components/TableHeader/TableHeader.js +1 -1
- package/components/TableRow/TableRow.js +1 -1
- package/components/Tabs/Tabs.js +231 -10
- package/components/Tabs/propTypes.js +1 -1
- package/components/Tabs/stories/Responsive.js +18 -0
- package/components/Tag/Tag.js +1 -1
- package/components/Tag/propTypes.js +1 -1
- package/components/Text/Text.js +1 -1
- package/components/Text/propTypes.js +1 -1
- package/components/TextArea/TextArea.js +1 -1
- package/components/TextArea/stories/NonResizable.js +1 -1
- package/components/TextArea/stories/Simple.js +1 -1
- package/components/TextInput/TextInput.js +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/Tip/index.d.ts +1 -0
- package/components/Video/StyledVideo.js +1 -1
- package/components/Video/Video.js +161 -55
- package/components/Video/index.d.ts +15 -8
- package/components/Video/propTypes.js +8 -6
- package/components/Video/stories/typescript/ControlsBelow.tsx +10 -4
- package/components/Video/stories/typescript/Simple.tsx +1 -1
- package/components/Video/stories/typescript/TheaterMode.tsx +1 -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/contexts/ThemeContext/index.d.ts +4 -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 +2 -2
- package/es6/components/Button/Button.js +1 -1
- package/es6/components/Button/index.d.ts +15 -16
- package/es6/components/Button/propTypes.js +2 -2
- package/es6/components/Button/stories/Basic.js +1 -1
- package/es6/components/Button/stories/Fill.js +1 -1
- package/es6/components/Button/stories/Kind.js +1 -1
- package/es6/components/Calendar/Calendar.js +1 -1
- package/es6/components/Calendar/index.d.ts +2 -2
- package/es6/components/Calendar/propTypes.js +1 -1
- package/es6/components/Calendar/stories/ShowAdjacentDays.js +1 -1
- package/es6/components/Card/Card.js +1 -1
- package/es6/components/Card/stories/CustomThemed/Clickable.js +1 -1
- package/es6/components/Card/stories/CustomThemed/RichFooter.js +1 -1
- package/es6/components/Card/stories/CustomThemed/Themed.js +1 -1
- package/es6/components/CardBody/CardBody.js +1 -1
- package/es6/components/CardFooter/CardFooter.js +1 -1
- package/es6/components/CardHeader/CardHeader.js +1 -1
- package/es6/components/Carousel/Carousel.js +1 -1
- package/es6/components/Carousel/propTypes.js +1 -1
- package/es6/components/Carousel/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/Chart/Chart.js +1 -1
- package/es6/components/Chart/index.d.ts +28 -2
- package/es6/components/Chart/propTypes.js +1 -1
- package/es6/components/Chart/stories/Rich.js +1 -1
- package/es6/components/Chart/stories/Window.js +1 -1
- package/es6/components/CheckBox/CheckBox.js +2 -2
- package/es6/components/CheckBox/StyledCheckBox.js +6 -2
- package/es6/components/CheckBox/index.d.ts +2 -1
- package/es6/components/CheckBox/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/CheckBox/stories/CustomThemed/CustomToggle.js +1 -1
- package/es6/components/CheckBox/stories/NoLabel.js +1 -1
- package/es6/components/CheckBox/stories/Simple.js +1 -1
- package/es6/components/CheckBoxGroup/CheckBoxGroup.js +1 -1
- package/es6/components/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 +36 -45
- package/es6/components/DataChart/Legend.js +1 -1
- package/es6/components/DataChart/Swatch.js +64 -23
- package/es6/components/DataChart/XAxis.js +19 -7
- package/es6/components/DataChart/YGuide.js +1 -1
- package/es6/components/DataChart/index.d.ts +1 -1
- package/es6/components/DataChart/propTypes.js +4 -2
- package/es6/components/DataChart/stories/Legend.js +6 -2
- package/es6/components/DataChart/stories/Offset.js +6 -1
- package/es6/components/DataChart/utils.js +7 -0
- package/es6/components/DataTable/Body.js +83 -26
- package/es6/components/DataTable/Cell.js +12 -5
- package/es6/components/DataTable/DataTable.js +15 -6
- package/es6/components/DataTable/ExpanderCell.js +1 -1
- package/es6/components/DataTable/Footer.js +7 -4
- package/es6/components/DataTable/GroupedBody.js +23 -7
- package/es6/components/DataTable/Header.js +86 -41
- package/es6/components/DataTable/Resizer.js +1 -1
- package/es6/components/DataTable/Sorter.js +1 -1
- package/es6/components/DataTable/StyledDataTable.js +2 -2
- package/es6/components/DataTable/index.d.ts +14 -2
- package/es6/components/DataTable/propTypes.js +10 -3
- 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/Units.js +41 -2
- package/es6/components/DataTable/stories/VerticalAlign.js +38 -0
- package/es6/components/DataTable/stories/data.js +1 -1
- package/es6/components/DataTable/stories/rowDetails.js +1 -1
- package/es6/components/DataTable/stories/typescript/Clickable.tsx +1 -0
- package/es6/components/DataTable/stories/typescript/OnSelect.tsx +5 -10
- package/es6/components/DateInput/DateInput.js +28 -24
- package/es6/components/DateInput/index.d.ts +1 -0
- package/es6/components/DateInput/propTypes.js +1 -0
- package/es6/components/DateInput/stories/Format.js +14 -1
- package/es6/components/DateInput/utils.js +1 -1
- package/es6/components/Diagram/Diagram.js +1 -1
- package/es6/components/Diagram/stories/Animated.js +1 -1
- package/es6/components/Diagram/stories/Progressing.js +1 -1
- package/es6/components/Distribution/Distribution.js +1 -1
- package/es6/components/Distribution/propTypes.js +1 -1
- package/es6/components/Drop/Drop.js +1 -1
- package/es6/components/Drop/DropContainer.js +10 -5
- package/es6/components/Drop/index.d.ts +2 -0
- package/es6/components/DropButton/DropButton.js +1 -1
- package/es6/components/DropButton/propTypes.js +1 -1
- package/es6/components/FileInput/FileInput.js +26 -8
- package/es6/components/FileInput/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/index.d.ts +2 -2
- package/es6/components/Footer/stories/DoubleFooter.js +1 -1
- package/es6/components/Footer/stories/Sitemap.js +1 -1
- package/es6/components/Form/Form.js +1 -1
- package/es6/components/Form/stories/ArrayOfFormFields.js +1 -1
- package/es6/components/Form/stories/CustomThemed/FieldSpacingOptions.js +1 -1
- package/es6/components/Form/stories/HelpAndError.js +1 -1
- package/es6/components/FormField/FormField.js +1 -1
- package/es6/components/FormField/index.d.ts +4 -1
- 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 +58 -7
- package/es6/components/Header/index.d.ts +8 -2
- package/es6/components/Header/propTypes.js +10 -0
- package/es6/components/Header/stories/Sticky.js +121 -0
- package/es6/components/Heading/Heading.js +1 -1
- package/es6/components/Heading/propTypes.js +1 -1
- package/es6/components/Image/Image.js +1 -1
- package/es6/components/Image/propTypes.js +1 -1
- package/es6/components/InfiniteScroll/index.d.ts +1 -0
- 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/Keyboard/index.d.ts +1 -0
- package/es6/components/Layer/Layer.js +2 -2
- package/es6/components/Layer/LayerContainer.js +5 -3
- package/es6/components/List/List.js +109 -43
- package/es6/components/List/index.d.ts +4 -1
- package/es6/components/List/propTypes.js +4 -2
- package/es6/components/List/stories/Basic.js +1 -0
- package/es6/components/List/stories/Disabled.js +20 -0
- package/es6/components/Main/Main.js +1 -1
- package/es6/components/Main/index.d.ts +2 -2
- package/es6/components/Markdown/Markdown.js +1 -1
- package/es6/components/MaskedInput/MaskedInput.js +38 -29
- package/es6/components/Menu/Menu.js +109 -63
- package/es6/components/Menu/index.d.ts +4 -3
- package/es6/components/Menu/propTypes.js +2 -2
- package/es6/components/Menu/stories/Grouped.js +40 -0
- package/es6/components/Menu/stories/Simple.js +1 -0
- package/es6/components/Menu/stories/typescript/Children.tsx +1 -1
- 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/NameValueList/index.d.ts +4 -1
- package/es6/components/NameValuePair/NameValuePair.js +1 -1
- package/es6/components/Nav/Nav.js +1 -1
- package/es6/components/Nav/index.d.ts +2 -2
- 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/Page/index.d.ts +2 -2
- package/es6/components/PageContent/PageContent.js +1 -1
- package/es6/components/PageContent/index.d.ts +2 -2
- 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/RadioButton/index.d.ts +2 -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/Thin.js +1 -7
- 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 +27 -11
- package/es6/components/Select/propTypes.js +1 -1
- package/es6/components/Select/stories/Clear.js +27 -2
- 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/Spinner/index.d.ts +2 -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 +8 -5
- package/es6/components/TableFooter/TableFooter.js +1 -1
- package/es6/components/TableHeader/TableHeader.js +1 -1
- package/es6/components/TableRow/TableRow.js +1 -1
- package/es6/components/Tabs/Tabs.js +227 -11
- package/es6/components/Tabs/propTypes.js +1 -1
- package/es6/components/Tabs/stories/Responsive.js +18 -0
- package/es6/components/Tag/Tag.js +1 -1
- package/es6/components/Tag/propTypes.js +1 -1
- package/es6/components/Text/Text.js +1 -1
- package/es6/components/Text/propTypes.js +1 -1
- package/es6/components/TextArea/TextArea.js +1 -1
- package/es6/components/TextArea/stories/NonResizable.js +1 -1
- package/es6/components/TextArea/stories/Simple.js +1 -1
- package/es6/components/TextInput/TextInput.js +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/Tip/index.d.ts +1 -0
- package/es6/components/Video/StyledVideo.js +2 -2
- package/es6/components/Video/Video.js +159 -55
- package/es6/components/Video/index.d.ts +15 -8
- package/es6/components/Video/propTypes.js +8 -6
- package/es6/components/Video/stories/typescript/ControlsBelow.tsx +10 -4
- package/es6/components/Video/stories/typescript/Simple.tsx +1 -1
- package/es6/components/Video/stories/typescript/TheaterMode.tsx +1 -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/contexts/ThemeContext/index.d.ts +4 -1
- package/es6/index.d.ts +1 -0
- package/es6/languages/default.json +4 -1
- package/es6/themes/base.d.ts +82 -21
- package/es6/themes/base.js +103 -5
- 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 +58 -54
- package/themes/base.d.ts +82 -21
- package/themes/base.js +104 -5
- 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
package/components/Tag/Tag.js
CHANGED
|
@@ -25,7 +25,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
27
|
|
|
28
|
-
function _extends() { _extends = Object.assign
|
|
28
|
+
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); }
|
|
29
29
|
|
|
30
30
|
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; }
|
|
31
31
|
|
|
@@ -9,7 +9,7 @@ var _generalPropTypes = require("../../utils/general-prop-types");
|
|
|
9
9
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
11
|
|
|
12
|
-
function _extends() { _extends = Object.assign
|
|
12
|
+
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); }
|
|
13
13
|
|
|
14
14
|
var PropType = {};
|
|
15
15
|
|
package/components/Text/Text.js
CHANGED
|
@@ -21,7 +21,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
23
|
|
|
24
|
-
function _extends() { _extends = Object.assign
|
|
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
25
|
|
|
26
26
|
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; }
|
|
27
27
|
|
|
@@ -9,7 +9,7 @@ var _generalPropTypes = require("../../utils/general-prop-types");
|
|
|
9
9
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
11
|
|
|
12
|
-
function _extends() { _extends = Object.assign
|
|
12
|
+
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); }
|
|
13
13
|
|
|
14
14
|
var PropType = {};
|
|
15
15
|
|
|
@@ -19,7 +19,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
21
|
|
|
22
|
-
function _extends() { _extends = Object.assign
|
|
22
|
+
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); }
|
|
23
23
|
|
|
24
24
|
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; }
|
|
25
25
|
|
|
@@ -11,7 +11,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
13
|
|
|
14
|
-
function _extends() { _extends = Object.assign
|
|
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
15
|
|
|
16
16
|
var Resize = function Resize(props) {
|
|
17
17
|
var _useState = (0, _react.useState)(''),
|
|
@@ -11,7 +11,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
13
|
|
|
14
|
-
function _extends() { _extends = Object.assign
|
|
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
15
|
|
|
16
16
|
var Resize = function Resize(props) {
|
|
17
17
|
var _useState = (0, _react.useState)(''),
|
|
@@ -37,7 +37,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
37
37
|
|
|
38
38
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
39
39
|
|
|
40
|
-
function _extends() { _extends = Object.assign
|
|
40
|
+
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); }
|
|
41
41
|
|
|
42
42
|
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; }
|
|
43
43
|
|
|
@@ -295,6 +295,8 @@ var TextInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
295
295
|
onClickOutside: clickOutside,
|
|
296
296
|
onEsc: closeDrop
|
|
297
297
|
}, dropProps), /*#__PURE__*/_react["default"].createElement(ContainerBox, {
|
|
298
|
+
id: id ? "listbox__" + id : undefined,
|
|
299
|
+
role: "listbox",
|
|
298
300
|
overflow: "auto",
|
|
299
301
|
dropHeight: dropHeight,
|
|
300
302
|
onMouseMove: function onMouseMove() {
|
|
@@ -307,8 +309,10 @@ var TextInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
307
309
|
step: theme.select.step,
|
|
308
310
|
show: activeSuggestionIndex !== -1 ? activeSuggestionIndex : undefined
|
|
309
311
|
}, function (suggestion, index, itemRef) {
|
|
310
|
-
|
|
312
|
+
var active = activeSuggestionIndex === index;
|
|
313
|
+
var selected = suggestion === value; // Determine whether the label is done as a child or
|
|
311
314
|
// as an option Button kind property.
|
|
315
|
+
|
|
312
316
|
var renderedLabel = renderLabel(suggestion);
|
|
313
317
|
var child;
|
|
314
318
|
if (typeof renderedLabel !== 'string') // must be an element rendered by suggestions.label
|
|
@@ -322,7 +326,10 @@ var TextInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
322
326
|
key: stringLabel(suggestion) + "-" + index,
|
|
323
327
|
ref: itemRef
|
|
324
328
|
}, /*#__PURE__*/_react["default"].createElement(_Button.Button, {
|
|
325
|
-
|
|
329
|
+
id: id ? "listbox-option-" + index + "__" + id : undefined,
|
|
330
|
+
role: "option",
|
|
331
|
+
"aria-selected": selected ? 'true' : 'false',
|
|
332
|
+
active: active,
|
|
326
333
|
fill: "horizontal",
|
|
327
334
|
plain: !child ? undefined : true,
|
|
328
335
|
align: "start",
|
|
@@ -354,6 +361,28 @@ var TextInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
354
361
|
keyboardProps.onTab = closeDrop;
|
|
355
362
|
} else if (suggestions && suggestions.length > 0) {
|
|
356
363
|
keyboardProps.onDown = openDrop;
|
|
364
|
+
}
|
|
365
|
+
/*
|
|
366
|
+
If the text input has a list of suggestions, add the WAI-ARIA 1.2
|
|
367
|
+
combobox role and states.
|
|
368
|
+
*/
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
var comboboxProps = {};
|
|
372
|
+
var activeOptionID;
|
|
373
|
+
|
|
374
|
+
if (id && (suggestions == null ? void 0 : suggestions.length) > -1) {
|
|
375
|
+
if (showDrop && activeSuggestionIndex > -1) {
|
|
376
|
+
activeOptionID = "listbox-option-" + activeSuggestionIndex + "__" + id;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
comboboxProps = {
|
|
380
|
+
'aria-activedescendant': activeOptionID,
|
|
381
|
+
'aria-autocomplete': 'list',
|
|
382
|
+
'aria-expanded': showDrop ? 'true' : 'false',
|
|
383
|
+
'aria-controls': showDrop ? "listbox__" + id : undefined,
|
|
384
|
+
role: 'combobox'
|
|
385
|
+
};
|
|
357
386
|
} // For the Keyboard target below, if we have focus,
|
|
358
387
|
// either on the input element or within the drop,
|
|
359
388
|
// then we set the target to the document,
|
|
@@ -381,7 +410,7 @@ var TextInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
381
410
|
focus: focus,
|
|
382
411
|
focusIndicator: focusIndicator,
|
|
383
412
|
textAlign: textAlign
|
|
384
|
-
}, rest, extraProps, {
|
|
413
|
+
}, rest, extraProps, comboboxProps, {
|
|
385
414
|
defaultValue: renderLabel(defaultValue),
|
|
386
415
|
value: renderLabel(value),
|
|
387
416
|
readOnly: readOnly,
|
|
@@ -38,6 +38,7 @@ var DefaultSuggestion = function DefaultSuggestion() {
|
|
|
38
38
|
}, /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
|
|
39
39
|
width: "medium"
|
|
40
40
|
}, /*#__PURE__*/_react["default"].createElement(_grommet.TextInput, {
|
|
41
|
+
id: "grommet-text-combobox-default-suggestion",
|
|
41
42
|
value: value,
|
|
42
43
|
onChange: onChange,
|
|
43
44
|
onSelect: onSelect,
|
|
@@ -11,7 +11,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
13
|
|
|
14
|
-
function _extends() { _extends = Object.assign
|
|
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
15
|
|
|
16
16
|
var allSuggestions = Array(100).fill().map(function (_, i) {
|
|
17
17
|
return "suggestion " + (i + 1);
|
|
@@ -49,6 +49,7 @@ var Suggestions = function Suggestions() {
|
|
|
49
49
|
}, /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
|
|
50
50
|
width: "medium"
|
|
51
51
|
}, /*#__PURE__*/_react["default"].createElement(_grommet.TextInput, {
|
|
52
|
+
id: "grommet-text-combobox",
|
|
52
53
|
value: value,
|
|
53
54
|
onChange: onChange,
|
|
54
55
|
onSuggestionSelect: onSuggestionSelect,
|
|
@@ -14,7 +14,7 @@ var _excluded = ["children", "onRemove"],
|
|
|
14
14
|
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
16
16
|
|
|
17
|
-
function _extends() { _extends = Object.assign
|
|
17
|
+
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); }
|
|
18
18
|
|
|
19
19
|
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; }
|
|
20
20
|
|
package/components/Tip/Tip.js
CHANGED
|
@@ -11,7 +11,7 @@ var _Box = require("../Box");
|
|
|
11
11
|
|
|
12
12
|
var _Drop = require("../Drop");
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _utils = require("../../utils");
|
|
15
15
|
|
|
16
16
|
var _propTypes = require("./propTypes");
|
|
17
17
|
|
|
@@ -19,7 +19,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
21
|
|
|
22
|
-
function _extends() { _extends = Object.assign
|
|
22
|
+
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); }
|
|
23
23
|
|
|
24
24
|
var Tip = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, tipRef) {
|
|
25
25
|
var children = _ref.children,
|
|
@@ -32,27 +32,8 @@ var Tip = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, tipRef) {
|
|
|
32
32
|
over = _useState[0],
|
|
33
33
|
setOver = _useState[1];
|
|
34
34
|
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
setUsingKeyboard = _useState2[1];
|
|
38
|
-
|
|
39
|
-
var onMouseDown = function onMouseDown() {
|
|
40
|
-
return setUsingKeyboard(false);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
var onKeyDown = function onKeyDown() {
|
|
44
|
-
return setUsingKeyboard(true);
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
(0, _react.useEffect)(function () {
|
|
48
|
-
document.addEventListener('mousedown', onMouseDown);
|
|
49
|
-
document.addEventListener('keydown', onKeyDown);
|
|
50
|
-
return function () {
|
|
51
|
-
document.removeEventListener('mousedown', onMouseDown);
|
|
52
|
-
document.removeEventListener('keydown', onKeyDown);
|
|
53
|
-
};
|
|
54
|
-
}, []);
|
|
55
|
-
var componentRef = (0, _refs.useForwardedRef)(tipRef); // Three use case for children
|
|
35
|
+
var usingKeyboard = (0, _utils.useKeyboard)();
|
|
36
|
+
var componentRef = (0, _utils.useForwardedRef)(tipRef); // Three use case for children
|
|
56
37
|
// 1. Tip has a single child + it is a React Element => Great!
|
|
57
38
|
// 2. Tip has a single child + not React Element =>
|
|
58
39
|
// span will wrap the child so we can use ref and events.
|
|
@@ -61,17 +42,29 @@ var Tip = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, tipRef) {
|
|
|
61
42
|
var child = _react.Children.count(children) <= 1 && ! /*#__PURE__*/_react["default"].isValidElement(children) && /*#__PURE__*/_react["default"].createElement("span", null, children) || _react.Children.only(children);
|
|
62
43
|
|
|
63
44
|
var clonedChild = /*#__PURE__*/(0, _react.cloneElement)(child, {
|
|
64
|
-
onMouseEnter: function onMouseEnter() {
|
|
65
|
-
|
|
45
|
+
onMouseEnter: function onMouseEnter(event) {
|
|
46
|
+
var _child$props;
|
|
47
|
+
|
|
48
|
+
setOver(true);
|
|
49
|
+
if ((_child$props = child.props) != null && _child$props.onMouseEnter) child.props.onMouseEnter(event);
|
|
66
50
|
},
|
|
67
|
-
onMouseLeave: function onMouseLeave() {
|
|
68
|
-
|
|
51
|
+
onMouseLeave: function onMouseLeave(event) {
|
|
52
|
+
var _child$props2;
|
|
53
|
+
|
|
54
|
+
setOver(false);
|
|
55
|
+
if ((_child$props2 = child.props) != null && _child$props2.onMouseLeave) child.props.onMouseLeave(event);
|
|
69
56
|
},
|
|
70
|
-
onFocus: function onFocus() {
|
|
57
|
+
onFocus: function onFocus(event) {
|
|
58
|
+
var _child$props3;
|
|
59
|
+
|
|
71
60
|
if (usingKeyboard) setOver(true);
|
|
61
|
+
if ((_child$props3 = child.props) != null && _child$props3.onFocus) child.props.onFocus(event);
|
|
72
62
|
},
|
|
73
|
-
onBlur: function onBlur() {
|
|
63
|
+
onBlur: function onBlur(event) {
|
|
64
|
+
var _child$props4;
|
|
65
|
+
|
|
74
66
|
if (usingKeyboard) setOver(false);
|
|
67
|
+
if ((_child$props4 = child.props) != null && _child$props4.onBlur) child.props.onBlur(event);
|
|
75
68
|
},
|
|
76
69
|
key: 'tip-child',
|
|
77
70
|
ref: function ref(node) {
|
|
@@ -39,7 +39,7 @@ Object.setPrototypeOf(StyledVideo.defaultProps, _defaultProps.defaultProps);
|
|
|
39
39
|
var StyledVideoContainer = _styledComponents["default"].div.withConfig({
|
|
40
40
|
displayName: "StyledVideo__StyledVideoContainer",
|
|
41
41
|
componentId: "sc-w4v8h9-1"
|
|
42
|
-
})(["flex:1 1;display:flex;flex-direction:column;overflow:hidden;position:relative;", "
|
|
42
|
+
})(["flex:1 1;display:flex;flex-direction:column;overflow:hidden;position:relative;", ";&:focus{", "}"], _utils.genericStyles, (0, _utils.focusStyle)());
|
|
43
43
|
|
|
44
44
|
exports.StyledVideoContainer = StyledVideoContainer;
|
|
45
45
|
StyledVideoContainer.defaultProps = {};
|