@televet/kibble-ui 1.17.13 → 1.17.14-beta.44rung5.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/build/components/Forms/Button/button.types.d.ts +2 -2
- package/build/components/Navigation/Link/components/linkIcon.component.d.ts +5 -0
- package/build/components/Navigation/Link/index.d.ts +2 -0
- package/build/components/Navigation/Link/link.argTypes.d.ts +81 -0
- package/build/components/Navigation/Link/link.component.d.ts +10 -0
- package/build/components/Navigation/Link/link.config.d.ts +19 -0
- package/build/components/Navigation/LinkOverlay/index.d.ts +1 -0
- package/build/components/Navigation/index.d.ts +2 -0
- package/build/components/Typography/Text/text.types.d.ts +1 -0
- package/build/components/index.d.ts +1 -0
- package/build/hooks/useIconTextSizeMap.d.ts +2 -0
- package/build/index.js +60 -19
- package/build/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AdaptiveColorMap } from '../../../theme/tokens';
|
|
2
2
|
export interface ButtonVariantConfigType extends AdaptiveColorMap<ButtonColorOptionsType> {
|
|
3
|
-
variant: 'solid' | 'outline' | 'ghost'
|
|
3
|
+
variant: 'solid' | 'outline' | 'ghost';
|
|
4
4
|
}
|
|
5
|
-
export declare type ButtonVariantType = 'primary' | 'primaryDestructive' | 'secondary' | 'secondaryDestructive' | 'secondarySubtle' | 'secondarySubtleDestructive' | 'tertiary' | 'tertiaryDestructive' | 'ghost' | 'ghostNeutral' | 'ghostDestructive'
|
|
5
|
+
export declare type ButtonVariantType = 'primary' | 'primaryDestructive' | 'secondary' | 'secondaryDestructive' | 'secondarySubtle' | 'secondarySubtleDestructive' | 'tertiary' | 'tertiaryDestructive' | 'ghost' | 'ghostNeutral' | 'ghostDestructive';
|
|
6
6
|
export declare type ButtonColorOptionsType = 'content' | 'default' | 'hover' | 'active' | 'border';
|
|
7
7
|
export declare type ButtonSizeType = 'xs' | 'sm' | 'md' | 'lg';
|
|
8
8
|
export declare type ButtonStyleType = Record<ButtonVariantType, ButtonVariantConfigType>;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export declare const linkArgTypes: {
|
|
2
|
+
isExternal: {
|
|
3
|
+
control: string;
|
|
4
|
+
description: string;
|
|
5
|
+
defaultValue: boolean;
|
|
6
|
+
table: {
|
|
7
|
+
type: {
|
|
8
|
+
summary: string;
|
|
9
|
+
};
|
|
10
|
+
defaultValue: {
|
|
11
|
+
summary: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
size: {
|
|
16
|
+
control: string;
|
|
17
|
+
options: string[];
|
|
18
|
+
defaultValue: string;
|
|
19
|
+
table: {
|
|
20
|
+
type: {
|
|
21
|
+
summary: string;
|
|
22
|
+
};
|
|
23
|
+
defaultValue: {
|
|
24
|
+
summary: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
href: {
|
|
30
|
+
type: {
|
|
31
|
+
name: string;
|
|
32
|
+
};
|
|
33
|
+
control: string;
|
|
34
|
+
description: string;
|
|
35
|
+
table: {
|
|
36
|
+
type: {
|
|
37
|
+
summary: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
children: {
|
|
42
|
+
type: {
|
|
43
|
+
name: string;
|
|
44
|
+
required: boolean;
|
|
45
|
+
};
|
|
46
|
+
control: string;
|
|
47
|
+
description: string;
|
|
48
|
+
table: {
|
|
49
|
+
type: {
|
|
50
|
+
summary: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
onClick: {
|
|
55
|
+
type: string;
|
|
56
|
+
description: string;
|
|
57
|
+
table: {
|
|
58
|
+
type: {
|
|
59
|
+
summary: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
as: {
|
|
64
|
+
type: string;
|
|
65
|
+
table: {
|
|
66
|
+
type: {
|
|
67
|
+
summary: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
description: string;
|
|
71
|
+
};
|
|
72
|
+
iconProps: {
|
|
73
|
+
type: string;
|
|
74
|
+
table: {
|
|
75
|
+
type: {
|
|
76
|
+
summary: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
description: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { LinkProps as CLinkProps } from '@chakra-ui/react';
|
|
3
|
+
import { LinkIconProps } from './components/linkIcon.component';
|
|
4
|
+
import { TextSize } from 'components/Typography';
|
|
5
|
+
export interface LinkProps extends CLinkProps {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
iconProps?: LinkIconProps;
|
|
8
|
+
size?: TextSize;
|
|
9
|
+
}
|
|
10
|
+
export declare const Link: ({ children, iconProps, size, ...rest }: LinkProps) => JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const LinkConfig: {
|
|
2
|
+
parts?: undefined;
|
|
3
|
+
baseStyle?: import("@chakra-ui/react").CSSWithMultiValues | import("@chakra-ui/theme-tools").SystemStyleFunction | undefined;
|
|
4
|
+
sizes?: Record<string, import("@chakra-ui/theme-tools").SystemStyleInterpolation> | undefined;
|
|
5
|
+
variants?: Record<string, import("@chakra-ui/theme-tools").SystemStyleInterpolation> | undefined;
|
|
6
|
+
defaultProps?: import("@chakra-ui/react").ComponentDefaultProps | undefined;
|
|
7
|
+
} | {
|
|
8
|
+
parts: string[];
|
|
9
|
+
baseStyle?: import("@chakra-ui/react").CSSWithMultiValues | import("@chakra-ui/theme-tools").SystemStyleFunction | Partial<Record<string, import("@chakra-ui/react").CSSObject>> | import("@chakra-ui/theme-tools").PartsStyleFunction<{
|
|
10
|
+
__type: string;
|
|
11
|
+
}> | undefined;
|
|
12
|
+
sizes?: Record<string, import("@chakra-ui/theme-tools").SystemStyleInterpolation> | Record<string, import("@chakra-ui/theme-tools").PartsStyleInterpolation<{
|
|
13
|
+
__type: string;
|
|
14
|
+
}>> | undefined;
|
|
15
|
+
variants?: Record<string, import("@chakra-ui/theme-tools").SystemStyleInterpolation> | Record<string, import("@chakra-ui/theme-tools").PartsStyleInterpolation<{
|
|
16
|
+
__type: string;
|
|
17
|
+
}>> | undefined;
|
|
18
|
+
defaultProps?: import("@chakra-ui/react").ComponentDefaultProps | undefined;
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LinkOverlay } from '@chakra-ui/react';
|
package/build/index.js
CHANGED
|
@@ -3512,7 +3512,7 @@ var Button = React.forwardRef(function (props, ref) {
|
|
|
3512
3512
|
domProps[position] = ButtonIcon;
|
|
3513
3513
|
}
|
|
3514
3514
|
}
|
|
3515
|
-
return (React__default["default"].createElement(react.Button, __assign({ fontWeight:
|
|
3515
|
+
return (React__default["default"].createElement(react.Button, __assign({ fontWeight: fontWeights.semibold, cursor: "pointer", ref: ref, _hover: hoverClass, _active: activeClass, size: p.size || 'md', iconSpacing: domProps.size === 'sm' || domProps.size === 'xs' ? '4px' : '8px', borderRadius: radii.base }, domProps), domProps.children));
|
|
3516
3516
|
});
|
|
3517
3517
|
Button.displayName = 'Button';
|
|
3518
3518
|
|
|
@@ -3704,23 +3704,6 @@ var ButtonVariantConfig = {
|
|
|
3704
3704
|
border: colors$1.transparent,
|
|
3705
3705
|
},
|
|
3706
3706
|
},
|
|
3707
|
-
link: {
|
|
3708
|
-
variant: 'link',
|
|
3709
|
-
light: {
|
|
3710
|
-
content: colors$1.text.light.link,
|
|
3711
|
-
default: colors$1.transparent,
|
|
3712
|
-
hover: colors$1.transparent,
|
|
3713
|
-
active: colors$1.transparent,
|
|
3714
|
-
border: colors$1.transparent,
|
|
3715
|
-
},
|
|
3716
|
-
dark: {
|
|
3717
|
-
content: colors$1.text.dark.link,
|
|
3718
|
-
default: colors$1.transparent,
|
|
3719
|
-
hover: colors$1.transparent,
|
|
3720
|
-
active: colors$1.transparent,
|
|
3721
|
-
border: colors$1.transparent,
|
|
3722
|
-
},
|
|
3723
|
-
},
|
|
3724
3707
|
};
|
|
3725
3708
|
var ButtonSizeConfig = {
|
|
3726
3709
|
lg: {
|
|
@@ -15303,7 +15286,7 @@ var TextConfig = {
|
|
|
15303
15286
|
|
|
15304
15287
|
var AlertTitle = function (props) {
|
|
15305
15288
|
var title = props.title, titleProps = props.titleProps;
|
|
15306
|
-
return (React__default["default"].createElement(Heading, __assign({ className: "Alert__Title", flexGrow: 1, lineHeight: 6, size: "sm" }, titleProps), title));
|
|
15289
|
+
return (React__default["default"].createElement(Heading, __assign({ className: "Alert__Title", flexGrow: 1, colorToken: "default", lineHeight: 6, size: "sm" }, titleProps), title));
|
|
15307
15290
|
};
|
|
15308
15291
|
|
|
15309
15292
|
var AlertIcon = function (props) {
|
|
@@ -21963,6 +21946,57 @@ var TabsConfig = {
|
|
|
21963
21946
|
},
|
|
21964
21947
|
};
|
|
21965
21948
|
|
|
21949
|
+
var LinkIcon = function (iconProps) {
|
|
21950
|
+
iconProps.position; var rest = __rest(iconProps, ["position"]);
|
|
21951
|
+
return (React__default["default"].createElement(react.Box, null,
|
|
21952
|
+
React__default["default"].createElement(Icon, __assign({}, rest))));
|
|
21953
|
+
};
|
|
21954
|
+
|
|
21955
|
+
var useIconTextSizeMap = function (textSize) {
|
|
21956
|
+
switch (textSize) {
|
|
21957
|
+
case 'xs':
|
|
21958
|
+
return 'xs';
|
|
21959
|
+
case 'sm':
|
|
21960
|
+
return 'sm';
|
|
21961
|
+
case 'md':
|
|
21962
|
+
return 'md';
|
|
21963
|
+
case 'lg':
|
|
21964
|
+
return 'lg';
|
|
21965
|
+
case 'xl':
|
|
21966
|
+
case '2xl':
|
|
21967
|
+
case '3xl':
|
|
21968
|
+
case '4xl':
|
|
21969
|
+
return 'lg';
|
|
21970
|
+
case '5xl':
|
|
21971
|
+
case '6xl':
|
|
21972
|
+
return '2xl';
|
|
21973
|
+
}
|
|
21974
|
+
};
|
|
21975
|
+
|
|
21976
|
+
var Link = function (_a) {
|
|
21977
|
+
var children = _a.children, iconProps = _a.iconProps, _b = _a.size, size = _b === void 0 ? 'md' : _b, rest = __rest(_a, ["children", "iconProps", "size"]);
|
|
21978
|
+
var mappIconSize = useIconTextSizeMap(size);
|
|
21979
|
+
if (iconProps && !iconProps.position) {
|
|
21980
|
+
iconProps.position = 'start';
|
|
21981
|
+
}
|
|
21982
|
+
return (React__default["default"].createElement(react.Link, __assign({ size: size }, rest),
|
|
21983
|
+
React__default["default"].createElement(react.HStack, null,
|
|
21984
|
+
(iconProps === null || iconProps === void 0 ? void 0 : iconProps.position) === 'start' && React__default["default"].createElement(LinkIcon, __assign({ size: mappIconSize }, iconProps)),
|
|
21985
|
+
React__default["default"].createElement(react.Box, null, children),
|
|
21986
|
+
(iconProps === null || iconProps === void 0 ? void 0 : iconProps.position) === 'end' && React__default["default"].createElement(LinkIcon, __assign({ size: mappIconSize }, iconProps)))));
|
|
21987
|
+
};
|
|
21988
|
+
|
|
21989
|
+
var BaseLinkConfig = {
|
|
21990
|
+
baseStyle: {
|
|
21991
|
+
textDecoration: 'underline',
|
|
21992
|
+
color: adaptiveColors.text.light.link,
|
|
21993
|
+
_hover: {
|
|
21994
|
+
color: coreColors.teal[700],
|
|
21995
|
+
},
|
|
21996
|
+
},
|
|
21997
|
+
};
|
|
21998
|
+
var LinkConfig = __assign(__assign({}, BaseLinkConfig), TextConfig);
|
|
21999
|
+
|
|
21966
22000
|
// @ts-ignore
|
|
21967
22001
|
var theme = react.extendTheme({
|
|
21968
22002
|
styles: {
|
|
@@ -22006,6 +22040,7 @@ var theme = react.extendTheme({
|
|
|
22006
22040
|
Tabs: TabsConfig,
|
|
22007
22041
|
Radio: RadioConfig,
|
|
22008
22042
|
Checkbox: CheckboxConfig,
|
|
22043
|
+
Link: LinkConfig,
|
|
22009
22044
|
},
|
|
22010
22045
|
});
|
|
22011
22046
|
|
|
@@ -24705,6 +24740,10 @@ Object.defineProperty(exports, 'InputRightElement', {
|
|
|
24705
24740
|
enumerable: true,
|
|
24706
24741
|
get: function () { return react.InputRightElement; }
|
|
24707
24742
|
});
|
|
24743
|
+
Object.defineProperty(exports, 'LinkOverlay', {
|
|
24744
|
+
enumerable: true,
|
|
24745
|
+
get: function () { return react.LinkOverlay; }
|
|
24746
|
+
});
|
|
24708
24747
|
Object.defineProperty(exports, 'MenuDivider', {
|
|
24709
24748
|
enumerable: true,
|
|
24710
24749
|
get: function () { return react.MenuDivider; }
|
|
@@ -24839,6 +24878,8 @@ exports.HeadingConfig = HeadingConfig;
|
|
|
24839
24878
|
exports.Icon = Icon;
|
|
24840
24879
|
exports.KibbleThemeProvider = KibbleThemeProvider;
|
|
24841
24880
|
exports.LightStatusVariantMap = LightStatusVariantMap;
|
|
24881
|
+
exports.Link = Link;
|
|
24882
|
+
exports.LinkConfig = LinkConfig;
|
|
24842
24883
|
exports.Logo = Logo;
|
|
24843
24884
|
exports.Menu = Menu;
|
|
24844
24885
|
exports.MenuConfig = MenuConfig;
|