grommet 2.23.0 → 2.24.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.
Files changed (87) hide show
  1. package/components/Anchor/Anchor.js +2 -3
  2. package/components/CheckBoxGroup/index.d.ts +1 -3
  3. package/components/DataTable/stories/SpaceX.js +6 -4
  4. package/components/DataTable/stories/SpaceXUngrouped.js +4 -2
  5. package/components/Drop/DropContainer.js +6 -2
  6. package/components/FileInput/index.d.ts +6 -1
  7. package/components/Form/stories/HelpAndError.js +1 -1
  8. package/components/Grid/index.d.ts +6 -2
  9. package/components/Layer/Layer.js +1 -1
  10. package/components/Layer/LayerContainer.js +6 -2
  11. package/components/List/List.js +103 -40
  12. package/components/List/index.d.ts +3 -1
  13. package/components/List/propTypes.js +3 -1
  14. package/components/List/stories/Disabled.js +33 -0
  15. package/components/Notification/Notification.js +17 -8
  16. package/components/Notification/index.d.ts +1 -0
  17. package/components/Notification/propTypes.js +1 -0
  18. package/components/PageHeader/PageHeader.js +80 -0
  19. package/components/PageHeader/index.d.ts +26 -0
  20. package/components/PageHeader/index.js +8 -0
  21. package/components/PageHeader/propTypes.js +30 -0
  22. package/components/PageHeader/stories/Custom.js +47 -0
  23. package/components/PageHeader/stories/MultipleActions.js +79 -0
  24. package/components/PageHeader/stories/Responsive.js +37 -0
  25. package/components/PageHeader/stories/Simple.js +36 -0
  26. package/components/RadioButtonGroup/index.d.ts +2 -1
  27. package/components/Select/Select.js +0 -2
  28. package/components/Select/SelectContainer.js +9 -0
  29. package/components/Table/StyledTable.js +1 -1
  30. package/components/TextInput/TextInput.js +32 -3
  31. package/components/TextInput/stories/DefaultSuggestion.js +1 -0
  32. package/components/TextInput/stories/Suggestions.js +1 -0
  33. package/components/Tip/Tip.js +18 -6
  34. package/components/Video/Video.js +100 -46
  35. package/components/Video/index.d.ts +1 -0
  36. package/components/Video/propTypes.js +1 -1
  37. package/components/Video/stories/typescript/ControlsBelow.tsx +6 -2
  38. package/components/index.d.ts +1 -0
  39. package/components/index.js +8 -0
  40. package/es6/components/Anchor/Anchor.js +2 -3
  41. package/es6/components/CheckBoxGroup/index.d.ts +1 -3
  42. package/es6/components/DataTable/stories/SpaceX.js +6 -4
  43. package/es6/components/DataTable/stories/SpaceXUngrouped.js +4 -2
  44. package/es6/components/Drop/DropContainer.js +4 -2
  45. package/es6/components/FileInput/index.d.ts +6 -1
  46. package/es6/components/Form/stories/HelpAndError.js +1 -1
  47. package/es6/components/Grid/index.d.ts +6 -2
  48. package/es6/components/Layer/Layer.js +1 -1
  49. package/es6/components/Layer/LayerContainer.js +4 -2
  50. package/es6/components/List/List.js +104 -41
  51. package/es6/components/List/index.d.ts +3 -1
  52. package/es6/components/List/propTypes.js +3 -1
  53. package/es6/components/List/stories/Disabled.js +20 -0
  54. package/es6/components/Notification/Notification.js +17 -8
  55. package/es6/components/Notification/index.d.ts +1 -0
  56. package/es6/components/Notification/propTypes.js +1 -0
  57. package/es6/components/PageHeader/PageHeader.js +63 -0
  58. package/es6/components/PageHeader/index.d.ts +26 -0
  59. package/es6/components/PageHeader/index.js +1 -0
  60. package/es6/components/PageHeader/propTypes.js +19 -0
  61. package/es6/components/PageHeader/stories/Custom.js +32 -0
  62. package/es6/components/PageHeader/stories/MultipleActions.js +63 -0
  63. package/es6/components/PageHeader/stories/Responsive.js +25 -0
  64. package/es6/components/PageHeader/stories/Simple.js +24 -0
  65. package/es6/components/RadioButtonGroup/index.d.ts +2 -1
  66. package/es6/components/Select/Select.js +0 -2
  67. package/es6/components/Select/SelectContainer.js +9 -0
  68. package/es6/components/Table/StyledTable.js +1 -1
  69. package/es6/components/TextInput/TextInput.js +32 -3
  70. package/es6/components/TextInput/stories/DefaultSuggestion.js +1 -0
  71. package/es6/components/TextInput/stories/Suggestions.js +1 -0
  72. package/es6/components/Tip/Tip.js +18 -6
  73. package/es6/components/Video/Video.js +99 -46
  74. package/es6/components/Video/index.d.ts +1 -0
  75. package/es6/components/Video/propTypes.js +1 -1
  76. package/es6/components/Video/stories/typescript/ControlsBelow.tsx +6 -2
  77. package/es6/components/index.d.ts +1 -0
  78. package/es6/components/index.js +1 -0
  79. package/es6/languages/default.json +4 -1
  80. package/es6/themes/base.d.ts +47 -7
  81. package/es6/themes/base.js +72 -1
  82. package/grommet.min.js +1 -1
  83. package/grommet.min.js.map +1 -1
  84. package/languages/default.json +4 -1
  85. package/package.json +30 -26
  86. package/themes/base.d.ts +47 -7
  87. package/themes/base.js +73 -1
