@povio/ui 3.3.0-rc.3 → 3.3.0
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/Button/button.cva.d.ts +1 -1
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +9 -34
- package/dist/components/buttons/shared/ButtonContent.js +22 -80
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +10 -24
- package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +5 -1
- package/dist/components/inputs/Checkbox/CheckboxGroup.js +234 -201
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +93 -227
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +1 -0
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +170 -273
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +60 -147
- 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 -301
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +142 -338
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +10 -59
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +144 -134
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.d.ts +2 -0
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.js +33 -0
- package/dist/components/inputs/File/FileUpload.js +1 -1
- package/dist/components/inputs/File/InputUpload.js +65 -261
- 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.js +2 -1
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +77 -314
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +23 -83
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +56 -2
- package/dist/components/inputs/Selection/Select/QuerySelect.js +82 -94
- package/dist/components/inputs/Selection/Select/Select.js +3 -3
- 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/querySelect.utils.d.ts +1 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +1 -0
- package/dist/components/inputs/Selection/shared/select.context.js +19 -9
- package/dist/components/inputs/Selection/shared/useSelectItems.js +48 -108
- package/dist/components/inputs/Skeleton/InputFrame.js +177 -552
- package/dist/components/inputs/TextEditor/TextEditor.js +87 -389
- package/dist/components/inputs/shared/InputClear.js +24 -40
- package/dist/components/inputs/shared/input.cva.js +1 -1
- 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/shared/pagination/Pagination.js +22 -108
- package/dist/components/shared/pagination/minWidth.cva.d.ts +1 -1
- 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 +1 -0
- package/dist/config/uiConfig.context.js +10 -40
- package/dist/config/uiOverrides.context.d.ts +0 -1
- package/dist/helpers/dynamicColumns.js +2 -1
- package/dist/hooks/useDebounceCallback.js +17 -51
- package/dist/hooks/useFormAutosave.js +33 -120
- package/dist/hooks/useLongPressRepeat.js +20 -55
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/utils/date-time.utils.d.ts +0 -1
- package/dist/utils/date-time.utils.js +21 -45
- package/dist/utils/intl.utils.d.ts +7 -0
- package/dist/utils/intl.utils.js +38 -0
- package/dist/utils/intl.utils.spec.d.ts +1 -0
- package/package.json +2 -2
- 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
|
@@ -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 };
|