eidos-ui 1.0.2 → 1.2.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/dist/Combobox.types-B7ozlnA9.d.cts +35 -0
- package/dist/Combobox.types-DkigkEh2.d.ts +35 -0
- package/dist/SegmentedControl.types-CK8EiShd.d.ts +35 -0
- package/dist/SegmentedControl.types-Dm4SnwCK.d.cts +35 -0
- package/dist/Select.types-B4kDpkGB.d.ts +42 -0
- package/dist/Select.types-CAkT2ACt.d.cts +42 -0
- package/dist/{chunk-NFIK3KMT.js → chunk-2KO5ZCZC.js} +2 -2
- package/dist/{chunk-IZBJW37N.js → chunk-6DBCT5MK.js} +9 -6
- package/dist/chunk-6DBCT5MK.js.map +1 -0
- package/dist/{chunk-CBLWP43O.cjs → chunk-6XB3QTHO.cjs} +212 -86
- package/dist/chunk-6XB3QTHO.cjs.map +1 -0
- package/dist/{chunk-W3X3V72Q.js → chunk-DW2YDWGN.js} +3 -3
- package/dist/chunk-DW2YDWGN.js.map +1 -0
- package/dist/{chunk-YRK56AOP.cjs → chunk-HNUTV3HR.cjs} +3 -3
- package/dist/chunk-HNUTV3HR.cjs.map +1 -0
- package/dist/{chunk-IC2M4N7R.cjs → chunk-NUK4NT5Q.cjs} +11 -11
- package/dist/{chunk-IC2M4N7R.cjs.map → chunk-NUK4NT5Q.cjs.map} +1 -1
- package/dist/{chunk-S2EICHZK.js → chunk-P2ZHWFK4.js} +202 -76
- package/dist/chunk-P2ZHWFK4.js.map +1 -0
- package/dist/{chunk-PA4IT2XQ.cjs → chunk-TKLWQWMT.cjs} +9 -6
- package/dist/chunk-TKLWQWMT.cjs.map +1 -0
- package/dist/combobox/index.cjs +2 -2
- package/dist/combobox/index.d.cts +4 -33
- package/dist/combobox/index.d.ts +4 -33
- package/dist/combobox/index.js +1 -1
- package/dist/data-grid/index.cjs +6 -3
- package/dist/data-grid/index.cjs.map +1 -1
- package/dist/data-grid/index.d.cts +100 -3
- package/dist/data-grid/index.d.ts +100 -3
- package/dist/data-grid/index.js +5 -2
- package/dist/index.cjs +10 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +62 -34
- package/dist/index.d.cts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.js +9 -9
- package/dist/segmented-control/index.d.cts +5 -34
- package/dist/segmented-control/index.d.ts +5 -34
- package/dist/select/index.d.cts +5 -41
- package/dist/select/index.d.ts +5 -41
- package/dist/table/index.cjs +4 -3
- package/dist/table/index.cjs.map +1 -1
- package/dist/table/index.js +3 -2
- package/package.json +4 -7
- package/dist/chunk-CBLWP43O.cjs.map +0 -1
- package/dist/chunk-IZBJW37N.js.map +0 -1
- package/dist/chunk-PA4IT2XQ.cjs.map +0 -1
- package/dist/chunk-S2EICHZK.js.map +0 -1
- package/dist/chunk-W3X3V72Q.js.map +0 -1
- package/dist/chunk-YRK56AOP.cjs.map +0 -1
- /package/dist/{chunk-NFIK3KMT.js.map → chunk-2KO5ZCZC.js.map} +0 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { C as ComponentSizeProps } from './sizes-DM6Rrrgq.cjs';
|
|
3
|
+
|
|
4
|
+
interface ComboboxOption {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
value: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
group?: string;
|
|
11
|
+
}
|
|
12
|
+
interface ComboboxProps {
|
|
13
|
+
options?: ComboboxOption[];
|
|
14
|
+
value?: string;
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
onChange?: (value: string) => void;
|
|
17
|
+
onSearch?: (query: string) => void;
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
loadingText?: string;
|
|
21
|
+
emptyText?: string;
|
|
22
|
+
allowFreeText?: boolean;
|
|
23
|
+
clearable?: boolean;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
size?: ComponentSizeProps;
|
|
26
|
+
label?: string;
|
|
27
|
+
error?: string;
|
|
28
|
+
hint?: string;
|
|
29
|
+
fullWidth?: boolean;
|
|
30
|
+
className?: string;
|
|
31
|
+
maxHeight?: number | string;
|
|
32
|
+
renderOption?: (option: ComboboxOption) => React__default.ReactNode;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type { ComboboxOption as C, ComboboxProps as a };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { C as ComponentSizeProps } from './sizes-DM6Rrrgq.js';
|
|
3
|
+
|
|
4
|
+
interface ComboboxOption {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
value: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
group?: string;
|
|
11
|
+
}
|
|
12
|
+
interface ComboboxProps {
|
|
13
|
+
options?: ComboboxOption[];
|
|
14
|
+
value?: string;
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
onChange?: (value: string) => void;
|
|
17
|
+
onSearch?: (query: string) => void;
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
loadingText?: string;
|
|
21
|
+
emptyText?: string;
|
|
22
|
+
allowFreeText?: boolean;
|
|
23
|
+
clearable?: boolean;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
size?: ComponentSizeProps;
|
|
26
|
+
label?: string;
|
|
27
|
+
error?: string;
|
|
28
|
+
hint?: string;
|
|
29
|
+
fullWidth?: boolean;
|
|
30
|
+
className?: string;
|
|
31
|
+
maxHeight?: number | string;
|
|
32
|
+
renderOption?: (option: ComboboxOption) => React__default.ReactNode;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type { ComboboxOption as C, ComboboxProps as a };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { I as IconType } from './renderIcon-C2lEMMzb.js';
|
|
2
|
+
import { C as ComponentSizeProps } from './sizes-DM6Rrrgq.js';
|
|
3
|
+
|
|
4
|
+
type SegmentedControlColorProps = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info';
|
|
5
|
+
interface SegmentedOption {
|
|
6
|
+
/** Unique value for this segment. */
|
|
7
|
+
value: string;
|
|
8
|
+
/** Text label (optional if `icon` is provided). */
|
|
9
|
+
label?: string;
|
|
10
|
+
/** Icon to show before the label. */
|
|
11
|
+
icon?: IconType;
|
|
12
|
+
/** Disable this individual segment. */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/** Tooltip shown on hover. */
|
|
15
|
+
tooltip?: string;
|
|
16
|
+
}
|
|
17
|
+
interface SegmentedControlProps {
|
|
18
|
+
/** Segment definitions. */
|
|
19
|
+
options: SegmentedOption[];
|
|
20
|
+
/** Controlled selected value. */
|
|
21
|
+
value?: string;
|
|
22
|
+
/** Initial value when uncontrolled. Defaults to the first option's value. */
|
|
23
|
+
defaultValue?: string;
|
|
24
|
+
/** Called with the newly selected value whenever the selection changes. */
|
|
25
|
+
onChange?: (value: string) => void;
|
|
26
|
+
size?: ComponentSizeProps;
|
|
27
|
+
color?: SegmentedControlColorProps;
|
|
28
|
+
/** Disable all segments. */
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
/** Stretch to fill the parent's width. */
|
|
31
|
+
fullWidth?: boolean;
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type { SegmentedControlColorProps as S, SegmentedControlProps as a, SegmentedOption as b };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { I as IconType } from './renderIcon-C2lEMMzb.cjs';
|
|
2
|
+
import { C as ComponentSizeProps } from './sizes-DM6Rrrgq.cjs';
|
|
3
|
+
|
|
4
|
+
type SegmentedControlColorProps = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info';
|
|
5
|
+
interface SegmentedOption {
|
|
6
|
+
/** Unique value for this segment. */
|
|
7
|
+
value: string;
|
|
8
|
+
/** Text label (optional if `icon` is provided). */
|
|
9
|
+
label?: string;
|
|
10
|
+
/** Icon to show before the label. */
|
|
11
|
+
icon?: IconType;
|
|
12
|
+
/** Disable this individual segment. */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
/** Tooltip shown on hover. */
|
|
15
|
+
tooltip?: string;
|
|
16
|
+
}
|
|
17
|
+
interface SegmentedControlProps {
|
|
18
|
+
/** Segment definitions. */
|
|
19
|
+
options: SegmentedOption[];
|
|
20
|
+
/** Controlled selected value. */
|
|
21
|
+
value?: string;
|
|
22
|
+
/** Initial value when uncontrolled. Defaults to the first option's value. */
|
|
23
|
+
defaultValue?: string;
|
|
24
|
+
/** Called with the newly selected value whenever the selection changes. */
|
|
25
|
+
onChange?: (value: string) => void;
|
|
26
|
+
size?: ComponentSizeProps;
|
|
27
|
+
color?: SegmentedControlColorProps;
|
|
28
|
+
/** Disable all segments. */
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
/** Stretch to fill the parent's width. */
|
|
31
|
+
fullWidth?: boolean;
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type { SegmentedControlColorProps as S, SegmentedControlProps as a, SegmentedOption as b };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { a as InputProps } from './Input.types-XrJTI0JC.js';
|
|
2
|
+
import { I as IconType } from './renderIcon-C2lEMMzb.js';
|
|
3
|
+
|
|
4
|
+
interface SelectOption {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
value: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
icon?: IconType;
|
|
10
|
+
}
|
|
11
|
+
interface SelectProps {
|
|
12
|
+
options: SelectOption[];
|
|
13
|
+
/** Controlled selected value(s). */
|
|
14
|
+
value?: string | string[];
|
|
15
|
+
/** Initial selected value(s) for uncontrolled usage. Ignored when `value` is provided. */
|
|
16
|
+
defaultValue?: string | string[];
|
|
17
|
+
onChange?: (value: string | string[]) => void;
|
|
18
|
+
multiple?: boolean;
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
className?: string;
|
|
22
|
+
inputProps?: Partial<InputProps>;
|
|
23
|
+
name?: string;
|
|
24
|
+
id?: string;
|
|
25
|
+
required?: boolean;
|
|
26
|
+
fullWidth?: boolean;
|
|
27
|
+
minWidth?: number | string;
|
|
28
|
+
maxWidth?: number | string;
|
|
29
|
+
minHeight?: number | string;
|
|
30
|
+
maxHeight?: number | string;
|
|
31
|
+
autoWidth?: boolean;
|
|
32
|
+
clearable?: boolean;
|
|
33
|
+
/** Open the dropdown immediately on mount - useful for inline cell editors. */
|
|
34
|
+
autoOpen?: boolean;
|
|
35
|
+
dropdownProps?: {
|
|
36
|
+
dropdownLevel?: number;
|
|
37
|
+
dropdownGroup?: string;
|
|
38
|
+
[key: string]: unknown;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type { SelectOption as S, SelectProps as a };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { a as InputProps } from './Input.types-DFZNyJGF.cjs';
|
|
2
|
+
import { I as IconType } from './renderIcon-C2lEMMzb.cjs';
|
|
3
|
+
|
|
4
|
+
interface SelectOption {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
value: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
icon?: IconType;
|
|
10
|
+
}
|
|
11
|
+
interface SelectProps {
|
|
12
|
+
options: SelectOption[];
|
|
13
|
+
/** Controlled selected value(s). */
|
|
14
|
+
value?: string | string[];
|
|
15
|
+
/** Initial selected value(s) for uncontrolled usage. Ignored when `value` is provided. */
|
|
16
|
+
defaultValue?: string | string[];
|
|
17
|
+
onChange?: (value: string | string[]) => void;
|
|
18
|
+
multiple?: boolean;
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
className?: string;
|
|
22
|
+
inputProps?: Partial<InputProps>;
|
|
23
|
+
name?: string;
|
|
24
|
+
id?: string;
|
|
25
|
+
required?: boolean;
|
|
26
|
+
fullWidth?: boolean;
|
|
27
|
+
minWidth?: number | string;
|
|
28
|
+
maxWidth?: number | string;
|
|
29
|
+
minHeight?: number | string;
|
|
30
|
+
maxHeight?: number | string;
|
|
31
|
+
autoWidth?: boolean;
|
|
32
|
+
clearable?: boolean;
|
|
33
|
+
/** Open the dropdown immediately on mount - useful for inline cell editors. */
|
|
34
|
+
autoOpen?: boolean;
|
|
35
|
+
dropdownProps?: {
|
|
36
|
+
dropdownLevel?: number;
|
|
37
|
+
dropdownGroup?: string;
|
|
38
|
+
[key: string]: unknown;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type { SelectOption as S, SelectProps as a };
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
useSensor,
|
|
12
12
|
useSensors,
|
|
13
13
|
useSortable
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-6DBCT5MK.js";
|
|
15
15
|
import {
|
|
16
16
|
Spinner
|
|
17
17
|
} from "./chunk-6ZAT5CGB.js";
|
|
@@ -741,4 +741,4 @@ var Table = ({
|
|
|
741
741
|
export {
|
|
742
742
|
Table
|
|
743
743
|
};
|
|
744
|
-
//# sourceMappingURL=chunk-
|
|
744
|
+
//# sourceMappingURL=chunk-2KO5ZCZC.js.map
|
|
@@ -10,6 +10,9 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
Dropdown
|
|
12
12
|
} from "./chunk-4BKTBV2I.js";
|
|
13
|
+
import {
|
|
14
|
+
Badge
|
|
15
|
+
} from "./chunk-3SKI6FXB.js";
|
|
13
16
|
import {
|
|
14
17
|
Button
|
|
15
18
|
} from "./chunk-WIE7HDIM.js";
|
|
@@ -71,9 +74,8 @@ var TableFiltersDropdown = ({
|
|
|
71
74
|
});
|
|
72
75
|
return JSON.stringify(filters) !== JSON.stringify(cleanedPendingFilters);
|
|
73
76
|
}, [filters, pendingFilters]);
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
}, [filters]);
|
|
77
|
+
const activeFilterCount = useMemo(() => Object.keys(filters).length, [filters]);
|
|
78
|
+
const hasActiveFilters = activeFilterCount > 0;
|
|
77
79
|
const getAllColumnsWithDisabledState = (currentRowId) => {
|
|
78
80
|
const currentRow = filterRows.find((row) => row.id === currentRowId);
|
|
79
81
|
const usedColumns = filterRows.filter((row) => row.id !== currentRowId && !row.columnKey.startsWith("__temp_")).map((row) => row.columnKey);
|
|
@@ -256,15 +258,16 @@ var TableFiltersDropdown = ({
|
|
|
256
258
|
}
|
|
257
259
|
};
|
|
258
260
|
const canAddMore = filterRows.length < filterableColumns.length;
|
|
259
|
-
const triggerButton = /* @__PURE__ */ jsx(
|
|
261
|
+
const triggerButton = /* @__PURE__ */ jsx(Badge, { content: activeFilterCount, max: 9, children: /* @__PURE__ */ jsx(
|
|
260
262
|
Button,
|
|
261
263
|
{
|
|
262
264
|
variant: "text",
|
|
263
265
|
size: "sm",
|
|
264
266
|
icon: Funnel,
|
|
267
|
+
"aria-label": hasActiveFilters ? `Filters (${activeFilterCount} active)` : "Filters",
|
|
265
268
|
className: hasActiveFilters ? "eidos-table-active-filter-button" : ""
|
|
266
269
|
}
|
|
267
|
-
);
|
|
270
|
+
) });
|
|
268
271
|
const dropdownContent = /* @__PURE__ */ jsxs("div", { className: `eidos-table-filters-dropdown ${className}`, children: [
|
|
269
272
|
/* @__PURE__ */ jsx("div", { className: "eidos-table-filters-header", children: /* @__PURE__ */ jsx("h4", { className: "eidos-table-filters-title", children: "Filters" }) }),
|
|
270
273
|
filterRows.length > 0 && /* @__PURE__ */ jsx("div", { className: "eidos-table-filter-rows", children: filterRows.map((row) => {
|
|
@@ -4415,4 +4418,4 @@ export {
|
|
|
4415
4418
|
sortableKeyboardCoordinates,
|
|
4416
4419
|
TableFiltersDropdown
|
|
4417
4420
|
};
|
|
4418
|
-
//# sourceMappingURL=chunk-
|
|
4421
|
+
//# sourceMappingURL=chunk-6DBCT5MK.js.map
|