@@ -58,7 +58,9 @@
58
58
  "suggestionIsOpen": "Suggestions drop is open, continue to use arrow keys to navigate"
59
59
  },
60
60
  "video": {
61
+ "captions": "closed captions",
61
62
  "closeMenu": "close menu",
63
+ "audioDescriptions": "video audio description",
62
64
  "fullScreen": "full screen",
63
65
  "progressMeter": "video progress",
64
66
  "scrubber": "scrubber",
@@ -66,6 +68,7 @@
66
68
  "pauseButton": "pause",
67
69
  "playButton": "play",
68
70
  "volumeDown": "volume down",
69
- "volumeUp": "volume up"
71
+ "volumeUp": "volume up",
72
+ "description": "video audio description"
70
73
  }
71
74
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grommet",
3
- "version": "2.23.0",
3
+ "version": "2.24.0",
4
4
  "main": "index.js",
5
5
  "module": "es6/index.js",
6
6
  "jsnext:main": "es6/index.js",
@@ -67,24 +67,25 @@
67
67
  "@babel/plugin-proposal-pipeline-operator": "^7.17.6",
68
68
  "@babel/preset-env": "^7.16.11",
69
69
  "@babel/preset-react": "^7.16.7",
70
- "@storybook/addon-storysource": "^6.4.21",
71
- "@storybook/addon-toolbars": "^6.4.21",
72
- "@storybook/addons": "^6.4.21",
73
- "@storybook/react": "^6.4.21",
74
- "@storybook/source-loader": "^6.4.21",
70
+ "@storybook/addon-a11y": "6.4.22",
71
+ "@storybook/addon-storysource": "6.4.22",
72
+ "@storybook/addon-toolbars": "6.4.22",
73
+ "@storybook/addons": "6.4.22",
74
+ "@storybook/react": "6.4.22",
75
+ "@storybook/source-loader": "6.4.22",
75
76
  "@testing-library/dom": "^8.13.0",
76
77
  "@testing-library/jest-dom": "^5.16.4",
77
- "@testing-library/react": "^13.0.0",
78
- "@testing-library/user-event": "^14.1.0",
79
- "@types/jest": "^27.4.1",
78
+ "@testing-library/react": "^13.1.1",
79
+ "@testing-library/user-event": "^14.1.1",
80
+ "@types/jest": "^27.5.1",
80
81
  "@types/jest-axe": "^3.5.3",
