willba-component-library 0.3.11 → 0.3.12

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.
Files changed (51) hide show
  1. package/lib/assets/IconsSvg.d.ts +1 -2
  2. package/lib/components/Button/Button.d.ts +6 -6
  3. package/lib/components/FilterBar/FilterBar.d.ts +1 -1
  4. package/lib/components/FilterBar/FilterBarTypes.d.ts +1 -1
  5. package/lib/components/FilterBar/components/buttons/select-button/SelectButton.d.ts +1 -2
  6. package/lib/components/FilterBar/components/buttons/tab-button/TabButton.d.ts +1 -2
  7. package/lib/components/FilterBar/components/cards/image-card/ImageCard.d.ts +1 -2
  8. package/lib/components/FilterBar/components/categories/Categories.d.ts +1 -2
  9. package/lib/components/FilterBar/components/common/FilterSectionHeader.d.ts +2 -2
  10. package/lib/components/FilterBar/components/dates/Dates.d.ts +4 -4
  11. package/lib/components/FilterBar/components/divider/Divider.d.ts +1 -2
  12. package/lib/components/FilterBar/components/guests/Guests.d.ts +1 -2
  13. package/lib/components/FilterBar/components/locations/Locations.d.ts +1 -2
  14. package/lib/components/FilterCalendar/FilterCalendar.d.ts +1 -2
  15. package/lib/components/FilterCalendar/components/Footer.d.ts +1 -2
  16. package/lib/core/components/buttons/close-button/CloseButton.d.ts +1 -2
  17. package/lib/core/components/buttons/submit-button/SubmitButton.d.ts +2 -2
  18. package/lib/core/components/calendar/Calendar.d.ts +1 -2
  19. package/lib/index.d.ts +9 -9
  20. package/lib/index.esm.js +204 -290
  21. package/lib/index.esm.js.map +1 -1
  22. package/lib/index.js +291 -377
  23. package/lib/index.js.map +1 -1
  24. package/lib/index.umd.js +293 -380
  25. package/lib/index.umd.js.map +1 -1
  26. package/package.json +1 -1
  27. package/rollup.config.mjs +1 -1
  28. package/src/assets/IconsSvg.tsx +0 -2
  29. package/src/components/Button/Button.stories.tsx +15 -16
  30. package/src/components/Button/Button.tsx +15 -15
  31. package/src/components/FilterBar/FilterBar.stories.tsx +0 -1
  32. package/src/components/FilterBar/FilterBarTypes.ts +1 -1
  33. package/src/components/FilterBar/components/buttons/select-button/SelectButton.tsx +13 -2
  34. package/src/components/FilterBar/components/buttons/tab-button/TabButton.tsx +0 -2
  35. package/src/components/FilterBar/components/cards/image-card/ImageCard.tsx +1 -1
  36. package/src/components/FilterBar/components/categories/Categories.tsx +2 -1
  37. package/src/components/FilterBar/components/common/FilterSectionHeader.tsx +2 -1
  38. package/src/components/FilterBar/components/dates/Dates.tsx +3 -4
  39. package/src/components/FilterBar/components/divider/Divider.tsx +0 -2
  40. package/src/components/FilterBar/components/guests/GuestCount/GuestCount.tsx +1 -1
  41. package/src/components/FilterBar/components/guests/Guests.tsx +11 -2
  42. package/src/components/FilterBar/components/locations/Locations.tsx +1 -1
  43. package/src/components/FilterCalendar/FilterCalendar.stories.tsx +1 -1
  44. package/src/components/FilterCalendar/FilterCalendar.tsx +0 -1
  45. package/src/components/FilterCalendar/components/Footer.tsx +0 -1
  46. package/src/core/components/buttons/close-button/CloseButton.tsx +0 -1
  47. package/src/core/components/buttons/submit-button/SubmitButton.tsx +1 -1
  48. package/src/core/components/calendar/Calendar.tsx +7 -4
  49. package/stories/Button.tsx +14 -11
  50. package/stories/Header.tsx +27 -14
  51. package/stories/Page.tsx +39 -21
@@ -1,9 +1,8 @@
1
- import React from 'react';
2
1
  type Icon = 'spinner' | 'warning';
3
2
  type Props = {
4
3
  fill?: string;
5
4
  size?: number;
6
5
  icon: Icon;
7
6
  };
