@reportportal/ui-kit 0.0.1-alpha.2 → 0.0.1-alpha.20

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 (119) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +229 -3
  3. package/dist/baseIconButton-7bc53dec.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-bb309472.js +62 -0
  9. package/dist/button.js +2 -2
  10. package/dist/checkbox-6777be17.js +73 -0
  11. package/dist/checkbox.js +3 -2
  12. package/dist/common/constants/keyCodes.d.ts +24 -0
  13. package/dist/common/hooks/index.d.ts +2 -0
  14. package/dist/common/hooks/useOnClickOutside.d.ts +2 -0
  15. package/dist/common/hooks/useWindowResize.d.ts +4 -0
  16. package/dist/components/bubblesLoader/bubblesLoader.d.ts +7 -0
  17. package/dist/components/bubblesLoader/index.d.ts +3 -0
  18. package/dist/components/button/button.d.ts +6 -7
  19. package/dist/components/button/index.d.ts +2 -1
  20. package/dist/components/checkbox/checkbox.d.ts +5 -7
  21. package/dist/components/datePicker/datePicker.d.ts +24 -0
  22. package/dist/components/datePicker/header/datePickerHeader.d.ts +15 -0
  23. package/dist/components/datePicker/header/index.d.ts +3 -0
  24. package/dist/components/datePicker/index.d.ts +3 -0
  25. package/dist/components/datePicker/utils.d.ts +3 -0
  26. package/dist/components/dropdown/constants.d.ts +7 -0
  27. package/dist/components/dropdown/dropdown.d.ts +24 -0
  28. package/dist/components/dropdown/dropdownOption/dropdownOption.d.ts +3 -0
  29. package/dist/components/dropdown/dropdownOption/index.d.ts +3 -0
  30. package/dist/components/dropdown/index.d.ts +3 -0
  31. package/dist/components/dropdown/types.d.ts +20 -0
  32. package/dist/components/dropdown/utils.d.ts +4 -0
  33. package/dist/components/fieldNumber/constants.d.ts +4 -0
  34. package/dist/components/fieldNumber/fieldNumber.d.ts +18 -0
  35. package/dist/components/fieldNumber/index.d.ts +3 -0
  36. package/dist/components/fieldText/fieldText.d.ts +24 -0
  37. package/dist/components/fieldText/index.d.ts +3 -0
  38. package/dist/components/fieldTextFlex/fieldTextFlex.d.ts +14 -0
  39. package/dist/components/fieldTextFlex/index.d.ts +3 -0
  40. package/dist/components/icons/baseIconButton/baseIconButton.d.ts +8 -0
  41. package/dist/components/icons/baseIconButton/index.d.ts +4 -0
  42. package/dist/components/icons/index.d.ts +15 -0
  43. package/dist/components/index.d.ts +14 -0
  44. package/dist/components/modal/index.d.ts +4 -0
  45. package/dist/components/modal/modal.d.ts +23 -0
  46. package/dist/components/modal/modalContent/index.d.ts +1 -0
  47. package/dist/components/modal/modalContent/modalContent.d.ts +7 -0
  48. package/dist/components/modal/modalFooter/index.d.ts +2 -0
  49. package/dist/components/modal/modalFooter/modalFooter.d.ts +12 -0
  50. package/dist/components/modal/modalHeader/index.d.ts +1 -0
  51. package/dist/components/modal/modalHeader/modalHeader.d.ts +8 -0
  52. package/dist/components/pagination/index.d.ts +4 -0
  53. package/dist/components/pagination/itemsCounter/index.d.ts +1 -0
  54. package/dist/components/pagination/itemsCounter/itemCounter.d.ts +9 -0
  55. package/dist/components/pagination/pageControls/activePage/activePage.d.ts +12 -0
  56. package/dist/components/pagination/pageControls/activePage/index.d.ts +1 -0
  57. package/dist/components/pagination/pageControls/activePage/pageSelector/index.d.ts +1 -0
  58. package/dist/components/pagination/pageControls/activePage/pageSelector/pageSelector.d.ts +10 -0
  59. package/dist/components/pagination/pageControls/index.d.ts +1 -0
  60. package/dist/components/pagination/pageControls/pageControls.d.ts +16 -0
  61. package/dist/components/pagination/pageControls/pageNavigator/bar/bar.d.ts +11 -0
  62. package/dist/components/pagination/pageControls/pageNavigator/bar/index.d.ts +1 -0
  63. package/dist/components/pagination/pageControls/pageNavigator/index.d.ts +1 -0
  64. package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +11 -0
  65. package/dist/components/pagination/pageSizeControl/index.d.ts +1 -0
  66. package/dist/components/pagination/pageSizeControl/pageSizeControl.d.ts +10 -0
  67. package/dist/components/pagination/pageSizeControl/sizeSelector/index.d.ts +1 -0
  68. package/dist/components/pagination/pageSizeControl/sizeSelector/sizeSelector.d.ts +8 -0
  69. package/dist/components/pagination/pagination.d.ts +22 -0
  70. package/dist/components/pagination/types.d.ts +2 -0
  71. package/dist/components/popover/index.d.ts +1 -0
  72. package/dist/components/popover/popover.d.ts +18 -0
  73. package/dist/components/radio/index.d.ts +4 -0
  74. package/dist/components/radio/radio.d.ts +16 -0
  75. package/dist/components/radio/radioGroup.d.ts +8 -0
  76. package/dist/components/table/index.d.ts +3 -0
  77. package/dist/components/table/table.d.ts +3 -0
  78. package/dist/components/table/types.d.ts +49 -0
  79. package/dist/components/table/utils.d.ts +3 -0
  80. package/dist/components/themeProvider/themeProvider.d.ts +2 -1
  81. package/dist/components/toggle/index.d.ts +3 -0
  82. package/dist/components/toggle/toggle.d.ts +11 -0
  83. package/dist/components/tooltip/index.d.ts +1 -0
  84. package/dist/components/tooltip/tooltip.d.ts +14 -0
  85. package/dist/dropdown-5d0eea6b.js +216 -0
  86. package/dist/dropdown.js +14 -0
  87. package/dist/fieldNumber-46fe79b9.js +127 -0
  88. package/dist/fieldNumber.js +10 -0
  89. package/dist/fieldText-98cf9984.js +102 -0
  90. package/dist/fieldText.js +9 -0
  91. package/dist/fieldTextFlex-5bddf46a.js +67 -0
  92. package/dist/fieldTextFlex.js +8 -0
  93. package/dist/index-bc6da711.js +147 -0
  94. package/dist/index.js +246 -11
  95. package/dist/keyCodes-f63c0e11.js +4 -0
  96. package/dist/modal.js +16 -0
  97. package/dist/pagination-13887e1c.js +346 -0
  98. package/dist/pagination.js +15 -0
  99. package/dist/popover.js +95 -0
  100. package/dist/radio-fd49a09c.js +76 -0
  101. package/dist/radio.js +9 -0
  102. package/dist/style.css +1 -1
  103. package/dist/systemMessage-1ced6079.js +30 -0
  104. package/dist/systemMessage.js +2 -2
  105. package/dist/table-4bc2c157.js +147 -0
  106. package/dist/table.js +11 -0
  107. package/dist/themeProvider-46c2be7b.js +23 -0
  108. package/dist/themeProvider.js +4 -3
  109. package/dist/toggle-9284387b.js +67 -0
  110. package/dist/toggle.js +9 -0
  111. package/dist/tooltip.js +71 -0
  112. package/dist/useOnClickOutside-c332f7d3.js +16 -0
  113. package/package.json +96 -64
  114. package/dist/bind-e1346f99.js +0 -44
  115. package/dist/button-a4d3df83.js +0 -1867
  116. package/dist/checkbox-3fd4bcc1.js +0 -74
  117. package/dist/constants/key-codes.d.ts +0 -4
  118. package/dist/systemMessage-55cf51f4.js +0 -30
  119. package/dist/themeProvider-5800417e.js +0 -19
