willba-component-library 0.2.101 → 0.2.102

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.
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export declare const SpinnerSVG: ({ fill, size, }: {
3
+ fill?: string | undefined;
4
+ size?: number | undefined;
5
+ }) => React.JSX.Element;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import './CloseButton.css';
3
+ interface CloseButtonPropsType {
4
+ handleClose: () => void;
5
+ }
6
+ export declare const CloseButton: ({ handleClose }: CloseButtonPropsType) => React.JSX.Element;
7
+ export {};
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import './SubmitButton.css';
3
+ export declare const SubmitButton: ({ onClick }: any) => React.JSX.Element;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { DateRange } from 'react-day-picker';
3
+ import { CalendarOffset } from '../../FilterBarTypes';
4
+ import 'react-day-picker/dist/style.css';
5
+ import './Calendar.css';
6
+ type Props = {
7
+ calendarRange: DateRange | undefined;
8
+ setCalendarRange: (range: DateRange | undefined) => void;
9
+ calendarOffset?: CalendarOffset;
10
+ selectedPath: string;
11
+ locale?: string;
12
+ };
13
+ export declare const Calendar: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
14
+ export {};
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ type Props = {
3
+ handleSelectedFilter: (arg: boolean) => void;
4
+ };
5
+ export declare const useCloseFilterSection: ({ handleSelectedFilter }: Props) => {
6
+ filtersRef: import("react").MutableRefObject<HTMLDivElement | null>;
7
+ };
8
+ export {};
@@ -0,0 +1,5 @@
1
+ type Props = {
2
+ language?: string;
3
+ };
4
+ export declare const useUpdateTranslations: ({ language }: Props) => void;
5
+ export {};
@@ -0,0 +1,6 @@
1
+ import { DateRange } from 'react-day-picker';
2
+ type Props = {
3
+ calendarRange?: DateRange;
4
+ };
5
+ export declare const parseDates: ({ calendarRange }: Props) => string | null;
6
+ export {};
@@ -0,0 +1 @@
1
+ export declare const handleOverlappingDates: () => void;
@@ -0,0 +1,3 @@
1
+ export { parseDates } from './parseDates';
2
+ export { parseDate } from './parseDate';
3
+ export { nightsCount } from './nightsCount';
@@ -0,0 +1,6 @@
1
+ import { DateRange } from 'react-day-picker';
2
+ type Props = {
3
+ calendarRange?: DateRange;
4
+ };
5
+ export declare const nightsCount: ({ calendarRange }: Props) => number | undefined;
6
+ export {};
@@ -0,0 +1,7 @@
1
+ type Props = {
2
+ date?: Date;
3
+ dateFormat?: string;
4
+ language?: string;
5
+ };
6
+ export declare const parseDate: ({ date, dateFormat, language, }: Props) => string | null;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ import { DateRange } from 'react-day-picker';
2
+ type Props = {
3
+ calendarRange?: DateRange;
4
+ };
5
+ export declare const parseDates: ({ calendarRange }: Props) => string | null;
6
+ export {};
package/lib/index.esm.js CHANGED
@@ -11622,7 +11622,10 @@ var parseGuests = function (_a) {
11622
11622
  var guestLabel = _a.guestLabel, guestsLabel = _a.guestsLabel, guestsPlaceholder = _a.guestsPlaceholder, ageCategoryCounts = _a.ageCategoryCounts, ageCategories = _a.ageCategories;
11623
11623
  var parsedData = Object.entries(ageCategoryCounts).reduce(function (acc, _a) {
11624
11624
  var _b = __read(_a, 2), key = _b[0], value = _b[1];
11625
- var ageCategoryId = key[key.length - 1];
11625
+ var parts = key.split('-');
11626
+ if (parts.length < 2)
11627
+ return acc;
11628
+ var ageCategoryId = parts[1];
11626
11629
  var ageCategory = ageCategories.find(function (c) { return c.id === ageCategoryId; });
11627
11630
  if (ageCategory && value) {
11628
11631
  return {
@@ -11635,7 +11638,7 @@ var parseGuests = function (_a) {
11635
11638
  var htmlString = parsedData.html.length > 1 ? parsedData.html.join(' + ') : '';
11636
11639
  return {
11637
11640
  content: parsedData.total
11638
- ? "<span style=\"display: inline-block; min-width: 10px\">".concat(parsedData.total, "</span> ").concat(parsedData.total > 1 ? guestsLabel : guestLabel).concat(htmlString ? " &nbsp; ( ".concat(htmlString, " )") : '')
11641
+ ? "<span class=\"will-guest-count\">".concat(parsedData.total, "</span> ").concat(parsedData.total > 1 ? guestsLabel : guestLabel).concat(htmlString ? " &nbsp; ( ".concat(htmlString, " )") : '')
11639
11642
  : guestsPlaceholder,
11640
11643
  data: parsedData,
11641
11644
  };
@@ -11917,7 +11920,7 @@ var Categories = function (_a) {
11917
11920
  React__default__default.createElement("span", null, itm))); }))));
