airport-one-embeddable-widgets 0.34.0 → 0.35.0
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 +145 -1
- package/dist/airport-one-embeddable-widgets.iife.js +12 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ The Flight Search Form Custom Element is a web component that you can use in you
|
|
|
5
5
|
To include the flight-search-form custom element in your project, add the following script tag to your HTML file:
|
|
6
6
|
|
|
7
7
|
```html
|
|
8
|
-
<script src="https://unpkg.com/airport-one-embeddable-widgets@
|
|
8
|
+
<script src="https://unpkg.com/airport-one-embeddable-widgets@latest/dist/airport-one-embeddable-widgets.iife.js"></script>
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
@@ -42,3 +42,147 @@ For example, to set the origin and destination airports, you can use the followi
|
|
|
42
42
|
<flight-search-form origin="JFK" destination="LAX"></flight-search-form>
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
+
# Styling
|
|
46
|
+
|
|
47
|
+
## Flight Search Widget: Element Descriptions
|
|
48
|
+
|
|
49
|
+
### 1. `flight-search-widget-container`
|
|
50
|
+
The main container wrapping the entire flight search widget. Target this to style the overall appearance.
|
|
51
|
+
|
|
52
|
+
### 2. `flight-search-widget-form`
|
|
53
|
+
The form inside the widget that contains the search inputs and buttons. Customize this to modify the form layout and styling.
|
|
54
|
+
|
|
55
|
+
### 3. `flight-search-widget-autocomplete-container`
|
|
56
|
+
Holds the autocomplete functionality for the departure and arrival airports. Style this container to enhance the autocomplete feature.
|
|
57
|
+
|
|
58
|
+
### 4. `flight-search-widget-autocomplete-wrapper`
|
|
59
|
+
Wraps each autocomplete input. Target this to customize the wrapper around the autocomplete input fields.
|
|
60
|
+
|
|
61
|
+
### 5. `flight-search-widget-autocomplete-icon`
|
|
62
|
+
The icon associated with the autocomplete input field. Style this to change the icon's appearance.
|
|
63
|
+
|
|
64
|
+
### 6. `flight-search-widget-autocomplete-input`
|
|
65
|
+
The input field for the autocomplete feature. Modify its appearance and behavior as needed.
|
|
66
|
+
|
|
67
|
+
### 7. `flight-search-widget-switch`
|
|
68
|
+
The switch button that allows users to swap departure and arrival airports. Style this to improve visual appeal and click-feedback.
|
|
69
|
+
|
|
70
|
+
### 8. `flight-search-widget-switch-svg`
|
|
71
|
+
The SVG graphic within the switch button. Customize this for the desired visual effect.
|
|
72
|
+
|
|
73
|
+
### 9. `flight-search-widget-date-range-container`
|
|
74
|
+
Holds the date range inputs for selecting departure and return dates. Customize this for layout and styling of the date inputs.
|
|
75
|
+
|
|
76
|
+
### 10. `flight-search-widget-date-range-icon`
|
|
77
|
+
The icon within the date range inputs. Style this to change the appearance of the date selection icons.
|
|
78
|
+
|
|
79
|
+
### 11. `flight-search-widget-date-range-start-date-input`
|
|
80
|
+
The input field for selecting the departure date. Modify its appearance and behavior as needed.
|
|
81
|
+
|
|
82
|
+
### 12. `flight-search-widget-date-range-vertical-line-separator`
|
|
83
|
+
The vertical line separator between the departure and return date inputs. Style this to create a distinct separator effect.
|
|
84
|
+
|
|
85
|
+
### 13. `flight-search-widget-date-range-end-date-input`
|
|
86
|
+
The input field for selecting the return date. Modify its appearance and behavior as needed.
|
|
87
|
+
|
|
88
|
+
### 14. `flight-search-widget-search-button-container`
|
|
89
|
+
The container that holds the search button. Customize this to adjust the button's position within the widget.
|
|
90
|
+
|
|
91
|
+
### 15. `flight-search-widget-search-button`
|
|
92
|
+
The search button that submits the flight search. Style this for visual appeal and interactive feedback.
|
|
93
|
+
|
|
94
|
+
### 16. `flight-search-widget-search-button-svg`
|
|
95
|
+
The SVG graphic within the search button. Customize this for the desired visual effect.
|
|
96
|
+
|
|
97
|
+
### Example usage
|
|
98
|
+
```css
|
|
99
|
+
/* Targeting the main container */
|
|
100
|
+
flight-search-form::part(flight-search-widget-container) {
|
|
101
|
+
background-color: #f9f9f9;
|
|
102
|
+
border-radius: 5px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* Styling the form inside the widget */
|
|
106
|
+
flight-search-form::part(flight-search-widget-form) {
|
|
107
|
+
padding: 20px;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* Enhancing the autocomplete container */
|
|
111
|
+
flight-search-form::part(flight-search-widget-autocomplete-container) {
|
|
112
|
+
background-color: #fff;
|
|
113
|
+
border: 1px solid #ddd;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Customizing the autocomplete wrapper */
|
|
117
|
+
flight-search-form::part(flight-search-widget-autocomplete-wrapper) {
|
|
118
|
+
padding: 10px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* Changing the autocomplete icon's appearance */
|
|
122
|
+
flight-search-form::part(flight-search-widget-autocomplete-icon) {
|
|
123
|
+
fill: #888;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* Modifying the appearance and behavior of the autocomplete input field */
|
|
127
|
+
flight-search-form::part(flight-search-widget-autocomplete-input) {
|
|
128
|
+
border: none;
|
|
129
|
+
outline: none;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* Styling the switch button */
|
|
133
|
+
flight-search-form::part(flight-search-widget-switch) {
|
|
134
|
+
background-color: #007BFF;
|
|
135
|
+
color: #fff;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* Customizing the switch button SVG graphic */
|
|
139
|
+
flight-search-form::part(flight-search-widget-switch-svg) {
|
|
140
|
+
fill: #fff;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* Customizing the date range container */
|
|
144
|
+
flight-search-form::part(flight-search-widget-date-range-container) {
|
|
145
|
+
display: flex;
|
|
146
|
+
justify-content: space-between;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* Changing the appearance of the date selection icons */
|
|
150
|
+
flight-search-form::part(flight-search-widget-date-range-icon) {
|
|
151
|
+
fill: #888;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* Modifying the appearance of the departure date input field */
|
|
155
|
+
flight-search-form::part(flight-search-widget-date-range-start-date-input) {
|
|
156
|
+
border: none;
|
|
157
|
+
outline: none;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* Styling the vertical line separator */
|
|
161
|
+
flight-search-form::part(flight-search-widget-date-range-vertical-line-separator) {
|
|
162
|
+
border-left: 1px solid #ddd;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* Modifying the appearance of the return date input field */
|
|
166
|
+
flight-search-form::part(flight-search-widget-date-range-end-date-input) {
|
|
167
|
+
border: none;
|
|
168
|
+
outline: none;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* Customizing the search button container */
|
|
172
|
+
flight-search-form::part(flight-search-widget-search-button-container) {
|
|
173
|
+
text-align: right;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/* Styling the search button */
|
|
177
|
+
flight-search-form::part(flight-search-widget-search-button) {
|
|
178
|
+
background-color: #007BFF;
|
|
179
|
+
color: #fff;
|
|
180
|
+
padding: 10px 20px;
|
|
181
|
+
border-radius: 5px;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/* Customizing the search button SVG graphic */
|
|
185
|
+
flight-search-form::part(flight-search-widget-search-button-svg) {
|
|
186
|
+
fill: #fff;
|
|
187
|
+
}
|
|
188
|
+
```
|