@reportportal/ui-kit 0.0.1-alpha.3 → 0.0.1-alpha.31

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.
Files changed (113) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +229 -3
  3. package/dist/baseIconButton-b6adc843.js +25 -0
  4. package/dist/baseIconButton.js +7 -0
  5. package/dist/bind-06a7ff84.js +41 -0
  6. package/dist/bubblesLoader-a7e709d4.js +17 -0
  7. package/dist/bubblesLoader.js +7 -0
  8. package/dist/button-33c88abf.js +62 -0
  9. package/dist/button.js +2 -2
  10. package/dist/checkbox-9a6c7ce1.js +73 -0
  11. package/dist/checkbox.js +3 -3
  12. package/dist/common/constants/keyCodes.d.ts +24 -0
  13. package/dist/components/bubblesLoader/bubblesLoader.d.ts +7 -0
  14. package/dist/components/bubblesLoader/index.d.ts +3 -0
  15. package/dist/components/button/button.d.ts +2 -3
  16. package/dist/components/button/index.d.ts +2 -2
  17. package/dist/components/checkbox/checkbox.d.ts +2 -1
  18. package/dist/components/datePicker/datePicker.d.ts +24 -0
  19. package/dist/components/datePicker/header/datePickerHeader.d.ts +15 -0
  20. package/dist/components/datePicker/header/index.d.ts +3 -0
  21. package/dist/components/datePicker/index.d.ts +3 -0
  22. package/dist/components/datePicker/utils.d.ts +3 -0
  23. package/dist/components/dropdown/constants.d.ts +7 -0
  24. package/dist/components/dropdown/dropdown.d.ts +24 -0
  25. package/dist/components/dropdown/dropdownOption/dropdownOption.d.ts +3 -0
  26. package/dist/components/dropdown/dropdownOption/index.d.ts +3 -0
  27. package/dist/components/dropdown/index.d.ts +3 -0
  28. package/dist/components/dropdown/types.d.ts +20 -0
  29. package/dist/components/dropdown/utils.d.ts +4 -0
  30. package/dist/components/fieldNumber/constants.d.ts +4 -0
  31. package/dist/components/fieldNumber/fieldNumber.d.ts +18 -0
  32. package/dist/components/fieldNumber/index.d.ts +3 -0
  33. package/dist/components/fieldText/fieldText.d.ts +8 -3
  34. package/dist/components/fieldTextFlex/fieldTextFlex.d.ts +14 -0
  35. package/dist/components/fieldTextFlex/index.d.ts +3 -0
  36. package/dist/components/icons/baseIconButton/baseIconButton.d.ts +8 -0
  37. package/dist/components/icons/baseIconButton/index.d.ts +4 -0
  38. package/dist/components/icons/index.d.ts +15 -0
  39. package/dist/components/index.d.ts +13 -0
  40. package/dist/components/modal/modal.d.ts +6 -2
  41. package/dist/components/modal/modalContent/modalContent.d.ts +1 -0
  42. package/dist/components/modal/modalHeader/modalHeader.d.ts +1 -1
  43. package/dist/components/pagination/index.d.ts +4 -0
  44. package/dist/components/pagination/itemsCounter/index.d.ts +1 -0
  45. package/dist/components/pagination/itemsCounter/itemCounter.d.ts +9 -0
  46. package/dist/components/pagination/pageControls/activePage/activePage.d.ts +12 -0
  47. package/dist/components/pagination/pageControls/activePage/index.d.ts +1 -0
  48. package/dist/components/pagination/pageControls/activePage/pageSelector/index.d.ts +1 -0
  49. package/dist/components/pagination/pageControls/activePage/pageSelector/pageSelector.d.ts +10 -0
  50. package/dist/components/pagination/pageControls/index.d.ts +1 -0
  51. package/dist/components/pagination/pageControls/pageControls.d.ts +16 -0
  52. package/dist/components/pagination/pageControls/pageNavigator/bar/bar.d.ts +11 -0
  53. package/dist/components/pagination/pageControls/pageNavigator/bar/index.d.ts +1 -0
  54. package/dist/components/pagination/pageControls/pageNavigator/index.d.ts +1 -0
  55. package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +11 -0
  56. package/dist/components/pagination/pageSizeControl/index.d.ts +1 -0
  57. package/dist/components/pagination/pageSizeControl/pageSizeControl.d.ts +10 -0
  58. package/dist/components/pagination/pageSizeControl/sizeSelector/index.d.ts +1 -0
  59. package/dist/components/pagination/pageSizeControl/sizeSelector/sizeSelector.d.ts +8 -0
  60. package/dist/components/pagination/pagination.d.ts +22 -0
  61. package/dist/components/pagination/types.d.ts +2 -0
  62. package/dist/components/popover/index.d.ts +1 -0
  63. package/dist/components/popover/popover.d.ts +18 -0
  64. package/dist/components/radio/index.d.ts +4 -0
  65. package/dist/components/radio/radio.d.ts +16 -0
  66. package/dist/components/radio/radioGroup.d.ts +8 -0
  67. package/dist/components/spinLoader/index.d.ts +3 -0
  68. package/dist/components/spinLoader/spinLoader.d.ts +7 -0
  69. package/dist/components/table/index.d.ts +3 -0
  70. package/dist/components/table/table.d.ts +3 -0
  71. package/dist/components/table/types.d.ts +49 -0
  72. package/dist/components/table/utils.d.ts +3 -0
  73. package/dist/components/themeProvider/themeProvider.d.ts +2 -1
  74. package/dist/components/toggle/index.d.ts +3 -0
  75. package/dist/components/toggle/toggle.d.ts +11 -0
  76. package/dist/components/tooltip/index.d.ts +1 -0
  77. package/dist/components/tooltip/tooltip.d.ts +19 -0
  78. package/dist/dropdown-c21b0d67.js +216 -0
  79. package/dist/dropdown.js +14 -0
  80. package/dist/fieldNumber-1f286b40.js +127 -0
  81. package/dist/fieldNumber.js +10 -0
  82. package/dist/fieldText-14bf032f.js +133 -0
  83. package/dist/fieldText.js +3 -2
  84. package/dist/fieldTextFlex-5bddf46a.js +67 -0
  85. package/dist/fieldTextFlex.js +8 -0
  86. package/dist/index-54e3bfc2.js +147 -0
  87. package/dist/index.js +245 -16
  88. package/dist/keyCodes-f63c0e11.js +4 -0
  89. package/dist/modal.js +14 -135
  90. package/dist/pagination-ac3ea7c4.js +346 -0
  91. package/dist/pagination.js +14 -0
  92. package/dist/popover.js +95 -0
  93. package/dist/radio-bccc84f2.js +76 -0
  94. package/dist/radio.js +9 -0
  95. package/dist/style.css +1 -1
  96. package/dist/systemMessage-1ced6079.js +30 -0
  97. package/dist/systemMessage.js +2 -2
  98. package/dist/table-cb8f9516.js +147 -0
  99. package/dist/table.js +11 -0
  100. package/dist/themeProvider-46c2be7b.js +23 -0
  101. package/dist/themeProvider.js +4 -3
  102. package/dist/toggle-4cdbcc42.js +59 -0
  103. package/dist/toggle.js +9 -0
  104. package/dist/tooltip.js +96 -0
  105. package/dist/useOnClickOutside-c332f7d3.js +16 -0
  106. package/package.json +96 -66
  107. package/dist/button-15f7c4a6.js +0 -64
  108. package/dist/checkbox-e6a5c84a.js +0 -70
  109. package/dist/common/constants/key-codes.d.ts +0 -5
  110. package/dist/fieldText-dc43f641.js +0 -99
  111. package/dist/key-codes-abbe7725.js +0 -4
  112. package/dist/systemMessage-dd6e4795.js +0 -30
  113. package/dist/themeProvider-5800417e.js +0 -19
