willba-component-library 0.1.52 → 0.1.53

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "willba-component-library",
3
- "version": "0.1.52",
3
+ "version": "0.1.53",
4
4
  "description": "A stroybook 6 with TypeScript demo",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",
@@ -1,6 +1,7 @@
1
1
  .will-root {
2
2
  z-index: 999;
3
- width: 100%;
3
+ width: fit-content;
4
+ min-width: 796px;
4
5
  max-height: 100vh;
5
6
  position: relative;
6
7
  }
@@ -57,7 +58,9 @@
57
58
  }
58
59
 
59
60
  @media (max-width: 960px) {
60
- .will-root {
61
+ .will-root {
62
+ width: 100%;
63
+ max-height: 100vh;
61
64
  z-index: 3;
62
65
  }
63
66
 
@@ -45,10 +45,7 @@ export const Primary: Story = {
45
45
  },
46
46
  render: (args) => (
47
47
  <div style={{ background: 'grey', padding: '30px', height: '100vh' }}>
48
- <FilterBar
49
- {...args}
50
- onSubmit={false ? null : (val: Filters) => console.log(val)}
51
- />
48
+ <FilterBar {...args} onSubmit={false ? null : (val: Filters) => null} />
52
49
  </div>
53
50
  ),
54
51
  }
@@ -31,8 +31,8 @@
31
31
  opacity: 0.8;
32
32
 
33
33
  white-space: nowrap;
34
- overflow: hidden;
35
- text-overflow: ellipsis;
34
+ /* overflow: hidden;
35
+ text-overflow: ellipsis; */
36
36
  }
37
37
 
38
38
  .will-filter-bar-select-button .select-button-label.active,
@@ -23,9 +23,10 @@ export const SelectButton = ({
23
23
  <p className={`select-button-label ${active ? 'active' : ''}`}>
24
24
  {label}
25
25
  </p>
26
- <p className={`select-button-description ${active ? 'active' : ''}`}>
27
- {description}
28
- </p>
26
+ <p
27
+ className={`select-button-description ${active ? 'active' : ''}`}
28
+ dangerouslySetInnerHTML={{ __html: description }}
29
+ />
29
30
  </div>
30
31
  </span>
31
32
  </button>
@@ -23,13 +23,4 @@
23
23
  .will-filter-bar-tab-button.active {
24
24
  background-color: var(--will-transparent-white);
25
25
 
26
- }
27
-
28
-
29
- /* @media (max-width: 960px) {
30
- .will-filter-bar-tab-button {
31
- justify-content: center;
32
- margin-bottom: 15px;
33
- }
34
- } */
35
-
26
+ }
@@ -18,7 +18,6 @@ export const useFilterBar = ({
18
18
  onSubmit,
19
19
  }: Props) => {
20
20
  const [selectedPath, setSelectedPath] = useState('/events')
21
-
22
21
  const [selectedFilter, setSelectedFilter] = useState<string | boolean>(false)
23
22
  const [calendarRange, setCalendarRange] = useState<DateRange | undefined>()
24
23
 
@@ -121,7 +120,7 @@ export const useFilterBar = ({
121
120
 
122
121
  handleSelectedFilter(false)
123
122
 
124
- if (onSubmit) {
123
+ if (onSubmit && selectedPath === '/rooms') {
125
124
  const updatedParamsObject: { [key: string]: string } = {}
126
125
 
127
126
  updatedParams.forEach((value, key) => {
@@ -142,7 +141,7 @@ export const useFilterBar = ({
142
141
  }
143
142
 
144
143
  handleSelectedFilter(false)
145
- return onSubmit
144
+ return onSubmit && selectedPath === '/rooms'
146
145
  ? onSubmit(newParams)
147
146
  : (window.location.href = `${redirectUrl}/${selectedPath}${
148
147
  querySearchParams ? `?${querySearchParams.toString()}` : ''
@@ -10,7 +10,9 @@ export const parseGuests = ({ ageCategoryCounts, ageCategories }: Props) =>
10
10
  const ageCategory = ageCategories.find((c) => c.id === key[key.length - 1])
11
11
 
12
12
  if (ageCategory && value) {
13
- acc += `${acc ? ' -' : ''} ${ageCategory.name}: ${value}`
13
+ acc += `${acc ? ' -' : ''} ${
14
+ ageCategory.name
15
+ }: <span style="display: inline-block; width: 21px">${value}</span>`
14
16
  }
15
17
 
16
18
  return acc