@code-collective/booking-widget 1.0.12 → 1.0.14

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 (38) hide show
  1. package/CHANGELOG.md +48 -46
  2. package/README.md +500 -500
  3. package/dist/booking-widget.css +1 -1
  4. package/dist/booking-widget.js +829 -707
  5. package/dist/booking-widget.min.js +24 -25
  6. package/dist/booking-widget.umd.cjs +5 -5
  7. package/package.json +58 -58
  8. package/src/lib/BookingProvider.svelte +21 -21
  9. package/src/lib/CartBar.svelte +26 -26
  10. package/src/lib/CartBarView.svelte +78 -78
  11. package/src/lib/CartExpiryGuard.svelte +416 -416
  12. package/src/lib/CartOverview.svelte +30 -30
  13. package/src/lib/CartOverviewButton.svelte +104 -104
  14. package/src/lib/Checkout.svelte +141 -141
  15. package/src/lib/CheckoutModal.css +179 -0
  16. package/src/lib/CheckoutModal.svelte +78 -573
  17. package/src/lib/CheckoutPanel.svelte +121 -121
  18. package/src/lib/PaymentPage.svelte +208 -191
  19. package/src/lib/ResultView.svelte +24 -4
  20. package/src/lib/TicketConfigurator.svelte +166 -166
  21. package/src/lib/api.ts +36 -5
  22. package/src/lib/booking-context.ts +33 -33
  23. package/src/lib/cart-overview.svelte.ts +97 -97
  24. package/src/lib/checkout-item-view.ts +63 -0
  25. package/src/lib/checkout-payment-flow.svelte.ts +523 -0
  26. package/src/lib/client-types.ts +22 -6
  27. package/src/lib/config.ts +162 -162
  28. package/src/lib/elements/bw-cart.svelte +49 -49
  29. package/src/lib/elements/bw-checkout.svelte +97 -97
  30. package/src/lib/elements/bw-configurator.svelte +72 -72
  31. package/src/lib/elements/register.ts +171 -171
  32. package/src/lib/elements/shared.ts +18 -18
  33. package/src/lib/generated-types.ts +94 -5
  34. package/src/lib/host.svelte.ts +336 -336
  35. package/src/lib/index.ts +242 -242
  36. package/src/lib/messages.ts +157 -157
  37. package/src/lib/peach-sdk.ts +86 -86
  38. package/src/lib/portal.ts +23 -23
