@reportportal/ui-kit 0.0.1-alpha.8 → 0.0.1-alpha.9

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 (52) hide show
  1. package/README.md +1 -1
  2. package/dist/button-7fb84fde.js +62 -0
  3. package/dist/button.js +1 -1
  4. package/dist/checkbox-4143390f.js +70 -0
  5. package/dist/checkbox.js +1 -1
  6. package/dist/components/checkbox/checkbox.d.ts +1 -0
  7. package/dist/components/fieldText/fieldText.d.ts +1 -0
  8. package/dist/components/icons/index.d.ts +5 -0
  9. package/dist/components/index.d.ts +5 -0
  10. package/dist/components/pagination/index.d.ts +4 -0
  11. package/dist/components/pagination/itemsCounter/index.d.ts +1 -0
  12. package/dist/components/pagination/itemsCounter/itemCounter.d.ts +9 -0
  13. package/dist/components/pagination/pageControls/activePage/activePage.d.ts +12 -0
  14. package/dist/components/pagination/pageControls/activePage/index.d.ts +1 -0
  15. package/dist/components/pagination/pageControls/activePage/pageSelector/index.d.ts +1 -0
  16. package/dist/components/pagination/pageControls/activePage/pageSelector/pageSelector.d.ts +10 -0
  17. package/dist/components/pagination/pageControls/index.d.ts +1 -0
  18. package/dist/components/pagination/pageControls/pageControls.d.ts +16 -0
  19. package/dist/components/pagination/pageControls/pageNavigator/index.d.ts +1 -0
  20. package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +8 -0
  21. package/dist/components/pagination/pageSizeControl/index.d.ts +1 -0
  22. package/dist/components/pagination/pageSizeControl/pageSizeControl.d.ts +10 -0
  23. package/dist/components/pagination/pageSizeControl/sizeSelector/index.d.ts +1 -0
  24. package/dist/components/pagination/pageSizeControl/sizeSelector/sizeSelector.d.ts +8 -0
  25. package/dist/components/pagination/pagination.d.ts +22 -0
  26. package/dist/components/pagination/types.d.ts +2 -0
  27. package/dist/components/popover/index.d.ts +1 -0
  28. package/dist/components/popover/popover.d.ts +18 -0
  29. package/dist/components/table/index.d.ts +3 -0
  30. package/dist/components/table/table.d.ts +3 -0
  31. package/dist/components/table/types.d.ts +46 -0
  32. package/dist/components/table/utils.d.ts +2 -0
  33. package/dist/components/tooltip/index.d.ts +1 -0
  34. package/dist/components/tooltip/tooltip.d.ts +13 -0
  35. package/dist/fieldText-d80b29ba.js +102 -0
  36. package/dist/fieldText.js +1 -1
  37. package/dist/fieldTextFlex-5bddf46a.js +67 -0
  38. package/dist/fieldTextFlex.js +8 -0
  39. package/dist/{index-2bee4457.js → index-bb9b62ef.js} +1 -1
  40. package/dist/index.js +44 -28
  41. package/dist/modal.js +2 -2
  42. package/dist/pagination-a36bc786.js +274 -0
  43. package/dist/pagination.js +13 -0
  44. package/dist/popover.js +95 -0
  45. package/dist/radio-fd49a09c.js +76 -0
  46. package/dist/radio.js +9 -0
  47. package/dist/style.css +1 -1
  48. package/dist/tooltip.js +70 -0
  49. package/package.json +3 -2
  50. package/dist/button-497b4d19.js +0 -62
  51. package/dist/checkbox-1e21cf3e.js +0 -68
  52. package/dist/fieldText-65a50d9d.js +0 -101
