@edvisor/product-language 0.11.112 → 0.11.113
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/index.cjs +1 -1
- package/index.d.ts +2 -2
- package/index.js +1 -1
- package/lib/components/alert-banner/alert-banner.d.ts +18 -18
- package/lib/components/alert-banner/alert-level-flags.d.ts +18 -18
- package/lib/components/alert-banner/index.d.ts +1 -1
- package/lib/components/autocomplete-input/autocomplete-input.d.ts +39 -39
- package/lib/components/autocomplete-input/index.d.ts +1 -1
- package/lib/components/badge/badge-type-flags.d.ts +18 -18
- package/lib/components/badge/badge.d.ts +7 -7
- package/lib/components/badge/index.d.ts +1 -1
- package/lib/components/card/atoms/card-frame.d.ts +7 -7
- package/lib/components/card/atoms/index.d.ts +1 -1
- package/lib/components/card/card.d.ts +14 -14
- package/lib/components/card/components/card-alert-banner-slot.d.ts +5 -6
- package/lib/components/card/components/card-controls-slot.d.ts +4 -5
- package/lib/components/card/components/card-section-slot.d.ts +11 -11
- package/lib/components/card/components/index.d.ts +3 -3
- package/lib/components/card/index.d.ts +3 -3
- package/lib/components/card/molecules/index.d.ts +1 -1
- package/lib/components/card/molecules/left-right-card.d.ts +16 -16
- package/lib/components/checkbox/checkbox.d.ts +11 -11
- package/lib/components/checkbox/helpers.d.ts +12 -12
- package/lib/components/checkbox/index.d.ts +1 -1
- package/lib/components/date-picker/components/custom-calendar.d.ts +6 -6
- package/lib/components/date-picker/components/index.d.ts +1 -1
- package/lib/components/date-picker/date-picker-utc.d.ts +9 -9
- package/lib/components/date-picker/date-picker.d.ts +19 -19
- package/lib/components/date-picker/helpers/date-picker-factory.d.ts +38 -38
- package/lib/components/date-picker/index.d.ts +2 -2
- package/lib/components/divider/divider-type-flags.d.ts +9 -9
- package/lib/components/divider/divider.d.ts +7 -7
- package/lib/components/divider/index.d.ts +1 -1
- package/lib/components/flag/flag-size-flags.d.ts +22 -22
- package/lib/components/flag/flag.d.ts +4 -4
- package/lib/components/flag/helpers/flag-sprite-sheet.d.ts +5 -5
- package/lib/components/flag/helpers/index.d.ts +1 -1
- package/lib/components/flag/index.d.ts +1 -1
- package/lib/components/flag/types.d.ts +5 -5
- package/lib/components/icon/icon-list.d.ts +149 -150
- package/lib/components/icon/icon.d.ts +149 -149
- package/lib/components/icon/index.d.ts +1 -1
- package/lib/components/index.d.ts +39 -39
- package/lib/components/inline-error/index.d.ts +1 -1
- package/lib/components/inline-error/inline-error.d.ts +7 -7
- package/lib/components/input-field/components/index.d.ts +2 -2
- package/lib/components/input-field/components/labeled-input.d.ts +11 -11
- package/lib/components/input-field/components/stepper.d.ts +7 -7
- package/lib/components/input-field/index.d.ts +4 -4
- package/lib/components/input-field/input-currency.d.ts +23 -22
- package/lib/components/input-field/input-currency.helpers.d.ts +32 -0
- package/lib/components/input-field/input-field.d.ts +27 -27
- package/lib/components/input-field/input-number.d.ts +19 -19
- package/lib/components/input-field/input-text.d.ts +14 -14
- package/lib/components/layout/flex.d.ts +16 -16
- package/lib/components/layout/grid-layout.d.ts +11 -11
- package/lib/components/layout/index.d.ts +3 -3
- package/lib/components/layout/left-right-layout.d.ts +33 -34
- package/lib/components/link/index.d.ts +1 -1
- package/lib/components/link/link.d.ts +14 -14
- package/lib/components/markdown/index.d.ts +1 -1
- package/lib/components/markdown/markdown.d.ts +7 -7
- package/lib/components/menu/index.d.ts +1 -1
- package/lib/components/menu/menu.d.ts +18 -18
- package/lib/components/modal/index.d.ts +3 -3
- package/lib/components/modal/modal-base.d.ts +32 -32
- package/lib/components/modal/modal-destructive.d.ts +16 -16
- package/lib/components/modal/modal.d.ts +16 -16
- package/lib/components/molecules/avatar/avatar-size-flags.d.ts +11 -12
- package/lib/components/molecules/avatar/avatar.d.ts +12 -12
- package/lib/components/molecules/avatar/index.d.ts +1 -1
- package/lib/components/molecules/button/button-flags.d.ts +44 -44
- package/lib/components/molecules/button/button.d.ts +12 -12
- package/lib/components/molecules/button/index.d.ts +1 -1
- package/lib/components/molecules/index.d.ts +4 -4
- package/lib/components/molecules/input-checkbox/index.d.ts +1 -1
- package/lib/components/molecules/input-checkbox/input-checkbox.d.ts +8 -8
- package/lib/components/molecules/simple-menu/SimpleMenu.d.ts +14 -15
- package/lib/components/molecules/simple-menu/index.d.ts +1 -1
- package/lib/components/organisms/choice-list/choice-list.d.ts +9 -9
- package/lib/components/organisms/choice-list/index.d.ts +1 -1
- package/lib/components/organisms/index.d.ts +2 -2
- package/lib/components/organisms/multi-choice-list/index.d.ts +1 -1
- package/lib/components/organisms/multi-choice-list/multi-choice-list.d.ts +11 -11
- package/lib/components/page-header/index.d.ts +1 -1
- package/lib/components/page-header/page-header.d.ts +25 -26
- package/lib/components/pagination/index.d.ts +1 -1
- package/lib/components/pagination/pagination.d.ts +10 -10
- package/lib/components/progress-bar/index.d.ts +1 -1
- package/lib/components/progress-bar/progress-bar-size-flags.d.ts +10 -10
- package/lib/components/progress-bar/progress-bar.d.ts +8 -8
- package/lib/components/radio-button/index.d.ts +1 -1
- package/lib/components/radio-button/radio-button.d.ts +11 -11
- package/lib/components/range-slider/components/bar-chart.d.ts +8 -8
- package/lib/components/range-slider/components/handle.d.ts +12 -12
- package/lib/components/range-slider/components/rail.d.ts +9 -9
- package/lib/components/range-slider/components/slider-component.d.ts +12 -12
- package/lib/components/range-slider/components/slider-inputs.d.ts +15 -16
- package/lib/components/range-slider/components/tick.d.ts +10 -10
- package/lib/components/range-slider/components/track.d.ts +11 -11
- package/lib/components/range-slider/index.d.ts +2 -2
- package/lib/components/range-slider/range-slider.d.ts +16 -16
- package/lib/components/range-slider/slider.d.ts +12 -12
- package/lib/components/range-slider/types.d.ts +11 -11
- package/lib/components/react-select/index.d.ts +1 -1
- package/lib/components/react-select/react-select.d.ts +14 -15
- package/lib/components/select/components/helpers.d.ts +17 -17
- package/lib/components/select/components/menu-container.d.ts +3 -3
- package/lib/components/select/components/menu-list-expanded.d.ts +6 -6
- package/lib/components/select/components/menu-list.d.ts +3 -3
- package/lib/components/select/components/menu-row.d.ts +11 -11
- package/lib/components/select/components/menu.d.ts +2 -3
- package/lib/components/select/components/option.d.ts +2 -3
- package/lib/components/select/components/optionMultiLevel.d.ts +2 -3
- package/lib/components/select/components/optionMultilevelExpanded.d.ts +5 -5
- package/lib/components/select/components/select-label.d.ts +1 -1
- package/lib/components/select/components/value-component-multi.d.ts +4 -4
- package/lib/components/select/components/value-component-single.d.ts +5 -4
- package/lib/components/select/components/value.d.ts +5 -4
- package/lib/components/select/index.d.ts +4 -4
- package/lib/components/select/select.d.ts +7 -10
- package/lib/components/select/types.d.ts +300 -300
- package/lib/components/select/utils.d.ts +16 -16
- package/lib/components/select-with-groups/index.d.ts +2 -2
- package/lib/components/select-with-groups/select-with-groups.d.ts +35 -35
- package/lib/components/spinner/index.d.ts +1 -1
- package/lib/components/spinner/spinner-size-flags.d.ts +10 -10
- package/lib/components/spinner/spinner.d.ts +9 -9
- package/lib/components/stepper/index.d.ts +1 -1
- package/lib/components/stepper/stepper.d.ts +9 -9
- package/lib/components/switch/index.d.ts +1 -1
- package/lib/components/switch/switch.d.ts +13 -13
- package/lib/components/table/hooks/index.d.ts +4 -4
- package/lib/components/table/hooks/useFilteredRows.d.ts +5 -5
- package/lib/components/table/hooks/usePaginatedRows.d.ts +12 -12
- package/lib/components/table/hooks/useSortedRows.d.ts +6 -6
- package/lib/components/table/hooks/useTable.d.ts +47 -47
- package/lib/components/table/index.d.ts +2 -2
- package/lib/components/table/table.d.ts +28 -28
- package/lib/components/tabs/components/index.d.ts +1 -1
- package/lib/components/tabs/components/tab.d.ts +10 -10
- package/lib/components/tabs/index.d.ts +1 -1
- package/lib/components/tabs/tabs.d.ts +18 -18
- package/lib/components/tag/components/close-button.d.ts +8 -8
- package/lib/components/tag/components/index.d.ts +2 -2
- package/lib/components/tag/components/tag-label.d.ts +8 -8
- package/lib/components/tag/index.d.ts +1 -1
- package/lib/components/tag/tag.d.ts +10 -10
- package/lib/components/text-area/index.d.ts +1 -1
- package/lib/components/text-area/text-area.d.ts +11 -11
- package/lib/components/text-toggle/index.d.ts +1 -1
- package/lib/components/text-toggle/text-toggle.d.ts +10 -10
- package/lib/components/thumbnail/index.d.ts +1 -1
- package/lib/components/thumbnail/thumbnail-size-flags.d.ts +10 -10
- package/lib/components/thumbnail/thumbnail.d.ts +10 -10
- package/lib/components/toast/index.d.ts +1 -1
- package/lib/components/toast/toast.d.ts +17 -17
- package/lib/components/tooltip/index.d.ts +1 -1
- package/lib/components/tooltip/tooltip.d.ts +30 -30
- package/lib/components/tree-view/components/tree-node.d.ts +3 -3
- package/lib/components/tree-view/helper.d.ts +12 -12
- package/lib/components/tree-view/index.d.ts +2 -2
- package/lib/components/tree-view/tree-view.d.ts +3 -3
- package/lib/components/tree-view/types.d.ts +63 -63
- package/lib/components/typography/index.d.ts +1 -1
- package/lib/components/typography/typography.d.ts +27 -27
- package/lib/foundations/color-system/base-palette/base-palette.d.ts +76 -76
- package/lib/foundations/color-system/base-palette/index.d.ts +1 -1
- package/lib/foundations/color-system/color-guidelines/color-guidelines.d.ts +133 -133
- package/lib/foundations/color-system/color-guidelines/index.d.ts +1 -1
- package/lib/foundations/color-system/components/color-sample.d.ts +17 -17
- package/lib/foundations/color-system/components/index.d.ts +1 -1
- package/lib/foundations/color-system/index.d.ts +2 -2
- package/lib/foundations/index.d.ts +4 -4
- package/lib/foundations/shadows/components.d.ts +8 -8
- package/lib/foundations/shadows/index.d.ts +1 -1
- package/lib/foundations/shadows/shadows.d.ts +8 -8
- package/lib/foundations/spacing/index.d.ts +1 -1
- package/lib/foundations/spacing/spacing-guidelines.d.ts +37 -37
- package/lib/foundations/spacing/spacing.d.ts +19 -19
- package/lib/foundations/typography/constants.d.ts +39 -39
- package/lib/foundations/typography/fonts.d.ts +1 -1
- package/lib/foundations/typography/index.d.ts +2 -2
- package/lib/foundations/typography/text-aspect-flags.d.ts +30 -30
- package/lib/foundations/typography/typography.d.ts +24 -24
- package/lib/helpers/generic-types.d.ts +21 -21
- package/lib/helpers/index.d.ts +10 -10
- package/lib/helpers/isReactElementOfType.d.ts +6 -8
- package/lib/helpers/nothing.d.ts +9 -10
- package/lib/helpers/numbers.d.ts +51 -51
- package/lib/helpers/safe-navigation.d.ts +26 -26
- package/lib/helpers/slots.d.ts +17 -17
- package/lib/helpers/strings.d.ts +1 -1
- package/lib/helpers/useClickOutside.d.ts +2 -2
- package/lib/helpers/useInputElementState.d.ts +30 -30
- package/lib/helpers/useIsMobile.d.ts +1 -1
- package/lib/helpers/useKeyDown.d.ts +1 -1
- package/package.json +5 -5
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { GroupBase, StylesConfig } from 'react-select-v5';
|
|
2
|
-
import { FC } from '@helpers';
|
|
3
|
-
export interface ISelectOption {
|
|
4
|
-
value: string;
|
|
5
|
-
label: string;
|
|
6
|
-
groupName?: string;
|
|
7
|
-
parentGroupName?: string;
|
|
8
|
-
isGroupOption?: boolean;
|
|
9
|
-
childOptions?: string[];
|
|
10
|
-
}
|
|
11
|
-
export interface IGroupedOption extends GroupBase<ISelectOption> {
|
|
12
|
-
label: string;
|
|
13
|
-
options: ISelectOption[];
|
|
14
|
-
}
|
|
15
|
-
export interface ISelectWithGroupsProps {
|
|
16
|
-
selectedItems?: ISelectOption[];
|
|
17
|
-
onSelectItems?: (items: ISelectOption[]) => void;
|
|
18
|
-
placeholder?: string;
|
|
19
|
-
label?: string;
|
|
20
|
-
options: IGroupedOption[];
|
|
21
|
-
enableClickableHeaders?: boolean;
|
|
22
|
-
enableGroupOptions?: boolean;
|
|
23
|
-
enableGroupSearch?: boolean;
|
|
24
|
-
customStyles?: Partial<StylesConfig<ISelectOption,
|
|
25
|
-
isDisabled?: boolean;
|
|
26
|
-
isLoading?: boolean;
|
|
27
|
-
isClearable?: boolean;
|
|
28
|
-
closeMenuOnSelect?: boolean;
|
|
29
|
-
noOptionsMessage?: (obj: {
|
|
30
|
-
inputValue: string;
|
|
31
|
-
}) => string;
|
|
32
|
-
menuPlacement?: 'auto' | 'bottom' | 'top';
|
|
33
|
-
isMulti?: boolean;
|
|
34
|
-
}
|
|
35
|
-
export declare const SelectWithGroups: FC<ISelectWithGroupsProps>;
|
|
1
|
+
import { GroupBase, StylesConfig } from 'react-select-v5';
|
|
2
|
+
import { FC } from '@helpers';
|
|
3
|
+
export interface ISelectOption {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
groupName?: string;
|
|
7
|
+
parentGroupName?: string;
|
|
8
|
+
isGroupOption?: boolean;
|
|
9
|
+
childOptions?: string[];
|
|
10
|
+
}
|
|
11
|
+
export interface IGroupedOption extends GroupBase<ISelectOption> {
|
|
12
|
+
label: string;
|
|
13
|
+
options: ISelectOption[];
|
|
14
|
+
}
|
|
15
|
+
export interface ISelectWithGroupsProps {
|
|
16
|
+
selectedItems?: ISelectOption[];
|
|
17
|
+
onSelectItems?: (items: ISelectOption[]) => void;
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
label?: string;
|
|
20
|
+
options: IGroupedOption[];
|
|
21
|
+
enableClickableHeaders?: boolean;
|
|
22
|
+
enableGroupOptions?: boolean;
|
|
23
|
+
enableGroupSearch?: boolean;
|
|
24
|
+
customStyles?: Partial<StylesConfig<ISelectOption, boolean, IGroupedOption>>;
|
|
25
|
+
isDisabled?: boolean;
|
|
26
|
+
isLoading?: boolean;
|
|
27
|
+
isClearable?: boolean;
|
|
28
|
+
closeMenuOnSelect?: boolean;
|
|
29
|
+
noOptionsMessage?: (obj: {
|
|
30
|
+
inputValue: string;
|
|
31
|
+
}) => string;
|
|
32
|
+
menuPlacement?: 'auto' | 'bottom' | 'top';
|
|
33
|
+
isMulti?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export declare const SelectWithGroups: FC<ISelectWithGroupsProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './spinner';
|
|
1
|
+
export * from './spinner';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { MappedEnum, RequireOnlyOne, PropsWithChildren } from '@helpers';
|
|
2
|
-
declare const enum SpinnerSize {
|
|
3
|
-
small = 1,
|
|
4
|
-
medium = 2,
|
|
5
|
-
large = 4
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
export declare function getValuesBySize(props: SpinnerProps): string;
|
|
10
|
-
export {};
|
|
1
|
+
import { MappedEnum, RequireOnlyOne, PropsWithChildren } from '@helpers';
|
|
2
|
+
declare const enum SpinnerSize {
|
|
3
|
+
small = 1,
|
|
4
|
+
medium = 2,
|
|
5
|
+
large = 4
|
|
6
|
+
}
|
|
7
|
+
type SpinnerSizes<T> = MappedEnum<typeof SpinnerSize, T>;
|
|
8
|
+
export type SpinnerProps = Partial<RequireOnlyOne<SpinnerSizes<boolean>>> & PropsWithChildren;
|
|
9
|
+
export declare function getValuesBySize(props: SpinnerProps): string;
|
|
10
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { SpinnerProps } from './spinner-size-flags';
|
|
2
|
-
import { FC } from '@helpers';
|
|
3
|
-
|
|
4
|
-
onPrimary?: boolean;
|
|
5
|
-
onCritical?: boolean;
|
|
6
|
-
className?: string;
|
|
7
|
-
};
|
|
8
|
-
export declare const Spinner: FC<IProps>;
|
|
9
|
-
export {};
|
|
1
|
+
import { SpinnerProps } from './spinner-size-flags';
|
|
2
|
+
import { FC } from '@helpers';
|
|
3
|
+
type IProps = SpinnerProps & {
|
|
4
|
+
onPrimary?: boolean;
|
|
5
|
+
onCritical?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const Spinner: FC<IProps>;
|
|
9
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './stepper';
|
|
1
|
+
export * from './stepper';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { FC } from '@helpers';
|
|
2
|
-
export interface IStepperProps {
|
|
3
|
-
currentStep: number;
|
|
4
|
-
steps: {
|
|
5
|
-
label: string;
|
|
6
|
-
}[];
|
|
7
|
-
onClick?: (change: number) => void;
|
|
8
|
-
}
|
|
9
|
-
export declare const Stepper: FC<IStepperProps>;
|
|
1
|
+
import { FC } from '@helpers';
|
|
2
|
+
export interface IStepperProps {
|
|
3
|
+
currentStep: number;
|
|
4
|
+
steps: {
|
|
5
|
+
label: string;
|
|
6
|
+
}[];
|
|
7
|
+
onClick?: (change: number) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const Stepper: FC<IStepperProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './switch';
|
|
1
|
+
export * from './switch';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { InputHTMLAttributes } from 'react';
|
|
2
|
-
import { FC } from '@helpers';
|
|
3
|
-
interface InputElementProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
4
|
-
label?: string;
|
|
5
|
-
name?: string;
|
|
6
|
-
key?: string;
|
|
7
|
-
checked?: boolean;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
onChange?: (checked: boolean) => void;
|
|
10
|
-
helpText?: string;
|
|
11
|
-
}
|
|
12
|
-
export declare const Switch: FC<InputElementProps>;
|
|
13
|
-
export {};
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
import { FC } from '@helpers';
|
|
3
|
+
interface InputElementProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
4
|
+
label?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
key?: string;
|
|
7
|
+
checked?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
onChange?: (checked: boolean) => void;
|
|
10
|
+
helpText?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const Switch: FC<InputElementProps>;
|
|
13
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './useTable';
|
|
2
|
-
export * from './useFilteredRows';
|
|
3
|
-
export * from './usePaginatedRows';
|
|
4
|
-
export * from './useSortedRows';
|
|
1
|
+
export * from './useTable';
|
|
2
|
+
export * from './useFilteredRows';
|
|
3
|
+
export * from './usePaginatedRows';
|
|
4
|
+
export * from './useSortedRows';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export interface IFilter<D> {
|
|
2
|
-
fn?: string | ((el: D) => boolean);
|
|
3
|
-
mode?: 'fuzzy' | 'exact';
|
|
4
|
-
}
|
|
5
|
-
export declare function useFilteredRows<D>(data: D[], state: IFilter<D>): D[];
|
|
1
|
+
export interface IFilter<D> {
|
|
2
|
+
fn?: string | ((el: D) => boolean);
|
|
3
|
+
mode?: 'fuzzy' | 'exact';
|
|
4
|
+
}
|
|
5
|
+
export declare function useFilteredRows<D>(data: D[], state: IFilter<D>): D[];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export interface IPagination {
|
|
2
|
-
pageIndex: number;
|
|
3
|
-
pageSize: number;
|
|
4
|
-
}
|
|
5
|
-
export declare function usePaginatedRows<D>(data: D[], pagination: IPagination): {
|
|
6
|
-
rows: D[];
|
|
7
|
-
pagination: {
|
|
8
|
-
pageIndex: number;
|
|
9
|
-
pageCount: number;
|
|
10
|
-
pageSize: number;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
1
|
+
export interface IPagination {
|
|
2
|
+
pageIndex: number;
|
|
3
|
+
pageSize: number;
|
|
4
|
+
}
|
|
5
|
+
export declare function usePaginatedRows<D>(data: D[], pagination: IPagination): {
|
|
6
|
+
rows: D[];
|
|
7
|
+
pagination: {
|
|
8
|
+
pageIndex: number;
|
|
9
|
+
pageCount: number;
|
|
10
|
+
pageSize: number;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export interface ISort<D> {
|
|
2
|
-
direction: 'ASC' | 'DESC' | 'NONE';
|
|
3
|
-
getter: (a: D) => D[keyof D];
|
|
4
|
-
}
|
|
5
|
-
/** runs the given rows through each of the sort functions */
|
|
6
|
-
export declare function useSortedRows<D>(data: D[], sort: ISort<D>[]): D[];
|
|
1
|
+
export interface ISort<D> {
|
|
2
|
+
direction: 'ASC' | 'DESC' | 'NONE';
|
|
3
|
+
getter: (a: D) => D[keyof D];
|
|
4
|
+
}
|
|
5
|
+
/** runs the given rows through each of the sort functions */
|
|
6
|
+
export declare function useSortedRows<D>(data: D[], sort: ISort<D>[]): D[];
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { IPagination } from './usePaginatedRows';
|
|
2
|
-
import { ISort } from './useSortedRows';
|
|
3
|
-
import { IFilter } from './useFilteredRows';
|
|
4
|
-
export interface IUseTableProps<D> {
|
|
5
|
-
data: D[];
|
|
6
|
-
initialState: IInitialTableState<D>;
|
|
7
|
-
}
|
|
8
|
-
export interface IUseTableResult<D> {
|
|
9
|
-
rows: D[];
|
|
10
|
-
allRows: D[];
|
|
11
|
-
goto: (pageIndex: number) => void;
|
|
12
|
-
sortBy: (sort: {
|
|
13
|
-
id: string;
|
|
14
|
-
getter: (el: D) => D[keyof D];
|
|
15
|
-
}) => void;
|
|
16
|
-
getSort: (id: string) => 'ASC' | 'DESC' | 'NONE';
|
|
17
|
-
filterBy: (filter: string | ((el: D) => boolean)) => void;
|
|
18
|
-
pagination: {
|
|
19
|
-
pageIndex: number;
|
|
20
|
-
pageSize: number;
|
|
21
|
-
pageCount: number;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
export declare function useTable<D>(props: IUseTableProps<D>): IUseTableResult<D>;
|
|
25
|
-
export interface ITableState<D> {
|
|
26
|
-
pagination: IPagination;
|
|
27
|
-
filter: IFilter<D>;
|
|
28
|
-
sort: (ISort<D> & {
|
|
29
|
-
id: string;
|
|
30
|
-
})[];
|
|
31
|
-
}
|
|
32
|
-
interface IInitialTableState<D> {
|
|
33
|
-
pagination?: {
|
|
34
|
-
pageIndex: number;
|
|
35
|
-
pageSize: number;
|
|
36
|
-
};
|
|
37
|
-
filter?: {
|
|
38
|
-
fn: string | ((el: D) => boolean);
|
|
39
|
-
mode: 'fuzzy' | 'exact';
|
|
40
|
-
};
|
|
41
|
-
sort?: {
|
|
42
|
-
id: string;
|
|
43
|
-
getter: (a: D) => D[keyof D];
|
|
44
|
-
direction: 'ASC' | 'DESC';
|
|
45
|
-
}[];
|
|
46
|
-
}
|
|
47
|
-
export {};
|
|
1
|
+
import { IPagination } from './usePaginatedRows';
|
|
2
|
+
import { ISort } from './useSortedRows';
|
|
3
|
+
import { IFilter } from './useFilteredRows';
|
|
4
|
+
export interface IUseTableProps<D> {
|
|
5
|
+
data: D[];
|
|
6
|
+
initialState: IInitialTableState<D>;
|
|
7
|
+
}
|
|
8
|
+
export interface IUseTableResult<D> {
|
|
9
|
+
rows: D[];
|
|
10
|
+
allRows: D[];
|
|
11
|
+
goto: (pageIndex: number) => void;
|
|
12
|
+
sortBy: (sort: {
|
|
13
|
+
id: string;
|
|
14
|
+
getter: (el: D) => D[keyof D];
|
|
15
|
+
}) => void;
|
|
16
|
+
getSort: (id: string) => 'ASC' | 'DESC' | 'NONE';
|
|
17
|
+
filterBy: (filter: string | ((el: D) => boolean)) => void;
|
|
18
|
+
pagination: {
|
|
19
|
+
pageIndex: number;
|
|
20
|
+
pageSize: number;
|
|
21
|
+
pageCount: number;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export declare function useTable<D>(props: IUseTableProps<D>): IUseTableResult<D>;
|
|
25
|
+
export interface ITableState<D> {
|
|
26
|
+
pagination: IPagination;
|
|
27
|
+
filter: IFilter<D>;
|
|
28
|
+
sort: (ISort<D> & {
|
|
29
|
+
id: string;
|
|
30
|
+
})[];
|
|
31
|
+
}
|
|
32
|
+
interface IInitialTableState<D> {
|
|
33
|
+
pagination?: {
|
|
34
|
+
pageIndex: number;
|
|
35
|
+
pageSize: number;
|
|
36
|
+
};
|
|
37
|
+
filter?: {
|
|
38
|
+
fn: string | ((el: D) => boolean);
|
|
39
|
+
mode: 'fuzzy' | 'exact';
|
|
40
|
+
};
|
|
41
|
+
sort?: {
|
|
42
|
+
id: string;
|
|
43
|
+
getter: (a: D) => D[keyof D];
|
|
44
|
+
direction: 'ASC' | 'DESC';
|
|
45
|
+
}[];
|
|
46
|
+
}
|
|
47
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './table';
|
|
2
|
-
export * from './hooks';
|
|
1
|
+
export * from './table';
|
|
2
|
+
export * from './hooks';
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { FC } from '@helpers';
|
|
2
|
-
import { HTMLAttributes } from 'react';
|
|
3
|
-
export declare const Table: import("styled-components").StyledComponent<"table", any, {}, never>;
|
|
4
|
-
export declare const TBody: import("styled-components").StyledComponent<"tbody", any, {}, never>;
|
|
5
|
-
export declare const TableHeaderFrame: import("styled-components").StyledComponent<"th", any, {}, never>;
|
|
6
|
-
export interface ITHProps extends HTMLAttributes<HTMLTableCellElement> {
|
|
7
|
-
isPlaceholder?: boolean;
|
|
8
|
-
sort?: 'ASC' | 'DESC' | 'NONE';
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
Select: FC;
|
|
12
|
-
Actions: FC;
|
|
13
|
-
};
|
|
14
|
-
export declare const TH: FC<ITHProps, THSubComponents>;
|
|
15
|
-
export interface ITDProps extends HTMLAttributes<HTMLTableCellElement> {
|
|
16
|
-
fitContent?: boolean;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
Select: FC;
|
|
20
|
-
Actions: FC;
|
|
21
|
-
Action: FC;
|
|
22
|
-
};
|
|
23
|
-
export declare const TD: FC<ITDProps, TDSubComponents>;
|
|
24
|
-
export declare const TR: import("styled-components").StyledComponent<"tr", any, {
|
|
25
|
-
selected?: boolean
|
|
26
|
-
}, never>;
|
|
27
|
-
export declare const THead: import("styled-components").StyledComponent<"thead", any, {}, never>;
|
|
28
|
-
export {};
|
|
1
|
+
import { FC } from '@helpers';
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
3
|
+
export declare const Table: import("styled-components").StyledComponent<"table", any, {}, never>;
|
|
4
|
+
export declare const TBody: import("styled-components").StyledComponent<"tbody", any, {}, never>;
|
|
5
|
+
export declare const TableHeaderFrame: import("styled-components").StyledComponent<"th", any, {}, never>;
|
|
6
|
+
export interface ITHProps extends HTMLAttributes<HTMLTableCellElement> {
|
|
7
|
+
isPlaceholder?: boolean;
|
|
8
|
+
sort?: 'ASC' | 'DESC' | 'NONE';
|
|
9
|
+
}
|
|
10
|
+
type THSubComponents = {
|
|
11
|
+
Select: FC;
|
|
12
|
+
Actions: FC;
|
|
13
|
+
};
|
|
14
|
+
export declare const TH: FC<ITHProps, THSubComponents>;
|
|
15
|
+
export interface ITDProps extends HTMLAttributes<HTMLTableCellElement> {
|
|
16
|
+
fitContent?: boolean;
|
|
17
|
+
}
|
|
18
|
+
type TDSubComponents = {
|
|
19
|
+
Select: FC;
|
|
20
|
+
Actions: FC;
|
|
21
|
+
Action: FC;
|
|
22
|
+
};
|
|
23
|
+
export declare const TD: FC<ITDProps, TDSubComponents>;
|
|
24
|
+
export declare const TR: import("styled-components").StyledComponent<"tr", any, {
|
|
25
|
+
selected?: boolean;
|
|
26
|
+
}, never>;
|
|
27
|
+
export declare const THead: import("styled-components").StyledComponent<"thead", any, {}, never>;
|
|
28
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './tab';
|
|
1
|
+
export * from './tab';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
-
import { FC, PropsWithChildren } from '@helpers';
|
|
3
|
-
export interface ITabProps extends PropsWithChildren, HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
Prefix?: FC<HTMLAttributes<HTMLElement>>;
|
|
5
|
-
selected?: boolean;
|
|
6
|
-
secondary?: boolean;
|
|
7
|
-
subdued?: boolean;
|
|
8
|
-
hidden?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare const Tab: FC<ITabProps>;
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { FC, PropsWithChildren } from '@helpers';
|
|
3
|
+
export interface ITabProps extends PropsWithChildren, HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
Prefix?: FC<HTMLAttributes<HTMLElement>>;
|
|
5
|
+
selected?: boolean;
|
|
6
|
+
secondary?: boolean;
|
|
7
|
+
subdued?: boolean;
|
|
8
|
+
hidden?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const Tab: FC<ITabProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './tabs';
|
|
1
|
+
export * from './tabs';
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
-
import { FC, PropsWithChildren, Slot, StylableSlot } from '@helpers';
|
|
3
|
-
declare class Content extends StylableSlot {
|
|
4
|
-
}
|
|
5
|
-
declare class Navigation extends Slot {
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
Content: typeof Content;
|
|
9
|
-
TabList: typeof Navigation;
|
|
10
|
-
};
|
|
11
|
-
interface ITabsProps extends PropsWithChildren, Omit<HTMLAttributes<HTMLElement>, 'onChange'> {
|
|
12
|
-
secondary?: boolean;
|
|
13
|
-
subdued?: boolean;
|
|
14
|
-
selected: number;
|
|
15
|
-
onChange?: (selected: number) => void;
|
|
16
|
-
}
|
|
17
|
-
export declare const Tabs: FC<ITabsProps, SubComponents>;
|
|
18
|
-
export { Tab } from './components';
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { FC, PropsWithChildren, Slot, StylableSlot } from '@helpers';
|
|
3
|
+
declare class Content extends StylableSlot {
|
|
4
|
+
}
|
|
5
|
+
declare class Navigation extends Slot {
|
|
6
|
+
}
|
|
7
|
+
type SubComponents = {
|
|
8
|
+
Content: typeof Content;
|
|
9
|
+
TabList: typeof Navigation;
|
|
10
|
+
};
|
|
11
|
+
interface ITabsProps extends PropsWithChildren, Omit<HTMLAttributes<HTMLElement>, 'onChange'> {
|
|
12
|
+
secondary?: boolean;
|
|
13
|
+
subdued?: boolean;
|
|
14
|
+
selected: number;
|
|
15
|
+
onChange?: (selected: number) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare const Tabs: FC<ITabsProps, SubComponents>;
|
|
18
|
+
export { Tab } from './components';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FC, PropsWithChildren } from '@helpers';
|
|
2
|
-
import { HTMLAttributes } from 'react';
|
|
3
|
-
interface IProps extends HTMLAttributes<HTMLDivElement>, PropsWithChildren {
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
onClick?: () => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const CloseButton: FC<IProps>;
|
|
8
|
-
export {};
|
|
1
|
+
import { FC, PropsWithChildren } from '@helpers';
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
3
|
+
interface IProps extends HTMLAttributes<HTMLDivElement>, PropsWithChildren {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const CloseButton: FC<IProps>;
|
|
8
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './close-button';
|
|
2
|
-
export * from './tag-label';
|
|
1
|
+
export * from './close-button';
|
|
2
|
+
export * from './tag-label';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FC, PropsWithChildren } from '@helpers';
|
|
2
|
-
import { HTMLAttributes } from 'react';
|
|
3
|
-
interface IProps extends HTMLAttributes<HTMLLabelElement>, PropsWithChildren {
|
|
4
|
-
closable?: boolean;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare const TagLabel: FC<IProps>;
|
|
8
|
-
export {};
|
|
1
|
+
import { FC, PropsWithChildren } from '@helpers';
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
3
|
+
interface IProps extends HTMLAttributes<HTMLLabelElement>, PropsWithChildren {
|
|
4
|
+
closable?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const TagLabel: FC<IProps>;
|
|
8
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './tag';
|
|
1
|
+
export * from './tag';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { FC, PropsWithChildren } from '@helpers';
|
|
2
|
-
import { HTMLAttributes } from 'react';
|
|
3
|
-
interface IProps extends HTMLAttributes<HTMLDivElement>, PropsWithChildren {
|
|
4
|
-
closable?: boolean;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
className?: string;
|
|
7
|
-
onClick?: () => void;
|
|
8
|
-
}
|
|
9
|
-
export declare const Tag: FC<IProps>;
|
|
10
|
-
export {};
|
|
1
|
+
import { FC, PropsWithChildren } from '@helpers';
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
3
|
+
interface IProps extends HTMLAttributes<HTMLDivElement>, PropsWithChildren {
|
|
4
|
+
closable?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const Tag: FC<IProps>;
|
|
10
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './text-area';
|
|
1
|
+
export * from './text-area';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { FC } from '@helpers';
|
|
2
|
-
import { TextareaHTMLAttributes } from 'react';
|
|
3
|
-
export interface ITextAreaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange'> {
|
|
4
|
-
label?: string;
|
|
5
|
-
value?: string;
|
|
6
|
-
invalid?: boolean;
|
|
7
|
-
displayMaxCharacters?: boolean;
|
|
8
|
-
required?: boolean;
|
|
9
|
-
onChange?: (value: string) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const TextArea: FC<ITextAreaProps>;
|
|
1
|
+
import { FC } from '@helpers';
|
|
2
|
+
import { TextareaHTMLAttributes } from 'react';
|
|
3
|
+
export interface ITextAreaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange'> {
|
|
4
|
+
label?: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
invalid?: boolean;
|
|
7
|
+
displayMaxCharacters?: boolean;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
onChange?: (value: string) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const TextArea: FC<ITextAreaProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './text-toggle';
|
|
1
|
+
export * from './text-toggle';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { FC } from '@helpers';
|
|
2
|
-
interface TextToggleProps {
|
|
3
|
-
leftText: string;
|
|
4
|
-
rightText: string;
|
|
5
|
-
value: 'left' | 'right';
|
|
6
|
-
onChange?: (value: 'left' | 'right') => void;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare const TextToggle: FC<TextToggleProps>;
|
|
10
|
-
export {};
|
|
1
|
+
import { FC } from '@helpers';
|
|
2
|
+
interface TextToggleProps {
|
|
3
|
+
leftText: string;
|
|
4
|
+
rightText: string;
|
|
5
|
+
value: 'left' | 'right';
|
|
6
|
+
onChange?: (value: 'left' | 'right') => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const TextToggle: FC<TextToggleProps>;
|
|
10
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './thumbnail';
|
|
1
|
+
export * from './thumbnail';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { MappedEnum, RequireOnlyOne, PropsWithChildren } from '@helpers';
|
|
2
|
-
declare const enum ThumbnailSize {
|
|
3
|
-
small = 1,
|
|
4
|
-
medium = 2,
|
|
5
|
-
large = 4
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
export declare function getValuesBySize(props: ThumbnailSizeProps): string;
|
|
10
|
-
export {};
|
|
1
|
+
import { MappedEnum, RequireOnlyOne, PropsWithChildren } from '@helpers';
|
|
2
|
+
declare const enum ThumbnailSize {
|
|
3
|
+
small = 1,
|
|
4
|
+
medium = 2,
|
|
5
|
+
large = 4
|
|
6
|
+
}
|
|
7
|
+
type ThumbnailSizes<T> = MappedEnum<typeof ThumbnailSize, T>;
|
|
8
|
+
export type ThumbnailSizeProps = Partial<RequireOnlyOne<ThumbnailSizes<boolean>>> & PropsWithChildren;
|
|
9
|
+
export declare function getValuesBySize(props: ThumbnailSizeProps): string;
|
|
10
|
+
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { FC } from '@helpers';
|
|
2
|
-
import { ThumbnailSizeProps } from './thumbnail-size-flags';
|
|
3
|
-
interface IThumbnailProps {
|
|
4
|
-
imageUrl?: string;
|
|
5
|
-
imageLabel?: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export declare const Thumbnail: FC<IProps>;
|
|
10
|
-
export {};
|
|
1
|
+
import { FC } from '@helpers';
|
|
2
|
+
import { ThumbnailSizeProps } from './thumbnail-size-flags';
|
|
3
|
+
interface IThumbnailProps {
|
|
4
|
+
imageUrl?: string;
|
|
5
|
+
imageLabel?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
type IProps = IThumbnailProps & ThumbnailSizeProps;
|
|
9
|
+
export declare const Thumbnail: FC<IProps>;
|
|
10
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './toast';
|
|
1
|
+
export * from './toast';
|