@mond-design-system/react 4.10.1 → 4.10.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.js CHANGED
@@ -148,6 +148,8 @@ function Button({
148
148
  children,
149
149
  ...rest
150
150
  }) {
151
+ const glyph = iconOnly && children != null ? /* @__PURE__ */ jsx("span", { className: Button_module_default.slot, children }) : children;
152
+ const body = loading && iconOnly ? null : glyph;
151
153
  const Element = as ?? (href !== void 0 ? "a" : "button");
152
154
  const isButton = Element === "button";
153
155
  const own = isButton ? { type, disabled: disabled || loading } : { href };
@@ -169,7 +171,7 @@ function Button({
169
171
  ...rest,
170
172
  children: [
171
173
  loading ? /* @__PURE__ */ jsx("span", { className: Button_module_default.slot, children: /* @__PURE__ */ jsx(Spinner, { size: ICON_PX[size], label: "", "aria-hidden": "true" }) }) : iconLeft ? /* @__PURE__ */ jsx("span", { className: Button_module_default.slot, children: iconLeft }) : null,
172
- children,
174
+ body,
173
175
  !loading && iconRight ? /* @__PURE__ */ jsx("span", { className: Button_module_default.slot, children: iconRight }) : null
174
176
  ]
175
177
  }
@@ -383,10 +385,10 @@ function CountButton({
383
385
  );
384
386
  }
385
387
  function CloseGlyph({ className }) {
386
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx("path", { d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round" }) });
388
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", width: "1em", height: "1em", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx("path", { d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round" }) });
387
389
  }
388
390
  function ChevronLeftGlyph({ className }) {
389
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx(
391
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", width: "1em", height: "1em", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx(
390
392
  "path",
391
393
  {
392
394
  d: "M10 3l-5 5 5 5",
@@ -399,7 +401,7 @@ function ChevronLeftGlyph({ className }) {
399
401
  ) });
400
402
  }
401
403
  function ChevronRightGlyph({ className }) {
402
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx(
404
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", width: "1em", height: "1em", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx(
403
405
  "path",
404
406
  {
405
407
  d: "M6 3l5 5-5 5",
@@ -412,7 +414,7 @@ function ChevronRightGlyph({ className }) {
412
414
  ) });
413
415
  }
414
416
  function Magnifier({ className, children }) {
415
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", children: [
417
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", width: "1em", height: "1em", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", children: [
416
418
  /* @__PURE__ */ jsx("circle", { cx: "7", cy: "7", r: "4.25" }),
417
419
  /* @__PURE__ */ jsx("path", { d: "M10.2 10.2L14 14" }),
418
420
  children
@@ -425,35 +427,35 @@ function ZoomOutGlyph({ className }) {
425
427
  return /* @__PURE__ */ jsx(Magnifier, { className, children: /* @__PURE__ */ jsx("path", { d: "M4.75 7h4.5" }) });
426
428
  }
427
429
  function PlayGlyph({ className }) {
428
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx("path", { d: "M5 3.2l7.5 4.8L5 12.8z", fill: "currentColor" }) });
430
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", width: "1em", height: "1em", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx("path", { d: "M5 3.2l7.5 4.8L5 12.8z", fill: "currentColor" }) });
429
431
  }
430
432
  function PauseGlyph({ className }) {
431
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx("path", { d: "M4.5 3h2.25v10H4.5zM9.25 3h2.25v10H9.25z", fill: "currentColor" }) });
433
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", width: "1em", height: "1em", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx("path", { d: "M4.5 3h2.25v10H4.5zM9.25 3h2.25v10H9.25z", fill: "currentColor" }) });
432
434
  }
433
435
  function Speaker() {
434
436
  return /* @__PURE__ */ jsx("path", { d: "M2.5 6.25h2.25L8 3.4v9.2L4.75 9.75H2.5z", fill: "currentColor", stroke: "none" });
435
437
  }
436
438
  function VolumeGlyph({ className }) {
437
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", children: [
439
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", width: "1em", height: "1em", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", children: [
438
440
  /* @__PURE__ */ jsx(Speaker, {}),
439
441
  /* @__PURE__ */ jsx("path", { d: "M10.5 5.75a3.25 3.25 0 010 4.5" }),
440
442
  /* @__PURE__ */ jsx("path", { d: "M12.5 3.9a5.75 5.75 0 010 8.2" })
441
443
  ] }) });
442
444
  }
443
445
  function VolumeOffGlyph({ className }) {
444
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", children: [
446
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", width: "1em", height: "1em", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", children: [
445
447
  /* @__PURE__ */ jsx(Speaker, {}),
446
448
  /* @__PURE__ */ jsx("path", { d: "M10.75 6.25l3.5 3.5M14.25 6.25l-3.5 3.5" })
447
449
  ] }) });
448
450
  }
449
451
  function CaptionsGlyph({ className }) {
450
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", children: [
452
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", width: "1em", height: "1em", "aria-hidden": "true", className, children: /* @__PURE__ */ jsxs("g", { fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", children: [
451
453
  /* @__PURE__ */ jsx("rect", { x: "1.75", y: "3.25", width: "12.5", height: "9.5", rx: "2" }),
452
454
  /* @__PURE__ */ jsx("path", { d: "M6.25 6.75a2 2 0 100 2.5M11.25 6.75a2 2 0 100 2.5" })
453
455
  ] }) });
454
456
  }
455
457
  function FullscreenGlyph({ className }) {
456
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx(
458
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", width: "1em", height: "1em", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx(
457
459
  "path",
458
460
  {
459
461
  d: "M6 2.5H2.5V6M10 2.5h3.5V6M6 13.5H2.5V10M10 13.5h3.5V10",
@@ -466,7 +468,7 @@ function FullscreenGlyph({ className }) {
466
468
  ) });
467
469
  }
468
470
  function FullscreenExitGlyph({ className }) {
469
- return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx(
471
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", width: "1em", height: "1em", "aria-hidden": "true", className, children: /* @__PURE__ */ jsx(
470
472
  "path",
471
473
  {
472
474
  d: "M2.5 6H6V2.5M13.5 6H10V2.5M2.5 10H6v3.5M13.5 10H10v3.5",