@reportportal/ui-kit 0.0.1-alpha.4 → 0.0.1-alpha.41
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.
- package/LICENSE +201 -201
- package/README.md +252 -3
- package/dist/baseIconButton-b6adc843.js +25 -0
- package/dist/baseIconButton.js +7 -0
- package/dist/bubblesLoader-a7e709d4.js +17 -0
- package/dist/bubblesLoader.js +7 -0
- package/dist/button-33c88abf.js +62 -0
- package/dist/button.js +1 -1
- package/dist/calendar-f154eb78.js +6 -0
- package/dist/checkbox-9a6c7ce1.js +73 -0
- package/dist/checkbox.js +2 -2
- package/dist/common/constants/keyCodes.d.ts +24 -0
- package/dist/components/bubblesLoader/bubblesLoader.d.ts +7 -0
- package/dist/components/bubblesLoader/index.d.ts +3 -0
- package/dist/components/button/button.d.ts +0 -1
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/checkbox/checkbox.d.ts +2 -1
- package/dist/components/dataPicker2/dataPicker2/datePicker.d.ts +24 -0
- package/dist/components/dataPicker2/dataPicker2/header/datePickerHeader.d.ts +15 -0
- package/dist/components/dataPicker2/dataPicker2/header/index.d.ts +3 -0
- package/dist/components/dataPicker2/dataPicker2/index.d.ts +3 -0
- package/dist/components/dataPicker2/dataPicker2/utils.d.ts +3 -0
- package/dist/components/date2/date2.d.ts +24 -0
- package/dist/components/date2/index.d.ts +3 -0
- package/dist/components/datePicker/datePicker.d.ts +24 -0
- package/dist/components/datePicker/header/datePickerHeader.d.ts +15 -0
- package/dist/components/datePicker/header/index.d.ts +3 -0
- package/dist/components/datePicker/index.d.ts +3 -0
- package/dist/components/datePicker/utils.d.ts +3 -0
- package/dist/components/datePicker1/datePicker.d.ts +24 -0
- package/dist/components/datePicker1/header/datePickerHeader.d.ts +15 -0
- package/dist/components/datePicker1/header/index.d.ts +3 -0
- package/dist/components/datePicker1/index.d.ts +3 -0
- package/dist/components/datePicker1/utils.d.ts +3 -0
- package/dist/components/dropdown/constants.d.ts +7 -0
- package/dist/components/dropdown/dropdown.d.ts +28 -0
- package/dist/components/dropdown/dropdownOption/dropdownOption.d.ts +3 -0
- package/dist/components/dropdown/dropdownOption/index.d.ts +3 -0
- package/dist/components/dropdown/index.d.ts +3 -0
- package/dist/components/dropdown/types.d.ts +22 -0
- package/dist/components/dropdown/utils.d.ts +4 -0
- package/dist/components/fieldNumber/constants.d.ts +4 -0
- package/dist/components/fieldNumber/fieldNumber.d.ts +18 -0
- package/dist/components/fieldNumber/index.d.ts +3 -0
- package/dist/components/fieldText/fieldText.d.ts +8 -3
- package/dist/components/fieldTextFlex/fieldTextFlex.d.ts +14 -0
- package/dist/components/fieldTextFlex/index.d.ts +3 -0
- package/dist/components/icons/baseIconButton/baseIconButton.d.ts +8 -0
- package/dist/components/icons/baseIconButton/index.d.ts +4 -0
- package/dist/components/icons/index.d.ts +21 -0
- package/dist/components/index.d.ts +17 -0
- package/dist/components/modal/modal.d.ts +6 -2
- package/dist/components/modal/modalContent/modalContent.d.ts +1 -0
- package/dist/components/modal/modalHeader/modalHeader.d.ts +1 -1
- package/dist/components/pagination/index.d.ts +4 -0
- package/dist/components/pagination/itemsCounter/index.d.ts +1 -0
- package/dist/components/pagination/itemsCounter/itemCounter.d.ts +9 -0
- package/dist/components/pagination/pageControls/activePage/activePage.d.ts +12 -0
- package/dist/components/pagination/pageControls/activePage/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/activePage/pageSelector/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/activePage/pageSelector/pageSelector.d.ts +10 -0
- package/dist/components/pagination/pageControls/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageControls.d.ts +16 -0
- package/dist/components/pagination/pageControls/pageNavigator/bar/bar.d.ts +11 -0
- package/dist/components/pagination/pageControls/pageNavigator/bar/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +11 -0
- package/dist/components/pagination/pageSizeControl/index.d.ts +1 -0
- package/dist/components/pagination/pageSizeControl/pageSizeControl.d.ts +10 -0
- package/dist/components/pagination/pageSizeControl/sizeSelector/index.d.ts +1 -0
- package/dist/components/pagination/pageSizeControl/sizeSelector/sizeSelector.d.ts +8 -0
- package/dist/components/pagination/pagination.d.ts +22 -0
- package/dist/components/pagination/types.d.ts +2 -0
- package/dist/components/popover/index.d.ts +1 -0
- package/dist/components/popover/popover.d.ts +18 -0
- package/dist/components/radio/index.d.ts +4 -0
- package/dist/components/radio/radio.d.ts +16 -0
- package/dist/components/radio/radioGroup.d.ts +8 -0
- package/dist/components/spinLoader/index.d.ts +3 -0
- package/dist/components/spinLoader/spinLoader.d.ts +7 -0
- package/dist/components/systemAlert/index.d.ts +1 -0
- package/dist/components/systemAlert/systemAlert.d.ts +3 -0
- package/dist/components/systemAlert/types.d.ts +14 -0
- package/dist/components/table/index.d.ts +3 -0
- package/dist/components/table/table.d.ts +3 -0
- package/dist/components/table/types.d.ts +53 -0
- package/dist/components/table/utils.d.ts +3 -0
- package/dist/components/themeProvider/themeProvider.d.ts +2 -1
- package/dist/components/toggle/index.d.ts +3 -0
- package/dist/components/toggle/toggle.d.ts +11 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip/tooltip.d.ts +19 -0
- package/dist/date2-9273411e.js +46 -0
- package/dist/date2.js +7 -0
- package/dist/datePicker-a005ebc6.js +194 -0
- package/dist/datePicker-e85bee1d.js +194 -0
- package/dist/datePicker.js +19 -0
- package/dist/datePicker1.js +19 -0
- package/dist/dropdown-9f4d1928.js +245 -0
- package/dist/dropdown.js +15 -0
- package/dist/fieldNumber-1f286b40.js +127 -0
- package/dist/fieldNumber.js +10 -0
- package/dist/fieldText-65e4c614.js +134 -0
- package/dist/fieldText.js +2 -1
- package/dist/fieldTextFlex-5bddf46a.js +67 -0
- package/dist/fieldTextFlex.js +8 -0
- package/dist/index-54e3bfc2.js +147 -0
- package/dist/index.js +303 -16
- package/dist/keyCodes-f63c0e11.js +4 -0
- package/dist/modal.js +14 -135
- package/dist/pagination-f087f454.js +346 -0
- package/dist/pagination.js +14 -0
- package/dist/popover.js +95 -0
- package/dist/radio-bccc84f2.js +76 -0
- package/dist/radio.js +9 -0
- package/dist/style.css +1 -1
- package/dist/systemMessage-1ced6079.js +30 -0
- package/dist/systemMessage.js +1 -1
- package/dist/table-9bf4ddab.js +147 -0
- package/dist/table.js +11 -0
- package/dist/themeProvider-46c2be7b.js +23 -0
- package/dist/themeProvider.js +4 -3
- package/dist/toggle-1a3aacb5.js +59 -0
- package/dist/toggle.js +9 -0
- package/dist/tooltip.js +96 -0
- package/dist/useOnClickOutside-c332f7d3.js +16 -0
- package/package.json +105 -66
- package/dist/button-d4944dbc.js +0 -64
- package/dist/checkbox-7736509c.js +0 -70
- package/dist/common/constants/key-codes.d.ts +0 -5
- package/dist/fieldText-9621b0b7.js +0 -99
- package/dist/key-codes-abbe7725.js +0 -4
- package/dist/systemMessage-62c3133d.js +0 -30
- package/dist/themeProvider-5800417e.js +0 -19
|
@@ -0,0 +1,53 @@
|
|
|
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 MetaData {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}
|
|
23
|
+
export interface RowData {
|
|
24
|
+
id: string | number;
|
|
25
|
+
[key: string]: DetailedCellData | RowConfigs | string | number | any;
|
|
26
|
+
rowConfigs?: RowConfigs;
|
|
27
|
+
metaData?: MetaData;
|
|
28
|
+
}
|
|
29
|
+
export declare enum SortDirection {
|
|
30
|
+
ASC = "asc",
|
|
31
|
+
DESC = "desc"
|
|
32
|
+
}
|
|
33
|
+
export interface SortConfig {
|
|
34
|
+
key: string;
|
|
35
|
+
direction: SortDirection;
|
|
36
|
+
}
|
|
37
|
+
export interface TableComponentProps {
|
|
38
|
+
data: RowData[];
|
|
39
|
+
primaryColumn: Column;
|
|
40
|
+
fixedColumns: FixedColumn[];
|
|
41
|
+
renderRowActions?: (metaData?: MetaData) => ReactNode;
|
|
42
|
+
selectable?: boolean;
|
|
43
|
+
className?: string;
|
|
44
|
+
headerClassName?: string;
|
|
45
|
+
rowClassName?: string;
|
|
46
|
+
selectedRowIds?: (string | number)[];
|
|
47
|
+
sortingDirection?: SortDirection;
|
|
48
|
+
sortingColumn?: Column;
|
|
49
|
+
sortableColumns?: string[];
|
|
50
|
+
onChangeSorting?: (sortConfig?: SortConfig) => void;
|
|
51
|
+
onToggleRowSelection?: (id: string | number) => void;
|
|
52
|
+
onToggleAllRowsSelection?: () => void;
|
|
53
|
+
}
|
|
@@ -7,6 +7,7 @@ interface IThemeProviderProps {
|
|
|
7
7
|
children?: ReactNode;
|
|
8
8
|
theme?: ThemeKey;
|
|
9
9
|
customThemes?: ITheme;
|
|
10
|
+
className?: string;
|
|
10
11
|
}
|
|
11
|
-
export declare function ThemeProvider({ children, theme, customThemes, }: IThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function ThemeProvider({ children, theme, customThemes, className, }: IThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChangeEventHandler, FC, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
interface ToggleProps extends HTMLAttributes<HTMLInputElement> {
|
|
3
|
+
value: boolean;
|
|
4
|
+
title?: string;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
9
|
+
}
|
|
10
|
+
export declare const Toggle: FC<ToggleProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tooltip } from './tooltip';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { Placement } from '@floating-ui/react';
|
|
3
|
+
interface TooltipProps {
|
|
4
|
+
content: ReactNode;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
wrapperClassName?: string;
|
|
7
|
+
contentClassName?: string;
|
|
8
|
+
dynamicWidth?: boolean;
|
|
9
|
+
width?: number;
|
|
10
|
+
minWidth?: number;
|
|
11
|
+
placement?: Placement;
|
|
12
|
+
dataAutomationId?: string;
|
|
13
|
+
arrowColor?: string;
|
|
14
|
+
safeZone?: number;
|
|
15
|
+
zIndex?: number;
|
|
16
|
+
mainAxis?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare const Tooltip: FC<TooltipProps>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as E } from "react/jsx-runtime";
|
|
2
|
+
import T from "react-datepicker";
|
|
3
|
+
const m = "en", r = "MM-dd-yyyy", U = ({
|
|
4
|
+
onChange: a = () => {
|
|
5
|
+
},
|
|
6
|
+
disabled: s = !1,
|
|
7
|
+
onBlur: d = () => {
|
|
8
|
+
},
|
|
9
|
+
onFocus: l = () => {
|
|
10
|
+
},
|
|
11
|
+
endDate: n = void 0,
|
|
12
|
+
startDate: o = void 0,
|
|
13
|
+
customTimeInput: t = void 0,
|
|
14
|
+
shouldCloseOnSelect: i = !0,
|
|
15
|
+
fixedHeight: p = !1,
|
|
16
|
+
language: c = m,
|
|
17
|
+
placeholder: A = r.toUpperCase(),
|
|
18
|
+
dateFormat: D = r,
|
|
19
|
+
selects: e = "start",
|
|
20
|
+
value: f = null
|
|
21
|
+
}) => /* @__PURE__ */ E(
|
|
22
|
+
T,
|
|
23
|
+
{
|
|
24
|
+
placeholderText: A,
|
|
25
|
+
selected: f,
|
|
26
|
+
startDate: o,
|
|
27
|
+
endDate: n,
|
|
28
|
+
minDate: e === "end" ? o : void 0,
|
|
29
|
+
disabled: s,
|
|
30
|
+
shouldCloseOnSelect: i,
|
|
31
|
+
fixedHeight: p,
|
|
32
|
+
locale: c,
|
|
33
|
+
showPopperArrow: !1,
|
|
34
|
+
onChange: a,
|
|
35
|
+
onBlur: d,
|
|
36
|
+
onFocus: l,
|
|
37
|
+
customTimeInput: t,
|
|
38
|
+
showTimeInput: !!t,
|
|
39
|
+
dateFormat: D,
|
|
40
|
+
selectsStart: e === "start",
|
|
41
|
+
selectsEnd: e === "end"
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
export {
|
|
45
|
+
U as D
|
|
46
|
+
};
|
package/dist/date2.js
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { jsxs as S, Fragment as U, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import $ from "react-datepicker";
|
|
3
|
+
import { c as Y } from "./bind-06a7ff84.js";
|
|
4
|
+
import { useMemo as E, useRef as B } from "react";
|
|
5
|
+
import { F as D } from "./fieldText-65e4c614.js";
|
|
6
|
+
import "./baseIconButton-b6adc843.js";
|
|
7
|
+
import { S as T, a as G } from "./calendar-f154eb78.js";
|
|
8
|
+
import { D as P } from "./dropdown-9f4d1928.js";
|
|
9
|
+
const H = (a, c = 20) => {
|
|
10
|
+
const l = a + c;
|
|
11
|
+
return new Array(l - a).fill(void 0).map((g, e) => a - e);
|
|
12
|
+
}, V = "_header_a3cjx_1", O = "_disabled_a3cjx_25", W = "_dropdown_a3cjx_8", q = {
|
|
13
|
+
header: V,
|
|
14
|
+
"dropdowns-wrapper": "_dropdowns-wrapper_a3cjx_8",
|
|
15
|
+
"button-prev": "_button-prev_a3cjx_13",
|
|
16
|
+
"button-next": "_button-next_a3cjx_14",
|
|
17
|
+
disabled: O,
|
|
18
|
+
dropdown: W,
|
|
19
|
+
"month-dropdown": "_month-dropdown_a3cjx_44",
|
|
20
|
+
"toggle-button": "_toggle-button_a3cjx_47"
|
|
21
|
+
}, r = Y.bind(q), z = ({
|
|
22
|
+
date: a = /* @__PURE__ */ new Date(),
|
|
23
|
+
changeYear: c = () => {
|
|
24
|
+
},
|
|
25
|
+
changeMonth: l = () => {
|
|
26
|
+
},
|
|
27
|
+
decreaseMonth: g = () => {
|
|
28
|
+
},
|
|
29
|
+
increaseMonth: e = () => {
|
|
30
|
+
},
|
|
31
|
+
prevMonthButtonDisabled: n = !1,
|
|
32
|
+
nextMonthButtonDisabled: h = !1,
|
|
33
|
+
headerNodes: b = null,
|
|
34
|
+
customClassName: w = "",
|
|
35
|
+
yearsOptions: i = [],
|
|
36
|
+
locale: x
|
|
37
|
+
}) => {
|
|
38
|
+
const p = a.getFullYear(), C = a.getMonth(), f = E(() => {
|
|
39
|
+
const t = Array(12).keys(), s = new Intl.DateTimeFormat(x, {
|
|
40
|
+
month: "long"
|
|
41
|
+
}), d = (m) => s.format(new Date(p, m));
|
|
42
|
+
return Array.from(t, d).reduce((m, j, A) => m.concat({
|
|
43
|
+
value: A,
|
|
44
|
+
label: j
|
|
45
|
+
}), []);
|
|
46
|
+
}, []), N = E(() => (i.length > 0 ? i : H(p)).reduce(
|
|
47
|
+
(s, d) => s.concat({ value: d, label: `${d}` }),
|
|
48
|
+
[]
|
|
49
|
+
), [i]), v = (t) => {
|
|
50
|
+
l(t);
|
|
51
|
+
}, y = (t) => {
|
|
52
|
+
c(t);
|
|
53
|
+
};
|
|
54
|
+
return /* @__PURE__ */ S(U, { children: [
|
|
55
|
+
b && /* @__PURE__ */ o("div", { className: r(w), children: b }),
|
|
56
|
+
/* @__PURE__ */ S("div", { className: r("header"), children: [
|
|
57
|
+
/* @__PURE__ */ o(
|
|
58
|
+
"button",
|
|
59
|
+
{
|
|
60
|
+
"aria-label": "Previous Months",
|
|
61
|
+
disabled: n,
|
|
62
|
+
onClick: g,
|
|
63
|
+
className: r("button-prev", { disabled: n }),
|
|
64
|
+
children: /* @__PURE__ */ o(T, {})
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ S("div", { className: r("dropdowns-wrapper"), children: [
|
|
68
|
+
/* @__PURE__ */ o(
|
|
69
|
+
P,
|
|
70
|
+
{
|
|
71
|
+
options: f,
|
|
72
|
+
value: C,
|
|
73
|
+
onChange: v,
|
|
74
|
+
transparentBackground: !0,
|
|
75
|
+
className: r("dropdown", "month-dropdown"),
|
|
76
|
+
toggleButtonClassName: r("toggle-button")
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
/* @__PURE__ */ o(
|
|
80
|
+
P,
|
|
81
|
+
{
|
|
82
|
+
options: N,
|
|
83
|
+
value: p,
|
|
84
|
+
onChange: y,
|
|
85
|
+
transparentBackground: !0,
|
|
86
|
+
className: r("dropdown"),
|
|
87
|
+
toggleButtonClassName: r("toggle-button")
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
] }),
|
|
91
|
+
/* @__PURE__ */ o(
|
|
92
|
+
"button",
|
|
93
|
+
{
|
|
94
|
+
"aria-label": "Next Months",
|
|
95
|
+
disabled: h,
|
|
96
|
+
onClick: e,
|
|
97
|
+
className: r("button-next", { disabled: h }),
|
|
98
|
+
children: /* @__PURE__ */ o(T, {})
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
] })
|
|
102
|
+
] });
|
|
103
|
+
}, J = "_calendar_1jr94_5", K = "_date_1jr94_90", Q = "_disabled_1jr94_202", X = "_popper_1jr94_210", Z = "_input_1jr94_214", ee = {
|
|
104
|
+
calendar: J,
|
|
105
|
+
"current-date": "_current-date_1jr94_89",
|
|
106
|
+
date: K,
|
|
107
|
+
"selected-range": "_selected-range_1jr94_119",
|
|
108
|
+
"end-date": "_end-date_1jr94_119",
|
|
109
|
+
disabled: Q,
|
|
110
|
+
popper: X,
|
|
111
|
+
input: Z
|
|
112
|
+
}, _ = Y.bind(ee), ne = "en", R = "MM-dd-yyyy", ie = ({
|
|
113
|
+
onChange: a = () => {
|
|
114
|
+
},
|
|
115
|
+
disabled: c = !1,
|
|
116
|
+
onBlur: l = () => {
|
|
117
|
+
},
|
|
118
|
+
onFocus: g = () => {
|
|
119
|
+
},
|
|
120
|
+
endDate: e = void 0,
|
|
121
|
+
startDate: n = void 0,
|
|
122
|
+
headerNodes: h = null,
|
|
123
|
+
customClassName: b = "",
|
|
124
|
+
customTimeInput: w = void 0,
|
|
125
|
+
shouldCloseOnSelect: i = !0,
|
|
126
|
+
popperClassName: x = "",
|
|
127
|
+
calendarClassName: p = "",
|
|
128
|
+
fixedHeight: C = !1,
|
|
129
|
+
language: f = ne,
|
|
130
|
+
yearsOptions: N = [],
|
|
131
|
+
placeholder: v = R.toUpperCase(),
|
|
132
|
+
dateFormat: y = R,
|
|
133
|
+
selects: t = "start",
|
|
134
|
+
value: s = null
|
|
135
|
+
}) => {
|
|
136
|
+
const d = B(null), F = n == null ? void 0 : n.toDateString(), m = e == null ? void 0 : e.toDateString(), j = e && n && e > n, A = (u) => {
|
|
137
|
+
const k = u.toDateString(), I = k === F, M = j && k === m, L = n && e && u > n && u < e;
|
|
138
|
+
return _("date", {
|
|
139
|
+
"current-date": I,
|
|
140
|
+
"selected-range": L && !M,
|
|
141
|
+
"end-date": M && j,
|
|
142
|
+
disabled: c
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
return /* @__PURE__ */ o(
|
|
146
|
+
$,
|
|
147
|
+
{
|
|
148
|
+
customInput: /* @__PURE__ */ o(
|
|
149
|
+
D,
|
|
150
|
+
{
|
|
151
|
+
className: _("input"),
|
|
152
|
+
defaultWidth: !1,
|
|
153
|
+
endIcon: /* @__PURE__ */ o(G, {}),
|
|
154
|
+
ref: d
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
placeholderText: v,
|
|
158
|
+
selected: s,
|
|
159
|
+
startDate: n,
|
|
160
|
+
endDate: e,
|
|
161
|
+
minDate: t === "end" ? n : void 0,
|
|
162
|
+
disabled: c,
|
|
163
|
+
shouldCloseOnSelect: i,
|
|
164
|
+
fixedHeight: C,
|
|
165
|
+
locale: f,
|
|
166
|
+
showPopperArrow: !1,
|
|
167
|
+
dayClassName: A,
|
|
168
|
+
calendarClassName: _(p, "calendar"),
|
|
169
|
+
renderCustomHeader: (u) => /* @__PURE__ */ o(
|
|
170
|
+
z,
|
|
171
|
+
{
|
|
172
|
+
...u,
|
|
173
|
+
headerNodes: h,
|
|
174
|
+
customClassName: b,
|
|
175
|
+
yearsOptions: N,
|
|
176
|
+
locale: f
|
|
177
|
+
}
|
|
178
|
+
),
|
|
179
|
+
onChange: a,
|
|
180
|
+
onBlur: l,
|
|
181
|
+
onFocus: g,
|
|
182
|
+
customTimeInput: w,
|
|
183
|
+
showTimeInput: !!w,
|
|
184
|
+
popperClassName: _(x, "popper"),
|
|
185
|
+
dateFormat: y,
|
|
186
|
+
selectsStart: t === "start",
|
|
187
|
+
selectsEnd: t === "end",
|
|
188
|
+
className: _("datepicker")
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
};
|
|
192
|
+
export {
|
|
193
|
+
ie as D
|
|
194
|
+
};
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { jsxs as S, Fragment as U, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import $ from "react-datepicker";
|
|
3
|
+
import { c as Y } from "./bind-06a7ff84.js";
|
|
4
|
+
import { useMemo as E, useRef as B } from "react";
|
|
5
|
+
import { F as D } from "./fieldText-65e4c614.js";
|
|
6
|
+
import "./baseIconButton-b6adc843.js";
|
|
7
|
+
import { S as T, a as G } from "./calendar-f154eb78.js";
|
|
8
|
+
import { D as P } from "./dropdown-9f4d1928.js";
|
|
9
|
+
const H = (a, c = 20) => {
|
|
10
|
+
const l = a + c;
|
|
11
|
+
return new Array(l - a).fill(void 0).map((g, e) => a - e);
|
|
12
|
+
}, V = "_header_a3cjx_1", O = "_disabled_a3cjx_25", W = "_dropdown_a3cjx_8", q = {
|
|
13
|
+
header: V,
|
|
14
|
+
"dropdowns-wrapper": "_dropdowns-wrapper_a3cjx_8",
|
|
15
|
+
"button-prev": "_button-prev_a3cjx_13",
|
|
16
|
+
"button-next": "_button-next_a3cjx_14",
|
|
17
|
+
disabled: O,
|
|
18
|
+
dropdown: W,
|
|
19
|
+
"month-dropdown": "_month-dropdown_a3cjx_44",
|
|
20
|
+
"toggle-button": "_toggle-button_a3cjx_47"
|
|
21
|
+
}, r = Y.bind(q), z = ({
|
|
22
|
+
date: a = /* @__PURE__ */ new Date(),
|
|
23
|
+
changeYear: c = () => {
|
|
24
|
+
},
|
|
25
|
+
changeMonth: l = () => {
|
|
26
|
+
},
|
|
27
|
+
decreaseMonth: g = () => {
|
|
28
|
+
},
|
|
29
|
+
increaseMonth: e = () => {
|
|
30
|
+
},
|
|
31
|
+
prevMonthButtonDisabled: n = !1,
|
|
32
|
+
nextMonthButtonDisabled: h = !1,
|
|
33
|
+
headerNodes: b = null,
|
|
34
|
+
customClassName: w = "",
|
|
35
|
+
yearsOptions: i = [],
|
|
36
|
+
locale: x
|
|
37
|
+
}) => {
|
|
38
|
+
const p = a.getFullYear(), C = a.getMonth(), f = E(() => {
|
|
39
|
+
const t = Array(12).keys(), s = new Intl.DateTimeFormat(x, {
|
|
40
|
+
month: "long"
|
|
41
|
+
}), d = (m) => s.format(new Date(p, m));
|
|
42
|
+
return Array.from(t, d).reduce((m, j, A) => m.concat({
|
|
43
|
+
value: A,
|
|
44
|
+
label: j
|
|
45
|
+
}), []);
|
|
46
|
+
}, []), N = E(() => (i.length > 0 ? i : H(p)).reduce(
|
|
47
|
+
(s, d) => s.concat({ value: d, label: `${d}` }),
|
|
48
|
+
[]
|
|
49
|
+
), [i]), v = (t) => {
|
|
50
|
+
l(t);
|
|
51
|
+
}, y = (t) => {
|
|
52
|
+
c(t);
|
|
53
|
+
};
|
|
54
|
+
return /* @__PURE__ */ S(U, { children: [
|
|
55
|
+
b && /* @__PURE__ */ o("div", { className: r(w), children: b }),
|
|
56
|
+
/* @__PURE__ */ S("div", { className: r("header"), children: [
|
|
57
|
+
/* @__PURE__ */ o(
|
|
58
|
+
"button",
|
|
59
|
+
{
|
|
60
|
+
"aria-label": "Previous Months",
|
|
61
|
+
disabled: n,
|
|
62
|
+
onClick: g,
|
|
63
|
+
className: r("button-prev", { disabled: n }),
|
|
64
|
+
children: /* @__PURE__ */ o(T, {})
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ S("div", { className: r("dropdowns-wrapper"), children: [
|
|
68
|
+
/* @__PURE__ */ o(
|
|
69
|
+
P,
|
|
70
|
+
{
|
|
71
|
+
options: f,
|
|
72
|
+
value: C,
|
|
73
|
+
onChange: v,
|
|
74
|
+
transparentBackground: !0,
|
|
75
|
+
className: r("dropdown", "month-dropdown"),
|
|
76
|
+
toggleButtonClassName: r("toggle-button")
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
/* @__PURE__ */ o(
|
|
80
|
+
P,
|
|
81
|
+
{
|
|
82
|
+
options: N,
|
|
83
|
+
value: p,
|
|
84
|
+
onChange: y,
|
|
85
|
+
transparentBackground: !0,
|
|
86
|
+
className: r("dropdown"),
|
|
87
|
+
toggleButtonClassName: r("toggle-button")
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
] }),
|
|
91
|
+
/* @__PURE__ */ o(
|
|
92
|
+
"button",
|
|
93
|
+
{
|
|
94
|
+
"aria-label": "Next Months",
|
|
95
|
+
disabled: h,
|
|
96
|
+
onClick: e,
|
|
97
|
+
className: r("button-next", { disabled: h }),
|
|
98
|
+
children: /* @__PURE__ */ o(T, {})
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
] })
|
|
102
|
+
] });
|
|
103
|
+
}, J = "_calendar_1jr94_5", K = "_date_1jr94_90", Q = "_disabled_1jr94_202", X = "_popper_1jr94_210", Z = "_input_1jr94_214", ee = {
|
|
104
|
+
calendar: J,
|
|
105
|
+
"current-date": "_current-date_1jr94_89",
|
|
106
|
+
date: K,
|
|
107
|
+
"selected-range": "_selected-range_1jr94_119",
|
|
108
|
+
"end-date": "_end-date_1jr94_119",
|
|
109
|
+
disabled: Q,
|
|
110
|
+
popper: X,
|
|
111
|
+
input: Z
|
|
112
|
+
}, _ = Y.bind(ee), ne = "en", R = "MM-dd-yyyy", ie = ({
|
|
113
|
+
onChange: a = () => {
|
|
114
|
+
},
|
|
115
|
+
disabled: c = !1,
|
|
116
|
+
onBlur: l = () => {
|
|
117
|
+
},
|
|
118
|
+
onFocus: g = () => {
|
|
119
|
+
},
|
|
120
|
+
endDate: e = void 0,
|
|
121
|
+
startDate: n = void 0,
|
|
122
|
+
headerNodes: h = null,
|
|
123
|
+
customClassName: b = "",
|
|
124
|
+
customTimeInput: w = void 0,
|
|
125
|
+
shouldCloseOnSelect: i = !0,
|
|
126
|
+
popperClassName: x = "",
|
|
127
|
+
calendarClassName: p = "",
|
|
128
|
+
fixedHeight: C = !1,
|
|
129
|
+
language: f = ne,
|
|
130
|
+
yearsOptions: N = [],
|
|
131
|
+
placeholder: v = R.toUpperCase(),
|
|
132
|
+
dateFormat: y = R,
|
|
133
|
+
selects: t = "start",
|
|
134
|
+
value: s = null
|
|
135
|
+
}) => {
|
|
136
|
+
const d = B(null), F = n == null ? void 0 : n.toDateString(), m = e == null ? void 0 : e.toDateString(), j = e && n && e > n, A = (u) => {
|
|
137
|
+
const k = u.toDateString(), I = k === F, M = j && k === m, L = n && e && u > n && u < e;
|
|
138
|
+
return _("date", {
|
|
139
|
+
"current-date": I,
|
|
140
|
+
"selected-range": L && !M,
|
|
141
|
+
"end-date": M && j,
|
|
142
|
+
disabled: c
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
return /* @__PURE__ */ o(
|
|
146
|
+
$,
|
|
147
|
+
{
|
|
148
|
+
customInput: /* @__PURE__ */ o(
|
|
149
|
+
D,
|
|
150
|
+
{
|
|
151
|
+
className: _("input"),
|
|
152
|
+
defaultWidth: !1,
|
|
153
|
+
endIcon: /* @__PURE__ */ o(G, {}),
|
|
154
|
+
ref: d
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
placeholderText: v,
|
|
158
|
+
selected: s,
|
|
159
|
+
startDate: n,
|
|
160
|
+
endDate: e,
|
|
161
|
+
minDate: t === "end" ? n : void 0,
|
|
162
|
+
disabled: c,
|
|
163
|
+
shouldCloseOnSelect: i,
|
|
164
|
+
fixedHeight: C,
|
|
165
|
+
locale: f,
|
|
166
|
+
showPopperArrow: !1,
|
|
167
|
+
dayClassName: A,
|
|
168
|
+
calendarClassName: _(p, "calendar"),
|
|
169
|
+
renderCustomHeader: (u) => /* @__PURE__ */ o(
|
|
170
|
+
z,
|
|
171
|
+
{
|
|
172
|
+
...u,
|
|
173
|
+
headerNodes: h,
|
|
174
|
+
customClassName: b,
|
|
175
|
+
yearsOptions: N,
|
|
176
|
+
locale: f
|
|
177
|
+
}
|
|
178
|
+
),
|
|
179
|
+
onChange: a,
|
|
180
|
+
onBlur: l,
|
|
181
|
+
onFocus: g,
|
|
182
|
+
customTimeInput: w,
|
|
183
|
+
showTimeInput: !!w,
|
|
184
|
+
popperClassName: _(x, "popper"),
|
|
185
|
+
dateFormat: y,
|
|
186
|
+
selectsStart: t === "start",
|
|
187
|
+
selectsEnd: t === "end",
|
|
188
|
+
className: _("datepicker")
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
};
|
|
192
|
+
export {
|
|
193
|
+
ie as D
|
|
194
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { D as t } from "./datePicker-a005ebc6.js";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
import "react-datepicker";
|
|
4
|
+
import "./bind-06a7ff84.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import "./fieldText-65e4c614.js";
|
|
7
|
+
import "./baseIconButton-b6adc843.js";
|
|
8
|
+
import "./calendar-f154eb78.js";
|
|
9
|
+
import "./dropdown-9f4d1928.js";
|
|
10
|
+
import "@floating-ui/react-dom";
|
|
11
|
+
import "downshift";
|
|
12
|
+
import "rc-scrollbars";
|
|
13
|
+
import "./useOnClickOutside-c332f7d3.js";
|
|
14
|
+
import "./keyCodes-f63c0e11.js";
|
|
15
|
+
import "./checkbox-9a6c7ce1.js";
|
|
16
|
+
export {
|
|
17
|
+
t as DatePicker,
|
|
18
|
+
t as default
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { D as t } from "./datePicker-e85bee1d.js";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
import "react-datepicker";
|
|
4
|
+
import "./bind-06a7ff84.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import "./fieldText-65e4c614.js";
|
|
7
|
+
import "./baseIconButton-b6adc843.js";
|
|
8
|
+
import "./calendar-f154eb78.js";
|
|
9
|
+
import "./dropdown-9f4d1928.js";
|
|
10
|
+
import "@floating-ui/react-dom";
|
|
11
|
+
import "downshift";
|
|
12
|
+
import "rc-scrollbars";
|
|
13
|
+
import "./useOnClickOutside-c332f7d3.js";
|
|
14
|
+
import "./keyCodes-f63c0e11.js";
|
|
15
|
+
import "./checkbox-9a6c7ce1.js";
|
|
16
|
+
export {
|
|
17
|
+
t as DatePicker1,
|
|
18
|
+
t as default
|
|
19
|
+
};
|