grommet 2.38.0 → 2.40.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/COPYRIGHT.md +1 -0
- package/LICENSE +176 -0
- package/README.md +0 -2
- package/all/stories/AllComponents.js +2 -2
- package/all/stories/Colors.js +1 -1
- package/all/stories/CustomThemed/DefaultTheme.js +1 -1
- package/all/stories/TypographyLarge.js +1 -1
- package/all/stories/TypographyMedium.js +1 -1
- package/all/stories/TypographySmall.js +1 -1
- package/components/Accordion/Accordion.js +2 -2
- package/components/Accordion/propTypes.js +2 -2
- package/components/Accordion/stories/CustomThemed/Custom.js +3 -3
- package/components/Accordion/stories/Multiple.js +1 -1
- package/components/Accordion/stories/Simple.js +2 -2
- package/components/AccordionPanel/AccordionPanel.js +5 -6
- package/components/AccordionPanel/propTypes.js +1 -1
- package/components/Anchor/Anchor.js +6 -7
- package/components/Anchor/StyledAnchor.js +2 -4
- package/components/Anchor/propTypes.js +2 -2
- package/components/Anchor/stories/Color.js +1 -1
- package/components/Anchor/stories/Default.js +1 -1
- package/components/Anchor/stories/Gap.js +1 -1
- package/components/Anchor/stories/Size.js +1 -1
- package/components/Anchor/stories/Weight.js +1 -1
- package/components/Avatar/Avatar.js +4 -5
- package/components/Avatar/StyledAvatar.js +5 -9
- package/components/Avatar/propTypes.js +1 -1
- package/components/Avatar/stories/Basic.js +1 -1
- package/components/Avatar/stories/CustomThemed/Themed.js +1 -1
- package/components/Avatar/stories/Round.js +1 -1
- package/components/Avatar/stories/Sizes.js +1 -1
- package/components/Box/Box.js +4 -4
- package/components/Box/StyledBox.js +8 -12
- package/components/Box/propTypes.js +2 -2
- package/components/Box/stories/Animation.js +1 -1
- package/components/Box/stories/Background.js +1 -1
- package/components/Box/stories/BackgroundThemed.js +4 -4
- package/components/Box/stories/Border.js +1 -1
- package/components/Box/stories/Custom.js +1 -1
- package/components/Box/stories/Elevation.js +1 -1
- package/components/Box/stories/Fixed.js +1 -1
- package/components/Box/stories/MinMax.js +1 -1
- package/components/Box/stories/OnClick.js +1 -1
- package/components/Box/stories/RTL.js +1 -1
- package/components/Box/stories/Round.js +1 -1
- package/components/Box/stories/Simple.js +1 -1
- package/components/Button/Badge.js +6 -3
- package/components/Button/BusyAnimation.js +1 -1
- package/components/Button/Button.js +6 -5
- package/components/Button/StyledButton.js +2 -4
- package/components/Button/StyledButtonKind.js +3 -5
- package/components/Button/propTypes.js +2 -2
- package/components/Button/stories/Active.js +1 -1
- package/components/Button/stories/Basic.js +2 -2
- package/components/Button/stories/CustomThemed/Active.js +1 -1
- package/components/Button/stories/CustomThemed/Plain.js +1 -1
- package/components/Button/stories/CustomThemed/ThemedButtons.js +1 -1
- package/components/Button/stories/Fill.js +2 -2
- package/components/Button/stories/Icon.js +1 -1
- package/components/Button/stories/IconLabel.js +1 -1
- package/components/Button/stories/Kind.js +2 -2
- package/components/Button/stories/Multiple.js +1 -1
- package/components/Button/stories/RoutedButton.js +1 -1
- package/components/Button/stories/Sizes.js +1 -1
- package/components/Button/stories/TipOnButton.js +1 -1
- package/components/Calendar/Calendar.js +18 -19
- package/components/Calendar/StyledCalendar.js +5 -17
- package/components/Calendar/propTypes.js +2 -2
- package/components/Calendar/stories/DaylightSavings.js +1 -1
- package/components/Calendar/stories/Fill.js +1 -1
- package/components/Calendar/stories/Range.js +1 -1
- package/components/Calendar/stories/ShowAdjacentDays.js +2 -2
- package/components/Calendar/stories/SundayFirstDay.js +1 -1
- package/components/Card/Card.js +4 -5
- package/components/Card/stories/CustomThemed/Clickable.js +3 -3
- package/components/Card/stories/CustomThemed/RichFooter.js +3 -3
- package/components/Card/stories/CustomThemed/Stacked.js +1 -1
- package/components/Card/stories/CustomThemed/Themed.js +3 -3
- package/components/Card/stories/Simple.js +1 -1
- package/components/CardBody/CardBody.js +6 -8
- package/components/CardFooter/CardFooter.js +6 -8
- package/components/CardHeader/CardHeader.js +6 -8
- package/components/Cards/Cards.js +4 -4
- package/components/Cards/propTypes.js +2 -2
- package/components/Cards/stories/Children.js +1 -1
- package/components/Cards/stories/Paginated.js +1 -1
- package/components/Cards/stories/Simple.js +1 -1
- package/components/Carousel/Carousel.js +8 -12
- package/components/Carousel/CarouselChild.js +3 -7
- package/components/Carousel/propTypes.js +2 -2
- package/components/Carousel/stories/Autoplay.js +1 -1
- package/components/Carousel/stories/ControlVariations.js +1 -1
- package/components/Carousel/stories/Controlled.js +1 -1
- package/components/Carousel/stories/CustomThemed/Custom.js +3 -3
- package/components/Carousel/stories/InteractiveChild.js +1 -1
- package/components/Carousel/stories/Multiple.js +1 -1
- package/components/Carousel/stories/Simple.js +1 -1
- package/components/Chart/Chart.js +4 -5
- package/components/Chart/StyledChart.js +2 -4
- package/components/Chart/propTypes.js +2 -2
- package/components/Chart/stories/Animate.js +1 -1
- package/components/Chart/stories/Dash.js +1 -1
- package/components/Chart/stories/Gradient.js +1 -1
- package/components/Chart/stories/Horizontal.js +1 -1
- package/components/Chart/stories/Labelled.js +1 -1
- package/components/Chart/stories/Layout.js +1 -1
- package/components/Chart/stories/Pattern.js +1 -1
- package/components/Chart/stories/Point.js +1 -1
- package/components/Chart/stories/Range.js +1 -1
- package/components/Chart/stories/Rich.js +1 -1
- package/components/Chart/stories/Round.js +1 -1
- package/components/Chart/stories/ValueStyle.js +1 -1
- package/components/Chart/stories/Window.js +1 -1
- package/components/CheckBox/CheckBox.js +4 -5
- package/components/CheckBox/StyledCheckBox.js +7 -21
- package/components/CheckBox/propTypes.js +1 -1
- package/components/CheckBox/stories/Children.js +1 -1
- package/components/CheckBox/stories/CustomThemed/Custom.js +1 -1
- package/components/CheckBox/stories/CustomThemed/CustomToggle.js +1 -1
- package/components/CheckBox/stories/NoLabel.js +2 -2
- package/components/CheckBox/stories/Simple.js +2 -2
- package/components/CheckBoxGroup/CheckBoxGroup.js +4 -4
- package/components/CheckBoxGroup/StyledCheckBoxGroup.js +3 -5
- package/components/CheckBoxGroup/propTypes.js +1 -1
- package/components/CheckBoxGroup/stories/Disabled.js +1 -1
- package/components/CheckBoxGroup/stories/Simple.js +1 -1
- package/components/Clock/Analog.js +4 -5
- package/components/Clock/Clock.js +2 -2
- package/components/Clock/Digital.js +2 -2
- package/components/Clock/StyledClock.js +6 -20
- package/components/Clock/propTypes.js +2 -2
- package/components/Clock/stories/Analog.js +1 -1
- package/components/Clock/stories/Countdown.js +1 -1
- package/components/Clock/stories/CustomThemed/Digital.js +1 -1
- package/components/Collapsible/Collapsible.js +4 -3
- package/components/Collapsible/propTypes.js +1 -1
- package/components/Collapsible/stories/Horizontal.js +1 -1
- package/components/Collapsible/stories/Nested.js +3 -3
- package/components/Collapsible/stories/Simple.js +2 -2
- package/components/Data/Data.js +2 -2
- package/components/Data/DataForm.js +7 -7
- package/components/Data/filter.js +6 -6
- package/components/Data/index.d.ts +1 -3
- package/components/Data/propTypes.js +3 -2
- package/components/Data/stories/Cards.js +1 -1
- package/components/Data/stories/Complex.js +1 -1
- package/components/Data/stories/ComposedToolbar.js +3 -2
- package/components/Data/stories/Infinite.js +2 -2
- package/components/Data/stories/Inline.js +1 -1
- package/components/Data/stories/List.js +1 -1
- package/components/Data/stories/OnSelect.js +2 -2
- package/components/Data/stories/Properties.js +1 -1
- package/components/Data/stories/Simple.js +1 -1
- package/components/Data/stories/SpaceX.js +2 -2
- package/components/Data/stories/StarWars.js +2 -2
- package/components/Data/stories/Views.js +4 -1
- package/components/DataChart/DataChart.js +4 -4
- package/components/DataChart/Detail.js +5 -3
- package/components/DataChart/Legend.js +1 -1
- package/components/DataChart/Swatch.js +5 -6
- package/components/DataChart/XAxis.js +2 -2
- package/components/DataChart/XGuide.js +1 -1
- package/components/DataChart/YAxis.js +1 -1
- package/components/DataChart/YGuide.js +1 -1
- package/components/DataChart/propTypes.js +2 -2
- package/components/DataChart/stories/Axis.js +1 -1
- package/components/DataChart/stories/Detail.js +1 -1
- package/components/DataChart/stories/Everything.js +1 -1
- package/components/DataChart/stories/FourDimension.js +1 -1
- package/components/DataChart/stories/Guide.js +1 -1
- package/components/DataChart/stories/GuideDefault.js +1 -1
- package/components/DataChart/stories/Horizontal.js +1 -1
- package/components/DataChart/stories/Legend.js +1 -1
- package/components/DataChart/stories/MultipleTypes.js +1 -1
- package/components/DataChart/stories/Offset.js +1 -1
- package/components/DataChart/stories/Pad.js +1 -1
- package/components/DataChart/stories/Pattern.js +1 -1
- package/components/DataChart/stories/Placeholder.js +1 -1
- package/components/DataChart/stories/Prediction.js +1 -1
- package/components/DataChart/stories/Simple.js +1 -1
- package/components/DataChart/stories/StackedAreas.js +1 -1
- package/components/DataChart/stories/StackedBars.js +1 -1
- package/components/DataChart/stories/StackedLines.js +1 -1
- package/components/DataClearFilters/DataClearFilters.js +4 -4
- package/components/DataFilter/DataFilter.js +5 -5
- package/components/DataFilter/propTypes.js +1 -1
- package/components/DataFilter/stories/Simple.js +1 -1
- package/components/DataFilters/DataFilters.js +4 -4
- package/components/DataFilters/propTypes.js +1 -1
- package/components/DataFilters/stories/Drop.js +1 -1
- package/components/DataFilters/stories/Layer.js +1 -1
- package/components/DataFilters/stories/Simple.js +1 -1
- package/components/DataSearch/DataSearch.js +4 -4
- package/components/DataSearch/propTypes.js +1 -1
- package/components/DataSearch/stories/Drop.js +1 -1
- package/components/DataSearch/stories/Responsive.js +1 -1
- package/components/DataSearch/stories/Simple.js +1 -1
- package/components/DataSearch/stories/UpdateOnSubmit.js +1 -1
- package/components/DataSort/DataSort.js +4 -4
- package/components/DataSort/propTypes.js +1 -1
- package/components/DataSort/stories/Drop.js +1 -1
- package/components/DataSort/stories/Simple.js +1 -1
- package/components/DataSummary/DataSummary.js +2 -2
- package/components/DataSummary/propTypes.js +1 -1
- package/components/DataSummary/stories/Simple.js +1 -1
- package/components/DataTable/Body.js +4 -5
- package/components/DataTable/Cell.js +5 -8
- package/components/DataTable/DataTable.js +4 -5
- package/components/DataTable/ExpanderCell.js +7 -11
- package/components/DataTable/Footer.js +3 -6
- package/components/DataTable/GroupedBody.js +2 -2
- package/components/DataTable/Header.js +7 -8
- package/components/DataTable/Resizer.js +6 -7
- package/components/DataTable/Searcher.js +3 -6
- package/components/DataTable/Sorter.js +7 -10
- package/components/DataTable/StyledDataTable.js +5 -19
- package/components/DataTable/buildState.js +10 -10
- package/components/DataTable/propTypes.js +2 -2
- package/components/DataTable/stories/AllowSelectAll.js +1 -1
- package/components/DataTable/stories/ColumnSize.js +1 -1
- package/components/DataTable/stories/Controlled.js +2 -2
- package/components/DataTable/stories/ControlledGrouped.js +1 -1
- package/components/DataTable/stories/CustomThemed/Custom.js +1 -1
- package/components/DataTable/stories/CustomThemed/Fill.js +2 -2
- package/components/DataTable/stories/Grouped.js +1 -1
- package/components/DataTable/stories/GroupedOnSelect.js +2 -2
- package/components/DataTable/stories/InfiniteScrollDataTable.js +1 -1
- package/components/DataTable/stories/MultiplePin.js +1 -1
- package/components/DataTable/stories/NoPrimary.js +1 -1
- package/components/DataTable/stories/OnUpdate.js +1 -1
- package/components/DataTable/stories/Placeholder.js +1 -1
- package/components/DataTable/stories/ResizableColumns.js +1 -1
- package/components/DataTable/stories/Served.js +2 -2
- package/components/DataTable/stories/Show.js +1 -1
- package/components/DataTable/stories/Simple.js +1 -1
- package/components/DataTable/stories/Sized.js +1 -1
- package/components/DataTable/stories/Sort.js +2 -2
- package/components/DataTable/stories/SpaceX.js +2 -2
- package/components/DataTable/stories/SpaceXUngrouped.js +2 -2
- package/components/DataTable/stories/Styled.js +1 -1
- package/components/DataTable/stories/Tunable.js +2 -2
- package/components/DataTable/stories/Units.js +1 -1
- package/components/DataTable/stories/VerticalAlign.js +1 -1
- package/components/DataTable/stories/data.js +2 -2
- package/components/DataTable/stories/rowDetails.js +2 -2
- package/components/DataTableColumns/DataTableColumns.js +4 -4
- package/components/DataTableColumns/propTypes.js +1 -1
- package/components/DataTableColumns/stories/DefaultValue.js +49 -0
- package/components/DataTableColumns/stories/Pinned.js +1 -1
- package/components/DataTableColumns/stories/Simple.js +1 -1
- package/components/DataTableGroupBy/DataTableGroupBy.js +2 -2
- package/components/DataTableGroupBy/propTypes.js +1 -1
- package/components/DataTableGroupBy/stories/Simple.js +1 -1
- package/components/DataView/DataView.js +2 -2
- package/components/DataView/stories/Simple.js +1 -1
- package/components/DateInput/DateInput.js +8 -6
- package/components/DateInput/propTypes.js +1 -1
- package/components/DateInput/stories/Form.js +1 -1
- package/components/DateInput/stories/Format.js +1 -1
- package/components/DateInput/stories/Inline.js +1 -1
- package/components/DateInput/stories/Range.js +1 -1
- package/components/DateInput/stories/RangeFormat.js +1 -1
- package/components/DateInput/stories/ReadOnly.js +1 -1
- package/components/DateInput/stories/ResetDate.js +1 -1
- package/components/DateInput/stories/Simple.js +1 -1
- package/components/DateInput/utils.js +2 -2
- package/components/Diagram/Diagram.js +7 -9
- package/components/Diagram/StyledDiagram.js +3 -5
- package/components/Diagram/propTypes.js +2 -2
- package/components/Diagram/stories/Animated.js +2 -2
- package/components/Diagram/stories/Progressing.js +2 -2
- package/components/Distribution/Distribution.js +22 -23
- package/components/Distribution/propTypes.js +3 -3
- package/components/Drop/Drop.js +4 -5
- package/components/Drop/DropContainer.js +4 -4
- package/components/Drop/StyledDrop.js +2 -4
- package/components/Drop/propTypes.js +1 -1
- package/components/Drop/stories/AllNotStretched.js +1 -1
- package/components/DropButton/DropButton.js +2 -2
- package/components/DropButton/propTypes.js +2 -2
- package/components/DropButton/stories/Menu.js +1 -1
- package/components/DropButton/stories/Simple.js +1 -1
- package/components/FileInput/FileInput.js +10 -10
- package/components/FileInput/StyledFileInput.js +3 -5
- package/components/FileInput/propTypes.js +1 -1
- package/components/FileInput/stories/ConfirmRemove.js +1 -1
- package/components/FileInput/stories/CustomThemed/Custom.js +1 -1
- package/components/FileInput/stories/MaxFileCount.js +1 -1
- package/components/FileInput/stories/MaxSize.js +1 -1
- package/components/FileInput/stories/Multiple.js +1 -1
- package/components/FileInput/stories/Simple.js +1 -1
- package/components/FocusedContainer.js +2 -2
- package/components/Footer/Footer.js +3 -3
- package/components/Footer/stories/DoubleFooter.js +3 -3
- package/components/Footer/stories/Simple.js +1 -1
- package/components/Footer/stories/Sitemap.js +3 -3
- package/components/Footer/stories/Social.js +1 -1
- package/components/Form/Form.js +8 -8
- package/components/Form/propTypes.js +1 -1
- package/components/Form/stories/AggregateValidation.js +1 -1
- package/components/Form/stories/ArrayOfFormFields.js +1 -1
- package/components/Form/stories/CustomThemed/Custom.js +1 -1
- package/components/Form/stories/CustomThemed/FieldSpacingOptions.js +2 -2
- package/components/Form/stories/CustomThemed/RequiredLabel.js +1 -1
- package/components/Form/stories/CustomThemed/Themed.js +1 -1
- package/components/Form/stories/FieldWithChildren.js +1 -1
- package/components/Form/stories/FieldWithComponentProp.js +1 -1
- package/components/Form/stories/HelpAndError.js +1 -1
- package/components/Form/stories/TriggerValidationUsingFormField.js +1 -1
- package/components/Form/stories/Uncontrolled.js +1 -1
- package/components/Form/stories/UnsolicitedFeedback.js +3 -2
- package/components/Form/stories/ValidateOnBlur.js +1 -1
- package/components/FormField/FormField.js +11 -9
- package/components/FormField/propTypes.js +1 -1
- package/components/FormField/stories/ThresholdValidation.js +1 -1
- package/components/Grid/Grid.js +2 -2
- package/components/Grid/StyledGrid.js +5 -6
- package/components/Grid/propTypes.js +2 -2
- package/components/Grid/stories/AreasPropAlternative.js +1 -1
- package/components/Grid/stories/Border.js +1 -1
- package/components/Grid/stories/CustomThemed/Responsive.js +3 -3
- package/components/Grid/stories/NColumn.js +1 -1
- package/components/Grid/stories/Percentages.js +1 -1
- package/components/Grommet/Grommet.js +3 -3
- package/components/Grommet/StyledGrommet.js +2 -4
- package/components/Grommet/propTypes.js +1 -1
- package/components/Grommet/stories/Background.js +1 -1
- package/components/Grommet/stories/Messages.js +1 -1
- package/components/Grommet/stories/Plain.js +1 -1
- package/components/Grommet/stories/Theme.js +1 -1
- package/components/Grommet/stories/ThemeMode.js +1 -1
- package/components/Grommet/stories/Vars.js +1 -1
- package/components/Header/Header.js +4 -4
- package/components/Header/propTypes.js +1 -1
- package/components/Header/stories/Responsive.js +1 -1
- package/components/Heading/Heading.js +10 -9
- package/components/Heading/HeadingSkeleton.js +6 -8
- package/components/Heading/StyledHeading.js +2 -4
- package/components/Heading/propTypes.js +2 -2
- package/components/Heading/stories/All.js +1 -1
- package/components/Heading/stories/CustomThemed/CustomHeading.js +1 -1
- package/components/Heading/stories/CustomThemed/Extend.js +1 -1
- package/components/Image/Image.js +2 -2
- package/components/Image/StyledImage.js +2 -4
- package/components/Image/propTypes.js +2 -2
- package/components/Image/stories/Fallback.js +1 -1
- package/components/Image/stories/Fill.js +1 -1
- package/components/Image/stories/Fit.js +1 -1
- package/components/Image/stories/Opacity.js +1 -1
- package/components/Image/stories/Simple.js +1 -1
- package/components/InfiniteScroll/InfiniteScroll.js +1 -0
- package/components/InfiniteScroll/propTypes.js +1 -1
- package/components/InfiniteScroll/stories/Basics.js +2 -2
- package/components/InfiniteScroll/stories/ClassChildren.js +2 -2
- package/components/InfiniteScroll/stories/Grid.js +1 -1
- package/components/InfiniteScroll/stories/GridWithShow.js +1 -1
- package/components/InfiniteScroll/stories/HeightReplace.js +1 -1
- package/components/InfiniteScroll/stories/Marker.js +2 -2
- package/components/InfiniteScroll/stories/Replace.js +1 -1
- package/components/InfiniteScroll/stories/Show.js +2 -2
- package/components/InfiniteScroll/stories/ShowAfter.js +2 -2
- package/components/InfiniteScroll/stories/ShowBefore.js +2 -2
- package/components/InfiniteScroll/stories/Variable.js +1 -1
- package/components/Keyboard/Keyboard.js +1 -1
- package/components/Keyboard/propTypes.js +1 -1
- package/components/Keyboard/stories/OnDocument.js +1 -1
- package/components/Layer/Layer.js +1 -1
- package/components/Layer/LayerContainer.js +4 -4
- package/components/Layer/PortalContext.js +1 -1
- package/components/Layer/StyledLayer.js +5 -9
- package/components/Layer/propTypes.js +1 -1
- package/components/Layer/stories/Center.js +1 -1
- package/components/Layer/stories/Corner.js +1 -1
- package/components/Layer/stories/CustomThemed/Round.js +1 -1
- package/components/Layer/stories/Form.js +1 -1
- package/components/Layer/stories/Full.js +1 -1
- package/components/Layer/stories/Notification.js +1 -1
- package/components/Layer/stories/Plain.js +1 -1
- package/components/Layer/stories/RTL.js +1 -1
- package/components/Layer/stories/ScrollBody.js +1 -1
- package/components/Layer/stories/Target.js +1 -1
- package/components/List/List.js +14 -9
- package/components/List/index.d.ts +1 -0
- package/components/List/propTypes.js +3 -2
- package/components/List/stories/Action.js +1 -1
- package/components/List/stories/Basic.js +1 -1
- package/components/List/stories/Children.js +1 -1
- package/components/List/stories/Disabled.js +1 -1
- package/components/List/stories/Paginated.js +1 -1
- package/components/List/stories/RenderedList.js +1 -1
- package/components/List/stories/Selection.js +1 -1
- package/components/List/stories/Show.js +1 -1
- package/components/List/stories/onClickItem.js +1 -1
- package/components/List/stories/secondaryKey.js +1 -1
- package/components/Main/Main.js +3 -3
- package/components/Markdown/Markdown.js +3 -3
- package/components/Markdown/propTypes.js +1 -1
- package/components/Markdown/stories/Override.js +1 -1
- package/components/Markdown/stories/Simple.js +1 -1
- package/components/MaskedInput/MaskedInput.js +8 -6
- package/components/MaskedInput/StyledMaskedInput.js +5 -4
- package/components/MaskedInput/propTypes.js +1 -1
- package/components/MaskedInput/stories/CustomBox.js +1 -1
- package/components/MaskedInput/stories/Date.js +1 -1
- package/components/MaskedInput/stories/DateRange.js +1 -1
- package/components/MaskedInput/stories/DateTimeDrop.js +1 -1
- package/components/MaskedInput/stories/Filtered.js +1 -1
- package/components/MaskedInput/stories/Form.js +1 -1
- package/components/MaskedInput/stories/IPV4Range.js +1 -1
- package/components/MaskedInput/stories/IPv4Address.js +1 -1
- package/components/MaskedInput/stories/Phone.js +1 -1
- package/components/MaskedInput/stories/SizeUnits.js +1 -1
- package/components/MaskedInput/stories/Time.js +1 -1
- package/components/MaskedInput/stories/URL.js +1 -1
- package/components/Menu/Menu.js +13 -13
- package/components/Menu/propTypes.js +3 -3
- package/components/Menu/stories/BottomControlButton.js +1 -1
- package/components/Menu/stories/Grouped.js +1 -1
- package/components/Menu/stories/ItemWithIcon.js +1 -1
- package/components/Menu/stories/Justify.js +1 -1
- package/components/Menu/stories/Reverse.js +1 -1
- package/components/Menu/stories/Simple.js +1 -1
- package/components/Meter/Bar.js +7 -11
- package/components/Meter/Circle.js +5 -8
- package/components/Meter/Meter.js +4 -5
- package/components/Meter/StyledMeter.js +2 -4
- package/components/Meter/propTypes.js +2 -2
- package/components/Meter/stories/Bar.js +1 -1
- package/components/Meter/stories/Labelled.js +1 -1
- package/components/Meter/stories/Pie.js +1 -1
- package/components/Meter/stories/ReverseBar.js +1 -1
- package/components/Meter/stories/SemiCircle.js +1 -1
- package/components/Meter/stories/VerticalBar.js +1 -1
- package/components/NameValueList/NameValueList.js +4 -4
- package/components/NameValueList/NameValueListContext.js +1 -1
- package/components/NameValueList/propTypes.js +1 -1
- package/components/NameValueList/stories/Align.js +1 -1
- package/components/NameValueList/stories/CustomName.js +1 -1
- package/components/NameValueList/stories/CustomValue.js +1 -1
- package/components/NameValueList/stories/Layout.js +1 -1
- package/components/NameValueList/stories/PairProps.js +1 -1
- package/components/NameValueList/stories/Simple.js +1 -1
- package/components/NameValueList/stories/Width.js +1 -1
- package/components/NameValueList/stories/data.js +1 -1
- package/components/NameValuePair/NameValuePair.js +3 -3
- package/components/NameValuePair/propTypes.js +1 -1
- package/components/Nav/Nav.js +3 -3
- package/components/Nav/stories/Collapsable.js +1 -1
- package/components/Nav/stories/CustomThemed/CustomAnchor.js +1 -1
- package/components/Nav/stories/CustomThemed/JustifySidebar.js +2 -2
- package/components/Nav/stories/OnHeader.js +1 -1
- package/components/Nav/stories/Sidebar.js +2 -2
- package/components/Nav/stories/Simple.js +1 -1
- package/components/Notification/Notification.js +10 -12
- package/components/Notification/propTypes.js +1 -1
- package/components/Notification/stories/Status.js +1 -1
- package/components/Page/Page.js +7 -9
- package/components/Page/propTypes.js +1 -1
- package/components/Page/stories/Background.js +1 -1
- package/components/Page/stories/ContentBackground.js +1 -1
- package/components/Page/stories/CustomThemed/LeftColumn.js +1 -1
- package/components/Page/stories/GlobalHeader.js +1 -1
- package/components/Page/stories/MultipleBackgrounds.js +1 -1
- package/components/Page/stories/MultipleContent.js +1 -1
- package/components/Page/stories/Simple.js +1 -1
- package/components/PageContent/PageContent.js +3 -3
- package/components/PageContent/propTypes.js +1 -1
- package/components/PageHeader/PageHeader.js +4 -4
- package/components/PageHeader/propTypes.js +2 -2
- package/components/PageHeader/stories/Custom.js +1 -1
- package/components/PageHeader/stories/Level.js +1 -1
- package/components/PageHeader/stories/Responsive.js +1 -1
- package/components/PageHeader/stories/Simple.js +1 -1
- package/components/PageHeader/stories/Size.js +1 -1
- package/components/Pagination/PageControl.js +6 -7
- package/components/Pagination/Pagination.js +8 -6
- package/components/Pagination/PaginationStep.js +4 -4
- package/components/Pagination/PaginationSummary.js +1 -1
- package/components/Pagination/StyledPageControl.js +5 -4
- package/components/Pagination/propTypes.js +2 -2
- package/components/Pagination/stories/NumberEdgePages.js +1 -1
- package/components/Pagination/stories/NumberMiddlePages.js +1 -1
- package/components/Pagination/stories/Simple.js +1 -1
- package/components/Pagination/stories/Size.js +1 -1
- package/components/Pagination/stories/Steps.js +1 -1
- package/components/Paragraph/Paragraph.js +2 -2
- package/components/Paragraph/ParagraphSkeleton.js +2 -3
- package/components/Paragraph/StyledParagraph.js +2 -4
- package/components/Paragraph/propTypes.js +2 -2
- package/components/Paragraph/stories/All.js +1 -1
- package/components/Paragraph/stories/CustomThemed/Themed.js +1 -1
- package/components/Paragraph/stories/MaxLines.js +1 -1
- package/components/RadioButton/RadioButton.js +4 -5
- package/components/RadioButton/StyledRadioButton.js +6 -18
- package/components/RadioButton/propTypes.js +1 -1
- package/components/RadioButton/stories/Children.js +1 -1
- package/components/RadioButton/stories/CustomThemed/Theme.js +1 -1
- package/components/RadioButton/stories/Disabled.js +1 -1
- package/components/RadioButton/stories/Simple.js +1 -1
- package/components/RadioButtonGroup/RadioButtonGroup.js +4 -5
- package/components/RadioButtonGroup/propTypes.js +1 -1
- package/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +2 -2
- package/components/RadioButtonGroup/stories/Disabled.js +2 -2
- package/components/RangeInput/RangeInput.js +5 -6
- package/components/RangeInput/StyledRangeInput.js +2 -5
- package/components/RangeInput/propTypes.js +1 -1
- package/components/RangeInput/stories/CustomThemed/Bounds.js +16 -13
- package/components/RangeInput/stories/CustomThemed/Disabled.js +1 -1
- package/components/RangeInput/stories/CustomThemed/TrackColor.js +1 -1
- package/components/RangeInput/stories/SimpleRange.js +1 -1
- package/components/RangeSelector/EdgeControl.js +7 -8
- package/components/RangeSelector/RangeSelector.js +6 -4
- package/components/RangeSelector/propTypes.js +1 -1
- package/components/RangeSelector/stories/CustomThemed/Custom.js +2 -2
- package/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +2 -2
- package/components/RangeSelector/stories/Step.js +2 -2
- package/components/RangeSelector/stories/Vertical.js +2 -2
- package/components/RoutedAnchor/RoutedAnchor.js +7 -10
- package/components/RoutedAnchor/RouterContext.js +7 -0
- package/components/RoutedButton/RoutedButton.js +7 -10
- package/components/RoutedButton/RouterContext.js +7 -0
- package/components/Select/DefaultSelectTextInput.js +2 -2
- package/components/Select/EmptySearchOption.js +2 -2
- package/components/Select/Select.js +4 -8
- package/components/Select/SelectContainer.js +8 -6
- package/components/Select/StyledSelect.js +5 -4
- package/components/Select/propTypes.js +2 -2
- package/components/Select/stories/LazyLoadingOptions.js +1 -1
- package/components/Select/stories/ManyOptions.js +1 -1
- package/components/Select/stories/Uncontrolled.js +1 -1
- package/components/Select/stories/components/SearchBorderBox.js +2 -2
- package/components/Select/stories/components/SearchInput.js +2 -2
- package/components/Select/utils.js +10 -10
- package/components/SelectMultiple/SelectMultiple.js +8 -9
- package/components/SelectMultiple/SelectMultipleContainer.js +3 -4
- package/components/SelectMultiple/propTypes.js +2 -2
- package/components/SelectMultiple/stories/LongList.js +1 -1
- package/components/Sidebar/Sidebar.js +4 -9
- package/components/Sidebar/propTypes.js +1 -1
- package/components/Sidebar/stories/Labels.js +3 -3
- package/components/Skeleton/Skeleton.js +4 -5
- package/components/Skeleton/StyledSkeleton.js +3 -2
- package/components/Skeleton/propTypes.js +2 -2
- package/components/Skeleton/stories/GridContainer.js +2 -2
- package/components/Skeleton/stories/Group.js +6 -6
- package/components/Skeleton/stories/Individual.js +6 -6
- package/components/Skeleton/stories/Simple.js +1 -1
- package/components/SkipLink/SkipLink.js +2 -2
- package/components/SkipLinkTarget/SkipLinkTarget.js +3 -3
- package/components/SkipLinks/SkipLinks.js +2 -4
- package/components/SkipLinks/propTypes.js +1 -1
- package/components/SkipLinks/stories/CustomThemed/Themed.js +1 -1
- package/components/SkipLinks/stories/Simple.js +1 -1
- package/components/Spinner/Spinner.js +4 -5
- package/components/Spinner/propTypes.js +1 -1
- package/components/Spinner/stories/Animation.js +1 -1
- package/components/Spinner/stories/Border.js +1 -1
- package/components/Spinner/stories/ChildrenSpinner.js +1 -1
- package/components/Spinner/stories/Color.js +1 -1
- package/components/Spinner/stories/Modal.js +1 -1
- package/components/Spinner/stories/Round.js +1 -1
- package/components/Spinner/stories/Simple.js +1 -1
- package/components/Spinner/stories/Size.js +1 -1
- package/components/Stack/Stack.js +2 -2
- package/components/Stack/StyledStack.js +2 -6
- package/components/Stack/propTypes.js +2 -2
- package/components/Stack/stories/Fill.js +1 -1
- package/components/Stack/stories/Simple.js +1 -1
- package/components/StarRating/StarRating.js +4 -4
- package/components/StarRating/stories/simple.js +1 -1
- package/components/Tab/StyledTab.js +2 -4
- package/components/Tab/Tab.js +4 -7
- package/components/Tab/propTypes.js +1 -1
- package/components/Table/StyledTable.js +4 -18
- package/components/Table/Table.js +2 -2
- package/components/Table/TableContext.js +1 -1
- package/components/Table/propTypes.js +2 -2
- package/components/Table/stories/CustomThemed/Custom.js +1 -1
- package/components/Table/stories/Default.js +1 -1
- package/components/Table/stories/MeterInTable.js +1 -1
- package/components/Table/stories/data.js +1 -1
- package/components/TableBody/TableBody.js +1 -1
- package/components/TableCell/TableCell.js +4 -4
- package/components/TableCell/propTypes.js +1 -1
- package/components/TableFooter/TableFooter.js +1 -1
- package/components/TableHeader/TableHeader.js +1 -1
- package/components/TableRow/TableRow.js +1 -1
- package/components/Tabs/StyledTabs.js +4 -10
- package/components/Tabs/Tabs.js +4 -5
- package/components/Tabs/TabsContext.js +1 -1
- package/components/Tabs/propTypes.js +2 -2
- package/components/Tabs/stories/CustomThemed/Custom.js +1 -1
- package/components/Tabs/stories/Rich.js +1 -1
- package/components/Tabs/stories/Scrollable.js +1 -1
- package/components/Tag/StyledTag.js +5 -9
- package/components/Tag/Tag.js +4 -5
- package/components/Tag/propTypes.js +1 -1
- package/components/Tag/stories/OnClick.js +1 -1
- package/components/Tag/stories/OnRemove.js +1 -1
- package/components/Tag/stories/Simple.js +1 -1
- package/components/Tag/stories/Size.js +1 -1
- package/components/Text/StyledText.js +2 -4
- package/components/Text/Text.js +7 -6
- package/components/Text/TextContext.js +1 -1
- package/components/Text/TextSkeleton.js +4 -5
- package/components/Text/propTypes.js +2 -2
- package/components/Text/stories/All.js +1 -1
- package/components/Text/stories/Tip.js +1 -1
- package/components/Text/stories/WordBreak.js +1 -1
- package/components/TextArea/StyledTextArea.js +2 -4
- package/components/TextArea/TextArea.js +2 -2
- package/components/TextArea/propTypes.js +1 -1
- package/components/TextArea/stories/NonResizable.js +1 -1
- package/components/TextArea/stories/Simple.js +1 -1
- package/components/TextInput/CopyButton.js +7 -6
- package/components/TextInput/StyledTextInput.js +7 -15
- package/components/TextInput/TextInput.js +8 -6
- package/components/TextInput/propTypes.js +1 -1
- package/components/TextInput/stories/CustomThemed/Themed.js +1 -1
- package/components/TextInput/stories/DefaultSuggestion.js +1 -1
- package/components/TextInput/stories/Icon.js +1 -1
- package/components/TextInput/stories/InsideFormField.js +1 -1
- package/components/TextInput/stories/OnSelect.js +1 -1
- package/components/TextInput/stories/Password.js +1 -1
- package/components/TextInput/stories/ReadOnly.js +1 -1
- package/components/TextInput/stories/Simple.js +1 -1
- package/components/TextInput/stories/StyledPlaceholder.js +1 -1
- package/components/TextInput/stories/Suggestions.js +1 -1
- package/components/TextInput/stories/Uncontrolled.js +1 -1
- package/components/TextInput/stories/WithTags.js +3 -3
- package/components/ThumbsRating/ThumbsRating.js +6 -7
- package/components/ThumbsRating/stories/simple.js +1 -1
- package/components/Tip/Tip.js +8 -3
- package/components/Tip/index.d.ts +1 -0
- package/components/Tip/propTypes.js +3 -2
- package/components/Tip/stories/Caret.js +1 -1
- package/components/Tip/stories/CustomThemed/ResponsiveTip.js +1 -1
- package/components/Tip/stories/CustomThemed/SidebarTip.js +1 -1
- package/components/Tip/stories/InfoTip.js +1 -1
- package/components/ToggleGroup/StyledToggleGroup.js +3 -2
- package/components/ToggleGroup/ToggleGroup.js +7 -4
- package/components/ToggleGroup/index.d.ts +1 -0
- package/components/ToggleGroup/propTypes.js +3 -2
- package/components/ToggleGroup/stories/simple.js +1 -1
- package/components/Toolbar/Toolbar.js +3 -4
- package/components/Toolbar/stories/Simple.js +1 -1
- package/components/Video/StyledVideo.js +5 -13
- package/components/Video/Video.js +4 -6
- package/components/Video/propTypes.js +2 -2
- package/components/WorldMap/StyledWorldMap.js +3 -5
- package/components/WorldMap/WorldMap.js +4 -7
- package/components/WorldMap/propTypes.js +2 -2
- package/components/WorldMap/stories/Color.js +1 -1
- package/components/WorldMap/stories/Continents.js +1 -1
- package/components/WorldMap/stories/Places.js +2 -2
- package/components/WorldMap/stories/SelectPlace.js +1 -1
- package/components/WorldMap/stories/Simple.js +1 -1
- package/contexts/AnnounceContext/AnnounceContext.js +1 -1
- package/contexts/AnnounceContext/propTypes.js +1 -1
- package/contexts/AnnounceContext/stories/Assertive.js +8 -10
- package/contexts/ContainerTargetContext/ContainerTargetContext.js +1 -1
- package/contexts/DataContext.js +1 -1
- package/contexts/DataFormContext.js +1 -1
- package/contexts/MessageContext/MessageContext.js +1 -1
- package/contexts/OptionsContext.js +1 -1
- package/contexts/ResponsiveContext/ResponsiveContext.js +1 -1
- package/contexts/ResponsiveContext/propTypes.js +1 -1
- package/contexts/ResponsiveContext/stories/CustomBreakpoints.js +1 -1
- package/contexts/ResponsiveContext/stories/ResponsiveGrid.js +3 -3
- package/contexts/RootsContext.js +1 -1
- package/contexts/ThemeContext/ThemeContext.js +1 -1
- package/contexts/ThemeContext/propTypes.js +1 -1
- package/contexts/ThemeContext/stories/ExternalComponent.js +1 -1
- package/default-props.d.ts +2 -0
- package/default-props.js +11 -1
- package/es6/all/stories/AllComponents.js +2 -2
- package/es6/components/Accordion/Accordion.js +2 -2
- package/es6/components/Accordion/propTypes.js +1 -1
- package/es6/components/Accordion/stories/CustomThemed/Custom.js +2 -2
- package/es6/components/Accordion/stories/Simple.js +1 -1
- package/es6/components/AccordionPanel/AccordionPanel.js +5 -6
- package/es6/components/Anchor/Anchor.js +6 -7
- package/es6/components/Anchor/StyledAnchor.js +2 -4
- package/es6/components/Anchor/propTypes.js +1 -1
- package/es6/components/Avatar/Avatar.js +5 -6
- package/es6/components/Avatar/StyledAvatar.js +3 -7
- package/es6/components/Box/Box.js +4 -4
- package/es6/components/Box/StyledBox.js +7 -11
- package/es6/components/Box/propTypes.js +1 -1
- package/es6/components/Box/stories/BackgroundThemed.js +4 -3
- package/es6/components/Button/Badge.js +6 -4
- package/es6/components/Button/Button.js +5 -5
- package/es6/components/Button/StyledButton.js +2 -4
- package/es6/components/Button/StyledButtonKind.js +2 -4
- package/es6/components/Button/propTypes.js +1 -1
- package/es6/components/Button/stories/Basic.js +1 -1
- package/es6/components/Button/stories/Fill.js +1 -1
- package/es6/components/Button/stories/Kind.js +1 -1
- package/es6/components/Calendar/Calendar.js +19 -19
- package/es6/components/Calendar/StyledCalendar.js +5 -17
- package/es6/components/Calendar/propTypes.js +1 -1
- package/es6/components/Calendar/stories/ShowAdjacentDays.js +2 -2
- package/es6/components/Card/Card.js +5 -6
- package/es6/components/Card/stories/CustomThemed/Clickable.js +2 -2
- package/es6/components/Card/stories/CustomThemed/RichFooter.js +2 -2
- package/es6/components/Card/stories/CustomThemed/Themed.js +2 -2
- package/es6/components/CardBody/CardBody.js +5 -6
- package/es6/components/CardFooter/CardFooter.js +5 -6
- package/es6/components/CardHeader/CardHeader.js +5 -6
- package/es6/components/Cards/Cards.js +4 -4
- package/es6/components/Cards/propTypes.js +1 -1
- package/es6/components/Carousel/Carousel.js +8 -12
- package/es6/components/Carousel/CarouselChild.js +2 -6
- package/es6/components/Carousel/propTypes.js +1 -1
- package/es6/components/Carousel/stories/CustomThemed/Custom.js +2 -2
- package/es6/components/Chart/Chart.js +5 -6
- package/es6/components/Chart/StyledChart.js +2 -4
- package/es6/components/Chart/propTypes.js +1 -1
- package/es6/components/Chart/stories/Rich.js +1 -1
- package/es6/components/Chart/stories/Window.js +1 -1
- package/es6/components/CheckBox/CheckBox.js +4 -5
- package/es6/components/CheckBox/StyledCheckBox.js +7 -21
- package/es6/components/CheckBox/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/CheckBox/stories/CustomThemed/CustomToggle.js +1 -1
- package/es6/components/CheckBox/stories/NoLabel.js +2 -2
- package/es6/components/CheckBox/stories/Simple.js +2 -2
- package/es6/components/CheckBoxGroup/CheckBoxGroup.js +4 -4
- package/es6/components/CheckBoxGroup/StyledCheckBoxGroup.js +2 -4
- package/es6/components/Clock/Analog.js +5 -6
- package/es6/components/Clock/Clock.js +2 -2
- package/es6/components/Clock/Digital.js +2 -2
- package/es6/components/Clock/StyledClock.js +6 -20
- package/es6/components/Clock/propTypes.js +1 -1
- package/es6/components/Collapsible/Collapsible.js +4 -4
- package/es6/components/Collapsible/stories/Nested.js +2 -2
- package/es6/components/Collapsible/stories/Simple.js +1 -1
- package/es6/components/Data/Data.js +2 -2
- package/es6/components/Data/DataForm.js +6 -6
- package/es6/components/Data/filter.js +6 -6
- package/es6/components/Data/index.d.ts +1 -3
- package/es6/components/Data/propTypes.js +2 -1
- package/es6/components/Data/stories/ComposedToolbar.js +2 -1
- package/es6/components/Data/stories/Infinite.js +2 -2
- package/es6/components/Data/stories/Inline.js +1 -1
- package/es6/components/Data/stories/OnSelect.js +2 -2
- package/es6/components/Data/stories/SpaceX.js +2 -2
- package/es6/components/Data/stories/StarWars.js +2 -2
- package/es6/components/Data/stories/Views.js +3 -0
- package/es6/components/DataChart/DataChart.js +5 -5
- package/es6/components/DataChart/Detail.js +5 -4
- package/es6/components/DataChart/Legend.js +1 -1
- package/es6/components/DataChart/Swatch.js +4 -4
- package/es6/components/DataChart/XAxis.js +2 -2
- package/es6/components/DataChart/XGuide.js +1 -1
- package/es6/components/DataChart/YAxis.js +1 -1
- package/es6/components/DataChart/YGuide.js +1 -1
- package/es6/components/DataChart/propTypes.js +1 -1
- package/es6/components/DataClearFilters/DataClearFilters.js +4 -4
- package/es6/components/DataFilter/DataFilter.js +5 -5
- package/es6/components/DataFilters/DataFilters.js +4 -4
- package/es6/components/DataSearch/DataSearch.js +4 -4
- package/es6/components/DataSort/DataSort.js +4 -4
- package/es6/components/DataSummary/DataSummary.js +2 -2
- package/es6/components/DataTable/Body.js +5 -6
- package/es6/components/DataTable/Cell.js +4 -7
- package/es6/components/DataTable/DataTable.js +4 -5
- package/es6/components/DataTable/ExpanderCell.js +5 -8
- package/es6/components/DataTable/Footer.js +2 -5
- package/es6/components/DataTable/GroupedBody.js +2 -2
- package/es6/components/DataTable/Header.js +7 -8
- package/es6/components/DataTable/Resizer.js +5 -7
- package/es6/components/DataTable/Searcher.js +3 -6
- package/es6/components/DataTable/Sorter.js +5 -7
- package/es6/components/DataTable/StyledDataTable.js +5 -19
- package/es6/components/DataTable/buildState.js +11 -10
- package/es6/components/DataTable/propTypes.js +1 -1
- package/es6/components/DataTable/stories/Controlled.js +1 -1
- package/es6/components/DataTable/stories/ControlledGrouped.js +1 -1
- package/es6/components/DataTable/stories/CustomThemed/Fill.js +1 -1
- package/es6/components/DataTable/stories/GroupedOnSelect.js +1 -1
- package/es6/components/DataTable/stories/OnUpdate.js +1 -1
- package/es6/components/DataTable/stories/Served.js +1 -1
- package/es6/components/DataTable/stories/Sort.js +1 -1
- package/es6/components/DataTable/stories/SpaceX.js +2 -2
- package/es6/components/DataTable/stories/SpaceXUngrouped.js +2 -2
- package/es6/components/DataTable/stories/Tunable.js +1 -1
- package/es6/components/DataTable/stories/data.js +1 -1
- package/es6/components/DataTable/stories/rowDetails.js +1 -1
- package/es6/components/DataTableColumns/DataTableColumns.js +4 -4
- package/es6/components/DataTableColumns/stories/DefaultValue.js +45 -0
- package/es6/components/DataTableGroupBy/DataTableGroupBy.js +2 -2
- package/es6/components/DataView/DataView.js +2 -2
- package/es6/components/DateInput/DateInput.js +7 -6
- package/es6/components/DateInput/utils.js +2 -2
- package/es6/components/Diagram/Diagram.js +8 -10
- package/es6/components/Diagram/StyledDiagram.js +2 -4
- package/es6/components/Diagram/propTypes.js +1 -1
- package/es6/components/Diagram/stories/Animated.js +2 -2
- package/es6/components/Diagram/stories/Progressing.js +2 -2
- package/es6/components/Distribution/Distribution.js +22 -23
- package/es6/components/Distribution/propTypes.js +2 -2
- package/es6/components/Drop/Drop.js +4 -5
- package/es6/components/Drop/DropContainer.js +4 -4
- package/es6/components/Drop/StyledDrop.js +2 -4
- package/es6/components/DropButton/DropButton.js +2 -2
- package/es6/components/DropButton/propTypes.js +1 -1
- package/es6/components/FileInput/FileInput.js +9 -10
- package/es6/components/FileInput/StyledFileInput.js +2 -4
- package/es6/components/FocusedContainer.js +2 -2
- package/es6/components/Footer/Footer.js +2 -2
- package/es6/components/Footer/stories/DoubleFooter.js +2 -2
- package/es6/components/Footer/stories/Sitemap.js +2 -2
- package/es6/components/Form/Form.js +8 -8
- package/es6/components/Form/stories/ArrayOfFormFields.js +1 -1
- package/es6/components/Form/stories/CustomThemed/FieldSpacingOptions.js +1 -1
- package/es6/components/Form/stories/UnsolicitedFeedback.js +2 -1
- package/es6/components/FormField/FormField.js +10 -9
- package/es6/components/Grid/Grid.js +2 -2
- package/es6/components/Grid/StyledGrid.js +4 -5
- package/es6/components/Grid/propTypes.js +1 -1
- package/es6/components/Grid/stories/CustomThemed/Responsive.js +2 -2
- package/es6/components/Grommet/Grommet.js +2 -2
- package/es6/components/Grommet/StyledGrommet.js +2 -4
- package/es6/components/Header/Header.js +5 -5
- package/es6/components/Heading/Heading.js +10 -9
- package/es6/components/Heading/HeadingSkeleton.js +6 -8
- package/es6/components/Heading/StyledHeading.js +2 -4
- package/es6/components/Heading/propTypes.js +1 -1
- package/es6/components/Image/Image.js +2 -2
- package/es6/components/Image/StyledImage.js +2 -4
- package/es6/components/Image/propTypes.js +1 -1
- package/es6/components/InfiniteScroll/InfiniteScroll.js +1 -0
- package/es6/components/InfiniteScroll/stories/Basics.js +1 -1
- package/es6/components/InfiniteScroll/stories/ClassChildren.js +1 -1
- package/es6/components/InfiniteScroll/stories/Marker.js +1 -1
- package/es6/components/InfiniteScroll/stories/Show.js +1 -1
- package/es6/components/InfiniteScroll/stories/ShowAfter.js +1 -1
- package/es6/components/InfiniteScroll/stories/ShowBefore.js +1 -1
- package/es6/components/Keyboard/Keyboard.js +1 -1
- package/es6/components/Layer/Layer.js +1 -1
- package/es6/components/Layer/LayerContainer.js +4 -4
- package/es6/components/Layer/StyledLayer.js +4 -8
- package/es6/components/List/List.js +13 -9
- package/es6/components/List/index.d.ts +1 -0
- package/es6/components/List/propTypes.js +2 -1
- package/es6/components/Main/Main.js +2 -2
- package/es6/components/Markdown/Markdown.js +2 -2
- package/es6/components/MaskedInput/MaskedInput.js +7 -6
- package/es6/components/MaskedInput/StyledMaskedInput.js +4 -3
- package/es6/components/Menu/Menu.js +12 -13
- package/es6/components/Menu/propTypes.js +2 -2
- package/es6/components/Meter/Bar.js +7 -11
- package/es6/components/Meter/Circle.js +5 -8
- package/es6/components/Meter/Meter.js +5 -6
- package/es6/components/Meter/StyledMeter.js +2 -4
- package/es6/components/Meter/propTypes.js +1 -1
- package/es6/components/NameValueList/NameValueList.js +4 -4
- package/es6/components/NameValuePair/NameValuePair.js +3 -3
- package/es6/components/Nav/Nav.js +2 -2
- package/es6/components/Nav/stories/CustomThemed/JustifySidebar.js +2 -2
- package/es6/components/Nav/stories/Sidebar.js +2 -2
- package/es6/components/Notification/Notification.js +10 -13
- package/es6/components/Page/Page.js +6 -8
- package/es6/components/PageContent/PageContent.js +3 -3
- package/es6/components/PageHeader/PageHeader.js +4 -4
- package/es6/components/PageHeader/propTypes.js +1 -1
- package/es6/components/Pagination/PageControl.js +5 -5
- package/es6/components/Pagination/Pagination.js +7 -6
- package/es6/components/Pagination/PaginationStep.js +4 -4
- package/es6/components/Pagination/PaginationSummary.js +1 -1
- package/es6/components/Pagination/StyledPageControl.js +4 -3
- package/es6/components/Pagination/propTypes.js +1 -1
- package/es6/components/Paragraph/Paragraph.js +2 -2
- package/es6/components/Paragraph/ParagraphSkeleton.js +3 -4
- package/es6/components/Paragraph/StyledParagraph.js +2 -4
- package/es6/components/Paragraph/propTypes.js +1 -1
- package/es6/components/RadioButton/RadioButton.js +5 -6
- package/es6/components/RadioButton/StyledRadioButton.js +6 -18
- package/es6/components/RadioButtonGroup/RadioButtonGroup.js +4 -5
- package/es6/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +2 -2
- package/es6/components/RadioButtonGroup/stories/Disabled.js +2 -2
- package/es6/components/RangeInput/RangeInput.js +5 -6
- package/es6/components/RangeInput/StyledRangeInput.js +2 -4
- package/es6/components/RangeInput/stories/CustomThemed/Bounds.js +14 -12
- package/es6/components/RangeSelector/EdgeControl.js +6 -8
- package/es6/components/RangeSelector/RangeSelector.js +5 -4
- package/es6/components/RangeSelector/stories/CustomThemed/Custom.js +2 -2
- package/es6/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +2 -2
- package/es6/components/RangeSelector/stories/Step.js +2 -2
- package/es6/components/RangeSelector/stories/Vertical.js +2 -2
- package/es6/components/RoutedAnchor/RoutedAnchor.js +7 -9
- package/es6/components/RoutedAnchor/RouterContext.js +2 -0
- package/es6/components/RoutedButton/RoutedButton.js +7 -9
- package/es6/components/RoutedButton/RouterContext.js +2 -0
- package/es6/components/Select/DefaultSelectTextInput.js +2 -2
- package/es6/components/Select/EmptySearchOption.js +1 -1
- package/es6/components/Select/Select.js +4 -8
- package/es6/components/Select/SelectContainer.js +8 -7
- package/es6/components/Select/StyledSelect.js +4 -3
- package/es6/components/Select/propTypes.js +1 -1
- package/es6/components/Select/stories/components/SearchBorderBox.js +2 -2
- package/es6/components/Select/stories/components/SearchInput.js +2 -2
- package/es6/components/Select/utils.js +11 -10
- package/es6/components/SelectMultiple/SelectMultiple.js +7 -9
- package/es6/components/SelectMultiple/SelectMultipleContainer.js +3 -4
- package/es6/components/SelectMultiple/propTypes.js +1 -1
- package/es6/components/Sidebar/Sidebar.js +3 -8
- package/es6/components/Sidebar/stories/Labels.js +2 -2
- package/es6/components/Skeleton/Skeleton.js +5 -6
- package/es6/components/Skeleton/StyledSkeleton.js +2 -1
- package/es6/components/Skeleton/propTypes.js +1 -1
- package/es6/components/Skeleton/stories/GridContainer.js +2 -2
- package/es6/components/Skeleton/stories/Group.js +6 -5
- package/es6/components/Skeleton/stories/Individual.js +6 -5
- package/es6/components/SkipLink/SkipLink.js +2 -2
- package/es6/components/SkipLinkTarget/SkipLinkTarget.js +2 -2
- package/es6/components/SkipLinks/SkipLinks.js +2 -4
- package/es6/components/Spinner/Spinner.js +4 -5
- package/es6/components/Stack/Stack.js +2 -2
- package/es6/components/Stack/StyledStack.js +2 -6
- package/es6/components/Stack/propTypes.js +1 -1
- package/es6/components/StarRating/StarRating.js +4 -4
- package/es6/components/Tab/StyledTab.js +2 -4
- package/es6/components/Tab/Tab.js +4 -7
- package/es6/components/Table/StyledTable.js +4 -18
- package/es6/components/Table/Table.js +2 -2
- package/es6/components/Table/propTypes.js +1 -1
- package/es6/components/TableBody/TableBody.js +1 -1
- package/es6/components/TableCell/TableCell.js +4 -4
- package/es6/components/TableFooter/TableFooter.js +1 -1
- package/es6/components/TableHeader/TableHeader.js +1 -1
- package/es6/components/TableRow/TableRow.js +1 -1
- package/es6/components/Tabs/StyledTabs.js +4 -10
- package/es6/components/Tabs/Tabs.js +4 -5
- package/es6/components/Tabs/propTypes.js +1 -1
- package/es6/components/Tag/StyledTag.js +4 -8
- package/es6/components/Tag/Tag.js +5 -6
- package/es6/components/Text/StyledText.js +2 -4
- package/es6/components/Text/Text.js +7 -6
- package/es6/components/Text/TextSkeleton.js +5 -6
- package/es6/components/Text/propTypes.js +1 -1
- package/es6/components/TextArea/StyledTextArea.js +2 -4
- package/es6/components/TextArea/TextArea.js +2 -2
- package/es6/components/TextArea/stories/NonResizable.js +1 -1
- package/es6/components/TextArea/stories/Simple.js +1 -1
- package/es6/components/TextInput/CopyButton.js +6 -4
- package/es6/components/TextInput/StyledTextInput.js +6 -14
- package/es6/components/TextInput/TextInput.js +7 -6
- package/es6/components/TextInput/stories/InsideFormField.js +1 -1
- package/es6/components/TextInput/stories/WithTags.js +2 -2
- package/es6/components/ThumbsRating/ThumbsRating.js +5 -5
- package/es6/components/Tip/Tip.js +9 -4
- package/es6/components/Tip/index.d.ts +1 -0
- package/es6/components/Tip/propTypes.js +2 -1
- package/es6/components/ToggleGroup/StyledToggleGroup.js +2 -1
- package/es6/components/ToggleGroup/ToggleGroup.js +8 -5
- package/es6/components/ToggleGroup/index.d.ts +1 -0
- package/es6/components/ToggleGroup/propTypes.js +2 -1
- package/es6/components/Toolbar/Toolbar.js +3 -4
- package/es6/components/Video/StyledVideo.js +5 -13
- package/es6/components/Video/Video.js +4 -6
- package/es6/components/Video/propTypes.js +1 -1
- package/es6/components/WorldMap/StyledWorldMap.js +2 -4
- package/es6/components/WorldMap/WorldMap.js +4 -7
- package/es6/components/WorldMap/propTypes.js +1 -1
- package/es6/components/WorldMap/stories/Places.js +1 -1
- package/es6/contexts/AnnounceContext/stories/Assertive.js +7 -9
- package/es6/contexts/ResponsiveContext/stories/ResponsiveGrid.js +2 -2
- package/es6/default-props.d.ts +2 -0
- package/es6/default-props.js +10 -0
- package/es6/themes/base.d.ts +3 -0
- package/es6/themes/base.js +7 -4
- package/es6/utils/DOM.js +7 -5
- package/es6/utils/background.js +4 -4
- package/es6/utils/colors.js +3 -2
- package/es6/utils/mixins.js +3 -2
- package/es6/utils/object.js +4 -3
- package/es6/utils/pagination.js +2 -2
- package/es6/utils/styles.js +1 -1
- package/es6/utils/use-debounce.js +3 -4
- package/es6/utils/useThemeValue.js +12 -0
- package/grommet.min.js +1 -1
- package/grommet.min.js.map +1 -1
- package/package.json +39 -40
- package/themes/base.d.ts +3 -0
- package/themes/base.js +7 -4
- package/utils/DOM.js +4 -4
- package/utils/PortalContext.js +1 -1
- package/utils/background.js +4 -4
- package/utils/colors.js +2 -2
- package/utils/general-prop-types.js +1 -1
- package/utils/mixins.js +2 -2
- package/utils/object.js +3 -3
- package/utils/pagination.js +2 -2
- package/utils/router.js +1 -1
- package/utils/styles.js +2 -2
- package/utils/use-debounce.js +2 -3
- package/utils/useThemeValue.js +14 -0
|
@@ -6,7 +6,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
6
6
|
var _Search = require("grommet-icons/icons/Search");
|
|
7
7
|
var _Splits = require("grommet-icons/icons/Splits");
|
|
8
8
|
var _Lock = require("grommet-icons/icons/Lock");
|
|
9
|
-
var _styledComponents = require("styled-components");
|
|
10
9
|
var _Box = require("../Box");
|
|
11
10
|
var _CheckBoxGroup = require("../CheckBoxGroup");
|
|
12
11
|
var _Data = require("../Data");
|
|
@@ -20,12 +19,13 @@ var _TextInput = require("../TextInput");
|
|
|
20
19
|
var _DataContext = require("../../contexts/DataContext");
|
|
21
20
|
var _MessageContext = require("../../contexts/MessageContext");
|
|
22
21
|
var _propTypes = require("./propTypes");
|
|
22
|
+
var _useThemeValue = require("../../utils/useThemeValue");
|
|
23
23
|
var _excluded = ["drop", "options"],
|
|
24
24
|
_excluded2 = ["drop", "options"];
|
|
25
25
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
26
26
|
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; }
|
|
27
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
28
|
-
function _objectWithoutPropertiesLoose(
|
|
27
|
+
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); }
|
|
28
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
29
29
|
var dropProps = {
|
|
30
30
|
align: {
|
|
31
31
|
top: 'bottom',
|
|
@@ -208,7 +208,7 @@ var DataTableColumns = exports.DataTableColumns = function DataTableColumns(_ref
|
|
|
208
208
|
inDataForm = _useContext5.inDataForm;
|
|
209
209
|
var _useContext6 = (0, _react.useContext)(_MessageContext.MessageContext),
|
|
210
210
|
format = _useContext6.format;
|
|
211
|
-
var theme = (0,
|
|
211
|
+
var theme = (0, _useThemeValue.useThemeValue)();
|
|
212
212
|
var _useState3 = (0, _react.useState)(),
|
|
213
213
|
showContent = _useState3[0],
|
|
214
214
|
setShowContent = _useState3[1];
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.DataTableColumnsPropTypes = void 0;
|
|
5
5
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
6
|
-
function _interopRequireDefault(
|
|
6
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
7
7
|
var PropType = {};
|
|
8
8
|
if (process.env.NODE_ENV !== 'production') {
|
|
9
9
|
PropType = {
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports["default"] = exports.DefaultValue = void 0;
|
|
5
|
+
var _react = _interopRequireDefault(require("react"));
|
|
6
|
+
var _grommet = require("grommet");
|
|
7
|
+
var _data = require("../../DataTable/stories/data");
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
// simplify option label for name property
|
|
10
|
+
var options = _data.columns.map(function (_ref) {
|
|
11
|
+
var header = _ref.header,
|
|
12
|
+
property = _ref.property;
|
|
13
|
+
return {
|
|
14
|
+
property: property,
|
|
15
|
+
label: property === 'name' ? 'Name' : header
|
|
16
|
+
};
|
|
17
|
+
});
|
|
18
|
+
var defaultValue = ['percent', 'paid', 'name'];
|
|
19
|
+
var DefaultValue = exports.DefaultValue = function DefaultValue() {
|
|
20
|
+
return (
|
|
21
|
+
/*#__PURE__*/
|
|
22
|
+
// Uncomment <Grommet> lines when using outside of storybook
|
|
23
|
+
// <Grommet theme={...}>
|
|
24
|
+
_react["default"].createElement(_grommet.Box, {
|
|
25
|
+
align: "center",
|
|
26
|
+
justify: "start",
|
|
27
|
+
pad: "large",
|
|
28
|
+
gap: "medium"
|
|
29
|
+
}, /*#__PURE__*/_react["default"].createElement(_grommet.Data, {
|
|
30
|
+
data: _data.DATA,
|
|
31
|
+
defaultView: {
|
|
32
|
+
columns: defaultValue
|
|
33
|
+
}
|
|
34
|
+
}, /*#__PURE__*/_react["default"].createElement(_grommet.Toolbar, null, /*#__PURE__*/_react["default"].createElement(_grommet.DataSearch, null), /*#__PURE__*/_react["default"].createElement(_grommet.DataTableColumns, {
|
|
35
|
+
drop: true,
|
|
36
|
+
options: options
|
|
37
|
+
})), /*#__PURE__*/_react["default"].createElement(_grommet.DataSummary, null), /*#__PURE__*/_react["default"].createElement(_grommet.DataTable, {
|
|
38
|
+
columns: _data.columns,
|
|
39
|
+
primaryKey: "name"
|
|
40
|
+
})))
|
|
41
|
+
// </Grommet>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
DefaultValue.args = {
|
|
45
|
+
full: true
|
|
46
|
+
};
|
|
47
|
+
var _default = exports["default"] = {
|
|
48
|
+
title: 'Data/DataTableColumns/DefaultValue'
|
|
49
|
+
};
|
|
@@ -5,7 +5,7 @@ exports["default"] = exports.Pinned = void 0;
|
|
|
5
5
|
var _react = _interopRequireDefault(require("react"));
|
|
6
6
|
var _grommet = require("grommet");
|
|
7
7
|
var _data = require("../../DataTable/stories/data");
|
|
8
|
-
function _interopRequireDefault(
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
9
|
// simplify option label for name property
|
|
10
10
|
var options = _data.columns.map(function (_ref, i) {
|
|
11
11
|
var header = _ref.header,
|
|
@@ -5,7 +5,7 @@ exports["default"] = exports.Simple = void 0;
|
|
|
5
5
|
var _react = _interopRequireDefault(require("react"));
|
|
6
6
|
var _grommet = require("grommet");
|
|
7
7
|
var _data = require("../../DataTable/stories/data");
|
|
8
|
-
function _interopRequireDefault(
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
9
|
// simplify option label for name property
|
|
10
10
|
var options = _data.columns.map(function (_ref) {
|
|
11
11
|
var header = _ref.header,
|
|
@@ -13,8 +13,8 @@ var _propTypes = require("./propTypes");
|
|
|
13
13
|
var _excluded = ["id", "options"];
|
|
14
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
15
15
|
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; }
|
|
16
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
17
|
-
function _objectWithoutPropertiesLoose(
|
|
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); }
|
|
17
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
18
18
|
var DataTableGroupBy = exports.DataTableGroupBy = function DataTableGroupBy(_ref) {
|
|
19
19
|
var idProp = _ref.id,
|
|
20
20
|
options = _ref.options,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.DataTableGroupByPropTypes = void 0;
|
|
5
5
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
6
|
-
function _interopRequireDefault(
|
|
6
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
7
7
|
var PropType = {};
|
|
8
8
|
if (process.env.NODE_ENV !== 'production') {
|
|
9
9
|
PropType = {
|
|
@@ -5,7 +5,7 @@ exports["default"] = exports.Simple = void 0;
|
|
|
5
5
|
var _react = _interopRequireDefault(require("react"));
|
|
6
6
|
var _grommet = require("grommet");
|
|
7
7
|
var _data = require("../../DataTable/stories/data");
|
|
8
|
-
function _interopRequireDefault(
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
9
|
// simplify option label for name property
|
|
10
10
|
var options = _data.columns.filter(function (_ref) {
|
|
11
11
|
var property = _ref.property;
|
|
@@ -14,8 +14,8 @@ var _propTypes = require("./propTypes");
|
|
|
14
14
|
var _excluded = ["id"];
|
|
15
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
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; }
|
|
17
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
18
|
-
function _objectWithoutPropertiesLoose(
|
|
17
|
+
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
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
19
19
|
var DataView = exports.DataView = function DataView(_ref) {
|
|
20
20
|
var idProp = _ref.id,
|
|
21
21
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
@@ -5,7 +5,7 @@ exports["default"] = exports.Simple = void 0;
|
|
|
5
5
|
var _react = _interopRequireDefault(require("react"));
|
|
6
6
|
var _grommet = require("grommet");
|
|
7
7
|
var _data = require("../../DataTable/stories/data");
|
|
8
|
-
function _interopRequireDefault(
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
9
|
var Simple = exports.Simple = function Simple() {
|
|
10
10
|
return (
|
|
11
11
|
/*#__PURE__*/
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.DateInput = void 0;
|
|
5
5
|
var _react = _interopRequireWildcard(require("react"));
|
|
6
|
-
var _styledComponents =
|
|
6
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
7
7
|
var _Calendar = require("grommet-icons/icons/Calendar");
|
|
8
|
-
var _defaultProps = require("../../default-props");
|
|
9
8
|
var _AnnounceContext = require("../../contexts/AnnounceContext");
|
|
10
9
|
var _MessageContext = require("../../contexts/MessageContext");
|
|
11
10
|
var _Box = require("../Box");
|
|
@@ -22,13 +21,16 @@ var _utils2 = require("./utils");
|
|
|
22
21
|
var _propTypes = require("./propTypes");
|
|
23
22
|
var _Calendar3 = require("../Calendar/Calendar");
|
|
24
23
|
var _CopyButton = require("../TextInput/CopyButton");
|
|
24
|
+
var _useThemeValue = require("../../utils/useThemeValue");
|
|
25
|
+
var _defaultProps = require("../../default-props");
|
|
25
26
|
var _excluded = ["buttonProps", "calendarProps", "defaultValue", "disabled", "dropProps", "format", "id", "icon", "inline", "inputProps", "name", "onChange", "onFocus", "plain", "readOnly", "readOnlyCopy", "reverse", "value", "messages"],
|
|
26
27
|
_excluded2 = ["icon"];
|
|
28
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
27
29
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
28
30
|
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; }
|
|
29
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
30
|
-
function _objectWithoutPropertiesLoose(
|
|
31
|
-
var StyledDateInputContainer = (0, _styledComponents["default"])(_Box.Box).withConfig({
|
|
31
|
+
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); }
|
|
32
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
33
|
+
var StyledDateInputContainer = (0, _styledComponents["default"])(_Box.Box).attrs(_defaultProps.withTheme).withConfig({
|
|
32
34
|
displayName: "DateInput__StyledDateInputContainer",
|
|
33
35
|
componentId: "sc-1jfta23-0"
|
|
34
36
|
})(["", "};"], function (props) {
|
|
@@ -71,7 +73,7 @@ var DateInput = exports.DateInput = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
71
73
|
valueArg = _ref.value,
|
|
72
74
|
messages = _ref.messages,
|
|
73
75
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
74
|
-
var theme = (0,
|
|
76
|
+
var theme = (0, _useThemeValue.useThemeValue)();
|
|
75
77
|
var announce = (0, _react.useContext)(_AnnounceContext.AnnounceContext);
|
|
76
78
|
var _useContext = (0, _react.useContext)(_MessageContext.MessageContext),
|
|
77
79
|
formatMessage = _useContext.format;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.DateInputPropTypes = void 0;
|
|
5
5
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
6
|
-
function _interopRequireDefault(
|
|
6
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
7
7
|
var PropType = {};
|
|
8
8
|
if (process.env.NODE_ENV !== 'production') {
|
|
9
9
|
PropType = {
|
|
@@ -4,7 +4,7 @@ exports.__esModule = true;
|
|
|
4
4
|
exports["default"] = exports.DateForm = void 0;
|
|
5
5
|
var _react = _interopRequireDefault(require("react"));
|
|
6
6
|
var _grommet = require("grommet");
|
|
7
|
-
function _interopRequireDefault(
|
|
7
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
8
8
|
var DateForm = exports.DateForm = function DateForm() {
|
|
9
9
|
var _React$useState = _react["default"].useState({
|
|
10
10
|
value: ''
|
|
@@ -4,7 +4,7 @@ exports.__esModule = true;
|
|
|
4
4
|
exports["default"] = exports.Format = void 0;
|
|
5
5
|
var _react = _interopRequireDefault(require("react"));
|
|
6
6
|
var _grommet = require("grommet");
|
|
7
|
-
function _interopRequireDefault(
|
|
7
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
8
8
|
var Format = exports.Format = function Format() {
|
|
9
9
|
var _React$useState = _react["default"].useState(''),
|
|
10
10
|
value = _React$useState[0],
|
|
@@ -4,7 +4,7 @@ exports.__esModule = true;
|
|
|
4
4
|
exports["default"] = exports.Inline = void 0;
|
|
5
5
|
var _react = _interopRequireDefault(require("react"));
|
|
6
6
|
var _grommet = require("grommet");
|
|
7
|
-
function _interopRequireDefault(
|
|
7
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
8
8
|
var Inline = exports.Inline = function Inline() {
|
|
9
9
|
var _React$useState = _react["default"].useState(''),
|
|
10
10
|
value = _React$useState[0],
|
|
@@ -4,7 +4,7 @@ exports.__esModule = true;
|
|
|
4
4
|
exports["default"] = exports.Range = void 0;
|
|
5
5
|
var _react = _interopRequireDefault(require("react"));
|
|
6
6
|
var _grommet = require("grommet");
|
|
7
|
-
function _interopRequireDefault(
|
|
7
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
8
8
|
var dateFormat = new Intl.DateTimeFormat(undefined, {
|
|
9
9
|
month: 'short',
|
|
10
10
|
day: 'numeric'
|
|
@@ -4,7 +4,7 @@ exports.__esModule = true;
|
|
|
4
4
|
exports["default"] = exports.RangeFormat = void 0;
|
|
5
5
|
var _react = _interopRequireDefault(require("react"));
|
|
6
6
|
var _grommet = require("grommet");
|
|
7
|
-
function _interopRequireDefault(
|
|
7
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
8
8
|
var RangeFormat = exports.RangeFormat = function RangeFormat() {
|
|
9
9
|
var _React$useState = _react["default"].useState(['2020-07-31T15:24:26.256Z', '2020-08-07T15:24:26.256Z']),
|
|
10
10
|
value = _React$useState[0],
|
|
@@ -4,7 +4,7 @@ exports.__esModule = true;
|
|
|
4
4
|
exports["default"] = exports.ReadOnly = void 0;
|
|
5
5
|
var _react = _interopRequireDefault(require("react"));
|
|
6
6
|
var _grommet = require("grommet");
|
|
7
|
-
function _interopRequireDefault(
|
|
7
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
8
8
|
var ReadOnly = exports.ReadOnly = function ReadOnly() {
|
|
9
9
|
return (
|
|
10
10
|
/*#__PURE__*/
|
|
@@ -5,7 +5,7 @@ exports["default"] = exports.ResetDateWithString = exports.ResetDateWithArray =
|
|
|
5
5
|
var _react = _interopRequireDefault(require("react"));
|
|
6
6
|
var _grommet = require("grommet");
|
|
7
7
|
var _Button = require("../../Button");
|
|
8
|
-
function _interopRequireDefault(
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
9
|
var DATE = '2020-07-02T00:00:00-08:00';
|
|
10
10
|
var DATES = ['2020-07-02T00:00:00-08:00', '2020-07-07T00:00:00-08:00'];
|
|
11
11
|
var ResetDateWithString = exports.ResetDateWithString = function ResetDateWithString() {
|
|
@@ -4,7 +4,7 @@ exports.__esModule = true;
|
|
|
4
4
|
exports["default"] = exports.Simple = void 0;
|
|
5
5
|
var _react = _interopRequireDefault(require("react"));
|
|
6
6
|
var _grommet = require("grommet");
|
|
7
|
-
function _interopRequireDefault(
|
|
7
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
8
8
|
var Simple = exports.Simple = function Simple() {
|
|
9
9
|
var _React$useState = _react["default"].useState(''),
|
|
10
10
|
value = _React$useState[0],
|
|
@@ -5,9 +5,9 @@ exports.valuesAreEqual = exports.valueToText = exports.validateBounds = exports.
|
|
|
5
5
|
var _utils = require("../../utils");
|
|
6
6
|
var _utils2 = require("../Calendar/utils");
|
|
7
7
|
function _construct(t, e, r) { if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); var o = [null]; o.push.apply(o, e); var p = new (t.bind.apply(t, o))(); return r && _setPrototypeOf(p, r.prototype), p; }
|
|
8
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
8
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
|
-
function
|
|
10
|
-
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); }
|
|
10
|
+
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); }
|
|
11
11
|
// Converting between Date and String types is handled via a "schema".
|
|
12
12
|
// The schema is an array of strings, split into strings with identical
|
|
13
13
|
// characters. So, 'mm/dd/yyyy' will be ['mm', '/', 'dd', '/', 'yyyyy'].
|
|
@@ -3,17 +3,16 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.Diagram = void 0;
|
|
5
5
|
var _react = _interopRequireWildcard(require("react"));
|
|
6
|
-
var _styledComponents = require("styled-components");
|
|
7
|
-
var _defaultProps = require("../../default-props");
|
|
8
6
|
var _utils = require("../../utils");
|
|
9
7
|
var _StyledDiagram = require("./StyledDiagram");
|
|
10
8
|
var _propTypes = require("./propTypes");
|
|
9
|
+
var _useThemeValue = require("../../utils/useThemeValue");
|
|
11
10
|
var _excluded = ["connections"],
|
|
12
11
|
_excluded2 = ["anchor", "animation", "color", "offset", "round", "thickness", "type"];
|
|
13
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
14
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; }
|
|
15
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
16
|
-
function _objectWithoutPropertiesLoose(
|
|
14
|
+
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
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
17
16
|
var computeMidPoint = function computeMidPoint(fromPoint, toPoint) {
|
|
18
17
|
return [fromPoint[0] > toPoint[0] ? toPoint[0] + (fromPoint[0] - toPoint[0]) / 2 : fromPoint[0] + (toPoint[0] - fromPoint[0]) / 2, fromPoint[1] > toPoint[1] ? toPoint[1] + (fromPoint[1] - toPoint[1]) / 2 : fromPoint[1] + (toPoint[1] - fromPoint[1]) / 2];
|
|
19
18
|
};
|
|
@@ -50,10 +49,12 @@ var findTarget = function findTarget(target) {
|
|
|
50
49
|
}
|
|
51
50
|
return target;
|
|
52
51
|
};
|
|
52
|
+
var defaultConnections = [];
|
|
53
53
|
var Diagram = exports.Diagram = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
54
|
-
var connections = _ref.connections,
|
|
54
|
+
var _ref$connections = _ref.connections,
|
|
55
|
+
connections = _ref$connections === void 0 ? defaultConnections : _ref$connections,
|
|
55
56
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
56
|
-
var theme = (0,
|
|
57
|
+
var theme = (0, _useThemeValue.useThemeValue)();
|
|
57
58
|
var _useState = (0, _react.useState)({
|
|
58
59
|
width: 0,
|
|
59
60
|
height: 0
|
|
@@ -207,7 +208,4 @@ var Diagram = exports.Diagram = /*#__PURE__*/(0, _react.forwardRef)(function (_r
|
|
|
207
208
|
}, rest), /*#__PURE__*/_react["default"].createElement("g", null, paths));
|
|
208
209
|
});
|
|
209
210
|
Diagram.displayName = 'Diagram';
|
|
210
|
-
Diagram.defaultProps = {
|
|
211
|
-
connections: []
|
|
212
|
-
};
|
|
213
211
|
Diagram.propTypes = _propTypes.DiagramPropTypes;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.StyledDiagram = void 0;
|
|
5
5
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
6
|
-
var _defaultProps = require("../../default-props");
|
|
7
6
|
var _animation = require("../../utils/animation");
|
|
8
7
|
var _styles = require("../../utils/styles");
|
|
8
|
+
var _defaultProps = require("../../default-props");
|
|
9
9
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
10
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; }
|
|
11
11
|
var animationItemStyle = function animationItemStyle(animationType, theme) {
|
|
@@ -44,7 +44,7 @@ var connectionStyle = function connectionStyle(connection, index, theme) {
|
|
|
44
44
|
return (0, _styledComponents.css)(["path:nth-child(", "){stroke-dasharray:", ";stroke-dashoffset:", ";animation:", ";}"], index + 1, animationType === 'draw' || animationType === true ? 500 : 0, animationType === 'draw' || animationType === true ? 500 : 0, animationItemStyle(connection.props.animation, theme));
|
|
45
45
|
};
|
|
46
46
|
var availableAnimations = [true, 'draw', 'pulse'];
|
|
47
|
-
var StyledDiagram = exports.StyledDiagram = _styledComponents["default"].svg.withConfig(_styles.styledComponentsConfig).withConfig({
|
|
47
|
+
var StyledDiagram = exports.StyledDiagram = _styledComponents["default"].svg.withConfig(_styles.styledComponentsConfig).attrs(_defaultProps.withTheme).withConfig({
|
|
48
48
|
displayName: "StyledDiagram",
|
|
49
49
|
componentId: "sc-1vzeu9f-0"
|
|
50
50
|
})(["max-width:100%;width:100%;height:100%;", " ", " ", ""], function (props) {
|
|
@@ -66,6 +66,4 @@ var StyledDiagram = exports.StyledDiagram = _styledComponents["default"].svg.wit
|
|
|
66
66
|
return props.animation && (availableAnimations.includes(props.animation.type || props.animation) || Object.keys(props.animation).length !== 0) ? animationStyle(props) : '';
|
|
67
67
|
}, function (props) {
|
|
68
68
|
return props.theme.diagram && props.theme.diagram.extend;
|
|
69
|
-
});
|
|
70
|
-
StyledDiagram.defaultProps = {};
|
|
71
|
-
Object.setPrototypeOf(StyledDiagram.defaultProps, _defaultProps.defaultProps);
|
|
69
|
+
});
|
|
@@ -4,7 +4,7 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.DiagramPropTypes = void 0;
|
|
5
5
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
6
6
|
var _generalPropTypes = require("../../utils/general-prop-types");
|
|
7
|
-
function _interopRequireDefault(
|
|
7
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
8
8
|
var animationPropType = _propTypes["default"].oneOfType([_propTypes["default"].bool, _propTypes["default"].oneOf(['pulse', 'draw']), _propTypes["default"].shape({
|
|
9
9
|
type: _propTypes["default"].oneOf(['pulse', 'draw']),
|
|
10
10
|
delay: _propTypes["default"].oneOfType([_propTypes["default"].number, _propTypes["default"].string]),
|
|
@@ -26,7 +26,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
26
26
|
thickness: _propTypes["default"].oneOfType([_propTypes["default"].oneOf(['hair', 'xxsmall', 'xsmall', 'small', 'medium', 'large']), _propTypes["default"].string]),
|
|
27
27
|
toTarget: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].object]).isRequired,
|
|
28
28
|
type: _propTypes["default"].oneOf(['direct', 'curved', 'rectilinear'])
|
|
29
|
-
}))
|
|
29
|
+
}))
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
var DiagramPropTypes = exports.DiagramPropTypes = PropType;
|
|
@@ -8,8 +8,8 @@ var _grommetIcons = require("grommet-icons");
|
|
|
8
8
|
var _data = require("./data");
|
|
9
9
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
10
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; }
|
|
11
|
-
function _objectDestructuringEmpty(
|
|
12
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
11
|
+
function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
|
|
12
|
+
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); }
|
|
13
13
|
var connection = function connection(fromTarget, toTarget, _temp) {
|
|
14
14
|
var _ref = _temp === void 0 ? {} : _temp,
|
|
15
15
|
rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
@@ -8,8 +8,8 @@ var _excluded = ["id"],
|
|
|
8
8
|
_excluded2 = ["color"];
|
|
9
9
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
10
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; }
|
|
11
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
12
|
-
function _objectWithoutPropertiesLoose(
|
|
11
|
+
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); }
|
|
12
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
13
13
|
var Node = function Node(_ref) {
|
|
14
14
|
var id = _ref.id,
|
|
15
15
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
@@ -8,9 +8,9 @@ var _Box = require("../Box");
|
|
|
8
8
|
var _Text = require("../Text");
|
|
9
9
|
var _propTypes2 = require("./propTypes");
|
|
10
10
|
var _excluded = ["basis", "children", "direction", "fill", "gap", "values"];
|
|
11
|
-
function _interopRequireDefault(
|
|
12
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
13
|
-
function _objectWithoutPropertiesLoose(
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
|
+
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); }
|
|
13
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
14
14
|
var Value = function Value(_ref) {
|
|
15
15
|
var basis = _ref.basis,
|
|
16
16
|
children = _ref.children;
|
|
@@ -24,13 +24,24 @@ Value.propTypes = {
|
|
|
24
24
|
basis: _propTypes["default"].string.isRequired,
|
|
25
25
|
children: _propTypes["default"].node.isRequired
|
|
26
26
|
};
|
|
27
|
-
var
|
|
27
|
+
var defaultChildrenPropValue = function defaultChildrenPropValue(value) {
|
|
28
|
+
return /*#__PURE__*/_react["default"].createElement(_Box.Box, {
|
|
29
|
+
fill: true,
|
|
30
|
+
border: true
|
|
31
|
+
}, /*#__PURE__*/_react["default"].createElement(_Text.Text, null, value.value));
|
|
32
|
+
};
|
|
33
|
+
var defaultValues = [];
|
|
34
|
+
var _Distribution = exports.Distribution = function Distribution(_ref2) {
|
|
28
35
|
var basis = _ref2.basis,
|
|
29
|
-
children = _ref2.children,
|
|
30
|
-
|
|
36
|
+
_ref2$children = _ref2.children,
|
|
37
|
+
children = _ref2$children === void 0 ? defaultChildrenPropValue : _ref2$children,
|
|
38
|
+
_ref2$direction = _ref2.direction,
|
|
39
|
+
direction = _ref2$direction === void 0 ? 'row' : _ref2$direction,
|
|
31
40
|
fill = _ref2.fill,
|
|
32
|
-
gap = _ref2.gap,
|
|
33
|
-
|
|
41
|
+
_ref2$gap = _ref2.gap,
|
|
42
|
+
gap = _ref2$gap === void 0 ? 'xsmall' : _ref2$gap,
|
|
43
|
+
_ref2$values = _ref2.values,
|
|
44
|
+
values = _ref2$values === void 0 ? defaultValues : _ref2$values,
|
|
34
45
|
rest = _objectWithoutPropertiesLoose(_ref2, _excluded);
|
|
35
46
|
if (values.length === 1) {
|
|
36
47
|
var value = values[0];
|
|
@@ -86,12 +97,12 @@ var Distribution = exports.Distribution = function Distribution(_ref2) {
|
|
|
86
97
|
overflow: "hidden",
|
|
87
98
|
gap: gap,
|
|
88
99
|
fill: fill
|
|
89
|
-
}, rest), /*#__PURE__*/_react["default"].createElement(
|
|
100
|
+
}, rest), /*#__PURE__*/_react["default"].createElement(_Distribution, {
|
|
90
101
|
values: values.slice(0, subIndex),
|
|
91
102
|
basis: childBasis[0],
|
|
92
103
|
direction: direction === 'row' ? 'column' : 'row',
|
|
93
104
|
gap: gap
|
|
94
|
-
}, children), /*#__PURE__*/_react["default"].createElement(
|
|
105
|
+
}, children), /*#__PURE__*/_react["default"].createElement(_Distribution, {
|
|
95
106
|
values: values.slice(subIndex),
|
|
96
107
|
basis: childBasis[1],
|
|
97
108
|
direction: direction === 'row' ? 'column' : 'row',
|
|
@@ -100,16 +111,4 @@ var Distribution = exports.Distribution = function Distribution(_ref2) {
|
|
|
100
111
|
}
|
|
101
112
|
return null;
|
|
102
113
|
};
|
|
103
|
-
|
|
104
|
-
basis: undefined,
|
|
105
|
-
children: function children(value) {
|
|
106
|
-
return /*#__PURE__*/_react["default"].createElement(_Box.Box, {
|
|
107
|
-
fill: true,
|
|
108
|
-
border: true
|
|
109
|
-
}, /*#__PURE__*/_react["default"].createElement(_Text.Text, null, value.value));
|
|
110
|
-
},
|
|
111
|
-
direction: 'row',
|
|
112
|
-
gap: 'xsmall',
|
|
113
|
-
values: []
|
|
114
|
-
};
|
|
115
|
-
Distribution.propTypes = _propTypes2.DistributionPropTypes;
|
|
114
|
+
_Distribution.propTypes = _propTypes2.DistributionPropTypes;
|
|
@@ -4,8 +4,8 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.DistributionPropTypes = void 0;
|
|
5
5
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
6
6
|
var _generalPropTypes = require("../../utils/general-prop-types");
|
|
7
|
-
function _interopRequireDefault(
|
|
8
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
7
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
8
|
+
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); }
|
|
9
9
|
var PropType = {};
|
|
10
10
|
if (process.env.NODE_ENV !== 'production') {
|
|
11
11
|
PropType = _extends({}, _generalPropTypes.genericProps, {
|
|
@@ -15,7 +15,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
15
15
|
gap: _propTypes["default"].oneOfType([_propTypes["default"].oneOf(['none', 'xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge']), _propTypes["default"].string]),
|
|
16
16
|
values: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
|
17
17
|
value: _propTypes["default"].number
|
|
18
|
-
}))
|
|
18
|
+
}))
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
var DistributionPropTypes = exports.DistributionPropTypes = PropType;
|
package/components/Drop/Drop.js
CHANGED
|
@@ -4,17 +4,16 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.Drop = void 0;
|
|
5
5
|
var _react = _interopRequireWildcard(require("react"));
|
|
6
6
|
var _reactDom = require("react-dom");
|
|
7
|
-
var _styledComponents = require("styled-components");
|
|
8
|
-
var _defaultProps = require("../../default-props");
|
|
9
7
|
var _utils = require("../../utils");
|
|
10
8
|
var _DropContainer = require("./DropContainer");
|
|
11
9
|
var _ContainerTargetContext = require("../../contexts/ContainerTargetContext");
|
|
12
10
|
var _propTypes = require("./propTypes");
|
|
11
|
+
var _useThemeValue = require("../../utils/useThemeValue");
|
|
13
12
|
var _excluded = ["inline", "restrictFocus", "target", "trapFocus"];
|
|
14
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
15
14
|
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; }
|
|
16
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
17
|
-
function _objectWithoutPropertiesLoose(
|
|
15
|
+
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); }
|
|
16
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
18
17
|
var Drop = exports.Drop = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
19
18
|
var inline = _ref.inline,
|
|
20
19
|
restrictFocus = _ref.restrictFocus,
|
|
@@ -22,7 +21,7 @@ var Drop = exports.Drop = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
|
|
|
22
21
|
_ref$trapFocus = _ref.trapFocus,
|
|
23
22
|
trapFocus = _ref$trapFocus === void 0 ? true : _ref$trapFocus,
|
|
24
23
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
25
|
-
var theme = (0,
|
|
24
|
+
var theme = (0, _useThemeValue.useThemeValue)();
|
|
26
25
|
var _useState = (0, _react.useState)(),
|
|
27
26
|
originalFocusedElement = _useState[0],
|
|
28
27
|
setOriginalFocusedElement = _useState[1];
|