package/dist/index.js CHANGED
@@ -1,20 +1,249 @@
1
- import { B as x } from "./button-15f7c4a6.js";
2
- import { C as f } from "./checkbox-e6a5c84a.js";
3
- import { S as T } from "./systemMessage-dd6e4795.js";
4
- import { F as l } from "./fieldText-dc43f641.js";
5
- import { T as C } from "./themeProvider-5800417e.js";
6
- import { Modal as M } from "./modal.js";
7
- import "react/jsx-runtime";
8
- import "react";
9
- import "classnames/bind";
10
- import "./key-codes-abbe7725.js";
1
+ import { B as v1 } from "./button-33c88abf.js";
2
+ import { C as L1 } from "./checkbox-9a6c7ce1.js";
3
+ import { S as M1 } from "./systemMessage-1ced6079.js";
4
+ import { F as Z } from "./fieldText-14bf032f.js";
5
+ import { a as S1, S as y1 } from "./fieldText-14bf032f.js";
6
+ import { T as N1 } from "./themeProvider-46c2be7b.js";
7
+ import { S as F1, M as R1 } from "./index-54e3bfc2.js";
8
+ import { D as j } from "./dropdown-c21b0d67.js";
9
+ import { S as P1 } from "./dropdown-c21b0d67.js";
10
+ import { T as k1 } from "./toggle-4cdbcc42.js";
11
+ import { F as D1, a as V1, S as U1 } from "./fieldNumber-1f286b40.js";
12
+ import { B as $1 } from "./bubblesLoader-a7e709d4.js";
13
+ import { F as O1 } from "./fieldTextFlex-5bddf46a.js";
14
+ import { R as q1 } from "./radio-bccc84f2.js";
15
+ import { Tooltip as J1 } from "./tooltip.js";
16
+ import { Popover as Q1 } from "./popover.js";
17
+ import { P as ee, a as te, S as oe } from "./pagination-ac3ea7c4.js";
18
+ import { S as ne, a as ae, T as le } from "./table-cb8f9516.js";
19
+ import { jsxs as S, Fragment as D, jsx as n } from "react/jsx-runtime";
20
+ import V from "react-datepicker";
21
+ import { c as P } from "./bind-06a7ff84.js";
22
+ import * as e from "react";
23
+ import { useMemo as F, useRef as U } from "react";
24
+ import { B as ce } from "./baseIconButton-b6adc843.js";
25
+ import "./keyCodes-f63c0e11.js";
11
26
  import "rc-scrollbars";
