@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
|
@@ -9,8 +9,9 @@ export default {
|
|
|
9
9
|
} as Meta
|
|
10
10
|
|
|
11
11
|
export function Default() {
|
|
12
|
-
|
|
13
|
-
const
|
|
12
|
+
// TODO: Replace with Storybook controls
|
|
13
|
+
const showImage = true
|
|
14
|
+
const isListView = false
|
|
14
15
|
|
|
15
16
|
return (
|
|
16
17
|
<div>
|
|
@@ -19,7 +20,7 @@ export function Default() {
|
|
|
19
20
|
imageSrc={
|
|
20
21
|
showImage
|
|
21
22
|
? // eslint-disable-next-line max-len
|
|
22
|
-
|
|
23
|
+
'https://images.unsplash.com/photo-1638988319382-90e61be77c59?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=687&q=80'
|
|
23
24
|
: undefined
|
|
24
25
|
}
|
|
25
26
|
title='Glitterbomb Bucks / Baga Chipz'
|
|
@@ -54,8 +55,9 @@ export function Default() {
|
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
export function EventCardSkeleton() {
|
|
57
|
-
|
|
58
|
-
const
|
|
58
|
+
// TODO: Replace with Storybook controls
|
|
59
|
+
const showImage = true
|
|
60
|
+
const isListView = false
|
|
59
61
|
|
|
60
62
|
return (
|
|
61
63
|
<div>
|
|
@@ -554,11 +554,12 @@ const MOCK_IFRAMES = [
|
|
|
554
554
|
]
|
|
555
555
|
|
|
556
556
|
export function Default() {
|
|
557
|
-
|
|
558
|
-
const
|
|
559
|
-
const
|
|
560
|
-
const
|
|
561
|
-
const
|
|
557
|
+
// TODO: Replace with Storybook controls
|
|
558
|
+
const displayCost = true
|
|
559
|
+
const displayType = true
|
|
560
|
+
const displayDescription = true
|
|
561
|
+
const isListView = false
|
|
562
|
+
const className = 'event-info'
|
|
562
563
|
|
|
563
564
|
return (
|
|
564
565
|
<div
|
|
@@ -584,7 +585,7 @@ export function Default() {
|
|
|
584
585
|
includeFromPrice: [],
|
|
585
586
|
}}
|
|
586
587
|
imageSrc={event.imgSrc}
|
|
587
|
-
goToDetails={() => {}}
|
|
588
|
+
goToDetails={() => { }}
|
|
588
589
|
description={event.description}
|
|
589
590
|
isListView={isListView}
|
|
590
591
|
className={className}
|
|
@@ -31,7 +31,8 @@ const LONG_DESCRIPTION = `On the other hand, we denounce with righteous indignat
|
|
|
31
31
|
`
|
|
32
32
|
|
|
33
33
|
export function Default() {
|
|
34
|
-
|
|
34
|
+
// TODO: Replace with Storybook controls
|
|
35
|
+
const shortDescription = true
|
|
35
36
|
|
|
36
37
|
const onNextStep = () => {
|
|
37
38
|
console.log('onNextStep')
|
|
@@ -67,7 +68,7 @@ export function Default() {
|
|
|
67
68
|
]}
|
|
68
69
|
providerName='Baga Chipz studio'
|
|
69
70
|
onNextStep={onNextStep}
|
|
70
|
-
onPrevStep={() => {}}
|
|
71
|
+
onPrevStep={() => { }}
|
|
71
72
|
/>
|
|
72
73
|
</div>
|
|
73
74
|
)
|
|
@@ -239,7 +239,8 @@ const selectOptions = [
|
|
|
239
239
|
]
|
|
240
240
|
|
|
241
241
|
export function Default() {
|
|
242
|
-
|
|
242
|
+
// TODO: Replace with Storybook controls
|
|
243
|
+
const usedInIframe = true
|
|
243
244
|
return (
|
|
244
245
|
<Page headerBlock={<PageHeader>Header</PageHeader>}>
|
|
245
246
|
<PageBody
|
|
@@ -249,7 +250,7 @@ export function Default() {
|
|
|
249
250
|
component={
|
|
250
251
|
<CalendarSelect
|
|
251
252
|
value={selectOptions[0].value}
|
|
252
|
-
onChange={() => {}}
|
|
253
|
+
onChange={() => { }}
|
|
253
254
|
options={selectOptions}
|
|
254
255
|
/>
|
|
255
256
|
}
|
|
@@ -35,6 +35,7 @@ const productCategories = [
|
|
|
35
35
|
maxAmount: 2,
|
|
36
36
|
price: 1,
|
|
37
37
|
images: IMAGES,
|
|
38
|
+
modifiersSet: [],
|
|
38
39
|
},
|
|
39
40
|
{
|
|
40
41
|
id: 8,
|
|
@@ -46,6 +47,7 @@ const productCategories = [
|
|
|
46
47
|
maxAmount: 5,
|
|
47
48
|
price: 1,
|
|
48
49
|
images: IMAGES,
|
|
50
|
+
modifiersSet: [],
|
|
49
51
|
},
|
|
50
52
|
],
|
|
51
53
|
},
|
|
@@ -64,6 +66,7 @@ const productCategories = [
|
|
|
64
66
|
maxAmount: 10,
|
|
65
67
|
price: 1,
|
|
66
68
|
images: IMAGES,
|
|
69
|
+
modifiersSet: [],
|
|
67
70
|
},
|
|
68
71
|
{
|
|
69
72
|
id: 149,
|
|
@@ -75,6 +78,7 @@ const productCategories = [
|
|
|
75
78
|
maxAmount: 15,
|
|
76
79
|
uuid: 'beb6393c-2fdd-40f7-bb92-8800685b203a',
|
|
77
80
|
images: IMAGES,
|
|
81
|
+
modifiersSet: [],
|
|
78
82
|
},
|
|
79
83
|
{
|
|
80
84
|
id: 148,
|
|
@@ -85,6 +89,7 @@ const productCategories = [
|
|
|
85
89
|
minAmount: 1,
|
|
86
90
|
maxAmount: 15,
|
|
87
91
|
uuid: 'beb6393c-2fdd-40f7-bb92-8800685b203f',
|
|
92
|
+
modifiersSet: [],
|
|
88
93
|
},
|
|
89
94
|
],
|
|
90
95
|
},
|
|
@@ -187,12 +187,13 @@ const MOCK_IFRAMES = [
|
|
|
187
187
|
]
|
|
188
188
|
|
|
189
189
|
export function Default() {
|
|
190
|
-
|
|
191
|
-
const
|
|
192
|
-
const
|
|
193
|
-
const
|
|
194
|
-
const
|
|
195
|
-
const
|
|
190
|
+
// TODO: Replace with Storybook controls
|
|
191
|
+
const showCloseButton = true
|
|
192
|
+
const showBackButton = true
|
|
193
|
+
const showHeader = true
|
|
194
|
+
const showRightBlock = true
|
|
195
|
+
const showBottomBlock = true
|
|
196
|
+
const isAppUsingInIframe = false
|
|
196
197
|
|
|
197
198
|
const rightCardEvent = MOCK_IFRAMES[0]
|
|
198
199
|
|
|
@@ -247,7 +248,7 @@ export function Default() {
|
|
|
247
248
|
shortDate={String(event.startAt)}
|
|
248
249
|
colour={event.colour}
|
|
249
250
|
imageSrc={event.imgSrc}
|
|
250
|
-
goToDetails={() => {}}
|
|
251
|
+
goToDetails={() => { }}
|
|
251
252
|
description={event.description}
|
|
252
253
|
/>
|
|
253
254
|
</div>
|
|
@@ -276,7 +277,7 @@ export function Default() {
|
|
|
276
277
|
shortDate={String(rightCardEvent.startAt)}
|
|
277
278
|
colour={rightCardEvent.colour}
|
|
278
279
|
imageSrc={rightCardEvent.imgSrc}
|
|
279
|
-
goToDetails={() => {}}
|
|
280
|
+
goToDetails={() => { }}
|
|
280
281
|
description={rightCardEvent.description}
|
|
281
282
|
/>
|
|
282
283
|
</div>
|
|
@@ -9,7 +9,8 @@ export default {
|
|
|
9
9
|
} as Meta
|
|
10
10
|
|
|
11
11
|
export function Default(args) {
|
|
12
|
-
|
|
12
|
+
// TODO: Replace with Storybook controls
|
|
13
|
+
const isPaymentProcessed = true
|
|
13
14
|
|
|
14
15
|
return (
|
|
15
16
|
<div style={{ width: '800px' }} className='m-5'>
|
|
@@ -8,7 +8,8 @@ export default {
|
|
|
8
8
|
} as Meta
|
|
9
9
|
|
|
10
10
|
export function Default() {
|
|
11
|
-
|
|
11
|
+
// TODO: Replace with Storybook controls
|
|
12
|
+
const success = true
|
|
12
13
|
return (
|
|
13
14
|
<div
|
|
14
15
|
className='snippet d-flex justify-content-center align-items-center h-100'
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// TODO: Replace knobs with controls
|
|
2
1
|
import Logo from './Logo'
|
|
3
2
|
import { ReactComponent as BookeditLogoSvg } from '../assets/logo/bookedit.svg'
|
|
4
3
|
import { ReactComponent as LicklistLogoSvg } from '../assets/logo/licklist.svg'
|
|
@@ -36,19 +35,23 @@ Bookedit.story = {
|
|
|
36
35
|
},
|
|
37
36
|
}
|
|
38
37
|
|
|
39
|
-
export const ColouredLogos = () =>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
38
|
+
export const ColouredLogos = () => {
|
|
39
|
+
const logoColor = 'red' // You can make this configurable with Storybook controls if needed
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<>
|
|
43
|
+
<p>
|
|
44
|
+
<Logo
|
|
45
|
+
logo={<LicklistLogoSvg color={logoColor} />}
|
|
46
|
+
logoSm={<LicklistLogoSmSvg color={logoColor} />}
|
|
47
|
+
/>
|
|
48
|
+
</p>
|
|
49
|
+
<p>
|
|
50
|
+
<Logo logo={<BookeditLogoSvg color={logoColor} />} />
|
|
51
|
+
</p>
|
|
52
|
+
</>
|
|
53
|
+
)
|
|
54
|
+
}
|
|
52
55
|
|
|
53
56
|
ColouredLogos.story = {
|
|
54
57
|
name: 'Coloured logos',
|
|
@@ -9,7 +9,8 @@ export default {
|
|
|
9
9
|
|
|
10
10
|
export const Default: Story<ConfirmModalProps> = (args) => {
|
|
11
11
|
const onConfirm = () => alert('confirmed')
|
|
12
|
-
|
|
12
|
+
// TODO: Replace with Storybook controls
|
|
13
|
+
const showButtons = true
|
|
13
14
|
|
|
14
15
|
return (
|
|
15
16
|
<ConfirmModal {...args} hideButtons={showButtons}>
|
|
@@ -17,6 +17,10 @@ export const Empty: Story<NotificationPlaceholdersProps> = (args) => (
|
|
|
17
17
|
<NotificationPlaceholders {...args} />
|
|
18
18
|
)
|
|
19
19
|
|
|
20
|
+
Empty.args = {
|
|
21
|
+
placeholders: [],
|
|
22
|
+
}
|
|
23
|
+
|
|
20
24
|
Default.args = {
|
|
21
25
|
placeholders: [
|
|
22
26
|
{ value: 'user.first_name', description: 'Customers first name' },
|
|
@@ -144,7 +144,7 @@ export function ProductCategoriesControl({
|
|
|
144
144
|
const productCategories: ProductCategory[] = useWatch({
|
|
145
145
|
control,
|
|
146
146
|
name: productCategoriesFieldName,
|
|
147
|
-
})
|
|
147
|
+
}) || []
|
|
148
148
|
|
|
149
149
|
const productCategoriesErrors = errors?.steps?.[stepIndex]?.productCategories
|
|
150
150
|
|
|
@@ -259,6 +259,12 @@ export function ProductCategoriesControl({
|
|
|
259
259
|
|
|
260
260
|
const categoryType = CATEGORIES_TYPE[productCategory.type]
|
|
261
261
|
|
|
262
|
+
// Fallback for unknown category types
|
|
263
|
+
const categoryConfig = categoryType || {
|
|
264
|
+
label: productCategory.type || 'category',
|
|
265
|
+
icon: <FaBars color='#0e8ce2' size={10} />,
|
|
266
|
+
}
|
|
267
|
+
|
|
262
268
|
return (
|
|
263
269
|
<Controller
|
|
264
270
|
key={`product-category-${productCategory._id}`}
|
|
@@ -305,8 +311,8 @@ export function ProductCategoriesControl({
|
|
|
305
311
|
isNewAdded={showCategoryModal}
|
|
306
312
|
itemButton={
|
|
307
313
|
<div className='btn-outline-primary item-icon sm border border-primary rounded-sm'>
|
|
308
|
-
{
|
|
309
|
-
<span className='ml-2'>{t(
|
|
314
|
+
{categoryConfig.icon}
|
|
315
|
+
<span className='ml-2'>{t(categoryConfig.label)}</span>
|
|
310
316
|
</div>
|
|
311
317
|
}
|
|
312
318
|
body={
|
|
@@ -330,10 +336,10 @@ export function ProductCategoriesControl({
|
|
|
330
336
|
saveValidField={saveValidField}
|
|
331
337
|
// preItem={<Popover className="d-none d-sm-block" />}
|
|
332
338
|
sortableItems={
|
|
333
|
-
productCategory.products
|
|
339
|
+
productCategory.products && Array.isArray(productCategory.products)
|
|
334
340
|
? productCategory.products
|
|
335
|
-
|
|
336
|
-
|
|
341
|
+
.filter((product) => product?.id)
|
|
342
|
+
.map(({ id }) => String(id))
|
|
337
343
|
: []
|
|
338
344
|
}
|
|
339
345
|
>
|
|
@@ -20,7 +20,8 @@ export default {
|
|
|
20
20
|
} as Meta
|
|
21
21
|
|
|
22
22
|
export const Default: Story<ProductSetFormProps> = (args) => {
|
|
23
|
-
|
|
23
|
+
// TODO: Replace with Storybook controls
|
|
24
|
+
const providerHasMap = true
|
|
24
25
|
|
|
25
26
|
return (
|
|
26
27
|
<ProductSetForm {...args} providerHasMap={providerHasMap} isCreateAction />
|
|
@@ -28,7 +29,8 @@ export const Default: Story<ProductSetFormProps> = (args) => {
|
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
export const Empty: Story<ProductSetFormProps> = (args) => {
|
|
31
|
-
|
|
32
|
+
// TODO: Replace with Storybook controls
|
|
33
|
+
const providerHasMap = true
|
|
32
34
|
|
|
33
35
|
return (
|
|
34
36
|
<ProductSetForm {...args} providerHasMap={providerHasMap} isCreateAction />
|
|
@@ -36,13 +38,15 @@ export const Empty: Story<ProductSetFormProps> = (args) => {
|
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
export const Valid: Story<ProductSetFormProps> = (args) => {
|
|
39
|
-
|
|
41
|
+
// TODO: Replace with Storybook controls
|
|
42
|
+
const providerHasMap = true
|
|
40
43
|
|
|
41
44
|
return <ProductSetForm {...args} providerHasMap={providerHasMap} />
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
export const ServerErrors: Story<ProductSetFormProps> = (args) => {
|
|
45
|
-
|
|
48
|
+
// TODO: Replace with Storybook controls
|
|
49
|
+
const providerHasMap = true
|
|
46
50
|
|
|
47
51
|
return <ProductSetForm {...args} providerHasMap={providerHasMap} />
|
|
48
52
|
}
|
|
@@ -119,6 +123,7 @@ Default.args = {
|
|
|
119
123
|
minSubItems: 1,
|
|
120
124
|
maxSubItems: 10,
|
|
121
125
|
quantityType: 'constant',
|
|
126
|
+
type: 'menuItems',
|
|
122
127
|
isTimeRelated: false,
|
|
123
128
|
hasTicket: false,
|
|
124
129
|
allowDeposits: false,
|
|
@@ -187,10 +192,12 @@ Default.args = {
|
|
|
187
192
|
minSubItems: 0,
|
|
188
193
|
maxSubItems: 0,
|
|
189
194
|
quantityType: 'recharging',
|
|
195
|
+
type: 'menuItems',
|
|
190
196
|
isTimeRelated: false,
|
|
191
197
|
hasTicket: false,
|
|
192
198
|
allowDeposits: false,
|
|
193
199
|
hasBookingManagement: false,
|
|
200
|
+
products: [],
|
|
194
201
|
sort: 1,
|
|
195
202
|
},
|
|
196
203
|
],
|
|
@@ -258,6 +265,7 @@ Default.args = {
|
|
|
258
265
|
minSubItems: 0,
|
|
259
266
|
maxSubItems: 0,
|
|
260
267
|
quantityType: 'recharging',
|
|
268
|
+
type: 'menuItems',
|
|
261
269
|
isTimeRelated: false,
|
|
262
270
|
hasTicket: false,
|
|
263
271
|
allowDeposits: false,
|
|
@@ -343,6 +351,7 @@ Default.args = {
|
|
|
343
351
|
minSubItems: 0,
|
|
344
352
|
maxSubItems: null,
|
|
345
353
|
quantityType: 'recharging',
|
|
354
|
+
type: 'menuItems',
|
|
346
355
|
isTimeRelated: false,
|
|
347
356
|
hasTicket: false,
|
|
348
357
|
allowDeposits: false,
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react-vite'
|
|
2
2
|
import { FormProvider, useForm } from 'react-hook-form'
|
|
3
|
+
import { useQueryClient } from 'react-query'
|
|
4
|
+
import { TimeZonePath } from '@licklist/plugins'
|
|
3
5
|
import { LocationInputValues } from '.'
|
|
4
6
|
import { LocationInput } from './LocationInput'
|
|
5
7
|
import { LocationInputDescription } from './LocationInputDescription'
|
|
@@ -14,19 +16,62 @@ const defaultValues: LocationInputValues = {
|
|
|
14
16
|
state: 'Essex',
|
|
15
17
|
country: 'GB',
|
|
16
18
|
},
|
|
19
|
+
timeZoneId: '',
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Mock timezone data for Storybook
|
|
23
|
+
const mockTimezones = [
|
|
24
|
+
{ id: 1, name: 'Europe/London' },
|
|
25
|
+
{ id: 2, name: 'America/New_York' },
|
|
26
|
+
{ id: 3, name: 'America/Los_Angeles' },
|
|
27
|
+
{ id: 4, name: 'Europe/Paris' },
|
|
28
|
+
{ id: 5, name: 'Asia/Tokyo' },
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
// Decorator to mock timezone query data
|
|
32
|
+
const withMockedTimezones = (Story) => {
|
|
33
|
+
const QueryClientWrapper = () => {
|
|
34
|
+
const queryClient = useQueryClient()
|
|
35
|
+
const path = '/api/timezones' as TimeZonePath
|
|
36
|
+
|
|
37
|
+
// Set query data synchronously before first render
|
|
38
|
+
// Try all possible query key formats
|
|
39
|
+
const queryKeys = [
|
|
40
|
+
[path, 'all'],
|
|
41
|
+
['timezones', path, 'all'],
|
|
42
|
+
['timeZone', path],
|
|
43
|
+
[path],
|
|
44
|
+
['useTimeZoneApi', path, 'all'],
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
queryKeys.forEach((key) => {
|
|
48
|
+
queryClient.setQueryData(key, mockTimezones)
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
// Also set query defaults to return mock data if query key doesn't match
|
|
52
|
+
queryClient.setQueryDefaults([path], {
|
|
53
|
+
queryFn: () => Promise.resolve(mockTimezones),
|
|
54
|
+
initialData: mockTimezones,
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
return <Story />
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return <QueryClientWrapper />
|
|
17
61
|
}
|
|
18
62
|
|
|
19
63
|
export default {
|
|
20
64
|
title: 'Provider/LocationInput',
|
|
21
65
|
component: LocationInput,
|
|
22
66
|
subcomponents: { LocationInputDescription },
|
|
67
|
+
decorators: [withMockedTimezones],
|
|
23
68
|
} as Meta
|
|
24
69
|
|
|
25
70
|
export const Default: Story = (args) => {
|
|
26
71
|
const form = useForm<LocationInputValues>({ defaultValues })
|
|
27
72
|
return (
|
|
28
73
|
<FormProvider {...form}>
|
|
29
|
-
<LocationInput {...args} />
|
|
74
|
+
<LocationInput path={'/api/timezones' as TimeZonePath} {...args} />
|
|
30
75
|
</FormProvider>
|
|
31
76
|
)
|
|
32
77
|
}
|
|
@@ -35,7 +80,7 @@ export const Description: Story = (args) => {
|
|
|
35
80
|
const form = useForm<LocationInputValues>({ defaultValues })
|
|
36
81
|
return (
|
|
37
82
|
<FormProvider {...form}>
|
|
38
|
-
<LocationInputDescription {...args} />
|
|
83
|
+
<LocationInputDescription path={'/api/timezones' as TimeZonePath} {...args} />
|
|
39
84
|
</FormProvider>
|
|
40
85
|
)
|
|
41
86
|
}
|
|
@@ -12,7 +12,16 @@ export default {
|
|
|
12
12
|
} as Meta
|
|
13
13
|
|
|
14
14
|
export const Default: Story<ProviderDetailsInputProps> = (args) => {
|
|
15
|
-
const form = useForm<ProviderDetailsInputValues>(
|
|
15
|
+
const form = useForm<ProviderDetailsInputValues>({
|
|
16
|
+
defaultValues: {
|
|
17
|
+
name: '',
|
|
18
|
+
description: '',
|
|
19
|
+
email: '',
|
|
20
|
+
phone: '',
|
|
21
|
+
website: '',
|
|
22
|
+
images: [],
|
|
23
|
+
},
|
|
24
|
+
})
|
|
16
25
|
return (
|
|
17
26
|
<FormProvider {...form}>
|
|
18
27
|
<ProviderDetailsInput {...args} />
|
|
@@ -46,7 +46,7 @@ export function ProviderDetailsInput({
|
|
|
46
46
|
const websiteId = useId()
|
|
47
47
|
const companyId = useId()
|
|
48
48
|
|
|
49
|
-
const description = watch('description')
|
|
49
|
+
const description = watch('description') || ''
|
|
50
50
|
|
|
51
51
|
useEffect(() => {
|
|
52
52
|
if (MAX_DESCRIPTION_CHARACTERS_LENGTH > description.length) return
|
|
@@ -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 {
|
|
3
5
|
ProviderForm,
|
|
4
6
|
ProviderFormProps,
|
|
@@ -31,9 +33,51 @@ const defaultValues: ProviderFormValues = {
|
|
|
31
33
|
state: 'Essex',
|
|
32
34
|
country: 'GB',
|
|
33
35
|
},
|
|
36
|
+
timeZoneId: '',
|
|
34
37
|
images: [],
|
|
35
38
|
}
|
|
36
39
|
|
|
40
|
+
// Mock timezone data for Storybook
|
|
41
|
+
const mockTimezones = [
|
|
42
|
+
{ id: 1, name: 'Europe/London' },
|
|
43
|
+
{ id: 2, name: 'America/New_York' },
|
|
44
|
+
{ id: 3, name: 'America/Los_Angeles' },
|
|
45
|
+
{ id: 4, name: 'Europe/Paris' },
|
|
46
|
+
{ id: 5, name: 'Asia/Tokyo' },
|
|
47
|
+
]
|
|
48
|
+
|
|
49
|
+
// Decorator to mock timezone query data
|
|
50
|
+
const withMockedTimezones = (Story) => {
|
|
51
|
+
const QueryClientWrapper = () => {
|
|
52
|
+
const queryClient = useQueryClient()
|
|
53
|
+
const path = '/api/timezones' as TimeZonePath
|
|
54
|
+
|
|
55
|
+
// Set query data synchronously before first render
|
|
56
|
+
// Try all possible query key formats
|
|
57
|
+
const queryKeys = [
|
|
58
|
+
[path, 'all'],
|
|
59
|
+
['timezones', path, 'all'],
|
|
60
|
+
['timeZone', path],
|
|
61
|
+
[path],
|
|
62
|
+
['useTimeZoneApi', path, 'all'],
|
|
63
|
+
]
|
|
64
|
+
|
|
65
|
+
queryKeys.forEach((key) => {
|
|
66
|
+
queryClient.setQueryData(key, mockTimezones)
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
// Also set query defaults to return mock data if query key doesn't match
|
|
70
|
+
queryClient.setQueryDefaults([path], {
|
|
71
|
+
queryFn: () => Promise.resolve(mockTimezones),
|
|
72
|
+
initialData: mockTimezones,
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
return <Story />
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return <QueryClientWrapper />
|
|
79
|
+
}
|
|
80
|
+
|
|
37
81
|
const linkTypes = ['Facebook', 'Twitter', 'Other'].map((name, id) => ({
|
|
38
82
|
name,
|
|
39
83
|
id: `${id}`,
|
|
@@ -42,6 +86,7 @@ const linkTypes = ['Facebook', 'Twitter', 'Other'].map((name, id) => ({
|
|
|
42
86
|
export default {
|
|
43
87
|
title: 'Provider/ProviderForm',
|
|
44
88
|
component: ProviderForm,
|
|
89
|
+
decorators: [withMockedTimezones],
|
|
45
90
|
} as Meta
|
|
46
91
|
|
|
47
92
|
export const Default: Story<ProviderFormProps> = (args) => (
|
|
@@ -59,4 +104,5 @@ Default.args = {
|
|
|
59
104
|
{ id: 3, value: 'user3', label: 'User3' },
|
|
60
105
|
],
|
|
61
106
|
hasPermission: true,
|
|
107
|
+
path: '/api/timezones' as TimeZonePath,
|
|
62
108
|
}
|