@nuitee/booking-widget 1.0.2 → 1.0.3
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/USAGE.md +3 -3
- package/dist/booking-widget-standalone.js +225 -45
- package/dist/booking-widget.css +141 -2
- package/dist/booking-widget.js +221 -44
- package/dist/core/booking-api.js +11 -0
- package/dist/core/color-utils.js +103 -0
- package/dist/core/stripe-config.js +3 -1
- package/dist/core/styles.css +141 -2
- package/dist/react/BookingWidget.jsx +92 -29
- package/dist/react/styles.css +141 -2
- package/dist/utils/config-service.js +99 -0
- package/dist/vue/BookingWidget.vue +79 -20
- package/dist/vue/styles.css +141 -2
- package/package.json +2 -2
package/dist/vue/styles.css
CHANGED
|
@@ -106,6 +106,145 @@
|
|
|
106
106
|
font-weight: 500;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
/* ===== Config Error State ===== */
|
|
110
|
+
.booking-widget-config-error {
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-direction: column;
|
|
113
|
+
align-items: center;
|
|
114
|
+
justify-content: center;
|
|
115
|
+
gap: 1.1em;
|
|
116
|
+
padding: 4em 2em;
|
|
117
|
+
text-align: center;
|
|
118
|
+
min-height: 300px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.booking-widget-config-error__icon-wrap {
|
|
122
|
+
width: 5em;
|
|
123
|
+
height: 5em;
|
|
124
|
+
border-radius: 50%;
|
|
125
|
+
background: radial-gradient(circle, rgba(239,68,68,0.12) 0%, rgba(239,68,68,0.04) 100%);
|
|
126
|
+
border: 1.5px solid rgba(239, 68, 68, 0.22);
|
|
127
|
+
box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.06);
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
justify-content: center;
|
|
131
|
+
color: #f87171;
|
|
132
|
+
flex-shrink: 0;
|
|
133
|
+
margin-bottom: 0.25em;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.booking-widget-config-error__badge {
|
|
137
|
+
display: inline-flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
gap: 0.4em;
|
|
140
|
+
font-size: 0.7em;
|
|
141
|
+
font-weight: 600;
|
|
142
|
+
letter-spacing: 0.12em;
|
|
143
|
+
text-transform: uppercase;
|
|
144
|
+
color: #f87171;
|
|
145
|
+
background: rgba(239, 68, 68, 0.1);
|
|
146
|
+
border: 1px solid rgba(239, 68, 68, 0.18);
|
|
147
|
+
border-radius: 99em;
|
|
148
|
+
padding: 0.3em 0.85em;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.booking-widget-config-error__title {
|
|
152
|
+
font-family: var(--font-serif, 'Playfair Display', Georgia, serif);
|
|
153
|
+
font-size: 1.35em;
|
|
154
|
+
font-weight: 600;
|
|
155
|
+
color: var(--fg, #e8e0d5);
|
|
156
|
+
margin: 0;
|
|
157
|
+
letter-spacing: -0.01em;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.booking-widget-config-error__desc {
|
|
161
|
+
font-size: 0.875em;
|
|
162
|
+
color: var(--secondary-fg, #a09080);
|
|
163
|
+
max-width: 25em;
|
|
164
|
+
line-height: 1.7;
|
|
165
|
+
margin: 0;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.booking-widget-config-error__desc code {
|
|
169
|
+
font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', Menlo, monospace;
|
|
170
|
+
font-size: 0.88em;
|
|
171
|
+
background: rgba(255, 255, 255, 0.06);
|
|
172
|
+
color: var(--primary, #f59e0b);
|
|
173
|
+
padding: 0.12em 0.45em;
|
|
174
|
+
border-radius: 0.3em;
|
|
175
|
+
border: 1px solid rgba(255, 255, 255, 0.09);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.booking-widget-config-error__divider {
|
|
179
|
+
width: 2.5em;
|
|
180
|
+
height: 1.5px;
|
|
181
|
+
background: var(--border, rgba(255,255,255,0.1));
|
|
182
|
+
border-radius: 1px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.booking-widget-config-error__hint {
|
|
186
|
+
font-size: 0.78em;
|
|
187
|
+
color: var(--muted, #6b5f50);
|
|
188
|
+
max-width: 21em;
|
|
189
|
+
line-height: 1.6;
|
|
190
|
+
margin: 0;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.booking-widget-config-error__retry {
|
|
194
|
+
display: inline-flex;
|
|
195
|
+
align-items: center;
|
|
196
|
+
gap: 0.45em;
|
|
197
|
+
padding: 0.55em 1.4em;
|
|
198
|
+
background: transparent;
|
|
199
|
+
color: var(--secondary-fg, #a09080);
|
|
200
|
+
border: 1.5px solid var(--border, rgba(255,255,255,0.13));
|
|
201
|
+
border-radius: 99em;
|
|
202
|
+
font-size: 0.8em;
|
|
203
|
+
font-family: var(--font-sans, system-ui, sans-serif);
|
|
204
|
+
font-weight: 500;
|
|
205
|
+
cursor: pointer;
|
|
206
|
+
letter-spacing: 0.02em;
|
|
207
|
+
transition: border-color 0.2s, color 0.2s, background 0.2s;
|
|
208
|
+
margin-top: 0.25em;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.booking-widget-config-error__retry:hover {
|
|
212
|
+
border-color: var(--primary, #f59e0b);
|
|
213
|
+
color: var(--primary, #f59e0b);
|
|
214
|
+
background: rgba(245, 158, 11, 0.06);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/* ===== Config Loading State ===== */
|
|
218
|
+
.booking-widget-config-loading {
|
|
219
|
+
display: flex;
|
|
220
|
+
flex-direction: column;
|
|
221
|
+
align-items: center;
|
|
222
|
+
justify-content: center;
|
|
223
|
+
gap: 1.25em;
|
|
224
|
+
padding: 4em 2em;
|
|
225
|
+
text-align: center;
|
|
226
|
+
min-height: 300px;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.booking-widget-config-loading__spinner {
|
|
230
|
+
width: 2.75em;
|
|
231
|
+
height: 2.75em;
|
|
232
|
+
border: 2px solid var(--border, rgba(255,255,255,0.1));
|
|
233
|
+
border-top-color: var(--primary, hsl(38,60%,55%));
|
|
234
|
+
border-radius: 50%;
|
|
235
|
+
animation: bw-spin 0.75s linear infinite;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
@keyframes bw-spin {
|
|
239
|
+
to { transform: rotate(360deg); }
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.booking-widget-config-loading__text {
|
|
243
|
+
font-size: 0.875em;
|
|
244
|
+
color: var(--muted, #888);
|
|
245
|
+
letter-spacing: 0.01em;
|
|
246
|
+
}
|
|
247
|
+
|
|
109
248
|
/* ===== Step Indicator ===== */
|
|
110
249
|
.booking-widget-step-indicator {
|
|
111
250
|
display: flex;
|
|
@@ -448,7 +587,7 @@
|
|
|
448
587
|
}
|
|
449
588
|
|
|
450
589
|
.booking-widget-modal .date-trigger:hover {
|
|
451
|
-
border-color:
|
|
590
|
+
border-color: var(--primary);
|
|
452
591
|
}
|
|
453
592
|
|
|
454
593
|
.booking-widget-modal .date-trigger .placeholder {
|
|
@@ -472,7 +611,7 @@
|
|
|
472
611
|
max-width: calc(100vw - 2em);
|
|
473
612
|
box-sizing: border-box;
|
|
474
613
|
z-index: 10;
|
|
475
|
-
background: var(--card);
|
|
614
|
+
background: var(--card-solid, var(--card));
|
|
476
615
|
border: 1px solid var(--border);
|
|
477
616
|
border-radius: var(--radius);
|
|
478
617
|
padding: 1em;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuitee/booking-widget",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "A beautiful, customizable booking widget modal that can be embedded in any website. Supports vanilla JavaScript, React, and Vue.js.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"build": "node scripts/generate-stripe-config.js && npm run build:css && npm run build:js && npm run build:react && npm run build:vue && npm run build:types",
|
|
35
35
|
"build:stripe-config": "node scripts/generate-stripe-config.js",
|
|
36
36
|
"build:css": "mkdir -p dist dist/core && cp src/core/styles.css dist/booking-widget.css && cp src/core/styles.css dist/core/styles.css",
|
|
37
|
-
"build:js": "mkdir -p dist dist/core && cp src/core/widget.js dist/booking-widget.js && cp src/core/booking-api.js dist/core/booking-api.js && cp src/core/stripe-config.js dist/core/stripe-config.js && node scripts/inject-widget-bootstrap.js && cp src/standalone/bundle.js dist/booking-widget-standalone.js && node scripts/build-standalone.js && npm run build:entry",
|
|
37
|
+
"build:js": "mkdir -p dist dist/core dist/utils && cp src/core/widget.js dist/booking-widget.js && cp src/core/booking-api.js dist/core/booking-api.js && cp src/core/stripe-config.js dist/core/stripe-config.js && cp src/core/color-utils.js dist/core/color-utils.js && cp src/utils/config-service.js dist/utils/config-service.js && node scripts/inject-widget-bootstrap.js && cp src/standalone/bundle.js dist/booking-widget-standalone.js && node scripts/build-standalone.js && npm run build:entry",
|
|
38
38
|
"build:react": "mkdir -p dist/react && cp src/react/BookingWidget.jsx dist/react/BookingWidget.jsx && cp src/core/styles.css dist/react/styles.css",
|
|
39
39
|
"build:vue": "mkdir -p dist/vue && cp src/vue/BookingWidget.vue dist/vue/BookingWidget.vue && cp src/core/styles.css dist/vue/styles.css",
|
|
40
40
|
"build:types": "npm run build:types:main && npm run build:types:react && npm run build:types:vue",
|