grommet 2.43.0 → 2.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/all/stories/AllComponents.js +8 -3
- package/components/Accordion/Accordion.js +1 -1
- package/components/Accordion/stories/CustomThemed/Custom.js +1 -1
- package/components/Accordion/stories/Simple.js +1 -1
- package/components/AccordionPanel/AccordionPanel.js +1 -1
- package/components/Anchor/Anchor.js +3 -2
- package/components/Avatar/Avatar.js +1 -1
- package/components/Box/Box.js +1 -1
- package/components/Box/stories/Background.js +1 -1
- package/components/Button/Button.js +1 -1
- package/components/Button/stories/CustomThemed/Typescript.tsx +1 -1
- package/components/Button/stories/Kind.js +6 -10
- package/components/Calendar/Calendar.js +16 -9
- package/components/Calendar/StyledCalendar.js +6 -5
- package/components/Calendar/index.d.ts +1 -0
- package/components/Calendar/propTypes.js +1 -0
- package/components/Calendar/stories/DaylightSavings.js +1 -1
- package/components/Calendar/stories/HeaderLevel.js +36 -0
- package/components/Calendar/stories/ShowAdjacentDays.js +3 -2
- package/components/Card/stories/CustomThemed/Clickable.js +3 -3
- package/components/Card/stories/CustomThemed/Stacked.js +2 -2
- package/components/Card/stories/CustomThemed/Themed.js +5 -5
- package/components/Cards/Cards.js +1 -1
- package/components/Cards/stories/Children.js +2 -2
- package/components/Carousel/Carousel.js +1 -1
- package/components/Carousel/stories/CustomThemed/Custom.js +1 -1
- package/components/Chart/Chart.js +1 -1
- package/components/CheckBox/CheckBox.js +1 -1
- package/components/CheckBox/stories/CustomThemed/Custom.js +1 -1
- package/components/CheckBox/stories/NoLabel.js +1 -1
- package/components/CheckBox/stories/Simple.js +1 -1
- package/components/CheckBoxGroup/CheckBoxGroup.js +1 -1
- package/components/Clock/Analog.js +1 -1
- package/components/Clock/Clock.js +1 -1
- package/components/Clock/Digital.js +1 -1
- package/components/Collapsible/stories/Nested.js +1 -1
- package/components/Data/Data.js +1 -1
- package/components/Data/DataForm.js +1 -1
- package/components/Data/stories/Inline.js +1 -1
- package/components/DataChart/DataChart.js +1 -1
- package/components/DataChart/Detail.js +55 -25
- package/components/DataChart/Legend.js +1 -0
- package/components/DataChart/XAxis.js +1 -1
- package/components/DataClearFilters/DataClearFilters.js +1 -1
- package/components/DataFilter/DataFilter.js +1 -1
- package/components/DataFilters/DataFilters.js +1 -1
- package/components/DataSearch/DataSearch.js +1 -1
- package/components/DataSort/DataSort.js +1 -1
- package/components/DataSummary/DataSummary.js +1 -1
- package/components/DataTable/Body.js +17 -3
- package/components/DataTable/Cell.js +1 -1
- package/components/DataTable/DataTable.js +1 -1
- package/components/DataTable/ExpanderCell.js +1 -1
- package/components/DataTable/Footer.js +1 -1
- package/components/DataTable/GroupedBody.js +1 -1
- package/components/DataTable/Header.js +2 -2
- package/components/DataTable/StyledDataTable.js +20 -12
- package/components/DataTable/stories/CustomThemed/Custom.js +8 -0
- package/components/DataTable/stories/CustomThemed/Fill.js +1 -0
- package/components/DataTableColumns/DataTableColumns.js +1 -1
- package/components/DataTableGroupBy/DataTableGroupBy.js +1 -1
- package/components/DataView/DataView.js +1 -1
- package/components/DateInput/DateInput.js +1 -1
- package/components/Diagram/Diagram.js +1 -1
- package/components/Diagram/stories/Progressing.js +1 -1
- package/components/Distribution/Distribution.js +1 -1
- package/components/Drop/Drop.js +1 -1
- package/components/Drop/DropContainer.js +1 -1
- package/components/Drop/stories/CustomThemed/Lazy.js +4 -4
- package/components/Drop/stories/CustomThemed/Themed.js +1 -1
- package/components/DropButton/DropButton.js +1 -1
- package/components/FileInput/FileInput.js +1 -1
- package/components/FocusedContainer.js +1 -1
- package/components/Form/Form.js +1 -1
- package/components/Form/stories/AggregateValidation.js +5 -2
- package/components/Form/stories/ArrayOfFormFields.js +19 -6
- package/components/Form/stories/Controlled.js +8 -1
- package/components/Form/stories/ControlledInput.js +8 -1
- package/components/Form/stories/ControlledInputLazy.js +5 -1
- package/components/Form/stories/ControlledLazy.js +5 -1
- package/components/Form/stories/CustomThemed/Custom.js +17 -1
- package/components/Form/stories/CustomThemed/FieldSpacingOptions.js +36 -36
- package/components/Form/stories/CustomThemed/RequiredLabel.js +3 -0
- package/components/Form/stories/CustomThemed/Themed.js +2 -2
- package/components/Form/stories/DynamicFields.js +9 -2
- package/components/Form/stories/FieldWithChildren.js +6 -1
- package/components/Form/stories/TriggerValidationUsingFormField.js +18 -6
- package/components/Form/stories/Uncontrolled.js +6 -1
- package/components/Form/stories/ValidateOnBlur.js +10 -3
- package/components/Form/stories/ValidateOnChange.js +11 -5
- package/components/Form/stories/ValidateOnMount.js +11 -4
- package/components/Form/stories/typescript/TypedForm.tsx +39 -45
- package/components/FormField/FormField.js +73 -18
- package/components/FormField/stories/CustomThemed/Custom.tsx +1 -1
- package/components/Grid/Grid.js +1 -1
- package/components/Grid/stories/AreasPropAlternative.js +4 -1
- package/components/Grid/stories/CustomThemed/Responsive.js +1 -1
- package/components/Grommet/Grommet.js +1 -1
- package/components/Grommet/index.d.ts +4 -0
- package/components/Grommet/propTypes.js +4 -0
- package/components/Header/Header.js +1 -1
- package/components/Heading/Heading.js +1 -1
- package/components/Image/Image.js +1 -1
- package/components/Keyboard/Keyboard.js +1 -1
- package/components/Layer/LayerContainer.js +4 -15
- package/components/Layer/StyledLayer.js +2 -1
- package/components/List/List.js +1 -1
- package/components/Markdown/Markdown.js +1 -1
- package/components/MaskedInput/MaskedInput.js +1 -1
- package/components/Menu/Menu.js +6 -5
- package/components/Menu/stories/CustomThemed/Themed.tsx +4 -0
- package/components/Meter/Bar.js +1 -1
- package/components/Meter/Circle.js +1 -1
- package/components/Meter/Meter.js +1 -1
- package/components/Meter/StyledMeter.js +2 -1
- package/components/NameValueList/NameValueList.js +1 -1
- package/components/Nav/stories/CustomThemed/JustifySidebar.js +2 -2
- package/components/Nav/stories/Sidebar.js +1 -1
- package/components/Notification/Notification.js +38 -27
- package/components/Notification/stories/CustomThemed/ThemedNotification.tsx +2 -1
- package/components/Page/Page.js +1 -1
- package/components/PageContent/PageContent.js +1 -1
- package/components/PageHeader/PageHeader.js +1 -1
- package/components/PageHeader/stories/Level.js +2 -2
- package/components/PageHeader/stories/Size.js +3 -2
- package/components/Pagination/PageControl.js +1 -1
- package/components/Pagination/Pagination.js +1 -1
- package/components/Pagination/PaginationStep.js +1 -1
- package/components/Pagination/PaginationSummary.js +1 -1
- package/components/Paragraph/Paragraph.js +1 -1
- package/components/RadioButton/RadioButton.js +1 -1
- package/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +1 -1
- package/components/RadioButtonGroup/stories/Disabled.js +1 -1
- package/components/RangeInput/RangeInput.js +1 -1
- package/components/RangeSelector/EdgeControl.js +1 -1
- package/components/RangeSelector/RangeSelector.js +1 -1
- package/components/RangeSelector/stories/CustomThemed/Custom.js +1 -1
- package/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +1 -1
- package/components/RangeSelector/stories/Step.js +1 -1
- package/components/RangeSelector/stories/Vertical.js +1 -1
- package/components/RoutedAnchor/RoutedAnchor.js +1 -1
- package/components/RoutedButton/RoutedButton.js +1 -1
- package/components/Select/DefaultSelectTextInput.js +1 -1
- package/components/Select/Select.js +1 -1
- package/components/Select/SelectContainer.js +2 -1
- package/components/Select/StyledSelect.js +4 -1
- package/components/Select/stories/components/SearchBorderBox.js +1 -1
- package/components/Select/stories/components/SearchInput.js +1 -1
- package/components/SelectMultiple/SelectMultiple.js +1 -1
- package/components/SelectMultiple/SelectMultipleContainer.js +2 -1
- package/components/Sidebar/Sidebar.js +1 -1
- package/components/Sidebar/stories/Labels.js +1 -1
- package/components/Skeleton/Skeleton.js +1 -1
- package/components/Skeleton/stories/CustomThemed/Custom.js +2 -0
- package/components/Skeleton/stories/GridContainer.js +2 -2
- package/components/Skeleton/stories/Group.js +1 -1
- package/components/Skeleton/stories/Individual.js +2 -3
- package/components/Skeleton/stories/Simple.js +1 -0
- package/components/SkipLink/SkipLink.js +1 -1
- package/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
- package/components/SkipLinks/stories/CustomThemed/Themed.js +1 -1
- package/components/Spinner/Spinner.js +1 -1
- package/components/Stack/Stack.js +1 -1
- package/components/StarRating/StarRating.js +18 -4
- package/components/Tab/Tab.js +1 -1
- package/components/Table/Table.js +1 -1
- package/components/TableCell/TableCell.js +1 -1
- package/components/Tabs/Tabs.js +2 -2
- package/components/Tabs/stories/CustomThemed/Custom.js +3 -3
- package/components/Tag/Tag.js +1 -1
- package/components/Text/Text.js +1 -1
- package/components/Text/TextSkeleton.js +1 -1
- package/components/TextArea/TextArea.js +1 -1
- package/components/TextArea/stories/CustomThemed/Themed.js +1 -0
- package/components/TextInput/TextInput.js +1 -1
- package/components/TextInput/stories/Simple.js +1 -6
- package/components/TextInput/stories/WithTags.js +1 -1
- package/components/ThumbsRating/ThumbsRating.js +20 -5
- package/components/ToggleGroup/StyledToggleGroup.js +9 -1
- package/components/ToggleGroup/ToggleGroup.js +2 -2
- package/components/Toolbar/Toolbar.js +1 -1
- package/components/Video/Video.js +1 -1
- package/components/WorldMap/WorldMap.js +1 -1
- package/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
- package/es6/all/stories/AllComponents.js +8 -3
- package/es6/components/Accordion/Accordion.js +1 -1
- package/es6/components/Accordion/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/Accordion/stories/Simple.js +1 -1
- package/es6/components/AccordionPanel/AccordionPanel.js +1 -1
- package/es6/components/Anchor/Anchor.js +3 -2
- package/es6/components/Avatar/Avatar.js +1 -1
- package/es6/components/Box/Box.js +1 -1
- package/es6/components/Box/stories/Background.js +1 -1
- package/es6/components/Button/Button.js +1 -1
- package/es6/components/Button/stories/CustomThemed/Typescript.tsx +1 -1
- package/es6/components/Button/stories/Kind.js +6 -10
- package/es6/components/Calendar/Calendar.js +16 -9
- package/es6/components/Calendar/StyledCalendar.js +6 -5
- package/es6/components/Calendar/index.d.ts +1 -0
- package/es6/components/Calendar/propTypes.js +1 -0
- package/es6/components/Calendar/stories/DaylightSavings.js +2 -2
- package/es6/components/Calendar/stories/HeaderLevel.js +30 -0
- package/es6/components/Calendar/stories/ShowAdjacentDays.js +3 -2
- package/es6/components/Card/stories/CustomThemed/Clickable.js +4 -4
- package/es6/components/Card/stories/CustomThemed/Stacked.js +3 -3
- package/es6/components/Card/stories/CustomThemed/Themed.js +6 -6
- package/es6/components/Cards/Cards.js +1 -1
- package/es6/components/Cards/stories/Children.js +3 -3
- package/es6/components/Carousel/Carousel.js +1 -1
- package/es6/components/Carousel/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/Chart/Chart.js +1 -1
- package/es6/components/CheckBox/CheckBox.js +1 -1
- package/es6/components/CheckBox/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/CheckBox/stories/NoLabel.js +1 -1
- package/es6/components/CheckBox/stories/Simple.js +1 -1
- package/es6/components/CheckBoxGroup/CheckBoxGroup.js +1 -1
- package/es6/components/Clock/Analog.js +1 -1
- package/es6/components/Clock/Clock.js +1 -1
- package/es6/components/Clock/Digital.js +1 -1
- package/es6/components/Collapsible/stories/Nested.js +1 -1
- package/es6/components/Data/Data.js +1 -1
- package/es6/components/Data/DataForm.js +1 -1
- package/es6/components/Data/stories/Inline.js +1 -1
- package/es6/components/DataChart/DataChart.js +1 -1
- package/es6/components/DataChart/Detail.js +55 -25
- package/es6/components/DataChart/Legend.js +1 -0
- package/es6/components/DataChart/XAxis.js +1 -1
- package/es6/components/DataClearFilters/DataClearFilters.js +1 -1
- package/es6/components/DataFilter/DataFilter.js +1 -1
- package/es6/components/DataFilters/DataFilters.js +1 -1
- package/es6/components/DataSearch/DataSearch.js +1 -1
- package/es6/components/DataSort/DataSort.js +1 -1
- package/es6/components/DataSummary/DataSummary.js +1 -1
- package/es6/components/DataTable/Body.js +19 -5
- package/es6/components/DataTable/Cell.js +1 -1
- package/es6/components/DataTable/DataTable.js +1 -1
- package/es6/components/DataTable/ExpanderCell.js +1 -1
- package/es6/components/DataTable/Footer.js +1 -1
- package/es6/components/DataTable/GroupedBody.js +1 -1
- package/es6/components/DataTable/Header.js +3 -3
- package/es6/components/DataTable/StyledDataTable.js +20 -12
- package/es6/components/DataTable/stories/CustomThemed/Custom.js +8 -0
- package/es6/components/DataTable/stories/CustomThemed/Fill.js +1 -0
- package/es6/components/DataTableColumns/DataTableColumns.js +1 -1
- package/es6/components/DataTableGroupBy/DataTableGroupBy.js +1 -1
- package/es6/components/DataView/DataView.js +1 -1
- package/es6/components/DateInput/DateInput.js +1 -1
- package/es6/components/Diagram/Diagram.js +1 -1
- package/es6/components/Diagram/stories/Progressing.js +1 -1
- package/es6/components/Distribution/Distribution.js +1 -1
- package/es6/components/Drop/Drop.js +1 -1
- package/es6/components/Drop/DropContainer.js +1 -1
- package/es6/components/Drop/stories/CustomThemed/Lazy.js +4 -4
- package/es6/components/Drop/stories/CustomThemed/Themed.js +1 -1
- package/es6/components/DropButton/DropButton.js +1 -1
- package/es6/components/FileInput/FileInput.js +1 -1
- package/es6/components/FocusedContainer.js +1 -1
- package/es6/components/Form/Form.js +1 -1
- package/es6/components/Form/stories/AggregateValidation.js +5 -2
- package/es6/components/Form/stories/ArrayOfFormFields.js +20 -7
- package/es6/components/Form/stories/Controlled.js +8 -1
- package/es6/components/Form/stories/ControlledInput.js +8 -1
- package/es6/components/Form/stories/ControlledInputLazy.js +5 -1
- package/es6/components/Form/stories/ControlledLazy.js +5 -1
- package/es6/components/Form/stories/CustomThemed/Custom.js +17 -1
- package/es6/components/Form/stories/CustomThemed/FieldSpacingOptions.js +36 -36
- package/es6/components/Form/stories/CustomThemed/RequiredLabel.js +3 -0
- package/es6/components/Form/stories/CustomThemed/Themed.js +2 -2
- package/es6/components/Form/stories/DynamicFields.js +9 -2
- package/es6/components/Form/stories/FieldWithChildren.js +6 -1
- package/es6/components/Form/stories/TriggerValidationUsingFormField.js +19 -7
- package/es6/components/Form/stories/Uncontrolled.js +6 -1
- package/es6/components/Form/stories/ValidateOnBlur.js +10 -3
- package/es6/components/Form/stories/ValidateOnChange.js +12 -6
- package/es6/components/Form/stories/ValidateOnMount.js +11 -4
- package/es6/components/Form/stories/typescript/TypedForm.tsx +39 -45
- package/es6/components/FormField/FormField.js +73 -18
- package/es6/components/FormField/stories/CustomThemed/Custom.tsx +1 -1
- package/es6/components/Grid/Grid.js +1 -1
- package/es6/components/Grid/stories/AreasPropAlternative.js +4 -1
- package/es6/components/Grid/stories/CustomThemed/Responsive.js +1 -1
- package/es6/components/Grommet/Grommet.js +1 -1
- package/es6/components/Grommet/index.d.ts +4 -0
- package/es6/components/Grommet/propTypes.js +4 -0
- package/es6/components/Header/Header.js +1 -1
- package/es6/components/Heading/Heading.js +1 -1
- package/es6/components/Image/Image.js +1 -1
- package/es6/components/Keyboard/Keyboard.js +1 -1
- package/es6/components/Layer/LayerContainer.js +5 -16
- package/es6/components/Layer/StyledLayer.js +2 -1
- package/es6/components/List/List.js +1 -1
- package/es6/components/Markdown/Markdown.js +1 -1
- package/es6/components/MaskedInput/MaskedInput.js +1 -1
- package/es6/components/Menu/Menu.js +6 -5
- package/es6/components/Menu/stories/CustomThemed/Themed.tsx +4 -0
- package/es6/components/Meter/Bar.js +1 -1
- package/es6/components/Meter/Circle.js +1 -1
- package/es6/components/Meter/Meter.js +1 -1
- package/es6/components/Meter/StyledMeter.js +3 -1
- package/es6/components/NameValueList/NameValueList.js +1 -1
- package/es6/components/Nav/stories/CustomThemed/JustifySidebar.js +2 -2
- package/es6/components/Nav/stories/Sidebar.js +1 -1
- package/es6/components/Notification/Notification.js +38 -27
- package/es6/components/Notification/stories/CustomThemed/ThemedNotification.tsx +2 -1
- package/es6/components/Page/Page.js +1 -1
- package/es6/components/PageContent/PageContent.js +1 -1
- package/es6/components/PageHeader/PageHeader.js +1 -1
- package/es6/components/PageHeader/stories/Level.js +3 -3
- package/es6/components/PageHeader/stories/Size.js +3 -2
- package/es6/components/Pagination/PageControl.js +1 -1
- package/es6/components/Pagination/Pagination.js +1 -1
- package/es6/components/Pagination/PaginationStep.js +1 -1
- package/es6/components/Pagination/PaginationSummary.js +1 -1
- package/es6/components/Paragraph/Paragraph.js +1 -1
- package/es6/components/RadioButton/RadioButton.js +1 -1
- package/es6/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/es6/components/RadioButtonGroup/stories/CustomThemed/CustomTheme.js +1 -1
- package/es6/components/RadioButtonGroup/stories/Disabled.js +1 -1
- package/es6/components/RangeInput/RangeInput.js +1 -1
- package/es6/components/RangeSelector/EdgeControl.js +1 -1
- package/es6/components/RangeSelector/RangeSelector.js +1 -1
- package/es6/components/RangeSelector/stories/CustomThemed/Custom.js +1 -1
- package/es6/components/RangeSelector/stories/CustomThemed/CustomEdgeControl.js +1 -1
- package/es6/components/RangeSelector/stories/Step.js +1 -1
- package/es6/components/RangeSelector/stories/Vertical.js +1 -1
- package/es6/components/RoutedAnchor/RoutedAnchor.js +1 -1
- package/es6/components/RoutedButton/RoutedButton.js +1 -1
- package/es6/components/Select/DefaultSelectTextInput.js +1 -1
- package/es6/components/Select/Select.js +1 -1
- package/es6/components/Select/SelectContainer.js +2 -1
- package/es6/components/Select/StyledSelect.js +4 -1
- package/es6/components/Select/stories/components/SearchBorderBox.js +1 -1
- package/es6/components/Select/stories/components/SearchInput.js +1 -1
- package/es6/components/SelectMultiple/SelectMultiple.js +1 -1
- package/es6/components/SelectMultiple/SelectMultipleContainer.js +2 -1
- package/es6/components/Sidebar/Sidebar.js +1 -1
- package/es6/components/Sidebar/stories/Labels.js +1 -1
- package/es6/components/Skeleton/Skeleton.js +1 -1
- package/es6/components/Skeleton/stories/CustomThemed/Custom.js +2 -0
- package/es6/components/Skeleton/stories/GridContainer.js +3 -3
- package/es6/components/Skeleton/stories/Group.js +2 -2
- package/es6/components/Skeleton/stories/Individual.js +3 -4
- package/es6/components/Skeleton/stories/Simple.js +1 -0
- package/es6/components/SkipLink/SkipLink.js +1 -1
- package/es6/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
- package/es6/components/SkipLinks/stories/CustomThemed/Themed.js +1 -1
- package/es6/components/Spinner/Spinner.js +1 -1
- package/es6/components/Stack/Stack.js +1 -1
- package/es6/components/StarRating/StarRating.js +17 -4
- package/es6/components/Tab/Tab.js +1 -1
- package/es6/components/Table/Table.js +1 -1
- package/es6/components/TableCell/TableCell.js +1 -1
- package/es6/components/Tabs/Tabs.js +2 -2
- package/es6/components/Tabs/stories/CustomThemed/Custom.js +3 -3
- package/es6/components/Tag/Tag.js +1 -1
- package/es6/components/Text/Text.js +1 -1
- package/es6/components/Text/TextSkeleton.js +1 -1
- package/es6/components/TextArea/TextArea.js +1 -1
- package/es6/components/TextArea/stories/CustomThemed/Themed.js +1 -0
- package/es6/components/TextInput/TextInput.js +1 -1
- package/es6/components/TextInput/stories/Simple.js +2 -7
- package/es6/components/TextInput/stories/WithTags.js +1 -1
- package/es6/components/ThumbsRating/ThumbsRating.js +20 -5
- package/es6/components/ToggleGroup/StyledToggleGroup.js +8 -0
- package/es6/components/ToggleGroup/ToggleGroup.js +3 -3
- package/es6/components/Toolbar/Toolbar.js +1 -1
- package/es6/components/Video/Video.js +1 -1
- package/es6/components/WorldMap/WorldMap.js +1 -1
- package/es6/contexts/ResponsiveContext/stories/ResponsiveGrid.js +1 -1
- package/es6/languages/default.json +4 -0
- package/es6/themes/base.d.ts +52 -5
- package/es6/themes/base.js +47 -14
- package/es6/utils/pagination.js +1 -1
- package/es6/utils/responsive.js +1 -0
- package/es6/utils/styles.js +49 -14
- package/grommet.min.js +1 -1
- package/grommet.min.js.map +1 -1
- package/languages/default.json +4 -0
- package/package.json +28 -28
- package/themes/base.d.ts +52 -5
- package/themes/base.js +47 -14
- package/tools/release-stable.js +1 -1
- package/utils/pagination.js +1 -1
- package/utils/responsive.js +1 -0
- package/utils/styles.js +49 -14
- package/components/Form/stories/FieldWithComponentProp.js +0 -138
- package/es6/components/Form/stories/FieldWithComponentProp.js +0 -133
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["direction"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
import React, { useState } from 'react';
|
|
5
5
|
import { Box, RangeSelector, Stack, Text } from 'grommet';
|
|
6
6
|
var SimpleRangeSelector = function SimpleRangeSelector(_ref) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["path", "method"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
function _inheritsLoose(t, o) { t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o); }
|
|
5
5
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
6
6
|
import React, { Component } from 'react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["href", "path", "method", "onClick"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
function _inheritsLoose(t, o) { t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o); }
|
|
5
5
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
6
6
|
import React, { Component } from 'react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["disabled", "id"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
import React, { forwardRef } from 'react';
|
|
5
5
|
import { SelectTextInput } from './StyledSelect';
|
|
6
6
|
export var DefaultSelectTextInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["a11yTitle", "aria-label", "alignSelf", "children", "clear", "closeOnChange", "defaultValue", "disabled", "disabledKey", "dropAlign", "dropHeight", "dropProps", "dropTarget", "emptySearchMessage", "focusIndicator", "gridArea", "id", "icon", "labelKey", "margin", "messages", "multiple", "name", "onBlur", "onChange", "onClick", "onClose", "onFocus", "onKeyDown", "onMore", "onOpen", "onSearch", "open", "options", "placeholder", "plain", "replace", "searchPlaceholder", "selected", "size", "value", "valueKey", "valueLabel"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
import React, { forwardRef, isValidElement, useCallback, useContext, useMemo, useState, useRef, useEffect } from 'react';
|
|
5
5
|
import { useKeyboard } from '../../utils';
|
|
6
6
|
import { Box } from '../Box';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["clear", "onClear", "name", "theme"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
import React, { forwardRef, useCallback, useEffect, useRef, useState } from 'react';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
6
|
import { setFocusWithoutScroll, getHoverIndicatorStyle, containsFocus } from '../../utils';
|
|
@@ -373,6 +373,7 @@ var SelectContainer = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
373
373
|
return setActiveIndex(index);
|
|
374
374
|
},
|
|
375
375
|
onMouseOver: !optionDisabled ? onActiveOption(index) : undefined,
|
|
376
|
+
onMouseOut: !optionDisabled ? onActiveOption(-1) : undefined,
|
|
376
377
|
onClick: !optionDisabled ? selectOption(index) : undefined,
|
|
377
378
|
textComponent: textComponent
|
|
378
379
|
}, passThemeFlag), child);
|
|
@@ -17,7 +17,10 @@ export var StyledContainer = styled(Box).withConfig({
|
|
|
17
17
|
export var OptionsContainer = styled.div.withConfig(styledComponentsConfig).withConfig({
|
|
18
18
|
displayName: "StyledSelect__OptionsContainer",
|
|
19
19
|
componentId: "sc-znp66n-1"
|
|
20
|
-
})(["position:relative;scroll-behavior:smooth;overflow:auto;outline:none;"])
|
|
20
|
+
})(["position:relative;scroll-behavior:smooth;overflow:auto;outline:none;", ";"], function (props) {
|
|
21
|
+
if (props.selectMultiple) return props.theme.selectMultiple.listbox && props.theme.selectMultiple.listbox.extend;
|
|
22
|
+
return props.theme.select.listbox && props.theme.select.listbox.extend;
|
|
23
|
+
});
|
|
21
24
|
export var HiddenInput = styled.input.withConfig(styledComponentsConfig).withConfig({
|
|
22
25
|
displayName: "StyledSelect__HiddenInput",
|
|
23
26
|
componentId: "sc-znp66n-2"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["children", "searching"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
import { css } from 'styled-components';
|
|
5
5
|
import React, { useState } from 'react';
|
|
6
6
|
import { Box } from '../../..';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["searching"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
import React, { forwardRef, useEffect } from 'react';
|
|
5
5
|
import { TextInput } from '../../..';
|
|
6
6
|
import { SearchBorderBox } from './SearchBorderBox';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["a11yTitle", "aria-label", "alignSelf", "children", "defaultValue", "disabled", "disabledKey", "dropAlign", "dropHeight", "dropProps", "dropTarget", "emptySearchMessage", "focusIndicator", "gridArea", "help", "id", "icon", "labelKey", "limit", "margin", "messages", "name", "onBlur", "onChange", "onClick", "onClose", "onFocus", "onKeyDown", "onMore", "onOpen", "onSearch", "open", "options", "placeholder", "plain", "replace", "searchPlaceholder", "size", "sortSelectedOnClose", "value", "valueKey", "valueLabel", "showSelectedInline", "width"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
import React, { forwardRef, isValidElement, useCallback, useContext, useMemo, useState, useRef, useEffect } from 'react';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
6
|
import { controlBorderStyle, useKeyboard, useForwardedRef } from '../../utils';
|
|
@@ -330,7 +330,8 @@ var SelectMultipleContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
330
330
|
onMouseMove: function onMouseMove() {
|
|
331
331
|
return setKeyboardNavigation(false);
|
|
332
332
|
},
|
|
333
|
-
"aria-activedescendant": optionsRef == null || (_optionsRef$current = optionsRef.current) == null ? void 0 : _optionsRef$current.children[activeIndex]
|
|
333
|
+
"aria-activedescendant": optionsRef == null || (_optionsRef$current = optionsRef.current) == null ? void 0 : _optionsRef$current.children[activeIndex],
|
|
334
|
+
selectMultiple: true // internal prop
|
|
334
335
|
}, /*#__PURE__*/React.createElement(InfiniteScroll, {
|
|
335
336
|
items: options,
|
|
336
337
|
step: theme.select.step,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["children", "footer", "header"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { Box } from '../Box';
|
|
6
6
|
import { SidebarPropTypes } from './propTypes';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["icon", "label"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { Avatar, Button, Box, Nav, Stack, Text } from 'grommet';
|
|
6
6
|
import { Analytics } from "grommet-icons/es6/icons/Analytics";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["as", "colors", "width", "height"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
import React, { forwardRef } from 'react';
|
|
5
5
|
import { SkeletonPropTypes } from './propTypes';
|
|
6
6
|
import { useSkeleton } from './SkeletonContext';
|
|
@@ -46,8 +46,10 @@ export var Custom = function Custom() {
|
|
|
46
46
|
align: "start",
|
|
47
47
|
skeleton: skeleton
|
|
48
48
|
}, /*#__PURE__*/React.createElement(Heading, {
|
|
49
|
+
"aria-label": skeleton ? 'heading 1 loading' : undefined,
|
|
49
50
|
level: 1
|
|
50
51
|
}, "Heading 1"), /*#__PURE__*/React.createElement(Text, null, "text"), /*#__PURE__*/React.createElement(Heading, {
|
|
52
|
+
"aria-label": skeleton ? 'heading 2 loading' : undefined,
|
|
51
53
|
level: 2
|
|
52
54
|
}, "Heading 2"), /*#__PURE__*/React.createElement(Button, {
|
|
53
55
|
alignSelf: "end",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var _excluded = ["title"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
import React, { useEffect, useState } from 'react';
|
|
5
|
-
import { Box, Button, Card, Grid,
|
|
5
|
+
import { Box, Button, Card, Grid, Text } from 'grommet';
|
|
6
6
|
import { FormAdd } from "grommet-icons/es6/icons/FormAdd";
|
|
7
7
|
var labels = [];
|
|
8
8
|
for (var i = 0; i < 10; i += 1) labels.push("Item " + i);
|
|
@@ -34,7 +34,7 @@ var Item = function Item(_ref) {
|
|
|
34
34
|
background: "brand",
|
|
35
35
|
round: "small",
|
|
36
36
|
flex: false
|
|
37
|
-
}
|
|
37
|
+
}), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Text, {
|
|
38
38
|
size: "large",
|
|
39
39
|
color: "text-strong",
|
|
40
40
|
weight: "bold",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
|
|
2
2
|
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); }
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { Box, Button, Card, Grommet,
|
|
4
|
+
import { Box, Button, Card, Grommet, Text } from 'grommet';
|
|
5
5
|
import { FormAdd } from "grommet-icons/es6/icons/FormAdd";
|
|
6
6
|
import { useThemeValue } from '../../../utils/useThemeValue';
|
|
7
7
|
var Item = function Item(_ref) {
|
|
@@ -26,7 +26,7 @@ var Item = function Item(_ref) {
|
|
|
26
26
|
height: "xsmall",
|
|
27
27
|
background: "orange!",
|
|
28
28
|
round: "small"
|
|
29
|
-
}
|
|
29
|
+
}), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Text, {
|
|
30
30
|
size: "large",
|
|
31
31
|
color: "text-strong",
|
|
32
32
|
weight: "bold",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var _excluded = ["title"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { Box, Button, Card, Grommet,
|
|
5
|
+
import { Box, Button, Card, Grommet, Text } from 'grommet';
|
|
6
6
|
import { useThemeValue } from '../../../utils/useThemeValue';
|
|
7
7
|
var Item = function Item(_ref) {
|
|
8
8
|
var title = _ref.title,
|
|
@@ -12,7 +12,6 @@ var Item = function Item(_ref) {
|
|
|
12
12
|
pad: "medium",
|
|
13
13
|
gap: "large",
|
|
14
14
|
round: "medium",
|
|
15
|
-
background: "status-warning",
|
|
16
15
|
flex: "grow"
|
|
17
16
|
}, rest), /*#__PURE__*/React.createElement(Text, {
|
|
18
17
|
color: "text-strong",
|
|
@@ -34,7 +33,7 @@ var Item = function Item(_ref) {
|
|
|
34
33
|
height: "xsmall",
|
|
35
34
|
background: "orange!",
|
|
36
35
|
round: "small"
|
|
37
|
-
}
|
|
36
|
+
}), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Text, {
|
|
38
37
|
size: "large",
|
|
39
38
|
color: "text-strong",
|
|
40
39
|
weight: "bold",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["id", "label"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
import React, { forwardRef } from 'react';
|
|
5
5
|
import { Anchor } from '../Anchor';
|
|
6
6
|
export var SkipLink = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["label"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
6
|
import { Anchor } from '../Anchor';
|
|
@@ -41,7 +41,7 @@ export var Themed = function Themed() {
|
|
|
41
41
|
})), /*#__PURE__*/React.createElement(Box, {
|
|
42
42
|
gap: "large"
|
|
43
43
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
44
|
-
background: "light-
|
|
44
|
+
background: "light-2",
|
|
45
45
|
pad: "small",
|
|
46
46
|
fill: "horizontal"
|
|
47
47
|
}, /*#__PURE__*/React.createElement(Header, {
|
|
@@ -2,7 +2,7 @@ var _excluded = ["ref", "size"],
|
|
|
2
2
|
_excluded2 = ["children", "color", "size", "message"],
|
|
3
3
|
_excluded3 = ["size", "color", "border"];
|
|
4
4
|
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); }
|
|
5
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
5
|
+
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; }
|
|
6
6
|
import React, { isValidElement, forwardRef, useContext, useEffect } from 'react';
|
|
7
7
|
import { AnnounceContext } from '../../contexts/AnnounceContext';
|
|
8
8
|
import { Box } from '../Box';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var _excluded = ["anchor", "children", "fill", "guidingChild", "interactiveChild"];
|
|
2
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
2
|
+
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; }
|
|
3
3
|
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); }
|
|
4
4
|
import React, { Children, forwardRef } from 'react';
|
|
5
5
|
import { StyledStack, StyledStackLayer } from './StyledStack';
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
var _excluded = ["name", "defaultValue", "value"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
import React, { useContext } from 'react';
|
|
5
|
+
import styled from 'styled-components';
|
|
5
6
|
import { Star } from 'grommet-icons/icons/Star';
|
|
6
7
|
import { StarOutline } from 'grommet-icons/icons/StarOutline';
|
|
8
|
+
import { Box } from '../Box';
|
|
7
9
|
import { FormContext } from '../Form/FormContext';
|
|
8
10
|
import { RadioButtonGroup } from '../RadioButtonGroup';
|
|
9
11
|
import { useThemeValue } from '../../utils/useThemeValue';
|
|
12
|
+
import { useKeyboard, focusStyle } from '../../utils';
|
|
13
|
+
var StyledStarRatingBox = styled(Box).withConfig({
|
|
14
|
+
displayName: "StarRating__StyledStarRatingBox",
|
|
15
|
+
componentId: "sc-34rgjv-0"
|
|
16
|
+
})(["", ";"], function (props) {
|
|
17
|
+
return props.focus && focusStyle();
|
|
18
|
+
});
|
|
10
19
|
var StarRating = function StarRating(_ref) {
|
|
11
20
|
var name = _ref.name,
|
|
12
21
|
defaultValue = _ref.defaultValue,
|
|
@@ -15,6 +24,7 @@ var StarRating = function StarRating(_ref) {
|
|
|
15
24
|
var formContext = useContext(FormContext);
|
|
16
25
|
var _useThemeValue = useThemeValue(),
|
|
17
26
|
theme = _useThemeValue.theme;
|
|
27
|
+
var usingKeyboard = useKeyboard();
|
|
18
28
|
var _formContext$useFormI = formContext.useFormInput({
|
|
19
29
|
name: name,
|
|
20
30
|
value: valueProp,
|
|
@@ -33,13 +43,16 @@ var StarRating = function StarRating(_ref) {
|
|
|
33
43
|
onChange: function onChange(event) {
|
|
34
44
|
setValue(event.value);
|
|
35
45
|
}
|
|
36
|
-
}, rest), function (option) {
|
|
46
|
+
}, rest), function (option, _ref2) {
|
|
37
47
|
var _theme$starRating, _theme$starRating2;
|
|
38
|
-
|
|
48
|
+
var focus = _ref2.focus;
|
|
49
|
+
return /*#__PURE__*/React.createElement(StyledStarRatingBox, {
|
|
50
|
+
focus: focus && usingKeyboard
|
|
51
|
+
}, option <= value ? /*#__PURE__*/React.createElement(Star, {
|
|
39
52
|
color: (_theme$starRating = theme.starRating) == null ? void 0 : _theme$starRating.color
|
|
40
53
|
}) : /*#__PURE__*/React.createElement(StarOutline, {
|
|
41
54
|
color: (_theme$starRating2 = theme.starRating) == null ? void 0 : _theme$starRating2.color
|
|
42
|
-
});
|
|
55
|
+
}));
|
|
43
56
|
});
|
|
44
57
|
};
|
|
45
58
|
StarRating.displayName = 'StarRating';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["active", "disabled", "children", "icon", "plain", "title", "onBlur", "onFocus", "onMouseOver", "onMouseOut", "reverse", "onClick"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
import React, { forwardRef, useContext, useEffect, useState } from 'react';
|
|
5
5
|
import { Button } from '../Button';
|
|
6
6
|
import { Text } from '../Text';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["caption", "children"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
import React, { forwardRef } from 'react';
|
|
5
5
|
import { StyledTable, StyledTableDataCaption } from './StyledTable';
|
|
6
6
|
import { TablePropTypes } from './propTypes';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["align", "aria-disabled", "background", "border", "children", "className", "colSpan", "onWidth", "pad", "plain", "rowSpan", "scope", "size", "verticalAlign"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
import React, { forwardRef, useContext, useEffect, useMemo, useRef } from 'react';
|
|
5
5
|
import { ThemeContext } from 'styled-components';
|
|
6
6
|
import { useLayoutEffect } from '../../utils/use-isomorphic-layout-effect';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["alignControls", "children", "flex", "justify", "messages", "responsive"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
import React, { forwardRef, useCallback, useContext, useState, useEffect, useRef, useMemo } from 'react';
|
|
5
5
|
import { Previous } from 'grommet-icons/icons/Previous';
|
|
6
6
|
import { Next } from 'grommet-icons/icons/Next';
|
|
@@ -271,7 +271,6 @@ var Tabs = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
271
271
|
background: theme.tabs.background
|
|
272
272
|
}), /*#__PURE__*/React.createElement(Box, _extends({
|
|
273
273
|
alignSelf: alignControls || ((_theme$tabs$header = theme.tabs.header) == null ? void 0 : _theme$tabs$header.alignSelf),
|
|
274
|
-
role: "tablist",
|
|
275
274
|
flex: false,
|
|
276
275
|
direction: overflow ? 'row' : 'column'
|
|
277
276
|
}, tabsHeaderStyles), overflow && /*#__PURE__*/React.createElement(Button, {
|
|
@@ -291,6 +290,7 @@ var Tabs = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
291
290
|
}, /*#__PURE__*/React.createElement(Previous, {
|
|
292
291
|
color: disableLeftArrow ? theme.button.disabled.color : theme.global.colors.text
|
|
293
292
|
}))), /*#__PURE__*/React.createElement(StyledTabsHeader, _extends({
|
|
293
|
+
role: "tablist",
|
|
294
294
|
ref: headerRef,
|
|
295
295
|
direction: "row",
|
|
296
296
|
justify: overflow ? 'start' : justify,
|
|
@@ -34,7 +34,7 @@ var customTheme = deepMerge(grommet, {
|
|
|
34
34
|
background: 'dark-1',
|
|
35
35
|
color: 'accent-1'
|
|
36
36
|
},
|
|
37
|
-
background: 'dark-
|
|
37
|
+
background: 'dark-2',
|
|
38
38
|
border: undefined,
|
|
39
39
|
color: 'white',
|
|
40
40
|
hover: {
|
|
@@ -51,10 +51,10 @@ var customTheme = deepMerge(grommet, {
|
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
tabs: {
|
|
54
|
-
background: 'dark-
|
|
54
|
+
background: 'dark-1',
|
|
55
55
|
gap: 'medium',
|
|
56
56
|
header: {
|
|
57
|
-
background: 'dark-
|
|
57
|
+
background: 'dark-3',
|
|
58
58
|
extend: function extend(_ref3) {
|
|
59
59
|
var theme = _ref3.theme;
|
|
60
60
|
return css(["padding:10px;box-shadow:0px 3px 8px rgba(0,0,0,0.5);"]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["name", "value", "size", "onRemove", "onClick"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
import React, { forwardRef } from 'react';
|
|
5
5
|
import { FormClose } from 'grommet-icons/icons/FormClose';
|
|
6
6
|
import { TagPropTypes } from './propTypes';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["children", "color", "tag", "as", "tip", "a11yTitle", "truncate", "size", "skeleton", "level"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
import React, { forwardRef, useMemo, useState } from 'react';
|
|
5
5
|
import { useLayoutEffect } from '../../utils/use-isomorphic-layout-effect';
|
|
6
6
|
import { StyledText } from './StyledText';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["as", "size"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
import React, { forwardRef } from 'react';
|
|
5
5
|
import { Skeleton } from '../Skeleton';
|
|
6
6
|
import { useThemeValue } from '../../utils/useThemeValue';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["a11yTitle", "fill", "focusIndicator", "name", "onBlur", "onChange", "onFocus", "onKeyDown", "value"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
import React, { forwardRef, useContext, useState } from 'react';
|
|
5
5
|
import { FormContext } from '../Form/FormContext';
|
|
6
6
|
import { Keyboard } from '../Keyboard';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["a11yTitle", "defaultSuggestion", "defaultValue", "dropAlign", "dropHeight", "dropTarget", "dropProps", "focusIndicator", "icon", "id", "messages", "name", "onBlur", "onChange", "onFocus", "onKeyDown", "onSelect", "onSuggestionSelect", "onSuggestionsClose", "onSuggestionsOpen", "placeholder", "plain", "readOnly", "readOnlyCopy", "reverse", "suggestions", "textAlign", "value", "width"];
|
|
2
2
|
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); }
|
|
3
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
3
|
+
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; }
|
|
4
4
|
import React, { forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
6
|
import { Box } from '../Box';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Box, TextInput
|
|
2
|
+
import { Box, TextInput } from 'grommet';
|
|
3
3
|
export var Simple = function Simple() {
|
|
4
4
|
var _React$useState = React.useState(''),
|
|
5
5
|
value = _React$useState[0],
|
|
@@ -22,12 +22,7 @@ export var Simple = function Simple() {
|
|
|
22
22
|
value: value,
|
|
23
23
|
onChange: onChange,
|
|
24
24
|
"aria-label": "Input Text"
|
|
25
|
-
}))
|
|
26
|
-
label: "label"
|
|
27
|
-
// contentProps={{
|
|
28
|
-
// border: false,
|
|
29
|
-
// }}
|
|
30
|
-
}, /*#__PURE__*/React.createElement(TextInput, null))))
|
|
25
|
+
})))
|
|
31
26
|
// </Grommet>
|
|
32
27
|
);
|
|
33
28
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _excluded = ["children", "onRemove"],
|
|
2
2
|
_excluded2 = ["value", "onAdd", "onChange", "onRemove"];
|
|
3
3
|
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); }
|
|
4
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
4
|
+
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; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { FormClose } from "grommet-icons/es6/icons/FormClose";
|
|
7
7
|
import { Box, Button, Keyboard, Text, TextInput } from 'grommet';
|
|
@@ -1,35 +1,50 @@
|
|
|
1
1
|
function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
|
|
2
2
|
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); }
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import styled from 'styled-components';
|
|
4
5
|
import { Like } from 'grommet-icons/icons/Like';
|
|
5
6
|
import { LikeFill } from 'grommet-icons/icons/LikeFill';
|
|
6
7
|
import { Dislike } from 'grommet-icons/icons/Dislike';
|
|
7
8
|
import { DislikeFill } from 'grommet-icons/icons/DislikeFill';
|
|
9
|
+
import { Box } from '../Box';
|
|
8
10
|
import { RadioButtonGroup } from '../RadioButtonGroup';
|
|
9
11
|
import { useThemeValue } from '../../utils/useThemeValue';
|
|
12
|
+
import { focusStyle, useKeyboard } from '../../utils';
|
|
13
|
+
var StyledThumbsRatingBox = styled(Box).withConfig({
|
|
14
|
+
displayName: "ThumbsRating__StyledThumbsRatingBox",
|
|
15
|
+
componentId: "sc-1xsgzvn-0"
|
|
16
|
+
})(["", ";"], function (props) {
|
|
17
|
+
return props.focus && focusStyle();
|
|
18
|
+
});
|
|
10
19
|
var ThumbsRating = function ThumbsRating(_ref) {
|
|
11
20
|
var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
12
21
|
var _useThemeValue = useThemeValue(),
|
|
13
22
|
theme = _useThemeValue.theme;
|
|
23
|
+
var usingKeyboard = useKeyboard();
|
|
14
24
|
return /*#__PURE__*/React.createElement(RadioButtonGroup, _extends({
|
|
15
25
|
direction: "row",
|
|
16
26
|
options: ['like', 'dislike']
|
|
17
27
|
}, rest), function (option, _ref2) {
|
|
18
28
|
var _theme$thumbsRating3, _theme$thumbsRating4;
|
|
19
|
-
var checked = _ref2.checked
|
|
29
|
+
var checked = _ref2.checked,
|
|
30
|
+
focus = _ref2.focus;
|
|
20
31
|
if (option === 'like') {
|
|
21
32
|
var _theme$thumbsRating, _theme$thumbsRating2;
|
|
22
|
-
return
|
|
33
|
+
return /*#__PURE__*/React.createElement(StyledThumbsRatingBox, {
|
|
34
|
+
focus: focus && usingKeyboard
|
|
35
|
+
}, checked ? /*#__PURE__*/React.createElement(LikeFill, {
|
|
23
36
|
color: (_theme$thumbsRating = theme.thumbsRating) == null || (_theme$thumbsRating = _theme$thumbsRating.like) == null ? void 0 : _theme$thumbsRating.color
|
|
24
37
|
}) : /*#__PURE__*/React.createElement(Like, {
|
|
25
38
|
color: (_theme$thumbsRating2 = theme.thumbsRating) == null || (_theme$thumbsRating2 = _theme$thumbsRating2.like) == null ? void 0 : _theme$thumbsRating2.color
|
|
26
|
-
});
|
|
39
|
+
}));
|
|
27
40
|
}
|
|
28
|
-
return
|
|
41
|
+
return /*#__PURE__*/React.createElement(StyledThumbsRatingBox, {
|
|
42
|
+
focus: focus && usingKeyboard
|
|
43
|
+
}, checked ? /*#__PURE__*/React.createElement(DislikeFill, {
|
|
29
44
|
color: (_theme$thumbsRating3 = theme.thumbsRating) == null || (_theme$thumbsRating3 = _theme$thumbsRating3.dislike) == null ? void 0 : _theme$thumbsRating3.color
|
|
30
45
|
}) : /*#__PURE__*/React.createElement(Dislike, {
|
|
31
46
|
color: (_theme$thumbsRating4 = theme.thumbsRating) == null || (_theme$thumbsRating4 = _theme$thumbsRating4.dislike) == null ? void 0 : _theme$thumbsRating4.color
|
|
32
|
-
});
|
|
47
|
+
}));
|
|
33
48
|
});
|
|
34
49
|
};
|
|
35
50
|
ThumbsRating.displayName = 'ThumbsRating';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { Button } from '../Button';
|
|
3
|
+
import { Box } from '../Box';
|
|
3
4
|
import { roundStyle, edgeStyle, parseMetricToNum } from '../../utils';
|
|
4
5
|
var adjustPad = function adjustPad(value, theme) {
|
|
5
6
|
// resolve t-shirt size if it exists
|
|
@@ -35,4 +36,11 @@ export var StyledButton = styled(Button).withConfig({
|
|
|
35
36
|
// remove hover style from StyledButton/StyledButtonKind theme
|
|
36
37
|
!props.kind && "border: none;\n box-shadow: none;"
|
|
37
38
|
);
|
|
39
|
+
});
|
|
40
|
+
export var StyledBox = styled(Box).withConfig({
|
|
41
|
+
displayName: "StyledToggleGroup__StyledBox",
|
|
42
|
+
componentId: "sc-13k5sx8-1"
|
|
43
|
+
})(["", ";"], function (props) {
|
|
44
|
+
var _props$theme$toggleGr;
|
|
45
|
+
return (_props$theme$toggleGr = props.theme.toggleGroup) == null || (_props$theme$toggleGr = _props$theme$toggleGr.container) == null ? void 0 : _props$theme$toggleGr.extend;
|
|
38
46
|
});
|