@v-miniapp/ui-react 1.0.37 → 1.0.38

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 (203) hide show
  1. package/dist/components/alert/alert.d.ts +12 -0
  2. package/dist/components/alert/index.d.ts +1 -0
  3. package/dist/components/app/components/app.d.ts +13 -0
  4. package/dist/components/app/components/bottom-tab-bar.d.ts +2 -0
  5. package/dist/components/app/components/link.d.ts +8 -0
  6. package/dist/components/app/components/navigation-analytic.d.ts +2 -0
  7. package/dist/components/app/components/navigation-bar.d.ts +2 -0
  8. package/dist/components/app/components/page-layout.d.ts +3 -0
  9. package/dist/components/app/components/pages-render.d.ts +2 -0
  10. package/dist/components/app/context/location-key.d.ts +4 -0
  11. package/dist/components/app/hooks/use-app-pause.d.ts +1 -0
  12. package/dist/components/app/hooks/use-app-resume.d.ts +1 -0
  13. package/dist/components/app/hooks/use-app-state.d.ts +7 -0
  14. package/dist/components/app/hooks/use-bottom-tab-bar.d.ts +13 -0
  15. package/dist/components/app/hooks/use-custom-icon-event.d.ts +1 -0
  16. package/dist/components/app/hooks/use-did-hide.d.ts +1 -0
  17. package/dist/components/app/hooks/use-did-show.d.ts +1 -0
  18. package/dist/components/app/hooks/use-history.d.ts +2 -0
  19. package/dist/components/app/hooks/use-location.d.ts +1 -0
  20. package/dist/components/app/hooks/use-navigate.d.ts +1 -0
  21. package/dist/components/app/hooks/use-navigation-bar.d.ts +12 -0
  22. package/dist/components/app/hooks/use-navigation-type.d.ts +1 -0
  23. package/dist/components/app/hooks/use-page-config.d.ts +1 -0
  24. package/dist/components/app/hooks/use-page-layout.d.ts +14 -0
  25. package/dist/components/app/hooks/use-page-scroll.d.ts +5 -0
  26. package/dist/components/app/hooks/use-page-state.d.ts +6 -0
  27. package/dist/components/app/hooks/use-settings-changed.d.ts +3 -0
  28. package/dist/components/app/index.d.ts +18 -0
  29. package/dist/components/app/stores/app.d.ts +24 -0
  30. package/dist/components/app/stores/app.selector.d.ts +11 -0
  31. package/dist/components/app/types/app.d.ts +55 -0
  32. package/dist/components/app/types/navigation.d.ts +30 -0
  33. package/dist/components/app/utils/animation.d.ts +2 -0
  34. package/dist/components/app/utils/data-theme.d.ts +5 -0
  35. package/dist/components/app/utils/history.d.ts +7 -0
  36. package/dist/components/avatar/avatar.d.ts +15 -0
  37. package/dist/components/avatar/index.d.ts +1 -0
  38. package/dist/components/badge/badge.d.ts +8 -0
  39. package/dist/components/badge/index.d.ts +1 -0
  40. package/dist/components/bottom-tab-bar/bottom-tab-bar.d.ts +22 -0
  41. package/dist/components/bottom-tab-bar/index.d.ts +1 -0
  42. package/dist/components/button/button.const.d.ts +3 -0
  43. package/dist/components/button/button.d.ts +20 -0
  44. package/dist/components/button/index.d.ts +1 -0
  45. package/dist/components/calendar/calendar-range-sheet.d.ts +14 -0
  46. package/dist/components/calendar/calendar-single-sheet.d.ts +14 -0
  47. package/dist/components/calendar/calendar.d.ts +10 -0
  48. package/dist/components/calendar/default-render.d.ts +3 -0
  49. package/dist/components/calendar/index.d.ts +1 -0
  50. package/dist/components/calendar/range-picker.d.ts +11 -0
  51. package/dist/components/calendar/single-picker.d.ts +9 -0
  52. package/dist/components/calendar/utils.d.ts +60 -0
  53. package/dist/components/carousel/carousel.d.ts +15 -0
  54. package/dist/components/carousel/index.d.ts +1 -0
  55. package/dist/components/carousel/use-carousel.d.ts +27 -0
  56. package/dist/components/checkbox/check-icon.d.ts +6 -0
  57. package/dist/components/checkbox/checkbox.d.ts +24 -0
  58. package/dist/components/checkbox/indeterminate-icon.d.ts +6 -0
  59. package/dist/components/checkbox/index.d.ts +1 -0
  60. package/dist/components/chip/chip.d.ts +16 -0
  61. package/dist/components/chip/index.d.ts +1 -0
  62. package/dist/components/date-field/date-field-range.d.ts +76 -0
  63. package/dist/components/date-field/date-field.d.ts +56 -0
  64. package/dist/components/date-field/index.d.ts +2 -0
  65. package/dist/components/date-field/input.d.ts +6 -0
  66. package/dist/components/date-picker/date-picker-base.d.ts +32 -0
  67. package/dist/components/date-picker/date-picker-item.d.ts +14 -0
  68. package/dist/components/date-picker/date-picker-sheet.d.ts +14 -0
  69. package/dist/components/date-picker/date-picker.constant.d.ts +8 -0
  70. package/dist/components/date-picker/date-picker.d.ts +17 -0
  71. package/dist/components/date-picker/date-picker.utils.d.ts +31 -0
  72. package/dist/components/date-picker/index.d.ts +2 -0
  73. package/dist/components/dialog/dialog.d.ts +20 -0
  74. package/dist/components/dialog/index.d.ts +1 -0
  75. package/dist/components/dropdown/dropdown-base.d.ts +6 -0
  76. package/dist/components/dropdown/dropdown.d.ts +33 -0
  77. package/dist/components/dropdown/index.d.ts +2 -0
  78. package/dist/components/error/error-boundary.d.ts +15 -0
  79. package/dist/components/error/error.d.ts +10 -0
  80. package/dist/components/error/index.d.ts +1 -0
  81. package/dist/components/freeze/index.d.ts +11 -0
  82. package/dist/components/icon/icon-mapping.d.ts +246 -0
  83. package/dist/components/icon/icon.d.ts +29 -0
  84. package/dist/components/icon/index.d.ts +1 -0
  85. package/dist/components/image/image.d.ts +10 -0
  86. package/dist/components/image/index.d.ts +1 -0
  87. package/dist/components/index.d.ts +43 -0
  88. package/dist/components/input-wrapper/index.d.ts +1 -0
  89. package/dist/components/input-wrapper/input-wrapper.d.ts +33 -0
  90. package/dist/components/label/index.d.ts +1 -0
  91. package/dist/components/label/label.d.ts +11 -0
  92. package/dist/components/layout/app.d.ts +3 -0
  93. package/dist/components/layout/index.d.ts +2 -0
  94. package/dist/components/layout/page-loading.d.ts +6 -0
  95. package/dist/components/layout/page.d.ts +18 -0
  96. package/dist/components/list-item/index.d.ts +1 -0
  97. package/dist/components/list-item/list-item.d.ts +12 -0
  98. package/dist/components/navigation-bar/index.d.ts +1 -0
  99. package/dist/components/navigation-bar/navigation-bar.d.ts +26 -0
  100. package/dist/components/number-field/index.d.ts +1 -0
  101. package/dist/components/number-field/number-field.d.ts +23 -0
  102. package/dist/components/old-date-picker/date-picker-base.d.ts +32 -0
  103. package/dist/components/old-date-picker/date-picker-item.d.ts +11 -0
  104. package/dist/components/old-date-picker/date-picker-sheet.d.ts +14 -0
  105. package/dist/components/old-date-picker/date-picker.constant.d.ts +3 -0
  106. package/dist/components/old-date-picker/date-picker.d.ts +21 -0
  107. package/dist/components/old-date-picker/index.d.ts +2 -0
  108. package/dist/components/option-item/index.d.ts +1 -0
  109. package/dist/components/option-item/option-item.d.ts +10 -0
  110. package/dist/components/pagination/index.d.ts +1 -0
  111. package/dist/components/pagination/pagination.d.ts +7 -0
  112. package/dist/components/pull-to-refresh/index.d.ts +1 -0
  113. package/dist/components/pull-to-refresh/pull-to-refresh.d.ts +17 -0
  114. package/dist/components/radio/index.d.ts +1 -0
  115. package/dist/components/radio/radio.d.ts +19 -0
  116. package/dist/components/rating/index.d.ts +1 -0
  117. package/dist/components/rating/rating.d.ts +12 -0
  118. package/dist/components/rating/star.d.ts +6 -0
  119. package/dist/components/search-field/index.d.ts +1 -0
  120. package/dist/components/search-field/search-field.d.ts +4 -0
  121. package/dist/components/section/index.d.ts +3 -0
  122. package/dist/components/section/section-content.d.ts +3 -0
  123. package/dist/components/section/section-title.d.ts +12 -0
  124. package/dist/components/section/section.d.ts +6 -0
  125. package/dist/components/seo/index.d.ts +2 -0
  126. package/dist/components/seo/seo.d.ts +7 -0
  127. package/dist/components/seo/seo.type.d.ts +85 -0
  128. package/dist/components/sheet/index.d.ts +4 -0
  129. package/dist/components/sheet/sheet-body.d.ts +6 -0
  130. package/dist/components/sheet/sheet-footer.d.ts +5 -0
  131. package/dist/components/sheet/sheet-header.d.ts +11 -0
  132. package/dist/components/sheet/sheet.d.ts +11 -0
  133. package/dist/components/skeleton/index.d.ts +1 -0
  134. package/dist/components/skeleton/skeleton.d.ts +13 -0
  135. package/dist/components/switch/index.d.ts +1 -0
  136. package/dist/components/switch/switch.d.ts +16 -0
  137. package/dist/components/tab-bar/index.d.ts +1 -0
  138. package/dist/components/tab-bar/tab-bar.d.ts +26 -0
  139. package/dist/components/tab-bar/tab.d.ts +6 -0
  140. package/dist/components/text-area/index.d.ts +1 -0
  141. package/dist/components/text-area/text-area.d.ts +15 -0
  142. package/dist/components/text-field/index.d.ts +1 -0
  143. package/dist/components/text-field/text-field.d.ts +18 -0
  144. package/dist/components/toast/index.d.ts +1 -0
  145. package/dist/components/toast/toast-provider.d.ts +2 -0
  146. package/dist/components/toast/toast.d.ts +20 -0
  147. package/dist/components/toast/toast.store.d.ts +25 -0
  148. package/dist/components/tooltip/index.d.ts +1 -0
  149. package/dist/components/tooltip/tooltip.d.ts +10 -0
  150. package/dist/components/typography/index.d.ts +1 -0
  151. package/dist/components/typography/typography.d.ts +13 -0
  152. package/dist/components/uploader/helper.d.ts +5 -0
  153. package/dist/components/uploader/index.d.ts +1 -0
  154. package/dist/components/uploader/type.d.ts +9 -0
  155. package/dist/components/uploader/uploader.d.ts +18 -0
  156. package/dist/components/visibility-sensor/index.d.ts +1 -0
  157. package/dist/components/visibility-sensor/visibility-sensor.d.ts +9 -0
  158. package/dist/external/index.js +15758 -0
  159. package/dist/external/styles.css +1 -0
  160. package/dist/hooks/use-analytic.d.ts +1 -0
  161. package/dist/hooks/use-is-using-app.d.ts +1 -0
  162. package/dist/hooks/use-is-using-locales.d.ts +1 -0
  163. package/dist/hooks/use-swipe-navigation.d.ts +2 -0
  164. package/dist/index.d.ts +3 -0
  165. package/dist/index.js +7677 -0
  166. package/dist/locales/defaultResources/en.d.ts +27 -0
  167. package/dist/locales/defaultResources/vi.d.ts +27 -0
  168. package/dist/locales/fns.d.ts +6 -0
  169. package/dist/locales/hooks.d.ts +9 -0
  170. package/dist/locales/index.d.ts +4 -0
  171. package/dist/locales/provider.d.ts +6 -0
  172. package/dist/locales/store.d.ts +13 -0
  173. package/dist/locales/types.d.ts +37 -0
  174. package/dist/locales/utils.d.ts +2 -0
  175. package/dist/styles.css +1 -0
  176. package/dist/styles.d.ts +1 -0
  177. package/dist/tailwind/colors.css +369 -0
  178. package/dist/tailwind/styles.css +5 -0
  179. package/dist/types/colors.d.ts +3 -0
  180. package/dist/types/util.d.ts +1 -0
  181. package/dist/utils/analytic.d.ts +17 -0
  182. package/dist/utils/bound.d.ts +1 -0
  183. package/dist/utils/can-use-dom.d.ts +1 -0
  184. package/dist/utils/classname.d.ts +3 -0
  185. package/dist/utils/colors.d.ts +2 -0
  186. package/dist/utils/colors.gen.d.ts +368 -0
  187. package/dist/utils/convert-px.d.ts +1 -0
  188. package/dist/utils/date.d.ts +2 -0
  189. package/dist/utils/deep-clone.d.ts +1 -0
  190. package/dist/utils/dev-log.d.ts +3 -0
  191. package/dist/utils/event-emitter.d.ts +7 -0
  192. package/dist/utils/get-scroll-parent.d.ts +3 -0
  193. package/dist/utils/is-dev.d.ts +1 -0
  194. package/dist/utils/omit.d.ts +1 -0
  195. package/dist/utils/render-node.d.ts +2 -0
  196. package/dist/utils/rubberband.d.ts +2 -0
  197. package/dist/utils/sleep.d.ts +1 -0
  198. package/dist/utils/supports-passive.d.ts +1 -0
  199. package/dist/utils/to-css-length.d.ts +1 -0
  200. package/dist/utils/url.d.ts +1 -0
  201. package/dist/vsf/choose-image.d.ts +4 -0
  202. package/dist/vsf/index.d.ts +1 -0
  203. package/package.json +1 -1
