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