package/dist/index.js CHANGED
@@ -1,15 +1,20 @@
1
- import { B as f } from "./button-497b4d19.js";
2
- import { C as c } from "./checkbox-1e21cf3e.js";
3
- import { S as B } from "./systemMessage-1ced6079.js";
4
- import { S as g, F as h } from "./fieldText-65a50d9d.js";
5
- import { T as w } from "./themeProvider-46c2be7b.js";
6
- import { S as v, M as I } from "./index-2bee4457.js";
7
- import { D as A, S as D } from "./dropdown-e07f2a71.js";
8
- import { T as b } from "./toggle-707ecb74.js";
9
- import { F as V, a as Z, S as E } from "./fieldNumber-46fe79b9.js";
10
- import { B as P } from "./bubblesLoader-a7e709d4.js";
11
- import { B as y } from "./baseIconButton-7bc53dec.js";
12
- import * as o from "react";
1
+ import { B as v } from "./button-7fb84fde.js";
2
+ import { C as g } from "./checkbox-4143390f.js";
3
+ import { S as A } from "./systemMessage-1ced6079.js";
4
+ import { S as u, F as B } from "./fieldText-d80b29ba.js";
5
+ import { T as R } from "./themeProvider-46c2be7b.js";
6
+ import { S as H, M as E } from "./index-bb9b62ef.js";
7
+ import { D as P, S as D } from "./dropdown-e07f2a71.js";
8
+ import { T } from "./toggle-707ecb74.js";
9
+ import { F as V, a as U, S as k } from "./fieldNumber-46fe79b9.js";
10
+ import { B as N } from "./bubblesLoader-a7e709d4.js";
11
+ import { F as q } from "./fieldTextFlex-5bddf46a.js";
12
+ import { R as G } from "./radio-fd49a09c.js";
13
+ import { Tooltip as K } from "./tooltip.js";
14
+ import { Popover as Q } from "./popover.js";
15
+ import { P as X, a as Y, S as _ } from "./pagination-a36bc786.js";
16
+ import { B as e1 } from "./baseIconButton-7bc53dec.js";
17
+ import * as e from "react";
13
18
  import "react/jsx-runtime";
14
19
  import "./bind-06a7ff84.js";
15
20
  import "./keyCodes-f63c0e11.js";
@@ -18,23 +23,34 @@ import "framer-motion";
18
23
  import "./useOnClickOutside-c332f7d3.js";
19
24
  import "@floating-ui/react-dom";
20
25
  import "downshift";
