@kwantis-id3/frontend-library 1.3.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.
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { TTooltipProps } from "./TooltipInterfaces";
3
+ export declare const Tooltip: React.FC<TTooltipProps>;
@@ -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>;
@@ -0,0 +1,2 @@
1
+ export * from "./Tooltip";
2
+ export * from "./TooltipInterfaces";
@@ -18,5 +18,6 @@ export * from "./Checkbox";
18
18
  export * from "./Switch";
19
19
  export * from "./Popover";
20
20
  export * from "./AIBubble";
21
+ export * from "./Tooltip";
21
22
  export * from "./Stack";
22
23
  export * from "./Skeleton";
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 react from 'react';
5
- import react__default, { PropsWithChildren, ReactElement, FC, ReactNode } from 'react';
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
- }, react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
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: react.ForwardRefExoticComponent<react.InputHTMLAttributes<HTMLInputElement> & {
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
- } & react.RefAttributes<HTMLInputElement>>;
190
+ } & React$1.RefAttributes<HTMLInputElement>>;
191
191
 
192
192
  type TTextFieldProps = React.InputHTMLAttributes<HTMLInputElement> & {
193
193
  /** Classname given to the container div */
@@ -757,7 +757,7 @@ type TPopoverPosition = {
757
757
  zIndex?: number;
758
758
  };
759
759
 
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;
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;
761
761
 
762
762
  type TAIBubbleProps = Omit<TPopoverProps, "trigger" | "children" | "topBarLeft" | "expandable"> & {
763
763
  /** URL to embed in the iframe */
@@ -772,7 +772,29 @@ type TAIBubbleProps = Omit<TPopoverProps, "trigger" | "children" | "topBarLeft"
772
772
 
773
773
  declare const AIBubble: ({ url, externalUrl, placement, align, color, bubbleSize, iconSize, collapsedSize, showCloseButton, showExpandButton, ...rest }: TAIBubbleProps) => _emotion_react_jsx_runtime.JSX.Element;
774
774
 
775
- type TStackProps = PropsWithChildren & react__default.HTMLAttributes<HTMLDivElement> & {
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> & {
776
798
  /** Direction of the stack */
777
799
  direction?: "row" | "column";
778
800
  /** Spacing between the items in the stack */
@@ -784,15 +806,15 @@ type TStackProps = PropsWithChildren & react__default.HTMLAttributes<HTMLDivElem
784
806
  /** If true, the stack items will wrap to the next line when they overflow */
785
807
  wrap?: boolean;
786
808
  /** Ref forward to the underlying DOM element */
787
- ref?: react__default.Ref<HTMLDivElement>;
809
+ ref?: React__default.Ref<HTMLDivElement>;
788
810
  /** Allows rendering the stack as a different HTML element or component */
789
- as?: react__default.ElementType;
811
+ as?: React__default.ElementType;
790
812
  };
791
813
 
792
814
  declare function Stack({ direction, spacing, width, centered, wrap, style, children, ref, as, ...rest }: TStackProps): _emotion_react_jsx_runtime.JSX.Element;
793
815
 
794
816
  type TSkeletonVariant = "circle" | "text" | "rect" | "rounded";
795
- type TSkeletonProps = react__default.HTMLAttributes<HTMLDivElement> & {
817
+ type TSkeletonProps = React__default.HTMLAttributes<HTMLDivElement> & {
796
818
  /** Visual variant of the skeleton placeholder */
797
819
  variant?: TSkeletonVariant;
798
820
  /** Width of the skeleton. Accepts any valid CSS length string or a number (treated as px) */
@@ -802,7 +824,7 @@ type TSkeletonProps = react__default.HTMLAttributes<HTMLDivElement> & {
802
824
  /** Controls whether the shimmer animation plays */
803
825
  animated?: boolean;
804
826
  /** Forwarded ref to the underlying DOM element */
805
- ref?: react__default.Ref<HTMLDivElement>;
827
+ ref?: React__default.Ref<HTMLDivElement>;
806
828
  };
807
829
 
808
830
  declare function SkeletonItem({ variant, width, height, animated, style, ref, ...rest }: TSkeletonProps): _emotion_react_jsx_runtime.JSX.Element;
@@ -858,4 +880,4 @@ declare const getActiveColor: (color: string) => string;
858
880
 
859
881
  declare function usePrefersColorScheme(): "light" | "dark";
860
882
 
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 };
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kwantis-id3/frontend-library",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Kwantis frontend components collection",
5
5
  "scriptsComments": {
6
6
  "storybook": "Starts storybook in development mode",