@citizenplane/pimp 8.20.4 → 8.22.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.
Files changed (140) hide show
  1. package/README.md +23 -2
  2. package/dist/IconAccompaniedMinorEach-DVJcuHj0.js +18 -0
  3. package/dist/IconAccompaniedMinorNone-BXf4n4ou.js +19 -0
  4. package/dist/IconAccompaniedMinorOne-CNdC-xeI.js +18 -0
  5. package/dist/IconAddReceipt-BFz16BpE.js +22 -0
  6. package/dist/IconAirportTerminal-CVkKwFXB.js +23 -0
  7. package/dist/IconArrival-C3UZ0X3K.js +23 -0
  8. package/dist/IconBroadcast-C0PyG0ON.js +20 -0
  9. package/dist/IconCabinBag-Dbfd3eU9.js +20 -0
  10. package/dist/IconCheckedBaggage--V-SlEA8.js +18 -0
  11. package/dist/IconCheckedBaggage20-qxIkw6m1.js +20 -0
  12. package/dist/IconCheckedBaggage30-BvMLcDVK.js +20 -0
  13. package/dist/IconChild-DQa4WqLv.js +21 -0
  14. package/dist/IconContact-CpjzDGE9.js +20 -0
  15. package/dist/IconDeparture-BgVq_dTQ.js +23 -0
  16. package/dist/IconDistribution-BbcHTmnJ.js +20 -0
  17. package/dist/IconDistributionClosed-BKSkMVr_.js +20 -0
  18. package/dist/IconDistributionExclusivePair-B4sktgJ5.js +18 -0
  19. package/dist/IconDistributionSided-DYDvAPYA.js +31 -0
  20. package/dist/IconDistributionSupplySided-Kj6qqifp.js +31 -0
  21. package/dist/IconDynamicContent-DvIytfat.js +21 -0
  22. package/dist/IconFares-DV3aFH6m.js +18 -0
  23. package/dist/IconFaresOutlined-DYEOkY_L.js +23 -0
  24. package/dist/IconFemale-D2Mfa1QV.js +33 -0
  25. package/dist/IconFindConversation-8wEIdKQV.js +24 -0
  26. package/dist/IconFire-pBaXc12G.js +22 -0
  27. package/dist/IconFlight-C5C7PmQR.js +23 -0
  28. package/dist/IconFlightReturn-BHKIKmJU.js +18 -0
  29. package/dist/IconHandHeart-WBIMaQuQ.js +21 -0
  30. package/dist/IconHistory-yZOWejhP.js +19 -0
  31. package/dist/IconHourGlass-CqyVtXKn.js +31 -0
  32. package/dist/IconIdCard-C1LVMNO2.js +22 -0
  33. package/dist/IconInfant-jlx5bYg6.js +18 -0
  34. package/dist/IconMale-DBRDgP6y.js +21 -0
  35. package/dist/IconMultiSegments-BNeLi2v7.js +18 -0
  36. package/dist/IconNoRefund-CnYqcTPx.js +18 -0
  37. package/dist/IconNotion-k-88gdS4.js +18 -0
  38. package/dist/IconOffline-sxl4gIDa.js +20 -0
  39. package/dist/IconPaid-DerAlBSC.js +23 -0
  40. package/dist/IconPassport-CrcNh_qG.js +22 -0
  41. package/dist/IconPayout-CS6i4g1R.js +20 -0
  42. package/dist/IconReceipt-DW0CutDY.js +25 -0
  43. package/dist/IconRecurrence-VbfPoDYR.js +24 -0
  44. package/dist/IconRefund-CXSRbRLD.js +19 -0
  45. package/dist/IconRoundTrip-Bt9-qnbY.js +20 -0
  46. package/dist/IconRouteNoStop-DL8Y30wj.js +18 -0
  47. package/dist/IconRouteOneStop-CTEyyVWa.js +18 -0
  48. package/dist/IconScheduleChange-Cfbc6YaK.js +19 -0
  49. package/dist/IconSeatEmpty-DXRMdLkb.js +25 -0
  50. package/dist/IconSeatSold-BEe-3cEz.js +22 -0
  51. package/dist/IconSeatTotal-IpvEJlaf.js +22 -0
  52. package/dist/IconTemplate-DzowVaSP.js +23 -0
  53. package/dist/IconTicket-o3P0xLEU.js +22 -0
  54. package/dist/IconTimer-DlMeU4t-.js +23 -0
  55. package/dist/IconTrafficControl-B1knXbCR.js +24 -0
  56. package/dist/index-CNDZl4Ol.js +15377 -0
  57. package/dist/pimp.es.js +2 -15377
  58. package/dist/pimp.umd.js +3 -3
  59. package/dist/style.css +1 -1
  60. package/package.json +12 -5
  61. package/src/README.md +1 -6
  62. package/src/assets/styles/base/_base.scss +3 -2
  63. package/src/assets/styles/helpers/_mixins.scss +1 -1
  64. package/src/assets/styles/utilities/_index.scss +1 -1
  65. package/src/assets/styles/variables/_colors.scss +16 -16
  66. package/src/components/atomic-elements/CpBadge.vue +82 -138
  67. package/src/components/feedback-indicators/CpToaster.vue +7 -2
  68. package/src/components/helpers-utilities/TransitionExpand.vue +0 -6
  69. package/src/components/icons/IconAccompaniedMinorEach.vue +30 -0
  70. package/src/components/icons/IconAccompaniedMinorNone.vue +10 -0
  71. package/src/components/icons/IconAccompaniedMinorOne.vue +22 -0
  72. package/src/components/icons/IconAddReceipt.vue +17 -0
  73. package/src/components/icons/IconAirportTerminal.vue +10 -0
  74. package/src/components/icons/IconArrival.vue +18 -0
  75. package/src/components/icons/IconBroadcast.vue +35 -0
  76. package/src/components/icons/IconCabinBag.vue +36 -0
  77. package/src/components/icons/IconCheckedBaggage.vue +11 -0
  78. package/src/components/icons/IconCheckedBaggage20.vue +36 -0
  79. package/src/components/icons/IconCheckedBaggage30.vue +39 -0
  80. package/src/components/icons/IconChild.vue +16 -0
  81. package/src/components/icons/IconContact.vue +15 -0
  82. package/src/components/icons/IconDeparture.vue +18 -0
  83. package/src/components/icons/IconDistribution.vue +19 -0
  84. package/src/components/icons/IconDistributionClosed.vue +30 -0
  85. package/src/components/icons/IconDistributionExclusivePair.vue +7 -0
  86. package/src/components/icons/IconDistributionSided.vue +24 -0
  87. package/src/components/icons/IconDistributionSupplySided.vue +24 -0
  88. package/src/components/icons/IconDynamicContent.vue +18 -0
  89. package/src/components/icons/IconFares.vue +7 -0
  90. package/src/components/icons/IconFaresOutlined.vue +24 -0
  91. package/src/components/icons/IconFemale.vue +20 -0
  92. package/src/components/icons/IconFindConversation.vue +21 -0
  93. package/src/components/icons/IconFire.vue +9 -0
  94. package/src/components/icons/IconFlight.vue +16 -0
  95. package/src/components/icons/IconFlightReturn.vue +7 -0
  96. package/src/components/icons/IconHandHeart.vue +18 -0
  97. package/src/components/icons/IconHistory.vue +10 -0
  98. package/src/components/icons/IconHourGlass.vue +25 -0
  99. package/src/components/icons/IconIdCard.vue +17 -0
  100. package/src/components/icons/IconInfant.vue +22 -0
  101. package/src/components/icons/IconMale.vue +8 -0
  102. package/src/components/icons/IconMultiSegments.vue +7 -0
  103. package/src/components/icons/IconNoRefund.vue +19 -0
  104. package/src/components/icons/IconNotion.vue +7 -0
  105. package/src/components/icons/IconOffline.vue +25 -0
  106. package/src/components/icons/IconPaid.vue +18 -0
  107. package/src/components/icons/IconPassport.vue +21 -0
  108. package/src/components/icons/IconPayout.vue +15 -0
  109. package/src/components/icons/IconReceipt.vue +20 -0
  110. package/src/components/icons/IconRecurrence.vue +15 -0
  111. package/src/components/icons/IconRefund.vue +10 -0
  112. package/src/components/icons/IconRoundTrip.vue +15 -0
  113. package/src/components/icons/IconRouteNoStop.vue +7 -0
  114. package/src/components/icons/IconRouteOneStop.vue +7 -0
  115. package/src/components/icons/IconScheduleChange.vue +31 -0
  116. package/src/components/icons/IconSeatEmpty.vue +22 -0
  117. package/src/components/icons/IconSeatSold.vue +21 -0
  118. package/src/components/icons/IconSeatTotal.vue +27 -0
  119. package/src/components/icons/IconTemplate.vue +18 -0
  120. package/src/components/icons/IconTicket.vue +23 -0
  121. package/src/components/icons/IconTimer.vue +12 -0
  122. package/src/components/icons/IconTrafficControl.vue +11 -0
  123. package/src/components/{index.js → index.ts} +1 -3
  124. package/src/components/inputs/CpInput.vue +2 -2
  125. package/src/components/lists-and-table/CpTable.vue +4 -2
  126. package/src/components/selects/CpSelectMenu.vue +6 -2
  127. package/src/components/visual/CpIcon.vue +76 -62
  128. package/src/constants/{index.js → index.ts} +1 -0
  129. package/src/constants/src/CpCustomIcons.ts +69 -0
  130. package/src/constants/src/colors/{ToggleColors.js → ToggleColors.ts} +1 -1
  131. package/src/libs/CoreDatepicker.vue +4 -1
  132. package/src/stories/CpBadge.stories.ts +80 -90
  133. package/src/stories/CpIcon.stories.ts +60 -27
  134. package/src/stories/CpSelectMenu.stories.ts +1 -1
  135. package/tsconfig.json +14 -0
  136. package/src/components/atomic-elements/CpBadgeNew.vue +0 -145
  137. package/src/stories/CpBadgeNew.stories.ts +0 -148
  138. /package/src/constants/src/{CpTableConfig.js → CpTableConfig.ts} +0 -0
  139. /package/src/constants/src/{Position.js → Position.ts} +0 -0
  140. /package/src/constants/src/colors/{Colors.js → Colors.ts} +0 -0
