@reportportal/ui-kit 0.0.1-alpha.114 → 0.0.1-alpha.116

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.
@@ -4,6 +4,7 @@ import "./bind-06a7ff84.js";
4
4
  import "react";
5
5
  import "./popover.js";
6
6
  import "@floating-ui/react";
7
+ import "./floatingUi-41f8c7b5.js";
7
8
  import "./tree-c3dd3d45.js";
8
9
  export {
9
10
  m as Breadcrumbs,
@@ -0,0 +1,8 @@
1
+ import { Placement } from '@floating-ui/react';
2
+
3
+ export declare const TRIANGLE_WIDTH = 16;
4
+ export declare const TRIANGLE_HEIGHT = 8;
5
+ export declare const ARROW_OFFSET = 16;
6
+ export declare const middlePlacements: Placement[];
7
+ export declare const verticalPlacements: Placement[];
8
+ export declare const allPlacements: Placement[];
@@ -0,0 +1,3 @@
1
+ import { Placement, ElementRects } from '@floating-ui/react';
2
+
3
+ export declare const getAlignmentAxisOffset: (rects: ElementRects, currentPlacement: Placement, arrowOffset?: number, isCentered?: boolean) => number;
@@ -1,2 +1,3 @@
1
1
  export { getFileExtension } from './getFileExtension';
2
2
  export { isString } from './isString';
3
+ export { getAlignmentAxisOffset } from './floatingUi';
@@ -3,6 +3,7 @@ import { ControllerStateAndHelpers } from 'downshift';
3
3
  import { default as FieldText } from '../../fieldText';
4
4
  import { AutocompleteMenu } from '../common/autocompleteMenu';
5
5
  import { DownshiftStore, MultipleDownshiftProps } from './multipleDownshift';
6
+ import { GetItemPropsT } from '../types';
6
7
 
7
8
  export interface MultipleAutocompleteProps<T> {
8
9
  options: T[];
@@ -14,6 +15,7 @@ export interface MultipleAutocompleteProps<T> {
14
15
  touched: boolean;
15
16
  creatable: boolean;
16
17
  editable: boolean;
18
+ renderOption?: (value: T, index: number, isNew: boolean, getItemProps: GetItemPropsT<T>) => ReactNode;
17
19
  onChange: (selectedItems: T | T[] | null, downshift: ControllerStateAndHelpers<T> | null) => void;
18
20
  onFocus: () => void;
19
21
  onBlur: () => void;
@@ -2,6 +2,7 @@ import { ComponentProps, FocusEvent, ReactNode, Ref } from 'react';
2
2
  import { default as Downshift, DownshiftState, StateChangeOptions } from 'downshift';
3
3
  import { default as FieldText } from '../../fieldText';
4
4
  import { AutocompleteMenu } from '../common/autocompleteMenu';
5
+ import { GetItemPropsT } from '../types';
5
6
 
6
7
  export interface SingleAutocompleteProps<T> {
7
8
  options: T[];
@@ -15,7 +16,7 @@ export interface SingleAutocompleteProps<T> {
15
16
  disabled: boolean;
16
17
  inputProps: ComponentProps<typeof FieldText>;
17
18
  parseValueToString: (value: T | null) => string;
18
- renderOption: (value: T) => ReactNode;
19
+ renderOption?: (value: T, index: number, isNew: boolean, getItemProps: GetItemPropsT<T>) => ReactNode;
19
20
  minLength: number;
20
21
  maxLength: number | null;
21
22
  async: boolean;
@@ -7,6 +7,7 @@ export interface Column {
7
7
  }
8
8
  export interface PrimaryColumn extends Column {
9
9
  primary: boolean;
10
+ width?: string | number;
10
11
  }
11
12
  export interface FixedColumn extends Column {
12
13
  width: string | number;
@@ -0,0 +1,29 @@
1
+ const o = 16, a = 8, l = 16, i = ["top", "right", "bottom", "left"], r = [
2
+ "right",
3
+ "right-start",
4
+ "right-end",
5
+ "left",
6
+ "left-start",
7
+ "left-end"
8
+ ], c = [
9
+ "top",
10
+ "top-start",
11
+ "top-end",
12
+ "right",
13
+ "right-start",
14
+ "right-end",
15
+ "bottom",
16
+ "bottom-start",
17
+ "bottom-end",
18
+ "left",
19
+ "left-start",
20
+ "left-end"
21
+ ], g = (t, n, e = 16, s = !0) => s ? ((r.includes(n) ? t.reference.height : t.reference.width) - 16) / 2 - e : -e;
22
+ export {
23
+ l as A,
24
+ a as T,
25
+ o as a,
26
+ c as b,
27
+ g,
28
+ i as m
29
+ };
package/dist/index.js CHANGED
@@ -1,43 +1,43 @@
1
- import { A as P } from "./index-1a874a8b.js";
2
- import { B as F } from "./baseIconButton-251479f7.js";
3
- import { B as D } from "./breadcrumbs-8e5ca8d7.js";
4
- import { B as y } from "./bubblesLoader-f3ffa240.js";
5
- import { B as h } from "./button-97d9e587.js";
6
- import { C as B } from "./checkbox-ed6cc375.js";
7
- import { D as w } from "./datePicker-efa4e2d6.js";
1
+ import { A as C } from "./index-1a874a8b.js";
2
+ import { B as g } from "./baseIconButton-251479f7.js";
3
+ import { B as b } from "./breadcrumbs-8e5ca8d7.js";
4
+ import { B as T } from "./bubblesLoader-f3ffa240.js";
5
+ import { B as A } from "./button-97d9e587.js";
6
+ import { C as v } from "./checkbox-ed6cc375.js";
7
+ import { D as M } from "./datePicker-efa4e2d6.js";
8
8
  import "react-datepicker";
9
- import { D as k } from "./dropdown-ec754bbe.js";
10
- import { FieldLabel as L } from "./fieldLabel.js";
11
- import { F as R } from "./fieldNumber-d1b5a7a1.js";
12
- import { F as J } from "./fieldText-ba8a917c.js";
13
- import { F as U } from "./fieldTextFlex-2f51c173.js";
14
- import { FileDropArea as G } from "./fileDropArea.js";
15
- import { Modal as X } from "./modal.js";
16
- import { MultipleAutocomplete as q, SingleAutocomplete as K } from "./autocompletes.js";
17
- import { P as V } from "./pagination-43330c73.js";
18
- import { Popover as Z } from "./popover.js";
19
- import { R as $ } from "./radio-62546efa.js";
20
- import { S as ro } from "./selection-9124d029.js";
21
- import { S as no } from "./spinLoader-c4a53718.js";
22
- import { SystemAlert as ao } from "./systemAlert.js";
23
- import { S as po } from "./systemMessage-924fdaa6.js";
24
- import { T as mo } from "./table-ea578f47.js";
25
- import { T as so } from "./themeProvider-46c2be7b.js";
26
- import { T as xo } from "./toggle-304107fa.js";
27
- import { Tooltip as uo } from "./tooltip.js";
28
- import { SidePanel as Po } from "./sidePanel.js";
29
- import { AddCsvIcon as Fo, AddImageIcon as go, AddJarIcon as Do, BreadcrumbsTreeIcon as bo, CalendarIcon as yo, CheckmarkIcon as To, ChevronRightBreadcrumbsIcon as ho, ConfigurationIcon as Ao, CopyIcon as Bo, CoveredManuallyIcon as vo, DeleteIcon as wo, DragAndDropIcon as Mo, DragNDropIcon as ko, DurationIcon as Eo, EditIcon as Lo, ExportIcon as Oo, FilterFilledIcon as Ro, FilterOutlineIcon as Ho, FlagIcon as Jo, GroupByIcon as No, HideIcon as Uo, LaunchTypeIcon as zo, MaximizeIcon as Go, MoveToFolderIcon as Wo, OwnerIcon as Xo, PinFilledIcon as jo, PinOutlineIcon as qo, PriorityBlockerIcon as Ko, PriorityCriticalIcon as Qo, PriorityHighIcon as Vo, PriorityLowIcon as Yo, PriorityMediumIcon as Zo, PriorityUnspecifiedIcon as _o, RefreshIcon as $o, RerunIcon as or, SearchIcon as rr, SortIcon as er, StatusSuccessIcon as nr, TestPlanIcon as tr, WarningIcon as ar } from "./icons.js";
30
- import { S as pr, a as ir, b as mr } from "./chevronDownDropdown-66f5b1af.js";
31
- import { S as sr } from "./calendarArrow-44c7e60e.js";
32
- import { S as xr, a as fr, b as dr } from "./openEye-7b9cf080.js";
33
- import { S as Sr } from "./close-4d480ef7.js";
34
- import { S as Cr, a as Fr, b as gr, c as Dr, d as br, e as yr, f as Tr } from "./xls-995781cc.js";
35
- import { S as Ar } from "./dropdown-0260bb66.js";
36
- import { S as vr, a as wr, b as Mr } from "./success-8fd8bd2c.js";
37
- import { S as Er, a as Lr } from "./tree-c3dd3d45.js";
38
- import { S as Rr } from "./minus-2857540f.js";
39
- import { S as Jr } from "./plus-199fb2a8.js";
40
- import { S as Ur, a as zr } from "./prevPage-87faf576.js";
9
+ import { D as E } from "./dropdown-ec754bbe.js";
10
+ import { FieldLabel as O } from "./fieldLabel.js";
11
+ import { F as H } from "./fieldNumber-d1b5a7a1.js";
12
+ import { F as N } from "./fieldText-ba8a917c.js";
13
+ import { F as z } from "./fieldTextFlex-2f51c173.js";
14
+ import { FileDropArea as W } from "./fileDropArea.js";
15
+ import { Modal as j } from "./modal.js";
16
+ import { MultipleAutocomplete as K, SingleAutocomplete as Q } from "./autocompletes.js";
17
+ import { P as Y } from "./pagination-43330c73.js";
18
+ import { Popover as _ } from "./popover.js";
19
+ import { R as oo } from "./radio-62546efa.js";
20
+ import { S as eo } from "./selection-9124d029.js";
21
+ import { S as to } from "./spinLoader-c4a53718.js";
22
+ import { SystemAlert as co } from "./systemAlert.js";
23
+ import { S as io } from "./systemMessage-924fdaa6.js";
24
+ import { T as Io } from "./table-8e223d5d.js";
25
+ import { T as lo } from "./themeProvider-46c2be7b.js";
26
+ import { T as fo } from "./toggle-304107fa.js";
27
+ import { Tooltip as So } from "./tooltip.js";
28
+ import { SidePanel as Co } from "./sidePanel.js";
29
+ import { AddCsvIcon as go, AddImageIcon as Do, AddJarIcon as bo, BreadcrumbsTreeIcon as yo, CalendarIcon as To, CheckmarkIcon as ho, ChevronRightBreadcrumbsIcon as Ao, ConfigurationIcon as Bo, CopyIcon as vo, CoveredManuallyIcon as wo, DeleteIcon as Mo, DragAndDropIcon as ko, DragNDropIcon as Eo, DurationIcon as Lo, EditIcon as Oo, ExportIcon as Ro, FilterFilledIcon as Ho, FilterOutlineIcon as Jo, FlagIcon as No, GroupByIcon as Uo, HideIcon as zo, LaunchTypeIcon as Go, MaximizeIcon as Wo, MoveToFolderIcon as Xo, OwnerIcon as jo, PinFilledIcon as qo, PinOutlineIcon as Ko, PriorityBlockerIcon as Qo, PriorityCriticalIcon as Vo, PriorityHighIcon as Yo, PriorityLowIcon as Zo, PriorityMediumIcon as _o, PriorityUnspecifiedIcon as $o, RefreshIcon as or, RerunIcon as rr, SearchIcon as er, SortIcon as nr, StatusSuccessIcon as tr, TestPlanIcon as ar, WarningIcon as cr } from "./icons.js";
30
+ import { S as ir, a as mr, b as Ir } from "./chevronDownDropdown-66f5b1af.js";
31
+ import { S as lr } from "./calendarArrow-44c7e60e.js";
32
+ import { S as fr, a as dr, b as ur } from "./openEye-7b9cf080.js";
33
+ import { S as Pr } from "./close-4d480ef7.js";
34
+ import { S as Fr, a as gr, b as Dr, c as br, d as yr, e as Tr, f as hr } from "./xls-995781cc.js";
35
+ import { S as Br } from "./dropdown-0260bb66.js";
36
+ import { S as wr, a as Mr, b as kr } from "./success-8fd8bd2c.js";
37
+ import { S as Lr, a as Or } from "./tree-c3dd3d45.js";
38
+ import { S as Hr } from "./minus-2857540f.js";
39
+ import { S as Nr } from "./plus-199fb2a8.js";
40
+ import { S as zr, a as Gr } from "./prevPage-87faf576.js";
41
41
  import "react/jsx-runtime";
42
42
  import "react";
43
43
  import "./bind-06a7ff84.js";
@@ -52,99 +52,100 @@ import "./isEmpty-ccacb5ff.js";
52
52
  import "react-dropzone";
53
53
  import "framer-motion";
54
54
  import "@floating-ui/react";
55
+ import "./floatingUi-41f8c7b5.js";
55
56
  import "react-dom";
56
57
  export {
57
- Fo as AddCsvIcon,
58
- go as AddImageIcon,
59
- Do as AddJarIcon,
60
- pr as ArrowDownIcon,
61
- ir as ArrowUpIcon,
62
- P as AttachedFile,
63
- F as BaseIconButton,
64
- D as Breadcrumbs,
65
- bo as BreadcrumbsTreeIcon,
66
- y as BubblesLoader,
67
- h as Button,
68
- sr as CalendarArrowIcon,
69
- yo as CalendarIcon,
70
- B as Checkbox,
71
- To as CheckmarkIcon,
72
- mr as ChevronDownDropdownIcon,
73
- ho as ChevronRightBreadcrumbsIcon,
74
- xr as ClearIcon,
75
- fr as CloseEyeIcon,
76
- Sr as CloseIcon,
77
- Ao as ConfigurationIcon,
78
- Bo as CopyIcon,
79
- vo as CoveredManuallyIcon,
80
- Cr as CsvIcon,
81
- w as DatePicker,
82
- wo as DeleteIcon,
83
- Mo as DragAndDropIcon,
84
- ko as DragNDropIcon,
85
- k as Dropdown,
86
- Ar as DropdownIcon,
87
- Eo as DurationIcon,
88
- Lo as EditIcon,
89
- vr as ErrorIcon,
90
- Oo as ExportIcon,
91
- Fr as ExternalLinkIcon,
92
- L as FieldLabel,
93
- R as FieldNumber,
94
- J as FieldText,
95
- U as FieldTextFlex,
96
- G as FileDropArea,
97
- gr as FileOtherIcon,
98
- Ro as FilterFilledIcon,
99
- Ho as FilterOutlineIcon,
100
- Jo as FlagIcon,
101
- No as GroupByIcon,
102
- Uo as HideIcon,
103
- Dr as ImageIcon,
104
- wr as InfoIcon,
105
- br as JarIcon,
106
- zo as LaunchTypeIcon,
107
- Go as MaximizeIcon,
108
- Er as MeatballMenuIcon,
109
- Rr as MinusIcon,
110
- X as Modal,
111
- Wo as MoveToFolderIcon,
112
- q as MultipleAutocomplete,
113
- dr as OpenEyeIcon,
114
- Xo as OwnerIcon,
115
- V as Pagination,
116
- yr as PdfIcon,
117
- jo as PinFilledIcon,
118
- qo as PinOutlineIcon,
119
- Jr as PlusIcon,
120
- Z as Popover,
121
- Ur as PrevChapterIcon,
122
- zr as PrevPageIcon,
123
- Ko as PriorityBlockerIcon,
124
- Qo as PriorityCriticalIcon,
125
- Vo as PriorityHighIcon,
126
- Yo as PriorityLowIcon,
127
- Zo as PriorityMediumIcon,
128
- _o as PriorityUnspecifiedIcon,
129
- $ as Radio,
130
- $o as RefreshIcon,
131
- or as RerunIcon,
132
- rr as SearchIcon,
133
- ro as Selection,
134
- Po as SidePanel,
135
- K as SingleAutocomplete,
136
- er as SortIcon,
137
- no as SpinLoader,
138
- nr as StatusSuccessIcon,
139
- Mr as SuccessIcon,
140
- ao as SystemAlert,
141
- po as SystemMessage,
142
- mo as Table,
143
- tr as TestPlanIcon,
144
- so as ThemeProvider,
145
- xo as Toggle,
146
- uo as Tooltip,
147
- Lr as TreeIcon,
148
- ar as WarningIcon,
149
- Tr as XlsIcon
58
+ go as AddCsvIcon,
59
+ Do as AddImageIcon,
60
+ bo as AddJarIcon,
61
+ ir as ArrowDownIcon,
62
+ mr as ArrowUpIcon,
63
+ C as AttachedFile,
64
+ g as BaseIconButton,
65
+ b as Breadcrumbs,
66
+ yo as BreadcrumbsTreeIcon,
67
+ T as BubblesLoader,
68
+ A as Button,
69
+ lr as CalendarArrowIcon,
70
+ To as CalendarIcon,
71
+ v as Checkbox,
72
+ ho as CheckmarkIcon,
73
+ Ir as ChevronDownDropdownIcon,
74
+ Ao as ChevronRightBreadcrumbsIcon,
75
+ fr as ClearIcon,
76
+ dr as CloseEyeIcon,
77
+ Pr as CloseIcon,
78
+ Bo as ConfigurationIcon,
79
+ vo as CopyIcon,
80
+ wo as CoveredManuallyIcon,
81
+ Fr as CsvIcon,
82
+ M as DatePicker,
83
+ Mo as DeleteIcon,
84
+ ko as DragAndDropIcon,
85
+ Eo as DragNDropIcon,
86
+ E as Dropdown,
87
+ Br as DropdownIcon,
88
+ Lo as DurationIcon,
89
+ Oo as EditIcon,
90
+ wr as ErrorIcon,
91
+ Ro as ExportIcon,
92
+ gr as ExternalLinkIcon,
93
+ O as FieldLabel,
94
+ H as FieldNumber,
95
+ N as FieldText,
96
+ z as FieldTextFlex,
97
+ W as FileDropArea,
98
+ Dr as FileOtherIcon,
99
+ Ho as FilterFilledIcon,
100
+ Jo as FilterOutlineIcon,
101
+ No as FlagIcon,
102
+ Uo as GroupByIcon,
103
+ zo as HideIcon,
104
+ br as ImageIcon,
105
+ Mr as InfoIcon,
106
+ yr as JarIcon,
107
+ Go as LaunchTypeIcon,
108
+ Wo as MaximizeIcon,
109
+ Lr as MeatballMenuIcon,
110
+ Hr as MinusIcon,
111
+ j as Modal,
112
+ Xo as MoveToFolderIcon,
113
+ K as MultipleAutocomplete,
114
+ ur as OpenEyeIcon,
115
+ jo as OwnerIcon,
116
+ Y as Pagination,
117
+ Tr as PdfIcon,
118
+ qo as PinFilledIcon,
119
+ Ko as PinOutlineIcon,
120
+ Nr as PlusIcon,
121
+ _ as Popover,
122
+ zr as PrevChapterIcon,
123
+ Gr as PrevPageIcon,
124
+ Qo as PriorityBlockerIcon,
125
+ Vo as PriorityCriticalIcon,
126
+ Yo as PriorityHighIcon,
127
+ Zo as PriorityLowIcon,
128
+ _o as PriorityMediumIcon,
129
+ $o as PriorityUnspecifiedIcon,
130
+ oo as Radio,
131
+ or as RefreshIcon,
132
+ rr as RerunIcon,
133
+ er as SearchIcon,
134
+ eo as Selection,
135
+ Co as SidePanel,
136
+ Q as SingleAutocomplete,
137
+ nr as SortIcon,
138
+ to as SpinLoader,
139
+ tr as StatusSuccessIcon,
140
+ kr as SuccessIcon,
141
+ co as SystemAlert,
142
+ io as SystemMessage,
143
+ Io as Table,
144
+ ar as TestPlanIcon,
145
+ lo as ThemeProvider,
146
+ fo as Toggle,
147
+ So as Tooltip,
148
+ Or as TreeIcon,
149
+ cr as WarningIcon,
150
+ hr as XlsIcon
150
151
  };
package/dist/modal.js CHANGED
@@ -11,6 +11,7 @@ import { B as J } from "./baseIconButton-251479f7.js";
11
11
  import { S as Q } from "./close-4d480ef7.js";
12
12
  import "react-dom";
13
13
  import "@floating-ui/react";
14
+ import "./floatingUi-41f8c7b5.js";
14
15
  const V = () => {
15
16
  const [o, n] = p({ width: 0, height: 0 });
16
17
  return b(() => {
@@ -77,7 +78,7 @@ const V = () => {
77
78
  "size-default": "_size-default_yxql5_57",
78
79
  "size-small": "_size-small_yxql5_69",
79
80
  "size-large": "_size-large_yxql5_81"
80
- }, f = y.bind(ce), re = 0.9, me = 32 + 24, _e = 32 + 8, he = 36 + 16, ue = 32 * 2, ze = ({
81
+ }, f = y.bind(ce), re = 0.9, me = 32 + 24, _e = 32 + 8, he = 36 + 16, ue = 32 * 2, Ae = ({
81
82
  title: o,
82
83
  children: n,
83
84
  footerNode: l,
@@ -148,7 +149,7 @@ const V = () => {
148
149
  ) }) });
149
150
  };
150
151
  export {
151
- ze as Modal,
152
+ Ae as Modal,
152
153
  C as ModalContent,
153
154
  ne as ModalFooter,
154
155
  ae as ModalHeader
@@ -4,6 +4,7 @@ import "./bind-06a7ff84.js";
4
4
  import "react";
5
5
  import "./popover.js";
6
6
  import "@floating-ui/react";
7
+ import "./floatingUi-41f8c7b5.js";
7
8
  import "./button-97d9e587.js";
8
9
  import "./fieldText-ba8a917c.js";
9
10
  import "./openEye-7b9cf080.js";
package/dist/popover.js CHANGED
@@ -1,99 +1,80 @@
1
- import { jsxs as f, Fragment as S, jsx as n } from "react/jsx-runtime";
2
- import { useRef as j, useState as C, useCallback as L } from "react";
3
- import { useFloating as M, offset as U, flip as W, arrow as q, autoUpdate as z, useClick as B, useDismiss as J, useRole as K, useInteractions as Q, FloatingFocusManager as V, FloatingArrow as X } from "@floating-ui/react";
4
- import { c as Y } from "./bind-06a7ff84.js";
5
- const Z = "_popover_n3nff_1", $ = "_title_n3nff_28", O = {
1
+ import { jsxs as f, Fragment as G, jsx as s } from "react/jsx-runtime";
2
+ import { useRef as H, useState as O, useCallback as j } from "react";
3
+ import { useFloating as C, offset as L, flip as M, arrow as W, autoUpdate as U, useClick as q, useDismiss as z, useRole as B, useInteractions as J, FloatingFocusManager as K, FloatingArrow as Q } from "@floating-ui/react";
4
+ import { c as V } from "./bind-06a7ff84.js";
5
+ import { g as X, T as g, a as Y, m as Z, b as $, A as ee } from "./floatingUi-41f8c7b5.js";
6
+ const te = "_popover_n3nff_1", se = "_title_n3nff_28", oe = {
6
7
  "popover-wrapper": "_popover-wrapper_n3nff_1",
7
- popover: Z,
8
- title: $
9
- }, r = Y.bind(O), d = 16, g = 8, tt = ["top", "right", "bottom", "left"], et = [
10
- "right",
11
- "right-start",
12
- "right-end",
13
- "left",
14
- "left-start",
15
- "left-end"
16
- ], ot = [
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
- ], it = ({
30
- className: h,
31
- content: u,
32
- children: v,
33
- placement: _ = "bottom",
34
- fallbackPlacements: b = ot,
8
+ popover: te,
9
+ title: se
10
+ }, l = V.bind(oe), ce = ({
11
+ className: u,
12
+ content: d,
13
+ children: _,
14
+ placement: v = "bottom",
15
+ fallbackPlacements: A = $,
35
16
  title: i,
36
- arrowOffset: o = 16,
37
- safeZone: w = 4,
17
+ arrowOffset: o = ee,
18
+ safeZone: h = 4,
38
19
  arrowColor: x = "white",
39
- dataAutomationId: A,
40
- isOpened: F,
41
- setIsOpened: s,
42
- isCentered: a = !0
20
+ dataAutomationId: F,
21
+ isOpened: R,
22
+ setIsOpened: n,
23
+ isCentered: r = !0
43
24
  }) => {
44
- const c = j(null), [R, N] = C(!1), p = s ? F : R, P = (t) => {
45
- s ? s(t) : N(t);
46
- }, k = L(
47
- (t, l) => a ? ((et.includes(l) ? t.reference.height : t.reference.width) - d) / 2 - o : -o,
48
- [o, a]
49
- ), { placement: E, refs: m, floatingStyles: I, context: e } = M({
25
+ const c = H(null), [w, N] = O(!1), p = n ? R : w, T = (e) => {
26
+ n ? n(e) : N(e);
27
+ }, b = j(
28
+ (e, a) => X(e, a, o, r),
29
+ [o, r]
30
+ ), { placement: E, refs: m, floatingStyles: P, context: t } = C({
50
31
  open: p,
51
- onOpenChange: P,
52
- placement: _,
32
+ onOpenChange: T,
33
+ placement: v,
53
34
  middleware: [
54
- U(({ rects: t, placement: l }) => ({
55
- mainAxis: w + g,
56
- alignmentAxis: k(t, l)
35
+ L(({ rects: e, placement: a }) => ({
36
+ mainAxis: h + g,
37
+ alignmentAxis: b(e, a)
57
38
  })),
58
- W({
39
+ M({
59
40
  fallbackAxisSideDirection: "start",
60
- fallbackPlacements: b
41
+ fallbackPlacements: A
61
42
  }),
62
- q({
43
+ W({
63
44
  element: c
64
45
  })
65
46
  ],
66
- whileElementsMounted: z
67
- }), T = B(e), y = J(e), D = K(e), { getReferenceProps: G, getFloatingProps: H } = Q([T, y, D]);
68
- return /* @__PURE__ */ f(S, { children: [
69
- /* @__PURE__ */ n("div", { ref: m.setReference, ...G(), className: r("popover-wrapper"), children: v }),
70
- p && /* @__PURE__ */ n(V, { context: e, modal: !1, children: /* @__PURE__ */ f(
47
+ whileElementsMounted: U
48
+ }), k = q(t), I = z(t), S = B(t), { getReferenceProps: y, getFloatingProps: D } = J([k, I, S]);
49
+ return /* @__PURE__ */ f(G, { children: [
50
+ /* @__PURE__ */ s("div", { ref: m.setReference, ...y(), className: l("popover-wrapper"), children: _ }),
51
+ p && /* @__PURE__ */ s(K, { context: t, modal: !1, children: /* @__PURE__ */ f(
71
52
  "div",
72
53
  {
73
- className: r("popover", h),
74
- "data-automation-id": A,
54
+ className: l("popover", u),
55
+ "data-automation-id": F,
75
56
  ref: m.setFloating,
76
- style: I,
77
- ...H,
57
+ style: P,
58
+ ...D,
78
59
  children: [
79
- /* @__PURE__ */ n(
80
- X,
60
+ /* @__PURE__ */ s(
61
+ Q,
81
62
  {
82
63
  ref: c,
83
- context: e,
84
- width: d,
64
+ context: t,
65
+ width: Y,
85
66
  height: g,
86
67
  fill: x,
87
- staticOffset: tt.includes(E) ? null : o
68
+ staticOffset: Z.includes(E) ? null : o
88
69
  }
89
70
  ),
90
- i && /* @__PURE__ */ n("div", { className: r("title"), children: i }),
91
- u
71
+ i && /* @__PURE__ */ s("div", { className: l("title"), children: i }),
72
+ d
92
73
  ]
93
74
  }
94
75
  ) })
95
76
  ] });
96
77
  };
97
78
  export {
98
- it as Popover
79
+ ce as Popover
99
80
  };