@micromag/core 0.4.80 → 0.4.85

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.
@@ -97,9 +97,10 @@ declare function BackButton({ className, ...props }: BackButtonProps): react_jsx
97
97
 
98
98
  interface ClearButtonProps {
99
99
  onClick?: ((...args: unknown[]) => void) | null;
100
+ iconOnly?: boolean;
100
101
  className?: string | null;
101
102
  }
102
- declare function ClearButton({ onClick, className, ...props }: ClearButtonProps): react_jsx_runtime.JSX.Element;
103
+ declare function ClearButton({ onClick, className, iconOnly, ...props }: ClearButtonProps): react_jsx_runtime.JSX.Element;
103
104
 
104
105
  interface FormProps {
105
106
  action: string;
package/es/components.js CHANGED
@@ -328,61 +328,68 @@ function BackButton(t0) {
328
328
  var styles$w = {"container":"micromag-core-buttons-clear-container","icon":"micromag-core-buttons-clear-icon"};
329
329
 
330
330
  function ClearButton(t0) {
331
- const $ = c(11);
331
+ const $ = c(13);
332
332
  let props;
333
333
  let t1;
334
334
  let t2;
335
+ let t3;
335
336
  if ($[0] !== t0) {
336
337
  ({
337
338
  onClick: t1,
338
339
  className: t2,
340
+ iconOnly: t3,
339
341
  ...props
340
342
  } = t0);
341
343
  $[0] = t0;
342
344
  $[1] = props;
343
345
  $[2] = t1;
344
346
  $[3] = t2;
347
+ $[4] = t3;
345
348
  } else {
346
349
  props = $[1];
347
350
  t1 = $[2];
348
351
  t2 = $[3];
352
+ t3 = $[4];
349
353
  }
350
354
  const onClick = t1 === undefined ? null : t1;
351
355
  const className = t2 === undefined ? null : t2;
352
- let t3;
353
- if ($[4] !== className) {
354
- t3 = classNames([styles$w.container, className]);
355
- $[4] = className;
356
- $[5] = t3;
356
+ const iconOnly = t3 === undefined ? false : t3;
357
+ const ButtonComponent = iconOnly ? "span" : "button";
358
+ let t4;
359
+ if ($[5] !== className) {
360
+ t4 = classNames([styles$w.container, className]);
361
+ $[5] = className;
362
+ $[6] = t4;
357
363
  } else {
358
- t3 = $[5];
364
+ t4 = $[6];
359
365
  }
360
- let t4;
361
- if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
362
- t4 = /*#__PURE__*/jsx(FontAwesomeIcon, {
366
+ let t5;
367
+ if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
368
+ t5 = /*#__PURE__*/jsx(FontAwesomeIcon, {
363
369
  className: styles$w.icon,
364
370
  icon: faClose
365
371
  });
366
- $[6] = t4;
372
+ $[7] = t5;
367
373
  } else {
368
- t4 = $[6];
374
+ t5 = $[7];
369
375
  }
370
- let t5;
371
- if ($[7] !== onClick || $[8] !== props || $[9] !== t3) {
372
- t5 = /*#__PURE__*/jsx("button", {
373
- className: t3,
376
+ let t6;
377
+ if ($[8] !== ButtonComponent || $[9] !== onClick || $[10] !== props || $[11] !== t4) {
378
+ t6 = /*#__PURE__*/jsx(ButtonComponent, {
379
+ className: t4,
374
380
  onClick: onClick,
375
381
  ...props,
376
- children: t4
382
+ children: t5
377
383
  });
378
- $[7] = onClick;
379
- $[8] = props;
380
- $[9] = t3;
381
- $[10] = t5;
384
+ $[8] = ButtonComponent;
385
+ $[9] = onClick;
386
+ $[10] = props;
387
+ $[11] = t4;
388
+ $[12] = t6;
382
389
  } else {
383
- t5 = $[10];
390
+ t6 = $[12];
384
391
  }
385
- return t5;
392
+ return t6;
386
393
  }
387
394
 
388
395
  const emptyArray$8 = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/core",
3
- "version": "0.4.80",
3
+ "version": "0.4.85",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -94,22 +94,22 @@
94
94
  "react-dom": "^19.0.0"
95
95
  },
96
96
  "peerDependencies": {
97
- "@panneau/displays": "^4.0.40-alpha.1",
98
- "@panneau/element-button": "^4.0.40-alpha.1",
99
- "@panneau/element-buttons": "^4.0.40-alpha.1",
100
- "@panneau/element-dropdown": "^4.0.40-alpha.1",
101
- "@panneau/element-form-group": "^4.0.40-alpha.1",
102
- "@panneau/element-grid": "^4.0.40-alpha.1",
103
- "@panneau/element-icon": "^4.0.40-alpha.1",
104
- "@panneau/element-link": "^4.0.40-alpha.1",
105
- "@panneau/element-media-card": "^4.0.40-alpha.1",
106
- "@panneau/element-media-player": "^4.0.40-alpha.1",
107
- "@panneau/element-modal": "^4.0.40-alpha.1",
108
- "@panneau/fields": "^4.0.40-alpha.1",
109
- "@panneau/filters": "^4.0.40-alpha.1",
110
- "@panneau/intl": "^4.0.40-alpha.1",
111
- "@panneau/medias": "^4.0.40-alpha.1",
112
- "@panneau/uppy": "^4.0.40-alpha.1",
97
+ "@panneau/displays": "^4.0.40",
98
+ "@panneau/element-button": "^4.0.40",
99
+ "@panneau/element-buttons": "^4.0.40",
100
+ "@panneau/element-dropdown": "^4.0.40",
101
+ "@panneau/element-form-group": "^4.0.40",
102
+ "@panneau/element-grid": "^4.0.40",
103
+ "@panneau/element-icon": "^4.0.40",
104
+ "@panneau/element-link": "^4.0.40",
105
+ "@panneau/element-media-card": "^4.0.40",
106
+ "@panneau/element-media-player": "^4.0.40",
107
+ "@panneau/element-modal": "^4.0.40",
108
+ "@panneau/fields": "^4.0.40",
109
+ "@panneau/filters": "^4.0.40",
110
+ "@panneau/intl": "^4.0.40",
111
+ "@panneau/medias": "^4.0.42",
112
+ "@panneau/uppy": "^4.0.40",
113
113
  "@uppy/core": "^5.1.1",
114
114
  "@uppy/dashboard": "^5.0.4",
115
115
  "@uppy/react": "^5.1.1",
@@ -157,6 +157,6 @@
157
157
  "access": "public",
158
158
  "registry": "https://registry.npmjs.org/"
159
159
  },
160
- "gitHead": "7b7cc58e5fec6cc024896ac481b80fd2976ca26d",
160
+ "gitHead": "21705788dfb96bc235356c11501fae2365d02a58",
161
161
  "types": "es/index.d.ts"
162
162
  }