@licklist/design 0.44.485-dev.64 → 0.44.485-dev.66

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.
Files changed (168) hide show
  1. package/dist/events/edit-event-modal/IntervalInput.d.ts.map +1 -1
  2. package/dist/events/edit-event-modal/IntervalInput.js +1 -1
  3. package/dist/help/popover/HelpPopover.d.ts +4 -2
  4. package/dist/help/popover/HelpPopover.d.ts.map +1 -1
  5. package/dist/help/popover/HelpPopover.js +1 -1
  6. package/dist/iframe/event/event-card/IframeEventCard.d.ts +3 -3
  7. package/dist/iframe/event/event-card/IframeEventCard.d.ts.map +1 -1
  8. package/dist/iframe/event/event-card/IframeEventCard.js +1 -1
  9. package/dist/iframe/event/event-card/IframeEventCardSkeleton.d.ts +3 -3
  10. package/dist/iframe/event/event-card/IframeEventCardSkeleton.d.ts.map +1 -1
  11. package/dist/iframe/event/event-card/IframeEventCardSkeleton.js +1 -1
  12. package/dist/image-radio-input/ImageRadioInput.d.ts +15 -0
  13. package/dist/image-radio-input/ImageRadioInput.d.ts.map +1 -0
  14. package/dist/image-radio-input/ImageRadioInput.js +1 -0
  15. package/dist/image-radio-input/index.d.ts.map +1 -0
  16. package/dist/index.d.ts +3 -0
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +1 -1
  19. package/dist/product-set/product/quantity/ProductQuantityRechargingControl.d.ts.map +1 -1
  20. package/dist/product-set/product/quantity/ProductQuantityRechargingControl.js +1 -1
  21. package/dist/radio-card/RadioCard.d.ts +13 -0
  22. package/dist/radio-card/RadioCard.d.ts.map +1 -0
  23. package/dist/radio-card/RadioCard.js +1 -0
  24. package/dist/radio-card/index.d.ts +2 -0
  25. package/dist/radio-card/index.d.ts.map +1 -0
  26. package/dist/setting/dashboard/index.d.ts +0 -2
  27. package/dist/setting/dashboard/index.d.ts.map +1 -1
  28. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  29. package/dist/snippet/snippet-template/preview/Preview.js +1 -1
  30. package/dist/sorting-select/SortingSelect.d.ts +10 -0
  31. package/dist/sorting-select/SortingSelect.d.ts.map +1 -0
  32. package/dist/sorting-select/SortingSelect.js +1 -0
  33. package/dist/sorting-select/index.d.ts +2 -0
  34. package/dist/sorting-select/index.d.ts.map +1 -0
  35. package/{src/styles/widgets/ImageRadioInput.scss → dist/styles/image-radio-input/_index.scss} +12 -0
  36. package/dist/styles/packages.scss +2 -1
  37. package/{src/styles/widgets/WidgetTypeRadioButton.scss → dist/styles/radio-card/_index.scss} +8 -1
  38. package/package.json +2 -2
  39. package/src/events/edit-event-modal/IntervalInput.tsx +7 -3
  40. package/src/help/popover/HelpPopover.tsx +13 -5
  41. package/src/iframe/event/event-card/IframeEventCard.stories.tsx +6 -14
  42. package/src/iframe/event/event-card/IframeEventCard.tsx +6 -10
  43. package/src/iframe/event/event-card/IframeEventCardSkeleton.tsx +20 -30
  44. package/src/iframe/event/event-card/IframeEventCards.stories.tsx +2 -3
  45. package/src/image-radio-input/ImageRadioInput.stories.tsx +67 -0
  46. package/src/image-radio-input/ImageRadioInput.tsx +53 -0
  47. package/src/index.ts +3 -0
  48. package/src/product-set/product/quantity/ProductQuantityRechargingControl.tsx +24 -27
  49. package/src/radio-card/RadioCard.stories.tsx +48 -0
  50. package/src/radio-card/RadioCard.tsx +49 -0
  51. package/src/radio-card/index.ts +1 -0
  52. package/src/setting/dashboard/index.ts +0 -2
  53. package/src/snippet/snippet-template/preview/Preview.tsx +0 -5
  54. package/src/sorting-select/SortingSelect.stories.tsx +15 -0
  55. package/src/sorting-select/SortingSelect.tsx +79 -0
  56. package/src/sorting-select/index.ts +1 -0
  57. package/{dist/styles/widgets/ImageRadioInput.scss → src/styles/image-radio-input/_index.scss} +12 -0
  58. package/src/styles/packages.scss +2 -1
  59. package/{dist/styles/widgets/WidgetTypeRadioButton.scss → src/styles/radio-card/_index.scss} +8 -1
  60. package/dist/assets/widgets/circlePlus.svg +0 -4
  61. package/dist/assets/widgets/inPage.svg +0 -10
  62. package/dist/assets/widgets/overlay.svg +0 -9
  63. package/dist/assets/widgets/sidebar.svg +0 -9
  64. package/dist/setting/dashboard/snippets/control/SnippetControl.d.ts +0 -9
  65. package/dist/setting/dashboard/snippets/control/SnippetControl.d.ts.map +0 -1
  66. package/dist/setting/dashboard/snippets/control/SnippetControl.js +0 -1
  67. package/dist/setting/dashboard/snippets/control/index.d.ts +0 -2
  68. package/dist/setting/dashboard/snippets/control/index.d.ts.map +0 -1
  69. package/dist/setting/dashboard/snippets/form/SnippetForm.d.ts +0 -33
  70. package/dist/setting/dashboard/snippets/form/SnippetForm.d.ts.map +0 -1
  71. package/dist/setting/dashboard/snippets/form/SnippetForm.js +0 -1
  72. package/dist/setting/dashboard/snippets/form/context.d.ts +0 -11
  73. package/dist/setting/dashboard/snippets/form/context.d.ts.map +0 -1
  74. package/dist/setting/dashboard/snippets/form/context.js +0 -1
  75. package/dist/setting/dashboard/snippets/form/index.d.ts +0 -2
  76. package/dist/setting/dashboard/snippets/form/index.d.ts.map +0 -1
  77. package/dist/setting/dashboard/snippets/modal/SnippetViewTypeModal.d.ts +0 -19
  78. package/dist/setting/dashboard/snippets/modal/SnippetViewTypeModal.d.ts.map +0 -1
  79. package/dist/setting/dashboard/snippets/modal/SnippetViewTypeModal.js +0 -1
  80. package/dist/setting/dashboard/snippets/modal/index.d.ts +0 -3
  81. package/dist/setting/dashboard/snippets/modal/index.d.ts.map +0 -1
  82. package/dist/styles/widgets/BookingStyleSelector.scss +0 -14
  83. package/dist/styles/widgets/CalendarStyleSelector.scss +0 -17
  84. package/dist/styles/widgets/CheckboxGroup.scss +0 -15
  85. package/dist/styles/widgets/ProductSetSelector.scss +0 -19
  86. package/dist/styles/widgets/SnippetCode.scss +0 -18
  87. package/dist/styles/widgets/WidgetBuilderForm.scss +0 -51
  88. package/dist/styles/widgets/WidgetTypeSelector.scss +0 -6
  89. package/dist/styles/widgets/_index.scss +0 -9
  90. package/dist/widgets/BookingStyleSelector/BookingStyleSelector.d.ts +0 -3
  91. package/dist/widgets/BookingStyleSelector/BookingStyleSelector.d.ts.map +0 -1
  92. package/dist/widgets/BookingStyleSelector/index.d.ts +0 -2
  93. package/dist/widgets/BookingStyleSelector/index.d.ts.map +0 -1
  94. package/dist/widgets/CalendarStyleSelector/CalendarStyleSelector.d.ts +0 -3
  95. package/dist/widgets/CalendarStyleSelector/CalendarStyleSelector.d.ts.map +0 -1
  96. package/dist/widgets/CalendarStyleSelector/index.d.ts +0 -2
  97. package/dist/widgets/CalendarStyleSelector/index.d.ts.map +0 -1
  98. package/dist/widgets/CheckboxGroup/CheckboxGroup.d.ts +0 -8
  99. package/dist/widgets/CheckboxGroup/CheckboxGroup.d.ts.map +0 -1
  100. package/dist/widgets/CheckboxGroup/index.d.ts +0 -2
  101. package/dist/widgets/CheckboxGroup/index.d.ts.map +0 -1
  102. package/dist/widgets/ImageRadioInput/ImageRadioInput.d.ts +0 -9
  103. package/dist/widgets/ImageRadioInput/ImageRadioInput.d.ts.map +0 -1
  104. package/dist/widgets/ImageRadioInput/index.d.ts.map +0 -1
  105. package/dist/widgets/ProductSetSelector/ProductSetSelector.d.ts +0 -3
  106. package/dist/widgets/ProductSetSelector/ProductSetSelector.d.ts.map +0 -1
  107. package/dist/widgets/ProductSetSelector/index.d.ts +0 -2
  108. package/dist/widgets/ProductSetSelector/index.d.ts.map +0 -1
  109. package/dist/widgets/SnippetCode/SnippetCode.d.ts +0 -6
  110. package/dist/widgets/SnippetCode/SnippetCode.d.ts.map +0 -1
  111. package/dist/widgets/SnippetCode/index.d.ts +0 -2
  112. package/dist/widgets/SnippetCode/index.d.ts.map +0 -1
  113. package/dist/widgets/WidgetBuilderForm/WidgetBuilderForm.d.ts +0 -12
  114. package/dist/widgets/WidgetBuilderForm/WidgetBuilderForm.d.ts.map +0 -1
  115. package/dist/widgets/WidgetTypeRadio/WidgetTypeRadio.d.ts +0 -7
  116. package/dist/widgets/WidgetTypeRadio/WidgetTypeRadio.d.ts.map +0 -1
  117. package/dist/widgets/WidgetTypeRadio/index.d.ts +0 -2
  118. package/dist/widgets/WidgetTypeRadio/index.d.ts.map +0 -1
  119. package/dist/widgets/WidgetTypeSelector/WidgetTypeSelector.d.ts +0 -3
  120. package/dist/widgets/WidgetTypeSelector/WidgetTypeSelector.d.ts.map +0 -1
  121. package/src/assets/widgets/circlePlus.svg +0 -4
  122. package/src/assets/widgets/inPage.svg +0 -10
  123. package/src/assets/widgets/overlay.svg +0 -9
  124. package/src/assets/widgets/sidebar.svg +0 -9
  125. package/src/setting/dashboard/snippets/control/SnippetControl.tsx +0 -235
  126. package/src/setting/dashboard/snippets/control/index.ts +0 -1
  127. package/src/setting/dashboard/snippets/form/SnippetForm.stories.tsx +0 -104
  128. package/src/setting/dashboard/snippets/form/SnippetForm.tsx +0 -94
  129. package/src/setting/dashboard/snippets/form/context.tsx +0 -18
  130. package/src/setting/dashboard/snippets/form/index.ts +0 -1
  131. package/src/setting/dashboard/snippets/modal/SnippetViewTypeModal.stories.tsx +0 -28
  132. package/src/setting/dashboard/snippets/modal/SnippetViewTypeModal.tsx +0 -104
  133. package/src/setting/dashboard/snippets/modal/index.ts +0 -2
  134. package/src/styles/widgets/BookingStyleSelector.scss +0 -14
  135. package/src/styles/widgets/CalendarStyleSelector.scss +0 -17
  136. package/src/styles/widgets/CheckboxGroup.scss +0 -15
  137. package/src/styles/widgets/ProductSetSelector.scss +0 -19
  138. package/src/styles/widgets/SnippetCode.scss +0 -18
  139. package/src/styles/widgets/WidgetBuilderForm.scss +0 -51
  140. package/src/styles/widgets/WidgetTypeSelector.scss +0 -6
  141. package/src/styles/widgets/_index.scss +0 -9
  142. package/src/widgets/BookingStyleSelector/BookingStyleSelector.stories.tsx +0 -12
  143. package/src/widgets/BookingStyleSelector/BookingStyleSelector.tsx +0 -34
  144. package/src/widgets/BookingStyleSelector/index.ts +0 -1
  145. package/src/widgets/CalendarStyleSelector/CalendarStyleSelector.stories.tsx +0 -12
  146. package/src/widgets/CalendarStyleSelector/CalendarStyleSelector.tsx +0 -29
  147. package/src/widgets/CalendarStyleSelector/index.ts +0 -1
  148. package/src/widgets/CheckboxGroup/CheckboxGroup.stories.tsx +0 -16
  149. package/src/widgets/CheckboxGroup/CheckboxGroup.tsx +0 -64
  150. package/src/widgets/CheckboxGroup/index.ts +0 -1
  151. package/src/widgets/ImageRadioInput/ImageRadioInput.stories.tsx +0 -18
  152. package/src/widgets/ImageRadioInput/ImageRadioInput.tsx +0 -29
  153. package/src/widgets/ProductSetSelector/ProductSetSelector.stories.tsx +0 -12
  154. package/src/widgets/ProductSetSelector/ProductSetSelector.tsx +0 -27
  155. package/src/widgets/ProductSetSelector/index.ts +0 -1
  156. package/src/widgets/SnippetCode/SnippetCode.stories.tsx +0 -17
  157. package/src/widgets/SnippetCode/SnippetCode.tsx +0 -27
  158. package/src/widgets/SnippetCode/index.ts +0 -1
  159. package/src/widgets/WidgetBuilderForm/WidgetBuilderForm.stories.tsx +0 -12
  160. package/src/widgets/WidgetBuilderForm/WidgetBuilderForm.tsx +0 -84
  161. package/src/widgets/WidgetTypeRadio/WidgetTypeRadio.stories.tsx +0 -17
  162. package/src/widgets/WidgetTypeRadio/WidgetTypeRadio.tsx +0 -43
  163. package/src/widgets/WidgetTypeRadio/index.ts +0 -1
  164. package/src/widgets/WidgetTypeSelector/WidgetTypeSelector.stories.tsx +0 -12
  165. package/src/widgets/WidgetTypeSelector/WidgetTypeSelector.tsx +0 -32
  166. package/tests/Snippets/Snippets.test.tsx +0 -77
  167. /package/dist/{widgets/ImageRadioInput → image-radio-input}/index.d.ts +0 -0
  168. /package/src/{widgets/ImageRadioInput → image-radio-input}/index.ts +0 -0
