@flipdish/ui-library 0.55.1 → 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/__internal__/formField/hooks/useFormField.d.ts +1 -1
- package/dist/components/forms/__internal__/formField/hooks/useFormField.d.ts.map +1 -1
- package/dist/components/forms/fields/FormCheckbox/index.cjs +1 -1
- package/dist/components/forms/fields/FormCheckbox/index.d.ts +1 -1
- package/dist/components/forms/fields/FormCheckbox/index.js +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/forms/validation/index.cjs +1 -1
- package/dist/components/forms/validation/index.d.ts +2 -2
- package/dist/components/forms/validation/index.d.ts.map +1 -1
- package/dist/components/forms/validation/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/{forms/fields/FormToggle → atoms/BrandButtons}/index.d.ts +3 -3
- 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/forms/fields/FormToggle/index.cjs +0 -32
- package/dist/components/forms/fields/FormToggle/index.cjs.map +0 -1
- package/dist/components/forms/fields/FormToggle/index.d.ts +0 -19
- package/dist/components/forms/fields/FormToggle/index.d.ts.map +0 -1
- package/dist/components/forms/fields/FormToggle/index.js +0 -30
- package/dist/components/forms/fields/FormToggle/index.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
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var cx = require('@flipdish/ui-library/utilities/cx');
|
|
5
|
+
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
6
|
+
var reactAriaComponents = require('react-aria-components');
|
|
7
|
+
var SocialLogos = require('./SocialLogos.cjs');
|
|
8
|
+
|
|
9
|
+
const styles = cx.sortCx({
|
|
10
|
+
common: {
|
|
11
|
+
root: 'group disabled:stroke-fg-disabled disabled:text-fg-disabled disabled:*:text-fg-disabled relative inline-flex h-max cursor-pointer items-center justify-center font-semibold whitespace-nowrap outline-focus-ring transition duration-100 ease-linear before:absolute focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed',
|
|
12
|
+
icon: 'pointer-events-none shrink-0 transition-inherit-all',
|
|
13
|
+
},
|
|
14
|
+
sizes: {
|
|
15
|
+
md: {
|
|
16
|
+
root: 'gap-2 rounded-lg px-3.5 py-2.5 text-sm before:rounded-[7px] data-icon-only:p-3',
|
|
17
|
+
icon: 'size-4',
|
|
18
|
+
},
|
|
19
|
+
lg: {
|
|
20
|
+
root: 'gap-2.5 rounded-lg px-4 py-2.5 text-md before:rounded-[7px] data-icon-only:p-3',
|
|
21
|
+
icon: 'size-5',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
colors: {
|
|
25
|
+
gray: {
|
|
26
|
+
root: 'bg-primary text-secondary shadow-xs-skeuomorphic ring-1 ring-primary ring-inset hover:bg-primary_hover hover:text-secondary_hover',
|
|
27
|
+
icon: 'text-fg-quaternary group-hover:text-fg-quaternary_hover',
|
|
28
|
+
},
|
|
29
|
+
black: {
|
|
30
|
+
root: 'bg-black text-white shadow-xs-skeuomorphic ring-1 ring-transparent ring-inset before:absolute before:inset-px before:border before:border-white/12 before:mask-b-from-0%',
|
|
31
|
+
icon: '',
|
|
32
|
+
},
|
|
33
|
+
facebook: {
|
|
34
|
+
root: 'bg-[#1877F2] text-white shadow-xs-skeuomorphic ring-1 ring-transparent ring-inset before:absolute before:inset-px before:border before:border-white/12 before:mask-b-from-0% hover:bg-[#0C63D4]',
|
|
35
|
+
icon: '',
|
|
36
|
+
},
|
|
37
|
+
dribble: {
|
|
38
|
+
root: 'bg-[#EA4C89] text-white shadow-xs-skeuomorphic ring-1 ring-transparent ring-inset before:absolute before:inset-px before:border before:border-white/12 before:mask-b-from-0% hover:bg-[#E62872]',
|
|
39
|
+
icon: '',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
/**
|
|
44
|
+
* Sign-in button for Google, Facebook, Apple, Twitter, Figma or Dribbble, with a branded logo
|
|
45
|
+
* and optional label. Renders as a button or a link, in three themes and two sizes.
|
|
46
|
+
*
|
|
47
|
+
* @summary renders a branded social auth sign-in button
|
|
48
|
+
*/
|
|
49
|
+
const SocialButton = ({ size = 'lg', theme = 'brand', social, className, children, disabled, 'data-testid': dataTestId, ...otherProps }) => {
|
|
50
|
+
const socialButtonTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'social-button', rootName: 'social-button' });
|
|
51
|
+
const href = 'href' in otherProps ? otherProps.href : undefined;
|
|
52
|
+
const Component = href ? reactAriaComponents.Link : reactAriaComponents.Button;
|
|
53
|
+
const isIconOnly = !children;
|
|
54
|
+
const socialToColor = {
|
|
55
|
+
google: 'gray',
|
|
56
|
+
facebook: 'facebook',
|
|
57
|
+
apple: 'black',
|
|
58
|
+
twitter: 'black',
|
|
59
|
+
figma: 'black',
|
|
60
|
+
dribble: 'dribble',
|
|
61
|
+
};
|
|
62
|
+
const colorStyles = theme === 'brand' ? styles.colors[socialToColor[social]] : styles.colors.gray;
|
|
63
|
+
const logos = {
|
|
64
|
+
google: SocialLogos.GoogleLogo,
|
|
65
|
+
facebook: SocialLogos.FacebookLogo,
|
|
66
|
+
apple: SocialLogos.AppleLogo,
|
|
67
|
+
twitter: SocialLogos.TwitterLogo,
|
|
68
|
+
figma: theme === 'gray' ? SocialLogos.FigmaLogoOutlined : SocialLogos.FigmaLogo,
|
|
69
|
+
dribble: SocialLogos.DribbleLogo,
|
|
70
|
+
};
|
|
71
|
+
const Logo = logos[social];
|
|
72
|
+
const getIconColorClass = () => {
|
|
73
|
+
if (theme === 'gray')
|
|
74
|
+
return colorStyles.icon;
|
|
75
|
+
if (theme === 'brand' && (social === 'facebook' || social === 'apple' || social === 'twitter'))
|
|
76
|
+
return 'text-white';
|
|
77
|
+
if (theme === 'color' && (social === 'apple' || social === 'twitter'))
|
|
78
|
+
return 'text-alpha-black';
|
|
79
|
+
return '';
|
|
80
|
+
};
|
|
81
|
+
const iconColorClass = getIconColorClass();
|
|
82
|
+
let props = {};
|
|
83
|
+
if (href) {
|
|
84
|
+
// react-aria writes `href=""` on the span for an `href` key that is present but undefined, so a disabled link drops the key.
|
|
85
|
+
const { href: _href, ...withoutHref } = otherProps;
|
|
86
|
+
props = {
|
|
87
|
+
...(disabled ? withoutHref : otherProps),
|
|
88
|
+
// Since anchor elements do not support the `disabled` attribute and state,
|
|
89
|
+
// we need to specify `data-rac` and `data-disabled` in order to be able
|
|
90
|
+
// to use the `disabled:` selector in classes.
|
|
91
|
+
...(disabled ? { 'data-rac': true, 'data-disabled': true } : {}),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
props = {
|
|
96
|
+
...otherProps,
|
|
97
|
+
type: otherProps.type || 'button',
|
|
98
|
+
isDisabled: disabled,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
return (jsxRuntime.jsxs(Component, { isDisabled: disabled, ...props, "data-testid": socialButtonTestId, "data-icon-only": isIconOnly ? true : undefined, className: cx.cx(styles.common.root, styles.sizes[size].root, colorStyles.root, className), children: [jsxRuntime.jsx(Logo, { className: cx.cx(styles.common.icon, styles.sizes[size].icon, iconColorClass), colorful: (theme === 'brand' && (social === 'google' || social === 'figma')) ||
|
|
102
|
+
(theme === 'color' && (social === 'google' || social === 'facebook' || social === 'figma' || social === 'dribble')) ||
|
|
103
|
+
undefined }), children] }));
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
exports.SocialButton = SocialButton;
|
|
107
|
+
exports.styles = styles;
|
|
108
|
+
//# sourceMappingURL=SocialButton.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SocialButton.cjs","sources":["../../../../../src/components/atoms/BrandButtons/SocialButton/SocialButton.tsx"],"sourcesContent":[null],"names":["sortCx","useResolvedTestId","AriaLink","AriaButton","GoogleLogo","FacebookLogo","AppleLogo","TwitterLogo","FigmaLogoOutlined","FigmaLogo","DribbleLogo","_jsxs","cx","_jsx"],"mappings":";;;;;;;;AASO,MAAM,MAAM,GAAGA,SAAM,CAAC;AAC3B,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE,yVAAyV;AAC/V,QAAA,IAAI,EAAE,qDAAqD;AAC5D,KAAA;AAED,IAAA,KAAK,EAAE;AACL,QAAA,EAAE,EAAE;AACF,YAAA,IAAI,EAAE,gFAAgF;AACtF,YAAA,IAAI,EAAE,QAAQ;AACf,SAAA;AACD,QAAA,EAAE,EAAE;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;AACL,QAAA,KAAK,GAAG;AACN,YAAA,GAAG,UAAU;AAEb,YAAA,IAAI,EAAE,UAAU,CAAC,IAAI,IAAI,QAAQ;AACjC,YAAA,UAAU,EAAE,QAAQ;SACrB;IACH;AAEA,IAAA,QACEC,eAAA,CAAC,SAAS,IACR,UAAU,EAAE,QAAQ,EAAA,GAChB,KAAK,iBACI,kBAAkB,EAAA,gBAAA,EACf,UAAU,GAAG,IAAI,GAAG,SAAS,EAC7C,SAAS,EAAEC,KAAE,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,CAEvFC,cAAA,CAAC,IAAI,EAAA,EACH,SAAS,EAAED,KAAE,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,cAAc,CAAC,EAC1E,QAAQ,EACN,CAAC,KAAK,KAAK,OAAO,KAAK,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,OAAO,CAAC;qBAChE,KAAK,KAAK,OAAO,KAAK,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,UAAU,IAAI,MAAM,KAAK,OAAO,IAAI,MAAM,KAAK,SAAS,CAAC,CAAC;AACnH,oBAAA,SAAS,EAAA,CAEX,EAED,QAAQ,CAAA,EAAA,CACC;AAEhB;;;"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { AnchorHTMLAttributes, ButtonHTMLAttributes, DetailedHTMLProps } from 'react';
|
|
2
|
+
import type { ButtonProps as AriaButtonProps, LinkProps as AriaLinkProps } from 'react-aria-components';
|
|
3
|
+
export declare const styles: {
|
|
4
|
+
common: {
|
|
5
|
+
root: string;
|
|
6
|
+
icon: string;
|
|
7
|
+
};
|
|
8
|
+
sizes: {
|
|
9
|
+
md: {
|
|
10
|
+
root: string;
|
|
11
|
+
icon: string;
|
|
12
|
+
};
|
|
13
|
+
lg: {
|
|
14
|
+
root: string;
|
|
15
|
+
icon: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
colors: {
|
|
19
|
+
gray: {
|
|
20
|
+
root: string;
|
|
21
|
+
icon: string;
|
|
22
|
+
};
|
|
23
|
+
black: {
|
|
24
|
+
root: string;
|
|
25
|
+
icon: string;
|
|
26
|
+
};
|
|
27
|
+
facebook: {
|
|
28
|
+
root: string;
|
|
29
|
+
icon: string;
|
|
30
|
+
};
|
|
31
|
+
dribble: {
|
|
32
|
+
root: string;
|
|
33
|
+
icon: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
interface CommonProps {
|
|
38
|
+
/** Selects the provider logo, and the button colour in the `brand` theme. */
|
|
39
|
+
social: 'google' | 'facebook' | 'apple' | 'twitter' | 'figma' | 'dribble';
|
|
40
|
+
/** Disables the control and applies the disabled styling; on a link it also drops the `href`. */
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
/** `brand` fills the button in the provider's colour; `color` and `gray` use a neutral button with a full-colour or grey logo. */
|
|
43
|
+
theme?: 'brand' | 'color' | 'gray';
|
|
44
|
+
/** Sets the padding, text size and logo size. */
|
|
45
|
+
size?: keyof typeof styles.sizes;
|
|
46
|
+
/** Overrides the `data-testid` (defaults to `fd-social-button`). */
|
|
47
|
+
'data-testid'?: string;
|
|
48
|
+
}
|
|
49
|
+
interface ButtonProps extends CommonProps, DetailedHTMLProps<Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'slot'>, HTMLButtonElement> {
|
|
50
|
+
/** Slot name that picks up props from a react-aria-components parent context. */
|
|
51
|
+
slot?: AriaButtonProps['slot'];
|
|
52
|
+
}
|
|
53
|
+
interface LinkProps extends CommonProps, DetailedHTMLProps<Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'color'>, HTMLAnchorElement> {
|
|
54
|
+
/** Options for the configured client side router. */
|
|
55
|
+
routerOptions?: AriaLinkProps['routerOptions'];
|
|
56
|
+
}
|
|
57
|
+
export type SocialButtonProps = ButtonProps | LinkProps;
|
|
58
|
+
/**
|
|
59
|
+
* Sign-in button for Google, Facebook, Apple, Twitter, Figma or Dribbble, with a branded logo
|
|
60
|
+
* and optional label. Renders as a button or a link, in three themes and two sizes.
|
|
61
|
+
*
|
|
62
|
+
* @summary renders a branded social auth sign-in button
|
|
63
|
+
*/
|
|
64
|
+
export declare const SocialButton: ({ size, theme, social, className, children, disabled, "data-testid": dataTestId, ...otherProps }: SocialButtonProps) => import("react").JSX.Element;
|
|
65
|
+
export {};
|
|
66
|
+
//# sourceMappingURL=SocialButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SocialButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/BrandButtons/SocialButton/SocialButton.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC3F,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAIxG,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCjB,CAAC;AAEH,UAAU,WAAW;IACnB,6EAA6E;IAC7E,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAC1E,iGAAiG;IACjG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kIAAkI;IAClI,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;IACnC,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC,KAAK,CAAC;IACjC,oEAAoE;IACpE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,WAAY,SAAQ,WAAW,EAAE,iBAAiB,CAAC,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC9I,iFAAiF;IACjF,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;CAChC;AAED,UAAU,SAAU,SAAQ,WAAW,EAAE,iBAAiB,CAAC,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC,EAAE,iBAAiB,CAAC;IACnI,qDAAqD;IACrD,aAAa,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;CAChD;AAED,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,SAAS,CAAC;AAExD;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,kGAS1B,iBAAiB,gCA+EnB,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { sortCx, cx } from '@flipdish/ui-library/utilities/cx';
|
|
3
|
+
import { useResolvedTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
4
|
+
import { Link, Button } from 'react-aria-components';
|
|
5
|
+
import { DribbleLogo, FigmaLogoOutlined, FigmaLogo, TwitterLogo, AppleLogo, FacebookLogo, GoogleLogo } from './SocialLogos.js';
|
|
6
|
+
|
|
7
|
+
const styles = sortCx({
|
|
8
|
+
common: {
|
|
9
|
+
root: 'group disabled:stroke-fg-disabled disabled:text-fg-disabled disabled:*:text-fg-disabled relative inline-flex h-max cursor-pointer items-center justify-center font-semibold whitespace-nowrap outline-focus-ring transition duration-100 ease-linear before:absolute focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed',
|
|
10
|
+
icon: 'pointer-events-none shrink-0 transition-inherit-all',
|
|
11
|
+
},
|
|
12
|
+
sizes: {
|
|
13
|
+
md: {
|
|
14
|
+
root: 'gap-2 rounded-lg px-3.5 py-2.5 text-sm before:rounded-[7px] data-icon-only:p-3',
|
|
15
|
+
icon: 'size-4',
|
|
16
|
+
},
|
|
17
|
+
lg: {
|
|
18
|
+
root: 'gap-2.5 rounded-lg px-4 py-2.5 text-md before:rounded-[7px] data-icon-only:p-3',
|
|
19
|
+
icon: 'size-5',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
colors: {
|
|
23
|
+
gray: {
|
|
24
|
+
root: 'bg-primary text-secondary shadow-xs-skeuomorphic ring-1 ring-primary ring-inset hover:bg-primary_hover hover:text-secondary_hover',
|
|
25
|
+
icon: 'text-fg-quaternary group-hover:text-fg-quaternary_hover',
|
|
26
|
+
},
|
|
27
|
+
black: {
|
|
28
|
+
root: 'bg-black text-white shadow-xs-skeuomorphic ring-1 ring-transparent ring-inset before:absolute before:inset-px before:border before:border-white/12 before:mask-b-from-0%',
|
|
29
|
+
icon: '',
|
|
30
|
+
},
|
|
31
|
+
facebook: {
|
|
32
|
+
root: 'bg-[#1877F2] text-white shadow-xs-skeuomorphic ring-1 ring-transparent ring-inset before:absolute before:inset-px before:border before:border-white/12 before:mask-b-from-0% hover:bg-[#0C63D4]',
|
|
33
|
+
icon: '',
|
|
34
|
+
},
|
|
35
|
+
dribble: {
|
|
36
|
+
root: 'bg-[#EA4C89] text-white shadow-xs-skeuomorphic ring-1 ring-transparent ring-inset before:absolute before:inset-px before:border before:border-white/12 before:mask-b-from-0% hover:bg-[#E62872]',
|
|
37
|
+
icon: '',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
/**
|
|
42
|
+
* Sign-in button for Google, Facebook, Apple, Twitter, Figma or Dribbble, with a branded logo
|
|
43
|
+
* and optional label. Renders as a button or a link, in three themes and two sizes.
|
|
44
|
+
*
|
|
45
|
+
* @summary renders a branded social auth sign-in button
|
|
46
|
+
*/
|
|
47
|
+
const SocialButton = ({ size = 'lg', theme = 'brand', social, className, children, disabled, 'data-testid': dataTestId, ...otherProps }) => {
|
|
48
|
+
const socialButtonTestId = useResolvedTestId({ testId: dataTestId, segment: 'social-button', rootName: 'social-button' });
|
|
49
|
+
const href = 'href' in otherProps ? otherProps.href : undefined;
|
|
50
|
+
const Component = href ? Link : Button;
|
|
51
|
+
const isIconOnly = !children;
|
|
52
|
+
const socialToColor = {
|
|
53
|
+
google: 'gray',
|
|
54
|
+
facebook: 'facebook',
|
|
55
|
+
apple: 'black',
|
|
56
|
+
twitter: 'black',
|
|
57
|
+
figma: 'black',
|
|
58
|
+
dribble: 'dribble',
|
|
59
|
+
};
|
|
60
|
+
const colorStyles = theme === 'brand' ? styles.colors[socialToColor[social]] : styles.colors.gray;
|
|
61
|
+
const logos = {
|
|
62
|
+
google: GoogleLogo,
|
|
63
|
+
facebook: FacebookLogo,
|
|
64
|
+
apple: AppleLogo,
|
|
65
|
+
twitter: TwitterLogo,
|
|
66
|
+
figma: theme === 'gray' ? FigmaLogoOutlined : FigmaLogo,
|
|
67
|
+
dribble: DribbleLogo,
|
|
68
|
+
};
|
|
69
|
+
const Logo = logos[social];
|
|
70
|
+
const getIconColorClass = () => {
|
|
71
|
+
if (theme === 'gray')
|
|
72
|
+
return colorStyles.icon;
|
|
73
|
+
if (theme === 'brand' && (social === 'facebook' || social === 'apple' || social === 'twitter'))
|
|
74
|
+
return 'text-white';
|
|
75
|
+
if (theme === 'color' && (social === 'apple' || social === 'twitter'))
|
|
76
|
+
return 'text-alpha-black';
|
|
77
|
+
return '';
|
|
78
|
+
};
|
|
79
|
+
const iconColorClass = getIconColorClass();
|
|
80
|
+
let props = {};
|
|
81
|
+
if (href) {
|
|
82
|
+
// react-aria writes `href=""` on the span for an `href` key that is present but undefined, so a disabled link drops the key.
|
|
83
|
+
const { href: _href, ...withoutHref } = otherProps;
|
|
84
|
+
props = {
|
|
85
|
+
...(disabled ? withoutHref : otherProps),
|
|
86
|
+
// Since anchor elements do not support the `disabled` attribute and state,
|
|
87
|
+
// we need to specify `data-rac` and `data-disabled` in order to be able
|
|
88
|
+
// to use the `disabled:` selector in classes.
|
|
89
|
+
...(disabled ? { 'data-rac': true, 'data-disabled': true } : {}),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
props = {
|
|
94
|
+
...otherProps,
|
|
95
|
+
type: otherProps.type || 'button',
|
|
96
|
+
isDisabled: disabled,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
return (jsxs(Component, { isDisabled: disabled, ...props, "data-testid": socialButtonTestId, "data-icon-only": isIconOnly ? true : undefined, className: cx(styles.common.root, styles.sizes[size].root, colorStyles.root, className), children: [jsx(Logo, { className: cx(styles.common.icon, styles.sizes[size].icon, iconColorClass), colorful: (theme === 'brand' && (social === 'google' || social === 'figma')) ||
|
|
100
|
+
(theme === 'color' && (social === 'google' || social === 'facebook' || social === 'figma' || social === 'dribble')) ||
|
|
101
|
+
undefined }), children] }));
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export { SocialButton, styles };
|
|
105
|
+
//# sourceMappingURL=SocialButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SocialButton.js","sources":["../../../../../src/components/atoms/BrandButtons/SocialButton/SocialButton.tsx"],"sourcesContent":[null],"names":["AriaLink","AriaButton","_jsxs","_jsx"],"mappings":";;;;;;AASO,MAAM,MAAM,GAAG,MAAM,CAAC;AAC3B,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE,yVAAyV;AAC/V,QAAA,IAAI,EAAE,qDAAqD;AAC5D,KAAA;AAED,IAAA,KAAK,EAAE;AACL,QAAA,EAAE,EAAE;AACF,YAAA,IAAI,EAAE,gFAAgF;AACtF,YAAA,IAAI,EAAE,QAAQ;AACf,SAAA;AACD,QAAA,EAAE,EAAE;AACF,YAAA,IAAI,EAAE,gFAAgF;AACtF,YAAA,IAAI,EAAE,QAAQ;AACf,SAAA;AACF,KAAA;AAED,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE;AACJ,YAAA,IAAI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A,CAAC,SAAS,IACR,UAAU,EAAE,QAAQ,EAAA,GAChB,KAAK,iBACI,kBAAkB,EAAA,gBAAA,EACf,UAAU,GAAG,IAAI,GAAG,SAAS,EAC7C,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,CAEvFC,GAAA,CAAC,IAAI,EAAA,EACH,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,cAAc,CAAC,EAC1E,QAAQ,EACN,CAAC,KAAK,KAAK,OAAO,KAAK,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,OAAO,CAAC;qBAChE,KAAK,KAAK,OAAO,KAAK,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,UAAU,IAAI,MAAM,KAAK,OAAO,IAAI,MAAM,KAAK,SAAS,CAAC,CAAC;AACnH,oBAAA,SAAS,EAAA,CAEX,EAED,QAAQ,CAAA,EAAA,CACC;AAEhB;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SocialLogos.cjs","sources":["../../../../../src/components/atoms/BrandButtons/SocialButton/SocialLogos.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;AAIO,MAAM,UAAU,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAoD,KAAI;IACrG;;AAEE,IAAAA,eAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,KAAK,KAAK,EAAA,QAAA,EAAA,CACnEC,yBACE,CAAC,EAAC,kMAAkM,EACpM,IAAI,EAAE,QAAQ,GAAG,SA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c,EAAA,CACnB,EAAA,CACE;AAEV;AAEO,MAAM,WAAW,GAAG,CAAC,KAA8B,KAAI;IAC5D;;AAEE,IAAAA,GAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,KAAK,KAAK,EAAA,QAAA,EACnEA,GAAA,CAAA,MAAA,EAAA,EACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,iPAAiP,EACnP,IAAI,EAAC,cAAc,EAAA,CACnB,EAAA,CACE;AAEV;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var AppStoreButton = require('./AppStoreButton/AppStoreButton.cjs');
|
|
4
|
+
var AppStoreButtonsOutline = require('./AppStoreButton/AppStoreButtonsOutline.cjs');
|
|
5
|
+
var SocialButton = require('./SocialButton/SocialButton.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.AppGalleryButton = AppStoreButton.AppGalleryButton;
|
|
10
|
+
exports.AppStoreButton = AppStoreButton.AppStoreButton;
|
|
11
|
+
exports.GalaxyStoreButton = AppStoreButton.GalaxyStoreButton;
|
|
12
|
+
exports.GooglePlayButton = AppStoreButton.GooglePlayButton;
|
|
13
|
+
exports.GooglePlayWhiteButton = AppStoreButton.GooglePlayWhiteButton;
|
|
14
|
+
exports.AppGalleryButtonOutline = AppStoreButtonsOutline.AppGalleryButtonOutline;
|
|
15
|
+
exports.AppStoreButtonOutline = AppStoreButtonsOutline.AppStoreButtonOutline;
|
|
16
|
+
exports.GalaxyStoreButtonOutline = AppStoreButtonsOutline.GalaxyStoreButtonOutline;
|
|
17
|
+
exports.GooglePlayButtonOutline = AppStoreButtonsOutline.GooglePlayButtonOutline;
|
|
18
|
+
exports.SocialButton = SocialButton.SocialButton;
|
|
19
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Buttons that carry a third party's mark: the app store badges (`AppStoreButton`, `GooglePlayButton` and the rest,
|
|
3
|
+
* filled and outline) and `SocialButton` for social sign-in.
|
|
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 BrandButtons exposes.
|
|
7
|
+
* Each member's implementation, stories and docs live in its own folder (`SocialButton/SocialButton.tsx`), never as
|
|
8
|
+
* `index.tsx`: the `exports` wildcard would make that folder a public path.
|
|
9
|
+
*/
|
|
10
|
+
export { AppGalleryButton, AppStoreButton, GalaxyStoreButton, GooglePlayButton, GooglePlayWhiteButton } from './AppStoreButton/AppStoreButton';
|
|
11
|
+
export { AppGalleryButtonOutline, AppStoreButtonOutline, GalaxyStoreButtonOutline, GooglePlayButtonOutline, } from './AppStoreButton/AppStoreButtonsOutline';
|
|
12
|
+
export type { SocialButtonProps } from './SocialButton/SocialButton';
|
|
13
|
+
export { SocialButton } from './SocialButton/SocialButton';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/BrandButtons/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC/I,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,yCAAyC,CAAC;AACjD,YAAY,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { AppGalleryButton, AppStoreButton, GalaxyStoreButton, GooglePlayButton, GooglePlayWhiteButton } from './AppStoreButton/AppStoreButton.js';
|
|
2
|
+
export { AppGalleryButtonOutline, AppStoreButtonOutline, GalaxyStoreButtonOutline, GooglePlayButtonOutline } from './AppStoreButton/AppStoreButtonsOutline.js';
|
|
3
|
+
export { SocialButton } from './SocialButton/SocialButton.js';
|
|
4
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -1,106 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
|
|
6
|
-
var reactAriaComponents = require('react-aria-components');
|
|
7
|
-
var SocialLogos = require('./components/SocialLogos.cjs');
|
|
3
|
+
var BrandButtons = require('@flipdish/ui-library/components/atoms/BrandButtons');
|
|
4
|
+
var SocialButton$1 = require('../BrandButtons/SocialButton/SocialButton.cjs');
|
|
8
5
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
sizes: {
|
|
15
|
-
md: {
|
|
16
|
-
root: 'gap-2 rounded-lg px-3.5 py-2.5 text-sm before:rounded-[7px] data-icon-only:p-3',
|
|
17
|
-
icon: 'size-4',
|
|
18
|
-
},
|
|
19
|
-
lg: {
|
|
20
|
-
root: 'gap-2.5 rounded-lg px-4 py-2.5 text-md before:rounded-[7px] data-icon-only:p-3',
|
|
21
|
-
icon: 'size-5',
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
colors: {
|
|
25
|
-
gray: {
|
|
26
|
-
root: 'bg-primary text-secondary shadow-xs-skeuomorphic ring-1 ring-primary ring-inset hover:bg-primary_hover hover:text-secondary_hover',
|
|
27
|
-
icon: 'text-fg-quaternary group-hover:text-fg-quaternary_hover',
|
|
28
|
-
},
|
|
29
|
-
black: {
|
|
30
|
-
root: 'bg-black text-white shadow-xs-skeuomorphic ring-1 ring-transparent ring-inset before:absolute before:inset-px before:border before:border-white/12 before:mask-b-from-0%',
|
|
31
|
-
icon: '',
|
|
32
|
-
},
|
|
33
|
-
facebook: {
|
|
34
|
-
root: 'bg-[#1877F2] text-white shadow-xs-skeuomorphic ring-1 ring-transparent ring-inset before:absolute before:inset-px before:border before:border-white/12 before:mask-b-from-0% hover:bg-[#0C63D4]',
|
|
35
|
-
icon: '',
|
|
36
|
-
},
|
|
37
|
-
dribble: {
|
|
38
|
-
root: 'bg-[#EA4C89] text-white shadow-xs-skeuomorphic ring-1 ring-transparent ring-inset before:absolute before:inset-px before:border before:border-white/12 before:mask-b-from-0% hover:bg-[#E62872]',
|
|
39
|
-
icon: '',
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
});
|
|
43
|
-
/**
|
|
44
|
-
* Sign-in button for Google, Facebook, Apple, Twitter, Figma or Dribbble, with a branded logo
|
|
45
|
-
* and optional label. Renders as a button or a link, in three themes and two sizes.
|
|
46
|
-
*
|
|
47
|
-
* @summary renders a branded social auth sign-in button
|
|
48
|
-
*/
|
|
49
|
-
const SocialButton = ({ size = 'lg', theme = 'brand', social, className, children, disabled, 'data-testid': dataTestId, ...otherProps }) => {
|
|
50
|
-
const socialButtonTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'social-button', rootName: 'social-button' });
|
|
51
|
-
const href = 'href' in otherProps ? otherProps.href : undefined;
|
|
52
|
-
const Component = href ? reactAriaComponents.Link : reactAriaComponents.Button;
|
|
53
|
-
const isIconOnly = !children;
|
|
54
|
-
const socialToColor = {
|
|
55
|
-
google: 'gray',
|
|
56
|
-
facebook: 'facebook',
|
|
57
|
-
apple: 'black',
|
|
58
|
-
twitter: 'black',
|
|
59
|
-
figma: 'black',
|
|
60
|
-
dribble: 'dribble',
|
|
61
|
-
};
|
|
62
|
-
const colorStyles = theme === 'brand' ? styles.colors[socialToColor[social]] : styles.colors.gray;
|
|
63
|
-
const logos = {
|
|
64
|
-
google: SocialLogos.GoogleLogo,
|
|
65
|
-
facebook: SocialLogos.FacebookLogo,
|
|
66
|
-
apple: SocialLogos.AppleLogo,
|
|
67
|
-
twitter: SocialLogos.TwitterLogo,
|
|
68
|
-
figma: theme === 'gray' ? SocialLogos.FigmaLogoOutlined : SocialLogos.FigmaLogo,
|
|
69
|
-
dribble: SocialLogos.DribbleLogo,
|
|
70
|
-
};
|
|
71
|
-
const Logo = logos[social];
|
|
72
|
-
const getIconColorClass = () => {
|
|
73
|
-
if (theme === 'gray')
|
|
74
|
-
return colorStyles.icon;
|
|
75
|
-
if (theme === 'brand' && (social === 'facebook' || social === 'apple' || social === 'twitter'))
|
|
76
|
-
return 'text-white';
|
|
77
|
-
if (theme === 'color' && (social === 'apple' || social === 'twitter'))
|
|
78
|
-
return 'text-alpha-black';
|
|
79
|
-
return '';
|
|
80
|
-
};
|
|
81
|
-
const iconColorClass = getIconColorClass();
|
|
82
|
-
let props = {};
|
|
83
|
-
if (href) {
|
|
84
|
-
props = {
|
|
85
|
-
...otherProps,
|
|
86
|
-
href: disabled ? undefined : href,
|
|
87
|
-
// Since anchor elements do not support the `disabled` attribute and state,
|
|
88
|
-
// we need to specify `data-rac` and `data-disabled` in order to be able
|
|
89
|
-
// to use the `disabled:` selector in classes.
|
|
90
|
-
...(disabled ? { 'data-rac': true, 'data-disabled': true } : {}),
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
props = {
|
|
95
|
-
...otherProps,
|
|
96
|
-
type: otherProps.type || 'button',
|
|
97
|
-
isDisabled: disabled,
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
return (jsxRuntime.jsxs(Component, { isDisabled: disabled, ...props, "data-testid": socialButtonTestId, "data-icon-only": isIconOnly ? true : undefined, className: cx.cx(styles.common.root, styles.sizes[size].root, colorStyles.root, className), children: [jsxRuntime.jsx(Logo, { className: cx.cx(styles.common.icon, styles.sizes[size].icon, iconColorClass), colorful: (theme === 'brand' && (social === 'google' || social === 'figma')) ||
|
|
101
|
-
(theme === 'color' && (social === 'google' || social === 'facebook' || social === 'figma' || social === 'dribble')) ||
|
|
102
|
-
undefined }), children] }));
|
|
103
|
-
};
|
|
6
|
+
/** @deprecated Import from `@flipdish/ui-library/components/atoms/BrandButtons`. Removed in the next major. */
|
|
7
|
+
const SocialButton = BrandButtons.SocialButton;
|
|
8
|
+
/** @deprecated Internal to `SocialButton` and not exported from `atoms/BrandButtons`. Removed in the next major. */
|
|
9
|
+
const styles = SocialButton$1.styles;
|
|
104
10
|
|
|
105
11
|
exports.SocialButton = SocialButton;
|
|
106
12
|
exports.styles = styles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/SocialButton/index.tsx"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/components/atoms/SocialButton/index.tsx"],"sourcesContent":[null],"names":["SocialButtonNext","stylesNext"],"mappings":";;;;;AAWA;AACO,MAAM,YAAY,GAAGA;AAG5B;AACO,MAAM,MAAM,GAAGC;;;"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
1
|
+
import { type SocialButtonProps as SocialButtonPropsNext } from '@flipdish/ui-library/components/atoms/BrandButtons';
|
|
2
|
+
/** @deprecated Import from `@flipdish/ui-library/components/atoms/BrandButtons`. Removed in the next major. */
|
|
3
|
+
export declare const SocialButton: ({ size, theme, social, className, children, disabled, "data-testid": dataTestId, ...otherProps }: SocialButtonPropsNext) => import("react").JSX.Element;
|
|
4
|
+
/** @deprecated Import from `@flipdish/ui-library/components/atoms/BrandButtons`. Removed in the next major. */
|
|
5
|
+
export type SocialButtonProps = SocialButtonPropsNext;
|
|
6
|
+
/** @deprecated Internal to `SocialButton` and not exported from `atoms/BrandButtons`. Removed in the next major. */
|
|
3
7
|
export declare const styles: {
|
|
4
8
|
common: {
|
|
5
9
|
root: string;
|
|
@@ -34,33 +38,4 @@ export declare const styles: {
|
|
|
34
38
|
};
|
|
35
39
|
};
|
|
36
40
|
};
|
|
37
|
-
interface CommonProps {
|
|
38
|
-
/** Selects the provider logo, and the button colour in the `brand` theme. */
|
|
39
|
-
social: 'google' | 'facebook' | 'apple' | 'twitter' | 'figma' | 'dribble';
|
|
40
|
-
/** Disables the control and applies the disabled styling; on a link it also drops the `href`. */
|
|
41
|
-
disabled?: boolean;
|
|
42
|
-
/** `brand` fills the button in the provider's colour; `color` and `gray` use a neutral button with a full-colour or grey logo. */
|
|
43
|
-
theme?: 'brand' | 'color' | 'gray';
|
|
44
|
-
/** Sets the padding, text size and logo size. */
|
|
45
|
-
size?: keyof typeof styles.sizes;
|
|
46
|
-
/** Overrides the `data-testid` (defaults to `fd-social-button`). */
|
|
47
|
-
'data-testid'?: string;
|
|
48
|
-
}
|
|
49
|
-
interface ButtonProps extends CommonProps, DetailedHTMLProps<Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'slot'>, HTMLButtonElement> {
|
|
50
|
-
/** Slot name that picks up props from a react-aria-components parent context. */
|
|
51
|
-
slot?: AriaButtonProps['slot'];
|
|
52
|
-
}
|
|
53
|
-
interface LinkProps extends CommonProps, DetailedHTMLProps<Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'color'>, HTMLAnchorElement> {
|
|
54
|
-
/** Options for the configured client side router. */
|
|
55
|
-
routerOptions?: AriaLinkProps['routerOptions'];
|
|
56
|
-
}
|
|
57
|
-
export type SocialButtonProps = ButtonProps | LinkProps;
|
|
58
|
-
/**
|
|
59
|
-
* Sign-in button for Google, Facebook, Apple, Twitter, Figma or Dribbble, with a branded logo
|
|
60
|
-
* and optional label. Renders as a button or a link, in three themes and two sizes.
|
|
61
|
-
*
|
|
62
|
-
* @summary renders a branded social auth sign-in button
|
|
63
|
-
*/
|
|
64
|
-
export declare const SocialButton: ({ size, theme, social, className, children, disabled, "data-testid": dataTestId, ...otherProps }: SocialButtonProps) => import("react").JSX.Element;
|
|
65
|
-
export {};
|
|
66
41
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/SocialButton/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/SocialButton/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,iBAAiB,IAAI,qBAAqB,EAChD,MAAM,oDAAoD,CAAC;AAI5D,+GAA+G;AAC/G,eAAO,MAAM,YAAY,0JAAmB,CAAC;AAC7C,+GAA+G;AAC/G,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;AACtD,oHAAoH;AACpH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAa,CAAC"}
|