12
27
  import "framer-motion";
28
+ import "./useOnClickOutside-c332f7d3.js";
29
+ import "@floating-ui/react-dom";
30
+ import "downshift";
31
+ import "@floating-ui/react";
32
+ const u1 = (t) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { d: "M9.80051 6.3661C9.95672 6.20989 10.21 6.20989 10.3662 6.3661L10.6338 6.63375C10.7901 6.78996 10.7901 7.04323 10.6338 7.19944L8.83331 8.99996L10.6338 10.8005C10.79 10.9567 10.79 11.2099 10.6338 11.3662L10.3662 11.6338C10.21 11.79 9.95669 11.79 9.80048 11.6338L7.99998 9.8333L6.19953 11.6338C6.04332 11.79 5.79005 11.79 5.63384 11.6338L5.36619 11.3661C5.20998 11.2099 5.20998 10.9566 5.36619 10.8004L7.16665 8.99996L5.36617 7.19949C5.20996 7.04328 5.20996 6.79001 5.36617 6.6338L5.63382 6.36615C5.79003 6.20994 6.04329 6.20994 6.1995 6.36615L7.99998 8.16663L9.80051 6.3661Z", fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.99878 3V2C4.99878 1.44772 5.44649 1 5.99878 1H9.99878C10.5511 1 10.9988 1.44772 10.9988 2V3H14.5C14.7761 3 15 3.22386 15 3.5C15 3.77614 14.7761 4 14.5 4H13.4167L12.6146 13.6246C12.5498 14.402 11.8999 15 11.1198 15H4.8802C4.10007 15 3.45017 14.402 3.38538 13.6246L2.58333 4H1.5C1.22386 4 1 3.77614 1 3.5C1 3.22386 1.22386 3 1.5 3H4.99878ZM5.99878 2H9.99878V3H5.99878V2ZM3.5868 4L4.38193 13.5415C4.40352 13.8007 4.62016 14 4.8802 14H11.1198C11.3798 14 11.5965 13.8007 11.6181 13.5415L12.4132 4H3.5868Z", fill: "#A2AAB5" })), w1 = (t) => /* @__PURE__ */ e.createElement("svg", { width: 14, height: 3, viewBox: "0 0 14 3", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.30811 2.47803C1.72868 2.47803 2.05339 2.36206 2.28223 2.13013C2.51107 1.89819 2.62549 1.60596 2.62549 1.25342C2.62549 0.894694 2.51107 0.596273 2.28223 0.358154C2.05339 0.120036 1.72868 0.000976562 1.30811 0.000976562C0.893717 0.000976562 0.572103 0.120036 0.343262 0.358154C0.114421 0.596273 0 0.894694 0 1.25342C0 1.61214 0.117513 1.90592 0.352539 2.13477C0.587565 2.36361 0.906087 2.47803 1.30811 2.47803ZM6.61475 2.47803C7.03532 2.47803 7.36003 2.36206 7.58887 2.13013C7.81771 1.89819 7.93213 1.60596 7.93213 1.25342C7.93213 0.894694 7.81771 0.596273 7.58887 0.358154C7.36003 0.120036 7.03532 0.000976562 6.61475 0.000976562C6.20036 0.000976562 5.87874 0.120036 5.6499 0.358154C5.42106 0.596273 5.30664 0.894694 5.30664 1.25342C5.30664 1.61214 5.42415 1.90592 5.65918 2.13477C5.89421 2.36361 6.21273 2.47803 6.61475 2.47803ZM12.8955 2.13013C12.6667 2.36206 12.342 2.47803 11.9214 2.47803C11.5194 2.47803 11.2008 2.36361 10.9658 2.13477C10.7308 1.90592 10.6133 1.61214 10.6133 1.25342C10.6133 0.894694 10.7277 0.596273 10.9565 0.358154C11.1854 0.120036 11.507 0.000976562 11.9214 0.000976562C12.342 0.000976562 12.6667 0.120036 12.8955 0.358154C13.1243 0.596273 13.2388 0.894694 13.2388 1.25342C13.2388 1.60596 13.1243 1.89819 12.8955 2.13013Z", fill: "#A2AAB5" })), R = (t) => /* @__PURE__ */ e.createElement("svg", { width: 8, height: 13, viewBox: "0 0 8 13", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.54134 12.2173C6.69755 12.3735 6.95081 12.3735 7.10702 12.2173L7.24844 12.0759C7.40465 11.9197 7.40465 11.6664 7.24844 11.5102L1.90539 6.16715L7.24844 0.824097C7.40465 0.667887 7.40465 0.41462 7.24844 0.258411L7.10702 0.116989C6.95081 -0.0392199 6.69755 -0.0392199 6.54134 0.116989L0.998591 5.65973L0.999562 5.6607L0.767094 5.89317C0.610884 6.04938 0.610884 6.30265 0.767093 6.45886L1.48425 7.17602L1.49215 7.16813L6.54134 12.2173Z", fill: "#C1C7D0" })), Y = (t) => /* @__PURE__ */ e.createElement("svg", { width: 14, height: 15, viewBox: "0 0 14 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("rect", { x: 0.5, y: 1.5, width: 13, height: 13, rx: 1.5, stroke: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 9, width: 1, height: 3.00067, rx: 0.5, fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 4, width: 1, height: 3.00067, rx: 0.5, fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 14, y: 4, width: 1, height: 14, transform: "rotate(90 14 4)", fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 3, y: 10, width: 2, height: 2, fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 6, y: 10, width: 2, height: 2, fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 6, y: 7, width: 2, height: 2, fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 3, y: 7, width: 2, height: 2, fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("rect", { x: 9, y: 7, width: 2, height: 2, fill: "#A2AAB5" })), f1 = (t) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13 7C13 8.47663 12.4666 9.82867 11.5819 10.874L12.3288 11.6208C12.663 11.5307 13.0348 11.6168 13.2971 11.8792L14.7113 13.2934C15.1019 13.6839 15.1019 14.3171 14.7113 14.7076C14.3208 15.0981 13.6877 15.0981 13.2971 14.7076L11.8829 13.2934C11.622 13.0325 11.5354 12.6632 11.6231 12.3304L10.8743 11.5816C9.829 12.4665 8.47681 13 7 13C3.68629 13 1 10.3137 1 7C1 3.68629 3.68629 1 7 1C10.3137 1 13 3.68629 13 7ZM2.00071 7C2.00071 9.76103 4.23897 11.9993 7 11.9993C9.76103 11.9993 11.9993 9.76103 11.9993 7C11.9993 4.23897 9.76103 2.00071 7 2.00071C4.23897 2.00071 2.00071 4.23897 2.00071 7Z", fill: "#CFCFCF" })), $ = (t, c = 20) => {
33
+ const i = t + c;
34
+ return new Array(i - t).fill(void 0).map((u, o) => t - o);
35
+ }, G = "_header_a3cjx_1", O = "_disabled_a3cjx_25", W = "_dropdown_a3cjx_8", q = {
36
+ header: G,
37
+ "dropdowns-wrapper": "_dropdowns-wrapper_a3cjx_8",
38
+ "button-prev": "_button-prev_a3cjx_13",
39
+ "button-next": "_button-next_a3cjx_14",
40
+ disabled: O,
41
+ dropdown: W,
42
+ "month-dropdown": "_month-dropdown_a3cjx_44",
43
+ "toggle-button": "_toggle-button_a3cjx_47"
44
+ }, l = P.bind(q), z = ({
45
+ date: t = /* @__PURE__ */ new Date(),
46
+ changeYear: c = () => {
47
+ },
48
+ changeMonth: i = () => {
49
+ },
50
+ decreaseMonth: u = () => {
51
+ },
52
+ increaseMonth: o = () => {
53
+ },
54
+ prevMonthButtonDisabled: r = !1,
55
+ nextMonthButtonDisabled: w = !1,
56
+ headerNodes: f = null,
57
+ customClassName: x = "",
58
+ yearsOptions: m = [],
59
+ locale: v
60
+ }) => {
61
+ const p = t.getFullYear(), b = t.getMonth(), _ = F(() => {
62
+ const a = Array(12).keys(), s = new Intl.DateTimeFormat(v, {
63
+ month: "long"
64
+ }), d = (C) => s.format(new Date(p, C));
65
+ return Array.from(a, d).reduce((C, A, E) => C.concat({
66
+ value: E,
67
+ label: A
68
+ }), []);
69
+ }, []), L = F(() => (m.length > 0 ? m : $(p)).reduce(
70
+ (s, d) => s.concat({ value: d, label: `${d}` }),
71
+ []
72
+ ), [m]), B = (a) => {
73
+ i(a);
74
+ }, M = (a) => {
75
+ c(a);
76
+ };
77
+ return /* @__PURE__ */ S(D, { children: [
78
+ f && /* @__PURE__ */ n("div", { className: l(x), children: f }),
79
+ /* @__PURE__ */ S("div", { className: l("header"), children: [
80
+ /* @__PURE__ */ n(
81
+ "button",
82
+ {
83
+ "aria-label": "Previous Months",
84
+ disabled: r,
85
+ onClick: u,
86
+ className: l("button-prev", { disabled: r }),
87
+ children: /* @__PURE__ */ n(R, {})
88
+ }
89
+ ),
90
+ /* @__PURE__ */ S("div", { className: l("dropdowns-wrapper"), children: [
91
+ /* @__PURE__ */ n(
92
+ j,
93
+ {
94
+ options: _,
95
+ value: b,
96
+ onChange: B,
97
+ transparentBackground: !0,
98
+ className: l("dropdown", "month-dropdown"),
99
+ toggleButtonClassName: l("toggle-button")
100
+ }
101
+ ),
102
+ /* @__PURE__ */ n(
103
+ j,
104
+ {
105
+ options: L,
106
+ value: p,
107
+ onChange: M,
108
+ transparentBackground: !0,
109
+ className: l("dropdown"),
110
+ toggleButtonClassName: l("toggle-button")
111
+ }
112
+ )
113
+ ] }),
114
+ /* @__PURE__ */ n(
115
+ "button",
116
+ {
117
+ "aria-label": "Next Months",
118
+ disabled: w,
119
+ onClick: o,
120
+ className: l("button-next", { disabled: w }),
121
+ children: /* @__PURE__ */ n(R, {})
122
+ }
123
+ )
124
+ ] })
125
+ ] });
126
+ }, J = "_calendar_1jr94_5", K = "_date_1jr94_90", Q = "_disabled_1jr94_202", X = "_popper_1jr94_210", e1 = "_input_1jr94_214", t1 = {
127
+ calendar: J,
128
+ "current-date": "_current-date_1jr94_89",
129
+ date: K,
130
+ "selected-range": "_selected-range_1jr94_119",
131
+ "end-date": "_end-date_1jr94_119",
132
+ disabled: Q,
133
+ popper: X,
134
+ input: e1
135
+ }, g = P.bind(t1), o1 = "en", T = "MM-dd-yyyy", x1 = ({
136
+ onChange: t = () => {
137
+ },
138
+ disabled: c = !1,
139
+ onBlur: i = () => {
140
+ },
141
+ onFocus: u = () => {
142
+ },
143
+ endDate: o = void 0,
144
+ startDate: r = void 0,
145
+ headerNodes: w = null,
146
+ customClassName: f = "",
147
+ customTimeInput: x = void 0,
148
+ shouldCloseOnSelect: m = !0,
149
+ popperClassName: v = "",
150
+ calendarClassName: p = "",
151
+ fixedHeight: b = !1,
152
+ language: _ = o1,
153
+ yearsOptions: L = [],
154
+ placeholder: B = T.toUpperCase(),
155
+ dateFormat: M = T,
156
+ selects: a = "start",
157
+ value: s = null
158
+ }) => {
159
+ const d = U(null), y = r == null ? void 0 : r.toDateString(), C = o == null ? void 0 : o.toDateString(), A = o && r && o > r, E = (h) => {
160
+ const I = h.toDateString(), H = I === y, N = A && I === C, k = r && o && h > r && h < o;
161
+ return g("date", {
162
+ "current-date": H,
163
+ "selected-range": k && !N,
164
+ "end-date": N && A,
165
+ disabled: c
166
+ });
167
+ };
168
+ return /* @__PURE__ */ n(
169
+ V,
170
+ {
171
+ customInput: /* @__PURE__ */ n(
172
+ Z,
173
+ {
174
+ className: g("input"),
175
+ defaultWidth: !1,
176
+ endIcon: /* @__PURE__ */ n(Y, {}),
177
+ ref: d
178
+ }
179
+ ),
180
+ placeholderText: B,
181
+ selected: s,
182
+ startDate: r,
183
+ endDate: o,
184
+ minDate: a === "end" ? r : void 0,
185
+ disabled: c,
186
+ shouldCloseOnSelect: m,
187
+ fixedHeight: b,
188
+ locale: _,
189
+ showPopperArrow: !1,
190
+ dayClassName: E,
191
+ calendarClassName: g(p, "calendar"),
192
+ renderCustomHeader: (h) => /* @__PURE__ */ n(
193
+ z,
194
+ {
195
+ ...h,
196
+ headerNodes: w,
197
+ customClassName: f,
198
+ yearsOptions: L,
199
+ locale: _
200
+ }
201
+ ),
202
+ onChange: t,
203
+ onBlur: i,
204
+ onFocus: u,
205
+ customTimeInput: x,
206
+ showTimeInput: !!x,
207
+ popperClassName: g(v, "popper"),
208
+ dateFormat: M,
209
+ selectsStart: a === "start",
210
+ selectsEnd: a === "end",
211
+ className: g("datepicker")
212
+ }
213
+ );
214
+ };
13
215
  export {
14
- x as Button,
15
- f as Checkbox,
16
- l as FieldText,
17
- M as Modal,
18
- T as SystemMessage,
19
- C as ThemeProvider
216
+ ne as ArrowDownIcon,
217
+ ae as ArrowUpIcon,
218
+ ce as BaseIconButton,
219
+ $1 as BubblesLoader,
220
+ v1 as Button,
221
+ R as CalendarArrowIcon,
222
+ Y as CalendarIcon,
223
+ L1 as Checkbox,
224
+ S1 as ClearIcon,
225
+ F1 as CloseIcon,
226
+ x1 as DatePicker,
227
+ u1 as DeleteIcon,
228
+ j as Dropdown,
229
+ P1 as DropdownIcon,
230
+ D1 as FieldNumber,
231
+ Z as FieldText,
232
+ O1 as FieldTextFlex,
233
+ w1 as MeatballMenuIcon,
234
+ V1 as MinusIcon,
235
+ R1 as Modal,
236
+ ee as Pagination,
237
+ U1 as PlusIcon,
238
+ Q1 as Popover,
239
+ te as PrevChapterIcon,
240
+ oe as PrevPageIcon,
241
+ q1 as Radio,
242
+ f1 as SearchIcon,
243
+ y1 as SpinLoader,
244
+ M1 as SystemMessage,
245
+ le as Table,
246
+ N1 as ThemeProvider,
247
+ k1 as Toggle,
248
+ J1 as Tooltip
20
249
  };
