guestbell-forms 3.0.45 → 3.0.47
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/build/components/bookingCalendar/BookingCalendar.d.ts +4 -0
- package/build/components/bookingCalendar/BookingCalendar.js +10 -0
- package/build/components/bookingCalendar/BookingCalendar.js.map +1 -1
- package/build/components/bookingCalendar/bookingCalendarNowSection/BookingCalendarNowSection.d.ts +11 -0
- package/build/components/bookingCalendar/bookingCalendarNowSection/BookingCalendarNowSection.js +68 -0
- package/build/components/bookingCalendar/bookingCalendarNowSection/BookingCalendarNowSection.js.map +1 -0
- package/build/components/bookingCalendar/bookingCalendarNowSection/classes.d.ts +7 -0
- package/build/components/bookingCalendar/bookingCalendarNowSection/classes.js +14 -0
- package/build/components/bookingCalendar/bookingCalendarNowSection/classes.js.map +1 -0
- package/build/components/bookingCalendar/bookingCalendarNowSection/index.d.ts +2 -0
- package/build/components/bookingCalendar/bookingCalendarNowSection/index.js +28 -0
- package/build/components/bookingCalendar/bookingCalendarNowSection/index.js.map +1 -0
- package/build/components/inputHeader/InputHeader.js +3 -1
- package/build/components/inputHeader/InputHeader.js.map +1 -1
- package/build/dist/guestbell-forms.css +18 -0
- package/build/dist/guestbell-forms.css.map +1 -1
- package/build/dist/guestbell-forms.min.css +1 -1
- package/build/dist/report.html +2 -2
- package/build/scss/components/bookingCalendar/bookingCalendar.scss +27 -0
- package/package.json +1 -1
- package/src/lib/components/bookingCalendar/BookingCalendar.tsx +19 -0
- package/src/lib/components/bookingCalendar/bookingCalendarNowSection/BookingCalendarNowSection.tsx +95 -0
- package/src/lib/components/bookingCalendar/bookingCalendarNowSection/classes.ts +14 -0
- package/src/lib/components/bookingCalendar/bookingCalendarNowSection/index.ts +2 -0
- package/src/lib/components/inputHeader/InputHeader.tsx +44 -37
- package/src/lib/scss/components/bookingCalendar/bookingCalendar.scss +27 -0
- package/src/stories/Schedule.tsx +1 -1
@@ -165,6 +165,11 @@ export class InputHeaderRaw
|
|
165
165
|
this.props.collapsed !== undefined
|
166
166
|
? !this.props.collapsed
|
167
167
|
: !this.state.collapsed;
|
168
|
+
const showButtons = Boolean(
|
169
|
+
this.props.mainButton ||
|
170
|
+
this.props.extraButtons?.length ||
|
171
|
+
this.props.collapsible
|
172
|
+
);
|
168
173
|
return (
|
169
174
|
<div
|
170
175
|
className={
|
@@ -214,43 +219,45 @@ export class InputHeaderRaw
|
|
214
219
|
{this.props.subTitle}
|
215
220
|
</div>
|
216
221
|
)}
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
222
|
+
{showButtons && (
|
223
|
+
<div
|
224
|
+
className="input__header__top__button-container"
|
225
|
+
onClick={this.mainButtonClick}
|
226
|
+
>
|
227
|
+
{this.props.mainButton && this.props.mainButton}
|
228
|
+
{this.props.extraButtons ? (
|
229
|
+
<Dropdown
|
230
|
+
header={
|
231
|
+
<Button
|
232
|
+
blank={true}
|
233
|
+
circular={true}
|
234
|
+
{...this.props.extraButtonsButtonProps}
|
235
|
+
>
|
236
|
+
<MoreIcon />
|
237
|
+
</Button>
|
238
|
+
}
|
239
|
+
showArrow={false}
|
240
|
+
headerClassName={'line-height--0'}
|
241
|
+
className={''}
|
242
|
+
>
|
243
|
+
{this.renderExtraButtons()}
|
244
|
+
</Dropdown>
|
245
|
+
) : null}
|
246
|
+
{this.props.collapsible && (
|
247
|
+
<Button
|
248
|
+
circular={true}
|
249
|
+
blank={true}
|
250
|
+
className={`input__header__collapse-button line-height--0 ${
|
251
|
+
this.state.collapsed ? 'collapsed' : ''
|
252
|
+
}`}
|
253
|
+
{...this.props.collapseButtonsButtonProps}
|
254
|
+
onClick={this.toggleClick}
|
255
|
+
>
|
256
|
+
<PlusIcon />
|
257
|
+
</Button>
|
258
|
+
)}
|
259
|
+
</div>
|
260
|
+
)}
|
254
261
|
{this.props.showExpandAll &&
|
255
262
|
Object.keys(this.state.inputHeaderContext.components).length > 0 &&
|
256
263
|
this.renderCollapseExpandAll()}
|
@@ -274,3 +274,30 @@ $border-color-dark: black;
|
|
274
274
|
animation-name: fadeOut;
|
275
275
|
animation-fill-mode: forwards;
|
276
276
|
}
|
277
|
+
|
278
|
+
.bookingCalendar__nowSection {
|
279
|
+
position: absolute;
|
280
|
+
left: 0;
|
281
|
+
right: 0;
|
282
|
+
height: 100%;
|
283
|
+
pointer-events: none;
|
284
|
+
grid-column: 2;
|
285
|
+
grid-row-start: 2;
|
286
|
+
display: flex;
|
287
|
+
}
|
288
|
+
|
289
|
+
.bookingCalendar__nowSection__now {
|
290
|
+
width: 1px;
|
291
|
+
background-color: rgba(0, 0, 0, 0.35);
|
292
|
+
background-image: repeating-linear-gradient(
|
293
|
+
45deg,
|
294
|
+
white,
|
295
|
+
white 5px,
|
296
|
+
transparent 5px,
|
297
|
+
transparent 10px
|
298
|
+
);
|
299
|
+
}
|
300
|
+
|
301
|
+
.bookingCalendar__nowSection__before {
|
302
|
+
background-color: rgba(0, 0, 0, 0.075);
|
303
|
+
}
|
package/src/stories/Schedule.tsx
CHANGED
@@ -32,7 +32,7 @@ const generateBookingItemsBetweenDates = (
|
|
32
32
|
|
33
33
|
export const Schedule = () => {
|
34
34
|
const [{ from, till }, setRange] = React.useState({
|
35
|
-
from: moment().startOf('day').subtract(
|
35
|
+
from: moment().startOf('day').subtract(1, 'day'),
|
36
36
|
till: moment().startOf('day').add(7, 'days'),
|
37
37
|
});
|
38
38
|
|