@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/README.md CHANGED
@@ -108,7 +108,7 @@ The number of custom themes is not limited and actual theme can be easily switch
108
108
 
109
109
  ## Components
110
110
 
111
- To see a published showcase of the latest components released with its API and use cases, follow the [link]() (to be provided).
111
+ To see a published showcase of the latest components released with its API and use cases, follow the [link](https://reportportal.io/ui-kit/).
112
112
 
113
113
  ### Icons
114
114
 
@@ -0,0 +1,62 @@
1
+ import { jsxs as p, jsx as h } from "react/jsx-runtime";
2
+ import { forwardRef as l } from "react";
3
+ import { c as u } from "./bind-06a7ff84.js";
4
+ const w = "_button_1fbsg_1", x = "_primary_1fbsg_18", y = "_disabled_1fbsg_23", N = "_ghost_1fbsg_35", B = "_danger_1fbsg_53", $ = "_text_1fbsg_69", j = "_icon_1fbsg_115", I = {
5
+ button: w,
6
+ primary: x,
7
+ disabled: y,
8
+ ghost: N,
9
+ danger: B,
10
+ text: $,
11
+ "width-wide-content": "_width-wide-content_1fbsg_105",
12
+ "width-parent": "_width-parent_1fbsg_110",
13
+ icon: j,
14
+ "icon-start": "_icon-start_1fbsg_121",
15
+ "icon-end": "_icon-end_1fbsg_125"
16
+ }, c = u.bind(I), z = l(
17
+ ({
18
+ variant: t = "primary",
19
+ icon: e,
20
+ iconPlace: s = "start",
21
+ adjustWidthOn: n = "content",
22
+ type: r = "button",
23
+ children: i,
24
+ disabled: o = !1,
25
+ onClick: a,
26
+ title: b,
27
+ className: d,
28
+ ...f
29
+ }, g) => {
30
+ const m = c("button", t, d, {
31
+ disabled: o,
32
+ [`width-${n}`]: n
33
+ }), _ = t === "text" && e;
34
+ return /* @__PURE__ */ p(
35
+ "button",
36
+ {
37
+ ref: g,
38
+ type: r,
39
+ disabled: o,
40
+ className: m,
41
+ onClick: a,
42
+ title: b,
43
+ ...f,
44
+ children: [
45
+ _ && /* @__PURE__ */ h(
46
+ "i",
47
+ {
48
+ className: c("icon", {
49
+ [`icon-${s}`]: s
50
+ }),
51
+ children: _
52
+ }
53
+ ),
54
+ i
55
+ ]
56
+ }
57
+ );
58
+ }
59
+ );
60
+ export {
61
+ z as B
62
+ };
package/dist/button.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as o } from "./button-497b4d19.js";
1
+ import { B as o } from "./button-7fb84fde.js";
2
2
  import "react/jsx-runtime";
3
3
  import "react";
4
4
  import "./bind-06a7ff84.js";
@@ -0,0 +1,70 @@
1
+ import { jsxs as u, jsx as n } from "react/jsx-runtime";
2
+ import { c as x } from "./bind-06a7ff84.js";
3
+ import { useRef as m } from "react";
4
+ import { K as k } from "./keyCodes-f63c0e11.js";
5
+ const f = "_checkbox_189ko_1", y = "_disabled_189ko_11", C = "_input_189ko_16", E = "_control_189ko_23", D = "_children_189ko_149", K = {
6
+ checkbox: f,
7
+ disabled: y,
8
+ input: C,
9
+ control: E,
10
+ "partially-checked": "_partially-checked_189ko_76",
11
+ children: D
12
+ }, e = x.bind(K), O = ({
13
+ children: l,
14
+ disabled: c = !1,
15
+ onChange: _,
16
+ className: p,
17
+ value: r,
18
+ partiallyChecked: h,
19
+ ...b
20
+ }) => {
21
+ const o = m(null), d = (t) => {
22
+ var a, i;
23
+ const { keyCode: s } = t;
24
+ if (s === k.SPACE_KEY_CODE) {
25
+ t.preventDefault(), (a = o.current) == null || a.click();
26
+ return;
27
+ }
28
+ s === k.ENTER_KEY_CODE && (t.preventDefault(), (i = o.current) == null || i.click());
29
+ };
30
+ return /* @__PURE__ */ u(
31
+ "label",
32
+ {
33
+ id: "rp-ui-kit-checkbox-label",
34
+ className: e("checkbox", p, {
35
+ disabled: c
36
+ }),
37
+ children: [
38
+ /* @__PURE__ */ n(
39
+ "input",
40
+ {
41
+ ref: o,
42
+ tabIndex: 0,
43
+ type: "checkbox",
44
+ onKeyDown: d,
45
+ className: e("input", { "partially-checked": h }),
46
+ disabled: c,
47
+ onChange: _,
48
+ checked: r,
49
+ ...b
50
+ }
51
+ ),
52
+ /* @__PURE__ */ n(
53
+ "span",
54
+ {
55
+ "aria-labelledby": "rp-ui-kit-checkbox-label",
56
+ role: "checkbox",
57
+ "aria-checked": r,
58
+ className: e("control", {
59
+ disabled: c
60
+ })
61
+ }
62
+ ),
63
+ l && /* @__PURE__ */ n("span", { className: e("children", { disabled: c }), children: l })
64
+ ]
65
+ }
66
+ );
67
+ };
68
+ export {
69
+ O as C
70
+ };
package/dist/checkbox.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as r } from "./checkbox-1e21cf3e.js";
1
+ import { C as r } from "./checkbox-4143390f.js";
2
2
  import "react/jsx-runtime";
