@conversokit/widgets 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/LICENSE +201 -0
  2. package/dist/AddToCartPanel.d.ts +11 -0
  3. package/dist/AddToCartPanel.d.ts.map +1 -0
  4. package/dist/AddToCartPanel.js +62 -0
  5. package/dist/AlertFeed.d.ts +9 -0
  6. package/dist/AlertFeed.d.ts.map +1 -0
  7. package/dist/AlertFeed.js +67 -0
  8. package/dist/AnalyticsPanel.d.ts +8 -0
  9. package/dist/AnalyticsPanel.d.ts.map +1 -0
  10. package/dist/AnalyticsPanel.js +24 -0
  11. package/dist/AvailabilityCalendar.d.ts +25 -0
  12. package/dist/AvailabilityCalendar.d.ts.map +1 -0
  13. package/dist/AvailabilityCalendar.js +104 -0
  14. package/dist/BookingCard.d.ts +9 -0
  15. package/dist/BookingCard.d.ts.map +1 -0
  16. package/dist/BookingCard.js +62 -0
  17. package/dist/CTABanner.d.ts +35 -0
  18. package/dist/CTABanner.d.ts.map +1 -0
  19. package/dist/CTABanner.js +72 -0
  20. package/dist/CheckoutSummary.d.ts +11 -0
  21. package/dist/CheckoutSummary.d.ts.map +1 -0
  22. package/dist/CheckoutSummary.js +70 -0
  23. package/dist/ConsentBanner.d.ts +30 -0
  24. package/dist/ConsentBanner.d.ts.map +1 -0
  25. package/dist/ConsentBanner.js +82 -0
  26. package/dist/DestinationRecommendations.d.ts +57 -0
  27. package/dist/DestinationRecommendations.d.ts.map +1 -0
  28. package/dist/DestinationRecommendations.js +43 -0
  29. package/dist/FlightSummary.d.ts +10 -0
  30. package/dist/FlightSummary.d.ts.map +1 -0
  31. package/dist/FlightSummary.js +50 -0
  32. package/dist/HotelCard.d.ts +10 -0
  33. package/dist/HotelCard.d.ts.map +1 -0
  34. package/dist/HotelCard.js +52 -0
  35. package/dist/ItineraryTimeline.d.ts +8 -0
  36. package/dist/ItineraryTimeline.d.ts.map +1 -0
  37. package/dist/ItineraryTimeline.js +56 -0
  38. package/dist/KPIGrid.d.ts +46 -0
  39. package/dist/KPIGrid.d.ts.map +1 -0
  40. package/dist/KPIGrid.js +53 -0
  41. package/dist/LeadCaptureForm.d.ts +14 -0
  42. package/dist/LeadCaptureForm.d.ts.map +1 -0
  43. package/dist/LeadCaptureForm.js +84 -0
  44. package/dist/MultiStepForm.d.ts +11 -0
  45. package/dist/MultiStepForm.d.ts.map +1 -0
  46. package/dist/MultiStepForm.js +60 -0
  47. package/dist/ProductCard.d.ts +17 -0
  48. package/dist/ProductCard.d.ts.map +1 -0
  49. package/dist/ProductCard.js +70 -0
  50. package/dist/ProductCarousel.d.ts +58 -0
  51. package/dist/ProductCarousel.d.ts.map +1 -0
  52. package/dist/ProductCarousel.js +31 -0
  53. package/dist/TimeSlotSelector.d.ts +10 -0
  54. package/dist/TimeSlotSelector.d.ts.map +1 -0
  55. package/dist/TimeSlotSelector.js +46 -0
  56. package/dist/TrendChart.d.ts +10 -0
  57. package/dist/TrendChart.d.ts.map +1 -0
  58. package/dist/TrendChart.js +50 -0
  59. package/dist/index.d.ts +40 -0
  60. package/dist/index.d.ts.map +1 -0
  61. package/dist/index.js +20 -0
  62. package/dist/registry.d.ts +6 -0
  63. package/dist/registry.d.ts.map +1 -0
  64. package/dist/registry.js +50 -0
  65. package/package.json +52 -0