package/dist/index.js CHANGED
@@ -1,13 +1,248 @@
1
- import { B as p } from "./button-a4d3df83.js";
2
- import { C as a } from "./checkbox-3fd4bcc1.js";
3
- import { S as f } from "./systemMessage-55cf51f4.js";
4
- import { T as h } from "./themeProvider-5800417e.js";
5
- import "react/jsx-runtime";
6
- import "react";
7
- import "./bind-e1346f99.js";
1
+ import { B as v1 } from "./button-bb309472.js";
2
+ import { C as L1 } from "./checkbox-6777be17.js";
3
+ import { S as M1 } from "./systemMessage-1ced6079.js";
4
+ import { F as Z } from "./fieldText-98cf9984.js";
5
+ import { S as S1 } from "./fieldText-98cf9984.js";
6
+ import { T as I1 } from "./themeProvider-46c2be7b.js";
7
+ import { S as j1, M as F1 } from "./index-bc6da711.js";
8
+ import { D as j } from "./dropdown-5d0eea6b.js";
9
+ import { S as T1 } from "./dropdown-5d0eea6b.js";
10
+ import { T as H1 } from "./toggle-9284387b.js";
11
+ import { F as Z1, a as D1, S as V1 } from "./fieldNumber-46fe79b9.js";
12
+ import { B as Y1 } from "./bubblesLoader-a7e709d4.js";
13
+ import { F as G1 } from "./fieldTextFlex-5bddf46a.js";
14
+ import { R as W1 } from "./radio-fd49a09c.js";
15
+ import { Tooltip as z1 } from "./tooltip.js";
16
+ import { Popover as K1 } from "./popover.js";
17
+ import { P as X1, a as ee, S as te } from "./pagination-13887e1c.js";
18
+ import { S as re, a as ne, T as ae } from "./table-4bc2c157.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 se } from "./baseIconButton-7bc53dec.js";
25
+ import "./keyCodes-f63c0e11.js";
26
+ import "rc-scrollbars";
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
+ };
8
215
  export {
9
- p as Button,
10
- a as Checkbox,
11
- f as SystemMessage,
12
- h as ThemeProvider
216
+ re as ArrowDownIcon,
217
+ ne as ArrowUpIcon,
218
+ se as BaseIconButton,
219
+ Y1 as BubblesLoader,
220
+ v1 as Button,
221
+ R as CalendarArrowIcon,
222
+ Y as CalendarIcon,
223
+ L1 as Checkbox,
224
+ S1 as ClearIcon,
225
+ j1 as CloseIcon,
226
+ x1 as DatePicker,
227
+ u1 as DeleteIcon,
228
+ j as Dropdown,
229
+ T1 as DropdownIcon,
230
+ Z1 as FieldNumber,
231
+ Z as FieldText,
232
+ G1 as FieldTextFlex,
233
+ w1 as MeatballMenuIcon,
234
+ D1 as MinusIcon,
235
+ F1 as Modal,
236
+ X1 as Pagination,
237
+ V1 as PlusIcon,
238
+ K1 as Popover,
239
+ ee as PrevChapterIcon,
240
+ te as PrevPageIcon,
241
+ W1 as Radio,
242
+ f1 as SearchIcon,
243
+ M1 as SystemMessage,
244
+ ae as Table,
245
+ I1 as ThemeProvider,
246
+ H1 as Toggle,
247
+ z1 as Tooltip
13
248
  };
