isp-ui-kit 2.1.1 → 2.2.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.
Files changed (38) hide show
  1. package/dist/PcsKit/assets/icons/index.d.ts +9 -0
  2. package/dist/PcsKit/components/PcsFilter/PcsFilter.d.ts +20 -0
  3. package/dist/PcsKit/components/PcsFilter/PcsFilterFieldControl.d.ts +8 -0
  4. package/dist/PcsKit/components/PcsFilter/PcsSelectedFilterTags.d.ts +10 -0
  5. package/dist/PcsKit/components/PcsFilter/pcsFilterField.type.d.ts +28 -0
  6. package/dist/PcsKit/components/PcsFilter/pcsFilterTagUtils.d.ts +11 -0
  7. package/dist/PcsKit/components/PcsTagInput/PcsTagInput.d.ts +18 -0
  8. package/dist/PcsKit/index.d.ts +52 -0
  9. package/dist/PcsKit/module-components/PcsTableView/PcsTableView.d.ts +40 -0
  10. package/dist/PcsKit/types/pcsField.types.d.ts +1 -0
  11. package/dist/PcsKit/ui/PcsBottomMenu/PcsBottomMenu.d.ts +5 -0
  12. package/dist/PcsKit/ui/PcsBottomMenu/pcsBottomMenu.types.d.ts +20 -0
  13. package/dist/PcsKit/ui/PcsButton/PcsButton.d.ts +12 -0
  14. package/dist/PcsKit/ui/PcsCheckbox/PcsCheckbox.d.ts +13 -0
  15. package/dist/PcsKit/ui/PcsCheckboxGroup/PcsCheckboxGroup.d.ts +14 -0
  16. package/dist/PcsKit/ui/PcsDateField/PcsDateField.d.ts +12 -0
  17. package/dist/PcsKit/ui/PcsDateRangeField/PcsDateRangeField.d.ts +15 -0
  18. package/dist/PcsKit/ui/PcsExport/PcsExport.d.ts +10 -0
  19. package/dist/PcsKit/ui/PcsIconButton/PcsIconButton.d.ts +11 -0
  20. package/dist/PcsKit/ui/PcsModal/PcsModal.d.ts +18 -0
  21. package/dist/PcsKit/ui/PcsNumberRangeField/PcsNumberRangeField.d.ts +10 -0
  22. package/dist/PcsKit/ui/PcsRadioButton/PcsRadioButton.d.ts +17 -0
  23. package/dist/PcsKit/ui/PcsRadioGroup/PcsRadioGroup.d.ts +17 -0
  24. package/dist/PcsKit/ui/PcsSearch/PcsSearch.d.ts +14 -0
  25. package/dist/PcsKit/ui/PcsSelectField/PcsSelectField.d.ts +4 -0
  26. package/dist/PcsKit/ui/PcsSelectField/pcsSelectField.types.d.ts +40 -0
  27. package/dist/PcsKit/ui/PcsSelectMultipleField/PcsSelectMultipleField.d.ts +17 -0
  28. package/dist/PcsKit/ui/PcsTable/PcsTable.d.ts +42 -0
  29. package/dist/PcsKit/ui/PcsTagList/PcsTagList.d.ts +15 -0
  30. package/dist/PcsKit/ui/PcsTextAreaField/PcsTextAreaField.d.ts +10 -0
  31. package/dist/PcsKit/ui/PcsTextField/PcsTextField.d.ts +14 -0
  32. package/dist/PcsKit/ui/PcsToggle/PcsToggle.d.ts +10 -0
  33. package/dist/index.cjs.js +1 -1
  34. package/dist/index.cjs.js.map +1 -1
  35. package/dist/index.d.ts +1 -0
  36. package/dist/index.esm.js +1 -1
  37. package/dist/index.esm.js.map +1 -1
  38. package/package.json +2 -1
