hiver-ui-kit-extended 1.0.0-beta.15 → 1.0.0-beta.16

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/env.hui.d.ts CHANGED
@@ -101,6 +101,10 @@ export declare interface DialogProps {
101
101
  variant?: 'standard' | 'confirmation';
102
102
  /** Callback fired when the back button is clicked (for confirmation variant) */
103
103
  onBack?: () => void;
104
+ /** If true, shows the back button in confirmation variant (defaults to true) */
105
+ showBackButton?: boolean;
106
+ /** If true, shows the close button (defaults to true) */
107
+ showCloseButton?: boolean;
104
108
  className?: string;
105
109
  style?: React.CSSProperties;
106
110
  rest?: DialogProps_2;
@@ -103,6 +103,10 @@ export declare interface DialogProps {
103
103
  variant?: 'standard' | 'confirmation';
104
104
  /** Callback fired when the back button is clicked (for confirmation variant) */
105
105
  onBack?: () => void;
106
+ /** If true, shows the back button in confirmation variant (defaults to true) */
107
+ showBackButton?: boolean;
108
+ /** If true, shows the close button (defaults to true) */
109
+ showCloseButton?: boolean;
106
110
  className?: string;
107
111
  style?: React.CSSProperties;
108
112
  rest?: DialogProps_2;
package/dist/env.prime.js CHANGED
@@ -3392,6 +3392,10 @@ const Toast = forwardRef(({ position = "top-right", className }, ref) => {
3392
3392
  });
3393
3393
  Toast.displayName = "Toast";
3394
3394
 
3395
+ const closeIcon = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%20fill='none'%3e%3cpath%20d='M10.5%203.5L3.5%2010.5M3.5%203.5L10.5%2010.5'%20stroke='%2364758B'%20stroke-width='1.1'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
3396
+
3397
+ const backIcon = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%3e%3cpath%20d='M13.3334%208H2.66675M2.66675%208L6.66675%2012M2.66675%208L6.66675%204'%20stroke='%23334155'%20stroke-width='1.3'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";
3398
+
3395
3399
  function Dialog(props) {
3396
3400
  const {
3397
3401
  children,
@@ -3407,6 +3411,8 @@ function Dialog(props) {
3407
3411
  footer,
3408
3412
  variant = "confirmation",
3409
3413
  onBack,
3414
+ showBackButton = true,
3415
+ showCloseButton = true,
3410
3416
  ...rest
3411
3417
  } = props;
3412
3418
  const handleHide = () => {
@@ -3440,21 +3446,37 @@ function Dialog(props) {
3440
3446
  onClose({}, "backdropClick");
3441
3447
  }
3442
3448
  };
3449
+ const handleClose = () => {
3450
+ if (onClose) {
3451
+ onClose({}, "backdropClick");
3452
+ }
3453
+ };
3443
3454
  const renderHeader = () => {
3444
3455
  if (variant === "confirmation" && title) {
3445
- return /* @__PURE__ */ jsxs("div", { className: "omni-dialog-header-confirmation", children: [
3446
- /* @__PURE__ */ jsx(
3456
+ return /* @__PURE__ */ jsx("div", { className: "omni-dialog-header-confirmation", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full", children: [
3457
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-start gap-2.5", children: [
3458
+ showBackButton && /* @__PURE__ */ jsx(
3459
+ "button",
3460
+ {
3461
+ type: "button",
3462
+ className: "omni-dialog-back-button",
3463
+ onClick: handleBack,
3464
+ "aria-label": "Go back",
3465
+ children: /* @__PURE__ */ jsx("img", { src: backIcon, alt: "Close" })
3466
+ }
3467
+ ),
3468
+ /* @__PURE__ */ jsx("div", { className: "omni-dialog-title-confirmation", children: title })
3469
+ ] }),
3470
+ showCloseButton && /* @__PURE__ */ jsx(
3447
3471
  "button",
3448
3472
  {
3449
3473
  type: "button",
3450
- className: "omni-dialog-back-button",
3451
- onClick: handleBack,
3452
- "aria-label": "Go back",
3453
- children: /* @__PURE__ */ jsx("i", { className: "pi pi-arrow-left" })
3474
+ className: "omni-dialog-close-button",
3475
+ onClick: handleClose,
3476
+ children: /* @__PURE__ */ jsx("img", { src: closeIcon, alt: "Close" })
3454
3477
  }
3455
- ),
3456
- /* @__PURE__ */ jsx("div", { className: "omni-dialog-title-confirmation", children: title })
3457
- ] });
3478
+ )
3479
+ ] }) });
3458
3480
  }
3459
3481
  return title;
3460
3482
  };