willba-component-library 0.3.12 → 0.3.14
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/README.md +6 -18
- package/lib/assets/IconsSvg.d.ts +2 -1
- package/lib/components/Button/Button.d.ts +2 -2
- package/lib/components/FilterBar/FilterBar.d.ts +2 -1
- package/lib/components/FilterBar/components/buttons/select-button/SelectButton.d.ts +2 -1
- package/lib/components/FilterBar/components/buttons/tab-button/TabButton.d.ts +2 -1
- package/lib/components/FilterBar/components/cards/image-card/ImageCard.d.ts +2 -1
- package/lib/components/FilterBar/components/categories/Categories.d.ts +2 -1
- package/lib/components/FilterBar/components/common/FilterSectionHeader.d.ts +2 -2
- package/lib/components/FilterBar/components/dates/Dates.d.ts +2 -2
- package/lib/components/FilterBar/components/divider/Divider.d.ts +2 -1
- package/lib/components/FilterBar/components/guests/Guests.d.ts +2 -1
- package/lib/components/FilterBar/components/locations/Locations.d.ts +2 -1
- package/lib/components/FilterCalendar/FilterCalendar.d.ts +2 -1
- package/lib/components/FilterCalendar/components/Footer.d.ts +2 -1
- package/lib/core/components/buttons/close-button/CloseButton.d.ts +2 -1
- package/lib/core/components/buttons/submit-button/SubmitButton.d.ts +2 -1
- package/lib/core/components/calendar/Calendar.d.ts +2 -1
- package/lib/index.d.ts +4 -5
- package/lib/index.esm.js +289 -213
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +376 -300
- package/lib/index.js.map +1 -1
- package/lib/index.umd.js +379 -302
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/rollup.config.mjs +1 -1
- package/src/assets/IconsSvg.tsx +2 -0
- package/src/components/Button/Button.stories.tsx +1 -0
- package/src/components/Button/Button.tsx +1 -1
- package/src/components/FilterBar/FilterBar.stories.tsx +1 -0
- package/src/components/FilterBar/FilterBar.tsx +1 -1
- package/src/components/FilterBar/components/buttons/select-button/SelectButton.tsx +1 -1
- package/src/components/FilterBar/components/buttons/tab-button/TabButton.tsx +2 -0
- package/src/components/FilterBar/components/cards/image-card/ImageCard.tsx +1 -1
- package/src/components/FilterBar/components/categories/Categories.tsx +1 -2
- package/src/components/FilterBar/components/common/FilterSectionHeader.tsx +1 -1
- package/src/components/FilterBar/components/dates/Dates.tsx +1 -1
- package/src/components/FilterBar/components/divider/Divider.tsx +2 -0
- package/src/components/FilterBar/components/guests/GuestCount/GuestCount.tsx +1 -1
- package/src/components/FilterBar/components/guests/Guests.tsx +1 -1
- package/src/components/FilterBar/components/locations/Locations.tsx +1 -1
- package/src/components/FilterBar/utils/calculateDropdownPosition.tsx +0 -10
- package/src/components/FilterCalendar/FilterCalendar.tsx +1 -0
- package/src/components/FilterCalendar/components/Footer.tsx +1 -0
- package/src/core/components/buttons/close-button/CloseButton.tsx +1 -0
- package/src/core/components/buttons/submit-button/SubmitButton.tsx +1 -0
- package/src/core/components/calendar/Calendar.tsx +1 -1
- package/stories/Button.tsx +2 -0
- package/stories/Header.tsx +1 -0
- package/stories/Page.tsx +1 -1
package/package.json
CHANGED
package/rollup.config.mjs
CHANGED
package/src/assets/IconsSvg.tsx
CHANGED
|
@@ -18,8 +18,6 @@ export const calculateDropdownPosition = ({
|
|
|
18
18
|
guestsButtonRef,
|
|
19
19
|
isMobile,
|
|
20
20
|
}: CalculateDropdownPositionParams): CSSProperties => {
|
|
21
|
-
// On mobile, don't apply any positioning - let CSS handle it naturally
|
|
22
|
-
// Dropdowns will start from leftmost point with position: relative
|
|
23
21
|
if (isMobile) {
|
|
24
22
|
return {}
|
|
25
23
|
}
|
|
@@ -31,7 +29,6 @@ export const calculateDropdownPosition = ({
|
|
|
31
29
|
|
|
32
30
|
switch (filterSection) {
|
|
33
31
|
case FilterSections.LOCATIONS:
|
|
34
|
-
// Locations: Start from beginning, hug content
|
|
35
32
|
if (locationsButtonRef.current) {
|
|
36
33
|
const buttonRect = locationsButtonRef.current.getBoundingClientRect()
|
|
37
34
|
const relativeLeft = buttonRect.left - containerRect.left
|
|
@@ -44,8 +41,6 @@ export const calculateDropdownPosition = ({
|
|
|
44
41
|
break
|
|
45
42
|
|
|
46
43
|
case FilterSections.CALENDAR:
|
|
47
|
-
// Calendar: Two months side-by-side, needs ~650-700px
|
|
48
|
-
// Start from dates button, but push left if not enough space
|
|
49
44
|
if (datesButtonRef.current) {
|
|
50
45
|
const buttonRect = datesButtonRef.current.getBoundingClientRect()
|
|
51
46
|
const relativeLeft = buttonRect.left - containerRect.left
|
|
@@ -53,7 +48,6 @@ export const calculateDropdownPosition = ({
|
|
|
53
48
|
const calendarMinWidth = 650
|
|
54
49
|
|
|
55
50
|
if (availableWidth < calendarMinWidth) {
|
|
56
|
-
// Not enough space, align to the right edge
|
|
57
51
|
return {
|
|
58
52
|
left: 'auto',
|
|
59
53
|
right: containerLeft,
|
|
@@ -61,7 +55,6 @@ export const calculateDropdownPosition = ({
|
|
|
61
55
|
maxWidth: `${containerRect.width}px`,
|
|
62
56
|
}
|
|
63
57
|
} else {
|
|
64
|
-
// Enough space, start from dates button
|
|
65
58
|
return {
|
|
66
59
|
left: relativeLeft,
|
|
67
60
|
right: 'auto',
|
|
@@ -72,7 +65,6 @@ export const calculateDropdownPosition = ({
|
|
|
72
65
|
break
|
|
73
66
|
|
|
74
67
|
case FilterSections.GUESTS:
|
|
75
|
-
// Guests: Start from guests button, push left if not enough space
|
|
76
68
|
if (guestsButtonRef.current) {
|
|
77
69
|
const buttonRect = guestsButtonRef.current.getBoundingClientRect()
|
|
78
70
|
const relativeLeft = buttonRect.left - containerRect.left
|
|
@@ -80,7 +72,6 @@ export const calculateDropdownPosition = ({
|
|
|
80
72
|
const dropdownMinWidth = 350
|
|
81
73
|
|
|
82
74
|
if (availableWidth < dropdownMinWidth) {
|
|
83
|
-
// Not enough space, align to the right
|
|
84
75
|
return {
|
|
85
76
|
left: 'auto',
|
|
86
77
|
right: containerLeft,
|
|
@@ -88,7 +79,6 @@ export const calculateDropdownPosition = ({
|
|
|
88
79
|
maxWidth: `${containerRect.width}px`,
|
|
89
80
|
}
|
|
90
81
|
} else {
|
|
91
|
-
// Enough space, start from button
|
|
92
82
|
return {
|
|
93
83
|
left: relativeLeft,
|
|
94
84
|
right: 'auto',
|
package/stories/Button.tsx
CHANGED
package/stories/Header.tsx
CHANGED
package/stories/Page.tsx
CHANGED