81
- "@types/node": "^17.0.23",
82
- "@types/react": "^18.0.2",
82
+ "@types/node": "^17.0.29",
83
+ "@types/react": "^18.0.8",
83
84
  "@types/react-dom": "^18.0.0",
84
85
  "@types/styled-components": "^5.1.25",
85
86
  "babel-core": "^7.0.0-bridge.0",
86
- "babel-jest": "^27.5.1",
87
- "babel-loader": "^8.2.4",
87
+ "babel-jest": "^28.1.0",
88
+ "babel-loader": "^8.2.5",
88
89
  "babel-plugin-styled-components": "2.0.6",
89
90
  "babel-plugin-transform-imports": "^2.0.0",
90
91
  "bundlesize": "^0.18.1",
@@ -92,11 +93,11 @@
92
93
  "clean-webpack-plugin": "^4.0.0",
93
94
  "copy-webpack-plugin": "^5.0.4",
94
95
  "copyfiles": "^2.4.1",
95
- "core-js": "^3.21.1",
96
+ "core-js": "^3.22.3",
96
97
  "cross-env": "^7.0.3",
97
98
  "del": "^6.0.0",
98
99
  "elliptic": "^6.5.4",
99
- "eslint": "^8.13.0",
100
+ "eslint": "^8.14.0",
100
101
  "eslint-config-airbnb": "^19.0.4",
101
102
  "eslint-config-prettier": "^8.5.0",
102
103
  "eslint-plugin-babel": "^5.3.1",
@@ -104,32 +105,33 @@
104
105
  "eslint-plugin-jsx-a11y": "^6.5.1",
105
106
  "eslint-plugin-prettier": "^4.0.0",
106
107
  "eslint-plugin-react": "^7.29.4",
107
- "eslint-plugin-react-hooks": "^4.4.0",
108
+ "eslint-plugin-react-hooks": "^4.5.0",
108
109
  "eslint-plugin-testing-library": "^5.3.1",
109
- "fs-extra": "^10.0.1",
110
+ "fs-extra": "^10.1.0",
110
111
  "grommet-theme-aruba": "^0.1.2",
111
112
  "grommet-theme-dxc": "^0.1.2",
112
113
  "grommet-theme-hp": "^0.1.2",
113
114
  "grommet-theme-hpe": "^3.0.0",
114
- "jest": "^27.5.1",
115
+ "jest": "^28.1.0",
115
116
  "jest-axe": "^6.0.0",
116
- "jest-cli": "^27.5.1",
117
+ "jest-cli": "^28.1.0",
118
+ "jest-environment-jsdom": "^28.1.0",
117
119
  "jest-styled-components": "7.0.5",
118
120
  "jsdom": "^19.0.0",
119
121
  "postcss": "^8.4.12",
120
122
  "pre-commit": "^1.2.2",
121
123
  "prettier": "^2.6.2",
122
124
  "pretty-quick": "^3.1.3",
123
- "react": "^18.0.0",
125
+ "react": "^18.1.0",
124
126
  "react-dev-utils": "^12.0.1",
125
- "react-dom": "^18.0.0",
126
- "react-is": "^18.0.0",
127
+ "react-dom": "^18.1.0",
128
+ "react-is": "^18.1.0",
127
129
  "regenerator-runtime": "^0.13.9",
128
130
  "require-reload": "^0.2.2",
129
- "simple-git": "^3.6.0",
131
+ "simple-git": "^3.7.1",
130
132
  "styled-components": "^5.3.5",
131
133
  "tarball-extract": "^0.0.6",
132
- "ts-jest": "^27.1.4",
134
+ "ts-jest": "^28.0.2",
133
135
  "ts-loader": "^8.3.0",
134
136
  "typescript": "^4.6.3",
135
137
  "webpack": "^4.44.2",
@@ -146,8 +148,10 @@
146
148
  "^.+\\.jsx?$": "babel-jest"
147
149
  },
148
150
  "collectCoverage": true,
149
- "testURL": "http://localhost/",
150
151
  "testEnvironment": "jsdom",
