@citizenplane/pimp 8.25.3 → 8.25.4
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/{IconAccompaniedMinorEach-DwZneVr5.js → IconAccompaniedMinorEach-DHzp42Em.js} +1 -1
- package/dist/{IconAccompaniedMinorNone-BZD0Vcnk.js → IconAccompaniedMinorNone-BuD7ZH_N.js} +1 -1
- package/dist/{IconAccompaniedMinorOne-NQvDYNfq.js → IconAccompaniedMinorOne-BpZoM_kE.js} +1 -1
- package/dist/{IconAddReceipt-D8Q46FjG.js → IconAddReceipt-JOD1Bd-A.js} +1 -1
- package/dist/{IconAirportTerminal-mCE0tBlA.js → IconAirportTerminal-CgvatXr_.js} +1 -1
- package/dist/{IconArrival-BgdnzrUg.js → IconArrival-DcVnoHzq.js} +1 -1
- package/dist/{IconBroadcast-CRLa4t_m.js → IconBroadcast-Bv4vKlJg.js} +1 -1
- package/dist/{IconCabinBag-Bq0m7p-_.js → IconCabinBag-Cv5YyPzB.js} +1 -1
- package/dist/{IconCheckedBaggage-BAFrekPr.js → IconCheckedBaggage-BGy3c_mi.js} +1 -1
- package/dist/{IconCheckedBaggage20-CPzYd1HW.js → IconCheckedBaggage20-DJwNYufx.js} +1 -1
- package/dist/{IconCheckedBaggage30-CJXyWf_s.js → IconCheckedBaggage30-BdLCPqCx.js} +1 -1
- package/dist/{IconChild-CpCtrOKO.js → IconChild-bRIbV1s-.js} +1 -1
- package/dist/{IconContact-BYVHF5tX.js → IconContact-DWwQycC6.js} +1 -1
- package/dist/{IconDeparture-8hc2z9wH.js → IconDeparture-CGmIzB92.js} +1 -1
- package/dist/{IconDistribution-gvIYJnQr.js → IconDistribution-xvjYYu85.js} +1 -1
- package/dist/{IconDistributionClosed-D1tCv4wV.js → IconDistributionClosed-DNxYow1B.js} +1 -1
- package/dist/{IconDistributionExclusivePair-X6wmlYxV.js → IconDistributionExclusivePair-CN9kUHjT.js} +1 -1
- package/dist/{IconDistributionSided-DiJIC91_.js → IconDistributionSided-6DW9g8ym.js} +1 -1
- package/dist/{IconDistributionSupplySided-C8fAl8bD.js → IconDistributionSupplySided-EGEcSain.js} +1 -1
- package/dist/{IconDynamicContent-CHaXCgGa.js → IconDynamicContent-CtipfPBH.js} +1 -1
- package/dist/{IconFares-PGRXlQux.js → IconFares-BnnJHy0B.js} +1 -1
- package/dist/{IconFaresOutlined-BwKWSdOi.js → IconFaresOutlined-BM8QYQII.js} +1 -1
- package/dist/{IconFemale-BYt_b2zm.js → IconFemale-BDbz-GvF.js} +1 -1
- package/dist/{IconFindConversation-CKAzzak5.js → IconFindConversation-CEy3JjOb.js} +1 -1
- package/dist/{IconFire-DaBLFgGe.js → IconFire-Br-DwoTZ.js} +1 -1
- package/dist/{IconFlight-C9Eqrjss.js → IconFlight-CLwigid5.js} +1 -1
- package/dist/{IconFlightReturn-SzPgVTf-.js → IconFlightReturn-DeHCuUr-.js} +1 -1
- package/dist/{IconHandHeart-fT6HTEv0.js → IconHandHeart-CYUhvhMM.js} +1 -1
- package/dist/{IconHistory-BOypX6br.js → IconHistory-D2s5Q7SI.js} +1 -1
- package/dist/{IconHourGlass-hbx9F5HG.js → IconHourGlass-C1wtJe5Y.js} +1 -1
- package/dist/{IconIdCard-BlnO33Ny.js → IconIdCard-BNXv-y86.js} +1 -1
- package/dist/{IconInfant-BH5iaB19.js → IconInfant-CXVfeLXV.js} +1 -1
- package/dist/{IconItinerary-hr1scyLk.js → IconItinerary-Gf0LdHob.js} +1 -1
- package/dist/{IconLeave-BDCZcaQS.js → IconLeave-Dl5iydJ5.js} +1 -1
- package/dist/{IconMale-BRNSuwYw.js → IconMale-CseGqSgP.js} +1 -1
- package/dist/{IconMultiSegments-COBV9DO0.js → IconMultiSegments-Dy_q32jM.js} +1 -1
- package/dist/{IconNoPassport-CMto2VvT.js → IconNoPassport-C28wJWjg.js} +1 -1
- package/dist/{IconNoRefund-DcGA5iPC.js → IconNoRefund-BWh3Epuc.js} +1 -1
- package/dist/{IconNotion-zp_upu3o.js → IconNotion-DHJgKt9M.js} +1 -1
- package/dist/{IconOffline-DFa2wAVl.js → IconOffline-C03bKx_c.js} +1 -1
- package/dist/{IconOneWay-BaOVYJpj.js → IconOneWay-CAtLpOUm.js} +1 -1
- package/dist/{IconPaid-_FzuBMxH.js → IconPaid-C-Jv11x8.js} +1 -1
- package/dist/{IconPassport-CyBt1rK1.js → IconPassport-D-QqLq_L.js} +1 -1
- package/dist/{IconPayout-BDrDZY_V.js → IconPayout-pAeqFzdQ.js} +1 -1
- package/dist/{IconReceipt-BdFbz0oB.js → IconReceipt-BTolU7UT.js} +1 -1
- package/dist/{IconRecurrence-fGb0K-WS.js → IconRecurrence-DvxmO77l.js} +1 -1
- package/dist/{IconRefund-OHmsvAlt.js → IconRefund-DAU1nEyb.js} +1 -1
- package/dist/{IconRoundTrip-DhbpIdEV.js → IconRoundTrip-CK5iSwlO.js} +1 -1
- package/dist/{IconRouteNoStop-CytqnUKt.js → IconRouteNoStop-53nFHzCy.js} +1 -1
- package/dist/{IconRouteOneStop-DGoaXKS-.js → IconRouteOneStop-DxhuQtSM.js} +1 -1
- package/dist/{IconScheduleChange-93Cv4D6t.js → IconScheduleChange-B2RYFsSC.js} +1 -1
- package/dist/{IconSeatEmpty-B_7CcCQm.js → IconSeatEmpty-sOEXIop7.js} +1 -1
- package/dist/{IconSeatSold-CiKTci5Y.js → IconSeatSold-C7N6xkZV.js} +1 -1
- package/dist/{IconSeatTotal-CLSyJf69.js → IconSeatTotal-BubY9W0E.js} +1 -1
- package/dist/{IconSemiMoon-Dqt6Fb9Z.js → IconSemiMoon-ttr9hgmN.js} +1 -1
- package/dist/{IconTemplate-Ch950sqi.js → IconTemplate-2L6Hi6JZ.js} +1 -1
- package/dist/{IconTicket-S-aR5uDw.js → IconTicket-L9qGQeVa.js} +1 -1
- package/dist/{IconTimer-D-clQXQM.js → IconTimer-BR4bufTj.js} +1 -1
- package/dist/{IconTrafficControl-Cjz3Q9gL.js → IconTrafficControl-C9lJVHFb.js} +1 -1
- package/dist/{IconWithPassport-CIb8fxtO.js → IconWithPassport-36vzKsdo.js} +1 -1
- package/dist/{index-DoIvCKaN.js → index-fqaaP7-I.js} +478 -478
- package/dist/pimp.es.js +1 -1
- package/dist/pimp.umd.js +13 -13
- package/package.json +1 -1
- package/src/components/visual/CpIcon.vue +10 -5
- package/src/constants/src/CpCustomIcons.ts +1 -1
- package/src/stories/CpIcon.stories.ts +7 -1
package/package.json
CHANGED
|
@@ -39,12 +39,16 @@ const dynamicIcon = computed(() => {
|
|
|
39
39
|
|
|
40
40
|
if (isFeatherIcon.value) {
|
|
41
41
|
return 'svg'
|
|
42
|
-
} else if (
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
} else if (isCustomIcon.value) {
|
|
43
|
+
if (type.value === 'checked-baggage') {
|
|
44
|
+
return weight.value >= 30 ? CustomCpIcons['checked-baggage-20'] : CustomCpIcons['checked-baggage-30']
|
|
45
|
+
}
|
|
45
46
|
// @ts-expect-error cannot use string as index type for CustomCpIcons
|
|
46
|
-
return CustomCpIcons[type.value]
|
|
47
|
+
return CustomCpIcons[type.value]
|
|
47
48
|
}
|
|
49
|
+
|
|
50
|
+
// Fallback to SVG for any other case
|
|
51
|
+
return 'svg'
|
|
48
52
|
})
|
|
49
53
|
|
|
50
54
|
const wrapperAttrs = computed(() => {
|
|
@@ -76,8 +80,9 @@ const iconAttrs = computed(() => {
|
|
|
76
80
|
class: 'cpIcon__content',
|
|
77
81
|
}
|
|
78
82
|
} else {
|
|
83
|
+
// Default to square icon if type is not found
|
|
79
84
|
// @ts-expect-error cannot use string as index type for feather.icons
|
|
80
|
-
const featherIcon = feather.icons[type.value]
|
|
85
|
+
const featherIcon = feather.icons[type.value] || feather.icons['square']
|
|
81
86
|
return {
|
|
82
87
|
...featherIcon.attrs,
|
|
83
88
|
...attrs,
|
|
@@ -48,7 +48,7 @@ export default {
|
|
|
48
48
|
'no-refund': defineAsyncComponent(() => import('@/components/icons/IconNoRefund.vue')),
|
|
49
49
|
notion: defineAsyncComponent(() => import('@/components/icons/IconNotion.vue')),
|
|
50
50
|
offline: defineAsyncComponent(() => import('@/components/icons/IconOffline.vue')),
|
|
51
|
-
'
|
|
51
|
+
'one-way': defineAsyncComponent(() => import('@/components/icons/IconOneWay.vue')),
|
|
52
52
|
ota: defineAsyncComponent(() => import('@/components/icons/IconOta.vue')),
|
|
53
53
|
paid: defineAsyncComponent(() => import('@/components/icons/IconPaid.vue')),
|
|
54
54
|
passport: defineAsyncComponent(() => import('@/components/icons/IconPassport.vue')),
|
|
@@ -24,6 +24,7 @@ const iconsOptions = [
|
|
|
24
24
|
'settings',
|
|
25
25
|
'user',
|
|
26
26
|
'x',
|
|
27
|
+
'invalid-icon-name',
|
|
27
28
|
].sort()
|
|
28
29
|
|
|
29
30
|
const meta = {
|
|
@@ -47,7 +48,9 @@ const meta = {
|
|
|
47
48
|
control: 'number',
|
|
48
49
|
description: 'Weight for specific icons like checked-baggage',
|
|
49
50
|
table: {
|
|
50
|
-
defaultValue: {
|
|
51
|
+
defaultValue: {
|
|
52
|
+
summary: '0',
|
|
53
|
+
},
|
|
51
54
|
},
|
|
52
55
|
},
|
|
53
56
|
},
|
|
@@ -96,6 +99,9 @@ export const DifferentSizes: Story = {
|
|
|
96
99
|
}
|
|
97
100
|
|
|
98
101
|
export const AllIcons: Story = {
|
|
102
|
+
args: {
|
|
103
|
+
type: 'check',
|
|
104
|
+
},
|
|
99
105
|
render: () => ({
|
|
100
106
|
components: { CpIcon },
|
|
101
107
|
setup() {
|