3
3
  import "./bind-06a7ff84.js";
4
4
  import "react";
@@ -5,6 +5,7 @@ interface CheckboxProps extends HTMLAttributes<HTMLInputElement> {
5
5
  disabled?: boolean;
6
6
  className?: string;
7
7
  onChange?: ChangeEventHandler<HTMLInputElement>;
8
+ partiallyChecked?: boolean;
8
9
  }
9
10
  export declare const Checkbox: FC<CheckboxProps>;
10
11
  export {};
@@ -18,6 +18,7 @@ interface FieldTextProps extends ComponentPropsWithRef<'input'> {
18
18
  isRequired?: boolean;
19
19
  hasDoubleMessage?: boolean;
20
20
  type?: string;
21
+ displayError?: boolean;
21
22
  }
22
23
  export declare const FieldText: FC<FieldTextProps>;
23
24
  export {};
@@ -5,3 +5,8 @@ export { default as PlusIcon } from './svg/plus.svg';
5
5
  export { default as MinusIcon } from './svg/minus.svg';
6
6
  export { default as DeleteIcon } from './svg/delete.svg';
7
7
  export { default as DropdownIcon } from './svg/dropdown.svg';
8
+ export { default as PrevPageIcon } from './svg/prevPage.svg';
9
+ export { default as PrevChapterIcon } from './svg/prevChapter.svg';
10
+ export { default as ArrowDownIcon } from './svg/arrowDown.svg';
11
+ export { default as ArrowUpIcon } from './svg/arrowUp.svg';
12
+ export { default as MeatballMenuIcon } from './svg/meatballMenu.svg';
@@ -8,4 +8,9 @@ export { Dropdown } from './dropdown';
8
8
  export { Toggle } from './toggle';
9
9
  export { FieldNumber } from './fieldNumber';
10
10
  export { BubblesLoader } from './bubblesLoader';
11
+ export { FieldTextFlex } from './fieldTextFlex';
12
+ export { Radio } from './radio';
13
+ export { Tooltip } from './tooltip';
14
+ export { Popover } from './popover';
15
+ export { Pagination } from './pagination';
11
16
  export * from './icons';
