@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,19 @@
1
+ import { IOverride } from '../../types/util';
2
+ import { ComponentProps, ReactNode } from 'react';
3
+ import { ITypographyProps } from '../typography';
4
+ export type IRadioTheme = 'brand' | 'neutral';
5
+ export type IRadioType = 'checkbox' | 'radio';
6
+ export type IRadioProps = IOverride<ComponentProps<'input'>, {
7
+ theme?: IRadioTheme;
8
+ type?: IRadioType;
9
+ checked?: boolean;
10
+ onChange?: (checked: boolean) => void;
11
+ typography?: Omit<ITypographyProps<'span'>, 'component' | 'children'>;
12
+ children?: ReactNode;
13
+ checkedIcon?: () => ReactNode;
14
+ }>;
15
+ export type IRadioInstance = {
16
+ focus: () => void;
17
+ blur: () => void;
18
+ };
19
+ export declare const Radio: import('react').ForwardRefExoticComponent<Omit<IRadioProps, "ref"> & import('react').RefAttributes<IRadioInstance>>;
@@ -0,0 +1 @@
1
+ export * from './rating';
@@ -0,0 +1,12 @@
1
+ import { FC, ComponentPropsWithRef } from 'react';
2
+ import { IOverride } from '../../types/util';
3
+ export type IRatingSize = 'medium' | 'large' | 'x-large';
4
+ export type IRatingProps = IOverride<ComponentPropsWithRef<'div'>, {
5
+ size?: IRatingSize;
6
+ max?: number;
7
+ value?: number;
8
+ defaultValue?: number;
9
+ readonly?: boolean;
10
+ onChange?: (value: number) => void;
11
+ }>;
12
+ export declare const Rating: FC<IRatingProps>;
@@ -0,0 +1,6 @@
1
+ import { IOverride } from '../../types/util';
2
+ import { FC, ComponentPropsWithRef } from 'react';
3
+ export type IStarProps = IOverride<ComponentPropsWithRef<'span'>, {
4
+ value?: number;
5
+ }>;
6
+ export declare const Star: FC<IStarProps>;
@@ -0,0 +1 @@
1
+ export * from './search-field';
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { ITextFieldProps } from '../text-field';
3
+ export type ISearchFieldProps = Omit<ITextFieldProps, 'trailingIcon' | 'onTrailingIconClick'>;
4
+ export declare const SearchField: FC<ISearchFieldProps>;
@@ -0,0 +1,3 @@
1
+ export * from './section';
2
+ export * from './section-title';
3
+ export * from './section-content';
@@ -0,0 +1,3 @@
1
+ import { ComponentPropsWithRef, FC } from 'react';
2
+ export type ISectionContentProps = ComponentPropsWithRef<'div'>;
3
+ export declare const SectionContent: FC<ISectionContentProps>;
@@ -0,0 +1,12 @@
1
+ import { ComponentPropsWithRef, FC, ReactNode } from 'react';
2
+ import { IIconProps } from '../icon';
3
+ import { IOverride } from '../../types/util';
4
+ export type ISectionTitleProps = IOverride<Omit<ComponentPropsWithRef<'div'>, 'children'>, {
5
+ leftIcon?: IIconProps | ReactNode;
6
+ onLeftIconClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
7
+ rightIcon?: IIconProps | ReactNode;
8
+ onRightIconClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
9
+ right?: ReactNode;
10
+ title?: ReactNode;
11
+ }>;
12
+ export declare const SectionTitle: FC<ISectionTitleProps>;
@@ -0,0 +1,6 @@
1
+ import { ComponentPropsWithRef, FC } from 'react';
2
+ export type ISectionProps = ComponentPropsWithRef<'div'> & {
3
+ space?: boolean;
4
+ shape?: 'rounded' | 'square';
5
+ };
6
+ export declare const Section: FC<ISectionProps>;
@@ -0,0 +1,2 @@
1
+ export * from './seo';
2
+ export * from './seo.type';
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { ISeoMetadata } from './seo.type';
3
+ export type ISeoProps = {
4
+ metadata: ISeoMetadata;
5
+ };
6
+ export declare const SeoMetadataId = "vsf-metadata";
7
+ export declare const Seo: FC<ISeoProps>;
@@ -0,0 +1,85 @@
1
+ export type ISeoWebApplicationMetadata = {
2
+ '@type': 'WebApplication';
3
+ name?: string;
4
+ description: string;
5
+ applicationCategory?: string;
6
+ author?: string;
7
+ url: string;
8
+ image?: string;
9
+ screenshot?: string;
10
+ aggregateRating?: {
11
+ '@type': 'AggregateRating';
12
+ ratingValue: string;
13
+ ratingCount: string;
14
+ };
15
+ };
16
+ export type ISeoProductMetadata = {
17
+ '@type': 'Product';
18
+ '@id': string;
19
+ name: string;
20
+ description: string;
21
+ image: ISeoImageObject;
22
+ sku: string;
23
+ price: string;
24
+ offers?: ISeoOffer[];
25
+ additionalProperty?: ISeoAdditionalProperty[];
26
+ aggregateRating?: ISeoAggregateRating;
27
+ review?: ISeoReview;
28
+ };
29
+ export type ISeoMetadata = ISeoWebApplicationMetadata | ISeoProductMetadata;
30
+ export type ISeoImageObject = {
31
+ '@type': 'ImageObject';
32
+ '@id': string;
33
+ inLanguage?: string;
34
+ url: string;
35
+ contentUrl?: string;
36
+ width?: number;
37
+ height?: number;
38
+ caption: string;
39
+ };
40
+ export type ISeoOffer = {
41
+ '@type': 'Offer';
42
+ price: string;
43
+ priceValidUntil: string;
44
+ priceSpecification: {
45
+ valueAddedTaxIncluded: boolean;
46
+ '@type': 'PriceSpecification';
47
+ };
48
+ priceCurrency: string;
49
+ availability?: string;
50
+ url: string;
51
+ seller?: ISeoSeller;
52
+ };
53
+ export type ISeoSeller = {
54
+ '@type': 'Organization';
55
+ '@id': string;
56
+ name: string;
57
+ url?: string;
58
+ };
59
+ export type ISeoAdditionalProperty = {
60
+ '@type': 'PropertyValue';
61
+ name: string;
62
+ value: string;
63
+ };
64
+ export type ISeoAggregateRating = {
65
+ '@type': 'AggregateRating';
66
+ ratingValue: string;
67
+ ratingCount: string;
68
+ bestRating?: number;
69
+ };
70
+ export type ISeoReview = {
71
+ '@type': 'Review';
72
+ reviewBody?: string;
73
+ reviewRating?: {
74
+ '@type': 'Rating';
75
+ bestRating?: string;
76
+ ratingValue?: string;
77
+ worstRating?: string;
78
+ };
79
+ author?: {
80
+ '@type': 'Person';
81
+ name: string;
82
+ };
83
+ datePublished?: string;
84
+ name?: string;
85
+ };
@@ -0,0 +1,4 @@
1
+ export * from './sheet';
2
+ export * from './sheet-header';
3
+ export * from './sheet-body';
4
+ export * from './sheet-footer';
@@ -0,0 +1,6 @@
1
+ import { ComponentPropsWithRef, FC, ReactNode } from 'react';
2
+ export type ISheetBodyProps = ComponentPropsWithRef<'div'> & {
3
+ children?: ReactNode;
4
+ horizontalSpace?: boolean;
5
+ };
6
+ export declare const SheetBody: FC<ISheetBodyProps>;
@@ -0,0 +1,5 @@
1
+ import { ComponentPropsWithRef, FC, ReactNode } from 'react';
2
+ export type ISheetFooterProps = ComponentPropsWithRef<'div'> & {
3
+ children?: ReactNode;
4
+ };
5
+ export declare const SheetFooter: FC<ISheetFooterProps>;
@@ -0,0 +1,11 @@
1
+ import { ComponentPropsWithRef, FC, ReactNode } from 'react';
2
+ import { IIconProps } from '../icon';
3
+ import { IOverride } from '../../types/util';
4
+ export type ISheetHeaderProps = IOverride<ComponentPropsWithRef<'div'>, {
5
+ title?: ReactNode;
6
+ backIcon?: boolean | IIconProps | ReactNode;
7
+ onBackClick?: () => void;
8
+ closeIcon?: boolean | IIconProps | ReactNode;
9
+ onCloseClick?: () => void;
10
+ }>;
11
+ export declare const SheetHeader: FC<ISheetHeaderProps>;
@@ -0,0 +1,11 @@
1
+ import { ComponentPropsWithRef, FC } from 'react';
2
+ type IRawSheetProps = ComponentPropsWithRef<'div'> & {
3
+ open?: boolean;
4
+ overlay?: 'default' | 'blur';
5
+ onBackdropClick?: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
6
+ };
7
+ export type ISheetProps = IRawSheetProps & {
8
+ portal?: boolean;
9
+ };
10
+ export declare const Sheet: FC<ISheetProps>;
11
+ export {};
@@ -0,0 +1 @@
1
+ export * from './skeleton';
@@ -0,0 +1,13 @@
1
+ import { IOverride } from '../../types/util';
2
+ import { ComponentPropsWithRef, FC } from 'react';
3
+ export type ISkeletonProps = IOverride<ComponentPropsWithRef<'div'>, {
4
+ animated?: boolean;
5
+ width?: number | string;
6
+ height?: number | string;
7
+ shape?: 'rounded' | 'rounded-8' | 'rounded-4' | 'pill' | 'none';
8
+ }>;
9
+ export declare const Skeleton: FC<ISkeletonProps>;
10
+ export declare const SkeletonTitle: FC<ISkeletonProps>;
11
+ export declare const SkeletonParagraph: FC<ISkeletonProps & {
12
+ lineCount?: number;
13
+ }>;
@@ -0,0 +1 @@
1
+ export * from './switch';
@@ -0,0 +1,16 @@
1
+ import { ComponentProps } from 'react';
2
+ import { IOverride } from '../../types/util';
3
+ export type ISwitchTheme = 'brand' | 'inverse';
4
+ export type ISwitchProps = IOverride<ComponentProps<'input'>, {
5
+ className?: string;
6
+ checked?: boolean;
7
+ disabled?: boolean;
8
+ defaultChecked?: boolean;
9
+ theme?: ISwitchTheme;
10
+ onChange?: (checked: boolean) => void;
11
+ }>;
12
+ export type ISwitchInstance = {
13
+ focus: () => void;
14
+ blur: () => void;
15
+ };
16
+ export declare const Switch: import('react').ForwardRefExoticComponent<Omit<ISwitchProps, "ref"> & import('react').RefAttributes<ISwitchInstance>>;
@@ -0,0 +1 @@
1
+ export * from './tab-bar';
@@ -0,0 +1,26 @@
1
+ import { FC, ComponentPropsWithRef, CSSProperties, ReactNode } from 'react';
2
+ import { IOverride } from '../../types/util';
3
+ import { IBadgeProps } from '../badge';
4
+ import { IIconProps } from '../icon';
5
+ export type ITabBarItem = {
6
+ id: string;
7
+ icon?: IIconProps | ReactNode;
8
+ name?: ReactNode;
9
+ badge?: IBadgeProps | boolean;
10
+ };
11
+ export type ITabBarItemProps = ITabBarItem & {
12
+ active?: boolean;
13
+ className?: string;
14
+ onItemClick?: () => void;
15
+ style?: CSSProperties;
16
+ };
17
+ export type ITabBarTheme = 'default' | 'brand' | 'neutral';
18
+ export type ITabBarProps = IOverride<ComponentPropsWithRef<'div'>, {
19
+ theme?: ITabBarTheme;
20
+ items: ITabBarItem[];
21
+ defaultActiveId?: string;
22
+ activeId?: string;
23
+ onItemClick?: (item: ITabBarItem, index: number) => void;
24
+ tabWidth?: string | number;
25
+ }>;
26
+ export declare const TabBar: FC<ITabBarProps>;
@@ -0,0 +1,6 @@
1
+ export declare const TabBarItem: import('react').ForwardRefExoticComponent<import('./tab-bar').ITabBarItem & {
2
+ active?: boolean;
3
+ className?: string;
4
+ onItemClick?: () => void;
5
+ style?: import('react').CSSProperties;
6
+ } & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1 @@
1
+ export * from './text-area';
@@ -0,0 +1,15 @@
1
+ import { IOverride } from '../../types/util';
2
+ import { ComponentProps } from 'react';
3
+ import { IBasicInputProps } from '../input-wrapper';
4
+ export type ITextAreaProps = IOverride<ComponentProps<'textarea'>, IBasicInputProps & {
5
+ inputClassName?: string;
6
+ maxLength?: number;
7
+ onChange?: (value: string) => void;
8
+ loading?: boolean;
9
+ autoHeight?: boolean;
10
+ }>;
11
+ export type ITextAreaInstance = {
12
+ focus: () => void;
13
+ blur: () => void;
14
+ };
15
+ export declare const TextArea: import('react').ForwardRefExoticComponent<Omit<ITextAreaProps, "ref"> & import('react').RefAttributes<ITextAreaInstance>>;
@@ -0,0 +1 @@
1
+ export * from './text-field';
@@ -0,0 +1,18 @@
1
+ import { IBasicInputProps } from '../input-wrapper';
2
+ import { ComponentProps, FC } from 'react';
3
+ import { IOverride } from '../../types/util';
4
+ export type ITextFieldProps = IOverride<ComponentProps<'input'>, IBasicInputProps & {
5
+ loading?: boolean;
6
+ inputClassName?: string;
7
+ onChange?: (value: string) => void;
8
+ loadingType?: 'search' | 'input';
9
+ }>;
10
+ export type ITextFieldInstance = {
11
+ focus: () => void;
12
+ blur: () => void;
13
+ };
14
+ export declare const TextField: import('react').ForwardRefExoticComponent<Omit<ITextFieldProps, "ref"> & import('react').RefAttributes<ITextFieldInstance>>;
15
+ export type IPhoneNumberFieldProps = Omit<ITextFieldProps, 'prefix' | 'type'> & {
16
+ countryCode?: string;
17
+ };
18
+ export declare const PhoneNumberField: FC<IPhoneNumberFieldProps>;
@@ -0,0 +1 @@
1
+ export * from './toast';
@@ -0,0 +1,2 @@
1
+ import { FC } from 'react';
2
+ export declare const ToastProvider: FC;
@@ -0,0 +1,20 @@
1
+ import { ComponentProps, FC, ReactNode } from 'react';
2
+ import { IIconProps } from '../icon';
3
+ import { IOverride } from '../../types/util';
4
+ import { IToastConfig } from './toast.store';
5
+ export type IToastType = 'neutral' | 'informative' | 'positive' | 'negative';
6
+ export type IToastProps = IOverride<ComponentProps<'div'>, {
7
+ type?: IToastType;
8
+ message: ReactNode;
9
+ closeAction?: boolean;
10
+ onCloseActionClick?: () => void;
11
+ action?: string;
12
+ onActionClick?: () => void;
13
+ icon?: IIconProps | ReactNode;
14
+ }>;
15
+ type IToast = FC<IToastProps> & {
16
+ show: (config: IToastConfig) => number;
17
+ hide: (id?: number) => void;
18
+ };
19
+ export declare const Toast: IToast;
20
+ export {};
@@ -0,0 +1,25 @@
1
+ import { IToastType } from './toast';
2
+ import { ReactNode } from 'react';
3
+ import { IIconProps } from '../icon';
4
+ export type IToastConfig = {
5
+ type?: IToastType;
6
+ message: ReactNode;
7
+ closeAction?: boolean;
8
+ action?: string;
9
+ icon?: IIconProps | ReactNode;
10
+ onCloseActionClick?: () => void;
11
+ onActionClick?: () => void;
12
+ onHide?: () => void;
13
+ duration?: number;
14
+ position?: 'top' | 'bottom';
15
+ };
16
+ export type IToastState = {
17
+ items: Array<{
18
+ config: IToastConfig;
19
+ id: number;
20
+ }>;
21
+ add: (config: IToastConfig) => number;
22
+ remove: (id: number) => void;
23
+ clear: () => void;
24
+ };
25
+ export declare const useToastStore: import('zustand').UseBoundStore<import('zustand').StoreApi<IToastState>>;
@@ -0,0 +1 @@
1
+ export * from './tooltip';
@@ -0,0 +1,10 @@
1
+ import { FC, ComponentPropsWithRef } from 'react';
2
+ import { IOverride } from '../../types/util';
3
+ export type ITooltipType = 'default' | 'reverse';
4
+ export type ITooltipPosition = 'top' | 'bottom' | 'right' | 'left' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'left-top' | 'left-bottom' | 'right-top' | 'right-bottom';
5
+ export type ITooltipProps = IOverride<ComponentPropsWithRef<'div'>, {
6
+ type?: ITooltipType;
7
+ position?: ITooltipPosition;
8
+ closeable?: boolean;
9
+ }>;
10
+ export declare const Tooltip: FC<ITooltipProps>;
@@ -0,0 +1 @@
1
+ export * from './typography';
@@ -0,0 +1,13 @@
1
+ import { ComponentPropsWithRef, ElementType } from 'react';
2
+ import { IColor } from '../../types/colors';
3
+ import { IOverride } from '../../types/util';
4
+ export type ITypographySize = 'inherit' | '5x-large' | '4x-large' | '3x-large' | '2x-large' | 'x-large' | 'large' | 'base' | 'small' | 'x-small' | '2x-small' | '3x-small';
5
+ export type ITypographyWeight = 'inherit' | 'bold' | 'semibold' | 'medium' | 'regular' | 'light' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900' | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
6
+ export type ITypographyProps<E extends ElementType> = IOverride<ComponentPropsWithRef<E>, {
7
+ component?: E;
8
+ className?: string;
9
+ size?: ITypographySize;
10
+ weight?: ITypographyWeight;
11
+ color?: IColor;
12
+ }>;
13
+ export declare const Typography: <C extends ElementType = "p">({ component, size, weight, color, className, ...props }: ITypographyProps<C>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { IFileUpload } from './type';
2
+ export declare function uploadImage(options?: {
3
+ count?: number;
4
+ includeBase64?: boolean;
5
+ }): Promise<IFileUpload[]>;
@@ -0,0 +1 @@
1
+ export * from './uploader';
@@ -0,0 +1,9 @@
1
+ export interface IFileUpload {
2
+ tempFile: {
3
+ path: string;
4
+ size: number;
5
+ width: number;
6
+ height: number;
7
+ data?: string;
8
+ };
9
+ }
@@ -0,0 +1,18 @@
1
+ import { ComponentPropsWithRef, FC } from 'react';
2
+ import { IOverride } from '../../types/util';
3
+ import { IFileUpload } from './type';
4
+ export type IUploaderProps = IOverride<ComponentPropsWithRef<'div'>, {
5
+ limit?: number;
6
+ disabled?: boolean;
7
+ showPreview?: boolean;
8
+ includeBase64?: boolean;
9
+ value?: IFileUpload[];
10
+ onChange?: (files: IFileUpload[]) => void;
11
+ }>;
12
+ export declare const Uploader: FC<IUploaderProps>;
13
+ type IFilePreviewProps = {
14
+ previewSrc?: string;
15
+ onDelete?: () => void;
16
+ };
17
+ export declare const FilePreview: FC<IFilePreviewProps>;
18
+ export {};
@@ -0,0 +1 @@
1
+ export * from './visibility-sensor';
@@ -0,0 +1,9 @@
1
+ import { Options } from 'ahooks/lib/useInViewport';
2
+ import { FC } from 'react';
3
+ export type IVisibilitySensorProps = {
4
+ onActive: () => void;
5
+ options?: Options;
6
+ className?: string;
7
+ style?: React.CSSProperties;
8
+ };
9
+ export declare const VisibilitySensor: FC<IVisibilitySensorProps>;