@televet/kibble-ui 1.2.3-beta.2p81ym7.3 → 1.3.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/Avatar/avatar.component.d.ts +26 -0
- package/build/components/Avatar/avatar.config.d.ts +2 -0
- package/build/components/Avatar/avatar.types.d.ts +1 -0
- package/build/components/Avatar/index.d.ts +3 -0
- package/build/components/AvatarGroup/avatarGroup.component.d.ts +13 -0
- package/build/components/AvatarGroup/avatarGroup.utilities.d.ts +6 -0
- package/build/components/AvatarGroup/index.d.ts +1 -0
- package/build/components/Textarea/index.d.ts +0 -1
- package/build/components/Typography/Heading/heading.component.d.ts +3 -4
- package/build/components/Typography/Text/text.component.d.ts +2 -6
- package/build/components/Typography/Text/text.types.d.ts +0 -1
- package/build/components/Typography/index.d.ts +0 -1
- package/build/components/index.d.ts +1 -0
- package/build/index.d.ts +0 -1
- package/build/index.js +441 -270
- package/build/index.js.map +1 -1
- package/build/theme/theme.types.d.ts +3 -1
- package/build/theme/tokens/colors/color.types.d.ts +23 -2
- package/build/theme/tokens/fontWeights.d.ts +12 -3
- package/package.json +4 -2
- package/build/components/Button/button.model.d.ts +0 -5
- package/build/components/Button/button.records.d.ts +0 -2
- package/build/components/Drawer/drawer.records.d.ts +0 -13
- package/build/components/Modal/index.d.ts +0 -2
- package/build/components/Modal/modal-section.component.d.ts +0 -7
- package/build/components/Modal/modal.component.d.ts +0 -24
- package/build/components/Modal/modal.types.d.ts +0 -1
- package/build/components/Tooltip/tooltip.model.d.ts +0 -4
- package/build/components/Tooltip/tooltip.records.d.ts +0 -9
- package/build/components/Typography/Heading/heading.records.d.ts +0 -2
- package/build/components/Typography/Text/text.records.d.ts +0 -2
- package/build/components/Typography/typography.types.d.ts +0 -1
- package/build/hocs/index.d.ts +0 -2
- package/build/hocs/withDarkMode.d.ts +0 -2
- package/build/hocs/withTheme.d.ts +0 -3
- package/build/theme/theme.model.d.ts +0 -37
- package/build/theme/theme.record.d.ts +0 -2
- package/build/theme/tokens/colors/color.model.d.ts +0 -64
- package/build/theme/tokens/colors/color.type.d.ts +0 -9
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as tokens from './tokens';
|
|
2
2
|
import { ButtonStyleType, HeadingStyleConfig, TooltipStyleConfig } from '../components';
|
|
3
3
|
import { ComponentStyleConfig } from '@chakra-ui/theme';
|
|
4
|
+
import { Colors } from './tokens/colors/color.types';
|
|
4
5
|
export interface ThemeProps {
|
|
5
6
|
theme: Theme;
|
|
6
7
|
}
|
|
7
8
|
export interface Theme {
|
|
8
9
|
blur: tokens.Blur;
|
|
9
10
|
borders: tokens.Borders;
|
|
10
|
-
colors:
|
|
11
|
+
colors: Colors;
|
|
11
12
|
radii: tokens.Radii;
|
|
12
13
|
shadows: tokens.Shadows;
|
|
13
14
|
sizes: tokens.Sizes;
|
|
@@ -32,5 +33,6 @@ export interface Theme {
|
|
|
32
33
|
Text: ComponentStyleConfig;
|
|
33
34
|
Button: ButtonStyleType;
|
|
34
35
|
Tooltip: TooltipStyleConfig;
|
|
36
|
+
Avatar: ComponentStyleConfig;
|
|
35
37
|
};
|
|
36
38
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ColorMode } from '@chakra-ui/react';
|
|
2
|
-
import { IconColor
|
|
2
|
+
import { IconColor } from '../../../components';
|
|
3
3
|
export declare type ColorValue = '50' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
4
4
|
export declare type ColorValueMap = Record<ColorValue, string>;
|
|
5
5
|
export declare type AdaptiveColor = Record<ColorMode, string>;
|
|
@@ -23,6 +23,28 @@ export interface CoreColors {
|
|
|
23
23
|
purple: ColorValueMap;
|
|
24
24
|
}
|
|
25
25
|
export interface SemanticColors {
|
|
26
|
+
text: {
|
|
27
|
+
light: {
|
|
28
|
+
default: string;
|
|
29
|
+
headline: string;
|
|
30
|
+
subtle: string;
|
|
31
|
+
link: string;
|
|
32
|
+
placeholder: string;
|
|
33
|
+
success: string;
|
|
34
|
+
warning: string;
|
|
35
|
+
error: string;
|
|
36
|
+
};
|
|
37
|
+
dark: {
|
|
38
|
+
default: string;
|
|
39
|
+
headline: string;
|
|
40
|
+
subtle: string;
|
|
41
|
+
link: string;
|
|
42
|
+
placeholder: string;
|
|
43
|
+
success: string;
|
|
44
|
+
warning: string;
|
|
45
|
+
error: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
26
48
|
background: {
|
|
27
49
|
light: string;
|
|
28
50
|
grayLight: string;
|
|
@@ -79,6 +101,5 @@ export interface SemanticColors {
|
|
|
79
101
|
}
|
|
80
102
|
export interface AdaptiveColors {
|
|
81
103
|
icon: AdaptiveColorMap<IconColor>;
|
|
82
|
-
text: AdaptiveColorMap<TextColor>;
|
|
83
104
|
}
|
|
84
105
|
export declare type Colors = CoreColors & SemanticColors & AdaptiveColors;
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
export declare const fontWeights:
|
|
2
|
-
export declare type
|
|
3
|
-
|
|
1
|
+
export declare const fontWeights: FontWeights;
|
|
2
|
+
export declare type FontWeights = {
|
|
3
|
+
hairline: number;
|
|
4
|
+
thin: number;
|
|
5
|
+
light: number;
|
|
6
|
+
normal: number;
|
|
7
|
+
medium: number;
|
|
8
|
+
semibold: number;
|
|
9
|
+
bold: number;
|
|
10
|
+
extrabold: number;
|
|
11
|
+
black: number;
|
|
12
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@televet/kibble-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Kibble Design System by Televet",
|
|
5
5
|
"author": "TeleVet",
|
|
6
6
|
"main": "build/index.js",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"@babel/runtime": "^7.15.3",
|
|
44
44
|
"@chakra-ui/react": "^1.6.5",
|
|
45
45
|
"@chakra-ui/storybook-addon": "^1.0.3",
|
|
46
|
+
"@emotion/react": "^11.4.0",
|
|
46
47
|
"@emotion/styled": "^11.3.0",
|
|
47
48
|
"@rollup/plugin-babel": "^5.3.0",
|
|
48
49
|
"@rollup/plugin-commonjs": "^20.0.0",
|
|
@@ -115,11 +116,12 @@
|
|
|
115
116
|
},
|
|
116
117
|
"peerDependencies": {
|
|
117
118
|
"@chakra-ui/react": ">=1.6.5",
|
|
119
|
+
"@emotion/react": "^11.4.0",
|
|
118
120
|
"react": ">=16.13.1",
|
|
119
121
|
"react-dom": ">=16.13.1",
|
|
120
122
|
"styled-components": ">=5.0.0"
|
|
121
123
|
},
|
|
122
124
|
"dependencies": {
|
|
123
|
-
"@televet/kibble-icons": "^0.1.
|
|
125
|
+
"@televet/kibble-icons": "^0.1.11"
|
|
124
126
|
}
|
|
125
127
|
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
2
|
-
import { ModalProps as ChakraModalProps } from '@chakra-ui/react';
|
|
3
|
-
import { BlurAmount } from '../../theme/tokens';
|
|
4
|
-
import { FocusableElement } from '@chakra-ui/utils';
|
|
5
|
-
import { ModalSize } from './modal.types';
|
|
6
|
-
declare type ResponsiveBreakpoints = 'base' | 'md';
|
|
7
|
-
export interface ModalProps extends ChakraModalProps {
|
|
8
|
-
title?: string;
|
|
9
|
-
children: ReactNode;
|
|
10
|
-
footer?: ReactNode;
|
|
11
|
-
isOpen: boolean;
|
|
12
|
-
onClose: () => void;
|
|
13
|
-
modalSize?: Partial<Record<ResponsiveBreakpoints, ModalSize>>;
|
|
14
|
-
allowEscape?: boolean;
|
|
15
|
-
useDefaultCloseButton?: boolean;
|
|
16
|
-
overlayBlur?: BlurAmount;
|
|
17
|
-
overlayHueShift?: number;
|
|
18
|
-
overlayBase?: 'whiteAlpha' | 'blackAlpha';
|
|
19
|
-
darkMode?: boolean;
|
|
20
|
-
initialFocusRef: React.RefObject<FocusableElement>;
|
|
21
|
-
scrollBehavior?: 'inside' | 'outside';
|
|
22
|
-
}
|
|
23
|
-
export declare const Modal: ({ title, children, footer, isOpen, onClose, modalSize, overlayBlur, allowEscape, useDefaultCloseButton, initialFocusRef, scrollBehavior, overlayHueShift, overlayBase, darkMode, ...rest }: ModalProps) => JSX.Element;
|
|
24
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare type ModalSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | 'full';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare type TextColor = 'default' | 'headline' | 'subtle' | 'link' | 'placeholder' | 'success' | 'warning' | 'error';
|
package/build/hocs/index.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import * as tokens from './tokens';
|
|
2
|
-
import { ButtonStyleConfig, HeadingStyleConfig, TooltipStyleConfig } from '../components';
|
|
3
|
-
import { ComponentStyleConfig } from '@chakra-ui/theme';
|
|
4
|
-
import { FontWeight } from './tokens';
|
|
5
|
-
export interface ThemeProps {
|
|
6
|
-
theme: Theme;
|
|
7
|
-
}
|
|
8
|
-
export interface Theme {
|
|
9
|
-
blur: tokens.Blur;
|
|
10
|
-
borders: tokens.Borders;
|
|
11
|
-
colors: tokens.Colors;
|
|
12
|
-
radii: tokens.Radii;
|
|
13
|
-
shadows: tokens.Shadows;
|
|
14
|
-
sizes: tokens.Sizes;
|
|
15
|
-
fonts: tokens.Fonts;
|
|
16
|
-
fontSizes: tokens.FontSizes;
|
|
17
|
-
fontWeights: Record<FontWeight, number>;
|
|
18
|
-
lineHeights: tokens.LineHeights;
|
|
19
|
-
space: tokens.Space;
|
|
20
|
-
transition: tokens.Transition;
|
|
21
|
-
zIndices: tokens.ZIndices;
|
|
22
|
-
semanticTokens: tokens.SemanticTokens;
|
|
23
|
-
initialColorMode: string;
|
|
24
|
-
useSystemColorMode: boolean;
|
|
25
|
-
config: {
|
|
26
|
-
initialColorMode: string;
|
|
27
|
-
useSystemColorMode: boolean;
|
|
28
|
-
};
|
|
29
|
-
components: {
|
|
30
|
-
Drawer: ComponentStyleConfig;
|
|
31
|
-
Textarea: ComponentStyleConfig;
|
|
32
|
-
Heading: HeadingStyleConfig;
|
|
33
|
-
Text: ComponentStyleConfig;
|
|
34
|
-
Button: ButtonStyleConfig;
|
|
35
|
-
Tooltip: TooltipStyleConfig;
|
|
36
|
-
};
|
|
37
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { IconColor } from '../../../components';
|
|
2
|
-
import { AdaptiveColorMap, ColorValueMap, SemanticTextToken } from './color.type';
|
|
3
|
-
export interface BaseColors {
|
|
4
|
-
transparent: string;
|
|
5
|
-
current: string;
|
|
6
|
-
black: string;
|
|
7
|
-
white: string;
|
|
8
|
-
whiteAlpha: ColorValueMap;
|
|
9
|
-
blackAlpha: ColorValueMap;
|
|
10
|
-
gray: ColorValueMap;
|
|
11
|
-
red: ColorValueMap;
|
|
12
|
-
orange: ColorValueMap;
|
|
13
|
-
yellow: ColorValueMap;
|
|
14
|
-
green: ColorValueMap;
|
|
15
|
-
teal: ColorValueMap;
|
|
16
|
-
blue: ColorValueMap;
|
|
17
|
-
comet: ColorValueMap;
|
|
18
|
-
}
|
|
19
|
-
export interface SemanticTokens {
|
|
20
|
-
text: Record<SemanticTextToken, string>;
|
|
21
|
-
background: {
|
|
22
|
-
light: string;
|
|
23
|
-
grayLight: string;
|
|
24
|
-
grayDark: string;
|
|
25
|
-
tealLight: string;
|
|
26
|
-
dark: string;
|
|
27
|
-
table: string;
|
|
28
|
-
overlay: string;
|
|
29
|
-
info: string;
|
|
30
|
-
error: string;
|
|
31
|
-
warning: string;
|
|
32
|
-
success: string;
|
|
33
|
-
};
|
|
34
|
-
border: {
|
|
35
|
-
default: string;
|
|
36
|
-
dark: string;
|
|
37
|
-
focus: string;
|
|
38
|
-
info: string;
|
|
39
|
-
error: string;
|
|
40
|
-
warning: string;
|
|
41
|
-
success: string;
|
|
42
|
-
};
|
|
43
|
-
divider: {
|
|
44
|
-
onLight: string;
|
|
45
|
-
};
|
|
46
|
-
status: {
|
|
47
|
-
open: string;
|
|
48
|
-
confirmed: string;
|
|
49
|
-
success: string;
|
|
50
|
-
warning: string;
|
|
51
|
-
action: string;
|
|
52
|
-
negative: string;
|
|
53
|
-
error: string;
|
|
54
|
-
archived: string;
|
|
55
|
-
closed: string;
|
|
56
|
-
};
|
|
57
|
-
general: {
|
|
58
|
-
brand: string;
|
|
59
|
-
error: string;
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
export interface AdaptiveColorTokens {
|
|
63
|
-
icon: AdaptiveColorMap<IconColor>;
|
|
64
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ColorMode } from '@chakra-ui/react';
|
|
2
|
-
import { AdaptiveColorTokens, BaseColors, SemanticTokens } from './color.model';
|
|
3
|
-
export declare type ColorValue = '50' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
4
|
-
export declare type ColorValueMap = Record<ColorValue, string>;
|
|
5
|
-
export declare type AdaptiveColor = Record<ColorMode, string>;
|
|
6
|
-
export declare type AdaptiveColorMap<T extends keyof any> = Record<ColorMode, Record<T, string>>;
|
|
7
|
-
export declare type AdaptiveColorConfig<K extends keyof any, T extends keyof any> = Record<K, AdaptiveColorMap<T>>;
|
|
8
|
-
export declare type SemanticTextToken = 'onLight' | 'linkOnLight' | 'onLightSubtle' | 'onDark' | 'headline' | 'placeholder' | 'success' | 'warning' | 'error';
|
|
9
|
-
export declare type Colors = BaseColors & SemanticTokens & AdaptiveColorTokens;
|