@@ -0,0 +1,53 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { z } from 'zod';
3
+ import { defaultWidgetConfig, kpiSchema } from '@conversokit/shared';
4
+ function trendIcon(trend) {
5
+ if (trend === 'up')
6
+ return '▲';
7
+ if (trend === 'down')
8
+ return '▼';
9
+ return '●';
10
+ }
11
+ function trendColor(trend) {
12
+ if (trend === 'up')
13
+ return 'var(--ck-success)';
14
+ if (trend === 'down')
15
+ return 'var(--ck-danger)';
16
+ return 'var(--ck-muted)';
17
+ }
18
+ export const KPIGrid = ({ kpis }) => {
19
+ return (_jsx("div", { "data-testid": "kpi-grid", style: {
20
+ display: 'grid',
21
+ gridTemplateColumns: 'repeat(auto-fill, minmax(180px, 1fr))',
22
+ gap: 'var(--ck-spacing-2)',
23
+ fontFamily: 'var(--ck-font-family)'
24
+ }, children: kpis.map((kpi) => (_jsxs("div", { style: {
25
+ border: '1px solid var(--ck-border)',
26
+ borderRadius: 'var(--ck-radius-md)',
27
+ backgroundColor: 'var(--ck-surface)',
28
+ color: 'var(--ck-text)',
29
+ padding: 'var(--ck-spacing-3)',
30
+ display: 'flex',
31
+ flexDirection: 'column',
32
+ gap: 4
33
+ }, children: [_jsx("span", { style: {
34
+ fontSize: 'var(--ck-font-size-sm)',
35
+ color: 'var(--ck-muted)',
36
+ textTransform: 'uppercase',
37
+ letterSpacing: 0.5
38
+ }, children: kpi.label }), _jsx("strong", { style: { fontSize: 'var(--ck-font-size-xl)' }, children: kpi.value }), (kpi.delta !== undefined || kpi.trend) && (_jsxs("span", { style: {
39
+ fontSize: 'var(--ck-font-size-sm)',
40
+ color: trendColor(kpi.trend),
41
+ display: 'inline-flex',
42
+ alignItems: 'center',
43
+ gap: 4
44
+ }, children: [_jsx("span", { "aria-hidden": true, children: trendIcon(kpi.trend) }), kpi.delta !== undefined ? `${kpi.delta > 0 ? '+' : ''}${kpi.delta.toFixed(1)}%` : ''] }))] }, kpi.id))) }));
45
+ };
46
+ export const kpiGridSchema = z.object({ kpis: z.array(kpiSchema) });
47
+ export const KPIGridMeta = {
48
+ name: 'KPIGrid',
49
+ category: 'dashboard',
50
+ version: '0.1.0',
51
+ config: { ...defaultWidgetConfig, permissions: {} },
52
+ schema: kpiGridSchema
53
+ };
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { type FormStep, type WidgetMeta } from '@conversokit/shared';
3
+ export type LeadFormValues = Record<string, string | number | boolean>;
4
+ export interface LeadCaptureFormProps {
5
+ step: FormStep;
6
+ defaultValues?: LeadFormValues;
7
+ submitLabel?: string;
8
+ onSubmit: (values: LeadFormValues) => void | Promise<void>;
9
+ cancelLabel?: string;
10
+ onCancel?: () => void;
11
+ }
12
+ export declare const LeadCaptureForm: React.FC<LeadCaptureFormProps>;
13
+ export declare const LeadCaptureFormMeta: WidgetMeta;
14
+ //# sourceMappingURL=LeadCaptureForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LeadCaptureForm.d.ts","sourceRoot":"","sources":["../src/LeadCaptureForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAGL,KAAK,QAAQ,EAEb,KAAK,UAAU,EAChB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;AAEvE,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,QAAQ,CAAC;IACf,aAAa,CAAC,EAAE,cAAc,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAoGD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAsD1D,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,UASjC,CAAC"}
@@ -0,0 +1,84 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useForm } from 'react-hook-form';
3
+ import { formStepSchema, defaultWidgetConfig } from '@conversokit/shared';
4
+ const containerStyle = {
5
+ border: '1px solid var(--ck-border)',
6
+ borderRadius: 'var(--ck-radius-md)',
7
+ padding: 'var(--ck-spacing-4)',
8
+ backgroundColor: 'var(--ck-surface)',
9
+ color: 'var(--ck-text)',
10
+ fontFamily: 'var(--ck-font-family)',
11
+ display: 'flex',
12
+ flexDirection: 'column',
13
+ gap: 'var(--ck-spacing-2)',
14
+ maxWidth: 480
15
+ };
16
+ const labelStyle = {
17
+ display: 'flex',
18
+ flexDirection: 'column',
19
+ gap: 'var(--ck-spacing-1)',
20
+ fontSize: 'var(--ck-font-size-sm)'
21
+ };
22
+ const inputStyle = {
23
+ padding: '8px 10px',
24
+ borderRadius: 'var(--ck-radius-sm)',
25
+ border: '1px solid var(--ck-border)',
26
+ backgroundColor: 'var(--ck-background)',
27
+ color: 'var(--ck-text)',
28
+ fontFamily: 'var(--ck-font-family)',
29
+ fontSize: 'var(--ck-font-size-base)'
30
+ };
31
+ const errorStyle = {
32
+ color: 'var(--ck-danger)',
33
+ fontSize: 'var(--ck-font-size-sm)'
34
+ };
35
+ const buttonRow = {
36
+ display: 'flex',
37
+ gap: 'var(--ck-spacing-2)',
38
+ marginTop: 'var(--ck-spacing-2)'
39
+ };
40
+ const primaryBtn = {
41
+ padding: '10px 14px',
42
+ borderRadius: 'var(--ck-radius-sm)',
43
+ border: 'none',
44
+ backgroundColor: 'var(--ck-primary)',
45
+ color: 'var(--ck-primary-foreground)',
46
+ cursor: 'pointer',
47
+ fontWeight: 'var(--ck-font-weight-bold)'
48
+ };
49
+ const secondaryBtn = {
50
+ padding: '10px 14px',
51
+ borderRadius: 'var(--ck-radius-sm)',
52
+ border: '1px solid var(--ck-border)',
53
+ backgroundColor: 'transparent',
54
+ color: 'var(--ck-text)',
55
+ cursor: 'pointer'
56
+ };
57
+ function renderField(field, register) {
58
+ const id = `field-${field.name}`;
59
+ const baseProps = register(field.name, { required: field.required });
60
+ if (field.type === 'textarea') {
61
+ return (_jsx("textarea", { id: id, rows: 4, placeholder: field.placeholder, style: inputStyle, ...baseProps }));
62
+ }
63
+ if (field.type === 'select') {
64
+ return (_jsxs("select", { id: id, style: inputStyle, ...baseProps, children: [_jsx("option", { value: "", children: "Select\u2026" }), field.options?.map((opt) => (_jsx("option", { value: opt, children: opt }, opt)))] }));
65
+ }
66
+ return (_jsx("input", { id: id, type: field.type, placeholder: field.placeholder, style: inputStyle, ...baseProps }));
67
+ }
68
+ export const LeadCaptureForm = ({ step, defaultValues, submitLabel = 'Continue', onSubmit, cancelLabel, onCancel }) => {
69
+ const { register, handleSubmit, formState: { errors, isSubmitting } } = useForm({ defaultValues });
70
+ const submit = async (values) => {
71
+ await onSubmit(values);
72
+ };
73
+ return (_jsxs("form", { style: containerStyle, onSubmit: handleSubmit(submit), "data-testid": "lead-capture-form", children: [_jsx("h3", { style: { margin: 0 }, children: step.title }), step.description && (_jsx("p", { style: { margin: 0, color: 'var(--ck-muted)' }, children: step.description })), step.fields.map((field) => (_jsxs("label", { htmlFor: `field-${field.name}`, style: labelStyle, children: [_jsxs("span", { children: [field.label, field.required && (_jsx("span", { style: { color: 'var(--ck-danger)' }, children: " *" }))] }), renderField(field, register), errors[field.name] && (_jsx("span", { style: errorStyle, children: "This field is required" }))] }, field.name))), _jsxs("div", { style: buttonRow, children: [onCancel && (_jsx("button", { type: "button", style: secondaryBtn, onClick: onCancel, children: cancelLabel ?? 'Back' })), _jsx("button", { type: "submit", style: primaryBtn, disabled: isSubmitting, children: submitLabel })] })] }));
74
+ };
75
+ export const LeadCaptureFormMeta = {
76
+ name: 'LeadCaptureForm',
77
+ category: 'leadgen',
78
+ version: '0.1.0',
79
+ config: {
80
+ ...defaultWidgetConfig,
81
+ permissions: { collectPersonalData: true, requiresConsent: true }
82
+ },
83
+ schema: formStepSchema
84
+ };
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { type LeadForm, type WidgetMeta } from '@conversokit/shared';
3
+ import { type LeadFormValues } from './LeadCaptureForm.js';
4
+ export interface MultiStepFormProps {
5
+ form: LeadForm;
6
+ initialValues?: LeadFormValues;
7
+ onComplete: (values: LeadFormValues) => void | Promise<void>;
8
+ }
9
+ export declare const MultiStepForm: React.FC<MultiStepFormProps>;
10
+ export declare const MultiStepFormMeta: WidgetMeta;
11
+ //# sourceMappingURL=MultiStepForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultiStepForm.d.ts","sourceRoot":"","sources":["../src/MultiStepForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,UAAU,EAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE5E,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,QAAQ,CAAC;IACf,aAAa,CAAC,EAAE,cAAc,CAAC;IAC/B,UAAU,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9D;AAiCD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA4CtD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,UAS/B,CAAC"}
@@ -0,0 +1,60 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { leadFormSchema, defaultWidgetConfig } from '@conversokit/shared';
4
+ import { LeadCaptureForm } from './LeadCaptureForm.js';
5
+ const containerStyle = {
6
+ display: 'flex',
7
+ flexDirection: 'column',
8
+ gap: 'var(--ck-spacing-2)',
9
+ fontFamily: 'var(--ck-font-family)',
10
+ color: 'var(--ck-text)',
11
+ maxWidth: 520
12
+ };
13
+ const stepperRow = {
14
+ display: 'flex',
15
+ gap: 'var(--ck-spacing-2)',
16
+ fontSize: 'var(--ck-font-size-sm)',
17
+ color: 'var(--ck-muted)'
18
+ };
19
+ function dotStyle(active, done) {
20
+ return {
21
+ width: 10,
22
+ height: 10,
23
+ borderRadius: '50%',
24
+ backgroundColor: done
25
+ ? 'var(--ck-success)'
26
+ : active
27
+ ? 'var(--ck-primary)'
28
+ : 'var(--ck-border)',
29
+ display: 'inline-block',
30
+ marginRight: 6
31
+ };
32
+ }
33
+ export const MultiStepForm = ({ form, initialValues, onComplete }) => {
34
+ const [stepIndex, setStepIndex] = useState(0);
35
+ const [values, setValues] = useState(initialValues ?? {});
36
+ const step = form.steps[stepIndex];
37
+ const isLast = stepIndex === form.steps.length - 1;
38
+ const handleSubmit = async (stepValues) => {
39
+ const merged = { ...values, ...stepValues };
40
+ setValues(merged);
41
+ if (isLast) {
42
+ await onComplete(merged);
43
+ }
44
+ else {
45
+ setStepIndex((i) => i + 1);
46
+ }
47
+ };
48
+ const handleBack = () => setStepIndex((i) => Math.max(0, i - 1));
49
+ return (_jsxs("div", { style: containerStyle, "data-testid": "multi-step-form", children: [_jsx("h3", { style: { margin: 0 }, children: form.title }), _jsx("div", { style: stepperRow, children: form.steps.map((s, i) => (_jsxs("span", { children: [_jsx("span", { style: dotStyle(i === stepIndex, i < stepIndex) }), s.title] }, s.id))) }), _jsx(LeadCaptureForm, { step: step, defaultValues: values, submitLabel: isLast ? 'Submit' : 'Next', cancelLabel: "Back", onSubmit: handleSubmit, onCancel: stepIndex > 0 ? handleBack : undefined }, step.id)] }));
50
+ };
51
+ export const MultiStepFormMeta = {
52
+ name: 'MultiStepForm',
53
+ category: 'leadgen',
54
+ version: '0.1.0',
55
+ config: {
56
+ ...defaultWidgetConfig,
57
+ permissions: { collectPersonalData: true, requiresConsent: true }
58
+ },
59
+ schema: leadFormSchema
60
+ };
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { type WidgetConfig, type WidgetMeta } from '@conversokit/shared';
3
+ export interface ProductCardProps {
4
+ id: string;
5
+ title: string;
6
+ subtitle?: string;
7
+ imageUrl?: string;
8
+ price?: string;
9
+ badge?: string;
10
+ rating?: number;
11
+ ctaLabel?: string;
12
+ onAction?: () => void;
13
+ config?: WidgetConfig;
14
+ }
15
+ export declare const ProductCard: React.FC<ProductCardProps>;
16
+ export declare const ProductCardMeta: WidgetMeta;
17
+ //# sourceMappingURL=ProductCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProductCard.d.ts","sourceRoot":"","sources":["../src/ProductCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,UAAU,EAChB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAiED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAyBlD,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,UAS7B,CAAC"}
@@ -0,0 +1,70 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { productSchema, defaultWidgetConfig } from '@conversokit/shared';
3
+ const cardStyle = {
4
+ border: '1px solid var(--ck-border)',
5
+ borderRadius: 'var(--ck-radius-md)',
6
+ padding: 'var(--ck-spacing-4)',
7
+ width: 220,
8
+ boxSizing: 'border-box',
9
+ backgroundColor: 'var(--ck-surface)',
10
+ color: 'var(--ck-text)',
11
+ fontFamily: 'var(--ck-font-family)'
12
+ };
13
+ const imgStyle = {
14
+ width: '100%',
15
+ borderRadius: 'var(--ck-radius-sm)',
16
+ marginBottom: 'var(--ck-spacing-2)',
17
+ display: 'block'
18
+ };
19
+ const titleStyle = {
20
+ margin: 0,
21
+ fontSize: 'var(--ck-font-size-base)',
22
+ fontWeight: 'var(--ck-font-weight-bold)'
23
+ };
24
+ const subtitleStyle = {
25
+ margin: 0,
26
+ fontSize: 'var(--ck-font-size-sm)',
27
+ color: 'var(--ck-muted)'
28
+ };
29
+ const badgeStyle = {
30
+ fontSize: 'var(--ck-font-size-sm)',
31
+ backgroundColor: 'var(--ck-background)',
32
+ border: '1px solid var(--ck-border)',
33
+ color: 'var(--ck-muted)',
34
+ borderRadius: 'var(--ck-radius-sm)',
35
+ padding: '2px 6px',
36
+ marginTop: 'var(--ck-spacing-1)',
37
+ display: 'inline-block'
38
+ };
39
+ const priceStyle = {
40
+ margin: 'var(--ck-spacing-2) 0 0 0',
41
+ fontWeight: 'var(--ck-font-weight-bold)'
42
+ };
43
+ const ratingStyle = {
44
+ margin: 'var(--ck-spacing-1) 0 0 0',
45
+ fontSize: 'var(--ck-font-size-sm)',
46
+ color: 'var(--ck-muted)'
47
+ };
48
+ const buttonStyle = {
49
+ marginTop: 'var(--ck-spacing-2)',
50
+ padding: '6px 12px',
51
+ borderRadius: 'var(--ck-radius-sm)',
52
+ border: 'none',
53
+ backgroundColor: 'var(--ck-primary)',
54
+ color: 'var(--ck-primary-foreground)',
55
+ cursor: 'pointer',
56
+ fontSize: 'var(--ck-font-size-sm)'
57
+ };
58
+ export const ProductCard = ({ title, subtitle, imageUrl, price, badge, rating, ctaLabel = 'View', onAction }) => {
59
+ return (_jsxs("div", { style: cardStyle, children: [imageUrl && _jsx("img", { src: imageUrl, alt: title, style: imgStyle }), _jsx("h3", { style: titleStyle, children: title }), subtitle && _jsx("p", { style: subtitleStyle, children: subtitle }), badge && _jsx("span", { style: badgeStyle, children: badge }), price && _jsx("p", { style: priceStyle, children: price }), rating !== undefined && _jsxs("p", { style: ratingStyle, children: ["\u2B50 ", rating.toFixed(1)] }), onAction && (_jsx("button", { onClick: onAction, style: buttonStyle, children: ctaLabel }))] }));
60
+ };
61
+ export const ProductCardMeta = {
62
+ name: 'ProductCard',
63
+ category: 'commerce',
64
+ version: '0.1.0',
65
+ config: {
66
+ ...defaultWidgetConfig,
67
+ permissions: { allowsExternalLinks: true }
68
+ },
69
+ schema: productSchema
70
+ };
@@ -0,0 +1,58 @@
1
+ import React from 'react';
2
+ import { z } from 'zod';
3
+ import { type WidgetMeta } from '@conversokit/shared';
4
+ import { type ProductCardProps } from './ProductCard.js';
5
+ export interface ProductCarouselProps {
6
+ items: ProductCardProps[];
7
+ onItemAction?: (item: ProductCardProps) => void;
8
+ }
9
+ export declare const ProductCarousel: React.FC<ProductCarouselProps>;
10
+ export declare const productCarouselSchema: z.ZodObject<{
11
+ items: z.ZodArray<z.ZodObject<{
12
+ id: z.ZodString;
13
+ title: z.ZodString;
14
+ subtitle: z.ZodOptional<z.ZodString>;
15
+ imageUrl: z.ZodOptional<z.ZodString>;
16
+ price: z.ZodOptional<z.ZodString>;
17
+ badge: z.ZodOptional<z.ZodString>;
18
+ rating: z.ZodOptional<z.ZodNumber>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ id: string;
21
+ title: string;
22
+ subtitle?: string | undefined;
23
+ imageUrl?: string | undefined;
24
+ price?: string | undefined;
25
+ badge?: string | undefined;
26
+ rating?: number | undefined;
27
+ }, {
28
+ id: string;
29
+ title: string;
30
+ subtitle?: string | undefined;
31
+ imageUrl?: string | undefined;
32
+ price?: string | undefined;
33
+ badge?: string | undefined;
34
+ rating?: number | undefined;
35
+ }>, "many">;
36
+ }, "strip", z.ZodTypeAny, {
37
+ items: {
38
+ id: string;
39
+ title: string;
40
+ subtitle?: string | undefined;
41
+ imageUrl?: string | undefined;
42
+ price?: string | undefined;
43
+ badge?: string | undefined;
44
+ rating?: number | undefined;
45
+ }[];
46
+ }, {
47
+ items: {
48
+ id: string;
49
+ title: string;
50
+ subtitle?: string | undefined;
51
+ imageUrl?: string | undefined;
52
+ price?: string | undefined;
53
+ badge?: string | undefined;
54
+ rating?: number | undefined;
55
+ }[];
56
+ }>;
57
+ export declare const ProductCarouselMeta: WidgetMeta;
58
+ //# sourceMappingURL=ProductCarousel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProductCarousel.d.ts","sourceRoot":"","sources":["../src/ProductCarousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEtE,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;CACjD;AAeD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAgB1D,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEhC,CAAC;AAEH,eAAO,MAAM,mBAAmB,EAAE,UASjC,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { z } from 'zod';
3
+ import { productSchema, defaultWidgetConfig } from '@conversokit/shared';
4
+ import { ProductCard } from './ProductCard.js';
5
+ const wrapperStyle = {
6
+ display: 'flex',
7
+ overflowX: 'auto',
8
+ gap: 'var(--ck-spacing-4)',
9
+ padding: 'var(--ck-spacing-2)',
10
+ scrollSnapType: 'x mandatory'
11
+ };
12
+ const itemStyle = {
13
+ flex: '0 0 auto',
14
+ scrollSnapAlign: 'start'
15
+ };
16
+ export const ProductCarousel = ({ items, onItemAction }) => {
17
+ return (_jsx("div", { style: wrapperStyle, children: items.map((item) => (_jsx("div", { style: itemStyle, children: _jsx(ProductCard, { ...item, onAction: onItemAction ? () => onItemAction(item) : item.onAction }) }, item.id))) }));
18
+ };
19
+ export const productCarouselSchema = z.object({
20
+ items: z.array(productSchema)
21
+ });
22
+ export const ProductCarouselMeta = {
23
+ name: 'ProductCarousel',
24
+ category: 'commerce',
25
+ version: '0.1.0',
26
+ config: {
27
+ ...defaultWidgetConfig,
28
+ permissions: { allowsExternalLinks: true }
29
+ },
30
+ schema: productCarouselSchema
31
+ };
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { type TimeSlot, type WidgetMeta } from '@conversokit/shared';
3
+ export interface TimeSlotSelectorProps {
4
+ slots: TimeSlot[];
5
+ selectedSlotId?: string;
6
+ onSelect?: (slot: TimeSlot) => void;
7
+ }
8
+ export declare const TimeSlotSelector: React.FC<TimeSlotSelectorProps>;
9
+ export declare const TimeSlotSelectorMeta: WidgetMeta;
10
+ //# sourceMappingURL=TimeSlotSelector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimeSlotSelector.d.ts","sourceRoot":"","sources":["../src/TimeSlotSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,UAAU,EAChB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;CACrC;AA6BD,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAwC5D,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,UASlC,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { format } from 'date-fns';
3
+ import { availabilitySchema, defaultWidgetConfig } from '@conversokit/shared';
4
+ const containerStyle = {
5
+ display: 'grid',
6
+ gridTemplateColumns: 'repeat(auto-fill, minmax(120px, 1fr))',
7
+ gap: 'var(--ck-spacing-2)',
8
+ padding: 'var(--ck-spacing-2)',
9
+ fontFamily: 'var(--ck-font-family)'
10
+ };
11
+ function slotStyle(opts) {
12
+ return {
13
+ padding: '10px 12px',
14
+ borderRadius: 'var(--ck-radius-sm)',
15
+ border: '1px solid var(--ck-border)',
16
+ backgroundColor: opts.isSelected
17
+ ? 'var(--ck-primary)'
18
+ : 'var(--ck-surface)',
19
+ color: opts.isSelected ? 'var(--ck-primary-foreground)' : 'var(--ck-text)',
20
+ cursor: opts.isAvailable ? 'pointer' : 'not-allowed',
21
+ opacity: opts.isAvailable ? 1 : 0.5,
22
+ fontSize: 'var(--ck-font-size-sm)',
23
+ textAlign: 'left'
24
+ };
25
+ }
26
+ export const TimeSlotSelector = ({ slots, selectedSlotId, onSelect }) => {
27
+ if (slots.length === 0) {
28
+ return (_jsx("p", { style: { color: 'var(--ck-muted)', padding: 'var(--ck-spacing-2)' }, children: "No times available." }));
29
+ }
30
+ return (_jsx("div", { style: containerStyle, "data-testid": "time-slot-selector", children: slots.map((slot) => {
31
+ const isSelected = selectedSlotId === slot.id;
32
+ const start = format(new Date(slot.startsAt), 'HH:mm');
33
+ const end = format(new Date(slot.endsAt), 'HH:mm');
34
+ return (_jsxs("button", { type: "button", disabled: !slot.available, onClick: () => slot.available && onSelect?.(slot), style: slotStyle({ isSelected, isAvailable: slot.available }), "aria-pressed": isSelected, children: [_jsx("div", { style: { fontWeight: 'var(--ck-font-weight-bold)' }, children: start }), _jsxs("div", { style: { fontSize: 'var(--ck-font-size-sm)', opacity: 0.85 }, children: ["until ", end, slot.price ? ` · ${slot.price}` : ''] })] }, slot.id));
35
+ }) }));
36
+ };
37
+ export const TimeSlotSelectorMeta = {
38
+ name: 'TimeSlotSelector',
39
+ category: 'booking',
40
+ version: '0.1.0',
41
+ config: {
42
+ ...defaultWidgetConfig,
43
+ permissions: { collectPersonalData: false }
44
+ },
45
+ schema: availabilitySchema
46
+ };
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { type TrendSeries, type WidgetMeta } from '@conversokit/shared';
3
+ export interface TrendChartProps {
4
+ series: TrendSeries;
5
+ width?: number;
6
+ height?: number;
7
+ }
8
+ export declare const TrendChart: React.FC<TrendChartProps>;
9
+ export declare const TrendChartMeta: WidgetMeta;
10
+ //# sourceMappingURL=TrendChart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrendChart.d.ts","sourceRoot":"","sources":["../src/TrendChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,UAAU,EAChB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA0FhD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,UAM5B,CAAC"}
@@ -0,0 +1,50 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { defaultWidgetConfig, trendSeriesSchema } from '@conversokit/shared';
3
+ export const TrendChart = ({ series, width = 480, height = 160 }) => {
4
+ if (series.points.length < 2) {
5
+ return (_jsx("p", { style: { color: 'var(--ck-muted)', padding: 'var(--ck-spacing-2)' }, children: "Not enough data to render a trend." }));
6
+ }
7
+ const padding = 16;
8
+ const innerW = width - padding * 2;
9
+ const innerH = height - padding * 2;
10
+ const values = series.points.map((p) => p.v);
11
+ const min = Math.min(...values);
12
+ const max = Math.max(...values);
13
+ const range = max - min || 1;
14
+ const stepX = innerW / (series.points.length - 1);
15
+ const path = series.points
16
+ .map((p, i) => {
17
+ const x = padding + i * stepX;
18
+ const y = padding + innerH - ((p.v - min) / range) * innerH;
19
+ return `${i === 0 ? 'M' : 'L'} ${x.toFixed(1)} ${y.toFixed(1)}`;
20
+ })
21
+ .join(' ');
22
+ const last = series.points[series.points.length - 1];
23
+ const lastX = padding + (series.points.length - 1) * stepX;
24
+ const lastY = padding + innerH - ((last.v - min) / range) * innerH;
25
+ return (_jsxs("div", { "data-testid": "trend-chart", style: {
26
+ border: '1px solid var(--ck-border)',
27
+ borderRadius: 'var(--ck-radius-md)',
28
+ backgroundColor: 'var(--ck-surface)',
29
+ color: 'var(--ck-text)',
30
+ fontFamily: 'var(--ck-font-family)',
31
+ padding: 'var(--ck-spacing-3)',
32
+ maxWidth: width
33
+ }, children: [_jsx("div", { style: {
34
+ fontSize: 'var(--ck-font-size-sm)',
35
+ color: 'var(--ck-muted)',
36
+ marginBottom: 'var(--ck-spacing-1)'
37
+ }, children: series.label }), _jsxs("svg", { viewBox: `0 0 ${width} ${height}`, width: "100%", height: height, role: "img", "aria-label": `${series.label} trend, latest ${last.v}`, children: [_jsx("path", { d: path, fill: "none", stroke: "var(--ck-primary)", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("circle", { cx: lastX, cy: lastY, r: 4, fill: "var(--ck-primary)", stroke: "var(--ck-surface)", strokeWidth: 2 })] }), _jsxs("div", { style: {
38
+ display: 'flex',
39
+ justifyContent: 'space-between',
40
+ fontSize: 'var(--ck-font-size-sm)',
41
+ color: 'var(--ck-muted)'
42
+ }, children: [_jsx("span", { children: series.points[0].t }), _jsx("span", { children: last.t })] })] }));
43
+ };
44
+ export const TrendChartMeta = {
45
+ name: 'TrendChart',
46
+ category: 'dashboard',
47
+ version: '0.1.0',
48
+ config: { ...defaultWidgetConfig, permissions: {} },
49
+ schema: trendSeriesSchema
50
+ };
@@ -0,0 +1,40 @@
1
+ export { ProductCard, ProductCardMeta } from './ProductCard.js';
2
+ export type { ProductCardProps } from './ProductCard.js';
3
+ export { ProductCarousel, ProductCarouselMeta, productCarouselSchema } from './ProductCarousel.js';
4
+ export type { ProductCarouselProps } from './ProductCarousel.js';
5
+ export { ConsentBanner, ConsentBannerMeta, consentBannerSchema } from './ConsentBanner.js';
6
+ export type { ConsentBannerProps } from './ConsentBanner.js';
7
+ export { CheckoutSummary, CheckoutSummaryMeta } from './CheckoutSummary.js';
8
+ export type { CheckoutSummaryProps } from './CheckoutSummary.js';
9
+ export { AddToCartPanel, AddToCartPanelMeta } from './AddToCartPanel.js';
10
+ export type { AddToCartPanelProps } from './AddToCartPanel.js';
11
+ export { AvailabilityCalendar, AvailabilityCalendarMeta, availabilityCalendarSchema } from './AvailabilityCalendar.js';
12
+ export type { AvailabilityCalendarProps } from './AvailabilityCalendar.js';
13
+ export { TimeSlotSelector, TimeSlotSelectorMeta } from './TimeSlotSelector.js';
14
+ export type { TimeSlotSelectorProps } from './TimeSlotSelector.js';
15
+ export { BookingCard, BookingCardMeta } from './BookingCard.js';
16
+ export type { BookingCardProps } from './BookingCard.js';
17
+ export { LeadCaptureForm, LeadCaptureFormMeta } from './LeadCaptureForm.js';
18
+ export type { LeadCaptureFormProps, LeadFormValues } from './LeadCaptureForm.js';
19
+ export { MultiStepForm, MultiStepFormMeta } from './MultiStepForm.js';
20
+ export type { MultiStepFormProps } from './MultiStepForm.js';
21
+ export { CTABanner, CTABannerMeta, ctaBannerSchema } from './CTABanner.js';
22
+ export type { CTABannerProps, CTABannerVariant } from './CTABanner.js';
23
+ export { HotelCard, HotelCardMeta } from './HotelCard.js';
24
+ export type { HotelCardProps } from './HotelCard.js';
25
+ export { FlightSummary, FlightSummaryMeta } from './FlightSummary.js';
26
+ export type { FlightSummaryProps } from './FlightSummary.js';
27
+ export { ItineraryTimeline, ItineraryTimelineMeta } from './ItineraryTimeline.js';
28
+ export type { ItineraryTimelineProps } from './ItineraryTimeline.js';
29
+ export { DestinationRecommendations, DestinationRecommendationsMeta, destinationRecommendationsSchema } from './DestinationRecommendations.js';
30
+ export type { DestinationRecommendationsProps } from './DestinationRecommendations.js';
31
+ export { KPIGrid, KPIGridMeta, kpiGridSchema } from './KPIGrid.js';
32
+ export type { KPIGridProps } from './KPIGrid.js';
33
+ export { TrendChart, TrendChartMeta } from './TrendChart.js';
34
+ export type { TrendChartProps } from './TrendChart.js';
35
+ export { AnalyticsPanel, AnalyticsPanelMeta } from './AnalyticsPanel.js';
36
+ export type { AnalyticsPanelProps } from './AnalyticsPanel.js';
37
+ export { AlertFeed, AlertFeedMeta } from './AlertFeed.js';
38
+ export type { AlertFeedProps } from './AlertFeed.js';
39
+ export { widgetRegistry, registerWidget, getWidget, listWidgets } from './registry.js';
40
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
package/dist/index.js ADDED
@@ -0,0 +1,20 @@
1
+ export { ProductCard, ProductCardMeta } from './ProductCard.js';
2
+ export { ProductCarousel, ProductCarouselMeta, productCarouselSchema } from './ProductCarousel.js';
3
+ export { ConsentBanner, ConsentBannerMeta, consentBannerSchema } from './ConsentBanner.js';
4
+ export { CheckoutSummary, CheckoutSummaryMeta } from './CheckoutSummary.js';
5
+ export { AddToCartPanel, AddToCartPanelMeta } from './AddToCartPanel.js';
6
+ export { AvailabilityCalendar, AvailabilityCalendarMeta, availabilityCalendarSchema } from './AvailabilityCalendar.js';
7
+ export { TimeSlotSelector, TimeSlotSelectorMeta } from './TimeSlotSelector.js';
8
+ export { BookingCard, BookingCardMeta } from './BookingCard.js';
9
+ export { LeadCaptureForm, LeadCaptureFormMeta } from './LeadCaptureForm.js';
10
+ export { MultiStepForm, MultiStepFormMeta } from './MultiStepForm.js';
11
+ export { CTABanner, CTABannerMeta, ctaBannerSchema } from './CTABanner.js';
12
+ export { HotelCard, HotelCardMeta } from './HotelCard.js';
13
+ export { FlightSummary, FlightSummaryMeta } from './FlightSummary.js';
14
+ export { ItineraryTimeline, ItineraryTimelineMeta } from './ItineraryTimeline.js';
15
+ export { DestinationRecommendations, DestinationRecommendationsMeta, destinationRecommendationsSchema } from './DestinationRecommendations.js';
16
+ export { KPIGrid, KPIGridMeta, kpiGridSchema } from './KPIGrid.js';
17
+ export { TrendChart, TrendChartMeta } from './TrendChart.js';
18
+ export { AnalyticsPanel, AnalyticsPanelMeta } from './AnalyticsPanel.js';
19
+ export { AlertFeed, AlertFeedMeta } from './AlertFeed.js';
20
+ export { widgetRegistry, registerWidget, getWidget, listWidgets } from './registry.js';
@@ -0,0 +1,6 @@
1
+ import type { WidgetMeta } from '@conversokit/shared';
2
+ export declare const widgetRegistry: Record<string, WidgetMeta>;
3
+ export declare function registerWidget(meta: WidgetMeta): void;
4
+ export declare function getWidget(name: string): WidgetMeta | undefined;
5
+ export declare function listWidgets(): WidgetMeta[];
6
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AA2CtD,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAErD,CAAC;AAEF,wBAAgB,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAErD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAE9D;AAED,wBAAgB,WAAW,IAAI,UAAU,EAAE,CAE1C"}