@neuctra/ui 0.2.3 → 0.2.5
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/dist/components/basic/Alert.d.ts +0 -1
- package/dist/components/basic/Card.d.ts +1 -1
- package/dist/components/basic/{CheckRadioInput.d.ts → CheckboxGroup.d.ts} +4 -7
- package/dist/components/basic/DropDown.d.ts +24 -34
- package/dist/components/basic/Modal.d.ts +2 -9
- package/dist/components/basic/RadioGroup.d.ts +25 -0
- package/dist/components/basic/SwitchGroup.d.ts +25 -0
- package/dist/index.cjs.js +41 -52
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.es.js +1920 -1893
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/basic/Alert.js +45 -30
- package/dist/src/components/basic/Card.js +12 -10
- package/dist/src/components/basic/CheckboxGroup.js +40 -0
- package/dist/src/components/basic/DropDown.js +140 -294
- package/dist/src/components/basic/Modal.js +10 -12
- package/dist/src/components/basic/RadioGroup.js +37 -0
- package/dist/src/components/basic/SwitchGroup.js +50 -0
- package/dist/src/components/basic/Table.js +30 -11
- package/dist/src/index.js +4 -2
- package/dist/types/src/components/basic/Alert.d.ts +0 -1
- package/dist/types/src/components/basic/Card.d.ts +1 -1
- package/dist/types/src/components/basic/{CheckRadioInput.d.ts → CheckboxGroup.d.ts} +4 -7
- package/dist/types/src/components/basic/DropDown.d.ts +24 -34
- package/dist/types/src/components/basic/Modal.d.ts +2 -9
- package/dist/types/src/components/basic/RadioGroup.d.ts +25 -0
- package/dist/types/src/components/basic/SwitchGroup.d.ts +25 -0
- package/dist/types/src/index.d.ts +3 -1
- package/dist/ui.css +1 -1
- package/package.json +1 -1
- package/dist/components/avatar/AvatarGroup.d.ts +0 -9
- package/dist/components/avatar/AvatarWithStatus.d.ts +0 -10
- package/dist/src/components/avatar/AvatarGroup.js +0 -9
- package/dist/src/components/avatar/AvatarWithStatus.js +0 -18
- package/dist/src/components/basic/CheckRadioInput.js +0 -83
- package/dist/types/src/components/avatar/AvatarGroup.d.ts +0 -9
- package/dist/types/src/components/avatar/AvatarWithStatus.d.ts +0 -10
|
@@ -3,13 +3,11 @@ interface Option {
|
|
|
3
3
|
label: string;
|
|
4
4
|
value: string;
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
interface CheckRadioProps {
|
|
8
|
-
type?: CheckRadioType;
|
|
6
|
+
interface CheckboxGroupProps {
|
|
9
7
|
name?: string;
|
|
10
8
|
options: Option[];
|
|
11
|
-
selectedValues?: string[]
|
|
12
|
-
onChange?: (
|
|
9
|
+
selectedValues?: string[];
|
|
10
|
+
onChange?: (values: string[]) => void;
|
|
13
11
|
disabled?: boolean;
|
|
14
12
|
readOnly?: boolean;
|
|
15
13
|
required?: boolean;
|
|
@@ -21,9 +19,8 @@ interface CheckRadioProps {
|
|
|
21
19
|
iconSize?: number;
|
|
22
20
|
iconCheckedBgColor?: string;
|
|
23
21
|
iconUncheckedBorderColor?: string;
|
|
24
|
-
switchBgColor?: string;
|
|
25
22
|
textColor?: string;
|
|
26
23
|
errorStyle?: React.CSSProperties;
|
|
27
24
|
}
|
|
28
|
-
export declare const
|
|
25
|
+
export declare const CheckboxGroup: React.FC<CheckboxGroupProps>;
|
|
29
26
|
export {};
|
|
@@ -1,63 +1,53 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
interface Option {
|
|
2
|
+
export interface Option {
|
|
3
3
|
label: string;
|
|
4
4
|
value: string;
|
|
5
5
|
icon?: React.ReactNode;
|
|
6
6
|
disabled?: boolean;
|
|
7
|
+
description?: string;
|
|
7
8
|
}
|
|
8
|
-
interface DropdownProps {
|
|
9
|
+
export interface DropdownProps {
|
|
9
10
|
options: Option[];
|
|
10
11
|
value?: string;
|
|
12
|
+
values?: string[];
|
|
11
13
|
defaultValue?: string;
|
|
12
|
-
|
|
14
|
+
defaultValues?: string[];
|
|
15
|
+
onChange?: (value: string | string[]) => void;
|
|
13
16
|
placeholder?: string;
|
|
14
17
|
disabled?: boolean;
|
|
15
18
|
searchable?: boolean;
|
|
16
19
|
multiSelect?: boolean;
|
|
17
20
|
clearable?: boolean;
|
|
18
21
|
virtualized?: boolean;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
width?: string | number;
|
|
23
|
+
dropdownMaxHeight?: string;
|
|
24
|
+
borderRadius?: string;
|
|
25
|
+
boxShadow?: string;
|
|
23
26
|
borderColor?: string;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
accentColor?: string;
|
|
28
|
+
theme?: "light" | "dark" | "custom";
|
|
29
|
+
menuBg?: string;
|
|
30
|
+
controlBg?: string;
|
|
27
31
|
textColor?: string;
|
|
32
|
+
hoverBg?: string;
|
|
33
|
+
selectedBg?: string;
|
|
34
|
+
disabledBg?: string;
|
|
35
|
+
disabledTextColor?: string;
|
|
28
36
|
placeholderColor?: string;
|
|
29
|
-
hoverColor?: string;
|
|
30
|
-
selectedColor?: string;
|
|
31
|
-
disabledColor?: string;
|
|
32
|
-
padding?: string;
|
|
33
|
-
margin?: string;
|
|
34
|
-
borderRadius?: string;
|
|
35
|
-
boxShadow?: string;
|
|
36
|
-
optionPadding?: string;
|
|
37
|
-
optionGap?: string;
|
|
38
37
|
transitionDuration?: string;
|
|
39
|
-
dropdownMaxHeight?: string;
|
|
40
|
-
dropdownMinWidth?: string;
|
|
41
38
|
className?: string;
|
|
42
|
-
|
|
39
|
+
controlClassName?: string;
|
|
40
|
+
menuClassName?: string;
|
|
43
41
|
optionClassName?: string;
|
|
44
|
-
inputClassName?: string;
|
|
45
42
|
style?: React.CSSProperties;
|
|
46
|
-
|
|
43
|
+
controlStyle?: React.CSSProperties;
|
|
44
|
+
menuStyle?: React.CSSProperties;
|
|
47
45
|
optionStyle?: React.CSSProperties;
|
|
48
|
-
inputStyle?: React.CSSProperties;
|
|
49
46
|
iconPrefix?: React.ReactNode;
|
|
50
47
|
iconSuffix?: React.ReactNode;
|
|
51
48
|
clearIcon?: React.ReactNode;
|
|
52
49
|
dropdownIcon?: React.ReactNode;
|
|
53
50
|
checkIcon?: React.ReactNode;
|
|
54
|
-
ariaLabel?: string;
|
|
55
|
-
ariaLabelledby?: string;
|
|
56
|
-
ariaDescribedby?: string;
|
|
57
|
-
onFocus?: () => void;
|
|
58
|
-
onBlur?: () => void;
|
|
59
|
-
onOpen?: () => void;
|
|
60
|
-
onClose?: () => void;
|
|
61
51
|
}
|
|
62
|
-
export declare const Dropdown: React.
|
|
63
|
-
export
|
|
52
|
+
export declare const Dropdown: React.ForwardRefExoticComponent<DropdownProps & React.RefAttributes<HTMLDivElement>>;
|
|
53
|
+
export default Dropdown;
|
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
import { default as React, ReactNode, CSSProperties } from 'react';
|
|
2
2
|
export interface ModalProps {
|
|
3
|
-
/** Controls whether the modal is visible */
|
|
4
3
|
isOpen: boolean;
|
|
5
|
-
/** Callback fired when modal requests to close */
|
|
6
4
|
onClose: () => void;
|
|
7
|
-
/** Modal content */
|
|
8
5
|
children: ReactNode;
|
|
9
|
-
/** Optional ARIA label for accessibility */
|
|
10
6
|
ariaLabel?: string;
|
|
11
|
-
/** Optional title for screen readers */
|
|
12
7
|
title?: string;
|
|
13
|
-
/** Custom styles */
|
|
14
8
|
overlayStyle?: CSSProperties;
|
|
15
9
|
modalStyle?: CSSProperties;
|
|
16
10
|
closeButtonStyle?: CSSProperties;
|
|
17
|
-
/** Enable/disable overlay click to close */
|
|
18
11
|
disableOverlayClose?: boolean;
|
|
19
|
-
/** Animation duration (ms) */
|
|
20
12
|
transitionDuration?: number;
|
|
21
|
-
/** Optional classNames for CSS frameworks like Tailwind */
|
|
22
13
|
className?: string;
|
|
14
|
+
/** Dark mode toggle */
|
|
15
|
+
darkMode?: boolean;
|
|
23
16
|
}
|
|
24
17
|
export declare const Modal: React.FC<ModalProps>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface Option {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
interface RadioGroupProps {
|
|
7
|
+
name?: string;
|
|
8
|
+
options: Option[];
|
|
9
|
+
selectedValue?: string;
|
|
10
|
+
onChange?: (value: string) => void;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
error?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
style?: React.CSSProperties;
|
|
17
|
+
labelStyle?: React.CSSProperties;
|
|
18
|
+
iconSize?: number;
|
|
19
|
+
iconCheckedBgColor?: string;
|
|
20
|
+
iconUncheckedBorderColor?: string;
|
|
21
|
+
textColor?: string;
|
|
22
|
+
errorStyle?: React.CSSProperties;
|
|
23
|
+
}
|
|
24
|
+
export declare const RadioGroup: React.FC<RadioGroupProps>;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface Option {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
interface SwitchGroupProps {
|
|
7
|
+
name?: string;
|
|
8
|
+
options: Option[];
|
|
9
|
+
selectedValues?: string[];
|
|
10
|
+
onChange?: (values: string[]) => void;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
error?: string;
|
|
15
|
+
className?: string;
|
|
16
|
+
style?: React.CSSProperties;
|
|
17
|
+
labelStyle?: React.CSSProperties;
|
|
18
|
+
iconSize?: number;
|
|
19
|
+
iconCheckedBgColor?: string;
|
|
20
|
+
switchBgColor?: string;
|
|
21
|
+
textColor?: string;
|
|
22
|
+
errorStyle?: React.CSSProperties;
|
|
23
|
+
}
|
|
24
|
+
export declare const SwitchGroup: React.FC<SwitchGroupProps>;
|
|
25
|
+
export {};
|