8
- export declare const IconsSvg: ({ fill, size, icon }: Props) => React.JSX.Element | null;
7
+ export declare const IconsSvg: ({ fill, size, icon }: Props) => import("react/jsx-runtime").JSX.Element | null;
9
8
  export {};
@@ -1,10 +1,10 @@
1
- import React from "react";
2
- import "./button.css";
1
+ import { MouseEvent } from 'react';
2
+ import './button.css';
3
3
  export interface ButtonProps {
4
4
  /**
5
5
  * Is this the principal call to action on the page?
6
6
  */
7
- type?: "primary" | "secondary";
7
+ type?: 'primary' | 'secondary';
8
8
  /**
9
9
  * What background color to use
10
10
  */
@@ -12,7 +12,7 @@ export interface ButtonProps {
12
12
  /**
13
13
  * How large should the button be?
14
14
  */
15
- size?: "small" | "medium" | "large";
15
+ size?: 'small' | 'medium' | 'large';
16
16
  /**
17
17
  * Button contents
18
18
  */
@@ -20,10 +20,10 @@ export interface ButtonProps {
20
20
  /**
21
21
  * Optional click handler
22
22
  */
23
- onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
23
+ onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
24
24
  }
25
25
  /**
26
26
  * Primary UI component for user interaction
27
27
  */
28
- declare const Button: ({ type, textColor, size, onClick, label, }: ButtonProps) => React.JSX.Element;
28
+ declare const Button: ({ type, textColor, size, onClick, label, }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
29
29
  export default Button;
@@ -1,4 +1,4 @@
1
1
  import '../../themes/Default.css';
2
2
  import { FilterBarTypes } from './FilterBarTypes';
3
3
  import './FilterBar.css';
4
- export default function FilterBar({ language, ageCategories, redirectUrl, palette, onSubmit, fullWidth, disableCalendarDates, mode, tabs, outerLoading, locations, }: FilterBarTypes): import("react").JSX.Element;
4
+ export default function FilterBar({ language, ageCategories, redirectUrl, palette, onSubmit, fullWidth, disableCalendarDates, mode, tabs, outerLoading, locations, }: FilterBarTypes): import("react/jsx-runtime").JSX.Element;
@@ -58,6 +58,6 @@ export type Locations = {
58
58
  export type Location = {
59
59
  id: number;
60
60
  label: string;
61
- description?: string;
61
+ description?: string | null;
62
62
  imageUrl?: string | null;
63
63
  };
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import './SelectButton.css';
3
2
  type Props = {
4
3
  label: string;
@@ -9,5 +8,5 @@ type Props = {
9
8
  ariaExpanded?: boolean;
10
9
  ariaControls?: string;
11
10
  };
12
- export declare const SelectButton: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLButtonElement>>;
11
+ export declare const SelectButton: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLButtonElement>>;
13
12
  export {};
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import './TabButton.css';
3
2
  type Props = {
4
3
  onClick?: () => void;
@@ -6,5 +5,5 @@ type Props = {
6
5
  active?: boolean;
7
6
  mode?: string;
8
7
  };
9
- export declare const TabButton: ({ onClick, label, active, mode }: Props) => React.JSX.Element;
8
+ export declare const TabButton: ({ onClick, label, active, mode }: Props) => import("react/jsx-runtime").JSX.Element;
10
9
  export {};
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import './ImageCard.css';
3
2
  type Props = {
4
3
  title?: string;
@@ -7,5 +6,5 @@ type Props = {
7
6
  isSelected: boolean;
8
7
  onClick?: () => void;
9
8
  };
10
- export declare const ImageCard: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
9
+ export declare const ImageCard: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLDivElement>>;
11
10
  export {};
@@ -1,8 +1,7 @@
1
- import React from 'react';
2
1
  import './Categories.css';
3
2
  type Props = {
4
3
  categories: any;
5
4
  setCategories: any;
6
5
  };
7
- export declare const Categories: ({ categories, setCategories }: Props) => React.JSX.Element;
6
+ export declare const Categories: ({ categories, setCategories }: Props) => import("react/jsx-runtime").JSX.Element;
8
7
  export {};
@@ -1,8 +1,8 @@
1
- import React, { ReactNode } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  import './FilterSectionHeader.css';
3
3
  type Props = {
4
4
  title: string;
5
5
  action?: ReactNode;
6
6
  };
7
- export declare const FilterSectionHeader: ({ title, action }: Props) => React.JSX.Element;
7
+ export declare const FilterSectionHeader: ({ title, action }: Props) => import("react/jsx-runtime").JSX.Element;
8
8
  export {};
@@ -1,9 +1,9 @@
1
- import React from 'react';
1
+ import { RefObject } from 'react';
2
2
  import { DateRange } from 'react-day-picker';
3
3
  import { DisableCalendarDates } from '../../../../core/components/calendar/CalendarTypes';
4
4
  import './Dates.css';
5
5
  type Props = {
6
- ref: React.RefObject<HTMLDivElement>;
6
+ ref: RefObject<HTMLDivElement>;
7
7
  onClose?: () => void;
8
8
  autoFocus?: boolean;
9
9
  calendarRange: DateRange | undefined;
@@ -11,7 +11,7 @@ type Props = {
11
11
  disableCalendarDates?: DisableCalendarDates;
12
12
  selectedPath?: string;
13
13
  language?: string;
14
- filtersRef?: React.RefObject<HTMLDivElement>;
14
+ filtersRef?: RefObject<HTMLDivElement>;
15
15
  };
16
- export declare const Dates: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
16
+ export declare const Dates: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
17
17
  export {};
@@ -1,3 +1,2 @@
1
- import React from 'react';
2
1
  import './Divider.css';
3
- export declare const Divider: () => React.JSX.Element;
2
+ export declare const Divider: () => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { AgeCategoryCount, AgeCategoryType } from '../../FilterBarTypes';
3
2
  import './Guests.css';
4
3
  type Props = {
@@ -8,5 +7,5 @@ type Props = {
8
7
  autoFocus?: boolean;
9
8
  onClose?: () => void;
10
9
  };
11
- export declare const Guests: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
10
+ export declare const Guests: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLDivElement>>;
12
11
  export {};
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import './Locations.css';
3
2
  import { Location } from '../../FilterBarTypes';
4
3
  type Props = {
@@ -10,5 +9,5 @@ type Props = {
10
9
  multiSelect?: boolean;
11
10
  onClose?: () => void;
12
11
  };
13
- export declare const Locations: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
12
+ export declare const Locations: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLDivElement>>;
14
13
  export {};
@@ -1,5 +1,4 @@
1
- import React from 'react';
2
1
  import '../../themes/Default.css';
3
2
  import { FilterCalendarTypes } from './FilterCalendarTypes';
4
3
  import './FilterCalendar.css';
5
- export default function FilterCalendar({ calendarOffset, language, palette, onSubmit, disableCalendarDates: outerDisableCalendarDates, toggleCalendar, loadingData, setToggleCalendar, requestDates, showFeedback, noActiveSelection, rangeContext: outerRangeContext, }: FilterCalendarTypes): React.JSX.Element;
4
+ export default function FilterCalendar({ calendarOffset, language, palette, onSubmit, disableCalendarDates: outerDisableCalendarDates, toggleCalendar, loadingData, setToggleCalendar, requestDates, showFeedback, noActiveSelection, rangeContext: outerRangeContext, }: FilterCalendarTypes): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { DateRange } from 'react-day-picker';
3
2
  import { Palette } from '../../../themes/useTheme';
4
3
  export declare const Footer: ({ calendarHasError, calendarRange, handleClearDates, language, palette, }: {
@@ -7,4 +6,4 @@ export declare const Footer: ({ calendarHasError, calendarRange, handleClearDate
7
6
  handleClearDates: () => void;
8
7
  language?: string;
9
8
  palette: Palette;
10
- }) => React.JSX.Element;
9
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,6 @@
1
- import React from 'react';
2
1
  import './CloseButton.css';
3
2
  interface CloseButtonPropsType {
4
3
  handleClose: () => void;
5
4
  }
6
- export declare const CloseButton: ({ handleClose }: CloseButtonPropsType) => React.JSX.Element;
5
+ export declare const CloseButton: ({ handleClose }: CloseButtonPropsType) => import("react/jsx-runtime").JSX.Element;
7
6
  export {};
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  import './SubmitButton.css';
3
3
  type SubmitButtonVariant = 'text' | 'full';
4
4
  type Props = {
@@ -9,5 +9,5 @@ type Props = {
9
9
  isLoading?: boolean;
10
10
  variant?: SubmitButtonVariant;
11
11
  };
12
- export declare const SubmitButton: ({ onClick, startIcon, label, disabled, isLoading, variant, }: Props) => React.JSX.Element;
12
+ export declare const SubmitButton: ({ onClick, startIcon, label, disabled, isLoading, variant, }: Props) => import("react/jsx-runtime").JSX.Element;
13
13
  export {};
@@ -1,5 +1,4 @@
1
- import React from 'react';
2
1
  import { CalendarTypes } from './CalendarTypes';
3
2
  import 'react-day-picker/dist/style.css';
4
3
  import './Calendar.css';
5
- export declare const Calendar: React.ForwardRefExoticComponent<CalendarTypes & React.RefAttributes<HTMLDivElement>>;
4
+ export declare const Calendar: import("react").ForwardRefExoticComponent<CalendarTypes & import("react").RefAttributes<HTMLDivElement>>;
package/lib/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- import * as React from 'react';
2
- import React__default from 'react';
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { MouseEvent } from 'react';
3
3
  import { DateRange, Matcher } from 'react-day-picker';
4
4
 
5
5
  interface ButtonProps {
6
6
  /**
7
7
  * Is this the principal call to action on the page?
8
8
  */
9
- type?: "primary" | "secondary";
9
+ type?: 'primary' | 'secondary';
10
10
  /**
11
11
  * What background color to use
12
12
  */
@@ -14,7 +14,7 @@ interface ButtonProps {
14
14
  /**
15
15
  * How large should the button be?
16
16
  */
17
- size?: "small" | "medium" | "large";
17
+ size?: 'small' | 'medium' | 'large';
18
18
  /**
19
19
  * Button contents
20
20
  */
@@ -22,12 +22,12 @@ interface ButtonProps {
22
22
  /**
23
23
  * Optional click handler
24
24
  */
25
- onClick?: (event: React__default.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
25
+ onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
26
26
  }
27
27
  /**
28
28
  * Primary UI component for user interaction
29
29
  */
30
- declare const Button: ({ type, textColor, size, onClick, label, }: ButtonProps) => React__default.JSX.Element;
30
+ declare const Button: ({ type, textColor, size, onClick, label, }: ButtonProps) => react_jsx_runtime.JSX.Element;
31
31
 
32
32
  type Palette = {
33
33
  primary: string;
@@ -117,11 +117,11 @@ type Locations = {
117
117
  type Location = {
118
118
  id: number;
119
119
  label: string;
120
- description?: string;
120
+ description?: string | null;
121
121
  imageUrl?: string | null;
122
122
  };
123
123
 
124
- declare function FilterBar({ language, ageCategories, redirectUrl, palette, onSubmit, fullWidth, disableCalendarDates, mode, tabs, outerLoading, locations, }: FilterBarTypes): React.JSX.Element;
124
+ declare function FilterBar({ language, ageCategories, redirectUrl, palette, onSubmit, fullWidth, disableCalendarDates, mode, tabs, outerLoading, locations, }: FilterBarTypes): react_jsx_runtime.JSX.Element;
125
125
 
126
126
  interface FilterCalendarTypes extends Partial<CalendarTypes> {
127
127
  palette: Palette;
@@ -130,6 +130,6 @@ interface FilterCalendarTypes extends Partial<CalendarTypes> {
130
130
  setToggleCalendar: (val: boolean) => void;
131
131
  }
132
132
 
133
- declare function FilterCalendar({ calendarOffset, language, palette, onSubmit, disableCalendarDates: outerDisableCalendarDates, toggleCalendar, loadingData, setToggleCalendar, requestDates, showFeedback, noActiveSelection, rangeContext: outerRangeContext, }: FilterCalendarTypes): React__default.JSX.Element;
133
+ declare function FilterCalendar({ calendarOffset, language, palette, onSubmit, disableCalendarDates: outerDisableCalendarDates, toggleCalendar, loadingData, setToggleCalendar, requestDates, showFeedback, noActiveSelection, rangeContext: outerRangeContext, }: FilterCalendarTypes): react_jsx_runtime.JSX.Element;
134
134
 
135
135
  export { Button, FilterBar, FilterBarTypes, FilterCalendar, FilterCalendarTypes };