grommet 2.46.0 → 2.46.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grommet",
3
- "version": "2.46.0",
3
+ "version": "2.46.1",
4
4
  "main": "index.js",
5
5
  "module": "es6/index.js",
6
6
  "jsnext:main": "es6/index.js",
@@ -60,9 +60,9 @@
60
60
  "prop-types": "^15.8.1"
61
61
  },
62
62
  "devDependencies": {
63
- "@babel/cli": "^7.26.4",
64
- "@babel/core": "^7.26.8",
65
- "@babel/eslint-parser": "^7.26.8",
63
+ "@babel/cli": "^7.27.0",
64
+ "@babel/core": "^7.26.10",
65
+ "@babel/eslint-parser": "^7.27.0",
66
66
  "@babel/node": "^7.26.0",
67
67
  "@babel/plugin-proposal-class-properties": "^7.18.6",
68
68
  "@babel/plugin-proposal-do-expressions": "^7.25.9",
@@ -72,30 +72,30 @@
72
72
  "@babel/plugin-transform-logical-assignment-operators": "^7.25.9",
73
73
  "@babel/plugin-transform-nullish-coalescing-operator": "^7.26.6",
74
74
  "@babel/plugin-transform-optional-chaining": "^7.25.9",
75
- "@babel/preset-env": "^7.26.8",
75
+ "@babel/preset-env": "^7.26.9",
76
76
  "@babel/preset-react": "^7.26.3",
77
- "@chromatic-com/storybook": "^3",
78
- "@eslint/compat": "^1.2.6",
79
- "@eslint/eslintrc": "^3.2.0",
80
- "@eslint/js": "^9.20.0",
81
- "@storybook/addon-a11y": "^8.5.8",
82
- "@storybook/addon-storysource": "^8.5.8",
83
- "@storybook/addon-toolbars": "^8.5.8",
84
- "@storybook/addon-webpack5-compiler-babel": "^3.0.5",
85
- "@storybook/manager-api": "^8.5.8",
86
- "@storybook/react": "^8.5.8",
87
- "@storybook/react-webpack5": "^8.5.8",
88
- "@storybook/source-loader": "^8.5.8",
77
+ "@chromatic-com/storybook": "^3.2.6",
78
+ "@eslint/compat": "^1.2.8",
79
+ "@eslint/eslintrc": "^3.3.1",
80
+ "@eslint/js": "^9.24.0",
81
+ "@storybook/addon-a11y": "^8.6.12",
82
+ "@storybook/addon-storysource": "^8.6.12",
83
+ "@storybook/addon-toolbars": "^8.6.12",
84
+ "@storybook/addon-webpack5-compiler-babel": "^3.0.6",
85
+ "@storybook/manager-api": "^8.6.12",
86
+ "@storybook/react": "^8.6.12",
87
+ "@storybook/react-webpack5": "^8.6.12",
88
+ "@storybook/source-loader": "^8.6.12",
89
89
  "@testing-library/dom": "^10.4.0",
90
90
  "@testing-library/jest-dom": "^6.6.3",
91
- "@testing-library/react": "^16.2.0",
91
+ "@testing-library/react": "^16.3.0",
92
92
  "@testing-library/testcafe": "^5.0.1",
93
93
  "@testing-library/user-event": "^14.6.1",
94
94
  "@types/jest": "^29.5.14",
95
95
  "@types/jest-axe": "^3.5.9",
96
- "@types/node": "^22.13.1",
97
- "@types/react": "^18.3.12",
98
- "@types/react-dom": "^18.3.1",
96
+ "@types/node": "^22.14.0",
97
+ "@types/react": "^18.3.20",
98
+ "@types/react-dom": "^18.3.6",
99
99
  "@types/styled-components": "^5.1.34",
100
100
  "babel-core": "^7.0.0-bridge.0",
101
101
  "babel-jest": "^29.7.0",
@@ -103,36 +103,36 @@
103
103
  "babel-plugin-styled-components": "^2.1.4",
104
104
  "babel-plugin-transform-imports": "^2.0.0",
105
105
  "bundlesize2": "^0.0.34",
106
- "chromatic": "^11.25.2",
106
+ "chromatic": "^11.28.0",
107
107
  "clean-webpack-plugin": "^4.0.0",
108
108
  "copy-webpack-plugin": "^12.0.2",
109
109
  "copyfiles": "^2.4.1",
110
- "core-js": "^3.40.0",
110
+ "core-js": "^3.41.0",
111
111
  "cross-env": "^7.0.3",
112
112
  "del": "^6.1.1",
113
- "eslint": "^9.20.1",
113
+ "eslint": "^9.24.0",
114
114
  "eslint-config-airbnb": "^19.0.4",
115
- "eslint-config-prettier": "^10.0.1",
115
+ "eslint-config-prettier": "^10.1.1",
116
116
  "eslint-plugin-babel": "^5.3.1",
117
117
  "eslint-plugin-import": "^2.31.0",
118
118
  "eslint-plugin-jsx-a11y": "^6.10.2",
119
- "eslint-plugin-prettier": "^5.2.3",
120
- "eslint-plugin-react": "^7.37.4",
121
- "eslint-plugin-react-hooks": "5.0.0",
119
+ "eslint-plugin-prettier": "^5.2.6",
120
+ "eslint-plugin-react": "^7.37.5",
121
+ "eslint-plugin-react-hooks": "5.2.0",
122
122
  "eslint-plugin-testing-library": "^7.1.1",
123
123
  "fs-extra": "^11.3.0",
124
124
  "globals": "^15.15.0",
125
- "grommet-theme-hpe": "^6.0.0",
125
+ "grommet-theme-hpe": "^6.1.0",
126
126
  "jest": "^29.7.0",
127
127
  "jest-axe": "^9.0.0",
128
128
  "jest-cli": "^29.7.0",
129
129
  "jest-environment-jsdom": "^29.7.0",
130
130
  "jest-styled-components": "7.0.5",
131
131
  "jsdom": "^26.0.0",
132
- "postcss": "^8.5.2",
132
+ "postcss": "^8.5.3",
133
133
  "pre-commit": "^1.2.2",
134
134
  "prettier": "^2.8.8",
135
- "pretty-quick": "^3.1.3",
135
+ "pretty-quick": "^3.3.1",
136
136
  "react": "^18.3.1",
137
137
  "react-dev-utils": "^12.0.1",
138
138
  "react-dom": "^18.3.1",
@@ -140,18 +140,18 @@
140
140
  "react-shadow": "^20.6.0",
141
141
  "regenerator-runtime": "^0.14.1",
142
142
  "simple-git": "^3.27.0",
143
- "storybook": "^8.5.8",
144
- "styled-components": "^6.1.15",
143
+ "storybook": "^8.6.12",
144
+ "styled-components": "^6.1.17",
145
145
  "tarball-extract": "^0.0.6",
146
- "testcafe": "^3.7.1",
146
+ "testcafe": "^3.7.2",
147
147
  "testcafe-react-selectors": "^5.0.3",
148
148
  "testcafe-reporter-xunit": "^2.2.3",
149
- "ts-jest": "^29.2.5",
149
+ "ts-jest": "^29.3.1",
150
150
  "ts-loader": "^9.5.2",
151
- "typescript": "^5.7.3",
151
+ "typescript": "^5.8.3",
152
152
  "webpack": "^5.97.1",
153
153
  "webpack-cli": "^6.0.1",
154
- "webpack-dev-server": "^5.2.0"
154
+ "webpack-dev-server": "^5.2.1"
155
155
  },
