grommet 2.47.0 → 2.49.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.stories.js +1 -2
- package/components/Accordion/Accordion.js +1 -2
- package/components/Accordion/stories/CustomHeader.stories.js +1 -2
- package/components/AccordionPanel/AccordionPanel.js +4 -8
- package/components/Anchor/Anchor.js +5 -6
- package/components/Anchor/StyledAnchor.js +2 -3
- package/components/Avatar/Avatar.js +1 -2
- package/components/Box/Box.js +6 -3
- package/components/Box/ResponsiveContainerProvider.js +1 -2
- package/components/Box/StyledBox.js +5 -4
- package/components/Box/stories/ResponsiveContainer.stories.js +1 -2
- package/components/Button/Badge.js +1 -2
- package/components/Button/BusyAnimation.js +6 -3
- package/components/Button/Button.js +4 -3
- package/components/Button/StyledButton.js +4 -3
- package/components/Button/StyledButtonKind.js +4 -3
- package/components/Button/index.d.ts +1 -1
- package/components/Button/propTypes.js +1 -1
- package/components/Button/stories/Busy.stories.js +1 -2
- package/components/Calendar/Calendar.js +159 -140
- package/components/Calendar/StyledCalendar.js +34 -37
- package/components/Calendar/stories/ActiveDate.stories.js +1 -2
- package/components/Calendar/stories/CustomDay.stories.js +1 -2
- package/components/Calendar/stories/CustomHeader.stories.js +1 -2
- package/components/Calendar/stories/CustomThemed/CustomSizeHeading.stories.js +1 -2
- package/components/Calendar/stories/Dual.stories.js +1 -4
- package/components/Calendar/stories/HeaderLevel.stories.js +1 -2
- package/components/Calendar/stories/Multiple.stories.js +1 -2
- package/components/Calendar/stories/ShowAdjacentDays.stories.js +2 -3
- package/components/Calendar/stories/Simple.stories.js +1 -2
- package/components/Card/Card.js +1 -2
- package/components/Cards/Cards.js +4 -6
- package/components/Carousel/Carousel.js +1 -2
- package/components/Carousel/CarouselChild.js +1 -2
- package/components/Carousel/StyledCarousel.js +1 -2
- package/components/Chart/Chart.js +15 -14
- package/components/Chart/StyledChart.js +1 -2
- package/components/Chart/calcs.js +21 -13
- package/components/Chart/stories/Rich.stories.js +1 -2
- package/components/Chart/stories/Scan.stories.js +1 -2
- package/components/Chart/stories/Window.stories.js +1 -2
- package/components/Chart/stories/Zoom.stories.js +1 -2
- package/components/CheckBox/CheckBox.js +2 -3
- package/components/CheckBox/StyledCheckBox.js +1 -2
- package/components/CheckBox/stories/CustomThemed/Custom.stories.js +1 -2
- package/components/CheckBox/stories/CustomThemed/CustomToggle.stories.js +1 -2
- package/components/CheckBox/stories/Indeterminate.stories.js +1 -2
- package/components/CheckBox/stories/NoLabel.stories.js +1 -2
- package/components/CheckBox/stories/Simple.stories.js +1 -2
- package/components/CheckBox/stories/WithStickyDiv.stories.js +1 -2
- package/components/CheckBoxGroup/CheckBoxGroup.js +15 -5
- package/components/CheckBoxGroup/stories/Children.stories.js +1 -2
- package/components/CheckBoxGroup/stories/InitialValues.stories.js +1 -2
- package/components/Clock/Analog.js +1 -2
- package/components/Clock/Clock.js +1 -2
- package/components/Clock/Digital.js +1 -2
- package/components/Clock/StyledClock.js +1 -2
- package/components/Collapsible/Collapsible.js +1 -2
- package/components/Data/Data.js +6 -3
- package/components/Data/DataForm.js +7 -6
- package/components/Data/index.d.ts +3 -0
- package/components/Data/propTypes.js +4 -1
- package/components/Data/stories/Infinite.stories.js +11 -17
- package/components/Data/stories/Inline.stories.js +1 -2
- package/components/Data/stories/OnSelect.stories.js +11 -17
- package/components/Data/stories/SpaceX.stories.js +11 -17
- package/components/Data/stories/StarWars.stories.js +16 -44
- package/components/DataChart/DataChart.js +18 -17
- package/components/DataChart/Detail.js +3 -4
- package/components/DataChart/Legend.js +9 -11
- package/components/DataChart/XAxis.js +1 -2
- package/components/DataChart/XGuide.js +1 -2
- package/components/DataChart/YAxis.js +1 -2
- package/components/DataChart/YGuide.js +1 -2
- package/components/DataChart/stories/Prediction.stories.js +1 -2
- package/components/DataChart/utils.js +15 -8
- package/components/DataClearFilters/DataClearFilters.js +1 -2
- package/components/DataClearFilters/stories/Simple.stories.js +1 -2
- package/components/DataFilter/DataFilter.js +15 -12
- package/components/DataFilters/DataFilters.js +10 -12
- package/components/DataSearch/DataSearch.js +6 -6
- package/components/DataSort/DataSort.js +7 -6
- package/components/DataSummary/DataSummary.js +7 -8
- package/components/DataTable/Body.js +106 -35
- package/components/DataTable/Cell.js +1 -2
- package/components/DataTable/DataTable.js +49 -16
- package/components/DataTable/ExpanderCell.js +55 -7
- package/components/DataTable/Footer.js +7 -5
- package/components/DataTable/GroupedBody.js +12 -5
- package/components/DataTable/Header.js +87 -34
- package/components/DataTable/PlaceholderBody.js +1 -2
- package/components/DataTable/Resizer.js +167 -47
- package/components/DataTable/Searcher.js +40 -13
- package/components/DataTable/StyledDataTable.js +2 -3
- package/components/DataTable/index.d.ts +19 -0
- package/components/DataTable/propTypes.js +19 -0
- package/components/DataTable/stories/ControlledGrouped.stories.js +5 -2
- package/components/DataTable/stories/Grouped.stories.js +7 -1
- package/components/DataTable/stories/GroupedOnSelect.stories.js +7 -1
- package/components/DataTable/stories/OnUpdate.stories.js +4 -2
- package/components/DataTable/stories/SpaceX.stories.js +23 -18
- package/components/DataTable/stories/SpaceXUngrouped.stories.js +8 -9
- package/components/DataTable/stories/Styled.stories.js +5 -1
- package/components/DataTable/stories/rowDetails.stories.js +22 -48
- package/components/DataTableColumns/DataTableColumns.js +39 -24
- package/components/DataTableGroupBy/DataTableGroupBy.js +1 -2
- package/components/DataView/DataView.js +1 -2
- package/components/DateInput/DateInput.js +20 -19
- package/components/DateInput/stories/FormatInline.stories.js +1 -2
- package/components/Diagram/Diagram.js +1 -2
- package/components/Diagram/StyledDiagram.js +1 -2
- package/components/Diagram/stories/Animated.stories.js +1 -2
- package/components/Diagram/stories/Progressing.stories.js +1 -2
- package/components/Distribution/Distribution.js +8 -5
- package/components/Drop/Drop.js +1 -2
- package/components/Drop/DropContainer.js +1 -2
- package/components/Drop/StyledDrop.js +1 -2
- package/components/Drop/stories/CustomThemed/Lazy.stories.js +1 -2
- package/components/Drop/stories/CustomThemed/Themed.stories.js +1 -2
- package/components/Drop/stories/Inline.stories.js +1 -2
- package/components/Drop/stories/Meter.stories.js +1 -2
- package/components/Drop/stories/Multiple.stories.js +1 -2
- package/components/Drop/stories/Overflow.stories.js +1 -2
- package/components/Drop/stories/Plain.stories.js +1 -2
- package/components/Drop/stories/Progressive.stories.js +1 -2
- package/components/Drop/stories/Simple.stories.js +1 -2
- package/components/Drop/stories/Styled.stories.js +1 -2
- package/components/DropButton/DropButton.js +1 -2
- package/components/FileInput/FileInput.js +78 -41
- package/components/FileInput/index.d.ts +10 -1
- package/components/FileInput/propTypes.js +11 -0
- package/components/FocusedContainer.js +1 -2
- package/components/Footer/Footer.js +5 -1
- package/components/Form/Form.js +11 -12
- package/components/Form/FormContext.js +1 -2
- package/components/Form/stories/ArrayOfFormFields.stories.js +1 -2
- package/components/Form/stories/Controlled.stories.js +2 -2
- package/components/Form/stories/ControlledInput.stories.js +2 -2
- package/components/Form/stories/ControlledInputLazy.stories.js +2 -2
- package/components/Form/stories/ControlledLazy.stories.js +2 -2
- package/components/Form/stories/CustomThemed/Custom.stories.js +1 -0
- package/components/Form/stories/CustomThemed/FieldBorderPosition.stories.js +1 -2
- package/components/Form/stories/CustomThemed/FieldCustomStates.stories.js +1 -2
- package/components/Form/stories/DynamicFields.stories.js +1 -2
- package/components/Form/stories/FieldStates.stories.js +1 -2
- package/components/Form/stories/FieldWithChildren.stories.js +2 -0
- package/components/Form/stories/SolicitedFeedback.stories.js +1 -2
- package/components/Form/stories/Uncontrolled.stories.js +1 -0
- package/components/Form/stories/UnsolicitedFeedback.stories.js +1 -2
- package/components/Form/stories/ValidateOnBlur.stories.js +1 -1
- package/components/Form/stories/ValidateOnChange.stories.js +1 -2
- package/components/Form/stories/ValidateOnMount.stories.js +1 -2
- package/components/Form/stories/typescript/TypedForm.stories.tsx +7 -1
- package/components/FormField/FormField.js +23 -3
- package/components/FormField/stories/Simple.stories.js +1 -2
- package/components/Grid/Grid.js +1 -2
- package/components/Grid/StyledGrid.js +1 -2
- package/components/Grid/stories/ResponsiveCards.stories.js +1 -2
- package/components/Grommet/Grommet.js +1 -2
- package/components/Grommet/StyledGrommet.js +1 -2
- package/components/Grommet/index.d.ts +30 -0
- package/components/Grommet/propTypes.js +31 -1
- package/components/Header/Header.js +3 -4
- package/components/Header/stories/Sticky.stories.js +1 -2
- package/components/Heading/Heading.js +1 -2
- package/components/Heading/HeadingSkeleton.js +1 -2
- package/components/Heading/StyledHeading.js +1 -2
- package/components/Image/Image.js +1 -2
- package/components/Image/StyledImage.js +1 -2
- package/components/InfiniteScroll/InfiniteScroll.js +1 -2
- package/components/Layer/Layer.js +47 -18
- package/components/Layer/LayerContainer.js +19 -17
- package/components/Layer/StyledLayer.js +3 -4
- package/components/Layer/stories/Form.stories.js +1 -1
- package/components/List/List.js +140 -150
- package/components/List/index.d.ts +3 -0
- package/components/List/propTypes.js +3 -0
- package/components/List/stories/Order.stories.js +1 -2
- package/components/List/stories/Pinned.stories.js +1 -2
- package/components/Markdown/Markdown.js +1 -2
- package/components/MaskedInput/MaskedInput.js +7 -3
- package/components/Menu/Menu.js +14 -3
- package/components/Meter/Bar.js +39 -19
- package/components/Meter/Circle.js +32 -48
- package/components/Meter/Meter.js +1 -2
- package/components/Meter/StyledMeter.js +1 -2
- package/components/Meter/stories/Circle.stories.js +7 -10
- package/components/Meter/stories/VerticalBarMultiple.stories.js +1 -2
- package/components/Meter/utils.js +15 -1
- package/components/NameValueList/NameValueList.js +1 -2
- package/components/NameValuePair/NameValuePair.js +1 -2
- package/components/Nav/Nav.js +5 -1
- package/components/Nav/stories/CustomThemed/JustifySidebar.stories.js +1 -2
- package/components/Nav/stories/Sidebar.stories.js +1 -2
- package/components/Notification/Notification.js +26 -13
- package/components/Notification/index.d.ts +3 -0
- package/components/Notification/propTypes.js +3 -0
- package/components/Notification/stories/Global.stories.js +1 -2
- package/components/Notification/stories/Title.stories.js +1 -2
- package/components/Notification/stories/TitleAndMessage.stories.js +1 -2
- package/components/Page/Page.js +1 -2
- package/components/Page/stories/PageNotificaton.stories.js +1 -2
- package/components/PageContent/PageContent.js +1 -2
- package/components/PageHeader/PageHeader.js +1 -2
- package/components/PageHeader/stories/MultipleActions.stories.js +1 -2
- package/components/Pagination/Pagination.js +6 -12
- package/components/Pagination/PaginationStep.js +3 -3
- package/components/Pagination/PaginationSummary.js +1 -2
- package/components/Pagination/stories/Grid.stories.js +1 -2
- package/components/Paragraph/Paragraph.js +1 -2
- package/components/Paragraph/ParagraphSkeleton.js +3 -3
- package/components/Paragraph/StyledParagraph.js +1 -2
- package/components/RadioButton/RadioButton.js +2 -3
- package/components/RadioButton/StyledRadioButton.js +3 -4
- package/components/RadioButtonGroup/RadioButtonGroup.js +18 -8
- package/components/RadioButtonGroup/stories/Children.stories.js +1 -2
- package/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.stories.js +1 -2
- package/components/RadioButtonGroup/stories/Disabled.stories.js +1 -2
- package/components/RangeInput/RangeInput.js +2 -3
- package/components/RangeInput/StyledRangeInput.js +1 -2
- package/components/RangeInput/stories/CustomThemed/Bounds.stories.js +1 -2
- package/components/RangeSelector/EdgeControl.js +56 -13
- package/components/RangeSelector/RangeSelector.js +14 -31
- package/components/RangeSelector/stories/Basic.stories.js +1 -2
- package/components/RangeSelector/stories/CustomThemed/Custom.stories.js +1 -2
- package/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.stories.js +1 -2
- package/components/RangeSelector/stories/Label.stories.js +1 -2
- package/components/RangeSelector/stories/Simple.stories.js +1 -2
- package/components/RangeSelector/stories/Step.stories.js +1 -2
- package/components/RangeSelector/stories/Thin.stories.js +1 -2
- package/components/RangeSelector/stories/Vertical.stories.js +1 -2
- package/components/RoutedAnchor/RoutedAnchor.js +1 -2
- package/components/RoutedButton/RoutedButton.js +1 -2
- package/components/Select/DefaultSelectTextInput.js +1 -2
- package/components/Select/Select.js +17 -4
- package/components/Select/SelectContainer.js +35 -11
- package/components/Select/stories/ChildrenRender.stories.js +1 -2
- package/components/Select/stories/Clear.stories.js +1 -2
- package/components/Select/stories/Controlled.stories.js +1 -2
- package/components/Select/stories/CustomThemed/CustomSearch.stories.js +1 -2
- package/components/Select/stories/Disabled.stories.js +1 -2
- package/components/Select/stories/InsideFormField.stories.js +1 -2
- package/components/Select/stories/Multiple.stories.js +1 -2
- package/components/Select/stories/ObjectOptions.stories.js +1 -2
- package/components/Select/stories/Search.stories.js +1 -2
- package/components/Select/stories/Simple.stories.js +1 -2
- package/components/Select/stories/ValueLabel.stories.js +1 -2
- package/components/Select/stories/components/SearchBorderBox.js +1 -2
- package/components/Select/stories/components/SearchInput.js +1 -2
- package/components/Select/utils.js +13 -4
- package/components/SelectMultiple/SelectMultiple.js +32 -19
- package/components/SelectMultiple/SelectMultipleContainer.js +34 -21
- package/components/SelectMultiple/SelectMultipleValue.js +6 -9
- package/components/SelectMultiple/SelectionSummary.js +8 -10
- package/components/SelectMultiple/stories/CustomMessages.stories.js +1 -2
- package/components/SelectMultiple/stories/Default.stories.js +1 -2
- package/components/SelectMultiple/stories/Disabled.stories.js +1 -2
- package/components/SelectMultiple/stories/FormField.stories.js +1 -2
- package/components/SelectMultiple/stories/Help.stories.js +1 -2
- package/components/SelectMultiple/stories/Limited.stories.js +1 -2
- package/components/SelectMultiple/stories/ObjectOptions.stories.js +1 -2
- package/components/SelectMultiple/stories/ShowSelectedInline.stories.js +1 -2
- package/components/Sidebar/Sidebar.js +6 -3
- package/components/Skeleton/Skeleton.js +6 -3
- package/components/Skeleton/SkeletonContext.js +1 -2
- package/components/Skeleton/stories/CustomThemed/Custom.stories.js +1 -4
- package/components/Skeleton/stories/GridContainer.stories.js +1 -2
- package/components/Skeleton/stories/Simple.stories.js +0 -1
- package/components/SkipLink/SkipLink.js +1 -2
- package/components/SkipLinks/SkipLinks.js +1 -2
- package/components/Spinner/Spinner.js +8 -6
- package/components/Spinner/stories/Animation.stories.js +1 -2
- package/components/Spinner/stories/Announced.stories.js +1 -2
- package/components/Stack/Stack.js +1 -2
- package/components/Stack/StyledStack.js +1 -2
- package/components/StarRating/StarRating.js +9 -7
- package/components/Tab/StyledTab.js +1 -2
- package/components/Tab/Tab.js +3 -3
- package/components/Table/StyledTable.js +3 -4
- package/components/Table/Table.js +1 -2
- package/components/Table/stories/InfiniteScrollInTable.stories.js +1 -2
- package/components/TableBody/TableBody.js +1 -2
- package/components/TableCell/TableCell.js +21 -5
- package/components/TableFooter/TableFooter.js +1 -2
- package/components/TableHeader/TableHeader.js +1 -2
- package/components/TableRow/TableRow.js +1 -2
- package/components/Tabs/StyledTabs.js +1 -2
- package/components/Tabs/Tabs.js +9 -14
- package/components/Tabs/stories/CustomThemed/States.stories.js +1 -2
- package/components/Tabs/stories/Responsive.stories.js +1 -2
- package/components/Tag/StyledTag.js +9 -1
- package/components/Tag/Tag.js +1 -2
- package/components/Text/StyledText.js +1 -2
- package/components/Text/Text.js +1 -2
- package/components/Text/TextSkeleton.js +1 -2
- package/components/TextArea/StyledTextArea.js +1 -2
- package/components/TextArea/TextArea.js +1 -2
- package/components/TextArea/stories/CustomThemed/Themed.stories.js +1 -2
- package/components/TextArea/stories/InsideFormField.stories.js +1 -2
- package/components/TextArea/stories/NonResizable.stories.js +1 -2
- package/components/TextArea/stories/Simple.stories.js +1 -2
- package/components/TextInput/CopyButton.js +6 -3
- package/components/TextInput/StyledTextInput.js +1 -2
- package/components/TextInput/TextInput.js +10 -3
- package/components/TextInput/stories/InsideFormField.stories.js +1 -2
- package/components/ThumbsRating/ThumbsRating.js +15 -10
- package/components/Tip/Tip.js +1 -2
- package/components/Tip/stories/HeaderActions.stories.js +1 -2
- package/components/ToggleGroup/ToggleGroup.js +1 -2
- package/components/ToggleGroup/stories/Controlled.stories.js +1 -2
- package/components/Toolbar/Toolbar.js +16 -13
- package/components/Video/StyledVideo.js +1 -2
- package/components/Video/Video.js +16 -19
- package/components/WorldMap/WorldMap.js +1 -2
- package/contexts/AnalyticsContext/AnalyticsContext.js +1 -2
- package/contexts/AnnounceContext/AnnounceContext.js +28 -5
- package/contexts/AnnounceContext/stories/Polite.stories.js +1 -2
- package/contexts/RootsContext.js +1 -2
- package/contexts/ThemeContext/stories/ThemeContextExtend.stories.js +1 -2
- package/es6/components/AccordionPanel/AccordionPanel.js +3 -6
- package/es6/components/Anchor/Anchor.js +4 -4
- package/es6/components/Anchor/StyledAnchor.js +2 -2
- package/es6/components/Box/Box.js +5 -1
- package/es6/components/Box/StyledBox.js +5 -3
- package/es6/components/Button/BusyAnimation.js +5 -1
- package/es6/components/Button/Button.js +3 -1
- package/es6/components/Button/StyledButton.js +3 -1
- package/es6/components/Button/StyledButtonKind.js +3 -1
- package/es6/components/Button/index.d.ts +1 -1
- package/es6/components/Button/propTypes.js +1 -1
- package/es6/components/Calendar/Calendar.js +158 -138
- package/es6/components/Calendar/StyledCalendar.js +34 -36
- package/es6/components/Calendar/stories/Dual.stories.js +0 -2
- package/es6/components/Calendar/stories/ShowAdjacentDays.stories.js +1 -1
- package/es6/components/Cards/Cards.js +3 -4
- package/es6/components/Chart/Chart.js +14 -12
- package/es6/components/Chart/calcs.js +21 -13
- package/es6/components/CheckBox/CheckBox.js +1 -1
- package/es6/components/CheckBoxGroup/CheckBoxGroup.js +14 -3
- package/es6/components/Data/Data.js +5 -1
- package/es6/components/Data/DataForm.js +6 -4
- package/es6/components/Data/index.d.ts +3 -0
- package/es6/components/Data/propTypes.js +4 -1
- package/es6/components/Data/stories/Infinite.stories.js +10 -15
- package/es6/components/Data/stories/OnSelect.stories.js +10 -15
- package/es6/components/Data/stories/SpaceX.stories.js +10 -15
- package/es6/components/Data/stories/StarWars.stories.js +16 -43
- package/es6/components/DataChart/DataChart.js +17 -15
- package/es6/components/DataChart/Detail.js +2 -2
- package/es6/components/DataChart/Legend.js +8 -9
- package/es6/components/DataChart/utils.js +15 -8
- package/es6/components/DataFilter/DataFilter.js +14 -10
- package/es6/components/DataFilters/DataFilters.js +9 -10
- package/es6/components/DataSearch/DataSearch.js +5 -4
- package/es6/components/DataSort/DataSort.js +6 -4
- package/es6/components/DataSummary/DataSummary.js +6 -6
- package/es6/components/DataTable/Body.js +106 -33
- package/es6/components/DataTable/DataTable.js +48 -14
- package/es6/components/DataTable/ExpanderCell.js +54 -6
- package/es6/components/DataTable/Footer.js +4 -1
- package/es6/components/DataTable/GroupedBody.js +11 -3
- package/es6/components/DataTable/Header.js +86 -32
- package/es6/components/DataTable/Resizer.js +168 -46
- package/es6/components/DataTable/Searcher.js +40 -12
- package/es6/components/DataTable/StyledDataTable.js +1 -1
- package/es6/components/DataTable/index.d.ts +19 -0
- package/es6/components/DataTable/propTypes.js +19 -0
- package/es6/components/DataTable/stories/ControlledGrouped.stories.js +4 -0
- package/es6/components/DataTable/stories/Grouped.stories.js +7 -1
- package/es6/components/DataTable/stories/GroupedOnSelect.stories.js +7 -1
- package/es6/components/DataTable/stories/OnUpdate.stories.js +3 -0
- package/es6/components/DataTable/stories/SpaceX.stories.js +22 -16
- package/es6/components/DataTable/stories/SpaceXUngrouped.stories.js +7 -7
- package/es6/components/DataTable/stories/Styled.stories.js +5 -1
- package/es6/components/DataTable/stories/rowDetails.stories.js +22 -47
- package/es6/components/DataTableColumns/DataTableColumns.js +37 -21
- package/es6/components/DateInput/DateInput.js +19 -17
- package/es6/components/Distribution/Distribution.js +8 -5
- package/es6/components/FileInput/FileInput.js +78 -40
- package/es6/components/FileInput/index.d.ts +10 -1
- package/es6/components/FileInput/propTypes.js +11 -0
- package/es6/components/Footer/Footer.js +5 -1
- package/es6/components/Form/Form.js +10 -10
- package/es6/components/Form/stories/Controlled.stories.js +1 -0
- package/es6/components/Form/stories/ControlledInput.stories.js +1 -0
- package/es6/components/Form/stories/ControlledInputLazy.stories.js +1 -0
- package/es6/components/Form/stories/ControlledLazy.stories.js +1 -0
- package/es6/components/Form/stories/CustomThemed/Custom.stories.js +1 -0
- package/es6/components/Form/stories/FieldWithChildren.stories.js +2 -0
- package/es6/components/Form/stories/Uncontrolled.stories.js +1 -0
- package/es6/components/Form/stories/ValidateOnBlur.stories.js +1 -1
- package/es6/components/Form/stories/typescript/TypedForm.stories.tsx +7 -1
- package/es6/components/FormField/FormField.js +22 -1
- package/es6/components/Grommet/index.d.ts +30 -0
- package/es6/components/Grommet/propTypes.js +31 -1
- package/es6/components/Header/Header.js +2 -2
- package/es6/components/Layer/Layer.js +47 -17
- package/es6/components/Layer/LayerContainer.js +20 -16
- package/es6/components/Layer/StyledLayer.js +3 -3
- package/es6/components/Layer/stories/Form.stories.js +1 -1
- package/es6/components/List/List.js +141 -150
- package/es6/components/List/index.d.ts +3 -0
- package/es6/components/List/propTypes.js +3 -0
- package/es6/components/MaskedInput/MaskedInput.js +6 -1
- package/es6/components/Menu/Menu.js +13 -1
- package/es6/components/Meter/Bar.js +39 -18
- package/es6/components/Meter/Circle.js +33 -48
- package/es6/components/Meter/stories/Circle.stories.js +7 -9
- package/es6/components/Meter/utils.js +14 -0
- package/es6/components/Nav/Nav.js +5 -1
- package/es6/components/Notification/Notification.js +27 -12
- package/es6/components/Notification/index.d.ts +3 -0
- package/es6/components/Notification/propTypes.js +3 -0
- package/es6/components/Pagination/Pagination.js +5 -10
- package/es6/components/Pagination/PaginationStep.js +2 -1
- package/es6/components/Paragraph/ParagraphSkeleton.js +2 -1
- package/es6/components/RadioButton/RadioButton.js +1 -1
- package/es6/components/RadioButton/StyledRadioButton.js +2 -2
- package/es6/components/RadioButtonGroup/RadioButtonGroup.js +17 -6
- package/es6/components/RangeInput/RangeInput.js +1 -1
- package/es6/components/RangeSelector/EdgeControl.js +57 -12
- package/es6/components/RangeSelector/RangeSelector.js +13 -29
- package/es6/components/Select/Select.js +17 -3
- package/es6/components/Select/SelectContainer.js +34 -9
- package/es6/components/Select/utils.js +11 -1
- package/es6/components/SelectMultiple/SelectMultiple.js +32 -18
- package/es6/components/SelectMultiple/SelectMultipleContainer.js +33 -19
- package/es6/components/SelectMultiple/SelectMultipleValue.js +5 -7
- package/es6/components/SelectMultiple/SelectionSummary.js +7 -8
- package/es6/components/Sidebar/Sidebar.js +6 -3
- package/es6/components/Skeleton/Skeleton.js +5 -1
- package/es6/components/Skeleton/stories/CustomThemed/Custom.stories.js +0 -2
- package/es6/components/Skeleton/stories/Simple.stories.js +0 -1
- package/es6/components/Spinner/Spinner.js +6 -3
- package/es6/components/StarRating/StarRating.js +8 -5
- package/es6/components/Tab/Tab.js +2 -1
- package/es6/components/Table/StyledTable.js +2 -2
- package/es6/components/TableCell/TableCell.js +20 -3
- package/es6/components/Tabs/Tabs.js +8 -12
- package/es6/components/Tag/StyledTag.js +10 -2
- package/es6/components/TextInput/CopyButton.js +6 -3
- package/es6/components/TextInput/TextInput.js +9 -1
- package/es6/components/ThumbsRating/ThumbsRating.js +15 -10
- package/es6/components/Toolbar/Toolbar.js +15 -11
- package/es6/components/Video/Video.js +15 -17
- package/es6/contexts/AnnounceContext/AnnounceContext.js +28 -5
- package/es6/languages/default.json +33 -3
- package/es6/themes/base.d.ts +301 -4
- package/es6/themes/base.js +387 -28
- package/es6/utils/graphics.js +123 -0
- package/es6/utils/styles.js +53 -45
- package/grommet.min.js +1 -1
- package/grommet.min.js.map +1 -1
- package/languages/default.json +33 -3
- package/package.json +55 -55
- package/themes/base.d.ts +301 -4
- package/themes/base.js +387 -28
- package/utils/graphics.js +124 -1
- package/utils/styles.js +53 -45
- package/utils/useId.js +1 -2
|
@@ -9,8 +9,7 @@ var _propTypes = require("./propTypes");
|
|
|
9
9
|
var _StyledToggleGroup = require("./StyledToggleGroup");
|
|
10
10
|
var _useThemeValue2 = require("../../utils/useThemeValue");
|
|
11
11
|
var _excluded = ["defaultValue", "multiple", "options", "onToggle", "value"];
|
|
12
|
-
function
|
|
13
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
12
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
14
13
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
15
14
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
16
15
|
var useControlled = function useControlled(_ref) {
|
|
@@ -4,8 +4,7 @@ exports.__esModule = true;
|
|
|
4
4
|
exports["default"] = exports.Controlled = void 0;
|
|
5
5
|
var _react = _interopRequireWildcard(require("react"));
|
|
6
6
|
var _grommet = require("grommet");
|
|
7
|
-
function
|
|
8
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
7
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
9
8
|
var Controlled = exports.Controlled = function Controlled() {
|
|
10
9
|
var _useState = (0, _react.useState)(['Option 2']),
|
|
11
10
|
value = _useState[0],
|
|
@@ -7,26 +7,29 @@ var _Box = require("../Box");
|
|
|
7
7
|
var _ResponsiveContext = require("../../contexts/ResponsiveContext");
|
|
8
8
|
var _propTypes = require("./propTypes");
|
|
9
9
|
var _responsive = require("../../utils/responsive");
|
|
10
|
+
var _useThemeValue2 = require("../../utils/useThemeValue");
|
|
10
11
|
var _excluded = ["children"];
|
|
11
|
-
function
|
|
12
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
12
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
13
13
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
14
14
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
15
|
-
var defaultLayoutProps = {
|
|
16
|
-
direction: 'row',
|
|
17
|
-
align: 'start',
|
|
18
|
-
gap: 'small'
|
|
19
|
-
};
|
|
20
|
-
var smallLayoutProps = {
|
|
21
|
-
direction: 'row',
|
|
22
|
-
wrap: true,
|
|
23
|
-
align: 'start',
|
|
24
|
-
gap: 'small'
|
|
25
|
-
};
|
|
26
15
|
var Toolbar = exports.Toolbar = function Toolbar(_ref) {
|
|
16
|
+
var _theme$toolbar, _theme$toolbar2;
|
|
27
17
|
var children = _ref.children,
|
|
28
18
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
29
19
|
var size = (0, _react.useContext)(_ResponsiveContext.ResponsiveContext);
|
|
20
|
+
var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
|
|
21
|
+
theme = _useThemeValue.theme;
|
|
22
|
+
var defaultLayoutProps = {
|
|
23
|
+
direction: 'row',
|
|
24
|
+
align: 'start',
|
|
25
|
+
gap: (_theme$toolbar = theme.toolbar) == null ? void 0 : _theme$toolbar.gap
|
|
26
|
+
};
|
|
27
|
+
var smallLayoutProps = {
|
|
28
|
+
direction: 'row',
|
|
29
|
+
wrap: true,
|
|
30
|
+
align: 'start',
|
|
31
|
+
gap: (_theme$toolbar2 = theme.toolbar) == null || (_theme$toolbar2 = _theme$toolbar2.small) == null ? void 0 : _theme$toolbar2.gap
|
|
32
|
+
};
|
|
30
33
|
var layoutProps = (0, _responsive.isSmall)(size) ? smallLayoutProps : defaultLayoutProps;
|
|
31
34
|
return /*#__PURE__*/_react["default"].createElement(_Box.Box, _extends({
|
|
32
35
|
flex: false,
|
|
@@ -4,8 +4,7 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.StyledVideoScrubber = exports.StyledVideoControls = exports.StyledVideoContainer = exports.StyledVideo = void 0;
|
|
5
5
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
6
6
|
var _utils = require("../../utils");
|
|
7
|
-
function
|
|
8
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
7
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
9
8
|
var FIT_MAP = {
|
|
10
9
|
cover: 'cover',
|
|
11
10
|
contain: 'contain'
|
|
@@ -18,14 +18,13 @@ var _MessageContext = require("../../contexts/MessageContext");
|
|
|
18
18
|
var _propTypes = require("./propTypes");
|
|
19
19
|
var _useThemeValue2 = require("../../utils/useThemeValue");
|
|
20
20
|
var _excluded = ["alignSelf", "autoPlay", "children", "controls", "gridArea", "loop", "margin", "messages", "mute", "onDurationChange", "onEnded", "onPause", "onPlay", "onTimeUpdate", "onVolumeChange", "skipInterval"];
|
|
21
|
-
function
|
|
22
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
21
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
23
22
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
24
23
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
25
24
|
// Split the volume control into 6 segments. Empirically determined.
|
|
26
25
|
var VOLUME_STEP = 0.166667;
|
|
27
26
|
var formatTime = function formatTime(time) {
|
|
28
|
-
var minutes = Math.
|
|
27
|
+
var minutes = Math.trunc(time / 60);
|
|
29
28
|
if (minutes < 10) {
|
|
30
29
|
minutes = "0" + minutes;
|
|
31
30
|
}
|
|
@@ -86,15 +85,15 @@ var Video = exports.Video = /*#__PURE__*/(0, _react.forwardRef)(function (_ref,
|
|
|
86
85
|
var _useState9 = (0, _react.useState)(false),
|
|
87
86
|
hasPlayed = _useState9[0],
|
|
88
87
|
setHasPlayed = _useState9[1];
|
|
88
|
+
var _useState0 = (0, _react.useState)(),
|
|
89
|
+
interacting = _useState0[0],
|
|
90
|
+
setInteracting = _useState0[1];
|
|
91
|
+
var _useState1 = (0, _react.useState)(),
|
|
92
|
+
height = _useState1[0],
|
|
93
|
+
setHeight = _useState1[1];
|
|
89
94
|
var _useState10 = (0, _react.useState)(),
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
var _useState11 = (0, _react.useState)(),
|
|
93
|
-
height = _useState11[0],
|
|
94
|
-
setHeight = _useState11[1];
|
|
95
|
-
var _useState12 = (0, _react.useState)(),
|
|
96
|
-
width = _useState12[0],
|
|
97
|
-
setWidth = _useState12[1];
|
|
95
|
+
width = _useState10[0],
|
|
96
|
+
setWidth = _useState10[1];
|
|
98
97
|
var containerRef = (0, _react.useRef)();
|
|
99
98
|
var scrubberRef = (0, _react.useRef)();
|
|
100
99
|
var videoRef = (0, _utils.useForwardedRef)(ref);
|
|
@@ -148,9 +147,9 @@ var Video = exports.Video = /*#__PURE__*/(0, _react.forwardRef)(function (_ref,
|
|
|
148
147
|
}, [interacting]);
|
|
149
148
|
|
|
150
149
|
// track which audio description track is active
|
|
151
|
-
var
|
|
152
|
-
activeTrack =
|
|
153
|
-
setActiveTrack =
|
|
150
|
+
var _useState11 = (0, _react.useState)(),
|
|
151
|
+
activeTrack = _useState11[0],
|
|
152
|
+
setActiveTrack = _useState11[1];
|
|
154
153
|
(0, _useIsomorphicLayoutEffect.useLayoutEffect)(function () {
|
|
155
154
|
var video = videoRef.current;
|
|
156
155
|
if (video) {
|
|
@@ -282,7 +281,7 @@ var Video = exports.Video = /*#__PURE__*/(0, _react.forwardRef)(function (_ref,
|
|
|
282
281
|
}, [videoRef]);
|
|
283
282
|
var controlsElement;
|
|
284
283
|
if (controls != null && controls.position) {
|
|
285
|
-
var _controls$items;
|
|
284
|
+
var _controls$items, _theme$video, _theme$video2;
|
|
286
285
|
var over = controls.position === 'over';
|
|
287
286
|
var background = over ? theme.video.controls && theme.video.controls.background || {
|
|
288
287
|
color: 'background-back',
|
|
@@ -463,7 +462,7 @@ var Video = exports.Video = /*#__PURE__*/(0, _react.forwardRef)(function (_ref,
|
|
|
463
462
|
}),
|
|
464
463
|
background: over ? theme.video.scrubber && theme.video.scrubber.track && theme.video.scrubber.track.color || 'dark-3' : undefined,
|
|
465
464
|
size: "full",
|
|
466
|
-
thickness:
|
|
465
|
+
thickness: (_theme$video = theme.video) == null || (_theme$video = _theme$video.scrubber) == null ? void 0 : _theme$video.thickness,
|
|
467
466
|
values: [{
|
|
468
467
|
value: percentagePlayed || 0
|
|
469
468
|
}]
|
|
@@ -485,9 +484,7 @@ var Video = exports.Video = /*#__PURE__*/(0, _react.forwardRef)(function (_ref,
|
|
|
485
484
|
return setInteracting(true);
|
|
486
485
|
}
|
|
487
486
|
}, passThemeFlag)))), /*#__PURE__*/_react["default"].createElement(_Box.Box, {
|
|
488
|
-
pad:
|
|
489
|
-
horizontal: 'small'
|
|
490
|
-
}
|
|
487
|
+
pad: theme == null || (_theme$video2 = theme.video) == null || (_theme$video2 = _theme$video2.time) == null || (_theme$video2 = _theme$video2.container) == null ? void 0 : _theme$video2.pad
|
|
491
488
|
}, /*#__PURE__*/_react["default"].createElement(_Text.Text, {
|
|
492
489
|
margin: "none"
|
|
493
490
|
}, formattedTime))), /*#__PURE__*/_react["default"].createElement(_Menu.Menu, {
|
|
@@ -12,8 +12,7 @@ var _excluded = ["fill", "color", "continents", "hoverColor", "onSelectPlace", "
|
|
|
12
12
|
_excluded2 = ["location"],
|
|
13
13
|
_excluded3 = ["color", "onClick", "onHover"],
|
|
14
14
|
_excluded4 = ["color", "coords", "content", "dropProps", "key", "name", "onClick", "onHover"];
|
|
15
|
-
function
|
|
16
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
15
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
17
16
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
18
17
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
19
18
|
// The graphic is drawn as a rectangular grid using coordinates spaced
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.useAnalytics = exports.AnalyticsProvider = exports.AnalyticsContext = void 0;
|
|
5
5
|
var _react = _interopRequireWildcard(require("react"));
|
|
6
|
-
function
|
|
7
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
6
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
8
7
|
var AnalyticsContext = exports.AnalyticsContext = /*#__PURE__*/_react["default"].createContext(function () {});
|
|
9
8
|
var useAnalytics = exports.useAnalytics = function useAnalytics() {
|
|
10
9
|
return (0, _react.useContext)(AnalyticsContext);
|
|
@@ -5,9 +5,13 @@ exports.AnnounceContext = void 0;
|
|
|
5
5
|
var _react = _interopRequireDefault(require("react"));
|
|
6
6
|
var _propTypes = require("./propTypes");
|
|
7
7
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
8
|
+
var DEFAULT_MODE = 'polite';
|
|
9
|
+
var invisibleChars = ["\u200B", "\uFEFF", "\u200C", "\u200D"];
|
|
8
10
|
var createAnnouncer = function createAnnouncer() {
|
|
9
11
|
var announcer = document.createElement('div');
|
|
10
12
|
announcer.id = 'grommet-announcer';
|
|
13
|
+
announcer.setAttribute('aria-live', DEFAULT_MODE);
|
|
14
|
+
announcer.setAttribute('aria-atomic', 'true');
|
|
11
15
|
announcer.style.left = '-100%';
|
|
12
16
|
announcer.style.right = '100%';
|
|
13
17
|
announcer.style.position = 'fixed';
|
|
@@ -15,9 +19,12 @@ var createAnnouncer = function createAnnouncer() {
|
|
|
15
19
|
document.body.insertBefore(announcer, document.body.firstChild);
|
|
16
20
|
return announcer;
|
|
17
21
|
};
|
|
22
|
+
var announceCounter = 0; // Counter to ensure unique announcements
|
|
23
|
+
var clearTimeoutId; // Variable to hold the timeout ID for clearing
|
|
24
|
+
|
|
18
25
|
var AnnounceContext = exports.AnnounceContext = /*#__PURE__*/_react["default"].createContext(function (message, mode, timeout) {
|
|
19
26
|
if (mode === void 0) {
|
|
20
|
-
mode =
|
|
27
|
+
mode = DEFAULT_MODE;
|
|
21
28
|
}
|
|
22
29
|
if (timeout === void 0) {
|
|
23
30
|
timeout = 500;
|
|
@@ -25,11 +32,27 @@ var AnnounceContext = exports.AnnounceContext = /*#__PURE__*/_react["default"].c
|
|
|
25
32
|
// we only create a new container if we don't have one already
|
|
26
33
|
// we create a separate node so that grommet does not set aria-hidden to it
|
|
27
34
|
var announcer = document.body.querySelector("#grommet-announcer[aria-live]") || createAnnouncer();
|
|
28
|
-
announcer.setAttribute('aria-live', 'off');
|
|
29
|
-
announcer.innerHTML = message;
|
|
30
35
|
announcer.setAttribute('aria-live', mode);
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
|
|
37
|
+
// Clear any existing timeout before setting a new one
|
|
38
|
+
if (clearTimeoutId) {
|
|
39
|
+
clearTimeout(clearTimeoutId);
|
|
40
|
+
}
|
|
41
|
+
if (mode === 'polite') {
|
|
42
|
+
// using setTimeout for polite mode pushes to next event loop tick,
|
|
43
|
+
// giving time for the browser to process the change
|
|
44
|
+
setTimeout(function () {
|
|
45
|
+
var uniqueChar = invisibleChars[announceCounter % invisibleChars.length];
|
|
46
|
+
announceCounter += 1; // Increment the counter for the next call
|
|
47
|
+
// set the message with a unique invisible character to ensure
|
|
48
|
+
// it is registered as different by screen readers
|
|
49
|
+
announcer.textContent = "" + message + uniqueChar;
|
|
50
|
+
}, 0);
|
|
51
|
+
} else announcer.textContent = message;
|
|
52
|
+
|
|
53
|
+
// clear the message after the specified timeout
|
|
54
|
+
clearTimeoutId = setTimeout(function () {
|
|
55
|
+
announcer.textContent = '';
|
|
33
56
|
}, timeout);
|
|
34
57
|
});
|
|
35
58
|
AnnounceContext.propTypes = _propTypes.AnnounceContextPropTypes;
|
|
@@ -6,8 +6,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
6
6
|
var _grommetIcons = require("grommet-icons");
|
|
7
7
|
var _themes = require("grommet/themes");
|
|
8
8
|
var _grommet = require("grommet");
|
|
9
|
-
function
|
|
10
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
9
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
11
10
|
// used only for the grommet's font
|
|
12
11
|
|
|
13
12
|
var message = "Thank you for clicking the Announce Button,\nthis announcement is being broadcast on the Button's click.";
|
package/contexts/RootsContext.js
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.useRoots = exports.RootsContext = void 0;
|
|
5
5
|
var _react = _interopRequireWildcard(require("react"));
|
|
6
|
-
function
|
|
7
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
6
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
8
7
|
// When toggling aria-hidden values, we only want to affect elements
|
|
9
8
|
// in the DOM that come from Grommet, so we track those elements in this
|
|
10
9
|
// context value. We also only want `trapFocus` to apply to the most recently
|
|
@@ -6,8 +6,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
6
6
|
var _themes = require("grommet/themes");
|
|
7
7
|
var _utils = require("grommet/utils");
|
|
8
8
|
var _grommet = require("grommet");
|
|
9
|
-
function
|
|
10
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
9
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
11
10
|
var customTheme = (0, _utils.deepMerge)(_themes.grommet, {
|
|
12
11
|
global: {
|
|
13
12
|
focus: {
|
|
@@ -11,6 +11,7 @@ import { AccordionContext } from '../Accordion/AccordionContext';
|
|
|
11
11
|
import { AccordionPanelPropTypes } from './propTypes';
|
|
12
12
|
import { useThemeValue } from '../../utils/useThemeValue';
|
|
13
13
|
var AccordionPanel = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
14
|
+
var _theme$accordion$labe, _theme$accordion$icon;
|
|
14
15
|
var children = _ref.children,
|
|
15
16
|
header = _ref.header,
|
|
16
17
|
id = _ref.id,
|
|
@@ -105,17 +106,13 @@ var AccordionPanel = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
105
106
|
justify: "between",
|
|
106
107
|
id: id
|
|
107
108
|
}, rest), typeof label === 'string' ? /*#__PURE__*/React.createElement(Box, {
|
|
108
|
-
pad:
|
|
109
|
-
horizontal: 'xsmall'
|
|
110
|
-
}
|
|
109
|
+
pad: (_theme$accordion$labe = theme.accordion.label) == null || (_theme$accordion$labe = _theme$accordion$labe.container) == null ? void 0 : _theme$accordion$labe.pad
|
|
111
110
|
}, /*#__PURE__*/React.createElement(Heading, {
|
|
112
111
|
level: level || theme.accordion.heading && theme.accordion.heading.level || 4,
|
|
113
112
|
margin: theme.accordion.heading && theme.accordion.heading.margin || undefined,
|
|
114
113
|
color: hover
|
|
115
114
|
}, label)) : label, AccordionIcon && /*#__PURE__*/React.createElement(Box, {
|
|
116
|
-
pad:
|
|
117
|
-
horizontal: 'small'
|
|
118
|
-
},
|
|
115
|
+
pad: (_theme$accordion$icon = theme.accordion.icon) == null || (_theme$accordion$icon = _theme$accordion$icon.container) == null ? void 0 : _theme$accordion$icon.pad,
|
|
119
116
|
width: {
|
|
120
117
|
min: 'fit-content'
|
|
121
118
|
}
|
|
@@ -22,7 +22,7 @@ var Anchor = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
22
22
|
label = _ref.label,
|
|
23
23
|
_onBlur = _ref.onBlur,
|
|
24
24
|
onClickProp = _ref.onClick,
|
|
25
|
-
|
|
25
|
+
onFocus = _ref.onFocus,
|
|
26
26
|
reverse = _ref.reverse,
|
|
27
27
|
sizeProp = _ref.size,
|
|
28
28
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
@@ -71,10 +71,10 @@ var Anchor = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
71
71
|
reverse: reverse,
|
|
72
72
|
href: !disabled ? href : undefined,
|
|
73
73
|
onClick: !disabled ? onClick : undefined,
|
|
74
|
-
onFocus: function
|
|
74
|
+
onFocus: !disabled ? function (event) {
|
|
75
75
|
setFocus(true);
|
|
76
|
-
if (
|
|
77
|
-
},
|
|
76
|
+
if (onFocus) onFocus(event);
|
|
77
|
+
} : undefined,
|
|
78
78
|
onBlur: function onBlur(event) {
|
|
79
79
|
setFocus(false);
|
|
80
80
|
if (_onBlur) _onBlur(event);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
|
-
import { focusStyle, genericStyles, normalizeColor, styledComponentsConfig } from '../../utils';
|
|
2
|
+
import { edgeStyle, focusStyle, genericStyles, normalizeColor, styledComponentsConfig } from '../../utils';
|
|
3
3
|
var disabledStyle = "\n opacity: 0.3;\n cursor: default;\n text-decoration: none;\n";
|
|
4
4
|
var sizeStyle = function sizeStyle(props) {
|
|
5
5
|
if (props.size) {
|
|
@@ -26,7 +26,7 @@ var StyledAnchor = styled.a.withConfig(styledComponentsConfig).withConfig({
|
|
|
26
26
|
}, genericStyles, function (props) {
|
|
27
27
|
return !props.disabled && props.theme.anchor.hover && css(["&:hover{", " ", " ", "}"], props.theme.anchor.hover.textDecoration && "text-decoration: " + props.theme.anchor.hover.textDecoration + ";", props.theme.anchor.hover.fontWeight && "font-weight: " + props.theme.anchor.hover.fontWeight + ";", props.theme.anchor.hover.extend);
|
|
28
28
|
}, function (props) {
|
|
29
|
-
return props.hasIcon && !props.hasLabel &&
|
|
29
|
+
return props.hasIcon && !props.hasLabel && edgeStyle('padding', props.theme.anchor.iconOnly.pad, false, props.theme.global.edgeSize.responsiveBreakpoint, props.theme);
|
|
30
30
|
}, function (props) {
|
|
31
31
|
return props.disabled && disabledStyle;
|
|
32
32
|
}, function (props) {
|
|
@@ -249,7 +249,11 @@ var Box = /*#__PURE__*/forwardRef(function (_ref, refProp) {
|
|
|
249
249
|
}
|
|
250
250
|
if (onClick) {
|
|
251
251
|
content = /*#__PURE__*/React.createElement(Keyboard, {
|
|
252
|
-
onEnter: onClick
|
|
252
|
+
onEnter: onClick,
|
|
253
|
+
onSpace: function onSpace(e) {
|
|
254
|
+
e.preventDefault(); // prevent page scroll
|
|
255
|
+
onClick(e);
|
|
256
|
+
}
|
|
253
257
|
}, content);
|
|
254
258
|
}
|
|
255
259
|
return content;
|
|
@@ -2,7 +2,7 @@ var _FLEX_MAP;
|
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
import styled, { css } from 'styled-components';
|
|
4
4
|
import isPropValid from '@emotion/is-prop-valid';
|
|
5
|
-
import { alignContentStyle, alignStyle, backgroundStyle, borderStyle, breakpointStyle, edgeStyle, elevationStyle, fillStyle, focusStyle, genericStyles, getBreakpointStyle, getHoverIndicatorStyle, heightStyle, overflowStyle, parseMetricToNum, responsiveBorderStyle, widthStyle } from '../../utils';
|
|
5
|
+
import { alignContentStyle, alignStyle, backgroundStyle, borderStyle, breakpointStyle, edgeStyle, elevationStyle, fillStyle, focusStyle, unfocusStyle, genericStyles, getBreakpointStyle, getHoverIndicatorStyle, heightStyle, overflowStyle, parseMetricToNum, responsiveBorderStyle, widthStyle } from '../../utils';
|
|
6
6
|
import { roundStyle, styledComponentsConfig } from '../../utils/styles';
|
|
7
7
|
import { animationBounds, animationObjectStyle } from '../../utils/animation';
|
|
8
8
|
var BASIS_MAP = {
|
|
@@ -212,7 +212,9 @@ var StyledBox = styled.div.withConfig({
|
|
|
212
212
|
}, function (props) {
|
|
213
213
|
return props.onClick && interactiveStyle;
|
|
214
214
|
}, function (props) {
|
|
215
|
-
return props.onClick && props.focus && props.focusIndicator !== false &&
|
|
215
|
+
return props.onClick && props.focus && props.focusIndicator !== false && // only show focus styles when using keyboard navigation
|
|
216
|
+
// but not with mouse
|
|
217
|
+
css(["", " &:focus:not(:focus-visible){", "}"], focusStyle(), unfocusStyle());
|
|
216
218
|
}, function (props) {
|
|
217
219
|
return props.theme.box && props.theme.box.extend;
|
|
218
220
|
}, function (props) {
|
|
@@ -241,7 +243,7 @@ var gapGapStyle = function gapGapStyle(directionProp, gap, responsive, border, t
|
|
|
241
243
|
}
|
|
242
244
|
}
|
|
243
245
|
if (border === 'between' || border && border.side === 'between') {
|
|
244
|
-
var borderSize = border.size ||
|
|
246
|
+
var borderSize = border.size || theme.box.border.offset;
|
|
245
247
|
var borderMetric = theme.global.borderSize[borderSize] || borderSize;
|
|
246
248
|
var borderOffset = parseMetricToNum(metric) / 2 - parseMetricToNum(borderMetric) / 2 + "px";
|
|
247
249
|
var responsiveBorderMetric = responsive && breakpoint && (breakpoint.borderSize[borderSize] || borderSize);
|
|
@@ -3,6 +3,7 @@ import styled, { css, keyframes } from 'styled-components';
|
|
|
3
3
|
import { Checkmark } from 'grommet-icons/icons/Checkmark';
|
|
4
4
|
import { Box } from '../Box';
|
|
5
5
|
import { styledComponentsConfig } from '../../utils/styles';
|
|
6
|
+
import { useThemeValue } from '../../utils/useThemeValue';
|
|
6
7
|
var bounceDelay = keyframes(["0%,80%,100%{transform:scale(0.4);}40%{transform:scale(0.8);}"]);
|
|
7
8
|
var bounceDelayRule = css(["animation:", " 1.4s infinite ease-in-out both;"], bounceDelay);
|
|
8
9
|
var Dot = styled(Box).withConfig({
|
|
@@ -12,6 +13,9 @@ var Dot = styled(Box).withConfig({
|
|
|
12
13
|
return props.delay && "animation-delay: " + props.delay + ";";
|
|
13
14
|
});
|
|
14
15
|
export var EllipsisAnimation = function EllipsisAnimation() {
|
|
16
|
+
var _theme$button;
|
|
17
|
+
var _useThemeValue = useThemeValue(),
|
|
18
|
+
theme = _useThemeValue.theme;
|
|
15
19
|
return /*#__PURE__*/React.createElement(Box, {
|
|
16
20
|
style: {
|
|
17
21
|
position: 'absolute'
|
|
@@ -22,7 +26,7 @@ export var EllipsisAnimation = function EllipsisAnimation() {
|
|
|
22
26
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
23
27
|
alignSelf: "center",
|
|
24
28
|
direction: "row",
|
|
25
|
-
gap:
|
|
29
|
+
gap: (_theme$button = theme.button) == null || (_theme$button = _theme$button.busy) == null ? void 0 : _theme$button.gap
|
|
26
30
|
}, /*#__PURE__*/React.createElement(Dot, {
|
|
27
31
|
delay: "-0.32s"
|
|
28
32
|
}), /*#__PURE__*/React.createElement(Dot, {
|
|
@@ -361,6 +361,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
361
361
|
}, contents);
|
|
362
362
|
}
|
|
363
363
|
if (busy || success) {
|
|
364
|
+
var _theme$button3;
|
|
364
365
|
// match what the label will use
|
|
365
366
|
var animationColor;
|
|
366
367
|
if (kind) {
|
|
@@ -385,7 +386,8 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
385
386
|
justify: "center"
|
|
386
387
|
}, /*#__PURE__*/React.createElement(GrowCheckmark, {
|
|
387
388
|
color: animationColor,
|
|
388
|
-
"aria-hidden": true
|
|
389
|
+
"aria-hidden": true,
|
|
390
|
+
as: (_theme$button3 = theme.button) == null || (_theme$button3 = _theme$button3.busy) == null || (_theme$button3 = _theme$button3.icons) == null ? void 0 : _theme$button3.success
|
|
389
391
|
})), /*#__PURE__*/React.createElement(StyledBusyContents, {
|
|
390
392
|
animating: busy || success
|
|
391
393
|
}, contents));
|
|
@@ -85,7 +85,9 @@ var StyledButton = styled.button.withConfig(styledComponentsConfig).withConfig({
|
|
|
85
85
|
}, function (props) {
|
|
86
86
|
return props.disabled && props.theme.button && props.theme.button.disabled && disabledButtonStyle(props);
|
|
87
87
|
}, function (props) {
|
|
88
|
-
return (!props.plain || props.focusIndicator) && focusStyle(
|
|
88
|
+
return (!props.plain || props.focusIndicator) && focusStyle({
|
|
89
|
+
inset: props.focusIndicator === 'inset'
|
|
90
|
+
});
|
|
89
91
|
}, unfocusStyle(), function (props) {
|
|
90
92
|
return !props.plain && props.theme.button.transition && "\n transition-property: " + props.theme.button.transition.properties.join(',') + ";\n transition-duration: " + props.theme.button.transition.duration + "s;\n transition-timing-function: " + props.theme.button.transition.timing + ";\n ";
|
|
91
93
|
}, function (props) {
|
|
@@ -194,7 +194,9 @@ var StyledButtonKind = styled.button.withConfig({
|
|
|
194
194
|
}, function (props) {
|
|
195
195
|
return props.disabled && disabledStyle(props.theme.button.disabled.opacity);
|
|
196
196
|
}, function (props) {
|
|
197
|
-
return (!props.plain || props.focusIndicator) && focusStyle(
|
|
197
|
+
return (!props.plain || props.focusIndicator) && focusStyle({
|
|
198
|
+
inset: props.focusIndicator === 'inset'
|
|
199
|
+
});
|
|
198
200
|
}, unfocusStyle(), function (props) {
|
|
199
201
|
return !props.plain && props.theme.button.transition && "\n transition-property: " + props.theme.button.transition.properties.join(',') + ";\n transition-duration: " + props.theme.button.transition.duration + "s;\n transition-timing-function: " + props.theme.button.transition.timing + ";\n ";
|
|
200
202
|
}, function (props) {
|
|
@@ -16,7 +16,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
16
16
|
color: colorPropType,
|
|
17
17
|
disabled: PropTypes.bool,
|
|
18
18
|
fill: PropTypes.oneOfType([PropTypes.oneOf(['horizontal', 'vertical']), PropTypes.bool]),
|
|
19
|
-
focusIndicator: PropTypes.bool,
|
|
19
|
+
focusIndicator: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['inset'])]),
|
|
20
20
|
gap: PropTypes.oneOfType([PropTypes.oneOf(['none', 'xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge']), PropTypes.string]),
|
|
21
21
|
hoverIndicator: hoverIndicatorPropType,
|
|
22
22
|
href: PropTypes.string,
|