@@ -0,0 +1,24 @@
1
+ import { ComponentProps, ReactNode } from 'react';
2
+ import { IOverride } from '../../types/util';
3
+ import { ITypographyProps } from '../typography';
4
+ export type ICheckboxTheme = 'brand' | 'inverse';
5
+ export type ICheckboxVariant = 'default' | 'number' | 'indeterminate';
6
+ export type ICheckboxProps = IOverride<ComponentProps<'input'>, {
7
+ className?: string;
8
+ checked?: boolean;
9
+ defaultChecked?: boolean;
10
+ disabled?: boolean;
11
+ theme?: ICheckboxTheme;
12
+ variant?: ICheckboxVariant;
13
+ number?: number;
14
+ defaultNumber?: number;
15
+ onChange?: (checked: boolean) => void;
16
+ onNumberChange?: (number: number | undefined) => void;
17
+ children?: ReactNode;
18
+ typography?: Omit<ITypographyProps<'span'>, 'component' | 'children'>;
19
+ }>;
20
+ export type ICheckboxInstance = {
21
+ focus: () => void;
22
+ blur: () => void;
23
+ };
24
+ export declare const Checkbox: import('react').ForwardRefExoticComponent<Omit<ICheckboxProps, "ref"> & import('react').RefAttributes<ICheckboxInstance>>;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ export interface IIndeterminateIconProps extends React.SVGProps<SVGSVGElement> {
3
+ fill?: string;
4
+ }
5
+ declare const IndeterminateIcon: React.FC<IIndeterminateIconProps>;
6
+ export default IndeterminateIcon;
@@ -0,0 +1 @@
1
+ export * from './checkbox';
@@ -0,0 +1,16 @@
1
+ import { IOverride } from '../../types/util';
2
+ import { ComponentPropsWithRef, FC, ReactNode } from 'react';
3
+ import { IIconProps } from '../icon';
4
+ export type IChipTheme = 'default' | 'brand' | 'neutral';
5
+ export type IChipType = 'selection' | 'dropdown' | 'action' | 'input';
6
+ export type IChipProps = IOverride<ComponentPropsWithRef<'div'>, {
7
+ theme?: IChipTheme;
8
+ type?: IChipType;
9
+ disabled?: boolean;
10
+ leadingIcon?: IIconProps | ReactNode;
11
+ trailingIcon?: IIconProps | ReactNode;
12
+ selected?: boolean;
13
+ label?: ReactNode;
14
+ count?: number;
15
+ }>;
16
+ export declare const Chip: FC<IChipProps>;
@@ -0,0 +1 @@
1
+ export * from './chip';
@@ -0,0 +1,76 @@
1
+ import { IBasicInputProps } from '../input-wrapper';
2
+ import { ComponentProps } from 'react';
3
+ import { IOverride } from '../../types/util';
4
+ import { IDatePickerSheetProps } from '../date-picker/date-picker-sheet';
5
+ import { ICalendarRangeSheetProps } from '../calendar/calendar-range-sheet';
6
+ type ICalendarPickerProps = Omit<ICalendarRangeSheetProps, 'open' | 'onCancel' | 'onSelect' | 'value' | 'title'>;
7
+ type IDatePickerPickerProps = Omit<IDatePickerSheetProps, 'open' | 'onCancel' | 'onSelect' | 'value' | 'title'>;
8
+ export type IDateFieldRangeValue = {
9
+ from?: Date | null;
10
+ to?: Date | null;
11
+ };
12
+ export type IDateFieldRangeProps = IOverride<ComponentProps<'input'>, IBasicInputProps & {
13
+ inputClassName?: string;
14
+ placeholder?: {
15
+ from?: string;
16
+ to?: string;
17
+ };
18
+ value?: IDateFieldRangeValue;
19
+ onChange?: (value: IDateFieldRangeValue) => void;
20
+ defaultValue?: IDateFieldRangeValue;
21
+ loading?: boolean;
22
+ } & ({
23
+ picker?: 'date-picker';
24
+ pickerProps?: [IDatePickerPickerProps, IDatePickerPickerProps];
25
+ } | {
26
+ picker: false;
27
+ pickerProps?: never;
28
+ } | {
29
+ picker?: 'calendar';
30
+ pickerProps?: ICalendarPickerProps;
31
+ })>;
32
+ export type IDateFieldRangeInstance = {
33
+ focus: () => void;
34
+ blur: () => void;
35
+ };
36
+ export declare const DateFieldRange: import('react').ForwardRefExoticComponent<(Omit<IBasicInputProps & {
37
+ inputClassName?: string;
38
+ placeholder?: {
39
+ from?: string;
40
+ to?: string;
41
+ };
42
+ value?: IDateFieldRangeValue;
43
+ onChange?: (value: IDateFieldRangeValue) => void;
44
+ defaultValue?: IDateFieldRangeValue;
45
+ loading?: boolean;
46
+ } & {
47
+ picker?: "date-picker";
48
+ pickerProps?: [IDatePickerPickerProps, IDatePickerPickerProps];
49
+ } & Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "placeholder" | "onChange" | "defaultValue" | "value" | "loading" | keyof IBasicInputProps | "inputClassName" | "picker" | "pickerProps">, "ref"> | Omit<IBasicInputProps & {
50
+ inputClassName?: string;
51
+ placeholder?: {
52
+ from?: string;
53
+ to?: string;
54
+ };
55
+ value?: IDateFieldRangeValue;
56
+ onChange?: (value: IDateFieldRangeValue) => void;
57
+ defaultValue?: IDateFieldRangeValue;
58
+ loading?: boolean;
59
+ } & {
60
+ picker: false;
61
+ pickerProps?: never;
62
+ } & Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "placeholder" | "onChange" | "defaultValue" | "value" | "loading" | keyof IBasicInputProps | "inputClassName" | "picker" | "pickerProps">, "ref"> | Omit<IBasicInputProps & {
63
+ inputClassName?: string;
64
+ placeholder?: {
65
+ from?: string;
66
+ to?: string;
67
+ };
68
+ value?: IDateFieldRangeValue;
69
+ onChange?: (value: IDateFieldRangeValue) => void;
70
+ defaultValue?: IDateFieldRangeValue;
71
+ loading?: boolean;
72
+ } & {
73
+ picker?: "calendar";
74
+ pickerProps?: ICalendarPickerProps;
75
+ } & Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "placeholder" | "onChange" | "defaultValue" | "value" | "loading" | keyof IBasicInputProps | "inputClassName" | "picker" | "pickerProps">, "ref">) & import('react').RefAttributes<IDateFieldRangeInstance>>;
76
+ export {};
@@ -0,0 +1,56 @@
1
+ import { ComponentProps } from 'react';
2
+ import { IBasicInputProps } from '../input-wrapper';
3
+ import { IOverride } from '../../types/util';
4
+ import { IDatePickerSheetProps } from '../date-picker/date-picker-sheet';
5
+ import { ICalendarSingleSheetProps } from '../calendar/calendar-single-sheet';
6
+ type ICalendarPickerProps = Omit<ICalendarSingleSheetProps, 'open' | 'onCancel' | 'onSelect' | 'value' | 'title'>;
7
+ type IDatePickerPickerProps = Omit<IDatePickerSheetProps, 'open' | 'onCancel' | 'onSelect' | 'value' | 'title'>;
8
+ export type IDateFieldProps = IOverride<ComponentProps<'input'>, IBasicInputProps & {
9
+ inputClassName?: string;
10
+ value?: Date | null;
11
+ defaultValue?: Date | null;
12
+ onChange?: (value: Date | null) => void;
13
+ loading?: boolean;
14
+ } & ({
15
+ picker?: 'date-picker';
16
+ pickerProps?: IDatePickerPickerProps;
17
+ } | {
18
+ picker: false;
19
+ pickerProps?: never;
20
+ } | {
21
+ picker: 'calendar';
22
+ pickerProps?: ICalendarPickerProps;
23
+ })>;
24
+ export type IDateFieldInstance = {
25
+ focus: () => void;
26
+ blur: () => void;
27
+ };
28
+ export declare const DateField: import('react').ForwardRefExoticComponent<(Omit<IBasicInputProps & {
29
+ inputClassName?: string;
30
+ value?: Date | null;
31
+ defaultValue?: Date | null;
32
+ onChange?: (value: Date | null) => void;
33
+ loading?: boolean;
34
+ } & {
35
+ picker?: "date-picker";
36
+ pickerProps?: IDatePickerPickerProps;
37
+ } & Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "onChange" | "defaultValue" | "value" | "loading" | keyof IBasicInputProps | "inputClassName" | "picker" | "pickerProps">, "ref"> | Omit<IBasicInputProps & {
38
+ inputClassName?: string;
39
+ value?: Date | null;
40
+ defaultValue?: Date | null;
41
+ onChange?: (value: Date | null) => void;
42
+ loading?: boolean;
43
+ } & {
44
+ picker: false;
45
+ pickerProps?: never;
46
+ } & Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "onChange" | "defaultValue" | "value" | "loading" | keyof IBasicInputProps | "inputClassName" | "picker" | "pickerProps">, "ref"> | Omit<IBasicInputProps & {
47
+ inputClassName?: string;
48
+ value?: Date | null;
49
+ defaultValue?: Date | null;
50
+ onChange?: (value: Date | null) => void;
51
+ loading?: boolean;
52
+ } & {
53
+ picker: "calendar";
54
+ pickerProps?: ICalendarPickerProps;
55
+ } & Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "onChange" | "defaultValue" | "value" | "loading" | keyof IBasicInputProps | "inputClassName" | "picker" | "pickerProps">, "ref">) & import('react').RefAttributes<IDateFieldInstance>>;
56
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './date-field';
2
+ export * from './date-field-range';
@@ -0,0 +1,6 @@
1
+ export declare const Input: import('react').ForwardRefExoticComponent<{
2
+ value?: Date | null;
3
+ defaultValue?: Date | null;
4
+ onChange?: (value: Date | null) => void;
5
+ onCompleted?: (value: Date, selectionIndex: number) => void;
6
+ } & Omit<Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "onChange" | "defaultValue" | "value" | "onCompleted"> & import('react').RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,32 @@
1
+ import { ComponentProps, FC } from 'react';
2
+ import { IOverride } from '../../types/util';
3
+ export type IDatePickerBaseValue = {
4
+ minutes: number;
5
+ hours: number;
6
+ days: number;
7
+ months: number;
8
+ years: number;
9
+ dayOfWeeks: number;
10
+ };
11
+ type IItemProps = {
12
+ step?: number;
13
+ min?: number;
14
+ max?: number;
15
+ renderLabel?: (item: number) => string;
16
+ };
17
+ export type IDatePickerBaseProps = IOverride<ComponentProps<'div'>, {
18
+ hour?: boolean;
19
+ day?: boolean;
20
+ month?: boolean;
21
+ year?: boolean;
22
+ minutesProps: IItemProps;
23
+ hoursProps: IItemProps;
24
+ daysProps: IItemProps;
25
+ monthsProps: IItemProps;
26
+ yearsProps: IItemProps;
27
+ dayOfWeeksProps: IItemProps;
28
+ value?: IDatePickerBaseValue;
29
+ onChange?: (value: IDatePickerBaseValue) => void;
30
+ }>;
31
+ export declare const DatePickerBase: FC<IDatePickerBaseProps>;
32
+ export {};
@@ -0,0 +1,14 @@
1
+ import { default as React, ComponentProps } from 'react';
2
+ import { EmblaCarouselType } from 'embla-carousel';
3
+ import { IOverride } from '../../types/util';
4
+ export declare const setContainerStyles: (emblaApi: EmblaCarouselType, wheelRotation: number) => void;
5
+ type IPropType = IOverride<ComponentProps<'div'>, {
6
+ items: number[];
7
+ min?: number;
8
+ max?: number;
9
+ activeIndex?: number;
10
+ renderLabel?: (item: number) => string;
11
+ onChange?: (item: number) => void;
12
+ }>;
13
+ declare const DatePickerItem: React.FC<IPropType>;
14
+ export { DatePickerItem };
@@ -0,0 +1,14 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { IButtonProps } from '../button';
3
+ import { IDatePickerProps } from './date-picker';
4
+ import { IOverride } from '../../types/util';
5
+ export type IDatePickerSheetProps = IOverride<Omit<IDatePickerProps, 'value' | 'onChange'>, {
6
+ title?: ReactNode;
7
+ confirmButton?: IButtonProps;
8
+ open?: boolean;
9
+ onCancel?: () => void;
10
+ value?: Date | null;
11
+ defaultValue?: Date | null;
12
+ onSelect?: (value: Date) => void;
13
+ }>;
14
+ export declare const DatePickerSheet: FC<IDatePickerSheetProps>;
@@ -0,0 +1,8 @@
1
+ declare const prefixClassName: string;
2
+ declare const itemConfig: {
3
+ readonly CIRCLE_DEGREES: 360;
4
+ readonly WHEEL_ITEM_SIZE: 24;
5
+ readonly WHEEL_ITEM_COUNT: 80;
6
+ readonly WHEEL_ITEMS_IN_VIEW: 4;
7
+ };
8
+ export { prefixClassName, itemConfig };
@@ -0,0 +1,17 @@
1
+ import { ComponentProps, FC } from 'react';
2
+ import { IOverride } from '../../types/util';
3
+ import { ITypePickerProps } from './date-picker.utils';
4
+ type IDatePickerProps = IOverride<ComponentProps<'div'>, {
5
+ hour?: boolean;
6
+ day?: boolean;
7
+ month?: boolean;
8
+ year?: boolean;
9
+ min?: Date | null;
10
+ max?: Date | null;
11
+ renderLabels?: ITypePickerProps['renderLabels'];
12
+ value?: Date;
13
+ onChange?: (value: Date) => void;
14
+ }>;
15
+ declare const DatePicker: FC<IDatePickerProps>;
16
+ export { DatePicker };
17
+ export type { IDatePickerProps };
@@ -0,0 +1,31 @@
1
+ type ITypePickerProps = {
2
+ type: 'year' | 'month' | 'day' | 'hour' | 'minute' | 'dayOfWeek';
3
+ value: Date;
4
+ max?: Date | null;
5
+ min?: Date | null;
6
+ renderLabels?: {
7
+ minutes?: (value: number) => string;
8
+ hours?: (value: number) => string;
9
+ days?: (value: number) => string;
10
+ months?: (value: number) => string;
11
+ years?: (value: number) => string;
12
+ dayOfWeeks?: (value: number) => string;
13
+ };
14
+ hasHour?: boolean;
15
+ };
16
+ declare const getTypePickerProps: (params: ITypePickerProps) => {
17
+ renderLabel: ((value: number) => string) | undefined;
18
+ max: number | undefined;
19
+ min: number | undefined;
20
+ };
21
+ declare const getRanges: (from: number, to: number, step: number) => number[];
22
+ declare const getActiveIndex: (items: number[], value: number) => number;
23
+ declare const renderHoursLabel: (value: number) => string;
24
+ declare const renderMinutesLabel: (value: number) => string;
25
+ declare const renderDaysLabel: (value: number) => string;
26
+ declare const renderMonthsLabel: (value: number) => string;
27
+ declare const renderMonthsThumbLabel: (value: number) => string;
28
+ declare const renderYearsLabel: (value: number) => string;
29
+ declare const renderDayOfWeeksLabel: (value: number) => string;
30
+ export { getRanges, getActiveIndex, renderHoursLabel, renderMinutesLabel, renderDaysLabel, renderMonthsLabel, renderMonthsThumbLabel, renderYearsLabel, renderDayOfWeeksLabel, getTypePickerProps, };
31
+ export type { ITypePickerProps };
@@ -0,0 +1,2 @@
1
+ export * from './date-picker';
2
+ export * from './date-picker-base';
@@ -0,0 +1,20 @@
1
+ import { IOverride } from '../../types/util';
2
+ import { ComponentPropsWithRef, FC, ReactNode } from 'react';
3
+ type IRawDialogProps = IOverride<ComponentPropsWithRef<'div'>, {
4
+ topImageUrl?: string;
5
+ top?: ReactNode;
6
+ title?: ReactNode;
7
+ description?: ReactNode;
8
+ children?: ReactNode;
9
+ closeAction?: boolean;
10
+ footer?: ReactNode;
11
+ overlay?: 'default' | 'blur';
12
+ open?: boolean;
13
+ onBackdropClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
14
+ onCloseClick?: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
15
+ }>;
16
+ export type IDialogProps = IRawDialogProps & {
17
+ portal?: boolean;
18
+ };
19
+ export declare const Dialog: FC<IDialogProps>;
20
+ export {};
@@ -0,0 +1 @@
1
+ export * from './dialog';
@@ -0,0 +1,6 @@
1
+ import { FC } from 'react';
2
+ import { IInputWrapperProps } from '../input-wrapper';
3
+ export type IDropdownBaseProps = IInputWrapperProps & {
4
+ loading?: boolean;
5
+ };
6
+ export declare const DropdownBase: FC<IDropdownBaseProps>;
@@ -0,0 +1,33 @@
1
+ import { ReactNode } from 'react';
2
+ import { IBasicInputProps } from '../input-wrapper';
3
+ import { ISearchFieldProps } from '../search-field';
4
+ export type IDropdownOption<Value = any, Data = any> = {
5
+ value: Value;
6
+ label: ReactNode;
7
+ data?: Data;
8
+ };
9
+ export type IDropdownProps<Value = any, Data = any> = IBasicInputProps & {
10
+ placeholder?: string;
11
+ options: IDropdownOption<Value, Data>[];
12
+ value?: Value;
13
+ onChange?: (value: Value) => void;
14
+ renderLabel?: (option: IDropdownOption<Value, Data>, value: Value) => ReactNode;
15
+ renderItem?: (option: IDropdownOption<Value, Data>, context: {
16
+ options: IDropdownOption<Value, Data>[];
17
+ value: Value;
18
+ index: number;
19
+ }) => ReactNode;
20
+ renderValue?: (option: IDropdownOption<Value, Data>) => ReactNode;
21
+ sheetTitle?: ReactNode;
22
+ allowSearch?: boolean;
23
+ searchFilter?: (option: IDropdownOption<Value, Data>, search: string) => boolean;
24
+ searchProps?: ISearchFieldProps;
25
+ emptyText?: ReactNode;
26
+ children?: ReactNode;
27
+ loading?: boolean;
28
+ };
29
+ export type IDropdownInstance = {
30
+ open: () => void;
31
+ close: () => void;
32
+ };
33
+ export declare const Dropdown: <Value, Data>(props: IDropdownProps<Value, Data> & React.RefAttributes<IDropdownInstance>) => ReactNode;
@@ -0,0 +1,2 @@
1
+ export * from './dropdown';
2
+ export * from './dropdown-base';
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ type IErrorBoundaryProps = {
3
+ children: React.ReactNode;
4
+ isGlobal?: boolean;
5
+ };
6
+ type IErrorBoundaryState = {
7
+ hasError: boolean;
8
+ error: Error | null;
9
+ };
10
+ export declare class ErrorBoundary extends React.Component<IErrorBoundaryProps, IErrorBoundaryState> {
11
+ constructor(props: IErrorBoundaryProps);
12
+ static getDerivedStateFromError(error: Error): Partial<IErrorBoundaryState>;
13
+ render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
14
+ }
15
+ export {};
@@ -0,0 +1,10 @@
1
+ import { IOverride } from '../../types/util';
2
+ import { ComponentProps, FC, ReactNode } from 'react';
3
+ import { IButtonProps } from '../button';
4
+ export type IErrorComponentProps = IOverride<ComponentProps<'div'>, {
5
+ image?: ReactNode;
6
+ title?: ReactNode;
7
+ description?: ReactNode;
8
+ button?: IButtonProps;
9
+ }>;
10
+ export declare const ErrorComponent: FC<IErrorComponentProps>;
@@ -0,0 +1 @@
1
+ export * from './error';
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ type ISuspenderProps = {
3
+ freeze: boolean;
4
+ children: React.ReactNode;
5
+ };
6
+ type IFreezeProps = ISuspenderProps & {
7
+ placeholder?: React.ReactNode;
8
+ delay?: number;
9
+ };
10
+ export declare function Freeze({ freeze, delay, children, placeholder, }: IFreezeProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};