156
156
  "jest": {
157
157
  "transform": {
@@ -61,13 +61,14 @@ var deviceResponsive = exports.deviceResponsive = function deviceResponsive(user
61
61
  }
62
62
  return undefined;
63
63
  };
64
+
65
+ // styled-components v6 and later do not have a withComponent
66
+ // method. We need v6 or later to support container queries.
67
+ var testComp = _styledComponents["default"].div.withConfig({
68
+ displayName: "responsive__testComp",
69
+ componentId: "sc-336m7y-0"
70
+ })(["display:flex;"]);
64
71
  var supportsContainerQueries = exports.supportsContainerQueries = function supportsContainerQueries() {
65
- // styled-components v6 and later do not have a withComponent
66
- // method. We need v6 or later to support container queries.
67
- var comp = _styledComponents["default"].div.withConfig({
68
- displayName: "responsive__comp",
69
- componentId: "sc-336m7y-0"
70
- })(["display:flex;"]);
71
- var isPreV6 = typeof comp.withComponent === 'function';
72
+ var isPreV6 = typeof testComp.withComponent === 'function';
72
73
  return !isPreV6;
73
74
  };
@@ -1,11 +0,0 @@
1
- "use strict";
2
-
3
- exports.__esModule = true;
4
- exports.StyledResponsiveContainer = void 0;
5
- var _styledComponents = _interopRequireDefault(require("styled-components"));
6
- var _styles = require("../../utils/styles");
7
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
8
- var StyledResponsiveContainer = exports.StyledResponsiveContainer = _styledComponents["default"].div.withConfig(_styles.styledComponentsConfig).withConfig({
9
- displayName: "StyledResponsiveContainer",
10
- componentId: "sc-1v27069-0"
11
- })(["container-type:inline-size;"]);
@@ -1,52 +0,0 @@
1
- import React, { useContext, useEffect, useRef, useState } from 'react';
2
- import { ResponsiveContainerContext, ResponsiveContext, ThemeContext } from '../../contexts';
3
- import { StyledResponsiveContainer } from './StyledResponsiveContainer';
4
- import { deviceResponsive, getBreakpoint } from '../../utils';
5
- var responsiveContainerValue = true;
6
- export var ResponsiveContainer = function ResponsiveContainer(_ref) {
7
- var _theme$global;
8
- var children = _ref.children;
9
- var theme = useContext(ThemeContext);
10
- var ref = useRef(undefined);
11
- var _useState = useState(),
12
- stateResponsive = _useState[0],
13
- setStateResponsive = _useState[1];
14
- useEffect(function () {
15
- var element = ref == null ? void 0 : ref.current;
16
- if (!element) return undefined;
17
- var resizeObserver;
18
- if (typeof window !== 'undefined' && window.ResizeObserver) {
19
- resizeObserver = new window.ResizeObserver(function (entries) {
20
- window.requestAnimationFrame(function () {
21
- var _entries$;
22
- if (!Array.isArray(entries) || !entries.length) {
23
- return;
24
- }
25
- var size = (_entries$ = entries[0]) == null || (_entries$ = _entries$.borderBoxSize) == null || (_entries$ = _entries$[0]) == null ? void 0 : _entries$.inlineSize;
26
- if (size) {
27
- setStateResponsive(getBreakpoint(size, theme));
28
- }
29
- });
30
- });
31
- resizeObserver.observe(element);
32
- } else {
33
- // fallback for server side rendering
34
- var _element$getBoundingC = element.getBoundingClientRect(),
35
- width = _element$getBoundingC.width;
36
- setStateResponsive(getBreakpoint(width, theme));
37
- }
38
- return function () {
39
- if (resizeObserver) {
40
- resizeObserver.disconnect();
41
- }
42
- };
43
- }, [theme]);
44
- var responsive = stateResponsive || deviceResponsive(navigator.userAgent, theme) || (theme == null || (_theme$global = theme.global) == null ? void 0 : _theme$global.deviceBreakpoints.tablet);
45
- return /*#__PURE__*/React.createElement(ResponsiveContext.Provider, {
46
- value: responsive
47
- }, /*#__PURE__*/React.createElement(ResponsiveContainerContext.Provider, {
48
- value: responsiveContainerValue
49
- }, /*#__PURE__*/React.createElement(StyledResponsiveContainer, {
50
- ref: ref
51
- }, children)));
52
- };
@@ -1,6 +0,0 @@
1
- import styled from 'styled-components';
2
- import { styledComponentsConfig } from '../../utils/styles';
3
- export var StyledResponsiveContainer = styled.div.withConfig(styledComponentsConfig).withConfig({
4
- displayName: "StyledResponsiveContainer",
5
- componentId: "sc-1v27069-0"
6
- })(["container-type:inline-size;"]);