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
|
@@ -31,7 +31,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
31
31
|
|
|
32
32
|
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; }
|
|
33
33
|
|
|
34
|
-
function _extends() { _extends = Object.assign
|
|
34
|
+
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); }
|
|
35
35
|
|
|
36
36
|
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; }
|
|
37
37
|
|
|
@@ -155,7 +155,7 @@ var defaultMask = [{
|
|
|
155
155
|
var ContainerBox = (0, _styledComponents["default"])(_Box.Box).withConfig({
|
|
156
156
|
displayName: "MaskedInput__ContainerBox",
|
|
157
157
|
componentId: "sc-af8hzu-0"
|
|
158
|
-
})(["", "
|
|
158
|
+
})(["", ";"], function (props) {
|
|
159
159
|
return props.dropHeight ? (0, _utils.sizeStyle)('max-height', props.dropHeight, props.theme) : 'max-height: inherit;';
|
|
160
160
|
});
|
|
161
161
|
var dropAlign = {
|
|
@@ -196,19 +196,15 @@ var MaskedInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
196
196
|
value = _formContext$useFormI[0],
|
|
197
197
|
setValue = _formContext$useFormI[1];
|
|
198
198
|
|
|
199
|
-
var
|
|
200
|
-
|
|
201
|
-
setValueParts = _useState[1];
|
|
202
|
-
|
|
203
|
-
(0, _react.useEffect)(function () {
|
|
204
|
-
setValueParts(parseValue(mask, value));
|
|
199
|
+
var valueParts = (0, _react.useMemo)(function () {
|
|
200
|
+
return parseValue(mask, value);
|
|
205
201
|
}, [mask, value]);
|
|
206
202
|
var inputRef = (0, _utils.useForwardedRef)(ref);
|
|
207
203
|
var dropRef = (0, _react.useRef)(); // Caller's ref, if provided
|
|
208
204
|
|
|
209
|
-
var
|
|
210
|
-
dropPropsTarget =
|
|
211
|
-
setDropPropsTarget =
|
|
205
|
+
var _useState = (0, _react.useState)(),
|
|
206
|
+
dropPropsTarget = _useState[0],
|
|
207
|
+
setDropPropsTarget = _useState[1];
|
|
212
208
|
|
|
213
209
|
(0, _react.useEffect)(function () {
|
|
214
210
|
var nextDropPropsTarget; // If caller provided a ref, set to 'pending' until ref.current is defined
|
|
@@ -219,21 +215,21 @@ var MaskedInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
219
215
|
}
|
|
220
216
|
}, [dropProps]);
|
|
221
217
|
|
|
222
|
-
var
|
|
223
|
-
focus =
|
|
224
|
-
setFocus =
|
|
218
|
+
var _useState2 = (0, _react.useState)(focusProp),
|
|
219
|
+
focus = _useState2[0],
|
|
220
|
+
setFocus = _useState2[1];
|
|
221
|
+
|
|
222
|
+
var _useState3 = (0, _react.useState)(),
|
|
223
|
+
activeMaskIndex = _useState3[0],
|
|
224
|
+
setActiveMaskIndex = _useState3[1];
|
|
225
225
|
|
|
226
226
|
var _useState4 = (0, _react.useState)(),
|
|
227
|
-
|
|
228
|
-
|
|
227
|
+
activeOptionIndex = _useState4[0],
|
|
228
|
+
setActiveOptionIndex = _useState4[1];
|
|
229
229
|
|
|
230
230
|
var _useState5 = (0, _react.useState)(),
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
var _useState6 = (0, _react.useState)(),
|
|
235
|
-
showDrop = _useState6[0],
|
|
236
|
-
setShowDrop = _useState6[1];
|
|
231
|
+
showDrop = _useState5[0],
|
|
232
|
+
setShowDrop = _useState5[1];
|
|
237
233
|
|
|
238
234
|
(0, _react.useEffect)(function () {
|
|
239
235
|
if (focus) {
|
|
@@ -287,16 +283,29 @@ var MaskedInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
287
283
|
}, [inputRef]); // This could be due to a paste or as the user is typing.
|
|
288
284
|
|
|
289
285
|
var onChangeInput = (0, _react.useCallback)(function (event) {
|
|
290
|
-
// Align with the mask.
|
|
291
|
-
|
|
286
|
+
var eventValue = event.target.value; // Align with the mask.
|
|
287
|
+
|
|
288
|
+
var nextValueParts = parseValue(mask, eventValue);
|
|
292
289
|
var nextValue = nextValueParts.map(function (part) {
|
|
293
290
|
return part.part;
|
|
294
291
|
}).join('');
|
|
295
292
|
|
|
296
|
-
if (nextValue !==
|
|
297
|
-
// The mask
|
|
298
|
-
//
|
|
299
|
-
|
|
293
|
+
if (nextValue !== eventValue) {
|
|
294
|
+
// The mask adjusted the next value. If something was added,
|
|
295
|
+
// the value must be valid. Change the actual input value
|
|
296
|
+
// to correspond.
|
|
297
|
+
// This will re-trigger this callback with the next value.
|
|
298
|
+
if (nextValue.length > eventValue.length) setInputValue(nextValue); // If the nextValue is shorter, something must be invalid.
|
|
299
|
+
else if (value && eventValue.length < value.length) {
|
|
300
|
+
// If the user is removing characters, preserve what the
|
|
301
|
+
// user is working on.
|
|
302
|
+
setValue(eventValue);
|
|
303
|
+
if (onChange) onChange(event);
|
|
304
|
+
} else {
|
|
305
|
+
// If the user is adding invalid characters, don't allow it.
|
|
306
|
+
// Revert to the prior value.
|
|
307
|
+
setInputValue(value);
|
|
308
|
+
}
|
|
300
309
|
} else if (value !== nextValue) {
|
|
301
310
|
setValue(nextValue);
|
|
302
311
|
if (onChange) onChange(event);
|
package/components/Menu/Menu.js
CHANGED
|
@@ -32,7 +32,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
32
32
|
|
|
33
33
|
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; }
|
|
34
34
|
|
|
35
|
-
function _extends() { _extends = Object.assign
|
|
35
|
+
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); }
|
|
36
36
|
|
|
37
37
|
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; }
|
|
38
38
|
|
|
@@ -95,12 +95,25 @@ var Menu = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
95
95
|
themeDropAlign = _theme$menu$drop.align,
|
|
96
96
|
themeDropProps = _objectWithoutPropertiesLoose(_theme$menu$drop, _excluded2);
|
|
97
97
|
|
|
98
|
+
var a11y = ariaLabel || a11yTitle; // total number of menu items
|
|
99
|
+
|
|
100
|
+
var itemCount = (0, _react.useMemo)(function () {
|
|
101
|
+
var count = 0;
|
|
102
|
+
|
|
103
|
+
if (items && Array.isArray(items[0])) {
|
|
104
|
+
items.forEach(function (group) {
|
|
105
|
+
count += group.length;
|
|
106
|
+
});
|
|
107
|
+
} else count = items.length;
|
|
108
|
+
|
|
109
|
+
return count;
|
|
110
|
+
}, [items]);
|
|
98
111
|
var align = dropProps && dropProps.align || dropAlign || themeDropAlign;
|
|
99
112
|
var controlButtonIndex = (0, _react.useMemo)(function () {
|
|
100
113
|
if (align.top === 'top') return -1;
|
|
101
|
-
if (align.bottom === 'bottom') return
|
|
114
|
+
if (align.bottom === 'bottom') return itemCount;
|
|
102
115
|
return undefined;
|
|
103
|
-
}, [align,
|
|
116
|
+
}, [align, itemCount]); // Keeps track of whether menu options should be mirrored
|
|
104
117
|
// when there's not enough space below DropButton. This state
|
|
105
118
|
// is modified on /Drop/DropContainer.js.
|
|
106
119
|
|
|
@@ -176,7 +189,7 @@ var Menu = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
176
189
|
|
|
177
190
|
if (!isOpen) {
|
|
178
191
|
onDropOpen();
|
|
179
|
-
} else if (isTab(event) && (!constants.controlBottom && activeItemIndex ===
|
|
192
|
+
} else if (isTab(event) && (!constants.controlBottom && activeItemIndex === itemCount - 1 || constants.controlBottom && activeItemIndex === controlButtonIndex)) {
|
|
180
193
|
// User has reached end of the menu, this tab will close
|
|
181
194
|
// the menu drop because there are no more "next items" to access
|
|
182
195
|
onDropClose();
|
|
@@ -187,7 +200,7 @@ var Menu = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
187
200
|
// In the case the the menu control button is located at the
|
|
188
201
|
// bottom of the menu, it checks if the user has reached the button.
|
|
189
202
|
// Otherwise, it checks if the user is at the last menu item.
|
|
190
|
-
constants.controlBottom && activeItemIndex === controlButtonIndex || !constants.controlBottom && activeItemIndex ===
|
|
203
|
+
constants.controlBottom && activeItemIndex === controlButtonIndex || !constants.controlBottom && activeItemIndex === itemCount - 1 || activeItemIndex === constants.none) {
|
|
191
204
|
// place focus on the first menu item
|
|
192
205
|
index = 0;
|
|
193
206
|
} else {
|
|
@@ -215,12 +228,12 @@ var Menu = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
215
228
|
var index;
|
|
216
229
|
|
|
217
230
|
if (activeItemIndex === 'none') {
|
|
218
|
-
index =
|
|
231
|
+
index = itemCount - 1;
|
|
219
232
|
} else if (activeItemIndex - 1 < 0) {
|
|
220
233
|
if (constants.controlTop && activeItemIndex - 1 === controlButtonIndex) {
|
|
221
|
-
index =
|
|
234
|
+
index = itemCount;
|
|
222
235
|
} else {
|
|
223
|
-
index =
|
|
236
|
+
index = itemCount - 1;
|
|
224
237
|
}
|
|
225
238
|
} else {
|
|
226
239
|
index = activeItemIndex - 1;
|
|
@@ -274,9 +287,9 @@ var Menu = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
274
287
|
}, /*#__PURE__*/_react["default"].createElement(_Button.Button, _extends({
|
|
275
288
|
ref: function ref(r) {
|
|
276
289
|
// make it accessible at the end of all menu items
|
|
277
|
-
buttonRefs.current[
|
|
290
|
+
buttonRefs.current[itemCount] = r;
|
|
278
291
|
},
|
|
279
|
-
a11yTitle:
|
|
292
|
+
a11yTitle: a11y || format({
|
|
280
293
|
id: 'menu.closeMenu',
|
|
281
294
|
messages: messages
|
|
282
295
|
}),
|
|
@@ -297,6 +310,88 @@ var Menu = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
297
310
|
}));
|
|
298
311
|
} : content));
|
|
299
312
|
|
|
313
|
+
var menuItem = function menuItem(item, index) {
|
|
314
|
+
// Determine whether the label is done as a child or
|
|
315
|
+
// as an option Button kind property.
|
|
316
|
+
var child = !theme.button.option ? /*#__PURE__*/_react["default"].createElement(_Box.Box, {
|
|
317
|
+
align: "start",
|
|
318
|
+
pad: "small",
|
|
319
|
+
direction: "row",
|
|
320
|
+
gap: item.gap,
|
|
321
|
+
justify: item.justify
|
|
322
|
+
}, item.reverse && item.label, item.icon, !item.reverse && item.label) : undefined; // if we have a child, turn on plain, and hoverIndicator
|
|
323
|
+
|
|
324
|
+
return (
|
|
325
|
+
/*#__PURE__*/
|
|
326
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
327
|
+
_react["default"].createElement(_Box.Box, {
|
|
328
|
+
key: index,
|
|
329
|
+
flex: false,
|
|
330
|
+
role: "none"
|
|
331
|
+
}, /*#__PURE__*/_react["default"].createElement(_Button.Button, _extends({
|
|
332
|
+
ref: function ref(r) {
|
|
333
|
+
buttonRefs.current[index] = r;
|
|
334
|
+
},
|
|
335
|
+
role: "menuitem",
|
|
336
|
+
onFocus: function onFocus() {
|
|
337
|
+
setActiveItemIndex(index);
|
|
338
|
+
},
|
|
339
|
+
active: activeItemIndex === index,
|
|
340
|
+
focusIndicator: false,
|
|
341
|
+
plain: !child ? undefined : true,
|
|
342
|
+
align: "start",
|
|
343
|
+
justify: item.justify,
|
|
344
|
+
kind: !child ? 'option' : undefined,
|
|
345
|
+
hoverIndicator: !child ? undefined : 'background'
|
|
346
|
+
}, !child ? item : _extends({}, item, {
|
|
347
|
+
gap: undefined,
|
|
348
|
+
icon: undefined,
|
|
349
|
+
label: undefined,
|
|
350
|
+
reverse: undefined
|
|
351
|
+
}), {
|
|
352
|
+
onClick: function onClick() {
|
|
353
|
+
if (item.onClick) {
|
|
354
|
+
item.onClick.apply(item, arguments);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
if (item.close !== false) {
|
|
358
|
+
onDropClose();
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}), child))
|
|
362
|
+
);
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
var menuContent;
|
|
366
|
+
|
|
367
|
+
if (itemCount && Array.isArray(items[0])) {
|
|
368
|
+
var index = 0;
|
|
369
|
+
menuContent = items.map(function (group, groupIndex) {
|
|
370
|
+
var _theme$menu$group, _theme$menu$group$sep, _theme$menu$group2, _theme$menu$group2$se, _theme$menu$group3;
|
|
371
|
+
|
|
372
|
+
return /*#__PURE__*/_react["default"].createElement(_Box.Box // eslint-disable-next-line react/no-array-index-key
|
|
373
|
+
, {
|
|
374
|
+
key: groupIndex
|
|
375
|
+
}, groupIndex > 0 && /*#__PURE__*/_react["default"].createElement(_Box.Box, {
|
|
376
|
+
pad: theme.menu.group.separator.pad
|
|
377
|
+
}, /*#__PURE__*/_react["default"].createElement(_Box.Box, {
|
|
378
|
+
border: {
|
|
379
|
+
side: 'top',
|
|
380
|
+
color: (_theme$menu$group = theme.menu.group) == null ? void 0 : (_theme$menu$group$sep = _theme$menu$group.separator) == null ? void 0 : _theme$menu$group$sep.color,
|
|
381
|
+
size: (_theme$menu$group2 = theme.menu.group) == null ? void 0 : (_theme$menu$group2$se = _theme$menu$group2.separator) == null ? void 0 : _theme$menu$group2$se.size
|
|
382
|
+
}
|
|
383
|
+
})), /*#__PURE__*/_react["default"].createElement(_Box.Box, (_theme$menu$group3 = theme.menu.group) == null ? void 0 : _theme$menu$group3.container, group.map(function (item) {
|
|
384
|
+
// item index needs to be its index in the entire menu as if
|
|
385
|
+
// it were a flat array
|
|
386
|
+
var currentIndex = index;
|
|
387
|
+
index += 1;
|
|
388
|
+
return menuItem(item, currentIndex);
|
|
389
|
+
})));
|
|
390
|
+
});
|
|
391
|
+
} else menuContent = items.map(function (item, index) {
|
|
392
|
+
return menuItem(item, index);
|
|
393
|
+
});
|
|
394
|
+
|
|
300
395
|
return /*#__PURE__*/_react["default"].createElement(_Keyboard.Keyboard, {
|
|
301
396
|
onDown: onDropOpen,
|
|
302
397
|
onUp: onDropOpen,
|
|
@@ -307,7 +402,7 @@ var Menu = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
307
402
|
}, /*#__PURE__*/_react["default"].createElement(_DropButton.DropButton, _extends({
|
|
308
403
|
ref: ref
|
|
309
404
|
}, rest, buttonProps, {
|
|
310
|
-
a11yTitle:
|
|
405
|
+
a11yTitle: a11y || format({
|
|
311
406
|
id: 'menu.openMenu',
|
|
312
407
|
messages: messages
|
|
313
408
|
}),
|
|
@@ -335,58 +430,8 @@ var Menu = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
335
430
|
}, alignControlMirror === 'top' && align.top === 'top' ? controlMirror : undefined, /*#__PURE__*/_react["default"].createElement(_Box.Box, {
|
|
336
431
|
overflow: "auto",
|
|
337
432
|
role: "menu",
|
|
338
|
-
a11yTitle:
|
|
339
|
-
},
|
|
340
|
-
// Determine whether the label is done as a child or
|
|
341
|
-
// as an option Button kind property.
|
|
342
|
-
var child = !theme.button.option ? /*#__PURE__*/_react["default"].createElement(_Box.Box, {
|
|
343
|
-
align: "start",
|
|
344
|
-
pad: "small",
|
|
345
|
-
direction: "row",
|
|
346
|
-
gap: item.gap,
|
|
347
|
-
justify: item.justify
|
|
348
|
-
}, item.reverse && item.label, item.icon, !item.reverse && item.label) : undefined; // if we have a child, turn on plain, and hoverIndicator
|
|
349
|
-
|
|
350
|
-
return (
|
|
351
|
-
/*#__PURE__*/
|
|
352
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
353
|
-
_react["default"].createElement(_Box.Box, {
|
|
354
|
-
key: index,
|
|
355
|
-
flex: false,
|
|
356
|
-
role: "none"
|
|
357
|
-
}, /*#__PURE__*/_react["default"].createElement(_Button.Button, _extends({
|
|
358
|
-
ref: function ref(r) {
|
|
359
|
-
buttonRefs.current[index] = r;
|
|
360
|
-
},
|
|
361
|
-
role: "menuitem",
|
|
362
|
-
onFocus: function onFocus() {
|
|
363
|
-
setActiveItemIndex(index);
|
|
364
|
-
},
|
|
365
|
-
active: activeItemIndex === index,
|
|
366
|
-
focusIndicator: false,
|
|
367
|
-
plain: !child ? undefined : true,
|
|
368
|
-
align: "start",
|
|
369
|
-
justify: item.justify,
|
|
370
|
-
kind: !child ? 'option' : undefined,
|
|
371
|
-
hoverIndicator: !child ? undefined : 'background'
|
|
372
|
-
}, !child ? item : _extends({}, item, {
|
|
373
|
-
gap: undefined,
|
|
374
|
-
icon: undefined,
|
|
375
|
-
label: undefined,
|
|
376
|
-
reverse: undefined
|
|
377
|
-
}), {
|
|
378
|
-
onClick: function onClick() {
|
|
379
|
-
if (item.onClick) {
|
|
380
|
-
item.onClick.apply(item, arguments);
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
if (item.close !== false) {
|
|
384
|
-
onDropClose();
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
}), child))
|
|
388
|
-
);
|
|
389
|
-
})), !initialAlignTop && (alignControlMirror === 'bottom' || align.bottom === 'bottom') ? controlMirror : undefined))
|
|
433
|
+
a11yTitle: a11y
|
|
434
|
+
}, menuContent), !initialAlignTop && (alignControlMirror === 'bottom' || align.bottom === 'bottom') ? controlMirror : undefined))
|
|
390
435
|
}), content));
|
|
391
436
|
});
|
|
392
437
|
exports.Menu = Menu;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DropProps } from '../Drop';
|
|
3
|
-
import { ButtonType } from '../Button';
|
|
3
|
+
import { ButtonProps, ButtonType } from '../Button';
|
|
4
4
|
import {
|
|
5
5
|
A11yTitleType,
|
|
6
6
|
AlignSelfType,
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
export interface MenuProps {
|
|
14
14
|
a11yTitle?: A11yTitleType;
|
|
15
15
|
alignSelf?: AlignSelfType;
|
|
16
|
+
children?: Function | React.ReactNode;
|
|
16
17
|
disabled?: boolean;
|
|
17
18
|
dropAlign?: {
|
|
18
19
|
top?: 'top' | 'bottom';
|
|
@@ -30,7 +31,7 @@ export interface MenuProps {
|
|
|
30
31
|
dropProps?: DropProps;
|
|
31
32
|
gridArea?: GridAreaType;
|
|
32
33
|
icon?: boolean | React.ReactNode;
|
|
33
|
-
items:
|
|
34
|
+
items: ButtonProps[] | ButtonProps[][];
|
|
34
35
|
justifyContent?: JustifyContentType;
|
|
35
36
|
label?: string | React.ReactNode;
|
|
36
37
|
margin?: MarginType;
|
|
@@ -41,7 +42,7 @@ export interface MenuProps {
|
|
|
41
42
|
|
|
42
43
|
export interface MenuExtendedProps
|
|
43
44
|
extends MenuProps,
|
|
44
|
-
Omit<ButtonType, 'icon' | 'size'> {}
|
|
45
|
+
Omit<ButtonType, 'icon' | 'size' | 'children'> {}
|
|
45
46
|
|
|
46
47
|
declare const Menu: React.FC<MenuExtendedProps>;
|
|
47
48
|
|
|
@@ -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 VERTICAL_ALIGN_OPTIONS = ['top', 'bottom'];
|
|
15
15
|
var HORIZONTAL_ALIGN_OPTIONS = ['right', 'left'];
|
|
@@ -33,7 +33,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
33
33
|
dropProps: _propTypes["default"].object,
|
|
34
34
|
justifyContent: _propTypes["default"].oneOf(['start', 'center', 'end', 'between', 'around', 'stretch']),
|
|
35
35
|
icon: _propTypes["default"].oneOfType([_propTypes["default"].bool, _propTypes["default"].node]),
|
|
36
|
-
items: _propTypes["default"].arrayOf(_propTypes["default"].object).isRequired,
|
|
36
|
+
items: _propTypes["default"].oneOfType([_propTypes["default"].arrayOf(_propTypes["default"].object), _propTypes["default"].arrayOf(_propTypes["default"].arrayOf(_propTypes["default"].object))]).isRequired,
|
|
37
37
|
label: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].node]),
|
|
38
38
|
messages: _propTypes["default"].shape({
|
|
39
39
|
closeMenu: _propTypes["default"].string,
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = exports.Grouped = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
|
|
8
|
+
var _grommet = require("grommet");
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
var Grouped = function Grouped() {
|
|
13
|
+
return (
|
|
14
|
+
/*#__PURE__*/
|
|
15
|
+
// Uncomment <Grommet> lines when using outside of storybook
|
|
16
|
+
// <Grommet theme={...}>
|
|
17
|
+
_react["default"].createElement(_grommet.Box, {
|
|
18
|
+
align: "center",
|
|
19
|
+
pad: "large"
|
|
20
|
+
}, /*#__PURE__*/_react["default"].createElement(_grommet.Menu, {
|
|
21
|
+
dropProps: {
|
|
22
|
+
align: {
|
|
23
|
+
top: 'bottom',
|
|
24
|
+
left: 'left'
|
|
25
|
+
},
|
|
26
|
+
elevation: 'xlarge'
|
|
27
|
+
},
|
|
28
|
+
label: "Grouped Menu",
|
|
29
|
+
items: [[{
|
|
30
|
+
label: 'View Details'
|
|
31
|
+
}, {
|
|
32
|
+
label: 'Edit Permissions'
|
|
33
|
+
}, {
|
|
34
|
+
label: 'Update Password'
|
|
35
|
+
}], [{
|
|
36
|
+
label: 'Delete'
|
|
37
|
+
}]]
|
|
38
|
+
})) // </Grommet>
|
|
39
|
+
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
exports.Grouped = Grouped;
|
|
44
|
+
Grouped.parameters = {
|
|
45
|
+
chromatic: {
|
|
46
|
+
disable: true
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var _default = {
|
|
50
|
+
title: 'Controls/Menu/Grouped'
|
|
51
|
+
};
|
|
52
|
+
exports["default"] = _default;
|
package/components/Meter/Bar.js
CHANGED
|
@@ -22,7 +22,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
22
22
|
|
|
23
23
|
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; }
|
|
24
24
|
|
|
25
|
-
function _extends() { _extends = Object.assign
|
|
25
|
+
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); }
|
|
26
26
|
|
|
27
27
|
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; }
|
|
28
28
|
|
|
@@ -22,7 +22,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
22
22
|
|
|
23
23
|
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; }
|
|
24
24
|
|
|
25
|
-
function _extends() { _extends = Object.assign
|
|
25
|
+
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); }
|
|
26
26
|
|
|
27
27
|
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; }
|
|
28
28
|
|
|
@@ -41,8 +41,10 @@ var Circle = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
41
41
|
var strokeWidth = type === 'pie' ? width / 2 : (0, _utils.parseMetricToNum)(theme.global.edgeSize[thickness] || thickness);
|
|
42
42
|
var centerX = width / 2;
|
|
43
43
|
var centerY = width / 2;
|
|
44
|
-
var radius = width / 2 - strokeWidth / 2;
|
|
45
|
-
|
|
44
|
+
var radius = width / 2 - strokeWidth / 2; // truncate to avoid floating point arithmetic errors
|
|
45
|
+
// see: https://github.com/grommet/grommet/issues/6190
|
|
46
|
+
|
|
47
|
+
var anglePer = Math.floor((type === 'semicircle' ? 180 : 360) / max * 10000) / 10000;
|
|
46
48
|
var someHighlight = (values || []).some(function (v) {
|
|
47
49
|
return v.highlight;
|
|
48
50
|
});
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
17
|
|
|
18
18
|
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; }
|
|
19
19
|
|
|
20
|
-
function _extends() { _extends = Object.assign
|
|
20
|
+
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); }
|
|
21
21
|
|
|
22
22
|
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; }
|
|
23
23
|
|
|
@@ -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
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { AlignType, WidthType } from '../../utils';
|
|
3
|
+
import { GridProps } from '../Grid';
|
|
3
4
|
export interface NameValueListProps {
|
|
4
5
|
align?: AlignType;
|
|
6
|
+
children?: React.ReactNode;
|
|
5
7
|
layout?: 'column' | 'grid';
|
|
6
8
|
nameProps?: {
|
|
7
9
|
align?: AlignType;
|
|
@@ -17,8 +19,9 @@ export interface NameValueListProps {
|
|
|
17
19
|
}
|
|
18
20
|
export interface NameValueListExtendedProps
|
|
19
21
|
extends NameValueListProps,
|
|
22
|
+
GridProps,
|
|
20
23
|
Omit<JSX.IntrinsicElements['dl'], keyof NameValueListProps> {}
|
|
21
24
|
|
|
22
|
-
declare const NameValueList: React.FC<
|
|
25
|
+
declare const NameValueList: React.FC<NameValueListExtendedProps>;
|
|
23
26
|
|
|
24
27
|
export { NameValueList };
|
|
@@ -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 NameValuePair = function NameValuePair(_ref) {
|
|
25
25
|
var _theme$nameValuePair, _theme$nameValuePair$;
|
package/components/Nav/Nav.js
CHANGED
|
@@ -9,7 +9,7 @@ var _Box = require("../Box");
|
|
|
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 Nav = function Nav(_ref) {
|
|
15
15
|
var rest = _extends({}, _ref);
|
|
@@ -15,7 +15,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
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; }
|
|
17
17
|
|
|
18
|
-
function _extends() { _extends = Object.assign
|
|
18
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
19
|
|
|
20
20
|
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; }
|
|
21
21
|
|
|
@@ -13,7 +13,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
13
13
|
|
|
14
14
|
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; }
|
|
15
15
|
|
|
16
|
-
function _extends() { _extends = Object.assign
|
|
16
|
+
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); }
|
|
17
17
|
|
|
18
18
|
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; }
|
|
19
19
|
|