grommet 2.42.0 → 2.43.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/Colors.js +6 -6
- package/components/Accordion/stories/CustomThemed/Rich.tsx +1 -1
- package/components/Box/stories/Background.js +4 -10
- package/components/Calendar/Calendar.js +6 -3
- package/components/Card/stories/Simple.js +2 -2
- package/components/Data/stories/Cards.js +3 -2
- package/components/Data/stories/Properties.js +3 -2
- package/components/FormField/FormField.js +9 -2
- package/components/FormField/stories/ThresholdValidation.js +5 -1
- package/components/Grommet/index.d.ts +19 -1
- package/components/Grommet/propTypes.js +18 -0
- package/components/Grommet/stories/Theme.js +1 -1
- package/components/Grommet/stories/Vars.js +2 -2
- package/components/List/List.js +27 -3
- package/components/List/stories/RenderedList.js +1 -1
- package/components/Meter/Meter.js +36 -17
- package/components/Meter/index.d.ts +18 -0
- package/components/Meter/propTypes.js +18 -0
- package/components/Pagination/stories/CustomThemed/Custom.tsx +8 -2
- package/components/Pagination/stories/NumberEdgePages.js +2 -0
- package/components/Pagination/stories/NumberMiddlePages.js +2 -0
- package/components/Pagination/stories/Simple.js +4 -2
- package/components/Pagination/stories/Size.js +3 -0
- package/components/Pagination/stories/Steps.js +3 -0
- package/components/RadioButton/RadioButton.js +14 -3
- package/components/RadioButton/stories/Children.js +16 -3
- package/components/RadioButtonGroup/stories/Children.js +13 -1
- package/components/Tabs/stories/Scrollable.js +2 -1
- package/components/TextInput/TextInput.js +7 -2
- package/es6/all/stories/Colors.js +6 -6
- package/es6/components/Accordion/stories/CustomThemed/Rich.tsx +1 -1
- package/es6/components/Box/stories/Background.js +4 -10
- package/es6/components/Calendar/Calendar.js +6 -3
- package/es6/components/Card/stories/Simple.js +3 -3
- package/es6/components/Data/stories/Cards.js +4 -3
- package/es6/components/Data/stories/Properties.js +4 -3
- package/es6/components/FormField/FormField.js +10 -3
- package/es6/components/FormField/stories/ThresholdValidation.js +5 -1
- package/es6/components/Grommet/index.d.ts +19 -1
- package/es6/components/Grommet/propTypes.js +18 -0
- package/es6/components/Grommet/stories/Theme.js +1 -1
- package/es6/components/Grommet/stories/Vars.js +2 -2
- package/es6/components/List/List.js +27 -3
- package/es6/components/List/stories/RenderedList.js +1 -1
- package/es6/components/Meter/Meter.js +37 -18
- package/es6/components/Meter/index.d.ts +18 -0
- package/es6/components/Meter/propTypes.js +18 -0
- package/es6/components/Pagination/stories/CustomThemed/Custom.tsx +8 -2
- package/es6/components/Pagination/stories/NumberEdgePages.js +2 -0
- package/es6/components/Pagination/stories/NumberMiddlePages.js +2 -0
- package/es6/components/Pagination/stories/Simple.js +4 -2
- package/es6/components/Pagination/stories/Size.js +3 -0
- package/es6/components/Pagination/stories/Steps.js +3 -0
- package/es6/components/RadioButton/RadioButton.js +15 -4
- package/es6/components/RadioButton/stories/Children.js +16 -3
- package/es6/components/RadioButtonGroup/stories/Children.js +12 -1
- package/es6/components/Tabs/stories/Scrollable.js +2 -1
- package/es6/components/TextInput/TextInput.js +7 -2
- package/es6/languages/default.json +18 -0
- package/es6/utils/useId.js +3 -2
- package/grommet.min.js +1 -1
- package/grommet.min.js.map +1 -1
- package/languages/default.json +18 -0
- package/package.json +26 -26
- package/utils/useId.js +5 -2
- package/components/CheckBox/stories/InsideButton.js +0 -38
- package/es6/components/CheckBox/stories/InsideButton.js +0 -32
package/languages/default.json
CHANGED
|
@@ -104,6 +104,24 @@
|
|
|
104
104
|
"openMenu": "Open Menu",
|
|
105
105
|
"closeMenu": "Close Menu"
|
|
106
106
|
},
|
|
107
|
+
"meter": {
|
|
108
|
+
"bar": {
|
|
109
|
+
"singular": "Bar meter with value {meterValue} out of {max}",
|
|
110
|
+
"plural": "Bar meter with values {meterValue} out of {max}"
|
|
111
|
+
},
|
|
112
|
+
"circle": {
|
|
113
|
+
"singular": "Circle meter with value {meterValue} out of {max}",
|
|
114
|
+
"plural": "Circle meter with values {meterValue} out of {max}"
|
|
115
|
+
},
|
|
116
|
+
"pie": {
|
|
117
|
+
"singular": "Pie meter with value {meterValue} out of {max}",
|
|
118
|
+
"plural": "Pie meter with values {meterValue} out of {max}"
|
|
119
|
+
},
|
|
120
|
+
"semicircle": {
|
|
121
|
+
"singular": "Semicircle meter with value {meterValue} out of {max}",
|
|
122
|
+
"plural": "Semicircle meter with values {meterValue} out of {max}"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
107
125
|
"pagination": {
|
|
108
126
|
"stepLabel": "Items per page",
|
|
109
127
|
"summary": "Showing {start}-{end} of {total}",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "grommet",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.43.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"module": "es6/index.js",
|
|
6
6
|
"jsnext:main": "es6/index.js",
|
|
@@ -61,20 +61,20 @@
|
|
|
61
61
|
"prop-types": "^15.8.1"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@babel/cli": "^7.25.
|
|
65
|
-
"@babel/core": "^7.
|
|
66
|
-
"@babel/eslint-parser": "^7.25.
|
|
67
|
-
"@babel/node": "^7.
|
|
64
|
+
"@babel/cli": "^7.25.9",
|
|
65
|
+
"@babel/core": "^7.26.0",
|
|
66
|
+
"@babel/eslint-parser": "^7.25.9",
|
|
67
|
+
"@babel/node": "^7.26.0",
|
|
68
68
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
69
|
-
"@babel/plugin-proposal-do-expressions": "^7.25.
|
|
70
|
-
"@babel/plugin-proposal-export-default-from": "^7.25.
|
|
71
|
-
"@babel/plugin-proposal-pipeline-operator": "^7.25.
|
|
72
|
-
"@babel/plugin-transform-class-properties": "^7.25.
|
|
73
|
-
"@babel/plugin-transform-logical-assignment-operators": "^7.25.
|
|
74
|
-
"@babel/plugin-transform-nullish-coalescing-operator": "^7.25.
|
|
75
|
-
"@babel/plugin-transform-optional-chaining": "^7.25.
|
|
76
|
-
"@babel/preset-env": "^7.
|
|
77
|
-
"@babel/preset-react": "^7.25.
|
|
69
|
+
"@babel/plugin-proposal-do-expressions": "^7.25.9",
|
|
70
|
+
"@babel/plugin-proposal-export-default-from": "^7.25.9",
|
|
71
|
+
"@babel/plugin-proposal-pipeline-operator": "^7.25.9",
|
|
72
|
+
"@babel/plugin-transform-class-properties": "^7.25.9",
|
|
73
|
+
"@babel/plugin-transform-logical-assignment-operators": "^7.25.9",
|
|
74
|
+
"@babel/plugin-transform-nullish-coalescing-operator": "^7.25.9",
|
|
75
|
+
"@babel/plugin-transform-optional-chaining": "^7.25.9",
|
|
76
|
+
"@babel/preset-env": "^7.26.0",
|
|
77
|
+
"@babel/preset-react": "^7.25.9",
|
|
78
78
|
"@storybook/addon-a11y": "7.0.20",
|
|
79
79
|
"@storybook/addon-storysource": "7.0.20",
|
|
80
80
|
"@storybook/addon-toolbars": "7.0.20",
|
|
@@ -83,14 +83,14 @@
|
|
|
83
83
|
"@storybook/react-webpack5": "7.0.20",
|
|
84
84
|
"@storybook/source-loader": "7.0.20",
|
|
85
85
|
"@testing-library/dom": "^10.4.0",
|
|
86
|
-
"@testing-library/jest-dom": "^6.6.
|
|
86
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
87
87
|
"@testing-library/react": "^16.0.1",
|
|
88
88
|
"@testing-library/testcafe": "^5.0.1",
|
|
89
89
|
"@testing-library/user-event": "^14.5.2",
|
|
90
|
-
"@types/jest": "^29.5.
|
|
90
|
+
"@types/jest": "^29.5.14",
|
|
91
91
|
"@types/jest-axe": "^3.5.9",
|
|
92
|
-
"@types/node": "^22.
|
|
93
|
-
"@types/react": "^18.3.
|
|
92
|
+
"@types/node": "^22.9.0",
|
|
93
|
+
"@types/react": "^18.3.12",
|
|
94
94
|
"@types/react-dom": "^18.3.1",
|
|
95
95
|
"@types/styled-components": "^5.1.34",
|
|
96
96
|
"babel-core": "^7.0.0-bridge.0",
|
|
@@ -99,11 +99,11 @@
|
|
|
99
99
|
"babel-plugin-styled-components": "^2.1.4",
|
|
100
100
|
"babel-plugin-transform-imports": "^2.0.0",
|
|
101
101
|
"bundlesize2": "^0.0.31",
|
|
102
|
-
"chromatic": "^11.
|
|
102
|
+
"chromatic": "^11.18.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.39.0",
|
|
107
107
|
"cross-env": "^7.0.3",
|
|
108
108
|
"del": "^6.1.1",
|
|
109
109
|
"eslint": "^8.57.0",
|
|
@@ -111,11 +111,11 @@
|
|
|
111
111
|
"eslint-config-prettier": "^9.1.0",
|
|
112
112
|
"eslint-plugin-babel": "^5.3.1",
|
|
113
113
|
"eslint-plugin-import": "^2.31.0",
|
|
114
|
-
"eslint-plugin-jsx-a11y": "^6.10.
|
|
114
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
115
115
|
"eslint-plugin-prettier": "4.2.1",
|
|
116
|
-
"eslint-plugin-react": "^7.37.
|
|
116
|
+
"eslint-plugin-react": "^7.37.2",
|
|
117
117
|
"eslint-plugin-react-hooks": "^5.0.0",
|
|
118
|
-
"eslint-plugin-testing-library": "^6.
|
|
118
|
+
"eslint-plugin-testing-library": "^6.4.0",
|
|
119
119
|
"fs-extra": "^11.2.0",
|
|
120
120
|
"grommet-theme-hpe": "^5.7.0",
|
|
121
121
|
"jest": "^29.7.0",
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"jest-environment-jsdom": "^29.7.0",
|
|
125
125
|
"jest-styled-components": "7.0.5",
|
|
126
126
|
"jsdom": "^25.0.1",
|
|
127
|
-
"postcss": "^8.4.
|
|
127
|
+
"postcss": "^8.4.49",
|
|
128
128
|
"pre-commit": "^1.2.2",
|
|
129
129
|
"prettier": "^2.8.8",
|
|
130
130
|
"pretty-quick": "^3.1.3",
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"ts-jest": "^29.2.5",
|
|
145
145
|
"ts-loader": "^9.5.1",
|
|
146
146
|
"typescript": "^5.6.3",
|
|
147
|
-
"webpack": "^5.
|
|
147
|
+
"webpack": "^5.96.1",
|
|
148
148
|
"webpack-cli": "^5.1.4",
|
|
149
149
|
"webpack-dev-server": "^5.1.0"
|
|
150
150
|
},
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
"bundlesize": [
|
|
209
209
|
{
|
|
210
210
|
"path": "./dist/grommet.min.js",
|
|
211
|
-
"maxSize": "
|
|
211
|
+
"maxSize": "174 kB"
|
|
212
212
|
}
|
|
213
213
|
],
|
|
214
214
|
"keywords": [
|
package/utils/useId.js
CHANGED
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.useId = void 0;
|
|
5
|
-
var _react = require("react");
|
|
5
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
6
|
+
var _React$useId;
|
|
7
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
8
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
6
9
|
var currentId = 0;
|
|
7
10
|
var getId = function getId() {
|
|
8
11
|
// eslint-disable-next-line no-plusplus
|
|
@@ -16,4 +19,4 @@ var useIdGrommet = function useIdGrommet() {
|
|
|
16
19
|
};
|
|
17
20
|
|
|
18
21
|
// Polyfill React 18's useId for compatibility with React 16 and 17
|
|
19
|
-
var useId = exports.useId = _react.useId != null ?
|
|
22
|
+
var useId = exports.useId = (_React$useId = _react["default"].useId) != null ? _React$useId : useIdGrommet;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports["default"] = exports.InsideButton = void 0;
|
|
5
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
6
|
-
var _grommet = require("grommet");
|
|
7
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
8
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
9
|
-
var InsideButton = exports.InsideButton = function InsideButton() {
|
|
10
|
-
var _useState = (0, _react.useState)(false),
|
|
11
|
-
checked = _useState[0],
|
|
12
|
-
setChecked = _useState[1];
|
|
13
|
-
var onButtonClick = function onButtonClick() {
|
|
14
|
-
return setChecked(!checked);
|
|
15
|
-
};
|
|
16
|
-
var onCheckboxChange = function onCheckboxChange() {};
|
|
17
|
-
return /*#__PURE__*/_react["default"].createElement(_grommet.Box, {
|
|
18
|
-
align: "center",
|
|
19
|
-
pad: "large"
|
|
20
|
-
}, /*#__PURE__*/_react["default"].createElement(_grommet.Button, {
|
|
21
|
-
hoverIndicator: "background",
|
|
22
|
-
onClick: onButtonClick
|
|
23
|
-
}, /*#__PURE__*/_react["default"].createElement(_grommet.CheckBox, {
|
|
24
|
-
tabIndex: "-1",
|
|
25
|
-
checked: checked,
|
|
26
|
-
label: /*#__PURE__*/_react["default"].createElement(_grommet.Text, null, "Hi"),
|
|
27
|
-
onChange: onCheckboxChange
|
|
28
|
-
})));
|
|
29
|
-
};
|
|
30
|
-
InsideButton.storyName = 'Inside a Button';
|
|
31
|
-
InsideButton.parameters = {
|
|
32
|
-
chromatic: {
|
|
33
|
-
disable: true
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
var _default = exports["default"] = {
|
|
37
|
-
title: 'Input/CheckBox/Inside a Button'
|
|
38
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { Box, Button, CheckBox, Text } from 'grommet';
|
|
3
|
-
export var InsideButton = function InsideButton() {
|
|
4
|
-
var _useState = useState(false),
|
|
5
|
-
checked = _useState[0],
|
|
6
|
-
setChecked = _useState[1];
|
|
7
|
-
var onButtonClick = function onButtonClick() {
|
|
8
|
-
return setChecked(!checked);
|
|
9
|
-
};
|
|
10
|
-
var onCheckboxChange = function onCheckboxChange() {};
|
|
11
|
-
return /*#__PURE__*/React.createElement(Box, {
|
|
12
|
-
align: "center",
|
|
13
|
-
pad: "large"
|
|
14
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
15
|
-
hoverIndicator: "background",
|
|
16
|
-
onClick: onButtonClick
|
|
17
|
-
}, /*#__PURE__*/React.createElement(CheckBox, {
|
|
18
|
-
tabIndex: "-1",
|
|
19
|
-
checked: checked,
|
|
20
|
-
label: /*#__PURE__*/React.createElement(Text, null, "Hi"),
|
|
21
|
-
onChange: onCheckboxChange
|
|
22
|
-
})));
|
|
23
|
-
};
|
|
24
|
-
InsideButton.storyName = 'Inside a Button';
|
|
25
|
-
InsideButton.parameters = {
|
|
26
|
-
chromatic: {
|
|
27
|
-
disable: true
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
export default {
|
|
31
|
-
title: 'Input/CheckBox/Inside a Button'
|
|
32
|
-
};
|