grommet 2.57.0 → 2.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all/stories/AllComponents.stories.js +2 -1
- package/components/Accordion/Accordion.js +2 -1
- package/components/Accordion/stories/CustomHeader.stories.js +2 -1
- package/components/AccordionPanel/AccordionPanel.js +2 -1
- package/components/Anchor/Anchor.js +2 -1
- package/components/Anchor/StyledAnchor.js +2 -1
- package/components/Avatar/Avatar.js +2 -1
- package/components/Box/Box.js +2 -1
- package/components/Box/ResponsiveContainerProvider.js +2 -1
- package/components/Box/StyledBox.js +3 -2
- package/components/Box/stories/ColorContrast.stories.js +36 -0
- package/components/Box/stories/ResponsiveContainer.stories.js +2 -1
- package/components/Button/Badge.js +2 -1
- package/components/Button/BusyAnimation.js +9 -2
- package/components/Button/Button.js +14 -4
- package/components/Button/StyledButton.js +2 -1
- package/components/Button/StyledButtonKind.js +2 -1
- package/components/Button/stories/Busy.stories.js +2 -1
- package/components/Calendar/Calendar.js +2 -1
- package/components/Calendar/StyledCalendar.js +2 -1
- package/components/Calendar/stories/ActiveDate.stories.js +2 -1
- package/components/Calendar/stories/CustomDay.stories.js +2 -1
- package/components/Calendar/stories/CustomHeader.stories.js +2 -1
- package/components/Calendar/stories/CustomThemed/CustomSizeHeading.stories.js +2 -1
- package/components/Calendar/stories/Dual.stories.js +2 -1
- package/components/Calendar/stories/HeaderLevel.stories.js +2 -1
- package/components/Calendar/stories/Multiple.stories.js +2 -1
- package/components/Calendar/stories/ShowAdjacentDays.stories.js +2 -1
- package/components/Calendar/stories/Simple.stories.js +2 -1
- package/components/Card/Card.js +2 -1
- package/components/Cards/Cards.js +2 -1
- package/components/Cards/index.d.ts +2 -16
- package/components/Carousel/Carousel.js +2 -1
- package/components/Carousel/CarouselChild.js +2 -1
- package/components/Carousel/StyledCarousel.js +2 -1
- package/components/Chart/Chart.js +2 -1
- package/components/Chart/StyledChart.js +2 -1
- package/components/Chart/stories/Rich.stories.js +2 -1
- package/components/Chart/stories/Scan.stories.js +2 -1
- package/components/Chart/stories/Window.stories.js +2 -1
- package/components/Chart/stories/Zoom.stories.js +2 -1
- package/components/CheckBox/CheckBox.js +2 -1
- package/components/CheckBox/README.md +95 -0
- package/components/CheckBox/StyledCheckBox.js +104 -16
- package/components/CheckBox/stories/CustomThemed/Appearance.stories.tsx +160 -0
- package/components/CheckBox/stories/CustomThemed/Custom.stories.js +2 -1
- package/components/CheckBox/stories/CustomThemed/CustomToggle.stories.js +2 -1
- package/components/CheckBox/stories/Indeterminate.stories.js +2 -1
- package/components/CheckBox/stories/NoLabel.stories.js +2 -1
- package/components/CheckBox/stories/Simple.stories.js +2 -1
- package/components/CheckBox/stories/WithStickyDiv.stories.js +2 -1
- package/components/CheckBoxGroup/CheckBoxGroup.js +2 -1
- package/components/CheckBoxGroup/stories/Children.stories.js +2 -1
- package/components/CheckBoxGroup/stories/InitialValues.stories.js +2 -1
- package/components/Clock/Analog.js +2 -1
- package/components/Clock/Clock.js +2 -1
- package/components/Clock/Digital.js +2 -1
- package/components/Clock/StyledClock.js +2 -1
- package/components/Collapsible/Collapsible.js +2 -1
- package/components/Data/Data.js +2 -1
- package/components/Data/DataForm.js +2 -1
- package/components/Data/stories/Infinite.stories.js +2 -1
- package/components/Data/stories/Inline.stories.js +2 -1
- package/components/Data/stories/OnSelect.stories.js +2 -1
- package/components/Data/stories/SpaceX.stories.js +2 -1
- package/components/Data/stories/StarWars.stories.js +2 -1
- package/components/DataChart/DataChart.js +2 -1
- package/components/DataChart/Detail.js +2 -1
- package/components/DataChart/Legend.js +2 -1
- package/components/DataChart/XAxis.js +2 -1
- package/components/DataChart/XGuide.js +2 -1
- package/components/DataChart/YAxis.js +2 -1
- package/components/DataChart/YGuide.js +2 -1
- package/components/DataChart/stories/Prediction.stories.js +2 -1
- package/components/DataClearFilters/DataClearFilters.js +2 -1
- package/components/DataClearFilters/stories/Simple.stories.js +2 -1
- package/components/DataFilter/DataFilter.js +2 -1
- package/components/DataFilters/DataFilters.js +2 -1
- package/components/DataSearch/DataSearch.js +2 -1
- package/components/DataSort/DataSort.js +2 -1
- package/components/DataSummary/DataSummary.js +2 -1
- package/components/DataTable/Body.js +2 -1
- package/components/DataTable/Cell.js +2 -1
- package/components/DataTable/DataTable.js +2 -1
- package/components/DataTable/ExpanderCell.js +2 -1
- package/components/DataTable/Footer.js +2 -1
- package/components/DataTable/GroupedBody.js +2 -1
- package/components/DataTable/Header.js +2 -1
- package/components/DataTable/PlaceholderBody.js +2 -1
- package/components/DataTable/Resizer.js +2 -1
- package/components/DataTable/Searcher.js +2 -1
- package/components/DataTable/StyledDataTable.js +3 -2
- package/components/DataTable/stories/ControlledGrouped.stories.js +2 -1
- package/components/DataTable/stories/OnUpdate.stories.js +2 -1
- package/components/DataTable/stories/SpaceX.stories.js +2 -1
- package/components/DataTable/stories/SpaceXUngrouped.stories.js +2 -1
- package/components/DataTable/stories/rowDetails.stories.js +2 -1
- package/components/DataTableColumns/DataTableColumns.js +2 -1
- package/components/DataTableGroupBy/DataTableGroupBy.js +2 -1
- package/components/DataView/DataView.js +2 -1
- package/components/DateInput/DateInput.js +14 -7
- package/components/DateInput/stories/FormatInline.stories.js +2 -1
- package/components/DateTimeInput/DateTimeInput.js +21 -12
- package/components/DateTimeInput/StyledDateTimeInput.js +11 -2
- package/components/Diagram/Diagram.js +2 -1
- package/components/Diagram/StyledDiagram.js +2 -1
- package/components/Diagram/stories/Animated.stories.js +2 -1
- package/components/Diagram/stories/Progressing.stories.js +2 -1
- package/components/Drop/Drop.js +2 -1
- package/components/Drop/DropContainer.js +2 -1
- package/components/Drop/StyledDrop.js +2 -1
- package/components/Drop/stories/CustomThemed/Lazy.stories.js +2 -1
- package/components/Drop/stories/CustomThemed/Themed.stories.js +2 -1
- package/components/Drop/stories/Inline.stories.js +2 -1
- package/components/Drop/stories/Meter.stories.js +2 -1
- package/components/Drop/stories/Multiple.stories.js +2 -1
- package/components/Drop/stories/Overflow.stories.js +2 -1
- package/components/Drop/stories/Plain.stories.js +2 -1
- package/components/Drop/stories/Progressive.stories.js +2 -1
- package/components/Drop/stories/Simple.stories.js +2 -1
- package/components/Drop/stories/Styled.stories.js +2 -1
- package/components/DropButton/DropButton.js +2 -1
- package/components/FileInput/FileInput.js +78 -21
- package/components/FileInput/README.md +5 -0
- package/components/FocusedContainer.js +4 -2
- package/components/Form/Form.js +2 -1
- package/components/Form/FormContext.js +2 -1
- package/components/Form/stories/ArrayOfFormFields.stories.js +2 -1
- package/components/Form/stories/Controlled.stories.js +2 -1
- package/components/Form/stories/ControlledInput.stories.js +2 -1
- package/components/Form/stories/ControlledInputLazy.stories.js +2 -1
- package/components/Form/stories/ControlledLazy.stories.js +2 -1
- package/components/Form/stories/CustomThemed/FieldBorderPosition.stories.js +2 -1
- package/components/Form/stories/CustomThemed/FieldCustomStates.stories.js +2 -1
- package/components/Form/stories/DynamicFields.stories.js +2 -1
- package/components/Form/stories/FieldStates.stories.js +2 -1
- package/components/Form/stories/SolicitedFeedback.stories.js +2 -1
- package/components/Form/stories/UnsolicitedFeedback.stories.js +2 -1
- package/components/Form/stories/ValidateOnChange.stories.js +2 -1
- package/components/Form/stories/ValidateOnMount.stories.js +2 -1
- package/components/FormField/FormField.js +235 -76
- package/components/FormField/FormFieldContext.js +12 -0
- package/components/FormField/README.md +56 -1
- package/components/FormField/stories/CustomThemed/Appearance.stories.tsx +630 -0
- package/components/FormField/stories/Simple.stories.js +2 -1
- package/components/Grid/Grid.js +2 -1
- package/components/Grid/StyledGrid.js +2 -1
- package/components/Grid/stories/ResponsiveCards.stories.js +2 -1
- package/components/Grommet/Grommet.js +6 -2
- package/components/Grommet/StyledGrommet.js +5 -4
- package/components/Grommet/index.d.ts +10 -0
- package/components/Grommet/propTypes.js +6 -1
- package/components/Header/Header.js +2 -1
- package/components/Header/stories/Sticky.stories.js +2 -1
- package/components/Heading/Heading.js +2 -1
- package/components/Heading/HeadingSkeleton.js +2 -1
- package/components/Heading/StyledHeading.js +2 -1
- package/components/Image/Image.js +2 -1
- package/components/Image/StyledImage.js +2 -1
- package/components/InfiniteScroll/InfiniteScroll.js +2 -1
- package/components/Layer/Layer.js +2 -1
- package/components/Layer/LayerContainer.js +2 -1
- package/components/Layer/StyledLayer.js +2 -1
- package/components/List/List.js +2 -1
- package/components/List/stories/Order.stories.js +2 -1
- package/components/List/stories/Pinned.stories.js +2 -1
- package/components/Markdown/Markdown.js +2 -1
- package/components/MaskedInput/MaskedInput.js +2 -1
- package/components/Menu/Menu.js +3 -2
- package/components/Meter/Bar.js +2 -1
- package/components/Meter/Circle.js +2 -1
- package/components/Meter/Meter.js +2 -1
- package/components/Meter/StyledMeter.js +2 -1
- package/components/Meter/stories/Circle.stories.js +2 -1
- package/components/Meter/stories/VerticalBarMultiple.stories.js +2 -1
- package/components/NameValueList/NameValueList.js +2 -1
- package/components/NameValuePair/NameValuePair.js +2 -1
- package/components/Nav/stories/CustomThemed/JustifySidebar.stories.js +2 -1
- package/components/Nav/stories/Sidebar.stories.js +2 -1
- package/components/Notification/Notification.js +2 -1
- package/components/Notification/stories/Global.stories.js +2 -1
- package/components/Notification/stories/Title.stories.js +2 -1
- package/components/Notification/stories/TitleAndMessage.stories.js +2 -1
- package/components/Page/Page.js +2 -1
- package/components/Page/stories/PageNotificaton.stories.js +2 -1
- package/components/PageContent/PageContent.js +2 -1
- package/components/PageHeader/PageHeader.js +2 -1
- package/components/PageHeader/stories/MultipleActions.stories.js +2 -1
- package/components/Pagination/Pagination.js +2 -1
- package/components/Pagination/PaginationStep.js +2 -1
- package/components/Pagination/PaginationSummary.js +2 -1
- package/components/Pagination/stories/Grid.stories.js +2 -1
- package/components/Paragraph/Paragraph.js +2 -1
- package/components/Paragraph/ParagraphSkeleton.js +2 -1
- package/components/Paragraph/StyledParagraph.js +2 -1
- package/components/RadioButton/README.md +93 -1
- package/components/RadioButton/RadioButton.js +13 -5
- package/components/RadioButton/StyledRadioButton.js +103 -10
- package/components/RadioButton/stories/CustomThemed/Appearance.stories.tsx +190 -0
- package/components/RadioButtonGroup/RadioButtonGroup.js +2 -1
- package/components/RadioButtonGroup/stories/Children.stories.js +2 -1
- package/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.stories.js +2 -1
- package/components/RadioButtonGroup/stories/Disabled.stories.js +2 -1
- package/components/RangeInput/RangeInput.js +2 -1
- package/components/RangeInput/StyledRangeInput.js +2 -1
- package/components/RangeInput/stories/CustomThemed/Bounds.stories.js +2 -1
- package/components/RangeSelector/EdgeControl.js +2 -1
- package/components/RangeSelector/RangeSelector.js +2 -1
- package/components/RangeSelector/index.d.ts +1 -10
- package/components/RangeSelector/stories/Basic.stories.js +2 -1
- package/components/RangeSelector/stories/CustomThemed/Custom.stories.js +2 -1
- package/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.stories.js +2 -1
- package/components/RangeSelector/stories/Label.stories.js +2 -1
- package/components/RangeSelector/stories/Simple.stories.js +2 -1
- package/components/RangeSelector/stories/Step.stories.js +2 -1
- package/components/RangeSelector/stories/Thin.stories.js +2 -1
- package/components/RangeSelector/stories/Vertical.stories.js +2 -1
- package/components/RoutedAnchor/RoutedAnchor.js +2 -1
- package/components/RoutedButton/RoutedButton.js +2 -1
- package/components/Select/DefaultSelectTextInput.js +2 -1
- package/components/Select/Select.js +2 -1
- package/components/Select/SelectContainer.js +4 -3
- package/components/Select/StyledSelect.js +14 -4
- package/components/Select/stories/ChildrenRender.stories.js +2 -1
- package/components/Select/stories/Clear.stories.js +2 -1
- package/components/Select/stories/Controlled.stories.js +2 -1
- package/components/Select/stories/CustomThemed/CustomSearch.stories.js +2 -1
- package/components/Select/stories/Disabled.stories.js +2 -1
- package/components/Select/stories/InsideFormField.stories.js +2 -1
- package/components/Select/stories/Multiple.stories.js +2 -1
- package/components/Select/stories/ObjectOptions.stories.js +2 -1
- package/components/Select/stories/Search.stories.js +2 -1
- package/components/Select/stories/Simple.stories.js +2 -1
- package/components/Select/stories/ValueLabel.stories.js +2 -1
- package/components/Select/stories/components/SearchBorderBox.js +2 -1
- package/components/Select/stories/components/SearchInput.js +2 -1
- package/components/Select/utils.js +2 -1
- package/components/SelectMultiple/SelectMultiple.js +10 -4
- package/components/SelectMultiple/SelectMultipleContainer.js +2 -1
- package/components/SelectMultiple/SelectMultipleValue.js +2 -1
- package/components/SelectMultiple/SelectionSummary.js +2 -1
- package/components/SelectMultiple/stories/CustomMessages.stories.js +2 -1
- package/components/SelectMultiple/stories/Default.stories.js +2 -1
- package/components/SelectMultiple/stories/Disabled.stories.js +2 -1
- package/components/SelectMultiple/stories/FormField.stories.js +2 -1
- package/components/SelectMultiple/stories/Help.stories.js +2 -1
- package/components/SelectMultiple/stories/Limited.stories.js +2 -1
- package/components/SelectMultiple/stories/ObjectOptions.stories.js +2 -1
- package/components/SelectMultiple/stories/ShowSelectedInline.stories.js +2 -1
- package/components/Skeleton/Skeleton.js +2 -1
- package/components/Skeleton/SkeletonContext.js +2 -1
- package/components/Skeleton/stories/CustomThemed/Custom.stories.js +2 -1
- package/components/Skeleton/stories/GridContainer.stories.js +2 -1
- package/components/SkipLink/SkipLink.js +2 -1
- package/components/SkipLinks/SkipLinks.js +2 -1
- package/components/Spinner/Spinner.js +2 -1
- package/components/Spinner/stories/Animation.stories.js +2 -1
- package/components/Spinner/stories/Announced.stories.js +2 -1
- package/components/Stack/Stack.js +2 -1
- package/components/Stack/StyledStack.js +2 -1
- package/components/StarRating/StarRating.js +2 -1
- package/components/Stepper/Stepper.js +138 -101
- package/components/Stepper/StepperContext.js +5 -4
- package/components/Stepper/StepperDescription.js +6 -8
- package/components/Stepper/StepperHelperText.js +13 -15
- package/components/Stepper/StepperIndicator.js +37 -34
- package/components/Stepper/StepperLabel.js +11 -23
- package/components/Stepper/StepperStep.js +139 -82
- package/components/Stepper/StyledStepper.js +168 -115
- package/components/Stepper/index.d.ts +25 -13
- package/components/Stepper/index.js +5 -1
- package/components/Stepper/propTypes.js +3 -0
- package/components/Stepper/stories/Children.stories.tsx +73 -0
- package/components/Stepper/stories/CustomThemed.stories.tsx +301 -0
- package/components/Stepper/stories/CustomThemedHpe.stories.tsx +328 -0
- package/components/Stepper/stories/DisabledSteps.stories.js +2 -1
- package/components/Stepper/stories/ErrorStates.stories.js +2 -1
- package/components/Stepper/stories/HorizontalSteps.stories.js +2 -1
- package/components/Stepper/stories/Interactive.stories.js +2 -1
- package/components/Stepper/stories/KeyboardNavigation.stories.js +2 -1
- package/components/Stepper/stories/NestedSubSteps.stories.js +2 -1
- package/components/Stepper/stories/ThemingLightDark.stories.js +2 -1
- package/components/Stepper/stories/VerticalSteps.stories.js +2 -1
- package/components/Stepper/utils.js +54 -0
- package/components/Tab/StyledTab.js +2 -1
- package/components/Tab/Tab.js +2 -1
- package/components/Table/StyledTable.js +2 -1
- package/components/Table/Table.js +2 -1
- package/components/Table/stories/InfiniteScrollInTable.stories.js +2 -1
- package/components/TableBody/TableBody.js +2 -1
- package/components/TableCell/TableCell.js +2 -1
- package/components/TableFooter/TableFooter.js +2 -1
- package/components/TableHeader/TableHeader.js +2 -1
- package/components/TableRow/TableRow.js +2 -1
- package/components/Tabs/StyledTabs.js +2 -1
- package/components/Tabs/Tabs.js +2 -1
- package/components/Tabs/stories/CustomThemed/States.stories.js +2 -1
- package/components/Tabs/stories/Responsive.stories.js +2 -1
- package/components/Tag/Tag.js +2 -1
- package/components/Text/StyledText.js +2 -1
- package/components/Text/Text.js +2 -1
- package/components/Text/TextSkeleton.js +2 -1
- package/components/TextArea/StyledTextArea.js +5 -2
- package/components/TextArea/TextArea.js +2 -1
- package/components/TextArea/stories/CustomThemed/Themed.stories.js +2 -1
- package/components/TextArea/stories/InsideFormField.stories.js +2 -1
- package/components/TextArea/stories/NonResizable.stories.js +2 -1
- package/components/TextArea/stories/Simple.stories.js +2 -1
- package/components/TextInput/CopyButton.js +24 -6
- package/components/TextInput/README.md +29 -1
- package/components/TextInput/StyledTextInput.js +34 -26
- package/components/TextInput/TextInput.js +165 -41
- package/components/TextInput/index.d.ts +14 -3
- package/components/TextInput/propTypes.js +4 -0
- package/components/TextInput/stories/Clear.stories.tsx +68 -0
- package/components/TextInput/stories/ClearFormField.stories.tsx +45 -0
- package/components/TextInput/stories/Copy.stories.tsx +42 -0
- package/components/TextInput/stories/CopySecret.stories.tsx +44 -0
- package/components/TextInput/stories/InsideFormField.stories.js +2 -1
- package/components/TimeInput/README.md +24 -1
- package/components/TimeInput/StyledTimeInput.js +102 -28
- package/components/TimeInput/TimeInput.js +189 -121
- package/components/TimeInput/TimeInputPopup.js +116 -118
- package/components/TimeInput/index.d.ts +2 -0
- package/components/TimeInput/propTypes.js +2 -0
- package/components/TimeInput/stories/Controlled.stories.tsx +2 -2
- package/components/TimeInput/stories/CustomThemed.stories.tsx +79 -0
- package/components/TimeInput/stories/CustomThemedHpe.stories.tsx +115 -0
- package/components/TimeInput/stories/Form.stories.tsx +1 -0
- package/components/TimeInput/stories/Inline.stories.tsx +28 -0
- package/components/TimeInput/stories/ShowSeconds.stories.tsx +28 -0
- package/components/TimeInput/useSectionedTimeField.js +2 -2
- package/components/TimeInput/utils.js +13 -62
- package/components/Tip/Tip.js +2 -1
- package/components/Tip/stories/HeaderActions.stories.js +2 -1
- package/components/ToggleGroup/ToggleGroup.js +2 -1
- package/components/ToggleGroup/stories/Controlled.stories.js +2 -1
- package/components/Toolbar/Toolbar.js +2 -1
- package/components/Video/StyledVideo.js +2 -1
- package/components/Video/Video.js +2 -1
- package/components/Wizard/Wizard.js +409 -212
- package/components/Wizard/WizardContent.js +63 -36
- package/components/Wizard/WizardContext.js +5 -1
- package/components/Wizard/WizardFooter.js +14 -15
- package/components/Wizard/WizardHeader.js +12 -7
- package/components/Wizard/WizardProgress.js +28 -6
- package/components/Wizard/index.d.ts +35 -4
- package/components/Wizard/propTypes.js +6 -1
- package/components/Wizard/stories/BasicLinear.stories.js +14 -11
- package/components/Wizard/stories/Branching.stories.js +2 -1
- package/components/Wizard/stories/ClickableSteps.stories.js +105 -0
- package/components/Wizard/stories/Composable.stories.js +2 -1
- package/components/Wizard/stories/Controlled.stories.js +2 -1
- package/components/Wizard/stories/ExternalForm.stories.js +115 -0
- package/components/Wizard/stories/LongContent.stories.js +2 -1
- package/components/Wizard/stories/Modal.stories.js +2 -1
- package/components/Wizard/stories/NestedSubSteps.stories.js +2 -1
- package/components/Wizard/stories/NonClosableHeader.stories.js +69 -0
- package/components/Wizard/stories/ProgressiveSubSteps.stories.tsx +209 -0
- package/components/Wizard/stories/Validation.stories.js +20 -9
- package/components/WorldMap/WorldMap.js +2 -1
- package/contexts/AnalyticsContext/AnalyticsContext.js +2 -1
- package/contexts/AnnounceContext/stories/Polite.stories.js +2 -1
- package/contexts/RootsContext.js +2 -1
- package/contexts/ThemeContext/stories/ThemeContextExtend.stories.js +2 -1
- package/es6/components/Box/StyledBox.js +1 -1
- package/es6/components/Box/stories/ColorContrast.stories.js +31 -0
- package/es6/components/Button/BusyAnimation.js +7 -1
- package/es6/components/Button/Button.js +12 -3
- package/es6/components/Cards/index.d.ts +2 -16
- package/es6/components/CheckBox/README.md +95 -0
- package/es6/components/CheckBox/StyledCheckBox.js +103 -14
- package/es6/components/CheckBox/stories/CustomThemed/Appearance.stories.tsx +160 -0
- package/es6/components/DataTable/StyledDataTable.js +2 -2
- package/es6/components/DateInput/DateInput.js +13 -6
- package/es6/components/DateTimeInput/DateTimeInput.js +19 -11
- package/es6/components/DateTimeInput/StyledDateTimeInput.js +10 -2
- package/es6/components/FileInput/FileInput.js +77 -20
- package/es6/components/FileInput/README.md +5 -0
- package/es6/components/FocusedContainer.js +2 -1
- package/es6/components/FormField/FormField.js +231 -73
- package/es6/components/FormField/FormFieldContext.js +7 -0
- package/es6/components/FormField/README.md +56 -1
- package/es6/components/FormField/stories/CustomThemed/Appearance.stories.tsx +630 -0
- package/es6/components/Grommet/Grommet.js +4 -1
- package/es6/components/Grommet/StyledGrommet.js +4 -4
- package/es6/components/Grommet/index.d.ts +10 -0
- package/es6/components/Grommet/propTypes.js +6 -1
- package/es6/components/Menu/Menu.js +1 -1
- package/es6/components/RadioButton/README.md +93 -1
- package/es6/components/RadioButton/RadioButton.js +11 -4
- package/es6/components/RadioButton/StyledRadioButton.js +102 -8
- package/es6/components/RadioButton/stories/CustomThemed/Appearance.stories.tsx +190 -0
- package/es6/components/RangeSelector/index.d.ts +1 -10
- package/es6/components/Select/SelectContainer.js +2 -2
- package/es6/components/Select/StyledSelect.js +13 -4
- package/es6/components/SelectMultiple/SelectMultiple.js +9 -3
- package/es6/components/Stepper/Stepper.js +137 -101
- package/es6/components/Stepper/StepperContext.js +5 -4
- package/es6/components/Stepper/StepperDescription.js +6 -8
- package/es6/components/Stepper/StepperHelperText.js +13 -15
- package/es6/components/Stepper/StepperIndicator.js +38 -35
- package/es6/components/Stepper/StepperLabel.js +11 -23
- package/es6/components/Stepper/StepperStep.js +137 -81
- package/es6/components/Stepper/StyledStepper.js +167 -113
- package/es6/components/Stepper/index.d.ts +25 -13
- package/es6/components/Stepper/index.js +2 -1
- package/es6/components/Stepper/propTypes.js +3 -0
- package/es6/components/Stepper/stories/Children.stories.tsx +73 -0
- package/es6/components/Stepper/stories/CustomThemed.stories.tsx +301 -0
- package/es6/components/Stepper/stories/CustomThemedHpe.stories.tsx +328 -0
- package/es6/components/Stepper/utils.js +50 -0
- package/es6/components/TextArea/StyledTextArea.js +4 -2
- package/es6/components/TextInput/CopyButton.js +22 -6
- package/es6/components/TextInput/README.md +29 -1
- package/es6/components/TextInput/StyledTextInput.js +34 -27
- package/es6/components/TextInput/TextInput.js +164 -41
- package/es6/components/TextInput/index.d.ts +14 -3
- package/es6/components/TextInput/propTypes.js +4 -0
- package/es6/components/TextInput/stories/Clear.stories.tsx +68 -0
- package/es6/components/TextInput/stories/ClearFormField.stories.tsx +45 -0
- package/es6/components/TextInput/stories/Copy.stories.tsx +42 -0
- package/es6/components/TextInput/stories/CopySecret.stories.tsx +44 -0
- package/es6/components/TimeInput/README.md +24 -1
- package/es6/components/TimeInput/StyledTimeInput.js +101 -28
- package/es6/components/TimeInput/TimeInput.js +189 -122
- package/es6/components/TimeInput/TimeInputPopup.js +115 -118
- package/es6/components/TimeInput/index.d.ts +2 -0
- package/es6/components/TimeInput/propTypes.js +2 -0
- package/es6/components/TimeInput/stories/Controlled.stories.tsx +2 -2
- package/es6/components/TimeInput/stories/CustomThemed.stories.tsx +79 -0
- package/es6/components/TimeInput/stories/CustomThemedHpe.stories.tsx +115 -0
- package/es6/components/TimeInput/stories/Form.stories.tsx +1 -0
- package/es6/components/TimeInput/stories/Inline.stories.tsx +28 -0
- package/es6/components/TimeInput/stories/ShowSeconds.stories.tsx +28 -0
- package/es6/components/TimeInput/useSectionedTimeField.js +2 -2
- package/es6/components/TimeInput/utils.js +12 -61
- package/es6/components/Wizard/Wizard.js +407 -212
- package/es6/components/Wizard/WizardContent.js +62 -36
- package/es6/components/Wizard/WizardContext.js +3 -0
- package/es6/components/Wizard/WizardFooter.js +14 -15
- package/es6/components/Wizard/WizardHeader.js +12 -7
- package/es6/components/Wizard/WizardProgress.js +28 -6
- package/es6/components/Wizard/index.d.ts +35 -4
- package/es6/components/Wizard/propTypes.js +6 -1
- package/es6/components/Wizard/stories/BasicLinear.stories.js +11 -11
- package/es6/components/Wizard/stories/ClickableSteps.stories.js +99 -0
- package/es6/components/Wizard/stories/ExternalForm.stories.js +111 -0
- package/es6/components/Wizard/stories/NonClosableHeader.stories.js +63 -0
- package/es6/components/Wizard/stories/ProgressiveSubSteps.stories.tsx +209 -0
- package/es6/components/Wizard/stories/Validation.stories.js +18 -9
- package/es6/languages/default.json +7 -1
- package/es6/themes/base.d.ts +166 -153
- package/es6/themes/base.js +263 -201
- package/es6/utils/DOM.js +10 -7
- package/es6/utils/background.js +9 -7
- package/es6/utils/border.js +7 -0
- package/es6/utils/colors.js +84 -12
- package/es6/utils/legacyColorIsDark.js +17 -0
- package/es6/utils/styles.js +157 -29
- package/grommet.min.js +1 -1
- package/grommet.min.js.map +1 -1
- package/languages/default.json +7 -1
- package/package.json +36 -36
- package/themes/base.d.ts +166 -153
- package/themes/base.js +263 -201
- package/tools/draft-release-version-pr.js +1 -0
- package/tools/generate-release-notes.js +1 -1
- package/tools/license-header.js +1 -1
- package/tools/pack.js +1 -1
- package/tools/release-checklist.js +1 -1
- package/tools/release-notes-utils.js +1 -0
- package/tools/release-preparation.md +55 -0
- package/tools/release-stable.js +1 -1
- package/tools/release-styled-components-beta-stable.js +1 -1
- package/utils/DOM.js +10 -7
- package/utils/background.js +9 -7
- package/utils/border.js +8 -1
- package/utils/colors.js +84 -12
- package/utils/legacyColorIsDark.js +21 -0
- package/utils/styles.js +158 -32
- package/utils/useId.js +2 -1
- package/components/Stepper/StepConnector.js +0 -38
- package/es6/components/Stepper/StepConnector.js +0 -33
|
@@ -13,7 +13,8 @@ var _excluded = ["a11yTitle", "bounds", "color", "dash", "direction", "gap", "id
|
|
|
13
13
|
_excluded2 = ["color", "label", "onHover", "opacity", "thickness", "value"],
|
|
14
14
|
_excluded3 = ["color", "label", "onHover", "opacity", "thickness", "value"]; // SPDX-FileCopyrightText: © Hewlett Packard Enterprise Development LP
|
|
15
15
|
// SPDX-License-Identifier: Apache-2.0
|
|
16
|
-
|
|
16
|
+
var cache;
|
|
17
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, "default": e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
17
18
|
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
19
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
19
20
|
var gradientMaskColor = '#ffffff';
|
|
@@ -4,7 +4,8 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.StyledChart = void 0;
|
|
5
5
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
6
6
|
var _utils = require("../../utils");
|
|
7
|
-
|
|
7
|
+
var cache;
|
|
8
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, "default": e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
8
9
|
// SPDX-FileCopyrightText: © Hewlett Packard Enterprise Development LP
|
|
9
10
|
// SPDX-License-Identifier: Apache-2.0
|
|
10
11
|
|
|
@@ -5,7 +5,8 @@ exports["default"] = exports.Rich = void 0;
|
|
|
5
5
|
var _react = _interopRequireWildcard(require("react"));
|
|
6
6
|
var _grommet = require("grommet");
|
|
7
7
|
var _calcs2 = require("../calcs");
|
|
8
|
-
|
|
8
|
+
var cache;
|
|
9
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, "default": e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
9
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); } // SPDX-FileCopyrightText: © Hewlett Packard Enterprise Development LP
|
|
10
11
|
// SPDX-License-Identifier: Apache-2.0
|
|
11
12
|
var Rich = exports.Rich = function Rich() {
|
|
@@ -6,7 +6,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
6
6
|
var _grommet = require("grommet");
|
|
7
7
|
var _calcs = require("../calcs");
|
|
8
8
|
var _data = require("./data");
|
|
9
|
-
|
|
9
|
+
var cache;
|
|
10
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, "default": e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
10
11
|
// SPDX-FileCopyrightText: © Hewlett Packard Enterprise Development LP
|
|
11
12
|
// SPDX-License-Identifier: Apache-2.0
|
|
12
13
|
|
|
@@ -6,7 +6,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
6
6
|
var _grommet = require("grommet");
|
|
7
7
|
var _calcs = require("../calcs");
|
|
8
8
|
var _data = require("./data");
|
|
9
|
-
|
|
9
|
+
var cache;
|
|
10
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, "default": e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
10
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); } // SPDX-FileCopyrightText: © Hewlett Packard Enterprise Development LP
|
|
11
12
|
// SPDX-License-Identifier: Apache-2.0
|
|
12
13
|
// compress data for outer control chart
|
|
@@ -7,7 +7,8 @@ var _grommet = require("grommet");
|
|
|
7
7
|
var _grommetIcons = require("grommet-icons");
|
|
8
8
|
var _calcs2 = require("../calcs");
|
|
9
9
|
var _data = require("./data");
|
|
10
|
-
|
|
10
|
+
var cache;
|
|
11
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, "default": e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
11
12
|
// SPDX-FileCopyrightText: © Hewlett Packard Enterprise Development LP
|
|
12
13
|
// SPDX-License-Identifier: Apache-2.0
|
|
13
14
|
|
|
@@ -11,7 +11,8 @@ var _utils = require("../../utils");
|
|
|
11
11
|
var _useThemeValue2 = require("../../utils/useThemeValue");
|
|
12
12
|
var _excluded = ["a11yTitle", "aria-label", "checked", "children", "containerProps", "defaultChecked", "disabled", "fill", "focus", "focusIndicator", "id", "label", "name", "onBlur", "onChange", "onFocus", "onMouseEnter", "onMouseLeave", "onMouseOut", "onMouseOver", "pad", "reverse", "toggle", "indeterminate"]; // SPDX-FileCopyrightText: © Hewlett Packard Enterprise Development LP
|
|
13
13
|
// SPDX-License-Identifier: Apache-2.0
|
|
14
|
-
|
|
14
|
+
var cache;
|
|
15
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, "default": e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
15
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); }
|
|
16
17
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
17
18
|
var stopLabelClick = function stopLabelClick(event) {
|
|
@@ -1,2 +1,97 @@
|
|
|
1
1
|
## CheckBox
|
|
2
2
|
Documentation for this component: https://v2.grommet.io/checkbox
|
|
3
|
+
|
|
4
|
+
### Backgrounds
|
|
5
|
+
|
|
6
|
+
Use `control` to theme the built-in square checkbox and `container` to theme its
|
|
7
|
+
outer label. These tokens accept `BackgroundType`: a color string, a symbolic
|
|
8
|
+
theme color, or an object such as `{ color: 'background-input' }`.
|
|
9
|
+
|
|
10
|
+
| Token | Applies to |
|
|
11
|
+
| --- | --- |
|
|
12
|
+
| `checkBox.control.background` | Unselected square control background. |
|
|
13
|
+
| `checkBox.control.hover.background` | Enabled unselected control on hover. |
|
|
14
|
+
| `checkBox.control.selected.background` | Checked or indeterminate control background. |
|
|
15
|
+
| `checkBox.control.selected.hover.background` | Enabled checked or indeterminate control on hover. |
|
|
16
|
+
| `checkBox.container.background` | Outer label background, including toggles and custom render-function children. |
|
|
17
|
+
| `checkBox.container.hover.background` | Enabled outer label hover background. |
|
|
18
|
+
|
|
19
|
+
Hovering the label text also hovers the control. Focus without a focus indicator
|
|
20
|
+
(for example, inside a `FormField`) uses the current selection state's hover
|
|
21
|
+
background. Disabled controls retain their state backgrounds and do not receive
|
|
22
|
+
hover treatment. Background tokens do not change text or icon colors.
|
|
23
|
+
|
|
24
|
+
### Control appearance
|
|
25
|
+
|
|
26
|
+
`checkBox.control` accepts the shared Box-part properties `background`, `border`,
|
|
27
|
+
`elevation`, `height`, `margin`, `pad`, `round`, and `width`. Its `hover`,
|
|
28
|
+
`selected`, and `selected.hover` parts accept the Box-state properties
|
|
29
|
+
`background`, `border`, `elevation`, `pad`, and `round`. Checked and indeterminate
|
|
30
|
+
controls use `selected`, inheriting unspecified properties from the normal part.
|
|
31
|
+
Background inheritance follows the fallbacks listed below.
|
|
32
|
+
|
|
33
|
+
Width and height support Box string and min/max object values. Border supports
|
|
34
|
+
Box boolean, side, object, and array values. Partial border objects inherit
|
|
35
|
+
unspecified fields from the underlying normal, selected, or legacy border;
|
|
36
|
+
other border values replace it. Use `border: false` and `round: false` to remove
|
|
37
|
+
these treatments. Control padding is independent of the CheckBox `pad` prop.
|
|
38
|
+
|
|
39
|
+
Hovering the label applies the current selection state's hover part to the
|
|
40
|
+
square. Focus without a focus indicator applies the same styles. Disabled
|
|
41
|
+
controls retain normal and selected styles without hover or focus-as-hover
|
|
42
|
+
overrides. Toggle tracks, knobs, and custom render-function children do not use
|
|
43
|
+
these control parts. `checkBox.check.extend` remains the final square styling
|
|
44
|
+
override.
|
|
45
|
+
|
|
46
|
+
### Container appearance
|
|
47
|
+
|
|
48
|
+
`checkBox.container` accepts the shared Box-part properties `background`,
|
|
49
|
+
`border`, `elevation`, `height`, `margin`, `pad`, `round`, and `width`.
|
|
50
|
+
`container.hover` accepts the Box-state properties `background`, `border`,
|
|
51
|
+
`elevation`, `pad`, and `round`. These styles affect the outer label, not the
|
|
52
|
+
square control or toggle track and knob. Width and height accept the same
|
|
53
|
+
string and min/max object values as Box; border accepts the same boolean,
|
|
54
|
+
side, object, and array values. Use `border: false` or `round: false` to remove
|
|
55
|
+
the corresponding treatment.
|
|
56
|
+
|
|
57
|
+
Partial hover border objects inherit unspecified properties from the normal
|
|
58
|
+
container border. With a normal border array, a hover object without `side`
|
|
59
|
+
overrides each entry while preserving its side, width, and style.
|
|
60
|
+
|
|
61
|
+
Hover styles also apply during focus when `focusIndicator` is false. Disabled
|
|
62
|
+
containers retain their normal styles without hover or focus-as-hover styling.
|
|
63
|
+
An explicit CheckBox `pad` prop takes precedence over both normal and hover
|
|
64
|
+
container padding; otherwise `container.pad` overrides legacy `checkBox.pad`.
|
|
65
|
+
`checkBox.extend` remains the final styling override.
|
|
66
|
+
|
|
67
|
+
#### Fallbacks and compatibility
|
|
68
|
+
|
|
69
|
+
New themes should use `control` and `container`. Legacy tokens remain supported:
|
|
70
|
+
|
|
71
|
+
- Unselected control: `control.background`.
|
|
72
|
+
- Selected or indeterminate control: `control.selected.background`, then
|
|
73
|
+
`control.background`.
|
|
74
|
+
- Unselected control hover: `control.hover.background`, otherwise retain the
|
|
75
|
+
unselected background.
|
|
76
|
+
- Selected control hover: `control.selected.hover.background`, otherwise retain
|
|
77
|
+
the selected background.
|
|
78
|
+
- Container hover: `container.hover.background`, then legacy
|
|
79
|
+
`hover.background.color`, otherwise retain `container.background`.
|
|
80
|
+
|
|
81
|
+
State-specific control hover tokens do not cross over to the other state.
|
|
82
|
+
Legacy container `hover.background` keeps its `{ color: ... }` shape. An explicit
|
|
83
|
+
`container.hover.background`, including `'transparent'`, takes precedence over
|
|
84
|
+
that fallback. Existing `check.radius`, `check.thickness`, and `check.extend`
|
|
85
|
+
remain supported; control fills use only the `control` background tokens.
|
|
86
|
+
|
|
87
|
+
Theme `extend` CSS runs after the background tokens and can override them. For
|
|
88
|
+
example, an existing `check.extend` that sets the control background wins over
|
|
89
|
+
`control.background` and `control.selected.background`. Adjust that extension,
|
|
90
|
+
or set `check.extend: undefined`, when the theme tokens should determine the
|
|
91
|
+
fill. `checkBox.extend` follows the container and control hover styles.
|
|
92
|
+
|
|
93
|
+
Control background tokens do not affect toggle tracks or knobs; those retain
|
|
94
|
+
`checkBox.toggle` styling. They also do not fill custom render-function
|
|
95
|
+
children, though container backgrounds still apply. Existing border styling,
|
|
96
|
+
custom icons, `checkBox.check.extend`, and `checkBox.toggle.extend` remain
|
|
97
|
+
available.
|
|
@@ -5,10 +5,10 @@ exports.StyledCheckBoxToggle = exports.StyledCheckBoxKnob = exports.StyledCheckB
|
|
|
5
5
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
6
6
|
var _utils = require("../../utils");
|
|
7
7
|
var _Box = require("../Box");
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
var cache;
|
|
9
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, "default": e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
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); } // SPDX-FileCopyrightText: © Hewlett Packard Enterprise Development LP
|
|
10
11
|
// SPDX-License-Identifier: Apache-2.0
|
|
11
|
-
|
|
12
12
|
// Note: since `fillStyle` is only used in one place, `justify-content` was
|
|
13
13
|
// added to it to simplify its logic. If this is ever reused somewhere else,
|
|
14
14
|
// consider the need of separating those once again.
|
|
@@ -16,15 +16,85 @@ var fillStyle = function fillStyle() {
|
|
|
16
16
|
return "\n width: auto;\n height: 100%;\n max-width: none;\n flex: 1 0 auto;\n justify-content: space-between;\n ";
|
|
17
17
|
};
|
|
18
18
|
var disabledStyle = "\n opacity: 0.5;\n cursor: default;\n";
|
|
19
|
+
var boxPartStyles = function boxPartStyles(part, props, container) {
|
|
20
|
+
var _props$responsive;
|
|
21
|
+
if (container === void 0) {
|
|
22
|
+
container = false;
|
|
23
|
+
}
|
|
24
|
+
var theme = props.theme;
|
|
25
|
+
var responsive = (_props$responsive = props.responsive) != null ? _props$responsive : true;
|
|
26
|
+
var styles = [];
|
|
27
|
+
if (part.border !== undefined) {
|
|
28
|
+
if (part.border === false) styles.push('border: none;');else {
|
|
29
|
+
if ((0, _utils.hasSideSpecificBorder)(part.border)) styles.push('border: none;');
|
|
30
|
+
styles.push((0, _utils.borderStyle)(part.border, responsive, theme));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (part.elevation !== undefined) styles.push((0, _utils.elevationStyle)(part.elevation));
|
|
34
|
+
if (part.height !== undefined) styles.push((0, _utils.heightStyle)(part.height, theme));
|
|
35
|
+
if (part.width !== undefined) styles.push((0, _utils.widthStyle)(part.width, theme));
|
|
36
|
+
if (part.margin !== undefined) styles.push((0, _utils.edgeStyle)('margin', part.margin, responsive, theme.box.responsiveBreakpoint, theme));
|
|
37
|
+
if (part.pad !== undefined && (!container || props.pad === undefined)) styles.push((0, _utils.edgeStyle)('padding', part.pad, responsive, theme.box.responsiveBreakpoint, theme));
|
|
38
|
+
if (part.round !== undefined) styles.push(part.round === false ? 'border-radius: 0;' : (0, _utils.roundStyle)(part.round, responsive, theme));
|
|
39
|
+
return styles;
|
|
40
|
+
};
|
|
41
|
+
var _mergeControlBorder = function mergeControlBorder(base, override) {
|
|
42
|
+
if (override === undefined) return base;
|
|
43
|
+
if (Array.isArray(base) && override && typeof override === 'object' && !Array.isArray(override) && !override.side) return base.map(function (part) {
|
|
44
|
+
return _mergeControlBorder(part, override);
|
|
45
|
+
});
|
|
46
|
+
if (base && override && typeof base === 'object' && typeof override === 'object' && !Array.isArray(base) && !Array.isArray(override)) return _extends({}, base, override);
|
|
47
|
+
if (typeof base === 'string' && override && typeof override === 'object' && !Array.isArray(override)) return _extends({
|
|
48
|
+
side: base
|
|
49
|
+
}, override);
|
|
50
|
+
return override;
|
|
51
|
+
};
|
|
52
|
+
var controlHoverStyle = function controlHoverStyle(props) {
|
|
53
|
+
var _control$selected;
|
|
54
|
+
var control = props.theme.checkBox.control;
|
|
55
|
+
if (props.disabled) return undefined;
|
|
56
|
+
var selected = props.checked || props.indeterminate;
|
|
57
|
+
var state = selected ? control == null || (_control$selected = control.selected) == null ? void 0 : _control$selected.hover : control == null ? void 0 : control.hover;
|
|
58
|
+
var part = _extends({}, state);
|
|
59
|
+
if ((state == null ? void 0 : state.border) !== undefined) {
|
|
60
|
+
var _control$selected2;
|
|
61
|
+
var checkBox = props.theme.checkBox;
|
|
62
|
+
var baseBorder = {
|
|
63
|
+
size: checkBox.border.width,
|
|
64
|
+
color: props.checked ? checkBox.color || 'control' : checkBox.border.color
|
|
65
|
+
};
|
|
66
|
+
part.border = _mergeControlBorder(_mergeControlBorder(_mergeControlBorder(baseBorder, control == null ? void 0 : control.border), selected ? control == null || (_control$selected2 = control.selected) == null ? void 0 : _control$selected2.border : undefined), state.border);
|
|
67
|
+
}
|
|
68
|
+
var styles = boxPartStyles(part, props);
|
|
69
|
+
if ((state == null ? void 0 : state.background) != null) styles.push((0, _utils.backgroundStyle)(state.background, props.theme, false));
|
|
70
|
+
if (props.focus && props.focusIndicator) styles.push((0, _utils.focusStyle)());
|
|
71
|
+
if (styles.length === 0) return undefined;
|
|
72
|
+
return (0, _styledComponents.css)(["input:not([disabled]) + ", "{", "}"],
|
|
73
|
+
// eslint-disable-next-line no-use-before-define
|
|
74
|
+
StyledCheckBoxBox, styles);
|
|
75
|
+
};
|
|
76
|
+
var containerBackgroundStyle = function containerBackgroundStyle(props) {
|
|
77
|
+
var _container$hover, _container$hover2, _hover$background;
|
|
78
|
+
var _props$theme$checkBox = props.theme.checkBox,
|
|
79
|
+
container = _props$theme$checkBox.container,
|
|
80
|
+
hover = _props$theme$checkBox.hover;
|
|
81
|
+
var normalStyles = boxPartStyles(container || {}, props, true);
|
|
82
|
+
var hoverContainer = _extends({}, container == null ? void 0 : container.hover);
|
|
83
|
+
if (hoverContainer.border !== undefined) hoverContainer.border = _mergeControlBorder(container == null ? void 0 : container.border, hoverContainer.border);
|
|
84
|
+
var hoverStyles = boxPartStyles(hoverContainer, props, true);
|
|
85
|
+
if ((container == null ? void 0 : container.background) == null && (container == null || (_container$hover = container.hover) == null ? void 0 : _container$hover.background) == null && normalStyles.length === 0 && hoverStyles.length === 0) return undefined;
|
|
86
|
+
var hoverBackground = (container == null || (_container$hover2 = container.hover) == null ? void 0 : _container$hover2.background) != null ? (0, _utils.backgroundStyle)(container.hover.background, props.theme, false) : (hover == null || (_hover$background = hover.background) == null ? void 0 : _hover$background.color) !== undefined && (0, _styledComponents.css)(["background-color:", ";"], (0, _utils.normalizeColor)(hover.background.color, props.theme));
|
|
87
|
+
return (0, _styledComponents.css)(["", " ", " ", " ", ""], normalStyles.length > 0 && 'box-sizing: border-box;', normalStyles, (0, _utils.backgroundStyle)(container == null ? void 0 : container.background, props.theme, false), !props.disabled && (hoverBackground || hoverStyles.length > 0) && (0, _styledComponents.css)(["&:hover{", " ", "}", ""], hoverBackground, hoverStyles, props.focus && !props.focusIndicator && (0, _styledComponents.css)(["", " ", ""], hoverBackground, hoverStyles)));
|
|
88
|
+
};
|
|
19
89
|
var hoverStyle = (0, _styledComponents.css)(["&:hover input:not([disabled]) + div,&:hover input:not([disabled]) + span{border-color:", ";", "}&:hover{background-color:", ";}"], function (props) {
|
|
20
|
-
var _props$theme$checkBox;
|
|
21
|
-
return (0, _utils.normalizeColor)((_props$theme$checkBox = props.theme.checkBox.hover) == null || (_props$theme$checkBox = _props$theme$checkBox.border) == null ? void 0 : _props$theme$checkBox.color, props.theme);
|
|
22
|
-
}, function (props) {
|
|
23
90
|
var _props$theme$checkBox2;
|
|
24
|
-
return (_props$theme$checkBox2 = props.theme.checkBox.hover) == null ? void 0 : _props$theme$checkBox2.
|
|
91
|
+
return (0, _utils.normalizeColor)((_props$theme$checkBox2 = props.theme.checkBox.hover) == null || (_props$theme$checkBox2 = _props$theme$checkBox2.border) == null ? void 0 : _props$theme$checkBox2.color, props.theme);
|
|
25
92
|
}, function (props) {
|
|
26
93
|
var _props$theme$checkBox3;
|
|
27
|
-
return (
|
|
94
|
+
return (_props$theme$checkBox3 = props.theme.checkBox.hover) == null ? void 0 : _props$theme$checkBox3.extend;
|
|
95
|
+
}, function (props) {
|
|
96
|
+
var _props$theme$checkBox4, _props$theme$checkBox5;
|
|
97
|
+
return (0, _utils.normalizeColor)(!props.disabled && ((_props$theme$checkBox4 = props.theme.checkBox.container) == null || (_props$theme$checkBox4 = _props$theme$checkBox4.hover) == null ? void 0 : _props$theme$checkBox4.background) == null && ((_props$theme$checkBox5 = props.theme.checkBox.hover) == null || (_props$theme$checkBox5 = _props$theme$checkBox5.background) == null ? void 0 : _props$theme$checkBox5.color), props.theme);
|
|
28
98
|
});
|
|
29
99
|
var StyledCheckBoxIcon = exports.StyledCheckBoxIcon = _styledComponents["default"].svg.withConfig(_utils.styledComponentsConfig).withConfig({
|
|
30
100
|
displayName: "StyledCheckBox__StyledCheckBoxIcon",
|
|
@@ -54,10 +124,15 @@ var StyledCheckBoxContainer = exports.StyledCheckBoxContainer = _styledComponent
|
|
|
54
124
|
}, function (props) {
|
|
55
125
|
return !props.disabled && 'cursor: pointer;';
|
|
56
126
|
}, hoverStyle, function (props) {
|
|
57
|
-
var _props$theme$
|
|
58
|
-
return props.focus && !props.focusIndicator && "\n input:not([disabled]) + div,\n input:not([disabled]) + span {\n border-color: " + (0, _utils.normalizeColor)((_props$theme$
|
|
59
|
-
}, function (props) {
|
|
60
|
-
|
|
127
|
+
var _props$theme$checkBox6, _props$theme$checkBox7, _props$theme$checkBox8;
|
|
128
|
+
return props.focus && !props.focusIndicator && "\n input:not([disabled]) + div,\n input:not([disabled]) + span {\n border-color: " + (0, _utils.normalizeColor)((_props$theme$checkBox6 = props.theme.checkBox.hover) == null || (_props$theme$checkBox6 = _props$theme$checkBox6.border) == null ? void 0 : _props$theme$checkBox6.color, props.theme) + ";\n }\n\n background-color: " + (0, _utils.normalizeColor)(!props.disabled && ((_props$theme$checkBox7 = props.theme.checkBox.container) == null || (_props$theme$checkBox7 = _props$theme$checkBox7.hover) == null ? void 0 : _props$theme$checkBox7.background) == null && ((_props$theme$checkBox8 = props.theme.checkBox.hover) == null || (_props$theme$checkBox8 = _props$theme$checkBox8.background) == null ? void 0 : _props$theme$checkBox8.color), props.theme) + ";";
|
|
129
|
+
}, function (props) {
|
|
130
|
+
var controlStyle = controlHoverStyle(props);
|
|
131
|
+
var containerStyle = containerBackgroundStyle(props);
|
|
132
|
+
if (containerStyle) {
|
|
133
|
+
return (0, _styledComponents.css)(["", " ", " ", ""], containerStyle, controlStyle && (0, _styledComponents.css)(["&:hover{", "}", ""], controlStyle, props.focus && !props.focusIndicator && controlStyle), props.theme.checkBox.extend);
|
|
134
|
+
}
|
|
135
|
+
return controlStyle ? (0, _styledComponents.css)(["&:hover{", "}", " ", ""], controlStyle, props.focus && !props.focusIndicator && controlStyle, props.theme.checkBox.extend) : props.theme.checkBox.extend;
|
|
61
136
|
});
|
|
62
137
|
var StyledCheckBoxInput = exports.StyledCheckBoxInput = _styledComponents["default"].input.withConfig(_utils.styledComponentsConfig).withConfig({
|
|
63
138
|
displayName: "StyledCheckBox__StyledCheckBoxInput",
|
|
@@ -76,10 +151,23 @@ var StyledCheckBoxInput = exports.StyledCheckBoxInput = _styledComponents["defau
|
|
|
76
151
|
var StyledCheckBoxBox = exports.StyledCheckBoxBox = (0, _styledComponents["default"])(_Box.Box).withConfig({
|
|
77
152
|
displayName: "StyledCheckBox__StyledCheckBoxBox",
|
|
78
153
|
componentId: "sc-1dbk5ju-3"
|
|
79
|
-
})(["", ";"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
154
|
+
})(["", ";"], function (props) {
|
|
155
|
+
var _selectedState$backgr;
|
|
156
|
+
var _props$theme$checkBox9 = props.theme.checkBox,
|
|
157
|
+
control = _props$theme$checkBox9.control,
|
|
158
|
+
check = _props$theme$checkBox9.check;
|
|
159
|
+
var selected = props.checked || props.indeterminate;
|
|
160
|
+
var selectedState = selected ? control == null ? void 0 : control.selected : undefined;
|
|
161
|
+
var focus = props.focus && props.focusIndicator && (0, _utils.focusStyle)();
|
|
162
|
+
var part = _extends({}, control, selectedState);
|
|
163
|
+
if ((control == null ? void 0 : control.border) !== undefined || (selectedState == null ? void 0 : selectedState.border) !== undefined) part.border = _mergeControlBorder(_mergeControlBorder(props.border, control == null ? void 0 : control.border), selectedState == null ? void 0 : selectedState.border);
|
|
164
|
+
var partStyles = boxPartStyles(part, props);
|
|
165
|
+
var background = (_selectedState$backgr = selectedState == null ? void 0 : selectedState.background) != null ? _selectedState$backgr : control == null ? void 0 : control.background;
|
|
166
|
+
if (background != null) {
|
|
167
|
+
return (0, _styledComponents.css)(["", " ", " ", " ", ""], partStyles, (0, _utils.backgroundStyle)(background, props.theme, false), focus, check.extend);
|
|
168
|
+
}
|
|
169
|
+
if (partStyles.length === 0) return focus ? (0, _styledComponents.css)(["", " ", ""], focus, check.extend) : check.extend;
|
|
170
|
+
return (0, _styledComponents.css)(["", " ", " ", ""], partStyles, focus, check.extend);
|
|
83
171
|
});
|
|
84
172
|
var StyledCheckBoxToggle = exports.StyledCheckBoxToggle = _styledComponents["default"].span.withConfig(_utils.styledComponentsConfig).withConfig({
|
|
85
173
|
displayName: "StyledCheckBox__StyledCheckBoxToggle",
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: © Hewlett Packard Enterprise Development LP
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import React, { useState } from 'react';
|
|
4
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
Box,
|
|
8
|
+
Button,
|
|
9
|
+
CheckBox,
|
|
10
|
+
Form,
|
|
11
|
+
FormField,
|
|
12
|
+
Grommet,
|
|
13
|
+
Heading,
|
|
14
|
+
RadioButtonGroup,
|
|
15
|
+
} from 'grommet';
|
|
16
|
+
import { ThemeType } from 'grommet/themes';
|
|
17
|
+
import { deepMerge } from 'grommet/utils';
|
|
18
|
+
import { hpe } from 'grommet-theme-hpe';
|
|
19
|
+
|
|
20
|
+
const customTheme: ThemeType = {
|
|
21
|
+
checkBox: {
|
|
22
|
+
control: {
|
|
23
|
+
background: { color: { light: 'light-3', dark: 'dark-3' } },
|
|
24
|
+
border: { color: 'border', size: 'xsmall' },
|
|
25
|
+
height: '32px',
|
|
26
|
+
width: '32px',
|
|
27
|
+
pad: 'none',
|
|
28
|
+
round: 'xsmall',
|
|
29
|
+
hover: {
|
|
30
|
+
background: { color: { light: 'accent-3', dark: 'neutral-3' } },
|
|
31
|
+
border: { color: 'accent-3' },
|
|
32
|
+
},
|
|
33
|
+
selected: {
|
|
34
|
+
background: { color: { light: 'accent-1', dark: 'accent-2' } },
|
|
35
|
+
border: { color: 'accent-1' },
|
|
36
|
+
hover: {
|
|
37
|
+
background: { color: { light: 'accent-4', dark: 'neutral-4' } },
|
|
38
|
+
border: { color: 'accent-4' },
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
container: {
|
|
43
|
+
background: { color: { light: 'light-2', dark: 'dark-2' } },
|
|
44
|
+
border: { color: 'border', size: 'xsmall' },
|
|
45
|
+
elevation: 'none',
|
|
46
|
+
margin: { bottom: 'xxsmall' },
|
|
47
|
+
pad: { horizontal: 'small', vertical: 'xsmall' },
|
|
48
|
+
round: 'xsmall',
|
|
49
|
+
width: { min: '240px' },
|
|
50
|
+
hover: {
|
|
51
|
+
background: { color: { light: 'light-4', dark: 'dark-4' } },
|
|
52
|
+
border: { color: 'accent-3' },
|
|
53
|
+
elevation: 'small',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const hpeTheme: ThemeType = deepMerge(hpe, {
|
|
60
|
+
checkBox: {
|
|
61
|
+
container: {},
|
|
62
|
+
control: {
|
|
63
|
+
background: 'background-front',
|
|
64
|
+
hover: {
|
|
65
|
+
background: 'background-hover',
|
|
66
|
+
border: { color: 'border-strong' },
|
|
67
|
+
},
|
|
68
|
+
selected: {
|
|
69
|
+
background: 'background-selected-primary-strong',
|
|
70
|
+
border: {
|
|
71
|
+
color: 'border-selected',
|
|
72
|
+
},
|
|
73
|
+
hover: {
|
|
74
|
+
background: 'background-selected-primary-strong-hover',
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
check: { extend: undefined },
|
|
79
|
+
hover: {
|
|
80
|
+
extend: undefined,
|
|
81
|
+
},
|
|
82
|
+
extend: undefined,
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
const AppearanceExample = () => {
|
|
87
|
+
const [dark, setDark] = useState(false);
|
|
88
|
+
const [value, setValue] = useState({ updates: true });
|
|
89
|
+
const [theme, setTheme] = useState(hpeTheme);
|
|
90
|
+
|
|
91
|
+
return (
|
|
92
|
+
<Grommet
|
|
93
|
+
theme={theme}
|
|
94
|
+
themeMode={dark ? 'dark' : 'light'}
|
|
95
|
+
background="background"
|
|
96
|
+
>
|
|
97
|
+
<Box pad="large" gap="medium">
|
|
98
|
+
<Heading level={2} margin="none">
|
|
99
|
+
Preferences
|
|
100
|
+
</Heading>
|
|
101
|
+
<Box
|
|
102
|
+
direction="row"
|
|
103
|
+
wrap
|
|
104
|
+
gap="large"
|
|
105
|
+
border={{ color: 'border', size: 'small', side: 'bottom' }}
|
|
106
|
+
pad="small"
|
|
107
|
+
>
|
|
108
|
+
<RadioButtonGroup
|
|
109
|
+
name="theme"
|
|
110
|
+
options={['Custom', 'HPE']}
|
|
111
|
+
value={theme === customTheme ? 'Custom' : 'HPE'}
|
|
112
|
+
onChange={(event) =>
|
|
113
|
+
setTheme(event.target.value === 'Custom' ? customTheme : hpeTheme)
|
|
114
|
+
}
|
|
115
|
+
/>
|
|
116
|
+
<CheckBox
|
|
117
|
+
toggle
|
|
118
|
+
label="Dark mode"
|
|
119
|
+
checked={dark}
|
|
120
|
+
onChange={(event) => setDark(event.target.checked)}
|
|
121
|
+
/>
|
|
122
|
+
</Box>
|
|
123
|
+
<Box gap="small" background="background-back" pad="medium" round>
|
|
124
|
+
<CheckBox label="Unchecked" />
|
|
125
|
+
<CheckBox label="Selected" defaultChecked />
|
|
126
|
+
<CheckBox label="Indeterminate" indeterminate />
|
|
127
|
+
<CheckBox label="Disabled unchecked" disabled />
|
|
128
|
+
<CheckBox label="Disabled selected" disabled checked />
|
|
129
|
+
</Box>
|
|
130
|
+
<Box gap="small" background="background-back" pad="medium" round>
|
|
131
|
+
<Form value={value} onChange={setValue}>
|
|
132
|
+
<FormField name="updates" htmlFor="updates" label="Notifications">
|
|
133
|
+
<CheckBox
|
|
134
|
+
id="updates"
|
|
135
|
+
name="updates"
|
|
136
|
+
label="Send product updates"
|
|
137
|
+
/>
|
|
138
|
+
</FormField>
|
|
139
|
+
<Box direction="row" gap="small" margin={{ top: 'medium' }}>
|
|
140
|
+
<Button type="submit" label="Submit" primary />
|
|
141
|
+
<Button type="reset" label="Reset" />
|
|
142
|
+
</Box>
|
|
143
|
+
</Form>
|
|
144
|
+
</Box>
|
|
145
|
+
</Box>
|
|
146
|
+
</Grommet>
|
|
147
|
+
);
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
const meta: Meta<typeof CheckBox> = {
|
|
151
|
+
title: 'Input/CheckBox/Custom Themed/Appearance',
|
|
152
|
+
component: CheckBox,
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
export default meta;
|
|
156
|
+
type Story = StoryObj<typeof CheckBox>;
|
|
157
|
+
|
|
158
|
+
export const Appearance: Story = {
|
|
159
|
+
render: () => <AppearanceExample />,
|
|
160
|
+
};
|
|
@@ -7,7 +7,8 @@ var _grommet = require("grommet");
|
|
|
7
7
|
var _themes = require("grommet/themes");
|
|
8
8
|
var _utils = require("grommet/utils");
|
|
9
9
|
var _grommetIcons = require("grommet-icons");
|
|
10
|
-
|
|
10
|
+
var cache;
|
|
11
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, "default": e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
11
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); } // SPDX-FileCopyrightText: © Hewlett Packard Enterprise Development LP
|
|
12
13
|
// SPDX-License-Identifier: Apache-2.0
|
|
13
14
|
var customCheckBoxTheme = {
|
|
@@ -7,7 +7,8 @@ var _styledComponents = require("styled-components");
|
|
|
7
7
|
var _grommet = require("grommet");
|
|
8
8
|
var _themes = require("grommet/themes");
|
|
9
9
|
var _utils = require("grommet/utils");
|
|
10
|
-
|
|
10
|
+
var cache;
|
|
11
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, "default": e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
11
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); } // SPDX-FileCopyrightText: © Hewlett Packard Enterprise Development LP
|
|
12
13
|
// SPDX-License-Identifier: Apache-2.0
|
|
13
14
|
var checkboxCheckStyle = (0, _styledComponents.css)(["background-color:#2196f3;border-color:#2196f3;"]);
|
|
@@ -4,7 +4,8 @@ exports.__esModule = true;
|
|
|
4
4
|
exports["default"] = exports.Indeterminate = void 0;
|
|
5
5
|
var _react = _interopRequireWildcard(require("react"));
|
|
6
6
|
var _grommet = require("grommet");
|
|
7
|
-
|
|
7
|
+
var cache;
|
|
8
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, "default": e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
8
9
|
// SPDX-FileCopyrightText: © Hewlett Packard Enterprise Development LP
|
|
9
10
|
// SPDX-License-Identifier: Apache-2.0
|
|
10
11
|
|
|
@@ -6,7 +6,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
6
6
|
var _grommet = require("grommet");
|
|
7
7
|
var _excluded = ["checked"]; // SPDX-FileCopyrightText: © Hewlett Packard Enterprise Development LP
|
|
8
8
|
// SPDX-License-Identifier: Apache-2.0
|
|
9
|
-
|
|
9
|
+
var cache;
|
|
10
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, "default": e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
10
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); }
|
|
11
12
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
12
13
|
var SimpleCheckBox = function SimpleCheckBox(_ref) {
|
|
@@ -6,7 +6,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
6
6
|
var _grommet = require("grommet");
|
|
7
7
|
var _excluded = ["checked"]; // SPDX-FileCopyrightText: © Hewlett Packard Enterprise Development LP
|
|
8
8
|
// SPDX-License-Identifier: Apache-2.0
|
|
9
|
-
|
|
9
|
+
var cache;
|
|
10
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, "default": e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
10
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); }
|
|
11
12
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
12
13
|
var SimpleCheckBox = function SimpleCheckBox(_ref) {
|
|
@@ -4,7 +4,8 @@ exports.__esModule = true;
|
|
|
4
4
|
exports["default"] = exports.WithStickyDiv = void 0;
|
|
5
5
|
var _react = _interopRequireWildcard(require("react"));
|
|
6
6
|
var _grommet = require("grommet");
|
|
7
|
-
|
|
7
|
+
var cache;
|
|
8
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, "default": e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
8
9
|
// SPDX-FileCopyrightText: © Hewlett Packard Enterprise Development LP
|
|
9
10
|
// SPDX-License-Identifier: Apache-2.0
|
|
10
11
|
|
|
@@ -11,7 +11,8 @@ var _useThemeValue2 = require("../../utils/useThemeValue");
|
|
|
11
11
|
var _excluded = ["aria-label", "aria-labelledby", "children", "defaultValue", "value", "disabled", "focusIndicator", "gap", "id", "labelKey", "valueKey", "onChange", "options", "name"],
|
|
12
12
|
_excluded2 = ["value"]; // SPDX-FileCopyrightText: © Hewlett Packard Enterprise Development LP
|
|
13
13
|
// SPDX-License-Identifier: Apache-2.0
|
|
14
|
-
|
|
14
|
+
var cache;
|
|
15
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, "default": e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
15
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); }
|
|
16
17
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
17
18
|
var CheckBoxGroup = exports.CheckBoxGroup = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
@@ -5,7 +5,8 @@ exports["default"] = exports.Children = void 0;
|
|
|
5
5
|
var _react = _interopRequireWildcard(require("react"));
|
|
6
6
|
var _grommet = require("grommet");
|
|
7
7
|
var _grommetIcons = require("grommet-icons");
|
|
8
|
-
|
|
8
|
+
var cache;
|
|
9
|
+
function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var r, c, a = Object.defineProperty, n = { __proto__: null, "default": e }; if (Object(e) !== e) return n; if (cache || "function" != typeof WeakMap || (cache = new WeakMap()), cache) { if (cache.has(e)) return cache.get(e); cache.set(e, n); } for (c in e) "default" !== c && {}.hasOwnProperty.call(e, c) && ((r = a && Object.getOwnPropertyDescriptor(e, c)) && (r.get || r.set) ? a(n, c, r) : n[c] = e[c]); return n; }
|
|
9
10
|
// SPDX-FileCopyrightText: © Hewlett Packard Enterprise Development LP
|
|
10
11
|
// SPDX-License-Identifier: Apache-2.0
|
|
11
12
|
|