@@ -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 ADDED
@@ -0,0 +1,16 @@
1
+ import { M as s, a as n, c as b, b as c } from "./index-bc6da711.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-bb309472.js";
10
+ import "./baseIconButton-7bc53dec.js";
11
+ export {
12
+ s as Modal,
13
+ n as ModalContent,
14
+ b as ModalFooter,
15
+ c as ModalHeader
16
+ };
@@ -0,0 +1,346 @@
1
+ import { jsxs as d, jsx as t } from "react/jsx-runtime";
2
+ import { c as m } from "./bind-06a7ff84.js";
3
+ import * as b from "react";
4
+ import { useState as x } from "react";
5
+ import { Popover as B } from "./popover.js";
6
+ import { B as $ } from "./button-bb309472.js";
7
+ import { F as I } from "./fieldText-98cf9984.js";
8
+ import { B as f } from "./baseIconButton-7bc53dec.js";
9
+ import { Tooltip as k } from "./tooltip.js";
10
+ const y = (e) => /* @__PURE__ */ b.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "#A2AAB5", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ b.createElement("path", { d: "M12 13L4 8L12 3L12 13Z" })), T = (e) => /* @__PURE__ */ b.createElement("svg", { width: 13, height: 12, viewBox: "0 0 13 12", fill: "#A2AAB5", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ b.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0 12L2 12L2 2.38498e-08L1.90798e-07 0L0 12ZM13 1L5 6L13 11L13 1Z" })), E = {
11
+ "item-counter": "_item-counter_4g6do_1"
12
+ }, M = m.bind(E), P = ({
13
+ activePage: e,
14
+ pageSize: n,
15
+ totalItems: s,
16
+ ofText: r,
17
+ itemsText: c
18
+ }) => {
19
+ const a = e * n, i = a - n;
20
+ return /* @__PURE__ */ d("div", { className: M("item-counter"), children: [
21
+ `${i + 1} - ${a < s ? a : s}`,
22
+ ` ${r} ${s} ${c}`
23
+ ] });
24
+ }, j = "_selected_183l8_32", R = {
25
+ "size-selector": "_size-selector_183l8_1",
26
+ "size-option": "_size-option_183l8_6",
27
+ selected: j
28
+ }, C = m.bind(R), V = ({
29
+ currentSize: e,
30
+ options: n,
31
+ onClickOption: s
32
+ }) => /* @__PURE__ */ t("div", { className: C("size-selector"), children: n.map((r) => /* @__PURE__ */ t(
33
+ "button",
34
+ {
35
+ className: C("size-option", { selected: r === e }),
36
+ onClick: () => {
37
+ s(r);
38
+ },
39
+ children: r
40
+ },
41
+ r
42
+ )) }), W = {
43
+ "page-size-control": "_page-size-control_gnurh_1",
44
+ "size-selector-button": "_size-selector-button_gnurh_10"
45
+ }, S = m.bind(W), D = ({
46
+ size: e,
47
+ sizeOptions: n,
48
+ perPageText: s,
49
+ changeSize: r
50
+ }) => {
51
+ const [c, a] = x(!1), i = (o) => {
52
+ r(o), a(!1);
53
+ };
54
+ return /* @__PURE__ */ d("div", { className: S("page-size-control"), children: [
55
+ /* @__PURE__ */ t(
56
+ B,
57
+ {
58
+ content: /* @__PURE__ */ t(V, { options: n, onClickOption: i, currentSize: e }),
59
+ placement: "top",
60
+ isOpened: c,
61
+ setIsOpened: a,
62
+ children: /* @__PURE__ */ t($, { className: S("size-selector-button"), variant: "text", children: e })
63
+ }
64
+ ),
65
+ ` ${s}`
66
+ ] });
67
+ }, F = {
68
+ "page-selector": "_page-selector_rtho4_1",
69
+ "field-wrapper": "_field-wrapper_rtho4_6",
70
+ "apply-button": "_apply-button_rtho4_10"
71
+ }, N = m.bind(F), Z = ({
72
+ totalPages: e,
73
+ pageText: n,
74
+ goActionText: s,
75
+ selectPage: r
76
+ }) => {
77
+ const [c, a] = x(""), [i, o] = x(!0), p = (h) => {
78
+ const u = h.target.value.replace(/\D/g, ""), w = Number(u), O = w > 0 && w <= e;
79
+ o(O), a(u);
80
+ }, l = () => {
81
+ r(Number(c));
82
+ };
83
+ return /* @__PURE__ */ d("div", { className: N("page-selector"), children: [
84
+ /* @__PURE__ */ t("div", { className: N("field-wrapper"), children: /* @__PURE__ */ t(
85
+ I,
86
+ {
87
+ onChange: p,
88
+ value: c,
89
+ placeholder: n,
90
+ error: i ? "" : "Error",
91
+ touched: !0,
92
+ defaultWidth: !1,
93
+ displayError: !1
94
+ }
95
+ ) }),
96
+ /* @__PURE__ */ t($, { onClick: l, disabled: !c || !i, className: N("apply-button"), children: s })
97
+ ] });
98
+ }, G = {
99
+ "active-page": "_active-page_14j0y_1",
100
+ "page-selector": "_page-selector_14j0y_10",
101
+ "page-selector-button": "_page-selector-button_14j0y_14"
102
+ }, v = m.bind(G), H = ({
103
+ activePage: e,
104
+ totalPages: n,
105
+ pageText: s,
106
+ goToText: r,
107
+ goActionText: c,
108
+ changePage: a
109
+ }) => {
110
+ const [i, o] = x(!1), p = (l) => {
111
+ a(l), o(!1);
112
+ };
113
+ return /* @__PURE__ */ d("div", { className: v("active-page"), children: [
114
+ `${s} `,
115
+ /* @__PURE__ */ t(
116
+ B,
117
+ {
118
+ content: /* @__PURE__ */ t(
119
+ Z,
120
+ {
121
+ pageText: s,
122
+ goActionText: c,
123
+ selectPage: p,
124
+ totalPages: n
125
+ }
126
+ ),
127
+ title: r,
128
+ placement: "top",
129
+ isOpened: i,
130
+ setIsOpened: o,
131
+ className: v("page-selector"),
132
+ children: /* @__PURE__ */ t($, { className: v("page-selector-button"), variant: "text", children: e })
133
+ }
134
+ )
135
+ ] });
136
+ }, q = "_bar_dfnmf_1", J = "_section_dfnmf_9", K = "_selected_dfnmf_33", Q = "_tooltip_dfnmf_37", U = {
137
+ bar: q,
138
+ "section-with-tooltip": "_section-with-tooltip_dfnmf_9",
139
+ section: J,
140
+ selected: K,
141
+ "tooltip-wrapper": "_tooltip-wrapper_dfnmf_37",
142
+ tooltip: Q,
143
+ "tooltip-text": "_tooltip-text_dfnmf_48",
144
+ "page-number": "_page-number_dfnmf_52"
145
+ }, g = m.bind(U), z = 13, A = 260, X = ({
146
+ totalPages: e,
147
+ activePage: n,
148
+ changePage: s,
149
+ captions: r
150
+ }) => {
151
+ const c = A / e, a = Math.min(Math.ceil(A / z), e), i = Math.max(z, c), o = [];
152
+ for (let l = 1; l <= e; l++)
153
+ o.push({
154
+ end: l * c,
155
+ pageNumber: l
156
+ });
157
+ const p = Array.from({ length: a }, () => ({ pages: { from: void 0, to: void 0 } }));
158
+ return o.forEach((l) => {
159
+ const h = Math.ceil(l.end / i) - 1, u = p[h].pages;
160
+ u.from || (u.from = l.pageNumber), u.to = l.pageNumber;
161
+ }), /* @__PURE__ */ t("div", { className: g("bar"), children: p.map((l, h) => /* @__PURE__ */ t(
162
+ "div",
163
+ {
164
+ className: g("section-with-tooltip"),
165
+ style: { width: i },
166
+ onClick: () => l.pages.from && s(l.pages.from),
167
+ children: /* @__PURE__ */ t(
168
+ k,
169
+ {
170
+ content: /* @__PURE__ */ d("div", { className: g("tooltip"), children: [
171
+ /* @__PURE__ */ t("div", { className: g("tooltip-text"), children: r.goTo }),
172
+ /* @__PURE__ */ t("div", { className: g("page-number"), children: l.pages.from })
173
+ ] }),
174
+ wrapperClassName: g("tooltip-wrapper"),
175
+ placement: "top",
176
+ children: /* @__PURE__ */ t(
177
+ "div",
178
+ {
179
+ className: g("section", {
180
+ selected: l.pages.from && l.pages.to && l.pages.from <= n && n <= l.pages.to
181
+ })
182
+ }
183
+ )
184
+ }
185
+ )
186
+ },
187
+ h
188
+ )) });
189
+ }, Y = "_next_1p2t5_18", ee = {
190
+ "page-navigator": "_page-navigator_1p2t5_1",
191
+ "page-buttons": "_page-buttons_1p2t5_6",
192
+ "page-button": "_page-button_1p2t5_6",
193
+ next: Y
194
+ }, _ = m.bind(ee), te = ({
195
+ activePage: e,
196
+ changePage: n,
197
+ totalPages: s,
198
+ captions: r
199
+ }) => {
200
+ const c = () => {
201
+ n(1);
202
+ }, a = () => {
203
+ n(e - 1);
204
+ }, i = () => {
205
+ n(e + 1);
206
+ }, o = () => {
207
+ n(s);
208
+ };
209
+ return /* @__PURE__ */ d("div", { className: _("page-navigator"), children: [
210
+ /* @__PURE__ */ d("div", { className: _("page-buttons"), children: [
211
+ /* @__PURE__ */ t(
212
+ f,
213
+ {
214
+ className: _("page-button"),
215
+ onClick: c,
216
+ disabled: e === 1,
217
+ children: /* @__PURE__ */ t(T, {})
218
+ }
219
+ ),
220
+ /* @__PURE__ */ t(
221
+ f,
222
+ {
223
+ className: _("page-button"),
224
+ onClick: a,
225
+ disabled: e === 1,
226
+ children: /* @__PURE__ */ t(y, {})
227
+ }
228
+ )
229
+ ] }),
230
+ /* @__PURE__ */ t(
231
+ X,
232
+ {
233
+ totalPages: s,
234
+ activePage: e,
235
+ changePage: n,
236
+ captions: r
237
+ }
238
+ ),
239
+ /* @__PURE__ */ d("div", { className: _("page-buttons"), children: [
240
+ /* @__PURE__ */ t(
241
+ f,
242
+ {
243
+ className: _("page-button", "next"),
244
+ onClick: i,
245
+ disabled: e === s,
246
+ children: /* @__PURE__ */ t(y, {})
247
+ }
248
+ ),
249
+ /* @__PURE__ */ t(
250
+ f,
251
+ {
252
+ className: _("page-button", "next"),
253
+ onClick: o,
254
+ disabled: e === s,
255
+ children: /* @__PURE__ */ t(T, {})
256
+ }
257
+ )
258
+ ] })
259
+ ] });
260
+ }, oe = {
261
+ "page-controls": "_page-controls_thyf8_1",
262
+ "total-pages": "_total-pages_thyf8_8"
263
+ }, L = m.bind(oe), se = ({
264
+ activePage: e,
265
+ changePage: n,
266
+ captions: s,
267
+ totalPages: r
268
+ }) => /* @__PURE__ */ d("div", { className: L("page-controls"), children: [
269
+ /* @__PURE__ */ t(
270
+ H,
271
+ {
272
+ activePage: e,
273
+ totalPages: r,
274
+ changePage: n,
275
+ pageText: s.page,
276
+ goToText: s.goTo,
277
+ goActionText: s.goAction
278
+ }
279
+ ),
280
+ /* @__PURE__ */ t(
281
+ te,
282
+ {
283
+ changePage: n,
284
+ activePage: e,
285
+ totalPages: r,
286
+ captions: { goTo: s.goTo }
287
+ }
288
+ ),
289
+ /* @__PURE__ */ d("span", { className: L("total-pages"), children: [
290
+ `${s.of} `,
291
+ r
292
+ ] })
293
+ ] }), ne = "_pagination_uykxy_1", re = {
294
+ pagination: ne
295
+ }, le = m.bind(re), ue = ({
296
+ activePage: e,
297
+ totalPages: n,
298
+ pageSize: s,
299
+ totalItems: r,
300
+ pageSizeOptions: c,
301
+ changePage: a,
302
+ changePageSize: i,
303
+ captions: o
304
+ }) => {
305
+ const p = (o == null ? void 0 : o.of) || "of", l = (o == null ? void 0 : o.page) || "Page";
306
+ return /* @__PURE__ */ d("div", { className: le("pagination"), children: [
307
+ /* @__PURE__ */ t(
308
+ P,
309
+ {
310
+ activePage: e,
311
+ pageSize: s,
312
+ totalItems: r,
313
+ ofText: p,
314
+ itemsText: (o == null ? void 0 : o.items) || "items"
315
+ }
316
+ ),
317
+ n > 1 && /* @__PURE__ */ t(
318
+ se,
319
+ {
320
+ activePage: e,
321
+ totalPages: n,
322
+ changePage: a,
323
+ captions: {
324
+ page: l,
325
+ of: p,
326
+ goTo: (o == null ? void 0 : o.goTo) || "Go to page",
327
+ goAction: (o == null ? void 0 : o.goAction) || "Go"
328
+ }
329
+ }
330
+ ),
331
+ /* @__PURE__ */ t(
332
+ D,
333
+ {
334
+ size: s,
335
+ sizeOptions: c,
336
+ changeSize: i,
337
+ perPageText: (o == null ? void 0 : o.perPage) || "per page"
338
+ }
339
+ )
340
+ ] });
341
+ };
342
+ export {
343
+ ue as P,
344
+ y as S,
345
+ T as a
346
+ };
@@ -0,0 +1,15 @@
1
+ import { P as t } from "./pagination-13887e1c.js";
2
+ import "react/jsx-runtime";
3
+ import "./bind-06a7ff84.js";
4
+ import "react";
5
+ import "./popover.js";
6
+ import "@floating-ui/react";
7
+ import "./button-bb309472.js";
8
+ import "./fieldText-98cf9984.js";
9
+ import "./baseIconButton-7bc53dec.js";
10
+ import "./tooltip.js";
11
+ import "@floating-ui/react-dom";
12
+ export {
13
+ t as Pagination,
14
+ t as default
15
+ };