willba-component-library 0.2.6 → 0.2.8
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 +13 -15
- package/lib/index.esm.js +4 -4
- package/lib/index.js +4 -4
- package/lib/index.umd.js +4 -4
- package/package.json +1 -1
- package/src/locales/en/filterBar.json +2 -2
- package/src/locales/fi/filterBar.json +2 -2
package/README.md
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Willba Component Library is a custom UI component collection that can be utilized across multiple platforms. It is available as an <a href="https://www.npmjs.com/package/willba-component-library">npm package</a>, or can be used directly through scripts.
|
|
4
4
|
|
|
5
5
|
<div style="display: flex; gap: 20px;">
|
|
6
|
-
<img src="https://
|
|
7
|
-
<img src="https://
|
|
6
|
+
<img src="https://lh3.googleusercontent.com/fife/ALs6j_E9S05-AoxQW3EDUN_R0_CoKocZjB_0SwUe2s04qlzSMBaR18MI_AizFrkKf7JLELYTyzuUTVr5z_IehlqgF_fmQ9MFAhDfm5ATXvL6PjXqK5tClfew0sAXHodybiN2PFhqfmOsikYpaT-NxYBg6ISV8jIjKkXuQCCr7m1_FqqEMDm8zj5s2Gj4Vs8pT42J9pce2Z1ZXnkMMPYiN37cm-ozobzjP4WOA4400RptGwJmqrvKkZxhJcB-Y-ZbifPkuIp9Wzb0FhKFsEe01l6GiGBmQlT7HeuH74N3FnsLx9GVvhbyPWLaaN9H4p7V9WzDwVvMmJWICrhfLxptJn0EYaxuYfkrLbKQsF5NC-3dvk43AGDfHukDphV5AukZBomSGoIqK9d3cdaiT3zctH4ksupAP6lEv2AQgJE0u-_wuSzMW8f5Vn2_rHUhxAXPDYvL1MH6KNv8jI39adbIyeK9xAF1sIpv2rpHtyiJcCTO_xMeJWgKXNKUdh5vAKRS1vzNFBTkQDy-lriFgGUxy3y1BHv0CtCs_l_Cl2B8xqbDXjkGzKJHxR1HYquOI0WZJDVWTrufwarVrXRTlY07VK6UcF6WEFd_UDzS44adkAXD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="Filter Bar Calendar" style="width: auto; max-width: 50%;">
|
|
7
|
+
<img src="https://lh3.googleusercontent.com/d/1KCTqGgM2IZDY2nZ1ZTDf9WgX_zhmVB6D" alt="Filter Bar Guests" style="width: auto; max-width: 50%;">
|
|
8
8
|
</div>
|
|
9
9
|
|
|
10
10
|
## React usage
|
|
@@ -85,7 +85,7 @@ ReactDOM.render(<App />, document.querySelector('#app'))
|
|
|
85
85
|
|
|
86
86
|
<script src="https://unpkg.com/react@18/umd/react.production.min.js"></script>
|
|
87
87
|
<script src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"></script>
|
|
88
|
-
<script src="https://cdn.jsdelivr.net/npm/willba-component-library@0.2.
|
|
88
|
+
<script src="https://cdn.jsdelivr.net/npm/willba-component-library@0.2.8/lib/index.umd.js"></script>
|
|
89
89
|
|
|
90
90
|
<script>
|
|
91
91
|
const filterBarElement = React.createElement
|
|
@@ -145,15 +145,13 @@ ReactDOM.render(<App />, document.querySelector('#app'))
|
|
|
145
145
|
|
|
146
146
|
## Props of FilterBar
|
|
147
147
|
|
|
148
|
-
| Name | Value
|
|
149
|
-
| -------------- |
|
|
150
|
-
| redirectUrl | `"string"`
|
|
151
|
-
| language | `"
|
|
152
|
-
| ageCategories | `[{}]`
|
|
153
|
-
| palette | `{}`
|
|
154
|
-
| calendarOffset | `{}`
|
|
155
|
-
| fullWidth | `true`
|
|
156
|
-
|
|
|
157
|
-
|
|
|
158
|
-
| |
|
|
159
|
-
| tabs | `[{}]` | Filter bar tabs management: [{path: string, default: boolean, order: number, label: { en: string, fi: string}}]. |
|
|
148
|
+
| Name | Value | Description |
|
|
149
|
+
| -------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
150
|
+
| redirectUrl | `"string"` | Specifies the base URL to which the component should redirect after submitting the filters. For example: https://store.vendor.willba.app/ |
|
|
151
|
+
| language | `"string"` | Specifies the language of the filter bar. Available options are Finnish ("fi") and English ("en"). For example: "fi" or "en". |
|
|
152
|
+
| ageCategories | `[{}]` | The ageCategories prop will determine the types of guests that can be selected. Specify the age categories for guests using the following format: [{ id: string, name: string, minVal: number, sortOrder: number }]. For example: [{ id: '1', name: 'Adults', minVal: 1, sortOrder: 1 }] |
|
|
153
|
+
| palette | `{}` | The palette defines the primary and secondary colors of the filter bar. Override the colors using the following format: { primary: string, secondary: string }. For example: { primary: '#2a5a44', secondary: '#2a5a44' } |
|
|
154
|
+
| calendarOffset | `{}` | Disable dates on the calendar starting from today either forward or backward using the following format: { rooms: number, events: number }. For example: { rooms: 7, events: -1 } |
|
|
155
|
+
| fullWidth | `true` | Specify whether the filter bar width should be dynamic or fixed. |
|
|
156
|
+
| mode | `"string"` | pecify the color theme for the filter bar tabs as either light or dark using the following format: "light" |
|
|
157
|
+
| tabs | `[{}]` | Manage the filter bar tabs using the following format: [{path: string, default: boolean, order: number, label: { en: string, fi: string }}]. For example: [{ path: '/rooms', default: true, order: 2, label: { en: "Name en", fi: "Name fi" }}] |
|
package/lib/index.esm.js
CHANGED
|
@@ -6369,7 +6369,7 @@ instance.loadNamespaces;
|
|
|
6369
6369
|
instance.loadLanguages;
|
|
6370
6370
|
|
|
6371
6371
|
var calendar$1 = {
|
|
6372
|
-
label: "
|
|
6372
|
+
label: "Date",
|
|
6373
6373
|
roomsLabelPlaceholder: "Add check-in and check-out",
|
|
6374
6374
|
eventsLabelPlaceholder: "Add search dates",
|
|
6375
6375
|
startDate: "Start date",
|
|
@@ -6377,7 +6377,7 @@ var calendar$1 = {
|
|
|
6377
6377
|
title: "Calendar"
|
|
6378
6378
|
};
|
|
6379
6379
|
var guests$1 = {
|
|
6380
|
-
label: "
|
|
6380
|
+
label: "Number of guests",
|
|
6381
6381
|
labelPlaceholder: "Add guests",
|
|
6382
6382
|
title: "Who's coming?",
|
|
6383
6383
|
adultsLabel: "Adults",
|
|
@@ -6405,7 +6405,7 @@ var enFilterBar = {
|
|
|
6405
6405
|
};
|
|
6406
6406
|
|
|
6407
6407
|
var calendar = {
|
|
6408
|
-
label: "
|
|
6408
|
+
label: "Ajankohta",
|
|
6409
6409
|
roomsLabelPlaceholder: "Lisää check-in ja check-out",
|
|
6410
6410
|
eventsLabelPlaceholder: "Lisää aikaväli",
|
|
6411
6411
|
startDate: "Alku",
|
|
@@ -6413,7 +6413,7 @@ var calendar = {
|
|
|
6413
6413
|
title: "Kalenteri"
|
|
6414
6414
|
};
|
|
6415
6415
|
var guests = {
|
|
6416
|
-
label: "
|
|
6416
|
+
label: "Vierasmäärä",
|
|
6417
6417
|
labelPlaceholder: "Lisää vieraat",
|
|
6418
6418
|
title: "Ketkä ovat tulossa?",
|
|
6419
6419
|
adultsLabel: "Aikuiset",
|
package/lib/index.js
CHANGED
|
@@ -6389,7 +6389,7 @@ instance.loadNamespaces;
|
|
|
6389
6389
|
instance.loadLanguages;
|
|
6390
6390
|
|
|
6391
6391
|
var calendar$1 = {
|
|
6392
|
-
label: "
|
|
6392
|
+
label: "Date",
|
|
6393
6393
|
roomsLabelPlaceholder: "Add check-in and check-out",
|
|
6394
6394
|
eventsLabelPlaceholder: "Add search dates",
|
|
6395
6395
|
startDate: "Start date",
|
|
@@ -6397,7 +6397,7 @@ var calendar$1 = {
|
|
|
6397
6397
|
title: "Calendar"
|
|
6398
6398
|
};
|
|
6399
6399
|
var guests$1 = {
|
|
6400
|
-
label: "
|
|
6400
|
+
label: "Number of guests",
|
|
6401
6401
|
labelPlaceholder: "Add guests",
|
|
6402
6402
|
title: "Who's coming?",
|
|
6403
6403
|
adultsLabel: "Adults",
|
|
@@ -6425,7 +6425,7 @@ var enFilterBar = {
|
|
|
6425
6425
|
};
|
|
6426
6426
|
|
|
6427
6427
|
var calendar = {
|
|
6428
|
-
label: "
|
|
6428
|
+
label: "Ajankohta",
|
|
6429
6429
|
roomsLabelPlaceholder: "Lisää check-in ja check-out",
|
|
6430
6430
|
eventsLabelPlaceholder: "Lisää aikaväli",
|
|
6431
6431
|
startDate: "Alku",
|
|
@@ -6433,7 +6433,7 @@ var calendar = {
|
|
|
6433
6433
|
title: "Kalenteri"
|
|
6434
6434
|
};
|
|
6435
6435
|
var guests = {
|
|
6436
|
-
label: "
|
|
6436
|
+
label: "Vierasmäärä",
|
|
6437
6437
|
labelPlaceholder: "Lisää vieraat",
|
|
6438
6438
|
title: "Ketkä ovat tulossa?",
|
|
6439
6439
|
adultsLabel: "Aikuiset",
|
package/lib/index.umd.js
CHANGED
|
@@ -6391,7 +6391,7 @@
|
|
|
6391
6391
|
instance.loadLanguages;
|
|
6392
6392
|
|
|
6393
6393
|
var calendar$1 = {
|
|
6394
|
-
label: "
|
|
6394
|
+
label: "Date",
|
|
6395
6395
|
roomsLabelPlaceholder: "Add check-in and check-out",
|
|
6396
6396
|
eventsLabelPlaceholder: "Add search dates",
|
|
6397
6397
|
startDate: "Start date",
|
|
@@ -6399,7 +6399,7 @@
|
|
|
6399
6399
|
title: "Calendar"
|
|
6400
6400
|
};
|
|
6401
6401
|
var guests$1 = {
|
|
6402
|
-
label: "
|
|
6402
|
+
label: "Number of guests",
|
|
6403
6403
|
labelPlaceholder: "Add guests",
|
|
6404
6404
|
title: "Who's coming?",
|
|
6405
6405
|
adultsLabel: "Adults",
|
|
@@ -6427,7 +6427,7 @@
|
|
|
6427
6427
|
};
|
|
6428
6428
|
|
|
6429
6429
|
var calendar = {
|
|
6430
|
-
label: "
|
|
6430
|
+
label: "Ajankohta",
|
|
6431
6431
|
roomsLabelPlaceholder: "Lisää check-in ja check-out",
|
|
6432
6432
|
eventsLabelPlaceholder: "Lisää aikaväli",
|
|
6433
6433
|
startDate: "Alku",
|
|
@@ -6435,7 +6435,7 @@
|
|
|
6435
6435
|
title: "Kalenteri"
|
|
6436
6436
|
};
|
|
6437
6437
|
var guests = {
|
|
6438
|
-
label: "
|
|
6438
|
+
label: "Vierasmäärä",
|
|
6439
6439
|
labelPlaceholder: "Lisää vieraat",
|
|
6440
6440
|
title: "Ketkä ovat tulossa?",
|
|
6441
6441
|
adultsLabel: "Aikuiset",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"calendar": {
|
|
3
|
-
"label": "
|
|
3
|
+
"label": "Date",
|
|
4
4
|
"roomsLabelPlaceholder": "Add check-in and check-out",
|
|
5
5
|
"eventsLabelPlaceholder": "Add search dates",
|
|
6
6
|
"startDate": "Start date",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"title": "Calendar"
|
|
9
9
|
},
|
|
10
10
|
"guests": {
|
|
11
|
-
"label": "
|
|
11
|
+
"label": "Number of guests",
|
|
12
12
|
"labelPlaceholder": "Add guests",
|
|
13
13
|
"title": "Who's coming?",
|
|
14
14
|
"adultsLabel": "Adults",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"calendar": {
|
|
3
|
-
"label": "
|
|
3
|
+
"label": "Ajankohta",
|
|
4
4
|
"roomsLabelPlaceholder": "Lisää check-in ja check-out",
|
|
5
5
|
"eventsLabelPlaceholder": "Lisää aikaväli",
|
|
6
6
|
"startDate": "Alku",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"title": "Kalenteri"
|
|
9
9
|
},
|
|
10
10
|
"guests": {
|
|
11
|
-
"label": "
|
|
11
|
+
"label": "Vierasmäärä",
|
|
12
12
|
"labelPlaceholder": "Lisää vieraat",
|
|
13
13
|
"title": "Ketkä ovat tulossa?",
|
|
14
14
|
"adultsLabel": "Aikuiset",
|