@kwantis-id3/frontend-library 1.3.0 → 1.5.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/esm/index.js +46 -26
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/DataGrid/DataGridInterfaces.d.ts +1 -0
- package/dist/esm/types/components/Table/TableInterfaces.d.ts +1 -0
- package/dist/esm/types/components/Tooltip/Tooltip.d.ts +3 -0
- package/dist/esm/types/components/Tooltip/TooltipInterfaces.d.ts +20 -0
- package/dist/esm/types/components/Tooltip/TooltipStyled.d.ts +18 -0
- package/dist/esm/types/components/Tooltip/index.d.ts +2 -0
- package/dist/esm/types/components/index.d.ts +1 -0
- package/dist/index.d.ts +36 -12
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ import { TCellValues } from "../Table";
|
|
|
3
3
|
export type TDataGridProps<Cell extends TCellValues, Row extends TDataGridRow<Cell>> = {
|
|
4
4
|
columns: ColumnDef<TDataGridRow<Cell>, Cell>[];
|
|
5
5
|
data: Row[] | undefined;
|
|
6
|
+
onFilteredRowsChange?: (rows: Row[]) => void;
|
|
6
7
|
};
|
|
7
8
|
export type TDataGridRow<Cell extends TCellValues> = {
|
|
8
9
|
[key: string]: Cell;
|
|
@@ -3,6 +3,7 @@ export type TCellValues = string | number | boolean | null;
|
|
|
3
3
|
export type TTableProps<Cell extends TCellValues, Row extends TTableRow<Cell>> = {
|
|
4
4
|
columns: ColumnDef<Row, Cell>[];
|
|
5
5
|
data: Row[] | undefined;
|
|
6
|
+
onFilteredRowsChange?: (rows: Row[]) => void;
|
|
6
7
|
};
|
|
7
8
|
export type TTableCell<T extends TCellValues> = {
|
|
8
9
|
value: T;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type TTooltipPlacement = "top" | "right" | "bottom" | "left";
|
|
3
|
+
export type TTooltipProps = {
|
|
4
|
+
/** The element that triggers the tooltip on hover */
|
|
5
|
+
children: React.ReactElement;
|
|
6
|
+
/** The content displayed inside the tooltip */
|
|
7
|
+
content: React.ReactNode;
|
|
8
|
+
/** Controls whether the tooltip is shown */
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
/** Placement of the tooltip relative to the trigger */
|
|
11
|
+
placement?: TTooltipPlacement;
|
|
12
|
+
/** Width of the tooltip content */
|
|
13
|
+
width?: number | string;
|
|
14
|
+
/** Custom styles applied to the children wrapper */
|
|
15
|
+
childrenSx?: React.CSSProperties;
|
|
16
|
+
/** Custom styles applied to the tooltip content */
|
|
17
|
+
contentSx?: React.CSSProperties;
|
|
18
|
+
/** If true, tooltip content is displayed on a single line */
|
|
19
|
+
singleLine?: boolean;
|
|
20
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TTooltipPlacement } from "./TooltipInterfaces";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export declare const TooltipWrapper: import("@emotion/styled").StyledComponent<{
|
|
4
|
+
theme?: import("@emotion/react").Theme;
|
|
5
|
+
as?: React.ElementType;
|
|
6
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
7
|
+
export declare const TooltipContent: import("@emotion/styled").StyledComponent<{
|
|
8
|
+
theme?: import("@emotion/react").Theme;
|
|
9
|
+
as?: React.ElementType;
|
|
10
|
+
} & {
|
|
11
|
+
$singleLine?: boolean;
|
|
12
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
13
|
+
export declare const Arrow: import("@emotion/styled").StyledComponent<{
|
|
14
|
+
theme?: import("@emotion/react").Theme;
|
|
15
|
+
as?: React.ElementType;
|
|
16
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
17
|
+
export declare const placementStyles: Record<TTooltipPlacement, React.CSSProperties>;
|
|
18
|
+
export declare const arrowPlacement: Record<TTooltipPlacement, React.CSSProperties>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
|
|
2
2
|
import * as _emotion_react from '@emotion/react';
|
|
3
3
|
import { Interpolation, Theme } from '@emotion/react';
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
4
|
+
import * as React$1 from 'react';
|
|
5
|
+
import React__default, { PropsWithChildren, ReactElement, FC, ReactNode } from 'react';
|
|
6
6
|
import * as _emotion_styled from '@emotion/styled';
|
|
7
7
|
import { CreateStyled } from '@emotion/styled';
|
|
8
8
|
import { ColumnDef } from '@tanstack/react-table';
|
|
@@ -156,7 +156,7 @@ declare const AccordionGroup: _emotion_styled.StyledComponent<{
|
|
|
156
156
|
as?: React.ElementType;
|
|
157
157
|
} & {
|
|
158
158
|
$variant: "default" | "light";
|
|
159
|
-
},
|
|
159
|
+
}, React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
160
160
|
|
|
161
161
|
type TAccordionProps = PropsWithChildren & {
|
|
162
162
|
/** Title to be used if no custom trigger is passed */
|
|
@@ -183,11 +183,11 @@ type TAccordionProps = PropsWithChildren & {
|
|
|
183
183
|
|
|
184
184
|
declare const Accordion: FC<TAccordionProps>;
|
|
185
185
|
|
|
186
|
-
declare const InputField:
|
|
186
|
+
declare const InputField: React$1.ForwardRefExoticComponent<React$1.InputHTMLAttributes<HTMLInputElement> & {
|
|
187
187
|
containerClassName?: string;
|
|
188
188
|
color?: string;
|
|
189
189
|
sx?: _emotion_react.Interpolation<_emotion_react.Theme>;
|
|
190
|
-
} &
|
|
190
|
+
} & React$1.RefAttributes<HTMLInputElement>>;
|
|
191
191
|
|
|
192
192
|
type TTextFieldProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
193
193
|
/** Classname given to the container div */
|
|
@@ -461,6 +461,7 @@ type TCellValues = string | number | boolean | null;
|
|
|
461
461
|
type TTableProps<Cell extends TCellValues, Row extends TTableRow<Cell>> = {
|
|
462
462
|
columns: ColumnDef<Row, Cell>[];
|
|
463
463
|
data: Row[] | undefined;
|
|
464
|
+
onFilteredRowsChange?: (rows: Row[]) => void;
|
|
464
465
|
};
|
|
465
466
|
type TTableCell<T extends TCellValues> = {
|
|
466
467
|
value: T;
|
|
@@ -484,6 +485,7 @@ declare const renderCell: (value: string | number | boolean | null) => _emotion_
|
|
|
484
485
|
type TDataGridProps<Cell extends TCellValues, Row extends TDataGridRow<Cell>> = {
|
|
485
486
|
columns: ColumnDef<TDataGridRow<Cell>, Cell>[];
|
|
486
487
|
data: Row[] | undefined;
|
|
488
|
+
onFilteredRowsChange?: (rows: Row[]) => void;
|
|
487
489
|
};
|
|
488
490
|
type TDataGridRow<Cell extends TCellValues> = {
|
|
489
491
|
[key: string]: Cell;
|
|
@@ -757,7 +759,7 @@ type TPopoverPosition = {
|
|
|
757
759
|
zIndex?: number;
|
|
758
760
|
};
|
|
759
761
|
|
|
760
|
-
declare const Popover: ({ trigger, children, placement, align, color, showArrow, isOpen: controlledIsOpen, onToggle, closeOnOutsideClick, width, height, position, showCloseButton, sx, onOpen, onClose, expandable, collapsedSize, expandedSize, showExpandButton, topBarLeft, isExpanded: controlledIsExpanded, onExpandedChange, }: TPopoverProps) => string | number | bigint | boolean | Iterable<
|
|
762
|
+
declare const Popover: ({ trigger, children, placement, align, color, showArrow, isOpen: controlledIsOpen, onToggle, closeOnOutsideClick, width, height, position, showCloseButton, sx, onOpen, onClose, expandable, collapsedSize, expandedSize, showExpandButton, topBarLeft, isExpanded: controlledIsExpanded, onExpandedChange, }: TPopoverProps) => string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | _emotion_react_jsx_runtime.JSX.Element | null | undefined;
|
|
761
763
|
|
|
762
764
|
type TAIBubbleProps = Omit<TPopoverProps, "trigger" | "children" | "topBarLeft" | "expandable"> & {
|
|
763
765
|
/** URL to embed in the iframe */
|
|
@@ -772,7 +774,29 @@ type TAIBubbleProps = Omit<TPopoverProps, "trigger" | "children" | "topBarLeft"
|
|
|
772
774
|
|
|
773
775
|
declare const AIBubble: ({ url, externalUrl, placement, align, color, bubbleSize, iconSize, collapsedSize, showCloseButton, showExpandButton, ...rest }: TAIBubbleProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
774
776
|
|
|
775
|
-
type
|
|
777
|
+
type TTooltipPlacement = "top" | "right" | "bottom" | "left";
|
|
778
|
+
type TTooltipProps = {
|
|
779
|
+
/** The element that triggers the tooltip on hover */
|
|
780
|
+
children: React__default.ReactElement;
|
|
781
|
+
/** The content displayed inside the tooltip */
|
|
782
|
+
content: React__default.ReactNode;
|
|
783
|
+
/** Controls whether the tooltip is shown */
|
|
784
|
+
enabled?: boolean;
|
|
785
|
+
/** Placement of the tooltip relative to the trigger */
|
|
786
|
+
placement?: TTooltipPlacement;
|
|
787
|
+
/** Width of the tooltip content */
|
|
788
|
+
width?: number | string;
|
|
789
|
+
/** Custom styles applied to the children wrapper */
|
|
790
|
+
childrenSx?: React__default.CSSProperties;
|
|
791
|
+
/** Custom styles applied to the tooltip content */
|
|
792
|
+
contentSx?: React__default.CSSProperties;
|
|
793
|
+
/** If true, tooltip content is displayed on a single line */
|
|
794
|
+
singleLine?: boolean;
|
|
795
|
+
};
|
|
796
|
+
|
|
797
|
+
declare const Tooltip: React__default.FC<TTooltipProps>;
|
|
798
|
+
|
|
799
|
+
type TStackProps = PropsWithChildren & React__default.HTMLAttributes<HTMLDivElement> & {
|
|
776
800
|
/** Direction of the stack */
|
|
777
801
|
direction?: "row" | "column";
|
|
778
802
|
/** Spacing between the items in the stack */
|
|
@@ -784,15 +808,15 @@ type TStackProps = PropsWithChildren & react__default.HTMLAttributes<HTMLDivElem
|
|
|
784
808
|
/** If true, the stack items will wrap to the next line when they overflow */
|
|
785
809
|
wrap?: boolean;
|
|
786
810
|
/** Ref forward to the underlying DOM element */
|
|
787
|
-
ref?:
|
|
811
|
+
ref?: React__default.Ref<HTMLDivElement>;
|
|
788
812
|
/** Allows rendering the stack as a different HTML element or component */
|
|
789
|
-
as?:
|
|
813
|
+
as?: React__default.ElementType;
|
|
790
814
|
};
|
|
791
815
|
|
|
792
816
|
declare function Stack({ direction, spacing, width, centered, wrap, style, children, ref, as, ...rest }: TStackProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
793
817
|
|
|
794
818
|
type TSkeletonVariant = "circle" | "text" | "rect" | "rounded";
|
|
795
|
-
type TSkeletonProps =
|
|
819
|
+
type TSkeletonProps = React__default.HTMLAttributes<HTMLDivElement> & {
|
|
796
820
|
/** Visual variant of the skeleton placeholder */
|
|
797
821
|
variant?: TSkeletonVariant;
|
|
798
822
|
/** Width of the skeleton. Accepts any valid CSS length string or a number (treated as px) */
|
|
@@ -802,7 +826,7 @@ type TSkeletonProps = react__default.HTMLAttributes<HTMLDivElement> & {
|
|
|
802
826
|
/** Controls whether the shimmer animation plays */
|
|
803
827
|
animated?: boolean;
|
|
804
828
|
/** Forwarded ref to the underlying DOM element */
|
|
805
|
-
ref?:
|
|
829
|
+
ref?: React__default.Ref<HTMLDivElement>;
|
|
806
830
|
};
|
|
807
831
|
|
|
808
832
|
declare function SkeletonItem({ variant, width, height, animated, style, ref, ...rest }: TSkeletonProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
@@ -858,4 +882,4 @@ declare const getActiveColor: (color: string) => string;
|
|
|
858
882
|
|
|
859
883
|
declare function usePrefersColorScheme(): "light" | "dark";
|
|
860
884
|
|
|
861
|
-
export { AIBubble, Accordion, AccordionGroup, Button, Card, CardContent, CardFooter, CardHeader, CardIndicators, CardMediaSection, Checkbox, ControlledTreeView, DataGrid, Drawer, Dropdown, IBackgroundColors, ICommonColors, IIndicatorColors, IPalette, IStandardPaletteColor, ITagColors, IThemeContextProps, IThemeContextValue, Indicator, InputField, Modal, MultiSelect, MultiSelectProps, MultiViewGrid, MultiViewList, Popover, SingleSelect, SingleSelectProps, SkeletonCard, SkeletonItem, Slider, Stack, Switch, TAIBubbleProps, TAccordionProps, TButtonProps, TButtonVariants, TCardSectionProps, TCellValues, TCheckboxProps, TColorScale, TControlledTreeViewProps, TCustomRenderProps, TDataGridProps, TDataGridRow, TDrawerProps, TDropdownItem, TDropdownItemProps, TDropdownProps, TIndicatorInstanceProps, TIndicatorProps, TIndicatorVariants, TModalProps, TMultiViewGridProps, TMultiViewListProps, TPopoverActions, TPopoverPosition, TPopoverProps, TRenderTriggerProps, TSkeletonProps, TSkeletonVariant, TSliderProps, TStackProps, TSwitchProps, TTableCell, TTableProps, TTableRow, TTagProps, TTextFieldProps, TThemeMode, TTreeViewItem, TUncontrolledTreeViewProps, TViewState, Table, Tag, ThemeContextProvider, UncontrolledTreeView, commonColors, darkenColor, defaultDarkPalette, defaultLightPalette, getActiveColor, getContrastColor, getHoverColor, lightenColor, renderCell, transientOptions, useIsMobile, usePrefersColorScheme, useThemeContext };
|
|
885
|
+
export { AIBubble, Accordion, AccordionGroup, Button, Card, CardContent, CardFooter, CardHeader, CardIndicators, CardMediaSection, Checkbox, ControlledTreeView, DataGrid, Drawer, Dropdown, IBackgroundColors, ICommonColors, IIndicatorColors, IPalette, IStandardPaletteColor, ITagColors, IThemeContextProps, IThemeContextValue, Indicator, InputField, Modal, MultiSelect, MultiSelectProps, MultiViewGrid, MultiViewList, Popover, SingleSelect, SingleSelectProps, SkeletonCard, SkeletonItem, Slider, Stack, Switch, TAIBubbleProps, TAccordionProps, TButtonProps, TButtonVariants, TCardSectionProps, TCellValues, TCheckboxProps, TColorScale, TControlledTreeViewProps, TCustomRenderProps, TDataGridProps, TDataGridRow, TDrawerProps, TDropdownItem, TDropdownItemProps, TDropdownProps, TIndicatorInstanceProps, TIndicatorProps, TIndicatorVariants, TModalProps, TMultiViewGridProps, TMultiViewListProps, TPopoverActions, TPopoverPosition, TPopoverProps, TRenderTriggerProps, TSkeletonProps, TSkeletonVariant, TSliderProps, TStackProps, TSwitchProps, TTableCell, TTableProps, TTableRow, TTagProps, TTextFieldProps, TThemeMode, TTooltipPlacement, TTooltipProps, TTreeViewItem, TUncontrolledTreeViewProps, TViewState, Table, Tag, ThemeContextProvider, Tooltip, UncontrolledTreeView, commonColors, darkenColor, defaultDarkPalette, defaultLightPalette, getActiveColor, getContrastColor, getHoverColor, lightenColor, renderCell, transientOptions, useIsMobile, usePrefersColorScheme, useThemeContext };
|