@@ -0,0 +1,9 @@
1
+ import type { SVGProps } from 'react';
2
+ type PcsIconProps = SVGProps<SVGSVGElement>;
3
+ export declare const PcsCalendarIcon: (props: PcsIconProps) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const PcsCloseMessageIcon: (props: PcsIconProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const PcsExportTableIcon: (props: PcsIconProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const PcsSearchIcon: (props: PcsIconProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const PcsSortIcon: (props: PcsIconProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const PcsTuningIcon: (props: PcsIconProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,20 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { PcsFilterField } from './pcsFilterField.type';
3
+ import './PcsFilter.scss';
4
+ export interface PcsFilterLabels {
5
+ apply: ReactNode;
6
+ cancel: ReactNode;
7
+ reset: ReactNode;
8
+ triggerAriaLabel: string;
9
+ }
10
+ export interface PcsFilterProps {
11
+ fields: PcsFilterField[];
12
+ values?: Record<string, unknown>;
13
+ onApply: (values: Record<string, unknown>) => void;
14
+ onReset: () => void;
15
+ inline?: boolean;
16
+ labels?: Partial<PcsFilterLabels>;
17
+ trigger?: ReactNode;
18
+ }
19
+ declare const PcsFilter: ({ fields, values, onApply, onReset, inline, labels, trigger, }: PcsFilterProps) => import("react/jsx-runtime").JSX.Element;
20
+ export default PcsFilter;
@@ -0,0 +1,8 @@
1
+ import { PcsFilterField } from './pcsFilterField.type';
2
+ interface PcsFilterFieldControlProps {
3
+ field: PcsFilterField;
4
+ value?: unknown;
5
+ onChange?: (...args: unknown[]) => void;
6
+ }
7
+ declare const PcsFilterFieldControl: ({ field, value, onChange, }: PcsFilterFieldControlProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default PcsFilterFieldControl;
@@ -0,0 +1,10 @@
1
+ import type { PcsFilterField } from './pcsFilterField.type';
2
+ export interface PcsSelectedFilterTagsProps {
3
+ fields: PcsFilterField[];
4
+ values?: Record<string, unknown>;
5
+ className?: string;
6
+ tagClassName?: string;
7
+ onChange: (values: Record<string, unknown>) => void;
8
+ }
9
+ declare const PcsSelectedFilterTags: ({ fields, values, className, tagClassName, onChange, }: PcsSelectedFilterTagsProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default PcsSelectedFilterTags;
@@ -0,0 +1,28 @@
1
+ export declare enum PcsFilterFieldType {
2
+ Select = "select",
3
+ MultiSelect = "multi-select",
4
+ Input = "input",
5
+ DateRange = "date-range",
6
+ NumberRange = "number-range",
7
+ Checkbox = "checkbox"
8
+ }
9
+ export type PcsFilterSelectedLabelValue = string | {
10
+ from?: unknown;
11
+ to?: unknown;
12
+ value?: unknown;
13
+ rangeIndex?: 0 | 1;
14
+ };
15
+ export interface PcsFilterField {
16
+ name: string;
17
+ label: string;
18
+ type: PcsFilterFieldType;
19
+ placeholder?: string;
20
+ options?: {
21
+ value: string;
22
+ label: string;
23
+ }[];
24
+ controlType?: 'checkbox' | 'radio';
25
+ format?: string;
26
+ showTime?: boolean;
27
+ selectedLabel?: string | ((value: PcsFilterSelectedLabelValue) => string | undefined);
28
+ }
@@ -0,0 +1,11 @@
1
+ import type { PcsTagListItem } from '../../ui/PcsTagList/PcsTagList';
2
+ import type { PcsFilterField } from './pcsFilterField.type';
3
+ export interface PcsSelectedFilterTag extends PcsTagListItem {
4
+ fieldName: string;
5
+ value?: unknown;
6
+ rangeIndex?: 0 | 1;
7
+ }
8
+ export declare const buildPcsSelectedFilterTags: (fields: PcsFilterField[], values?: Record<string, unknown>) => PcsSelectedFilterTag[];
9
+ export declare const removeSelectedFilterValue: (values: Record<string, unknown> | undefined, tag: Pick<PcsSelectedFilterTag, "fieldName" | "value" | "rangeIndex">) => {
10
+ [x: string]: unknown;
11
+ };
@@ -0,0 +1,18 @@
1
+ import type { PcsFieldSize } from '../../types/pcsField.types';
2
+ import './PcsTagInput.scss';
3
+ export interface PcsTagInputProps {
4
+ list: Record<string, string>;
5
+ selected?: string[];
6
+ placeholder?: string;
7
+ maxLength?: number;
8
+ size?: PcsFieldSize;
9
+ readOnly?: boolean;
10
+ disabled?: boolean;
11
+ appended?: boolean;
12
+ pattern?: RegExp;
13
+ limit?: number;
14
+ noHashtag?: boolean;
15
+ onChange?: (selected: string[], newItem?: Record<string, string>) => void;
16
+ }
17
+ declare const PcsTagInput: ({ list, selected, placeholder, maxLength, size, readOnly, disabled, appended, pattern, limit, noHashtag, onChange, }: PcsTagInputProps) => import("react/jsx-runtime").JSX.Element;
18
+ export default PcsTagInput;
@@ -0,0 +1,52 @@
1
+ export * from './assets/icons';
2
+ export { default as PcsFilter } from './components/PcsFilter/PcsFilter';
3
+ export * from './components/PcsFilter/PcsFilter';
4
+ export { default as PcsSelectedFilterTags } from './components/PcsFilter/PcsSelectedFilterTags';
5
+ export * from './components/PcsFilter/PcsSelectedFilterTags';
6
+ export * from './components/PcsFilter/pcsFilterField.type';
7
+ export * from './components/PcsFilter/pcsFilterTagUtils';
8
+ export { default as PcsTagInput } from './components/PcsTagInput/PcsTagInput';
9
+ export * from './components/PcsTagInput/PcsTagInput';
10
+ export { default as PcsTableView } from './module-components/PcsTableView/PcsTableView';
11
+ export * from './module-components/PcsTableView/PcsTableView';
12
+ export * from './types/pcsField.types';
13
+ export { default as PcsBottomMenu } from './ui/PcsBottomMenu/PcsBottomMenu';
14
+ export * from './ui/PcsBottomMenu/PcsBottomMenu';
15
+ export { default as PcsButton } from './ui/PcsButton/PcsButton';
16
+ export * from './ui/PcsButton/PcsButton';
17
+ export { default as PcsCheckbox } from './ui/PcsCheckbox/PcsCheckbox';
18
+ export * from './ui/PcsCheckbox/PcsCheckbox';
19
+ export { default as PcsCheckboxGroup } from './ui/PcsCheckboxGroup/PcsCheckboxGroup';
20
+ export * from './ui/PcsCheckboxGroup/PcsCheckboxGroup';
21
+ export { default as PcsDateField } from './ui/PcsDateField/PcsDateField';
22
+ export * from './ui/PcsDateField/PcsDateField';
23
+ export { default as PcsDateRangeField } from './ui/PcsDateRangeField/PcsDateRangeField';
24
+ export * from './ui/PcsDateRangeField/PcsDateRangeField';
25
+ export { default as PcsExport } from './ui/PcsExport/PcsExport';
26
+ export * from './ui/PcsExport/PcsExport';
27
+ export { default as PcsIconButton } from './ui/PcsIconButton/PcsIconButton';
28
+ export * from './ui/PcsIconButton/PcsIconButton';
29
+ export { default as PcsModal } from './ui/PcsModal/PcsModal';
30
+ export * from './ui/PcsModal/PcsModal';
31
+ export { default as PcsNumberRangeField } from './ui/PcsNumberRangeField/PcsNumberRangeField';
32
+ export * from './ui/PcsNumberRangeField/PcsNumberRangeField';
33
+ export { default as PcsRadioButton } from './ui/PcsRadioButton/PcsRadioButton';
34
+ export * from './ui/PcsRadioButton/PcsRadioButton';
35
+ export { default as PcsRadioGroup } from './ui/PcsRadioGroup/PcsRadioGroup';
36
+ export * from './ui/PcsRadioGroup/PcsRadioGroup';
37
+ export { default as PcsSearch } from './ui/PcsSearch/PcsSearch';
38
+ export * from './ui/PcsSearch/PcsSearch';
39
+ export { default as PcsSelectField } from './ui/PcsSelectField/PcsSelectField';
40
+ export * from './ui/PcsSelectField/pcsSelectField.types';
41
+ export { default as PcsSelectMultipleField } from './ui/PcsSelectMultipleField/PcsSelectMultipleField';
42
+ export * from './ui/PcsSelectMultipleField/PcsSelectMultipleField';
43
+ export { default as PcsTable } from './ui/PcsTable/PcsTable';
44
+ export * from './ui/PcsTable/PcsTable';
45
+ export { default as PcsTagList } from './ui/PcsTagList/PcsTagList';
46
+ export * from './ui/PcsTagList/PcsTagList';
47
+ export { default as PcsTextAreaField } from './ui/PcsTextAreaField/PcsTextAreaField';
48
+ export * from './ui/PcsTextAreaField/PcsTextAreaField';
49
+ export { default as PcsTextField } from './ui/PcsTextField/PcsTextField';
50
+ export * from './ui/PcsTextField/PcsTextField';
51
+ export { default as PcsToggle } from './ui/PcsToggle/PcsToggle';
52
+ export * from './ui/PcsToggle/PcsToggle';
@@ -0,0 +1,40 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { PcsFilterLabels } from '../../components/PcsFilter/PcsFilter';
3
+ import type { PcsFilterField } from '../../components/PcsFilter/pcsFilterField.type';
4
+ import type { PcsBottomMenuAction, PcsBottomMenuPlacement } from '../../ui/PcsBottomMenu/PcsBottomMenu';
5
+ import type { PcsExportOption } from '../../ui/PcsExport/PcsExport';
6
+ import type { PcsSearchProps } from '../../ui/PcsSearch/PcsSearch';
7
+ import type { PcsTableProps } from '../../ui/PcsTable/PcsTable';
8
+ import './PcsTableView.scss';
9
+ export interface PcsTableViewFilterConfig {
10
+ fields: PcsFilterField[];
11
+ values?: Record<string, unknown>;
12
+ labels?: Partial<PcsFilterLabels>;
13
+ onApply: (values: Record<string, unknown>) => void;
14
+ onReset: () => void;
15
+ onChange?: (values: Record<string, unknown>) => void;
16
+ }
17
+ export type PcsTableViewSearchConfig = Omit<PcsSearchProps, 'filterButton'>;
18
+ export interface PcsTableViewExportConfig {
19
+ hidden?: boolean;
20
+ options?: PcsExportOption[];
21
+ buttonTitle?: string;
22
+ onExport: (count: PcsExportOption) => void;
23
+ }
24
+ export interface PcsTableViewBottomMenuConfig {
25
+ actions: PcsBottomMenuAction[];
26
+ ariaLabel?: string;
27
+ className?: string;
28
+ placement?: PcsBottomMenuPlacement;
29
+ }
30
+ export interface PcsTableViewProps<T extends object> {
31
+ table: PcsTableProps<T>;
32
+ actions?: ReactNode;
33
+ bottomMenu?: PcsTableViewBottomMenuConfig;
34
+ className?: string;
35
+ exportAction?: PcsTableViewExportConfig;
36
+ filter?: PcsTableViewFilterConfig;
37
+ search?: PcsTableViewSearchConfig;
38
+ }
39
+ declare const PcsTableView: <T extends object>({ table, actions, bottomMenu, className, exportAction, filter, search, }: PcsTableViewProps<T>) => import("react/jsx-runtime").JSX.Element;
40
+ export default PcsTableView;
@@ -0,0 +1 @@
1
+ export type PcsFieldSize = 'sm' | 'md' | 'lg';
@@ -0,0 +1,5 @@
1
+ import type { PcsBottomMenuProps } from './pcsBottomMenu.types';
2
+ import './PcsBottomMenu.scss';
3
+ export type { PcsBottomMenuAction, PcsBottomMenuActionBase, PcsBottomMenuPlacement, PcsBottomMenuProps, } from './pcsBottomMenu.types';
4
+ declare const PcsBottomMenu: ({ actions, ariaLabel, className, placement, }: PcsBottomMenuProps) => import("react/jsx-runtime").JSX.Element | null;
5
+ export default PcsBottomMenu;
@@ -0,0 +1,20 @@
1
+ import type { ReactNode } from 'react';
2
+ export type PcsBottomMenuPlacement = 'inline' | 'fixed';
3
+ export interface PcsBottomMenuActionBase {
4
+ disabled?: boolean;
5
+ hidden?: boolean;
6
+ loading?: boolean;
7
+ tooltip?: ReactNode;
8
+ onClick: () => void;
9
+ }
10
+ export interface PcsBottomMenuAction extends PcsBottomMenuActionBase {
11
+ key: string;
12
+ label: ReactNode;
13
+ icon?: ReactNode;
14
+ }
15
+ export interface PcsBottomMenuProps {
16
+ actions: PcsBottomMenuAction[];
17
+ ariaLabel?: string;
18
+ className?: string;
19
+ placement?: PcsBottomMenuPlacement;
20
+ }
@@ -0,0 +1,12 @@
1
+ import type { ButtonHTMLAttributes, ReactNode } from 'react';
2
+ import './PcsButton.scss';
3
+ export type PcsButtonVariant = 'white' | 'silver' | 'lightblue' | 'lightgray' | 'green' | 'greenNegative' | 'redNegative' | 'pink' | 'orange' | 'transparent' | 'link';
4
+ export interface PcsButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
5
+ children?: ReactNode;
6
+ hidden?: boolean;
7
+ icon?: ReactNode;
8
+ loading?: boolean;
9
+ variant?: PcsButtonVariant;
10
+ }
11
+ declare const PcsButton: ({ children, className, disabled, hidden, icon, loading, type, variant, ...props }: PcsButtonProps) => import("react/jsx-runtime").JSX.Element | null;
12
+ export default PcsButton;
@@ -0,0 +1,13 @@
1
+ import './PcsCheckbox.scss';
2
+ export interface PcsCheckboxProps {
3
+ label?: string;
4
+ checked?: boolean;
5
+ disabled?: boolean;
6
+ readonly?: boolean;
7
+ onChange?: (checked: boolean) => void;
8
+ className?: string;
9
+ isValid?: boolean;
10
+ failure?: string;
11
+ }
12
+ declare const PcsCheckbox: ({ label, checked, disabled, readonly, onChange, className, isValid, failure, }: PcsCheckboxProps) => import("react/jsx-runtime").JSX.Element;
13
+ export default PcsCheckbox;
@@ -0,0 +1,14 @@
1
+ import './PcsCheckboxGroup.scss';
2
+ export interface PcsCheckboxGroupOption {
3
+ value: string;
4
+ label: string;
5
+ disabled?: boolean;
6
+ }
7
+ export interface PcsCheckboxGroupProps {
8
+ className?: string;
9
+ options?: PcsCheckboxGroupOption[];
10
+ value?: string[];
11
+ onChange?: (value: string[] | undefined) => void;
12
+ }
13
+ declare const PcsCheckboxGroup: ({ className, options, value, onChange, }: PcsCheckboxGroupProps) => import("react/jsx-runtime").JSX.Element;
14
+ export default PcsCheckboxGroup;
@@ -0,0 +1,12 @@
1
+ import type { DatePickerProps } from 'antd';
2
+ import type { Dayjs } from 'dayjs';
3
+ import type { PcsFieldSize } from '../../types/pcsField.types';
4
+ import './PcsDateField.scss';
5
+ export interface PcsDateFieldProps extends Omit<DatePickerProps, 'onChange' | 'value' | 'size'> {
6
+ errorText?: string;
7
+ size?: PcsFieldSize;
8
+ value?: Dayjs | null;
9
+ onChange?: (value: Dayjs | null) => void;
10
+ }
11
+ declare const PcsDateField: ({ className, classNames, errorText, format, popupClassName, showTime, size, value, onChange, ...props }: PcsDateFieldProps) => import("react/jsx-runtime").JSX.Element;
12
+ export default PcsDateField;
@@ -0,0 +1,15 @@
1
+ import type { DatePickerProps } from 'antd';
2
+ import type { Dayjs } from 'dayjs';
3
+ import type { PcsFieldSize } from '../../types/pcsField.types';
4
+ import './PcsDateRangeField.scss';
5
+ export type PcsDateRangeValue = [Dayjs | null, Dayjs | null];
6
+ export interface PcsDateRangeFieldProps extends Omit<DatePickerProps, 'className' | 'onChange' | 'placeholder' | 'size' | 'value'> {
7
+ className?: string;
8
+ errorText?: string;
9
+ placeholder?: [string, string];
10
+ value?: PcsDateRangeValue;
11
+ size?: PcsFieldSize;
12
+ onChange?: (value: PcsDateRangeValue | undefined) => void;
13
+ }
14
+ declare const PcsDateRangeField: ({ className, classNames, errorText, format, placeholder, popupClassName, showTime, value, size, onChange, ...props }: PcsDateRangeFieldProps) => import("react/jsx-runtime").JSX.Element;
15
+ export default PcsDateRangeField;
@@ -0,0 +1,10 @@
1
+ import './PcsExport.scss';
2
+ export type PcsExportOption = number | 'all';
3
+ export interface PcsExportProps {
4
+ options?: PcsExportOption[];
5
+ buttonTitle?: string;
6
+ className?: string;
7
+ onExport: (count: PcsExportOption) => void;
8
+ }
9
+ declare const PcsExport: ({ options, buttonTitle, className, onExport, }: PcsExportProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default PcsExport;
@@ -0,0 +1,11 @@
1
+ import type { ButtonHTMLAttributes, ReactNode } from 'react';
2
+ import './PcsIconButton.scss';
3
+ export type PcsIconButtonVariant = 'primary' | 'secondary' | 'ghost';
4
+ export type PcsIconButtonSize = 'default' | 'compact';
5
+ export interface PcsIconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
6
+ icon: ReactNode;
7
+ variant?: PcsIconButtonVariant;
8
+ size?: PcsIconButtonSize;
9
+ }
10
+ declare const PcsIconButton: ({ icon, variant, size, className, type, ...props }: PcsIconButtonProps) => import("react/jsx-runtime").JSX.Element;
11
+ export default PcsIconButton;
@@ -0,0 +1,18 @@
1
+ import type { ModalProps } from 'antd';
2
+ import type { ReactNode } from 'react';
3
+ import './PcsModal.scss';
4
+ export type PcsModalFooterLayout = 'inline' | 'equal';
5
+ export type PcsModalVariant = 'default' | 'confirm';
6
+ export interface PcsModalProps extends Omit<ModalProps, 'footer' | 'onCancel' | 'open'> {
7
+ open: boolean;
8
+ onClose: () => void;
9
+ title?: ReactNode;
10
+ description?: ReactNode;
11
+ children?: ReactNode;
12
+ footer?: ReactNode;
13
+ footerClassName?: string;
14
+ footerLayout?: PcsModalFooterLayout;
15
+ variant?: PcsModalVariant;
16
+ }
17
+ declare const PcsModal: ({ open, onClose, title, description, children, footer, footerClassName, footerLayout, variant, className, style, width, ...rest }: PcsModalProps) => import("react/jsx-runtime").JSX.Element;
18
+ export default PcsModal;
@@ -0,0 +1,10 @@
1
+ import type { PcsFieldSize } from '../../types/pcsField.types';
2
+ import './PcsNumberRangeField.scss';
3
+ export type PcsNumberRangeValue = [string, string];
4
+ export interface PcsNumberRangeFieldProps {
5
+ value?: PcsNumberRangeValue;
6
+ size?: PcsFieldSize;
7
+ onChange?: (value: PcsNumberRangeValue) => void;
8
+ }
9
+ declare const PcsNumberRangeField: ({ value, size, onChange, }: PcsNumberRangeFieldProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default PcsNumberRangeField;
@@ -0,0 +1,17 @@
1
+ import type { PcsFieldSize } from '../../types/pcsField.types';
2
+ import './PcsRadioButton.scss';
3
+ export interface PcsRadioButtonProps {
4
+ label?: string;
5
+ checked?: boolean;
6
+ disabled?: boolean;
7
+ readonly?: boolean;
8
+ name?: string;
9
+ value?: string;
10
+ className?: string;
11
+ size?: PcsFieldSize;
12
+ isValid?: boolean;
13
+ failure?: string;
14
+ onChange?: (checked: boolean) => void;
15
+ }
16
+ declare const PcsRadioButton: ({ label, checked, disabled, readonly, name, value, className, size, isValid, failure, onChange, }: PcsRadioButtonProps) => import("react/jsx-runtime").JSX.Element;
17
+ export default PcsRadioButton;
@@ -0,0 +1,17 @@
1
+ import type { PcsFieldSize } from '../../types/pcsField.types';
2
+ import './PcsRadioGroup.scss';
3
+ export interface PcsRadioGroupOption {
4
+ value: string;
5
+ label: string;
6
+ disabled?: boolean;
7
+ }
8
+ export interface PcsRadioGroupProps {
9
+ className?: string;
10
+ name?: string;
11
+ options?: PcsRadioGroupOption[];
12
+ value?: string;
13
+ size?: PcsFieldSize;
14
+ onChange?: (value: string | undefined) => void;
15
+ }
16
+ declare const PcsRadioGroup: ({ className, name, options, value, size, onChange, }: PcsRadioGroupProps) => import("react/jsx-runtime").JSX.Element;
17
+ export default PcsRadioGroup;
@@ -0,0 +1,14 @@
1
+ import type { ReactNode } from 'react';
2
+ import './PcsSearch.scss';
3
+ export interface PcsSearchProps {
4
+ value?: string;
5
+ defaultValue?: string;
6
+ className?: string;
7
+ onChange?: (value: string) => void;
8
+ onSearch?: (value: string) => void;
9
+ onSubmit?: (value: string) => void;
10
+ placeholder?: string;
11
+ filterButton?: ReactNode;
12
+ }
13
+ declare const PcsSearch: ({ value, defaultValue, className, onChange, onSearch, onSubmit, placeholder, filterButton, }: PcsSearchProps) => import("react/jsx-runtime").JSX.Element;
14
+ export default PcsSearch;
@@ -0,0 +1,4 @@
1
+ import type { PcsSelectFieldProps } from './pcsSelectField.types';
2
+ import './PcsSelectField.scss';
3
+ declare const PcsSelectField: ({ options, label, placeholder, value, onChange, showSearch, filterOption, disabled, errorText, className, size, width, onlyActive, optionRender, mode, loading, allowClear, }: PcsSelectFieldProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default PcsSelectField;
@@ -0,0 +1,40 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { PcsFieldSize } from '../../types/pcsField.types';
3
+ export type PcsSelectFieldValue = number | string;
4
+ export type PcsSelectFieldChangeValue = PcsSelectFieldValue | PcsSelectFieldValue[] | null;
5
+ export interface PcsSelectOption {
6
+ id: PcsSelectFieldValue;
7
+ title: string;
8
+ description?: string;
9
+ disabled?: boolean;
10
+ active?: boolean;
11
+ [key: string]: unknown;
12
+ }
13
+ export interface PcsSelectFieldFilterOption {
14
+ value: string;
15
+ label: string;
16
+ disabled?: boolean;
17
+ active?: boolean;
18
+ description?: string;
19
+ [key: string]: unknown;
20
+ }
21
+ export type PcsSelectFieldOption = PcsSelectOption | PcsSelectFieldFilterOption;
22
+ export interface PcsSelectFieldProps {
23
+ label?: string;
24
+ placeholder?: string;
25
+ value?: PcsSelectFieldChangeValue;
26
+ onChange?: (value: PcsSelectFieldChangeValue) => void;
27
+ options?: PcsSelectFieldOption[];
28
+ showSearch?: boolean;
29
+ filterOption?: (input: string, option?: PcsSelectFieldOption) => boolean;
30
+ disabled?: boolean;
31
+ errorText?: string;
32
+ className?: string;
33
+ size?: PcsFieldSize;
34
+ width?: string | number;
35
+ onlyActive?: boolean;
36
+ optionRender?: (option: PcsSelectFieldOption) => ReactNode;
37
+ mode?: 'multiple' | 'tags';
38
+ loading?: boolean;
39
+ allowClear?: boolean;
40
+ }
@@ -0,0 +1,17 @@
1
+ import type { PcsFieldSize } from '../../types/pcsField.types';
2
+ import './PcsSelectMultipleField.scss';
3
+ export interface PcsSelectMultipleFieldOption {
4
+ value: string;
5
+ label: string;
6
+ disabled?: boolean;
7
+ }
8
+ export interface PcsSelectMultipleFieldProps {
9
+ options?: PcsSelectMultipleFieldOption[];
10
+ placeholder?: string;
11
+ value?: string[];
12
+ size?: PcsFieldSize;
13
+ controlType?: 'checkbox' | 'radio';
14
+ onChange?: (value: string[] | undefined) => void;
15
+ }
16
+ declare const PcsSelectMultipleField: ({ options, placeholder, value, size, controlType, onChange, }: PcsSelectMultipleFieldProps) => import("react/jsx-runtime").JSX.Element;
17
+ export default PcsSelectMultipleField;
@@ -0,0 +1,42 @@
1
+ import type { ColumnsType } from 'antd/es/table';
2
+ import type { Key } from 'react';
3
+ import './PcsTable.scss';
4
+ export type PcsTableSortOrder = 'ascend' | 'descend' | null;
5
+ export interface PcsTableSortInfo {
6
+ field: string;
7
+ order: PcsTableSortOrder;
8
+ }
9
+ export interface PcsTablePagination {
10
+ current: number;
11
+ pageSize: number;
12
+ total: number;
13
+ pageSizeOptions?: number[];
14
+ showEndButton?: boolean;
15
+ showSizeChanger?: boolean;
16
+ onChange?: (page: number, pageSize: number) => void;
17
+ }
18
+ export interface PcsTableSelection<T extends object> {
19
+ selectedRowKeys?: Key[];
20
+ onChange?: (selectedRowKeys: Key[], selectedRows: T[]) => void;
21
+ }
22
+ export interface PcsTableSorting {
23
+ field?: string;
24
+ order?: PcsTableSortOrder;
25
+ onChange?: (sortInfo: PcsTableSortInfo) => void;
26
+ }
27
+ export type PcsTableLayout = 'container' | 'page';
28
+ export interface PcsTableProps<T extends object> {
29
+ data: T[];
30
+ columns: ColumnsType<T>;
31
+ loading?: boolean;
32
+ layout?: PcsTableLayout;
33
+ minWidth?: number;
34
+ rowKey?: string | ((record: T) => Key);
35
+ selection?: PcsTableSelection<T>;
36
+ pagination?: PcsTablePagination;
37
+ sorting?: PcsTableSorting;
38
+ onRowClick?: (record: T) => void;
39
+ className?: string;
40
+ }
41
+ declare const PcsTable: <T extends object>({ data, columns, loading, layout, minWidth, rowKey, selection, pagination, sorting, onRowClick, className, }: PcsTableProps<T>) => import("react/jsx-runtime").JSX.Element;
42
+ export default PcsTable;
@@ -0,0 +1,15 @@
1
+ import './PcsTagList.scss';
2
+ export interface PcsTagListItem {
3
+ key: string;
4
+ label: string;
5
+ }
6
+ export interface PcsTagListProps<Tag extends PcsTagListItem = PcsTagListItem> {
7
+ tags: Tag[];
8
+ className?: string;
9
+ closeLabel?: (tag: Tag) => string;
10
+ removable?: boolean;
11
+ tagClassName?: string;
12
+ onRemove?: (tag: Tag) => void;
13
+ }
14
+ declare const PcsTagList: <Tag extends PcsTagListItem = PcsTagListItem>({ tags, className, closeLabel, removable, tagClassName, onRemove, }: PcsTagListProps<Tag>) => import("react/jsx-runtime").JSX.Element | null;
15
+ export default PcsTagList;
@@ -0,0 +1,10 @@
1
+ import type { TextAreaProps } from 'antd/es/input';
2
+ import './PcsTextAreaField.scss';
3
+ export interface PcsTextAreaFieldProps extends Omit<TextAreaProps, 'onChange' | 'value'> {
4
+ label?: string;
5
+ value?: string;
6
+ onChange?: (value: string) => void;
7
+ errorText?: string;
8
+ }
9
+ declare const PcsTextAreaField: ({ label, value, onChange, errorText, className, ...props }: PcsTextAreaFieldProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default PcsTextAreaField;
@@ -0,0 +1,14 @@
1
+ import type { InputProps } from 'antd';
2
+ import type { PcsFieldSize } from '../../types/pcsField.types';
3
+ import './PcsTextField.scss';
4
+ export type PcsTextFieldProps = Omit<InputProps, 'onChange' | 'value' | 'size'> & {
5
+ label?: string;
6
+ value?: string;
7
+ size?: PcsFieldSize;
8
+ validatePattern?: RegExp;
9
+ customValidator?: (value: string) => string | null;
10
+ onChange?: (value: string, error?: string) => void;
11
+ errorText?: string;
12
+ };
13
+ declare const PcsTextField: ({ label, value, validatePattern, customValidator, onChange, errorText: externalErrorText, className, placeholder, size, ...props }: PcsTextFieldProps) => import("react/jsx-runtime").JSX.Element;
14
+ export default PcsTextField;
@@ -0,0 +1,10 @@
1
+ import './PcsToggle.scss';
2
+ export interface PcsToggleProps {
3
+ checked?: boolean;
4
+ disabled?: boolean;
5
+ onChange?: (checked: boolean) => void;
6
+ className?: string;
7
+ label?: string;
8
+ }
9
+ declare const PcsToggle: ({ checked, disabled, onChange, className, label, }: PcsToggleProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default PcsToggle;