@zealicsolutions/web-ui 0.0.1 → 0.0.3

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +213 -0
  2. package/package.json +6 -2
@@ -0,0 +1,213 @@
1
+ /// <reference types="react" />
2
+ import { Callback, StylesType } from 'typescript';
3
+ import * as react from 'react';
4
+ import { PropsWithChildren, ReactNode } from 'react';
5
+ import * as styled_components from 'styled-components';
6
+ import { CSSProperties } from 'styled-components';
7
+ import { IconNames as IconNames$1 } from 'atoms/Icon/Icon';
8
+ import { InputFieldTypes } from 'fieldsConfiguration/types';
9
+ import { SizesTypes as SizesTypes$1, ThemeColors as ThemeColors$1 } from 'theme/types';
10
+ import { SizesTypes as SizesTypes$2, ThemeColors as ThemeColors$2 } from 'theme';
11
+ import { TooltipProps as TooltipProps$1 } from 'rc-tooltip/lib/Tooltip';
12
+
13
+ declare type BaseButtonProps = {
14
+ onClick?: Callback;
15
+ variant?: 'primary' | 'secondary';
16
+ disabled?: boolean;
17
+ fullWidth?: boolean;
18
+ };
19
+ declare type ButtonProps = BaseButtonProps & {
20
+ fullWidth?: boolean;
21
+ text?: string;
22
+ loading?: boolean;
23
+ };
24
+ declare const Button: ({ text, onClick, loading, disabled, variant, fullWidth, }: ButtonProps) => JSX.Element;
25
+
26
+ declare type TouchableOpacityProps = PropsWithChildren<{
27
+ activeOpacity?: number;
28
+ withoutOpacityEffect?: boolean;
29
+ disabled?: boolean;
30
+ }>;
31
+ declare const TouchableOpacity: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {
32
+ activeOpacity?: number | undefined;
33
+ withoutOpacityEffect?: boolean | undefined;
34
+ disabled?: boolean | undefined;
35
+ } & {
36
+ children?: react.ReactNode;
37
+ }, never>;
38
+
39
+ declare type CheckBoxProps = {
40
+ value: boolean;
41
+ onClick: (value: boolean) => void;
42
+ disabled?: boolean;
43
+ error?: boolean;
44
+ label?: string;
45
+ };
46
+ declare const Checkbox: ({ label, onClick, value, disabled, error }: CheckBoxProps) => JSX.Element;
47
+
48
+ declare type SelectOption = {
49
+ id: string;
50
+ label: string;
51
+ };
52
+ declare type SelectProps = {
53
+ value?: string;
54
+ onChange?: (value: string) => void;
55
+ placeholder?: string;
56
+ disabled?: boolean;
57
+ options: SelectOption[];
58
+ isError?: boolean;
59
+ isEditMode?: boolean;
60
+ };
61
+
62
+ declare const Select: ({ onChange, value, placeholder, options, disabled, isError, }: SelectProps) => JSX.Element;
63
+
64
+ declare type InputIconProps = {
65
+ name: IconNames$1;
66
+ onClick?: Callback;
67
+ };
68
+ declare type InputProps = {
69
+ value?: string;
70
+ leftIcon?: InputIconProps;
71
+ rightIcon?: InputIconProps;
72
+ onBlur?: Callback;
73
+ type?: InputFieldTypes;
74
+ placeholder?: string;
75
+ disabled?: boolean;
76
+ isEditMode?: boolean;
77
+ isError?: boolean;
78
+ maxLength?: number;
79
+ onChange?: (value: string) => void;
80
+ };
81
+ declare const Input: ({ value, leftIcon, rightIcon, onChange, onBlur, disabled, isError, placeholder, isEditMode, type, ...rest }: InputProps) => JSX.Element;
82
+
83
+ declare type TextTypes = 'primary' | 'secondary' | 'error' | 'success';
84
+ declare type TextWrapperProps = {
85
+ children: ReactNode;
86
+ variant: SizesTypes$1;
87
+ layout?: 'div' | 'span';
88
+ type?: TextTypes;
89
+ styles?: StylesType;
90
+ color?: ThemeColors$1 | string;
91
+ };
92
+ declare const TextWrapper: styled_components.StyledComponent<"div", styled_components.DefaultTheme, TextWrapperProps, never>;
93
+
94
+ declare type ThemeColors = 'primary' | 'secondary' | 'background' | 'gray1' | 'gray2' | 'gray3' | 'gray4' | 'gray5' | 'indigo' | 'blue' | 'white' | 'black' | 'indigoTint' | 'indigoTint2' | 'success' | 'error' | 'warning';
95
+ declare type SizesTypes = '2XL' | 'XL' | 'L' | 'M' | 'S' | 'XS';
96
+
97
+ declare type IconProps = {
98
+ name: IconNames;
99
+ size?: number;
100
+ color?: ThemeColors | string;
101
+ pointerEvents?: 'auto' | 'none';
102
+ };
103
+ declare const availableIcons: {
104
+ CaretDown: ({ color, size }: Omit<IconProps, "name">) => JSX.Element;
105
+ CaretUp: ({ color, ...props }: Omit<IconProps, "name">) => JSX.Element;
106
+ Filter: ({ size, color }: Omit<IconProps, "name">) => JSX.Element;
107
+ Check: ({ size, color }: Omit<IconProps, "name">) => JSX.Element;
108
+ Info: ({ size, color }: Omit<IconProps, "name">) => JSX.Element;
109
+ View: ({ color, size }: Omit<IconProps, "name">) => JSX.Element;
110
+ Hide: ({ color, size }: Omit<IconProps, "name">) => JSX.Element;
111
+ Close: ({ size, color }: Omit<IconProps, "name">) => JSX.Element;
112
+ Minus: ({ size, color }: Omit<IconProps, "name">) => JSX.Element;
113
+ InfoBoxIcon: ({ color, size }: Omit<IconProps, "name">) => JSX.Element;
114
+ Warning: ({ size, color }: Omit<IconProps, "name">) => JSX.Element;
115
+ Bell: ({ size, color }: Omit<IconProps, "name">) => JSX.Element;
116
+ Mobile: ({ size, color }: Omit<IconProps, "name">) => JSX.Element;
117
+ Mail: ({ size, color }: Omit<IconProps, "name">) => JSX.Element;
118
+ };
119
+ declare type IconNames = keyof typeof availableIcons;
120
+ declare const Icon: ({ name, color, ...props }: IconProps) => JSX.Element;
121
+
122
+ declare type SpacerProps = {
123
+ width?: SizesTypes$2 | number;
124
+ height?: SizesTypes$2 | number;
125
+ layout?: 'div' | 'span';
126
+ };
127
+ declare const Spacer: styled_components.StyledComponent<"div", styled_components.DefaultTheme, SpacerProps, never>;
128
+
129
+ declare const Spinner: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {
130
+ color?: ThemeColors$1 | undefined;
131
+ size?: SizesTypes$1 | undefined;
132
+ }, never>;
133
+
134
+ declare type ImageProps = {
135
+ src: string;
136
+ alt?: string;
137
+ styles?: CSSProperties;
138
+ };
139
+ declare const Image: (props: ImageProps) => JSX.Element;
140
+
141
+ declare type LinkButtonProps = PropsWithChildren<{
142
+ activeOpacity?: number;
143
+ withoutOpacityEffect?: boolean;
144
+ disabled?: boolean;
145
+ onClick?: Callback;
146
+ }>;
147
+ declare const LinkButton: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {
148
+ activeOpacity?: number | undefined;
149
+ withoutOpacityEffect?: boolean | undefined;
150
+ disabled?: boolean | undefined;
151
+ } & {
152
+ children?: react.ReactNode;
153
+ } & {
154
+ activeOpacity?: number | undefined;
155
+ withoutOpacityEffect?: boolean | undefined;
156
+ disabled?: boolean | undefined;
157
+ onClick?: Callback | undefined;
158
+ }, never>;
159
+
160
+ declare type ValidationTagStatus = 'DEFAULT' | 'ERROR' | 'SUCCESS';
161
+ declare type ValidationTagProps = {
162
+ status: ValidationTagStatus;
163
+ text: string;
164
+ };
165
+ declare const ValidationTag: ({ text, status }: ValidationTagProps) => JSX.Element;
166
+
167
+ declare type TooltipProps = Pick<TooltipProps$1, 'overlay' | 'placement' | 'trigger' | 'visible' | 'children'>;
168
+ declare const StyleWrapper: styled_components.StyledComponent<"div", styled_components.DefaultTheme, {}, never>;
169
+ declare const Tooltip: ({ trigger, placement, ...props }: TooltipProps) => JSX.Element;
170
+
171
+ declare type ToastType = 'success' | 'infoTierOne' | 'infoTierTwo' | 'warning' | 'error';
172
+ declare type ToastParams = {
173
+ message: string;
174
+ type?: ToastType;
175
+ duration?: number;
176
+ };
177
+
178
+ declare const toast: ({ message, type, duration }: ToastParams) => void | undefined;
179
+
180
+ declare type AvatarProps = {
181
+ size?: SizesTypes | number;
182
+ withShadow?: boolean;
183
+ label?: string;
184
+ backgroundColor?: ThemeColors;
185
+ textConfig?: {
186
+ color?: ThemeColors;
187
+ font?: SizesTypes;
188
+ };
189
+ content: {
190
+ initials?: string;
191
+ iconName?: IconNames;
192
+ imageUrl?: string;
193
+ };
194
+ onPress?: Callback;
195
+ };
196
+ declare const Avatar: ({ size, withShadow, label, backgroundColor, onPress, content: { initials, iconName, imageUrl }, textConfig: { color, font }, }: AvatarProps) => JSX.Element;
197
+
198
+ declare type HorizontalPaddingProps = {
199
+ padding: SizesTypes$2 | number;
200
+ };
201
+ declare const HorizontalPadding: styled_components.StyledComponent<"div", styled_components.DefaultTheme, HorizontalPaddingProps, never>;
202
+ declare const VerticalPadding: styled_components.StyledComponent<"div", styled_components.DefaultTheme, HorizontalPaddingProps, never>;
203
+
204
+ declare type DividerProps = {
205
+ type?: 'horizontal' | 'vertical';
206
+ color?: ThemeColors$2 | string;
207
+ marginVertical?: SizesTypes$2 | number;
208
+ marginHorizontal?: SizesTypes$2 | number;
209
+ weight?: number;
210
+ };
211
+ declare const Divider: styled_components.StyledComponent<"div", styled_components.DefaultTheme, DividerProps, never>;
212
+
213
+ export { Avatar, AvatarProps, BaseButtonProps, Button, ButtonProps, CheckBoxProps, Checkbox, Divider, DividerProps, HorizontalPadding, HorizontalPaddingProps, Icon, IconNames, IconProps, Image, ImageProps, Input, InputIconProps, InputProps, LinkButton, LinkButtonProps, Select, Spacer, SpacerProps, Spinner, StyleWrapper, TextTypes, TextWrapper, TextWrapperProps, Tooltip, TooltipProps, TouchableOpacity, TouchableOpacityProps, ValidationTag, ValidationTagProps, ValidationTagStatus, VerticalPadding, toast };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zealicsolutions/web-ui",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/Zealic_Solutions/zeal-ui-web.git"
@@ -15,7 +15,11 @@
15
15
  "files": [
16
16
  "dist"
17
17
  ],
18
- "types": "dist/index.d.ts",
18
+ "types": "dist/**/index.d.ts",
19
+ "moduleNameMapper": {
20
+ "^@zealicsolutions/web-ui/(.*)$": "<rootDir>/dist/$1",
21
+ "^@zealicsolutions/web-ui$": "<rootDir>/dist/index.ts"
22
+ },
19
23
  "scripts": {
20
24
  "build": "npm run clean && rollup -c",
21
25
  "test": "jest",