@povio/ui 3.3.0-rc.4 → 3.4.0-rc.1
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/README.md +15 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.js +55 -206
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +9 -34
- package/dist/components/buttons/shared/ButtonContent.js +22 -80
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -2
- package/dist/components/inputs/Checkbox/Checkbox.js +93 -100
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +10 -24
- package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +1 -2
- package/dist/components/inputs/Checkbox/CheckboxGroup.js +109 -113
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +1 -2
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +97 -238
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +1 -2
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +88 -214
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +1 -2
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +64 -143
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +1 -2
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +275 -294
- package/dist/components/inputs/DateTime/shared/Calendar.js +139 -339
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +114 -308
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +35 -150
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +95 -229
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +115 -296
- package/dist/components/inputs/DateTime/shared/DateField.js +135 -306
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +1 -2
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +136 -343
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +10 -59
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +1 -2
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +43 -46
- package/dist/components/inputs/File/FileUpload.d.ts +1 -1
- package/dist/components/inputs/File/FileUpload.js +18 -18
- package/dist/components/inputs/File/InputUpload.d.ts +1 -1
- package/dist/components/inputs/File/InputUpload.js +82 -278
- package/dist/components/inputs/File/fileUpload.types.d.ts +1 -1
- package/dist/components/inputs/File/inputUpload.types.d.ts +1 -1
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +48 -180
- package/dist/components/inputs/File/shared/FileUploadContentError.js +95 -265
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +99 -261
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +56 -234
- package/dist/components/inputs/File/shared/ProgressBar.js +15 -102
- package/dist/components/inputs/FormField/FormField.js +34 -47
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +1 -1
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +19 -19
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +1 -1
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +93 -331
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/components/inputs/Input/TextArea/TextArea.d.ts +1 -1
- package/dist/components/inputs/Input/TextArea/TextArea.js +18 -18
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +2 -2
- package/dist/components/inputs/Input/TextInput/TextInput.js +36 -38
- package/dist/components/inputs/Inputs/Form.d.ts +4 -4
- package/dist/components/inputs/Inputs/InputItem.d.ts +22 -22
- package/dist/components/inputs/Inputs/InputItem.js +35 -36
- package/dist/components/inputs/Inputs/Inputs.d.ts +2 -2
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -2
- package/dist/components/inputs/RadioGroup/RadioGroup.js +107 -111
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +26 -86
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +1 -1
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +19 -19
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/QuerySelect.js +49 -115
- package/dist/components/inputs/Selection/Select/Select.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/Select.js +22 -22
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +0 -1
- package/dist/components/inputs/Selection/shared/SelectBase.js +34 -37
- package/dist/components/inputs/Selection/shared/SelectInput.js +1 -0
- package/dist/components/inputs/Selection/shared/SelectListBox.js +51 -163
- package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/select.context.js +4 -8
- package/dist/components/inputs/Selection/shared/select.types.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/useSelectItems.js +48 -108
- package/dist/components/inputs/Skeleton/InputFrame.js +177 -552
- package/dist/components/inputs/Slider/Slider.d.ts +1 -1
- package/dist/components/inputs/Slider/Slider.js +18 -18
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -1
- package/dist/components/inputs/TextEditor/TextEditor.js +105 -407
- package/dist/components/inputs/Toggle/Toggle.d.ts +1 -2
- package/dist/components/inputs/Toggle/Toggle.js +59 -63
- package/dist/components/inputs/shared/InputClear.js +24 -40
- package/dist/components/inputs/shared/form.binding.d.ts +27 -0
- package/dist/components/inputs/shared/form.binding.js +57 -0
- package/dist/components/inputs/shared/form.types.d.ts +9 -8
- package/dist/components/inputs/shared/form.types.js +8 -0
- package/dist/components/navigation/Accordion/Accordion.js +22 -69
- package/dist/components/navigation/Accordion/AccordionItem.js +41 -86
- package/dist/components/navigation/Stepper/Stepper.js +22 -67
- package/dist/components/overlays/ActionModal/ActionModal.js +35 -169
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +29 -110
- package/dist/components/segment/Segment.d.ts +1 -1
- package/dist/components/segment/Segment.js +17 -17
- package/dist/components/segment/segment.types.d.ts +1 -1
- package/dist/components/shared/pagination/Pagination.js +22 -108
- package/dist/components/status/Alert/Alert.js +30 -97
- package/dist/components/table/InfiniteTable.js +16 -67
- package/dist/components/table/Table.d.ts +2 -8
- package/dist/components/table/Table.js +33 -55
- package/dist/components/text/Typography/Typography.js +8 -23
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/theme.context.js +45 -98
- package/dist/config/uiConfig.context.d.ts +5 -5
- package/dist/config/uiConfig.context.js +11 -51
- package/dist/config/uiOverrides.context.d.ts +0 -1
- package/dist/helpers/dynamicColumns.d.ts +1 -1
- package/dist/helpers/dynamicInputs.d.ts +7 -7
- package/dist/hooks/useAutosave.d.ts +4 -4
- package/dist/hooks/useAutosave.js +64 -49
- package/dist/hooks/useDebounceCallback.js +17 -51
- package/dist/hooks/useForm.d.ts +39 -15
- package/dist/hooks/useForm.js +96 -43
- package/dist/hooks/useFormAutosave.d.ts +8 -9
- package/dist/hooks/useFormAutosave.js +49 -122
- package/dist/hooks/useLongPressRepeat.js +20 -55
- package/dist/index.d.ts +2 -3
- package/dist/index.js +3 -4
- package/package.json +3 -4
- package/dist/components/inputs/FormField/formField.cva.d.ts +0 -11
- package/dist/components/inputs/FormField/formField.cva.js +0 -16
- package/dist/components/table/TableColumnFilterInput.d.ts +0 -9
- package/dist/components/table/TableColumnFilterInput.js +0 -108
- package/dist/components/table/TableColumnFilterPlaceholder.d.ts +0 -5
- package/dist/components/table/TableColumnFilterPlaceholder.js +0 -41
- package/dist/components/table/TableColumnFilterRow.d.ts +0 -16
- package/dist/components/table/TableColumnFilterRow.js +0 -68
- package/dist/hooks/useAutosave.spec.d.ts +0 -1
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { Inputs } from "../inputs/Inputs/Inputs.js";
|
|
2
|
-
import { c } from "react/compiler-runtime";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
import { clsx } from "clsx";
|
|
5
|
-
//#region src/components/table/TableColumnFilterInput.tsx
|
|
6
|
-
var TableColumnFilterInput = (t0) => {
|
|
7
|
-
const $ = c(28);
|
|
8
|
-
const { form, inputDef, className } = t0;
|
|
9
|
-
const filterKey = String(inputDef.name);
|
|
10
|
-
const inputProps = inputDef.props;
|
|
11
|
-
const t1 = inputProps?.className;
|
|
12
|
-
let t2;
|
|
13
|
-
if ($[0] !== t1) {
|
|
14
|
-
t2 = clsx("w-full min-w-0 max-w-full", t1, "[&_label]:sr-only");
|
|
15
|
-
$[0] = t1;
|
|
16
|
-
$[1] = t2;
|
|
17
|
-
} else t2 = $[1];
|
|
18
|
-
const t3 = inputProps?.containerClassName;
|
|
19
|
-
let t4;
|
|
20
|
-
if ($[2] !== t3) {
|
|
21
|
-
t4 = clsx("w-full min-w-0 max-w-full", t3);
|
|
22
|
-
$[2] = t3;
|
|
23
|
-
$[3] = t4;
|
|
24
|
-
} else t4 = $[3];
|
|
25
|
-
const t5 = inputProps?.inputClassName;
|
|
26
|
-
let t6;
|
|
27
|
-
if ($[4] !== t5) {
|
|
28
|
-
t6 = clsx("min-w-0 max-w-full truncate", t5);
|
|
29
|
-
$[4] = t5;
|
|
30
|
-
$[5] = t6;
|
|
31
|
-
} else t6 = $[5];
|
|
32
|
-
let t7;
|
|
33
|
-
if ($[6] !== inputProps || $[7] !== t2 || $[8] !== t4 || $[9] !== t6) {
|
|
34
|
-
t7 = {
|
|
35
|
-
...inputProps,
|
|
36
|
-
as: "filter",
|
|
37
|
-
className: t2,
|
|
38
|
-
containerClassName: t4,
|
|
39
|
-
inputClassName: t6,
|
|
40
|
-
hideLabel: true,
|
|
41
|
-
isClearable: true,
|
|
42
|
-
placeholder: "",
|
|
43
|
-
size: "extra-small"
|
|
44
|
-
};
|
|
45
|
-
$[6] = inputProps;
|
|
46
|
-
$[7] = t2;
|
|
47
|
-
$[8] = t4;
|
|
48
|
-
$[9] = t6;
|
|
49
|
-
$[10] = t7;
|
|
50
|
-
} else t7 = $[10];
|
|
51
|
-
const props = t7;
|
|
52
|
-
let t8;
|
|
53
|
-
if ($[11] !== filterKey || $[12] !== inputDef.label) {
|
|
54
|
-
t8 = typeof inputDef.label === "string" && inputDef.label.trim() ? inputDef.label : filterKey;
|
|
55
|
-
$[11] = filterKey;
|
|
56
|
-
$[12] = inputDef.label;
|
|
57
|
-
$[13] = t8;
|
|
58
|
-
} else t8 = $[13];
|
|
59
|
-
let t9;
|
|
60
|
-
if ($[14] !== inputDef || $[15] !== props || $[16] !== t8) {
|
|
61
|
-
t9 = {
|
|
62
|
-
...inputDef,
|
|
63
|
-
label: t8,
|
|
64
|
-
placeholder: "",
|
|
65
|
-
props
|
|
66
|
-
};
|
|
67
|
-
$[14] = inputDef;
|
|
68
|
-
$[15] = props;
|
|
69
|
-
$[16] = t8;
|
|
70
|
-
$[17] = t9;
|
|
71
|
-
} else t9 = $[17];
|
|
72
|
-
const inlineInputDef = t9;
|
|
73
|
-
let t10;
|
|
74
|
-
if ($[18] !== className) {
|
|
75
|
-
t10 = clsx("w-full min-w-0 max-w-full [&>*]:w-full [&_*]:min-w-0", className);
|
|
76
|
-
$[18] = className;
|
|
77
|
-
$[19] = t10;
|
|
78
|
-
} else t10 = $[19];
|
|
79
|
-
let t11;
|
|
80
|
-
if ($[20] !== inlineInputDef) {
|
|
81
|
-
t11 = [inlineInputDef];
|
|
82
|
-
$[20] = inlineInputDef;
|
|
83
|
-
$[21] = t11;
|
|
84
|
-
} else t11 = $[21];
|
|
85
|
-
let t12;
|
|
86
|
-
if ($[22] !== form || $[23] !== t11) {
|
|
87
|
-
t12 = /* @__PURE__ */ jsx(Inputs, {
|
|
88
|
-
form,
|
|
89
|
-
inputDefs: t11
|
|
90
|
-
});
|
|
91
|
-
$[22] = form;
|
|
92
|
-
$[23] = t11;
|
|
93
|
-
$[24] = t12;
|
|
94
|
-
} else t12 = $[24];
|
|
95
|
-
let t13;
|
|
96
|
-
if ($[25] !== t10 || $[26] !== t12) {
|
|
97
|
-
t13 = /* @__PURE__ */ jsx("div", {
|
|
98
|
-
className: t10,
|
|
99
|
-
children: t12
|
|
100
|
-
});
|
|
101
|
-
$[25] = t10;
|
|
102
|
-
$[26] = t12;
|
|
103
|
-
$[27] = t13;
|
|
104
|
-
} else t13 = $[27];
|
|
105
|
-
return t13;
|
|
106
|
-
};
|
|
107
|
-
//#endregion
|
|
108
|
-
export { TableColumnFilterInput };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { c } from "react/compiler-runtime";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { clsx } from "clsx";
|
|
4
|
-
//#region src/components/table/TableColumnFilterPlaceholder.tsx
|
|
5
|
-
var columnFilterPlaceholderClassName = clsx("h-[calc(var(--spacing-input-height-xs)*2+var(--text-label-2)*var(--text-label-2--line-height)+2px)]", "flex w-full min-w-0 items-center overflow-hidden", "rounded-input-rounding-default border border-solid border-input-outlined-outline-disabled/50", "bg-input-filled-idle px-input-side-xs text-label-2");
|
|
6
|
-
var TableColumnFilterPlaceholder = (t0) => {
|
|
7
|
-
const $ = c(8);
|
|
8
|
-
const { label } = t0;
|
|
9
|
-
const t1 = label ? void 0 : true;
|
|
10
|
-
const t2 = label && "text-text-default-2";
|
|
11
|
-
let t3;
|
|
12
|
-
if ($[0] !== t2) {
|
|
13
|
-
t3 = clsx(columnFilterPlaceholderClassName, t2);
|
|
14
|
-
$[0] = t2;
|
|
15
|
-
$[1] = t3;
|
|
16
|
-
} else t3 = $[1];
|
|
17
|
-
let t4;
|
|
18
|
-
if ($[2] !== label) {
|
|
19
|
-
t4 = label ? /* @__PURE__ */ jsx("span", {
|
|
20
|
-
className: "min-w-0 truncate",
|
|
21
|
-
children: label
|
|
22
|
-
}) : null;
|
|
23
|
-
$[2] = label;
|
|
24
|
-
$[3] = t4;
|
|
25
|
-
} else t4 = $[3];
|
|
26
|
-
let t5;
|
|
27
|
-
if ($[4] !== t1 || $[5] !== t3 || $[6] !== t4) {
|
|
28
|
-
t5 = /* @__PURE__ */ jsx("div", {
|
|
29
|
-
"aria-hidden": t1,
|
|
30
|
-
className: t3,
|
|
31
|
-
children: t4
|
|
32
|
-
});
|
|
33
|
-
$[4] = t1;
|
|
34
|
-
$[5] = t3;
|
|
35
|
-
$[6] = t4;
|
|
36
|
-
$[7] = t5;
|
|
37
|
-
} else t5 = $[7];
|
|
38
|
-
return t5;
|
|
39
|
-
};
|
|
40
|
-
//#endregion
|
|
41
|
-
export { TableColumnFilterPlaceholder };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Header } from '@tanstack/react-table';
|
|
2
|
-
import { UseFormReturn } from 'react-hook-form';
|
|
3
|
-
import { InputDef } from '../inputs/Inputs/InputItem';
|
|
4
|
-
import { UIOverrides } from '../../config/uiOverrides.context';
|
|
5
|
-
import { TableHeadDataVariantProps } from './table.cva';
|
|
6
|
-
interface TableColumnFilterRowProps<T> {
|
|
7
|
-
headers: Header<T, unknown>[];
|
|
8
|
-
filterForm: UseFormReturn<Record<string, any>>;
|
|
9
|
-
filterDefs: InputDef<any>[];
|
|
10
|
-
tableHeadDataCva: UIOverrides.Cva<TableHeadDataVariantProps>;
|
|
11
|
-
rowClassName?: string;
|
|
12
|
-
cellClassName?: string;
|
|
13
|
-
showCellBorder?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export declare const TableColumnFilterRow: <T>({ headers, filterForm, filterDefs, tableHeadDataCva, rowClassName, cellClassName, showCellBorder, }: TableColumnFilterRowProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export {};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { TableColumnFilterInput } from "./TableColumnFilterInput.js";
|
|
2
|
-
import { TableColumnFilterPlaceholder } from "./TableColumnFilterPlaceholder.js";
|
|
3
|
-
import { c } from "react/compiler-runtime";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import { clsx } from "clsx";
|
|
6
|
-
//#region src/components/table/TableColumnFilterRow.tsx
|
|
7
|
-
var getColumnMeta = (header) => header.column.columnDef.meta ?? {};
|
|
8
|
-
var TableColumnFilterRow = (t0) => {
|
|
9
|
-
const $ = c(18);
|
|
10
|
-
const { headers, filterForm, filterDefs, tableHeadDataCva, rowClassName, cellClassName, showCellBorder } = t0;
|
|
11
|
-
let t1;
|
|
12
|
-
if ($[0] !== filterDefs) {
|
|
13
|
-
t1 = new Map((filterDefs ?? []).map(_temp));
|
|
14
|
-
$[0] = filterDefs;
|
|
15
|
-
$[1] = t1;
|
|
16
|
-
} else t1 = $[1];
|
|
17
|
-
const inputDefsByName = t1;
|
|
18
|
-
let t2;
|
|
19
|
-
if ($[2] !== cellClassName || $[3] !== filterForm || $[4] !== headers || $[5] !== inputDefsByName || $[6] !== showCellBorder || $[7] !== tableHeadDataCva) {
|
|
20
|
-
let t3;
|
|
21
|
-
if ($[9] !== cellClassName || $[10] !== filterForm || $[11] !== inputDefsByName || $[12] !== showCellBorder || $[13] !== tableHeadDataCva) {
|
|
22
|
-
t3 = (header, index) => {
|
|
23
|
-
const columnMeta = getColumnMeta(header);
|
|
24
|
-
const filterKey = columnMeta.filterKey ?? header.column.id;
|
|
25
|
-
const filterDef_0 = inputDefsByName.get(filterKey);
|
|
26
|
-
return /* @__PURE__ */ jsx("th", {
|
|
27
|
-
colSpan: header.colSpan,
|
|
28
|
-
tabIndex: -1,
|
|
29
|
-
className: clsx(tableHeadDataCva({ hasRightBorder: index > 0 && showCellBorder }), "min-w-0 max-w-full overflow-hidden", cellClassName, columnMeta.width),
|
|
30
|
-
children: filterDef_0 ? /* @__PURE__ */ jsx(TableColumnFilterInput, {
|
|
31
|
-
form: filterForm,
|
|
32
|
-
inputDef: filterDef_0
|
|
33
|
-
}) : /* @__PURE__ */ jsx(TableColumnFilterPlaceholder, {})
|
|
34
|
-
}, `${header.id}-filter`);
|
|
35
|
-
};
|
|
36
|
-
$[9] = cellClassName;
|
|
37
|
-
$[10] = filterForm;
|
|
38
|
-
$[11] = inputDefsByName;
|
|
39
|
-
$[12] = showCellBorder;
|
|
40
|
-
$[13] = tableHeadDataCva;
|
|
41
|
-
$[14] = t3;
|
|
42
|
-
} else t3 = $[14];
|
|
43
|
-
t2 = headers.map(t3);
|
|
44
|
-
$[2] = cellClassName;
|
|
45
|
-
$[3] = filterForm;
|
|
46
|
-
$[4] = headers;
|
|
47
|
-
$[5] = inputDefsByName;
|
|
48
|
-
$[6] = showCellBorder;
|
|
49
|
-
$[7] = tableHeadDataCva;
|
|
50
|
-
$[8] = t2;
|
|
51
|
-
} else t2 = $[8];
|
|
52
|
-
let t3;
|
|
53
|
-
if ($[15] !== rowClassName || $[16] !== t2) {
|
|
54
|
-
t3 = /* @__PURE__ */ jsx("tr", {
|
|
55
|
-
className: rowClassName,
|
|
56
|
-
children: t2
|
|
57
|
-
});
|
|
58
|
-
$[15] = rowClassName;
|
|
59
|
-
$[16] = t2;
|
|
60
|
-
$[17] = t3;
|
|
61
|
-
} else t3 = $[17];
|
|
62
|
-
return t3;
|
|
63
|
-
};
|
|
64
|
-
function _temp(filterDef) {
|
|
65
|
-
return [String(filterDef.name), filterDef];
|
|
66
|
-
}
|
|
67
|
-
//#endregion
|
|
68
|
-
export { TableColumnFilterRow };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|