willba-component-library 0.1.38 → 0.1.39
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/lib/components/FilterBar/FilterBar.d.ts +3 -3
- package/lib/components/FilterBar/FilterBarTypes.d.ts +0 -5
- package/lib/components/FilterBar/components/buttons/close-button/CloseButton.d.ts +1 -1
- package/lib/components/FilterBar/components/buttons/index.d.ts +4 -0
- package/lib/components/FilterBar/components/buttons/select-button/SelectButton.d.ts +1 -1
- package/lib/components/FilterBar/components/buttons/submit-button/SubmitButton.d.ts +1 -1
- package/lib/components/FilterBar/components/buttons/tab-button/TabButton.d.ts +1 -1
- package/lib/components/FilterBar/components/calendar/Calendar.d.ts +3 -3
- package/lib/components/FilterBar/components/categories/Categories.d.ts +6 -1
- package/lib/components/FilterBar/components/divider/Divider.d.ts +1 -1
- package/lib/components/FilterBar/components/guests/Guests.d.ts +8 -2
- package/lib/components/FilterBar/components/index.d.ts +5 -0
- package/lib/components/FilterBar/hooks/index.d.ts +4 -0
- package/lib/components/FilterBar/hooks/useCloseFilterSection.d.ts +8 -0
- package/lib/components/FilterBar/hooks/useFilterBar.d.ts +3 -3
- package/lib/components/FilterBar/hooks/useScrollInToView.d.ts +9 -0
- package/lib/components/FilterBar/hooks/useUpdateTranslations.d.ts +5 -0
- package/lib/components/FilterBar/utils/index.d.ts +2 -0
- package/lib/components/FilterBar/utils/parseDates.d.ts +6 -0
- package/lib/components/FilterBar/utils/parseGuests.d.ts +7 -0
- package/lib/index.d.ts +2 -2
- package/lib/index.esm.js +6435 -6403
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +6435 -6403
- package/lib/index.js.map +1 -1
- package/lib/index.umd.js +6435 -6403
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FilterBar/FilterBar.css +1 -17
- package/src/components/FilterBar/FilterBar.tsx +107 -149
- package/src/components/FilterBar/FilterBarTypes.ts +0 -6
- package/src/components/FilterBar/components/buttons/close-button/CloseButton.tsx +1 -1
- package/src/components/FilterBar/components/buttons/index.ts +4 -0
- package/src/components/FilterBar/components/buttons/select-button/SelectButton.tsx +1 -6
- package/src/components/FilterBar/components/buttons/submit-button/SubmitButton.tsx +1 -1
- package/src/components/FilterBar/components/buttons/tab-button/TabButton.tsx +1 -1
- package/src/components/FilterBar/components/calendar/Calendar.tsx +42 -43
- package/src/components/FilterBar/components/categories/Categories.tsx +6 -1
- package/src/components/FilterBar/components/divider/Divider.tsx +1 -1
- package/src/components/FilterBar/components/guests/Guests.tsx +34 -30
- package/src/components/FilterBar/components/index.ts +6 -0
- package/src/components/FilterBar/hooks/index.ts +4 -0
- package/src/components/FilterBar/hooks/useCloseFilterSection.tsx +28 -0
- package/src/components/FilterBar/hooks/useFilterBar.tsx +2 -15
- package/src/components/FilterBar/hooks/useScrollInToView.tsx +29 -0
- package/src/components/FilterBar/hooks/useUpdateTranslations.tsx +14 -0
- package/src/components/FilterBar/utils/index.tsx +2 -0
- package/src/components/FilterBar/utils/parseDates.tsx +12 -0
- package/src/components/FilterBar/utils/parseGuests.tsx +17 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Palette } from '../../themes/useTheme';
|
|
3
|
-
import './FilterBar.css';
|
|
4
3
|
import '../../themes/Default.css';
|
|
5
4
|
import { AgeCategoryType } from './FilterBarTypes';
|
|
6
|
-
|
|
5
|
+
import './FilterBar.css';
|
|
6
|
+
export type FilterBarProps = {
|
|
7
7
|
vendor?: string;
|
|
8
8
|
language?: string;
|
|
9
9
|
ageCategories?: AgeCategoryType[];
|
|
10
10
|
redirectUrl?: string;
|
|
11
11
|
palette?: Palette;
|
|
12
12
|
currentViewApply?: string;
|
|
13
|
-
}
|
|
13
|
+
};
|
|
14
14
|
export default function FilterBar({ language, ageCategories, redirectUrl, palette, currentViewApply, }: FilterBarProps): React.JSX.Element;
|
|
@@ -7,11 +7,6 @@ export interface AgeCategoryType {
|
|
|
7
7
|
minVal: number;
|
|
8
8
|
sortOrder: number;
|
|
9
9
|
}
|
|
10
|
-
export interface GuestsPropsType {
|
|
11
|
-
ageCategories: AgeCategoryType[];
|
|
12
|
-
updateGuestsCount: (arg1: string, arg2: number) => void;
|
|
13
|
-
ageCategoryCounts: AgeCategoryCount | {};
|
|
14
|
-
}
|
|
15
10
|
export interface GuestsCountPropsType {
|
|
16
11
|
label: string;
|
|
17
12
|
id: number;
|
|
@@ -3,5 +3,5 @@ import './CloseButton.css';
|
|
|
3
3
|
interface CloseButtonPropsType {
|
|
4
4
|
handleClose: () => void;
|
|
5
5
|
}
|
|
6
|
-
export
|
|
6
|
+
export declare const CloseButton: ({ handleClose }: CloseButtonPropsType) => React.JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -2,9 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import { DateRange } from 'react-day-picker';
|
|
3
3
|
import 'react-day-picker/dist/style.css';
|
|
4
4
|
import './Calendar.css';
|
|
5
|
-
|
|
5
|
+
type Props = {
|
|
6
6
|
calendarRange: DateRange | undefined;
|
|
7
7
|
setCalendarRange: (range: DateRange | undefined) => void;
|
|
8
|
-
}
|
|
9
|
-
export
|
|
8
|
+
};
|
|
9
|
+
export declare const Calendar: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
10
10
|
export {};
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './Categories.css';
|
|
3
|
-
|
|
3
|
+
type Props = {
|
|
4
|
+
categories: any;
|
|
5
|
+
setCategories: any;
|
|
6
|
+
};
|
|
7
|
+
export declare const Categories: ({ categories, setCategories }: Props) => React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { AgeCategoryCount, AgeCategoryType } from '../../FilterBarTypes';
|
|
3
3
|
import './Guests.css';
|
|
4
|
-
|
|
4
|
+
type Props = {
|
|
5
|
+
ageCategories: AgeCategoryType[];
|
|
6
|
+
updateGuestsCount: (arg1: string, arg2: number) => void;
|
|
7
|
+
ageCategoryCounts: AgeCategoryCount | {};
|
|
8
|
+
};
|
|
9
|
+
export declare const Guests: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { CloseButton, SelectButton, SubmitButton, TabButton } from './buttons';
|
|
2
|
+
export { Guests } from './guests/Guests';
|
|
3
|
+
export { Calendar } from './calendar/Calendar';
|
|
4
|
+
export { Divider } from './divider/Divider';
|
|
5
|
+
export { Categories } from './categories/Categories';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { DateRange } from 'react-day-picker';
|
|
3
3
|
import { AgeCategoryCount } from '../FilterBarTypes';
|
|
4
|
-
|
|
4
|
+
type Props = {
|
|
5
5
|
redirectUrl?: string;
|
|
6
6
|
currentViewApply?: string;
|
|
7
|
-
}
|
|
8
|
-
export
|
|
7
|
+
};
|
|
8
|
+
export declare const useFilterBar: ({ redirectUrl, currentViewApply }: Props) => {
|
|
9
9
|
selectedFilter: number | boolean;
|
|
10
10
|
ageCategoryCounts: AgeCategoryCount;
|
|
11
11
|
categories: number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type Props = {
|
|
3
|
+
selectedFilter: number | boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare const useScrollInToView: ({ selectedFilter }: Props) => {
|
|
6
|
+
isMobile: boolean;
|
|
7
|
+
targetFilterBarRef: import("react").MutableRefObject<HTMLDivElement | null>;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AgeCategoryCount, AgeCategoryType } from '../FilterBarTypes';
|
|
2
|
+
type Props = {
|
|
3
|
+
ageCategoryCounts: AgeCategoryCount;
|
|
4
|
+
ageCategories: AgeCategoryType[];
|
|
5
|
+
};
|
|
6
|
+
export declare const parseGuests: ({ ageCategoryCounts, ageCategories }: Props) => string;
|
|
7
|
+
export {};
|
package/lib/index.d.ts
CHANGED
|
@@ -39,14 +39,14 @@ interface AgeCategoryType {
|
|
|
39
39
|
sortOrder: number;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
type FilterBarProps = {
|
|
43
43
|
vendor?: string;
|
|
44
44
|
language?: string;
|
|
45
45
|
ageCategories?: AgeCategoryType[];
|
|
46
46
|
redirectUrl?: string;
|
|
47
47
|
palette?: Palette;
|
|
48
48
|
currentViewApply?: string;
|
|
49
|
-
}
|
|
49
|
+
};
|
|
50
50
|
declare function FilterBar({ language, ageCategories, redirectUrl, palette, currentViewApply, }: FilterBarProps): React.JSX.Element;
|
|
51
51
|
|
|
52
52
|
export { Button, FilterBar };
|