@kwantis-id3/frontend-library 0.21.0 → 0.22.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/changelog.md +9 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Dropdown/Dropdown.d.ts +9 -0
- package/dist/esm/types/components/ThemeContext/ThemeContext.d.ts +1 -1
- package/dist/esm/types/components/ThemeContext/index.d.ts +1 -1
- package/dist/esm/types/components/index.d.ts +1 -1
- package/dist/index.d.ts +10 -1
- package/package.json +4 -2
|
@@ -9,10 +9,19 @@ import { ThemeColorsExtended } from "../ThemeContext/ThemeContext";
|
|
|
9
9
|
* @property {() => void} onClick - The onClick handler of the dropdown item
|
|
10
10
|
*/
|
|
11
11
|
export type DropdownItem = {
|
|
12
|
+
/** The value displayed in the item */
|
|
12
13
|
value: string;
|
|
14
|
+
/** The color of the item */
|
|
13
15
|
color?: ThemeColorsExtended;
|
|
16
|
+
/** The text color of the item */
|
|
14
17
|
textColor?: string;
|
|
18
|
+
/** The children of the item */
|
|
15
19
|
children?: DropdownItem[];
|
|
20
|
+
/** Wether the item is hidden or not */
|
|
21
|
+
isHidden?: boolean;
|
|
22
|
+
/** Wether the dropdown should close when the item is clicked */
|
|
23
|
+
closeOnClick?: boolean;
|
|
24
|
+
/** The onClick handler of the item */
|
|
16
25
|
onClick?: () => void;
|
|
17
26
|
};
|
|
18
27
|
export type DropdownProps = {
|
|
@@ -20,7 +20,7 @@ interface Nothing {
|
|
|
20
20
|
type Union<T, U> = T | (U & Nothing);
|
|
21
21
|
export type ThemeColors = keyof ThemeColorsObject;
|
|
22
22
|
export type ThemeColorsExtended = Union<ThemeColors, string>;
|
|
23
|
-
type ThemeProperties = ThemeContextProps & {
|
|
23
|
+
export type ThemeProperties = ThemeContextProps & {
|
|
24
24
|
getColor: (color: ThemeColorsExtended) => Color;
|
|
25
25
|
};
|
|
26
26
|
export declare const defaultThemeColors: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ThemeColors, ThemeColorsObject, ThemeContextProps, ThemeContextProvider, useThemeContext, } from "./ThemeContext";
|
|
1
|
+
export { ThemeColors, ThemeColorsObject, ThemeContextProps, ThemeProperties, ThemeContextProvider, useThemeContext, } from "./ThemeContext";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Button, ButtonProps } from "./Button";
|
|
2
|
-
export { ThemeColors, ThemeColorsObject, ThemeContextProps, ThemeContextProvider, useThemeContext, } from "./ThemeContext";
|
|
2
|
+
export { ThemeColors, ThemeColorsObject, ThemeContextProps, ThemeProperties, ThemeContextProvider, useThemeContext, } from "./ThemeContext";
|
|
3
3
|
export { Accordion, AccordionProps } from "./Accordion";
|
|
4
4
|
export { InputField, TInputType } from "./InputField";
|
|
5
5
|
export { SingleSelect, SingleSelectProps, MultiSelect, MultiSelectProps, } from "./SelectFilter";
|
package/dist/index.d.ts
CHANGED
|
@@ -250,10 +250,19 @@ declare const Slider: (props: SliderProps) => JSX.Element;
|
|
|
250
250
|
* @property {() => void} onClick - The onClick handler of the dropdown item
|
|
251
251
|
*/
|
|
252
252
|
type DropdownItem = {
|
|
253
|
+
/** The value displayed in the item */
|
|
253
254
|
value: string;
|
|
255
|
+
/** The color of the item */
|
|
254
256
|
color?: ThemeColorsExtended;
|
|
257
|
+
/** The text color of the item */
|
|
255
258
|
textColor?: string;
|
|
259
|
+
/** The children of the item */
|
|
256
260
|
children?: DropdownItem[];
|
|
261
|
+
/** Wether the item is hidden or not */
|
|
262
|
+
isHidden?: boolean;
|
|
263
|
+
/** Wether the dropdown should close when the item is clicked */
|
|
264
|
+
closeOnClick?: boolean;
|
|
265
|
+
/** The onClick handler of the item */
|
|
257
266
|
onClick?: () => void;
|
|
258
267
|
};
|
|
259
268
|
type DropdownProps = {
|
|
@@ -329,4 +338,4 @@ interface CreateStyled extends BaseCreateStyled, StyledTags {
|
|
|
329
338
|
}
|
|
330
339
|
declare const styled: CreateStyled;
|
|
331
340
|
|
|
332
|
-
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 };
|
|
341
|
+
export { Accordion, AccordionProps, Button, ButtonProps, Dropdown, DropdownItem, DropdownProps, InputField, Modal, MultiSelect, MultiSelectProps, SingleSelect, SingleSelectProps, Slider, SliderProps, TInputType, ThemeColors, ThemeColorsObject, ThemeContextProps, ThemeContextProvider, ThemeProperties, styled, transientOptions, useIsMobile, useThemeContext };
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kwantis-id3/frontend-library",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "Kwantis frontend components collection",
|
|
5
5
|
"scriptsComments": {
|
|
6
6
|
"storybook": "Starts storybook in development mode",
|
|
7
|
+
"build-storybook": "Builds storybook",
|
|
7
8
|
"rollup": "Bundles the library",
|
|
8
9
|
"test": "Runs tests",
|
|
9
10
|
"test:watch": "Runs tests in watch mode",
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
},
|
|
22
23
|
"scripts": {
|
|
23
24
|
"storybook": "storybook dev -p 6006",
|
|
25
|
+
"build-storybook": "storybook build",
|
|
24
26
|
"rollup": "rollup -c",
|
|
25
27
|
"test": "vitest run",
|
|
26
28
|
"test:watch": "vitest",
|
|
@@ -61,7 +63,7 @@
|
|
|
61
63
|
"@typescript-eslint/eslint-plugin": "^5.58.0",
|
|
62
64
|
"@typescript-eslint/parser": "^5.58.0",
|
|
63
65
|
"@vitest/coverage-v8": "^1.1.0",
|
|
64
|
-
"chromatic": "^
|
|
66
|
+
"chromatic": "^11.0.4",
|
|
65
67
|
"eslint": "^8.38.0",
|
|
66
68
|
"eslint-config-prettier": "^8.8.0",
|
|
67
69
|
"eslint-plugin-react": "^7.32.2",
|