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
|
@@ -11,46 +11,36 @@ var _Box = require("../Box");
|
|
|
11
11
|
var _Drop = require("../Drop");
|
|
12
12
|
var _Text = require("../Text");
|
|
13
13
|
var _utils2 = require("./utils");
|
|
14
|
-
var _excluded = ["
|
|
14
|
+
var _excluded = ["hover", "selected"],
|
|
15
|
+
_excluded2 = ["hover"],
|
|
16
|
+
_excluded3 = ["activeSection", "align", "format", "formatMessage", "hoursOptions", "focusOnOpen", "id", "incrementSection", "messages", "minuteOptions", "onClose", "onFocusLeave", "secondOptions", "sectionOrder", "sections", "setActiveSection", "setSectionValue", "target", "dropProps", "label", "inline", "onKeyDown"],
|
|
17
|
+
_excluded4 = ["column", "option"]; // SPDX-FileCopyrightText: © Hewlett Packard Enterprise Development LP
|
|
15
18
|
// SPDX-License-Identifier: Apache-2.0
|
|
16
19
|
/* eslint-disable max-len */
|
|
17
20
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
18
|
-
|
|
21
|
+
var cache;
|
|
22
|
+
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; }
|
|
19
23
|
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); }
|
|
20
24
|
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; }
|
|
21
25
|
var PopupColumnBox = (0, _styledComponents["default"])(_Box.Box).withConfig({
|
|
22
26
|
displayName: "TimeInputPopup__PopupColumnBox",
|
|
23
27
|
componentId: "sc-r2j8uh-0"
|
|
24
|
-
})(["scrollbar-gutter:stable;
|
|
25
|
-
var PopupOption = _styledComponents["default"].
|
|
28
|
+
})(["scrollbar-gutter:stable;"]);
|
|
29
|
+
var PopupOption = (0, _styledComponents["default"])(_Box.Box).withConfig({
|
|
26
30
|
displayName: "TimeInputPopup__PopupOption",
|
|
27
31
|
componentId: "sc-r2j8uh-1"
|
|
28
|
-
})(["
|
|
29
|
-
var
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
var
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
if (
|
|
39
|
-
|
|
40
|
-
return (0, _utils.normalizeColor)((_props$theme$timeInpu3 = props.theme.timeInput) == null || (_props$theme$timeInpu3 = _props$theme$timeInpu3.drop) == null || (_props$theme$timeInpu3 = _props$theme$timeInpu3.option) == null || (_props$theme$timeInpu3 = _props$theme$timeInpu3.selected) == null ? void 0 : _props$theme$timeInpu3.background, props.theme);
|
|
41
|
-
}
|
|
42
|
-
if (props.$active) {
|
|
43
|
-
var _props$theme$timeInpu4;
|
|
44
|
-
return (0, _utils.normalizeColor)((_props$theme$timeInpu4 = props.theme.timeInput) == null || (_props$theme$timeInpu4 = _props$theme$timeInpu4.drop) == null || (_props$theme$timeInpu4 = _props$theme$timeInpu4.option) == null || (_props$theme$timeInpu4 = _props$theme$timeInpu4.hover) == null ? void 0 : _props$theme$timeInpu4.background, props.theme);
|
|
45
|
-
}
|
|
46
|
-
return (0, _utils.normalizeColor)((_props$theme$timeInpu5 = props.theme.timeInput) == null || (_props$theme$timeInpu5 = _props$theme$timeInpu5.drop) == null || (_props$theme$timeInpu5 = _props$theme$timeInpu5.option) == null ? void 0 : _props$theme$timeInpu5.background, props.theme);
|
|
47
|
-
}, function (props) {
|
|
48
|
-
var _props$theme$timeInpu8;
|
|
49
|
-
if (props.$selected) {
|
|
50
|
-
var _props$theme$timeInpu6, _props$theme$timeInpu7;
|
|
51
|
-
return (0, _utils.normalizeColor)(((_props$theme$timeInpu6 = props.theme.timeInput) == null || (_props$theme$timeInpu6 = _props$theme$timeInpu6.drop) == null || (_props$theme$timeInpu6 = _props$theme$timeInpu6.option) == null || (_props$theme$timeInpu6 = _props$theme$timeInpu6.selected) == null || (_props$theme$timeInpu6 = _props$theme$timeInpu6.hover) == null ? void 0 : _props$theme$timeInpu6.background) || ((_props$theme$timeInpu7 = props.theme.timeInput) == null || (_props$theme$timeInpu7 = _props$theme$timeInpu7.drop) == null || (_props$theme$timeInpu7 = _props$theme$timeInpu7.option) == null || (_props$theme$timeInpu7 = _props$theme$timeInpu7.selected) == null ? void 0 : _props$theme$timeInpu7.background), props.theme);
|
|
52
|
-
}
|
|
53
|
-
return (0, _utils.normalizeColor)((_props$theme$timeInpu8 = props.theme.timeInput) == null || (_props$theme$timeInpu8 = _props$theme$timeInpu8.drop) == null || (_props$theme$timeInpu8 = _props$theme$timeInpu8.option) == null || (_props$theme$timeInpu8 = _props$theme$timeInpu8.hover) == null ? void 0 : _props$theme$timeInpu8.background, props.theme);
|
|
32
|
+
})(["cursor:pointer;&:hover{", "}&:focus-visible{", "}"], function (props) {
|
|
33
|
+
var theme = props.theme,
|
|
34
|
+
$hoverState = props.$hoverState,
|
|
35
|
+
$hoverBackground = props.$hoverBackground;
|
|
36
|
+
var responsive = props.responsive === undefined ? true : props.responsive;
|
|
37
|
+
var styles = [];
|
|
38
|
+
if ($hoverBackground !== undefined) styles.push((0, _utils.backgroundStyle)($hoverBackground, theme));
|
|
39
|
+
if (($hoverState == null ? void 0 : $hoverState.border) !== undefined) styles.push((0, _utils.borderStyle)($hoverState.border, responsive, theme));
|
|
40
|
+
if (($hoverState == null ? void 0 : $hoverState.elevation) !== undefined) styles.push((0, _utils.elevationStyle)($hoverState.elevation));
|
|
41
|
+
if (($hoverState == null ? void 0 : $hoverState.pad) !== undefined) styles.push((0, _utils.edgeStyle)('padding', $hoverState.pad, responsive, theme.box.responsiveBreakpoint, theme));
|
|
42
|
+
if (($hoverState == null ? void 0 : $hoverState.round) !== undefined) styles.push($hoverState.round === false ? 'border-radius: 0;' : (0, _utils.roundStyle)($hoverState.round, responsive, theme));
|
|
43
|
+
return styles;
|
|
54
44
|
}, (0, _utils.focusStyle)({
|
|
55
45
|
inset: true
|
|
56
46
|
}));
|
|
@@ -69,7 +59,7 @@ var getDefaultPopupOption = function getDefaultPopupOption(_ref) {
|
|
|
69
59
|
return options[0];
|
|
70
60
|
};
|
|
71
61
|
var PopupColumn = function PopupColumn(_ref2) {
|
|
72
|
-
var _theme$
|
|
62
|
+
var _theme$timeInput;
|
|
73
63
|
var activeSection = _ref2.activeSection,
|
|
74
64
|
format = _ref2.format,
|
|
75
65
|
formatMessage = _ref2.formatMessage,
|
|
@@ -77,37 +67,40 @@ var PopupColumn = function PopupColumn(_ref2) {
|
|
|
77
67
|
label = _ref2.label,
|
|
78
68
|
messages = _ref2.messages,
|
|
79
69
|
onClickCommitOption = _ref2.onClickCommitOption,
|
|
80
|
-
onPointerCommitOption = _ref2.onPointerCommitOption,
|
|
81
70
|
onSetSection = _ref2.onSetSection,
|
|
82
71
|
options = _ref2.options,
|
|
83
72
|
section = _ref2.section,
|
|
84
73
|
sections = _ref2.sections,
|
|
85
|
-
theme = _ref2.theme
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
var maxHeight = maxHeightToken && ((_theme$global$size = theme.global.size) == null ? void 0 : _theme$global$size[maxHeightToken]) || ((_theme$timeInput = theme.timeInput) == null || (_theme$timeInput = _theme$timeInput.drop) == null || (_theme$timeInput = _theme$timeInput.column) == null ? void 0 : _theme$timeInput.maxHeight) || theme.global.size.small;
|
|
90
|
-
return /*#__PURE__*/_react["default"].createElement(PopupColumnBox, {
|
|
74
|
+
theme = _ref2.theme,
|
|
75
|
+
passThemeFlag = _ref2.passThemeFlag;
|
|
76
|
+
var columnTheme = ((_theme$timeInput = theme.timeInput) == null || (_theme$timeInput = _theme$timeInput.drop) == null ? void 0 : _theme$timeInput.column) || {};
|
|
77
|
+
return /*#__PURE__*/_react["default"].createElement(PopupColumnBox, _extends({
|
|
91
78
|
role: "listbox",
|
|
92
79
|
"aria-label": label,
|
|
93
|
-
gap: ((_theme$timeInput2 = theme.timeInput) == null || (_theme$timeInput2 = _theme$timeInput2.drop) == null || (_theme$timeInput2 = _theme$timeInput2.option) == null ? void 0 : _theme$timeInput2.gap) || 'xxsmall',
|
|
94
|
-
height: {
|
|
95
|
-
max: maxHeight
|
|
96
|
-
},
|
|
97
80
|
overflow: "auto",
|
|
98
81
|
flex: {
|
|
99
82
|
grow: 0,
|
|
100
83
|
shrink: 0
|
|
101
84
|
}
|
|
102
|
-
}, options.map(function (option) {
|
|
103
|
-
var _theme$timeInput3, _theme$timeInput4, _theme$timeInput5;
|
|
85
|
+
}, columnTheme, passThemeFlag), options.map(function (option) {
|
|
86
|
+
var _theme$timeInput2, _theme$timeInput3, _theme$timeInput4, _theme$timeInput5, _ref3, _hoverState$backgroun, _theme$timeInput6, _theme$timeInput7, _theme$timeInput8, _theme$timeInput$drop, _theme$timeInput9, _theme$timeInput0, _theme$timeInput1;
|
|
104
87
|
var key = optionKey(label, option);
|
|
105
88
|
var sectionHasValue = section === _utils2.SECTION_HOUR && sections.hour !== undefined || section === _utils2.SECTION_MINUTE && sections.minute !== undefined || section === _utils2.SECTION_SECOND && sections.second !== undefined || section === _utils2.SECTION_PERIOD && sections.period !== undefined;
|
|
106
89
|
|
|
107
90
|
// In empty state, keep focus defaults but avoid visually selecting
|
|
108
91
|
// options until the user makes an explicit choice.
|
|
109
92
|
var selected = section === _utils2.SECTION_HOUR && sections.hour === option || section === _utils2.SECTION_MINUTE && sections.minute === option || section === _utils2.SECTION_SECOND && sections.second === option || section === _utils2.SECTION_PERIOD && sections.period === option;
|
|
110
|
-
var optionColor = selected ? ((_theme$timeInput3 = theme.timeInput) == null || (_theme$timeInput3 = _theme$timeInput3.drop) == null || (_theme$timeInput3 = _theme$timeInput3.option) == null || (_theme$timeInput3 = _theme$timeInput3.
|
|
93
|
+
var optionColor = selected ? ((_theme$timeInput2 = theme.timeInput) == null || (_theme$timeInput2 = _theme$timeInput2.drop) == null || (_theme$timeInput2 = _theme$timeInput2.option) == null || (_theme$timeInput2 = _theme$timeInput2.text) == null || (_theme$timeInput2 = _theme$timeInput2.selected) == null ? void 0 : _theme$timeInput2.color) || ((_theme$timeInput3 = theme.timeInput) == null || (_theme$timeInput3 = _theme$timeInput3.drop) == null || (_theme$timeInput3 = _theme$timeInput3.option) == null || (_theme$timeInput3 = _theme$timeInput3.text) == null ? void 0 : _theme$timeInput3.color) || 'text' : ((_theme$timeInput4 = theme.timeInput) == null || (_theme$timeInput4 = _theme$timeInput4.drop) == null || (_theme$timeInput4 = _theme$timeInput4.option) == null || (_theme$timeInput4 = _theme$timeInput4.text) == null ? void 0 : _theme$timeInput4.color) || 'text';
|
|
94
|
+
var optionContainer = ((_theme$timeInput5 = theme.timeInput) == null || (_theme$timeInput5 = _theme$timeInput5.drop) == null || (_theme$timeInput5 = _theme$timeInput5.option) == null ? void 0 : _theme$timeInput5.container) || {};
|
|
95
|
+
var optionHover = optionContainer.hover,
|
|
96
|
+
_optionContainer$sele = optionContainer.selected,
|
|
97
|
+
selectedContainer = _optionContainer$sele === void 0 ? {} : _optionContainer$sele,
|
|
98
|
+
baseOptionStyles = _objectWithoutPropertiesLoose(optionContainer, _excluded);
|
|
99
|
+
var selectedHover = selectedContainer.hover,
|
|
100
|
+
selectedOptionStyles = _objectWithoutPropertiesLoose(selectedContainer, _excluded2);
|
|
101
|
+
var optionStyles = selected ? _extends({}, baseOptionStyles, selectedOptionStyles) : baseOptionStyles;
|
|
102
|
+
var hoverState = selected ? selectedHover : optionHover;
|
|
103
|
+
var hoverBackground = selected ? (_ref3 = (_hoverState$backgroun = hoverState == null ? void 0 : hoverState.background) != null ? _hoverState$backgroun : selectedContainer.background) != null ? _ref3 : baseOptionStyles.background : hoverState == null ? void 0 : hoverState.background;
|
|
111
104
|
var isActive = selected && activeSection === section;
|
|
112
105
|
var optionTabIndex = -1;
|
|
113
106
|
if (inline) {
|
|
@@ -124,66 +117,66 @@ var PopupColumn = function PopupColumn(_ref2) {
|
|
|
124
117
|
} else if (isActive) {
|
|
125
118
|
optionTabIndex = 0;
|
|
126
119
|
}
|
|
127
|
-
return /*#__PURE__*/_react["default"].createElement(PopupOption, {
|
|
120
|
+
return /*#__PURE__*/_react["default"].createElement(PopupOption, _extends({
|
|
128
121
|
key: key,
|
|
129
|
-
"data-option-key": key,
|
|
130
122
|
role: "option",
|
|
123
|
+
"data-option-key": key,
|
|
131
124
|
"aria-selected": selected,
|
|
132
125
|
tabIndex: optionTabIndex,
|
|
133
126
|
"aria-label": (section === _utils2.SECTION_PERIOD ? option : (0, _utils2.pad)(option)) + " " + (0, _utils2.getSectionName)(section, format, formatMessage, messages),
|
|
134
|
-
|
|
135
|
-
$
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
},
|
|
127
|
+
flex: false,
|
|
128
|
+
$hoverState: hoverState,
|
|
129
|
+
$hoverBackground: hoverBackground
|
|
130
|
+
}, optionStyles, {
|
|
131
|
+
// This option owns its inset :focus-visible indicator. Box's
|
|
132
|
+
// focus tracking can retain state when tabIndex becomes -1.
|
|
133
|
+
focusIndicator: false,
|
|
142
134
|
onClick: function onClick() {
|
|
143
135
|
return onClickCommitOption(section, option);
|
|
144
136
|
},
|
|
145
137
|
onFocus: function onFocus() {
|
|
146
138
|
return onSetSection(section);
|
|
147
139
|
}
|
|
148
|
-
}, /*#__PURE__*/_react["default"].createElement(_Text.Text, {
|
|
149
|
-
size: ((_theme$
|
|
150
|
-
weight: selected ? (_theme$
|
|
151
|
-
color: optionColor
|
|
140
|
+
}), /*#__PURE__*/_react["default"].createElement(_Text.Text, {
|
|
141
|
+
size: selected ? ((_theme$timeInput6 = theme.timeInput) == null || (_theme$timeInput6 = _theme$timeInput6.drop) == null || (_theme$timeInput6 = _theme$timeInput6.option) == null || (_theme$timeInput6 = _theme$timeInput6.text) == null || (_theme$timeInput6 = _theme$timeInput6.selected) == null ? void 0 : _theme$timeInput6.size) || ((_theme$timeInput7 = theme.timeInput) == null || (_theme$timeInput7 = _theme$timeInput7.drop) == null || (_theme$timeInput7 = _theme$timeInput7.option) == null || (_theme$timeInput7 = _theme$timeInput7.text) == null ? void 0 : _theme$timeInput7.size) || theme.global.input.font.size || 'small' : ((_theme$timeInput8 = theme.timeInput) == null || (_theme$timeInput8 = _theme$timeInput8.drop) == null || (_theme$timeInput8 = _theme$timeInput8.option) == null || (_theme$timeInput8 = _theme$timeInput8.text) == null ? void 0 : _theme$timeInput8.size) || theme.global.input.font.size || 'small',
|
|
142
|
+
weight: selected ? (_theme$timeInput$drop = (_theme$timeInput9 = theme.timeInput) == null || (_theme$timeInput9 = _theme$timeInput9.drop) == null || (_theme$timeInput9 = _theme$timeInput9.option) == null || (_theme$timeInput9 = _theme$timeInput9.text) == null || (_theme$timeInput9 = _theme$timeInput9.selected) == null ? void 0 : _theme$timeInput9.weight) != null ? _theme$timeInput$drop : (_theme$timeInput0 = theme.timeInput) == null || (_theme$timeInput0 = _theme$timeInput0.drop) == null || (_theme$timeInput0 = _theme$timeInput0.option) == null || (_theme$timeInput0 = _theme$timeInput0.text) == null ? void 0 : _theme$timeInput0.weight : (_theme$timeInput1 = theme.timeInput) == null || (_theme$timeInput1 = _theme$timeInput1.drop) == null || (_theme$timeInput1 = _theme$timeInput1.option) == null || (_theme$timeInput1 = _theme$timeInput1.text) == null ? void 0 : _theme$timeInput1.weight,
|
|
143
|
+
color: optionColor,
|
|
144
|
+
textAlign: "center"
|
|
152
145
|
}, section === _utils2.SECTION_PERIOD ? option : (0, _utils2.pad)(option)));
|
|
153
146
|
}));
|
|
154
147
|
};
|
|
155
|
-
var TimeInputPopup = exports.TimeInputPopup = function TimeInputPopup(
|
|
156
|
-
var _theme$
|
|
157
|
-
var activeSection =
|
|
158
|
-
align =
|
|
159
|
-
format =
|
|
160
|
-
formatMessage =
|
|
161
|
-
hoursOptions =
|
|
162
|
-
|
|
163
|
-
focusOnOpen =
|
|
164
|
-
id =
|
|
165
|
-
incrementSection =
|
|
166
|
-
messages =
|
|
167
|
-
minuteOptions =
|
|
168
|
-
onClose =
|
|
169
|
-
onFocusLeave =
|
|
170
|
-
secondOptions =
|
|
171
|
-
sectionOrder =
|
|
172
|
-
sections =
|
|
173
|
-
setActiveSection =
|
|
174
|
-
setSectionValue =
|
|
175
|
-
target =
|
|
176
|
-
dropProps =
|
|
177
|
-
label =
|
|
178
|
-
|
|
179
|
-
inline =
|
|
180
|
-
onKeyDownProp =
|
|
181
|
-
rest = _objectWithoutPropertiesLoose(
|
|
148
|
+
var TimeInputPopup = exports.TimeInputPopup = function TimeInputPopup(_ref4) {
|
|
149
|
+
var _theme$timeInput10, _dropWidth$max;
|
|
150
|
+
var activeSection = _ref4.activeSection,
|
|
151
|
+
align = _ref4.align,
|
|
152
|
+
format = _ref4.format,
|
|
153
|
+
formatMessage = _ref4.formatMessage,
|
|
154
|
+
hoursOptions = _ref4.hoursOptions,
|
|
155
|
+
_ref4$focusOnOpen = _ref4.focusOnOpen,
|
|
156
|
+
focusOnOpen = _ref4$focusOnOpen === void 0 ? true : _ref4$focusOnOpen,
|
|
157
|
+
id = _ref4.id,
|
|
158
|
+
incrementSection = _ref4.incrementSection,
|
|
159
|
+
messages = _ref4.messages,
|
|
160
|
+
minuteOptions = _ref4.minuteOptions,
|
|
161
|
+
onClose = _ref4.onClose,
|
|
162
|
+
onFocusLeave = _ref4.onFocusLeave,
|
|
163
|
+
secondOptions = _ref4.secondOptions,
|
|
164
|
+
sectionOrder = _ref4.sectionOrder,
|
|
165
|
+
sections = _ref4.sections,
|
|
166
|
+
setActiveSection = _ref4.setActiveSection,
|
|
167
|
+
setSectionValue = _ref4.setSectionValue,
|
|
168
|
+
target = _ref4.target,
|
|
169
|
+
dropProps = _ref4.dropProps,
|
|
170
|
+
label = _ref4.label,
|
|
171
|
+
_ref4$inline = _ref4.inline,
|
|
172
|
+
inline = _ref4$inline === void 0 ? false : _ref4$inline,
|
|
173
|
+
onKeyDownProp = _ref4.onKeyDown,
|
|
174
|
+
rest = _objectWithoutPropertiesLoose(_ref4, _excluded3);
|
|
182
175
|
var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
|
|
183
|
-
theme = _useThemeValue.theme
|
|
176
|
+
theme = _useThemeValue.theme,
|
|
177
|
+
passThemeFlag = _useThemeValue.passThemeFlag;
|
|
184
178
|
var dialogRef = (0, _react.useRef)();
|
|
185
179
|
var pointerDownInsideRef = (0, _react.useRef)(false);
|
|
186
|
-
var pointerSelectionCommittedRef = (0, _react.useRef)(false);
|
|
187
180
|
var suppressNextAutoScrollRef = (0, _react.useRef)(false);
|
|
188
181
|
var wheelInteractionTimeoutRef = (0, _react.useRef)();
|
|
189
182
|
var pointerReleaseTimeoutRef = (0, _react.useRef)();
|
|
@@ -219,18 +212,14 @@ var TimeInputPopup = exports.TimeInputPopup = function TimeInputPopup(_ref3) {
|
|
|
219
212
|
setActiveSection(section);
|
|
220
213
|
setSectionValue(section, option);
|
|
221
214
|
}, [setActiveSection, setSectionValue]);
|
|
222
|
-
|
|
223
|
-
|
|
215
|
+
|
|
216
|
+
// Commit on the up-event (click), not mousedown - see WCAG 2.5.2 (Pointer
|
|
217
|
+
// Cancellation). Committing on press would leave no way to abort by
|
|
218
|
+
// moving the pointer off-target before releasing.
|
|
219
|
+
var commitClickOptionSelection = (0, _react.useCallback)(function (section, option) {
|
|
224
220
|
suppressNextAutoScroll();
|
|
225
221
|
commitOptionSelection(section, option);
|
|
226
222
|
}, [commitOptionSelection, suppressNextAutoScroll]);
|
|
227
|
-
var commitClickOptionSelection = (0, _react.useCallback)(function (section, option) {
|
|
228
|
-
if (pointerSelectionCommittedRef.current) {
|
|
229
|
-
pointerSelectionCommittedRef.current = false;
|
|
230
|
-
return;
|
|
231
|
-
}
|
|
232
|
-
commitOptionSelection(section, option);
|
|
233
|
-
}, [commitOptionSelection]);
|
|
234
223
|
var onPopupWheelCapture = (0, _react.useCallback)(function () {
|
|
235
224
|
pointerDownInsideRef.current = true;
|
|
236
225
|
if (wheelInteractionTimeoutRef.current) {
|
|
@@ -269,8 +258,8 @@ var TimeInputPopup = exports.TimeInputPopup = function TimeInputPopup(_ref3) {
|
|
|
269
258
|
label: 'period',
|
|
270
259
|
options: ['AM', 'PM']
|
|
271
260
|
}];
|
|
272
|
-
var visiblePopupSections = popupSections.filter(function (
|
|
273
|
-
var section =
|
|
261
|
+
var visiblePopupSections = popupSections.filter(function (_ref5) {
|
|
262
|
+
var section = _ref5.section;
|
|
274
263
|
return sectionOrder.includes(section);
|
|
275
264
|
});
|
|
276
265
|
var getSectionFromLabel = (0, _react.useCallback)(function (listboxLabel) {
|
|
@@ -315,8 +304,8 @@ var TimeInputPopup = exports.TimeInputPopup = function TimeInputPopup(_ref3) {
|
|
|
315
304
|
format: format,
|
|
316
305
|
options: secondOptions
|
|
317
306
|
}), _sectionValue[_utils2.SECTION_PERIOD] = sections.period || 'AM', _sectionValue);
|
|
318
|
-
visiblePopupSections.forEach(function (
|
|
319
|
-
var section =
|
|
307
|
+
visiblePopupSections.forEach(function (_ref6) {
|
|
308
|
+
var section = _ref6.section;
|
|
320
309
|
var labelValue = sectionLabel[section];
|
|
321
310
|
if (!labelValue) return;
|
|
322
311
|
var listboxNode = popupNode.querySelector("[role=\"listbox\"][aria-label=\"" + labelValue + "\"]");
|
|
@@ -402,27 +391,36 @@ var TimeInputPopup = exports.TimeInputPopup = function TimeInputPopup(_ref3) {
|
|
|
402
391
|
if (rafB) window.cancelAnimationFrame(rafB);
|
|
403
392
|
};
|
|
404
393
|
}, [focusCurrentPopupOption, focusOnOpen, scrollSelectedOptionsIntoView]);
|
|
394
|
+
var dropTheme = (_theme$timeInput10 = theme.timeInput) == null ? void 0 : _theme$timeInput10.drop;
|
|
395
|
+
var column = dropTheme.column,
|
|
396
|
+
option = dropTheme.option,
|
|
397
|
+
dropBoxTheme = _objectWithoutPropertiesLoose(dropTheme, _excluded4);
|
|
398
|
+
var dropWidth = dropBoxTheme.width;
|
|
399
|
+
var popupWidth = typeof dropWidth === 'object' ? _extends({}, dropWidth, {
|
|
400
|
+
max: (_dropWidth$max = dropWidth.max) != null ? _dropWidth$max : '100%'
|
|
401
|
+
}) : {
|
|
402
|
+
width: dropWidth,
|
|
403
|
+
max: '100%'
|
|
404
|
+
};
|
|
405
405
|
var popupContent = /*#__PURE__*/_react["default"].createElement(_Box.Box, _extends({
|
|
406
406
|
ref: dialogRef,
|
|
407
407
|
role: inline ? undefined : 'dialog',
|
|
408
408
|
"aria-label": inline ? undefined : label,
|
|
409
409
|
direction: "row",
|
|
410
|
-
width:
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
gap: ((_theme$timeInput8 = theme.timeInput) == null || (_theme$timeInput8 = _theme$timeInput8.drop) == null ? void 0 : _theme$timeInput8.gap) || 'xsmall',
|
|
416
|
-
pad: inline ? 'none' : ((_theme$timeInput9 = theme.timeInput) == null || (_theme$timeInput9 = _theme$timeInput9.drop) == null ? void 0 : _theme$timeInput9.pad) || 'small',
|
|
410
|
+
width: popupWidth
|
|
411
|
+
}, dropBoxTheme, {
|
|
412
|
+
height: inline ? '100%' : dropBoxTheme.height,
|
|
413
|
+
pad: inline ? 'none' : dropBoxTheme.pad,
|
|
414
|
+
responsive: false,
|
|
417
415
|
onPointerDownCapture: markInteractionInProgress,
|
|
418
416
|
onPointerUpCapture: releaseInteractionAfterClick,
|
|
419
417
|
onPointerCancelCapture: clearInteractionInProgress,
|
|
420
418
|
onWheelCapture: onPopupWheelCapture,
|
|
421
419
|
onKeyDown: function onKeyDown(event) {
|
|
422
|
-
var
|
|
420
|
+
var _ref7;
|
|
423
421
|
var eventSectionFromTarget = getSectionFromEventTarget(event.target);
|
|
424
422
|
var eventSectionFromActiveElement = getSectionFromEventTarget(document.activeElement);
|
|
425
|
-
var eventSection = (
|
|
423
|
+
var eventSection = (_ref7 = eventSectionFromTarget != null ? eventSectionFromTarget : eventSectionFromActiveElement) != null ? _ref7 : activeSection;
|
|
426
424
|
if (event.key === 'Escape') {
|
|
427
425
|
if (onClose) {
|
|
428
426
|
event.preventDefault();
|
|
@@ -451,10 +449,10 @@ var TimeInputPopup = exports.TimeInputPopup = function TimeInputPopup(_ref3) {
|
|
|
451
449
|
setActiveSection(getAdjacentSection(eventSection, 1));
|
|
452
450
|
} else if (event.key === 'ArrowUp') {
|
|
453
451
|
event.preventDefault();
|
|
454
|
-
incrementSection(eventSection, 1);
|
|
452
|
+
incrementSection(eventSection, -1, true);
|
|
455
453
|
} else if (event.key === 'ArrowDown') {
|
|
456
454
|
event.preventDefault();
|
|
457
|
-
incrementSection(eventSection,
|
|
455
|
+
incrementSection(eventSection, 1, true);
|
|
458
456
|
}
|
|
459
457
|
onKeyDownProp == null || onKeyDownProp(event);
|
|
460
458
|
},
|
|
@@ -474,10 +472,10 @@ var TimeInputPopup = exports.TimeInputPopup = function TimeInputPopup(_ref3) {
|
|
|
474
472
|
onFocusLeave == null || onFocusLeave();
|
|
475
473
|
}
|
|
476
474
|
}
|
|
477
|
-
}, rest), visiblePopupSections.map(function (
|
|
478
|
-
var section =
|
|
479
|
-
sectionLabel =
|
|
480
|
-
options =
|
|
475
|
+
}, rest), visiblePopupSections.map(function (_ref8) {
|
|
476
|
+
var section = _ref8.section,
|
|
477
|
+
sectionLabel = _ref8.label,
|
|
478
|
+
options = _ref8.options;
|
|
481
479
|
return /*#__PURE__*/_react["default"].createElement(PopupColumn, {
|
|
482
480
|
key: sectionLabel,
|
|
483
481
|
activeSection: activeSection,
|
|
@@ -487,12 +485,12 @@ var TimeInputPopup = exports.TimeInputPopup = function TimeInputPopup(_ref3) {
|
|
|
487
485
|
label: sectionLabel,
|
|
488
486
|
messages: messages,
|
|
489
487
|
onClickCommitOption: commitClickOptionSelection,
|
|
490
|
-
onPointerCommitOption: commitPointerOptionSelection,
|
|
491
488
|
onSetSection: setActiveSection,
|
|
492
489
|
options: options,
|
|
493
490
|
section: section,
|
|
494
491
|
sections: sections,
|
|
495
|
-
theme: theme
|
|
492
|
+
theme: theme,
|
|
493
|
+
passThemeFlag: passThemeFlag
|
|
496
494
|
});
|
|
497
495
|
}));
|
|
498
496
|
if (inline) return popupContent;
|
|
@@ -7,12 +7,14 @@ export interface TimeInputProps {
|
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
format?: '12' | '24';
|
|
9
9
|
id?: string;
|
|
10
|
+
inline?: boolean;
|
|
10
11
|
messages?: {
|
|
11
12
|
activePeriodValue?: string;
|
|
12
13
|
activeSection?: string;
|
|
13
14
|
activeSectionValue?: string;
|
|
14
15
|
chooseTime?: string;
|
|
15
16
|
currentValue?: string;
|
|
17
|
+
currentValueWithoutSeconds?: string;
|
|
16
18
|
inputLabel?: string;
|
|
17
19
|
invalidTime?: string;
|
|
18
20
|
openDrop?: string;
|
|
@@ -14,12 +14,14 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
14
14
|
disabled: _propTypes["default"].bool,
|
|
15
15
|
format: _propTypes["default"].oneOf(['12', '24']),
|
|
16
16
|
id: _propTypes["default"].string,
|
|
17
|
+
inline: _propTypes["default"].bool,
|
|
17
18
|
messages: _propTypes["default"].shape({
|
|
18
19
|
activePeriodValue: _propTypes["default"].string,
|
|
19
20
|
activeSection: _propTypes["default"].string,
|
|
20
21
|
activeSectionValue: _propTypes["default"].string,
|
|
21
22
|
chooseTime: _propTypes["default"].string,
|
|
22
23
|
currentValue: _propTypes["default"].string,
|
|
24
|
+
currentValueWithoutSeconds: _propTypes["default"].string,
|
|
23
25
|
inputLabel: _propTypes["default"].string,
|
|
24
26
|
invalidTime: _propTypes["default"].string,
|
|
25
27
|
openDrop: _propTypes["default"].string,
|
|
@@ -5,7 +5,7 @@ import React from 'react';
|
|
|
5
5
|
import { Box, Button, Text, TimeInput } from 'grommet';
|
|
6
6
|
|
|
7
7
|
export const Controlled = () => {
|
|
8
|
-
const [value, setValue] = React.useState('12:34
|
|
8
|
+
const [value, setValue] = React.useState('12:34');
|
|
9
9
|
|
|
10
10
|
const onChange = ({ value: next }: { value?: string }) => {
|
|
11
11
|
console.log('onChange iso time:', next);
|
|
@@ -19,7 +19,7 @@ export const Controlled = () => {
|
|
|
19
19
|
</Text>
|
|
20
20
|
<TimeInput format="12" value={value} onChange={onChange} />
|
|
21
21
|
<Box direction="row" gap="small">
|
|
22
|
-
<Button label="Set 01:02
|
|
22
|
+
<Button label="Set 01:02 PM" onClick={() => setValue('13:02')} />
|
|
23
23
|
<Button label="Clear" onClick={() => setValue('')} />
|
|
24
24
|
</Box>
|
|
25
25
|
</Box>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: © Hewlett Packard Enterprise Development LP
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Box, Grommet, Heading, TimeInput, ThemeType } from 'grommet';
|
|
5
|
+
import { FormClock } from 'grommet-icons';
|
|
6
|
+
|
|
7
|
+
const theme: ThemeType = {
|
|
8
|
+
timeInput: {
|
|
9
|
+
container: {
|
|
10
|
+
border: { color: 'brand', size: 'small' },
|
|
11
|
+
round: 'small',
|
|
12
|
+
},
|
|
13
|
+
value: {
|
|
14
|
+
pad: { horizontal: 'small' },
|
|
15
|
+
background: 'background-front',
|
|
16
|
+
round: 'xsmall',
|
|
17
|
+
},
|
|
18
|
+
segment: {
|
|
19
|
+
color: 'text',
|
|
20
|
+
placeholder: { color: 'text-weak' },
|
|
21
|
+
size: 'medium',
|
|
22
|
+
weight: 500,
|
|
23
|
+
pad: 'xxsmall',
|
|
24
|
+
active: {
|
|
25
|
+
background: 'background-contrast',
|
|
26
|
+
border: { color: 'brand', side: 'bottom', size: 'small' },
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
dropButton: {
|
|
30
|
+
icon: <FormClock />,
|
|
31
|
+
background: 'brand',
|
|
32
|
+
color: 'white',
|
|
33
|
+
padding: { vertical: 'xsmall', horizontal: 'small' },
|
|
34
|
+
},
|
|
35
|
+
drop: {
|
|
36
|
+
background: 'background-front',
|
|
37
|
+
border: { color: 'border', size: 'small' },
|
|
38
|
+
round: 'small',
|
|
39
|
+
pad: 'xsmall',
|
|
40
|
+
width: '20rem',
|
|
41
|
+
column: {
|
|
42
|
+
height: { max: 'medium' },
|
|
43
|
+
gap: 'xxsmall',
|
|
44
|
+
pad: { horizontal: 'xsmall' },
|
|
45
|
+
round: 'small',
|
|
46
|
+
},
|
|
47
|
+
option: {
|
|
48
|
+
container: {
|
|
49
|
+
pad: { vertical: 'xsmall', horizontal: 'small' },
|
|
50
|
+
round: 'xsmall',
|
|
51
|
+
hover: { background: 'background-contrast' },
|
|
52
|
+
selected: {
|
|
53
|
+
background: 'selected',
|
|
54
|
+
hover: { background: 'brand' },
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
text: {
|
|
58
|
+
size: 'small',
|
|
59
|
+
selected: { color: 'white', weight: 600 },
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const CustomThemed = () => (
|
|
67
|
+
<Grommet theme={theme}>
|
|
68
|
+
<Box gap="medium" pad="large" width="medium">
|
|
69
|
+
<Heading level={3} margin="none">
|
|
70
|
+
Custom themed time input
|
|
71
|
+
</Heading>
|
|
72
|
+
<TimeInput format="12" defaultValue="10:15:20" />
|
|
73
|
+
</Box>
|
|
74
|
+
</Grommet>
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
export default {
|
|
78
|
+
title: 'Input/TimeInput/Custom Themed',
|
|
79
|
+
};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: © Hewlett Packard Enterprise Development LP
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
import { hpe } from 'grommet-theme-hpe';
|
|
6
|
+
import {
|
|
7
|
+
Box,
|
|
8
|
+
Grommet,
|
|
9
|
+
Heading,
|
|
10
|
+
ThemeContext,
|
|
11
|
+
ThemeType,
|
|
12
|
+
TimeInput,
|
|
13
|
+
} from 'grommet';
|
|
14
|
+
import { deepMerge } from 'grommet/utils';
|
|
15
|
+
import {
|
|
16
|
+
components,
|
|
17
|
+
dimension,
|
|
18
|
+
global as globalTokens,
|
|
19
|
+
} from 'hpe-design-tokens/grommet';
|
|
20
|
+
|
|
21
|
+
const { hpe: hpeComponents } = components;
|
|
22
|
+
const { hpe: hpeDimension } = dimension;
|
|
23
|
+
const { hpe: hpeGlobal } = globalTokens;
|
|
24
|
+
|
|
25
|
+
const theme: ThemeType = deepMerge({}, hpe);
|
|
26
|
+
theme.timeInput = {
|
|
27
|
+
container: {
|
|
28
|
+
round: hpeComponents.formField.default.medium.input.container.borderRadius,
|
|
29
|
+
},
|
|
30
|
+
segment: {
|
|
31
|
+
pad: {
|
|
32
|
+
start: hpeDimension.spacing['5xsmall'],
|
|
33
|
+
end: hpeDimension.spacing['5xsmall'],
|
|
34
|
+
},
|
|
35
|
+
active: {
|
|
36
|
+
background: 'background-active',
|
|
37
|
+
border: {
|
|
38
|
+
size: 'small',
|
|
39
|
+
color: 'focus',
|
|
40
|
+
},
|
|
41
|
+
pad: {
|
|
42
|
+
start: hpeDimension.spacing['5xsmall'],
|
|
43
|
+
end: hpeDimension.spacing['5xsmall'],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
drop: {
|
|
48
|
+
column: {
|
|
49
|
+
gap: hpeDimension.spacing['4xsmall'],
|
|
50
|
+
pad: { horizontal: '3xsmall' },
|
|
51
|
+
},
|
|
52
|
+
pad: { horizontal: '3xsmall', vertical: 'xsmall' },
|
|
53
|
+
option: {
|
|
54
|
+
container: {
|
|
55
|
+
pad: {
|
|
56
|
+
vertical: hpeComponents.element.medium.paddingY,
|
|
57
|
+
horizontal: hpeComponents.element.medium.paddingX.default,
|
|
58
|
+
},
|
|
59
|
+
round: hpeDimension.radius.xxsmall,
|
|
60
|
+
hover: {
|
|
61
|
+
background: 'background-active',
|
|
62
|
+
},
|
|
63
|
+
selected: {
|
|
64
|
+
background: 'background-selected-primary-strong',
|
|
65
|
+
hover: {
|
|
66
|
+
background: 'background-selected-primary-strong-hover',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
text: {
|
|
71
|
+
size: hpeDimension.text.medium.fontSize,
|
|
72
|
+
selected: {
|
|
73
|
+
color: 'text-onSelectedPrimaryStrong',
|
|
74
|
+
weight: hpeGlobal.fontWeight.medium,
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export const CustomThemedHpe = () => (
|
|
82
|
+
<Grommet theme={theme}>
|
|
83
|
+
<Box gap="xlarge" pad="large">
|
|
84
|
+
<Box width="medium" gap="medium">
|
|
85
|
+
<Heading level={3} margin="none">
|
|
86
|
+
Full TimeInput theme, extending grommet-theme-hpe
|
|
87
|
+
</Heading>
|
|
88
|
+
<TimeInput format="12" showSeconds />
|
|
89
|
+
<TimeInput format="12" />
|
|
90
|
+
<TimeInput format="24" showSeconds />
|
|
91
|
+
<TimeInput format="24" />
|
|
92
|
+
</Box>
|
|
93
|
+
<ThemeContext.Extend value={{ dark: true }}>
|
|
94
|
+
<Box
|
|
95
|
+
width="medium"
|
|
96
|
+
gap="medium"
|
|
97
|
+
pad="large"
|
|
98
|
+
background="background-front"
|
|
99
|
+
>
|
|
100
|
+
<Heading level={3} margin="none">
|
|
101
|
+
Dark Theme
|
|
102
|
+
</Heading>
|
|
103
|
+
<TimeInput format="12" showSeconds />
|
|
104
|
+
<TimeInput format="12" />
|
|
105
|
+
<TimeInput format="24" showSeconds />
|
|
106
|
+
<TimeInput format="24" />
|
|
107
|
+
</Box>
|
|
108
|
+
</ThemeContext.Extend>
|
|
109
|
+
</Box>
|
|
110
|
+
</Grommet>
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
export default {
|
|
114
|
+
title: 'Input/TimeInput/Custom Themed/Hpe',
|
|
115
|
+
};
|