@citizenplane/pimp 18.16.3 → 18.18.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/dist/components/CpAncillaryItem.vue.d.ts +30 -0
- package/dist/components/CpAncillaryItem.vue.d.ts.map +1 -0
- package/dist/components/CpBottomSheet.vue.d.ts +1 -1
- package/dist/components/CpDate.vue.d.ts +1 -1
- package/dist/components/CpDate.vue.d.ts.map +1 -1
- package/dist/components/CpDialog.vue.d.ts +1 -1
- package/dist/components/CpDialog.vue.d.ts.map +1 -1
- package/dist/components/CpQuantityCounter.vue.d.ts +24 -0
- package/dist/components/CpQuantityCounter.vue.d.ts.map +1 -0
- package/dist/components/CpSwitch.vue.d.ts +1 -1
- package/dist/components/CpSwitch.vue.d.ts.map +1 -1
- package/dist/components/CpTextarea.vue.d.ts +1 -1
- package/dist/components/CpTextarea.vue.d.ts.map +1 -1
- package/dist/components/CpTransitionCounter.vue.d.ts +1 -1
- package/dist/components/CpTransitionCounter.vue.d.ts.map +1 -1
- package/dist/components/index.d.ts +4 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/constants/CpAncillaryItemTypes.d.ts +31 -0
- package/dist/constants/CpAncillaryItemTypes.d.ts.map +1 -0
- package/dist/pimp.es.js +1720 -1569
- package/dist/pimp.umd.js +45 -45
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/assets/images/ancillaries/airport-transfer.png +0 -0
- package/src/assets/images/ancillaries/bicycle.png +0 -0
- package/src/assets/images/ancillaries/cabin-bag.png +0 -0
- package/src/assets/images/ancillaries/checked-bag-size-1.png +0 -0
- package/src/assets/images/ancillaries/checked-bag-size-2.png +0 -0
- package/src/assets/images/ancillaries/checked-bag-size-3.png +0 -0
- package/src/assets/images/ancillaries/checked-bag.png +0 -0
- package/src/assets/images/ancillaries/connectivity.png +0 -0
- package/src/assets/images/ancillaries/diving-set.png +0 -0
- package/src/assets/images/ancillaries/extra-weight.png +0 -0
- package/src/assets/images/ancillaries/fast-track.png +0 -0
- package/src/assets/images/ancillaries/firearm.png +0 -0
- package/src/assets/images/ancillaries/fishing-rod.png +0 -0
- package/src/assets/images/ancillaries/golf.png +0 -0
- package/src/assets/images/ancillaries/hand-bag.png +0 -0
- package/src/assets/images/ancillaries/kite-surf.png +0 -0
- package/src/assets/images/ancillaries/lounge-access.png +0 -0
- package/src/assets/images/ancillaries/meet-and-greet.png +0 -0
- package/src/assets/images/ancillaries/music.png +0 -0
- package/src/assets/images/ancillaries/oversized.png +0 -0
- package/src/assets/images/ancillaries/pet-in-cabin.png +0 -0
- package/src/assets/images/ancillaries/pet-in-hold.png +0 -0
- package/src/assets/images/ancillaries/skis.png +0 -0
- package/src/assets/images/ancillaries/special-meal.png +0 -0
- package/src/assets/images/ancillaries/standard-meal.png +0 -0
- package/src/components/CpAncillaryItem.vue +275 -0
- package/src/components/CpQuantityCounter.vue +106 -0
- package/src/components/index.ts +7 -0
- package/src/constants/CpAncillaryItemTypes.ts +30 -0
- package/src/stories/CpAncillaryItem.stories.ts +243 -0
- package/src/stories/CpQuantityCounter.stories.ts +63 -0
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="cpAncillaryItem" :class="cpAncillaryItemDynamicClass">
|
|
3
|
+
<div class="cpAncillaryItem__wrap">
|
|
4
|
+
<div class="cpAncillaryItem__visual">
|
|
5
|
+
<img v-if="ancillaryImage" alt="" class="cpAncillaryItem__image" :src="ancillaryImage" />
|
|
6
|
+
<cp-icon v-else class="cpAncillaryItem__fallbackIcon" size="40" type="shopping-bag" />
|
|
7
|
+
</div>
|
|
8
|
+
<div class="cpAncillaryItem__content">
|
|
9
|
+
<div class="cpAncillaryItem__name">
|
|
10
|
+
<p class="cpAncillaryItem__title">{{ title }}</p>
|
|
11
|
+
<p class="cpAncillaryItem__description">{{ description }}</p>
|
|
12
|
+
<p v-if="subtitle" class="cpAncillaryItem__subtitle">{{ subtitle }}</p>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="cpAncillaryItem__quantity">
|
|
15
|
+
<cp-quantity-counter
|
|
16
|
+
v-model="quantity"
|
|
17
|
+
class="cpAncillaryItem__counter"
|
|
18
|
+
:decrease-label="decreaseLabel"
|
|
19
|
+
:increase-label="increaseLabel"
|
|
20
|
+
:max="maxQuantity"
|
|
21
|
+
/>
|
|
22
|
+
<span v-if="hasMaxQuantity" class="cpAncillaryItem__maxQuantity">{{ maxQuantityLabel }}</span>
|
|
23
|
+
</div>
|
|
24
|
+
<p v-if="formattedPrice" class="cpAncillaryItem__price">{{ formattedPrice }}</p>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script setup lang="ts">
|
|
31
|
+
import { computed } from 'vue'
|
|
32
|
+
|
|
33
|
+
import CpIcon from '@/components/CpIcon.vue'
|
|
34
|
+
import CpQuantityCounter from '@/components/CpQuantityCounter.vue'
|
|
35
|
+
|
|
36
|
+
import AirportTransferImage from '@/assets/images/ancillaries/airport-transfer.png'
|
|
37
|
+
import BicycleImage from '@/assets/images/ancillaries/bicycle.png'
|
|
38
|
+
import CabinBagImage from '@/assets/images/ancillaries/cabin-bag.png'
|
|
39
|
+
import CheckedBagImage from '@/assets/images/ancillaries/checked-bag.png'
|
|
40
|
+
import CheckedBagSize1Image from '@/assets/images/ancillaries/checked-bag-size-1.png'
|
|
41
|
+
import CheckedBagSize2Image from '@/assets/images/ancillaries/checked-bag-size-2.png'
|
|
42
|
+
import CheckedBagSize3Image from '@/assets/images/ancillaries/checked-bag-size-3.png'
|
|
43
|
+
import ConnectivityImage from '@/assets/images/ancillaries/connectivity.png'
|
|
44
|
+
import DivingSetImage from '@/assets/images/ancillaries/diving-set.png'
|
|
45
|
+
import ExtraWeightImage from '@/assets/images/ancillaries/extra-weight.png'
|
|
46
|
+
import FastTrackImage from '@/assets/images/ancillaries/fast-track.png'
|
|
47
|
+
import FirearmImage from '@/assets/images/ancillaries/firearm.png'
|
|
48
|
+
import FishingRodImage from '@/assets/images/ancillaries/fishing-rod.png'
|
|
49
|
+
import GolfImage from '@/assets/images/ancillaries/golf.png'
|
|
50
|
+
import HandBagImage from '@/assets/images/ancillaries/hand-bag.png'
|
|
51
|
+
import KiteSurfImage from '@/assets/images/ancillaries/kite-surf.png'
|
|
52
|
+
import LoungeAccessImage from '@/assets/images/ancillaries/lounge-access.png'
|
|
53
|
+
import MeetAndGreetImage from '@/assets/images/ancillaries/meet-and-greet.png'
|
|
54
|
+
import MusicImage from '@/assets/images/ancillaries/music.png'
|
|
55
|
+
import OversizedImage from '@/assets/images/ancillaries/oversized.png'
|
|
56
|
+
import PetInCabinImage from '@/assets/images/ancillaries/pet-in-cabin.png'
|
|
57
|
+
import PetInHoldImage from '@/assets/images/ancillaries/pet-in-hold.png'
|
|
58
|
+
import SkisImage from '@/assets/images/ancillaries/skis.png'
|
|
59
|
+
import SpecialMealImage from '@/assets/images/ancillaries/special-meal.png'
|
|
60
|
+
import StandardMealImage from '@/assets/images/ancillaries/standard-meal.png'
|
|
61
|
+
import { CpAncillaryItemTypes } from '@/constants/CpAncillaryItemTypes'
|
|
62
|
+
|
|
63
|
+
interface Props {
|
|
64
|
+
currency?: string
|
|
65
|
+
description: string
|
|
66
|
+
locale?: string
|
|
67
|
+
maxQuantity?: number | null
|
|
68
|
+
maxQuantityLabel?: string
|
|
69
|
+
price?: number
|
|
70
|
+
subtitle?: string
|
|
71
|
+
title: string
|
|
72
|
+
type: CpAncillaryItemTypes
|
|
73
|
+
vertical?: boolean
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
77
|
+
locale: () => (typeof navigator === 'undefined' ? 'en' : navigator.language),
|
|
78
|
+
maxQuantity: null,
|
|
79
|
+
vertical: false,
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
const decreaseLabel = 'Decrease quantity'
|
|
83
|
+
const increaseLabel = 'Increase quantity'
|
|
84
|
+
|
|
85
|
+
const quantity = defineModel<number>('quantity', { required: true })
|
|
86
|
+
|
|
87
|
+
const ancillaryImages: Partial<Record<CpAncillaryItemTypes, string>> = {
|
|
88
|
+
[CpAncillaryItemTypes.AIRPORT_TRANSFER]: AirportTransferImage,
|
|
89
|
+
[CpAncillaryItemTypes.BICYCLE]: BicycleImage,
|
|
90
|
+
[CpAncillaryItemTypes.CABIN_BAG]: CabinBagImage,
|
|
91
|
+
[CpAncillaryItemTypes.CHECKED_BAG]: CheckedBagImage,
|
|
92
|
+
[CpAncillaryItemTypes.CHECKED_BAG_SIZE_1]: CheckedBagSize1Image,
|
|
93
|
+
[CpAncillaryItemTypes.CHECKED_BAG_SIZE_2]: CheckedBagSize2Image,
|
|
94
|
+
[CpAncillaryItemTypes.CHECKED_BAG_SIZE_3]: CheckedBagSize3Image,
|
|
95
|
+
[CpAncillaryItemTypes.CONNECTIVITY]: ConnectivityImage,
|
|
96
|
+
[CpAncillaryItemTypes.DIVING_SET]: DivingSetImage,
|
|
97
|
+
[CpAncillaryItemTypes.EXTRA_WEIGHT]: ExtraWeightImage,
|
|
98
|
+
[CpAncillaryItemTypes.FAST_TRACK]: FastTrackImage,
|
|
99
|
+
[CpAncillaryItemTypes.FIREARM]: FirearmImage,
|
|
100
|
+
[CpAncillaryItemTypes.FISHING_ROD]: FishingRodImage,
|
|
101
|
+
[CpAncillaryItemTypes.GOLF]: GolfImage,
|
|
102
|
+
[CpAncillaryItemTypes.HAND_BAG]: HandBagImage,
|
|
103
|
+
[CpAncillaryItemTypes.KITE_SURF]: KiteSurfImage,
|
|
104
|
+
[CpAncillaryItemTypes.LOUNGE_ACCESS]: LoungeAccessImage,
|
|
105
|
+
[CpAncillaryItemTypes.MEET_AND_GREET]: MeetAndGreetImage,
|
|
106
|
+
[CpAncillaryItemTypes.MUSIC]: MusicImage,
|
|
107
|
+
[CpAncillaryItemTypes.OVERSIZED]: OversizedImage,
|
|
108
|
+
[CpAncillaryItemTypes.PET_IN_CABIN]: PetInCabinImage,
|
|
109
|
+
[CpAncillaryItemTypes.PET_IN_HOLD]: PetInHoldImage,
|
|
110
|
+
[CpAncillaryItemTypes.SKIS]: SkisImage,
|
|
111
|
+
[CpAncillaryItemTypes.SPECIAL_MEAL]: SpecialMealImage,
|
|
112
|
+
[CpAncillaryItemTypes.STANDARD_MEAL]: StandardMealImage,
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const ancillaryImage = computed(() => ancillaryImages[props.type] ?? null)
|
|
116
|
+
|
|
117
|
+
const hasMaxQuantity = computed(() => props.maxQuantity !== null)
|
|
118
|
+
|
|
119
|
+
const formattedPrice = computed(() => {
|
|
120
|
+
if (props.price === undefined || !props.currency) return null
|
|
121
|
+
return new Intl.NumberFormat(props.locale, { style: 'currency', currency: props.currency }).format(props.price / 100)
|
|
122
|
+
})
|
|
123
|
+
|
|
124
|
+
const isSelected = computed(() => quantity.value > 0)
|
|
125
|
+
const cpAncillaryItemDynamicClass = computed(() => ({
|
|
126
|
+
'cpAncillaryItem--isVertical': props.vertical,
|
|
127
|
+
'cpAncillaryItem--isSelected': isSelected.value,
|
|
128
|
+
}))
|
|
129
|
+
</script>
|
|
130
|
+
|
|
131
|
+
<style lang="scss">
|
|
132
|
+
.cpAncillaryItem {
|
|
133
|
+
width: 100%;
|
|
134
|
+
box-sizing: border-box;
|
|
135
|
+
padding: var(--cp-spacing-sm);
|
|
136
|
+
border: fn.px-to-rem(1) solid var(--cp-border-soft);
|
|
137
|
+
border-radius: var(--cp-radius-md);
|
|
138
|
+
background: var(--cp-background-primary);
|
|
139
|
+
|
|
140
|
+
&__wrap {
|
|
141
|
+
display: flex;
|
|
142
|
+
height: 100%;
|
|
143
|
+
border-radius: var(--cp-radius-sm);
|
|
144
|
+
gap: var(--cp-spacing-lg);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&__visual {
|
|
148
|
+
display: flex;
|
|
149
|
+
overflow: hidden;
|
|
150
|
+
width: fn.px-to-rem(96);
|
|
151
|
+
flex: none;
|
|
152
|
+
align-items: center;
|
|
153
|
+
justify-content: center;
|
|
154
|
+
border-radius: var(--cp-radius-sm);
|
|
155
|
+
background: var(--cp-background-secondary);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&__image {
|
|
159
|
+
width: fn.px-to-rem(96);
|
|
160
|
+
height: fn.px-to-rem(96);
|
|
161
|
+
object-fit: contain;
|
|
162
|
+
transition: transform 200ms ease;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&__fallbackIcon {
|
|
166
|
+
color: var(--cp-text-tertiary);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&__content {
|
|
170
|
+
display: flex;
|
|
171
|
+
min-width: 0;
|
|
172
|
+
flex: auto;
|
|
173
|
+
flex-direction: column;
|
|
174
|
+
padding: var(--cp-spacing-lg) var(--cp-spacing-lg) var(--cp-spacing-lg) 0;
|
|
175
|
+
gap: var(--cp-spacing-lg);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
&__name {
|
|
179
|
+
display: flex;
|
|
180
|
+
min-width: 0;
|
|
181
|
+
flex-direction: column;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
&__title {
|
|
185
|
+
color: var(--cp-text-primary);
|
|
186
|
+
font-size: var(--cp-text-size-md);
|
|
187
|
+
font-weight: 600;
|
|
188
|
+
line-height: var(--cp-text-md-line-height);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&__description,
|
|
192
|
+
&__subtitle {
|
|
193
|
+
color: var(--cp-text-secondary);
|
|
194
|
+
font-size: var(--cp-text-size-sm);
|
|
195
|
+
line-height: var(--cp-text-sm-line-height);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
&__quantity {
|
|
199
|
+
display: flex;
|
|
200
|
+
align-items: center;
|
|
201
|
+
gap: var(--cp-spacing-md);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
&__maxQuantity {
|
|
205
|
+
color: var(--cp-text-tertiary);
|
|
206
|
+
font-size: var(--cp-text-size-xs);
|
|
207
|
+
line-height: var(--cp-text-xs-line-height);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
&__price {
|
|
211
|
+
color: var(--cp-text-accent-primary);
|
|
212
|
+
font-size: var(--cp-text-size-md);
|
|
213
|
+
font-weight: 600;
|
|
214
|
+
line-height: var(--cp-text-md-line-height);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
&--isVertical {
|
|
218
|
+
.cpAncillaryItem__wrap {
|
|
219
|
+
flex-direction: column;
|
|
220
|
+
align-items: center;
|
|
221
|
+
padding-bottom: var(--cp-spacing-lg);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.cpAncillaryItem__visual {
|
|
225
|
+
width: 100%;
|
|
226
|
+
height: fn.px-to-rem(128);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.cpAncillaryItem__image {
|
|
230
|
+
width: fn.px-to-rem(80);
|
|
231
|
+
height: fn.px-to-rem(80);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.cpAncillaryItem__content {
|
|
235
|
+
width: 100%;
|
|
236
|
+
align-items: center;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.cpAncillaryItem__name {
|
|
240
|
+
padding: 0 var(--cp-spacing-lg);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.cpAncillaryItem__title,
|
|
244
|
+
.cpAncillaryItem__description,
|
|
245
|
+
.cpAncillaryItem__subtitle {
|
|
246
|
+
text-align: center;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.cpAncillaryItem__quantity {
|
|
250
|
+
flex-direction: column;
|
|
251
|
+
gap: var(--cp-spacing-sm);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
&--isSelected {
|
|
256
|
+
border-color: var(--cp-border-accent-solid);
|
|
257
|
+
outline: fn.px-to-rem(1) solid var(--cp-border-accent-solid);
|
|
258
|
+
outline-offset: fn.px-to-rem(-2);
|
|
259
|
+
|
|
260
|
+
.cpAncillaryItem__wrap {
|
|
261
|
+
background: var(--cp-background-secondary);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.cpAncillaryItem__counter {
|
|
265
|
+
background: var(--cp-background-primary);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
@media (hover: hover) {
|
|
270
|
+
&:hover .cpAncillaryItem__image {
|
|
271
|
+
transform: scale3d(1.1, 1.1, 1);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
</style>
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="cpQuantityCounter">
|
|
3
|
+
<button
|
|
4
|
+
:aria-label="decreaseLabel"
|
|
5
|
+
class="cpQuantityCounter__button"
|
|
6
|
+
:disabled="isDecrementDisabled"
|
|
7
|
+
type="button"
|
|
8
|
+
@click="decrement"
|
|
9
|
+
>
|
|
10
|
+
<cp-icon size="16" type="minus" />
|
|
11
|
+
</button>
|
|
12
|
+
<cp-transition-counter v-if="!disableAnimation" class="cpQuantityCounter__count" :counter-number="modelValue">
|
|
13
|
+
<span>{{ modelValue }}</span>
|
|
14
|
+
</cp-transition-counter>
|
|
15
|
+
<span v-else class="cpQuantityCounter__count">{{ modelValue }}</span>
|
|
16
|
+
<button
|
|
17
|
+
:aria-label="increaseLabel"
|
|
18
|
+
class="cpQuantityCounter__button cpQuantityCounter__button--isAccent"
|
|
19
|
+
:disabled="isIncrementDisabled"
|
|
20
|
+
type="button"
|
|
21
|
+
@click="increment"
|
|
22
|
+
>
|
|
23
|
+
<cp-icon size="16" type="plus" />
|
|
24
|
+
</button>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script setup lang="ts">
|
|
29
|
+
import { computed } from 'vue'
|
|
30
|
+
|
|
31
|
+
import CpIcon from '@/components/CpIcon.vue'
|
|
32
|
+
import CpTransitionCounter from '@/components/CpTransitionCounter.vue'
|
|
33
|
+
|
|
34
|
+
interface Props {
|
|
35
|
+
decreaseLabel: string
|
|
36
|
+
disableAnimation?: boolean
|
|
37
|
+
increaseLabel: string
|
|
38
|
+
max?: number | null
|
|
39
|
+
min?: number
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const props = withDefaults(defineProps<Props>(), { disableAnimation: false, max: null, min: 0 })
|
|
43
|
+
|
|
44
|
+
const modelValue = defineModel<number>({ required: true })
|
|
45
|
+
|
|
46
|
+
const isDecrementDisabled = computed(() => modelValue.value <= props.min)
|
|
47
|
+
const isIncrementDisabled = computed(() => props.max !== null && modelValue.value >= props.max)
|
|
48
|
+
|
|
49
|
+
const decrement = () => {
|
|
50
|
+
if (isDecrementDisabled.value) return
|
|
51
|
+
modelValue.value -= 1
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const increment = () => {
|
|
55
|
+
if (isIncrementDisabled.value) return
|
|
56
|
+
modelValue.value += 1
|
|
57
|
+
}
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<style lang="scss">
|
|
61
|
+
.cpQuantityCounter {
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
padding: var(--cp-spacing-xs);
|
|
65
|
+
border-radius: var(--cp-radius-md-lg);
|
|
66
|
+
background: var(--cp-background-accent-primary);
|
|
67
|
+
gap: var(--cp-spacing-sm);
|
|
68
|
+
|
|
69
|
+
&__button {
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
justify-content: center;
|
|
73
|
+
padding: var(--cp-spacing-sm-md);
|
|
74
|
+
border: fn.px-to-rem(1) solid var(--cp-border-soft);
|
|
75
|
+
border-radius: var(--cp-radius-md);
|
|
76
|
+
background: var(--cp-background-primary);
|
|
77
|
+
box-shadow: var(--cp-shadows-3xs);
|
|
78
|
+
color: var(--cp-text-primary);
|
|
79
|
+
|
|
80
|
+
@include mx.square-sizing(28);
|
|
81
|
+
@extend %u-focus-outline;
|
|
82
|
+
|
|
83
|
+
&:disabled {
|
|
84
|
+
border-color: transparent;
|
|
85
|
+
background: var(--cp-background-secondary);
|
|
86
|
+
box-shadow: none;
|
|
87
|
+
color: var(--cp-text-disabled);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&--isAccent {
|
|
91
|
+
color: var(--cp-text-accent-primary);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&__count {
|
|
96
|
+
display: flex;
|
|
97
|
+
width: fn.px-to-rem(24);
|
|
98
|
+
justify-content: center;
|
|
99
|
+
color: var(--cp-text-primary);
|
|
100
|
+
font-size: var(--cp-text-size-sm);
|
|
101
|
+
font-weight: 500;
|
|
102
|
+
line-height: var(--cp-text-sm-line-height);
|
|
103
|
+
text-align: center;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
</style>
|
package/src/components/index.ts
CHANGED
|
@@ -19,6 +19,7 @@ import CpAccordion from './CpAccordion.vue'
|
|
|
19
19
|
import CpAccordionGroup from './CpAccordionGroup.vue'
|
|
20
20
|
import CpAirlineLogo from './CpAirlineLogo.vue'
|
|
21
21
|
import CpAlert from './CpAlert.vue'
|
|
22
|
+
import CpAncillaryItem from './CpAncillaryItem.vue'
|
|
22
23
|
import CpBadge from './CpBadge.vue'
|
|
23
24
|
import CpBottomSheet from './CpBottomSheet.vue'
|
|
24
25
|
import CpButton from './CpButton.vue'
|
|
@@ -40,6 +41,7 @@ import CpMenu from './CpMenu.vue'
|
|
|
40
41
|
import CpMenuItem from './CpMenuItem.vue'
|
|
41
42
|
import CpMenuList from './CpMenuList.vue'
|
|
42
43
|
import CpMultiselect from './CpMultiselect.vue'
|
|
44
|
+
import CpQuantityCounter from './CpQuantityCounter.vue'
|
|
43
45
|
import CpRadio from './CpRadio.vue'
|
|
44
46
|
import CpRadioGroup from './CpRadioGroup.vue'
|
|
45
47
|
import CpRadioNew from './CpRadioNew.vue'
|
|
@@ -113,6 +115,7 @@ const Components = {
|
|
|
113
115
|
CpRadioNew,
|
|
114
116
|
CpCalendar,
|
|
115
117
|
CpAlert,
|
|
118
|
+
CpAncillaryItem,
|
|
116
119
|
CpLoader,
|
|
117
120
|
CpInput,
|
|
118
121
|
CpText,
|
|
@@ -120,6 +123,7 @@ const Components = {
|
|
|
120
123
|
CpSelect,
|
|
121
124
|
CpSelectMenu,
|
|
122
125
|
CpMultiselect,
|
|
126
|
+
CpQuantityCounter,
|
|
123
127
|
CpCheckbox,
|
|
124
128
|
CpRadio,
|
|
125
129
|
CpRadioGroup,
|
|
@@ -205,6 +209,7 @@ export type {
|
|
|
205
209
|
FlightTerminal,
|
|
206
210
|
} from '@/constants/tripDetails'
|
|
207
211
|
|
|
212
|
+
export { CpAncillaryItemTypes } from '@/constants/CpAncillaryItemTypes'
|
|
208
213
|
export {
|
|
209
214
|
CpSeatMapTransitionDirections,
|
|
210
215
|
DEFAULT_CP_SEAT_MAP_CONFIG,
|
|
@@ -222,6 +227,7 @@ export {
|
|
|
222
227
|
CpAccordionGroup,
|
|
223
228
|
CpAirlineLogo,
|
|
224
229
|
CpAlert,
|
|
230
|
+
CpAncillaryItem,
|
|
225
231
|
CpBadge,
|
|
226
232
|
CpBottomSheet,
|
|
227
233
|
CpButton,
|
|
@@ -244,6 +250,7 @@ export {
|
|
|
244
250
|
CpMenuItem,
|
|
245
251
|
CpMenuList,
|
|
246
252
|
CpMultiselect,
|
|
253
|
+
CpQuantityCounter,
|
|
247
254
|
CpRadio,
|
|
248
255
|
CpRadioGroup,
|
|
249
256
|
CpRadioNew,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export enum CpAncillaryItemTypes {
|
|
2
|
+
AIRPORT_TRANSFER = 'airportTransfer',
|
|
3
|
+
BICYCLE = 'bicycle',
|
|
4
|
+
CABIN_BAG = 'cabinBag',
|
|
5
|
+
CANCELLATION_INSURANCE = 'cancellationInsurance',
|
|
6
|
+
CHECKED_BAG = 'checkedBag',
|
|
7
|
+
CHECKED_BAG_SIZE_1 = 'checkedBagSize1',
|
|
8
|
+
CHECKED_BAG_SIZE_2 = 'checkedBagSize2',
|
|
9
|
+
CHECKED_BAG_SIZE_3 = 'checkedBagSize3',
|
|
10
|
+
CONNECTIVITY = 'connectivity',
|
|
11
|
+
DIVING_SET = 'divingSet',
|
|
12
|
+
EXTRA_WEIGHT = 'extraWeight',
|
|
13
|
+
FAST_TRACK = 'fastTrack',
|
|
14
|
+
FIREARM = 'firearm',
|
|
15
|
+
FISHING_ROD = 'fishingRod',
|
|
16
|
+
GOLF = 'golf',
|
|
17
|
+
HAND_BAG = 'handBag',
|
|
18
|
+
KITE_SURF = 'kiteSurf',
|
|
19
|
+
LOUNGE_ACCESS = 'loungeAccess',
|
|
20
|
+
MEET_AND_GREET = 'meetAndGreet',
|
|
21
|
+
MUSIC = 'music',
|
|
22
|
+
NAME_CHANGE = 'nameChange',
|
|
23
|
+
OTHER = 'other',
|
|
24
|
+
OVERSIZED = 'oversized',
|
|
25
|
+
PET_IN_CABIN = 'petInCabin',
|
|
26
|
+
PET_IN_HOLD = 'petInHold',
|
|
27
|
+
SKIS = 'skis',
|
|
28
|
+
SPECIAL_MEAL = 'specialMeal',
|
|
29
|
+
STANDARD_MEAL = 'standardMeal',
|
|
30
|
+
}
|