@cloudwick/astral-ui 7.0.0 → 8.0.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 +3 -1
- package/dist/components/accordion/accordion.d.ts +5 -1
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +5 -6
- package/dist/components/card/card.d.ts +7 -8
- package/dist/components/card/cardVariants.d.ts +3 -3
- package/dist/components/dropdown/dropdown.d.ts +17 -0
- package/dist/components/emptyState/emptyState.d.ts +1 -4
- package/dist/components/modal/modal.d.ts +6 -7
- package/dist/components/multiSelectTransfer/index.d.ts +3 -0
- package/dist/components/multiSelectTransfer/multiSelectTransfer.d.ts +6 -0
- package/dist/components/multiSelectTransfer/multiSelectTransferDropdown.d.ts +32 -0
- package/dist/components/multiSelectTransfer/multiSelectTransferModal.d.ts +34 -0
- package/dist/components/multiSelectTransfer/multiSelectTransferPill.d.ts +28 -0
- package/dist/components/multiSelectTransfer/multiSelectTransferVariants.d.ts +184 -0
- package/dist/components/multiSelectTransfer/types.d.ts +56 -0
- package/dist/components/panel/panel.d.ts +1 -2
- package/dist/components/radioGroup/index.d.ts +1 -1
- package/dist/components/radioGroup/radioGroup.d.ts +76 -12
- package/dist/components/radioGroup/radioGroupVariants.d.ts +30 -9
- package/dist/components/scrollbar/scrollbar.d.ts +7 -0
- package/dist/components/select/index.d.ts +2 -2
- package/dist/components/select/select.d.ts +3 -41
- package/dist/components/select/selectComponents.d.ts +45 -0
- package/dist/components/select/selectVariants.d.ts +15 -0
- package/dist/components/select/types.d.ts +138 -1
- package/dist/components/select/utils.d.ts +2 -0
- package/dist/components/tabs/tabs.d.ts +4 -5
- package/dist/components/tabs/tabsVariants.d.ts +12 -0
- package/dist/components/tooltip/tooltip.d.ts +17 -6
- package/dist/components/tooltip/tooltipVariants.d.ts +6 -6
- package/dist/components/transferList/index.d.ts +3 -0
- package/dist/components/transferList/transferList.d.ts +12 -0
- package/dist/components/transferList/transferListItem.d.ts +35 -0
- package/dist/components/transferList/transferListPanel.d.ts +51 -0
- package/dist/components/transferList/transferListVariants.d.ts +202 -0
- package/dist/components/transferList/types.d.ts +76 -0
- package/dist/components/transferList/useDragAutoScroll.d.ts +13 -0
- package/dist/components/transferList/useTransferList.d.ts +28 -0
- package/dist/css/fonts.min.css +1 -1
- package/dist/css/index.min.css +1 -1
- package/dist/fonts/NotoSans-Bold.woff2 +0 -0
- package/dist/fonts/NotoSans-BoldItalic.woff2 +0 -0
- package/dist/fonts/NotoSans-Italic.woff2 +0 -0
- package/dist/fonts/NotoSans-Medium.woff2 +0 -0
- package/dist/fonts/NotoSans-MediumItalic.woff2 +0 -0
- package/dist/fonts/NotoSans-Regular.woff2 +0 -0
- package/dist/fonts/NotoSans-SemiBold.woff2 +0 -0
- package/dist/fonts/NotoSans-SemiBoldItalic.woff2 +0 -0
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/useDebouncedCallback.d.ts +10 -0
- package/dist/hooks/useInfiniteScroll.d.ts +24 -0
- package/dist/hooks/useIsTruncated.d.ts +25 -0
- package/dist/hooks/useListboxKeyboardNav.d.ts +47 -0
- package/dist/index.cjs.js +5 -5
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +5 -5
- package/dist/utils/elementUtils.d.ts +18 -0
- package/dist/utils/index.d.ts +3 -1
- package/dist/utils/matchesQuery.d.ts +13 -0
- package/package.json +2 -2
- package/dist/fonts/Inter_18pt-Bold.ttf +0 -0
- package/dist/fonts/Inter_18pt-BoldItalic.ttf +0 -0
- package/dist/fonts/Inter_18pt-Italic.ttf +0 -0
- package/dist/fonts/Inter_18pt-Medium.ttf +0 -0
- package/dist/fonts/Inter_18pt-MediumItalic.ttf +0 -0
- package/dist/fonts/Inter_18pt-Regular.ttf +0 -0
- package/dist/fonts/Inter_18pt-SemiBold.ttf +0 -0
- package/dist/fonts/Inter_18pt-SemiBoldItalic.ttf +0 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
UI Library for Cloudwick
|
|
4
4
|
|
|
5
|
-
Version -
|
|
5
|
+
Version - 8.0.0
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -45,6 +45,7 @@ Astral UI provides the following components:
|
|
|
45
45
|
- FileUpload
|
|
46
46
|
- Loader
|
|
47
47
|
- Modal
|
|
48
|
+
- MultiSelectTransfer
|
|
48
49
|
- OtpInput
|
|
49
50
|
- Pagination
|
|
50
51
|
- Panel
|
|
@@ -62,6 +63,7 @@ Astral UI provides the following components:
|
|
|
62
63
|
- Toast
|
|
63
64
|
- Toggle
|
|
64
65
|
- Tooltip
|
|
66
|
+
- TransferList
|
|
65
67
|
- Truncate
|
|
66
68
|
|
|
67
69
|
## Tailwind CSS Configuration
|
|
@@ -15,6 +15,10 @@ export interface IAccordionBodyProps {
|
|
|
15
15
|
* Overwrite the styles for AccordionBody by passing space separated class names
|
|
16
16
|
*/
|
|
17
17
|
className?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Optional aria label for the accordion body
|
|
20
|
+
*/
|
|
21
|
+
"aria-label"?: string;
|
|
18
22
|
}
|
|
19
23
|
declare const AccordionBody: React.ForwardRefExoticComponent<IAccordionBodyProps & React.RefAttributes<HTMLDivElement>>;
|
|
20
24
|
export interface IAccordionProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
@@ -37,7 +41,7 @@ export interface IAccordionProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
37
41
|
*/
|
|
38
42
|
className?: string;
|
|
39
43
|
}
|
|
40
|
-
export interface IAccordionType extends React.ForwardRefExoticComponent<IAccordionProps & React.RefAttributes<HTMLDivElement>> {
|
|
44
|
+
export interface IAccordionType extends React.ForwardRefExoticComponent<React.PropsWithoutRef<IAccordionProps> & React.RefAttributes<HTMLDivElement>> {
|
|
41
45
|
Header: typeof AccordionHeader;
|
|
42
46
|
Body: typeof AccordionBody;
|
|
43
47
|
}
|
|
@@ -4,7 +4,7 @@ import * as React from "react";
|
|
|
4
4
|
*/
|
|
5
5
|
export interface IBadgeProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
6
|
/** Text to be displayed inside the badge */
|
|
7
|
-
label?:
|
|
7
|
+
label?: React.ReactNode;
|
|
8
8
|
/** Icon to be displayed before the label */
|
|
9
9
|
prefixIcon?: React.ReactNode;
|
|
10
10
|
/** Icon to be displayed after the label */
|
|
@@ -20,12 +20,11 @@ export interface IBreadcrumbsProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
20
20
|
*/
|
|
21
21
|
separatorType?: "arrow" | "dot";
|
|
22
22
|
}
|
|
23
|
+
type TBreadcrumbsCompoundComponent = React.ForwardRefExoticComponent<React.PropsWithoutRef<IBreadcrumbsProps> & React.RefAttributes<HTMLElement>> & {
|
|
24
|
+
Item: typeof BreadcrumbItem;
|
|
25
|
+
};
|
|
23
26
|
/**
|
|
24
27
|
* Breadcrumbs component for navigation
|
|
25
28
|
*/
|
|
26
|
-
declare const
|
|
27
|
-
|
|
28
|
-
Item: typeof BreadcrumbItem;
|
|
29
|
-
};
|
|
30
|
-
declare const Breadcrumbs: TBreadcrumbsCompoundComponent;
|
|
31
|
-
export { Breadcrumbs, BreadcrumbItem };
|
|
29
|
+
export declare const Breadcrumbs: TBreadcrumbsCompoundComponent;
|
|
30
|
+
export { BreadcrumbItem };
|
|
@@ -4,6 +4,11 @@ import { type ICTAGroupProps } from "../ctaGroup";
|
|
|
4
4
|
* Card component for displaying content in a container with optional header and footer
|
|
5
5
|
*/
|
|
6
6
|
export type TCardProps = React.HTMLAttributes<HTMLDivElement>;
|
|
7
|
+
type TCardCompoundComponent = React.ForwardRefExoticComponent<React.PropsWithoutRef<TCardProps> & React.RefAttributes<HTMLDivElement>> & {
|
|
8
|
+
Header: typeof CardHeader;
|
|
9
|
+
Body: typeof CardBody;
|
|
10
|
+
Footer: typeof CardFooter;
|
|
11
|
+
};
|
|
7
12
|
/**
|
|
8
13
|
* Card component with optional header, body, and footer
|
|
9
14
|
*
|
|
@@ -16,7 +21,7 @@ export type TCardProps = React.HTMLAttributes<HTMLDivElement>;
|
|
|
16
21
|
* </Card>
|
|
17
22
|
* ```
|
|
18
23
|
*/
|
|
19
|
-
declare const
|
|
24
|
+
export declare const Card: TCardCompoundComponent;
|
|
20
25
|
/**
|
|
21
26
|
* Card header props
|
|
22
27
|
*/
|
|
@@ -65,10 +70,4 @@ export type TCardFooterProps = React.HTMLAttributes<HTMLDivElement>;
|
|
|
65
70
|
* ```
|
|
66
71
|
*/
|
|
67
72
|
declare const CardFooter: React.ForwardRefExoticComponent<TCardFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
68
|
-
|
|
69
|
-
Header: typeof CardHeader;
|
|
70
|
-
Body: typeof CardBody;
|
|
71
|
-
Footer: typeof CardFooter;
|
|
72
|
-
};
|
|
73
|
-
declare const Card: TCardCompoundComponent;
|
|
74
|
-
export { Card, CardHeader, CardBody, CardFooter };
|
|
73
|
+
export { CardHeader, CardBody, CardFooter };
|
|
@@ -2,18 +2,18 @@ export declare const cardVariants: import("tailwind-variants").TVReturnType<{
|
|
|
2
2
|
[key: string]: {
|
|
3
3
|
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
4
4
|
base?: import("tailwind-merge").ClassNameValue;
|
|
5
|
-
header?: import("tailwind-merge").ClassNameValue;
|
|
6
5
|
body?: import("tailwind-merge").ClassNameValue;
|
|
7
6
|
footer?: import("tailwind-merge").ClassNameValue;
|
|
7
|
+
header?: import("tailwind-merge").ClassNameValue;
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
10
|
} | {
|
|
11
11
|
[x: string]: {
|
|
12
12
|
[x: string]: import("tailwind-merge").ClassNameValue | {
|
|
13
13
|
base?: import("tailwind-merge").ClassNameValue;
|
|
14
|
-
header?: import("tailwind-merge").ClassNameValue;
|
|
15
14
|
body?: import("tailwind-merge").ClassNameValue;
|
|
16
15
|
footer?: import("tailwind-merge").ClassNameValue;
|
|
16
|
+
header?: import("tailwind-merge").ClassNameValue;
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
19
|
} | {}, {
|
|
@@ -25,9 +25,9 @@ export declare const cardVariants: import("tailwind-variants").TVReturnType<{
|
|
|
25
25
|
[key: string]: {
|
|
26
26
|
[key: string]: import("tailwind-merge").ClassNameValue | {
|
|
27
27
|
base?: import("tailwind-merge").ClassNameValue;
|
|
28
|
-
header?: import("tailwind-merge").ClassNameValue;
|
|
29
28
|
body?: import("tailwind-merge").ClassNameValue;
|
|
30
29
|
footer?: import("tailwind-merge").ClassNameValue;
|
|
30
|
+
header?: import("tailwind-merge").ClassNameValue;
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
33
|
} | {}, {
|
|
@@ -25,6 +25,23 @@ export interface IDropdownProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
25
25
|
* Pass space separated class names to style the CTA
|
|
26
26
|
*/
|
|
27
27
|
ctaClassName?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Accessible name for the dropdown toggle button. Required when the CTA is
|
|
30
|
+
* icon-only (no visible text); omit it when the CTA already has a visible
|
|
31
|
+
* text label so the toggle isn't given a conflicting accessible name.
|
|
32
|
+
*/
|
|
33
|
+
ctaAriaLabel?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Opt a custom CTA into the "interactive" path. Native interactive elements
|
|
36
|
+
* (`button`, `a`, `summary`, `input`, `select`, `textarea`) are detected
|
|
37
|
+
* automatically, but a custom component (e.g. this library's `Button`) cannot
|
|
38
|
+
* be introspected. Set this when the CTA is a custom component that renders a
|
|
39
|
+
* real interactive element and forwards its `ref` and DOM props (`onClick`,
|
|
40
|
+
* `aria-*`, `className`, `disabled`) to it. When true the toggle props are
|
|
41
|
+
* merged directly onto the CTA instead of wrapping it in a `DropdownToggle`
|
|
42
|
+
* button. @default false
|
|
43
|
+
*/
|
|
44
|
+
interactiveTrigger?: boolean;
|
|
28
45
|
/**
|
|
29
46
|
* Determines whether the CTA should be disabled or not
|
|
30
47
|
*/
|
|
@@ -17,10 +17,7 @@ declare const lightSvgs: {
|
|
|
17
17
|
favorite: string;
|
|
18
18
|
login: string;
|
|
19
19
|
"file-upload": string;
|
|
20
|
-
"
|
|
21
|
-
"empty-data-2": string;
|
|
22
|
-
"empty-data-3": string;
|
|
23
|
-
"empty-data-4": string;
|
|
20
|
+
"no-data": string;
|
|
24
21
|
datapipeline: string;
|
|
25
22
|
};
|
|
26
23
|
export interface IEmptyStateProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
@@ -60,6 +60,10 @@ export interface IModalBodyProps {
|
|
|
60
60
|
*/
|
|
61
61
|
className?: string;
|
|
62
62
|
}
|
|
63
|
+
type TModalCompoundComponent = React.ForwardRefExoticComponent<React.PropsWithoutRef<IModalProps> & React.RefAttributes<HTMLDivElement>> & {
|
|
64
|
+
Header: typeof ModalHeader;
|
|
65
|
+
Body: typeof ModalBody;
|
|
66
|
+
};
|
|
63
67
|
/**
|
|
64
68
|
* Modal component for displaying content in an overlay with optional header and close button.
|
|
65
69
|
*
|
|
@@ -71,7 +75,7 @@ export interface IModalBodyProps {
|
|
|
71
75
|
* </Modal>
|
|
72
76
|
* ```
|
|
73
77
|
*/
|
|
74
|
-
declare const
|
|
78
|
+
export declare const Modal: TModalCompoundComponent;
|
|
75
79
|
/**
|
|
76
80
|
* Modal header component for rendering the title in the Modal.
|
|
77
81
|
*
|
|
@@ -90,9 +94,4 @@ declare const ModalHeader: React.ForwardRefExoticComponent<IModalHeaderProps & R
|
|
|
90
94
|
* ```
|
|
91
95
|
*/
|
|
92
96
|
declare const ModalBody: React.ForwardRefExoticComponent<IModalBodyProps & React.RefAttributes<HTMLDivElement>>;
|
|
93
|
-
|
|
94
|
-
Header: typeof ModalHeader;
|
|
95
|
-
Body: typeof ModalBody;
|
|
96
|
-
};
|
|
97
|
-
declare const Modal: TModalCompoundComponent;
|
|
98
|
-
export { Modal, ModalHeader, ModalBody };
|
|
97
|
+
export { ModalHeader, ModalBody };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type IMultiSelectTransferProps } from "./types";
|
|
3
|
+
export declare function MultiSelectTransfer({ id, className, label, placeholder, helperText, error, disabled, size, options, value, onChange, filterValue, onFilterChange, searchPlaceholder, filterDebounceMs, hasMore, onLoadMore, isLoading, maxVisiblePills, transferListTitle, transferListSubtitle, transferListHeader, onOpenTransferList, reorderable, reloadTooltip, onReload, isReloading, availablePanelHeaderSlot, selectedPanelHeaderSlot, cancelLabel, doneLabel }: IMultiSelectTransferProps): React.ReactElement;
|
|
4
|
+
export declare namespace MultiSelectTransfer {
|
|
5
|
+
var displayName: string;
|
|
6
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { TTransferListValue } from "../transferList/types";
|
|
3
|
+
import type { TMultiSelectTransferOption, TMultiSelectTransferSize } from "./types";
|
|
4
|
+
interface IMultiSelectTransferDropdownProps {
|
|
5
|
+
error?: boolean;
|
|
6
|
+
size: TMultiSelectTransferSize;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
filterQuery: string;
|
|
9
|
+
onFilterInput: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
10
|
+
onFilterKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
11
|
+
searchPlaceholder: string;
|
|
12
|
+
options: TMultiSelectTransferOption[];
|
|
13
|
+
selectedValues: Set<TTransferListValue>;
|
|
14
|
+
onOptionToggle: (option: TMultiSelectTransferOption) => void;
|
|
15
|
+
hasSelectAll: boolean;
|
|
16
|
+
areAllSelected: boolean;
|
|
17
|
+
onSelectAll: () => void;
|
|
18
|
+
isLoading?: boolean;
|
|
19
|
+
sentinelRef: React.RefObject<HTMLDivElement>;
|
|
20
|
+
reloadTooltip?: string;
|
|
21
|
+
onReload?: () => void;
|
|
22
|
+
isReloading?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The open-state dropdown for MultiSelectTransfer: a search input, an optional "Select All"
|
|
26
|
+
* row, the (draft-checked) option list, and the infinite-scroll sentinel.
|
|
27
|
+
*/
|
|
28
|
+
export declare function MultiSelectTransferDropdown({ error, size, disabled, filterQuery, onFilterInput, onFilterKeyDown, searchPlaceholder, options, selectedValues, onOptionToggle, hasSelectAll, areAllSelected, onSelectAll, isLoading, sentinelRef, reloadTooltip, onReload, isReloading }: IMultiSelectTransferDropdownProps): React.ReactElement;
|
|
29
|
+
export declare namespace MultiSelectTransferDropdown {
|
|
30
|
+
var displayName: string;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { TMultiSelectTransferOption } from "./types";
|
|
3
|
+
interface IMultiSelectTransferModalProps {
|
|
4
|
+
showModal: boolean;
|
|
5
|
+
availableItems: TMultiSelectTransferOption[];
|
|
6
|
+
selectedItems: TMultiSelectTransferOption[];
|
|
7
|
+
onChange: (availableItems: TMultiSelectTransferOption[], selectedItems: TMultiSelectTransferOption[]) => void;
|
|
8
|
+
onCancel: () => void;
|
|
9
|
+
onDone: () => void;
|
|
10
|
+
header?: React.ReactNode;
|
|
11
|
+
title?: React.ReactNode;
|
|
12
|
+
subtitle?: React.ReactNode;
|
|
13
|
+
reorderable?: boolean;
|
|
14
|
+
reloadTooltip?: string;
|
|
15
|
+
onReload?: () => void;
|
|
16
|
+
isReloading?: boolean;
|
|
17
|
+
searchPlaceholder?: string;
|
|
18
|
+
availablePanelHeaderSlot?: React.ReactNode;
|
|
19
|
+
selectedPanelHeaderSlot?: React.ReactNode;
|
|
20
|
+
hasMore?: boolean;
|
|
21
|
+
onLoadMore?: () => void;
|
|
22
|
+
isLoading?: boolean;
|
|
23
|
+
cancelLabel: React.ReactNode;
|
|
24
|
+
doneLabel: React.ReactNode;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The transfer-list modal surface for MultiSelectTransfer: full-screen on mobile, a widened
|
|
28
|
+
* centered dialog from sm up. Hosts the two-panel TransferList plus a pinned footer bar.
|
|
29
|
+
*/
|
|
30
|
+
export declare function MultiSelectTransferModal({ showModal, availableItems, selectedItems, onChange, onCancel, onDone, header, title, subtitle, reorderable, reloadTooltip, onReload, isReloading, searchPlaceholder, availablePanelHeaderSlot, selectedPanelHeaderSlot, hasMore, onLoadMore, isLoading, cancelLabel, doneLabel }: IMultiSelectTransferModalProps): React.ReactElement;
|
|
31
|
+
export declare namespace MultiSelectTransferModal {
|
|
32
|
+
var displayName: string;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type TMultiSelectTransferOption } from "./types";
|
|
3
|
+
interface IMultiSelectTransferPillProps {
|
|
4
|
+
option: TMultiSelectTransferOption;
|
|
5
|
+
/** tv() class for the pill container (doubles as the truncation observer root). */
|
|
6
|
+
pillClass: string;
|
|
7
|
+
/** tv() class for the (truncating) label. */
|
|
8
|
+
pillLabelClass: string;
|
|
9
|
+
/** tv() class for the dismiss button. */
|
|
10
|
+
pillDismissClass: string;
|
|
11
|
+
onRemove: (option: TMultiSelectTransferOption, e: React.MouseEvent) => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A single selected pill in the trigger. Its own component (not inlined in the map) so it can run
|
|
15
|
+
* {@link useIsTruncated} per pill: the full label is surfaced in a Tooltip only when the label is
|
|
16
|
+
* actually clipped, instead of on every pill hover.
|
|
17
|
+
*
|
|
18
|
+
* The Tooltip always wraps the label (gated via its `canOpen` prop) rather than being swapped in
|
|
19
|
+
* and out - that keeps the measured label element mounted so the truncation observer never loses
|
|
20
|
+
* its target. `triggerElementClassName` makes the Tooltip's trigger span a shrinkable flex box so
|
|
21
|
+
* the nested label still truncates against the pill's max-width. Non-string (ReactNode) labels
|
|
22
|
+
* have no text to show, so they render plainly.
|
|
23
|
+
*/
|
|
24
|
+
export declare function MultiSelectTransferPill({ option, pillClass, pillLabelClass, pillDismissClass, onRemove }: IMultiSelectTransferPillProps): React.ReactElement;
|
|
25
|
+
export declare namespace MultiSelectTransferPill {
|
|
26
|
+
var displayName: string;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
export declare const multiSelectTransferVariants: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
error: {
|
|
3
|
+
true: {
|
|
4
|
+
helperText: string;
|
|
5
|
+
trigger: string;
|
|
6
|
+
};
|
|
7
|
+
false: {
|
|
8
|
+
helperText: string;
|
|
9
|
+
trigger: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
size: {
|
|
13
|
+
md: {
|
|
14
|
+
trigger: string;
|
|
15
|
+
filterInput: string;
|
|
16
|
+
pill: string;
|
|
17
|
+
pillMore: string;
|
|
18
|
+
placeholder: string;
|
|
19
|
+
optionLabel: string;
|
|
20
|
+
};
|
|
21
|
+
lg: {
|
|
22
|
+
trigger: string;
|
|
23
|
+
filterInput: string;
|
|
24
|
+
pill: string;
|
|
25
|
+
pillMore: string;
|
|
26
|
+
placeholder: string;
|
|
27
|
+
optionLabel: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
disabled: {
|
|
31
|
+
true: {
|
|
32
|
+
trigger: string;
|
|
33
|
+
};
|
|
34
|
+
false: {};
|
|
35
|
+
};
|
|
36
|
+
checked: {
|
|
37
|
+
true: {
|
|
38
|
+
optionItem: string;
|
|
39
|
+
};
|
|
40
|
+
false: {};
|
|
41
|
+
};
|
|
42
|
+
}, {
|
|
43
|
+
base: string;
|
|
44
|
+
label: string;
|
|
45
|
+
helperText: string;
|
|
46
|
+
trigger: string;
|
|
47
|
+
dropdownContainer: string;
|
|
48
|
+
dropdownHeader: string;
|
|
49
|
+
filterInput: string;
|
|
50
|
+
optionsList: string;
|
|
51
|
+
optionItem: string;
|
|
52
|
+
optionLabelWrap: string;
|
|
53
|
+
optionLabel: string;
|
|
54
|
+
pillsArea: string;
|
|
55
|
+
pill: string;
|
|
56
|
+
pillLabel: string;
|
|
57
|
+
pillDismiss: string;
|
|
58
|
+
pillMore: string;
|
|
59
|
+
ctaArea: string;
|
|
60
|
+
ctaButton: string;
|
|
61
|
+
placeholder: string;
|
|
62
|
+
}, undefined, {
|
|
63
|
+
error: {
|
|
64
|
+
true: {
|
|
65
|
+
helperText: string;
|
|
66
|
+
trigger: string;
|
|
67
|
+
};
|
|
68
|
+
false: {
|
|
69
|
+
helperText: string;
|
|
70
|
+
trigger: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
size: {
|
|
74
|
+
md: {
|
|
75
|
+
trigger: string;
|
|
76
|
+
filterInput: string;
|
|
77
|
+
pill: string;
|
|
78
|
+
pillMore: string;
|
|
79
|
+
placeholder: string;
|
|
80
|
+
optionLabel: string;
|
|
81
|
+
};
|
|
82
|
+
lg: {
|
|
83
|
+
trigger: string;
|
|
84
|
+
filterInput: string;
|
|
85
|
+
pill: string;
|
|
86
|
+
pillMore: string;
|
|
87
|
+
placeholder: string;
|
|
88
|
+
optionLabel: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
disabled: {
|
|
92
|
+
true: {
|
|
93
|
+
trigger: string;
|
|
94
|
+
};
|
|
95
|
+
false: {};
|
|
96
|
+
};
|
|
97
|
+
checked: {
|
|
98
|
+
true: {
|
|
99
|
+
optionItem: string;
|
|
100
|
+
};
|
|
101
|
+
false: {};
|
|
102
|
+
};
|
|
103
|
+
}, {
|
|
104
|
+
base: string;
|
|
105
|
+
label: string;
|
|
106
|
+
helperText: string;
|
|
107
|
+
trigger: string;
|
|
108
|
+
dropdownContainer: string;
|
|
109
|
+
dropdownHeader: string;
|
|
110
|
+
filterInput: string;
|
|
111
|
+
optionsList: string;
|
|
112
|
+
optionItem: string;
|
|
113
|
+
optionLabelWrap: string;
|
|
114
|
+
optionLabel: string;
|
|
115
|
+
pillsArea: string;
|
|
116
|
+
pill: string;
|
|
117
|
+
pillLabel: string;
|
|
118
|
+
pillDismiss: string;
|
|
119
|
+
pillMore: string;
|
|
120
|
+
ctaArea: string;
|
|
121
|
+
ctaButton: string;
|
|
122
|
+
placeholder: string;
|
|
123
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
124
|
+
error: {
|
|
125
|
+
true: {
|
|
126
|
+
helperText: string;
|
|
127
|
+
trigger: string;
|
|
128
|
+
};
|
|
129
|
+
false: {
|
|
130
|
+
helperText: string;
|
|
131
|
+
trigger: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
size: {
|
|
135
|
+
md: {
|
|
136
|
+
trigger: string;
|
|
137
|
+
filterInput: string;
|
|
138
|
+
pill: string;
|
|
139
|
+
pillMore: string;
|
|
140
|
+
placeholder: string;
|
|
141
|
+
optionLabel: string;
|
|
142
|
+
};
|
|
143
|
+
lg: {
|
|
144
|
+
trigger: string;
|
|
145
|
+
filterInput: string;
|
|
146
|
+
pill: string;
|
|
147
|
+
pillMore: string;
|
|
148
|
+
placeholder: string;
|
|
149
|
+
optionLabel: string;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
disabled: {
|
|
153
|
+
true: {
|
|
154
|
+
trigger: string;
|
|
155
|
+
};
|
|
156
|
+
false: {};
|
|
157
|
+
};
|
|
158
|
+
checked: {
|
|
159
|
+
true: {
|
|
160
|
+
optionItem: string;
|
|
161
|
+
};
|
|
162
|
+
false: {};
|
|
163
|
+
};
|
|
164
|
+
}, {
|
|
165
|
+
base: string;
|
|
166
|
+
label: string;
|
|
167
|
+
helperText: string;
|
|
168
|
+
trigger: string;
|
|
169
|
+
dropdownContainer: string;
|
|
170
|
+
dropdownHeader: string;
|
|
171
|
+
filterInput: string;
|
|
172
|
+
optionsList: string;
|
|
173
|
+
optionItem: string;
|
|
174
|
+
optionLabelWrap: string;
|
|
175
|
+
optionLabel: string;
|
|
176
|
+
pillsArea: string;
|
|
177
|
+
pill: string;
|
|
178
|
+
pillLabel: string;
|
|
179
|
+
pillDismiss: string;
|
|
180
|
+
pillMore: string;
|
|
181
|
+
ctaArea: string;
|
|
182
|
+
ctaButton: string;
|
|
183
|
+
placeholder: string;
|
|
184
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { ITransferListItem } from "../transferList/types";
|
|
3
|
+
export declare enum EMultiSelectTransferSizes {
|
|
4
|
+
MD = "md",
|
|
5
|
+
LG = "lg"
|
|
6
|
+
}
|
|
7
|
+
export type TMultiSelectTransferSize = `${EMultiSelectTransferSizes}`;
|
|
8
|
+
export type TMultiSelectTransferOption = ITransferListItem;
|
|
9
|
+
export interface IMultiSelectTransferProps {
|
|
10
|
+
id?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
label?: ReactNode;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
helperText?: ReactNode;
|
|
15
|
+
error?: boolean;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
size?: TMultiSelectTransferSize;
|
|
18
|
+
options: TMultiSelectTransferOption[];
|
|
19
|
+
value?: TMultiSelectTransferOption[];
|
|
20
|
+
onChange?: (selected: TMultiSelectTransferOption[]) => void;
|
|
21
|
+
filterValue?: string;
|
|
22
|
+
onFilterChange?: (query: string) => void;
|
|
23
|
+
/** Placeholder for the dropdown filter input and the transfer list modal's panel search inputs. @default "Search..." */
|
|
24
|
+
searchPlaceholder?: string;
|
|
25
|
+
/** Debounce delay in ms for onFilterChange. Set to 0 to disable. @default 300 */
|
|
26
|
+
filterDebounceMs?: number;
|
|
27
|
+
hasMore?: boolean;
|
|
28
|
+
onLoadMore?: () => void;
|
|
29
|
+
isLoading?: boolean;
|
|
30
|
+
/** Max pills shown in the trigger before showing "+N More". @default 3 */
|
|
31
|
+
maxVisiblePills?: number;
|
|
32
|
+
/** Title rendered in the transfer list modal header. */
|
|
33
|
+
transferListTitle?: ReactNode;
|
|
34
|
+
/** Subtitle rendered under the modal title. */
|
|
35
|
+
transferListSubtitle?: ReactNode;
|
|
36
|
+
/** Fully custom modal header node; overrides title/subtitle when provided. */
|
|
37
|
+
transferListHeader?: ReactNode;
|
|
38
|
+
/** Called when the transfer list CTA is clicked (before the modal opens). */
|
|
39
|
+
onOpenTransferList?: () => void;
|
|
40
|
+
/** Enable reordering (drag + arrows) of selected items in the transfer list. */
|
|
41
|
+
reorderable?: boolean;
|
|
42
|
+
/** The reload button is shown when this is provided. Fired when the reload button is clicked. */
|
|
43
|
+
onReload?: () => void;
|
|
44
|
+
/** Spins the transfer list reload icon. */
|
|
45
|
+
isReloading?: boolean;
|
|
46
|
+
/** Tooltip for the transfer list reload button. */
|
|
47
|
+
reloadTooltip?: string;
|
|
48
|
+
/** Custom content rendered under the transfer list available panel search. */
|
|
49
|
+
availablePanelHeaderSlot?: ReactNode;
|
|
50
|
+
/** Custom content rendered under the transfer list selected panel search. */
|
|
51
|
+
selectedPanelHeaderSlot?: ReactNode;
|
|
52
|
+
/** Label for the modal cancel button. @default "Cancel" */
|
|
53
|
+
cancelLabel?: ReactNode;
|
|
54
|
+
/** Label for the modal commit button. @default "Done" */
|
|
55
|
+
doneLabel?: ReactNode;
|
|
56
|
+
}
|
|
@@ -51,8 +51,7 @@ export interface IPanelProps extends Omit<React.HTMLAttributes<HTMLDivElement>,
|
|
|
51
51
|
*/
|
|
52
52
|
onClose?: (e: React.MouseEvent<HTMLDivElement> | KeyboardEvent) => void;
|
|
53
53
|
}
|
|
54
|
-
|
|
55
|
-
type TPanelCompoundComponent = typeof PanelComponent & {
|
|
54
|
+
type TPanelCompoundComponent = React.ForwardRefExoticComponent<React.PropsWithoutRef<IPanelProps> & React.RefAttributes<HTMLDivElement>> & {
|
|
56
55
|
Header: typeof PanelHeader;
|
|
57
56
|
Body: typeof PanelBody;
|
|
58
57
|
Footer: typeof PanelFooter;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { RadioGroup, type
|
|
1
|
+
export { RadioGroup, type TRadioGroupProps, type TRadioGroupSize } from "./radioGroup";
|
|
2
2
|
export { radioGroupVariants } from "./radioGroupVariants";
|