@kwantis-id3/frontend-library 1.3.0-rc.0 → 1.4.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 +116 -73
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/DataGrid/DataGridInterfaces.d.ts +0 -1
- package/dist/esm/types/components/Skeleton/SkeletonCard.d.ts +2 -0
- package/dist/esm/types/components/Skeleton/SkeletonInterfaces.d.ts +14 -0
- package/dist/esm/types/components/Skeleton/SkeletonItem.d.ts +2 -0
- package/dist/esm/types/components/Skeleton/SkeletonStyled.d.ts +10 -0
- package/dist/esm/types/components/Skeleton/index.d.ts +3 -0
- package/dist/esm/types/components/Stack/Stack.d.ts +2 -0
- package/dist/esm/types/components/Stack/StackInterfaces.d.ts +17 -0
- package/dist/esm/types/components/Stack/StackStyled.d.ts +10 -0
- package/dist/esm/types/components/Stack/index.d.ts +2 -0
- package/dist/esm/types/components/Table/TableInterfaces.d.ts +0 -1
- 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 +3 -0
- package/dist/index.d.ts +66 -9
- package/package.json +1 -1
|
@@ -3,7 +3,6 @@ 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;
|
|
7
6
|
};
|
|
8
7
|
export type TDataGridRow<Cell extends TCellValues> = {
|
|
9
8
|
[key: string]: Cell;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type TSkeletonVariant = "circle" | "text" | "rect" | "rounded";
|
|
3
|
+
export type TSkeletonProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
4
|
+
/** Visual variant of the skeleton placeholder */
|
|
5
|
+
variant?: TSkeletonVariant;
|
|
6
|
+
/** Width of the skeleton. Accepts any valid CSS length string or a number (treated as px) */
|
|
7
|
+
width?: string | number;
|
|
8
|
+
/** Height of the skeleton. Accepts any valid CSS length string or a number (treated as px) */
|
|
9
|
+
height?: string | number;
|
|
10
|
+
/** Controls whether the shimmer animation plays */
|
|
11
|
+
animated?: boolean;
|
|
12
|
+
/** Forwarded ref to the underlying DOM element */
|
|
13
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
14
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TSkeletonVariant } from "./SkeletonInterfaces";
|
|
2
|
+
export declare const SkeletonStyled: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme;
|
|
4
|
+
as?: React.ElementType;
|
|
5
|
+
} & {
|
|
6
|
+
$variant: TSkeletonVariant;
|
|
7
|
+
$width: string;
|
|
8
|
+
$height: string;
|
|
9
|
+
$animated: boolean;
|
|
10
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from "react";
|
|
2
|
+
export type TStackProps = PropsWithChildren & React.HTMLAttributes<HTMLDivElement> & {
|
|
3
|
+
/** Direction of the stack */
|
|
4
|
+
direction?: "row" | "column";
|
|
5
|
+
/** Spacing between the items in the stack */
|
|
6
|
+
spacing?: string;
|
|
7
|
+
/** Width of the stack */
|
|
8
|
+
width?: string;
|
|
9
|
+
/** If true, the stack will be centered both vertically and horizontally */
|
|
10
|
+
centered?: boolean;
|
|
11
|
+
/** If true, the stack items will wrap to the next line when they overflow */
|
|
12
|
+
wrap?: boolean;
|
|
13
|
+
/** Ref forward to the underlying DOM element */
|
|
14
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
15
|
+
/** Allows rendering the stack as a different HTML element or component */
|
|
16
|
+
as?: React.ElementType;
|
|
17
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const StackStyled: import("@emotion/styled").StyledComponent<{
|
|
2
|
+
theme?: import("@emotion/react").Theme;
|
|
3
|
+
as?: React.ElementType;
|
|
4
|
+
} & {
|
|
5
|
+
$direction: string;
|
|
6
|
+
$spacing: string;
|
|
7
|
+
$width: string;
|
|
8
|
+
$centered?: boolean;
|
|
9
|
+
$wrap?: boolean;
|
|
10
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -3,7 +3,6 @@ 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;
|
|
7
6
|
};
|
|
8
7
|
export type TTableCell<T extends TCellValues> = {
|
|
9
8
|
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,7 +461,6 @@ 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;
|
|
465
464
|
};
|
|
466
465
|
type TTableCell<T extends TCellValues> = {
|
|
467
466
|
value: T;
|
|
@@ -485,7 +484,6 @@ declare const renderCell: (value: string | number | boolean | null) => _emotion_
|
|
|
485
484
|
type TDataGridProps<Cell extends TCellValues, Row extends TDataGridRow<Cell>> = {
|
|
486
485
|
columns: ColumnDef<TDataGridRow<Cell>, Cell>[];
|
|
487
486
|
data: Row[] | undefined;
|
|
488
|
-
onFilteredRowsChange?: (rows: Row[]) => void;
|
|
489
487
|
};
|
|
490
488
|
type TDataGridRow<Cell extends TCellValues> = {
|
|
491
489
|
[key: string]: Cell;
|
|
@@ -759,7 +757,7 @@ type TPopoverPosition = {
|
|
|
759
757
|
zIndex?: number;
|
|
760
758
|
};
|
|
761
759
|
|
|
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<
|
|
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<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;
|
|
763
761
|
|
|
764
762
|
type TAIBubbleProps = Omit<TPopoverProps, "trigger" | "children" | "topBarLeft" | "expandable"> & {
|
|
765
763
|
/** URL to embed in the iframe */
|
|
@@ -774,6 +772,65 @@ type TAIBubbleProps = Omit<TPopoverProps, "trigger" | "children" | "topBarLeft"
|
|
|
774
772
|
|
|
775
773
|
declare const AIBubble: ({ url, externalUrl, placement, align, color, bubbleSize, iconSize, collapsedSize, showCloseButton, showExpandButton, ...rest }: TAIBubbleProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
776
774
|
|
|
775
|
+
type TTooltipPlacement = "top" | "right" | "bottom" | "left";
|
|
776
|
+
type TTooltipProps = {
|
|
777
|
+
/** The element that triggers the tooltip on hover */
|
|
778
|
+
children: React__default.ReactElement;
|
|
779
|
+
/** The content displayed inside the tooltip */
|
|
780
|
+
content: React__default.ReactNode;
|
|
781
|
+
/** Controls whether the tooltip is shown */
|
|
782
|
+
enabled?: boolean;
|
|
783
|
+
/** Placement of the tooltip relative to the trigger */
|
|
784
|
+
placement?: TTooltipPlacement;
|
|
785
|
+
/** Width of the tooltip content */
|
|
786
|
+
width?: number | string;
|
|
787
|
+
/** Custom styles applied to the children wrapper */
|
|
788
|
+
childrenSx?: React__default.CSSProperties;
|
|
789
|
+
/** Custom styles applied to the tooltip content */
|
|
790
|
+
contentSx?: React__default.CSSProperties;
|
|
791
|
+
/** If true, tooltip content is displayed on a single line */
|
|
792
|
+
singleLine?: boolean;
|
|
793
|
+
};
|
|
794
|
+
|
|
795
|
+
declare const Tooltip: React__default.FC<TTooltipProps>;
|
|
796
|
+
|
|
797
|
+
type TStackProps = PropsWithChildren & React__default.HTMLAttributes<HTMLDivElement> & {
|
|
798
|
+
/** Direction of the stack */
|
|
799
|
+
direction?: "row" | "column";
|
|
800
|
+
/** Spacing between the items in the stack */
|
|
801
|
+
spacing?: string;
|
|
802
|
+
/** Width of the stack */
|
|
803
|
+
width?: string;
|
|
804
|
+
/** If true, the stack will be centered both vertically and horizontally */
|
|
805
|
+
centered?: boolean;
|
|
806
|
+
/** If true, the stack items will wrap to the next line when they overflow */
|
|
807
|
+
wrap?: boolean;
|
|
808
|
+
/** Ref forward to the underlying DOM element */
|
|
809
|
+
ref?: React__default.Ref<HTMLDivElement>;
|
|
810
|
+
/** Allows rendering the stack as a different HTML element or component */
|
|
811
|
+
as?: React__default.ElementType;
|
|
812
|
+
};
|
|
813
|
+
|
|
814
|
+
declare function Stack({ direction, spacing, width, centered, wrap, style, children, ref, as, ...rest }: TStackProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
815
|
+
|
|
816
|
+
type TSkeletonVariant = "circle" | "text" | "rect" | "rounded";
|
|
817
|
+
type TSkeletonProps = React__default.HTMLAttributes<HTMLDivElement> & {
|
|
818
|
+
/** Visual variant of the skeleton placeholder */
|
|
819
|
+
variant?: TSkeletonVariant;
|
|
820
|
+
/** Width of the skeleton. Accepts any valid CSS length string or a number (treated as px) */
|
|
821
|
+
width?: string | number;
|
|
822
|
+
/** Height of the skeleton. Accepts any valid CSS length string or a number (treated as px) */
|
|
823
|
+
height?: string | number;
|
|
824
|
+
/** Controls whether the shimmer animation plays */
|
|
825
|
+
animated?: boolean;
|
|
826
|
+
/** Forwarded ref to the underlying DOM element */
|
|
827
|
+
ref?: React__default.Ref<HTMLDivElement>;
|
|
828
|
+
};
|
|
829
|
+
|
|
830
|
+
declare function SkeletonItem({ variant, width, height, animated, style, ref, ...rest }: TSkeletonProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
831
|
+
|
|
832
|
+
declare const SkeletonCard: FC;
|
|
833
|
+
|
|
777
834
|
/**
|
|
778
835
|
* emotion.js doesn't support transient options out of the box.
|
|
779
836
|
*
|
|
@@ -823,4 +880,4 @@ declare const getActiveColor: (color: string) => string;
|
|
|
823
880
|
|
|
824
881
|
declare function usePrefersColorScheme(): "light" | "dark";
|
|
825
882
|
|
|
826
|
-
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, Slider, 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, TSliderProps, 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 };
|
|
883
|
+
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 };
|