@namuna-nur/ui-kit 1.9.21 → 1.10.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/lib/index.js +119 -117
- package/lib/molecules/index.js +2169 -1934
- package/lib/src/atoms/Select/Select.types.d.ts +1 -1
- package/lib/src/molecules/CardRingChart/CardRingChart.types.d.ts +1 -1
- package/lib/src/molecules/Combobox/Combobox.d.ts +2 -0
- package/lib/src/molecules/Combobox/Combobox.data.d.ts +2 -0
- package/lib/src/molecules/Combobox/Combobox.stories.d.ts +12 -0
- package/lib/src/molecules/Combobox/Combobox.test.d.ts +1 -0
- package/lib/src/molecules/Combobox/Combobox.tokens.d.ts +38 -0
- package/lib/src/molecules/Combobox/Combobox.types.d.ts +32 -0
- package/lib/src/molecules/Combobox/index.d.ts +3 -0
- package/lib/src/molecules/FileUploader/FileUploader.d.ts +1 -1
- package/lib/src/molecules/FileUploader/FileUploader.stories.d.ts +19 -0
- package/lib/src/molecules/FileUploader/FileUploader.types.d.ts +2 -1
- package/lib/src/molecules/MultiSelect/MultiSelect.tokens.d.ts +1 -1
- package/lib/src/molecules/MultiSelect/MultiSelect.types.d.ts +3 -3
- package/lib/src/molecules/NavButton/NavButton.d.ts +1 -1
- package/lib/src/molecules/NavButton/NavButton.types.d.ts +0 -1
- package/lib/src/molecules/Sidebar/Sidebar.types.d.ts +1 -1
- package/lib/src/molecules/index.d.ts +1 -0
- package/lib/src/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SelectStatusType } from '../../types';
|
|
1
2
|
export type SelectClassNames = {
|
|
2
3
|
trigger?: string;
|
|
3
4
|
content?: string;
|
|
@@ -9,7 +10,6 @@ export type SelectOption = {
|
|
|
9
10
|
label: string;
|
|
10
11
|
value: string;
|
|
11
12
|
};
|
|
12
|
-
export type SelectStatusType = 'success' | 'danger' | 'info';
|
|
13
13
|
export type SelectProps = {
|
|
14
14
|
options: SelectOption[];
|
|
15
15
|
onChange: (value: string) => void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { ComboboxStory, Combobox } from '..';
|
|
3
|
+
declare const meta: Meta<typeof Combobox>;
|
|
4
|
+
export declare const Default: ComboboxStory;
|
|
5
|
+
export declare const Selected: ComboboxStory;
|
|
6
|
+
export declare const Empty: ComboboxStory;
|
|
7
|
+
export declare const Loading: ComboboxStory;
|
|
8
|
+
export declare const Disabled: ComboboxStory;
|
|
9
|
+
export declare const Danger: ComboboxStory;
|
|
10
|
+
export declare const Success: ComboboxStory;
|
|
11
|
+
export declare const Info: ComboboxStory;
|
|
12
|
+
export default meta;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare const comboboxTokens: {
|
|
2
|
+
base: {
|
|
3
|
+
trigger: string;
|
|
4
|
+
focus: string;
|
|
5
|
+
hover: string;
|
|
6
|
+
placeholder: string;
|
|
7
|
+
selected: string;
|
|
8
|
+
textWrapper: string;
|
|
9
|
+
icon: string;
|
|
10
|
+
iconDisabled: string;
|
|
11
|
+
};
|
|
12
|
+
search: {
|
|
13
|
+
wrapper: string;
|
|
14
|
+
icon: string;
|
|
15
|
+
input: string;
|
|
16
|
+
divider: string;
|
|
17
|
+
};
|
|
18
|
+
options: {
|
|
19
|
+
list: string;
|
|
20
|
+
items: string;
|
|
21
|
+
itemsText: string;
|
|
22
|
+
active: string;
|
|
23
|
+
highlighted: string;
|
|
24
|
+
loadingWrapper: string;
|
|
25
|
+
};
|
|
26
|
+
status: {
|
|
27
|
+
styles: {
|
|
28
|
+
danger: string;
|
|
29
|
+
info: string;
|
|
30
|
+
success: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
disabled: {
|
|
34
|
+
trigger: string;
|
|
35
|
+
triggerText: string;
|
|
36
|
+
selectedDisabled: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Combobox } from './Combobox';
|
|
3
|
+
import { SelectOption } from '../../atoms';
|
|
4
|
+
import { SelectStatusType } from '../../types';
|
|
5
|
+
export type ComboboxProps = {
|
|
6
|
+
options: SelectOption[];
|
|
7
|
+
value: string;
|
|
8
|
+
onChange: (value: string) => void;
|
|
9
|
+
searchValue: string;
|
|
10
|
+
onSearchChange: (query: string) => void;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
searchPlaceholder?: string;
|
|
13
|
+
emptyMessage?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
status?: SelectStatusType;
|
|
16
|
+
isLoading?: boolean;
|
|
17
|
+
container?: HTMLElement | null;
|
|
18
|
+
classNames?: {
|
|
19
|
+
parent?: string;
|
|
20
|
+
trigger?: string;
|
|
21
|
+
selected?: string;
|
|
22
|
+
placeholder?: string;
|
|
23
|
+
content?: string;
|
|
24
|
+
searchInput?: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export type ComboboxRef = {
|
|
28
|
+
focus: () => void;
|
|
29
|
+
open: () => void;
|
|
30
|
+
close: () => void;
|
|
31
|
+
};
|
|
32
|
+
export type ComboboxStory = StoryObj<typeof Combobox>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FileUploaderProps } from '..';
|
|
2
|
-
export declare const FileUploader: ({ title, description, files, onFilesUpload, onDelete, classNames, }: FileUploaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const FileUploader: ({ title, description, files, mode, onFilesUpload, onDelete, classNames, }: FileUploaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -36,6 +36,25 @@ export declare const WithPhoto: {
|
|
|
36
36
|
initialFiles: FileType[];
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
|
+
export declare const WhithoutUpload: {
|
|
40
|
+
render: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('storybook/internal/csf').BaseAnnotations<import('@storybook/react').ReactRenderer, import('..').FileUploaderProps> & {
|
|
41
|
+
name?: import('storybook/internal/csf').StoryName;
|
|
42
|
+
storyName?: import('storybook/internal/csf').StoryName;
|
|
43
|
+
play?: import('storybook/internal/csf').PlayFunction<import('@storybook/react').ReactRenderer, import('..').FileUploaderProps> | undefined;
|
|
44
|
+
globals?: import('storybook/internal/csf').Globals | undefined;
|
|
45
|
+
story?: Omit<import('storybook/internal/csf').StoryAnnotations<import('@storybook/react').ReactRenderer, import('..').FileUploaderProps, Partial<import('..').FileUploaderProps>>, "story"> | undefined;
|
|
46
|
+
} & {
|
|
47
|
+
args?: Partial<import('..').FileUploaderProps> | undefined;
|
|
48
|
+
} & {
|
|
49
|
+
initialFiles?: FileType[];
|
|
50
|
+
}>;
|
|
51
|
+
args: {
|
|
52
|
+
title: string;
|
|
53
|
+
description: string;
|
|
54
|
+
initialFiles: FileType[];
|
|
55
|
+
mode: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
39
58
|
export declare const WithFile: {
|
|
40
59
|
render: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, import('storybook/internal/csf').BaseAnnotations<import('@storybook/react').ReactRenderer, import('..').FileUploaderProps> & {
|
|
41
60
|
name?: import('storybook/internal/csf').StoryName;
|
|
@@ -6,8 +6,9 @@ export type FileUploaderProps = {
|
|
|
6
6
|
title?: string;
|
|
7
7
|
description?: string;
|
|
8
8
|
files?: FileType[];
|
|
9
|
+
mode?: 'upload' | 'view';
|
|
9
10
|
onDelete?: (id?: string) => void;
|
|
10
|
-
onFilesUpload
|
|
11
|
+
onFilesUpload?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
11
12
|
classNames?: {
|
|
12
13
|
wrapper?: string;
|
|
13
14
|
container?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { MultiSelectTokens } from '
|
|
1
|
+
import { MultiSelectTokens } from '..';
|
|
2
2
|
export declare const multiSelectTokens: MultiSelectTokens;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react';
|
|
2
2
|
import { Dispatch, SetStateAction } from 'react';
|
|
3
|
-
import { MultiSelect } from '
|
|
3
|
+
import { MultiSelect } from '..';
|
|
4
|
+
import { SelectStatusType } from '../../types';
|
|
4
5
|
export type MultiSelectStory = StoryObj<typeof MultiSelect>;
|
|
5
6
|
export type MultiSelectRef = {
|
|
6
7
|
open: () => void;
|
|
@@ -43,13 +44,12 @@ export type MultiSelectTokens = {
|
|
|
43
44
|
danger: string;
|
|
44
45
|
};
|
|
45
46
|
};
|
|
46
|
-
export type MultiSelectStatusType = 'success' | 'danger' | 'info';
|
|
47
47
|
export type MultiSelectProps = {
|
|
48
48
|
label?: string;
|
|
49
49
|
disabled?: boolean;
|
|
50
50
|
placeholder?: string;
|
|
51
51
|
isSearchable?: boolean;
|
|
52
|
-
status:
|
|
52
|
+
status: SelectStatusType;
|
|
53
53
|
options: MultiSelectOption[];
|
|
54
54
|
selectedItems: MultiSelectOption[];
|
|
55
55
|
setSelectedItems: Dispatch<SetStateAction<MultiSelectOption[]>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { NavButtonProps } from '..';
|
|
2
|
-
export declare const NavButton: ({ badge, isExpanded,
|
|
2
|
+
export declare const NavButton: ({ badge, isExpanded, disabled, item: { icon: Icon, label, to }, classNames, }: NavButtonProps) => import("react/jsx-runtime").JSX.Element;
|
package/lib/src/types/index.d.ts
CHANGED