@mindly/ui-components 5.1.1 → 5.2.1
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/cjs/configs/tailwind/colors.d.ts +9 -0
- package/dist/cjs/index.js +13 -4
- package/dist/cjs/lib2/shared/hooks/index.d.ts +1 -0
- package/dist/cjs/lib2/shared/hooks/useToastContext.d.ts +3 -0
- package/dist/cjs/lib2/shared/providers/ToastProvider/ToastProvider.d.ts +5 -0
- package/dist/cjs/lib2/shared/providers/ToastProvider/index.d.ts +1 -0
- package/dist/cjs/lib2/shared/providers/index.d.ts +1 -0
- package/dist/cjs/lib2/shared/ui/AppFooter_v2/AppFooter_v2.d.ts +1 -1
- package/dist/cjs/lib2/shared/ui/Toast/Toast.d.ts +4 -0
- package/dist/cjs/lib2/shared/ui/Toast/ToastCloseButton.d.ts +5 -0
- package/dist/cjs/lib2/shared/ui/Toast/ToastRegion.d.ts +3 -0
- package/dist/cjs/lib2/shared/ui/Toast/index.d.ts +2 -0
- package/dist/cjs/lib2/shared/ui/Toast/styles.d.ts +50 -0
- package/dist/cjs/lib2/shared/ui/Toast/types.d.ts +13 -0
- package/dist/cjs/lib2/shared/ui/index.d.ts +1 -0
- package/dist/esm/configs/tailwind/colors.d.ts +9 -0
- package/dist/esm/index.js +13 -4
- package/dist/esm/lib2/shared/hooks/index.d.ts +1 -0
- package/dist/esm/lib2/shared/hooks/useToastContext.d.ts +3 -0
- package/dist/esm/lib2/shared/providers/ToastProvider/ToastProvider.d.ts +5 -0
- package/dist/esm/lib2/shared/providers/ToastProvider/index.d.ts +1 -0
- package/dist/esm/lib2/shared/providers/index.d.ts +1 -0
- package/dist/esm/lib2/shared/ui/AppFooter_v2/AppFooter_v2.d.ts +1 -1
- package/dist/esm/lib2/shared/ui/Toast/Toast.d.ts +4 -0
- package/dist/esm/lib2/shared/ui/Toast/ToastCloseButton.d.ts +5 -0
- package/dist/esm/lib2/shared/ui/Toast/ToastRegion.d.ts +3 -0
- package/dist/esm/lib2/shared/ui/Toast/index.d.ts +2 -0
- package/dist/esm/lib2/shared/ui/Toast/styles.d.ts +50 -0
- package/dist/esm/lib2/shared/ui/Toast/types.d.ts +13 -0
- package/dist/esm/lib2/shared/ui/index.d.ts +1 -0
- package/dist/index.d.ts +20 -2
- package/package.json +3 -1
- package/src/configs/tailwind/colors.ts +9 -0
- package/src/lib2/shared/css/tailwind.css +3 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ToastState } from '@react-stately/toast';
|
|
3
|
+
import { MindlyToastProps, ToastProviderProps } from '../../ui/Toast/types';
|
|
4
|
+
export declare const ToastContext: React.Context<ToastState<MindlyToastProps> | undefined>;
|
|
5
|
+
export declare function ToastProvider({ children, ...props }: React.PropsWithChildren<ToastProviderProps>): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ToastProvider';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare const toastStyles: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
type: {
|
|
3
|
+
success: "bg-badges-success-main";
|
|
4
|
+
error: "bg-color-info-red-not-red";
|
|
5
|
+
attention: "bg-badges-attention-main";
|
|
6
|
+
info: "bg-color-info-blue";
|
|
7
|
+
};
|
|
8
|
+
}, undefined, "toast fixed left-0 right-0 w-full h-[80px]", import("tailwind-variants/dist/config").TVConfig<{
|
|
9
|
+
type: {
|
|
10
|
+
success: "bg-badges-success-main";
|
|
11
|
+
error: "bg-color-info-red-not-red";
|
|
12
|
+
attention: "bg-badges-attention-main";
|
|
13
|
+
info: "bg-color-info-blue";
|
|
14
|
+
};
|
|
15
|
+
}, {
|
|
16
|
+
type: {
|
|
17
|
+
success: "bg-badges-success-main";
|
|
18
|
+
error: "bg-color-info-red-not-red";
|
|
19
|
+
attention: "bg-badges-attention-main";
|
|
20
|
+
info: "bg-color-info-blue";
|
|
21
|
+
};
|
|
22
|
+
}>, {
|
|
23
|
+
type: {
|
|
24
|
+
success: "bg-badges-success-main";
|
|
25
|
+
error: "bg-color-info-red-not-red";
|
|
26
|
+
attention: "bg-badges-attention-main";
|
|
27
|
+
info: "bg-color-info-blue";
|
|
28
|
+
};
|
|
29
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
30
|
+
type: {
|
|
31
|
+
success: "bg-badges-success-main";
|
|
32
|
+
error: "bg-color-info-red-not-red";
|
|
33
|
+
attention: "bg-badges-attention-main";
|
|
34
|
+
info: "bg-color-info-blue";
|
|
35
|
+
};
|
|
36
|
+
}, undefined, "toast fixed left-0 right-0 w-full h-[80px]", import("tailwind-variants/dist/config").TVConfig<{
|
|
37
|
+
type: {
|
|
38
|
+
success: "bg-badges-success-main";
|
|
39
|
+
error: "bg-color-info-red-not-red";
|
|
40
|
+
attention: "bg-badges-attention-main";
|
|
41
|
+
info: "bg-color-info-blue";
|
|
42
|
+
};
|
|
43
|
+
}, {
|
|
44
|
+
type: {
|
|
45
|
+
success: "bg-badges-success-main";
|
|
46
|
+
error: "bg-color-info-red-not-red";
|
|
47
|
+
attention: "bg-badges-attention-main";
|
|
48
|
+
info: "bg-color-info-blue";
|
|
49
|
+
};
|
|
50
|
+
}>, unknown, unknown, undefined>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ToastState, ToastStateProps } from '@react-stately/toast';
|
|
2
|
+
import { AriaToastProps, AriaToastRegionProps } from '@react-aria/toast';
|
|
3
|
+
export type ToastProviderProps = ToastStateProps;
|
|
4
|
+
export type MindlyToastProps = {
|
|
5
|
+
type?: 'success' | 'error' | 'attention' | 'info';
|
|
6
|
+
text: string;
|
|
7
|
+
};
|
|
8
|
+
export interface ToastRegionProps<T> extends AriaToastRegionProps {
|
|
9
|
+
state: ToastState<T>;
|
|
10
|
+
}
|
|
11
|
+
export interface ToastProps<T> extends AriaToastProps<T> {
|
|
12
|
+
state: ToastState<T>;
|
|
13
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ import { RefresherEventDetail, ScrollDetail, ScrollBaseDetail } from '@ionic/rea
|
|
|
6
6
|
import { IonContentCustomEvent, IonSearchbarCustomEvent } from '@ionic/core/dist/types/components';
|
|
7
7
|
import { Node, ListState, ItemProps, SelectionBehavior, SelectionMode } from 'react-stately';
|
|
8
8
|
import { AriaListBoxProps, AriaCalendarProps, DateValue } from 'react-aria';
|
|
9
|
+
import { ToastStateProps, ToastState } from '@react-stately/toast';
|
|
10
|
+
import { AriaToastRegionProps } from '@react-aria/toast';
|
|
9
11
|
import { SearchbarChangeEventDetail } from '@ionic/core';
|
|
10
12
|
import { WithTranslation } from 'react-i18next';
|
|
11
13
|
|
|
@@ -1424,7 +1426,7 @@ type TypographyProps = {
|
|
|
1424
1426
|
declare const _default$a: React__default.NamedExoticComponent<TypographyProps>;
|
|
1425
1427
|
|
|
1426
1428
|
type AppFooterProps = {
|
|
1427
|
-
children
|
|
1429
|
+
children?: React__default.ReactNode;
|
|
1428
1430
|
transparent?: boolean;
|
|
1429
1431
|
bottomSaveArea?: boolean;
|
|
1430
1432
|
};
|
|
@@ -1589,6 +1591,17 @@ type IconButtonProps = {
|
|
|
1589
1591
|
};
|
|
1590
1592
|
declare const _default$1: React__default.NamedExoticComponent<IconButtonProps>;
|
|
1591
1593
|
|
|
1594
|
+
type ToastProviderProps = ToastStateProps;
|
|
1595
|
+
type MindlyToastProps = {
|
|
1596
|
+
type?: 'success' | 'error' | 'attention' | 'info';
|
|
1597
|
+
text: string;
|
|
1598
|
+
};
|
|
1599
|
+
interface ToastRegionProps<T> extends AriaToastRegionProps {
|
|
1600
|
+
state: ToastState<T>;
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
declare function ToastRegion<T extends React.ReactNode>({ state, ...props }: ToastRegionProps<T>): JSX.Element;
|
|
1604
|
+
|
|
1592
1605
|
declare enum appThemes {
|
|
1593
1606
|
client = "client",
|
|
1594
1607
|
specialist = "specialist"
|
|
@@ -1599,6 +1612,9 @@ type ThemeProviderProps = {
|
|
|
1599
1612
|
|
|
1600
1613
|
declare const ThemeProvider: FC<ThemeProviderProps>;
|
|
1601
1614
|
|
|
1615
|
+
declare const ToastContext: React.Context<ToastState<MindlyToastProps> | undefined>;
|
|
1616
|
+
declare function ToastProvider({ children, ...props }: React.PropsWithChildren<ToastProviderProps>): JSX.Element;
|
|
1617
|
+
|
|
1602
1618
|
declare function useDomRef<T extends HTMLElement = HTMLElement>(ref: React.RefObject<T | null> | React.ForwardedRef<T | null>): React.RefObject<T>;
|
|
1603
1619
|
|
|
1604
1620
|
type AnyFunction = (...args: any[]) => any;
|
|
@@ -1615,6 +1631,8 @@ declare function useAutoFocus<T extends InputRefType>(): React.RefObject<T>;
|
|
|
1615
1631
|
|
|
1616
1632
|
declare function useIsKeyBoardShown(): boolean;
|
|
1617
1633
|
|
|
1634
|
+
declare function useToastContext(): ToastState<MindlyToastProps>;
|
|
1635
|
+
|
|
1618
1636
|
interface IconProps$l extends React.SVGAttributes<SVGElement> {
|
|
1619
1637
|
size?: number | string;
|
|
1620
1638
|
color?: string;
|
|
@@ -1811,4 +1829,4 @@ type SlotsGridProps = {
|
|
|
1811
1829
|
|
|
1812
1830
|
declare const _default: React__default.NamedExoticComponent<SlotsGridProps>;
|
|
1813
1831
|
|
|
1814
|
-
export { AppFooter, _default$9 as AppFooter_v2, AppHeader, AppHeader_v2, ArchivedConsultationCard, Avatar, AvatarProps$1 as AvatarProps, _default$8 as Avatar_v2, _default$4 as Badge, _default$n as BookingScheduleTime, _default$m as BookingSpecialistInfo, Button, Button_v2, Calendar, CancelSession, CardModal, ChangeLangModal, ChangeLanguageModal, _default$I as ChatListItem, _default$G as ChatListSkeleton, _default$H as ChatMessage, ChatMessageSkeleton, _default$h as CheckboxList, CheckboxListCategory, CheckboxListItem, CheckboxTypes, ChevronHeader, _default$z as ConsultationCard, ConsultationCardProps, ConsultationCardType, _default$w as ConsultationModal, _default$u as ConsultationSpecialistCard, Container, Container_v2, ContentCard, CountryOfOriginModal, CustomButton, _default$i as CustomCheckbox, CustomRadioButton, _default$j as CustomSelect, _default$k as CustomTextarea, DatePicker, _default$s as DaySlider, DayToRender, _default$o as EducationCard, _default$F as EmptyChatList, EmptyChatMessages, _default$x as EmptyConsultations, EntryNotFound, EntryNotFoundProps, _default$e as Flag, FlagTypes, _default$6 as Flag_v2, FloatingButton, FooterForBooking, FrequentlyAskedQuestions, HorizontalCalendar, HorizontalCalendarProps, ISpecialistReview, IconArrowLeft, IconArrowRight, IconBeachAccess, _default$1 as IconButton, IconCalendar, IconCalendarMonth, IconChatOutline, IconCheckboxChecked, IconCheckboxUnchecked, IconClose, IconEditCalendar, IconInvisible, IconLanguage, IconLeftArrow, IconLogout, IconPause, IconPlus, IconProfileChecked, IconProfileCircle, IconProfileSetting, IconProfileUnderReview, IconResume, IconSettings, IconStar, IconStarFilled, IconSuccess, IconTime, IconVerifiedUser, IconVisible, ImageInput, ImageWithFallback, ImpressionEmojiEnum, Input, LanguagesList, _default$M as LetterAvatar, _default$f as LineFileInput, ListBox, ListBoxItem, ListButton, ListItemType, ListOption, ListSelect, ListSelectProps, LouseConnect, _default$J as MediaPlayer, Modal, ModalCalendar, NavigationBar, NoInternetConnection, NotSupportModal, NotesCardText, NotesEditor, PasswordInput, _default$L as PersonDateTimeCard, _default$5 as Picture, _default$d as ProfileInformation, _default$q as ProfileView, _default$g as ProgressBar, Range, _default$2 as Rating, _default$t as ReSchedule, ReScheduleSuccess, Refresher, ReviewCard, ReviewStatistics, ReviewSwiperSection, RoundButton, RowItemType, RowSelect, RowSelectProps, ScrollTabs, SectionHeading, Segment, SegmentColor, SegmentType, _default$K as SelectImpressionEmoji, _default$y as SignUpSessionButton, _default$v as SignUpSessionModal, Skeleton, _default$7 as Skeleton_v2, _default as SlotsGrid, _default$p as SpecialistAbout, SpecialistCard, _default$D as SpecialistEducationCard, SpecialistLangs, _default$c as SpecialistMatch, _default$C as SpecialistProfileViewCard, _default$b as SpecialistStatistic, SpecialistStatisticsCard, SpecialistWorkDirections, Spinner, StarRating, StatisticsScroll, StatusTag, SuccessScreen, SwitchDeviceCard, TabBar, Tag, _default$l as TextInput, _default$E as Textarea, _default$3 as Textarea_v2, ThemeProvider, ThemeProviderProps, TherapistCard, TherapistInformationComponent, Toast, ToastButton, ToastProps, Toggle, TooltipComponent, _default$a as Typography, TypographyVariantsEnum, UpdatesCard, UserInfoModal, UsersPsychologistScrollList, VerticalCalendar, VerticalCalendarMonthSkeleton, VerticalCalendarSkeleton, _default$A as VideoCallInfo, _default$B as VideoPlayer, _default$r as WorkDirections, YourLocalTimeBlock, appThemes, decOfNum, toast, useAutoFocus, useDomRef, useEvent, useIsKeyBoardShown };
|
|
1832
|
+
export { AppFooter, _default$9 as AppFooter_v2, AppHeader, AppHeader_v2, ArchivedConsultationCard, Avatar, AvatarProps$1 as AvatarProps, _default$8 as Avatar_v2, _default$4 as Badge, _default$n as BookingScheduleTime, _default$m as BookingSpecialistInfo, Button, Button_v2, Calendar, CancelSession, CardModal, ChangeLangModal, ChangeLanguageModal, _default$I as ChatListItem, _default$G as ChatListSkeleton, _default$H as ChatMessage, ChatMessageSkeleton, _default$h as CheckboxList, CheckboxListCategory, CheckboxListItem, CheckboxTypes, ChevronHeader, _default$z as ConsultationCard, ConsultationCardProps, ConsultationCardType, _default$w as ConsultationModal, _default$u as ConsultationSpecialistCard, Container, Container_v2, ContentCard, CountryOfOriginModal, CustomButton, _default$i as CustomCheckbox, CustomRadioButton, _default$j as CustomSelect, _default$k as CustomTextarea, DatePicker, _default$s as DaySlider, DayToRender, _default$o as EducationCard, _default$F as EmptyChatList, EmptyChatMessages, _default$x as EmptyConsultations, EntryNotFound, EntryNotFoundProps, _default$e as Flag, FlagTypes, _default$6 as Flag_v2, FloatingButton, FooterForBooking, FrequentlyAskedQuestions, HorizontalCalendar, HorizontalCalendarProps, ISpecialistReview, IconArrowLeft, IconArrowRight, IconBeachAccess, _default$1 as IconButton, IconCalendar, IconCalendarMonth, IconChatOutline, IconCheckboxChecked, IconCheckboxUnchecked, IconClose, IconEditCalendar, IconInvisible, IconLanguage, IconLeftArrow, IconLogout, IconPause, IconPlus, IconProfileChecked, IconProfileCircle, IconProfileSetting, IconProfileUnderReview, IconResume, IconSettings, IconStar, IconStarFilled, IconSuccess, IconTime, IconVerifiedUser, IconVisible, ImageInput, ImageWithFallback, ImpressionEmojiEnum, Input, LanguagesList, _default$M as LetterAvatar, _default$f as LineFileInput, ListBox, ListBoxItem, ListButton, ListItemType, ListOption, ListSelect, ListSelectProps, LouseConnect, _default$J as MediaPlayer, Modal, ModalCalendar, NavigationBar, NoInternetConnection, NotSupportModal, NotesCardText, NotesEditor, PasswordInput, _default$L as PersonDateTimeCard, _default$5 as Picture, _default$d as ProfileInformation, _default$q as ProfileView, _default$g as ProgressBar, Range, _default$2 as Rating, _default$t as ReSchedule, ReScheduleSuccess, Refresher, ReviewCard, ReviewStatistics, ReviewSwiperSection, RoundButton, RowItemType, RowSelect, RowSelectProps, ScrollTabs, SectionHeading, Segment, SegmentColor, SegmentType, _default$K as SelectImpressionEmoji, _default$y as SignUpSessionButton, _default$v as SignUpSessionModal, Skeleton, _default$7 as Skeleton_v2, _default as SlotsGrid, _default$p as SpecialistAbout, SpecialistCard, _default$D as SpecialistEducationCard, SpecialistLangs, _default$c as SpecialistMatch, _default$C as SpecialistProfileViewCard, _default$b as SpecialistStatistic, SpecialistStatisticsCard, SpecialistWorkDirections, Spinner, StarRating, StatisticsScroll, StatusTag, SuccessScreen, SwitchDeviceCard, TabBar, Tag, _default$l as TextInput, _default$E as Textarea, _default$3 as Textarea_v2, ThemeProvider, ThemeProviderProps, TherapistCard, TherapistInformationComponent, Toast, ToastButton, ToastContext, ToastProps, ToastProvider, ToastRegion, Toggle, TooltipComponent, _default$a as Typography, TypographyVariantsEnum, UpdatesCard, UserInfoModal, UsersPsychologistScrollList, VerticalCalendar, VerticalCalendarMonthSkeleton, VerticalCalendarSkeleton, _default$A as VideoCallInfo, _default$B as VideoPlayer, _default$r as WorkDirections, YourLocalTimeBlock, appThemes, decOfNum, toast, useAutoFocus, useDomRef, useEvent, useIsKeyBoardShown, useToastContext };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mindly/ui-components",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"clean": "rimraf dist",
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
"@fontsource/inter-tight": "^5.0.12",
|
|
21
21
|
"@ionic/react": "^6.1.11",
|
|
22
22
|
"@ionic/react-router": "^6.1.11",
|
|
23
|
+
"@react-aria/toast": "^3.0.0-beta.7",
|
|
24
|
+
"@react-stately/toast": "^3.0.0-beta.1",
|
|
23
25
|
"classnames": "^2.3.2",
|
|
24
26
|
"date-fns": "^2.28.0",
|
|
25
27
|
"html-react-parser": "^3.0.4",
|
|
@@ -12,6 +12,15 @@ export default {
|
|
|
12
12
|
black: 'rgba(var(--color-gray-black) / <alpha-value>)',
|
|
13
13
|
},
|
|
14
14
|
},
|
|
15
|
+
info: {
|
|
16
|
+
red: {
|
|
17
|
+
not: {
|
|
18
|
+
red: 'rgba(var(--color-info-red-not-red) / <alpha-value>)',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
blue: 'rgba(var(--color-info-blue) / <alpha-value>)',
|
|
22
|
+
},
|
|
23
|
+
white: '#ffffff',
|
|
15
24
|
},
|
|
16
25
|
typography: {
|
|
17
26
|
typography: {
|
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
|
|
12
12
|
--color-gray-black: 33 33 33;
|
|
13
13
|
|
|
14
|
+
--color-info-red-not-red: 255 109 71;
|
|
15
|
+
--color-info-blue: 9 116 255;
|
|
16
|
+
|
|
14
17
|
/* badge variables start */
|
|
15
18
|
/* badges attentions */
|
|
16
19
|
--badges-attention-main: 255 153 0;
|
|
@@ -35,7 +38,6 @@
|
|
|
35
38
|
--badges-info-main: 9 116 255;
|
|
36
39
|
--badges-info-bg: 229 241 255;
|
|
37
40
|
/* badge variables end */
|
|
38
|
-
|
|
39
41
|
--controls-element-unselected: 33 33 33;
|
|
40
42
|
--controls-element-selected: 33 33 33;
|
|
41
43
|
|