@@ -0,0 +1,4 @@
1
+ var E = /* @__PURE__ */ ((_) => (_[_.BACKSPACE_KEY_CODE = 8] = "BACKSPACE_KEY_CODE", _[_.TAB_KEY_CODE = 9] = "TAB_KEY_CODE", _[_.ENTER_KEY_CODE = 13] = "ENTER_KEY_CODE", _[_.ESCAPE_KEY_CODE = 27] = "ESCAPE_KEY_CODE", _[_.SPACE_KEY_CODE = 32] = "SPACE_KEY_CODE", _[_.ARROW_LEFT_KEY_CODE = 37] = "ARROW_LEFT_KEY_CODE", _[_.ARROW_UP_KEY_CODE = 38] = "ARROW_UP_KEY_CODE", _[_.ARROW_RIGHT_KEY_CODE = 39] = "ARROW_RIGHT_KEY_CODE", _[_.ARROW_DOWN_KEY_CODE = 40] = "ARROW_DOWN_KEY_CODE", _[_.DELETE_KEY_CODE = 46] = "DELETE_KEY_CODE", _[_.NUMBER_START_KEY_CODE = 48] = "NUMBER_START_KEY_CODE", _[_.NUMBER_END_KEY_CODE = 57] = "NUMBER_END_KEY_CODE", _[_.NUM_LOCK_0_KEY_CODE = 96] = "NUM_LOCK_0_KEY_CODE", _[_.NUM_LOCK_1_KEY_CODE = 97] = "NUM_LOCK_1_KEY_CODE", _[_.NUM_LOCK_2_KEY_CODE = 98] = "NUM_LOCK_2_KEY_CODE", _[_.NUM_LOCK_3_KEY_CODE = 99] = "NUM_LOCK_3_KEY_CODE", _[_.NUM_LOCK_4_KEY_CODE = 100] = "NUM_LOCK_4_KEY_CODE", _[_.NUM_LOCK_5_KEY_CODE = 101] = "NUM_LOCK_5_KEY_CODE", _[_.NUM_LOCK_6_KEY_CODE = 102] = "NUM_LOCK_6_KEY_CODE", _[_.NUM_LOCK_7_KEY_CODE = 103] = "NUM_LOCK_7_KEY_CODE", _[_.NUM_LOCK_8_KEY_CODE = 104] = "NUM_LOCK_8_KEY_CODE", _[_.NUM_LOCK_9_KEY_CODE = 105] = "NUM_LOCK_9_KEY_CODE", _))(E || {});
2
+ export {
3
+ E as K
4
+ };
package/dist/modal.js CHANGED
@@ -1,137 +1,16 @@
1
- import { jsx as o, jsxs as l } from "react/jsx-runtime";
2
- import * as z from "react";
3
- import { useEffect as m, useState as g, useRef as $ } from "react";
4
- import { Scrollbars as A } from "rc-scrollbars";
5
- import { AnimatePresence as T, motion as D } from "framer-motion";
6
- import _ from "classnames/bind";
7
- import { K as W } from "./key-codes-abbe7725.js";
8
- import { B as x } from "./button-15f7c4a6.js";
9
- function j(e, n) {
10
- m(() => {
11
- if (!n)
12
- return;
13
- const t = (a) => {
14
- e && e.current && !e.current.contains(a.target) && n(a);
15
- };
16
- return document.addEventListener("pointerdown", t), () => {
17
- document.removeEventListener("pointerdown", t);
18
- };
19
- }, [e, n]);
20
- }
21
- const K = () => {
22
- const [e, n] = g({ width: 0, height: 0 });
23
- return m(() => {
24
- const t = () => {
25
- n({
26
- width: window.innerWidth,
27
- height: window.innerHeight
28
- });
29
- };
30
- return window.addEventListener("resize", t), t(), () => window.removeEventListener("resize", t);
31
- }, []), e;
32
- }, I = {
33
- "modal-content": "_modal-content_xak18_1"
34
- }, F = _.bind(I), P = ({ children: e }) => /* @__PURE__ */ o("div", { className: F("modal-content"), children: e }), B = {
35
- "buttons-block": "_buttons-block_1dgm4_1",
36
- "button-container": "_button-container_1dgm4_5",
37
- "modal-footer": "_modal-footer_1dgm4_14",
38
- "with-extra-node": "_with-extra-node_1dgm4_21",
39
- "size-small": "_size-small_1dgm4_25"
40
- }, c = _.bind(B), G = ({
41
- footerNode: e,
42
- closeHandler: n,
43
- okButton: t,
44
- cancelButton: a,
45
- size: s
46
- }) => /* @__PURE__ */ l("div", { className: c("modal-footer", { "with-extra-node": e, [`size-${s}`]: s }), children: [
47
- e && e,
48
- /* @__PURE__ */ l("div", { className: c("buttons-block"), children: [
49
- a && /* @__PURE__ */ o("div", { className: c("button-container"), children: /* @__PURE__ */ o(
50
- x,
51
- {
52
- variant: "ghost",
53
- adjustWidthOn: s === "small" ? "parent" : "content",
54
- onClick: n,
55
- ...a
56
- }
57
- ) }),
58
- t && /* @__PURE__ */ o("div", { className: c("button-container"), children: /* @__PURE__ */ o(x, { adjustWidthOn: s === "small" ? "parent" : "content", ...t }) })
59
- ] })
60
- ] }), X = (e) => /* @__PURE__ */ z.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "#C1C7D0", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ z.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.732184 15.2698C0.330645 14.8683 0.330646 14.2172 0.732185 13.8157L6.54859 7.99928L0.732185 2.18288C0.330646 1.78134 0.330645 1.13031 0.732184 0.728774C1.13372 0.327234 1.78475 0.327234 2.18629 0.728774L8.00269 6.54518L13.8191 0.728767C14.2206 0.327228 14.8717 0.327227 15.2732 0.728767C15.6747 1.13031 15.6747 1.78133 15.2732 2.18287L9.45679 7.99928L15.2732 13.8157C15.6747 14.2172 15.6747 14.8683 15.2732 15.2698C14.8717 15.6713 14.2206 15.6713 13.8191 15.2698L8.00269 9.45338L2.18629 15.2698C1.78475 15.6713 1.13372 15.6713 0.732184 15.2698Z" })), Y = {
61
- "modal-header": "_modal-header_12y1g_1",
62
- "modal-header-content": "_modal-header-content_12y1g_11",
63
- "modal-title": "_modal-title_12y1g_20",
64
- "close-modal-icon": "_close-modal-icon_12y1g_28"
65
- }, r = _.bind(Y), Z = ({ title: e, onClose: n, headerNode: t }) => /* @__PURE__ */ l("div", { className: r("modal-header"), children: [
66
- /* @__PURE__ */ l("div", { className: r("modal-header-content"), children: [
67
- e && /* @__PURE__ */ o("span", { className: r("modal-title"), children: e }),
68
- t && t
69
- ] }),
70
- /* @__PURE__ */ o("span", { className: r("close-modal-icon"), onClick: n, children: /* @__PURE__ */ o(X, {}) })
71
- ] }), q = "_modal_10zov_1", J = {
72
- modal: q,
73
- "overlay-default": "_overlay-default_10zov_11",
74
- "overlay-light-cyan": "_overlay-light-cyan_10zov_16",
75
- "scrolling-content": "_scrolling-content_10zov_21",
76
- "modal-window": "_modal-window_10zov_28",
77
- "size-default": "_size-default_10zov_45",
78
- "size-small": "_size-small_10zov_57",
79
- "size-large": "_size-large_10zov_69"
80
- }, E = _.bind(J), Q = 0.9, U = 176, se = ({
81
- title: e,
82
- headerNode: n,
83
- children: t,
84
- footerNode: a,
85
- okButton: s,
86
- cancelButton: b,
87
- className: L,
88
- size: h = "default",
89
- onClose: H = () => {
90
- },
91
- overlay: v = "default",
92
- allowCloseOutside: M = !0
93
- }) => {
94
- const [N, f] = g(!1), [k, O] = g(0), i = $(null), p = K(), y = p.height, R = y * Q, u = (y - k) / 2, S = R - U, d = () => {
95
- f(!1);
96
- }, C = (w) => {
97
- w.keyCode === W.ESCAPE_KEY_CODE && d();
98
- };
99
- return m(() => {
100
- if (i && i.current) {
101
- const { clientHeight: w } = i.current;
102
- O(w);
103
- }
104
- }, [t, p]), m(() => (f(!0), i && i.current && i.current.focus(), document.addEventListener("keydown", C, !1), () => document.removeEventListener("keydown", C, !1)), []), j(i, M ? d : void 0), /* @__PURE__ */ o(T, { onExitComplete: H, children: N && /* @__PURE__ */ o("div", { className: E("modal", { [`overlay-${v}`]: v }), children: /* @__PURE__ */ l(
105
- D.div,
106
- {
107
- className: E("modal-window", { [`size-${h}`]: h }, L),
108
- ref: i,
109
- tabIndex: 0,
110
- initial: { opacity: 0, marginTop: -u },
111
- animate: { opacity: 1, marginTop: u },
112
- exit: { opacity: 0, marginTop: -u },
113
- transition: { duration: 0.3 },
114
- children: [
115
- /* @__PURE__ */ o(Z, { title: e, headerNode: n, onClose: d }),
116
- /* @__PURE__ */ o(A, { autoHeight: !0, autoHeightMax: S, hideTracksWhenNotNeeded: !0, children: /* @__PURE__ */ o(P, { children: t }) }),
117
- /* @__PURE__ */ o(
118
- G,
119
- {
120
- size: h,
121
- footerNode: a,
122
- okButton: s,
123
- cancelButton: b,
124
- closeHandler: d
125
- }
126
- )
127
- ]
128
- },
129
- "modal-window"
130
- ) }) });
131
- };
1
+ import { M as s, a as n, c as b, b as c } from "./index-54e3bfc2.js";
2
+ import "react/jsx-runtime";
3
+ import "react";
4
+ import "rc-scrollbars";
5
+ import "framer-motion";
6
+ import "./bind-06a7ff84.js";
7
+ import "./useOnClickOutside-c332f7d3.js";
8
+ import "./keyCodes-f63c0e11.js";
9
+ import "./button-33c88abf.js";
10
+ import "./baseIconButton-b6adc843.js";
132
11
  export {
133
- se as Modal,
134
- P as ModalContent,
135
- G as ModalFooter,
136
- Z as ModalHeader
12
+ s as Modal,
13
+ n as ModalContent,
14
+ b as ModalFooter,
15
+ c as ModalHeader
137
16
  };