grommet 2.44.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 +1 -1
- 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/Button/Button.js +1 -1
- package/components/Calendar/Calendar.js +1 -1
- package/components/Card/stories/CustomThemed/Clickable.js +1 -1
- package/components/Card/stories/CustomThemed/Themed.js +1 -1
- package/components/Cards/Cards.js +1 -1
- 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/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/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 +1 -1
- 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/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/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/FormField/FormField.js +73 -18
- package/components/Grid/Grid.js +1 -1
- package/components/Grid/stories/CustomThemed/Responsive.js +1 -1
- package/components/Grommet/Grommet.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/components/Nav/stories/Sidebar.js +1 -1
- package/components/Notification/Notification.js +38 -27
- package/components/Page/Page.js +1 -1
- package/components/PageContent/PageContent.js +1 -1
- package/components/PageHeader/PageHeader.js +1 -1
- 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/GridContainer.js +1 -1
- package/components/Skeleton/stories/Individual.js +1 -1
- package/components/SkipLink/SkipLink.js +1 -1
- package/components/SkipLinkTarget/SkipLinkTarget.js +1 -1
- package/components/Spinner/Spinner.js +1 -1
- package/components/Stack/Stack.js +1 -1
- package/components/StarRating/StarRating.js +1 -1
- 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 +1 -1
- 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/TextInput/TextInput.js +1 -1
- package/components/TextInput/stories/WithTags.js +1 -1
- 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 +1 -1
- 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/Button/Button.js +1 -1
- package/es6/components/Calendar/Calendar.js +1 -1
- package/es6/components/Card/stories/CustomThemed/Clickable.js +1 -1
- package/es6/components/Card/stories/CustomThemed/Themed.js +1 -1
- package/es6/components/Cards/Cards.js +1 -1
- 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/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/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 +1 -1
- 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/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/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/FormField/FormField.js +73 -18
- package/es6/components/Grid/Grid.js +1 -1
- package/es6/components/Grid/stories/CustomThemed/Responsive.js +1 -1
- package/es6/components/Grommet/Grommet.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/es6/components/Nav/stories/Sidebar.js +1 -1
- package/es6/components/Notification/Notification.js +38 -27
- 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/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/GridContainer.js +1 -1
- package/es6/components/Skeleton/stories/Individual.js +1 -1
- package/es6/components/SkipLink/SkipLink.js +1 -1
- package/es6/components/SkipLinkTarget/SkipLinkTarget.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 +1 -1
- 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 +1 -1
- 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/TextInput/TextInput.js +1 -1
- package/es6/components/TextInput/stories/WithTags.js +1 -1
- 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/themes/base.d.ts +49 -5
- package/es6/themes/base.js +39 -9
- 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/package.json +25 -25
- package/themes/base.d.ts +49 -5
- package/themes/base.js +39 -9
- package/utils/pagination.js +1 -1
- package/utils/responsive.js +1 -0
- package/utils/styles.js +49 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "grommet",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.45.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"module": "es6/index.js",
|
|
6
6
|
"jsnext:main": "es6/index.js",
|
|
@@ -55,25 +55,25 @@
|
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@emotion/is-prop-valid": "^1.3.1",
|
|
58
|
-
"grommet-icons": "^4.12.
|
|
58
|
+
"grommet-icons": "^4.12.3",
|
|
59
59
|
"hoist-non-react-statics": "^3.3.2",
|
|
60
60
|
"markdown-to-jsx": "7.4.4",
|
|
61
61
|
"prop-types": "^15.8.1"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@babel/cli": "^7.26.4",
|
|
65
|
-
"@babel/core": "^7.26.
|
|
66
|
-
"@babel/eslint-parser": "^7.
|
|
65
|
+
"@babel/core": "^7.26.7",
|
|
66
|
+
"@babel/eslint-parser": "^7.26.5",
|
|
67
67
|
"@babel/node": "^7.26.0",
|
|
68
68
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
69
69
|
"@babel/plugin-proposal-do-expressions": "^7.25.9",
|
|
70
70
|
"@babel/plugin-proposal-export-default-from": "^7.25.9",
|
|
71
|
-
"@babel/plugin-proposal-pipeline-operator": "^7.
|
|
71
|
+
"@babel/plugin-proposal-pipeline-operator": "^7.26.7",
|
|
72
72
|
"@babel/plugin-transform-class-properties": "^7.25.9",
|
|
73
73
|
"@babel/plugin-transform-logical-assignment-operators": "^7.25.9",
|
|
74
|
-
"@babel/plugin-transform-nullish-coalescing-operator": "^7.
|
|
74
|
+
"@babel/plugin-transform-nullish-coalescing-operator": "^7.26.6",
|
|
75
75
|
"@babel/plugin-transform-optional-chaining": "^7.25.9",
|
|
76
|
-
"@babel/preset-env": "^7.26.
|
|
76
|
+
"@babel/preset-env": "^7.26.7",
|
|
77
77
|
"@babel/preset-react": "^7.26.3",
|
|
78
78
|
"@storybook/addon-a11y": "7.0.20",
|
|
79
79
|
"@storybook/addon-storysource": "7.0.20",
|
|
@@ -84,12 +84,12 @@
|
|
|
84
84
|
"@storybook/source-loader": "7.0.20",
|
|
85
85
|
"@testing-library/dom": "^10.4.0",
|
|
86
86
|
"@testing-library/jest-dom": "^6.6.3",
|
|
87
|
-
"@testing-library/react": "^16.
|
|
87
|
+
"@testing-library/react": "^16.2.0",
|
|
88
88
|
"@testing-library/testcafe": "^5.0.1",
|
|
89
|
-
"@testing-library/user-event": "^14.
|
|
89
|
+
"@testing-library/user-event": "^14.6.1",
|
|
90
90
|
"@types/jest": "^29.5.14",
|
|
91
91
|
"@types/jest-axe": "^3.5.9",
|
|
92
|
-
"@types/node": "^22.10.
|
|
92
|
+
"@types/node": "^22.10.10",
|
|
93
93
|
"@types/react": "^18.3.12",
|
|
94
94
|
"@types/react-dom": "^18.3.1",
|
|
95
95
|
"@types/styled-components": "^5.1.34",
|
|
@@ -98,12 +98,12 @@
|
|
|
98
98
|
"babel-loader": "^9.2.1",
|
|
99
99
|
"babel-plugin-styled-components": "^2.1.4",
|
|
100
100
|
"babel-plugin-transform-imports": "^2.0.0",
|
|
101
|
-
"bundlesize2": "^0.0.
|
|
102
|
-
"chromatic": "^11.
|
|
101
|
+
"bundlesize2": "^0.0.32",
|
|
102
|
+
"chromatic": "^11.25.1",
|
|
103
103
|
"clean-webpack-plugin": "^4.0.0",
|
|
104
104
|
"copy-webpack-plugin": "^12.0.2",
|
|
105
105
|
"copyfiles": "^2.4.1",
|
|
106
|
-
"core-js": "^3.
|
|
106
|
+
"core-js": "^3.40.0",
|
|
107
107
|
"cross-env": "^7.0.3",
|
|
108
108
|
"del": "^6.1.1",
|
|
109
109
|
"eslint": "^8.57.0",
|
|
@@ -113,18 +113,18 @@
|
|
|
113
113
|
"eslint-plugin-import": "^2.31.0",
|
|
114
114
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
115
115
|
"eslint-plugin-prettier": "4.2.1",
|
|
116
|
-
"eslint-plugin-react": "^7.37.
|
|
117
|
-
"eslint-plugin-react-hooks": "
|
|
116
|
+
"eslint-plugin-react": "^7.37.4",
|
|
117
|
+
"eslint-plugin-react-hooks": "5.0.0",
|
|
118
118
|
"eslint-plugin-testing-library": "^6.4.0",
|
|
119
|
-
"fs-extra": "^11.
|
|
119
|
+
"fs-extra": "^11.3.0",
|
|
120
120
|
"grommet-theme-hpe": "^5.7.0",
|
|
121
121
|
"jest": "^29.7.0",
|
|
122
122
|
"jest-axe": "^9.0.0",
|
|
123
123
|
"jest-cli": "^29.7.0",
|
|
124
124
|
"jest-environment-jsdom": "^29.7.0",
|
|
125
125
|
"jest-styled-components": "7.0.5",
|
|
126
|
-
"jsdom": "^
|
|
127
|
-
"postcss": "^8.
|
|
126
|
+
"jsdom": "^26.0.0",
|
|
127
|
+
"postcss": "^8.5.1",
|
|
128
128
|
"pre-commit": "^1.2.2",
|
|
129
129
|
"prettier": "^2.8.8",
|
|
130
130
|
"pretty-quick": "^3.1.3",
|
|
@@ -132,21 +132,21 @@
|
|
|
132
132
|
"react-dev-utils": "^12.0.1",
|
|
133
133
|
"react-dom": "^18.3.1",
|
|
134
134
|
"react-is": "^18.3.1",
|
|
135
|
-
"react-shadow": "^20.
|
|
135
|
+
"react-shadow": "^20.6.0",
|
|
136
136
|
"regenerator-runtime": "^0.14.1",
|
|
137
137
|
"simple-git": "^3.27.0",
|
|
138
138
|
"storybook": "7.0.20",
|
|
139
|
-
"styled-components": "^6.1.
|
|
139
|
+
"styled-components": "^6.1.14",
|
|
140
140
|
"tarball-extract": "^0.0.6",
|
|
141
141
|
"testcafe": "3.3.0",
|
|
142
142
|
"testcafe-react-selectors": "^5.0.3",
|
|
143
143
|
"testcafe-reporter-xunit": "^2.2.3",
|
|
144
144
|
"ts-jest": "^29.2.5",
|
|
145
|
-
"ts-loader": "^9.5.
|
|
146
|
-
"typescript": "^5.7.
|
|
145
|
+
"ts-loader": "^9.5.2",
|
|
146
|
+
"typescript": "^5.7.3",
|
|
147
147
|
"webpack": "^5.97.1",
|
|
148
|
-
"webpack-cli": "^
|
|
149
|
-
"webpack-dev-server": "^5.
|
|
148
|
+
"webpack-cli": "^6.0.1",
|
|
149
|
+
"webpack-dev-server": "^5.2.0"
|
|
150
150
|
},
|
|
151
151
|
"jest": {
|
|
152
152
|
"transform": {
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
"bundlesize": [
|
|
209
209
|
{
|
|
210
210
|
"path": "./dist/grommet.min.js",
|
|
211
|
-
"maxSize": "
|
|
211
|
+
"maxSize": "175 kB"
|
|
212
212
|
}
|
|
213
213
|
],
|
|
214
214
|
"keywords": [
|
package/themes/base.d.ts
CHANGED
|
@@ -282,6 +282,12 @@ type DigitalTexts =
|
|
|
282
282
|
| 'xxlarge'
|
|
283
283
|
| string;
|
|
284
284
|
|
|
285
|
+
type ContainerExtend = {
|
|
286
|
+
container?: {
|
|
287
|
+
extend?: ExtendType;
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
|
|
285
291
|
export interface ThemeType {
|
|
286
292
|
global?: {
|
|
287
293
|
active?: {
|
|
@@ -314,18 +320,21 @@ export interface ThemeType {
|
|
|
314
320
|
value?: number;
|
|
315
321
|
borderSize?: BreakpointBorderSize;
|
|
316
322
|
edgeSize?: BreakpointEdgeSize;
|
|
323
|
+
radius?: BreakpointEdgeSize;
|
|
317
324
|
size?: BreakpointSize;
|
|
318
325
|
};
|
|
319
326
|
medium?: {
|
|
320
327
|
value?: number;
|
|
321
328
|
borderSize?: BreakpointBorderSize;
|
|
322
329
|
edgeSize?: BreakpointEdgeSize;
|
|
330
|
+
radius?: BreakpointEdgeSize;
|
|
323
331
|
size?: BreakpointSize;
|
|
324
332
|
};
|
|
325
333
|
large?: {
|
|
326
334
|
value?: number;
|
|
327
335
|
borderSize?: BreakpointBorderSize;
|
|
328
336
|
edgeSize?: BreakpointEdgeSize;
|
|
337
|
+
radius?: BreakpointEdgeSize;
|
|
329
338
|
size?: BreakpointSize;
|
|
330
339
|
};
|
|
331
340
|
[x: string]:
|
|
@@ -333,6 +342,7 @@ export interface ThemeType {
|
|
|
333
342
|
value?: number;
|
|
334
343
|
borderSize?: BreakpointBorderSize;
|
|
335
344
|
edgeSize?: BreakpointEdgeSize;
|
|
345
|
+
radius?: BreakpointEdgeSize;
|
|
336
346
|
size?: BreakpointSize;
|
|
337
347
|
}
|
|
338
348
|
| undefined;
|
|
@@ -403,13 +413,16 @@ export interface ThemeType {
|
|
|
403
413
|
outline?: {
|
|
404
414
|
color?: ColorType;
|
|
405
415
|
size?: string;
|
|
416
|
+
offset?: string;
|
|
406
417
|
};
|
|
407
418
|
shadow?:
|
|
408
419
|
| string
|
|
409
420
|
| {
|
|
410
421
|
color?: ColorType;
|
|
411
422
|
size?: string;
|
|
423
|
+
blur?: string;
|
|
412
424
|
};
|
|
425
|
+
twoColor?: boolean;
|
|
413
426
|
};
|
|
414
427
|
font?: {
|
|
415
428
|
face?: string;
|
|
@@ -457,6 +470,7 @@ export interface ThemeType {
|
|
|
457
470
|
medium?: number;
|
|
458
471
|
weak?: number;
|
|
459
472
|
};
|
|
473
|
+
radius?: BreakpointEdgeSize;
|
|
460
474
|
selected?: {
|
|
461
475
|
background?: BackgroundType;
|
|
462
476
|
color?: ColorType;
|
|
@@ -514,12 +528,14 @@ export interface ThemeType {
|
|
|
514
528
|
color?: ColorType;
|
|
515
529
|
fontWeight?: number;
|
|
516
530
|
textDecoration?: string;
|
|
531
|
+
gap?: GapType;
|
|
517
532
|
};
|
|
518
533
|
[x: string]:
|
|
519
534
|
| {
|
|
520
535
|
color?: ColorType;
|
|
521
536
|
fontWeight?: number;
|
|
522
537
|
textDecoration?: string;
|
|
538
|
+
gap?: GapType;
|
|
523
539
|
}
|
|
524
540
|
| undefined;
|
|
525
541
|
};
|
|
@@ -798,6 +814,9 @@ export interface ThemeType {
|
|
|
798
814
|
dataTable?: {
|
|
799
815
|
body?: {
|
|
800
816
|
extend?: ExtendType;
|
|
817
|
+
row?: {
|
|
818
|
+
extend?: ExtendType;
|
|
819
|
+
};
|
|
801
820
|
selected?: {
|
|
802
821
|
background?: BackgroundType;
|
|
803
822
|
};
|
|
@@ -917,9 +936,6 @@ export interface ThemeType {
|
|
|
917
936
|
margin?: MarginType;
|
|
918
937
|
pad?: PadType;
|
|
919
938
|
};
|
|
920
|
-
checkBox?: {
|
|
921
|
-
pad?: PadType;
|
|
922
|
-
};
|
|
923
939
|
disabled?: {
|
|
924
940
|
background?: BackgroundType;
|
|
925
941
|
border?: {
|
|
@@ -928,12 +944,19 @@ export interface ThemeType {
|
|
|
928
944
|
label?: {
|
|
929
945
|
color?: ColorType;
|
|
930
946
|
};
|
|
947
|
+
help?: {
|
|
948
|
+
color?: ColorType;
|
|
949
|
+
};
|
|
950
|
+
info?: {
|
|
951
|
+
color?: ColorType;
|
|
952
|
+
};
|
|
931
953
|
};
|
|
932
954
|
focus?: {
|
|
933
955
|
background?: BackgroundType;
|
|
934
956
|
border?: {
|
|
935
957
|
color?: ColorType;
|
|
936
958
|
};
|
|
959
|
+
containerFocus?: boolean;
|
|
937
960
|
};
|
|
938
961
|
error?: {
|
|
939
962
|
background?: BackgroundType;
|
|
@@ -968,6 +991,20 @@ export interface ThemeType {
|
|
|
968
991
|
color?: ColorType;
|
|
969
992
|
};
|
|
970
993
|
};
|
|
994
|
+
checkBox?: ContainerExtend & { pad?: PadType };
|
|
995
|
+
checkBoxGroup?: ContainerExtend;
|
|
996
|
+
textArea?: ContainerExtend;
|
|
997
|
+
textInput?: ContainerExtend;
|
|
998
|
+
select?: ContainerExtend;
|
|
999
|
+
maskedInput?: ContainerExtend;
|
|
1000
|
+
selectMultiple?: ContainerExtend;
|
|
1001
|
+
dateInput?: ContainerExtend;
|
|
1002
|
+
fileInput?: ContainerExtend;
|
|
1003
|
+
radioButton?: ContainerExtend;
|
|
1004
|
+
radioButtonGroup?: ContainerExtend;
|
|
1005
|
+
rangeSelector?: ContainerExtend;
|
|
1006
|
+
starRating?: ContainerExtend;
|
|
1007
|
+
thumbsRating?: ContainerExtend;
|
|
971
1008
|
};
|
|
972
1009
|
grommet?: {
|
|
973
1010
|
extend?: ExtendType;
|
|
@@ -1199,6 +1236,7 @@ export interface ThemeType {
|
|
|
1199
1236
|
};
|
|
1200
1237
|
drop?: DropType;
|
|
1201
1238
|
extend?: ExtendType;
|
|
1239
|
+
container?: BoxProps;
|
|
1202
1240
|
group?: {
|
|
1203
1241
|
container?: BoxProps;
|
|
1204
1242
|
separator?: {
|
|
@@ -1235,7 +1273,7 @@ export interface ThemeType {
|
|
|
1235
1273
|
iconContainer?: BoxProps;
|
|
1236
1274
|
textContainer?: BoxProps;
|
|
1237
1275
|
title?: TextProps;
|
|
1238
|
-
message?: TextProps;
|
|
1276
|
+
message?: TextProps & { fill?: boolean };
|
|
1239
1277
|
close?: {
|
|
1240
1278
|
icon?: React.ReactNode | Icon;
|
|
1241
1279
|
color?: ColorType;
|
|
@@ -1660,6 +1698,9 @@ export interface ThemeType {
|
|
|
1660
1698
|
up?: React.ReactNode | Icon;
|
|
1661
1699
|
margin?: MarginType;
|
|
1662
1700
|
};
|
|
1701
|
+
listbox?: {
|
|
1702
|
+
extend?: ExtendType;
|
|
1703
|
+
};
|
|
1663
1704
|
options?: {
|
|
1664
1705
|
container?: PropsOf<typeof Box>;
|
|
1665
1706
|
text?: PropsOf<typeof Text>;
|
|
@@ -1670,6 +1711,9 @@ export interface ThemeType {
|
|
|
1670
1711
|
};
|
|
1671
1712
|
selectMultiple?: {
|
|
1672
1713
|
maxInline?: number;
|
|
1714
|
+
listbox?: {
|
|
1715
|
+
extend?: ExtendType;
|
|
1716
|
+
};
|
|
1673
1717
|
};
|
|
1674
1718
|
skeleton?: BoxProps & { colors?: SkeletonColorsType; extend?: ExtendType };
|
|
1675
1719
|
skipLinks?: {
|
|
@@ -1934,7 +1978,7 @@ export interface ThemeType {
|
|
|
1934
1978
|
};
|
|
1935
1979
|
pad?: PadType;
|
|
1936
1980
|
};
|
|
1937
|
-
container?: BoxProps;
|
|
1981
|
+
container?: BoxProps & { extend?: ExtendType };
|
|
1938
1982
|
divider?:
|
|
1939
1983
|
| {
|
|
1940
1984
|
color?: ColorType;
|
package/themes/base.js
CHANGED
|
@@ -190,6 +190,7 @@ var generate = exports.generate = function generate(baseSpacing, scale) {
|
|
|
190
190
|
// 24
|
|
191
191
|
xlarge: baseSpacing * 2 + "px" // 48
|
|
192
192
|
},
|
|
193
|
+
// radius: {},
|
|
193
194
|
size: {
|
|
194
195
|
xxsmall: baseSpacing + "px",
|
|
195
196
|
// 24
|
|
@@ -296,7 +297,8 @@ var generate = exports.generate = function generate(baseSpacing, scale) {
|
|
|
296
297
|
shadow: {
|
|
297
298
|
color: 'focus',
|
|
298
299
|
size: '2px'
|
|
299
|
-
}
|
|
300
|
+
},
|
|
301
|
+
twoColor: undefined
|
|
300
302
|
},
|
|
301
303
|
font: _extends({}, fontSizing(0)),
|
|
302
304
|
hover: {
|
|
@@ -333,6 +335,7 @@ var generate = exports.generate = function generate(baseSpacing, scale) {
|
|
|
333
335
|
medium: 0.4,
|
|
334
336
|
weak: 0.1
|
|
335
337
|
},
|
|
338
|
+
// radius: {},
|
|
336
339
|
selected: {
|
|
337
340
|
background: 'selected',
|
|
338
341
|
color: 'white'
|
|
@@ -417,6 +420,7 @@ var generate = exports.generate = function generate(baseSpacing, scale) {
|
|
|
417
420
|
// color: undefined,
|
|
418
421
|
// fontWeight: undefined,
|
|
419
422
|
// textDecoration: undefined,
|
|
423
|
+
// gap: undefined,
|
|
420
424
|
// },
|
|
421
425
|
// },
|
|
422
426
|
// extend: undefined,
|
|
@@ -944,6 +948,9 @@ var generate = exports.generate = function generate(baseSpacing, scale) {
|
|
|
944
948
|
dataTable: {
|
|
945
949
|
// body: {
|
|
946
950
|
// extend: undefined,
|
|
951
|
+
// row: {
|
|
952
|
+
// extend: undefined,
|
|
953
|
+
// }
|
|
947
954
|
// selected: undefined,
|
|
948
955
|
// },
|
|
949
956
|
pinned: {
|
|
@@ -1071,6 +1078,11 @@ var generate = exports.generate = function generate(baseSpacing, scale) {
|
|
|
1071
1078
|
// extend: undefined,
|
|
1072
1079
|
},
|
|
1073
1080
|
formField: {
|
|
1081
|
+
// [inputname]: {
|
|
1082
|
+
// container: {
|
|
1083
|
+
// extend: undefined,
|
|
1084
|
+
// }
|
|
1085
|
+
// }
|
|
1074
1086
|
border: {
|
|
1075
1087
|
color: 'border',
|
|
1076
1088
|
error: {
|
|
@@ -1100,15 +1112,22 @@ var generate = exports.generate = function generate(baseSpacing, scale) {
|
|
|
1100
1112
|
// label: {
|
|
1101
1113
|
// color: undefined,
|
|
1102
1114
|
// },
|
|
1115
|
+
// help: {
|
|
1116
|
+
// color: undefined,
|
|
1117
|
+
// },
|
|
1118
|
+
// info: {
|
|
1119
|
+
// color: undefined,
|
|
1120
|
+
// },
|
|
1121
|
+
},
|
|
1122
|
+
focus: {
|
|
1123
|
+
containerFocus: true
|
|
1124
|
+
// background: {
|
|
1125
|
+
// color: undefined,
|
|
1126
|
+
// },
|
|
1127
|
+
// border: {
|
|
1128
|
+
// color: undefined,
|
|
1129
|
+
// },
|
|
1103
1130
|
},
|
|
1104
|
-
// focus: {
|
|
1105
|
-
// background: {
|
|
1106
|
-
// color: undefined,
|
|
1107
|
-
// },
|
|
1108
|
-
// border: {
|
|
1109
|
-
// color: undefined,
|
|
1110
|
-
// },
|
|
1111
|
-
// },
|
|
1112
1131
|
error: {
|
|
1113
1132
|
color: 'status-critical',
|
|
1114
1133
|
margin: {
|
|
@@ -1318,6 +1337,9 @@ var generate = exports.generate = function generate(baseSpacing, scale) {
|
|
|
1318
1337
|
}
|
|
1319
1338
|
// any drop props
|
|
1320
1339
|
},
|
|
1340
|
+
// container: {
|
|
1341
|
+
// // any box props
|
|
1342
|
+
// },
|
|
1321
1343
|
group: {
|
|
1322
1344
|
container: {
|
|
1323
1345
|
pad: {
|
|
@@ -1435,6 +1457,7 @@ var generate = exports.generate = function generate(baseSpacing, scale) {
|
|
|
1435
1457
|
message: {
|
|
1436
1458
|
// any text props
|
|
1437
1459
|
margin: 'none'
|
|
1460
|
+
// fill: undefined,
|
|
1438
1461
|
},
|
|
1439
1462
|
close: {
|
|
1440
1463
|
icon: _FormClose.FormClose
|
|
@@ -1972,6 +1995,9 @@ var generate = exports.generate = function generate(baseSpacing, scale) {
|
|
|
1972
1995
|
down: _FormDown.FormDown
|
|
1973
1996
|
// up: undefined
|
|
1974
1997
|
},
|
|
1998
|
+
// listbox: {
|
|
1999
|
+
// extend: undefined,
|
|
2000
|
+
// },
|
|
1975
2001
|
options: {
|
|
1976
2002
|
container: {
|
|
1977
2003
|
align: 'start',
|
|
@@ -1986,6 +2012,9 @@ var generate = exports.generate = function generate(baseSpacing, scale) {
|
|
|
1986
2012
|
},
|
|
1987
2013
|
selectMultiple: {
|
|
1988
2014
|
maxInline: 5
|
|
2015
|
+
// listbox: {
|
|
2016
|
+
// extend: () => undefined,
|
|
2017
|
+
// },
|
|
1989
2018
|
},
|
|
1990
2019
|
skeleton: {
|
|
1991
2020
|
border: false,
|
|
@@ -2283,6 +2312,7 @@ var generate = exports.generate = function generate(baseSpacing, scale) {
|
|
|
2283
2312
|
container: {
|
|
2284
2313
|
round: 'xsmall',
|
|
2285
2314
|
border: true
|
|
2315
|
+
// extend: undefined,
|
|
2286
2316
|
},
|
|
2287
2317
|
divider: {
|
|
2288
2318
|
color: 'border'
|
package/utils/pagination.js
CHANGED
|
@@ -5,7 +5,7 @@ exports.usePagination = exports.normalizeShow = void 0;
|
|
|
5
5
|
var _react = require("react");
|
|
6
6
|
var _excluded = ["data", "page", "step"];
|
|
7
7
|
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); }
|
|
8
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.
|
|
8
|
+
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; }
|
|
9
9
|
var normalizeShow = exports.normalizeShow = function normalizeShow(showProp, step) {
|
|
10
10
|
var page;
|
|
11
11
|
// by default, show refers to the index of an item,
|
package/utils/responsive.js
CHANGED
|
@@ -29,6 +29,7 @@ var getBreakpointStyle = exports.getBreakpointStyle = function getBreakpointStyl
|
|
|
29
29
|
var breakpoint = breakpointSize && theme.global.breakpoints[breakpointSize] || {};
|
|
30
30
|
if (!breakpoint.edgeSize) breakpoint.edgeSize = theme.global.edgeSize;
|
|
31
31
|
if (!breakpoint.borderSize) breakpoint.borderSize = theme.global.borderSize;
|
|
32
|
+
if (!breakpoint.radius) breakpoint.radius = theme.global.radius;
|
|
32
33
|
if (!breakpoint.size) breakpoint.size = theme.global.size;
|
|
33
34
|
return breakpoint;
|
|
34
35
|
};
|
package/utils/styles.js
CHANGED
|
@@ -100,6 +100,7 @@ var focusStyles = function focusStyles(props, _temp) {
|
|
|
100
100
|
forceOutline = _ref.forceOutline,
|
|
101
101
|
justBorder = _ref.justBorder;
|
|
102
102
|
var focus = props.theme.global.focus;
|
|
103
|
+
var compoundFocusStyle = '';
|
|
103
104
|
if (!focus || forceOutline && !focus.outline) {
|
|
104
105
|
var color = (0, _colors.normalizeColor)('focus', props.theme);
|
|
105
106
|
if (color) return "outline: 2px solid " + color + ";";
|
|
@@ -109,9 +110,15 @@ var focusStyles = function focusStyles(props, _temp) {
|
|
|
109
110
|
if (typeof focus.outline === 'object') {
|
|
110
111
|
var _color = (0, _colors.normalizeColor)(focus.outline.color || 'focus', props.theme);
|
|
111
112
|
var size = focus.outline.size || '2px';
|
|
112
|
-
|
|
113
|
+
var offset = focus.outline.offset || '0px';
|
|
114
|
+
var outlineStyle = "\n outline-offset: " + offset + ";\n outline: " + size + " solid " + _color + ";\n ";
|
|
115
|
+
compoundFocusStyle += outlineStyle;
|
|
116
|
+
if (!focus.twoColor) return outlineStyle;
|
|
117
|
+
} else {
|
|
118
|
+
var _outlineStyle = "outline: " + focus.outline + ";";
|
|
119
|
+
compoundFocusStyle += _outlineStyle;
|
|
120
|
+
if (!focus.twoColor) return _outlineStyle;
|
|
113
121
|
}
|
|
114
|
-
return "outline: " + focus.outline + ";";
|
|
115
122
|
}
|
|
116
123
|
if (focus.shadow && (!focus.border || !justBorder)) {
|
|
117
124
|
if (typeof focus.shadow === 'object') {
|
|
@@ -120,14 +127,24 @@ var focusStyles = function focusStyles(props, _temp) {
|
|
|
120
127
|
// This is for backwards compatibility in v2.
|
|
121
128
|
focus.border && focus.border.color || focus.shadow.color || 'focus', props.theme);
|
|
122
129
|
var _size = focus.shadow.size || '2px'; // backwards compatible default
|
|
123
|
-
|
|
130
|
+
var blur = focus.shadow.blur || _size; // backwards compatible default
|
|
131
|
+
var inset = focus.shadow.inset ? 'inset ' : '';
|
|
132
|
+
var shadowStyle = "box-shadow: 0 0 " + blur + " " + _size + " " + _color2 + (inset ? " " + inset : '') + ";";
|
|
133
|
+
compoundFocusStyle += shadowStyle;
|
|
134
|
+
if (!focus.twoColor) return "\n outline: none;\n " + shadowStyle;
|
|
135
|
+
} else {
|
|
136
|
+
var _shadowStyle = "box-shadow: " + focus.shadow + ";";
|
|
137
|
+
compoundFocusStyle += _shadowStyle;
|
|
138
|
+
if (!focus.twoColor) return "outline: none; " + _shadowStyle;
|
|
124
139
|
}
|
|
125
|
-
return "\n outline: none;\n box-shadow: " + focus.shadow + ";\n ";
|
|
126
140
|
}
|
|
127
141
|
if (focus.border) {
|
|
128
142
|
var _color3 = (0, _colors.normalizeColor)(focus.border.color || 'focus', props.theme);
|
|
129
|
-
|
|
143
|
+
var borderStyle = "border-color: " + _color3 + ";";
|
|
144
|
+
compoundFocusStyle += borderStyle;
|
|
145
|
+
if (!focus.twoColor) return "outline: none; " + borderStyle;
|
|
130
146
|
}
|
|
147
|
+
if (focus.twoColor && compoundFocusStyle.length) return compoundFocusStyle;
|
|
131
148
|
return ''; // defensive
|
|
132
149
|
};
|
|
133
150
|
var unfocusStyles = function unfocusStyles(props, _temp2) {
|
|
@@ -135,6 +152,7 @@ var unfocusStyles = function unfocusStyles(props, _temp2) {
|
|
|
135
152
|
forceOutline = _ref2.forceOutline,
|
|
136
153
|
justBorder = _ref2.justBorder;
|
|
137
154
|
var focus = props.theme.global.focus;
|
|
155
|
+
var compoundFocusStyle = '';
|
|
138
156
|
if (!focus || forceOutline && !focus.outline) {
|
|
139
157
|
var color = (0, _colors.normalizeColor)('focus', props.theme);
|
|
140
158
|
if (color) return "outline: none;";
|
|
@@ -142,19 +160,32 @@ var unfocusStyles = function unfocusStyles(props, _temp2) {
|
|
|
142
160
|
}
|
|
143
161
|
if (focus.outline && (!focus.border || !justBorder)) {
|
|
144
162
|
if (typeof focus.outline === 'object') {
|
|
145
|
-
|
|
163
|
+
var outlineStyle = "\n outline-offset: 0px;\n outline: none;\n ";
|
|
164
|
+
compoundFocusStyle += outlineStyle;
|
|
165
|
+
if (!focus.twoColor) return "\n outline-offset: 0px;\n outline: none;\n ";
|
|
166
|
+
} else {
|
|
167
|
+
var _outlineStyle2 = "outline: none;";
|
|
168
|
+
compoundFocusStyle += _outlineStyle2;
|
|
169
|
+
if (!focus.twoColor) return _outlineStyle2;
|
|
146
170
|
}
|
|
147
|
-
return "outline: none;";
|
|
148
171
|
}
|
|
149
172
|
if (focus.shadow && (!focus.border || !justBorder)) {
|
|
150
173
|
if (typeof focus.shadow === 'object') {
|
|
151
|
-
|
|
174
|
+
var shadowStyle = "\n outline: none;\n box-shadow: none;\n ";
|
|
175
|
+
compoundFocusStyle += shadowStyle;
|
|
176
|
+
if (!focus.twoColor) return shadowStyle;
|
|
177
|
+
} else {
|
|
178
|
+
var _shadowStyle2 = "\n outline: none;\n box-shadow: none;\n ";
|
|
179
|
+
compoundFocusStyle += _shadowStyle2;
|
|
180
|
+
if (!focus.twoColor) return _shadowStyle2;
|
|
152
181
|
}
|
|
153
|
-
return "\n outline: none;\n box-shadow: none;\n ";
|
|
154
182
|
}
|
|
155
183
|
if (focus.border) {
|
|
156
|
-
|
|
184
|
+
var borderStyle = "\n outline: none;\n border-color: none;\n ";
|
|
185
|
+
compoundFocusStyle += borderStyle;
|
|
186
|
+
if (!focus.twoColor) return borderStyle;
|
|
157
187
|
}
|
|
188
|
+
if (focus.twoColor && compoundFocusStyle.length) return compoundFocusStyle;
|
|
158
189
|
return ''; // defensive
|
|
159
190
|
};
|
|
160
191
|
|
|
@@ -338,10 +369,13 @@ var ROUND_MAP = {
|
|
|
338
369
|
};
|
|
339
370
|
var roundStyle = exports.roundStyle = function roundStyle(data, responsive, theme) {
|
|
340
371
|
var breakpoint = (0, _responsive.getBreakpointStyle)(theme, theme.box.responsiveBreakpoint);
|
|
372
|
+
// fallback to edgeSize for backwards compatibility
|
|
373
|
+
var radius = theme.global.radius ? 'radius' : 'edgeSize';
|
|
341
374
|
var styles = [];
|
|
342
375
|
if (typeof data === 'object') {
|
|
343
|
-
var
|
|
344
|
-
var
|
|
376
|
+
var _breakpoint$radius;
|
|
377
|
+
var size = ROUND_MAP[data.size] || theme.global[radius][data.size || 'medium'] || data.size;
|
|
378
|
+
var responsiveSize = responsive && breakpoint && ((_breakpoint$radius = breakpoint[radius]) == null ? void 0 : _breakpoint$radius[data.size]) && (breakpoint[radius][data.size] || data.size);
|
|
345
379
|
if (data.corner === 'top') {
|
|
346
380
|
styles.push((0, _styledComponents.css)(["border-top-left-radius:", ";border-top-right-radius:", ";"], size, size));
|
|
347
381
|
if (responsiveSize) {
|
|
@@ -374,9 +408,10 @@ var roundStyle = exports.roundStyle = function roundStyle(data, responsive, them
|
|
|
374
408
|
}
|
|
375
409
|
}
|
|
376
410
|
} else {
|
|
411
|
+
var _theme$global$radius, _breakpoint$radius2;
|
|
377
412
|
var _size2 = data === true ? 'medium' : data;
|
|
378
|
-
styles.push((0, _styledComponents.css)(["border-radius:", ";"], ROUND_MAP[_size2] || theme.global
|
|
379
|
-
var _responsiveSize = responsive && breakpoint && breakpoint
|
|
413
|
+
styles.push((0, _styledComponents.css)(["border-radius:", ";"], ROUND_MAP[_size2] || ((_theme$global$radius = theme.global[radius]) == null ? void 0 : _theme$global$radius[_size2]) || _size2));
|
|
414
|
+
var _responsiveSize = responsive && breakpoint && ((_breakpoint$radius2 = breakpoint[radius]) == null ? void 0 : _breakpoint$radius2[_size2]);
|
|
380
415
|
if (_responsiveSize) {
|
|
381
416
|
styles.push((0, _mixins.breakpointStyle)(breakpoint, "\n border-radius: " + _responsiveSize + ";\n "));
|
|
382
417
|
}
|