asma-ui-core 3.22.1 → 3.22.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.
@@ -1,21 +1,23 @@
1
1
  import { cn as n } from "../../../../helpers/cn.js";
2
- import { StyledTooltip as I } from "../../../data-display/tooltip/StyledTooltip.js";
3
- import { useMobileMediaQuery as j } from "../../../../hooks/useMediaQuery.hook.js";
2
+ import { StyledTooltip as j } from "../../../data-display/tooltip/StyledTooltip.js";
3
+ import { useMobileMediaQuery as B } from "../../../../hooks/useMediaQuery.hook.js";
4
4
  import { CloseBtn as b } from "../components/CloseBtn.js";
5
5
  import { MinimizeBtn as z } from "../components/MinimizeBtn.js";
6
- import { FullScreenBtn as B } from "../components/FullscreenBtn.js";
6
+ import { FullScreenBtn as D } from "../components/FullscreenBtn.js";
7
7
  import r from "./MinimizableDialogV2.module.js";
8
- import { useTranslations as D } from "./useTranslations.js";
9
- import { useControlledProps as R } from "./useControlledProps.js";
10
- import V from "clsx";
11
- import { useRef as _ } from "react";
12
- import { Fragment as $, jsx as e, jsxs as l } from "react/jsx-runtime";
13
- var X = (x) => {
14
- const { showCloseIcon: p = !0, showMinimizeIcon: g = !0, showExpandIcon: y = !0, enableFullscreen: N = !0, title: a, label: c, children: w, open: C, onClose: f, classNameOverrides: m = {
8
+ import { useTranslations as R } from "./useTranslations.js";
9
+ import { useControlledProps as V } from "./useControlledProps.js";
10
+ import _ from "clsx";
11
+ import { useRef as $ } from "react";
12
+ import { Fragment as A, jsx as e, jsxs as l } from "react/jsx-runtime";
13
+ var Y = (p) => {
14
+ const { showCloseIcon: f = !0, showMinimizeIcon: g = !0, showExpandIcon: y = !0, enableFullscreen: N = !0, title: a, label: c, children: w, open: C, onClose: F, classNameOverrides: m = {
15
15
  maximized: "",
16
16
  minimized: "",
17
17
  fullscreen: ""
18
- }, dataTest: F, actionNode: M, locale: S = "en", style: u } = x, s = j(), t = D(S), T = _(null), { minimized: i, setMinimized: h, fullScreen: o, setFullScreen: v } = R(x), d = o && !i, k = d ? {
18
+ }, dataTest: M, actionNode: S, locale: T = "en", style: u } = p, s = B(), t = R(T), k = $(null), { minimized: i, setMinimized: d, fullScreen: o, setFullScreen: h } = V(p), x = o && !i, v = () => {
19
+ d(!1), F();
20
+ }, I = x ? {
19
21
  right: "auto",
20
22
  bottom: "auto",
21
23
  left: "50%",
@@ -25,7 +27,7 @@ var X = (x) => {
25
27
  maxWidth: "min(1000px, calc(100vw - 32px))",
26
28
  height: "95dvh"
27
29
  } : void 0;
28
- return C ? /* @__PURE__ */ l($, { children: [
30
+ return C ? /* @__PURE__ */ l(A, { children: [
29
31
  /* @__PURE__ */ e("div", {
30
32
  style: {
31
33
  zIndex: 51,
@@ -33,11 +35,11 @@ var X = (x) => {
33
35
  },
34
36
  className: n(r["minimized-dialog"], !i && r.hidden, m.minimized),
35
37
  children: /* @__PURE__ */ l("div", {
36
- className: V("flex items-center justify-between", !i && "hidden"),
37
- "data-testid": F,
38
+ className: _("flex items-center justify-between", !i && "hidden"),
39
+ "data-testid": M,
38
40
  children: [/* @__PURE__ */ e("div", {
39
41
  className: "max-w-[303px] truncate pr-1 text-lg font-semibold text-delta-800",
40
- children: /* @__PURE__ */ e(I, {
42
+ children: /* @__PURE__ */ e(j, {
41
43
  title: a,
42
44
  placement: "top",
43
45
  children: /* @__PURE__ */ e("div", {
@@ -51,31 +53,31 @@ var X = (x) => {
51
53
  type: "expand",
52
54
  visibility: y,
53
55
  onClick: () => {
54
- h(!i);
56
+ d(!i);
55
57
  },
56
58
  tooltipTitle: t.expand
57
59
  }), /* @__PURE__ */ e(b, {
58
- showCloseIcon: p,
59
- onClick: f,
60
+ showCloseIcon: f,
61
+ onClick: v,
60
62
  tooltipTitle: t.close
61
63
  })]
62
64
  })]
63
65
  })
64
66
  }),
65
- d && /* @__PURE__ */ e("div", {
67
+ x && /* @__PURE__ */ e("div", {
66
68
  className: "fixed inset-0 z-[52] bg-[rgb(98,110,126)] bg-opacity-70",
67
69
  onClick: () => {
68
- v(!1);
70
+ h(!1);
69
71
  }
70
72
  }),
71
73
  /* @__PURE__ */ l("div", {
72
74
  style: {
73
75
  zIndex: 51,
74
76
  ...u,
75
- ...k
77
+ ...I
76
78
  },
77
- ref: T,
78
- className: n(r.dialog, i && r.hidden, !o && m.maximized, o && m.fullscreen, d && "fixed z-[53] duration-0"),
79
+ ref: k,
80
+ className: n(r.dialog, i && r.hidden, !o && m.maximized, o && m.fullscreen, x && "fixed z-[53] duration-0"),
79
81
  children: [/* @__PURE__ */ l("div", {
80
82
  className: n("flex flex-col border-b-[1px] border-delta-200 px-4", s ? "py-3" : "py-4"),
81
83
  children: [/* @__PURE__ */ l("div", {
@@ -89,26 +91,26 @@ var X = (x) => {
89
91
  }), /* @__PURE__ */ l("div", {
90
92
  className: "flex items-center gap-x-1",
91
93
  children: [
92
- M,
94
+ S,
93
95
  /* @__PURE__ */ e(z, {
94
96
  visibility: g && !s,
95
97
  type: "minimize",
96
98
  onClick: () => {
97
- h(!i);
99
+ d(!i);
98
100
  },
99
101
  tooltipTitle: t.minimize
100
102
  }),
101
- /* @__PURE__ */ e(B, {
103
+ /* @__PURE__ */ e(D, {
102
104
  showFullScreenIcon: N && !s,
103
105
  fullScreen: o,
104
106
  onClick: () => {
105
- v(!o);
107
+ h(!o);
106
108
  },
107
109
  tooltipTitle: o ? t.exitFullscreen : t.fullscreen
108
110
  }),
109
111
  /* @__PURE__ */ e(b, {
110
- showCloseIcon: p,
111
- onClick: f,
112
+ showCloseIcon: f,
113
+ onClick: v,
112
114
  tooltipTitle: t.close
113
115
  })
114
116
  ]
@@ -125,5 +127,5 @@ var X = (x) => {
125
127
  ] }) : null;
126
128
  };
127
129
  export {
128
- X as MinimizableDialogV2
130
+ Y as MinimizableDialogV2
129
131
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.22.1",
6
+ "version": "3.22.2",
7
7
  "type": "module",
8
8
  "sideEffects": [
9
9
  "**/*.css",