uikit-react-public 0.45.1 → 0.45.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
@@ -29481,79 +29481,79 @@ const ji = "ucl-uikit-base-dialog", N5 = 495, T5 = 495, R5 = 740, V5 = We(
29481
29481
  children: c,
29482
29482
  ...u
29483
29483
  }) => {
29484
- const [s] = L(), {
29485
- colour: { icon: f }
29486
- } = s, h = d`
29484
+ const s = typeof c == "string", [f] = L(), {
29485
+ colour: { icon: h }
29486
+ } = f, p = d`
29487
29487
  display: block;
29488
- margin-top: ${s.margin.m32};
29489
- margin-bottom: ${s.margin.m32};
29488
+ margin-top: ${f.margin.m32};
29489
+ margin-bottom: ${f.margin.m32};
29490
29490
  margin-left: auto;
29491
29491
  margin-right: auto;
29492
- `, p = A(
29493
- h,
29492
+ `, m = A(
29493
+ p,
29494
29494
  e === "success" && d`
29495
- color: ${f.success};
29495
+ color: ${h.success};
29496
29496
  `,
29497
29497
  e === "warning" && d`
29498
- color: ${f.warning};
29498
+ color: ${h.warning};
29499
29499
  `,
29500
29500
  e === "error" && d`
29501
- color: ${f.critical};
29501
+ color: ${h.critical};
29502
29502
  `
29503
- ), m = {
29503
+ ), y = {
29504
29504
  success: /* @__PURE__ */ n(
29505
29505
  P.CheckCircle,
29506
29506
  {
29507
29507
  size: Ln,
29508
- className: p
29508
+ className: m
29509
29509
  }
29510
29510
  ),
29511
29511
  error: /* @__PURE__ */ n(
29512
29512
  P.XCircle,
29513
29513
  {
29514
29514
  size: Ln,
29515
- className: p
29515
+ className: m
29516
29516
  }
29517
29517
  ),
29518
29518
  warning: /* @__PURE__ */ n(
29519
29519
  P.AlertTriangle,
29520
29520
  {
29521
29521
  size: Ln,
29522
- className: p
29522
+ className: m
29523
29523
  }
29524
29524
  )
29525
- }[e], y = d``, b = A(Yi, y, a), C = d`
29526
- text-align: center;
29527
- `, k = d`
29525
+ }[e], b = d``, C = A(Yi, b, a), k = d`
29528
29526
  text-align: center;
29529
- margin: ${s.margin.m24};
29530
29527
  `, x = d`
29531
- margin-top: ${s.margin.m40};
29532
- margin-bottom: ${s.margin.m48};
29528
+ text-align: center;
29529
+ margin: ${f.margin.m24};
29530
+ `, S = d`
29531
+ margin-top: ${f.margin.m40};
29532
+ margin-bottom: ${f.margin.m48};
29533
29533
  justify-content: center;
29534
29534
  `;
29535
29535
  return /* @__PURE__ */ g(
29536
29536
  jt,
29537
29537
  {
29538
29538
  testId: i,
29539
- className: b,
29539
+ className: C,
29540
29540
  ...u,
29541
29541
  children: [
29542
29542
  /* @__PURE__ */ n(
29543
29543
  jt.Header,
29544
29544
  {
29545
- decoration: m,
29545
+ decoration: y,
29546
29546
  headingProps: {
29547
- className: C
29547
+ className: k
29548
29548
  },
29549
29549
  children: t
29550
29550
  }
29551
29551
  ),
29552
- /* @__PURE__ */ n(Ue, { className: k, children: c }),
29552
+ s ? /* @__PURE__ */ n(Ue, { className: x, children: c }) : /* @__PURE__ */ n("div", { className: x, children: c }),
29553
29553
  /* @__PURE__ */ n(
29554
29554
  jt.Footer,
29555
29555
  {
29556
- className: x,
29556
+ className: S,
29557
29557
  primaryButton: o,
29558
29558
  primaryButtonProps: {
29559
29559
  variant: r,
@@ -28,6 +28,8 @@ const FeedbackDialog = ({
28
28
  children,
29
29
  ...props
30
30
  }: FeedbackDialogProps) => {
31
+ const isText = typeof children === 'string';
32
+
31
33
  const [theme] = useTheme();
32
34
 
33
35
  const {
@@ -112,7 +114,11 @@ const FeedbackDialog = ({
112
114
  >
113
115
  {heading}
114
116
  </Dialog.Header>
115
- <Paragraph className={textStyle}>{children}</Paragraph>
117
+ {isText ? (
118
+ <Paragraph className={textStyle}>{children}</Paragraph>
119
+ ) : (
120
+ <div className={textStyle}>{children}</div>
121
+ )}
116
122
  <Dialog.Footer
117
123
  className={footerStyle}
118
124
  primaryButton={buttonLabel}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "uikit-react-public",
3
3
  "private": false,
4
4
  "license": "UNLICENSED",
5
- "version": "0.45.1",
5
+ "version": "0.45.2",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
8
8
  "types": "dist/index.d.ts",