@micromag/core 0.4.83 → 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.
- package/es/components.d.ts +2 -1
- package/es/components.js +30 -23
- package/package.json +2 -2
package/es/components.d.ts
CHANGED
|
@@ -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(
|
|
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
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
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
|
-
|
|
364
|
+
t4 = $[6];
|
|
359
365
|
}
|
|
360
|
-
let
|
|
361
|
-
if ($[
|
|
362
|
-
|
|
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
|
-
$[
|
|
372
|
+
$[7] = t5;
|
|
367
373
|
} else {
|
|
368
|
-
|
|
374
|
+
t5 = $[7];
|
|
369
375
|
}
|
|
370
|
-
let
|
|
371
|
-
if ($[
|
|
372
|
-
|
|
373
|
-
className:
|
|
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:
|
|
382
|
+
children: t5
|
|
377
383
|
});
|
|
378
|
-
$[
|
|
379
|
-
$[
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
384
|
+
$[8] = ButtonComponent;
|
|
385
|
+
$[9] = onClick;
|
|
386
|
+
$[10] = props;
|
|
387
|
+
$[11] = t4;
|
|
388
|
+
$[12] = t6;
|
|
382
389
|
} else {
|
|
383
|
-
|
|
390
|
+
t6 = $[12];
|
|
384
391
|
}
|
|
385
|
-
return
|
|
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.
|
|
3
|
+
"version": "0.4.85",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -157,6 +157,6 @@
|
|
|
157
157
|
"access": "public",
|
|
158
158
|
"registry": "https://registry.npmjs.org/"
|
|
159
159
|
},
|
|
160
|
-
"gitHead": "
|
|
160
|
+
"gitHead": "21705788dfb96bc235356c11501fae2365d02a58",
|
|
161
161
|
"types": "es/index.d.ts"
|
|
162
162
|
}
|