@konstructio/ui 0.1.2-alpha.74 → 0.1.2-alpha.76
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/{Modal-CXRo8f-h.js → Modal-BTOXCb0Y.js} +1 -1
- package/dist/assets/icons/components/Home2.d.ts +3 -0
- package/dist/assets/icons/components/Home2.js +28 -0
- package/dist/assets/icons/components/Upload.d.ts +3 -0
- package/dist/assets/icons/components/Upload.js +28 -0
- package/dist/assets/icons/components/index.d.ts +2 -0
- package/dist/assets/icons/components/index.js +70 -66
- package/dist/assets/icons/index.js +70 -66
- package/dist/components/Alert/Alert.d.ts +2 -2
- package/dist/components/Alert/Alert.types.d.ts +3 -1
- package/dist/components/AlertDialog/AlertDialog.d.ts +2 -2
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +5 -3
- package/dist/components/AlertDialog/components/AlertDialogTrigger.d.ts +2 -2
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.types.d.ts +4 -2
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.d.ts +2 -2
- package/dist/components/Autocomplete/Autocomplete.types.d.ts +3 -1
- package/dist/components/Badge/Badge.d.ts +2 -2
- package/dist/components/Badge/Badge.types.d.ts +3 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +2 -2
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +3 -1
- package/dist/components/Breadcrumb/components/Item/Item.d.ts +2 -2
- package/dist/components/Breadcrumb/components/Item/Item.types.d.ts +3 -1
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Button/Button.types.d.ts +3 -1
- package/dist/components/Button/Button.variants.js +4 -5
- package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +1 -1
- package/dist/components/Card/Card.d.ts +2 -2
- package/dist/components/Card/Card.types.d.ts +3 -1
- package/dist/components/Checkbox/Checkbox.d.ts +2 -2
- package/dist/components/Checkbox/Checkbox.types.d.ts +3 -1
- package/dist/components/Command/Command.d.ts +2 -2
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/Command.types.d.ts +3 -1
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +1 -1
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Counter/Counter.d.ts +2 -2
- package/dist/components/Counter/Counter.types.d.ts +3 -1
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +2 -2
- package/dist/components/DateRangePicker/DateRangePicker.types.d.ts +3 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +1 -1
- package/dist/components/Datepicker/DatePicker.d.ts +2 -2
- package/dist/components/Datepicker/DatePicker.types.d.ts +3 -1
- package/dist/components/Filter/Filter.js +24 -22
- package/dist/components/Filter/Filter.types.d.ts +13 -3
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.d.ts +3 -1
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +57 -41
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +75 -49
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.types.d.ts +2 -0
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +38 -37
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +31 -30
- package/dist/components/Filter/components/ResetButton/ResetButton.types.d.ts +1 -1
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +64 -47
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.types.d.ts +2 -0
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.js +35 -34
- package/dist/components/Filter/contexts/filter.context.d.ts +4 -0
- package/dist/components/Filter/contexts/filter.context.js +7 -0
- package/dist/components/Filter/contexts/filter.hook.d.ts +2 -0
- package/dist/components/Filter/contexts/filter.hook.js +11 -0
- package/dist/components/Filter/contexts/filter.provider.d.ts +5 -0
- package/dist/components/Filter/contexts/filter.provider.js +6 -0
- package/dist/components/Filter/contexts/index.d.ts +3 -0
- package/dist/components/Filter/contexts/index.js +8 -0
- package/dist/components/ImageUpload/ImageUpload.d.ts +2 -2
- package/dist/components/ImageUpload/ImageUpload.types.d.ts +3 -1
- package/dist/components/Input/Input.d.ts +2 -2
- package/dist/components/Input/Input.types.d.ts +3 -1
- package/dist/components/LineChart/LineChart.d.ts +2 -2
- package/dist/components/LineChart/LineChart.js +55 -52
- package/dist/components/LineChart/LineChart.types.d.ts +6 -2
- package/dist/components/Loading/Loading.d.ts +2 -2
- package/dist/components/Loading/Loading.types.d.ts +3 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +2 -2
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.d.ts +2 -2
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.types.d.ts +3 -1
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.types.d.ts +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +394 -353
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +2 -2
- package/dist/components/ProgressBar/ProgressBar.types.d.ts +3 -1
- package/dist/components/Radio/Radio.d.ts +2 -2
- package/dist/components/Radio/Radio.types.d.ts +3 -1
- package/dist/components/RadioCard/RadioCard.d.ts +2 -2
- package/dist/components/RadioCard/RadioCard.types.d.ts +5 -3
- package/dist/components/RadioCardGroup/RadioCardGroup.d.ts +2 -2
- package/dist/components/RadioCardGroup/RadioCardGroup.types.d.ts +4 -2
- package/dist/components/RadioGroup/RadioGroup.d.ts +2 -2
- package/dist/components/RadioGroup/RadioGroup.types.d.ts +4 -2
- package/dist/components/Range/Range.d.ts +2 -2
- package/dist/components/Range/Range.types.d.ts +3 -1
- package/dist/components/Select/Select.d.ts +2 -2
- package/dist/components/Select/Select.types.d.ts +4 -1
- package/dist/components/Select/Select.variants.js +1 -1
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.types.d.ts +1 -1
- package/dist/components/Select/components/List/List.js +64 -61
- package/dist/components/Select/components/List/List.types.d.ts +2 -1
- package/dist/components/Select/components/Wrapper.js +46 -44
- package/dist/components/Select/constants/index.d.ts +1 -0
- package/dist/components/Select/constants/index.js +3 -1
- package/dist/components/Select/constants/list.d.ts +1 -0
- package/dist/components/Select/constants/list.js +4 -0
- package/dist/components/Sidebar/Sidebar.d.ts +1 -1
- package/dist/components/Sidebar/Sidebar.types.d.ts +3 -1
- package/dist/components/Sidebar/components/Footer/Footer.d.ts +2 -2
- package/dist/components/Sidebar/components/Footer/Footer.types.d.ts +3 -1
- package/dist/components/Sidebar/components/Logo/Logo.d.ts +2 -2
- package/dist/components/Sidebar/components/Logo/Logo.types.d.ts +3 -1
- package/dist/components/Sidebar/components/Navigation/Navigation.d.ts +2 -2
- package/dist/components/Sidebar/components/Navigation/Navigation.types.d.ts +7 -5
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.d.ts +2 -2
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.d.ts +3 -1
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.d.ts +2 -2
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.d.ts +3 -1
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.d.ts +2 -2
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.d.ts +3 -1
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.d.ts +2 -2
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +1 -5
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.d.ts +3 -1
- package/dist/components/Sidebar/components/index.d.ts +7 -7
- package/dist/components/Slider/Slider.d.ts +2 -2
- package/dist/components/Slider/Slider.types.d.ts +3 -1
- package/dist/components/Spinner/Spinner.d.ts +2 -2
- package/dist/components/Spinner/Spinner.types.d.ts +4 -2
- package/dist/components/Stepper/Stepper.d.ts +2 -2
- package/dist/components/Stepper/Stepper.types.d.ts +3 -1
- package/dist/components/Switch/Switch.d.ts +2 -2
- package/dist/components/Switch/Switch.types.d.ts +3 -1
- package/dist/components/Table/Table.types.d.ts +3 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/components/Tabs/Tabs.types.d.ts +3 -1
- package/dist/components/Tag/Tag.d.ts +2 -2
- package/dist/components/Tag/Tag.types.d.ts +3 -1
- package/dist/components/TagSelect/TagSelect.d.ts +2 -2
- package/dist/components/TagSelect/TagSelect.js +3 -1
- package/dist/components/TagSelect/TagSelect.types.d.ts +4 -2
- package/dist/components/TagSelect/components/Item/Item.types.d.ts +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.types.d.ts +1 -1
- package/dist/components/TagSelect/contexts/TagSelect.types.d.ts +1 -1
- package/dist/components/TextArea/TextArea.d.ts +2 -2
- package/dist/components/TextArea/TextArea.types.d.ts +3 -1
- package/dist/components/TimePicker/TimePicker.d.ts +2 -2
- package/dist/components/TimePicker/TimePicker.types.d.ts +3 -1
- package/dist/components/TimePicker/components/HoursList/HoursList.types.d.ts +1 -1
- package/dist/components/TimePicker/components/MeridianList/MeridianList.types.d.ts +1 -1
- package/dist/components/TimePicker/components/MinutesList/MinutesList.types.d.ts +1 -1
- package/dist/components/TimePicker/components/Wrapper/Wrapper.types.d.ts +1 -1
- package/dist/components/TimePicker/components/WrapperList/WrapperList.types.d.ts +1 -1
- package/dist/components/Toast/Toast.d.ts +2 -2
- package/dist/components/Toast/Toast.js +191 -184
- package/dist/components/Toast/Toast.types.d.ts +3 -1
- package/dist/components/Toast/Toast.variants.js +6 -12
- package/dist/components/Tooltip/Tooltip.d.ts +2 -2
- package/dist/components/Tooltip/Tooltip.js +20 -20
- package/dist/components/Tooltip/Tooltip.types.d.ts +3 -1
- package/dist/components/Typography/Typography.d.ts +2 -2
- package/dist/components/Typography/Typography.types.d.ts +3 -1
- package/dist/components/VirtualizedTable/VirtualizedTable.js +57 -55
- package/dist/components/VirtualizedTable/VirtualizedTable.types.d.ts +3 -1
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +55 -54
- package/dist/components/VirtualizedTable/components/Filter/Filter.types.d.ts +1 -0
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.d.ts +1 -1
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +55 -26
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.types.d.ts +4 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1
- package/dist/icons.d.ts +1 -1
- package/dist/icons.js +70 -66
- package/dist/index-BvEpLnOv.js +144 -0
- package/dist/{index-Dd_ZmIqU.js → index-C7zAY3xv.js} +1 -1
- package/dist/{index-Dfq4O3b4.js → index-CrCTywU1.js} +1 -1
- package/dist/{index-9a-FL_6D.js → index-DWyM654o.js} +41 -42
- package/dist/{index-B7-5g1Sm.js → index-mPinF0Ho.js} +407 -401
- package/dist/index.js +1 -1
- package/dist/package.json +10 -10
- package/dist/proxy-BvdTb_6B.js +4974 -0
- package/dist/styles.css +1 -1
- package/package.json +10 -10
- package/dist/index-CESXsoMn.js +0 -14
- package/dist/index-URQGEGX7.js +0 -136
- package/dist/proxy-0sbyKj-k.js +0 -4946
|
@@ -20,7 +20,7 @@ import { toastVariants } from './Toast.variants';
|
|
|
20
20
|
* </Toast>
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
-
export interface
|
|
23
|
+
export interface Props extends PropsWithChildren, VariantProps<typeof toastVariants> {
|
|
24
24
|
/** Additional CSS classes for the toast */
|
|
25
25
|
className?: string;
|
|
26
26
|
/** CSS classes for the close button */
|
|
@@ -44,3 +44,5 @@ export interface ToastProps extends PropsWithChildren, VariantProps<typeof toast
|
|
|
44
44
|
/** Callback to update open state */
|
|
45
45
|
setOpen: (open: boolean) => void;
|
|
46
46
|
}
|
|
47
|
+
/** @deprecated Use Props instead */
|
|
48
|
+
export type ToastProps = Props;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as a } from "../../index-D29mdTf5.js";
|
|
2
|
-
const
|
|
2
|
+
const t = a(
|
|
3
3
|
[
|
|
4
4
|
"rounded-md",
|
|
5
5
|
"p-4",
|
|
@@ -30,7 +30,7 @@ const e = a(
|
|
|
30
30
|
variant: "success"
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
),
|
|
33
|
+
), s = a([
|
|
34
34
|
"fixed",
|
|
35
35
|
"bottom-0",
|
|
36
36
|
"right-0",
|
|
@@ -43,15 +43,9 @@ const e = a(
|
|
|
43
43
|
"m-0",
|
|
44
44
|
"z-50",
|
|
45
45
|
"outline-none"
|
|
46
|
-
]),
|
|
47
|
-
"top-2",
|
|
48
|
-
"right-2",
|
|
49
|
-
"w-4",
|
|
50
|
-
"h-4",
|
|
51
|
-
"text-white"
|
|
52
|
-
]);
|
|
46
|
+
]), i = a(["w-4", "h-4", "text-white"]);
|
|
53
47
|
export {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
48
|
+
i as closeToastVariants,
|
|
49
|
+
t as toastVariants,
|
|
50
|
+
s as viewportToastVariants
|
|
57
51
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Props } from './Tooltip.types';
|
|
3
3
|
/**
|
|
4
4
|
* A tooltip component that shows on hover.
|
|
5
5
|
* Built on Radix UI for accessible, well-positioned tooltips.
|
|
@@ -19,4 +19,4 @@ import { TooltipProps } from './Tooltip.types';
|
|
|
19
19
|
* </Tooltip>
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
|
-
export declare const Tooltip: FC<
|
|
22
|
+
export declare const Tooltip: FC<Props>;
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { P as
|
|
3
|
-
import { cn as
|
|
1
|
+
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { P as c, R as p, T as h, a as x, C as f, A as g } from "../../index-mPinF0Ho.js";
|
|
3
|
+
import { cn as w } from "../../utils/index.js";
|
|
4
4
|
const j = ({
|
|
5
|
-
content:
|
|
6
|
-
children:
|
|
7
|
-
side:
|
|
8
|
-
sideOffset:
|
|
5
|
+
content: e,
|
|
6
|
+
children: s,
|
|
7
|
+
side: t = "top",
|
|
8
|
+
sideOffset: o = 4,
|
|
9
9
|
bgClassName: i = "bg-slate-700",
|
|
10
|
-
arrowClassName:
|
|
11
|
-
textClassName:
|
|
10
|
+
arrowClassName: l = "fill-slate-700",
|
|
11
|
+
textClassName: n = "text-white",
|
|
12
12
|
className: d,
|
|
13
13
|
delayDuration: m = 0
|
|
14
|
-
}) => /* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */ r(
|
|
17
|
-
|
|
14
|
+
}) => /* @__PURE__ */ r(c, { delayDuration: m, children: /* @__PURE__ */ a(p, { children: [
|
|
15
|
+
/* @__PURE__ */ r(h, { asChild: !0, children: /* @__PURE__ */ r("span", { children: s }) }),
|
|
16
|
+
/* @__PURE__ */ r(x, { children: /* @__PURE__ */ a(
|
|
17
|
+
f,
|
|
18
18
|
{
|
|
19
|
-
side:
|
|
20
|
-
sideOffset:
|
|
21
|
-
className:
|
|
19
|
+
side: t,
|
|
20
|
+
sideOffset: o,
|
|
21
|
+
className: w(
|
|
22
22
|
"rounded px-2 py-1 text-xs shadow-md",
|
|
23
23
|
"animate-in fade-in-0",
|
|
24
24
|
i,
|
|
25
|
-
|
|
25
|
+
n,
|
|
26
26
|
d
|
|
27
27
|
),
|
|
28
28
|
children: [
|
|
29
|
-
|
|
30
|
-
/* @__PURE__ */
|
|
29
|
+
e,
|
|
30
|
+
/* @__PURE__ */ r(g, { className: l })
|
|
31
31
|
]
|
|
32
32
|
}
|
|
33
|
-
)
|
|
33
|
+
) })
|
|
34
34
|
] }) });
|
|
35
35
|
export {
|
|
36
36
|
j as Tooltip
|
|
@@ -17,7 +17,7 @@ import { ReactNode } from 'react';
|
|
|
17
17
|
* </Tooltip>
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
|
-
export interface
|
|
20
|
+
export interface Props {
|
|
21
21
|
/** Tooltip text or content */
|
|
22
22
|
content: ReactNode | string;
|
|
23
23
|
/** The trigger element */
|
|
@@ -37,3 +37,5 @@ export interface TooltipProps {
|
|
|
37
37
|
/** Delay before showing tooltip in ms */
|
|
38
38
|
delayDuration?: number;
|
|
39
39
|
}
|
|
40
|
+
/** @deprecated Use Props instead */
|
|
41
|
+
export type TooltipProps = Props;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Props } from './Typography.types';
|
|
3
3
|
/**
|
|
4
4
|
* A flexible typography component for consistent text styling.
|
|
5
5
|
* Automatically selects semantic HTML elements based on variant.
|
|
@@ -14,5 +14,5 @@ import { TypographyProps } from './Typography.types';
|
|
|
14
14
|
*
|
|
15
15
|
* @see {@link https://konstructio.github.io/konstruct-ui/?path=/docs/components-typography--docs Storybook}
|
|
16
16
|
*/
|
|
17
|
-
declare const Typography: ForwardRefExoticComponent<Omit<
|
|
17
|
+
declare const Typography: ForwardRefExoticComponent<Omit<Props, 'ref'> & RefAttributes<HTMLParagraphElement & HTMLHeadingElement & HTMLLabelElement>>;
|
|
18
18
|
export { Typography };
|
|
@@ -15,7 +15,7 @@ export type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
|
15
15
|
* <Typography variant="h2" component="p">Styled as h2 but renders as p</Typography>
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
|
-
export interface
|
|
18
|
+
export interface Props extends HTMLAttributes<ComponentRef<HeadingTag | 'p' | 'span'>>, VariantProps<typeof typographyVariants> {
|
|
19
19
|
/** Ref to the underlying DOM element */
|
|
20
20
|
ref?: Ref<HTMLHeadingElement | HTMLParagraphElement | HTMLSpanElement>;
|
|
21
21
|
/** Text content to display */
|
|
@@ -27,3 +27,5 @@ export interface TypographyProps extends HTMLAttributes<ComponentRef<HeadingTag
|
|
|
27
27
|
/** For use with label component to associate with form input */
|
|
28
28
|
htmlFor?: string;
|
|
29
29
|
}
|
|
30
|
+
/** @deprecated Use Props instead */
|
|
31
|
+
export type TypographyProps = Props;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as r, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as
|
|
2
|
+
import { useMemo as Y } from "react";
|
|
3
3
|
import { cn as s } from "../../utils/index.js";
|
|
4
|
-
import { sendToggleRowEvent as
|
|
5
|
-
import { TableProvider as
|
|
6
|
-
import { Filter as
|
|
7
|
-
import { WrapperBody as
|
|
8
|
-
import { Header as
|
|
9
|
-
import { Body as
|
|
10
|
-
import { Pagination as
|
|
4
|
+
import { sendToggleRowEvent as Z, sendCollapseRowEvent as _, sendExpandRowEvent as $ } from "./events/index.js";
|
|
5
|
+
import { TableProvider as D } from "./contexts/table.provider.js";
|
|
6
|
+
import { Filter as L } from "./components/Filter/Filter.js";
|
|
7
|
+
import { WrapperBody as rr } from "./components/WrapperBody/WrapperBody.js";
|
|
8
|
+
import { Header as er } from "./components/Header/Header.js";
|
|
9
|
+
import { Body as or } from "./components/Body/Body.js";
|
|
10
|
+
import { Pagination as tr } from "./components/Pagination/Pagination.js";
|
|
11
11
|
import { TruncateText as ar } from "./components/TruncateText/TruncateText.js";
|
|
12
|
-
import { Actions as
|
|
13
|
-
const
|
|
12
|
+
import { Actions as ir } from "./components/Actions/Actions.js";
|
|
13
|
+
const lr = ({
|
|
14
14
|
id: c,
|
|
15
15
|
ariaLabel: p,
|
|
16
16
|
columns: d,
|
|
@@ -22,13 +22,13 @@ const ir = ({
|
|
|
22
22
|
classNameHeaderTable: x,
|
|
23
23
|
classNameTable: E,
|
|
24
24
|
classNameWrapperTable: N,
|
|
25
|
-
isLoading:
|
|
25
|
+
isLoading: t,
|
|
26
26
|
getRowId: w,
|
|
27
27
|
fetchData: A,
|
|
28
28
|
queryOptions: y,
|
|
29
29
|
// Pagination
|
|
30
30
|
showPagination: h,
|
|
31
|
-
showTotalItems:
|
|
31
|
+
showTotalItems: a,
|
|
32
32
|
showDropdownPagination: i,
|
|
33
33
|
showDotPagination: l,
|
|
34
34
|
showFormPagination: m,
|
|
@@ -42,25 +42,26 @@ const ir = ({
|
|
|
42
42
|
filterActions: k,
|
|
43
43
|
showResetButton: P = !0,
|
|
44
44
|
resetButtonClassName: C,
|
|
45
|
+
closeOnApply: H = !0,
|
|
45
46
|
// Hover row
|
|
46
|
-
enableHoverRow:
|
|
47
|
-
classNameHoverRow:
|
|
47
|
+
enableHoverRow: I,
|
|
48
|
+
classNameHoverRow: K,
|
|
48
49
|
// Expandable rows
|
|
49
|
-
enableExpandedRow:
|
|
50
|
-
expandedState:
|
|
51
|
-
defaultExpanded:
|
|
52
|
-
classNameExpandedRow:
|
|
53
|
-
classNameExpandedCell:
|
|
54
|
-
classNameExpandedContent:
|
|
55
|
-
classNameExpandedHeader:
|
|
56
|
-
classNameActiveExpandedRow:
|
|
57
|
-
onExpandedChange:
|
|
58
|
-
renderExpandedRow:
|
|
59
|
-
keepExpandColumnVisible:
|
|
50
|
+
enableExpandedRow: M,
|
|
51
|
+
expandedState: W,
|
|
52
|
+
defaultExpanded: q,
|
|
53
|
+
classNameExpandedRow: F,
|
|
54
|
+
classNameExpandedCell: G,
|
|
55
|
+
classNameExpandedContent: J,
|
|
56
|
+
classNameExpandedHeader: O,
|
|
57
|
+
classNameActiveExpandedRow: Q,
|
|
58
|
+
onExpandedChange: S,
|
|
59
|
+
renderExpandedRow: U,
|
|
60
|
+
keepExpandColumnVisible: X
|
|
60
61
|
}) => {
|
|
61
|
-
const e =
|
|
62
|
+
const e = Y(
|
|
62
63
|
() => h || [
|
|
63
|
-
|
|
64
|
+
a,
|
|
64
65
|
i,
|
|
65
66
|
l,
|
|
66
67
|
m
|
|
@@ -68,7 +69,7 @@ const ir = ({
|
|
|
68
69
|
[]
|
|
69
70
|
);
|
|
70
71
|
return /* @__PURE__ */ r(
|
|
71
|
-
|
|
72
|
+
D,
|
|
72
73
|
{
|
|
73
74
|
id: c,
|
|
74
75
|
columns: d,
|
|
@@ -78,22 +79,22 @@ const ir = ({
|
|
|
78
79
|
totalItems: u,
|
|
79
80
|
queryOptions: y,
|
|
80
81
|
isPaginationEnabled: e,
|
|
81
|
-
enableExpandedRow:
|
|
82
|
-
expandedState:
|
|
83
|
-
onExpandedChange:
|
|
84
|
-
defaultExpanded:
|
|
85
|
-
classNameExpandedRow:
|
|
86
|
-
classNameExpandedCell:
|
|
87
|
-
classNameExpandedContent:
|
|
88
|
-
classNameExpandedHeader:
|
|
89
|
-
classNameActiveExpandedRow:
|
|
90
|
-
enableHoverRow:
|
|
91
|
-
classNameHoverRow:
|
|
92
|
-
renderExpandedRow:
|
|
93
|
-
keepExpandColumnVisible:
|
|
82
|
+
enableExpandedRow: M,
|
|
83
|
+
expandedState: W,
|
|
84
|
+
onExpandedChange: S,
|
|
85
|
+
defaultExpanded: q,
|
|
86
|
+
classNameExpandedRow: F,
|
|
87
|
+
classNameExpandedCell: G,
|
|
88
|
+
classNameExpandedContent: J,
|
|
89
|
+
classNameExpandedHeader: O,
|
|
90
|
+
classNameActiveExpandedRow: Q,
|
|
91
|
+
enableHoverRow: I,
|
|
92
|
+
classNameHoverRow: K,
|
|
93
|
+
renderExpandedRow: U,
|
|
94
|
+
keepExpandColumnVisible: X,
|
|
94
95
|
children: /* @__PURE__ */ n("section", { className: s("w-full min-w-fit", b), children: [
|
|
95
96
|
B && /* @__PURE__ */ r(
|
|
96
|
-
|
|
97
|
+
L,
|
|
97
98
|
{
|
|
98
99
|
actions: k,
|
|
99
100
|
filters: g,
|
|
@@ -101,15 +102,16 @@ const ir = ({
|
|
|
101
102
|
placeholder: V,
|
|
102
103
|
showFilterInput: R,
|
|
103
104
|
showResetButton: P,
|
|
104
|
-
resetButtonClassName: C
|
|
105
|
+
resetButtonClassName: C,
|
|
106
|
+
closeOnApply: H
|
|
105
107
|
}
|
|
106
108
|
),
|
|
107
109
|
/* @__PURE__ */ r(
|
|
108
|
-
|
|
110
|
+
rr,
|
|
109
111
|
{
|
|
110
112
|
showPagination: e,
|
|
111
113
|
classNameWrapperTable: N,
|
|
112
|
-
isLoading:
|
|
114
|
+
isLoading: t,
|
|
113
115
|
children: /* @__PURE__ */ n(
|
|
114
116
|
"table",
|
|
115
117
|
{
|
|
@@ -121,41 +123,41 @@ const ir = ({
|
|
|
121
123
|
"aria-label": p,
|
|
122
124
|
children: [
|
|
123
125
|
/* @__PURE__ */ r(
|
|
124
|
-
|
|
126
|
+
er,
|
|
125
127
|
{
|
|
126
128
|
className: x,
|
|
127
129
|
classNameArrows: v,
|
|
128
130
|
classNameActiveArrows: T
|
|
129
131
|
}
|
|
130
132
|
),
|
|
131
|
-
/* @__PURE__ */ r(
|
|
133
|
+
/* @__PURE__ */ r(or, { isLoading: t, showPagination: e })
|
|
132
134
|
]
|
|
133
135
|
}
|
|
134
136
|
)
|
|
135
137
|
}
|
|
136
138
|
),
|
|
137
139
|
e && /* @__PURE__ */ r(
|
|
138
|
-
|
|
140
|
+
tr,
|
|
139
141
|
{
|
|
140
|
-
showTotalItems:
|
|
142
|
+
showTotalItems: a,
|
|
141
143
|
showDropdownPagination: i,
|
|
142
144
|
showDotPagination: l,
|
|
143
145
|
showFormPagination: m,
|
|
144
146
|
pageSizes: z,
|
|
145
|
-
isLoading:
|
|
147
|
+
isLoading: t
|
|
146
148
|
}
|
|
147
149
|
)
|
|
148
150
|
] })
|
|
149
151
|
}
|
|
150
152
|
);
|
|
151
|
-
}, o =
|
|
153
|
+
}, o = lr;
|
|
152
154
|
o.displayName = "KonstructVirtualizedTable";
|
|
153
155
|
o.TruncateText = ar;
|
|
154
|
-
o.Actions =
|
|
156
|
+
o.Actions = ir;
|
|
155
157
|
o.Events = {
|
|
156
|
-
sendExpandRowEvent:
|
|
157
|
-
sendCollapseRowEvent:
|
|
158
|
-
sendToggleRowEvent:
|
|
158
|
+
sendExpandRowEvent: $,
|
|
159
|
+
sendCollapseRowEvent: _,
|
|
160
|
+
sendToggleRowEvent: Z
|
|
159
161
|
};
|
|
160
162
|
export {
|
|
161
163
|
ar as TruncateText,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ColumnDef as ColumnDefPrimitive, ExpandedState, OnChangeFn, RowData as RowDataPrimitive } from '@tanstack/react-table';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
import { ButtonProps } from '../Button/Button.types';
|
|
4
|
+
import { Props as ButtonProps } from '../Button/Button.types';
|
|
5
5
|
import { DateRange, DateRangeWithTime } from '../DateRangePicker/DateRangePicker.types';
|
|
6
6
|
import { TimePreset } from '../Filter/components/TimeFilterDropdown/TimeFilterDropdown.types';
|
|
7
7
|
import { virtualizeTableVariants } from './VirtualizedTable.variants';
|
|
@@ -187,6 +187,7 @@ export type Props<TData extends RowDataPrimitive> = VariantProps<typeof virtuali
|
|
|
187
187
|
filterActions?: ActionFilterConfig[];
|
|
188
188
|
showResetButton?: boolean;
|
|
189
189
|
resetButtonClassName?: string;
|
|
190
|
+
closeOnApply?: boolean;
|
|
190
191
|
} | {
|
|
191
192
|
filterSearchPlaceholder?: never;
|
|
192
193
|
/** @deprecated Use `filters` instead */
|
|
@@ -198,6 +199,7 @@ export type Props<TData extends RowDataPrimitive> = VariantProps<typeof virtuali
|
|
|
198
199
|
filterActions?: ActionFilterConfig[];
|
|
199
200
|
showResetButton?: never;
|
|
200
201
|
resetButtonClassName?: never;
|
|
202
|
+
closeOnApply?: never;
|
|
201
203
|
}) & ({
|
|
202
204
|
enableExpandedRow: true;
|
|
203
205
|
expandedState?: ExpandedState;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { jsxs as m, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { d as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { Filter as
|
|
6
|
-
import { Input as
|
|
7
|
-
import { cn as
|
|
8
|
-
import { useTableContext as
|
|
9
|
-
const
|
|
2
|
+
import { d as G } from "../../../../debounce-DJveWHr_.js";
|
|
3
|
+
import { useRef as H, useMemo as p, useCallback as w } from "react";
|
|
4
|
+
import { Button as J } from "../../../Button/Button.js";
|
|
5
|
+
import { Filter as r } from "../../../Filter/Filter.js";
|
|
6
|
+
import { Input as K } from "../../../Input/Input.js";
|
|
7
|
+
import { cn as L } from "../../../../utils/index.js";
|
|
8
|
+
import { useTableContext as Q } from "../../contexts/table.hook.js";
|
|
9
|
+
const te = ({
|
|
10
10
|
actions: u,
|
|
11
11
|
filters: d,
|
|
12
12
|
multiSelectFilter: i,
|
|
13
13
|
placeholder: T,
|
|
14
14
|
showFilterInput: v = !0,
|
|
15
15
|
showResetButton: x = !0,
|
|
16
|
-
resetButtonClassName: M
|
|
16
|
+
resetButtonClassName: M,
|
|
17
|
+
closeOnApply: j = !0
|
|
17
18
|
}) => {
|
|
18
|
-
const l =
|
|
19
|
+
const l = H(null), {
|
|
19
20
|
termOfSearch: h,
|
|
20
21
|
multiselectSelected: y,
|
|
21
22
|
dateFilters: F,
|
|
@@ -23,10 +24,10 @@ const ee = ({
|
|
|
23
24
|
timeFilters: D,
|
|
24
25
|
onChangeTermOfSearch: c,
|
|
25
26
|
onSelectMultiselect: R,
|
|
26
|
-
onSelectDateFilter:
|
|
27
|
-
onSelectDateRangeFilter:
|
|
28
|
-
onSelectTimeFilter:
|
|
29
|
-
} =
|
|
27
|
+
onSelectDateFilter: O,
|
|
28
|
+
onSelectDateRangeFilter: A,
|
|
29
|
+
onSelectTimeFilter: B
|
|
30
|
+
} = Q(), k = p(() => {
|
|
30
31
|
const e = d ?? i?.map((o) => ({
|
|
31
32
|
...o,
|
|
32
33
|
type: "badgeMultiSelect"
|
|
@@ -38,14 +39,14 @@ const ee = ({
|
|
|
38
39
|
t.map((o) => o.id)
|
|
39
40
|
),
|
|
40
41
|
[R]
|
|
41
|
-
),
|
|
42
|
+
), P = w(() => {
|
|
42
43
|
c(""), l.current && (l.current.value = "");
|
|
43
|
-
}, [c]),
|
|
44
|
-
() =>
|
|
44
|
+
}, [c]), I = p(
|
|
45
|
+
() => G((e) => {
|
|
45
46
|
c(e.target.value);
|
|
46
47
|
}, 500),
|
|
47
48
|
[c]
|
|
48
|
-
),
|
|
49
|
+
), N = p(
|
|
49
50
|
() => !!h || Object.values(y ?? {}).flat().length > 0 || Object.values(F ?? {}).some(Boolean) || Object.values(b ?? {}).some(Boolean) || Object.values(D ?? {}).some(Boolean),
|
|
50
51
|
[
|
|
51
52
|
h,
|
|
@@ -54,38 +55,38 @@ const ee = ({
|
|
|
54
55
|
b,
|
|
55
56
|
D
|
|
56
57
|
]
|
|
57
|
-
),
|
|
58
|
+
), g = (e) => {
|
|
58
59
|
if (e.type === "action") {
|
|
59
60
|
const {
|
|
60
61
|
label: a,
|
|
61
|
-
appearance:
|
|
62
|
-
variant:
|
|
63
|
-
leftIcon:
|
|
64
|
-
rightIcon:
|
|
65
|
-
type:
|
|
66
|
-
...
|
|
62
|
+
appearance: _ = "compact",
|
|
63
|
+
variant: $ = "secondary",
|
|
64
|
+
leftIcon: q,
|
|
65
|
+
rightIcon: z,
|
|
66
|
+
type: U,
|
|
67
|
+
...E
|
|
67
68
|
} = e;
|
|
68
69
|
return /* @__PURE__ */ m(
|
|
69
|
-
|
|
70
|
+
J,
|
|
70
71
|
{
|
|
71
|
-
appearance:
|
|
72
|
-
variant:
|
|
73
|
-
...
|
|
72
|
+
appearance: _,
|
|
73
|
+
variant: $,
|
|
74
|
+
...E,
|
|
74
75
|
children: [
|
|
75
|
-
|
|
76
|
+
q,
|
|
76
77
|
a,
|
|
77
|
-
|
|
78
|
+
z
|
|
78
79
|
]
|
|
79
80
|
},
|
|
80
81
|
a
|
|
81
82
|
);
|
|
82
83
|
}
|
|
83
|
-
const { key: t, label: o, position:
|
|
84
|
+
const { key: t, label: o, position: s = "right" } = e;
|
|
84
85
|
return e.type === "textMultiSelect" ? /* @__PURE__ */ n(
|
|
85
|
-
|
|
86
|
+
r.TextMultiSelect,
|
|
86
87
|
{
|
|
87
88
|
label: o,
|
|
88
|
-
position:
|
|
89
|
+
position: s,
|
|
89
90
|
options: e.options,
|
|
90
91
|
onApply: (a) => {
|
|
91
92
|
S(t, a);
|
|
@@ -93,21 +94,21 @@ const ee = ({
|
|
|
93
94
|
},
|
|
94
95
|
t
|
|
95
96
|
) : e.type === "date" ? /* @__PURE__ */ n(
|
|
96
|
-
|
|
97
|
+
r.DateFilterDropdown,
|
|
97
98
|
{
|
|
98
99
|
label: o,
|
|
99
|
-
position:
|
|
100
|
+
position: s,
|
|
100
101
|
countryCode: e.countryCode,
|
|
101
102
|
onApply: (a) => {
|
|
102
|
-
|
|
103
|
+
O(t, a);
|
|
103
104
|
}
|
|
104
105
|
},
|
|
105
106
|
t
|
|
106
107
|
) : e.type === "dateRange" ? /* @__PURE__ */ n(
|
|
107
|
-
|
|
108
|
+
r.DateRangeFilterDropdown,
|
|
108
109
|
{
|
|
109
110
|
label: o,
|
|
110
|
-
position:
|
|
111
|
+
position: s,
|
|
111
112
|
showTime: e.showTime,
|
|
112
113
|
timeFormat: e.timeFormat,
|
|
113
114
|
showPresets: e.showPresets,
|
|
@@ -116,29 +117,29 @@ const ee = ({
|
|
|
116
117
|
maxDate: e.maxDate,
|
|
117
118
|
countryCode: e.countryCode,
|
|
118
119
|
onApply: (a) => {
|
|
119
|
-
|
|
120
|
+
A(t, a);
|
|
120
121
|
},
|
|
121
122
|
onRangeChange: e.onRangeChange
|
|
122
123
|
},
|
|
123
124
|
t
|
|
124
125
|
) : e.type === "time" ? /* @__PURE__ */ n(
|
|
125
|
-
|
|
126
|
+
r.TimeFilterDropdown,
|
|
126
127
|
{
|
|
127
128
|
label: o,
|
|
128
|
-
position:
|
|
129
|
+
position: s,
|
|
129
130
|
format: e.format,
|
|
130
131
|
presets: e.presets,
|
|
131
132
|
showTimePicker: e.showTimePicker,
|
|
132
133
|
onApply: (a) => {
|
|
133
|
-
|
|
134
|
+
B(t, a);
|
|
134
135
|
}
|
|
135
136
|
},
|
|
136
137
|
t
|
|
137
138
|
) : /* @__PURE__ */ n(
|
|
138
|
-
|
|
139
|
+
r.BadgeMultiSelect,
|
|
139
140
|
{
|
|
140
141
|
label: o,
|
|
141
|
-
position:
|
|
142
|
+
position: s,
|
|
142
143
|
options: e.options,
|
|
143
144
|
onApply: (a) => {
|
|
144
145
|
S(t, a);
|
|
@@ -149,7 +150,7 @@ const ee = ({
|
|
|
149
150
|
};
|
|
150
151
|
return /* @__PURE__ */ m("div", { className: "w-full flex items-center justify-end pb-6", children: [
|
|
151
152
|
v && /* @__PURE__ */ n(
|
|
152
|
-
|
|
153
|
+
K,
|
|
153
154
|
{
|
|
154
155
|
ref: l,
|
|
155
156
|
placeholder: T,
|
|
@@ -157,22 +158,22 @@ const ee = ({
|
|
|
157
158
|
autoComplete: "false",
|
|
158
159
|
className: "w-72",
|
|
159
160
|
inputMode: "search",
|
|
160
|
-
onChange:
|
|
161
|
+
onChange: I
|
|
161
162
|
}
|
|
162
163
|
),
|
|
163
|
-
/* @__PURE__ */ m(
|
|
164
|
-
|
|
164
|
+
/* @__PURE__ */ m(r, { closeOnApply: j, children: [
|
|
165
|
+
k.map(g),
|
|
165
166
|
x && /* @__PURE__ */ n(
|
|
166
|
-
|
|
167
|
+
r.ResetButton,
|
|
167
168
|
{
|
|
168
|
-
className:
|
|
169
|
-
disabled: !
|
|
170
|
-
onClick:
|
|
169
|
+
className: L("select-none", M),
|
|
170
|
+
disabled: !N,
|
|
171
|
+
onClick: P
|
|
171
172
|
}
|
|
172
173
|
)
|
|
173
174
|
] })
|
|
174
175
|
] });
|
|
175
176
|
};
|
|
176
177
|
export {
|
|
177
|
-
|
|
178
|
+
te as Filter
|
|
178
179
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Props } from './TruncateText.types';
|
|
2
|
-
export declare const TruncateText: <TData>({ getValue, value }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const TruncateText: <TData>({ getValue, value, textClassName, side, sideOffset, bgClassName, arrowClassName, className, delayDuration, }: Props<TData>) => import("react/jsx-runtime").JSX.Element;
|