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
|
@@ -0,0 +1,630 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: © Hewlett Packard Enterprise Development LP
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
5
|
+
import {
|
|
6
|
+
Box,
|
|
7
|
+
Button,
|
|
8
|
+
CheckBox,
|
|
9
|
+
CheckBoxGroup,
|
|
10
|
+
DateInput,
|
|
11
|
+
DateTimeInput,
|
|
12
|
+
FileInput,
|
|
13
|
+
Form,
|
|
14
|
+
FormField,
|
|
15
|
+
Grommet,
|
|
16
|
+
Heading,
|
|
17
|
+
MaskedInput,
|
|
18
|
+
Paragraph,
|
|
19
|
+
RadioButtonGroup,
|
|
20
|
+
RangeInput,
|
|
21
|
+
RangeSelector,
|
|
22
|
+
Select,
|
|
23
|
+
SelectMultiple,
|
|
24
|
+
StarRating,
|
|
25
|
+
TextArea,
|
|
26
|
+
TextInput,
|
|
27
|
+
ThumbsRating,
|
|
28
|
+
TimeInput,
|
|
29
|
+
} from 'grommet';
|
|
30
|
+
import { ThemeType } from 'grommet/themes';
|
|
31
|
+
import { deepMerge } from 'grommet/utils';
|
|
32
|
+
import { hpe } from 'grommet-theme-hpe';
|
|
33
|
+
|
|
34
|
+
const customTheme: ThemeType = {
|
|
35
|
+
global: {
|
|
36
|
+
colors: {
|
|
37
|
+
'form-surface': '#EEF2F6',
|
|
38
|
+
'input-surface': '#FFFFFF',
|
|
39
|
+
'input-hover': '#E6F0FF',
|
|
40
|
+
'notes-surface': '#F8FAFF',
|
|
41
|
+
'control-selected': '#D9E8FF',
|
|
42
|
+
'control-selected-hover': '#B8D3FF',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
formField: {
|
|
46
|
+
background: 'input-surface',
|
|
47
|
+
hover: { background: 'input-hover' },
|
|
48
|
+
textArea: { background: 'notes-surface' },
|
|
49
|
+
checkBoxGroup: {
|
|
50
|
+
background: 'transparent',
|
|
51
|
+
border: { color: 'transparent' },
|
|
52
|
+
error: { border: { color: 'status-critical' } },
|
|
53
|
+
hover: { background: 'transparent' },
|
|
54
|
+
},
|
|
55
|
+
radioButtonGroup: {
|
|
56
|
+
background: 'transparent',
|
|
57
|
+
border: { color: 'transparent' },
|
|
58
|
+
error: { border: { color: 'status-critical' } },
|
|
59
|
+
hover: { background: 'transparent' },
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
checkBox: {
|
|
63
|
+
container: {
|
|
64
|
+
border: [
|
|
65
|
+
{ side: 'top', color: 'blue', size: '4px' },
|
|
66
|
+
{ side: 'bottom', color: 'orange', size: '2px' },
|
|
67
|
+
],
|
|
68
|
+
hover: { border: { color: 'red' } },
|
|
69
|
+
},
|
|
70
|
+
control: {
|
|
71
|
+
background: 'input-surface',
|
|
72
|
+
hover: { background: 'input-hover' },
|
|
73
|
+
selected: {
|
|
74
|
+
background: 'control-selected',
|
|
75
|
+
hover: { background: 'control-selected-hover' },
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
radioButton: {
|
|
80
|
+
control: {
|
|
81
|
+
background: 'input-surface',
|
|
82
|
+
hover: { background: 'input-hover' },
|
|
83
|
+
selected: {
|
|
84
|
+
background: 'control-selected',
|
|
85
|
+
hover: { background: 'control-selected-hover' },
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const hpeTheme: ThemeType = deepMerge(hpe, {
|
|
92
|
+
global: {
|
|
93
|
+
colors: {
|
|
94
|
+
'form-surface': 'background-back',
|
|
95
|
+
},
|
|
96
|
+
input: {
|
|
97
|
+
extend: undefined,
|
|
98
|
+
background: 'background-front',
|
|
99
|
+
border: { color: 'border' },
|
|
100
|
+
font: {},
|
|
101
|
+
pad: { horizontal: 'xxsmall', vertical: '3xsmall' },
|
|
102
|
+
// padding: {},
|
|
103
|
+
round: 'none',
|
|
104
|
+
placeholder: {
|
|
105
|
+
color: 'placeholder',
|
|
106
|
+
// weight: 700
|
|
107
|
+
},
|
|
108
|
+
// Application states
|
|
109
|
+
disabled: {
|
|
110
|
+
// background: 'background-contrast',
|
|
111
|
+
// border: { color: 'blue' },
|
|
112
|
+
},
|
|
113
|
+
readOnly: { background: 'background-back', border: { color: 'border' } },
|
|
114
|
+
// Interactive states
|
|
115
|
+
hover: {
|
|
116
|
+
// background: 'background-hover',
|
|
117
|
+
border: { color: 'border-strong' },
|
|
118
|
+
},
|
|
119
|
+
// focus: { border: { color: 'focus' } },
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
checkBox: {
|
|
123
|
+
container: {
|
|
124
|
+
width: 'auto',
|
|
125
|
+
pad: { vertical: '3xsmall', horizontal: 'xxsmall' },
|
|
126
|
+
round: 'xsmall',
|
|
127
|
+
hover: {
|
|
128
|
+
background: 'background-hover',
|
|
129
|
+
extend: undefined,
|
|
130
|
+
},
|
|
131
|
+
extend: undefined,
|
|
132
|
+
},
|
|
133
|
+
control: {
|
|
134
|
+
background: 'background-front',
|
|
135
|
+
hover: {
|
|
136
|
+
background: 'background-hover',
|
|
137
|
+
border: { color: 'border-strong' },
|
|
138
|
+
},
|
|
139
|
+
selected: {
|
|
140
|
+
background: 'background-selected-primary-strong',
|
|
141
|
+
border: {
|
|
142
|
+
color: 'border-selected',
|
|
143
|
+
},
|
|
144
|
+
hover: {
|
|
145
|
+
background: 'background-selected-primary-strong-hover',
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
check: { extend: undefined },
|
|
150
|
+
hover: {
|
|
151
|
+
extend: undefined,
|
|
152
|
+
},
|
|
153
|
+
icon: { extend: undefined },
|
|
154
|
+
extend: undefined,
|
|
155
|
+
},
|
|
156
|
+
checkBoxGroup: {
|
|
157
|
+
container: {
|
|
158
|
+
gap: 'none',
|
|
159
|
+
extend: undefined,
|
|
160
|
+
},
|
|
161
|
+
extend: undefined,
|
|
162
|
+
},
|
|
163
|
+
dateInput: {
|
|
164
|
+
container: {
|
|
165
|
+
round: 'large',
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
fileInput: {
|
|
169
|
+
border: { style: 'dashed' as const },
|
|
170
|
+
hover: {
|
|
171
|
+
border: { color: 'border-strong' },
|
|
172
|
+
},
|
|
173
|
+
dragOver: {
|
|
174
|
+
background: 'background-hover',
|
|
175
|
+
border: { color: 'border-strong' },
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
formField: {
|
|
179
|
+
background: 'background-front',
|
|
180
|
+
checkBoxGroup: {
|
|
181
|
+
background: 'transparent',
|
|
182
|
+
border: {
|
|
183
|
+
color: 'transparent',
|
|
184
|
+
},
|
|
185
|
+
container: {
|
|
186
|
+
extend: undefined,
|
|
187
|
+
},
|
|
188
|
+
error: {
|
|
189
|
+
border: {
|
|
190
|
+
color: 'border-critical',
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
dateInput: {
|
|
195
|
+
container: {
|
|
196
|
+
// round: 'large',
|
|
197
|
+
},
|
|
198
|
+
round: 'large',
|
|
199
|
+
},
|
|
200
|
+
radioButtonGroup: {
|
|
201
|
+
background: 'transparent',
|
|
202
|
+
border: {
|
|
203
|
+
color: 'transparent',
|
|
204
|
+
},
|
|
205
|
+
error: { border: { color: 'border-critical' } },
|
|
206
|
+
container: {
|
|
207
|
+
extend: undefined,
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
starRating: {
|
|
211
|
+
container: {
|
|
212
|
+
extend: undefined,
|
|
213
|
+
},
|
|
214
|
+
background: 'transparent',
|
|
215
|
+
border: {
|
|
216
|
+
color: 'transparent',
|
|
217
|
+
},
|
|
218
|
+
extend: undefined,
|
|
219
|
+
},
|
|
220
|
+
thumbsRating: {
|
|
221
|
+
container: {
|
|
222
|
+
extend: undefined,
|
|
223
|
+
},
|
|
224
|
+
background: 'transparent',
|
|
225
|
+
border: {
|
|
226
|
+
color: 'transparent',
|
|
227
|
+
},
|
|
228
|
+
extend: undefined,
|
|
229
|
+
},
|
|
230
|
+
extend: undefined,
|
|
231
|
+
},
|
|
232
|
+
radioButton: {
|
|
233
|
+
control: {
|
|
234
|
+
background: 'background-front',
|
|
235
|
+
hover: {
|
|
236
|
+
background: 'background-hover',
|
|
237
|
+
border: { color: 'border-strong' },
|
|
238
|
+
},
|
|
239
|
+
selected: {
|
|
240
|
+
background: 'background-selected-primary-strong',
|
|
241
|
+
border: { color: 'border-selected' },
|
|
242
|
+
hover: { background: 'background-selected-primary-strong-hover' },
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
check: { extend: undefined },
|
|
246
|
+
container: {
|
|
247
|
+
width: 'auto',
|
|
248
|
+
pad: { vertical: '3xsmall', horizontal: 'xxsmall' },
|
|
249
|
+
round: 'xsmall',
|
|
250
|
+
hover: { background: 'background-hover' },
|
|
251
|
+
extend: undefined,
|
|
252
|
+
},
|
|
253
|
+
icon: { extend: undefined },
|
|
254
|
+
extend: undefined,
|
|
255
|
+
},
|
|
256
|
+
radioButtonGroup: {
|
|
257
|
+
container: {
|
|
258
|
+
gap: 'none',
|
|
259
|
+
extend: undefined,
|
|
260
|
+
},
|
|
261
|
+
extend: undefined,
|
|
262
|
+
},
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
const AppearanceStory = () => {
|
|
266
|
+
const [theme, setTheme] = React.useState(hpeTheme);
|
|
267
|
+
const [themeMode, setThemeMode] = React.useState<'auto' | 'light' | 'dark'>(
|
|
268
|
+
'auto',
|
|
269
|
+
);
|
|
270
|
+
const [error, setError] = React.useState<string | undefined>(
|
|
271
|
+
'Please review this value.',
|
|
272
|
+
);
|
|
273
|
+
|
|
274
|
+
return (
|
|
275
|
+
<Grommet theme={theme} themeMode={themeMode}>
|
|
276
|
+
<Box pad="large" gap="large">
|
|
277
|
+
<Box direction="row" gap="medium">
|
|
278
|
+
<RadioButtonGroup
|
|
279
|
+
aria-label="Theme"
|
|
280
|
+
direction="row"
|
|
281
|
+
name="theme"
|
|
282
|
+
options={['Custom', 'HPE']}
|
|
283
|
+
defaultValue="HPE"
|
|
284
|
+
onChange={(event) => {
|
|
285
|
+
const nextTheme =
|
|
286
|
+
event.target.value === 'HPE' ? hpeTheme : customTheme;
|
|
287
|
+
setTheme(nextTheme);
|
|
288
|
+
}}
|
|
289
|
+
/>
|
|
290
|
+
<CheckBox
|
|
291
|
+
label="Theme mode"
|
|
292
|
+
name="themeMode"
|
|
293
|
+
checked={themeMode === 'dark'}
|
|
294
|
+
onChange={(event) =>
|
|
295
|
+
setThemeMode(event.target.checked ? 'dark' : 'light')
|
|
296
|
+
}
|
|
297
|
+
toggle
|
|
298
|
+
/>
|
|
299
|
+
<CheckBox
|
|
300
|
+
label="Error"
|
|
301
|
+
name="error"
|
|
302
|
+
checked={!!error}
|
|
303
|
+
onChange={(event) =>
|
|
304
|
+
setError(
|
|
305
|
+
event.target.checked ? 'Please review this value.' : undefined,
|
|
306
|
+
)
|
|
307
|
+
}
|
|
308
|
+
toggle
|
|
309
|
+
/>
|
|
310
|
+
</Box>
|
|
311
|
+
<Box direction="row" gap="medium">
|
|
312
|
+
<Box
|
|
313
|
+
background="form-surface"
|
|
314
|
+
pad="large"
|
|
315
|
+
round="small"
|
|
316
|
+
gap="medium"
|
|
317
|
+
width="large"
|
|
318
|
+
>
|
|
319
|
+
<Box gap="small">
|
|
320
|
+
<Heading level={2} margin="none">
|
|
321
|
+
Input surfaces
|
|
322
|
+
</Heading>
|
|
323
|
+
<Paragraph>
|
|
324
|
+
Hover over each field. Labels and messages stay on the form
|
|
325
|
+
surface, while checkbox and radio groups remain transparent.
|
|
326
|
+
</Paragraph>
|
|
327
|
+
</Box>
|
|
328
|
+
<Form>
|
|
329
|
+
<Box gap="medium" width="medium">
|
|
330
|
+
<>
|
|
331
|
+
<FormField
|
|
332
|
+
name="name"
|
|
333
|
+
id="background-name"
|
|
334
|
+
htmlFor="background-name"
|
|
335
|
+
label="Name"
|
|
336
|
+
help="A generated TextInput uses the shared surface."
|
|
337
|
+
error={error}
|
|
338
|
+
/>
|
|
339
|
+
<FormField
|
|
340
|
+
name="disabled"
|
|
341
|
+
id="disabled"
|
|
342
|
+
htmlFor="disabled"
|
|
343
|
+
label="Name (disabled)"
|
|
344
|
+
help="A generated TextInput uses the shared surface."
|
|
345
|
+
error={error}
|
|
346
|
+
disabled
|
|
347
|
+
value="Disabled"
|
|
348
|
+
/>
|
|
349
|
+
<FormField
|
|
350
|
+
name="read-only"
|
|
351
|
+
id="background-read-only"
|
|
352
|
+
htmlFor="background-read-only"
|
|
353
|
+
label="Name (read-only)"
|
|
354
|
+
help="A generated TextInput uses the shared surface."
|
|
355
|
+
error={error}
|
|
356
|
+
readOnly
|
|
357
|
+
value="Read-only"
|
|
358
|
+
/>
|
|
359
|
+
<FormField
|
|
360
|
+
name="notes"
|
|
361
|
+
htmlFor="background-notes"
|
|
362
|
+
label="Notes"
|
|
363
|
+
info="TextArea overrides the normal surface per input."
|
|
364
|
+
error={error}
|
|
365
|
+
>
|
|
366
|
+
<TextArea id="background-notes" name="notes" />
|
|
367
|
+
</FormField>
|
|
368
|
+
<FormField
|
|
369
|
+
name="fruit"
|
|
370
|
+
htmlFor="background-fruit"
|
|
371
|
+
label="Fruit"
|
|
372
|
+
error={error}
|
|
373
|
+
>
|
|
374
|
+
<Select
|
|
375
|
+
id="background-fruit"
|
|
376
|
+
name="fruit"
|
|
377
|
+
options={['Apple', 'Banana', 'Cherry']}
|
|
378
|
+
placeholder="Select a fruit"
|
|
379
|
+
/>
|
|
380
|
+
</FormField>
|
|
381
|
+
<FormField
|
|
382
|
+
name="fruits"
|
|
383
|
+
htmlFor="background-fruits"
|
|
384
|
+
label="Fruits"
|
|
385
|
+
error={error}
|
|
386
|
+
>
|
|
387
|
+
<SelectMultiple
|
|
388
|
+
id="background-fruits"
|
|
389
|
+
name="fruits"
|
|
390
|
+
options={['Apple', 'Banana', 'Cherry']}
|
|
391
|
+
placeholder="Select fruits"
|
|
392
|
+
showSelectedInline
|
|
393
|
+
/>
|
|
394
|
+
</FormField>
|
|
395
|
+
<FormField
|
|
396
|
+
name="date"
|
|
397
|
+
htmlFor="background-date"
|
|
398
|
+
label="Date"
|
|
399
|
+
error={error}
|
|
400
|
+
>
|
|
401
|
+
<DateInput
|
|
402
|
+
id="background-date"
|
|
403
|
+
name="date"
|
|
404
|
+
format="mm/dd/yyyy"
|
|
405
|
+
placeholder="Select a date"
|
|
406
|
+
/>
|
|
407
|
+
</FormField>
|
|
408
|
+
<FormField
|
|
409
|
+
name="date-time"
|
|
410
|
+
htmlFor="background-date-time"
|
|
411
|
+
label="Date & Time"
|
|
412
|
+
error={error}
|
|
413
|
+
>
|
|
414
|
+
<DateTimeInput
|
|
415
|
+
id="background-date-time"
|
|
416
|
+
name="date-time"
|
|
417
|
+
format="12"
|
|
418
|
+
placeholder="Select a date and time"
|
|
419
|
+
/>
|
|
420
|
+
</FormField>
|
|
421
|
+
<FormField
|
|
422
|
+
name="file"
|
|
423
|
+
htmlFor="background-file"
|
|
424
|
+
label="File"
|
|
425
|
+
error={error}
|
|
426
|
+
>
|
|
427
|
+
<FileInput id="background-file" name="file" />
|
|
428
|
+
</FormField>
|
|
429
|
+
<FormField
|
|
430
|
+
name="masked-input"
|
|
431
|
+
htmlFor="background-masked-input"
|
|
432
|
+
label="Masked Input"
|
|
433
|
+
error={error}
|
|
434
|
+
>
|
|
435
|
+
<MaskedInput
|
|
436
|
+
id="background-masked-input"
|
|
437
|
+
name="masked-input"
|
|
438
|
+
mask={[
|
|
439
|
+
{
|
|
440
|
+
length: 3,
|
|
441
|
+
options: ['123', '456', '789'],
|
|
442
|
+
placeholder: 'xxx',
|
|
443
|
+
},
|
|
444
|
+
]}
|
|
445
|
+
/>
|
|
446
|
+
</FormField>
|
|
447
|
+
<FormField
|
|
448
|
+
name="time"
|
|
449
|
+
htmlFor="background-time"
|
|
450
|
+
label="Time"
|
|
451
|
+
error={error}
|
|
452
|
+
>
|
|
453
|
+
<TimeInput
|
|
454
|
+
id="background-time"
|
|
455
|
+
name="time"
|
|
456
|
+
format="12"
|
|
457
|
+
placeholder="Select a time"
|
|
458
|
+
/>
|
|
459
|
+
</FormField>
|
|
460
|
+
<FormField
|
|
461
|
+
name="notifications"
|
|
462
|
+
label="Notifications"
|
|
463
|
+
error={error}
|
|
464
|
+
>
|
|
465
|
+
<CheckBoxGroup
|
|
466
|
+
aria-label="Notifications"
|
|
467
|
+
name="notifications"
|
|
468
|
+
options={['Email', 'Text message']}
|
|
469
|
+
defaultValue={['Email']}
|
|
470
|
+
/>
|
|
471
|
+
</FormField>
|
|
472
|
+
<FormField
|
|
473
|
+
name="delivery"
|
|
474
|
+
label="Delivery frequency"
|
|
475
|
+
error={error}
|
|
476
|
+
>
|
|
477
|
+
<RadioButtonGroup
|
|
478
|
+
aria-label="Delivery frequency"
|
|
479
|
+
name="delivery"
|
|
480
|
+
options={['Immediately', 'Daily digest']}
|
|
481
|
+
defaultValue="Daily digest"
|
|
482
|
+
/>
|
|
483
|
+
</FormField>
|
|
484
|
+
<FormField
|
|
485
|
+
name="experience-rating"
|
|
486
|
+
htmlFor="background-experience-rating"
|
|
487
|
+
label="Experience Rating"
|
|
488
|
+
error={error}
|
|
489
|
+
>
|
|
490
|
+
<StarRating
|
|
491
|
+
id="background-experience-rating"
|
|
492
|
+
name="experience-rating"
|
|
493
|
+
/>
|
|
494
|
+
</FormField>
|
|
495
|
+
<FormField
|
|
496
|
+
name="like"
|
|
497
|
+
htmlFor="background-like"
|
|
498
|
+
label="Do you like this?"
|
|
499
|
+
error={error}
|
|
500
|
+
>
|
|
501
|
+
<ThumbsRating name="like" />
|
|
502
|
+
</FormField>
|
|
503
|
+
</>
|
|
504
|
+
<Button type="reset" label="Reset" alignSelf="start" />
|
|
505
|
+
</Box>
|
|
506
|
+
</Form>
|
|
507
|
+
<>
|
|
508
|
+
<Paragraph margin="none">
|
|
509
|
+
Here are some things that I want to inform you about and ensure
|
|
510
|
+
you understand before proceeding.
|
|
511
|
+
</Paragraph>
|
|
512
|
+
<CheckBox label="I agree" name="agreement" />
|
|
513
|
+
</>
|
|
514
|
+
</Box>
|
|
515
|
+
<Box
|
|
516
|
+
background="form-surface"
|
|
517
|
+
pad="large"
|
|
518
|
+
round="small"
|
|
519
|
+
gap="medium"
|
|
520
|
+
width="large"
|
|
521
|
+
>
|
|
522
|
+
<Box gap="small">
|
|
523
|
+
<Heading level={2} margin="none">
|
|
524
|
+
Input surfaces (sans FormField)
|
|
525
|
+
</Heading>
|
|
526
|
+
<Paragraph>
|
|
527
|
+
Hover over each field. Labels and messages stay on the form
|
|
528
|
+
surface, while checkbox and radio groups remain transparent.
|
|
529
|
+
</Paragraph>
|
|
530
|
+
</Box>
|
|
531
|
+
<Form>
|
|
532
|
+
<Box gap="medium" width="medium">
|
|
533
|
+
<Box gap="xsmall">
|
|
534
|
+
<TextInput name="name" placeholder="TextInput" />
|
|
535
|
+
<TextInput
|
|
536
|
+
aria-label="Disabled input"
|
|
537
|
+
placeholder="Disabled"
|
|
538
|
+
disabled
|
|
539
|
+
/>
|
|
540
|
+
<TextInput
|
|
541
|
+
aria-label="Read-only input"
|
|
542
|
+
value="Read-only"
|
|
543
|
+
readOnly
|
|
544
|
+
/>
|
|
545
|
+
<TextArea name="notes" placeholder="TextArea" />
|
|
546
|
+
<Select
|
|
547
|
+
name="fruit"
|
|
548
|
+
options={['Apple', 'Orange', 'Banana']}
|
|
549
|
+
placeholder="Select a fruit"
|
|
550
|
+
/>
|
|
551
|
+
<SelectMultiple
|
|
552
|
+
name="fruits"
|
|
553
|
+
options={['Apple', 'Orange', 'Banana']}
|
|
554
|
+
placeholder="Select multiple fruits"
|
|
555
|
+
/>
|
|
556
|
+
<DateInput
|
|
557
|
+
name="date"
|
|
558
|
+
format="mm/dd/yyyy"
|
|
559
|
+
placeholder="Select a date"
|
|
560
|
+
/>
|
|
561
|
+
<DateTimeInput
|
|
562
|
+
name="datetime"
|
|
563
|
+
format="12"
|
|
564
|
+
placeholder="Select date and time"
|
|
565
|
+
/>
|
|
566
|
+
<FileInput name="file" placeholder="Select a file" />
|
|
567
|
+
<MaskedInput
|
|
568
|
+
name="phone"
|
|
569
|
+
mask={[
|
|
570
|
+
{ fixed: '(' },
|
|
571
|
+
{ length: 3, regexp: /^[0-9]{1,3}$/ },
|
|
572
|
+
{ fixed: ')' },
|
|
573
|
+
{ fixed: ' ' },
|
|
574
|
+
{ length: 3, regexp: /^[0-9]{1,3}$/ },
|
|
575
|
+
{ fixed: '-' },
|
|
576
|
+
{ length: 4, regexp: /^[0-9]{1,4}$/ },
|
|
577
|
+
]}
|
|
578
|
+
placeholder="(123) 456-7890"
|
|
579
|
+
/>
|
|
580
|
+
<TimeInput
|
|
581
|
+
name="time"
|
|
582
|
+
format="12"
|
|
583
|
+
placeholder="Select a time"
|
|
584
|
+
/>
|
|
585
|
+
<RangeInput name="range" min={0} max={100} step={1} />
|
|
586
|
+
<RangeSelector min={0} max={100} step={1} />
|
|
587
|
+
<CheckBoxGroup
|
|
588
|
+
aria-label="Notifications"
|
|
589
|
+
name="notifications"
|
|
590
|
+
options={['Email', 'Text message']}
|
|
591
|
+
defaultValue={['Email']}
|
|
592
|
+
/>
|
|
593
|
+
<RadioButtonGroup
|
|
594
|
+
aria-label="Delivery frequency"
|
|
595
|
+
name="delivery"
|
|
596
|
+
options={['Immediately', 'Daily digest']}
|
|
597
|
+
defaultValue="Daily digest"
|
|
598
|
+
/>
|
|
599
|
+
<StarRating name="rating" />
|
|
600
|
+
<ThumbsRating name="thumbs" />
|
|
601
|
+
</Box>
|
|
602
|
+
<Button type="reset" label="Reset" alignSelf="start" />
|
|
603
|
+
</Box>
|
|
604
|
+
</Form>
|
|
605
|
+
<>
|
|
606
|
+
<Paragraph margin="none">
|
|
607
|
+
Here are some things that I want to inform you about and ensure
|
|
608
|
+
you understand before proceeding.
|
|
609
|
+
</Paragraph>
|
|
610
|
+
<CheckBox label="I agree" name="agreement" />
|
|
611
|
+
</>
|
|
612
|
+
</Box>
|
|
613
|
+
</Box>
|
|
614
|
+
</Box>
|
|
615
|
+
</Grommet>
|
|
616
|
+
);
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
type Story = StoryObj<typeof meta>;
|
|
620
|
+
|
|
621
|
+
export const Appearance: Story = {
|
|
622
|
+
render: () => <AppearanceStory />,
|
|
623
|
+
};
|
|
624
|
+
|
|
625
|
+
const meta = {
|
|
626
|
+
title: 'Input/FormField/Custom Themed/Appearance',
|
|
627
|
+
component: FormField,
|
|
628
|
+
} satisfies Meta<typeof FormField>;
|
|
629
|
+
|
|
630
|
+
export default meta;
|
|
@@ -4,7 +4,8 @@ exports.__esModule = true;
|
|
|
4
4
|
exports["default"] = exports.Simple = 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
|
|
package/components/Grid/Grid.js
CHANGED
|
@@ -9,7 +9,8 @@ var _useThemeValue2 = require("../../utils/useThemeValue");
|
|
|
9
9
|
var _contexts = require("../../contexts");
|
|
10
10
|
var _excluded = ["a11yTitle", "aria-label", "border", "fill", "height", "responsive", "rows", "tag", "as", "width"]; // SPDX-FileCopyrightText: © Hewlett Packard Enterprise Development LP
|
|
11
11
|
// SPDX-License-Identifier: Apache-2.0
|
|
12
|
-
|
|
12
|
+
var cache;
|
|
13
|
+
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; }
|
|
13
14
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
14
15
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
15
16
|
var Grid = exports.Grid = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
@@ -4,7 +4,8 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.StyledGrid = 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
|
|
|
@@ -4,7 +4,8 @@ exports.__esModule = true;
|
|
|
4
4
|
exports["default"] = exports.Example = 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
|
|