@kwantis-id3/frontend-library 0.19.0 → 0.20.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/package.json +14 -11
- package/dist/esm/index.js +0 -217
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/types/components/Accordion/Accordion.d.ts +0 -22
- package/dist/esm/types/components/Accordion/AccordionStyled.d.ts +0 -24
- package/dist/esm/types/components/Accordion/index.d.ts +0 -1
- package/dist/esm/types/components/Button/Button.d.ts +0 -18
- package/dist/esm/types/components/Button/index.d.ts +0 -1
- package/dist/esm/types/components/Dropdown/Dropdown.d.ts +0 -19
- package/dist/esm/types/components/Dropdown/DropdownStyled.d.ts +0 -50
- package/dist/esm/types/components/Dropdown/index.d.ts +0 -1
- package/dist/esm/types/components/InputField/InputField.d.ts +0 -22
- package/dist/esm/types/components/InputField/StyledInputField.d.ts +0 -12
- package/dist/esm/types/components/InputField/index.d.ts +0 -1
- package/dist/esm/types/components/Modal/Modal.d.ts +0 -9
- package/dist/esm/types/components/Modal/StyledModal.d.ts +0 -9
- package/dist/esm/types/components/Modal/index.d.ts +0 -2
- package/dist/esm/types/components/SelectFilter/MultiSelect.d.ts +0 -24
- package/dist/esm/types/components/SelectFilter/SingleSelect.d.ts +0 -24
- package/dist/esm/types/components/SelectFilter/index.d.ts +0 -2
- package/dist/esm/types/components/Slider/Slider.d.ts +0 -20
- package/dist/esm/types/components/Slider/SliderStyled.d.ts +0 -25
- package/dist/esm/types/components/Slider/index.d.ts +0 -1
- package/dist/esm/types/components/ThemeContext/ThemeContext.d.ts +0 -78
- package/dist/esm/types/components/ThemeContext/index.d.ts +0 -1
- package/dist/esm/types/components/index.d.ts +0 -8
- package/dist/esm/types/index.d.ts +0 -2
- package/dist/esm/types/utils/index.d.ts +0 -4
- package/dist/esm/types/utils/isMobile.d.ts +0 -7
- package/dist/esm/types/utils/styled.d.ts +0 -40
- package/dist/esm/types/utils/transientOptions.d.ts +0 -2
- package/dist/index.d.ts +0 -230
package/dist/index.d.ts
DELETED
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import * as _emotion_react_types_jsx_namespace from '@emotion/react/types/jsx-namespace';
|
|
3
|
-
import * as React$1 from 'react';
|
|
4
|
-
import React__default from 'react';
|
|
5
|
-
import { Interpolation, CreateStyled as CreateStyled$1, CreateStyledComponent, FilteringStyledOptions, StyledOptions } from '@emotion/styled';
|
|
6
|
-
import { Theme, PropsOf } from '@emotion/react';
|
|
7
|
-
|
|
8
|
-
interface Color {
|
|
9
|
-
main: string;
|
|
10
|
-
contrastText: string;
|
|
11
|
-
}
|
|
12
|
-
interface ThemeColorsObject {
|
|
13
|
-
primary: Color;
|
|
14
|
-
secondary: Color;
|
|
15
|
-
tertiary: Color;
|
|
16
|
-
statusOk: Color;
|
|
17
|
-
statusWarning: Color;
|
|
18
|
-
statusCritical: Color;
|
|
19
|
-
statusNeutral: Color;
|
|
20
|
-
}
|
|
21
|
-
type ThemeContextProps = {
|
|
22
|
-
colors: ThemeColorsObject;
|
|
23
|
-
};
|
|
24
|
-
interface Nothing {
|
|
25
|
-
}
|
|
26
|
-
type Union<T, U> = T | (U & Nothing);
|
|
27
|
-
type ThemeColors = keyof ThemeColorsObject;
|
|
28
|
-
type ThemeColorsExtended = Union<ThemeColors, string>;
|
|
29
|
-
type ThemeProperties = {
|
|
30
|
-
colors: ThemeColorsObject;
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
* @param color one of the theme keys, a path to a specific color in the theme, OR a string representing a color (hex, rgb, hsl, etc)
|
|
34
|
-
* @returns a valid color object. If color is not valid, will return the primary color.
|
|
35
|
-
*/
|
|
36
|
-
getColor: (color: ThemeColorsExtended) => Color;
|
|
37
|
-
};
|
|
38
|
-
declare const ThemeContextProvider: (props: React__default.PropsWithChildren<{
|
|
39
|
-
theme?: ThemeContextProps;
|
|
40
|
-
}>) => JSX.Element;
|
|
41
|
-
declare const useThemeContext: () => ThemeProperties;
|
|
42
|
-
|
|
43
|
-
type ButtonVariants = "contained" | "outlined" | "text";
|
|
44
|
-
type ButtonProps = {
|
|
45
|
-
color?: ThemeColorsExtended;
|
|
46
|
-
type?: "button" | "submit" | "reset";
|
|
47
|
-
sx?: Interpolation<Theme>;
|
|
48
|
-
variant?: ButtonVariants;
|
|
49
|
-
onClick?: () => void;
|
|
50
|
-
className?: string;
|
|
51
|
-
htmlId?: string;
|
|
52
|
-
disabled?: boolean;
|
|
53
|
-
children?: React$1.ReactNode;
|
|
54
|
-
};
|
|
55
|
-
declare const Button: (props: ButtonProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
56
|
-
|
|
57
|
-
type AccordionProps = {
|
|
58
|
-
title: string;
|
|
59
|
-
children: React__default.ReactNode;
|
|
60
|
-
customTrigger?: React__default.ReactNode;
|
|
61
|
-
color?: ThemeColorsExtended;
|
|
62
|
-
iconColor?: ThemeColorsExtended;
|
|
63
|
-
dividerColor?: ThemeColorsExtended;
|
|
64
|
-
hideIcon?: boolean;
|
|
65
|
-
hideDivider?: boolean;
|
|
66
|
-
isOpen?: boolean;
|
|
67
|
-
isLazy?: boolean;
|
|
68
|
-
onClick?: () => void;
|
|
69
|
-
onOpen?: () => void;
|
|
70
|
-
onClose?: () => void;
|
|
71
|
-
sx?: Interpolation<Theme>;
|
|
72
|
-
};
|
|
73
|
-
declare const Accordion: (props: AccordionProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
74
|
-
|
|
75
|
-
type TInputType = "text" | "number" | "password" | "email" | "image" | "search" | "tel" | "url" | "date" | "datetime-local" | "month" | "week" | "time" | "color";
|
|
76
|
-
interface TextFieldProps {
|
|
77
|
-
value?: string | number;
|
|
78
|
-
name?: string;
|
|
79
|
-
onChange?: (value: string) => void;
|
|
80
|
-
placeholder?: string;
|
|
81
|
-
htmlId?: string;
|
|
82
|
-
containerClassName?: string;
|
|
83
|
-
className?: string;
|
|
84
|
-
isDisabled?: boolean;
|
|
85
|
-
color?: ThemeColorsExtended;
|
|
86
|
-
required?: boolean;
|
|
87
|
-
pattern?: string;
|
|
88
|
-
readonly?: boolean;
|
|
89
|
-
autoFocus?: boolean;
|
|
90
|
-
list?: string;
|
|
91
|
-
type?: TInputType;
|
|
92
|
-
}
|
|
93
|
-
declare const InputField: (props: TextFieldProps) => JSX.Element;
|
|
94
|
-
|
|
95
|
-
interface SingleSelectProps<Option = {
|
|
96
|
-
label: string;
|
|
97
|
-
value: string;
|
|
98
|
-
}> {
|
|
99
|
-
options: Option[];
|
|
100
|
-
onChange?: (option: Option | null) => void;
|
|
101
|
-
value?: Option | null;
|
|
102
|
-
name?: string;
|
|
103
|
-
placeholder?: string;
|
|
104
|
-
isDisabled?: boolean;
|
|
105
|
-
isClearable?: boolean;
|
|
106
|
-
isSearchable?: boolean;
|
|
107
|
-
isOptionDisabled?: (option: Option) => boolean;
|
|
108
|
-
isLoading?: boolean;
|
|
109
|
-
color?: ThemeColorsExtended;
|
|
110
|
-
containerId?: string;
|
|
111
|
-
htmlId?: string;
|
|
112
|
-
className?: string;
|
|
113
|
-
menuPosition?: "fixed" | "absolute";
|
|
114
|
-
required?: boolean;
|
|
115
|
-
}
|
|
116
|
-
declare const SingleSelect: <Option>(props: SingleSelectProps<Option>) => JSX.Element;
|
|
117
|
-
|
|
118
|
-
interface MultiSelectProps<Option = {
|
|
119
|
-
label: string;
|
|
120
|
-
value: string;
|
|
121
|
-
}> {
|
|
122
|
-
options: Option[];
|
|
123
|
-
onChange?: (option: Option[] | null) => void;
|
|
124
|
-
value?: readonly Option[] | null;
|
|
125
|
-
name?: string;
|
|
126
|
-
placeholder?: string;
|
|
127
|
-
isDisabled?: boolean;
|
|
128
|
-
isClearable?: boolean;
|
|
129
|
-
isSearchable?: boolean;
|
|
130
|
-
isOptionDisabled?: (option: Option) => boolean;
|
|
131
|
-
isLoading?: boolean;
|
|
132
|
-
color?: ThemeColorsExtended;
|
|
133
|
-
containerId?: string;
|
|
134
|
-
htmlId?: string;
|
|
135
|
-
className?: string;
|
|
136
|
-
menuPosition?: "fixed" | "absolute";
|
|
137
|
-
required?: boolean;
|
|
138
|
-
}
|
|
139
|
-
declare const MultiSelect: <Option>(props: MultiSelectProps<Option>) => JSX.Element;
|
|
140
|
-
|
|
141
|
-
type SliderProps = {
|
|
142
|
-
values: number[];
|
|
143
|
-
min?: number;
|
|
144
|
-
max?: number;
|
|
145
|
-
onChange: (values: number[]) => void;
|
|
146
|
-
onFinalChange?: (values: number[]) => void;
|
|
147
|
-
color?: ThemeColorsExtended;
|
|
148
|
-
unselectedColor?: ThemeColorsExtended;
|
|
149
|
-
thumbColor?: ThemeColorsExtended;
|
|
150
|
-
htmlId?: string;
|
|
151
|
-
className?: string;
|
|
152
|
-
showThumbValue?: boolean;
|
|
153
|
-
autoCalculateMinMax?: boolean;
|
|
154
|
-
step?: number;
|
|
155
|
-
disabled?: boolean;
|
|
156
|
-
allowOverlap?: boolean;
|
|
157
|
-
};
|
|
158
|
-
declare const Slider: (props: SliderProps) => JSX.Element;
|
|
159
|
-
|
|
160
|
-
type DropdownItem = {
|
|
161
|
-
value: string;
|
|
162
|
-
color?: ThemeColorsExtended;
|
|
163
|
-
textColor?: string;
|
|
164
|
-
children?: DropdownItem[];
|
|
165
|
-
onClick?: () => void;
|
|
166
|
-
};
|
|
167
|
-
type DropdownProps = {
|
|
168
|
-
content: DropdownItem[];
|
|
169
|
-
trigger: React__default.ReactNode;
|
|
170
|
-
color?: ThemeColorsExtended;
|
|
171
|
-
hoverColor?: ThemeColorsExtended;
|
|
172
|
-
direction?: "left" | "right";
|
|
173
|
-
mobileBreakpoint?: number;
|
|
174
|
-
};
|
|
175
|
-
declare const Dropdown: (props: DropdownProps) => JSX.Element;
|
|
176
|
-
|
|
177
|
-
interface ModalProps {
|
|
178
|
-
children: React__default.ReactNode;
|
|
179
|
-
isOpen: boolean;
|
|
180
|
-
setIsOpen: (isOpen: boolean) => void;
|
|
181
|
-
onClose?: () => void;
|
|
182
|
-
}
|
|
183
|
-
declare const Modal: React__default.FC<ModalProps>;
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* Hook to check if the screen is mobile. The default breakpoint is 768px.
|
|
187
|
-
* @param {number=} mobileBreakpoint breakpoint width to check against
|
|
188
|
-
* @returns boolean
|
|
189
|
-
*/
|
|
190
|
-
declare const useIsMobile: (mobileBreakpoint?: number) => boolean;
|
|
191
|
-
|
|
192
|
-
declare const transientOptions: Parameters<CreateStyled$1>[1];
|
|
193
|
-
|
|
194
|
-
type StyledTags = {
|
|
195
|
-
[Tag in keyof JSX.IntrinsicElements]: CreateStyledComponent<{
|
|
196
|
-
theme?: ThemeContextProps;
|
|
197
|
-
as?: React.ElementType;
|
|
198
|
-
}, JSX.IntrinsicElements[Tag]>;
|
|
199
|
-
};
|
|
200
|
-
interface BaseCreateStyled {
|
|
201
|
-
<C extends React.ComponentClass<React.ComponentProps<C>>, ForwardedProps extends keyof React.ComponentProps<C> & string = keyof React.ComponentProps<C> & string>(component: C, options: FilteringStyledOptions<React.ComponentProps<C>, ForwardedProps>): CreateStyledComponent<Pick<PropsOf<C>, ForwardedProps> & {
|
|
202
|
-
theme?: ThemeContextProps;
|
|
203
|
-
}, {}, {
|
|
204
|
-
ref?: React.Ref<InstanceType<C>>;
|
|
205
|
-
}>;
|
|
206
|
-
<C extends React.ComponentClass<React.ComponentProps<C>>>(component: C, options?: StyledOptions<React.ComponentProps<C>>): CreateStyledComponent<PropsOf<C> & {
|
|
207
|
-
theme?: ThemeContextProps;
|
|
208
|
-
}, {}, {
|
|
209
|
-
ref?: React.Ref<InstanceType<C>>;
|
|
210
|
-
}>;
|
|
211
|
-
<C extends React.ComponentType<React.ComponentProps<C>>, ForwardedProps extends keyof React.ComponentProps<C> & string = keyof React.ComponentProps<C> & string>(component: C, options: FilteringStyledOptions<React.ComponentProps<C>, ForwardedProps>): CreateStyledComponent<Pick<PropsOf<C>, ForwardedProps> & {
|
|
212
|
-
theme?: ThemeContextProps;
|
|
213
|
-
}>;
|
|
214
|
-
<C extends React.ComponentType<React.ComponentProps<C>>>(component: C, options?: StyledOptions<React.ComponentProps<C>>): CreateStyledComponent<PropsOf<C> & {
|
|
215
|
-
theme?: ThemeContextProps;
|
|
216
|
-
}>;
|
|
217
|
-
<Tag extends keyof JSX.IntrinsicElements, ForwardedProps extends keyof JSX.IntrinsicElements[Tag] & string = keyof JSX.IntrinsicElements[Tag] & string>(tag: Tag, options: FilteringStyledOptions<JSX.IntrinsicElements[Tag], ForwardedProps>): CreateStyledComponent<{
|
|
218
|
-
theme?: ThemeContextProps;
|
|
219
|
-
as?: React.ElementType;
|
|
220
|
-
}, Pick<JSX.IntrinsicElements[Tag], ForwardedProps>>;
|
|
221
|
-
<Tag extends keyof JSX.IntrinsicElements>(tag: Tag, options?: StyledOptions<JSX.IntrinsicElements[Tag]>): CreateStyledComponent<{
|
|
222
|
-
theme?: ThemeContextProps;
|
|
223
|
-
as?: React.ElementType;
|
|
224
|
-
}, JSX.IntrinsicElements[Tag]>;
|
|
225
|
-
}
|
|
226
|
-
interface CreateStyled extends BaseCreateStyled, StyledTags {
|
|
227
|
-
}
|
|
228
|
-
declare const styled: CreateStyled;
|
|
229
|
-
|
|
230
|
-
export { Accordion, AccordionProps, Button, ButtonProps, Dropdown, DropdownItem, DropdownProps, InputField, Modal, MultiSelect, MultiSelectProps, SingleSelect, SingleSelectProps, Slider, SliderProps, TInputType, ThemeColors, ThemeColorsObject, ThemeContextProps, ThemeContextProvider, styled, transientOptions, useIsMobile, useThemeContext };
|