@licklist/design 0.78.18 → 0.78.20
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/.storybook/main.cjs +55 -6
- package/.storybook/preview.jsx +77 -7
- package/dist/Maintenance/Maintenance.scss.js +6 -0
- package/dist/Maintenance/MaintenancePage.d.ts +12 -0
- package/dist/Maintenance/MaintenancePage.d.ts.map +1 -0
- package/dist/Maintenance/MaintenancePage.js +98 -0
- package/dist/Maintenance/SkeletonSidebar.d.ts +5 -0
- package/dist/Maintenance/SkeletonSidebar.d.ts.map +1 -0
- package/dist/Maintenance/SkeletonSidebar.js +101 -0
- package/dist/PageNotFound/PageNotFound.d.ts +10 -0
- package/dist/PageNotFound/PageNotFound.d.ts.map +1 -0
- package/dist/PageNotFound/PageNotFound.js +42 -0
- package/dist/PageNotFound/index.d.ts +2 -0
- package/dist/PageNotFound/index.d.ts.map +1 -0
- package/dist/UnderMaintenance/UnderMaintenance.d.ts +4 -0
- package/dist/UnderMaintenance/UnderMaintenance.d.ts.map +1 -0
- package/dist/UnderMaintenance/UnderMaintenance.js +39 -0
- package/dist/UnderMaintenance/UnderMaintenance.scss.js +6 -0
- package/dist/UnderMaintenance/index.d.ts +2 -0
- package/dist/UnderMaintenance/index.d.ts.map +1 -0
- package/dist/auth/Authorizer.d.ts.map +1 -1
- package/dist/auth/Authorizer.js +4 -3
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.js +4 -3
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.js +2 -1
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/notification/components/NotificationPlaceholders.js +1 -1
- package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductCategoriesControl.js +13 -5
- package/dist/provider/provider-details-input/ProviderDetailsInput.js +1 -1
- package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceEndInput.js +7 -3
- package/dist/sortable-tree/SortableTree.js +1 -26
- package/dist/styles/overrides/_functions.scss +1 -1
- package/dist/v2/components/Alert/Alert.d.ts +14 -0
- package/dist/v2/components/Alert/Alert.d.ts.map +1 -0
- package/dist/v2/components/Alert/index.d.ts +3 -0
- package/dist/v2/components/Alert/index.d.ts.map +1 -0
- package/dist/v2/components/Button/Button.d.ts +10 -0
- package/dist/v2/components/Button/Button.d.ts.map +1 -0
- package/dist/v2/components/Button/index.d.ts +3 -0
- package/dist/v2/components/Button/index.d.ts.map +1 -0
- package/dist/v2/components/Colors/Colors.d.ts +21 -0
- package/dist/v2/components/Colors/Colors.d.ts.map +1 -0
- package/dist/v2/components/Colors/index.d.ts +3 -0
- package/dist/v2/components/Colors/index.d.ts.map +1 -0
- package/dist/v2/components/Typography/Typography.d.ts +11 -0
- package/dist/v2/components/Typography/Typography.d.ts.map +1 -0
- package/dist/v2/components/Typography/index.d.ts +3 -0
- package/dist/v2/components/Typography/index.d.ts.map +1 -0
- package/dist/v2/hooks/useAuth.d.ts +4 -0
- package/dist/v2/hooks/useAuth.d.ts.map +1 -0
- package/dist/v2/index.d.ts +56 -0
- package/dist/v2/index.d.ts.map +1 -0
- package/dist/v2/navigation/FigmasAdminSideBar/FigmasAdminSideBar.d.ts +8 -0
- package/dist/v2/navigation/FigmasAdminSideBar/FigmasAdminSideBar.d.ts.map +1 -0
- package/dist/v2/navigation/FigmasAdminSideBar/index.d.ts +3 -0
- package/dist/v2/navigation/FigmasAdminSideBar/index.d.ts.map +1 -0
- package/dist/v2/navigation/FigmasSideBar/FigmasSideBar.d.ts +22 -0
- package/dist/v2/navigation/FigmasSideBar/FigmasSideBar.d.ts.map +1 -0
- package/dist/v2/navigation/FigmasSideBar/index.d.ts +3 -0
- package/dist/v2/navigation/FigmasSideBar/index.d.ts.map +1 -0
- package/dist/v2/navigation/FigmasTopHat/FigmasTopHat.d.ts +15 -0
- package/dist/v2/navigation/FigmasTopHat/FigmasTopHat.d.ts.map +1 -0
- package/dist/v2/navigation/FigmasTopHat/index.d.ts +3 -0
- package/dist/v2/navigation/FigmasTopHat/index.d.ts.map +1 -0
- package/dist/v2/navigation/Navigation/Navigation.d.ts +9 -0
- package/dist/v2/navigation/Navigation/Navigation.d.ts.map +1 -0
- package/dist/v2/navigation/Navigation/index.d.ts +3 -0
- package/dist/v2/navigation/Navigation/index.d.ts.map +1 -0
- package/dist/v2/navigation/NavigationItem/NavigationItem.d.ts +12 -0
- package/dist/v2/navigation/NavigationItem/NavigationItem.d.ts.map +1 -0
- package/dist/v2/navigation/NavigationItem/index.d.ts +3 -0
- package/dist/v2/navigation/NavigationItem/index.d.ts.map +1 -0
- package/dist/v2/navigation/NavigationSection/NavigationSection.d.ts +8 -0
- package/dist/v2/navigation/NavigationSection/NavigationSection.d.ts.map +1 -0
- package/dist/v2/navigation/NavigationSection/index.d.ts +3 -0
- package/dist/v2/navigation/NavigationSection/index.d.ts.map +1 -0
- package/dist/v2/navigation/SideBarToggleLarge/SideBarToggleLarge.d.ts +9 -0
- package/dist/v2/navigation/SideBarToggleLarge/SideBarToggleLarge.d.ts.map +1 -0
- package/dist/v2/navigation/SideBarToggleLarge/index.d.ts +3 -0
- package/dist/v2/navigation/SideBarToggleLarge/index.d.ts.map +1 -0
- package/dist/v2/navigation/SidebarUserElement/SidebarUserElement.d.ts +15 -0
- package/dist/v2/navigation/SidebarUserElement/SidebarUserElement.d.ts.map +1 -0
- package/dist/v2/navigation/SidebarUserElement/index.d.ts +3 -0
- package/dist/v2/navigation/SidebarUserElement/index.d.ts.map +1 -0
- package/dist/v2/navigation/SidebarWithAuth.d.ts +20 -0
- package/dist/v2/navigation/SidebarWithAuth.d.ts.map +1 -0
- package/dist/v2/navigation/TopHatControlDisc/TopHatControlDisc.d.ts +9 -0
- package/dist/v2/navigation/TopHatControlDisc/TopHatControlDisc.d.ts.map +1 -0
- package/dist/v2/navigation/TopHatControlDisc/index.d.ts +3 -0
- package/dist/v2/navigation/TopHatControlDisc/index.d.ts.map +1 -0
- package/dist/v2/navigation/config.d.ts +3 -0
- package/dist/v2/navigation/config.d.ts.map +1 -0
- package/dist/v2/navigation/icons/index.d.ts +12 -0
- package/dist/v2/navigation/icons/index.d.ts.map +1 -0
- package/dist/v2/navigation/index.d.ts +23 -0
- package/dist/v2/navigation/index.d.ts.map +1 -0
- package/dist/v2/types/navigation.d.ts +17 -0
- package/dist/v2/types/navigation.d.ts.map +1 -0
- package/package.json +2 -1
- package/rollup.config.js +13 -0
- package/src/Maintenance/Maintenance.scss +253 -0
- package/src/Maintenance/MaintenancePage.tsx +59 -0
- package/src/Maintenance/SkeletonSidebar.tsx +56 -0
- package/src/PageNotFound/PageNotFound.scss +8 -0
- package/src/PageNotFound/PageNotFound.stories.tsx +23 -0
- package/src/PageNotFound/PageNotFound.tsx +43 -0
- package/src/PageNotFound/index.ts +1 -0
- package/src/UnderMaintenance/UnderMaintenance.scss +6 -0
- package/src/UnderMaintenance/UnderMaintenance.stories.tsx +23 -0
- package/src/UnderMaintenance/UnderMaintenance.tsx +22 -0
- package/src/UnderMaintenance/index.ts +1 -0
- package/src/auth/Auth.stories.tsx +37 -3
- package/src/auth/Authorizer.tsx +3 -2
- package/src/auth/ChangePassword/ChangePassword.stories.tsx +1 -8
- package/src/auth/Login/Login.stories.tsx +1 -6
- package/src/auth/Logout/Logout.stories.tsx +3 -0
- package/src/auth/Register/Register.stories.tsx +3 -7
- package/src/auth/ResetPassword/ResetPassword.stories.tsx +1 -8
- package/src/auth/Social/Social.stories.tsx +1 -6
- package/src/collapsible-input-group/CollapsibleInputGroup.stories.tsx +72 -4
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.stories.tsx +2 -1
- package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.stories.tsx +3 -2
- package/src/events/event-card/EventCard.stories.tsx +3 -2
- package/src/events/event-statistic-modal/EventStatisticModal.stories.tsx +2 -1
- package/src/events/event-venue-map/EventVenueMap.stories.tsx +8 -1
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.tsx +3 -3
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx +2 -2
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.tsx +1 -1
- package/src/iframe/custom-fields/components/CustomDateField.stories.tsx +3 -2
- package/src/iframe/event/event-card/IframeEventCard.stories.tsx +7 -5
- package/src/iframe/event/event-card/IframeEventCards.stories.tsx +7 -6
- package/src/iframe/event/event-description/EventDescription.stories.tsx +3 -2
- package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +3 -2
- package/src/iframe/external-modal/ExternalModal.stories.tsx +3 -0
- package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.stories.tsx +5 -0
- package/src/iframe/order-process/components/NavigationSteps/NavigationSteps.stories.tsx +2 -1
- package/src/iframe/order-process/components/PaymentCard/PaymentCard.stories.tsx +2 -1
- package/src/iframe/page/Page.stories.tsx +9 -8
- package/src/iframe/payment/order-items-table/OrderItemsTable.stories.tsx +2 -1
- package/src/iframe/payment/payment-status-header/PaymentStatusHeader.stories.tsx +2 -1
- package/src/index.ts +2 -0
- package/src/logo/Logo.stories.tsx +17 -14
- package/src/modals/confirmation/Confirmation.stories.tsx +2 -1
- package/src/notification/components/NotificationPlaceholders.stories.tsx +4 -0
- package/src/notification/components/NotificationPlaceholders.tsx +1 -1
- package/src/product-set/form/ProductCategoriesControl.tsx +12 -6
- package/src/product-set/form/ProductSetForm.stories.tsx +13 -4
- package/src/provider/location-input/LocationInput.stories.tsx +47 -2
- package/src/provider/provider-details-input/ProviderDetailsInput.stories.tsx +10 -1
- package/src/provider/provider-details-input/ProviderDetailsInput.tsx +1 -1
- package/src/provider/provider-form/ProviderForm.stories.tsx +46 -0
- package/src/provider/venue-form/VenueForm.stories.tsx +49 -0
- package/src/recurrence-input/RecurrenceEndInput.tsx +7 -5
- package/src/recurrence-input/RecurrenceInput.stories.tsx +3 -0
- package/src/resource/form/ResourceForm.stories.tsx +2 -1
- package/src/sales/guest-profile/previous-bookings/PreviousBookings.stories.tsx +2 -1
- package/src/sales/life-time-sales/LifeTimeSalesChart.stories.tsx +2 -1
- package/src/sales/manual-booking/select-date-type-control/SelectDateTypeControl.stories.tsx +2 -1
- package/src/sales/manual-booking/select-menu/SelectMenu.stories.tsx +2 -1
- package/src/sales/modals/payment-modal/PaymentModal.stories.tsx +3 -2
- package/src/sales/modals/refund-modal/RefundModal.stories.tsx +5 -4
- package/src/sales/payment-form/SalePaymentForm.stories.tsx +3 -2
- package/src/setting/dashboard/snippet-templates/card/SnippetTemplateCard.stories.tsx +2 -1
- package/src/snippet/snippet-template/SnippetTemplate.stories.tsx +2 -1
- package/src/snippet/snippet-template/form/SnippetTemplateForm.stories.tsx +4 -2
- package/src/sortable-tree/SortableTree.tsx +1 -1
- package/src/sortable-tree/SortableTreeItem.stories.tsx +12 -14
- package/src/styles/overrides/_functions.scss +1 -1
- package/src/table/Table.stories.tsx +3 -24
- package/src/tiptap-editor/TipTapMenu/TipTapMenu.stories.tsx +27 -3
- package/src/v2/components/Alert/Alert.scss +186 -0
- package/src/v2/components/Alert/Alert.stories.tsx +176 -0
- package/src/v2/components/Alert/Alert.tsx +62 -0
- package/src/v2/components/Alert/assets/alert-icon.svg +3 -0
- package/src/v2/components/Alert/assets/error-icon.svg +3 -0
- package/src/v2/components/Alert/assets/info-icon.svg +3 -0
- package/src/v2/components/Alert/assets/success-icon.svg +3 -0
- package/src/v2/components/Alert/index.ts +2 -0
- package/src/v2/components/Button/Button.scss +19 -0
- package/src/v2/components/Button/Button.stories.tsx +93 -0
- package/src/v2/components/Button/Button.tsx +37 -0
- package/src/v2/components/Button/index.ts +3 -0
- package/src/v2/components/Colors/Colors.scss +64 -0
- package/src/v2/components/Colors/Colors.stories.tsx +143 -0
- package/src/v2/components/Colors/Colors.tsx +51 -0
- package/src/v2/components/Colors/ColorsAliases.stories.tsx +285 -0
- package/src/v2/components/Colors/Sizes.stories.tsx +141 -0
- package/src/v2/components/Colors/index.ts +2 -0
- package/src/v2/components/Typography/Typography.scss +72 -0
- package/src/v2/components/Typography/Typography.stories.tsx +266 -0
- package/src/v2/components/Typography/Typography.tsx +56 -0
- package/src/v2/components/Typography/index.ts +2 -0
- package/src/v2/hooks/useAuth.ts +40 -0
- package/src/v2/index.ts +105 -0
- package/src/v2/navigation/FigmasAdminSideBar/FigmasAdminSideBar.scss +148 -0
- package/src/v2/navigation/FigmasAdminSideBar/FigmasAdminSideBar.stories.tsx +132 -0
- package/src/v2/navigation/FigmasAdminSideBar/FigmasAdminSideBar.tsx +272 -0
- package/src/v2/navigation/FigmasAdminSideBar/index.ts +2 -0
- package/src/v2/navigation/FigmasSideBar/FigmasSideBar.scss +214 -0
- package/src/v2/navigation/FigmasSideBar/FigmasSideBar.stories.tsx +164 -0
- package/src/v2/navigation/FigmasSideBar/FigmasSideBar.tsx +310 -0
- package/src/v2/navigation/FigmasSideBar/index.ts +2 -0
- package/src/v2/navigation/FigmasTopHat/FigmasTopHat.scss +291 -0
- package/src/v2/navigation/FigmasTopHat/FigmasTopHat.stories.tsx +201 -0
- package/src/v2/navigation/FigmasTopHat/FigmasTopHat.tsx +158 -0
- package/src/v2/navigation/FigmasTopHat/assets/bell-icon.svg +3 -0
- package/src/v2/navigation/FigmasTopHat/assets/disc-icon.svg +4 -0
- package/src/v2/navigation/FigmasTopHat/assets/inbox-icon.svg +3 -0
- package/src/v2/navigation/FigmasTopHat/assets/logo-desktop-1.svg +3 -0
- package/src/v2/navigation/FigmasTopHat/assets/logo-desktop-2.svg +4 -0
- package/src/v2/navigation/FigmasTopHat/assets/user-icon.svg +4 -0
- package/src/v2/navigation/FigmasTopHat/index.ts +2 -0
- package/src/v2/navigation/Navigation/Navigation.scss +15 -0
- package/src/v2/navigation/Navigation/Navigation.stories.tsx +137 -0
- package/src/v2/navigation/Navigation/Navigation.tsx +127 -0
- package/src/v2/navigation/Navigation/index.ts +3 -0
- package/src/v2/navigation/NavigationItem/NavigationItem.scss +61 -0
- package/src/v2/navigation/NavigationItem/NavigationItem.stories.tsx +110 -0
- package/src/v2/navigation/NavigationItem/NavigationItem.tsx +38 -0
- package/src/v2/navigation/NavigationItem/index.ts +3 -0
- package/src/v2/navigation/NavigationSection/NavigationSection.scss +20 -0
- package/src/v2/navigation/NavigationSection/NavigationSection.tsx +19 -0
- package/src/v2/navigation/NavigationSection/index.ts +3 -0
- package/src/v2/navigation/SideBarToggleLarge/SideBarToggleLarge.scss +64 -0
- package/src/v2/navigation/SideBarToggleLarge/SideBarToggleLarge.stories.tsx +183 -0
- package/src/v2/navigation/SideBarToggleLarge/SideBarToggleLarge.tsx +30 -0
- package/src/v2/navigation/SideBarToggleLarge/assets/sidebar-icon.svg +5 -0
- package/src/v2/navigation/SideBarToggleLarge/index.ts +2 -0
- package/src/v2/navigation/SidebarUserElement/SidebarUserElement.scss +148 -0
- package/src/v2/navigation/SidebarUserElement/SidebarUserElement.stories.tsx +342 -0
- package/src/v2/navigation/SidebarUserElement/SidebarUserElement.tsx +113 -0
- package/src/v2/navigation/SidebarUserElement/index.ts +2 -0
- package/src/v2/navigation/SidebarWithAuth.stories.tsx +208 -0
- package/src/v2/navigation/SidebarWithAuth.tsx +49 -0
- package/src/v2/navigation/TopHatControlDisc/TopHatControlDisc.scss +57 -0
- package/src/v2/navigation/TopHatControlDisc/TopHatControlDisc.stories.tsx +153 -0
- package/src/v2/navigation/TopHatControlDisc/TopHatControlDisc.tsx +30 -0
- package/src/v2/navigation/TopHatControlDisc/assets/disc-icon.svg +4 -0
- package/src/v2/navigation/TopHatControlDisc/index.ts +2 -0
- package/src/v2/navigation/config.tsx +150 -0
- package/src/v2/navigation/icons/index.tsx +72 -0
- package/src/v2/navigation/index.ts +23 -0
- package/src/v2/styles/components/Button.scss +168 -0
- package/src/v2/styles/form/NewInput.scss +172 -0
- package/src/v2/styles/index.scss +5 -0
- package/src/v2/styles/navigation/Navigation.scss +17 -0
- package/src/v2/styles/navigation/NavigationItem.scss +86 -0
- package/src/v2/styles/navigation/NavigationSection.scss +26 -0
- package/src/v2/styles/navigation/_index.scss +9 -0
- package/src/v2/styles/tokens/_aliases.scss +199 -0
- package/src/v2/styles/tokens/_colors.scss +121 -0
- package/src/v2/styles/tokens/_sizes.scss +122 -0
- package/src/v2/styles/tokens/_status.scss +108 -0
- package/src/v2/styles/tokens/_typography.scss +146 -0
- package/src/v2/types/navigation.ts +17 -0
- package/src/zone/form/ZoneForm.stories.tsx +2 -1
- package/styles/overrides/_functions.scss +6 -0
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react-vite'
|
|
2
|
+
import { useQueryClient } from 'react-query'
|
|
3
|
+
import { TimeZonePath } from '@licklist/plugins'
|
|
2
4
|
import { VenueForm, VenueFormProps, VenueFormValues } from './VenueForm'
|
|
3
5
|
|
|
4
6
|
const categories = Array.from({ length: 6 }, (_, i) => ({
|
|
@@ -50,6 +52,7 @@ const defaultValues: VenueFormValues = {
|
|
|
50
52
|
state: 'Essex',
|
|
51
53
|
country: 'GB',
|
|
52
54
|
},
|
|
55
|
+
timeZoneId: '',
|
|
53
56
|
workingHours: [
|
|
54
57
|
{ start: '08:00', end: '18:00', description: 'Description' },
|
|
55
58
|
undefined,
|
|
@@ -58,6 +61,47 @@ const defaultValues: VenueFormValues = {
|
|
|
58
61
|
images: [],
|
|
59
62
|
}
|
|
60
63
|
|
|
64
|
+
// Mock timezone data for Storybook
|
|
65
|
+
const mockTimezones = [
|
|
66
|
+
{ id: 1, name: 'Europe/London' },
|
|
67
|
+
{ id: 2, name: 'America/New_York' },
|
|
68
|
+
{ id: 3, name: 'America/Los_Angeles' },
|
|
69
|
+
{ id: 4, name: 'Europe/Paris' },
|
|
70
|
+
{ id: 5, name: 'Asia/Tokyo' },
|
|
71
|
+
]
|
|
72
|
+
|
|
73
|
+
// Decorator to mock timezone query data
|
|
74
|
+
const withMockedTimezones = (Story) => {
|
|
75
|
+
const QueryClientWrapper = () => {
|
|
76
|
+
const queryClient = useQueryClient()
|
|
77
|
+
const path = '/api/timezones' as TimeZonePath
|
|
78
|
+
|
|
79
|
+
// Set query data synchronously before first render
|
|
80
|
+
// Try all possible query key formats
|
|
81
|
+
const queryKeys = [
|
|
82
|
+
[path, 'all'],
|
|
83
|
+
['timezones', path, 'all'],
|
|
84
|
+
['timeZone', path],
|
|
85
|
+
[path],
|
|
86
|
+
['useTimeZoneApi', path, 'all'],
|
|
87
|
+
]
|
|
88
|
+
|
|
89
|
+
queryKeys.forEach((key) => {
|
|
90
|
+
queryClient.setQueryData(key, mockTimezones)
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
// Also set query defaults to return mock data if query key doesn't match
|
|
94
|
+
queryClient.setQueryDefaults([path], {
|
|
95
|
+
queryFn: () => Promise.resolve(mockTimezones),
|
|
96
|
+
initialData: mockTimezones,
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
return <Story />
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return <QueryClientWrapper />
|
|
103
|
+
}
|
|
104
|
+
|
|
61
105
|
const linkTypes = ['Facebook', 'Twitter', 'Other'].map((name, id) => ({
|
|
62
106
|
id: `${id}`,
|
|
63
107
|
name,
|
|
@@ -66,6 +110,7 @@ const linkTypes = ['Facebook', 'Twitter', 'Other'].map((name, id) => ({
|
|
|
66
110
|
export default {
|
|
67
111
|
title: 'Provider/VenueForm',
|
|
68
112
|
component: VenueForm,
|
|
113
|
+
decorators: [withMockedTimezones],
|
|
69
114
|
} as Meta
|
|
70
115
|
|
|
71
116
|
export const Default: Story<VenueFormProps> = (args) => <VenueForm {...args} />
|
|
@@ -75,10 +120,14 @@ export const WithDefaultValues: Story<VenueFormProps> = (args) => (
|
|
|
75
120
|
Default.args = {
|
|
76
121
|
categories,
|
|
77
122
|
linkTypes,
|
|
123
|
+
path: '/api/timezones' as TimeZonePath,
|
|
124
|
+
onSubmit: (values) => console.log(values),
|
|
78
125
|
}
|
|
79
126
|
WithDefaultValues.args = {
|
|
80
127
|
defaultValues,
|
|
81
128
|
categories,
|
|
82
129
|
linkTypes,
|
|
83
130
|
errorResponse,
|
|
131
|
+
path: '/api/timezones' as TimeZonePath,
|
|
132
|
+
onSubmit: (values) => console.log(values),
|
|
84
133
|
}
|
|
@@ -35,14 +35,16 @@ function RecurrenceEndInput({
|
|
|
35
35
|
const dateInput = useRef<HTMLInputDateElement | null>(null)
|
|
36
36
|
|
|
37
37
|
useEffect(() => {
|
|
38
|
-
|
|
39
|
-
until ?? getUntil({ date, frequency }),
|
|
40
|
-
DATE_FORMAT,
|
|
41
|
-
)
|
|
38
|
+
if (!minDate) return
|
|
42
39
|
|
|
40
|
+
const untilValue = until ?? getUntil({ date, frequency })
|
|
41
|
+
// getUntil returns ISO date, so use fromISO; until prop should also be ISO format
|
|
42
|
+
const untilDatetime = DateTime.fromISO(untilValue)
|
|
43
|
+
|
|
44
|
+
// minDate should be in DATE_FORMAT, so use fromFormat
|
|
43
45
|
const minDatetime = DateTime.fromFormat(minDate, DATE_FORMAT)
|
|
44
46
|
|
|
45
|
-
if (minDatetime > untilDatetime) {
|
|
47
|
+
if (untilDatetime.isValid && minDatetime.isValid && minDatetime > untilDatetime) {
|
|
46
48
|
onChange({ until: minDate })
|
|
47
49
|
}
|
|
48
50
|
}, [minDate, onChange, until, date, frequency])
|
|
@@ -9,7 +9,8 @@ export default {
|
|
|
9
9
|
} as Meta
|
|
10
10
|
|
|
11
11
|
export const Default: Story<ResourceFormProps> = (args) => {
|
|
12
|
-
|
|
12
|
+
// TODO: Replace with Storybook controls
|
|
13
|
+
const isLoading = false
|
|
13
14
|
return <ResourceForm {...args} isLoading={isLoading} />
|
|
14
15
|
}
|
|
15
16
|
|
|
@@ -11,7 +11,8 @@ export default {
|
|
|
11
11
|
} as Meta
|
|
12
12
|
|
|
13
13
|
export const Default = (args) => {
|
|
14
|
-
|
|
14
|
+
// TODO: Replace with Storybook controls
|
|
15
|
+
const useProviderLink = true
|
|
15
16
|
|
|
16
17
|
const renderOrderTitleLinkByProvider = (order: Order) => {
|
|
17
18
|
return (
|
|
@@ -47,7 +47,8 @@ const data: LifeTimeSalesData[] = [
|
|
|
47
47
|
]
|
|
48
48
|
|
|
49
49
|
export const Default: Story<any> = (args) => {
|
|
50
|
-
|
|
50
|
+
// TODO: Replace with Storybook controls
|
|
51
|
+
const isLoading = true
|
|
51
52
|
|
|
52
53
|
return (
|
|
53
54
|
<div style={{ height: '250px', width: '370px' }}>
|
|
@@ -13,7 +13,8 @@ export const Default: Story<any> = (args) => {
|
|
|
13
13
|
undefined,
|
|
14
14
|
)
|
|
15
15
|
const [orderDate, setOrderDate] = useState<string>('2018-07-22')
|
|
16
|
-
|
|
16
|
+
// TODO: Replace with Storybook controls
|
|
17
|
+
const showTypeSelect = true
|
|
17
18
|
|
|
18
19
|
return (
|
|
19
20
|
<div style={{ height: '250px', width: '370px' }}>
|
|
@@ -148,7 +148,8 @@ const tranformedMenus = transformMenus([
|
|
|
148
148
|
])
|
|
149
149
|
|
|
150
150
|
export const Default: Story<SelectMenuProps> = () => {
|
|
151
|
-
|
|
151
|
+
// TODO: Replace with Storybook controls
|
|
152
|
+
const isLoading = false
|
|
152
153
|
|
|
153
154
|
return (
|
|
154
155
|
<SelectMenu
|
|
@@ -17,8 +17,9 @@ const Component = () => {
|
|
|
17
17
|
const [isVisible, setIsVisible] = useState(false)
|
|
18
18
|
const [isValid, setIsValid] = useState(false)
|
|
19
19
|
const [ryftInitFailure, setRyftInitFailure] = useState(false)
|
|
20
|
-
|
|
21
|
-
const
|
|
20
|
+
// TODO: Replace with Storybook controls
|
|
21
|
+
const isLoading = false
|
|
22
|
+
const remainingToPay = 10
|
|
22
23
|
const { formValues } = useContext(SalePaymentFormContext)
|
|
23
24
|
|
|
24
25
|
const ryftPayment = useRyftPayment()
|
|
@@ -10,10 +10,11 @@ export default {
|
|
|
10
10
|
|
|
11
11
|
export const Default: Story<RefundModalProps> = () => {
|
|
12
12
|
const [isVisible, setIsVisible] = useState(false)
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
13
|
+
// TODO: Replace with Storybook controls
|
|
14
|
+
const isFullRefund = false
|
|
15
|
+
const isLoading = false
|
|
16
|
+
const defaultValue = 0
|
|
17
|
+
const maxValue = 0
|
|
17
18
|
|
|
18
19
|
const onSubmit = (value: number | undefined) => {
|
|
19
20
|
console.log(value)
|
|
@@ -15,8 +15,9 @@ export default {
|
|
|
15
15
|
} as Meta
|
|
16
16
|
// @TODO add ryft script in Storybook <head>
|
|
17
17
|
export const Default: Story<SalePaymentFormProps> = () => {
|
|
18
|
-
|
|
19
|
-
const
|
|
18
|
+
// TODO: Replace with Storybook controls
|
|
19
|
+
const showAmountField = true
|
|
20
|
+
const calculatedAmount = 50
|
|
20
21
|
const [isValid, setIsValid] = useState(false)
|
|
21
22
|
const [ryftInitFailure, setRyftInitFailure] = useState(false)
|
|
22
23
|
|
|
@@ -11,7 +11,8 @@ export default {
|
|
|
11
11
|
} as Meta
|
|
12
12
|
|
|
13
13
|
export const Default: Story<SnippetTemplateCardProps> = (args) => {
|
|
14
|
-
|
|
14
|
+
// TODO: Replace with Storybook controls
|
|
15
|
+
const isDefault = false
|
|
15
16
|
return <SnippetTemplateCard {...args} isDefault={isDefault} />
|
|
16
17
|
}
|
|
17
18
|
|
|
@@ -9,7 +9,8 @@ export default {
|
|
|
9
9
|
} as Meta
|
|
10
10
|
|
|
11
11
|
export const Default: Story<SnippetTemplateProps> = (args) => {
|
|
12
|
-
|
|
12
|
+
// TODO: Replace with Storybook controls
|
|
13
|
+
const providerHasMap = true
|
|
13
14
|
|
|
14
15
|
return <SnippetTemplate {...args} providerHasMap={providerHasMap} />
|
|
15
16
|
}
|
|
@@ -54,7 +54,8 @@ const defaultValues = {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
export const Default: Story<SnippetTemplateFormProps> = (args) => {
|
|
57
|
-
|
|
57
|
+
// TODO: Replace with Storybook controls
|
|
58
|
+
const providerHasMap = true
|
|
58
59
|
|
|
59
60
|
return (
|
|
60
61
|
<SnippetTemplateLoadingContextProvider>
|
|
@@ -68,7 +69,8 @@ export const Default: Story<SnippetTemplateFormProps> = (args) => {
|
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
export const ServerError: Story<SnippetTemplateFormProps> = (args) => {
|
|
71
|
-
|
|
72
|
+
// TODO: Replace with Storybook controls
|
|
73
|
+
const providerHasMap = true
|
|
72
74
|
|
|
73
75
|
return (
|
|
74
76
|
<SnippetTemplateLoadingContextProvider>
|
|
@@ -20,7 +20,7 @@ export function SortableTree({
|
|
|
20
20
|
sensors,
|
|
21
21
|
}: PropsWithChildren<SortableTreeProps>) {
|
|
22
22
|
return (
|
|
23
|
-
<DndContext onDragEnd={onDragEnd} sensors={[
|
|
23
|
+
<DndContext onDragEnd={onDragEnd} sensors={sensors ?? []}>
|
|
24
24
|
<SortableContext items={items} strategy={verticalListSortingStrategy}>
|
|
25
25
|
{children}
|
|
26
26
|
</SortableContext>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useMemo } from 'react'
|
|
1
2
|
import { DndContext } from '@dnd-kit/core'
|
|
2
3
|
import { SortableContext, verticalListSortingStrategy } from '@dnd-kit/sortable'
|
|
3
4
|
import { Meta, Story } from '@storybook/react-vite'
|
|
@@ -9,20 +10,17 @@ export default {
|
|
|
9
10
|
component: SortableTreeItem,
|
|
10
11
|
} as Meta
|
|
11
12
|
|
|
12
|
-
export const Default: Story<SortableTreeItemProps> = (args) =>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
</SortableContext>
|
|
24
|
-
</DndContext>
|
|
25
|
-
)
|
|
13
|
+
export const Default: Story<SortableTreeItemProps> = (args) => {
|
|
14
|
+
const items = useMemo(() => [args.id], [args.id])
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<DndContext>
|
|
18
|
+
<SortableContext items={items} strategy={verticalListSortingStrategy}>
|
|
19
|
+
<SortableTreeItem {...args} />
|
|
20
|
+
</SortableContext>
|
|
21
|
+
</DndContext>
|
|
22
|
+
)
|
|
23
|
+
}
|
|
26
24
|
|
|
27
25
|
Default.args = {
|
|
28
26
|
id: '4',
|
|
@@ -2,7 +2,6 @@ import ILengthAwarePaginator from '@licklist/plugins/dist/types/services/Table/I
|
|
|
2
2
|
import { Meta, Story } from '@storybook/react-vite'
|
|
3
3
|
import { range } from 'lodash'
|
|
4
4
|
import { useRef } from 'react'
|
|
5
|
-
import { Router } from '../auth/Router'
|
|
6
5
|
import {
|
|
7
6
|
FilterHelperComponent as FilterHelper,
|
|
8
7
|
FilterHelperComponentProps,
|
|
@@ -33,13 +32,7 @@ export default {
|
|
|
33
32
|
|
|
34
33
|
export const TableHelperComponent: Story<TableHelperComponentProps> = (
|
|
35
34
|
args,
|
|
36
|
-
) =>
|
|
37
|
-
<>
|
|
38
|
-
<Router>
|
|
39
|
-
<TableHelper {...args} />
|
|
40
|
-
</Router>
|
|
41
|
-
</>
|
|
42
|
-
)
|
|
35
|
+
) => <TableHelper {...args} />
|
|
43
36
|
export const FilterHelperComponent: Story<FilterHelperComponentProps> = (
|
|
44
37
|
args,
|
|
45
38
|
) => <FilterHelper {...args} />
|
|
@@ -54,13 +47,7 @@ export const PerPageHelperComponent: Story<PerPageHelperComponentProps> = (
|
|
|
54
47
|
|
|
55
48
|
export const ReactTableHelperComponent: Story<
|
|
56
49
|
ReactTableHelperComponentProps<any>
|
|
57
|
-
> = (args) =>
|
|
58
|
-
<>
|
|
59
|
-
<Router>
|
|
60
|
-
<ReactTableHelper {...args} />
|
|
61
|
-
</Router>
|
|
62
|
-
</>
|
|
63
|
-
)
|
|
50
|
+
> = (args) => <ReactTableHelper {...args} />
|
|
64
51
|
|
|
65
52
|
const ComponentInsideRouter = (args) => {
|
|
66
53
|
const ref = useRef<ReactTableHelperComponentRef>(null)
|
|
@@ -76,15 +63,7 @@ const ComponentInsideRouter = (args) => {
|
|
|
76
63
|
|
|
77
64
|
export const ReactTableHelperComponentWithColumns: Story<
|
|
78
65
|
ReactTableHelperComponentProps<any>
|
|
79
|
-
> = (args) => {
|
|
80
|
-
return (
|
|
81
|
-
<>
|
|
82
|
-
<Router>
|
|
83
|
-
<ComponentInsideRouter {...args} />
|
|
84
|
-
</Router>
|
|
85
|
-
</>
|
|
86
|
-
)
|
|
87
|
-
}
|
|
66
|
+
> = (args) => <ComponentInsideRouter {...args} />
|
|
88
67
|
|
|
89
68
|
const getPaginator = (perPage, items = 100) =>
|
|
90
69
|
({
|
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
import { TipTapMenu } from './TipTapMenu'
|
|
2
2
|
import { useEditor } from '@tiptap/react'
|
|
3
3
|
import { Meta } from '@storybook/react-vite'
|
|
4
|
-
import
|
|
5
|
-
import TaskItem from '@tiptap/extension-task-item'
|
|
4
|
+
import Bold from '@tiptap/extension-bold'
|
|
6
5
|
import Text from '@tiptap/extension-text'
|
|
6
|
+
import Blockquote from '@tiptap/extension-blockquote'
|
|
7
|
+
import BulletList from '@tiptap/extension-bullet-list'
|
|
7
8
|
import Document from '@tiptap/extension-document'
|
|
9
|
+
import Heading from '@tiptap/extension-heading'
|
|
10
|
+
import History from '@tiptap/extension-history'
|
|
11
|
+
import HorizontalRule from '@tiptap/extension-horizontal-rule'
|
|
12
|
+
import Italic from '@tiptap/extension-italic'
|
|
13
|
+
import ListItem from '@tiptap/extension-list-item'
|
|
14
|
+
import OrderedList from '@tiptap/extension-ordered-list'
|
|
15
|
+
import Paragraph from '@tiptap/extension-paragraph'
|
|
16
|
+
import Strike from '@tiptap/extension-strike'
|
|
17
|
+
import TaskList from '@tiptap/extension-task-list'
|
|
18
|
+
import TaskItem from '@tiptap/extension-task-item'
|
|
19
|
+
import HardBreak from '@tiptap/extension-hard-break'
|
|
8
20
|
|
|
9
21
|
import { EmojiReplacer } from './extensions/EmojiReplacer'
|
|
10
22
|
|
|
@@ -16,8 +28,20 @@ export default {
|
|
|
16
28
|
export const Default = () => {
|
|
17
29
|
const editor = useEditor({
|
|
18
30
|
extensions: [
|
|
19
|
-
|
|
31
|
+
Blockquote,
|
|
32
|
+
BulletList,
|
|
33
|
+
Heading,
|
|
34
|
+
History,
|
|
35
|
+
HorizontalRule,
|
|
36
|
+
Strike,
|
|
37
|
+
Paragraph,
|
|
38
|
+
OrderedList,
|
|
39
|
+
ListItem,
|
|
40
|
+
Italic,
|
|
20
41
|
Document,
|
|
42
|
+
Text,
|
|
43
|
+
Bold,
|
|
44
|
+
HardBreak,
|
|
21
45
|
TaskList,
|
|
22
46
|
TaskItem.configure({
|
|
23
47
|
nested: true,
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
@import '../../../styles/overrides/functions';
|
|
2
|
+
|
|
3
|
+
.alert {
|
|
4
|
+
background: var(--surfaces-status-background-success, #eef9ea);
|
|
5
|
+
border: 2px solid var(--borders-status-border-success, #c9ecbd);
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
padding: var(--padding-reg, 16px);
|
|
11
|
+
border-radius: var(--radius-reg, 8px);
|
|
12
|
+
width: 100%;
|
|
13
|
+
|
|
14
|
+
// Variant-specific styles
|
|
15
|
+
&--success {
|
|
16
|
+
background: var(--surfaces-status-background-success, #eef9ea);
|
|
17
|
+
border-color: var(--borders-status-border-success, #c9ecbd);
|
|
18
|
+
|
|
19
|
+
.alert__icon {
|
|
20
|
+
background-image: url("./assets/success-icon.svg");
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.alert__dismiss svg path {
|
|
24
|
+
stroke: var(--fills-status-fill-success, #2d6b18);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&--error {
|
|
29
|
+
background: var(--surfaces-status-background-error, #fceceb);
|
|
30
|
+
border-color: var(--borders-status-border-error, #f5c4c2);
|
|
31
|
+
|
|
32
|
+
.alert__icon {
|
|
33
|
+
background-image: url("./assets/error-icon.svg");
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.alert__dismiss svg path {
|
|
37
|
+
stroke: var(--fills-status-fill-error, #cc3c35);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&--alert {
|
|
42
|
+
background: var(--surfaces-status-background-alert, #fcf6e7);
|
|
43
|
+
border-color: var(--borders-status-border-alert, #f6e3b4);
|
|
44
|
+
|
|
45
|
+
.alert__icon {
|
|
46
|
+
background-image: url("./assets/alert-icon.svg");
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.alert__dismiss svg path {
|
|
50
|
+
stroke: var(--fills-status-fill-alert, #fd7e14);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&--info {
|
|
55
|
+
background: var(--surfaces-status-background-info, #e7f4fc);
|
|
56
|
+
border-color: var(--borders-status-border-info, #b4dbf6);
|
|
57
|
+
|
|
58
|
+
.alert__icon {
|
|
59
|
+
background-image: url("./assets/info-icon.svg");
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.alert__dismiss svg path {
|
|
63
|
+
stroke: var(--fills-status-fill-info, #0e8ce2);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&__content {
|
|
68
|
+
display: flex;
|
|
69
|
+
flex: 1 0 0;
|
|
70
|
+
gap: 16px;
|
|
71
|
+
align-items: center;
|
|
72
|
+
min-height: 0;
|
|
73
|
+
min-width: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&__icon {
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
flex-shrink: 0;
|
|
79
|
+
width: 32px;
|
|
80
|
+
height: 32px;
|
|
81
|
+
background-size: contain;
|
|
82
|
+
background-position: center;
|
|
83
|
+
background-repeat: no-repeat;
|
|
84
|
+
position: relative;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&__details {
|
|
88
|
+
display: flex;
|
|
89
|
+
flex: 1 0 0;
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
gap: 4px;
|
|
92
|
+
align-items: flex-start;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
min-height: 0;
|
|
95
|
+
min-width: 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&__information {
|
|
99
|
+
display: flex;
|
|
100
|
+
flex-direction: column;
|
|
101
|
+
gap: 4px;
|
|
102
|
+
align-items: flex-start;
|
|
103
|
+
position: relative;
|
|
104
|
+
text-align: left;
|
|
105
|
+
font-size: 15px;
|
|
106
|
+
line-height: normal;
|
|
107
|
+
color: var(--labels-main-label-primary, #121e52);
|
|
108
|
+
width: 100%;
|
|
109
|
+
white-space: pre-wrap;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&__title {
|
|
113
|
+
font-family: 'Geist', sans-serif;
|
|
114
|
+
font-weight: 600;
|
|
115
|
+
font-size: 15px;
|
|
116
|
+
line-height: 18px;
|
|
117
|
+
color: var(--labels-main-label-primary, #121e52);
|
|
118
|
+
margin: 0;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&__message {
|
|
122
|
+
font-family: 'Geist', sans-serif;
|
|
123
|
+
font-weight: 400;
|
|
124
|
+
font-size: 15px;
|
|
125
|
+
line-height: 20px;
|
|
126
|
+
color: var(--labels-main-label-primary, #121e52);
|
|
127
|
+
max-width: 720px;
|
|
128
|
+
margin: 0;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&__link {
|
|
132
|
+
display: flex;
|
|
133
|
+
gap: 8px;
|
|
134
|
+
align-items: center;
|
|
135
|
+
cursor: pointer;
|
|
136
|
+
|
|
137
|
+
&:hover {
|
|
138
|
+
opacity: 0.8;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&__link-text {
|
|
143
|
+
font-family: 'Geist', sans-serif;
|
|
144
|
+
font-weight: 500;
|
|
145
|
+
font-size: 15px;
|
|
146
|
+
line-height: 20px;
|
|
147
|
+
color: var(--labels-main-label-primary, #121e52);
|
|
148
|
+
margin: 0;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
&__link-icon {
|
|
152
|
+
overflow: hidden;
|
|
153
|
+
flex-shrink: 0;
|
|
154
|
+
width: 24px;
|
|
155
|
+
height: 24px;
|
|
156
|
+
position: relative;
|
|
157
|
+
|
|
158
|
+
svg {
|
|
159
|
+
width: 100%;
|
|
160
|
+
height: 100%;
|
|
161
|
+
display: block;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&__dismiss {
|
|
166
|
+
overflow: hidden;
|
|
167
|
+
flex-shrink: 0;
|
|
168
|
+
width: 32px;
|
|
169
|
+
height: 32px;
|
|
170
|
+
cursor: pointer;
|
|
171
|
+
display: flex;
|
|
172
|
+
align-items: center;
|
|
173
|
+
justify-content: center;
|
|
174
|
+
transition: opacity 0.2s ease;
|
|
175
|
+
|
|
176
|
+
&:hover {
|
|
177
|
+
opacity: 0.7;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
svg {
|
|
181
|
+
width: 100%;
|
|
182
|
+
height: 100%;
|
|
183
|
+
display: block;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|