@@ -0,0 +1,4 @@
1
+ import { Pagination, PaginationProps } from './pagination';
2
+ export { Pagination };
3
+ export type { PaginationProps };
4
+ export default Pagination;
@@ -0,0 +1 @@
1
+ export { ItemCounter } from './itemCounter';
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ export interface ItemCounterProps {
3
+ activePage: number;
4
+ pageSize: number;
5
+ totalItems: number;
6
+ ofText: string;
7
+ itemsText: string;
8
+ }
9
+ export declare const ItemCounter: FC<ItemCounterProps>;
@@ -0,0 +1,12 @@
1
+ import { FC } from 'react';
2
+ import { ChangePage } from '../../types';
3
+ interface ActivePageProps {
4
+ activePage: number;
5
+ totalPages: number;
6
+ pageText: string;
7
+ goToText: string;
8
+ goActionText: string;
9
+ changePage: ChangePage;
10
+ }
11
+ export declare const ActivePage: FC<ActivePageProps>;
12
+ export {};
@@ -0,0 +1 @@
1
+ export { ActivePage } from './activePage';
@@ -0,0 +1 @@
1
+ export { PageSelector } from './pageSelector';
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import { ChangePage } from '../../../types';
3
+ interface PageSelectorProps {
4
+ pageText: string;
5
+ goActionText: string;
6
+ totalPages: number;
7
+ selectPage: ChangePage;
8
+ }
9
+ export declare const PageSelector: FC<PageSelectorProps>;
10
+ export {};
@@ -0,0 +1 @@
1
+ export { PageControls } from './pageControls';
@@ -0,0 +1,16 @@
1
+ import { FC } from 'react';
2
+ import { ChangePage } from '../types';
3
+ type PageControlsCaptions = {
4
+ page: string;
5
+ goTo: string;
6
+ goAction: string;
7
+ of: string;
8
+ };
9
+ export interface PageControlsProps {
10
+ activePage: number;
11
+ totalPages: number;
12
+ changePage: ChangePage;
13
+ captions: PageControlsCaptions;
14
+ }
15
+ export declare const PageControls: FC<PageControlsProps>;
16
+ export {};
@@ -0,0 +1 @@
1
+ export { PageNavigator } from './pageNavigator';
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ import { ChangePage } from '../../types';
3
+ export interface PageNavigatorProps {
4
+ activePage: number;
5
+ totalPages: number;
6
+ changePage: ChangePage;
7
+ }
8
+ export declare const PageNavigator: FC<PageNavigatorProps>;
@@ -0,0 +1 @@
1
+ export { PageSizeControl } from './pageSizeControl';
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import { ChangePageSize } from '../types';
3
+ interface PageSizeControlProps {
4
+ size: number;
5
+ sizeOptions: number[];
6
+ perPageText: string;
7
+ changeSize: ChangePageSize;
8
+ }
9
+ export declare const PageSizeControl: FC<PageSizeControlProps>;
10
+ export {};
@@ -0,0 +1 @@
1
+ export { SizeSelector } from './sizeSelector';
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ import { ChangePageSize } from '../../types';
3
+ export interface SizeSelectorProps {
4
+ currentSize: number;
5
+ options: number[];
6
+ onClickOption: ChangePageSize;
7
+ }
8
+ export declare const SizeSelector: FC<SizeSelectorProps>;
@@ -0,0 +1,22 @@
1
+ import { FC } from 'react';
2
+ import { ChangePageSize, ChangePage } from './types';
3
+ type PaginationCaptions = {
4
+ items?: string;
5
+ of?: string;
6
+ page?: string;
7
+ goTo?: string;
8
+ goAction?: string;
9
+ perPage?: string;
10
+ };
11
+ export interface PaginationProps {
12
+ activePage: number;
13
+ totalPages: number;
14
+ pageSize: number;
15
+ totalItems: number;
16
+ pageSizeOptions: number[];
17
+ changePage: ChangePage;
18
+ changePageSize: ChangePageSize;
19
+ captions?: PaginationCaptions;
20
+ }
21
+ export declare const Pagination: FC<PaginationProps>;
22
+ export {};
@@ -0,0 +1,2 @@
1
+ export type ChangePage = (page: number) => void;
2
+ export type ChangePageSize = (size: number) => void;
@@ -0,0 +1 @@
1
+ export { Popover } from './popover';
@@ -0,0 +1,18 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { Placement } from '@floating-ui/react';
3
+ interface PopoverProps {
4
+ className?: string;
5
+ content: ReactNode;
6
+ children: ReactNode;
7
+ placement?: Placement;
8
+ fallbackPlacements?: Placement[];
9
+ title?: string;
10
+ arrowOffset?: number;
11
+ safeZone?: number;
12
+ arrowColor?: string;
13
+ dataAutomationId?: string;
14
+ isOpened?: boolean;
15
+ setIsOpened?: (isOpened: boolean) => void;
16
+ }
17
+ export declare const Popover: FC<PopoverProps>;
18
+ export {};
@@ -0,0 +1,3 @@
1
+ import { Table } from './table';
2
+ export { Table };
3
+ export default Table;
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { TableComponentProps } from './types';
3
+ export declare const Table: FC<TableComponentProps>;
@@ -0,0 +1,46 @@
1
+ import { ReactNode } from 'react';
2
+ export interface Column {
3
+ key: string;
4
+ header: string;
5
+ }
6
+ export interface PrimaryColumn extends Column {
7
+ primary: boolean;
8
+ }
9
+ export interface FixedColumn extends Column {
10
+ width: string | number;
11
+ align?: 'left' | 'center' | 'right';
12
+ }
13
+ export interface RowConfigs {
14
+ size?: 'small' | 'medium' | 'large';
15
+ }
16
+ export interface DetailedCellData {
17
+ content: string | number;
18
+ component: ReactNode;
19
+ }
20
+ export interface RowData {
21
+ id: string | number;
22
+ [key: string]: DetailedCellData | RowConfigs | string | number | any;
23
+ rowConfigs?: RowConfigs;
24
+ }
25
+ export declare enum SortDirection {
26
+ ASC = "asc",
27
+ DESC = "desc"
28
+ }
29
+ export interface SortConfig {
30
+ key: string;
31
+ direction: SortDirection;
32
+ }
33
+ export interface TableComponentProps {
34
+ data: RowData[];
35
+ primaryColumn: Column;
36
+ fixedColumns: FixedColumn[];
37
+ rowActionMenu?: ReactNode;
38
+ selectable?: boolean;
39
+ className?: string;
40
+ selectedRowIds?: (string | number)[];
41
+ sortingDirection?: SortDirection;
42
+ sortingColumn?: Column;
43
+ onChangeSorting?: (sortConfig?: SortConfig) => void;
44
+ onToggleRowSelection?: (id: string | number) => void;
45
+ onToggleAllRowsSelection?: () => void;
46
+ }
@@ -0,0 +1,2 @@
1
+ import { RowData, SortConfig } from './types';
2
+ export declare const sortTableData: (tableData: RowData[], sortConfig?: SortConfig) => RowData[];
@@ -0,0 +1 @@
1
+ export { Tooltip } from './tooltip';
@@ -0,0 +1,13 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { Placement } from '@floating-ui/react-dom';
3
+ interface TooltipProps {
4
+ content: ReactNode;
5
+ children: ReactNode;
6
+ className?: string;
7
+ dynamicWidth?: boolean;
8
+ width?: number;
9
+ placement?: Placement;
10
+ dataAutomationId?: string;
11
+ }
12
+ export declare const Tooltip: FC<TooltipProps>;
13
+ export {};
@@ -0,0 +1,102 @@
1
+ import { jsx as t, jsxs as n, Fragment as q } from "react/jsx-runtime";
2
+ import * as l from "react";
3
+ import { forwardRef as F } from "react";
4
+ import { c as R } from "./bind-06a7ff84.js";
5
+ import "./baseIconButton-7bc53dec.js";
6
+ const j = (c) => /* @__PURE__ */ l.createElement("svg", { width: 17, height: 17, viewBox: "0 0 17 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...c }, /* @__PURE__ */ l.createElement("rect", { width: 16.2089, height: 16.1568, rx: 8.07842, fill: "#A2AAB5" }), /* @__PURE__ */ l.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5.14768 5.14645C4.95077 5.34171 4.95077 5.65829 5.14768 5.85355L7.49578 8.18198L5.35655 10.3033C5.15963 10.4986 5.15963 10.8151 5.35655 11.0104C5.55346 11.2057 5.87271 11.2057 6.06962 11.0104L8.20886 8.88909L10.1392 10.8033C10.3361 10.9986 10.6554 10.9986 10.8523 10.8033C11.0492 10.608 11.0492 10.2915 10.8523 10.0962L8.92193 8.18198L11.0612 6.06065C11.2581 5.86539 11.2581 5.54881 11.0612 5.35355C10.8643 5.15828 10.545 5.15828 10.3481 5.35355L8.20886 7.47487L5.86076 5.14645C5.66385 4.95118 5.34459 4.95118 5.14768 5.14645Z", fill: "white" })), y = "_label_18rqf_18", B = "_asterisk_18rqf_27", S = "_disabled_18rqf_33", M = "_field_18rqf_38", Z = "_error_18rqf_52", z = "_touched_18rqf_52", D = "_placeholder_18rqf_63", G = "_input_18rqf_70", H = "_icon_18rqf_1", J = "_text_18rqf_159", K = {
7
+ "icon-container": "_icon-container_18rqf_1",
8
+ "icon-container-end": "_icon-container-end_18rqf_1",
9
+ "icon-container-start": "_icon-container-start_18rqf_1",
10
+ label: y,
11
+ asterisk: B,
12
+ disabled: S,
13
+ field: M,
14
+ error: Z,
15
+ touched: z,
16
+ placeholder: D,
17
+ "default-width": "_default-width_18rqf_66",
18
+ "input-container": "_input-container_18rqf_70",
19
+ input: G,
20
+ icon: H,
21
+ "clear-icon": "_clear-icon_18rqf_116",
22
+ "additional-content": "_additional-content_18rqf_152",
23
+ text: J,
24
+ "error-text": "_error-text_18rqf_167",
25
+ "help-text": "_help-text_18rqf_171"
26
+ }, e = R.bind(K), U = F(
27
+ ({
28
+ value: c,
29
+ className: u,
30
+ error: a,
31
+ placeholder: o,
32
+ disabled: r = !1,
33
+ onChange: N,
34
+ touched: _ = !1,
35
+ title: w,
36
+ label: s,
37
+ helpText: i,
38
+ defaultWidth: C = !0,
39
+ startIcon: d,
40
+ endIcon: f,
41
+ clearable: L = !1,
42
+ onClear: h,
43
+ isRequired: p = !1,
44
+ hasDoubleMessage: g = !1,
45
+ type: k = "text",
46
+ displayError: v = !0,
47
+ ...E
48
+ }, b) => {
49
+ const A = () => {
50
+ h && h(c);
51
+ }, m = v && a && _, x = /* @__PURE__ */ t("span", { className: e("text", "help-text"), children: i });
52
+ return /* @__PURE__ */ n(q, { children: [
53
+ s && /* @__PURE__ */ n("span", { className: e("label", { disabled: r }), children: [
54
+ s,
55
+ p && /* @__PURE__ */ t("span", { className: e("asterisk"), children: "*" })
56
+ ] }),
57
+ /* @__PURE__ */ n(
58
+ "div",
59
+ {
60
+ className: e("field", u, {
61
+ error: a,
62
+ touched: _,
63
+ disabled: r,
64
+ "default-width": C
65
+ }),
66
+ title: w,
67
+ children: [
68
+ d && /* @__PURE__ */ t("span", { className: e("icon-container-start"), children: /* @__PURE__ */ t("span", { className: e("icon"), children: d }) }),
69
+ /* @__PURE__ */ n("span", { className: e("input-container"), children: [
70
+ /* @__PURE__ */ t(
71
+ "input",
72
+ {
73
+ ref: b,
74
+ type: k,
75
+ className: e("input"),
76
+ value: c,
77
+ disabled: r,
78
+ onChange: N,
79
+ ...E
80
+ }
81
+ ),
82
+ o && !c && /* @__PURE__ */ n("span", { className: e("placeholder"), children: [
83
+ o,
84
+ p && !s && /* @__PURE__ */ t("span", { className: e("asterisk") })
85
+ ] })
86
+ ] }),
87
+ f && /* @__PURE__ */ t("span", { className: e("icon-container-end"), children: /* @__PURE__ */ t("span", { className: e("icon"), children: f }) }),
88
+ L && /* @__PURE__ */ t("span", { className: e("icon-container-end"), children: /* @__PURE__ */ t("button", { type: "button", className: e("clear-icon", { disabled: r }), onClick: A, children: /* @__PURE__ */ t(j, {}) }) })
89
+ ]
90
+ }
91
+ ),
92
+ (m || i) && /* @__PURE__ */ t("div", { className: e("additional-content", { disabled: r }), children: m ? /* @__PURE__ */ n(q, { children: [
93
+ /* @__PURE__ */ t("span", { className: e("text", "error-text"), children: a }),
94
+ g && x
95
+ ] }) : i && x })
96
+ ] });
97
+ }
98
+ );
99
+ export {
100
+ U as F,
101
+ j as S
102
+ };
package/dist/fieldText.js CHANGED
@@ -1,4 +1,4 @@
1
- import { F as o } from "./fieldText-65a50d9d.js";
1
+ import { F as o } from "./fieldText-d80b29ba.js";
2
2
  import "react/jsx-runtime";
3
3
  import "react";
4
4
  import "./bind-06a7ff84.js";
@@ -0,0 +1,67 @@
1
+ import { jsxs as _, Fragment as u, jsx as r } from "react/jsx-runtime";
2
+ import { c as y } from "./bind-06a7ff84.js";
3
+ import { forwardRef as H, useId as I } from "react";
4
+ const E = "_error_cxv68_19", R = "_touched_cxv68_19", j = "_label_cxv68_30", O = "_disabled_cxv68_56", $ = {
5
+ "text-area": "_text-area_cxv68_1",
6
+ error: E,
7
+ touched: R,
8
+ label: j,
9
+ "additional-content": "_additional-content_cxv68_39",
10
+ "error-text": "_error-text_cxv68_39",
11
+ "help-text": "_help-text_cxv68_47",
12
+ disabled: O
13
+ }, t = y.bind($), w = 72, z = 2, G = H(
14
+ ({
15
+ value: o = "",
16
+ readonly: d = !1,
17
+ error: a = "",
18
+ placeholder: h = "",
19
+ disabled: e = !1,
20
+ touched: l = !1,
21
+ className: m = "",
22
+ label: n = "",
23
+ helpText: s = "",
24
+ onChange: p,
25
+ onFocus: f,
26
+ onBlur: g,
27
+ onKeyUp: v,
28
+ ...N
29
+ }, b) => {
30
+ const i = I(), x = a && l, F = (c) => {
31
+ c.target.style.height = `${w}px`, c.target.style.height = `${c.target.scrollHeight + z}px`;
32
+ };
33
+ return /* @__PURE__ */ _(u, { children: [
34
+ n && /* @__PURE__ */ r("label", { htmlFor: i, className: t("label", { disabled: e }), children: n }),
35
+ /* @__PURE__ */ r(
36
+ "textarea",
37
+ {
38
+ id: i,
39
+ ref: b,
40
+ className: t("text-area", m, {
41
+ disabled: e,
42
+ error: a,
43
+ touched: l
44
+ }),
45
+ value: o,
46
+ placeholder: h,
47
+ disabled: e,
48
+ readOnly: d,
49
+ onChange: p,
50
+ onFocus: f,
51
+ onBlur: g,
52
+ onKeyUp: v,
53
+ onInput: F,
54
+ ...N,
55
+ children: o
56
+ }
57
+ ),
58
+ (x || s) && /* @__PURE__ */ _("div", { className: t("additional-content", { disabled: e }), children: [
59
+ x && /* @__PURE__ */ r("span", { className: t("error-text"), children: a }),
60
+ s && /* @__PURE__ */ r("span", { className: t("help-text"), children: s })
61
+ ] })
62
+ ] });
63
+ }
64
+ );
65
+ export {
66
+ G as F
67
+ };
@@ -0,0 +1,8 @@
1
+ import { F as o } from "./fieldTextFlex-5bddf46a.js";
2
+ import "react/jsx-runtime";
3
+ import "./bind-06a7ff84.js";
4
+ import "react";
5
+ export {
6
+ o as FieldTextFlex,
7
+ o as default
8
+ };
@@ -6,7 +6,7 @@ import { AnimatePresence as D, motion as I } from "framer-motion";
6
6
  import { c as m } from "./bind-06a7ff84.js";
7
7
  import { u as K } from "./useOnClickOutside-c332f7d3.js";
8
8
  import { K as F } from "./keyCodes-f63c0e11.js";
9
- import { B as C } from "./button-497b4d19.js";
9
+ import { B as C } from "./button-7fb84fde.js";
10
10
  import { B as P } from "./baseIconButton-7bc53dec.js";
11
11
  const G = (t) => /* @__PURE__ */ y.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ y.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.732179 15.2698C0.330639 14.8683 0.33064 14.2172 0.73218 13.8157L6.54858 7.99928L0.73218 2.18288C0.33064 1.78134 0.330639 1.13031 0.732179 0.728774C1.13372 0.327235 1.78474 0.327235 2.18628 0.728774L8.00269 6.54518L13.8191 0.728767C14.2206 0.327229 14.8717 0.327228 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.18628 15.2698C1.78474 15.6713 1.13372 15.6713 0.732179 15.2698Z", fill: "#A2AAB5" })), X = () => {
12
12
  const [t, a] = w({ width: 0, height: 0 });