@m4l/components 9.1.92 → 9.1.93

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.
@@ -5,7 +5,7 @@ import { WindowBaseProps } from './types';
5
5
  * It uses hooks like `useModal` and utility style classes.
6
6
  * @author cesar - automatic
7
7
  * @createdAt 2024-11-15 18:08:44 - automatic
8
- * @updatedAt 2025-01-13 11:59:58 - automatic
8
+ * @updatedAt 2025-01-31 08:23:27 - automatic
9
9
  * @updatedUser cesar - automatic
10
10
  */
11
11
  export declare const WindowBase: (props: WindowBaseProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { u as useComponentSize } from "../../hooks/useComponentSize/useComponentSize.js";
3
3
  import { A as AppearanceComponentProvider } from "../../contexts/AppearanceComponentContext/AppearanceComponentContext.js";
4
4
  import { g as getPropDataTestId } from "../../test/getNameDataTestId.js";
@@ -6,6 +6,7 @@ import { W as WINDOW_BASE_KEY_COMPONENT } from "./constants.js";
6
6
  import { a as getComponentSlotRoot } from "../../utils/getComponentSlotRoot.js";
7
7
  import clsx from "clsx";
8
8
  import { H as HeaderWindowBase } from "./subcomponents/Header/HeaderWindowBase.js";
9
+ import { T as ToastContainer } from "../ToastContainer/ToastContainer.js";
9
10
  import { W as WindowBaseStyled, C as ContentWindowStyled, L as LinearProgressIndeterminateStyled } from "./slots/WindowBaseSlots.js";
10
11
  import { W as WindowBaseSlots } from "./slots/WindowBaseEnum.js";
11
12
  const WindowBase = (props) => {
@@ -20,6 +21,7 @@ const WindowBase = (props) => {
20
21
  onClose,
21
22
  className,
22
23
  isLoading,
24
+ windowId,
23
25
  ...other
24
26
  } = props;
25
27
  const { currentSize } = useComponentSize(size);
@@ -30,36 +32,39 @@ const WindowBase = (props) => {
30
32
  windowBaseVariant: variant,
31
33
  windowBaseSize: normalizedSize
32
34
  };
33
- return /* @__PURE__ */ jsx(AppearanceComponentProvider, { defaultSize: currentSize, children: /* @__PURE__ */ jsxs(
34
- WindowBaseStyled,
35
- {
36
- className: clsx(getComponentSlotRoot(WINDOW_BASE_KEY_COMPONENT), className),
37
- ...getPropDataTestId(WINDOW_BASE_KEY_COMPONENT, WindowBaseSlots.wrapperWindowBase, dataTestId),
38
- ownerState,
39
- children: [
40
- /* @__PURE__ */ jsx(
41
- HeaderWindowBase,
42
- {
43
- ...getPropDataTestId(WINDOW_BASE_KEY_COMPONENT, WindowBaseSlots.headerContentWindowBase, dataTestId),
44
- version,
45
- size,
46
- selected,
47
- onClose,
48
- ...other
49
- }
50
- ),
51
- /* @__PURE__ */ jsx(
52
- ContentWindowStyled,
53
- {
54
- ...getPropDataTestId(WINDOW_BASE_KEY_COMPONENT, WindowBaseSlots.contentWindowBase, dataTestId),
55
- ownerState,
56
- children
57
- }
58
- ),
59
- isLoading && /* @__PURE__ */ jsx(LinearProgressIndeterminateStyled, { ownerState: {} })
60
- ]
61
- }
62
- ) });
35
+ return /* @__PURE__ */ jsxs(AppearanceComponentProvider, { defaultSize: currentSize, children: [
36
+ /* @__PURE__ */ jsx(ToastContainer, { fixed: false, position: "top-center", containerId: windowId }),
37
+ /* @__PURE__ */ jsxs(
38
+ WindowBaseStyled,
39
+ {
40
+ className: clsx(getComponentSlotRoot(WINDOW_BASE_KEY_COMPONENT), className),
41
+ ...getPropDataTestId(WINDOW_BASE_KEY_COMPONENT, WindowBaseSlots.wrapperWindowBase, dataTestId),
42
+ ownerState,
43
+ children: [
44
+ /* @__PURE__ */ jsx(
45
+ HeaderWindowBase,
46
+ {
47
+ ...getPropDataTestId(WINDOW_BASE_KEY_COMPONENT, WindowBaseSlots.headerContentWindowBase, dataTestId),
48
+ version,
49
+ size,
50
+ selected,
51
+ onClose,
52
+ ...other
53
+ }
54
+ ),
55
+ /* @__PURE__ */ jsx(
56
+ ContentWindowStyled,
57
+ {
58
+ ...getPropDataTestId(WINDOW_BASE_KEY_COMPONENT, WindowBaseSlots.contentWindowBase, dataTestId),
59
+ ownerState,
60
+ children
61
+ }
62
+ ),
63
+ isLoading && /* @__PURE__ */ jsx(LinearProgressIndeterminateStyled, { ownerState: {} })
64
+ ]
65
+ }
66
+ )
67
+ ] });
63
68
  };
64
69
  export {
65
70
  WindowBase as W
@@ -8,7 +8,7 @@ import { ComponentPalletColor, Sizes } from '@m4l/styles';
8
8
  * Type representing a single action in the `WindowBase` component.
9
9
  * @author cesar - automatic
10
10
  * @createdAt 2024-12-23 09:48:25 - automatic
11
- * @updatedAt 2025-01-13 09:31:36 - automatic
11
+ * @updatedAt 2025-01-31 08:23:27 - automatic
12
12
  * @updatedUser cesar - automatic
13
13
  */
14
14
  export interface WindowBaseAction {
@@ -131,6 +131,11 @@ export interface WindowBaseProps {
131
131
  * Indicates if the window is in a loading state.
132
132
  */
133
133
  isLoading?: boolean;
134
+ /**
135
+ * A unique identifier for the window.
136
+ * This is used to identify and manage multiple windows.
137
+ */
138
+ windowId?: string;
134
139
  }
135
140
  /**
136
141
  * Type representing the possible values of `WindowBaseSlots`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/components",
3
- "version": "9.1.92",
3
+ "version": "9.1.93",
4
4
  "license": "UNLICENSED",
5
5
  "lint-staged": {
6
6
  "*.{js,ts,tsx}": "eslint --fix --max-warnings 0"