@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.
Files changed (198) hide show
  1. package/index.cjs +1 -1
  2. package/index.d.ts +2 -2
  3. package/index.js +1 -1
  4. package/lib/components/alert-banner/alert-banner.d.ts +18 -18
  5. package/lib/components/alert-banner/alert-level-flags.d.ts +18 -18
  6. package/lib/components/alert-banner/index.d.ts +1 -1
  7. package/lib/components/autocomplete-input/autocomplete-input.d.ts +39 -39
  8. package/lib/components/autocomplete-input/index.d.ts +1 -1
  9. package/lib/components/badge/badge-type-flags.d.ts +18 -18
  10. package/lib/components/badge/badge.d.ts +7 -7
  11. package/lib/components/badge/index.d.ts +1 -1
  12. package/lib/components/card/atoms/card-frame.d.ts +7 -7
  13. package/lib/components/card/atoms/index.d.ts +1 -1
  14. package/lib/components/card/card.d.ts +14 -14
  15. package/lib/components/card/components/card-alert-banner-slot.d.ts +5 -6
  16. package/lib/components/card/components/card-controls-slot.d.ts +4 -5
  17. package/lib/components/card/components/card-section-slot.d.ts +11 -11
  18. package/lib/components/card/components/index.d.ts +3 -3
  19. package/lib/components/card/index.d.ts +3 -3
  20. package/lib/components/card/molecules/index.d.ts +1 -1
  21. package/lib/components/card/molecules/left-right-card.d.ts +16 -16
  22. package/lib/components/checkbox/checkbox.d.ts +11 -11
  23. package/lib/components/checkbox/helpers.d.ts +12 -12
  24. package/lib/components/checkbox/index.d.ts +1 -1
  25. package/lib/components/date-picker/components/custom-calendar.d.ts +6 -6
  26. package/lib/components/date-picker/components/index.d.ts +1 -1
  27. package/lib/components/date-picker/date-picker-utc.d.ts +9 -9
  28. package/lib/components/date-picker/date-picker.d.ts +19 -19
  29. package/lib/components/date-picker/helpers/date-picker-factory.d.ts +38 -38
  30. package/lib/components/date-picker/index.d.ts +2 -2
  31. package/lib/components/divider/divider-type-flags.d.ts +9 -9
  32. package/lib/components/divider/divider.d.ts +7 -7
  33. package/lib/components/divider/index.d.ts +1 -1
  34. package/lib/components/flag/flag-size-flags.d.ts +22 -22
  35. package/lib/components/flag/flag.d.ts +4 -4
  36. package/lib/components/flag/helpers/flag-sprite-sheet.d.ts +5 -5
  37. package/lib/components/flag/helpers/index.d.ts +1 -1
  38. package/lib/components/flag/index.d.ts +1 -1
  39. package/lib/components/flag/types.d.ts +5 -5
  40. package/lib/components/icon/icon-list.d.ts +149 -150
  41. package/lib/components/icon/icon.d.ts +149 -149
  42. package/lib/components/icon/index.d.ts +1 -1
  43. package/lib/components/index.d.ts +39 -39
  44. package/lib/components/inline-error/index.d.ts +1 -1
  45. package/lib/components/inline-error/inline-error.d.ts +7 -7
  46. package/lib/components/input-field/components/index.d.ts +2 -2
  47. package/lib/components/input-field/components/labeled-input.d.ts +11 -11
  48. package/lib/components/input-field/components/stepper.d.ts +7 -7
  49. package/lib/components/input-field/index.d.ts +4 -4
  50. package/lib/components/input-field/input-currency.d.ts +23 -22
  51. package/lib/components/input-field/input-currency.helpers.d.ts +32 -0
  52. package/lib/components/input-field/input-field.d.ts +27 -27
  53. package/lib/components/input-field/input-number.d.ts +19 -19
  54. package/lib/components/input-field/input-text.d.ts +14 -14
  55. package/lib/components/layout/flex.d.ts +16 -16
  56. package/lib/components/layout/grid-layout.d.ts +11 -11
  57. package/lib/components/layout/index.d.ts +3 -3
  58. package/lib/components/layout/left-right-layout.d.ts +33 -34
  59. package/lib/components/link/index.d.ts +1 -1
  60. package/lib/components/link/link.d.ts +14 -14
  61. package/lib/components/markdown/index.d.ts +1 -1
  62. package/lib/components/markdown/markdown.d.ts +7 -7
  63. package/lib/components/menu/index.d.ts +1 -1
  64. package/lib/components/menu/menu.d.ts +18 -18
  65. package/lib/components/modal/index.d.ts +3 -3
  66. package/lib/components/modal/modal-base.d.ts +32 -32
  67. package/lib/components/modal/modal-destructive.d.ts +16 -16
  68. package/lib/components/modal/modal.d.ts +16 -16
  69. package/lib/components/molecules/avatar/avatar-size-flags.d.ts +11 -12
  70. package/lib/components/molecules/avatar/avatar.d.ts +12 -12
  71. package/lib/components/molecules/avatar/index.d.ts +1 -1
  72. package/lib/components/molecules/button/button-flags.d.ts +44 -44
  73. package/lib/components/molecules/button/button.d.ts +12 -12
  74. package/lib/components/molecules/button/index.d.ts +1 -1
  75. package/lib/components/molecules/index.d.ts +4 -4
  76. package/lib/components/molecules/input-checkbox/index.d.ts +1 -1
  77. package/lib/components/molecules/input-checkbox/input-checkbox.d.ts +8 -8
  78. package/lib/components/molecules/simple-menu/SimpleMenu.d.ts +14 -15
  79. package/lib/components/molecules/simple-menu/index.d.ts +1 -1
  80. package/lib/components/organisms/choice-list/choice-list.d.ts +9 -9
  81. package/lib/components/organisms/choice-list/index.d.ts +1 -1
  82. package/lib/components/organisms/index.d.ts +2 -2
  83. package/lib/components/organisms/multi-choice-list/index.d.ts +1 -1
  84. package/lib/components/organisms/multi-choice-list/multi-choice-list.d.ts +11 -11
  85. package/lib/components/page-header/index.d.ts +1 -1
  86. package/lib/components/page-header/page-header.d.ts +25 -26
  87. package/lib/components/pagination/index.d.ts +1 -1
  88. package/lib/components/pagination/pagination.d.ts +10 -10
  89. package/lib/components/progress-bar/index.d.ts +1 -1
  90. package/lib/components/progress-bar/progress-bar-size-flags.d.ts +10 -10
  91. package/lib/components/progress-bar/progress-bar.d.ts +8 -8
  92. package/lib/components/radio-button/index.d.ts +1 -1
  93. package/lib/components/radio-button/radio-button.d.ts +11 -11
  94. package/lib/components/range-slider/components/bar-chart.d.ts +8 -8
  95. package/lib/components/range-slider/components/handle.d.ts +12 -12
  96. package/lib/components/range-slider/components/rail.d.ts +9 -9
  97. package/lib/components/range-slider/components/slider-component.d.ts +12 -12
  98. package/lib/components/range-slider/components/slider-inputs.d.ts +15 -16
  99. package/lib/components/range-slider/components/tick.d.ts +10 -10
  100. package/lib/components/range-slider/components/track.d.ts +11 -11
  101. package/lib/components/range-slider/index.d.ts +2 -2
  102. package/lib/components/range-slider/range-slider.d.ts +16 -16
  103. package/lib/components/range-slider/slider.d.ts +12 -12
  104. package/lib/components/range-slider/types.d.ts +11 -11
  105. package/lib/components/react-select/index.d.ts +1 -1
  106. package/lib/components/react-select/react-select.d.ts +14 -15
  107. package/lib/components/select/components/helpers.d.ts +17 -17
  108. package/lib/components/select/components/menu-container.d.ts +3 -3
  109. package/lib/components/select/components/menu-list-expanded.d.ts +6 -6
  110. package/lib/components/select/components/menu-list.d.ts +3 -3
  111. package/lib/components/select/components/menu-row.d.ts +11 -11
  112. package/lib/components/select/components/menu.d.ts +2 -3
  113. package/lib/components/select/components/option.d.ts +2 -3
  114. package/lib/components/select/components/optionMultiLevel.d.ts +2 -3
  115. package/lib/components/select/components/optionMultilevelExpanded.d.ts +5 -5
  116. package/lib/components/select/components/select-label.d.ts +1 -1
  117. package/lib/components/select/components/value-component-multi.d.ts +4 -4
  118. package/lib/components/select/components/value-component-single.d.ts +5 -4
  119. package/lib/components/select/components/value.d.ts +5 -4
  120. package/lib/components/select/index.d.ts +4 -4
  121. package/lib/components/select/select.d.ts +7 -10
  122. package/lib/components/select/types.d.ts +300 -300
  123. package/lib/components/select/utils.d.ts +16 -16
  124. package/lib/components/select-with-groups/index.d.ts +2 -2
  125. package/lib/components/select-with-groups/select-with-groups.d.ts +35 -35
  126. package/lib/components/spinner/index.d.ts +1 -1
  127. package/lib/components/spinner/spinner-size-flags.d.ts +10 -10
  128. package/lib/components/spinner/spinner.d.ts +9 -9
  129. package/lib/components/stepper/index.d.ts +1 -1
  130. package/lib/components/stepper/stepper.d.ts +9 -9
  131. package/lib/components/switch/index.d.ts +1 -1
  132. package/lib/components/switch/switch.d.ts +13 -13
  133. package/lib/components/table/hooks/index.d.ts +4 -4
  134. package/lib/components/table/hooks/useFilteredRows.d.ts +5 -5
  135. package/lib/components/table/hooks/usePaginatedRows.d.ts +12 -12
  136. package/lib/components/table/hooks/useSortedRows.d.ts +6 -6
  137. package/lib/components/table/hooks/useTable.d.ts +47 -47
  138. package/lib/components/table/index.d.ts +2 -2
  139. package/lib/components/table/table.d.ts +28 -28
  140. package/lib/components/tabs/components/index.d.ts +1 -1
  141. package/lib/components/tabs/components/tab.d.ts +10 -10
  142. package/lib/components/tabs/index.d.ts +1 -1
  143. package/lib/components/tabs/tabs.d.ts +18 -18
  144. package/lib/components/tag/components/close-button.d.ts +8 -8
  145. package/lib/components/tag/components/index.d.ts +2 -2
  146. package/lib/components/tag/components/tag-label.d.ts +8 -8
  147. package/lib/components/tag/index.d.ts +1 -1
  148. package/lib/components/tag/tag.d.ts +10 -10
  149. package/lib/components/text-area/index.d.ts +1 -1
  150. package/lib/components/text-area/text-area.d.ts +11 -11
  151. package/lib/components/text-toggle/index.d.ts +1 -1
  152. package/lib/components/text-toggle/text-toggle.d.ts +10 -10
  153. package/lib/components/thumbnail/index.d.ts +1 -1
  154. package/lib/components/thumbnail/thumbnail-size-flags.d.ts +10 -10
  155. package/lib/components/thumbnail/thumbnail.d.ts +10 -10
  156. package/lib/components/toast/index.d.ts +1 -1
  157. package/lib/components/toast/toast.d.ts +17 -17
  158. package/lib/components/tooltip/index.d.ts +1 -1
  159. package/lib/components/tooltip/tooltip.d.ts +30 -30
  160. package/lib/components/tree-view/components/tree-node.d.ts +3 -3
  161. package/lib/components/tree-view/helper.d.ts +12 -12
  162. package/lib/components/tree-view/index.d.ts +2 -2
  163. package/lib/components/tree-view/tree-view.d.ts +3 -3
  164. package/lib/components/tree-view/types.d.ts +63 -63
  165. package/lib/components/typography/index.d.ts +1 -1
  166. package/lib/components/typography/typography.d.ts +27 -27
  167. package/lib/foundations/color-system/base-palette/base-palette.d.ts +76 -76
  168. package/lib/foundations/color-system/base-palette/index.d.ts +1 -1
  169. package/lib/foundations/color-system/color-guidelines/color-guidelines.d.ts +133 -133
  170. package/lib/foundations/color-system/color-guidelines/index.d.ts +1 -1
  171. package/lib/foundations/color-system/components/color-sample.d.ts +17 -17
  172. package/lib/foundations/color-system/components/index.d.ts +1 -1
  173. package/lib/foundations/color-system/index.d.ts +2 -2
  174. package/lib/foundations/index.d.ts +4 -4
  175. package/lib/foundations/shadows/components.d.ts +8 -8
  176. package/lib/foundations/shadows/index.d.ts +1 -1
  177. package/lib/foundations/shadows/shadows.d.ts +8 -8
  178. package/lib/foundations/spacing/index.d.ts +1 -1
  179. package/lib/foundations/spacing/spacing-guidelines.d.ts +37 -37
  180. package/lib/foundations/spacing/spacing.d.ts +19 -19
  181. package/lib/foundations/typography/constants.d.ts +39 -39
  182. package/lib/foundations/typography/fonts.d.ts +1 -1
  183. package/lib/foundations/typography/index.d.ts +2 -2
  184. package/lib/foundations/typography/text-aspect-flags.d.ts +30 -30
  185. package/lib/foundations/typography/typography.d.ts +24 -24
  186. package/lib/helpers/generic-types.d.ts +21 -21
  187. package/lib/helpers/index.d.ts +10 -10
  188. package/lib/helpers/isReactElementOfType.d.ts +6 -8
  189. package/lib/helpers/nothing.d.ts +9 -10
  190. package/lib/helpers/numbers.d.ts +51 -51
  191. package/lib/helpers/safe-navigation.d.ts +26 -26
  192. package/lib/helpers/slots.d.ts +17 -17
  193. package/lib/helpers/strings.d.ts +1 -1
  194. package/lib/helpers/useClickOutside.d.ts +2 -2
  195. package/lib/helpers/useInputElementState.d.ts +30 -30
  196. package/lib/helpers/useIsMobile.d.ts +1 -1
  197. package/lib/helpers/useKeyDown.d.ts +1 -1
  198. 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, true, 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
+ 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
- declare type SpinnerSizes<T> = MappedEnum<typeof SpinnerSize, T>;
8
- export declare type SpinnerProps = Partial<RequireOnlyOne<SpinnerSizes<boolean>>> & PropsWithChildren;
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
- declare type IProps = SpinnerProps & {
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
- declare 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
- declare 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 | undefined;
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
- declare 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
+ 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
- declare type ThumbnailSizes<T> = MappedEnum<typeof ThumbnailSize, T>;
8
- export declare type ThumbnailSizeProps = Partial<RequireOnlyOne<ThumbnailSizes<boolean>>> & PropsWithChildren;
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
- declare type IProps = IThumbnailProps & ThumbnailSizeProps;
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';