@flipdish/ui-library 0.56.0 → 0.57.0
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/atoms/AppStoreButton/index.cjs +23 -40
- package/dist/components/atoms/AppStoreButton/index.cjs.map +1 -1
- package/dist/components/atoms/AppStoreButton/index.d.ts +30 -28
- package/dist/components/atoms/AppStoreButton/index.d.ts.map +1 -1
- package/dist/components/atoms/AppStoreButton/index.js +20 -37
- package/dist/components/atoms/AppStoreButton/index.js.map +1 -1
- package/dist/components/atoms/{AppStoreButton/components → BrandButtons/AppStoreButton}/AppStoreBadgeLink.cjs +1 -1
- package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreBadgeLink.cjs.map +1 -0
- package/dist/components/atoms/{AppStoreButton/components → BrandButtons/AppStoreButton}/AppStoreBadgeLink.d.ts +1 -1
- package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreBadgeLink.d.ts.map +1 -0
- package/dist/components/atoms/{AppStoreButton/components → BrandButtons/AppStoreButton}/AppStoreBadgeLink.js +1 -1
- package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreBadgeLink.js.map +1 -0
- package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreButton.cjs +44 -0
- package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreButton.cjs.map +1 -0
- package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreButton.d.ts +42 -0
- package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreButton.d.ts.map +1 -0
- package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreButton.js +38 -0
- package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreButton.js.map +1 -0
- package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreButtonsOutline.cjs.map +1 -0
- package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreButtonsOutline.d.ts.map +1 -0
- package/dist/components/atoms/BrandButtons/AppStoreButton/AppStoreButtonsOutline.js.map +1 -0
- package/dist/components/atoms/{AppStoreButton/components → BrandButtons/AppStoreButton}/GooglePlayPaths.cjs +1 -1
- package/dist/components/atoms/BrandButtons/AppStoreButton/GooglePlayPaths.cjs.map +1 -0
- package/dist/components/atoms/{AppStoreButton/components → BrandButtons/AppStoreButton}/GooglePlayPaths.d.ts +1 -1
- package/dist/components/atoms/BrandButtons/AppStoreButton/GooglePlayPaths.d.ts.map +1 -0
- package/dist/components/atoms/{AppStoreButton/components → BrandButtons/AppStoreButton}/GooglePlayPaths.js +1 -1
- package/dist/components/atoms/BrandButtons/AppStoreButton/GooglePlayPaths.js.map +1 -0
- package/dist/components/atoms/BrandButtons/SocialButton/SocialButton.cjs +108 -0
- package/dist/components/atoms/BrandButtons/SocialButton/SocialButton.cjs.map +1 -0
- package/dist/components/atoms/BrandButtons/SocialButton/SocialButton.d.ts +66 -0
- package/dist/components/atoms/BrandButtons/SocialButton/SocialButton.d.ts.map +1 -0
- package/dist/components/atoms/BrandButtons/SocialButton/SocialButton.js +105 -0
- package/dist/components/atoms/BrandButtons/SocialButton/SocialButton.js.map +1 -0
- package/dist/components/atoms/BrandButtons/SocialButton/SocialLogos.cjs.map +1 -0
- package/dist/components/atoms/BrandButtons/SocialButton/SocialLogos.d.ts.map +1 -0
- package/dist/components/atoms/BrandButtons/SocialButton/SocialLogos.js.map +1 -0
- package/dist/components/atoms/BrandButtons/index.cjs +19 -0
- package/dist/components/atoms/BrandButtons/index.cjs.map +1 -0
- package/dist/components/atoms/BrandButtons/index.d.ts +14 -0
- package/dist/components/atoms/BrandButtons/index.d.ts.map +1 -0
- package/dist/components/atoms/BrandButtons/index.js +4 -0
- package/dist/components/atoms/BrandButtons/index.js.map +1 -0
- package/dist/components/atoms/SocialButton/index.cjs +6 -100
- package/dist/components/atoms/SocialButton/index.cjs.map +1 -1
- package/dist/components/atoms/SocialButton/index.d.ts +6 -31
- package/dist/components/atoms/SocialButton/index.d.ts.map +1 -1
- package/dist/components/atoms/SocialButton/index.js +6 -100
- package/dist/components/atoms/SocialButton/index.js.map +1 -1
- package/dist/components/atoms/UtilityButton/index.cjs +5 -2
- package/dist/components/atoms/UtilityButton/index.cjs.map +1 -1
- package/dist/components/atoms/UtilityButton/index.d.ts.map +1 -1
- package/dist/components/atoms/UtilityButton/index.js +5 -2
- package/dist/components/atoms/UtilityButton/index.js.map +1 -1
- package/dist/components/forms/fields/FormDatePicker/index.cjs +2 -2
- package/dist/components/forms/fields/FormDatePicker/index.d.ts +1 -1
- package/dist/components/forms/fields/FormDatePicker/index.d.ts.map +1 -1
- package/dist/components/forms/fields/FormDatePicker/index.js +1 -1
- package/dist/components/molecules/ActivityFeed/index.cjs +32 -0
- package/dist/components/molecules/ActivityFeed/index.cjs.map +1 -0
- package/dist/components/molecules/ActivityFeed/index.d.ts +54 -0
- package/dist/components/molecules/ActivityFeed/index.d.ts.map +1 -0
- package/dist/components/molecules/ActivityFeed/index.js +30 -0
- package/dist/components/molecules/ActivityFeed/index.js.map +1 -0
- package/dist/components/molecules/Carousel/index.cjs +5 -140
- package/dist/components/molecules/Carousel/index.cjs.map +1 -1
- package/dist/components/molecules/Carousel/index.d.ts +5 -122
- package/dist/components/molecules/Carousel/index.d.ts.map +1 -1
- package/dist/components/molecules/Carousel/index.js +5 -140
- package/dist/components/molecules/Carousel/index.js.map +1 -1
- package/dist/components/molecules/CodeSnippet/index.cjs +5 -106
- package/dist/components/molecules/CodeSnippet/index.cjs.map +1 -1
- package/dist/components/molecules/CodeSnippet/index.d.ts +13 -73
- package/dist/components/molecules/CodeSnippet/index.d.ts.map +1 -1
- package/dist/components/molecules/CodeSnippet/index.js +5 -106
- package/dist/components/molecules/CodeSnippet/index.js.map +1 -1
- package/dist/components/molecules/Messaging/components/MessageItemActions.cjs +11 -0
- package/dist/components/molecules/Messaging/components/MessageItemActions.cjs.map +1 -0
- package/dist/components/{organisms → molecules}/Messaging/components/MessageItemActions.d.ts +1 -1
- package/dist/components/molecules/Messaging/components/MessageItemActions.d.ts.map +1 -0
- package/dist/components/molecules/Messaging/components/MessageItemActions.js +9 -0
- package/dist/components/molecules/Messaging/components/MessageItemActions.js.map +1 -0
- package/dist/components/molecules/Messaging/index.cjs +56 -0
- package/dist/components/molecules/Messaging/index.cjs.map +1 -0
- package/dist/components/molecules/Messaging/index.d.ts +70 -0
- package/dist/components/molecules/Messaging/index.d.ts.map +1 -0
- package/dist/components/molecules/Messaging/index.js +53 -0
- package/dist/components/molecules/Messaging/index.js.map +1 -0
- package/dist/components/{organisms/Messaging → molecules/Messaging/utilities}/messageItem.utils.cjs +4 -2
- package/dist/components/molecules/Messaging/utilities/messageItem.utils.cjs.map +1 -0
- package/dist/components/molecules/Messaging/utilities/messageItem.utils.d.ts.map +1 -0
- package/dist/components/{organisms/Messaging → molecules/Messaging/utilities}/messageItem.utils.js +4 -2
- package/dist/components/molecules/Messaging/utilities/messageItem.utils.js.map +1 -0
- package/dist/components/molecules/Notification/index.cjs +7 -43
- package/dist/components/molecules/Notification/index.cjs.map +1 -1
- package/dist/components/molecules/Notification/index.d.ts +9 -90
- package/dist/components/molecules/Notification/index.d.ts.map +1 -1
- package/dist/components/molecules/Notification/index.js +7 -43
- package/dist/components/molecules/Notification/index.js.map +1 -1
- package/dist/components/molecules/Notifications/AvatarNotification/AvatarNotification.cjs +21 -0
- package/dist/components/molecules/Notifications/AvatarNotification/AvatarNotification.cjs.map +1 -0
- package/dist/components/molecules/Notifications/AvatarNotification/AvatarNotification.d.ts +46 -0
- package/dist/components/molecules/Notifications/AvatarNotification/AvatarNotification.d.ts.map +1 -0
- package/dist/components/molecules/Notifications/AvatarNotification/AvatarNotification.js +19 -0
- package/dist/components/molecules/Notifications/AvatarNotification/AvatarNotification.js.map +1 -0
- package/dist/components/molecules/Notifications/IconNotification/IconNotification.cjs +26 -0
- package/dist/components/molecules/Notifications/IconNotification/IconNotification.cjs.map +1 -0
- package/dist/components/molecules/Notifications/IconNotification/IconNotification.d.ts +39 -0
- package/dist/components/molecules/Notifications/IconNotification/IconNotification.d.ts.map +1 -0
- package/dist/components/molecules/Notifications/IconNotification/IconNotification.js +24 -0
- package/dist/components/molecules/Notifications/IconNotification/IconNotification.js.map +1 -0
- package/dist/components/molecules/Notifications/ImageNotification/ImageNotification.cjs +22 -0
- package/dist/components/molecules/Notifications/ImageNotification/ImageNotification.cjs.map +1 -0
- package/dist/components/molecules/Notifications/ImageNotification/ImageNotification.d.ts +33 -0
- package/dist/components/molecules/Notifications/ImageNotification/ImageNotification.d.ts.map +1 -0
- package/dist/components/molecules/Notifications/ImageNotification/ImageNotification.js +20 -0
- package/dist/components/molecules/Notifications/ImageNotification/ImageNotification.js.map +1 -0
- package/dist/components/molecules/Notifications/index.cjs +12 -0
- package/dist/components/molecules/Notifications/index.cjs.map +1 -0
- package/dist/components/molecules/Notifications/index.d.ts +16 -0
- package/dist/components/molecules/Notifications/index.d.ts.map +1 -0
- package/dist/components/molecules/Notifications/index.js +4 -0
- package/dist/components/molecules/Notifications/index.js.map +1 -0
- package/dist/components/organisms/ActivityFeed/index.cjs +3 -26
- package/dist/components/organisms/ActivityFeed/index.cjs.map +1 -1
- package/dist/components/organisms/ActivityFeed/index.d.ts +7 -52
- package/dist/components/organisms/ActivityFeed/index.d.ts.map +1 -1
- package/dist/components/organisms/ActivityFeed/index.js +3 -26
- package/dist/components/organisms/ActivityFeed/index.js.map +1 -1
- package/dist/components/organisms/Calendar/components/CalendarDayView.cjs +1 -1
- package/dist/components/organisms/Calendar/components/CalendarDayView.js +1 -1
- package/dist/components/{molecules → organisms}/Carousel/hooks/useCarouselScroll.cjs +4 -1
- package/dist/components/organisms/Carousel/hooks/useCarouselScroll.cjs.map +1 -0
- package/dist/components/{molecules → organisms}/Carousel/hooks/useCarouselScroll.d.ts +3 -3
- package/dist/components/{molecules → organisms}/Carousel/hooks/useCarouselScroll.d.ts.map +1 -1
- package/dist/components/{molecules → organisms}/Carousel/hooks/useCarouselScroll.js +4 -1
- package/dist/components/organisms/Carousel/hooks/useCarouselScroll.js.map +1 -0
- package/dist/components/organisms/Carousel/index.cjs +155 -0
- package/dist/components/organisms/Carousel/index.cjs.map +1 -0
- package/dist/components/organisms/Carousel/index.d.ts +133 -0
- package/dist/components/organisms/Carousel/index.d.ts.map +1 -0
- package/dist/components/organisms/Carousel/index.js +152 -0
- package/dist/components/organisms/Carousel/index.js.map +1 -0
- package/dist/components/organisms/CodeSnippet/hooks/useCodeSnippetCollapse.cjs +39 -0
- package/dist/components/organisms/CodeSnippet/hooks/useCodeSnippetCollapse.cjs.map +1 -0
- package/dist/components/{molecules → organisms}/CodeSnippet/hooks/useCodeSnippetCollapse.d.ts +7 -3
- package/dist/components/organisms/CodeSnippet/hooks/useCodeSnippetCollapse.d.ts.map +1 -0
- package/dist/components/organisms/CodeSnippet/hooks/useCodeSnippetCollapse.js +37 -0
- package/dist/components/organisms/CodeSnippet/hooks/useCodeSnippetCollapse.js.map +1 -0
- package/dist/components/{molecules → organisms}/CodeSnippet/hooks/useCodeSnippetHighlight.cjs.map +1 -1
- package/dist/components/{molecules → organisms}/CodeSnippet/hooks/useCodeSnippetHighlight.d.ts.map +1 -1
- package/dist/components/{molecules → organisms}/CodeSnippet/hooks/useCodeSnippetHighlight.js.map +1 -1
- package/dist/components/organisms/CodeSnippet/index.cjs +126 -0
- package/dist/components/organisms/CodeSnippet/index.cjs.map +1 -0
- package/dist/components/organisms/CodeSnippet/index.d.ts +69 -0
- package/dist/components/organisms/CodeSnippet/index.d.ts.map +1 -0
- package/dist/components/organisms/CodeSnippet/index.js +123 -0
- package/dist/components/organisms/CodeSnippet/index.js.map +1 -0
- package/dist/components/organisms/CodeSnippet/utilities/codeSnippet.utils.cjs.map +1 -0
- package/dist/components/organisms/CodeSnippet/utilities/codeSnippet.utils.d.ts.map +1 -0
- package/dist/components/organisms/CodeSnippet/utilities/codeSnippet.utils.js.map +1 -0
- package/dist/components/organisms/DatePicker/index.cjs +9 -57
- package/dist/components/organisms/DatePicker/index.cjs.map +1 -1
- package/dist/components/organisms/DatePicker/index.d.ts +15 -29
- package/dist/components/organisms/DatePicker/index.d.ts.map +1 -1
- package/dist/components/organisms/DatePicker/index.js +8 -56
- package/dist/components/organisms/DatePicker/index.js.map +1 -1
- package/dist/components/organisms/{DatePicker/components → DatePickers/DatePicker}/Calendar.cjs +2 -2
- package/dist/components/organisms/DatePickers/DatePicker/Calendar.cjs.map +1 -0
- package/dist/components/organisms/DatePickers/DatePicker/Calendar.d.ts.map +1 -0
- package/dist/components/organisms/{DatePicker/components → DatePickers/DatePicker}/Calendar.js +2 -2
- package/dist/components/organisms/DatePickers/DatePicker/Calendar.js.map +1 -0
- package/dist/components/organisms/DatePickers/DatePicker/DatePicker.cjs +55 -0
- package/dist/components/organisms/DatePickers/DatePicker/DatePicker.cjs.map +1 -0
- package/dist/components/organisms/DatePickers/DatePicker/DatePicker.d.ts +31 -0
- package/dist/components/organisms/DatePickers/DatePicker/DatePicker.d.ts.map +1 -0
- package/dist/components/organisms/DatePickers/DatePicker/DatePicker.js +53 -0
- package/dist/components/organisms/DatePickers/DatePicker/DatePicker.js.map +1 -0
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.cjs +73 -0
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.cjs.map +1 -0
- package/dist/components/organisms/{DatePicker/components → DatePickers/DateRangePicker}/DateRangePicker.d.ts +4 -2
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.d.ts.map +1 -0
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.js +71 -0
- package/dist/components/organisms/DatePickers/DateRangePicker/DateRangePicker.js.map +1 -0
- package/dist/components/organisms/{DatePicker/components → DatePickers/RangeCalendar}/RangeCalendar.cjs +2 -2
- package/dist/components/organisms/DatePickers/RangeCalendar/RangeCalendar.cjs.map +1 -0
- package/dist/components/organisms/DatePickers/RangeCalendar/RangeCalendar.d.ts.map +1 -0
- package/dist/components/organisms/{DatePicker/components → DatePickers/RangeCalendar}/RangeCalendar.js +2 -2
- package/dist/components/organisms/DatePickers/RangeCalendar/RangeCalendar.js.map +1 -0
- package/dist/components/organisms/DatePickers/components/CalendarOverlay.cjs.map +1 -0
- package/dist/components/organisms/DatePickers/components/CalendarOverlay.d.ts.map +1 -0
- package/dist/components/organisms/DatePickers/components/CalendarOverlay.js.map +1 -0
- package/dist/components/organisms/{DatePicker → DatePickers}/components/Cell.cjs +1 -1
- package/dist/components/organisms/DatePickers/components/Cell.cjs.map +1 -0
- package/dist/components/organisms/DatePickers/components/Cell.d.ts.map +1 -0
- package/dist/components/organisms/{DatePicker → DatePickers}/components/Cell.js +1 -1
- package/dist/components/organisms/DatePickers/components/Cell.js.map +1 -0
- package/dist/components/organisms/DatePickers/components/InputDate.cjs.map +1 -0
- package/dist/components/organisms/DatePickers/components/InputDate.d.ts.map +1 -0
- package/dist/components/organisms/DatePickers/components/InputDate.js.map +1 -0
- package/dist/components/organisms/DatePickers/hooks/useDatePickerDraft.cjs +27 -0
- package/dist/components/organisms/DatePickers/hooks/useDatePickerDraft.cjs.map +1 -0
- package/dist/components/organisms/DatePickers/hooks/useDatePickerDraft.d.ts +18 -0
- package/dist/components/organisms/DatePickers/hooks/useDatePickerDraft.d.ts.map +1 -0
- package/dist/components/organisms/DatePickers/hooks/useDatePickerDraft.js +25 -0
- package/dist/components/organisms/DatePickers/hooks/useDatePickerDraft.js.map +1 -0
- package/dist/components/organisms/DatePickers/index.cjs +12 -0
- package/dist/components/organisms/DatePickers/index.cjs.map +1 -0
- package/dist/components/organisms/DatePickers/index.d.ts +16 -0
- package/dist/components/organisms/DatePickers/index.d.ts.map +1 -0
- package/dist/components/organisms/DatePickers/index.js +4 -0
- package/dist/components/organisms/DatePickers/index.js.map +1 -0
- package/dist/components/organisms/DatePickers/utilities/calendarCell.utils.cjs.map +1 -0
- package/dist/components/organisms/DatePickers/utilities/calendarCell.utils.d.ts.map +1 -0
- package/dist/components/organisms/DatePickers/utilities/calendarCell.utils.js.map +1 -0
- package/dist/components/organisms/DatePickers/utilities/dateRangePresets.utils.cjs +47 -0
- package/dist/components/organisms/DatePickers/utilities/dateRangePresets.utils.cjs.map +1 -0
- package/dist/components/organisms/DatePickers/utilities/dateRangePresets.utils.d.ts +74 -0
- package/dist/components/organisms/DatePickers/utilities/dateRangePresets.utils.d.ts.map +1 -0
- package/dist/components/organisms/DatePickers/utilities/dateRangePresets.utils.js +45 -0
- package/dist/components/organisms/DatePickers/utilities/dateRangePresets.utils.js.map +1 -0
- package/dist/components/organisms/Messaging/index.cjs +5 -49
- package/dist/components/organisms/Messaging/index.cjs.map +1 -1
- package/dist/components/organisms/Messaging/index.d.ts +9 -68
- package/dist/components/organisms/Messaging/index.d.ts.map +1 -1
- package/dist/components/organisms/Messaging/index.js +5 -49
- package/dist/components/organisms/Messaging/index.js.map +1 -1
- package/dist/native/components/atoms/BrandButtons/index.d.ts +12 -0
- package/dist/native/components/molecules/ActivityFeed/index.d.ts +12 -0
- package/dist/native/components/molecules/Messaging/index.d.ts +12 -0
- package/dist/native/components/molecules/Notifications/index.d.ts +12 -0
- package/dist/native/components/organisms/Carousel/index.d.ts +12 -0
- package/dist/native/components/organisms/CodeSnippet/index.d.ts +12 -0
- package/dist/native/components/organisms/DatePickers/index.d.ts +12 -0
- package/package.json +1 -1
- package/dist/components/atoms/AppStoreButton/components/AppStoreBadgeLink.cjs.map +0 -1
- package/dist/components/atoms/AppStoreButton/components/AppStoreBadgeLink.d.ts.map +0 -1
- package/dist/components/atoms/AppStoreButton/components/AppStoreBadgeLink.js.map +0 -1
- package/dist/components/atoms/AppStoreButton/components/AppStoreButtonsOutline.cjs.map +0 -1
- package/dist/components/atoms/AppStoreButton/components/AppStoreButtonsOutline.d.ts.map +0 -1
- package/dist/components/atoms/AppStoreButton/components/AppStoreButtonsOutline.js.map +0 -1
- package/dist/components/atoms/AppStoreButton/components/GooglePlayPaths.cjs.map +0 -1
- package/dist/components/atoms/AppStoreButton/components/GooglePlayPaths.d.ts.map +0 -1
- package/dist/components/atoms/AppStoreButton/components/GooglePlayPaths.js.map +0 -1
- package/dist/components/atoms/SocialButton/components/SocialLogos.cjs.map +0 -1
- package/dist/components/atoms/SocialButton/components/SocialLogos.d.ts.map +0 -1
- package/dist/components/atoms/SocialButton/components/SocialLogos.js.map +0 -1
- package/dist/components/molecules/Carousel/hooks/useCarouselScroll.cjs.map +0 -1
- package/dist/components/molecules/Carousel/hooks/useCarouselScroll.js.map +0 -1
- package/dist/components/molecules/CodeSnippet/codeSnippet.utils.cjs.map +0 -1
- package/dist/components/molecules/CodeSnippet/codeSnippet.utils.d.ts.map +0 -1
- package/dist/components/molecules/CodeSnippet/codeSnippet.utils.js.map +0 -1
- package/dist/components/molecules/CodeSnippet/hooks/useCodeSnippetCollapse.cjs +0 -29
- package/dist/components/molecules/CodeSnippet/hooks/useCodeSnippetCollapse.cjs.map +0 -1
- package/dist/components/molecules/CodeSnippet/hooks/useCodeSnippetCollapse.d.ts.map +0 -1
- package/dist/components/molecules/CodeSnippet/hooks/useCodeSnippetCollapse.js +0 -27
- package/dist/components/molecules/CodeSnippet/hooks/useCodeSnippetCollapse.js.map +0 -1
- package/dist/components/organisms/DatePicker/calendarCell.utils.cjs.map +0 -1
- package/dist/components/organisms/DatePicker/calendarCell.utils.d.ts.map +0 -1
- package/dist/components/organisms/DatePicker/calendarCell.utils.js.map +0 -1
- package/dist/components/organisms/DatePicker/components/Calendar.cjs.map +0 -1
- package/dist/components/organisms/DatePicker/components/Calendar.d.ts.map +0 -1
- package/dist/components/organisms/DatePicker/components/Calendar.js.map +0 -1
- package/dist/components/organisms/DatePicker/components/CalendarOverlay.cjs.map +0 -1
- package/dist/components/organisms/DatePicker/components/CalendarOverlay.d.ts.map +0 -1
- package/dist/components/organisms/DatePicker/components/CalendarOverlay.js.map +0 -1
- package/dist/components/organisms/DatePicker/components/Cell.cjs.map +0 -1
- package/dist/components/organisms/DatePicker/components/Cell.d.ts.map +0 -1
- package/dist/components/organisms/DatePicker/components/Cell.js.map +0 -1
- package/dist/components/organisms/DatePicker/components/DateRangePicker.cjs +0 -108
- package/dist/components/organisms/DatePicker/components/DateRangePicker.cjs.map +0 -1
- package/dist/components/organisms/DatePicker/components/DateRangePicker.d.ts.map +0 -1
- package/dist/components/organisms/DatePicker/components/DateRangePicker.js +0 -106
- package/dist/components/organisms/DatePicker/components/DateRangePicker.js.map +0 -1
- package/dist/components/organisms/DatePicker/components/InputDate.cjs.map +0 -1
- package/dist/components/organisms/DatePicker/components/InputDate.d.ts.map +0 -1
- package/dist/components/organisms/DatePicker/components/InputDate.js.map +0 -1
- package/dist/components/organisms/DatePicker/components/RangeCalendar.cjs.map +0 -1
- package/dist/components/organisms/DatePicker/components/RangeCalendar.d.ts.map +0 -1
- package/dist/components/organisms/DatePicker/components/RangeCalendar.js.map +0 -1
- package/dist/components/organisms/Messaging/components/MessageItemActions.cjs +0 -13
- package/dist/components/organisms/Messaging/components/MessageItemActions.cjs.map +0 -1
- package/dist/components/organisms/Messaging/components/MessageItemActions.d.ts.map +0 -1
- package/dist/components/organisms/Messaging/components/MessageItemActions.js +0 -11
- package/dist/components/organisms/Messaging/components/MessageItemActions.js.map +0 -1
- package/dist/components/organisms/Messaging/messageItem.utils.cjs.map +0 -1
- package/dist/components/organisms/Messaging/messageItem.utils.d.ts.map +0 -1
- package/dist/components/organisms/Messaging/messageItem.utils.js.map +0 -1
- /package/dist/components/atoms/{AppStoreButton/components → BrandButtons/AppStoreButton}/AppStoreButtonsOutline.cjs +0 -0
- /package/dist/components/atoms/{AppStoreButton/components → BrandButtons/AppStoreButton}/AppStoreButtonsOutline.d.ts +0 -0
- /package/dist/components/atoms/{AppStoreButton/components → BrandButtons/AppStoreButton}/AppStoreButtonsOutline.js +0 -0
- /package/dist/components/atoms/{SocialButton/components → BrandButtons/SocialButton}/SocialLogos.cjs +0 -0
- /package/dist/components/atoms/{SocialButton/components → BrandButtons/SocialButton}/SocialLogos.d.ts +0 -0
- /package/dist/components/atoms/{SocialButton/components → BrandButtons/SocialButton}/SocialLogos.js +0 -0
- /package/dist/components/{organisms/Messaging → molecules/Messaging/utilities}/messageItem.utils.d.ts +0 -0
- /package/dist/components/{molecules → organisms}/CodeSnippet/hooks/useCodeSnippetHighlight.cjs +0 -0
- /package/dist/components/{molecules → organisms}/CodeSnippet/hooks/useCodeSnippetHighlight.d.ts +0 -0
- /package/dist/components/{molecules → organisms}/CodeSnippet/hooks/useCodeSnippetHighlight.js +0 -0
- /package/dist/components/{molecules/CodeSnippet → organisms/CodeSnippet/utilities}/codeSnippet.utils.cjs +0 -0
- /package/dist/components/{molecules/CodeSnippet → organisms/CodeSnippet/utilities}/codeSnippet.utils.d.ts +0 -0
- /package/dist/components/{molecules/CodeSnippet → organisms/CodeSnippet/utilities}/codeSnippet.utils.js +0 -0
- /package/dist/components/organisms/{DatePicker/components → DatePickers/DatePicker}/Calendar.d.ts +0 -0
- /package/dist/components/organisms/{DatePicker/components → DatePickers/RangeCalendar}/RangeCalendar.d.ts +0 -0
- /package/dist/components/organisms/{DatePicker → DatePickers}/components/CalendarOverlay.cjs +0 -0
- /package/dist/components/organisms/{DatePicker → DatePickers}/components/CalendarOverlay.d.ts +0 -0
- /package/dist/components/organisms/{DatePicker → DatePickers}/components/CalendarOverlay.js +0 -0
- /package/dist/components/organisms/{DatePicker → DatePickers}/components/Cell.d.ts +0 -0
- /package/dist/components/organisms/{DatePicker → DatePickers}/components/InputDate.cjs +0 -0
- /package/dist/components/organisms/{DatePicker → DatePickers}/components/InputDate.d.ts +0 -0
- /package/dist/components/organisms/{DatePicker → DatePickers}/components/InputDate.js +0 -0
- /package/dist/components/organisms/{DatePicker → DatePickers/utilities}/calendarCell.utils.cjs +0 -0
- /package/dist/components/organisms/{DatePicker → DatePickers/utilities}/calendarCell.utils.d.ts +0 -0
- /package/dist/components/organisms/{DatePicker → DatePickers/utilities}/calendarCell.utils.js +0 -0
|
@@ -1,92 +1,11 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/** Label of the dismiss link button. */
|
|
11
|
-
dismissLabel?: string;
|
|
12
|
-
/** Hides the dismiss link button; the close icon button stays. */
|
|
13
|
-
hideDismissLabel?: boolean;
|
|
14
|
-
/** Icon inside the featured icon, replacing the default for `color`. */
|
|
15
|
-
icon?: FC<{
|
|
16
|
-
className?: string;
|
|
17
|
-
}>;
|
|
18
|
-
/** Status colour of the featured icon, which also picks its default icon. */
|
|
19
|
-
color?: StatusColor;
|
|
20
|
-
/** Upload progress from 0 to 100; shows a progress bar when set. */
|
|
21
|
-
progress?: number;
|
|
22
|
-
/** Called when the dismiss link or the close icon button is pressed. */
|
|
23
|
-
onClose?: () => void;
|
|
24
|
-
/** Called when the confirm link button is pressed. */
|
|
25
|
-
onConfirm?: () => void;
|
|
26
|
-
/**
|
|
27
|
-
* Overrides the `data-testid` (defaults to `fd-icon-notification`). The confirm,
|
|
28
|
-
* dismiss, close, and progress controls derive their ids from this prefix.
|
|
29
|
-
*/
|
|
30
|
-
'data-testid'?: string;
|
|
1
|
+
import { IconNotification as IconNotificationNext, type IconNotificationProps as IconNotificationPropsNext } from '@flipdish/ui-library/components/molecules/Notifications';
|
|
2
|
+
/** @deprecated Import from `@flipdish/ui-library/components/molecules/Notifications`. Removed in the next major. */
|
|
3
|
+
export declare const IconNotification: (props: IconNotificationProps) => ReturnType<typeof IconNotificationNext>;
|
|
4
|
+
/** @deprecated Import from `@flipdish/ui-library/components/molecules/Notifications`. Removed in the next major. */
|
|
5
|
+
export declare const AvatarNotification: ({ name, content, avatar, confirmLabel, dismissLabel, hideDismissLabel, date, onClose, onConfirm, "data-testid": dataTestId, }: import("@flipdish/ui-library/components/molecules/Notifications").AvatarNotificationProps) => import("react").JSX.Element;
|
|
6
|
+
/** @deprecated Import from `@flipdish/ui-library/components/molecules/Notifications`. Removed in the next major. */
|
|
7
|
+
export declare const ImageNotification: ({ title, description, confirmLabel, dismissLabel, hideDismissLabel, imageMobile, imageDesktop, onClose, onConfirm, "data-testid": dataTestId, }: import("@flipdish/ui-library/components/molecules/Notifications").ImageNotificationProps) => import("react").JSX.Element;
|
|
8
|
+
/** @deprecated Import from `@flipdish/ui-library/components/molecules/Notifications`. Removed in the next major. */
|
|
9
|
+
export interface IconNotificationProps extends IconNotificationPropsNext {
|
|
31
10
|
}
|
|
32
|
-
/**
|
|
33
|
-
* Toast that pairs a featured icon with a title, supporting text and optional actions. Use for
|
|
34
|
-
* transient feedback after an action.
|
|
35
|
-
*
|
|
36
|
-
* @summary toast notification led by a featured icon
|
|
37
|
-
*/
|
|
38
|
-
export declare const IconNotification: ({ title, description, confirmLabel, dismissLabel, hideDismissLabel, icon, progress, onClose, onConfirm, color, "data-testid": dataTestId, }: IconNotificationProps) => import("react").JSX.Element;
|
|
39
|
-
interface AvatarNotificationProps {
|
|
40
|
-
name: string;
|
|
41
|
-
content: string;
|
|
42
|
-
avatar: string;
|
|
43
|
-
date: string;
|
|
44
|
-
confirmLabel: string;
|
|
45
|
-
dismissLabel?: string;
|
|
46
|
-
hideDismissLabel?: boolean;
|
|
47
|
-
icon?: FC<{
|
|
48
|
-
className?: string;
|
|
49
|
-
}>;
|
|
50
|
-
color?: 'default' | 'brand' | 'gray' | 'error' | 'warning' | 'success';
|
|
51
|
-
onClose?: () => void;
|
|
52
|
-
onConfirm?: () => void;
|
|
53
|
-
/**
|
|
54
|
-
* Overrides the `data-testid` (defaults to `fd-avatar-notification`). The confirm,
|
|
55
|
-
* dismiss, and close controls derive their ids from this prefix.
|
|
56
|
-
*/
|
|
57
|
-
'data-testid'?: string;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Toast that pairs a sender's avatar, name and timestamp with a message and actions. Use for
|
|
61
|
-
* transient alerts about activity from another person, such as a mention or an invite.
|
|
62
|
-
*
|
|
63
|
-
* @summary toast notification led by a sender's avatar
|
|
64
|
-
*/
|
|
65
|
-
export declare const AvatarNotification: ({ name, content, avatar, confirmLabel, dismissLabel, hideDismissLabel, date, onClose, onConfirm, "data-testid": dataTestId, }: AvatarNotificationProps) => import("react").JSX.Element;
|
|
66
|
-
interface ImageNotificationProps {
|
|
67
|
-
title: string;
|
|
68
|
-
description: string;
|
|
69
|
-
confirmLabel: string;
|
|
70
|
-
dismissLabel?: string;
|
|
71
|
-
hideDismissLabel?: boolean;
|
|
72
|
-
/** Image for the full-width banner shown below `md`; a wide crop suits the 160px-tall slot. */
|
|
73
|
-
imageMobile: string;
|
|
74
|
-
/** Image for the 160px-wide side thumbnail shown from `md` up. */
|
|
75
|
-
imageDesktop: string;
|
|
76
|
-
onClose?: () => void;
|
|
77
|
-
onConfirm?: () => void;
|
|
78
|
-
/**
|
|
79
|
-
* Overrides the `data-testid` (defaults to `fd-image-notification`). The confirm,
|
|
80
|
-
* dismiss, and close controls derive their ids from this prefix.
|
|
81
|
-
*/
|
|
82
|
-
'data-testid'?: string;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Toast that pairs a banner image with a title, supporting text and actions. Use to announce a
|
|
86
|
-
* new feature or promotion where a picture carries the message.
|
|
87
|
-
*
|
|
88
|
-
* @summary toast notification featuring a banner image
|
|
89
|
-
*/
|
|
90
|
-
export declare const ImageNotification: ({ title, description, confirmLabel, dismissLabel, hideDismissLabel, imageMobile, imageDesktop, onClose, onConfirm, "data-testid": dataTestId, }: ImageNotificationProps) => import("react").JSX.Element;
|
|
91
|
-
export {};
|
|
92
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Notification/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Notification/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAEL,gBAAgB,IAAI,oBAAoB,EACxC,KAAK,qBAAqB,IAAI,yBAAyB,EAExD,MAAM,yDAAyD,CAAC;AAEjE,oHAAoH;AACpH,eAAO,MAAM,gBAAgB,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,UAAU,CAAC,OAAO,oBAAoB,CAAwB,CAAC;AAChI,oHAAoH;AACpH,eAAO,MAAM,kBAAkB,2PAAyB,CAAC;AACzD,oHAAoH;AACpH,eAAO,MAAM,iBAAiB,4QAAwB,CAAC;AACvD,oHAAoH;AACpH,MAAM,WAAW,qBAAsB,SAAQ,yBAAyB;CAAG"}
|
|
@@ -1,47 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Avatar } from '@flipdish/ui-library/components/atoms/Avatar';
|
|
3
|
-
import { Button } from '@flipdish/ui-library/components/atoms/Button';
|
|
4
|
-
import { CloseButton } from '@flipdish/ui-library/components/atoms/CloseButton';
|
|
5
|
-
import { FeaturedIcon } from '@flipdish/ui-library/components/atoms/FeaturedIcon';
|
|
6
|
-
import { ProgressBar } from '@flipdish/ui-library/components/atoms/ProgressBar';
|
|
7
|
-
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
8
|
-
import { useResolvedTestId, joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
9
|
-
import { getStatusFeaturedIconProps } from '../../__internal__/statusIcon/statusIcon.utils.js';
|
|
1
|
+
import { AvatarNotification as AvatarNotification$1, IconNotification as IconNotification$1, ImageNotification as ImageNotification$1 } from '@flipdish/ui-library/components/molecules/Notifications';
|
|
10
2
|
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const IconNotification = ({ title, description, confirmLabel, dismissLabel = 'Dismiss', hideDismissLabel, icon, progress, onClose, onConfirm, color = 'default', 'data-testid': dataTestId, }) => {
|
|
18
|
-
const showProgress = typeof progress === 'number';
|
|
19
|
-
const notificationTestId = useResolvedTestId({ testId: dataTestId, segment: 'icon-notification', rootName: 'icon-notification' });
|
|
20
|
-
const statusIconProps = getStatusFeaturedIconProps(color);
|
|
21
|
-
return (jsxs("div", { "data-testid": notificationTestId, className: "relative z-[var(--z-index)] flex max-w-full flex-col gap-4 rounded-xl bg-primary_alt p-4 shadow-lg ring ring-secondary_alt xs:w-[var(--width)] xs:flex-row", children: [jsx(FeaturedIcon, { ...statusIconProps, icon: icon || statusIconProps.icon, size: "md" }), jsxs("div", { className: cx('flex flex-1 flex-col gap-3 md:pr-8', color !== 'default' && 'md:pt-0.5', showProgress && 'gap-4'), children: [jsxs("div", { className: "flex flex-col gap-1", children: [jsx("p", { className: "text-sm font-semibold text-fg-primary", children: title }), jsx("p", { className: "text-sm text-fg-secondary", children: description })] }), showProgress && (jsx(ProgressBar, { labelPosition: "bottom", value: progress, valueFormatter: (value) => `${value}% uploaded...`, "data-testid": joinTestId(notificationTestId, 'progress') })), jsxs("div", { className: "flex gap-3", children: [!hideDismissLabel && (jsx(Button, { onClick: onClose, size: "sm", color: "link-gray", "data-testid": joinTestId(notificationTestId, 'dismiss'), children: dismissLabel })), confirmLabel && (jsx(Button, { onClick: onConfirm, size: "sm", color: "link-color", "data-testid": joinTestId(notificationTestId, 'confirm'), children: confirmLabel }))] })] }), jsx("div", { className: "absolute top-2 right-2 flex items-center justify-center", children: jsx(CloseButton, { onClick: onClose, size: "sm", label: "Dismiss", "data-testid": joinTestId(notificationTestId, 'close') }) })] }));
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Toast that pairs a sender's avatar, name and timestamp with a message and actions. Use for
|
|
25
|
-
* transient alerts about activity from another person, such as a mention or an invite.
|
|
26
|
-
*
|
|
27
|
-
* @summary toast notification led by a sender's avatar
|
|
28
|
-
*/
|
|
29
|
-
const AvatarNotification = ({ name, content, avatar, confirmLabel, dismissLabel = 'Dismiss', hideDismissLabel, date, onClose, onConfirm, 'data-testid': dataTestId, }) => {
|
|
30
|
-
const notificationTestId = useResolvedTestId({ testId: dataTestId, segment: 'avatar-notification', rootName: 'avatar-notification' });
|
|
31
|
-
return (jsxs("div", { "data-testid": notificationTestId, className: "relative z-[var(--z-index)] flex max-w-full flex-col items-start gap-4 rounded-xl bg-primary_alt p-4 shadow-lg ring ring-secondary_alt xs:w-[var(--width)] xs:flex-row", children: [jsx(Avatar, { size: "md", src: avatar, alt: name, status: "online" }), jsxs("div", { className: "flex flex-col gap-3 pr-8", children: [jsxs("div", { className: "flex flex-col gap-1", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("p", { className: "text-sm font-semibold text-fg-primary", children: name }), jsx("span", { className: "text-sm text-fg-quaternary", children: date })] }), jsx("p", { className: "text-sm text-fg-secondary", children: content })] }), jsxs("div", { className: "flex gap-3", children: [!hideDismissLabel && (jsx(Button, { onClick: onClose, size: "sm", color: "link-gray", "data-testid": joinTestId(notificationTestId, 'dismiss'), children: dismissLabel })), confirmLabel && (jsx(Button, { onClick: onConfirm, size: "sm", color: "link-color", "data-testid": joinTestId(notificationTestId, 'confirm'), children: confirmLabel }))] })] }), jsx("div", { className: "absolute top-2 right-2 flex items-center justify-center", children: jsx(CloseButton, { onClick: onClose, size: "sm", label: "Dismiss", "data-testid": joinTestId(notificationTestId, 'close') }) })] }));
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Toast that pairs a banner image with a title, supporting text and actions. Use to announce a
|
|
35
|
-
* new feature or promotion where a picture carries the message.
|
|
36
|
-
*
|
|
37
|
-
* @summary toast notification featuring a banner image
|
|
38
|
-
*/
|
|
39
|
-
const ImageNotification = ({ title, description, confirmLabel, dismissLabel = 'Dismiss', hideDismissLabel, imageMobile, imageDesktop, onClose, onConfirm, 'data-testid': dataTestId, }) => {
|
|
40
|
-
const notificationTestId = useResolvedTestId({ testId: dataTestId, segment: 'image-notification', rootName: 'image-notification' });
|
|
41
|
-
return (jsxs("div", { "data-testid": notificationTestId, style: {
|
|
42
|
-
'--width': '496px',
|
|
43
|
-
}, className: "relative z-[var(--z-index)] flex max-w-full flex-col gap-3 rounded-xl bg-primary_alt p-4 shadow-lg max-md:ring-1 max-md:ring-secondary_alt xs:w-[var(--width)] xs:flex-row xs:gap-0 md:p-0", children: [jsx("div", { className: "-my-px hidden w-40 shrink-0 overflow-hidden rounded-l-xl outline-1 -outline-offset-1 outline-black/10 md:block", children: jsx("img", { "aria-hidden": "true", src: imageDesktop, alt: "", className: "size-full object-cover" }) }), jsxs("div", { className: "flex flex-1 flex-col gap-4 rounded-r-xl bg-primary_alt md:gap-3 md:p-4 md:pl-5 md:ring-1 md:ring-secondary_alt", children: [jsxs("div", { className: "flex flex-col gap-1 pr-8", children: [jsx("p", { className: "text-sm font-semibold text-fg-primary", children: title }), jsx("p", { className: "text-sm text-fg-secondary", children: description })] }), jsx("div", { className: "h-40 w-full overflow-hidden rounded-md bg-secondary md:hidden", children: jsx("img", { src: imageMobile, alt: "", className: "size-full object-cover" }) }), jsxs("div", { className: "flex gap-3", children: [!hideDismissLabel && (jsx(Button, { onClick: onClose, size: "sm", color: "link-gray", "data-testid": joinTestId(notificationTestId, 'dismiss'), children: dismissLabel })), confirmLabel && (jsx(Button, { onClick: onConfirm, size: "sm", color: "link-color", "data-testid": joinTestId(notificationTestId, 'confirm'), children: confirmLabel }))] })] }), jsx("div", { className: "absolute top-2 right-2 flex items-center justify-center", children: jsx(CloseButton, { onClick: onClose, size: "sm", label: "Dismiss", "data-testid": joinTestId(notificationTestId, 'close') }) })] }));
|
|
44
|
-
};
|
|
3
|
+
/** @deprecated Import from `@flipdish/ui-library/components/molecules/Notifications`. Removed in the next major. */
|
|
4
|
+
const IconNotification = IconNotification$1;
|
|
5
|
+
/** @deprecated Import from `@flipdish/ui-library/components/molecules/Notifications`. Removed in the next major. */
|
|
6
|
+
const AvatarNotification = AvatarNotification$1;
|
|
7
|
+
/** @deprecated Import from `@flipdish/ui-library/components/molecules/Notifications`. Removed in the next major. */
|
|
8
|
+
const ImageNotification = ImageNotification$1;
|
|
45
9
|
|
|
46
10
|
export { AvatarNotification, IconNotification, ImageNotification };
|
|
47
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/molecules/Notification/index.tsx"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/molecules/Notification/index.tsx"],"sourcesContent":[null],"names":["IconNotificationNext","AvatarNotificationNext","ImageNotificationNext"],"mappings":";;AAYA;AACO,MAAM,gBAAgB,GAA8EA;AAC3G;AACO,MAAM,kBAAkB,GAAGC;AAClC;AACO,MAAM,iBAAiB,GAAGC;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var Avatar = require('@flipdish/ui-library/components/atoms/Avatar');
|
|
5
|
+
var Button = require('@flipdish/ui-library/components/atoms/Button');
|
|
6
|
+
var CloseButton = require('@flipdish/ui-library/components/atoms/CloseButton');
|
|
7
|
+
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Toast that pairs a sender's avatar, name and timestamp with a message and actions. Use for
|
|
11
|
+
* transient alerts about activity from another person, such as a mention or an invite.
|
|
12
|
+
*
|
|
13
|
+
* @summary toast notification led by a sender's avatar
|
|
14
|
+
*/
|
|
15
|
+
const AvatarNotification = ({ name, content, avatar, confirmLabel, dismissLabel = 'Dismiss', hideDismissLabel, date, onClose, onConfirm, 'data-testid': dataTestId, }) => {
|
|
16
|
+
const notificationTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'avatar-notification', rootName: 'avatar-notification' });
|
|
17
|
+
return (jsxRuntime.jsxs("div", { "data-testid": notificationTestId, className: "relative z-[var(--z-index)] flex max-w-full flex-col items-start gap-4 rounded-xl bg-primary_alt p-4 shadow-lg ring ring-secondary_alt xs:w-[var(--width)] xs:flex-row", children: [jsxRuntime.jsx(Avatar.Avatar, { size: "md", src: avatar, alt: name, status: "online" }), jsxRuntime.jsxs("div", { className: "flex flex-col gap-3 pr-8", children: [jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntime.jsx("p", { className: "text-sm font-semibold text-fg-primary", children: name }), jsxRuntime.jsx("span", { className: "text-sm text-fg-quaternary", children: date })] }), jsxRuntime.jsx("p", { className: "text-sm text-fg-secondary", children: content })] }), jsxRuntime.jsxs("div", { className: "flex gap-3", children: [!hideDismissLabel && (jsxRuntime.jsx(Button.Button, { onClick: onClose, size: "sm", color: "link-gray", "data-testid": testIdUtils.joinTestId(notificationTestId, 'dismiss'), children: dismissLabel })), confirmLabel && (jsxRuntime.jsx(Button.Button, { onClick: onConfirm, size: "sm", color: "link-color", "data-testid": testIdUtils.joinTestId(notificationTestId, 'confirm'), children: confirmLabel }))] })] }), jsxRuntime.jsx("div", { className: "absolute top-2 right-2 flex items-center justify-center", children: jsxRuntime.jsx(CloseButton.CloseButton, { onClick: onClose, size: "sm", label: "Dismiss", "data-testid": testIdUtils.joinTestId(notificationTestId, 'close') }) })] }));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
exports.AvatarNotification = AvatarNotification;
|
|
21
|
+
//# sourceMappingURL=AvatarNotification.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AvatarNotification.cjs","sources":["../../../../../src/components/molecules/Notifications/AvatarNotification/AvatarNotification.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","_jsxs","_jsx","Avatar","Button","joinTestId","CloseButton"],"mappings":";;;;;;;;AA4CA;;;;;AAKG;AACI,MAAM,kBAAkB,GAAG,CAAC,EACjC,IAAI,EACJ,OAAO,EACP,MAAM,EACN,YAAY,EACZ,YAAY,GAAG,SAAS,EACxB,gBAAgB,EAChB,IAAI,EACJ,OAAO,EACP,SAAS,EACT,aAAa,EAAE,UAAU,GACD,KAAI;AAC5B,IAAA,MAAM,kBAAkB,GAAGA,6BAAiB,CAAC,EAAE,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,CAAC,EAAA,QAAA,EAC5G,YAAY,EAAA,CACN,CACV,CAAA,EAAA,CACG,CAAA,EAAA,CACF,EAENH,cAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,yDAAyD,YACtEA,cAAA,CAACI,uBAAW,IAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,SAAS,EAAA,aAAA,EAAcD,sBAAU,CAAC,kBAAkB,EAAE,OAAO,CAAC,GAAI,EAAA,CAC7G,CAAA,EAAA,CACF;AAEV;;"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
export interface AvatarNotificationProps {
|
|
3
|
+
/** Sender's name, shown in bold and used as the avatar's `alt` text. */
|
|
4
|
+
name: string;
|
|
5
|
+
/** Message text shown under the sender's name. */
|
|
6
|
+
content: string;
|
|
7
|
+
/** URL of the sender's avatar image. */
|
|
8
|
+
avatar: string;
|
|
9
|
+
/** When the message was sent, already formatted, shown beside the name. */
|
|
10
|
+
date: string;
|
|
11
|
+
/** Label of the confirm link button; an empty string hides the button. */
|
|
12
|
+
confirmLabel: string;
|
|
13
|
+
/** Label of the dismiss link button. */
|
|
14
|
+
dismissLabel?: string;
|
|
15
|
+
/** Hides the dismiss link button; the close icon button stays. */
|
|
16
|
+
hideDismissLabel?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Has no effect: the avatar takes the featured icon's place.
|
|
19
|
+
* @deprecated Removed in the next major.
|
|
20
|
+
*/
|
|
21
|
+
icon?: FC<{
|
|
22
|
+
className?: string;
|
|
23
|
+
}>;
|
|
24
|
+
/**
|
|
25
|
+
* Has no effect: there is no featured icon to colour.
|
|
26
|
+
* @deprecated Removed in the next major.
|
|
27
|
+
*/
|
|
28
|
+
color?: 'default' | 'brand' | 'gray' | 'error' | 'warning' | 'success';
|
|
29
|
+
/** Called when the dismiss link or the close icon button is pressed. */
|
|
30
|
+
onClose?: () => void;
|
|
31
|
+
/** Called when the confirm link button is pressed. */
|
|
32
|
+
onConfirm?: () => void;
|
|
33
|
+
/**
|
|
34
|
+
* Overrides the `data-testid` (defaults to `fd-avatar-notification`). The confirm,
|
|
35
|
+
* dismiss, and close controls derive their ids from this prefix.
|
|
36
|
+
*/
|
|
37
|
+
'data-testid'?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Toast that pairs a sender's avatar, name and timestamp with a message and actions. Use for
|
|
41
|
+
* transient alerts about activity from another person, such as a mention or an invite.
|
|
42
|
+
*
|
|
43
|
+
* @summary toast notification led by a sender's avatar
|
|
44
|
+
*/
|
|
45
|
+
export declare const AvatarNotification: ({ name, content, avatar, confirmLabel, dismissLabel, hideDismissLabel, date, onClose, onConfirm, "data-testid": dataTestId, }: AvatarNotificationProps) => import("react").JSX.Element;
|
|
46
|
+
//# sourceMappingURL=AvatarNotification.d.ts.map
|
package/dist/components/molecules/Notifications/AvatarNotification/AvatarNotification.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AvatarNotification.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Notifications/AvatarNotification/AvatarNotification.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,MAAM,WAAW,uBAAuB;IACtC,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,wCAAwC;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,YAAY,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kEAAkE;IAClE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,IAAI,CAAC,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAClC;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;IACvE,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,+HAWhC,uBAAuB,gCAsCzB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Avatar } from '@flipdish/ui-library/components/atoms/Avatar';
|
|
3
|
+
import { Button } from '@flipdish/ui-library/components/atoms/Button';
|
|
4
|
+
import { CloseButton } from '@flipdish/ui-library/components/atoms/CloseButton';
|
|
5
|
+
import { useResolvedTestId, joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Toast that pairs a sender's avatar, name and timestamp with a message and actions. Use for
|
|
9
|
+
* transient alerts about activity from another person, such as a mention or an invite.
|
|
10
|
+
*
|
|
11
|
+
* @summary toast notification led by a sender's avatar
|
|
12
|
+
*/
|
|
13
|
+
const AvatarNotification = ({ name, content, avatar, confirmLabel, dismissLabel = 'Dismiss', hideDismissLabel, date, onClose, onConfirm, 'data-testid': dataTestId, }) => {
|
|
14
|
+
const notificationTestId = useResolvedTestId({ testId: dataTestId, segment: 'avatar-notification', rootName: 'avatar-notification' });
|
|
15
|
+
return (jsxs("div", { "data-testid": notificationTestId, className: "relative z-[var(--z-index)] flex max-w-full flex-col items-start gap-4 rounded-xl bg-primary_alt p-4 shadow-lg ring ring-secondary_alt xs:w-[var(--width)] xs:flex-row", children: [jsx(Avatar, { size: "md", src: avatar, alt: name, status: "online" }), jsxs("div", { className: "flex flex-col gap-3 pr-8", children: [jsxs("div", { className: "flex flex-col gap-1", children: [jsxs("div", { className: "flex items-center gap-2", children: [jsx("p", { className: "text-sm font-semibold text-fg-primary", children: name }), jsx("span", { className: "text-sm text-fg-quaternary", children: date })] }), jsx("p", { className: "text-sm text-fg-secondary", children: content })] }), jsxs("div", { className: "flex gap-3", children: [!hideDismissLabel && (jsx(Button, { onClick: onClose, size: "sm", color: "link-gray", "data-testid": joinTestId(notificationTestId, 'dismiss'), children: dismissLabel })), confirmLabel && (jsx(Button, { onClick: onConfirm, size: "sm", color: "link-color", "data-testid": joinTestId(notificationTestId, 'confirm'), children: confirmLabel }))] })] }), jsx("div", { className: "absolute top-2 right-2 flex items-center justify-center", children: jsx(CloseButton, { onClick: onClose, size: "sm", label: "Dismiss", "data-testid": joinTestId(notificationTestId, 'close') }) })] }));
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { AvatarNotification };
|
|
19
|
+
//# sourceMappingURL=AvatarNotification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AvatarNotification.js","sources":["../../../../../src/components/molecules/Notifications/AvatarNotification/AvatarNotification.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;;AA4CA;;;;;AAKG;AACI,MAAM,kBAAkB,GAAG,CAAC,EACjC,IAAI,EACJ,OAAO,EACP,MAAM,EACN,YAAY,EACZ,YAAY,GAAG,SAAS,EACxB,gBAAgB,EAChB,IAAI,EACJ,OAAO,EACP,SAAS,EACT,aAAa,EAAE,UAAU,GACD,KAAI;AAC5B,IAAA,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,qBAAqB,EAAE,CAAC;AAErI,IAAA,QACEA,IAAA,CAAA,KAAA,EAAA,EAAA,aAAA,EACe,kBAAkB,EAC/B,SAAS,EAAC,wKAAwK,EAAA,QAAA,EAAA,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AC,IAAI,EAAC,KAAK,EAAC,SAAS,EAAA,aAAA,EAAc,UAAU,CAAC,kBAAkB,EAAE,OAAO,CAAC,GAAI,EAAA,CAC7G,CAAA,EAAA,CACF;AAEV;;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var Button = require('@flipdish/ui-library/components/atoms/Button');
|
|
5
|
+
var CloseButton = require('@flipdish/ui-library/components/atoms/CloseButton');
|
|
6
|
+
var FeaturedIcon = require('@flipdish/ui-library/components/atoms/FeaturedIcon');
|
|
7
|
+
var ProgressBar = require('@flipdish/ui-library/components/atoms/ProgressBar');
|
|
8
|
+
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
9
|
+
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
10
|
+
var statusIcon_utils = require('../../../__internal__/statusIcon/statusIcon.utils.cjs');
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Toast that pairs a featured icon with a title, supporting text and optional actions. Use for
|
|
14
|
+
* transient feedback after an action.
|
|
15
|
+
*
|
|
16
|
+
* @summary toast notification led by a featured icon
|
|
17
|
+
*/
|
|
18
|
+
const IconNotification = ({ title, description, confirmLabel, dismissLabel = 'Dismiss', hideDismissLabel, icon, progress, onClose, onConfirm, color = 'default', 'data-testid': dataTestId, }) => {
|
|
19
|
+
const showProgress = typeof progress === 'number';
|
|
20
|
+
const notificationTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'icon-notification', rootName: 'icon-notification' });
|
|
21
|
+
const statusIconProps = statusIcon_utils.getStatusFeaturedIconProps(color);
|
|
22
|
+
return (jsxRuntime.jsxs("div", { "data-testid": notificationTestId, className: "relative z-[var(--z-index)] flex max-w-full flex-col gap-4 rounded-xl bg-primary_alt p-4 shadow-lg ring ring-secondary_alt xs:w-[var(--width)] xs:flex-row", children: [jsxRuntime.jsx(FeaturedIcon.FeaturedIcon, { ...statusIconProps, icon: icon || statusIconProps.icon, size: "md" }), jsxRuntime.jsxs("div", { className: cx.cx('flex flex-1 flex-col gap-3 md:pr-8', color !== 'default' && 'md:pt-0.5', showProgress && 'gap-4'), children: [jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [jsxRuntime.jsx("p", { className: "text-sm font-semibold text-fg-primary", children: title }), jsxRuntime.jsx("p", { className: "text-sm text-fg-secondary", children: description })] }), showProgress && (jsxRuntime.jsx(ProgressBar.ProgressBar, { labelPosition: "bottom", value: progress, valueFormatter: (value) => `${value}% uploaded...`, "data-testid": testIdUtils.joinTestId(notificationTestId, 'progress') })), jsxRuntime.jsxs("div", { className: "flex gap-3", children: [!hideDismissLabel && (jsxRuntime.jsx(Button.Button, { onClick: onClose, size: "sm", color: "link-gray", "data-testid": testIdUtils.joinTestId(notificationTestId, 'dismiss'), children: dismissLabel })), confirmLabel && (jsxRuntime.jsx(Button.Button, { onClick: onConfirm, size: "sm", color: "link-color", "data-testid": testIdUtils.joinTestId(notificationTestId, 'confirm'), children: confirmLabel }))] })] }), jsxRuntime.jsx("div", { className: "absolute top-2 right-2 flex items-center justify-center", children: jsxRuntime.jsx(CloseButton.CloseButton, { onClick: onClose, size: "sm", label: "Dismiss", "data-testid": testIdUtils.joinTestId(notificationTestId, 'close') }) })] }));
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
exports.IconNotification = IconNotification;
|
|
26
|
+
//# sourceMappingURL=IconNotification.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconNotification.cjs","sources":["../../../../../src/components/molecules/Notifications/IconNotification/IconNotification.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","getStatusFeaturedIconProps","_jsxs","_jsx","FeaturedIcon","cx","ProgressBar","joinTestId","Button","CloseButton"],"mappings":";;;;;;;;;;;AAwCA;;;;;AAKG;AACI,MAAM,gBAAgB,GAAG,CAAC,EAC/B,KAAK,EACL,WAAW,EACX,YAAY,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C,YAAY,aACxB,CAAC,gBAAgB,KAChBC,cAAA,CAACK,aAAM,EAAA,EAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,WAAW,iBAAcD,sBAAU,CAAC,kBAAkB,EAAE,SAAS,CAAC,EAAA,QAAA,EACzG,YAAY,GACN,CACV,EACA,YAAY,KACXJ,eAACK,aAAM,EAAA,EAAC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,YAAY,EAAA,aAAA,EAAcD,sBAAU,CAAC,kBAAkB,EAAE,SAAS,CAAC,EAAA,QAAA,EAC5G,YAAY,EAAA,CACN,CACV,IACG,CAAA,EAAA,CACF,EAENJ,wBAAK,SAAS,EAAC,yDAAyD,EAAA,QAAA,EACtEA,cAAA,CAACM,uBAAW,IAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,SAAS,iBAAcF,sBAAU,CAAC,kBAAkB,EAAE,OAAO,CAAC,EAAA,CAAI,EAAA,CAC7G,CAAA,EAAA,CACF;AAEV;;"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { StatusColor } from '../../../__internal__/statusIcon/statusIcon.types';
|
|
3
|
+
export interface IconNotificationProps {
|
|
4
|
+
/** Bold heading of the notification. */
|
|
5
|
+
title: string;
|
|
6
|
+
/** Supporting text shown under the title. */
|
|
7
|
+
description: string;
|
|
8
|
+
/** Label of the confirm link button; omit to hide the button. */
|
|
9
|
+
confirmLabel?: string;
|
|
10
|
+
/** Label of the dismiss link button. */
|
|
11
|
+
dismissLabel?: string;
|
|
12
|
+
/** Hides the dismiss link button; the close icon button stays. */
|
|
13
|
+
hideDismissLabel?: boolean;
|
|
14
|
+
/** Icon inside the featured icon, replacing the default for `color`. */
|
|
15
|
+
icon?: FC<{
|
|
16
|
+
className?: string;
|
|
17
|
+
}>;
|
|
18
|
+
/** Status colour of the featured icon, which also picks its default icon. */
|
|
19
|
+
color?: StatusColor;
|
|
20
|
+
/** Upload progress from 0 to 100; shows a progress bar when set. */
|
|
21
|
+
progress?: number;
|
|
22
|
+
/** Called when the dismiss link or the close icon button is pressed. */
|
|
23
|
+
onClose?: () => void;
|
|
24
|
+
/** Called when the confirm link button is pressed. */
|
|
25
|
+
onConfirm?: () => void;
|
|
26
|
+
/**
|
|
27
|
+
* Overrides the `data-testid` (defaults to `fd-icon-notification`). The confirm,
|
|
28
|
+
* dismiss, close, and progress controls derive their ids from this prefix.
|
|
29
|
+
*/
|
|
30
|
+
'data-testid'?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Toast that pairs a featured icon with a title, supporting text and optional actions. Use for
|
|
34
|
+
* transient feedback after an action.
|
|
35
|
+
*
|
|
36
|
+
* @summary toast notification led by a featured icon
|
|
37
|
+
*/
|
|
38
|
+
export declare const IconNotification: ({ title, description, confirmLabel, dismissLabel, hideDismissLabel, icon, progress, onClose, onConfirm, color, "data-testid": dataTestId, }: IconNotificationProps) => import("react").JSX.Element;
|
|
39
|
+
//# sourceMappingURL=IconNotification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconNotification.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Notifications/IconNotification/IconNotification.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mDAAmD,CAAC;AAErF,MAAM,WAAW,qBAAqB;IACpC,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,WAAW,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kEAAkE;IAClE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,wEAAwE;IACxE,IAAI,CAAC,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAClC,6EAA6E;IAC7E,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,6IAY9B,qBAAqB,gCA8CvB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Button } from '@flipdish/ui-library/components/atoms/Button';
|
|
3
|
+
import { CloseButton } from '@flipdish/ui-library/components/atoms/CloseButton';
|
|
4
|
+
import { FeaturedIcon } from '@flipdish/ui-library/components/atoms/FeaturedIcon';
|
|
5
|
+
import { ProgressBar } from '@flipdish/ui-library/components/atoms/ProgressBar';
|
|
6
|
+
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
7
|
+
import { useResolvedTestId, joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
8
|
+
import { getStatusFeaturedIconProps } from '../../../__internal__/statusIcon/statusIcon.utils.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Toast that pairs a featured icon with a title, supporting text and optional actions. Use for
|
|
12
|
+
* transient feedback after an action.
|
|
13
|
+
*
|
|
14
|
+
* @summary toast notification led by a featured icon
|
|
15
|
+
*/
|
|
16
|
+
const IconNotification = ({ title, description, confirmLabel, dismissLabel = 'Dismiss', hideDismissLabel, icon, progress, onClose, onConfirm, color = 'default', 'data-testid': dataTestId, }) => {
|
|
17
|
+
const showProgress = typeof progress === 'number';
|
|
18
|
+
const notificationTestId = useResolvedTestId({ testId: dataTestId, segment: 'icon-notification', rootName: 'icon-notification' });
|
|
19
|
+
const statusIconProps = getStatusFeaturedIconProps(color);
|
|
20
|
+
return (jsxs("div", { "data-testid": notificationTestId, className: "relative z-[var(--z-index)] flex max-w-full flex-col gap-4 rounded-xl bg-primary_alt p-4 shadow-lg ring ring-secondary_alt xs:w-[var(--width)] xs:flex-row", children: [jsx(FeaturedIcon, { ...statusIconProps, icon: icon || statusIconProps.icon, size: "md" }), jsxs("div", { className: cx('flex flex-1 flex-col gap-3 md:pr-8', color !== 'default' && 'md:pt-0.5', showProgress && 'gap-4'), children: [jsxs("div", { className: "flex flex-col gap-1", children: [jsx("p", { className: "text-sm font-semibold text-fg-primary", children: title }), jsx("p", { className: "text-sm text-fg-secondary", children: description })] }), showProgress && (jsx(ProgressBar, { labelPosition: "bottom", value: progress, valueFormatter: (value) => `${value}% uploaded...`, "data-testid": joinTestId(notificationTestId, 'progress') })), jsxs("div", { className: "flex gap-3", children: [!hideDismissLabel && (jsx(Button, { onClick: onClose, size: "sm", color: "link-gray", "data-testid": joinTestId(notificationTestId, 'dismiss'), children: dismissLabel })), confirmLabel && (jsx(Button, { onClick: onConfirm, size: "sm", color: "link-color", "data-testid": joinTestId(notificationTestId, 'confirm'), children: confirmLabel }))] })] }), jsx("div", { className: "absolute top-2 right-2 flex items-center justify-center", children: jsx(CloseButton, { onClick: onClose, size: "sm", label: "Dismiss", "data-testid": joinTestId(notificationTestId, 'close') }) })] }));
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { IconNotification };
|
|
24
|
+
//# sourceMappingURL=IconNotification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconNotification.js","sources":["../../../../../src/components/molecules/Notifications/IconNotification/IconNotification.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;AAwCA;;;;;AAKG;AACI,MAAM,gBAAgB,GAAG,CAAC,EAC/B,KAA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AK,SAAS,EAAC,YAAY,aACxB,CAAC,gBAAgB,KAChBC,GAAA,CAAC,MAAM,EAAA,EAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,WAAW,iBAAc,UAAU,CAAC,kBAAkB,EAAE,SAAS,CAAC,EAAA,QAAA,EACzG,YAAY,GACN,CACV,EACA,YAAY,KACXA,IAAC,MAAM,EAAA,EAAC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,YAAY,EAAA,aAAA,EAAc,UAAU,CAAC,kBAAkB,EAAE,SAAS,CAAC,EAAA,QAAA,EAC5G,YAAY,EAAA,CACN,CACV,IACG,CAAA,EAAA,CACF,EAENA,aAAK,SAAS,EAAC,yDAAyD,EAAA,QAAA,EACtEA,GAAA,CAAC,WAAW,IAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,SAAS,iBAAc,UAAU,CAAC,kBAAkB,EAAE,OAAO,CAAC,EAAA,CAAI,EAAA,CAC7G,CAAA,EAAA,CACF;AAEV;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var Button = require('@flipdish/ui-library/components/atoms/Button');
|
|
5
|
+
var CloseButton = require('@flipdish/ui-library/components/atoms/CloseButton');
|
|
6
|
+
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Toast that pairs a banner image with a title, supporting text and actions. Use to announce a
|
|
10
|
+
* new feature or promotion where a picture carries the message.
|
|
11
|
+
*
|
|
12
|
+
* @summary toast notification featuring a banner image
|
|
13
|
+
*/
|
|
14
|
+
const ImageNotification = ({ title, description, confirmLabel, dismissLabel = 'Dismiss', hideDismissLabel, imageMobile, imageDesktop, onClose, onConfirm, 'data-testid': dataTestId, }) => {
|
|
15
|
+
const notificationTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'image-notification', rootName: 'image-notification' });
|
|
16
|
+
return (jsxRuntime.jsxs("div", { "data-testid": notificationTestId, style: {
|
|
17
|
+
'--width': '496px',
|
|
18
|
+
}, className: "relative z-[var(--z-index)] flex max-w-full flex-col gap-3 rounded-xl bg-primary_alt p-4 shadow-lg max-md:ring-1 max-md:ring-secondary_alt xs:w-[var(--width)] xs:flex-row xs:gap-0 md:p-0", children: [jsxRuntime.jsx("div", { className: "-my-px hidden w-40 shrink-0 overflow-hidden rounded-l-xl outline-1 -outline-offset-1 outline-black/10 md:block", children: jsxRuntime.jsx("img", { "aria-hidden": "true", src: imageDesktop, alt: "", className: "size-full object-cover" }) }), jsxRuntime.jsxs("div", { className: "flex flex-1 flex-col gap-4 rounded-r-xl bg-primary_alt md:gap-3 md:p-4 md:pl-5 md:ring-1 md:ring-secondary_alt", children: [jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 pr-8", children: [jsxRuntime.jsx("p", { className: "text-sm font-semibold text-fg-primary", children: title }), jsxRuntime.jsx("p", { className: "text-sm text-fg-secondary", children: description })] }), jsxRuntime.jsx("div", { className: "h-40 w-full overflow-hidden rounded-md bg-secondary md:hidden", children: jsxRuntime.jsx("img", { src: imageMobile, alt: "", className: "size-full object-cover" }) }), jsxRuntime.jsxs("div", { className: "flex gap-3", children: [!hideDismissLabel && (jsxRuntime.jsx(Button.Button, { onClick: onClose, size: "sm", color: "link-gray", "data-testid": testIdUtils.joinTestId(notificationTestId, 'dismiss'), children: dismissLabel })), confirmLabel && (jsxRuntime.jsx(Button.Button, { onClick: onConfirm, size: "sm", color: "link-color", "data-testid": testIdUtils.joinTestId(notificationTestId, 'confirm'), children: confirmLabel }))] })] }), jsxRuntime.jsx("div", { className: "absolute top-2 right-2 flex items-center justify-center", children: jsxRuntime.jsx(CloseButton.CloseButton, { onClick: onClose, size: "sm", label: "Dismiss", "data-testid": testIdUtils.joinTestId(notificationTestId, 'close') }) })] }));
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.ImageNotification = ImageNotification;
|
|
22
|
+
//# sourceMappingURL=ImageNotification.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageNotification.cjs","sources":["../../../../../src/components/molecules/Notifications/ImageNotification/ImageNotification.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","_jsxs","_jsx","Button","joinTestId","CloseButton"],"mappings":";;;;;;;AAiCA;;;;;AAKG;AACI,MAAM,iBAAiB,GAAG,CAAC,EAChC,KAAK,EACL,WAAW,EACX,YAAY,EACZ,YAAY,GAAG,SAAS,EACxB,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,OAAO,EACP,SAAS,EACT,aAAa,EAAE,UAAU,GACF,KAAI;AAC3B,IAAA,MAAM,kBAAkB,GAAGA,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,oBAAoB,EAAE,CAAC;AAEnI,IAAA,QACEC,eAAA,CAAA,KAAA,EAAA,EAAA,aAAA,EACe,kBAAkB,EAC/B,KAAK,EACH;AACE,YAAA,SAAS,EAAE,OAAO;AACF,SAAA,EAEpB,SAAS,EAAC,4LAA4L,EAAA,QAAA,EAAA,CAEtMC,cAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,gHAAgH,EAAA,QAAA,EAC7HA,cAAA,CAAA,KAAA,EAAA,EAAA,aAAA,EAAiB,MAAM,EAAC,GAAG,EAAE,YAAY,EAAE,GAAG,EAAC,EAAE,EAAC,SAAS,EAAC,wBAAwB,EAAA,CAAG,GACnF,EAEND,eAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,gHAAgH,EAAA,QAAA,EAAA,CAC7HA,eAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,0BAA0B,aACvCC,cAAA,CAAA,GAAA,EAAA,EAAG,SAAS,EAAC,uCAAuC,EAAA,QAAA,EAAE,KAAK,EAAA,CAAK,EAChEA,cAAA,CAAA,GAAA,EAAA,EAAG,SAAS,EAAC,2BAA2B,YAAE,WAAW,EAAA,CAAK,CAAA,EAAA,CACtD,EAENA,wBAAK,SAAS,EAAC,+DAA+D,EAAA,QAAA,EAC5EA,cAAA,CAAA,KAAA,EAAA,EAAK,GAAG,EAAE,WAAW,EAAE,GAAG,EAAC,EAAE,EAAC,SAAS,EAAC,wBAAwB,GAAG,EAAA,CAC/D,EAEND,eAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,YAAY,EAAA,QAAA,EAAA,CACxB,CAAC,gBAAgB,KAChBC,cAAA,CAACC,aAAM,EAAA,EAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,WAAW,iBAAcC,sBAAU,CAAC,kBAAkB,EAAE,SAAS,CAAC,EAAA,QAAA,EACzG,YAAY,EAAA,CACN,CACV,EACA,YAAY,KACXF,cAAA,CAACC,aAAM,IAAC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,YAAY,EAAA,aAAA,EAAcC,sBAAU,CAAC,kBAAkB,EAAE,SAAS,CAAC,YAC5G,YAAY,EAAA,CACN,CACV,CAAA,EAAA,CACG,CAAA,EAAA,CACF,EAENF,cAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,yDAAyD,YACtEA,cAAA,CAACG,uBAAW,IAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,SAAS,EAAA,aAAA,EAAcD,sBAAU,CAAC,kBAAkB,EAAE,OAAO,CAAC,GAAI,EAAA,CAC7G,CAAA,EAAA,CACF;AAEV;;"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface ImageNotificationProps {
|
|
2
|
+
/** Bold heading of the notification. */
|
|
3
|
+
title: string;
|
|
4
|
+
/** Supporting text shown under the title. */
|
|
5
|
+
description: string;
|
|
6
|
+
/** Label of the confirm link button; an empty string hides the button. */
|
|
7
|
+
confirmLabel: string;
|
|
8
|
+
/** Label of the dismiss link button. */
|
|
9
|
+
dismissLabel?: string;
|
|
10
|
+
/** Hides the dismiss link button; the close icon button stays. */
|
|
11
|
+
hideDismissLabel?: boolean;
|
|
12
|
+
/** Image for the full-width banner shown below `md`; a wide crop suits the 160px-tall slot. */
|
|
13
|
+
imageMobile: string;
|
|
14
|
+
/** Image for the 160px-wide side thumbnail shown from `md` up. */
|
|
15
|
+
imageDesktop: string;
|
|
16
|
+
/** Called when the dismiss link or the close icon button is pressed. */
|
|
17
|
+
onClose?: () => void;
|
|
18
|
+
/** Called when the confirm link button is pressed. */
|
|
19
|
+
onConfirm?: () => void;
|
|
20
|
+
/**
|
|
21
|
+
* Overrides the `data-testid` (defaults to `fd-image-notification`). The confirm,
|
|
22
|
+
* dismiss, and close controls derive their ids from this prefix.
|
|
23
|
+
*/
|
|
24
|
+
'data-testid'?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Toast that pairs a banner image with a title, supporting text and actions. Use to announce a
|
|
28
|
+
* new feature or promotion where a picture carries the message.
|
|
29
|
+
*
|
|
30
|
+
* @summary toast notification featuring a banner image
|
|
31
|
+
*/
|
|
32
|
+
export declare const ImageNotification: ({ title, description, confirmLabel, dismissLabel, hideDismissLabel, imageMobile, imageDesktop, onClose, onConfirm, "data-testid": dataTestId, }: ImageNotificationProps) => import("react").JSX.Element;
|
|
33
|
+
//# sourceMappingURL=ImageNotification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageNotification.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Notifications/ImageNotification/ImageNotification.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,sBAAsB;IACrC,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,WAAW,EAAE,MAAM,CAAC;IACpB,0EAA0E;IAC1E,YAAY,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kEAAkE;IAClE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,+FAA+F;IAC/F,WAAW,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,YAAY,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,iJAW/B,sBAAsB,gCA8CxB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Button } from '@flipdish/ui-library/components/atoms/Button';
|
|
3
|
+
import { CloseButton } from '@flipdish/ui-library/components/atoms/CloseButton';
|
|
4
|
+
import { useResolvedTestId, joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Toast that pairs a banner image with a title, supporting text and actions. Use to announce a
|
|
8
|
+
* new feature or promotion where a picture carries the message.
|
|
9
|
+
*
|
|
10
|
+
* @summary toast notification featuring a banner image
|
|
11
|
+
*/
|
|
12
|
+
const ImageNotification = ({ title, description, confirmLabel, dismissLabel = 'Dismiss', hideDismissLabel, imageMobile, imageDesktop, onClose, onConfirm, 'data-testid': dataTestId, }) => {
|
|
13
|
+
const notificationTestId = useResolvedTestId({ testId: dataTestId, segment: 'image-notification', rootName: 'image-notification' });
|
|
14
|
+
return (jsxs("div", { "data-testid": notificationTestId, style: {
|
|
15
|
+
'--width': '496px',
|
|
16
|
+
}, className: "relative z-[var(--z-index)] flex max-w-full flex-col gap-3 rounded-xl bg-primary_alt p-4 shadow-lg max-md:ring-1 max-md:ring-secondary_alt xs:w-[var(--width)] xs:flex-row xs:gap-0 md:p-0", children: [jsx("div", { className: "-my-px hidden w-40 shrink-0 overflow-hidden rounded-l-xl outline-1 -outline-offset-1 outline-black/10 md:block", children: jsx("img", { "aria-hidden": "true", src: imageDesktop, alt: "", className: "size-full object-cover" }) }), jsxs("div", { className: "flex flex-1 flex-col gap-4 rounded-r-xl bg-primary_alt md:gap-3 md:p-4 md:pl-5 md:ring-1 md:ring-secondary_alt", children: [jsxs("div", { className: "flex flex-col gap-1 pr-8", children: [jsx("p", { className: "text-sm font-semibold text-fg-primary", children: title }), jsx("p", { className: "text-sm text-fg-secondary", children: description })] }), jsx("div", { className: "h-40 w-full overflow-hidden rounded-md bg-secondary md:hidden", children: jsx("img", { src: imageMobile, alt: "", className: "size-full object-cover" }) }), jsxs("div", { className: "flex gap-3", children: [!hideDismissLabel && (jsx(Button, { onClick: onClose, size: "sm", color: "link-gray", "data-testid": joinTestId(notificationTestId, 'dismiss'), children: dismissLabel })), confirmLabel && (jsx(Button, { onClick: onConfirm, size: "sm", color: "link-color", "data-testid": joinTestId(notificationTestId, 'confirm'), children: confirmLabel }))] })] }), jsx("div", { className: "absolute top-2 right-2 flex items-center justify-center", children: jsx(CloseButton, { onClick: onClose, size: "sm", label: "Dismiss", "data-testid": joinTestId(notificationTestId, 'close') }) })] }));
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { ImageNotification };
|
|
20
|
+
//# sourceMappingURL=ImageNotification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageNotification.js","sources":["../../../../../src/components/molecules/Notifications/ImageNotification/ImageNotification.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;AAiCA;;;;;AAKG;AACI,MAAM,iBAAiB,GAAG,CAAC,EAChC,KAAK,EACL,WAAW,EACX,YAAY,EACZ,YAAY,GAAG,SAAS,EACxB,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,OAAO,EACP,SAAS,EAC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,EAAC,KAAK,EAAC,WAAW,iBAAc,UAAU,CAAC,kBAAkB,EAAE,SAAS,CAAC,EAAA,QAAA,EACzG,YAAY,EAAA,CACN,CACV,EACA,YAAY,KACXA,GAAA,CAAC,MAAM,IAAC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,YAAY,EAAA,aAAA,EAAc,UAAU,CAAC,kBAAkB,EAAE,SAAS,CAAC,YAC5G,YAAY,EAAA,CACN,CACV,CAAA,EAAA,CACG,CAAA,EAAA,CACF,EAENA,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,yDAAyD,YACtEA,GAAA,CAAC,WAAW,IAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,SAAS,EAAA,aAAA,EAAc,UAAU,CAAC,kBAAkB,EAAE,OAAO,CAAC,GAAI,EAAA,CAC7G,CAAA,EAAA,CACF;AAEV;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var AvatarNotification = require('./AvatarNotification/AvatarNotification.cjs');
|
|
4
|
+
var IconNotification = require('./IconNotification/IconNotification.cjs');
|
|
5
|
+
var ImageNotification = require('./ImageNotification/ImageNotification.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.AvatarNotification = AvatarNotification.AvatarNotification;
|
|
10
|
+
exports.IconNotification = IconNotification.IconNotification;
|
|
11
|
+
exports.ImageNotification = ImageNotification.ImageNotification;
|
|
12
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Toast notifications for transient messages: `IconNotification` for a system event, `AvatarNotification` for a
|
|
3
|
+
* message from a person, and `ImageNotification` for an announcement a picture carries.
|
|
4
|
+
*
|
|
5
|
+
* Explicit named re-exports on purpose: `export *` would publish every symbol of every member and private file
|
|
6
|
+
* (import paths are the public API here), so this list is the single source of truth for what Notifications exposes.
|
|
7
|
+
* Each member's implementation, stories and docs live in its own folder (`IconNotification/IconNotification.tsx`),
|
|
8
|
+
* never as `index.tsx`: the `exports` wildcard would make that folder a public path.
|
|
9
|
+
*/
|
|
10
|
+
export type { AvatarNotificationProps } from './AvatarNotification/AvatarNotification';
|
|
11
|
+
export { AvatarNotification } from './AvatarNotification/AvatarNotification';
|
|
12
|
+
export type { IconNotificationProps } from './IconNotification/IconNotification';
|
|
13
|
+
export { IconNotification } from './IconNotification/IconNotification';
|
|
14
|
+
export type { ImageNotificationProps } from './ImageNotification/ImageNotification';
|
|
15
|
+
export { ImageNotification } from './ImageNotification/ImageNotification';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Notifications/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,YAAY,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AACvF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,YAAY,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,YAAY,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|