@@ -0,0 +1,10 @@
1
+ <template>
2
+ <svg width="24" height="25" viewBox="0 0 24 25" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
3
+ <path
4
+ d="M3.77243 10.2761C4.64589 6.12802 8.30266 3.15687 12.5416 3.151C17.4892 3.151 21.5 7.1618 21.5 12.1094C21.5 17.057 17.4892 21.0678 12.5416 21.0678C12.0814 21.0678 11.7083 20.6947 11.7083 20.2344C11.7083 19.7742 12.0814 19.4011 12.5416 19.4011C16.3167 19.4011 19.4676 16.5197 19.8042 12.7596C20.1408 8.99949 17.5519 5.60423 13.8368 4.93364C10.1218 4.26305 6.50916 6.5389 5.50994 10.1794C5.49243 10.2421 5.50533 10.3093 5.54479 10.3611C5.58425 10.4128 5.6457 10.443 5.71077 10.4427H7.16661C7.33613 10.4407 7.48996 10.5416 7.55566 10.6979C7.62136 10.8542 7.58582 11.0347 7.46578 11.1544L4.8391 13.7802C4.67639 13.9429 4.41264 13.9429 4.24993 13.7802L1.62242 11.1544C1.50305 11.0353 1.4672 10.8561 1.53161 10.7002C1.59602 10.5444 1.74799 10.4428 1.91659 10.4427H3.5691C3.66792 10.4427 3.75299 10.373 3.77243 10.2761Z"
5
+ />
6
+ <path
7
+ d="M10.2454 15.391C10.2454 15.943 10.6133 16.3109 11.1652 16.3109L11.5332 16.1269C11.6251 16.1269 11.7171 16.2189 11.7171 16.3109V16.4029C11.7171 16.9548 12.0851 17.3227 12.637 17.3227C13.1889 17.3227 13.5568 16.9548 13.5568 16.4029V16.2189C13.5568 16.1269 13.6488 16.0349 13.7408 16.0349C14.4767 15.851 15.0286 15.391 15.3046 14.6552C15.7645 13.5513 15.2126 12.1715 14.0168 11.7116L11.9011 10.8837C11.7171 10.7917 11.6251 10.6078 11.6251 10.4238C11.6251 10.1478 11.8091 9.96387 12.0851 9.96387H14.2007C14.7527 9.96387 15.1206 9.59593 15.1206 9.04401C15.1206 8.4921 14.7527 8.12416 14.2007 8.12416H13.8328C13.7408 8.12416 13.6488 8.03217 13.6488 7.94018V7.8482C13.6488 7.29628 13.2809 6.92834 12.729 6.92834C12.1771 6.92834 11.8091 7.29628 11.8091 7.8482V8.21614C11.8091 8.30813 11.7171 8.40012 11.6251 8.40012C10.8893 8.58409 10.3373 9.04401 10.0614 9.7799C9.60149 10.8837 10.1534 12.2635 11.3492 12.7235L13.4649 13.5513C13.6488 13.6433 13.7408 13.8273 13.7408 14.0113C13.7408 14.2872 13.5568 14.4712 13.2809 14.4712H11.1652C10.6133 14.4712 10.2454 14.8391 10.2454 15.391Z"
8
+ />
9
+ </svg>
10
+ </template>
@@ -0,0 +1,15 @@
1
+ <template>
2
+ <svg
3
+ width="24"
4
+ height="24"
5
+ viewBox="0 0 24 24"
6
+ fill="currentColor"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ fill-rule="evenodd"
9
+ clip-rule="evenodd"
10
+ >
11
+ <path
12
+ d="M6.74805 9.61494C7.23216 10.0422 8.12116 9.75737 8.12116 9.11655L8.1212 7.6363H16.1213C17.3263 7.6363 18.3031 8.61312 18.3031 9.81809V11.0302C18.3031 11.4319 18.6287 11.7575 19.0304 11.7575C19.432 11.7575 19.7576 11.4319 19.7576 11.0302V9.81809C19.7576 7.80981 18.1296 6.18177 16.1213 6.18177H8.12123L8.12126 4.70192C8.12126 4.06101 7.23216 3.77555 6.74805 4.20344L4.24193 6.41076C3.91948 6.69563 3.91948 7.12284 4.24193 7.40762L6.74805 9.61494ZM7.87882 17.3332L15.8789 17.3332L15.8788 18.813C15.8788 19.4539 16.7679 19.7393 17.2521 19.3114L19.7582 17.1041C20.0806 16.8192 20.0806 16.392 19.7582 16.1073L17.2521 13.8999C16.7679 13.4726 15.8789 13.7575 15.8789 14.3983L15.8789 15.8787L7.87882 15.8787C6.67385 15.8787 5.69702 14.9019 5.69702 13.6969L5.69702 12.4848C5.69702 12.0831 5.37142 11.7575 4.96976 11.7575C4.5681 11.7575 4.24249 12.0831 4.24249 12.4848L4.24249 13.6969C4.24249 15.7052 5.87053 17.3332 7.87882 17.3332Z"
13
+ />
14
+ </svg>
15
+ </template>
@@ -0,0 +1,7 @@
1
+ <template>
2
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
3
+ <path
4
+ d="M17.3806 8.68262C17.6241 8.43913 17.9893 8.43913 18.2328 8.68262L21.1545 11.6043C21.3974 11.8478 21.3974 12.213 21.1545 12.3957L18.2328 15.318C18.111 15.4391 17.9893 15.5 17.8067 15.5C17.4409 15.5 17.198 15.2565 17.198 14.8913V12.899L4.23801 12.9C4.01886 12.9 3.80725 12.8201 3.64285 12.6751C3.47844 12.5302 3.37255 12.3303 3.34501 12.1129L3.33801 12C3.33801 11.7613 3.43283 11.5324 3.60162 11.3636C3.7704 11.1948 3.99932 11.1 4.23801 11.1L17.198 11.099V9.10872C17.198 8.96272 17.237 8.85552 17.3149 8.75612L17.3806 8.68262Z"
5
+ />
6
+ </svg>
7
+ </template>
@@ -0,0 +1,7 @@
1
+ <template>
2
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
3
+ <path
4
+ d="M12.858 11.1611H17.5838C17.6672 11.1611 17.7505 11.0777 17.7505 10.9944V9.41094C17.7505 8.66094 18.6672 8.32754 19.1664 8.82764L21.7506 11.411C22.0831 11.7443 22.0831 12.2443 21.7506 12.5777L19.1664 15.1611C18.6672 15.6619 17.7504 15.3278 17.7504 14.5777V12.9944C17.7504 12.911 17.6672 12.8277 17.5838 12.8277H12.8582C12.5151 13.7988 11.589 14.4946 10.5002 14.4946C9.4115 14.4946 8.4855 13.7988 8.1424 12.8276H2.8334C2.3334 12.8276 2 12.4943 2 11.9943C2 11.4943 2.3333 11.161 2.8334 11.161H8.1424C8.4857 10.19 9.4117 9.49444 10.5003 9.49444C11.5889 9.49444 12.5148 10.19 12.8581 11.161L12.858 11.1611Z"
5
+ />
6
+ </svg>
7
+ </template>
@@ -0,0 +1,31 @@
1
+ <template>
2
+ <svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="#3E3E5B">
3
+ <path
4
+ d="M18.3431 9.31279V6.16077C18.3431 5.0562 17.4476 4.16077 16.3431 4.16077H4.50354C3.39897 4.16077 2.50354 5.0562 2.50354 6.16077V18.0003C2.50354 19.1049 3.39897 20.0003 4.50354 20.0003H6.11962"
5
+ stroke-width="2"
6
+ stroke-linecap="round"
7
+ stroke-linejoin="round"
8
+ />
9
+ <path d="M13.9432 2.40076V5.92065" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
10
+ <path d="M6.90344 2.40076V5.92065" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
11
+ <path d="M2.50354 9.44055H18.3431" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
12
+ <path
13
+ d="M15.9196 14.4542V17.8002L18.1502 18.9156"
14
+ stroke-width="1.78937"
15
+ stroke-linecap="round"
16
+ stroke-linejoin="round"
17
+ />
18
+ <path
19
+ d="M10.3429 17.8002C10.3429 14.7202 12.8397 12.2235 15.9196 12.2235C18.9995 12.2235 21.4963 14.7202 21.4963 17.8002C21.4963 20.8462 19.005 23.3771 15.9196 23.3771"
20
+ stroke-width="1.78937"
21
+ stroke-linecap="round"
22
+ stroke-linejoin="round"
23
+ />
24
+ <path
25
+ d="M8.96887 17.1132L10.3429 18.4872L11.7169 17.1132"
26
+ stroke-width="1.78937"
27
+ stroke-linecap="round"
28
+ stroke-linejoin="round"
29
+ />
30
+ </svg>
31
+ </template>
@@ -0,0 +1,22 @@
1
+ <template>
2
+ <svg
3
+ width="24"
4
+ height="24"
5
+ viewBox="0 0 24 24"
6
+ fill="none"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ >
13
+ <path
14
+ d="M13.0827 2.6348H11.4613L9.84009 2.63477C7.63095 2.63477 5.84009 4.42563 5.84009 6.63477V10.5709H6.65073C7.7553 10.5709 8.65073 11.4663 8.65073 12.5709V15.3513L11.4613 15.3513H14.272V12.5709C14.272 11.4663 15.1675 10.5709 16.272 10.5709H17.0827V6.6348C17.0827 4.42566 15.2918 2.6348 13.0827 2.6348Z"
15
+ />
16
+ <path
17
+ d="M5.44946 14.0751L5.44947 16.6389C5.44948 17.6882 6.30014 18.5389 7.34947 18.5389H11.2033H15.5734C16.6227 18.5389 17.4734 17.6882 17.4734 16.6389V14.0751"
18
+ />
19
+ <path d="M8.13684 22.5175L14.7859 22.5175" />
20
+ <path d="M11.4614 18.5387L11.4614 22.5385" />
21
+ </svg>
22
+ </template>
@@ -0,0 +1,21 @@
1
+ <template>
2
+ <svg
3
+ width="24"
4
+ height="24"
5
+ viewBox="0 0 24 24"
6
+ fill="none"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ stroke="#3E3E5B"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ >
13
+ <path
14
+ d="M13.3861 9V5.74613C13.3861 3.53699 11.5953 1.74612 9.38614 1.74612H7.7648L6.14356 1.74609C3.93442 1.74609 2.14355 3.53696 2.14355 5.74609V9.68219H2.95419C4.05876 9.68219 4.95419 10.5776 4.95419 11.6822V14.4626L7.7648 14.4627"
15
+ />
16
+ <path d="M1.75293 13.1865L1.75294 15.7504C1.75295 16.7997 2.6036 17.6503 3.65294 17.6503H7.69867" />
17
+ <path d="M4.44043 21.6289L11.0895 21.6289" />
18
+ <path d="M7.76367 17.6494L7.76367 21.6492" />
19
+ <path d="M22 9L14.4375 17L11 13.3636" />
20
+ </svg>
21
+ </template>
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <svg
3
+ width="24"
4
+ height="24"
5
+ viewBox="0 0 24 24"
6
+ fill="none"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ >
13
+ <path
14
+ d="M9.52811 2.6348H7.90677L6.28552 2.63477C4.07638 2.63477 2.28552 4.42563 2.28552 6.63477V10.5709H3.09616C4.20073 10.5709 5.09616 11.4663 5.09616 12.5709V15.3513L7.90677 15.3513H10.7175V12.5709C10.7175 11.4663 11.6129 10.5709 12.7175 10.5709H13.5281V6.6348C13.5281 4.42566 11.7372 2.6348 9.52811 2.6348Z"
15
+ />
16
+ <path
17
+ d="M1.8949 14.0751L1.89491 16.6389C1.89491 17.6882 2.74557 18.5389 3.79491 18.5389H7.64869H12.0188C13.0682 18.5389 13.9188 17.6882 13.9188 16.6389V14.0751"
18
+ />
19
+ <path d="M4.58228 22.5175L11.2314 22.5175" />
20
+ <path d="M7.90686 18.5387L7.90686 22.5385" />
21
+ <path
22
+ d="M15.4546 2.5H18.5C20.1569 2.5 21.5 3.84315 21.5 5.5V11H20.4693C19.3648 11 18.4693 11.8954 18.4693 13V15.3227H17.153"
23
+ />
24
+ <path d="M21.7691 14.0751V16.6366C21.7691 17.6859 20.9184 18.5366 19.8691 18.5366H16.7479V22.5283" />
25
+ <path d="M14.6714 22.5175L20.0383 22.5175" />
26
+ </svg>
27
+ </template>
@@ -0,0 +1,18 @@
1
+ <template>
2
+ <svg
3
+ width="24"
4
+ height="25"
5
+ viewBox="0 0 24 25"
6
+ fill="none"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ >
13
+ <path
14
+ d="M13 2.73706H6C5.46957 2.73706 4.96086 2.94777 4.58579 3.32285C4.21071 3.69792 4 4.20663 4 4.73706V20.7371C4 21.2675 4.21071 21.7762 4.58579 22.1513C4.96086 22.5263 5.46957 22.7371 6 22.7371H18C18.5304 22.7371 19.0391 22.5263 19.4142 22.1513C19.7893 21.7762 20 21.2675 20 20.7371V9.73706L13 2.73706Z"
15
+ />
16
+ <path d="M12.1357 9.02393L9.59766 13.3278H13.6255L11.0841 17.6324" />
17
+ </svg>
18
+ </template>
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <svg
3
+ width="24"
4
+ height="24"
5
+ viewBox="0 0 24 24"
6
+ fill="none"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ stroke="currentColor"
9
+ stroke-width="2"
10
+ stroke-linecap="round"
11
+ stroke-linejoin="round"
12
+ >
13
+ <path
14
+ d="M22 6H2V9.5H2.42683C3.80754 9.5 4.92683 10.6193 4.92683 12C4.92683 13.3807 3.80754 14.5 2.42683 14.5H2V18H22V14.5H21.5732C20.1925 14.5 19.0732 13.3807 19.0732 12C19.0732 10.6193 20.1925 9.5 21.5732 9.5H22V6Z"
15
+ />
16
+ <path d="M11 10.3334H16.5" />
17
+ <path d="M11 13.6667H14" />
18
+ <path d="M8 7H8.01" />
19
+ <path d="M8 10.3334H8.01" />
20
+ <path d="M8 13.6667H8.01" />
21
+ <path d="M8 17.0001H8.01" />
22
+ </svg>
23
+ </template>
@@ -0,0 +1,12 @@
1
+ <template>
2
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
3
+ <path
4
+ d="M8.43535 10.7231C8.82587 10.3325 9.45904 10.3325 9.84956 10.7231L12.4187 13.2922C12.8092 13.6827 12.8092 14.3159 12.4187 14.7064C12.0281 15.0969 11.395 15.0969 11.0044 14.7064L8.43535 12.1373C8.04483 11.7468 8.04483 11.1136 8.43535 10.7231Z"
5
+ />
6
+ <path
7
+ fill-rule="evenodd"
8
+ clip-rule="evenodd"
9
+ d="M14.5421 1.74255L9.4812 1.74258C8.92891 1.74258 8.4812 2.1903 8.4812 2.74258C8.4812 3.29486 8.92892 3.74258 9.48121 3.74258L11.0051 3.74257V5.97386C6.99453 6.46438 3.88843 9.882 3.88843 14.0251C3.88843 18.505 7.52013 22.1367 12.0001 22.1367C16.48 22.1367 20.1117 18.505 20.1117 14.0251C20.1117 12.1326 19.4636 10.3914 18.3772 9.01146L19.5985 7.79019C19.989 7.39967 19.989 6.7665 19.5985 6.37598C19.2079 5.98545 18.5748 5.98545 18.1842 6.37598L16.9567 7.60351C15.8359 6.7371 14.482 6.15761 13.0051 5.9751V3.74256L14.5421 3.74255C15.0944 3.74255 15.5421 3.29483 15.5421 2.74255C15.5421 2.19026 15.0944 1.74255 14.5421 1.74255ZM12.0001 7.91345C8.6247 7.91345 5.88843 10.6497 5.88843 14.0251C5.88843 17.4004 8.6247 20.1367 12.0001 20.1367C15.3754 20.1367 18.1117 17.4004 18.1117 14.0251C18.1117 10.6497 15.3754 7.91345 12.0001 7.91345Z"
10
+ />
11
+ </svg>
12
+ </template>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path
4
+ stroke="none"
5
+ fill-rule="evenodd"
6
+ clip-rule="evenodd"
7
+ d="M13 3C13 2.44772 12.5523 2 12 2C11.4477 2 11 2.44772 11 3V4H3.00001C2.70443 4 2.424 4.13076 2.234 4.35717C2.044 4.58358 1.96389 4.88244 2.01518 5.17353L3.46045 13.3757C3.54467 13.8537 3.95994 14.2022 4.44528 14.2022H7V21.928C7 22.4803 7.44772 22.928 8 22.928C8.55228 22.928 9 22.4803 9 21.928V14.2022H12.1534H15.2021V21.928C15.2021 22.4803 15.6499 22.928 16.2021 22.928C16.7544 22.928 17.2021 22.4803 17.2021 21.928V14.2022H19.8615C20.3469 14.2022 20.7621 13.8537 20.8464 13.3757L22.2916 5.17353C22.3429 4.88244 22.2628 4.58358 22.0728 4.35717C21.8828 4.13076 21.6024 4 21.3068 4H13V3ZM11 6H9.06389L9.54098 12.2022H12.1534H14.6613L15.1384 6H13H12.1534H11ZM4.19162 6H7.05799L7.53508 12.2022H5.28448L4.19162 6ZM16.6672 12.2022H19.0223L20.1152 6H17.1443L16.6672 12.2022Z"
8
+ fill="currentColor"
9
+ />
10
+ </svg>
11
+ </template>
@@ -9,7 +9,6 @@ import { vTooltip } from 'floating-vue'
9
9
  // COMPONENTS