152
+ "testEnvironmentOptions": {
153
+ "url": "http://localhost/"
154
+ },
151
155
  "setupFilesAfterEnv": [
152
156
  "<rootDir>/src/setupTests.js"
153
157
  ],
@@ -190,7 +194,7 @@
190
194
  "bundlesize": [
191
195
  {
192
196
  "path": "./dist/grommet.min.js",
193
- "maxSize": "129 kB"
197
+ "maxSize": "131 kB"
194
198
  }
195
199
  ],
196
200
  "keywords": [
package/themes/base.d.ts CHANGED
@@ -33,6 +33,14 @@ import { Box } from '../components/Box';
33
33
  import { Text, TextProps } from '../components/Text';
34
34
  import { LayerPositionType, LayerProps } from '../components/Layer';
35
35
  import { DropProps } from '../components/Drop';
36
+ import {
37
+ AreasType,
38
+ GridColumnsType,
39
+ GridGapType,
40
+ GridSizeType,
41
+ } from '../components/Grid';
42
+ import { HeadingProps } from '../components/Heading';
43
+ import { ParagraphProps } from '../components/Paragraph';
36
44
 
37
45
  export declare const base: DeepReadonly<ThemeType>;
38
46
  export declare const generate: (
@@ -437,6 +445,7 @@ export interface ThemeType {
437
445
  color?: ColorType;
438
446
  extend?: ExtendType<PropsOf<typeof Anchor>>;
439
447
  fontWeight?: number;
448
+ gap?: GapType;
440
449
  hover?: {
441
450
  extend?: ExtendType<PropsOf<typeof Anchor>>;
442
451
  textDecoration?: string;
@@ -1004,13 +1013,11 @@ export interface ThemeType {
1004
1013
  container?: BoxProps;
1005
1014
  item?: {
1006
1015
  background?: BackgroundType;
1007
- border?:
1008
- | string
1009
- | {
1010
- side?: string;
1011
- color?: ColorType;
1012
- size?: string;
1013
- };
1016
+ border?: BorderType;
1017
+ disabled?: {
1018
+ color?: ColorType;
1019
+ cursor?: string;
1020
+ };
1014
1021
  pad?: PadType;
1015
1022
  extend?: ExtendType;
1016
1023
  };
@@ -1147,6 +1154,39 @@ export interface ThemeType {
1147
1154
  large?: BoxProps;
1148
1155
  };
1149
1156
  };
1157
+ pageHeader?: {
1158
+ actions?: BoxProps;
1159
+ pad?: PadType;
1160
+ parent?: BoxProps;
1161
+ responsive?: {
1162
+ actions?: BoxProps;
1163
+ areas?: AreasType;
1164
+ breakpoints?: string[];
1165
+ columns?: GridColumnsType;
1166
+ rows?: GridSizeType;
1167
+ gap?: GridGapType;
1168
+ };
1169
+ subtitle?: ParagraphProps;
1170
+ title?: HeadingProps;
1171
+ small?: {
1172
+ areas?: AreasType;
1173
+ columns?: GridColumnsType;
1174
+ rows?: GridSizeType;
1175
+ gap?: GridGapType;
1176
+ };
1177
+ medium?: {
1178
+ areas?: AreasType;
1179
+ columns?: GridColumnsType;
1180
+ rows?: GridSizeType;
1181
+ gap?: GridGapType;
1182
+ };
1183
+ large?: {
1184
+ areas?: AreasType;
1185
+ columns?: GridColumnsType;
1186
+ rows?: GridSizeType;
1187
+ gap?: GridGapType;
1188
+ };
1189
+ };
1150
1190
  pagination?: {
1151
1191
  button?: ButtonType | string;
1152
1192
  container?: BoxProps | { extend?: ExtendType };
package/themes/base.js CHANGED
@@ -5,6 +5,8 @@ exports.generate = exports.base = void 0;
5
5
 
6
6
  var _Actions = require("grommet-icons/icons/Actions");
7
7
 
8
+ var _AssistListening = require("grommet-icons/icons/AssistListening");
9
+
8
10
  var _CircleInformation = require("grommet-icons/icons/CircleInformation");
9
11
 
10
12
  var _ClosedCaption = require("grommet-icons/icons/ClosedCaption");
@@ -420,6 +422,7 @@ var generate = function generate(baseSpacing, scale) {
420
422
  dark: 'accent-1',
421
423
  light: 'brand'
422
424
  },
425
+ gap: 'small',
423
426
  hover: {
424
427
  textDecoration: 'underline' // fontWeight: undefined,
425
428
  // extend: undefined,
@@ -1139,6 +1142,10 @@ var generate = function generate(baseSpacing, scale) {
1139
1142
  item: {
1140
1143
  // background: undefined,
1141
1144
  border: 'horizontal',
1145
+ disabled: {
1146
+ color: 'status-disabled',
1147
+ cursor: 'default'
1148
+ },
1142
1149
  pad: {
1143
1150
  horizontal: 'medium',
1144
1151
  vertical: 'small'
@@ -1405,6 +1412,70 @@ var generate = function generate(baseSpacing, scale) {
1405
1412
  }
1406
1413
  }
1407
1414
  },
1415
+ pageHeader: {
1416
+ actions: {
1417
+ // any box props
1418
+ align: 'end'
1419
+ },
1420
+ pad: {
1421
+ top: 'large',
1422
+ bottom: 'medium'
1423
+ },
1424
+ parent: {
1425
+ // any box props
1426
+ align: 'start'
1427
+ },
1428
+ responsive: {
1429
+ actions: {
1430
+ // any box props
1431
+ align: 'start',
1432
+ pad: {
1433
+ top: 'small'
1434
+ }
1435
+ },
1436
+ areas: [['parent'], ['title'], ['subtitle'], ['actions']],
1437
+ breakpoints: ['small'],
1438
+ columns: ['auto'],
1439
+ rows: ['auto'] // gap: undefined,
1440
+
1441
+ },
1442
+ subtitle: {
1443
+ // any paragraph props
1444
+ margin: 'none'
1445
+ },
1446
+ title: {
1447
+ // any heading props
1448
+ margin: 'none',
1449
+ fill: true
1450
+ },
1451
+ small: {
1452
+ areas: [['parent', 'parent'], ['title', 'actions'], ['subtitle', 'actions']],
1453
+ columns: [['small', 'flex'], 'auto'],
1454
+ rows: ['auto', 'auto', 'auto'],
1455
+ gap: {
1456
+ row: 'xsmall',
1457
+ column: 'large'
1458
+ }
1459
+ },
1460
+ medium: {
1461
+ areas: [['parent', 'parent'], ['title', 'actions'], ['subtitle', 'actions']],
1462
+ columns: [['medium', 'flex'], 'auto'],
1463
+ rows: ['auto', 'auto', 'auto'],
1464
+ gap: {
1465
+ row: 'xsmall',
1466
+ column: 'medium'
1467
+ }
1468
+ },
1469
+ large: {
1470
+ areas: [['parent', 'parent'], ['title', 'actions'], ['subtitle', 'actions']],
1471
+ columns: [['medium', 'flex'], 'auto'],
1472
+ rows: ['auto', 'auto', 'auto'],
1473
+ gap: {
1474
+ row: 'xsmall',
1475
+ column: 'large'
1476
+ }
1477
+ }
1478
+ },
1408
1479
  pagination: {
1409
1480
  button: {
1410
1481
  active: {
@@ -1862,7 +1933,8 @@ var generate = function generate(baseSpacing, scale) {
1862
1933
  pause: _Pause.Pause,
1863
1934
  play: _Play.Play,
1864
1935
  reduceVolume: _VolumeLow.VolumeLow,
1865
- volume: _Volume.Volume // color: { dark: undefined, light: undefined },
1936
+ volume: _Volume.Volume,
1937
+ description: _AssistListening.AssistListening // color: { dark: undefined, light: undefined },
1866
1938
 
1867
1939
  },
1868
1940
  scrubber: {