triafly-ui-kit 1.0.97 → 1.0.98

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/README.md CHANGED
@@ -1,93 +1,93 @@
1
- # ui-kit
2
-
3
-
4
-
5
- ## Getting started
6
-
7
- To make it easy for you to get started with GitLab, here's a list of recommended next steps.
8
-
9
- Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
10
-
11
- ## Add your files
12
-
13
- - [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
14
- - [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
15
-
16
- ```
17
- cd existing_repo
18
- git remote add origin https://git.3afly.ru/triafly-data-platform/ui-kit.git
19
- git branch -M main
20
- git push -uf origin main
21
- ```
22
-
23
- ## Integrate with your tools
24
-
25
- - [ ] [Set up project integrations](https://git.3afly.ru/triafly-data-platform/ui-kit/-/settings/integrations)
26
-
27
- ## Collaborate with your team
28
-
29
- - [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
30
- - [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
31
- - [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
32
- - [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
33
- - [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
34
-
35
- ## Test and Deploy
36
-
37
- Use the built-in continuous integration in GitLab.
38
-
39
- - [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
40
- - [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
41
- - [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
42
- - [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
43
- - [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
44
-
45
- ***
46
-
47
- # Editing this README
48
-
49
- When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
50
-
51
- ## Suggestions for a good README
52
-
53
- Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
54
-
55
- ## Name
56
- Choose a self-explaining name for your project.
57
-
58
- ## Description
59
- Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
60
-
61
- ## Badges
62
- On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
63
-
64
- ## Visuals
65
- Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
66
-
67
- ## Installation
68
- Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
69
-
70
- ## Usage
71
- Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
72
-
73
- ## Support
74
- Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
75
-
76
- ## Roadmap
77
- If you have ideas for releases in the future, it is a good idea to list them in the README.
78
-
79
- ## Contributing
80
- State if you are open to contributions and what your requirements are for accepting them.
81
-
82
- For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
83
-
84
- You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
85
-
86
- ## Authors and acknowledgment
87
- Show your appreciation to those who have contributed to the project.
88
-
89
- ## License
90
- For open source projects, say how it is licensed.
91
-
92
- ## Project status
93
- If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
1
+ # ui-kit
2
+
3
+
4
+
5
+ ## Getting started
6
+
7
+ To make it easy for you to get started with GitLab, here's a list of recommended next steps.
8
+
9
+ Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
10
+
11
+ ## Add your files
12
+
13
+ - [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
14
+ - [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
15
+
16
+ ```
17
+ cd existing_repo
18
+ git remote add origin https://git.3afly.ru/triafly-data-platform/ui-kit.git
19
+ git branch -M main
20
+ git push -uf origin main
21
+ ```
22
+
23
+ ## Integrate with your tools
24
+
25
+ - [ ] [Set up project integrations](https://git.3afly.ru/triafly-data-platform/ui-kit/-/settings/integrations)
26
+
27
+ ## Collaborate with your team
28
+
29
+ - [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
30
+ - [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
31
+ - [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
32
+ - [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
33
+ - [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
34
+
35
+ ## Test and Deploy
36
+
37
+ Use the built-in continuous integration in GitLab.
38
+
39
+ - [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
40
+ - [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
41
+ - [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
42
+ - [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
43
+ - [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
44
+
45
+ ***
46
+
47
+ # Editing this README
48
+
49
+ When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
50
+
51
+ ## Suggestions for a good README
52
+
53
+ Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
54
+
55
+ ## Name
56
+ Choose a self-explaining name for your project.
57
+
58
+ ## Description
59
+ Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
60
+
61
+ ## Badges
62
+ On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
63
+
64
+ ## Visuals
65
+ Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
66
+
67
+ ## Installation
68
+ Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
69
+
70
+ ## Usage
71
+ Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
72
+
73
+ ## Support
74
+ Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
75
+
76
+ ## Roadmap
77
+ If you have ideas for releases in the future, it is a good idea to list them in the README.
78
+
79
+ ## Contributing
80
+ State if you are open to contributions and what your requirements are for accepting them.
81
+
82
+ For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
83
+
84
+ You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
85
+
86
+ ## Authors and acknowledgment
87
+ Show your appreciation to those who have contributed to the project.
88
+
89
+ ## License
90
+ For open source projects, say how it is licensed.
91
+
92
+ ## Project status
93
+ If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
@@ -1 +1 @@
1
- ._container_193w2_1{position:relative;width:100%;height:100vh;padding:20px;display:flex;flex-wrap:wrap;justify-content:space-between;align-content:space-between;border:1px dashed #ccc;box-sizing:border-box}._trigger_193w2_14{padding:8px 16px;background-color:#1976d2;color:#fff;border-radius:4px;font-size:14px;cursor:pointer;transition:background-color .2s;text-align:center}._trigger_193w2_14:hover{background-color:#1565c0}._clickTrigger_193w2_29{background-color:#388e3c}._clickTrigger_193w2_29:hover{background-color:#2e7d32}._positionsContainer_193w2_38{padding:20px}._positionGroup_193w2_42{display:flex;gap:20px;margin-bottom:30px;justify-content:center;flex-wrap:wrap}
1
+ ._container_x4z3a_1{position:relative;width:100%;height:100vh;padding:20px;display:flex;flex-wrap:wrap;justify-content:space-between;align-content:space-between;border:1px dashed #ccc;box-sizing:border-box}._trigger_x4z3a_27{padding:8px 16px;background-color:#1976d2;color:#fff;border-radius:4px;font-size:14px;cursor:pointer;transition:background-color .2s;text-align:center}._trigger_x4z3a_27:hover{background-color:#1565c0}._clickTrigger_x4z3a_57{background-color:#388e3c}._clickTrigger_x4z3a_57:hover{background-color:#2e7d32}._positionsContainer_x4z3a_75{padding:20px}._positionGroup_x4z3a_83{display:flex;gap:20px;margin-bottom:30px;justify-content:center;flex-wrap:wrap}
@@ -0,0 +1,28 @@
1
+ var c = Object.defineProperty;
2
+ var d = (e, t, a) => t in e ? c(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
3
+ var s = (e, t, a) => d(e, typeof t != "symbol" ? t + "" : t, a);
4
+ class n {
5
+ constructor() {
6
+ s(this, "stack", []);
7
+ }
8
+ addModal(t, a) {
9
+ this.stack.push({ id: t, onClose: a });
10
+ }
11
+ removeModal(t) {
12
+ this.stack = this.stack.filter((a) => a.id !== t);
13
+ }
14
+ closeTopModal() {
15
+ this.stack.length > 0 && this.stack[this.stack.length - 1].onClose();
16
+ }
17
+ getStackSize() {
18
+ return this.stack.length;
19
+ }
20
+ }
21
+ const o = new n();
22
+ typeof document < "u" && document.addEventListener("keydown", (e) => {
23
+ e.key === "Escape" && o.getStackSize() > 0 && o.closeTopModal();
24
+ });
25
+ export {
26
+ n as ModalManager,
27
+ o as modalManager
28
+ };
@@ -1,51 +1,67 @@
1
- import { jsx as s, Fragment as h, jsxs as i } from "react/jsx-runtime";
2
- import { createElement as u } from "react";
3
- import { createPortal as f } from "react-dom";
1
+ import { jsx as t, Fragment as N, jsxs as i } from "react/jsx-runtime";
2
+ import { useRef as c, useEffect as u, createElement as b } from "react";
3
+ import { createPortal as y } from "react-dom";
4
4
  import '../../../assets/src/components/Ui/ModalWindow/ModalWindow.css';/* empty css */
5
- import { Button as v } from "../Button/Button.js";
6
- import { IconX as N } from "../Icons/Icons.js";
7
- const j = ({
8
- isOpen: m,
9
- onClose: l,
10
- width: a,
11
- size: r = "md",
5
+ import { Button as z } from "../Button/Button.js";
6
+ import { IconX as x } from "../Icons/Icons.js";
7
+ import { modalManager as f } from "./ModalManger.js";
8
+ const B = ({
9
+ isOpen: a,
10
+ onClose: n,
11
+ width: w,
12
+ size: h = "md",
12
13
  iconHeader: o,
13
- title: t,
14
- children: d,
15
- usePortal: e = !1,
16
- foolHeight: c,
17
- position: p = "center"
14
+ title: r,
15
+ children: _,
16
+ usePortal: p = !1,
17
+ foolHeight: v,
18
+ position: $ = "center",
19
+ closeOnEscape: m = !0,
20
+ modalId: g
18
21
  }) => {
19
- if (!m) return null;
20
- const w = (o == null ? void 0 : o.size) ?? 20, n = /* @__PURE__ */ s(h, { children: /* @__PURE__ */ s("div", { className: `modal-window overlay position-${p}`, children: /* @__PURE__ */ i(
22
+ const e = c(
23
+ g || `modal-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`
24
+ ), d = c(n);
25
+ if (u(() => {
26
+ d.current = n;
27
+ }, [n]), u(() => {
28
+ if (a && m) {
29
+ const s = () => d.current(!1);
30
+ f.addModal(e.current, s);
31
+ }
32
+ return () => {
33
+ f.removeModal(e.current);
34
+ };
35
+ }, [a, m]), !a) return null;
36
+ const M = (o == null ? void 0 : o.size) ?? 20, l = /* @__PURE__ */ t(N, { children: /* @__PURE__ */ t("div", { className: `modal-window overlay position-${$}`, children: /* @__PURE__ */ i(
21
37
  "div",
22
38
  {
23
- className: `modal-window__body size-${r} ${c ? "foolHeight" : ""}`,
24
- onClick: (_) => _.stopPropagation(),
39
+ className: `modal-window__body size-${h} ${v ? "foolHeight" : ""}`,
40
+ onClick: (s) => s.stopPropagation(),
25
41
  style: {
26
- width: `${a}`,
42
+ width: `${w}`,
27
43
  pointerEvents: "auto"
28
44
  },
29
45
  children: [
30
46
  /* @__PURE__ */ i("div", { className: "modal-window__header", children: [
31
- (o == null ? void 0 : o.view) && /* @__PURE__ */ s("div", { className: `modal-window__header__icon status-${o.status}`, children: u(o.icon, { size: w }) }),
32
- t != null && t.toString() ? /* @__PURE__ */ s("span", { className: "modal-window__header__title", children: t }) : t,
33
- /* @__PURE__ */ s(
34
- v,
47
+ (o == null ? void 0 : o.view) && /* @__PURE__ */ t("div", { className: `modal-window__header__icon status-${o.status}`, children: b(o.icon, { size: M }) }),
48
+ r != null && r.toString() ? /* @__PURE__ */ t("span", { className: "modal-window__header__title", children: r }) : r,
49
+ /* @__PURE__ */ t(
50
+ z,
35
51
  {
36
52
  type: "button",
37
- icon: /* @__PURE__ */ s(N, { size: 24 }),
53
+ icon: /* @__PURE__ */ t(x, { size: 24 }),
38
54
  className: "icon-button",
39
- onClick: () => l(!1)
55
+ onClick: () => n(!1)
40
56
  }
41
57
  )
42
58
  ] }),
43
- d
59
+ _
44
60
  ]
45
61
  }
46
62
  ) }) });
47
- return e ? f(n, document.body) : n;
63
+ return p ? y(l, document.body) : l;
48
64
  };
49
65
  export {
50
- j as ModalWindow
66
+ B as ModalWindow
51
67
  };
@@ -1,18 +1,18 @@
1
- import { jsx as o, jsxs as i } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
2
  import { useState as d } from "react";
3
- import { ModalWindow as r } from "./ModalWindow.js";
4
- import { IconCheck as t } from "../Icons/Icons.js";
5
- const u = {
3
+ import { ModalWindow as i } from "./ModalWindow.js";
4
+ import { IconCheck as t, IconInfo as p, IconArrowBendUpRight as h } from "../Icons/Icons.js";
5
+ const w = {
6
6
  title: "UIKit/ModalWindow",
7
- component: r,
7
+ component: i,
8
8
  tags: ["autodocs"]
9
- }, l = () => {
10
- const [n, e] = d(!1);
11
- return /* @__PURE__ */ i("div", { style: { padding: "20px" }, children: [
12
- /* @__PURE__ */ o(
9
+ }, u = () => {
10
+ const [r, o] = d(!1);
11
+ return /* @__PURE__ */ n("div", { style: { padding: "20px" }, children: [
12
+ /* @__PURE__ */ e(
13
13
  "button",
14
14
  {
15
- onClick: () => e(!0),
15
+ onClick: () => o(!0),
16
16
  style: {
17
17
  padding: "8px 16px",
18
18
  backgroundColor: "#007bff",
@@ -24,12 +24,12 @@ const u = {
24
24
  children: "Open Modal"
25
25
  }
26
26
  ),
27
- /* @__PURE__ */ o(r, { isOpen: n, onClose: () => e(!1), title: "Basic Modal Window", children: /* @__PURE__ */ i("div", { style: { padding: "20px" }, children: [
28
- /* @__PURE__ */ o("p", { children: "This is a simple modal content" }),
29
- /* @__PURE__ */ o(
27
+ /* @__PURE__ */ e(i, { isOpen: r, onClose: () => o(!1), title: "Basic Modal Window", children: /* @__PURE__ */ n("div", { style: { padding: "20px" }, children: [
28
+ /* @__PURE__ */ e("p", { children: "This is a simple modal content" }),
29
+ /* @__PURE__ */ e(
30
30
  "button",
31
31
  {
32
- onClick: () => e(!1),
32
+ onClick: () => o(!1),
33
33
  style: {
34
34
  padding: "6px 12px",
35
35
  backgroundColor: "#6c757d",
@@ -43,13 +43,13 @@ const u = {
43
43
  )
44
44
  ] }) })
45
45
  ] });
46
- }, s = () => {
47
- const [n, e] = d(!1);
48
- return /* @__PURE__ */ i("div", { style: { padding: "20px" }, children: [
49
- /* @__PURE__ */ o(
46
+ }, x = () => {
47
+ const [r, o] = d(!1);
48
+ return /* @__PURE__ */ n("div", { style: { padding: "20px" }, children: [
49
+ /* @__PURE__ */ e(
50
50
  "button",
51
51
  {
52
- onClick: () => e(!0),
52
+ onClick: () => o(!0),
53
53
  style: {
54
54
  padding: "8px 16px",
55
55
  backgroundColor: "#007bff",
@@ -61,11 +61,11 @@ const u = {
61
61
  children: "Open Modal with Icon"
62
62
  }
63
63
  ),
64
- /* @__PURE__ */ o(
65
- r,
64
+ /* @__PURE__ */ e(
65
+ i,
66
66
  {
67
- isOpen: n,
68
- onClose: () => e(!1),
67
+ isOpen: r,
68
+ onClose: () => o(!1),
69
69
  title: "Modal with Icon",
70
70
  iconHeader: {
71
71
  view: !0,
@@ -73,17 +73,172 @@ const u = {
73
73
  icon: t,
74
74
  size: 24
75
75
  },
76
- children: /* @__PURE__ */ o("div", { style: { padding: "20px" }, children: /* @__PURE__ */ o("p", { children: "This modal has an icon in the header" }) })
76
+ children: /* @__PURE__ */ e("div", { style: { padding: "20px" }, children: /* @__PURE__ */ e("p", { children: "This modal has an icon in the header" }) })
77
77
  }
78
78
  )
79
79
  ] });
80
- }, x = {
81
- render: () => /* @__PURE__ */ o(l, {})
82
- }, f = {
83
- render: () => /* @__PURE__ */ o(s, {})
80
+ }, b = () => {
81
+ const [r, o] = d(!1), [c, s] = d(!1), [a, l] = d(!1);
82
+ return /* @__PURE__ */ n("div", { style: { padding: "20px" }, children: [
83
+ /* @__PURE__ */ e(
84
+ "button",
85
+ {
86
+ onClick: () => o(!0),
87
+ style: {
88
+ padding: "8px 16px",
89
+ backgroundColor: "#007bff",
90
+ color: "white",
91
+ border: "none",
92
+ borderRadius: "4px",
93
+ cursor: "pointer",
94
+ marginBottom: "10px"
95
+ },
96
+ children: "Open First Modal"
97
+ }
98
+ ),
99
+ /* @__PURE__ */ e(
100
+ i,
101
+ {
102
+ isOpen: r,
103
+ onClose: () => o(!1),
104
+ title: "First Modal",
105
+ size: "lg",
106
+ iconHeader: {
107
+ view: !0,
108
+ status: "info",
109
+ icon: p,
110
+ size: 24
111
+ },
112
+ children: /* @__PURE__ */ n("div", { style: { padding: "20px", display: "flex", flexDirection: "column", gap: "10px" }, children: [
113
+ /* @__PURE__ */ e("p", { children: "This is the first modal window." }),
114
+ /* @__PURE__ */ e("p", { children: "Press Escape to close this modal first." }),
115
+ /* @__PURE__ */ e(
116
+ "button",
117
+ {
118
+ onClick: () => s(!0),
119
+ style: {
120
+ padding: "8px 16px",
121
+ backgroundColor: "#28a745",
122
+ color: "white",
123
+ border: "none",
124
+ borderRadius: "4px",
125
+ cursor: "pointer"
126
+ },
127
+ children: "Open Second Modal"
128
+ }
129
+ ),
130
+ /* @__PURE__ */ e(
131
+ "button",
132
+ {
133
+ onClick: () => o(!1),
134
+ style: {
135
+ padding: "6px 12px",
136
+ backgroundColor: "#6c757d",
137
+ color: "white",
138
+ border: "none",
139
+ borderRadius: "4px",
140
+ cursor: "pointer"
141
+ },
142
+ children: "Close First Modal"
143
+ }
144
+ )
145
+ ] })
146
+ }
147
+ ),
148
+ /* @__PURE__ */ e(
149
+ i,
150
+ {
151
+ isOpen: c,
152
+ onClose: () => s(!1),
153
+ title: "Second Modal",
154
+ iconHeader: {
155
+ view: !0,
156
+ status: "warning",
157
+ icon: h,
158
+ size: 24
159
+ },
160
+ children: /* @__PURE__ */ n("div", { style: { padding: "20px", display: "flex", flexDirection: "column", gap: "10px" }, children: [
161
+ /* @__PURE__ */ e("p", { children: "This is the second modal window." }),
162
+ /* @__PURE__ */ e("p", { children: "Press Escape to close this modal first." }),
163
+ /* @__PURE__ */ e(
164
+ "button",
165
+ {
166
+ onClick: () => l(!0),
167
+ style: {
168
+ padding: "8px 16px",
169
+ backgroundColor: "#ffc107",
170
+ color: "black",
171
+ border: "none",
172
+ borderRadius: "4px",
173
+ cursor: "pointer"
174
+ },
175
+ children: "Open Third Modal"
176
+ }
177
+ ),
178
+ /* @__PURE__ */ e(
179
+ "button",
180
+ {
181
+ onClick: () => s(!1),
182
+ style: {
183
+ padding: "6px 12px",
184
+ backgroundColor: "#6c757d",
185
+ color: "white",
186
+ border: "none",
187
+ borderRadius: "4px",
188
+ cursor: "pointer"
189
+ },
190
+ children: "Close Second Modal"
191
+ }
192
+ )
193
+ ] })
194
+ }
195
+ ),
196
+ /* @__PURE__ */ e(
197
+ i,
198
+ {
199
+ isOpen: a,
200
+ onClose: () => l(!1),
201
+ title: "Third Modal",
202
+ size: "sm",
203
+ iconHeader: {
204
+ view: !0,
205
+ status: "success",
206
+ icon: t,
207
+ size: 24
208
+ },
209
+ children: /* @__PURE__ */ n("div", { style: { padding: "20px", display: "flex", flexDirection: "column", gap: "10px" }, children: [
210
+ /* @__PURE__ */ e("p", { children: "This is the third modal window." }),
211
+ /* @__PURE__ */ e("p", { children: "Press Escape to close this modal first." }),
212
+ /* @__PURE__ */ e("p", { style: { fontWeight: "bold", color: "#dc3545" }, children: "Test: Press Escape multiple times - windows should close in reverse order!" }),
213
+ /* @__PURE__ */ e(
214
+ "button",
215
+ {
216
+ onClick: () => l(!1),
217
+ style: {
218
+ padding: "6px 12px",
219
+ backgroundColor: "#6c757d",
220
+ color: "white",
221
+ border: "none",
222
+ borderRadius: "4px",
223
+ cursor: "pointer"
224
+ },
225
+ children: "Close Third Modal"
226
+ }
227
+ )
228
+ ] })
229
+ }
230
+ )
231
+ ] });
232
+ }, y = {
233
+ render: () => /* @__PURE__ */ e(u, {})
234
+ }, k = {
235
+ render: () => /* @__PURE__ */ e(x, {})
236
+ }, M = {
237
+ render: () => /* @__PURE__ */ e(b, {})
84
238
  };
85
239
  export {
86
- x as Basic,
87
- f as WithIcon,
88
- u as default
240
+ y as Basic,
241
+ M as NestedModals,
242
+ k as WithIcon,
243
+ w as default
89
244
  };
package/dist/main.d.ts CHANGED
@@ -1065,6 +1065,8 @@ declare type ModalWindowProps = {
1065
1065
  children: React.ReactNode;
1066
1066
  usePortal?: boolean;
1067
1067
  foolHeight?: boolean;
1068
+ closeOnEscape?: boolean;
1069
+ modalId?: string;
1068
1070
  };
1069
1071
 
1070
1072
  export declare const NumberInput: default_2.ForwardRefExoticComponent<NumberInputProps & default_2.RefAttributes<HTMLInputElement>>;
@@ -1,4 +1,4 @@
1
- import '../../../../assets/src/components/Ui/Tooltip/Tooltip.stories.module.css';const i = "_container_193w2_1", o = "_trigger_193w2_14", t = "_clickTrigger_193w2_29 _trigger_193w2_14", n = "_positionsContainer_193w2_38", r = "_positionGroup_193w2_42", s = {
1
+ import '../../../../assets/src/components/Ui/Tooltip/Tooltip.stories.module.css';const i = "_container_x4z3a_1", o = "_trigger_x4z3a_27", t = "_clickTrigger_x4z3a_57 _trigger_x4z3a_27", n = "_positionsContainer_x4z3a_75", r = "_positionGroup_x4z3a_83", s = {
2
2
  container: i,
3
3
  trigger: o,
4
4
  clickTrigger: t,