21
- const i = (e) => /* @__PURE__ */ o.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ o.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__ */ o.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" }));
26
+ import "@floating-ui/react";
27
+ const m = (o) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...o }, /* @__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" })), d = (o) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...o }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536L4.14645 9.85355C3.95118 9.65829 3.95118 9.34171 4.14645 9.14645C4.34171 8.95118 4.65829 8.95118 4.85355 9.14645L7 11.2929L7 3.5C7 3.22386 7.22386 3 7.5 3C7.77614 3 8 3.22386 8 3.5L8 11.2929L10.1464 9.14645C10.3417 8.95119 10.6583 8.95118 10.8536 9.14645C11.0488 9.34171 11.0488 9.65829 10.8536 9.85355L7.85355 12.8536Z", fill: "#A2AAB5" })), w = (o) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...o }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.14645 3.14645C7.34171 2.95118 7.65829 2.95118 7.85355 3.14645L10.8536 6.14645C11.0488 6.34171 11.0488 6.65829 10.8536 6.85355C10.6583 7.04882 10.3417 7.04882 10.1464 6.85355L8 4.70711V12.5C8 12.7761 7.77614 13 7.5 13C7.22386 13 7 12.7761 7 12.5L7 4.70711L4.85355 6.85355C4.65829 7.04882 4.34171 7.04882 4.14645 6.85355C3.95118 6.65829 3.95118 6.34171 4.14645 6.14645L7.14645 3.14645Z", fill: "#A2AAB5" })), c = (o) => /* @__PURE__ */ e.createElement("svg", { width: 14, height: 3, viewBox: "0 0 14 3", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...o }, /* @__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" }));
22
28
  export {
23
- y as BaseIconButton,
24
- P as BubblesLoader,
25
- f as Button,
26
- c as Checkbox,
27
- g as ClearIcon,
28
- v as CloseIcon,
29
- i as DeleteIcon,
30
- A as Dropdown,
29
+ d as ArrowDownIcon,
30
+ w as ArrowUpIcon,
31
+ e1 as BaseIconButton,
32
+ N as BubblesLoader,
33
+ v as Button,
34
+ g as Checkbox,
35
+ u as ClearIcon,
36
+ H as CloseIcon,
37
+ m as DeleteIcon,
38
+ P as Dropdown,
31
39
  D as DropdownIcon,
32
40
  V as FieldNumber,
33
- h as FieldText,
34
- Z as MinusIcon,
35
- I as Modal,
36
- E as PlusIcon,
37
- B as SystemMessage,
38
- w as ThemeProvider,
39
- b as Toggle
41
+ B as FieldText,
42
+ q as FieldTextFlex,
43
+ c as MeatballMenuIcon,
44
+ U as MinusIcon,
45
+ E as Modal,
46
+ X as Pagination,
47
+ k as PlusIcon,
48
+ Q as Popover,
49
+ Y as PrevChapterIcon,
50
+ _ as PrevPageIcon,
51
+ G as Radio,
52
+ A as SystemMessage,
53
+ R as ThemeProvider,
54
+ T as Toggle,
55
+ K as Tooltip
40
56
  };
package/dist/modal.js CHANGED
@@ -1,4 +1,4 @@
1
- import { M as s, a as n, c as b, b as c } from "./index-2bee4457.js";
1
+ import { M as s, a as n, c as b, b as c } from "./index-bb9b62ef.js";
2
2
  import "react/jsx-runtime";
3
3
  import "react";
4
4
  import "rc-scrollbars";
@@ -6,7 +6,7 @@ import "framer-motion";
6
6
  import "./bind-06a7ff84.js";
7
7
  import "./useOnClickOutside-c332f7d3.js";
8
8
  import "./keyCodes-f63c0e11.js";
9
- import "./button-497b4d19.js";
9
+ import "./button-7fb84fde.js";
10
10
  import "./baseIconButton-7bc53dec.js";
11
11
  export {
12
12
  s as Modal,
@@ -0,0 +1,274 @@
1
+ import { jsxs as i, jsx as s } from "react/jsx-runtime";
2
+ import { c as d } from "./bind-06a7ff84.js";
3
+ import * as u from "react";
4
+ import { useState as h } from "react";
5
+ import { Popover as C } from "./popover.js";
6
+ import { B as v } from "./button-7fb84fde.js";
7
+ import { F as T } from "./fieldText-d80b29ba.js";
8
+ import { B as m } from "./baseIconButton-7bc53dec.js";
9
+ const $ = (e) => /* @__PURE__ */ u.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "#A2AAB5", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ u.createElement("path", { d: "M12 13L4 8L12 3L12 13Z" })), y = (e) => /* @__PURE__ */ u.createElement("svg", { width: 13, height: 12, viewBox: "0 0 13 12", fill: "#A2AAB5", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ u.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0 12L2 12L2 2.38498e-08L1.90798e-07 0L0 12ZM13 1L5 6L13 11L13 1Z" })), O = {
10
+ "item-counter": "_item-counter_4g6do_1"
11
+ }, B = d.bind(O), P = ({
12
+ activePage: e,
13
+ pageSize: n,
14
+ totalItems: o,
15
+ ofText: l,
16
+ itemsText: a
17
+ }) => {
18
+ const r = e * n, c = r - n;
19
+ return /* @__PURE__ */ i("div", { className: B("item-counter"), children: [
20
+ `${c + 1} - ${r < o ? r : o}`,
21
+ ` ${l} ${o} ${a}`
22
+ ] });
23
+ }, k = "_selected_183l8_32", I = {
24
+ "size-selector": "_size-selector_183l8_1",
25
+ "size-option": "_size-option_183l8_6",
26
+ selected: k
27
+ }, w = d.bind(I), E = ({
28
+ currentSize: e,
29
+ options: n,
30
+ onClickOption: o
31
+ }) => /* @__PURE__ */ s("div", { className: w("size-selector"), children: n.map((l) => /* @__PURE__ */ s(
32
+ "button",
33
+ {
34
+ className: w("size-option", { selected: l === e }),
35
+ onClick: () => {
36
+ o(l);
37
+ },
38
+ children: l
39
+ },
40
+ l
41
+ )) }), j = {
42
+ "page-size-control": "_page-size-control_gnurh_1",
43
+ "size-selector-button": "_size-selector-button_gnurh_10"
44
+ }, z = d.bind(j), V = ({
45
+ size: e,
46
+ sizeOptions: n,
47
+ perPageText: o,
48
+ changeSize: l
49
+ }) => {
50
+ const [a, r] = h(!1), c = (t) => {
51
+ l(t), r(!1);
52
+ };
53
+ return /* @__PURE__ */ i("div", { className: z("page-size-control"), children: [
54
+ /* @__PURE__ */ s(
55
+ C,
56
+ {
57
+ content: /* @__PURE__ */ s(E, { options: n, onClickOption: c, currentSize: e }),
58
+ placement: "top",
59
+ isOpened: a,
60
+ setIsOpened: r,
61
+ children: /* @__PURE__ */ s(v, { className: z("size-selector-button"), variant: "text", children: e })
62
+ }
63
+ ),
64
+ ` ${o}`
65
+ ] });
66
+ }, F = {
67
+ "page-selector": "_page-selector_rtho4_1",
68
+ "field-wrapper": "_field-wrapper_rtho4_6",
69
+ "apply-button": "_apply-button_rtho4_10"
70
+ }, b = d.bind(F), M = ({
71
+ totalPages: e,
72
+ pageText: n,
73
+ goActionText: o,
74
+ selectPage: l
75
+ }) => {
76
+ const [a, r] = h(""), [c, t] = h(!0), p = (A) => {
77
+ const f = A.target.value.replace(/\D/g, ""), N = Number(f), L = N > 0 && N <= e;
78
+ t(L), r(f);
79
+ }, _ = () => {
80
+ l(Number(a));
81
+ };
82
+ return /* @__PURE__ */ i("div", { className: b("page-selector"), children: [
83
+ /* @__PURE__ */ s("div", { className: b("field-wrapper"), children: /* @__PURE__ */ s(
84
+ T,
85
+ {
86
+ onChange: p,
87
+ value: a,
88
+ placeholder: n,
89
+ error: c ? "" : "Error",
90
+ touched: !0,
91
+ defaultWidth: !1,
92
+ displayError: !1
93
+ }
94
+ ) }),
95
+ /* @__PURE__ */ s(v, { onClick: _, disabled: !a || !c, className: b("apply-button"), children: o })
96
+ ] });
97
+ }, R = {
98
+ "active-page": "_active-page_14j0y_1",
99
+ "page-selector": "_page-selector_14j0y_10",
100
+ "page-selector-button": "_page-selector-button_14j0y_14"
101
+ }, x = d.bind(R), Z = ({
102
+ activePage: e,
103
+ totalPages: n,
104
+ pageText: o,
105
+ goToText: l,
106
+ goActionText: a,
107
+ changePage: r
108
+ }) => {
109
+ const [c, t] = h(!1), p = (_) => {
110
+ r(_), t(!1);
111
+ };
112
+ return /* @__PURE__ */ i("div", { className: x("active-page"), children: [
113
+ `${o} `,
114
+ /* @__PURE__ */ s(
115
+ C,
116
+ {
117
+ content: /* @__PURE__ */ s(
118
+ M,
119
+ {
120
+ pageText: o,
121
+ goActionText: a,
122
+ selectPage: p,
123
+ totalPages: n
124
+ }
125
+ ),
126
+ title: l,
127
+ placement: "top",
128
+ isOpened: c,
129
+ setIsOpened: t,
130
+ className: x("page-selector"),
131
+ children: /* @__PURE__ */ s(v, { className: x("page-selector-button"), variant: "text", children: e })
132
+ }
133
+ )
134
+ ] });
135
+ }, G = "_next_1p2t5_18", D = {
136
+ "page-navigator": "_page-navigator_1p2t5_1",
137
+ "page-buttons": "_page-buttons_1p2t5_6",
138
+ "page-button": "_page-button_1p2t5_6",
139
+ next: G
140
+ }, g = d.bind(D), W = ({
141
+ activePage: e,
142
+ changePage: n,
143
+ totalPages: o
144
+ }) => {
145
+ const l = () => {
146
+ n(1);
147
+ }, a = () => {
148
+ n(e - 1);
149
+ }, r = () => {
150
+ n(e + 1);
151
+ }, c = () => {
152
+ n(o);
153
+ };
154
+ return /* @__PURE__ */ i("div", { className: g("page-navigator"), children: [
155
+ /* @__PURE__ */ i("div", { className: g("page-buttons"), children: [
156
+ /* @__PURE__ */ s(
157
+ m,
158
+ {
159
+ className: g("page-button"),
160
+ onClick: l,
161
+ disabled: e === 1,
162
+ children: /* @__PURE__ */ s(y, {})
163
+ }
164
+ ),
165
+ /* @__PURE__ */ s(
166
+ m,
167
+ {
168
+ className: g("page-button"),
169
+ onClick: a,
170
+ disabled: e === 1,
171
+ children: /* @__PURE__ */ s($, {})
172
+ }
173
+ )
174
+ ] }),
175
+ /* @__PURE__ */ i("div", { className: g("page-buttons"), children: [
176
+ /* @__PURE__ */ s(
177
+ m,
178
+ {
179
+ className: g("page-button", "next"),
180
+ onClick: r,
181
+ disabled: e === o,
182
+ children: /* @__PURE__ */ s($, {})
183
+ }
184
+ ),
185
+ /* @__PURE__ */ s(
186
+ m,
187
+ {
188
+ className: g("page-button", "next"),
189
+ onClick: c,
190
+ disabled: e === o,
191
+ children: /* @__PURE__ */ s(y, {})
192
+ }
193
+ )
194
+ ] })
195
+ ] });
196
+ }, q = {
197
+ "page-controls": "_page-controls_thyf8_1",
198
+ "total-pages": "_total-pages_thyf8_8"
199
+ }, S = d.bind(q), H = ({
200
+ activePage: e,
201
+ changePage: n,
202
+ captions: o,
203
+ totalPages: l
204
+ }) => /* @__PURE__ */ i("div", { className: S("page-controls"), children: [
205
+ /* @__PURE__ */ s(
206
+ Z,
207
+ {
208
+ activePage: e,
209
+ totalPages: l,
210
+ changePage: n,
211
+ pageText: o.page,
212
+ goToText: o.goTo,
213
+ goActionText: o.goAction
214
+ }
215
+ ),
216
+ /* @__PURE__ */ s(W, { changePage: n, activePage: e, totalPages: l }),
217
+ /* @__PURE__ */ i("span", { className: S("total-pages"), children: [
218
+ `${o.of} `,
219
+ l
220
+ ] })
221
+ ] }), J = "_pagination_uykxy_1", K = {
222
+ pagination: J
223
+ }, Q = d.bind(K), ne = ({
224
+ activePage: e,
225
+ totalPages: n,
226
+ pageSize: o,
227
+ totalItems: l,
228
+ pageSizeOptions: a,
229
+ changePage: r,
230
+ changePageSize: c,
231
+ captions: t
232
+ }) => {
233
+ const p = (t == null ? void 0 : t.of) || "of", _ = (t == null ? void 0 : t.page) || "Page";
234
+ return /* @__PURE__ */ i("div", { className: Q("pagination"), children: [
235
+ /* @__PURE__ */ s(
236
+ P,
237
+ {
238
+ activePage: e,
239
+ pageSize: o,
240
+ totalItems: l,
241
+ ofText: p,
242
+ itemsText: (t == null ? void 0 : t.items) || "items"
243
+ }
244
+ ),
245
+ n > 1 && /* @__PURE__ */ s(
246
+ H,
247
+ {
248
+ activePage: e,
249
+ totalPages: n,
250
+ changePage: r,
251
+ captions: {
252
+ page: _,
253
+ of: p,
254
+ goTo: (t == null ? void 0 : t.goTo) || "Go to page",
255
+ goAction: (t == null ? void 0 : t.goAction) || "Go"
256
+ }
257
+ }
258
+ ),
259
+ /* @__PURE__ */ s(
260
+ V,
261
+ {
262
+ size: o,
263
+ sizeOptions: a,
264
+ changeSize: c,
265
+ perPageText: (t == null ? void 0 : t.perPage) || "per page"
266
+ }
267
+ )
268
+ ] });
269
+ };
270
+ export {
271
+ ne as P,
272
+ $ as S,
273
+ y as a
274
+ };
@@ -0,0 +1,13 @@
1
+ import { P as t } from "./pagination-a36bc786.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-7fb84fde.js";
8
+ import "./fieldText-d80b29ba.js";
9
+ import "./baseIconButton-7bc53dec.js";
10
+ export {
11
+ t as Pagination,
12
+ t as default
13
+ };
@@ -0,0 +1,95 @@
1
+ import { jsxs as p, Fragment as G, jsx as o } from "react/jsx-runtime";
2
+ import { useRef as H, useState as S } from "react";
3
+ import { useFloating as j, offset as C, flip as L, arrow as M, autoUpdate as O, useClick as U, useDismiss as W, useRole as q, useInteractions as z, FloatingFocusManager as B, FloatingArrow as J } from "@floating-ui/react";
4
+ import { c as K } from "./bind-06a7ff84.js";
5
+ const Q = "_popover_16ogt_1", V = "_title_16ogt_28", X = {
6
+ "popover-wrapper": "_popover-wrapper_16ogt_1",
7
+ popover: Q,
8
+ title: V
9
+ }, n = K.bind(X), m = 16, f = 8, Y = ["top", "right", "bottom", "left"], Z = [
10
+ "right",
11
+ "right-start",
12
+ "right-end",
13
+ "left",
14
+ "left-start",
15
+ "left-end"
16
+ ], $ = [
17
+ "top",
18
+ "top-start",
19
+ "top-end",
20
+ "right",
21
+ "right-start",
22
+ "right-end",
23
+ "bottom",
24
+ "bottom-start",
25
+ "bottom-end",
26
+ "left",
27
+ "left-start",
28
+ "left-end"
29
+ ], nt = ({
30
+ className: d,
31
+ content: g,
32
+ children: h,
33
+ placement: u = "bottom",
34
+ fallbackPlacements: v = $,
35
+ title: r,
36
+ arrowOffset: l = 16,
37
+ safeZone: _ = 4,
38
+ arrowColor: w = "white",
39
+ dataAutomationId: x,
40
+ isOpened: b,
41
+ setIsOpened: s
42
+ }) => {
43
+ const i = H(null), [F, R] = S(!1), a = s ? b : F, A = (e) => {
44
+ s ? s(e) : R(e);
45
+ }, { placement: N, refs: c, floatingStyles: P, context: t } = j({
46
+ open: a,
47
+ onOpenChange: A,
48
+ placement: u,
49
+ middleware: [
50
+ C(({ rects: e, placement: D }) => ({
51
+ mainAxis: _ + f,
52
+ alignmentAxis: ((Z.includes(D) ? e.reference.height : e.reference.width) - m) / 2 - l
53
+ })),
54
+ L({
55
+ fallbackAxisSideDirection: "start",
56
+ fallbackPlacements: v
57
+ }),
58
+ M({
59
+ element: i
60
+ })
61
+ ],
62
+ whileElementsMounted: O
63
+ }), E = U(t), I = W(t), T = q(t), { getReferenceProps: k, getFloatingProps: y } = z([E, I, T]);
64
+ return /* @__PURE__ */ p(G, { children: [
65
+ /* @__PURE__ */ o("div", { ref: c.setReference, ...k(), className: n("popover-wrapper"), children: h }),
66
+ a && /* @__PURE__ */ o(B, { context: t, modal: !1, children: /* @__PURE__ */ p(
67
+ "div",
68
+ {
69
+ className: n("popover", d),
70
+ "data-automation-id": x,
71
+ ref: c.setFloating,
72
+ style: P,
73
+ ...y,
74
+ children: [
75
+ /* @__PURE__ */ o(
76
+ J,
77
+ {
78
+ ref: i,
79
+ context: t,
80
+ width: m,
81
+ height: f,
82
+ fill: w,
83
+ staticOffset: Y.includes(N) ? null : l
84
+ }
85
+ ),
86
+ r && /* @__PURE__ */ o("div", { className: n("title"), children: r }),
87
+ g
88
+ ]
89
+ }
90
+ ) })
91
+ ] });
92
+ };
93
+ export {
94
+ nt as Popover
95
+ };
@@ -0,0 +1,76 @@
1
+ import { jsxs as m, jsx as r } from "react/jsx-runtime";
2
+ import { useRef as k } from "react";
3
+ import { c as f } from "./bind-06a7ff84.js";
4
+ import { K as t } from "./keyCodes-f63c0e11.js";
5
+ const p = "_disabled_1sze8_9", g = "_toggler_1sze8_15", y = "_checked_1sze8_21", E = "_input_1sze8_28", x = {
6
+ "radio-button": "_radio-button_1sze8_1",
7
+ disabled: p,
8
+ "children-container": "_children-container_1sze8_12",
9
+ toggler: g,
10
+ checked: y,
11
+ input: E
12
+ }, a = f.bind(x), v = ({
13
+ option: e,
14
+ value: o,
15
+ onChange: u,
16
+ onFocus: z,
17
+ onBlur: C,
18
+ className: b,
19
+ ..._
20
+ }) => {
21
+ const s = k(null), d = String(e.value) === String(o), h = (l) => {
22
+ var i, n;
23
+ const { keyCode: c } = l;
24
+ if (c === t.SPACE_KEY_CODE) {
25
+ l.preventDefault(), (i = s.current) == null || i.click();
26
+ return;
27
+ }
28
+ c === t.ENTER_KEY_CODE && (l.preventDefault(), (n = s.current) == null || n.click());
29
+ };
30
+ return (
31
+ // eslint-disable-next-line
32
+ /* @__PURE__ */ m(
33
+ "label",
34
+ {
35
+ id: "rp-ui-kit-radio-label",
36
+ className: a(b, "radio-button", {
37
+ disabled: e.disabled
38
+ }),
39
+ tabIndex: e.disabled ? -1 : 0,
40
+ onKeyDown: e.disabled ? void 0 : h,
41
+ children: [
42
+ /* @__PURE__ */ r(
43
+ "input",
44
+ {
45
+ tabIndex: -1,
46
+ ref: s,
47
+ type: "radio",
48
+ className: a("input"),
49
+ disabled: e.disabled,
50
+ onChange: u,
51
+ value: e.value,
52
+ checked: d,
53
+ ..._
54
+ }
55
+ ),
56
+ /* @__PURE__ */ r(
57
+ "span",
58
+ {
59
+ role: "radio",
60
+ "aria-labelledby": "rp-ui-kit-radio-label",
61
+ "aria-checked": d,
62
+ className: a("toggler", {
63
+ disabled: e.disabled,
64
+ checked: d
65
+ })
66
+ }
67
+ ),
68
+ /* @__PURE__ */ r("span", { className: a("children-container"), children: e.label })
69
+ ]
70
+ }
71
+ )
72
+ );
73
+ };
74
+ export {
75
+ v as R
76
+ };
package/dist/radio.js ADDED
@@ -0,0 +1,9 @@
1
+ import { R as r } from "./radio-fd49a09c.js";
2
+ import "react/jsx-runtime";
3
+ import "react";
4
+ import "./bind-06a7ff84.js";
5
+ import "./keyCodes-f63c0e11.js";
6
+ export {
7
+ r as Radio,
8
+ r as default
9
+ };