@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.
- package/dist/components/alert/alert.d.ts +12 -0
- package/dist/components/alert/index.d.ts +1 -0
- package/dist/components/app/components/app.d.ts +13 -0
- package/dist/components/app/components/bottom-tab-bar.d.ts +2 -0
- package/dist/components/app/components/link.d.ts +8 -0
- package/dist/components/app/components/navigation-analytic.d.ts +2 -0
- package/dist/components/app/components/navigation-bar.d.ts +2 -0
- package/dist/components/app/components/page-layout.d.ts +3 -0
- package/dist/components/app/components/pages-render.d.ts +2 -0
- package/dist/components/app/context/location-key.d.ts +4 -0
- package/dist/components/app/hooks/use-app-pause.d.ts +1 -0
- package/dist/components/app/hooks/use-app-resume.d.ts +1 -0
- package/dist/components/app/hooks/use-app-state.d.ts +7 -0
- package/dist/components/app/hooks/use-bottom-tab-bar.d.ts +13 -0
- package/dist/components/app/hooks/use-custom-icon-event.d.ts +1 -0
- package/dist/components/app/hooks/use-did-hide.d.ts +1 -0
- package/dist/components/app/hooks/use-did-show.d.ts +1 -0
- package/dist/components/app/hooks/use-history.d.ts +2 -0
- package/dist/components/app/hooks/use-location.d.ts +1 -0
- package/dist/components/app/hooks/use-navigate.d.ts +1 -0
- package/dist/components/app/hooks/use-navigation-bar.d.ts +12 -0
- package/dist/components/app/hooks/use-navigation-type.d.ts +1 -0
- package/dist/components/app/hooks/use-page-config.d.ts +1 -0
- package/dist/components/app/hooks/use-page-layout.d.ts +14 -0
- package/dist/components/app/hooks/use-page-scroll.d.ts +5 -0
- package/dist/components/app/hooks/use-page-state.d.ts +6 -0
- package/dist/components/app/hooks/use-settings-changed.d.ts +3 -0
- package/dist/components/app/index.d.ts +18 -0
- package/dist/components/app/stores/app.d.ts +24 -0
- package/dist/components/app/stores/app.selector.d.ts +11 -0
- package/dist/components/app/types/app.d.ts +55 -0
- package/dist/components/app/types/navigation.d.ts +30 -0
- package/dist/components/app/utils/animation.d.ts +2 -0
- package/dist/components/app/utils/data-theme.d.ts +5 -0
- package/dist/components/app/utils/history.d.ts +7 -0
- package/dist/components/avatar/avatar.d.ts +15 -0
- package/dist/components/avatar/index.d.ts +1 -0
- package/dist/components/badge/badge.d.ts +8 -0
- package/dist/components/badge/index.d.ts +1 -0
- package/dist/components/bottom-tab-bar/bottom-tab-bar.d.ts +22 -0
- package/dist/components/bottom-tab-bar/index.d.ts +1 -0
- package/dist/components/button/button.const.d.ts +3 -0
- package/dist/components/button/button.d.ts +20 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/calendar/calendar-range-sheet.d.ts +14 -0
- package/dist/components/calendar/calendar-single-sheet.d.ts +14 -0
- package/dist/components/calendar/calendar.d.ts +10 -0
- package/dist/components/calendar/default-render.d.ts +3 -0
- package/dist/components/calendar/index.d.ts +1 -0
- package/dist/components/calendar/range-picker.d.ts +11 -0
- package/dist/components/calendar/single-picker.d.ts +9 -0
- package/dist/components/calendar/utils.d.ts +60 -0
- package/dist/components/carousel/carousel.d.ts +15 -0
- package/dist/components/carousel/index.d.ts +1 -0
- package/dist/components/carousel/use-carousel.d.ts +27 -0
- package/dist/components/checkbox/check-icon.d.ts +6 -0
- package/dist/components/checkbox/checkbox.d.ts +24 -0
- package/dist/components/checkbox/indeterminate-icon.d.ts +6 -0
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/chip/chip.d.ts +16 -0
- package/dist/components/chip/index.d.ts +1 -0
- package/dist/components/date-field/date-field-range.d.ts +76 -0
- package/dist/components/date-field/date-field.d.ts +56 -0
- package/dist/components/date-field/index.d.ts +2 -0
- package/dist/components/date-field/input.d.ts +6 -0
- package/dist/components/date-picker/date-picker-base.d.ts +32 -0
- package/dist/components/date-picker/date-picker-item.d.ts +14 -0
- package/dist/components/date-picker/date-picker-sheet.d.ts +14 -0
- package/dist/components/date-picker/date-picker.constant.d.ts +8 -0
- package/dist/components/date-picker/date-picker.d.ts +17 -0
- package/dist/components/date-picker/date-picker.utils.d.ts +31 -0
- package/dist/components/date-picker/index.d.ts +2 -0
- package/dist/components/dialog/dialog.d.ts +20 -0
- package/dist/components/dialog/index.d.ts +1 -0
- package/dist/components/dropdown/dropdown-base.d.ts +6 -0
- package/dist/components/dropdown/dropdown.d.ts +33 -0
- package/dist/components/dropdown/index.d.ts +2 -0
- package/dist/components/error/error-boundary.d.ts +15 -0
- package/dist/components/error/error.d.ts +10 -0
- package/dist/components/error/index.d.ts +1 -0
- package/dist/components/freeze/index.d.ts +11 -0
- package/dist/components/icon/icon-mapping.d.ts +246 -0
- package/dist/components/icon/icon.d.ts +29 -0
- package/dist/components/icon/index.d.ts +1 -0
- package/dist/components/image/image.d.ts +10 -0
- package/dist/components/image/index.d.ts +1 -0
- package/dist/components/index.d.ts +43 -0
- package/dist/components/input-wrapper/index.d.ts +1 -0
- package/dist/components/input-wrapper/input-wrapper.d.ts +33 -0
- package/dist/components/label/index.d.ts +1 -0
- package/dist/components/label/label.d.ts +11 -0
- package/dist/components/layout/app.d.ts +3 -0
- package/dist/components/layout/index.d.ts +2 -0
- package/dist/components/layout/page-loading.d.ts +6 -0
- package/dist/components/layout/page.d.ts +18 -0
- package/dist/components/list-item/index.d.ts +1 -0
- package/dist/components/list-item/list-item.d.ts +12 -0
- package/dist/components/navigation-bar/index.d.ts +1 -0
- package/dist/components/navigation-bar/navigation-bar.d.ts +26 -0
- package/dist/components/number-field/index.d.ts +1 -0
- package/dist/components/number-field/number-field.d.ts +23 -0
- package/dist/components/old-date-picker/date-picker-base.d.ts +32 -0
- package/dist/components/old-date-picker/date-picker-item.d.ts +11 -0
- package/dist/components/old-date-picker/date-picker-sheet.d.ts +14 -0
- package/dist/components/old-date-picker/date-picker.constant.d.ts +3 -0
- package/dist/components/old-date-picker/date-picker.d.ts +21 -0
- package/dist/components/old-date-picker/index.d.ts +2 -0
- package/dist/components/option-item/index.d.ts +1 -0
- package/dist/components/option-item/option-item.d.ts +10 -0
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/pagination/pagination.d.ts +7 -0
- package/dist/components/pull-to-refresh/index.d.ts +1 -0
- package/dist/components/pull-to-refresh/pull-to-refresh.d.ts +17 -0
- package/dist/components/radio/index.d.ts +1 -0
- package/dist/components/radio/radio.d.ts +19 -0
- package/dist/components/rating/index.d.ts +1 -0
- package/dist/components/rating/rating.d.ts +12 -0
- package/dist/components/rating/star.d.ts +6 -0
- package/dist/components/search-field/index.d.ts +1 -0
- package/dist/components/search-field/search-field.d.ts +4 -0
- package/dist/components/section/index.d.ts +3 -0
- package/dist/components/section/section-content.d.ts +3 -0
- package/dist/components/section/section-title.d.ts +12 -0
- package/dist/components/section/section.d.ts +6 -0
- package/dist/components/seo/index.d.ts +2 -0
- package/dist/components/seo/seo.d.ts +7 -0
- package/dist/components/seo/seo.type.d.ts +85 -0
- package/dist/components/sheet/index.d.ts +4 -0
- package/dist/components/sheet/sheet-body.d.ts +6 -0
- package/dist/components/sheet/sheet-footer.d.ts +5 -0
- package/dist/components/sheet/sheet-header.d.ts +11 -0
- package/dist/components/sheet/sheet.d.ts +11 -0
- package/dist/components/skeleton/index.d.ts +1 -0
- package/dist/components/skeleton/skeleton.d.ts +13 -0
- package/dist/components/switch/index.d.ts +1 -0
- package/dist/components/switch/switch.d.ts +16 -0
- package/dist/components/tab-bar/index.d.ts +1 -0
- package/dist/components/tab-bar/tab-bar.d.ts +26 -0
- package/dist/components/tab-bar/tab.d.ts +6 -0
- package/dist/components/text-area/index.d.ts +1 -0
- package/dist/components/text-area/text-area.d.ts +15 -0
- package/dist/components/text-field/index.d.ts +1 -0
- package/dist/components/text-field/text-field.d.ts +18 -0
- package/dist/components/toast/index.d.ts +1 -0
- package/dist/components/toast/toast-provider.d.ts +2 -0
- package/dist/components/toast/toast.d.ts +20 -0
- package/dist/components/toast/toast.store.d.ts +25 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip/tooltip.d.ts +10 -0
- package/dist/components/typography/index.d.ts +1 -0
- package/dist/components/typography/typography.d.ts +13 -0
- package/dist/components/uploader/helper.d.ts +5 -0
- package/dist/components/uploader/index.d.ts +1 -0
- package/dist/components/uploader/type.d.ts +9 -0
- package/dist/components/uploader/uploader.d.ts +18 -0
- package/dist/components/visibility-sensor/index.d.ts +1 -0
- package/dist/components/visibility-sensor/visibility-sensor.d.ts +9 -0
- package/dist/external/index.js +15758 -0
- package/dist/external/styles.css +1 -0
- package/dist/hooks/use-analytic.d.ts +1 -0
- package/dist/hooks/use-is-using-app.d.ts +1 -0
- package/dist/hooks/use-is-using-locales.d.ts +1 -0
- package/dist/hooks/use-swipe-navigation.d.ts +2 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7677 -0
- package/dist/locales/defaultResources/en.d.ts +27 -0
- package/dist/locales/defaultResources/vi.d.ts +27 -0
- package/dist/locales/fns.d.ts +6 -0
- package/dist/locales/hooks.d.ts +9 -0
- package/dist/locales/index.d.ts +4 -0
- package/dist/locales/provider.d.ts +6 -0
- package/dist/locales/store.d.ts +13 -0
- package/dist/locales/types.d.ts +37 -0
- package/dist/locales/utils.d.ts +2 -0
- package/dist/styles.css +1 -0
- package/dist/styles.d.ts +1 -0
- package/dist/tailwind/colors.css +369 -0
- package/dist/tailwind/styles.css +5 -0
- package/dist/types/colors.d.ts +3 -0
- package/dist/types/util.d.ts +1 -0
- package/dist/utils/analytic.d.ts +17 -0
- package/dist/utils/bound.d.ts +1 -0
- package/dist/utils/can-use-dom.d.ts +1 -0
- package/dist/utils/classname.d.ts +3 -0
- package/dist/utils/colors.d.ts +2 -0
- package/dist/utils/colors.gen.d.ts +368 -0
- package/dist/utils/convert-px.d.ts +1 -0
- package/dist/utils/date.d.ts +2 -0
- package/dist/utils/deep-clone.d.ts +1 -0
- package/dist/utils/dev-log.d.ts +3 -0
- package/dist/utils/event-emitter.d.ts +7 -0
- package/dist/utils/get-scroll-parent.d.ts +3 -0
- package/dist/utils/is-dev.d.ts +1 -0
- package/dist/utils/omit.d.ts +1 -0
- package/dist/utils/render-node.d.ts +2 -0
- package/dist/utils/rubberband.d.ts +2 -0
- package/dist/utils/sleep.d.ts +1 -0
- package/dist/utils/supports-passive.d.ts +1 -0
- package/dist/utils/to-css-length.d.ts +1 -0
- package/dist/utils/url.d.ts +1 -0
- package/dist/vsf/choose-image.d.ts +4 -0
- package/dist/vsf/index.d.ts +1 -0
- 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 @@
|
|
|
1
|
+
export * from './search-field';
|
|
@@ -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,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,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,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 @@
|
|
|
1
|
+
export * from './uploader';
|
|
@@ -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>;
|