grommet 2.25.0 → 2.25.1
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 +232 -292
- package/components/Calendar/utils.js +16 -129
- package/components/Chart/calcs.js +44 -27
- package/components/Chart/stories/Scan.js +11 -9
- package/components/Chart/stories/data.js +16 -17
- package/components/CheckBox/CheckBox.js +3 -2
- package/components/DataChart/DataChart.js +3 -15
- package/components/DataChart/Detail.js +18 -11
- package/components/DataChart/stories/Pad.js +54 -0
- package/components/DateInput/DateInput.js +60 -68
- package/components/DateInput/utils.js +30 -5
- package/components/FileInput/FileInput.js +2 -1
- package/components/FileInput/StyledFileInput.js +1 -1
- package/components/Form/Form.js +6 -1
- package/components/FormField/FormField.js +25 -28
- package/components/Image/Image.js +4 -2
- package/components/Menu/index.d.ts +2 -2
- package/components/Select/SelectContainer.js +24 -36
- package/components/Tabs/Tabs.js +2 -1
- package/components/Video/StyledVideo.js +2 -2
- package/es6/components/Calendar/Calendar.js +230 -292
- package/es6/components/Calendar/utils.js +13 -114
- package/es6/components/Chart/calcs.js +44 -27
- package/es6/components/Chart/stories/Scan.js +10 -9
- package/es6/components/Chart/stories/data.js +16 -17
- package/es6/components/CheckBox/CheckBox.js +3 -2
- package/es6/components/DataChart/DataChart.js +4 -15
- package/es6/components/DataChart/Detail.js +20 -10
- package/es6/components/DataChart/stories/Pad.js +42 -0
- package/es6/components/DateInput/DateInput.js +57 -64
- package/es6/components/DateInput/utils.js +29 -7
- package/es6/components/FileInput/FileInput.js +2 -1
- package/es6/components/FileInput/StyledFileInput.js +1 -1
- package/es6/components/Form/Form.js +6 -1
- package/es6/components/FormField/FormField.js +25 -29
- package/es6/components/Image/Image.js +4 -2
- package/es6/components/Menu/index.d.ts +2 -2
- package/es6/components/Select/SelectContainer.js +25 -37
- package/es6/components/Tabs/Tabs.js +2 -1
- package/es6/components/Video/StyledVideo.js +2 -2
- package/es6/themes/base.d.ts +13 -27
- package/es6/themes/base.js +6 -1
- package/grommet.min.js +1 -1
- package/grommet.min.js.map +1 -1
- package/package.json +44 -42
- package/themes/base.d.ts +13 -27
- package/themes/base.js +6 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "grommet",
|
|
3
|
-
"version": "2.25.
|
|
3
|
+
"version": "2.25.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"module": "es6/index.js",
|
|
6
6
|
"jsnext:main": "es6/index.js",
|
|
@@ -32,10 +32,12 @@
|
|
|
32
32
|
"release-stable": "babel-node ./tools/release-stable",
|
|
33
33
|
"lint": "eslint src",
|
|
34
34
|
"lint-fix": "eslint src --fix",
|
|
35
|
-
"test": "jest --runInBand",
|
|
36
|
-
"test-update": "jest --updateSnapshot",
|
|
35
|
+
"test": "jest --runInBand && yarn test-timezones",
|
|
36
|
+
"test-update": "jest --updateSnapshot && yarn test-timezones",
|
|
37
37
|
"test-watch": "jest --watchAll",
|
|
38
38
|
"test-bundlesize": "bundlesize",
|
|
39
|
+
"test-timezones": "TZ=Australia/Brisbane yarn test-calendar-dateinput --coverage=false && TZ=America/Los_Angeles yarn test-calendar-dateinput --coverage=false && TZ=Europe/Madrid yarn test-calendar-dateinput --coverage=false",
|
|
40
|
+
"test-calendar-dateinput": "jest ./src/js/components/Calendar/__tests__/Calendar-test.tsx ./src/js/components/DateInput/__tests__/DateInput-test.tsx",
|
|
39
41
|
"pack": "babel-node ./tools/pack",
|
|
40
42
|
"storybook": "cross-env NODE_ENV=development start-storybook -p 9001 -c storybook",
|
|
41
43
|
"build-storybook": "build-storybook -c storybook -o storybook-static",
|
|
@@ -54,86 +56,86 @@
|
|
|
54
56
|
"prop-types": "^15.8.1"
|
|
55
57
|
},
|
|
56
58
|
"devDependencies": {
|
|
57
|
-
"@babel/cli": "^7.
|
|
59
|
+
"@babel/cli": "^7.18.6",
|
|
58
60
|
"@babel/core": "^7.18.2",
|
|
59
61
|
"@babel/eslint-parser": "^7.18.2",
|
|
60
|
-
"@babel/node": "^7.
|
|
61
|
-
"@babel/plugin-proposal-class-properties": "^7.
|
|
62
|
-
"@babel/plugin-proposal-do-expressions": "^7.
|
|
63
|
-
"@babel/plugin-proposal-export-default-from": "^7.
|
|
64
|
-
"@babel/plugin-proposal-logical-assignment-operators": "^7.
|
|
65
|
-
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.
|
|
66
|
-
"@babel/plugin-proposal-optional-chaining": "^7.
|
|
67
|
-
"@babel/plugin-proposal-pipeline-operator": "^7.18.
|
|
68
|
-
"@babel/preset-env": "^7.18.
|
|
69
|
-
"@babel/preset-react": "^7.
|
|
62
|
+
"@babel/node": "^7.18.6",
|
|
63
|
+
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
64
|
+
"@babel/plugin-proposal-do-expressions": "^7.18.6",
|
|
65
|
+
"@babel/plugin-proposal-export-default-from": "^7.18.6",
|
|
66
|
+
"@babel/plugin-proposal-logical-assignment-operators": "^7.18.6",
|
|
67
|
+
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
|
|
68
|
+
"@babel/plugin-proposal-optional-chaining": "^7.18.6",
|
|
69
|
+
"@babel/plugin-proposal-pipeline-operator": "^7.18.6",
|
|
70
|
+
"@babel/preset-env": "^7.18.6",
|
|
71
|
+
"@babel/preset-react": "^7.18.6",
|
|
70
72
|
"@storybook/addon-a11y": "6.4.22",
|
|
71
73
|
"@storybook/addon-storysource": "6.4.22",
|
|
72
74
|
"@storybook/addon-toolbars": "6.4.22",
|
|
73
75
|
"@storybook/addons": "6.4.22",
|
|
74
76
|
"@storybook/react": "6.4.22",
|
|
75
77
|
"@storybook/source-loader": "6.4.22",
|
|
76
|
-
"@testing-library/dom": "^8.
|
|
78
|
+
"@testing-library/dom": "^8.14.0",
|
|
77
79
|
"@testing-library/jest-dom": "^5.16.4",
|
|
78
80
|
"@testing-library/react": "^13.3.0",
|
|
79
|
-
"@testing-library/user-event": "^14.2.
|
|
80
|
-
"@types/jest": "^
|
|
81
|
-
"@types/jest-axe": "^3.5.
|
|
82
|
-
"@types/node": "^
|
|
83
|
-
"@types/react": "^18.0.
|
|
81
|
+
"@testing-library/user-event": "^14.2.1",
|
|
82
|
+
"@types/jest": "^28.1.4",
|
|
83
|
+
"@types/jest-axe": "^3.5.4",
|
|
84
|
+
"@types/node": "^18.0.0",
|
|
85
|
+
"@types/react": "^18.0.14",
|
|
84
86
|
"@types/react-dom": "^18.0.5",
|
|
85
87
|
"@types/styled-components": "^5.1.25",
|
|
86
88
|
"babel-core": "^7.0.0-bridge.0",
|
|
87
|
-
"babel-jest": "28.1.
|
|
89
|
+
"babel-jest": "^28.1.2",
|
|
88
90
|
"babel-loader": "^8.2.5",
|
|
89
91
|
"babel-plugin-styled-components": "2.0.6",
|
|
90
92
|
"babel-plugin-transform-imports": "^2.0.0",
|
|
91
|
-
"
|
|
92
|
-
"chromatic": "^6.
|
|
93
|
+
"bundlesize2": "^0.0.31",
|
|
94
|
+
"chromatic": "^6.6.4",
|
|
93
95
|
"clean-webpack-plugin": "^4.0.0",
|
|
94
96
|
"copy-webpack-plugin": "^5.0.4",
|
|
95
97
|
"copyfiles": "^2.4.1",
|
|
96
|
-
"core-js": "^3.
|
|
98
|
+
"core-js": "^3.23.3",
|
|
97
99
|
"cross-env": "^7.0.3",
|
|
98
100
|
"del": "^6.1.1",
|
|
99
101
|
"elliptic": "^6.5.4",
|
|
100
|
-
"eslint": "^8.
|
|
102
|
+
"eslint": "^8.18.0",
|
|
101
103
|
"eslint-config-airbnb": "^19.0.4",
|
|
102
104
|
"eslint-config-prettier": "^8.5.0",
|
|
103
105
|
"eslint-plugin-babel": "^5.3.1",
|
|
104
106
|
"eslint-plugin-import": "^2.26.0",
|
|
105
|
-
"eslint-plugin-jsx-a11y": "^6.
|
|
106
|
-
"eslint-plugin-prettier": "^4.
|
|
107
|
-
"eslint-plugin-react": "^7.
|
|
108
|
-
"eslint-plugin-react-hooks": "^4.
|
|
107
|
+
"eslint-plugin-jsx-a11y": "^6.6.0",
|
|
108
|
+
"eslint-plugin-prettier": "^4.1.0",
|
|
109
|
+
"eslint-plugin-react": "^7.30.1",
|
|
110
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
109
111
|
"eslint-plugin-testing-library": "^5.5.1",
|
|
110
112
|
"fs-extra": "^10.1.0",
|
|
111
113
|
"grommet-theme-aruba": "^0.1.2",
|
|
112
114
|
"grommet-theme-dxc": "^0.1.2",
|
|
113
115
|
"grommet-theme-hp": "^0.1.2",
|
|
114
|
-
"grommet-theme-hpe": "^3.
|
|
115
|
-
"jest": "28.1.
|
|
116
|
+
"grommet-theme-hpe": "^3.2.0",
|
|
117
|
+
"jest": "^28.1.2",
|
|
116
118
|
"jest-axe": "^6.0.0",
|
|
117
|
-
"jest-cli": "28.1.
|
|
118
|
-
"jest-environment-jsdom": "28.1.
|
|
119
|
+
"jest-cli": "^28.1.2",
|
|
120
|
+
"jest-environment-jsdom": "^28.1.2",
|
|
119
121
|
"jest-styled-components": "7.0.5",
|
|
120
|
-
"jsdom": "^
|
|
121
|
-
"postcss": "^8.4.
|
|
122
|
+
"jsdom": "^20.0.0",
|
|
123
|
+
"postcss": "^8.4.14",
|
|
122
124
|
"pre-commit": "^1.2.2",
|
|
123
|
-
"prettier": "^2.
|
|
125
|
+
"prettier": "^2.7.1",
|
|
124
126
|
"pretty-quick": "^3.1.3",
|
|
125
|
-
"react": "^18.
|
|
127
|
+
"react": "^18.2.0",
|
|
126
128
|
"react-dev-utils": "^12.0.1",
|
|
127
|
-
"react-dom": "^18.
|
|
128
|
-
"react-is": "^18.
|
|
129
|
+
"react-dom": "^18.2.0",
|
|
130
|
+
"react-is": "^18.2.0",
|
|
129
131
|
"regenerator-runtime": "^0.13.9",
|
|
130
132
|
"require-reload": "^0.2.2",
|
|
131
|
-
"simple-git": "^3.
|
|
133
|
+
"simple-git": "^3.10.0",
|
|
132
134
|
"styled-components": "^5.3.5",
|
|
133
135
|
"tarball-extract": "^0.0.6",
|
|
134
|
-
"ts-jest": "^28.0.
|
|
136
|
+
"ts-jest": "^28.0.5",
|
|
135
137
|
"ts-loader": "^8.4.0",
|
|
136
|
-
"typescript": "^4.7.
|
|
138
|
+
"typescript": "^4.7.4",
|
|
137
139
|
"webpack": "^4.44.2",
|
|
138
140
|
"webpack-cli": "^4.8.0"
|
|
139
141
|
},
|
package/themes/base.d.ts
CHANGED
|
@@ -242,6 +242,15 @@ interface FormFieldLabelType extends TextProps {
|
|
|
242
242
|
requiredIndicator?: boolean | JSX.Element | string;
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
+
type DigitalTexts =
|
|
246
|
+
| 'xsmall'
|
|
247
|
+
| 'small'
|
|
248
|
+
| 'medium'
|
|
249
|
+
| 'large'
|
|
250
|
+
| 'xlarge'
|
|
251
|
+
| 'xxlarge'
|
|
252
|
+
| string;
|
|
253
|
+
|
|
245
254
|
export interface ThemeType {
|
|
246
255
|
global?: {
|
|
247
256
|
active?: {
|
|
@@ -359,7 +368,8 @@ export interface ThemeType {
|
|
|
359
368
|
color?: ColorType;
|
|
360
369
|
size?: string;
|
|
361
370
|
};
|
|
362
|
-
shadow?:
|
|
371
|
+
shadow?:
|
|
372
|
+
string | {
|
|
363
373
|
color?: ColorType;
|
|
364
374
|
size?: string;
|
|
365
375
|
};
|
|
@@ -517,7 +527,7 @@ export interface ThemeType {
|
|
|
517
527
|
};
|
|
518
528
|
};
|
|
519
529
|
card?: {
|
|
520
|
-
container?: BoxProps;
|
|
530
|
+
container?: BoxProps | { extend?: ExtendType };
|
|
521
531
|
hover?: {
|
|
522
532
|
container?: {
|
|
523
533
|
elevation?: ElevationType;
|
|
@@ -626,31 +636,7 @@ export interface ThemeType {
|
|
|
626
636
|
};
|
|
627
637
|
digital?: {
|
|
628
638
|
text?: {
|
|
629
|
-
|
|
630
|
-
size?: string;
|
|
631
|
-
height?: number;
|
|
632
|
-
};
|
|
633
|
-
small?: {
|
|
634
|
-
size?: string;
|
|
635
|
-
height?: number;
|
|
636
|
-
};
|
|
637
|
-
medium?: {
|
|
638
|
-
size?: string;
|
|
639
|
-
height?: number;
|
|
640
|
-
};
|
|
641
|
-
large?: {
|
|
642
|
-
size?: string;
|
|
643
|
-
height?: number;
|
|
644
|
-
};
|
|
645
|
-
xlarge?: {
|
|
646
|
-
size?: string;
|
|
647
|
-
height?: number;
|
|
648
|
-
};
|
|
649
|
-
xxlarge?: {
|
|
650
|
-
size?: string;
|
|
651
|
-
height?: number;
|
|
652
|
-
};
|
|
653
|
-
[key: string]: {
|
|
639
|
+
[key in DigitalTexts]: {
|
|
654
640
|
size?: string;
|
|
655
641
|
height?: number;
|
|
656
642
|
};
|
package/themes/base.js
CHANGED
|
@@ -266,7 +266,12 @@ var generate = function generate(baseSpacing, scale) {
|
|
|
266
266
|
}
|
|
267
267
|
},
|
|
268
268
|
// The time to wait after the user stopped typing, measured in ms.
|
|
269
|
-
|
|
269
|
+
// A half second (500ms) debounce can be a helpful starting point.
|
|
270
|
+
// You want to give the user time to fill out a field, but capture
|
|
271
|
+
// their attention before they move on past it. 2 second (2000ms)
|
|
272
|
+
// might be too long depending on how fast people type, and 200ms
|
|
273
|
+
// would be an eye blink
|
|
274
|
+
debounceDelay: 500,
|
|
270
275
|
drop: {
|
|
271
276
|
// intelligentMargin: undefined,
|
|
272
277
|
background: {
|