@ssa-ui-kit/core 2.16.4 → 2.17.1
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/ColorPicker/ColorPicker.d.ts +18 -4
- package/dist/components/ColorPicker/components/BaseInput.d.ts +4 -0
- package/dist/components/ColorPicker/components/CopyButton.d.ts +3 -0
- package/dist/components/ColorPicker/components/HexInput.d.ts +6 -0
- package/dist/components/ColorPicker/components/HlsInput.d.ts +6 -0
- package/dist/components/ColorPicker/components/RgbInput.d.ts +6 -0
- package/dist/components/ColorPicker/components/index.d.ts +4 -0
- package/dist/components/ColorPicker/index.d.ts +1 -1
- package/dist/components/Typeahead/Typeahead.context.d.ts +12 -12
- package/dist/components/Typeahead/Typeahead.d.ts +1 -1
- package/dist/components/Typeahead/types.d.ts +5 -4
- package/dist/components/Typeahead/useTypeahead.d.ts +16 -15
- package/dist/components/index.d.ts +3 -3
- package/dist/index.js +8560 -8305
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
- package/dist/components/ColorPicker/styles.d.ts +0 -6
- package/dist/components/ColorPicker/types.d.ts +0 -9
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import '@rc-component/color-picker/assets/index.css';
|
|
2
|
+
declare const COLOR_FORMAT: {
|
|
3
|
+
readonly hex: "HEX";
|
|
4
|
+
readonly rgb: "RGB";
|
|
5
|
+
readonly hsl: "HSL";
|
|
6
|
+
};
|
|
7
|
+
type ColorFormat = keyof typeof COLOR_FORMAT;
|
|
8
|
+
export interface ColorPickerProps {
|
|
9
|
+
defaultColor?: string;
|
|
10
|
+
color?: string;
|
|
11
|
+
disabledAlpha?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
format?: ColorFormat;
|
|
14
|
+
defaultFormat?: ColorFormat;
|
|
15
|
+
onChange?: (color: string) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare const ColorPicker: ({ color: providedColor, defaultColor, disabledAlpha, disabled, format: providedFormat, defaultFormat, onChange, }: ColorPickerProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Color } from '@rc-component/color-picker';
|
|
2
|
+
export interface HexInputProps {
|
|
3
|
+
color?: Color | string;
|
|
4
|
+
onChange: (color: string) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const HexInput: ({ color, onChange }: HexInputProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Color } from '@rc-component/color-picker';
|
|
2
|
+
export interface HlsInputProps {
|
|
3
|
+
color?: Color | string;
|
|
4
|
+
onChange: (color: string) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const HlsInput: ({ color, onChange }: HlsInputProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Color } from '@rc-component/color-picker';
|
|
2
|
+
export interface RgbInputProps {
|
|
3
|
+
color?: Color | string;
|
|
4
|
+
onChange: (color: string) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const RgbInput: ({ color, onChange }: RgbInputProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './ColorPicker';
|
|
@@ -4,13 +4,13 @@ import { UseTypeaheadResult } from './useTypeahead';
|
|
|
4
4
|
export declare const TypeaheadContext: React.Context<{
|
|
5
5
|
isOpen: boolean;
|
|
6
6
|
isDisabled: boolean | undefined;
|
|
7
|
-
optionsWithKey: Record<string | number,
|
|
8
|
-
selectedItems: (
|
|
7
|
+
optionsWithKey: Record<string | number, import("./types").TypeaheadOptionProps>;
|
|
8
|
+
selectedItems: import("./types").TypeaheadValue[];
|
|
9
9
|
inputRef: React.RefObject<HTMLInputElement>;
|
|
10
10
|
firstSuggestion: string;
|
|
11
11
|
isMultiple: boolean | undefined;
|
|
12
12
|
typeaheadId: string;
|
|
13
|
-
triggerRef: React.
|
|
13
|
+
triggerRef: React.RefObject<HTMLDivElement>;
|
|
14
14
|
className: string | undefined;
|
|
15
15
|
startIcon: React.ReactNode;
|
|
16
16
|
endIcon: React.ReactNode;
|
|
@@ -21,18 +21,18 @@ export declare const TypeaheadContext: React.Context<{
|
|
|
21
21
|
inputValue: string;
|
|
22
22
|
validationSchema: Record<string, unknown> | undefined;
|
|
23
23
|
status: "error" | "success" | "basic";
|
|
24
|
+
error: import("react-hook-form").FieldError | import("react-hook-form").Merge<import("react-hook-form").FieldError, import("react-hook-form").FieldErrorsImpl<any>> | undefined;
|
|
24
25
|
placeholder: string | null | undefined;
|
|
25
|
-
options: React.ReactElement<
|
|
26
|
+
options: (React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null)[];
|
|
26
27
|
useFormResult: UseFormReturn<FieldValues, any, undefined>;
|
|
27
|
-
register: import("react-hook-form").UseFormRegister<FieldValues
|
|
28
|
-
setValue: import("react-hook-form").UseFormSetValue<FieldValues
|
|
29
|
-
|
|
30
|
-
handleClearAll: (
|
|
31
|
-
handleOpenChange: (open: boolean) => void;
|
|
32
|
-
handleInputChange: React.
|
|
28
|
+
register: import("react-hook-form").UseFormRegister<FieldValues>;
|
|
29
|
+
setValue: import("react-hook-form").UseFormSetValue<FieldValues>;
|
|
30
|
+
onChange: ((selectedItem: import("./types").TypeaheadValue, isSelected: boolean) => void) | undefined;
|
|
31
|
+
handleClearAll: (e: React.MouseEvent) => void;
|
|
32
|
+
handleOpenChange: (open: boolean, event: Event, reason?: import("@floating-ui/react").OpenChangeReason) => void;
|
|
33
|
+
handleInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
33
34
|
handleInputClick: React.MouseEventHandler<HTMLInputElement>;
|
|
34
35
|
handleInputKeyDown: React.KeyboardEventHandler<HTMLInputElement>;
|
|
35
|
-
|
|
36
|
-
handleRemoveSelectedClick: (selectedItem: number | string) => React.MouseEventHandler<HTMLButtonElement>;
|
|
36
|
+
handleRemoveSelectedClick: (value: string | number) => (e: React.MouseEvent) => void;
|
|
37
37
|
}>;
|
|
38
38
|
export declare const useTypeaheadContext: () => UseTypeaheadResult;
|
|
@@ -8,4 +8,4 @@ import { TypeaheadProps } from './types';
|
|
|
8
8
|
* Aria attributes are set according to
|
|
9
9
|
* https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/
|
|
10
10
|
**/
|
|
11
|
-
export declare const Typeahead: ({ name, label, selectedItems, isOpen, isDisabled, isMultiple, children, className, startIcon, endIcon, error, success, helperText, validationSchema, placeholder, startIconClassName, endIconClassName, optionsClassName, wrapperClassName, width,
|
|
11
|
+
export declare const Typeahead: ({ name, label, selectedItems, defaultSelectedItems, isOpen, isDisabled, isMultiple, children, className, startIcon, endIcon, error, success, helperText, validationSchema, placeholder, startIconClassName, endIconClassName, optionsClassName, wrapperClassName, width, onChange, onEmptyChange, onClearAll, onRemoveSelectedClick, renderOption, }: TypeaheadProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { CommonProps } from '../../types/emotion';
|
|
2
|
-
import { FieldError
|
|
2
|
+
import { FieldError } from 'react-hook-form';
|
|
3
3
|
export type TypeaheadValue = string | number;
|
|
4
4
|
export type TypeaheadOptionProps = Record<string, TypeaheadValue>;
|
|
5
5
|
export interface TypeaheadProps {
|
|
6
6
|
selectedItems?: Array<TypeaheadValue>;
|
|
7
|
+
defaultSelectedItems?: Array<TypeaheadValue>;
|
|
7
8
|
isMultiple?: boolean;
|
|
8
9
|
isDisabled?: boolean;
|
|
9
10
|
children?: React.ReactNode;
|
|
@@ -23,8 +24,8 @@ export interface TypeaheadProps {
|
|
|
23
24
|
success?: boolean;
|
|
24
25
|
validationSchema?: Record<string, unknown>;
|
|
25
26
|
placeholder?: string | null;
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
filterOptions?: boolean;
|
|
28
|
+
autoSelect?: boolean;
|
|
28
29
|
onChange?: (selectedItem: TypeaheadValue, isSelected: boolean) => void;
|
|
29
30
|
onClearAll?: () => void;
|
|
30
31
|
onRemoveSelectedClick?: (selectedItem: TypeaheadValue) => void;
|
|
@@ -35,7 +36,7 @@ export interface TypeaheadProps {
|
|
|
35
36
|
label: string;
|
|
36
37
|
}) => React.ReactNode;
|
|
37
38
|
}
|
|
38
|
-
export type UseTypeaheadProps = Pick<TypeaheadProps, 'selectedItems' | 'isDisabled' | 'children' | 'isMultiple' | 'onChange' | 'onClearAll' | 'onRemoveSelectedClick' | 'onEmptyChange' | 'renderOption' | 'isOpen' | 'className' | 'startIcon' | 'endIcon' | 'startIconClassName' | 'endIconClassName' | 'name' | '
|
|
39
|
+
export type UseTypeaheadProps = Pick<TypeaheadProps, 'selectedItems' | 'defaultSelectedItems' | 'isDisabled' | 'children' | 'isMultiple' | 'onChange' | 'onClearAll' | 'onRemoveSelectedClick' | 'onEmptyChange' | 'renderOption' | 'isOpen' | 'className' | 'startIcon' | 'endIcon' | 'startIconClassName' | 'endIconClassName' | 'name' | 'validationSchema' | 'error' | 'success' | 'placeholder' | 'filterOptions' | 'autoSelect'>;
|
|
39
40
|
export interface TypeaheadItemsListProps extends CommonProps {
|
|
40
41
|
children?: React.ReactNode;
|
|
41
42
|
noItemsMessage?: string;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { OpenChangeReason } from '@floating-ui/react';
|
|
3
|
+
import { TypeaheadOptionProps, TypeaheadValue, UseTypeaheadProps } from './types';
|
|
4
|
+
export declare const useTypeahead: ({ name, isOpen: isInitOpen, selectedItems: providedSelectedItems, defaultSelectedItems, isDisabled, isMultiple, children, className, startIcon, endIcon, startIconClassName, endIconClassName, validationSchema, error, success, placeholder, filterOptions, autoSelect, onChange, onClearAll, onRemoveSelectedClick, onEmptyChange, renderOption, }: UseTypeaheadProps) => {
|
|
4
5
|
isOpen: boolean;
|
|
5
6
|
isDisabled: boolean | undefined;
|
|
6
|
-
optionsWithKey: Record<string | number,
|
|
7
|
-
selectedItems:
|
|
7
|
+
optionsWithKey: Record<string | number, TypeaheadOptionProps>;
|
|
8
|
+
selectedItems: TypeaheadValue[];
|
|
8
9
|
inputRef: React.RefObject<HTMLInputElement>;
|
|
9
10
|
firstSuggestion: string;
|
|
10
11
|
isMultiple: boolean | undefined;
|
|
11
12
|
typeaheadId: string;
|
|
12
|
-
triggerRef: React.
|
|
13
|
+
triggerRef: React.RefObject<HTMLDivElement>;
|
|
13
14
|
className: string | undefined;
|
|
14
15
|
startIcon: React.ReactNode;
|
|
15
16
|
endIcon: React.ReactNode;
|
|
@@ -20,18 +21,18 @@ export declare const useTypeahead: ({ name, isOpen: isInitOpen, selectedItems, i
|
|
|
20
21
|
inputValue: string;
|
|
21
22
|
validationSchema: Record<string, unknown> | undefined;
|
|
22
23
|
status: "error" | "success" | "basic";
|
|
24
|
+
error: import("react-hook-form").FieldError | import("react-hook-form").Merge<import("react-hook-form").FieldError, import("react-hook-form").FieldErrorsImpl<any>> | undefined;
|
|
23
25
|
placeholder: string | null | undefined;
|
|
24
|
-
options: React.ReactElement<
|
|
26
|
+
options: (React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null)[];
|
|
25
27
|
useFormResult: import("react-hook-form").UseFormReturn<import("react-hook-form").FieldValues, any, undefined>;
|
|
26
|
-
register: import("react-hook-form").UseFormRegister<import("react-hook-form").FieldValues
|
|
27
|
-
setValue: import("react-hook-form").UseFormSetValue<import("react-hook-form").FieldValues
|
|
28
|
-
|
|
29
|
-
handleClearAll: (
|
|
30
|
-
handleOpenChange: (open: boolean) => void;
|
|
31
|
-
handleInputChange: React.
|
|
28
|
+
register: import("react-hook-form").UseFormRegister<import("react-hook-form").FieldValues>;
|
|
29
|
+
setValue: import("react-hook-form").UseFormSetValue<import("react-hook-form").FieldValues>;
|
|
30
|
+
onChange: ((selectedItem: TypeaheadValue, isSelected: boolean) => void) | undefined;
|
|
31
|
+
handleClearAll: (e: React.MouseEvent) => void;
|
|
32
|
+
handleOpenChange: (open: boolean, event: Event, reason?: OpenChangeReason) => void;
|
|
33
|
+
handleInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
32
34
|
handleInputClick: React.MouseEventHandler<HTMLInputElement>;
|
|
33
35
|
handleInputKeyDown: React.KeyboardEventHandler<HTMLInputElement>;
|
|
34
|
-
|
|
35
|
-
handleRemoveSelectedClick: (selectedItem: number | string) => MouseEventHandler<HTMLButtonElement>;
|
|
36
|
+
handleRemoveSelectedClick: (value: string | number) => (e: React.MouseEvent) => void;
|
|
36
37
|
};
|
|
37
38
|
export type UseTypeaheadResult = ReturnType<typeof useTypeahead>;
|
|
@@ -6,7 +6,6 @@ export { default as CardBase } from './Card/CardBase';
|
|
|
6
6
|
export { default as CardContent } from './CardContent';
|
|
7
7
|
export { default as CardHeader } from './CardHeader';
|
|
8
8
|
export { default as Checkbox } from './Checkbox';
|
|
9
|
-
export { default as ColorPicker } from './ColorPicker';
|
|
10
9
|
export { default as Dropdown } from './Dropdown';
|
|
11
10
|
export { default as DropdownArrow } from './DropdownArrow';
|
|
12
11
|
export { default as DropdownBase } from './DropdownBase';
|
|
@@ -68,8 +67,10 @@ export * from './AccordionGroup';
|
|
|
68
67
|
export * from './AddNewAccountCard';
|
|
69
68
|
export * from './ButtonGroup';
|
|
70
69
|
export * from './CardList';
|
|
70
|
+
export * from './Charts';
|
|
71
71
|
export * from './Checkbox';
|
|
72
72
|
export * from './CollapsibleNavBar';
|
|
73
|
+
export * from './ColorPicker';
|
|
73
74
|
export * from './DatePicker';
|
|
74
75
|
export * from './DateRangePicker';
|
|
75
76
|
export * from './Drawer';
|
|
@@ -87,8 +88,8 @@ export * from './NavBar';
|
|
|
87
88
|
export * from './NestedTable';
|
|
88
89
|
export * from './NotificationCard';
|
|
89
90
|
export * from './NotificationMenu';
|
|
91
|
+
export * from './NumberField';
|
|
90
92
|
export * from './Pagination';
|
|
91
|
-
export * from './Charts';
|
|
92
93
|
export * from './Popover';
|
|
93
94
|
export * from './ProgressInfo';
|
|
94
95
|
export * from './ResponsiveImage';
|
|
@@ -99,7 +100,6 @@ export * from './TableFilters';
|
|
|
99
100
|
export * from './Tag';
|
|
100
101
|
export * from './Textarea';
|
|
101
102
|
export * from './TextField';
|
|
102
|
-
export * from './NumberField';
|
|
103
103
|
export * from './Tooltip';
|
|
104
104
|
export * from './Typeahead';
|
|
105
105
|
export * from './Typography';
|