10
10
  // Atomic elements
11
11
  import CpBadge from './atomic-elements/CpBadge.vue'
12
- import CpBadgeNew from './atomic-elements/CpBadgeNew.vue'
13
12
  import CpDialog from './atomic-elements/CpDialog.vue'
14
13
  import CpDialogWrapper from './atomic-elements/CpDialogWrapper.vue'
15
14
  import CpTooltip from './atomic-elements/CpTooltip.vue'
@@ -74,7 +73,6 @@ import createToaster from '@/plugins/toaster'
74
73
  const Components = {
75
74
  CpToaster,
76
75
  CpBadge,
77
- CpBadgeNew,
78
76
  CpHeading,
79
77
  CpButton,
80
78
  CpDialogWrapper,
@@ -122,7 +120,7 @@ const Pimp = {
122
120
  app.directive('tooltip', vTooltip)
123
121
 
124
122
  // CpToaster
125
- let methods = createToaster(options)
123
+ const methods = createToaster(options)
126
124
  app.$toaster = methods
127
125
  app.config.globalProperties.$toaster = methods
128
126
  },
@@ -4,7 +4,7 @@
4
4
  {{ capitalizedLabel }} <span v-if="isRequired" class="u-asterisk">*</span>
5
5
  <cp-tooltip v-if="tooltip" :content="tooltip">
6
6
  <button type="button" class="cpInput__tooltip">
7
- <icon-tooltip class="cpInput__tooltipIcon" />
7
+ <cp-icon class="cpInput__tooltipIcon" type="cp-tooltip" />
8
8
  </button>
9
9
  </cp-tooltip>
10
10
  </base-input-label>
@@ -121,7 +121,7 @@ defineOptions({ inheritAttrs: false })
121
121
  const attrs = useAttrs()
122
122
 
123
123
  // class is a reserved word, we can't remove 'class' property from attrs
124
- // eslint-disable-next-line no-unused-vars
124
+ // eslint-disable-next-line
125
125
  const { ['class']: value, id, ...restAttributes } = attrs
126
126
 
127
127
  const inputIdentifier = ref(id || randomString())
@@ -311,12 +311,14 @@ const handleNavigationClick = (isNext = true) => {
311
311
  resetScrollPosition()
312
312
 
313
313
  if (isNext) {
314
- hasRemainingPages.value && augmentOffset()
314
+ if (hasRemainingPages.value) {
315
+ augmentOffset()
316
+ }
315
317
  emit('onNextClick')
316
318
  return
317
319
  }
318
320
 
319
- hasPreviousPages.value && decreaseOffset()
321
+ if (hasPreviousPages.value) decreaseOffset()
320
322
  emit('onPreviousClick')
321
323
  }
322
324
 
@@ -129,8 +129,12 @@ export default {
129
129
  this.$emit('on-close')
130
130
  },
131
131
  onChange(value) {
132
- value.value !== this.selectedValue.value && this.$emit('update:selectedValue', value)
133
- this.closeOnSelect && this.closeDropdown()
132
+ if (value.value !== this.selectedValue.value) {
133
+ this.$emit('update:selectedValue', value)
134
+ }
135
+ if (this.closeOnSelect) {
136
+ this.closeDropdown()
137
+ }
134
138
  },
135
139
  updateFilterValue(event) {
136
140
  this.$emit('on-filter-change', event.target.value)
@@ -1,76 +1,90 @@
1
- <script>
2
- import { defineComponent, h, watch } from 'vue'
1
+ <template>
2
+ <component :is="wrapperTag" v-bind="wrapperAttrs">
3
+ <component :is="dynamicIcon" v-bind="iconAttrs" />
4
+ </component>
5
+ </template>
6
+
7
+ <script setup lang="ts">
8
+ import { computed } from 'vue'
3
9
  import * as feather from 'feather-icons'
10
+ import { CustomCpIcons } from '@/constants'
4
11
 
5
- export default defineComponent({
6
- name: 'CpIcon',
7
- props: {
8
- size: {
9
- type: [Number, String],
10
- default: 24,
11
- },
12
+ interface Props {
13
+ size?: number | string
14
+ tag?: string
15
+ type: string
16
+ weight?: number
17
+ }
12
18
 
13
- tag: {
14
- type: String,
15
- default: 'i',
16
- },
19
+ const props = withDefaults(defineProps<Props>(), {
20
+ size: 24,
21
+ tag: 'i',
22
+ weight: 0,
23
+ })
17
24
 
18
- type: {
19
- type: String,
20
- default: 'feather',
21
- validator(type) {
22
- if (!feather) {
23
- throw new Error('The Feather icons is required.')
24
- }
25
+ const wrapperTag = computed(() => props.tag)
26
+ const type = computed(() => props.type)
27
+ const size = computed(() => props.size)
28
+ const weight = computed(() => props.weight)
25
29
 
26
- if (!feather.icons[type]) {
27
- throw new Error(`"${type}" is not an available icon type.`)
28
- }
30
+ // @ts-expect-error cannot use string as index type for CustomCpIcons
31
+ const isCustomIcon = computed(() => !!CustomCpIcons[type.value])
32
+ // @ts-expect-error cannot use string as index type for feather.icons
33
+ const isFeatherIcon = computed(() => !!feather.icons[type.value])
29
34
 
30
- return true
31
- },
32
- },
33
- },
34
- setup(props, { attrs }) {
35
- let icon = feather.icons[props.type] || ''
35
+ const dynamicIcon = computed(() => {
36
+ if (isFeatherIcon.value && isCustomIcon.value) {
37
+ throw new Error(`Icon type "${type.value}" is defined in both feather icons and CustomCpIcons. Please choose one.`)
38
+ }
39
+
40
+ if (isFeatherIcon.value) {
41
+ return 'svg'
42
+ } else if (type.value === 'checked-baggage') {
43
+ return weight.value >= 30 ? CustomCpIcons['checked-baggage-20'] : CustomCpIcons['checked-baggage-30']
44
+ } else {
45
+ // @ts-expect-error cannot use string as index type for CustomCpIcons
46
+ return CustomCpIcons[type.value] || ''
47
+ }
48
+ })
36
49
 
37
- watch(
38
- () => props.type,
39
- () => {
40
- icon = feather.icons[props.type]
41
- },
42
- )
50
+ const wrapperAttrs = computed(() => {
51
+ const attrs: Record<string, unknown> = {
52
+ 'data-name': type.value,
53
+ 'data-type': type.value,
54
+ class: {
55
+ cpIcon: true,
56
+ [`cpIcon--${type.value as string}`]: type.value,
57
+ },
58
+ }
43
59
 
44
- return () =>
45
- h(
46
- props.tag,
60
+ if (!isCustomIcon.value) {
61
+ attrs['data-tags'] = dynamicIcon.value.tags
62
+ }
47
63
 
48
- {
49
- ...attrs,
50
- 'data-name': props.type,
51
- 'data-tags': icon.tags,
52
- 'data-type': props.type,
53
- class: {
54
- cpIcon: true,
55
- [`cpIcon--${props.type}`]: props.type,
56
- },
57
- },
64
+ return attrs
65
+ })
58
66
 
59
- [
60
- h(
61
- 'svg',
67
+ const iconAttrs = computed(() => {
68
+ const attrs: Record<string, unknown> = {
69
+ height: size.value,
70
+ width: size.value,
71
+ }
62
72
 
63
- {
64
- ...icon.attrs,
65
- height: props.size,
66
- width: props.size,
67
- class: [icon.attrs.class, 'cpIcon__content'],
68
- innerHTML: icon.contents,
69
- },
70
- ),
71
- ],
72
- )
73
- },
73
+ if (isCustomIcon.value) {
74
+ return {
75
+ ...attrs,
76
+ class: 'cpIcon__content',
77
+ }
78
+ } else {
79
+ // @ts-expect-error cannot use string as index type for feather.icons
80
+ const featherIcon = feather.icons[type.value]
81
+ return {
82
+ ...featherIcon.attrs,
83
+ ...attrs,
84
+ class: [featherIcon.attrs?.class, 'cpIcon__content'],
85
+ innerHTML: featherIcon.contents || '',
86
+ }
87
+ }
74
88
  })
75
89
  </script>
76
90
 
@@ -2,3 +2,4 @@ export { default as Colors } from './src/colors/Colors'
2
2
  export { default as ToggleColors } from './src/colors/ToggleColors'
3
3
  export { default as Position } from './src/Position'
4
4
  export { default as CpTableConfig } from './src/CpTableConfig'
5
+ export { default as CustomCpIcons } from './src/CpCustomIcons'
@@ -0,0 +1,69 @@
1
+ import { defineAsyncComponent } from 'vue'
2
+
3
+ export default {
4
+ 'accompanied-minor-each': defineAsyncComponent(() => import('@/components/icons/IconAccompaniedMinorEach.vue')),
5
+ 'accompanied-minor-none': defineAsyncComponent(() => import('@/components/icons/IconAccompaniedMinorNone.vue')),
6
+ 'accompanied-minor-one': defineAsyncComponent(() => import('@/components/icons/IconAccompaniedMinorOne.vue')),
7
+ 'add-receipt': defineAsyncComponent(() => import('@/components/icons/IconAddReceipt.vue')),
8
+ airline: defineAsyncComponent(() => import('@/components/icons/IconAirline.vue')),
9
+ 'airport-terminal': defineAsyncComponent(() => import('@/components/icons/IconAirportTerminal.vue')),
10
+ arrival: defineAsyncComponent(() => import('@/components/icons/IconArrival.vue')),
11
+ broadcast: defineAsyncComponent(() => import('@/components/icons/IconBroadcast.vue')),
12
+ 'cabin-bag': defineAsyncComponent(() => import('@/components/icons/IconCabinBag.vue')),
13
+ 'checked-baggage': defineAsyncComponent(() => import('@/components/icons/IconCheckedBaggage.vue')),
14
+ 'checked-baggage-20': defineAsyncComponent(() => import('@/components/icons/IconCheckedBaggage20.vue')),
15
+ 'checked-baggage-30': defineAsyncComponent(() => import('@/components/icons/IconCheckedBaggage30.vue')),
16
+ 'check-list': defineAsyncComponent(() => import('@/components/icons/IconCheckList.vue')),
17
+ child: defineAsyncComponent(() => import('@/components/icons/IconChild.vue')),
18
+ collapse: defineAsyncComponent(() => import('@/components/icons/IconCollapse.vue')),
19
+ contact: defineAsyncComponent(() => import('@/components/icons/IconContact.vue')),
20
+ departure: defineAsyncComponent(() => import('@/components/icons/IconDeparture.vue')),
21
+ distribution: defineAsyncComponent(() => import('@/components/icons/IconDistribution.vue')),
22
+ 'distribution-closed': defineAsyncComponent(() => import('@/components/icons/IconDistributionClosed.vue')),
23
+ 'distribution-exclusive-pair': defineAsyncComponent(
24
+ () => import('@/components/icons/IconDistributionExclusivePair.vue'),
25
+ ),
26
+ 'distribution-sided': defineAsyncComponent(() => import('@/components/icons/IconDistributionSided.vue')),
27
+ 'distribution-supply-sided': defineAsyncComponent(() => import('@/components/icons/IconDistributionSupplySided.vue')),
28
+ 'dynamic-content': defineAsyncComponent(() => import('@/components/icons/IconDynamicContent.vue')),
29
+ expand: defineAsyncComponent(() => import('@/components/icons/IconExpand.vue')),
30
+ fares: defineAsyncComponent(() => import('@/components/icons/IconFares.vue')),
31
+ 'fares-outlined': defineAsyncComponent(() => import('@/components/icons/IconFaresOutlined.vue')),
32
+ female: defineAsyncComponent(() => import('@/components/icons/IconFemale.vue')),
33
+ 'find-conversation': defineAsyncComponent(() => import('@/components/icons/IconFindConversation.vue')),
34
+ fire: defineAsyncComponent(() => import('@/components/icons/IconFire.vue')),
35
+ flight: defineAsyncComponent(() => import('@/components/icons/IconFlight.vue')),
36
+ 'flight-return': defineAsyncComponent(() => import('@/components/icons/IconFlightReturn.vue')),
37
+ 'group-by': defineAsyncComponent(() => import('@/components/icons/IconGroupBy.vue')),
38
+ 'hand-heart': defineAsyncComponent(() => import('@/components/icons/IconHandHeart.vue')),
39
+ history: defineAsyncComponent(() => import('@/components/icons/IconHistory.vue')),
40
+ hourglass: defineAsyncComponent(() => import('@/components/icons/IconHourGlass.vue')),
41
+ 'id-card': defineAsyncComponent(() => import('@/components/icons/IconIdCard.vue')),
42
+ infant: defineAsyncComponent(() => import('@/components/icons/IconInfant.vue')),
43
+ male: defineAsyncComponent(() => import('@/components/icons/IconMale.vue')),
44
+ 'multi-segments': defineAsyncComponent(() => import('@/components/icons/IconMultiSegments.vue')),
45
+ 'no-refund': defineAsyncComponent(() => import('@/components/icons/IconNoRefund.vue')),
46
+ notion: defineAsyncComponent(() => import('@/components/icons/IconNotion.vue')),
47
+ offline: defineAsyncComponent(() => import('@/components/icons/IconOffline.vue')),
48
+ ota: defineAsyncComponent(() => import('@/components/icons/IconOta.vue')),
49
+ paid: defineAsyncComponent(() => import('@/components/icons/IconPaid.vue')),
50
+ passport: defineAsyncComponent(() => import('@/components/icons/IconPassport.vue')),
51
+ payout: defineAsyncComponent(() => import('@/components/icons/IconPayout.vue')),
52
+ receipt: defineAsyncComponent(() => import('@/components/icons/IconReceipt.vue')),
53
+ recurrence: defineAsyncComponent(() => import('@/components/icons/IconRecurrence.vue')),
54
+ refund: defineAsyncComponent(() => import('@/components/icons/IconRefund.vue')),
55
+ 'round-trip': defineAsyncComponent(() => import('@/components/icons/IconRoundTrip.vue')),
56
+ 'route-no-stop': defineAsyncComponent(() => import('@/components/icons/IconRouteNoStop.vue')),
57
+ 'route-one-stop': defineAsyncComponent(() => import('@/components/icons/IconRouteOneStop.vue')),
58
+ 'schedule-change': defineAsyncComponent(() => import('@/components/icons/IconScheduleChange.vue')),
59
+ 'seat-empty': defineAsyncComponent(() => import('@/components/icons/IconSeatEmpty.vue')),
60
+ 'seat-sold': defineAsyncComponent(() => import('@/components/icons/IconSeatSold.vue')),
61
+ 'seat-total': defineAsyncComponent(() => import('@/components/icons/IconSeatTotal.vue')),
62
+ supplier: defineAsyncComponent(() => import('@/components/icons/IconSupplier.vue')),
63
+ template: defineAsyncComponent(() => import('@/components/icons/IconTemplate.vue')),
64
+ 'third-party': defineAsyncComponent(() => import('@/components/icons/IconThirdParty.vue')),
65
+ ticket: defineAsyncComponent(() => import('@/components/icons/IconTicket.vue')),
66
+ timer: defineAsyncComponent(() => import('@/components/icons/IconTimer.vue')),
67
+ tooltip: defineAsyncComponent(() => import('@/components/icons/IconTooltip.vue')),
68
+ 'traffic-control': defineAsyncComponent(() => import('@/components/icons/IconTrafficControl.vue')),
69
+ }
@@ -1,4 +1,4 @@
1
- import { Colors } from '@/constants'
1
+ import Colors from './Colors'
2
2
 
3
3
  export default {
4
4
  BLUE: Colors.BLUE,
@@ -454,7 +454,8 @@ export default {
454
454
  this.viewportWidth = window.innerWidth + 'px'
455
455
 
456
456
  this._handleWindowResizeEvent = this.debounce(() => {
457
- this.inline ? this.openDatepicker() : this.closeDatepicker()
457
+ if (this.inline) this.openDatepicker()
458
+ else this.closeDatepicker()
458
459
  this.$emit('is-inline', this.inline)
459
460
  this.positionDatepicker()
460
461
  this.setStartDates()
@@ -502,6 +503,8 @@ export default {
502
503
  let timeout
503
504
 
504
505
  return function () {
506
+ // Unexpected aliasing of 'this' to local variable @typescript-eslint/no-this-alias
507
+ // eslint-disable-next-line
505
508
  const context = this
506
509
  const args = arguments
507
510