grommet 2.33.1 → 2.34.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 +5 -7
- package/all/stories/Colors.js +3 -5
- package/all/stories/CustomThemed/DefaultTheme.js +3 -5
- package/all/stories/TypographyLarge.js +3 -5
- package/all/stories/TypographyMedium.js +3 -5
- package/all/stories/TypographySmall.js +3 -5
- package/components/Accordion/Accordion.js +3 -4
- package/components/Accordion/AccordionContext.js +1 -2
- package/components/Accordion/propTypes.js +1 -2
- package/components/Accordion/stories/CustomHeader.js +5 -7
- package/components/Accordion/stories/CustomThemed/Custom.js +3 -5
- package/components/Accordion/stories/Multiple.js +4 -5
- package/components/Accordion/stories/Simple.js +3 -5
- package/components/AccordionPanel/AccordionPanel.js +3 -4
- package/components/AccordionPanel/propTypes.js +1 -2
- package/components/Anchor/Anchor.js +5 -6
- package/components/Anchor/StyledAnchor.js +9 -10
- package/components/Anchor/propTypes.js +1 -2
- package/components/Anchor/stories/Color.js +3 -5
- package/components/Anchor/stories/Default.js +3 -5
- package/components/Anchor/stories/Gap.js +3 -5
- package/components/Anchor/stories/Size.js +3 -5
- package/components/Anchor/stories/Weight.js +3 -5
- package/components/Avatar/Avatar.js +3 -4
- package/components/Avatar/StyledAvatar.js +2 -4
- package/components/Avatar/propTypes.js +1 -2
- package/components/Avatar/stories/Basic.js +3 -5
- package/components/Avatar/stories/CustomThemed/Themed.js +3 -5
- package/components/Avatar/stories/Round.js +3 -5
- package/components/Avatar/stories/Sizes.js +3 -5
- package/components/Box/Box.js +4 -5
- package/components/Box/StyledBox.js +4 -6
- package/components/Box/index.d.ts +1 -1
- package/components/Box/propTypes.js +1 -2
- package/components/Box/stories/Animation.js +3 -5
- package/components/Box/stories/Background.js +4 -5
- package/components/Box/stories/BackgroundThemed.js +6 -7
- package/components/Box/stories/Border.js +4 -5
- package/components/Box/stories/Custom.js +4 -5
- package/components/Box/stories/Elevation.js +4 -5
- package/components/Box/stories/Fixed.js +4 -5
- package/components/Box/stories/MinMax.js +4 -5
- package/components/Box/stories/OnClick.js +4 -5
- package/components/Box/stories/RTL.js +4 -5
- package/components/Box/stories/Round.js +5 -6
- package/components/Box/stories/Simple.js +8 -8
- package/components/Button/Badge.js +4 -5
- package/components/Button/BusyAnimation.js +6 -9
- package/components/Button/Button.js +11 -12
- package/components/Button/StyledButton.js +3 -4
- package/components/Button/StyledButtonKind.js +8 -9
- package/components/Button/propTypes.js +1 -2
- package/components/Button/stories/Active.js +3 -5
- package/components/Button/stories/Basic.js +3 -5
- package/components/Button/stories/Busy.js +5 -7
- package/components/Button/stories/CustomThemed/Active.js +3 -5
- package/components/Button/stories/CustomThemed/Plain.js +3 -5
- package/components/Button/stories/CustomThemed/ThemedButtons.js +3 -5
- package/components/Button/stories/Fill.js +3 -5
- package/components/Button/stories/Icon.js +3 -5
- package/components/Button/stories/IconLabel.js +3 -5
- package/components/Button/stories/Kind.js +3 -5
- package/components/Button/stories/Multiple.js +3 -5
- package/components/Button/stories/RoutedButton.js +3 -5
- package/components/Button/stories/Sizes.js +3 -5
- package/components/Button/stories/TipOnButton.js +3 -5
- package/components/Calendar/Calendar.js +7 -9
- package/components/Calendar/StyledCalendar.js +8 -14
- package/components/Calendar/propTypes.js +1 -2
- package/components/Calendar/stories/ActiveDate.js +6 -7
- package/components/Calendar/stories/CustomDay.js +6 -7
- package/components/Calendar/stories/CustomHeader.js +6 -7
- package/components/Calendar/stories/CustomThemed/CustomSizeHeading.js +5 -7
- package/components/Calendar/stories/DaylightSavings.js +4 -5
- package/components/Calendar/stories/Dual.js +5 -7
- package/components/Calendar/stories/Fill.js +3 -5
- package/components/Calendar/stories/Multiple.js +5 -7
- package/components/Calendar/stories/Range.js +3 -5
- package/components/Calendar/stories/ShowAdjacentDays.js +6 -7
- package/components/Calendar/stories/Simple.js +5 -7
- package/components/Calendar/stories/SundayFirstDay.js +4 -5
- package/components/Calendar/utils.js +14 -27
- package/components/Card/Card.js +3 -4
- package/components/Card/stories/CustomThemed/Clickable.js +3 -5
- package/components/Card/stories/CustomThemed/RichFooter.js +3 -5
- package/components/Card/stories/CustomThemed/Stacked.js +3 -5
- package/components/Card/stories/CustomThemed/Themed.js +3 -5
- package/components/Card/stories/Simple.js +3 -5
- package/components/CardBody/CardBody.js +4 -5
- package/components/CardFooter/CardFooter.js +4 -5
- package/components/CardHeader/CardHeader.js +4 -5
- package/components/Cards/Cards.js +3 -4
- package/components/Cards/propTypes.js +1 -2
- package/components/Cards/stories/Children.js +3 -5
- package/components/Cards/stories/Paginated.js +3 -5
- package/components/Cards/stories/Simple.js +3 -5
- package/components/Carousel/Carousel.js +3 -4
- package/components/Carousel/CarouselChild.js +3 -4
- package/components/Carousel/StyledCarousel.js +6 -9
- package/components/Carousel/propTypes.js +2 -4
- package/components/Carousel/stories/Autoplay.js +3 -5
- package/components/Carousel/stories/ControlVariations.js +4 -5
- package/components/Carousel/stories/Controlled.js +4 -5
- package/components/Carousel/stories/CustomThemed/Custom.js +3 -5
- package/components/Carousel/stories/InteractiveChild.js +4 -5
- package/components/Carousel/stories/Multiple.js +3 -5
- package/components/Carousel/stories/Simple.js +4 -5
- package/components/Chart/Chart.js +3 -4
- package/components/Chart/StyledChart.js +3 -4
- package/components/Chart/calcs.js +4 -7
- package/components/Chart/index.d.ts +4 -4
- package/components/Chart/propTypes.js +1 -2
- package/components/Chart/stories/Animate.js +4 -5
- package/components/Chart/stories/Dash.js +3 -5
- package/components/Chart/stories/Gradient.js +4 -5
- package/components/Chart/stories/Horizontal.js +3 -5
- package/components/Chart/stories/Labelled.js +4 -5
- package/components/Chart/stories/Layout.js +3 -5
- package/components/Chart/stories/Pattern.js +3 -5
- package/components/Chart/stories/Point.js +3 -5
- package/components/Chart/stories/Range.js +3 -5
- package/components/Chart/stories/Rich.js +5 -7
- package/components/Chart/stories/Round.js +3 -5
- package/components/Chart/stories/Scan.js +5 -7
- package/components/Chart/stories/ValueStyle.js +4 -5
- package/components/Chart/stories/Window.js +5 -7
- package/components/Chart/stories/Zoom.js +5 -7
- package/components/Chart/stories/data.js +1 -2
- package/components/Chart/utils.js +6 -11
- package/components/CheckBox/CheckBox.js +3 -4
- package/components/CheckBox/StyledCheckBox.js +17 -24
- package/components/CheckBox/propTypes.js +1 -2
- package/components/CheckBox/stories/Children.js +3 -5
- package/components/CheckBox/stories/CustomThemed/Custom.js +5 -7
- package/components/CheckBox/stories/CustomThemed/CustomToggle.js +5 -7
- package/components/CheckBox/stories/Indeterminate.js +5 -7
- package/components/CheckBox/stories/InsideButton.js +5 -7
- package/components/CheckBox/stories/NoLabel.js +5 -7
- package/components/CheckBox/stories/Simple.js +5 -7
- package/components/CheckBox/stories/WithStickyDiv.js +5 -7
- package/components/CheckBoxGroup/CheckBoxGroup.js +3 -4
- package/components/CheckBoxGroup/StyledCheckBoxGroup.js +1 -2
- package/components/CheckBoxGroup/propTypes.js +1 -2
- package/components/CheckBoxGroup/stories/Children.js +5 -7
- package/components/CheckBoxGroup/stories/Disabled.js +3 -5
- package/components/CheckBoxGroup/stories/InitialValues.js +5 -7
- package/components/CheckBoxGroup/stories/Simple.js +3 -5
- package/components/Clock/Analog.js +3 -4
- package/components/Clock/Clock.js +3 -4
- package/components/Clock/Digital.js +4 -5
- package/components/Clock/StyledClock.js +9 -16
- package/components/Clock/propTypes.js +1 -2
- package/components/Clock/stories/Analog.js +4 -5
- package/components/Clock/stories/Countdown.js +4 -5
- package/components/Clock/stories/CustomThemed/Digital.js +3 -5
- package/components/Collapsible/Collapsible.js +3 -4
- package/components/Collapsible/propTypes.js +1 -2
- package/components/Collapsible/stories/Horizontal.js +4 -5
- package/components/Collapsible/stories/Nested.js +4 -5
- package/components/Collapsible/stories/Simple.js +4 -5
- package/components/Data/Data.js +3 -4
- package/components/Data/DataForm.js +27 -31
- package/components/Data/filter.js +2 -3
- package/components/Data/propTypes.js +1 -2
- package/components/Data/stories/Cards.js +4 -5
- package/components/Data/stories/Complex.js +4 -5
- package/components/Data/stories/Controlled.js +6 -7
- package/components/Data/stories/DataTable.js +4 -5
- package/components/Data/stories/Infinite.js +9 -10
- package/components/Data/stories/Inline.js +6 -7
- package/components/Data/stories/List.js +4 -5
- package/components/Data/stories/Simple.js +4 -5
- package/components/Data/stories/SpaceX.js +8 -9
- package/components/Data/stories/StarWars.js +8 -9
- package/components/Data/stories/Views.js +4 -5
- package/components/DataChart/DataChart.js +7 -8
- package/components/DataChart/Detail.js +5 -6
- package/components/DataChart/Legend.js +4 -5
- package/components/DataChart/Swatch.js +4 -5
- package/components/DataChart/XAxis.js +4 -5
- package/components/DataChart/XGuide.js +4 -5
- package/components/DataChart/YAxis.js +4 -5
- package/components/DataChart/YGuide.js +4 -5
- package/components/DataChart/propTypes.js +1 -2
- package/components/DataChart/stories/Axis.js +3 -5
- package/components/DataChart/stories/Detail.js +3 -5
- package/components/DataChart/stories/Everything.js +3 -5
- package/components/DataChart/stories/FourDimension.js +4 -5
- package/components/DataChart/stories/Guide.js +3 -5
- package/components/DataChart/stories/GuideDefault.js +4 -5
- package/components/DataChart/stories/Horizontal.js +3 -5
- package/components/DataChart/stories/Legend.js +3 -5
- package/components/DataChart/stories/MultipleTypes.js +4 -5
- package/components/DataChart/stories/Offset.js +4 -5
- package/components/DataChart/stories/Pad.js +3 -5
- package/components/DataChart/stories/Pattern.js +3 -5
- package/components/DataChart/stories/Placeholder.js +3 -5
- package/components/DataChart/stories/Prediction.js +5 -7
- package/components/DataChart/stories/Simple.js +3 -5
- package/components/DataChart/stories/StackedAreas.js +4 -5
- package/components/DataChart/stories/StackedBars.js +4 -5
- package/components/DataChart/stories/StackedLines.js +4 -5
- package/components/DataChart/utils.js +10 -19
- package/components/DataFilter/DataFilter.js +6 -7
- package/components/DataFilter/propTypes.js +1 -2
- package/components/DataFilter/stories/Simple.js +4 -5
- package/components/DataFilters/DataFilters.js +7 -8
- package/components/DataFilters/propTypes.js +1 -2
- package/components/DataFilters/stories/Drop.js +4 -5
- package/components/DataFilters/stories/Inline.js +4 -5
- package/components/DataFilters/stories/Layer.js +4 -5
- package/components/DataFilters/stories/Simple.js +4 -5
- package/components/DataSearch/DataSearch.js +3 -4
- package/components/DataSearch/propTypes.js +1 -2
- package/components/DataSearch/stories/Drop.js +4 -5
- package/components/DataSearch/stories/Responsive.js +4 -5
- package/components/DataSearch/stories/Simple.js +4 -5
- package/components/DataSort/DataSort.js +3 -4
- package/components/DataSort/propTypes.js +1 -2
- package/components/DataSort/stories/Drop.js +4 -5
- package/components/DataSort/stories/Simple.js +4 -5
- package/components/DataSummary/DataSummary.js +3 -4
- package/components/DataSummary/propTypes.js +1 -2
- package/components/DataSummary/stories/Simple.js +4 -5
- package/components/DataTable/Body.js +5 -6
- package/components/DataTable/Cell.js +3 -4
- package/components/DataTable/DataTable.js +8 -6
- package/components/DataTable/ExpanderCell.js +3 -4
- package/components/DataTable/Footer.js +3 -4
- package/components/DataTable/GroupedBody.js +4 -5
- package/components/DataTable/Header.js +8 -8
- package/components/DataTable/PlaceholderBody.js +4 -5
- package/components/DataTable/Resizer.js +3 -4
- package/components/DataTable/Searcher.js +3 -4
- package/components/DataTable/Sorter.js +3 -4
- package/components/DataTable/StyledDataTable.js +11 -19
- package/components/DataTable/buildState.js +21 -33
- package/components/DataTable/index.d.ts +1 -0
- package/components/DataTable/propTypes.js +2 -2
- package/components/DataTable/stories/AllowSelectAll.js +110 -0
- package/components/DataTable/stories/ColumnSize.js +4 -5
- package/components/DataTable/stories/Controlled.js +4 -5
- package/components/DataTable/stories/ControlledGrouped.js +6 -7
- package/components/DataTable/stories/CustomThemed/Custom.js +3 -5
- package/components/DataTable/stories/CustomThemed/Fill.js +3 -5
- package/components/DataTable/stories/Grouped.js +4 -5
- package/components/DataTable/stories/GroupedOnSelect.js +4 -5
- package/components/DataTable/stories/InfiniteScrollDataTable.js +4 -5
- package/components/DataTable/stories/MultiplePin.js +4 -5
- package/components/DataTable/stories/NoPrimary.js +4 -5
- package/components/DataTable/stories/OnUpdate.js +6 -7
- package/components/DataTable/stories/Placeholder.js +3 -5
- package/components/DataTable/stories/ResizableColumns.js +4 -5
- package/components/DataTable/stories/Served.js +4 -5
- package/components/DataTable/stories/Show.js +3 -5
- package/components/DataTable/stories/Simple.js +3 -5
- package/components/DataTable/stories/Sized.js +4 -5
- package/components/DataTable/stories/Sort.js +3 -5
- package/components/DataTable/stories/SpaceX.js +7 -8
- package/components/DataTable/stories/SpaceXUngrouped.js +7 -8
- package/components/DataTable/stories/Styled.js +4 -5
- package/components/DataTable/stories/Tunable.js +4 -5
- package/components/DataTable/stories/Units.js +4 -5
- package/components/DataTable/stories/VerticalAlign.js +4 -5
- package/components/DataTable/stories/data.js +8 -15
- package/components/DataTable/stories/rowDetails.js +4 -5
- package/components/DataTableColumns/DataTableColumns.js +3 -4
- package/components/DataTableColumns/propTypes.js +1 -2
- package/components/DataTableColumns/stories/Simple.js +4 -5
- package/components/DataTableGroupBy/DataTableGroupBy.js +3 -4
- package/components/DataTableGroupBy/propTypes.js +1 -2
- package/components/DataTableGroupBy/stories/Simple.js +4 -5
- package/components/DataView/DataView.js +3 -4
- package/components/DataView/propTypes.js +1 -2
- package/components/DataView/stories/Simple.js +4 -5
- package/components/DateInput/DateInput.js +5 -6
- package/components/DateInput/propTypes.js +1 -2
- package/components/DateInput/stories/Form.js +3 -5
- package/components/DateInput/stories/Format.js +3 -5
- package/components/DateInput/stories/FormatInline.js +5 -7
- package/components/DateInput/stories/Inline.js +3 -5
- package/components/DateInput/stories/Range.js +3 -5
- package/components/DateInput/stories/RangeFormat.js +3 -5
- package/components/DateInput/stories/ResetDate.js +4 -7
- package/components/DateInput/stories/Simple.js +3 -5
- package/components/DateInput/utils.js +9 -15
- package/components/Diagram/Diagram.js +3 -4
- package/components/Diagram/StyledDiagram.js +3 -4
- package/components/Diagram/propTypes.js +1 -2
- package/components/Diagram/stories/Animated.js +5 -7
- package/components/Diagram/stories/Progressing.js +6 -7
- package/components/Diagram/stories/data.js +2 -3
- package/components/Distribution/Distribution.js +1 -2
- package/components/Distribution/propTypes.js +1 -2
- package/components/Drop/Drop.js +3 -4
- package/components/Drop/DropContainer.js +60 -16
- package/components/Drop/StyledDrop.js +3 -4
- package/components/Drop/propTypes.js +1 -2
- package/components/Drop/stories/AllNotStretched.js +3 -5
- package/components/Drop/stories/CustomThemed/Lazy.js +5 -7
- package/components/Drop/stories/CustomThemed/Themed.js +5 -7
- package/components/Drop/stories/Inline.js +5 -7
- package/components/Drop/stories/Meter.js +5 -7
- package/components/Drop/stories/Multiple.js +5 -7
- package/components/Drop/stories/Overflow.js +5 -7
- package/components/Drop/stories/Plain.js +5 -7
- package/components/Drop/stories/Progressive.js +5 -7
- package/components/Drop/stories/Simple.js +5 -7
- package/components/Drop/stories/Styled.js +5 -7
- package/components/Drop/stories/TrapFocus.js +6 -7
- package/components/DropButton/DropButton.js +3 -4
- package/components/DropButton/propTypes.js +1 -2
- package/components/DropButton/stories/Menu.js +3 -5
- package/components/DropButton/stories/Simple.js +3 -5
- package/components/FileInput/FileInput.js +3 -4
- package/components/FileInput/StyledFileInput.js +1 -2
- package/components/FileInput/propTypes.js +1 -2
- package/components/FileInput/stories/ConfirmRemove.js +3 -5
- package/components/FileInput/stories/CustomThemed/Custom.js +3 -5
- package/components/FileInput/stories/MaxFileCount.js +3 -5
- package/components/FileInput/stories/MaxSize.js +3 -5
- package/components/FileInput/stories/Multiple.js +3 -5
- package/components/FileInput/stories/Simple.js +3 -5
- package/components/FileInput/utils/formatBytes.js +3 -4
- package/components/FocusedContainer.js +4 -5
- package/components/Footer/Footer.js +2 -3
- package/components/Footer/stories/DoubleFooter.js +4 -5
- package/components/Footer/stories/Simple.js +3 -5
- package/components/Footer/stories/Sitemap.js +3 -5
- package/components/Footer/stories/Social.js +3 -5
- package/components/Footer/stories/data.js +2 -4
- package/components/Form/Form.js +3 -4
- package/components/Form/FormContext.js +4 -5
- package/components/Form/propTypes.js +1 -2
- package/components/Form/stories/AggregateValidation.js +4 -5
- package/components/Form/stories/ArrayOfFormFields.js +5 -7
- package/components/Form/stories/Controlled.js +6 -7
- package/components/Form/stories/ControlledInput.js +6 -7
- package/components/Form/stories/ControlledInputLazy.js +6 -7
- package/components/Form/stories/ControlledLazy.js +6 -7
- package/components/Form/stories/CustomThemed/Custom.js +3 -5
- package/components/Form/stories/CustomThemed/FieldBorderPosition.js +6 -7
- package/components/Form/stories/CustomThemed/FieldCustomStates.js +5 -7
- package/components/Form/stories/CustomThemed/FieldSpacingOptions.js +3 -5
- package/components/Form/stories/CustomThemed/RequiredLabel.js +3 -5
- package/components/Form/stories/CustomThemed/Themed.js +3 -5
- package/components/Form/stories/DynamicFields.js +6 -7
- package/components/Form/stories/FieldStates.js +6 -7
- package/components/Form/stories/FieldWithChildren.js +4 -5
- package/components/Form/stories/FieldWithComponentProp.js +4 -5
- package/components/Form/stories/HelpAndError.js +4 -5
- package/components/Form/stories/SolicitedFeedback.js +6 -7
- package/components/Form/stories/TriggerValidationUsingFormField.js +3 -5
- package/components/Form/stories/Uncontrolled.js +4 -5
- package/components/Form/stories/UnsolicitedFeedback.js +6 -7
- package/components/Form/stories/ValidateOnBlur.js +4 -5
- package/components/Form/stories/ValidateOnChange.js +6 -7
- package/components/Form/stories/ValidateOnMount.js +6 -7
- package/components/FormField/FormField.js +4 -5
- package/components/FormField/propTypes.js +1 -2
- package/components/FormField/stories/Simple.js +5 -7
- package/components/Grid/Grid.js +3 -4
- package/components/Grid/StyledGrid.js +3 -4
- package/components/Grid/propTypes.js +1 -2
- package/components/Grid/stories/AreasPropAlternative.js +4 -5
- package/components/Grid/stories/Border.js +4 -5
- package/components/Grid/stories/CustomThemed/Responsive.js +3 -5
- package/components/Grid/stories/NColumn.js +4 -5
- package/components/Grid/stories/Percentages.js +4 -5
- package/components/Grid/stories/ResponsiveCards.js +6 -7
- package/components/Grommet/Grommet.js +3 -4
- package/components/Grommet/StyledGrommet.js +3 -4
- package/components/Grommet/index.d.ts +75 -0
- package/components/Grommet/propTypes.js +77 -3
- package/components/Grommet/stories/Background.js +3 -5
- package/components/Grommet/stories/Messages.js +3 -5
- package/components/Grommet/stories/Plain.js +3 -5
- package/components/Grommet/stories/Theme.js +3 -5
- package/components/Grommet/stories/ThemeMode.js +3 -5
- package/components/Grommet/stories/Vars.js +3 -5
- package/components/Header/Header.js +7 -8
- package/components/Header/propTypes.js +1 -2
- package/components/Header/stories/Responsive.js +3 -5
- package/components/Header/stories/Sticky.js +6 -7
- package/components/Heading/Heading.js +3 -4
- package/components/Heading/HeadingSkeleton.js +3 -4
- package/components/Heading/StyledHeading.js +3 -4
- package/components/Heading/propTypes.js +1 -2
- package/components/Heading/stories/All.js +3 -5
- package/components/Heading/stories/CustomThemed/CustomHeading.js +3 -5
- package/components/Heading/stories/CustomThemed/Extend.js +3 -5
- package/components/Image/Image.js +3 -4
- package/components/Image/StyledImage.js +3 -4
- package/components/Image/propTypes.js +1 -2
- package/components/Image/stories/Fallback.js +3 -5
- package/components/Image/stories/Fill.js +3 -5
- package/components/Image/stories/Fit.js +3 -5
- package/components/Image/stories/Opacity.js +3 -5
- package/components/Image/stories/Simple.js +3 -5
- package/components/InfiniteScroll/InfiniteScroll.js +3 -4
- package/components/InfiniteScroll/propTypes.js +1 -2
- package/components/InfiniteScroll/stories/Basics.js +3 -5
- package/components/InfiniteScroll/stories/ClassChildren.js +4 -5
- package/components/InfiniteScroll/stories/Grid.js +4 -5
- package/components/InfiniteScroll/stories/GridWithShow.js +4 -5
- package/components/InfiniteScroll/stories/HeightReplace.js +4 -5
- package/components/InfiniteScroll/stories/Marker.js +3 -5
- package/components/InfiniteScroll/stories/Replace.js +4 -5
- package/components/InfiniteScroll/stories/Show.js +3 -5
- package/components/InfiniteScroll/stories/ShowAfter.js +3 -5
- package/components/InfiniteScroll/stories/ShowBefore.js +3 -5
- package/components/InfiniteScroll/stories/Variable.js +4 -5
- package/components/Keyboard/Keyboard.js +1 -2
- package/components/Keyboard/propTypes.js +1 -2
- package/components/Keyboard/stories/OnDocument.js +3 -5
- package/components/Layer/Layer.js +7 -6
- package/components/Layer/LayerContainer.js +4 -5
- package/components/Layer/PortalContext.js +1 -2
- package/components/Layer/StyledLayer.js +6 -10
- package/components/Layer/propTypes.js +1 -2
- package/components/Layer/stories/Center.js +4 -5
- package/components/Layer/stories/Corner.js +4 -5
- package/components/Layer/stories/CustomThemed/Round.js +3 -5
- package/components/Layer/stories/Form.js +4 -5
- package/components/Layer/stories/Full.js +4 -5
- package/components/Layer/stories/Notification.js +4 -5
- package/components/Layer/stories/Plain.js +4 -5
- package/components/Layer/stories/RTL.js +4 -5
- package/components/Layer/stories/ScrollBody.js +4 -5
- package/components/Layer/stories/Target.js +4 -5
- package/components/List/List.js +8 -9
- package/components/List/propTypes.js +1 -2
- package/components/List/stories/Action.js +3 -5
- package/components/List/stories/Basic.js +3 -5
- package/components/List/stories/Children.js +3 -5
- package/components/List/stories/Disabled.js +3 -5
- package/components/List/stories/Order.js +5 -7
- package/components/List/stories/Paginated.js +3 -5
- package/components/List/stories/Pinned.js +5 -7
- package/components/List/stories/RenderedList.js +6 -5
- package/components/List/stories/Selection.js +3 -5
- package/components/List/stories/Show.js +3 -5
- package/components/List/stories/onClickItem.js +3 -5
- package/components/List/stories/secondaryKey.js +3 -5
- package/components/Main/Main.js +2 -3
- package/components/Markdown/Markdown.js +3 -4
- package/components/Markdown/propTypes.js +1 -2
- package/components/Markdown/stories/Override.js +4 -5
- package/components/Markdown/stories/Simple.js +3 -5
- package/components/MaskedInput/MaskedInput.js +5 -5
- package/components/MaskedInput/StyledMaskedInput.js +4 -7
- package/components/MaskedInput/propTypes.js +1 -2
- package/components/MaskedInput/stories/CustomBox.js +4 -5
- package/components/MaskedInput/stories/Date.js +4 -5
- package/components/MaskedInput/stories/DateRange.js +4 -5
- package/components/MaskedInput/stories/DateTimeDrop.js +4 -5
- package/components/MaskedInput/stories/Filtered.js +4 -5
- package/components/MaskedInput/stories/Form.js +4 -5
- package/components/MaskedInput/stories/IPV4Range.js +4 -5
- package/components/MaskedInput/stories/IPv4Address.js +4 -5
- package/components/MaskedInput/stories/Phone.js +4 -5
- package/components/MaskedInput/stories/SizeUnits.js +4 -5
- package/components/MaskedInput/stories/Time.js +4 -5
- package/components/MaskedInput/stories/URL.js +4 -5
- package/components/Menu/Menu.js +10 -7
- package/components/Menu/propTypes.js +1 -2
- package/components/Menu/stories/BottomControlButton.js +3 -5
- package/components/Menu/stories/Grouped.js +4 -5
- package/components/Menu/stories/ItemWithIcon.js +3 -5
- package/components/Menu/stories/Justify.js +3 -5
- package/components/Menu/stories/Reverse.js +3 -5
- package/components/Menu/stories/Simple.js +3 -5
- package/components/Meter/Bar.js +3 -4
- package/components/Meter/Circle.js +3 -4
- package/components/Meter/Meter.js +3 -4
- package/components/Meter/StyledMeter.js +3 -4
- package/components/Meter/propTypes.js +1 -2
- package/components/Meter/stories/Bar.js +3 -5
- package/components/Meter/stories/Circle.js +5 -7
- package/components/Meter/stories/Labelled.js +3 -5
- package/components/Meter/stories/Pie.js +3 -5
- package/components/Meter/stories/ReverseBar.js +3 -5
- package/components/Meter/stories/SemiCircle.js +3 -5
- package/components/Meter/stories/VerticalBar.js +3 -5
- package/components/Meter/stories/VerticalBarMultiple.js +6 -7
- package/components/Meter/utils.js +3 -5
- package/components/NameValueList/NameValueList.js +5 -6
- package/components/NameValueList/NameValueListContext.js +1 -2
- package/components/NameValueList/propTypes.js +1 -2
- package/components/NameValueList/stories/Align.js +3 -5
- package/components/NameValueList/stories/CustomName.js +3 -5
- package/components/NameValueList/stories/CustomValue.js +3 -5
- package/components/NameValueList/stories/Layout.js +3 -5
- package/components/NameValueList/stories/PairProps.js +3 -5
- package/components/NameValueList/stories/Simple.js +3 -5
- package/components/NameValueList/stories/Width.js +3 -5
- package/components/NameValueList/stories/data.js +5 -9
- package/components/NameValuePair/NameValuePair.js +6 -7
- package/components/NameValuePair/propTypes.js +1 -2
- package/components/Nav/Nav.js +2 -3
- package/components/Nav/stories/Collapsable.js +3 -5
- package/components/Nav/stories/CustomThemed/CustomAnchor.js +3 -5
- package/components/Nav/stories/CustomThemed/JustifySidebar.js +5 -7
- package/components/Nav/stories/OnHeader.js +3 -5
- package/components/Nav/stories/Sidebar.js +5 -7
- package/components/Nav/stories/Simple.js +3 -5
- package/components/Notification/Notification.js +6 -7
- package/components/Notification/propTypes.js +1 -2
- package/components/Notification/stories/Global.js +5 -7
- package/components/Notification/stories/Status.js +3 -5
- package/components/Notification/stories/Title.js +5 -7
- package/components/Notification/stories/TitleAndMessage.js +5 -7
- package/components/Page/Page.js +3 -4
- package/components/Page/PageContext.js +1 -2
- package/components/Page/propTypes.js +1 -2
- package/components/Page/stories/Background.js +3 -5
- package/components/Page/stories/ContentBackground.js +4 -5
- package/components/Page/stories/CustomThemed/LeftColumn.js +3 -5
- package/components/Page/stories/GlobalHeader.js +4 -5
- package/components/Page/stories/MultipleBackgrounds.js +4 -5
- package/components/Page/stories/MultipleContent.js +4 -5
- package/components/Page/stories/PageNotificaton.js +5 -7
- package/components/Page/stories/Simple.js +3 -5
- package/components/PageContent/PageContent.js +3 -4
- package/components/PageContent/propTypes.js +1 -2
- package/components/PageHeader/PageHeader.js +8 -6
- package/components/PageHeader/index.d.ts +1 -0
- package/components/PageHeader/propTypes.js +2 -2
- package/components/PageHeader/stories/Custom.js +3 -5
- package/components/PageHeader/stories/Level.js +34 -0
- package/components/PageHeader/stories/MultipleActions.js +6 -7
- package/components/PageHeader/stories/Responsive.js +3 -5
- package/components/PageHeader/stories/Simple.js +3 -5
- package/components/PageHeader/stories/Size.js +3 -5
- package/components/Pagination/PageControl.js +4 -5
- package/components/Pagination/Pagination.js +3 -4
- package/components/Pagination/StyledPageControl.js +4 -7
- package/components/Pagination/propTypes.js +1 -2
- package/components/Pagination/stories/Grid.js +6 -7
- package/components/Pagination/stories/NumberEdgePages.js +4 -5
- package/components/Pagination/stories/NumberMiddlePages.js +4 -5
- package/components/Pagination/stories/Simple.js +3 -5
- package/components/Pagination/stories/Size.js +3 -5
- package/components/Paragraph/Paragraph.js +3 -4
- package/components/Paragraph/ParagraphSkeleton.js +3 -4
- package/components/Paragraph/StyledParagraph.js +3 -4
- package/components/Paragraph/propTypes.js +1 -2
- package/components/Paragraph/stories/All.js +3 -5
- package/components/Paragraph/stories/CustomThemed/Themed.js +3 -5
- package/components/Paragraph/stories/MaxLines.js +3 -5
- package/components/RadioButton/RadioButton.js +10 -4
- package/components/RadioButton/StyledRadioButton.js +9 -16
- package/components/RadioButton/propTypes.js +1 -2
- package/components/RadioButton/stories/Children.js +3 -5
- package/components/RadioButton/stories/CustomThemed/Theme.js +3 -5
- package/components/RadioButton/stories/Disabled.js +3 -5
- package/components/RadioButton/stories/Simple.js +3 -5
- package/components/RadioButtonGroup/RadioButtonGroup.js +3 -4
- package/components/RadioButtonGroup/propTypes.js +1 -2
- package/components/RadioButtonGroup/stories/Children.js +5 -7
- package/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +5 -7
- package/components/RadioButtonGroup/stories/Disabled.js +5 -7
- package/components/RangeInput/RangeInput.js +3 -4
- package/components/RangeInput/StyledRangeInput.js +8 -8
- package/components/RangeInput/propTypes.js +1 -2
- package/components/RangeInput/stories/CustomThemed/Bounds.js +3 -5
- package/components/RangeInput/stories/CustomThemed/Disabled.js +3 -5
- package/components/RangeInput/stories/CustomThemed/TrackColor.js +3 -5
- package/components/RangeInput/stories/SimpleRange.js +3 -5
- package/components/RangeSelector/EdgeControl.js +3 -4
- package/components/RangeSelector/RangeSelector.js +3 -4
- package/components/RangeSelector/index.d.ts +1 -1
- package/components/RangeSelector/propTypes.js +1 -2
- package/components/RangeSelector/stories/Basics.js +5 -7
- package/components/RangeSelector/stories/CustomThemed/Custom.js +5 -7
- package/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +5 -7
- package/components/RangeSelector/stories/Label.js +5 -7
- package/components/RangeSelector/stories/Simple.js +5 -7
- package/components/RangeSelector/stories/Step.js +5 -7
- package/components/RangeSelector/stories/Thin.js +6 -7
- package/components/RangeSelector/stories/Vertical.js +5 -7
- package/components/RoutedAnchor/RoutedAnchor.js +3 -4
- package/components/RoutedButton/RoutedButton.js +3 -4
- package/components/Select/DefaultSelectTextInput.js +4 -5
- package/components/Select/EmptySearchOption.js +5 -6
- package/components/Select/Select.js +3 -4
- package/components/Select/SelectContainer.js +5 -6
- package/components/Select/StyledSelect.js +11 -17
- package/components/Select/propTypes.js +2 -4
- package/components/Select/stories/ChildrenRender.js +6 -7
- package/components/Select/stories/Clear.js +6 -7
- package/components/Select/stories/Controlled.js +6 -7
- package/components/Select/stories/CustomThemed/CustomSearch.js +5 -7
- package/components/Select/stories/Disabled.js +6 -7
- package/components/Select/stories/InsideFormField.js +6 -7
- package/components/Select/stories/LazyLoadingOptions.js +4 -5
- package/components/Select/stories/ManyOptions.js +4 -5
- package/components/Select/stories/Multiple.js +6 -7
- package/components/Select/stories/ObjectOptions.js +6 -7
- package/components/Select/stories/Search.js +6 -7
- package/components/Select/stories/Simple.js +6 -7
- package/components/Select/stories/Uncontrolled.js +4 -5
- package/components/Select/stories/ValueLabel.js +6 -7
- package/components/Select/stories/components/SearchBorderBox.js +4 -5
- package/components/Select/stories/components/SearchInput.js +4 -5
- package/components/Select/stories/theme.js +2 -3
- package/components/Select/utils.js +12 -23
- package/components/SelectMultiple/SelectMultiple.js +7 -8
- package/components/SelectMultiple/SelectMultipleContainer.js +6 -7
- package/components/SelectMultiple/SelectMultipleValue.js +4 -5
- package/components/SelectMultiple/SelectionSummary.js +4 -5
- package/components/SelectMultiple/propTypes.js +1 -2
- package/components/SelectMultiple/stories/Default.js +6 -7
- package/components/SelectMultiple/stories/Disabled.js +6 -7
- package/components/SelectMultiple/stories/FormField.js +6 -7
- package/components/SelectMultiple/stories/Help.js +6 -7
- package/components/SelectMultiple/stories/Limited.js +6 -7
- package/components/SelectMultiple/stories/LongList.js +4 -5
- package/components/SelectMultiple/stories/ObjectOptions.js +6 -7
- package/components/SelectMultiple/stories/ShowSelectedInline.js +6 -7
- package/components/Sidebar/Sidebar.js +1 -2
- package/components/Sidebar/propTypes.js +1 -2
- package/components/Sidebar/stories/Labels.js +4 -5
- package/components/Skeleton/Skeleton.js +4 -5
- package/components/Skeleton/SkeletonContext.js +5 -7
- package/components/Skeleton/StyledSkeleton.js +4 -5
- package/components/Skeleton/propTypes.js +1 -2
- package/components/Skeleton/stories/CustomThemed/Custom.js +5 -7
- package/components/Skeleton/stories/GridContainer.js +5 -7
- package/components/Skeleton/stories/Group.js +5 -7
- package/components/Skeleton/stories/Individual.js +5 -7
- package/components/Skeleton/stories/Simple.js +3 -5
- package/components/SkipLink/SkipLink.js +4 -5
- package/components/SkipLinkTarget/SkipLinkTarget.js +2 -3
- package/components/SkipLinks/SkipLinks.js +3 -4
- package/components/SkipLinks/propTypes.js +1 -2
- package/components/SkipLinks/stories/CustomThemed/Themed.js +3 -5
- package/components/SkipLinks/stories/Simple.js +4 -5
- package/components/Spinner/Spinner.js +3 -4
- package/components/Spinner/propTypes.js +1 -2
- package/components/Spinner/stories/Animation.js +5 -7
- package/components/Spinner/stories/Announced.js +5 -7
- package/components/Spinner/stories/Border.js +3 -5
- package/components/Spinner/stories/ChildrenSpinner.js +3 -5
- package/components/Spinner/stories/Color.js +3 -5
- package/components/Spinner/stories/Modal.js +3 -5
- package/components/Spinner/stories/Round.js +3 -5
- package/components/Spinner/stories/Simple.js +3 -5
- package/components/Spinner/stories/Size.js +3 -5
- package/components/Stack/Stack.js +3 -4
- package/components/Stack/StyledStack.js +4 -6
- package/components/Stack/propTypes.js +1 -2
- package/components/Stack/stories/Fill.js +4 -5
- package/components/Stack/stories/Simple.js +3 -5
- package/components/StarRating/StarRating.js +3 -4
- package/components/StarRating/stories/simple.js +3 -5
- package/components/Tab/StyledTab.js +3 -4
- package/components/Tab/Tab.js +3 -4
- package/components/Tab/propTypes.js +1 -2
- package/components/Table/StyledTable.js +9 -16
- package/components/Table/Table.js +3 -4
- package/components/Table/TableContext.js +1 -2
- package/components/Table/propTypes.js +1 -2
- package/components/Table/stories/CustomThemed/Custom.js +3 -5
- package/components/Table/stories/Default.js +3 -5
- package/components/Table/stories/InfiniteScrollInTable.js +6 -7
- package/components/Table/stories/MeterInTable.js +4 -5
- package/components/Table/stories/data.js +3 -5
- package/components/TableBody/TableBody.js +3 -4
- package/components/TableCell/TableCell.js +4 -6
- package/components/TableCell/propTypes.js +1 -2
- package/components/TableFooter/TableFooter.js +3 -4
- package/components/TableHeader/TableHeader.js +3 -4
- package/components/TableRow/TableRow.js +3 -4
- package/components/Tabs/StyledTabs.js +5 -8
- package/components/Tabs/Tabs.js +3 -4
- package/components/Tabs/TabsContext.js +1 -2
- package/components/Tabs/propTypes.js +1 -2
- package/components/Tabs/stories/CustomThemed/Custom.js +3 -5
- package/components/Tabs/stories/CustomThemed/States.js +5 -7
- package/components/Tabs/stories/Responsive.js +5 -7
- package/components/Tabs/stories/Rich.js +4 -5
- package/components/Tabs/stories/Scrollable.js +3 -5
- package/components/Tag/StyledTag.js +2 -4
- package/components/Tag/Tag.js +9 -9
- package/components/Tag/propTypes.js +1 -2
- package/components/Tag/stories/OnClick.js +3 -5
- package/components/Tag/stories/OnRemove.js +3 -5
- package/components/Tag/stories/Simple.js +3 -5
- package/components/Tag/stories/Size.js +3 -5
- package/components/Text/StyledText.js +3 -4
- package/components/Text/Text.js +3 -4
- package/components/Text/TextContext.js +1 -2
- package/components/Text/TextSkeleton.js +3 -4
- package/components/Text/propTypes.js +1 -2
- package/components/Text/stories/All.js +3 -5
- package/components/Text/stories/Tip.js +3 -5
- package/components/Text/stories/WordBreak.js +3 -5
- package/components/TextArea/StyledTextArea.js +4 -5
- package/components/TextArea/TextArea.js +3 -4
- package/components/TextArea/propTypes.js +1 -2
- package/components/TextArea/stories/CustomThemed/Themed.js +5 -7
- package/components/TextArea/stories/InsideFormField.js +6 -7
- package/components/TextArea/stories/NonResizable.js +5 -7
- package/components/TextArea/stories/Simple.js +5 -7
- package/components/TextInput/StyledTextInput.js +7 -12
- package/components/TextInput/TextInput.js +3 -4
- package/components/TextInput/propTypes.js +1 -2
- package/components/TextInput/stories/CustomThemed/Themed.js +3 -5
- package/components/TextInput/stories/DefaultSuggestion.js +4 -5
- package/components/TextInput/stories/Icon.js +3 -5
- package/components/TextInput/stories/InsideFormField.js +6 -7
- package/components/TextInput/stories/OnSelect.js +4 -5
- package/components/TextInput/stories/Password.js +3 -5
- package/components/TextInput/stories/Simple.js +4 -5
- package/components/TextInput/stories/StyledPlaceholder.js +4 -5
- package/components/TextInput/stories/Suggestions.js +4 -5
- package/components/TextInput/stories/Uncontrolled.js +4 -5
- package/components/TextInput/stories/WithTags.js +4 -5
- package/components/ThumbsRating/ThumbsRating.js +9 -10
- package/components/ThumbsRating/stories/simple.js +3 -5
- package/components/Tip/Tip.js +15 -6
- package/components/Tip/propTypes.js +1 -2
- package/components/Tip/stories/Caret.js +4 -5
- package/components/Tip/stories/CustomThemed/ResponsiveTip.js +3 -5
- package/components/Tip/stories/CustomThemed/SidebarTip.js +3 -5
- package/components/Tip/stories/HeaderActions.js +6 -7
- package/components/Tip/stories/InfoTip.js +4 -5
- package/components/Toolbar/Toolbar.js +3 -4
- package/components/Toolbar/propTypes.js +1 -2
- package/components/Toolbar/stories/Simple.js +4 -5
- package/components/Video/StyledVideo.js +6 -10
- package/components/Video/Video.js +6 -7
- package/components/Video/propTypes.js +1 -2
- package/components/WorldMap/StyledWorldMap.js +1 -2
- package/components/WorldMap/WorldMap.js +3 -4
- package/components/WorldMap/propTypes.js +1 -2
- package/components/WorldMap/stories/Color.js +3 -5
- package/components/WorldMap/stories/Continents.js +3 -5
- package/components/WorldMap/stories/Places.js +3 -5
- package/components/WorldMap/stories/SelectPlace.js +3 -5
- package/components/WorldMap/stories/Simple.js +3 -5
- package/contexts/AnalyticsContext/AnalyticsContext.js +8 -11
- package/contexts/AnnounceContext/AnnounceContext.js +1 -2
- package/contexts/AnnounceContext/propTypes.js +1 -2
- package/contexts/AnnounceContext/stories/Assertive.js +3 -5
- package/contexts/AnnounceContext/stories/Polite.js +5 -7
- package/contexts/ContainerTargetContext/ContainerTargetContext.js +1 -2
- package/contexts/DataContext.js +2 -3
- package/contexts/MessageContext/MessageContext.js +3 -5
- package/contexts/OptionsContext.js +1 -2
- package/contexts/ResponsiveContext/ResponsiveContext.js +1 -2
- package/contexts/ResponsiveContext/propTypes.js +1 -2
- package/contexts/ResponsiveContext/stories/CustomBreakpoints.js +3 -5
- package/contexts/ResponsiveContext/stories/ResponsiveGrid.js +3 -5
- package/contexts/RootsContext.js +1 -2
- package/contexts/ThemeContext/propTypes.js +1 -2
- package/contexts/ThemeContext/stories/ExternalComponent.js +3 -5
- package/contexts/ThemeContext/stories/ThemeContextExtend.js +5 -7
- package/default-props.js +3 -5
- package/es6/components/Anchor/Anchor.js +2 -2
- package/es6/components/Anchor/StyledAnchor.js +6 -6
- package/es6/components/Box/Box.js +1 -1
- package/es6/components/Box/index.d.ts +1 -1
- package/es6/components/Box/stories/Round.js +1 -1
- package/es6/components/Box/stories/Simple.js +4 -3
- package/es6/components/Button/Button.js +8 -8
- package/es6/components/Button/StyledButtonKind.js +5 -5
- package/es6/components/Calendar/Calendar.js +3 -3
- package/es6/components/Chart/index.d.ts +4 -4
- package/es6/components/CheckBox/StyledCheckBox.js +8 -8
- package/es6/components/Data/DataForm.js +15 -10
- package/es6/components/Data/stories/Infinite.js +3 -3
- package/es6/components/Data/stories/SpaceX.js +2 -2
- package/es6/components/Data/stories/StarWars.js +2 -2
- package/es6/components/DataChart/DataChart.js +4 -4
- package/es6/components/DataChart/Detail.js +1 -1
- package/es6/components/DataFilter/DataFilter.js +3 -3
- package/es6/components/DataFilters/DataFilters.js +4 -4
- package/es6/components/DataTable/Body.js +1 -1
- package/es6/components/DataTable/DataTable.js +5 -2
- package/es6/components/DataTable/Header.js +5 -4
- package/es6/components/DataTable/buildState.js +8 -8
- package/es6/components/DataTable/index.d.ts +1 -0
- package/es6/components/DataTable/propTypes.js +1 -0
- package/es6/components/DataTable/stories/AllowSelectAll.js +105 -0
- package/es6/components/DataTable/stories/SpaceX.js +1 -1
- package/es6/components/DataTable/stories/SpaceXUngrouped.js +1 -1
- package/es6/components/DateInput/DateInput.js +2 -2
- package/es6/components/DateInput/utils.js +2 -2
- package/es6/components/Drop/DropContainer.js +56 -11
- package/es6/components/FileInput/utils/formatBytes.js +2 -2
- package/es6/components/FormField/FormField.js +1 -1
- package/es6/components/Grommet/index.d.ts +75 -0
- package/es6/components/Grommet/propTypes.js +76 -1
- package/es6/components/Header/Header.js +4 -4
- package/es6/components/Layer/Layer.js +4 -2
- package/es6/components/List/List.js +5 -5
- package/es6/components/List/stories/RenderedList.js +3 -0
- package/es6/components/MaskedInput/MaskedInput.js +2 -1
- package/es6/components/Menu/Menu.js +7 -3
- package/es6/components/NameValueList/NameValueList.js +2 -2
- package/es6/components/NameValuePair/NameValuePair.js +2 -2
- package/es6/components/Notification/Notification.js +3 -3
- package/es6/components/PageHeader/PageHeader.js +5 -2
- package/es6/components/PageHeader/index.d.ts +1 -0
- package/es6/components/PageHeader/propTypes.js +1 -0
- package/es6/components/PageHeader/stories/Level.js +29 -0
- package/es6/components/RadioButton/RadioButton.js +7 -0
- package/es6/components/RadioButton/StyledRadioButton.js +1 -2
- package/es6/components/RangeInput/StyledRangeInput.js +4 -4
- package/es6/components/RangeSelector/index.d.ts +1 -1
- package/es6/components/Select/EmptySearchOption.js +3 -3
- package/es6/components/Select/SelectContainer.js +1 -1
- package/es6/components/Select/StyledSelect.js +4 -4
- package/es6/components/SelectMultiple/SelectMultiple.js +4 -4
- package/es6/components/SelectMultiple/SelectMultipleContainer.js +2 -2
- package/es6/components/Skeleton/Skeleton.js +1 -1
- package/es6/components/Skeleton/StyledSkeleton.js +2 -2
- package/es6/components/Tag/Tag.js +6 -5
- package/es6/components/TextArea/StyledTextArea.js +1 -1
- package/es6/components/ThumbsRating/ThumbsRating.js +6 -6
- package/es6/components/Tip/Tip.js +12 -2
- package/es6/components/Video/Video.js +3 -3
- package/es6/contexts/AnalyticsContext/AnalyticsContext.js +2 -2
- package/es6/contexts/MessageContext/MessageContext.js +1 -1
- package/es6/languages/default.json +5 -5
- package/es6/themes/base.d.ts +6 -0
- package/es6/themes/base.js +6 -0
- package/es6/utils/background.js +4 -4
- package/es6/utils/index.d.ts +5 -5
- package/es6/utils/styles.js +2 -2
- package/grommet.min.js +1 -1
- package/grommet.min.js.map +1 -1
- package/languages/default.json +5 -5
- package/package.json +43 -42
- package/themes/base.d.ts +6 -0
- package/themes/base.js +8 -4
- package/themes/dark.js +2 -3
- package/themes/grommet.js +2 -3
- package/themes/hacktoberfest2022.js +2 -3
- package/tools/release-styled-components-beta-stable.js +1 -0
- package/utils/DOM.js +16 -31
- package/utils/PortalContext.js +1 -2
- package/utils/animation.js +5 -9
- package/utils/background.js +12 -19
- package/utils/border.js +3 -5
- package/utils/colors.js +6 -11
- package/utils/dates.js +2 -3
- package/utils/general-prop-types.js +20 -40
- package/utils/graphics.js +5 -9
- package/utils/icon.js +2 -3
- package/utils/index.d.ts +5 -5
- package/utils/mixins.js +7 -13
- package/utils/object.js +5 -9
- package/utils/pagination.js +3 -5
- package/utils/refs.js +2 -3
- package/utils/responsive.js +4 -7
- package/utils/router.js +2 -3
- package/utils/styles.js +24 -45
- package/utils/use-isomorphic-layout-effect.js +2 -4
- package/utils/use-keyboard.js +2 -4
|
@@ -171,14 +171,14 @@ export var textToValue = function textToValue(text, schema, range, reference, ou
|
|
|
171
171
|
parts.m = pullDigits(text, index);
|
|
172
172
|
index += parts.m.length;
|
|
173
173
|
} else if (_char3 === 'd') {
|
|
174
|
-
var _parts
|
|
174
|
+
var _parts;
|
|
175
175
|
parts.d = pullDigits(text, index);
|
|
176
176
|
// when format is something like yyyy/mm/dd,
|
|
177
177
|
// '0' as incomplete day can cause date to be
|
|
178
178
|
// prematurely calculated.
|
|
179
179
|
// ex: 2022/01/0 would reutrn 2021/12/31 in addDate()
|
|
180
180
|
if (parts.d === '0') delete parts.d;
|
|
181
|
-
index += ((_parts = parts) == null
|
|
181
|
+
index += ((_parts = parts) == null || (_parts = _parts.d) == null ? void 0 : _parts.length) || 0;
|
|
182
182
|
} else if (_char3 === 'y') {
|
|
183
183
|
parts.y = pullDigits(text, index);
|
|
184
184
|
index += parts.y.length;
|
|
@@ -10,6 +10,7 @@ import { defaultProps } from '../../default-props';
|
|
|
10
10
|
import { Box } from '../Box';
|
|
11
11
|
import { Keyboard } from '../Keyboard';
|
|
12
12
|
import { StyledDrop } from './StyledDrop';
|
|
13
|
+
import { OptionsContext } from '../../contexts/OptionsContext';
|
|
13
14
|
|
|
14
15
|
// using react synthetic event to be able to stop propagation that
|
|
15
16
|
// would otherwise close the layer on ESC.
|
|
@@ -19,6 +20,29 @@ var preventLayerClose = function preventLayerClose(event) {
|
|
|
19
20
|
event.stopPropagation();
|
|
20
21
|
}
|
|
21
22
|
};
|
|
23
|
+
|
|
24
|
+
// Gets the closest ancestor positioned element
|
|
25
|
+
var getParentNode = function getParentNode(element) {
|
|
26
|
+
var _element$offsetParent;
|
|
27
|
+
return (_element$offsetParent = element.offsetParent) != null ? _element$offsetParent : element.parentNode;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
// return the containing block
|
|
31
|
+
var getContainingBlock = function getContainingBlock(element) {
|
|
32
|
+
var currentNode = getParentNode(element);
|
|
33
|
+
while (currentNode instanceof window.HTMLElement && !['html', 'body'].includes(currentNode.nodeName.toLowerCase())) {
|
|
34
|
+
var _currentNode;
|
|
35
|
+
var css = window.getComputedStyle(currentNode);
|
|
36
|
+
// This is non-exhaustive but covers the most common CSS properties that
|
|
37
|
+
// create a containing block.
|
|
38
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
39
|
+
if ((css.transform ? css.transform !== 'none' : false) || (css.perspective ? css.perspective !== 'none' : false) || (css.backdropFilter ? css.backdropFilter !== 'none' : false) || css.contain === 'paint' || ['transform', 'perspective'].includes(css.willChange) || css.willChange === 'filter' || (css.filter ? css.filter !== 'none' : false)) {
|
|
40
|
+
return currentNode;
|
|
41
|
+
}
|
|
42
|
+
currentNode = (_currentNode = currentNode) == null ? void 0 : _currentNode.parentNode;
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
};
|
|
22
46
|
var defaultAlign = {
|
|
23
47
|
top: 'top',
|
|
24
48
|
left: 'left'
|
|
@@ -48,6 +72,9 @@ var DropContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
48
72
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
49
73
|
var containerTarget = useContext(ContainerTargetContext);
|
|
50
74
|
var theme = useContext(ThemeContext) || defaultProps.theme;
|
|
75
|
+
// dropOptions was created to preserve backwards compatibility
|
|
76
|
+
var _useContext = useContext(OptionsContext),
|
|
77
|
+
dropOptions = _useContext.drop;
|
|
51
78
|
var portalContext = useContext(PortalContext);
|
|
52
79
|
var portalId = useMemo(function () {
|
|
53
80
|
return portalContext.length;
|
|
@@ -80,9 +107,10 @@ var DropContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
80
107
|
};
|
|
81
108
|
}, [onClickOutside, containerTarget, portalContext]);
|
|
82
109
|
useEffect(function () {
|
|
110
|
+
var target = (dropTarget == null ? void 0 : dropTarget.current) || dropTarget;
|
|
83
111
|
var notifyAlign = function notifyAlign() {
|
|
84
112
|
var _dropRef$current;
|
|
85
|
-
var styleCurrent = dropRef == null
|
|
113
|
+
var styleCurrent = dropRef == null || (_dropRef$current = dropRef.current) == null ? void 0 : _dropRef$current.style;
|
|
86
114
|
var alignControl = (styleCurrent == null ? void 0 : styleCurrent.top) !== '' ? 'top' : 'bottom';
|
|
87
115
|
onAlign(alignControl);
|
|
88
116
|
};
|
|
@@ -93,9 +121,9 @@ var DropContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
93
121
|
var place = function place(preserveHeight) {
|
|
94
122
|
var windowWidth = window.innerWidth;
|
|
95
123
|
var windowHeight = window.innerHeight;
|
|
96
|
-
var target = (dropTarget == null ? void 0 : dropTarget.current) || dropTarget;
|
|
97
124
|
var container = dropRef.current;
|
|
98
125
|
if (container && target) {
|
|
126
|
+
var _containingBlockRect$, _containingBlockRect, _containingBlockRect$2, _containingBlockRect2, _containingBlockRect$3, _containingBlockRect3, _containingBlock$scro, _containingBlock2, _containingBlock$scro2, _containingBlock3;
|
|
99
127
|
// clear prior styling
|
|
100
128
|
container.style.left = '';
|
|
101
129
|
container.style.top = '';
|
|
@@ -141,10 +169,10 @@ var DropContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
141
169
|
var bottom;
|
|
142
170
|
var maxHeight = containerRect.height;
|
|
143
171
|
|
|
144
|
-
/* If responsive is true and the Drop doesn't have enough room
|
|
145
|
-
to be fully visible and there is more room in the other
|
|
146
|
-
direction, change the Drop to display above/below. If there is
|
|
147
|
-
less room in the other direction leave the Drop in its current
|
|
172
|
+
/* If responsive is true and the Drop doesn't have enough room
|
|
173
|
+
to be fully visible and there is more room in the other
|
|
174
|
+
direction, change the Drop to display above/below. If there is
|
|
175
|
+
less room in the other direction leave the Drop in its current
|
|
148
176
|
position. */
|
|
149
177
|
if (responsive && (align.top === 'top' && targetRect.top < 0 || align.bottom === 'top' && targetRect.top - containerRect.height <= 0 && targetRect.bottom + containerRect.height < windowHeight)) {
|
|
150
178
|
top = targetRect.bottom;
|
|
@@ -167,7 +195,24 @@ var DropContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
167
195
|
} else {
|
|
168
196
|
top = targetRect.top + targetRect.height / 2 - containerRect.height / 2;
|
|
169
197
|
}
|
|
170
|
-
|
|
198
|
+
var containingBlock;
|
|
199
|
+
var containingBlockRect;
|
|
200
|
+
// dropOptions was created to preserve backwards compatibility
|
|
201
|
+
if (dropOptions != null && dropOptions.checkContainingBlock) {
|
|
202
|
+
var _containingBlock;
|
|
203
|
+
// return the containing block for absolute elements or `null`
|
|
204
|
+
// for fixed elements
|
|
205
|
+
containingBlock = getContainingBlock(container);
|
|
206
|
+
containingBlockRect = (_containingBlock = containingBlock) == null ? void 0 : _containingBlock.getBoundingClientRect();
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// compute viewport offsets
|
|
210
|
+
var viewportOffsetLeft = (_containingBlockRect$ = (_containingBlockRect = containingBlockRect) == null ? void 0 : _containingBlockRect.left) != null ? _containingBlockRect$ : 0;
|
|
211
|
+
var viewportOffsetTop = (_containingBlockRect$2 = (_containingBlockRect2 = containingBlockRect) == null ? void 0 : _containingBlockRect2.top) != null ? _containingBlockRect$2 : 0;
|
|
212
|
+
var viewportOffsetBottom = (_containingBlockRect$3 = (_containingBlockRect3 = containingBlockRect) == null ? void 0 : _containingBlockRect3.bottom) != null ? _containingBlockRect$3 : windowHeight;
|
|
213
|
+
var containerOffsetLeft = (_containingBlock$scro = (_containingBlock2 = containingBlock) == null ? void 0 : _containingBlock2.scrollLeft) != null ? _containingBlock$scro : 0;
|
|
214
|
+
var containerOffsetTop = (_containingBlock$scro2 = (_containingBlock3 = containingBlock) == null ? void 0 : _containingBlock3.scrollTop) != null ? _containingBlock$scro2 : 0;
|
|
215
|
+
container.style.left = left - viewportOffsetLeft + containerOffsetLeft + "px";
|
|
171
216
|
if (stretch) {
|
|
172
217
|
// offset width by 0.1 to avoid a bug in ie11 that
|
|
173
218
|
// unnecessarily wraps the text if width is the same
|
|
@@ -177,10 +222,10 @@ var DropContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
177
222
|
// the (position:absolute + scrollTop)
|
|
178
223
|
// is presenting issues with desktop scroll flickering
|
|
179
224
|
if (top !== '') {
|
|
180
|
-
container.style.top = top + "px";
|
|
225
|
+
container.style.top = top - viewportOffsetTop + containerOffsetTop + "px";
|
|
181
226
|
}
|
|
182
227
|
if (bottom !== '') {
|
|
183
|
-
container.style.bottom =
|
|
228
|
+
container.style.bottom = viewportOffsetBottom - bottom - containerOffsetTop + "px";
|
|
184
229
|
}
|
|
185
230
|
if (!preserveHeight) {
|
|
186
231
|
if (theme.drop && theme.drop.maxHeight) {
|
|
@@ -193,7 +238,7 @@ var DropContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
193
238
|
};
|
|
194
239
|
var scrollParents;
|
|
195
240
|
var addScrollListeners = function addScrollListeners() {
|
|
196
|
-
scrollParents = findScrollParents(
|
|
241
|
+
scrollParents = findScrollParents(target);
|
|
197
242
|
scrollParents.forEach(function (scrollParent) {
|
|
198
243
|
return scrollParent.addEventListener('scroll', place);
|
|
199
244
|
});
|
|
@@ -216,7 +261,7 @@ var DropContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
216
261
|
removeScrollListeners();
|
|
217
262
|
window.removeEventListener('resize', onResize);
|
|
218
263
|
};
|
|
219
|
-
}, [align, containerTarget, onAlign, dropTarget, portalContext, portalId, responsive, restrictFocus, stretch, theme.drop, dropRef]);
|
|
264
|
+
}, [align, containerTarget, onAlign, dropTarget, portalContext, portalId, responsive, restrictFocus, stretch, theme.drop, dropRef, dropOptions]);
|
|
220
265
|
useEffect(function () {
|
|
221
266
|
if (restrictFocus) {
|
|
222
267
|
dropRef.current.focus();
|
|
@@ -2,8 +2,8 @@ var SI_CONVERSION_FACTOR = 1000;
|
|
|
2
2
|
var IEC_CONVERSION_FACTOR = 1024;
|
|
3
3
|
var getCurrentOS = function getCurrentOS() {
|
|
4
4
|
var currentOS = ['Win', 'Linux', 'Mac'].find(function (v) {
|
|
5
|
-
var _window
|
|
6
|
-
if (typeof window !== 'undefined') return ((_window = window) == null
|
|
5
|
+
var _window;
|
|
6
|
+
if (typeof window !== 'undefined') return ((_window = window) == null || (_window = _window.navigator) == null || (_window = _window.userAgent) == null ? void 0 : _window.indexOf(v)) >= 0;
|
|
7
7
|
return undefined;
|
|
8
8
|
});
|
|
9
9
|
return currentOS;
|
|
@@ -194,7 +194,7 @@ var FormField = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
194
194
|
return /*#__PURE__*/cloneElement(child, {
|
|
195
195
|
plain: true,
|
|
196
196
|
focusIndicator: false,
|
|
197
|
-
pad: 'CheckBox'.indexOf(child.type.displayName) !== -1 ? formFieldTheme == null
|
|
197
|
+
pad: 'CheckBox'.indexOf(child.type.displayName) !== -1 ? formFieldTheme == null || (_formFieldTheme$check = formFieldTheme.checkBox) == null ? void 0 : _formFieldTheme$check.pad : undefined
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
200
|
return child;
|
|
@@ -15,14 +15,85 @@ export interface GrommetProps {
|
|
|
15
15
|
layer?: {
|
|
16
16
|
singleId?: boolean;
|
|
17
17
|
};
|
|
18
|
+
drop?: {
|
|
19
|
+
checkContainingBlock?: boolean;
|
|
20
|
+
};
|
|
18
21
|
};
|
|
19
22
|
messages?: {
|
|
20
23
|
messages?: {
|
|
24
|
+
button?: {
|
|
25
|
+
busy?: string;
|
|
26
|
+
success?: string;
|
|
27
|
+
};
|
|
28
|
+
calendar?: {
|
|
29
|
+
previousMove?: string;
|
|
30
|
+
previous?: string;
|
|
31
|
+
nextMove?: string;
|
|
32
|
+
next?: string;
|
|
33
|
+
};
|
|
34
|
+
carousel?: {
|
|
35
|
+
previous?: string;
|
|
36
|
+
next?: string;
|
|
37
|
+
jump?: string;
|
|
38
|
+
};
|
|
39
|
+
dateInput?: {
|
|
40
|
+
openCalendar?: string;
|
|
41
|
+
enterCalendar?: string;
|
|
42
|
+
exitCalendar?: string;
|
|
43
|
+
};
|
|
44
|
+
dataFilters?: {
|
|
45
|
+
clear?: string;
|
|
46
|
+
heading?: string;
|
|
47
|
+
open?: string;
|
|
48
|
+
openSet?: {
|
|
49
|
+
singular?: string;
|
|
50
|
+
plural?: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
dataForm?: {
|
|
54
|
+
reset?: string;
|
|
55
|
+
submit?: string;
|
|
56
|
+
};
|
|
57
|
+
dataSearch?: {
|
|
58
|
+
label?: string;
|
|
59
|
+
open?: string;
|
|
60
|
+
};
|
|
61
|
+
dataSort?: {
|
|
62
|
+
ascending?: string;
|
|
63
|
+
by?: string;
|
|
64
|
+
descending?: string;
|
|
65
|
+
direction?: string;
|
|
66
|
+
open?: string;
|
|
67
|
+
};
|
|
68
|
+
dataSummary?: {
|
|
69
|
+
filtered?: string;
|
|
70
|
+
filteredSingle?: string;
|
|
71
|
+
total?: string;
|
|
72
|
+
};
|
|
73
|
+
dataTableColumns?: {
|
|
74
|
+
open?: string;
|
|
75
|
+
order?: string;
|
|
76
|
+
select?: string;
|
|
77
|
+
tip?: string;
|
|
78
|
+
};
|
|
79
|
+
dataTableGroupBy?: {
|
|
80
|
+
clear?: string;
|
|
81
|
+
label?: string;
|
|
82
|
+
};
|
|
83
|
+
dataView?: {
|
|
84
|
+
label?: string;
|
|
85
|
+
};
|
|
21
86
|
fileInput?: {
|
|
22
87
|
browse?: string;
|
|
23
88
|
dropPrompt?: string;
|
|
24
89
|
dropPromptMultiple?: string;
|
|
25
90
|
files?: string;
|
|
91
|
+
maxFile?: string;
|
|
92
|
+
maxSizeSingle?: string;
|
|
93
|
+
maxSizeMultiple?: {
|
|
94
|
+
singular?: string;
|
|
95
|
+
plural?: string;
|
|
96
|
+
};
|
|
26
97
|
remove?: string;
|
|
27
98
|
removeAll?: string;
|
|
28
99
|
};
|
|
@@ -40,6 +111,7 @@ export interface GrommetProps {
|
|
|
40
111
|
};
|
|
41
112
|
select?: {
|
|
42
113
|
multiple?: string;
|
|
114
|
+
selected?: string;
|
|
43
115
|
};
|
|
44
116
|
skipLinks?: {
|
|
45
117
|
skipTo?: string;
|
|
@@ -54,7 +126,10 @@ export interface GrommetProps {
|
|
|
54
126
|
suggestionIsOpen?: string;
|
|
55
127
|
};
|
|
56
128
|
video?: {
|
|
129
|
+
audioDescriptions?: string;
|
|
130
|
+
captions?: string;
|
|
57
131
|
closeMenu?: string;
|
|
132
|
+
description?: string;
|
|
58
133
|
fullScreen?: string;
|
|
59
134
|
progressMeter?: string;
|
|
60
135
|
scrubber?: string;
|
|
@@ -9,6 +9,9 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
9
9
|
options: PropTypes.shape({
|
|
10
10
|
layer: PropTypes.shape({
|
|
11
11
|
singleId: PropTypes.bool
|
|
12
|
+
}),
|
|
13
|
+
drop: PropTypes.shape({
|
|
14
|
+
checkContainingBlock: PropTypes.bool
|
|
12
15
|
})
|
|
13
16
|
}),
|
|
14
17
|
plain: PropTypes.bool,
|
|
@@ -20,11 +23,79 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
20
23
|
messages: PropTypes.shape({
|
|
21
24
|
format: PropTypes.func,
|
|
22
25
|
messages: PropTypes.shape({
|
|
26
|
+
button: PropTypes.shape({
|
|
27
|
+
busy: PropTypes.string,
|
|
28
|
+
success: PropTypes.string
|
|
29
|
+
}),
|
|
30
|
+
calendar: PropTypes.shape({
|
|
31
|
+
previousMove: PropTypes.string,
|
|
32
|
+
previous: PropTypes.string,
|
|
33
|
+
nextMove: PropTypes.string,
|
|
34
|
+
next: PropTypes.string
|
|
35
|
+
}),
|
|
36
|
+
carousel: PropTypes.shape({
|
|
37
|
+
previous: PropTypes.string,
|
|
38
|
+
next: PropTypes.string,
|
|
39
|
+
jump: PropTypes.string
|
|
40
|
+
}),
|
|
41
|
+
dateInput: PropTypes.shape({
|
|
42
|
+
openCalendar: PropTypes.string,
|
|
43
|
+
enterCalendar: PropTypes.string,
|
|
44
|
+
exitCalendar: PropTypes.string
|
|
45
|
+
}),
|
|
46
|
+
dataFilters: PropTypes.shape({
|
|
47
|
+
clear: PropTypes.string,
|
|
48
|
+
heading: PropTypes.string,
|
|
49
|
+
open: PropTypes.string,
|
|
50
|
+
openSet: PropTypes.shape({
|
|
51
|
+
singular: PropTypes.string,
|
|
52
|
+
plural: PropTypes.string
|
|
53
|
+
})
|
|
54
|
+
}),
|
|
55
|
+
dataForm: PropTypes.shape({
|
|
56
|
+
reset: PropTypes.string,
|
|
57
|
+
submit: PropTypes.string
|
|
58
|
+
}),
|
|
59
|
+
dataSearch: PropTypes.shape({
|
|
60
|
+
label: PropTypes.string,
|
|
61
|
+
open: PropTypes.string
|
|
62
|
+
}),
|
|
63
|
+
dataSort: PropTypes.shape({
|
|
64
|
+
ascending: PropTypes.string,
|
|
65
|
+
by: PropTypes.string,
|
|
66
|
+
descending: PropTypes.string,
|
|
67
|
+
direction: PropTypes.string,
|
|
68
|
+
open: PropTypes.string
|
|
69
|
+
}),
|
|
70
|
+
dataSummary: PropTypes.shape({
|
|
71
|
+
filtered: PropTypes.string,
|
|
72
|
+
filteredSingle: PropTypes.string,
|
|
73
|
+
total: PropTypes.string
|
|
74
|
+
}),
|
|
75
|
+
dataTableColumns: PropTypes.shape({
|
|
76
|
+
open: PropTypes.string,
|
|
77
|
+
order: PropTypes.string,
|
|
78
|
+
select: PropTypes.string,
|
|
79
|
+
tip: PropTypes.string
|
|
80
|
+
}),
|
|
81
|
+
dataTableGroupBy: PropTypes.shape({
|
|
82
|
+
clear: PropTypes.string,
|
|
83
|
+
label: PropTypes.string
|
|
84
|
+
}),
|
|
85
|
+
dataView: PropTypes.shape({
|
|
86
|
+
label: PropTypes.string
|
|
87
|
+
}),
|
|
23
88
|
fileInput: PropTypes.shape({
|
|
24
89
|
browse: PropTypes.string,
|
|
25
90
|
dropPrompt: PropTypes.string,
|
|
26
91
|
dropPromptMultiple: PropTypes.string,
|
|
27
92
|
files: PropTypes.string,
|
|
93
|
+
maxFile: PropTypes.string,
|
|
94
|
+
maxSizeSingle: PropTypes.string,
|
|
95
|
+
maxSizeMultiple: PropTypes.shape({
|
|
96
|
+
singular: PropTypes.string,
|
|
97
|
+
plural: PropTypes.string
|
|
98
|
+
}),
|
|
28
99
|
remove: PropTypes.string,
|
|
29
100
|
removeAll: PropTypes.string
|
|
30
101
|
}),
|
|
@@ -41,7 +112,8 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
41
112
|
upper: PropTypes.string
|
|
42
113
|
}),
|
|
43
114
|
select: PropTypes.shape({
|
|
44
|
-
multiple: PropTypes.string
|
|
115
|
+
multiple: PropTypes.string,
|
|
116
|
+
selected: PropTypes.string
|
|
45
117
|
}),
|
|
46
118
|
skipLinks: PropTypes.shape({
|
|
47
119
|
skipTo: PropTypes.string
|
|
@@ -56,7 +128,10 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
56
128
|
suggestionIsOpen: PropTypes.string
|
|
57
129
|
}),
|
|
58
130
|
video: PropTypes.shape({
|
|
131
|
+
audioDescriptions: PropTypes.string,
|
|
132
|
+
captions: PropTypes.string,
|
|
59
133
|
closeMenu: PropTypes.string,
|
|
134
|
+
description: PropTypes.string,
|
|
60
135
|
fullScreen: PropTypes.string,
|
|
61
136
|
progressMeter: PropTypes.string,
|
|
62
137
|
scrubber: PropTypes.string,
|
|
@@ -6,7 +6,7 @@ import { ThemeContext } from 'styled-components';
|
|
|
6
6
|
import { findScrollParent, useForwardedRef } from '../../utils';
|
|
7
7
|
import { Box } from '../Box';
|
|
8
8
|
var Header = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
9
|
-
var _theme$header2
|
|
9
|
+
var _theme$header2;
|
|
10
10
|
var sticky = _ref.sticky,
|
|
11
11
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
12
12
|
var theme = useContext(ThemeContext);
|
|
@@ -23,11 +23,11 @@ var Header = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
23
23
|
header.style.top = "-" + header.getBoundingClientRect().height + "px";
|
|
24
24
|
header.style.zIndex = '';
|
|
25
25
|
} else if (scrollTop - nextScrollTop > 0) {
|
|
26
|
-
var _theme$header
|
|
26
|
+
var _theme$header;
|
|
27
27
|
// ensure that header moves with the target
|
|
28
28
|
header.style.position = 'sticky';
|
|
29
29
|
header.style.top = '0px';
|
|
30
|
-
header.style.zIndex = "" + ((_theme$header = theme.header) == null
|
|
30
|
+
header.style.zIndex = "" + ((_theme$header = theme.header) == null || (_theme$header = _theme$header.sticky) == null ? void 0 : _theme$header.zIndex);
|
|
31
31
|
header.style.transition = 'top 0.6s';
|
|
32
32
|
}
|
|
33
33
|
scrollTop = nextScrollTop;
|
|
@@ -44,7 +44,7 @@ var Header = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
44
44
|
window.removeEventListener('scroll', updateScrollDir, true);
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
|
-
}, [headerRef, sticky, (_theme$header2 = theme.header) == null
|
|
47
|
+
}, [headerRef, sticky, (_theme$header2 = theme.header) == null || (_theme$header2 = _theme$header2.sticky) == null ? void 0 : _theme$header2.zIndex]);
|
|
48
48
|
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
49
49
|
align: "center",
|
|
50
50
|
as: "header",
|
|
@@ -56,11 +56,13 @@ var Layer = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
56
56
|
// we add the id and query here so the unit tests work
|
|
57
57
|
var clone = containerTarget.getRootNode().getElementById('layerClone');
|
|
58
58
|
if (clone) {
|
|
59
|
-
containerTarget.
|
|
59
|
+
if (containerTarget.contains(clone)) {
|
|
60
|
+
containerTarget.removeChild(clone);
|
|
61
|
+
}
|
|
60
62
|
layerContainer.remove();
|
|
61
63
|
}
|
|
62
64
|
}, animationDuration);
|
|
63
|
-
} else {
|
|
65
|
+
} else if (containerTarget.contains(layerContainer)) {
|
|
64
66
|
containerTarget.removeChild(layerContainer);
|
|
65
67
|
}
|
|
66
68
|
}
|
|
@@ -43,12 +43,12 @@ var StyledItem = styled(Box).withConfig({
|
|
|
43
43
|
forceOutline: true,
|
|
44
44
|
skipSvgChildren: true
|
|
45
45
|
}), function (props) {
|
|
46
|
-
var _props$theme$list
|
|
46
|
+
var _props$theme$list;
|
|
47
47
|
var disabledStyle;
|
|
48
|
-
if (props.isDisabled && (_props$theme$list = props.theme.list) != null && (_props$theme$list
|
|
49
|
-
var _props$theme$list$
|
|
50
|
-
color = _props$theme$list$
|
|
51
|
-
cursor = _props$theme$list$
|
|
48
|
+
if (props.isDisabled && (_props$theme$list = props.theme.list) != null && (_props$theme$list = _props$theme$list.item) != null && _props$theme$list.disabled) {
|
|
49
|
+
var _props$theme$list$ite = props.theme.list.item.disabled,
|
|
50
|
+
color = _props$theme$list$ite.color,
|
|
51
|
+
cursor = _props$theme$list$ite.cursor;
|
|
52
52
|
disabledStyle = {
|
|
53
53
|
color: normalizeColor(color, props.theme),
|
|
54
54
|
cursor: cursor
|
|
@@ -148,7 +148,8 @@ var MaskedInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
148
148
|
var formContext = useContext(FormContext);
|
|
149
149
|
var _formContext$useFormI = formContext.useFormInput({
|
|
150
150
|
name: name,
|
|
151
|
-
value: valueProp
|
|
151
|
+
value: valueProp,
|
|
152
|
+
initialValue: ''
|
|
152
153
|
}),
|
|
153
154
|
value = _formContext$useFormI[0],
|
|
154
155
|
setValue = _formContext$useFormI[1];
|
|
@@ -322,18 +322,22 @@ var Menu = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
322
322
|
if (itemCount && Array.isArray(items[0])) {
|
|
323
323
|
var index = 0;
|
|
324
324
|
menuContent = items.map(function (group, groupIndex) {
|
|
325
|
-
var _theme$menu$group, _theme$menu$
|
|
325
|
+
var _theme$menu$group, _theme$menu$group2, _theme$menu$group3;
|
|
326
326
|
return /*#__PURE__*/React.createElement(Box
|
|
327
327
|
// eslint-disable-next-line react/no-array-index-key
|
|
328
328
|
, {
|
|
329
329
|
key: groupIndex
|
|
330
|
+
// ensure menu groups don't collapse if vertical space on screen
|
|
331
|
+
// causes scrolling within the menu
|
|
332
|
+
,
|
|
333
|
+
flex: false
|
|
330
334
|
}, groupIndex > 0 && /*#__PURE__*/React.createElement(Box, {
|
|
331
335
|
pad: theme.menu.group.separator.pad
|
|
332
336
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
333
337
|
border: {
|
|
334
338
|
side: 'top',
|
|
335
|
-
color: (_theme$menu$group = theme.menu.group) == null
|
|
336
|
-
size: (_theme$menu$group2 = theme.menu.group) == null
|
|
339
|
+
color: (_theme$menu$group = theme.menu.group) == null || (_theme$menu$group = _theme$menu$group.separator) == null ? void 0 : _theme$menu$group.color,
|
|
340
|
+
size: (_theme$menu$group2 = theme.menu.group) == null || (_theme$menu$group2 = _theme$menu$group2.separator) == null ? void 0 : _theme$menu$group2.size
|
|
337
341
|
}
|
|
338
342
|
})), /*#__PURE__*/React.createElement(Box, (_theme$menu$group3 = theme.menu.group) == null ? void 0 : _theme$menu$group3.container, group.map(function (item) {
|
|
339
343
|
// item index needs to be its index in the entire menu as if
|
|
@@ -7,7 +7,7 @@ import { Grid } from '../Grid';
|
|
|
7
7
|
import { ResponsiveContext } from '../../contexts/ResponsiveContext';
|
|
8
8
|
import { NameValueListContext } from './NameValueListContext';
|
|
9
9
|
var NameValueList = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
10
|
-
var _theme$nameValueList
|
|
10
|
+
var _theme$nameValueList$;
|
|
11
11
|
var align = _ref.align,
|
|
12
12
|
_ref$layout = _ref.layout,
|
|
13
13
|
layout = _ref$layout === void 0 ? 'column' : _ref$layout,
|
|
@@ -32,7 +32,7 @@ var NameValueList = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
32
32
|
size: !Array.isArray(valueWidth) ? ['auto', valueWidth] : valueWidth
|
|
33
33
|
};else if (layout === 'column' && pairProps.direction === 'row') columns = [nameWidth, !Array.isArray(valueWidth) ? ['auto', valueWidth] : valueWidth];else columns = [valueWidth];
|
|
34
34
|
var gap = theme.nameValueList.gap;
|
|
35
|
-
if ((pairProps.direction === 'column' || size === 'small') && (_theme$nameValueList$ = theme.nameValueList.pair) != null && (_theme$nameValueList$
|
|
35
|
+
if ((pairProps.direction === 'column' || size === 'small') && (_theme$nameValueList$ = theme.nameValueList.pair) != null && (_theme$nameValueList$ = _theme$nameValueList$.column) != null && _theme$nameValueList$.gap) {
|
|
36
36
|
gap = theme.nameValueList.pair.column.gap;
|
|
37
37
|
}
|
|
38
38
|
var listContextValue = useMemo(function () {
|
|
@@ -6,7 +6,7 @@ import { Text } from '../Text';
|
|
|
6
6
|
import { ResponsiveContext } from '../../contexts/ResponsiveContext';
|
|
7
7
|
import { NameValueListContext } from '../NameValueList/NameValueListContext';
|
|
8
8
|
var NameValuePair = function NameValuePair(_ref) {
|
|
9
|
-
var _theme$nameValuePair
|
|
9
|
+
var _theme$nameValuePair;
|
|
10
10
|
var children = _ref.children,
|
|
11
11
|
nameProp = _ref.name;
|
|
12
12
|
var _useContext = useContext(NameValueListContext),
|
|
@@ -24,7 +24,7 @@ var NameValuePair = function NameValuePair(_ref) {
|
|
|
24
24
|
// <dl> elements must only directly contain
|
|
25
25
|
// properly-ordered <dt> and <dd> groups
|
|
26
26
|
var valueGap;
|
|
27
|
-
if (column && (_theme$nameValuePair = theme.nameValuePair) != null && (_theme$nameValuePair
|
|
27
|
+
if (column && (_theme$nameValuePair = theme.nameValuePair) != null && (_theme$nameValuePair = _theme$nameValuePair.column) != null && _theme$nameValuePair.gap) valueGap = {
|
|
28
28
|
bottom: theme.nameValuePair.column.gap
|
|
29
29
|
};
|
|
30
30
|
var name;
|
|
@@ -50,7 +50,7 @@ var NotificationAnchor = styled(Anchor).withConfig({
|
|
|
50
50
|
componentId: "sc-1yq09yz-0"
|
|
51
51
|
})(["white-space:nowrap;"]);
|
|
52
52
|
var Notification = function Notification(_ref) {
|
|
53
|
-
var _theme$notification, _theme$notification2, _theme$
|
|
53
|
+
var _theme$notification, _theme$notification2, _theme$notification3, _theme$notification4, _theme$notification5;
|
|
54
54
|
var actionsProp = _ref.actions,
|
|
55
55
|
messageProp = _ref.message,
|
|
56
56
|
onClose = _ref.onClose,
|
|
@@ -96,7 +96,7 @@ var Notification = function Notification(_ref) {
|
|
|
96
96
|
var direction;
|
|
97
97
|
if (kind && theme.notification[kind].direction) direction = theme.notification[kind].direction;else direction = theme.notification.direction;
|
|
98
98
|
var background;
|
|
99
|
-
if (kind && (_theme$notification2 = theme.notification) != null && (_theme$notification2
|
|
99
|
+
if (kind && (_theme$notification2 = theme.notification) != null && (_theme$notification2 = _theme$notification2[status]) != null && (_theme$notification2 = _theme$notification2[kind]) != null && _theme$notification2.background) background = theme.notification[status][kind].background;else if ((_theme$notification3 = theme.notification) != null && (_theme$notification3 = _theme$notification3[status]) != null && _theme$notification3.background) background = theme.notification[status].background;else background = ((_theme$notification4 = theme.notification) == null || (_theme$notification4 = _theme$notification4[kind]) == null || (_theme$notification4 = _theme$notification4.container) == null ? void 0 : _theme$notification4.background) || theme.notification.container.background;
|
|
100
100
|
var TextWrapper = direction === 'row' ? Text : Fragment;
|
|
101
101
|
|
|
102
102
|
// notification is built with two child boxes that contain:
|
|
@@ -133,7 +133,7 @@ var Notification = function Notification(_ref) {
|
|
|
133
133
|
right: 'xsmall'
|
|
134
134
|
}
|
|
135
135
|
}, message), actions) : message;
|
|
136
|
-
var iconDimension = ((_theme$notification5 = theme.notification) == null
|
|
136
|
+
var iconDimension = ((_theme$notification5 = theme.notification) == null || (_theme$notification5 = _theme$notification5.message) == null ? void 0 : _theme$notification5.size) || 'medium';
|
|
137
137
|
var content = /*#__PURE__*/React.createElement(Box, _extends({}, theme.notification.container, global ? _extends({}, theme.notification.global.container) : {}, toast ? _extends({}, theme.notification.toast.container) : {}, {
|
|
138
138
|
background: background
|
|
139
139
|
// let internal box control pad
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["actions", "gridProps", "parent", "responsive", "size", "subtitle", "title"];
|
|
1
|
+
var _excluded = ["actions", "gridProps", "parent", "responsive", "size", "subtitle", "title", "level"];
|
|
2
2
|
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; }
|
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
import React, { forwardRef, useContext } from 'react';
|
|
@@ -24,6 +24,7 @@ var PageHeader = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
24
24
|
size = _ref2.size,
|
|
25
25
|
subtitle = _ref2.subtitle,
|
|
26
26
|
title = _ref2.title,
|
|
27
|
+
level = _ref2.level,
|
|
27
28
|
rest = _objectWithoutPropertiesLoose(_ref2, _excluded);
|
|
28
29
|
var theme = useContext(ThemeContext);
|
|
29
30
|
var breakpoint = useContext(ResponsiveContext);
|
|
@@ -53,7 +54,9 @@ var PageHeader = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
53
54
|
gridArea: "parent"
|
|
54
55
|
}, theme.pageHeader.parent), parent), /*#__PURE__*/React.createElement(Box, {
|
|
55
56
|
gridArea: "title"
|
|
56
|
-
}, typeof title === 'string' ? /*#__PURE__*/React.createElement(Heading, sizeStyle(size, 'title', theme),
|
|
57
|
+
}, typeof title === 'string' ? /*#__PURE__*/React.createElement(Heading, _extends({}, sizeStyle(size, 'title', theme), {
|
|
58
|
+
level: level
|
|
59
|
+
}), title) : title), /*#__PURE__*/React.createElement(Box, {
|
|
57
60
|
gridArea: "subtitle"
|
|
58
61
|
}, typeof subtitle === 'string' ? /*#__PURE__*/React.createElement(Paragraph, sizeStyle(size, 'subtitle', theme, breakpoint), subtitle) : subtitle), /*#__PURE__*/React.createElement(Box, _extends({
|
|
59
62
|
gridArea: "actions"
|
|
@@ -18,6 +18,7 @@ export interface PageHeaderProps {
|
|
|
18
18
|
parent?: JSX.Element;
|
|
19
19
|
responsive?: boolean;
|
|
20
20
|
size?: 'small' | 'medium' | 'large';
|
|
21
|
+
level?: '1' | '2' | '3' | '4' | '5' | '6' | 1 | 2 | 3 | 4 | 5 | 6;
|
|
21
22
|
subtitle?: string | JSX.Element;
|
|
22
23
|
title?: string | JSX.Element;
|
|
23
24
|
}
|
|
@@ -10,6 +10,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
10
10
|
parent: PropTypes.element,
|
|
11
11
|
responsive: PropTypes.bool,
|
|
12
12
|
size: PropTypes.oneOf(['small', 'medium', 'large']),
|
|
13
|
+
level: PropTypes.oneOf([1, 2, 3, 4, 5, 6, '1', '2', '3', '4', '5', '6']),
|
|
13
14
|
subtitle: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
|
|
14
15
|
title: PropTypes.oneOfType([PropTypes.string, PropTypes.element])
|
|
15
16
|
});
|