@@ -0,0 +1,179 @@
1
+ .modal {
2
+ display: flex;
3
+ flex-direction: column;
4
+ height: 100%;
5
+ max-height: 100%;
6
+ overflow: hidden;
7
+ background: var(--bw-color-surface);
8
+ }
9
+ .body {
10
+ flex: 1;
11
+ overflow-y: auto;
12
+ padding: 16px;
13
+ }
14
+
15
+ /* -- Cart view -- */
16
+ .keep-shopping-btn {
17
+ padding: 8px 16px;
18
+ background: none;
19
+ border: 2px solid #222;
20
+ border-radius: var(--bw-radius-md);
21
+ font-size: 13px;
22
+ font-weight: 600;
23
+ color: #222;
24
+ cursor: pointer;
25
+ }
26
+ .keep-shopping-btn:hover {
27
+ background: #f5f5f5;
28
+ }
29
+
30
+ .cart-card {
31
+ border: 1px solid var(--bw-color-border);
32
+ border-radius: var(--bw-radius-lg);
33
+ padding: 20px;
34
+ margin-bottom: 16px;
35
+ }
36
+ .cart-card-top {
37
+ display: flex;
38
+ justify-content: space-between;
39
+ align-items: flex-start;
40
+ gap: 16px;
41
+ }
42
+ .cart-product {
43
+ font-size: 16px;
44
+ font-weight: 700;
45
+ flex: 1;
46
+ }
47
+ .cart-item-total {
48
+ font-size: 16px;
49
+ font-weight: 800;
50
+ white-space: nowrap;
51
+ }
52
+ .cart-detail-lines {
53
+ margin-top: 4px;
54
+ }
55
+ .cart-detail {
56
+ font-size: 13px;
57
+ color: var(--bw-color-text-secondary);
58
+ line-height: 1.5;
59
+ }
60
+ .cart-divider {
61
+ border-top: 1px dashed var(--bw-color-border);
62
+ margin: 14px 0;
63
+ }
64
+ .cart-units {
65
+ display: flex;
66
+ flex-direction: column;
67
+ gap: 6px;
68
+ margin-bottom: 14px;
69
+ }
70
+ .cart-unit-line {
71
+ display: flex;
72
+ justify-content: space-between;
73
+ align-items: center;
74
+ font-size: 14px;
75
+ }
76
+ .cart-unit-label {
77
+ color: #333;
78
+ }
79
+ .cart-unit-price {
80
+ font-weight: 600;
81
+ font-variant-numeric: tabular-nums;
82
+ }
83
+ .cart-actions {
84
+ display: flex;
85
+ gap: 16px;
86
+ }
87
+ .action-edit {
88
+ background: none;
89
+ border: none;
90
+ font-size: 13px;
91
+ font-weight: 700;
92
+ color: var(--bw-color-primary);
93
+ padding: 0;
94
+ cursor: pointer;
95
+ }
96
+ .action-edit:hover { text-decoration: underline; }
97
+ .action-remove {
98
+ background: none;
99
+ border: none;
100
+ font-size: 13px;
101
+ font-weight: 600;
102
+ color: #555;
103
+ padding: 0;
104
+ cursor: pointer;
105
+ }
106
+ .action-remove:hover { text-decoration: underline; }
107
+
108
+ .cart-total-divider {
109
+ border-top: 3px solid #111;
110
+ margin: 8px 0 20px;
111
+ }
112
+ .cart-total-row {
113
+ display: flex;
114
+ justify-content: space-between;
115
+ align-items: center;
116
+ font-size: 16px;
117
+ font-weight: 700;
118
+ margin-bottom: 20px;
119
+ }
120
+ .cart-total-amount {
121
+ font-size: 20px;
122
+ font-weight: 800;
123
+ }
124
+ /* -- Contact view -- */
125
+ .pay-error {
126
+ margin: 0 0 16px;
127
+ padding: 12px 16px;
128
+ background: #fdecea;
129
+ color: #b3261e;
130
+ font-size: 14px;
131
+ border-radius: var(--bw-radius-md);
132
+ }
133
+ .contact-header {
134
+ display: flex;
135
+ justify-content: space-between;
136
+ align-items: center;
137
+ margin-bottom: 20px;
138
+ }
139
+ .contact-title {
140
+ font-size: 16px;
141
+ font-weight: 700;
142
+ }
143
+ .required-hint {
144
+ font-size: 12px;
145
+ color: var(--bw-color-primary);
146
+ }
147
+
148
+ .pay-bar {
149
+ display: flex;
150
+ align-items: center;
151
+ flex-shrink: 0;
152
+ background: var(--bw-color-primary);
153
+ color: white;
154
+ position: sticky;
155
+ bottom: 0;
156
+ }
157
+ .pay-bar-total {
158
+ padding: 0 20px;
159
+ font-size: 16px;
160
+ font-weight: 700;
161
+ }
162
+ .pay-bar-btn {
163
+ flex: 1;
164
+ display: flex;
165
+ align-items: center;
166
+ justify-content: flex-end;
167
+ gap: 8px;
168
+ height: 52px;
169
+ padding: 0 20px;
170
+ background: none;
171
+ border: none;
172
+ color: white;
173
+ font-size: 16px;
174
+ font-weight: 700;
175
+ }
176
+ .pay-bar-btn:disabled {
177
+ opacity: 0.7;
178
+ cursor: default;
179
+ }