@@ -1,14 +0,0 @@
1
- .widget-booking-style-selector {
2
- margin-bottom: 2rem;
3
-
4
- h4 {
5
- margin-bottom: 1.5rem;
6
- }
7
-
8
- .wrapper {
9
- display: flex;
10
- justify-content: space-between;
11
- flex-wrap: wrap;
12
- gap: 1rem;
13
- }
14
- }
@@ -1,17 +0,0 @@
1
- .widget-calendar-style-selector {
2
- margin-bottom: 2rem;
3
-
4
- p {
5
- font-size: 0.8125rem;
6
- }
7
-
8
- .controls {
9
- display: flex;
10
- gap: 2rem;
11
- margin-top: 0.75rem;
12
-
13
- .form-check {
14
- padding-left: 0;
15
- }
16
- }
17
- }
@@ -1,15 +0,0 @@
1
- .widgets-checkbox-group {
2
- h3 {
3
- margin-bottom: 0.75rem;
4
- }
5
-
6
- .custom-checkbox {
7
- margin-top: 0;
8
- }
9
-
10
- .divider {
11
- height: 2px;
12
- margin-bottom: 1.5rem;
13
- background-color: #e7e7e7;
14
- }
15
- }
@@ -1,19 +0,0 @@
1
- .widget-builder-product-set-selector {
2
- button {
3
- display: flex;
4
- align-items: center;
5
- gap: 0.5rem;
6
- height: 1.5rem;
7
- padding: 0;
8
- background-color: transparent;
9
- border: none;
10
- color: #000;
11
-
12
- &:hover,
13
- &:focus,
14
- &:active {
15
- background-color: transparent !important;
16
- color: #0e8ce2 !important;
17
- }
18
- }
19
- }
@@ -1,18 +0,0 @@
1
- .widget-designer-snippet-code {
2
- .code-container {
3
- padding: 1rem;
4
- background: #fff;
5
- border: 2px solid #dcdcdc;
6
- border-radius: 0.5rem;
7
- word-break: break-all;
8
- }
9
-
10
- button {
11
- display: flex;
12
- align-items: center;
13
- gap: 1rem;
14
- border: 2px solid #0e8ce2;
15
- background: #fff;
16
- color: #0e8ce2;
17
- }
18
- }
@@ -1,51 +0,0 @@
1
- .widget-builder-form {
2
- justify-content: space-between;
3
-
4
- h2 {
5
- font-size: 1.5rem;
6
- }
7
-
8
- h3 {
9
- font-size: 1rem;
10
- font-weight: 600;
11
- }
12
-
13
- h4 {
14
- font-size: 0.875rem;
15
- font-weight: 400;
16
- }
17
-
18
- p {
19
- font-size: 0.8125rem;
20
- }
21
-
22
- input[type="text"],
23
- select {
24
- height: 2.5rem;
25
- border-radius: 0.5rem;
26
- }
27
-
28
- button {
29
- border-radius: 0.75rem;
30
- }
31
-
32
- .form-label {
33
- font-size: 0.875rem;
34
- }
35
-
36
- &-customizations {
37
- margin-bottom: 1rem;
38
- }
39
-
40
- &-right-column {
41
- padding: 0;
42
- }
43
-
44
- &-grey {
45
- height: fit-content;
46
- margin-bottom: 2rem;
47
- padding: 1.5rem;
48
- background-color: #fafafa;
49
- border-radius: 0.75rem;
50
- }
51
- }
@@ -1,6 +0,0 @@
1
- .widget-type-selector {
2
- display: flex;
3
- flex-direction: column;
4
- gap: 0.5rem;
5
- margin-bottom: 2rem;
6
- }
@@ -1,9 +0,0 @@
1
- @import "./WidgetTypeRadioButton";
2
- @import "./CalendarStyleSelector";
3
- @import "./CheckboxGroup";
4
- @import "./ImageRadioInput";
5
- @import "./BookingStyleSelector";
6
- @import "./WidgetTypeSelector";
7
- @import "./WidgetBuilderForm";
8
- @import "./SnippetCode";
9
- @import "./ProductSetSelector";
@@ -1,12 +0,0 @@
1
- import React from "react";
2
- import { Meta, Story } from "@storybook/react";
3
- import { BookingStyleSelector } from "./BookingStyleSelector";
4
-
5
- export default {
6
- title: "Widgets / Booking Style Selector",
7
- component: BookingStyleSelector,
8
- } as Meta;
9
-
10
- export const Default: Story = (args) => {
11
- return <BookingStyleSelector {...args} />;
12
- };
@@ -1,34 +0,0 @@
1
- import React from "react";
2
- import { useTranslation } from "react-i18next";
3
- import { ImageRadioInput } from "../ImageRadioInput";
4
- import { ReactComponent as Overlay } from "../../assets/widgets/overlay.svg";
5
- import { ReactComponent as InPage } from "../../assets/widgets/inPage.svg";
6
- import { ReactComponent as Sidebar } from "../../assets/widgets/sidebar.svg";
7
-
8
- export const BookingStyleSelector = () => {
9
- const { t } = useTranslation("Design");
10
-
11
- return (
12
- <div className="widget-booking-style-selector">
13
- <h4>{t("selectBookingStyle")}</h4>
14
-
15
- <div className="wrapper">
16
- <ImageRadioInput
17
- img={<Overlay />}
18
- label={t("overlay")}
19
- name="bookingWidgetStyle"
20
- />
21
- <ImageRadioInput
22
- img={<InPage />}
23
- label={t("inPage")}
24
- name="bookingWidgetStyle"
25
- />
26
- <ImageRadioInput
27
- img={<Sidebar />}
28
- label={t("sidebar")}
29
- name="bookingWidgetStyle"
30
- />
31
- </div>
32
- </div>
33
- );
34
- };
@@ -1 +0,0 @@
1
- export { BookingStyleSelector } from "./BookingStyleSelector";
@@ -1,12 +0,0 @@
1
- import React from "react";
2
- import { Meta, Story } from "@storybook/react";
3
- import { CalendarStyleSelector } from "./CalendarStyleSelector";
4
-
5
- export default {
6
- title: "Widgets / Calendar Style Selector",
7
- component: CalendarStyleSelector,
8
- } as Meta;
9
-
10
- export const Default: Story = (args) => {
11
- return <CalendarStyleSelector {...args} />;
12
- };
@@ -1,29 +0,0 @@
1
- import React from "react";
2
- import { useTranslation } from "react-i18next";
3
- import { ReactComponent as MonthIcon } from "../../assets/widgets/monthCalendar.svg";
4
- import { ReactComponent as WeekIcon } from "../../assets/widgets/weekCalendar.svg";
5
- import { ImageRadioInput } from "../ImageRadioInput/ImageRadioInput";
6
-
7
- export const CalendarStyleSelector = () => {
8
- const { t } = useTranslation("Design");
9
-
10
- return (
11
- <div className="widget-calendar-style-selector">
12
- <h4>{t("calendarStyle")}</h4>
13
- <p>{t("calendarStyleDescription")}</p>
14
-
15
- <div className="controls">
16
- <ImageRadioInput
17
- label={t("month")}
18
- img={<MonthIcon />}
19
- name="calendarStyle"
20
- />
21
- <ImageRadioInput
22
- label={t("week")}
23
- img={<WeekIcon />}
24
- name="calendarStyle"
25
- />
26
- </div>
27
- </div>
28
- );
29
- };
@@ -1 +0,0 @@
1
- export { CalendarStyleSelector } from "./CalendarStyleSelector";
@@ -1,16 +0,0 @@
1
- import React from "react";
2
- import { Meta, Story } from "@storybook/react";
3
- import { CheckboxGroup, CheckboxGroupProps } from "./CheckboxGroup";
4
-
5
- export default {
6
- title: "Widgets / Checkbox Group",
7
- component: CheckboxGroup,
8
- } as Meta;
9
-
10
- export const Default: Story<CheckboxGroupProps> = (args) => {
11
- return <CheckboxGroup {...args} />;
12
- };
13
-
14
- Default.args = {
15
- heading: "Include from price",
16
- };
@@ -1,64 +0,0 @@
1
- import { useId } from "@react-aria/utils";
2
- import React from "react";
3
- import { Form } from "react-bootstrap";
4
- import { useFormContext } from "react-hook-form";
5
- import { useTranslation } from "react-i18next";
6
- import { WidgetBuilderFormModel } from "../WidgetBuilderForm/WidgetBuilderForm";
7
-
8
- export type CheckboxGroupProps = {
9
- heading: string;
10
- name: keyof Partial<
11
- Pick<WidgetBuilderFormModel, "includeFromPrice" | "includeAvailability">
12
- >;
13
- };
14
-
15
- export const CheckboxGroup = ({ heading, name }: CheckboxGroupProps) => {
16
- const { t } = useTranslation();
17
-
18
- const { register } = useFormContext<WidgetBuilderFormModel>();
19
-
20
- const onTimeSlotsCheckboxIt = useId();
21
- const onCalendarCheckboxId = useId();
22
- const onProductSetsCheckboxId = useId();
23
-
24
- return (
25
- <div className="widgets-checkbox-group">
26
- <h3>{heading}</h3>
27
-
28
- <Form.Group className="custom-checkbox">
29
- <Form.Check custom type="checkbox" id={onTimeSlotsCheckboxIt}>
30
- <Form.Check.Input
31
- type="checkbox"
32
- value="onTimeSlots"
33
- {...register(name)}
34
- />
35
- <Form.Check.Label>{t("onTimeSLots")}</Form.Check.Label>
36
- </Form.Check>
37
- </Form.Group>
38
-
39
- <Form.Group className="custom-checkbox">
40
- <Form.Check custom type="checkbox" id={onCalendarCheckboxId}>
41
- <Form.Check.Input
42
- type="checkbox"
43
- value="onCalendar"
44
- {...register(name)}
45
- />
46
- <Form.Check.Label>{t("onCalendar")}</Form.Check.Label>
47
- </Form.Check>
48
- </Form.Group>
49
-
50
- <Form.Group className="custom-checkbox">
51
- <Form.Check custom type="checkbox" id={onProductSetsCheckboxId}>
52
- <Form.Check.Input
53
- type="checkbox"
54
- value="onProductSets"
55
- {...register(name)}
56
- />
57
- <Form.Check.Label>{t("onProductSets")}</Form.Check.Label>
58
- </Form.Check>
59
- </Form.Group>
60
-
61
- <div className="divider" />
62
- </div>
63
- );
64
- };
@@ -1 +0,0 @@
1
- export { CheckboxGroup } from "./CheckboxGroup";
@@ -1,18 +0,0 @@
1
- import React from "react";
2
- import { Meta, Story } from "@storybook/react";
3
- import { ImageRadioInput, ImageRadioInputProps } from "./ImageRadioInput";
4
- import { ReactComponent as MonthIcon } from "../../assets/widgets/monthCalendar.svg";
5
-
6
- export default {
7
- title: "Widgets / Image Radio Input",
8
- component: ImageRadioInput,
9
- } as Meta;
10
-
11
- export const Default: Story<ImageRadioInputProps> = (args) => {
12
- return <ImageRadioInput {...args} />;
13
- };
14
-
15
- Default.args = {
16
- img: <MonthIcon />,
17
- label: "Month",
18
- };
@@ -1,29 +0,0 @@
1
- import React, { ReactNode } from "react";
2
- import { Form } from "react-bootstrap";
3
- import { useFormContext } from "react-hook-form";
4
- import { WidgetBuilderFormModel } from "../WidgetBuilderForm/WidgetBuilderForm";
5
-
6
- export type ImageRadioInputProps = {
7
- img: ReactNode;
8
- label: string;
9
- name: keyof Partial<
10
- Pick<WidgetBuilderFormModel, "calendarStyle" | "bookingWidgetStyle">
11
- >;
12
- };
13
-
14
- export const ImageRadioInput = ({ img, label, name }: ImageRadioInputProps) => {
15
- const { register } = useFormContext<WidgetBuilderFormModel>();
16
-
17
- return (
18
- <Form.Check className="image-radio-input">
19
- <Form.Check.Label className="image-radio-input-wrapper">
20
- {img}
21
-
22
- <div className="image-radio-input-label">
23
- <Form.Check.Input type="radio" value={label} {...register(name)} />
24
- <span>{label}</span>
25
- </div>
26
- </Form.Check.Label>
27
- </Form.Check>
28
- );
29
- };
@@ -1,12 +0,0 @@
1
- import React from "react";
2
- import { Meta, Story } from "@storybook/react";
3
- import { ProductSetSelector } from "./ProductSetSelector";
4
-
5
- export default {
6
- title: "Widgets / Product Set Selector",
7
- component: ProductSetSelector,
8
- } as Meta;
9
-
10
- export const Default: Story = (args) => {
11
- return <ProductSetSelector {...args} />;
12
- };
@@ -1,27 +0,0 @@
1
- import React from "react";
2
- import { Button, Form } from "react-bootstrap";
3
- import { useTranslation } from "react-i18next";
4
- import { ReactComponent as Icon } from "../../assets/widgets/circlePlus.svg";
5
-
6
- export const ProductSetSelector = () => {
7
- const { t } = useTranslation("Design");
8
-
9
- return (
10
- <div className="widget-builder-product-set-selector">
11
- <h4>{t("productSet")}</h4>
12
- <p>{t("widgetBuilderProductSetDescription")}</p>
13
-
14
- <Form.Group>
15
- <Form.Control as="select">
16
- <option>{1}</option>
17
- <option>{2}</option>
18
- </Form.Control>
19
- </Form.Group>
20
-
21
- <Button className="">
22
- <Icon type="circle-plus" />
23
- {t("addProductSets")}
24
- </Button>
25
- </div>
26
- );
27
- };
@@ -1 +0,0 @@
1
- export { ProductSetSelector } from "./ProductSetSelector";
@@ -1,17 +0,0 @@
1
- /* eslint-disable max-len */
2
- import React from "react";
3
- import { Meta, Story } from "@storybook/react";
4
- import { SnippetCode, SnippetCodeProps } from "./SnippetCode";
5
-
6
- export default {
7
- title: "Widgets / Snippet Code",
8
- component: SnippetCode,
9
- } as Meta;
10
-
11
- export const Default: Story<SnippetCodeProps> = (args) => {
12
- return <SnippetCode {...args} />;
13
- };
14
-
15
- Default.args = {
16
- code: '<iframe width="1238" height="696" src="https://www.youtube.com/embed/Kddw5pV7RZ0" title="Short Booked it software overview." frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen />',
17
- };
@@ -1,27 +0,0 @@
1
- import React from "react";
2
- import { Button } from "react-bootstrap";
3
- import { useTranslation } from "react-i18next";
4
- import { ReactComponent as CopyIcon } from "../../assets/widgets/copy.svg";
5
-
6
- export type SnippetCodeProps = {
7
- code: string;
8
- };
9
-
10
- const copyCode = (code: string) => window.navigator.clipboard.writeText(code);
11
-
12
- export const SnippetCode = ({ code }: SnippetCodeProps) => {
13
- const { t } = useTranslation("Design");
14
-
15
- return (
16
- <div className="widget-designer-snippet-code">
17
- <h4>{t("codeSnippet")}</h4>
18
-
19
- <p className="code-container">{code}</p>
20
-
21
- <Button onClick={() => copyCode(code)}>
22
- {t("copyCode")}
23
- <CopyIcon />
24
- </Button>
25
- </div>
26
- );
27
- };
@@ -1 +0,0 @@
1
- export { SnippetCode } from "./SnippetCode";
@@ -1,12 +0,0 @@
1
- import React from "react";
2
- import { Meta, Story } from "@storybook/react";
3
- import { WidgetBuilderForm } from "./WidgetBuilderForm";
4
-
5
- export default {
6
- title: "Widgets / Widget Builder Form",
7
- component: WidgetBuilderForm,
8
- } as Meta;
9
-
10
- export const Default: Story = (args) => {
11
- return <WidgetBuilderForm {...args} />;
12
- };
@@ -1,84 +0,0 @@
1
- import React from "react";
2
- import { Button, Col, Form, Row } from "react-bootstrap";
3
- import { useTranslation } from "react-i18next";
4
- import { useForm, FormProvider } from "react-hook-form";
5
- import { WidgetTypeSelector } from "../WidgetTypeSelector/WidgetTypeSelector";
6
- import { CheckboxGroup } from "../CheckboxGroup";
7
- import { CalendarStyleSelector } from "../CalendarStyleSelector";
8
- import { BookingStyleSelector } from "../BookingStyleSelector";
9
- import { ProductSetSelector } from "../ProductSetSelector";
10
- import { SnippetCode } from "../SnippetCode";
11
-
12
- export type WidgetBuilderFormModel = {
13
- name: string;
14
- widgetType: string;
15
- calendarStyle: string;
16
- includeFromPrice: string[];
17
- includeAvailability: string[];
18
- productSets: string[];
19
- bookingWidgetStyle: string;
20
- };
21
-
22
- export const WidgetBuilderForm = () => {
23
- const { t } = useTranslation("Design");
24
-
25
- const form = useForm<WidgetBuilderFormModel>({ mode: "onChange" });
26
-
27
- const onSubmit = () => null;
28
-
29
- return (
30
- <FormProvider {...form}>
31
- <Row
32
- as="form"
33
- className="widget-builder-form"
34
- onSubmit={form.handleSubmit(onSubmit)}
35
- >
36
- <Col lg={6} md={6}>
37
- <h2>{t("eventPageOverlay")}</h2>
38
-
39
- <Form.Group>
40
- <Form.Label>{t("name")}</Form.Label>
41
- <Form.Control type="text" {...form.register("name")} />
42
- </Form.Group>
43
-
44
- <WidgetTypeSelector />
45
-
46
- <h3 className="widget-builder-form-customizations">
47
- {t("customizations")}
48
- </h3>
49
-
50
- <CalendarStyleSelector />
51
-
52
- <CheckboxGroup
53
- heading={t("includeFromPrice")}
54
- name="includeFromPrice"
55
- />
56
- <CheckboxGroup
57
- heading={t("includeAvailability")}
58
- name="includeAvailability"
59
- />
60
-
61
- <ProductSetSelector />
62
- </Col>
63
-
64
- <Col lg={5} md={5} className="widget-builder-right-column">
65
- <div className="widget-builder-form-grey">
66
- <BookingStyleSelector />
67
-
68
- <div>
69
- <h4>{t("stylingTemplate")}</h4>
70
-
71
- <Form.Group>
72
- <Form.Control as="select" />
73
- </Form.Group>
74
- </div>
75
-
76
- <SnippetCode code="" />
77
- </div>
78
-
79
- <Button type="submit">{t("saveAndClose")}</Button>
80
- </Col>
81
- </Row>
82
- </FormProvider>
83
- );
84
- };
@@ -1,17 +0,0 @@
1
- import React from "react";
2
- import { Meta, Story } from "@storybook/react";
3
- import { WidgetTypeRadio, WidgetTypeRadioProps } from "./WidgetTypeRadio";
4
-
5
- export default {
6
- title: "Widgets / Type Radio Selector",
7
- component: WidgetTypeRadio,
8
- } as Meta;
9
-
10
- export const Default: Story<WidgetTypeRadioProps> = (args) => {
11
- return <WidgetTypeRadio {...args} />;
12
- };
13
-
14
- Default.args = {
15
- label: "Venue Map",
16
- description: ["Date", "Floor", "Table", "Product Sets", "Checkout"],
17
- };
@@ -1,43 +0,0 @@
1
- import React from "react";
2
- import { Form } from "react-bootstrap";
3
- import { useFormContext } from "react-hook-form";
4
- import { WidgetBuilderFormModel } from "../WidgetBuilderForm/WidgetBuilderForm";
5
-
6
- export type WidgetTypeRadioProps = {
7
- label: string;
8
- description: string[];
9
- };
10
-
11
- const prepareDescription = (description: string[]) =>
12
- description.map((item, index) => {
13
- if (index === 0) return item;
14
- return `> ${item}`;
15
- });
16
-
17
- export const WidgetTypeRadio = ({
18
- label,
19
- description,
20
- }: WidgetTypeRadioProps) => {
21
- const { register } = useFormContext<WidgetBuilderFormModel>();
22
-
23
- return (
24
- <Form.Check className="widget-type-radio">
25
- <Form.Check.Label>
26
- <div className="widget-type-radio-controls">
27
- <Form.Check.Input
28
- type="radio"
29
- value={label}
30
- {...register("widgetType")}
31
- />
32
- <span>{label}</span>
33
- </div>
34
-
35
- <p className="widget-type-radio-description">
36
- {prepareDescription(description).map((item) => (
37
- <span key={item}> {item}</span>
38
- ))}
39
- </p>
40
- </Form.Check.Label>
41
- </Form.Check>
42
- );
43
- };
@@ -1 +0,0 @@
1
- export { WidgetTypeRadio } from "./WidgetTypeRadio";
@@ -1,12 +0,0 @@
1
- import React from "react";
2
- import { Meta, Story } from "@storybook/react";
3
- import { WidgetTypeSelector } from "./WidgetTypeSelector";
4
-
5
- export default {
6
- title: "Widgets / Widget Type Selector",
7
- component: WidgetTypeSelector,
8
- } as Meta;
9
-
10
- export const Default: Story = (args) => {
11
- return <WidgetTypeSelector {...args} />;
12
- };