11918
11921
  };
11919
11922
 
11920
- var css_248z$1 = ".will-root {\n z-index: 999;\n width: fit-content;\n min-width: 796px;\n max-height: 100vh;\n position: relative;\n}\n\n.will-root.is-full-width {\n width: 100%;\n min-width: auto;\n}\n\n.will-filter-bar {\n box-sizing: border-box;\n position: relative;\n}\n\n/* Tabs */\n\n.will-filter-bar-tabs {\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n z-index: 222;\n background: transparent;\n padding: 10px;\n gap: 10px\n}\n\n/* Header */\n.will-filter-bar-header {\n display: flex;\n justify-content: space-between;\n padding: 10px;\n position: relative;\n z-index: 222;\n border-radius: 40px;\n background-color: var(--will-white);\n \n}\n\n\n\n@media (max-width: 960px) {\n .will-filter-bar-header {\n flex-direction: column;\n padding: 20px;\n border-radius: 25px;\n }\n}\n\n/* Container */\n\n.will-filter-bar-container {\n background-color: var(--will-white);\n min-height: 100px;\n padding: 40px 20px ;\n position: absolute;\n top: 125px;\n z-index: 111;\n border-radius: 25px;\n box-shadow: var(--will-box-shadow);\n}\n\n@media (max-width: 960px) {\n .will-root { \n width: 100%;\n min-width: auto;\n max-height: 100vh; \n z-index: 3;\n }\n\n .will-filter-bar-container {\n margin-top: 10px;\n top:0;\n padding: 45px 20px;\n position: relative;\n }\n}\n\n/* Common */\n\n.will-filter-bar-header.dark,\n.will-filter-bar-container.dark {\n box-shadow: var(--will-box-shadow-dark)\n}\n\n.will-filter-bar-header.light,\n.will-filter-bar-container.light {\n box-shadow: var(--will-box-shadow-light)\n}\n\n";
11923
+ var css_248z$1 = ".will-root {\n z-index: 999;\n width: fit-content;\n min-width: 796px;\n max-height: 100vh;\n position: relative;\n}\n\n.will-root.is-full-width {\n width: 100%;\n min-width: auto;\n}\n\n.will-filter-bar {\n box-sizing: border-box;\n position: relative;\n}\n\n/* Tabs */\n\n.will-filter-bar-tabs {\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n z-index: 222;\n background: transparent;\n padding: 10px;\n gap: 10px;\n}\n\n/* Header */\n.will-filter-bar-header {\n display: flex;\n justify-content: space-between;\n padding: 10px;\n position: relative;\n z-index: 222;\n border-radius: 40px;\n background-color: var(--will-white);\n}\n\n@media (max-width: 960px) {\n .will-filter-bar-header {\n flex-direction: column;\n padding: 20px;\n border-radius: 25px;\n }\n}\n\n/* Container */\n\n.will-filter-bar-container {\n background-color: var(--will-white);\n min-height: 100px;\n padding: 40px 20px;\n position: absolute;\n top: 125px;\n z-index: 111;\n border-radius: 25px;\n box-shadow: var(--will-box-shadow);\n}\n\n@media (max-width: 960px) {\n .will-root {\n width: 100%;\n min-width: auto;\n max-height: 100vh;\n z-index: 3;\n }\n\n .will-filter-bar-container {\n margin-top: 10px;\n top: 0;\n padding: 45px 20px;\n position: relative;\n }\n}\n\n/* Common */\n\n.will-filter-bar-header.dark,\n.will-filter-bar-container.dark {\n box-shadow: var(--will-box-shadow-dark);\n}\n\n.will-filter-bar-header.light,\n.will-filter-bar-container.light {\n box-shadow: var(--will-box-shadow-light);\n}\n\n.will-guest-count {\n display: inline-block;\n min-width: 10px;\n}\n";
11921
11924
  styleInject(css_248z$1);
11922
11925
 
11923
11926
  function FilterBar(_a) {