grommet 2.54.0 → 2.55.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/components/Calendar/Calendar.js +24 -16
- package/components/Calendar/index.d.ts +1 -1
- package/components/Calendar/stories/CustomHeader.stories.js +6 -1
- package/components/Calendar/stories/CustomThemed/CustomSizeHeading.stories.js +6 -1
- package/components/Calendar/stories/Dual.stories.js +23 -11
- package/components/Calendar/stories/HeaderLevel.stories.js +6 -1
- package/components/Calendar/stories/Multiple.stories.js +8 -3
- package/components/Calendar/stories/Simple.stories.js +6 -1
- package/components/Cards/Cards.js +164 -10
- package/components/Cards/StyledCellContainer.js +29 -0
- package/components/Cards/index.d.ts +4 -1
- package/components/Cards/propTypes.js +2 -0
- package/components/Cards/stories/Sizable.stories.js +70 -0
- package/components/Cards/stories/onOrder.stories.js +69 -0
- package/components/DataFilter/DataFilter.js +21 -28
- package/components/DateInput/DateInput.js +57 -24
- package/components/DateInput/index.d.ts +1 -0
- package/components/DateInput/utils.js +2 -2
- package/components/Drop/DropContainer.js +59 -3
- package/components/FileInput/FileInput.js +3 -0
- package/components/Form/stories/CustomThemed/FieldCustomStates.stories.js +7 -1
- package/components/Form/stories/FieldStates.stories.js +7 -1
- package/components/Grommet/Grommet.js +2 -1
- package/components/Grommet/index.d.ts +6 -0
- package/components/Grommet/propTypes.js +7 -1
- package/components/Layer/LayerContainer.d.ts +40 -0
- package/components/Select/stories/ChildrenRender.stories.js +28 -55
- package/components/SelectMultiple/stories/typescript/Children.stories.tsx +24 -48
- package/components/SelectMultiple/stories/typescript/ValueLabel.stories.tsx +88 -0
- package/components/Tag/Tag.js +4 -3
- package/components/Tag/index.d.ts +5 -4
- package/components/Tag/propTypes.js +3 -2
- package/components/TextInput/StyledTextInput.js +4 -2
- package/components/TextInput/TextInput.js +1 -0
- package/es6/components/Calendar/Calendar.js +24 -16
- package/es6/components/Calendar/index.d.ts +1 -1
- package/es6/components/Calendar/stories/CustomHeader.stories.js +6 -1
- package/es6/components/Calendar/stories/CustomThemed/CustomSizeHeading.stories.js +6 -1
- package/es6/components/Calendar/stories/Dual.stories.js +23 -11
- package/es6/components/Calendar/stories/HeaderLevel.stories.js +6 -1
- package/es6/components/Calendar/stories/Multiple.stories.js +8 -3
- package/es6/components/Calendar/stories/Simple.stories.js +6 -1
- package/es6/components/Cards/Cards.js +165 -12
- package/es6/components/Cards/StyledCellContainer.js +24 -0
- package/es6/components/Cards/index.d.ts +4 -1
- package/es6/components/Cards/propTypes.js +2 -0
- package/es6/components/Cards/stories/Sizable.stories.js +65 -0
- package/es6/components/Cards/stories/onOrder.stories.js +64 -0
- package/es6/components/DataFilter/DataFilter.js +21 -28
- package/es6/components/DateInput/DateInput.js +57 -24
- package/es6/components/DateInput/index.d.ts +1 -0
- package/es6/components/DateInput/utils.js +2 -2
- package/es6/components/Drop/DropContainer.js +59 -3
- package/es6/components/FileInput/FileInput.js +3 -0
- package/es6/components/Form/stories/CustomThemed/FieldCustomStates.stories.js +7 -1
- package/es6/components/Form/stories/FieldStates.stories.js +7 -1
- package/es6/components/Grommet/Grommet.js +2 -1
- package/es6/components/Grommet/index.d.ts +6 -0
- package/es6/components/Grommet/propTypes.js +7 -1
- package/es6/components/Layer/LayerContainer.d.ts +40 -0
- package/es6/components/Select/stories/ChildrenRender.stories.js +29 -56
- package/es6/components/SelectMultiple/stories/typescript/Children.stories.tsx +24 -48
- package/es6/components/SelectMultiple/stories/typescript/ValueLabel.stories.tsx +88 -0
- package/es6/components/Tag/Tag.js +4 -3
- package/es6/components/Tag/index.d.ts +5 -4
- package/es6/components/Tag/propTypes.js +3 -2
- package/es6/components/TextInput/StyledTextInput.js +4 -2
- package/es6/components/TextInput/TextInput.js +1 -0
- package/es6/languages/default.json +7 -1
- package/es6/themes/base.d.ts +1 -0
- package/es6/utils/index.d.ts +1 -0
- package/es6/utils/styles.js +23 -12
- package/grommet.min.js +1 -1
- package/grommet.min.js.map +1 -1
- package/languages/default.json +7 -1
- package/package.json +29 -32
- package/themes/base.d.ts +1 -0
- package/utils/index.d.ts +1 -0
- package/utils/styles.js +23 -12
package/languages/default.json
CHANGED
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
"nextMove": "Moved to {date}",
|
|
10
10
|
"next": "Go to {date}"
|
|
11
11
|
},
|
|
12
|
+
"cards": {
|
|
13
|
+
"moved": "Card moved to position {source} of {target}",
|
|
14
|
+
"reorderHint": "Use arrow keys to reorder cards. Changes are applied immediately.",
|
|
15
|
+
"description": "sortable card"
|
|
16
|
+
},
|
|
12
17
|
"carousel": {
|
|
13
18
|
"previous": "Go to slide {slide}",
|
|
14
19
|
"next": "Go to slide {slide}",
|
|
@@ -17,7 +22,8 @@
|
|
|
17
22
|
"dateInput": {
|
|
18
23
|
"openCalendar": "Press space to open calendar",
|
|
19
24
|
"enterCalendar": "Calendar is open, use arrow keys and enter to select a date.",
|
|
20
|
-
"exitCalendar": "Exited calendar dialog"
|
|
25
|
+
"exitCalendar": "Exited calendar dialog",
|
|
26
|
+
"outOfBounds": "Date is out of the allowed range. Enter a date between {start} and {end}."
|
|
21
27
|
},
|
|
22
28
|
"dataChart": {
|
|
23
29
|
"detailTitle": "Data chart",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "grommet",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.55.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"module": "es6/index.js",
|
|
6
6
|
"jsnext:main": "es6/index.js",
|
|
@@ -72,20 +72,17 @@
|
|
|
72
72
|
"@babel/plugin-transform-logical-assignment-operators": "^7.28.6",
|
|
73
73
|
"@babel/plugin-transform-nullish-coalescing-operator": "^7.28.6",
|
|
74
74
|
"@babel/plugin-transform-optional-chaining": "^7.28.6",
|
|
75
|
-
"@babel/preset-env": "^7.29.
|
|
75
|
+
"@babel/preset-env": "^7.29.2",
|
|
76
76
|
"@babel/preset-react": "^7.28.5",
|
|
77
|
-
"@chromatic-com/storybook": "^
|
|
78
|
-
"@eslint/compat": "^2.0.
|
|
79
|
-
"@eslint/eslintrc": "^3.3.
|
|
80
|
-
"@eslint/js": "^
|
|
81
|
-
"@storybook/addon-a11y": "^
|
|
82
|
-
"@storybook/addon-
|
|
83
|
-
"@storybook/addon-
|
|
84
|
-
"@storybook/
|
|
85
|
-
"@storybook/
|
|
86
|
-
"@storybook/react": "^8.6.17",
|
|
87
|
-
"@storybook/react-webpack5": "^8.6.17",
|
|
88
|
-
"@storybook/source-loader": "^8.6.17",
|
|
77
|
+
"@chromatic-com/storybook": "^5.1.2",
|
|
78
|
+
"@eslint/compat": "^2.0.5",
|
|
79
|
+
"@eslint/eslintrc": "^3.3.5",
|
|
80
|
+
"@eslint/js": "^10.0.1",
|
|
81
|
+
"@storybook/addon-a11y": "^10.3.6",
|
|
82
|
+
"@storybook/addon-docs": "^10.3.6",
|
|
83
|
+
"@storybook/addon-webpack5-compiler-babel": "^4.0.1",
|
|
84
|
+
"@storybook/react": "^10.3.6",
|
|
85
|
+
"@storybook/react-webpack5": "^10.3.6",
|
|
89
86
|
"@testing-library/dom": "^10.4.1",
|
|
90
87
|
"@testing-library/jest-dom": "^6.9.1",
|
|
91
88
|
"@testing-library/react": "^16.3.2",
|
|
@@ -93,21 +90,21 @@
|
|
|
93
90
|
"@testing-library/user-event": "^14.6.1",
|
|
94
91
|
"@types/jest": "^30.0.0",
|
|
95
92
|
"@types/jest-axe": "^3.5.9",
|
|
96
|
-
"@types/node": "^25.
|
|
93
|
+
"@types/node": "^25.6.0",
|
|
97
94
|
"@types/react": "^19.2.14",
|
|
98
95
|
"@types/react-dom": "^19.2.3",
|
|
99
96
|
"@types/styled-components": "^5.1.36",
|
|
100
97
|
"babel-core": "^7.0.0-bridge.0",
|
|
101
|
-
"babel-jest": "^30.
|
|
102
|
-
"babel-loader": "^10.
|
|
98
|
+
"babel-jest": "^30.3.0",
|
|
99
|
+
"babel-loader": "^10.1.1",
|
|
103
100
|
"babel-plugin-styled-components": "^2.1.4",
|
|
104
101
|
"babel-plugin-transform-imports": "^2.0.0",
|
|
105
102
|
"bundlesize2": "^0.0.35",
|
|
106
103
|
"chromatic": "^13.3.5",
|
|
107
104
|
"clean-webpack-plugin": "^4.0.0",
|
|
108
|
-
"copy-webpack-plugin": "^
|
|
105
|
+
"copy-webpack-plugin": "^14.0.0",
|
|
109
106
|
"copyfiles": "^2.4.1",
|
|
110
|
-
"core-js": "^3.
|
|
107
|
+
"core-js": "^3.49.0",
|
|
111
108
|
"cross-env": "^10.1.0",
|
|
112
109
|
"del": "^6.1.1",
|
|
113
110
|
"eslint": "^9.39.3",
|
|
@@ -119,28 +116,28 @@
|
|
|
119
116
|
"eslint-plugin-prettier": "^5.5.5",
|
|
120
117
|
"eslint-plugin-react": "^7.37.5",
|
|
121
118
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
122
|
-
"eslint-plugin-testing-library": "^7.16.
|
|
123
|
-
"fs-extra": "^11.3.
|
|
124
|
-
"globals": "^
|
|
119
|
+
"eslint-plugin-testing-library": "^7.16.2",
|
|
120
|
+
"fs-extra": "^11.3.4",
|
|
121
|
+
"globals": "^17.5.0",
|
|
125
122
|
"grommet-theme-hpe": "^7.0.2",
|
|
126
|
-
"jest": "^30.
|
|
123
|
+
"jest": "^30.3.0",
|
|
127
124
|
"jest-axe": "^10.0.0",
|
|
128
|
-
"jest-cli": "^30.
|
|
129
|
-
"jest-environment-jsdom": "^30.
|
|
125
|
+
"jest-cli": "^30.3.0",
|
|
126
|
+
"jest-environment-jsdom": "^30.3.0",
|
|
130
127
|
"jest-styled-components": "7.0.5",
|
|
131
|
-
"jsdom": "^
|
|
132
|
-
"postcss": "^8.5.
|
|
128
|
+
"jsdom": "^29.0.2",
|
|
129
|
+
"postcss": "^8.5.9",
|
|
133
130
|
"pre-commit": "^1.2.2",
|
|
134
131
|
"prettier": "^2.8.8",
|
|
135
132
|
"pretty-quick": "^4.2.2",
|
|
136
|
-
"react": "^19.2.
|
|
133
|
+
"react": "^19.2.5",
|
|
137
134
|
"react-dev-utils": "^12.0.1",
|
|
138
|
-
"react-dom": "^19.2.
|
|
139
|
-
"react-is": "^19.2.
|
|
135
|
+
"react-dom": "^19.2.5",
|
|
136
|
+
"react-is": "^19.2.5",
|
|
140
137
|
"react-shadow": "^20.6.0",
|
|
141
138
|
"regenerator-runtime": "^0.14.1",
|
|
142
|
-
"simple-git": "^3.
|
|
143
|
-
"storybook": "^
|
|
139
|
+
"simple-git": "^3.36.0",
|
|
140
|
+
"storybook": "^10.3.6",
|
|
144
141
|
"styled-components": "^6.3.11",
|
|
145
142
|
"tarball-extract": "^0.0.6",
|
|
146
143
|
"testcafe": "^3.7.4",
|
package/themes/base.d.ts
CHANGED
package/utils/index.d.ts
CHANGED
package/utils/styles.js
CHANGED
|
@@ -34,9 +34,11 @@ var controlBorderStyle = exports.controlBorderStyle = (0, _styledComponents.css)
|
|
|
34
34
|
return props.theme.global.control.border.radius;
|
|
35
35
|
});
|
|
36
36
|
var edgeStyle = exports.edgeStyle = function edgeStyle(kind, data, responsive, responsiveBreakpoint, theme) {
|
|
37
|
-
var breakpoint =
|
|
37
|
+
var breakpoint = (0, _responsive.getBreakpointStyle)(theme, responsiveBreakpoint);
|
|
38
38
|
if (typeof data === 'string') {
|
|
39
|
-
|
|
39
|
+
var value = theme.global.edgeSize[data] || data;
|
|
40
|
+
var responsiveValue = responsive && breakpoint && breakpoint.edgeSize[data];
|
|
41
|
+
return (0, _styledComponents.css)(["", ":", ";", ";"], kind, value, responsiveValue ? (0, _mixins.breakpointStyle)(breakpoint, "\n " + kind + ": " + responsiveValue + ";\n ", responsive) : '');
|
|
40
42
|
}
|
|
41
43
|
var result = [];
|
|
42
44
|
var horizontal = data.horizontal,
|
|
@@ -54,32 +56,41 @@ var edgeStyle = exports.edgeStyle = function edgeStyle(kind, data, responsive, r
|
|
|
54
56
|
if (horizontalVerticalEqual || allSidesEqual) {
|
|
55
57
|
// since the values will be the same between vertical & horizontal OR
|
|
56
58
|
// left, right, top, & bottom, we can just choose one
|
|
57
|
-
var
|
|
58
|
-
|
|
59
|
+
var allSidesValue = horizontalVerticalEqual ? horizontal : top;
|
|
60
|
+
var allSidesResponsiveValue = responsive && breakpoint && breakpoint.edgeSize[allSidesValue];
|
|
61
|
+
return (0, _styledComponents.css)(["", ":", ";", ";"], kind, theme.global.edgeSize[allSidesValue] || allSidesValue, allSidesResponsiveValue ? (0, _mixins.breakpointStyle)(breakpoint, "\n " + kind + ": " + allSidesResponsiveValue + ";\n ", responsive) : '');
|
|
59
62
|
}
|
|
60
63
|
if (horizontal) {
|
|
61
|
-
|
|
64
|
+
var horizontalResponsiveValue = responsive && breakpoint && breakpoint.edgeSize[horizontal];
|
|
65
|
+
result.push((0, _styledComponents.css)(["", "-left:", ";", "-right:", ";", ";"], kind, theme.global.edgeSize[horizontal] || horizontal, kind, theme.global.edgeSize[horizontal] || horizontal, horizontalResponsiveValue ? (0, _mixins.breakpointStyle)(breakpoint, "\n " + kind + "-left: " + horizontalResponsiveValue + ";\n " + kind + "-right: " + horizontalResponsiveValue + ";\n ", responsive) : ''));
|
|
62
66
|
}
|
|
63
67
|
if (vertical) {
|
|
64
|
-
|
|
68
|
+
var verticalResponsiveValue = responsive && breakpoint && breakpoint.edgeSize[vertical];
|
|
69
|
+
result.push((0, _styledComponents.css)(["", "-top:", ";", "-bottom:", ";", ";"], kind, theme.global.edgeSize[vertical] || vertical, kind, theme.global.edgeSize[vertical] || vertical, verticalResponsiveValue ? (0, _mixins.breakpointStyle)(breakpoint, "\n " + kind + "-top: " + verticalResponsiveValue + ";\n " + kind + "-bottom: " + verticalResponsiveValue + ";\n ", responsive) : ''));
|
|
65
70
|
}
|
|
66
71
|
if (top) {
|
|
67
|
-
|
|
72
|
+
var topResponsiveValue = responsive && breakpoint && breakpoint.edgeSize[top];
|
|
73
|
+
result.push((0, _styledComponents.css)(["", "-top:", ";", ";"], kind, theme.global.edgeSize[top] || top, topResponsiveValue ? (0, _mixins.breakpointStyle)(breakpoint, "\n " + kind + "-top: " + topResponsiveValue + ";\n ", responsive) : ''));
|
|
68
74
|
}
|
|
69
75
|
if (bottom) {
|
|
70
|
-
|
|
76
|
+
var bottomResponsiveValue = responsive && breakpoint && breakpoint.edgeSize[bottom];
|
|
77
|
+
result.push((0, _styledComponents.css)(["", "-bottom:", ";", ";"], kind, theme.global.edgeSize[bottom] || bottom, bottomResponsiveValue ? (0, _mixins.breakpointStyle)(breakpoint, "\n " + kind + "-bottom: " + bottomResponsiveValue + ";\n ", responsive) : ''));
|
|
71
78
|
}
|
|
72
79
|
if (left) {
|
|
73
|
-
|
|
80
|
+
var leftResponsiveValue = responsive && breakpoint && breakpoint.edgeSize[left];
|
|
81
|
+
result.push((0, _styledComponents.css)(["", "-left:", ";", ";"], kind, theme.global.edgeSize[left] || left, leftResponsiveValue ? (0, _mixins.breakpointStyle)(breakpoint, "\n " + kind + "-left: " + leftResponsiveValue + ";\n ", responsive) : ''));
|
|
74
82
|
}
|
|
75
83
|
if (right) {
|
|
76
|
-
|
|
84
|
+
var rightResponsiveValue = responsive && breakpoint && breakpoint.edgeSize[right];
|
|
85
|
+
result.push((0, _styledComponents.css)(["", "-right:", ";", ";"], kind, theme.global.edgeSize[right] || right, rightResponsiveValue ? (0, _mixins.breakpointStyle)(breakpoint, "\n " + kind + "-right: " + rightResponsiveValue + ";\n ", responsive) : ''));
|
|
77
86
|
}
|
|
78
87
|
if (data.start) {
|
|
79
|
-
|
|
88
|
+
var startResponsiveValue = responsive && breakpoint && breakpoint.edgeSize[data.start];
|
|
89
|
+
result.push((0, _styledComponents.css)(["", "-inline-start:", ";", ";"], kind, theme.global.edgeSize[data.start] || data.start, startResponsiveValue ? (0, _mixins.breakpointStyle)(breakpoint, "\n " + kind + "-inline-start: " + startResponsiveValue + ";\n ", responsive) : ''));
|
|
80
90
|
}
|
|
81
91
|
if (data.end) {
|
|
82
|
-
|
|
92
|
+
var endResponsiveValue = responsive && breakpoint && breakpoint.edgeSize[data.end];
|
|
93
|
+
result.push((0, _styledComponents.css)(["", "-inline-end:", ";", ";"], kind, theme.global.edgeSize[data.end] || data.end, endResponsiveValue ? (0, _mixins.breakpointStyle)(breakpoint, "\n " + kind + "-inline-end: " + endResponsiveValue + ";\n ", responsive) : ''));
|
|
83
94
|
}
|
|
84
95
|
return result;
|
|
85
96
|
};
|