@4alldigital/foundation-ui--gamma 1.31.1 → 1.31.2

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/dist/index.esm.js CHANGED
@@ -182,8 +182,11 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
182
182
  var Image = function (_a) {
183
183
  var src = _a.src, alt = _a.alt, title = _a.title, caption = _a.caption, _b = _a.figure, figure = _b === void 0 ? false : _b, onLoad = _a.onLoad, id = _a.id, className = _a.className, testID = _a.testID, rest = __rest(_a, ["src", "alt", "title", "caption", "figure", "onLoad", "id", "className", "testID"]);
184
184
  try {
185
- // @ts-expect-error - NextImage is not defined
186
- return React.createElement(require.resolve('next/image').default, __assign({ src: typeof src === 'string' ? src : src, alt: alt, title: title, onLoad: onLoad, className: className }, rest));
185
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
186
+ var nextImage = require('next/image').default;
187
+ if (!nextImage)
188
+ throw new Error('Next.js Image not found');
189
+ return React.createElement(nextImage, __assign({ src: typeof src === 'string' ? src : src, alt: alt, title: title, onLoad: onLoad, className: className }, rest));
187
190
  }
188
191
  catch (_c) {
189
192
  console.log('Not using Next.js');
package/dist/index.js CHANGED
@@ -184,8 +184,11 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
184
184
  var Image = function (_a) {
185
185
  var src = _a.src, alt = _a.alt, title = _a.title, caption = _a.caption, _b = _a.figure, figure = _b === void 0 ? false : _b, onLoad = _a.onLoad, id = _a.id, className = _a.className, testID = _a.testID, rest = __rest(_a, ["src", "alt", "title", "caption", "figure", "onLoad", "id", "className", "testID"]);
186
186
  try {
187
- // @ts-expect-error - NextImage is not defined
188
- return React.createElement(require.resolve('next/image').default, __assign({ src: typeof src === 'string' ? src : src, alt: alt, title: title, onLoad: onLoad, className: className }, rest));
187
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
188
+ var nextImage = require('next/image').default;
189
+ if (!nextImage)
190
+ throw new Error('Next.js Image not found');
191
+ return React.createElement(nextImage, __assign({ src: typeof src === 'string' ? src : src, alt: alt, title: title, onLoad: onLoad, className: className }, rest));
189
192
  }
190
193
  catch (_c) {
191
194
  console.log('Not using Next.js');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@4alldigital/foundation-ui--gamma",
3
- "version": "1.31.1",
3
+ "version": "1.31.2",
4
4
  "description": "Foundation UI Component library with GAMMA theme. ",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -25,7 +25,7 @@
25
25
  "publishConfig": {
26
26
  "access": "public"
27
27
  },
28
- "gitHead": "a17715c39d9e187640e927821680c28508668a68",
28
+ "gitHead": "2720fd9e6e2c232d793040fdcf4cdd27bcd29830",
29
29
  "dependencies": {
30
30
  "@elastic/datemath": "^5.0.3",
31
31
  "@elastic/eui": "^94.1.0",