@ssa-ui-kit/core 0.0.25-alpha → 0.0.26-alpha
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/components/AccordionGroup/AccordionContext.d.ts +3 -3
- package/dist/components/AccordionGroup/types.d.ts +1 -1
- package/dist/components/Badge/helpers.d.ts +2 -2
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Button/ButtonText.d.ts +6 -6
- package/dist/components/Button/fixtures.d.ts +6 -6
- package/dist/components/Button/helpers.d.ts +2 -2
- package/dist/components/Button/types.d.ts +5 -5
- package/dist/components/Checkbox/Checkbox.d.ts +2 -2
- package/dist/components/Checkbox/CheckboxBase.d.ts +2 -2
- package/dist/components/Checkbox/types.d.ts +2 -2
- package/dist/components/Dropdown/Dropdown.d.ts +3 -3
- package/dist/components/Dropdown/types.d.ts +3 -3
- package/dist/components/DropdownOption/DropdownOption.d.ts +2 -2
- package/dist/components/DropdownOptions/DropdownOptions.d.ts +2 -2
- package/dist/components/DropdownOptions/index.d.ts +1 -1
- package/dist/components/DropdownOptions/types.d.ts +2 -2
- package/dist/components/DropdownToggle/DropdownToggle.d.ts +3 -3
- package/dist/components/DropdownToggle/types.d.ts +1 -1
- package/dist/components/FormCheckbox/FormCheckbox.d.ts +2 -2
- package/dist/components/FormCheckbox/types.d.ts +2 -2
- package/dist/components/FormHelperText/FormHelperText.d.ts +2 -2
- package/dist/components/FormHelperText/types.d.ts +1 -1
- package/dist/components/FormRadioGroup/FormRadioGroup.d.ts +2 -2
- package/dist/components/FormRadioGroup/types.d.ts +2 -2
- package/dist/components/Icon/types.d.ts +2 -2
- package/dist/components/LargeTab/LargeTab.d.ts +2 -2
- package/dist/components/LargeTab/LargeTabBase.d.ts +2 -2
- package/dist/components/MultipleDropdown/MultipleDropdown.context.d.ts +3 -3
- package/dist/components/MultipleDropdown/MultipleDropdown.d.ts +3 -3
- package/dist/components/MultipleDropdown/types.d.ts +3 -3
- package/dist/components/MultipleDropdown/utils.d.ts +2 -2
- package/dist/components/MultipleDropdownOptions/MultipleDropdownOptions.d.ts +2 -2
- package/dist/components/MultipleDropdownOptions/index.d.ts +1 -1
- package/dist/components/MultipleDropdownOptions/types.d.ts +2 -2
- package/dist/components/Popover/PopoverTrigger.d.ts +2 -2
- package/dist/components/Radio/Radio.d.ts +2 -2
- package/dist/components/Radio/types.d.ts +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +2 -2
- package/dist/components/RadioGroup/types.d.ts +3 -3
- package/dist/components/ResponsiveImage/ResponsiveImage.d.ts +2 -2
- package/dist/components/ResponsiveImage/types.d.ts +1 -1
- package/dist/components/Switch/Switch.d.ts +2 -2
- package/dist/components/Switch/SwitchContext.d.ts +3 -3
- package/dist/components/Switch/types.d.ts +1 -1
- package/dist/components/Tab/Tab.d.ts +2 -2
- package/dist/components/Tab/TabBase.d.ts +2 -2
- package/dist/components/TabBar/TabBar.d.ts +2 -2
- package/dist/components/TabBar/TabBarContext.d.ts +4 -4
- package/dist/components/TabBar/stories/helpers.d.ts +2 -2
- package/dist/components/TabBar/types.d.ts +9 -11
- package/dist/components/Tooltip/ProgressChartTooltip.d.ts +2 -2
- package/dist/components/Tooltip/Tooltip.d.ts +2 -2
- package/dist/components/Tooltip/types.d.ts +11 -11
- package/dist/components/Tooltip/utils.d.ts +2 -2
- package/dist/components/TooltipContent/TooltipContent.d.ts +2 -2
- package/dist/components/TooltipTrigger/TooltipTrigger.d.ts +2 -2
- package/dist/components/index.d.ts +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/AccordionGroup/AccordionContext.tsx +4 -4
- package/src/components/AccordionGroup/types.ts +1 -1
- package/src/components/Badge/helpers.ts +18 -16
- package/src/components/Button/Button.spec.tsx +8 -8
- package/src/components/Button/Button.tsx +3 -3
- package/src/components/Button/ButtonText.tsx +6 -6
- package/src/components/Button/fixtures.ts +14 -14
- package/src/components/Button/helpers.ts +2 -2
- package/src/components/Button/types.ts +5 -5
- package/src/components/Checkbox/Checkbox.spec.tsx +2 -2
- package/src/components/Checkbox/Checkbox.stories.tsx +2 -2
- package/src/components/Checkbox/Checkbox.tsx +2 -2
- package/src/components/Checkbox/CheckboxBase.tsx +2 -2
- package/src/components/Checkbox/types.ts +2 -2
- package/src/components/Dropdown/Dropdown.stories.tsx +3 -3
- package/src/components/Dropdown/Dropdown.tsx +4 -4
- package/src/components/Dropdown/types.ts +4 -3
- package/src/components/DropdownOption/DropdownOption.tsx +2 -2
- package/src/components/DropdownOptions/DropdownOptions.tsx +2 -2
- package/src/components/DropdownOptions/index.ts +1 -1
- package/src/components/DropdownOptions/types.ts +2 -2
- package/src/components/DropdownToggle/DropdownToggle.tsx +3 -3
- package/src/components/DropdownToggle/types.ts +1 -1
- package/src/components/FormCheckbox/FormCheckbox.tsx +2 -2
- package/src/components/FormCheckbox/types.ts +3 -3
- package/src/components/FormHelperText/FormHelperText.tsx +2 -2
- package/src/components/FormHelperText/types.ts +1 -1
- package/src/components/FormRadioGroup/FormRadioGroup.stories.tsx +2 -2
- package/src/components/FormRadioGroup/FormRadioGroup.tsx +2 -2
- package/src/components/FormRadioGroup/types.ts +3 -3
- package/src/components/Icon/Icons.spec.tsx +6 -6
- package/src/components/Icon/icons/index.tsx +3 -3
- package/src/components/Icon/types.ts +2 -2
- package/src/components/LargeTab/LargeTab.tsx +2 -2
- package/src/components/LargeTab/LargeTabBase.tsx +2 -2
- package/src/components/MultipleDropdown/MultipleDropdown.context.ts +3 -3
- package/src/components/MultipleDropdown/MultipleDropdown.tsx +7 -7
- package/src/components/MultipleDropdown/types.ts +3 -3
- package/src/components/MultipleDropdown/utils.ts +2 -2
- package/src/components/MultipleDropdownOptions/MultipleDropdownOptions.tsx +2 -2
- package/src/components/MultipleDropdownOptions/index.ts +1 -1
- package/src/components/MultipleDropdownOptions/types.ts +2 -2
- package/src/components/Popover/PopoverTrigger.tsx +3 -3
- package/src/components/Radio/Radio.tsx +2 -2
- package/src/components/Radio/types.ts +1 -1
- package/src/components/RadioGroup/RadioGroup.tsx +2 -2
- package/src/components/RadioGroup/types.ts +3 -3
- package/src/components/ResponsiveImage/ResponsiveImage.tsx +2 -2
- package/src/components/ResponsiveImage/types.ts +1 -1
- package/src/components/Switch/Switch.tsx +2 -2
- package/src/components/Switch/SwitchContext.tsx +2 -2
- package/src/components/Switch/types.ts +1 -1
- package/src/components/Tab/Tab.tsx +2 -2
- package/src/components/Tab/TabBase.tsx +2 -3
- package/src/components/TabBar/TabBar.spec.tsx +5 -5
- package/src/components/TabBar/TabBar.tsx +2 -2
- package/src/components/TabBar/TabBarContext.tsx +6 -6
- package/src/components/TabBar/stories/helpers.tsx +4 -4
- package/src/components/TabBar/types.ts +9 -12
- package/src/components/Tooltip/ProgressChartTooltip.tsx +2 -2
- package/src/components/Tooltip/Tooltip.tsx +2 -2
- package/src/components/Tooltip/types.ts +11 -11
- package/src/components/Tooltip/utils.tsx +2 -2
- package/src/components/TooltipContent/TooltipContent.tsx +2 -2
- package/src/components/TooltipTrigger/TooltipTrigger.tsx +2 -2
- package/src/components/index.ts +1 -1
- package/tsbuildcache +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useTooltip } from './useTooltip';
|
|
2
2
|
import { TooltipContext } from './useTooltipContext';
|
|
3
|
-
import {
|
|
3
|
+
import { TooltipProps } from './types';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* <Tooltip>
|
|
@@ -10,7 +10,7 @@ import { ITooltipProps } from './types';
|
|
|
10
10
|
* <TooltipContent>Tooltip</TooltipContent>
|
|
11
11
|
* </Tooltip>
|
|
12
12
|
* */
|
|
13
|
-
const Tooltip = ({ children, ...props }:
|
|
13
|
+
const Tooltip = ({ children, ...props }: TooltipProps) => {
|
|
14
14
|
const tooltip = useTooltip(props);
|
|
15
15
|
|
|
16
16
|
return (
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
UseFloatingReturn,
|
|
6
6
|
} from '@floating-ui/react';
|
|
7
7
|
import { PointTooltipProps, Point } from '@nivo/line';
|
|
8
|
-
import {
|
|
8
|
+
import { MapIconsType } from '@components/Icon/types';
|
|
9
9
|
import { ProgressBarProps } from '@components/ProgressBar/types';
|
|
10
10
|
import { SerializedStyles } from '@emotion/react';
|
|
11
11
|
import { CommonProps } from '@global-types/emotion';
|
|
12
12
|
|
|
13
13
|
export type TooltipSize = 'small' | 'medium' | 'large';
|
|
14
14
|
|
|
15
|
-
export interface
|
|
15
|
+
export interface TooltipProps extends CommonProps {
|
|
16
16
|
children: React.ReactNode;
|
|
17
17
|
placement?: Placement;
|
|
18
18
|
enableHover?: boolean;
|
|
@@ -25,7 +25,7 @@ export interface ITooltipProps extends CommonProps {
|
|
|
25
25
|
isOpen?: boolean;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
export type UseTooltipArgs = Omit<
|
|
28
|
+
export type UseTooltipArgs = Omit<TooltipProps, 'children'>;
|
|
29
29
|
|
|
30
30
|
type UseInteractions = ReturnType<typeof useInteractions>;
|
|
31
31
|
|
|
@@ -34,7 +34,7 @@ interface MutableRefObject<T> {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export type UseTooltip = (props: UseTooltipArgs) => Pick<
|
|
37
|
-
|
|
37
|
+
TooltipProps,
|
|
38
38
|
'size' | 'hasArrow' | 'arrowProps'
|
|
39
39
|
> & {
|
|
40
40
|
arrowRef: MutableRefObject<null>;
|
|
@@ -47,7 +47,7 @@ export type TooltipContextType =
|
|
|
47
47
|
ReturnType<typeof useInteractions> & {
|
|
48
48
|
isOpen: boolean;
|
|
49
49
|
arrowRef: React.Ref<SVGSVGElement>;
|
|
50
|
-
} & Pick<
|
|
50
|
+
} & Pick<TooltipProps, 'size' | 'hasArrow' | 'arrowProps'>)
|
|
51
51
|
| null;
|
|
52
52
|
|
|
53
53
|
export type TooltipArrowProps = Omit<
|
|
@@ -55,33 +55,33 @@ export type TooltipArrowProps = Omit<
|
|
|
55
55
|
'context'
|
|
56
56
|
>;
|
|
57
57
|
|
|
58
|
-
export interface
|
|
58
|
+
export interface TooltipContentProps {
|
|
59
59
|
children: React.ReactNode;
|
|
60
60
|
className?: string;
|
|
61
61
|
style?: React.CSSProperties;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
export interface
|
|
64
|
+
export interface TooltipContentSizes {
|
|
65
65
|
small: SerializedStyles;
|
|
66
66
|
medium: SerializedStyles;
|
|
67
67
|
large: SerializedStyles;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
export interface
|
|
70
|
+
export interface TooltipTriggerProps {
|
|
71
71
|
children: React.ReactNode;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
export type SimpleChartTooltipProps =
|
|
75
75
|
| PointTooltipProps &
|
|
76
|
-
Pick<
|
|
76
|
+
Pick<TooltipProps, 'size'> & {
|
|
77
77
|
renderValue?: (data: Point['data']) => React.ReactNode;
|
|
78
78
|
};
|
|
79
79
|
|
|
80
|
-
export interface
|
|
80
|
+
export interface ProgressChartTooltipProps {
|
|
81
81
|
caption: string;
|
|
82
82
|
value: number;
|
|
83
83
|
valueFormatted: string;
|
|
84
|
-
iconName?: keyof
|
|
84
|
+
iconName?: keyof MapIconsType;
|
|
85
85
|
barProps?: Partial<Omit<ProgressBarProps, 'currentValue'>>;
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TooltipContentSizes } from './types';
|
|
2
2
|
import { small, medium, large } from './styles';
|
|
3
3
|
|
|
4
|
-
export const mapSizes:
|
|
4
|
+
export const mapSizes: TooltipContentSizes = {
|
|
5
5
|
small,
|
|
6
6
|
medium,
|
|
7
7
|
large,
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
|
|
8
8
|
import { TooltipArrow } from '@components/Tooltip/TooltipArrow';
|
|
9
9
|
import { TooltipContentBase } from '@components/Tooltip/TooltipContentBase';
|
|
10
|
-
import {
|
|
10
|
+
import { TooltipContentProps, TooltipSize } from '@components/Tooltip/types';
|
|
11
11
|
import { useTooltipContext } from '@components/Tooltip/useTooltipContext';
|
|
12
12
|
import { mapSizes } from '@components/Tooltip/utils';
|
|
13
13
|
|
|
14
|
-
const TooltipContent = forwardRef<HTMLDivElement,
|
|
14
|
+
const TooltipContent = forwardRef<HTMLDivElement, TooltipContentProps>(
|
|
15
15
|
function TooltipContent({ children, className, style }, refProp) {
|
|
16
16
|
const tooltipCtx = useTooltipContext();
|
|
17
17
|
const ref = useMergeRefs([tooltipCtx?.refs.setFloating, refProp]);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { cloneElement, isValidElement } from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { TooltipTriggerProps } from '@components/Tooltip/types';
|
|
4
4
|
import { useTooltipContext } from '@components/Tooltip/useTooltipContext';
|
|
5
5
|
|
|
6
|
-
const TooltipTrigger = ({ children }:
|
|
6
|
+
const TooltipTrigger = ({ children }: TooltipTriggerProps) => {
|
|
7
7
|
const tooltipCtx = useTooltipContext();
|
|
8
8
|
|
|
9
9
|
if (isValidElement(children)) {
|
package/src/components/index.ts
CHANGED
|
@@ -17,7 +17,7 @@ export { default as DropdownBase } from './DropdownBase';
|
|
|
17
17
|
export { default as DropdownOption } from './DropdownOption';
|
|
18
18
|
export { default as DropdownOptions } from './DropdownOptions';
|
|
19
19
|
export { default as DropdownToggle } from './DropdownToggle';
|
|
20
|
-
export type {
|
|
20
|
+
export type { DropdownOptionProps } from './DropdownOptions';
|
|
21
21
|
export { default as Icon } from './Icon';
|
|
22
22
|
export * from './Icon';
|
|
23
23
|
export * from './Icon/types';
|