@citizenplane/pimp 8.21.0 → 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.
- package/README.md +23 -2
- package/dist/IconAccompaniedMinorEach-DVJcuHj0.js +18 -0
- package/dist/IconAccompaniedMinorNone-BXf4n4ou.js +19 -0
- package/dist/IconAccompaniedMinorOne-CNdC-xeI.js +18 -0
- package/dist/IconAddReceipt-BFz16BpE.js +22 -0
- package/dist/IconAirportTerminal-CVkKwFXB.js +23 -0
- package/dist/IconArrival-C3UZ0X3K.js +23 -0
- package/dist/IconBroadcast-C0PyG0ON.js +20 -0
- package/dist/IconCabinBag-Dbfd3eU9.js +20 -0
- package/dist/IconCheckedBaggage--V-SlEA8.js +18 -0
- package/dist/IconCheckedBaggage20-qxIkw6m1.js +20 -0
- package/dist/IconCheckedBaggage30-BvMLcDVK.js +20 -0
- package/dist/IconChild-DQa4WqLv.js +21 -0
- package/dist/IconContact-CpjzDGE9.js +20 -0
- package/dist/IconDeparture-BgVq_dTQ.js +23 -0
- package/dist/IconDistribution-BbcHTmnJ.js +20 -0
- package/dist/IconDistributionClosed-BKSkMVr_.js +20 -0
- package/dist/IconDistributionExclusivePair-B4sktgJ5.js +18 -0
- package/dist/IconDistributionSided-DYDvAPYA.js +31 -0
- package/dist/IconDistributionSupplySided-Kj6qqifp.js +31 -0
- package/dist/IconDynamicContent-DvIytfat.js +21 -0
- package/dist/IconFares-DV3aFH6m.js +18 -0
- package/dist/IconFaresOutlined-DYEOkY_L.js +23 -0
- package/dist/IconFemale-D2Mfa1QV.js +33 -0
- package/dist/IconFindConversation-8wEIdKQV.js +24 -0
- package/dist/IconFire-pBaXc12G.js +22 -0
- package/dist/IconFlight-C5C7PmQR.js +23 -0
- package/dist/IconFlightReturn-BHKIKmJU.js +18 -0
- package/dist/IconHandHeart-WBIMaQuQ.js +21 -0
- package/dist/IconHistory-yZOWejhP.js +19 -0
- package/dist/IconHourGlass-CqyVtXKn.js +31 -0
- package/dist/IconIdCard-C1LVMNO2.js +22 -0
- package/dist/IconInfant-jlx5bYg6.js +18 -0
- package/dist/IconMale-DBRDgP6y.js +21 -0
- package/dist/IconMultiSegments-BNeLi2v7.js +18 -0
- package/dist/IconNoRefund-CnYqcTPx.js +18 -0
- package/dist/IconNotion-k-88gdS4.js +18 -0
- package/dist/IconOffline-sxl4gIDa.js +20 -0
- package/dist/IconPaid-DerAlBSC.js +23 -0
- package/dist/IconPassport-CrcNh_qG.js +22 -0
- package/dist/IconPayout-CS6i4g1R.js +20 -0
- package/dist/IconReceipt-DW0CutDY.js +25 -0
- package/dist/IconRecurrence-VbfPoDYR.js +24 -0
- package/dist/IconRefund-CXSRbRLD.js +19 -0
- package/dist/IconRoundTrip-Bt9-qnbY.js +20 -0
- package/dist/IconRouteNoStop-DL8Y30wj.js +18 -0
- package/dist/IconRouteOneStop-CTEyyVWa.js +18 -0
- package/dist/IconScheduleChange-Cfbc6YaK.js +19 -0
- package/dist/IconSeatEmpty-DXRMdLkb.js +25 -0
- package/dist/IconSeatSold-BEe-3cEz.js +22 -0
- package/dist/IconSeatTotal-IpvEJlaf.js +22 -0
- package/dist/IconTemplate-DzowVaSP.js +23 -0
- package/dist/IconTicket-o3P0xLEU.js +22 -0
- package/dist/IconTimer-DlMeU4t-.js +23 -0
- package/dist/IconTrafficControl-B1knXbCR.js +24 -0
- package/dist/index-CNDZl4Ol.js +15377 -0
- package/dist/pimp.es.js +2 -15305
- package/dist/pimp.umd.js +3 -3
- package/dist/style.css +1 -1
- package/package.json +12 -5
- package/src/assets/styles/base/_base.scss +3 -2
- package/src/assets/styles/helpers/_mixins.scss +1 -1
- package/src/assets/styles/utilities/_index.scss +1 -1
- package/src/assets/styles/variables/_colors.scss +16 -16
- package/src/components/feedback-indicators/CpToaster.vue +7 -2
- package/src/components/helpers-utilities/TransitionExpand.vue +0 -6
- package/src/components/icons/IconAccompaniedMinorEach.vue +30 -0
- package/src/components/icons/IconAccompaniedMinorNone.vue +10 -0
- package/src/components/icons/IconAccompaniedMinorOne.vue +22 -0
- package/src/components/icons/IconAddReceipt.vue +17 -0
- package/src/components/icons/IconAirportTerminal.vue +10 -0
- package/src/components/icons/IconArrival.vue +18 -0
- package/src/components/icons/IconBroadcast.vue +35 -0
- package/src/components/icons/IconCabinBag.vue +36 -0
- package/src/components/icons/IconCheckedBaggage.vue +11 -0
- package/src/components/icons/IconCheckedBaggage20.vue +36 -0
- package/src/components/icons/IconCheckedBaggage30.vue +39 -0
- package/src/components/icons/IconChild.vue +16 -0
- package/src/components/icons/IconContact.vue +15 -0
- package/src/components/icons/IconDeparture.vue +18 -0
- package/src/components/icons/IconDistribution.vue +19 -0
- package/src/components/icons/IconDistributionClosed.vue +30 -0
- package/src/components/icons/IconDistributionExclusivePair.vue +7 -0
- package/src/components/icons/IconDistributionSided.vue +24 -0
- package/src/components/icons/IconDistributionSupplySided.vue +24 -0
- package/src/components/icons/IconDynamicContent.vue +18 -0
- package/src/components/icons/IconFares.vue +7 -0
- package/src/components/icons/IconFaresOutlined.vue +24 -0
- package/src/components/icons/IconFemale.vue +20 -0
- package/src/components/icons/IconFindConversation.vue +21 -0
- package/src/components/icons/IconFire.vue +9 -0
- package/src/components/icons/IconFlight.vue +16 -0
- package/src/components/icons/IconFlightReturn.vue +7 -0
- package/src/components/icons/IconHandHeart.vue +18 -0
- package/src/components/icons/IconHistory.vue +10 -0
- package/src/components/icons/IconHourGlass.vue +25 -0
- package/src/components/icons/IconIdCard.vue +17 -0
- package/src/components/icons/IconInfant.vue +22 -0
- package/src/components/icons/IconMale.vue +8 -0
- package/src/components/icons/IconMultiSegments.vue +7 -0
- package/src/components/icons/IconNoRefund.vue +19 -0
- package/src/components/icons/IconNotion.vue +7 -0
- package/src/components/icons/IconOffline.vue +25 -0
- package/src/components/icons/IconPaid.vue +18 -0
- package/src/components/icons/IconPassport.vue +21 -0
- package/src/components/icons/IconPayout.vue +15 -0
- package/src/components/icons/IconReceipt.vue +20 -0
- package/src/components/icons/IconRecurrence.vue +15 -0
- package/src/components/icons/IconRefund.vue +10 -0
- package/src/components/icons/IconRoundTrip.vue +15 -0
- package/src/components/icons/IconRouteNoStop.vue +7 -0
- package/src/components/icons/IconRouteOneStop.vue +7 -0
- package/src/components/icons/IconScheduleChange.vue +31 -0
- package/src/components/icons/IconSeatEmpty.vue +22 -0
- package/src/components/icons/IconSeatSold.vue +21 -0
- package/src/components/icons/IconSeatTotal.vue +27 -0
- package/src/components/icons/IconTemplate.vue +18 -0
- package/src/components/icons/IconTicket.vue +23 -0
- package/src/components/icons/IconTimer.vue +12 -0
- package/src/components/icons/IconTrafficControl.vue +11 -0
- package/src/components/{index.js → index.ts} +1 -1
- package/src/components/inputs/CpInput.vue +2 -2
- package/src/components/lists-and-table/CpTable.vue +4 -2
- package/src/components/selects/CpSelectMenu.vue +6 -2
- package/src/components/visual/CpIcon.vue +76 -62
- package/src/constants/{index.js → index.ts} +1 -0
- package/src/constants/src/CpCustomIcons.ts +69 -0
- package/src/constants/src/colors/{ToggleColors.js → ToggleColors.ts} +1 -1
- package/src/libs/CoreDatepicker.vue +4 -1
- package/src/stories/CpIcon.stories.ts +60 -27
- package/src/stories/CpSelectMenu.stories.ts +1 -1
- package/tsconfig.json +14 -0
- /package/src/constants/src/{CpTableConfig.js → CpTableConfig.ts} +0 -0
- /package/src/constants/src/{Position.js → Position.ts} +0 -0
- /package/src/constants/src/colors/{Colors.js → Colors.ts} +0 -0
|
@@ -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
|
+
}
|
|
@@ -454,7 +454,8 @@ export default {
|
|
|
454
454
|
this.viewportWidth = window.innerWidth + 'px'
|
|
455
455
|
|
|
456
456
|
this._handleWindowResizeEvent = this.debounce(() => {
|
|
457
|
-
this.inline
|
|
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
|
|
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
2
2
|
import CpIcon from '@/components/visual/CpIcon.vue'
|
|
3
|
+
import { CustomCpIcons } from '@/constants'
|
|
4
|
+
|
|
5
|
+
const iconsOptions = [
|
|
6
|
+
...Object.keys(CustomCpIcons),
|
|
7
|
+
'activity',
|
|
8
|
+
'alert-circle',
|
|
9
|
+
'arrow-down',
|
|
10
|
+
'arrow-left',
|
|
11
|
+
'arrow-right',
|
|
12
|
+
'arrow-up',
|
|
13
|
+
'bell',
|
|
14
|
+
'calendar',
|
|
15
|
+
'check',
|
|
16
|
+
'check-circle',
|
|
17
|
+
'chevron-down',
|
|
18
|
+
'chevron-left',
|
|
19
|
+
'chevron-right',
|
|
20
|
+
'chevron-up',
|
|
21
|
+
'edit',
|
|
22
|
+
'home',
|
|
23
|
+
'search',
|
|
24
|
+
'settings',
|
|
25
|
+
'user',
|
|
26
|
+
'x',
|
|
27
|
+
].sort()
|
|
3
28
|
|
|
4
29
|
const meta = {
|
|
5
30
|
title: 'CpIcon',
|
|
@@ -7,28 +32,7 @@ const meta = {
|
|
|
7
32
|
argTypes: {
|
|
8
33
|
type: {
|
|
9
34
|
control: 'select',
|
|
10
|
-
options:
|
|
11
|
-
'activity',
|
|
12
|
-
'alert-circle',
|
|
13
|
-
'arrow-down',
|
|
14
|
-
'arrow-left',
|
|
15
|
-
'arrow-right',
|
|
16
|
-
'arrow-up',
|
|
17
|
-
'bell',
|
|
18
|
-
'calendar',
|
|
19
|
-
'check',
|
|
20
|
-
'check-circle',
|
|
21
|
-
'chevron-down',
|
|
22
|
-
'chevron-left',
|
|
23
|
-
'chevron-right',
|
|
24
|
-
'chevron-up',
|
|
25
|
-
'edit',
|
|
26
|
-
'home',
|
|
27
|
-
'search',
|
|
28
|
-
'settings',
|
|
29
|
-
'user',
|
|
30
|
-
'x',
|
|
31
|
-
],
|
|
35
|
+
options: iconsOptions,
|
|
32
36
|
description: 'Type of icon to display',
|
|
33
37
|
},
|
|
34
38
|
size: {
|
|
@@ -39,6 +43,13 @@ const meta = {
|
|
|
39
43
|
control: 'text',
|
|
40
44
|
description: 'HTML tag to use for the icon wrapper',
|
|
41
45
|
},
|
|
46
|
+
weight: {
|
|
47
|
+
control: 'number',
|
|
48
|
+
description: 'Weight for specific icons like checked-baggage',
|
|
49
|
+
table: {
|
|
50
|
+
defaultValue: { summary: 0 },
|
|
51
|
+
},
|
|
52
|
+
},
|
|
42
53
|
},
|
|
43
54
|
} satisfies Meta<typeof CpIcon>
|
|
44
55
|
|
|
@@ -65,14 +76,36 @@ export const Default: Story = {
|
|
|
65
76
|
}
|
|
66
77
|
|
|
67
78
|
export const DifferentSizes: Story = {
|
|
68
|
-
|
|
79
|
+
args: {
|
|
80
|
+
type: 'check',
|
|
81
|
+
},
|
|
82
|
+
render: (args) => ({
|
|
69
83
|
components: { CpIcon },
|
|
84
|
+
setup() {
|
|
85
|
+
return { args }
|
|
86
|
+
},
|
|
70
87
|
template: `
|
|
71
88
|
<div style="padding: 20px; display: flex; align-items: center; gap: 16px;">
|
|
72
|
-
<CpIcon
|
|
73
|
-
<CpIcon
|
|
74
|
-
<CpIcon
|
|
75
|
-
<CpIcon
|
|
89
|
+
<CpIcon v-bind="{ ...args, size: 16 }" />
|
|
90
|
+
<CpIcon v-bind="{ ...args, size: 24 }" />
|
|
91
|
+
<CpIcon v-bind="{ ...args, size: 32 }" />
|
|
92
|
+
<CpIcon v-bind="{ ...args, size: 48 }" />
|
|
93
|
+
</div>
|
|
94
|
+
`,
|
|
95
|
+
}),
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export const AllIcons: Story = {
|
|
99
|
+
render: () => ({
|
|
100
|
+
components: { CpIcon },
|
|
101
|
+
setup() {
|
|
102
|
+
return { icons: iconsOptions }
|
|
103
|
+
},
|
|
104
|
+
template: `
|
|
105
|
+
<div style="padding: 20px; display: grid; grid-template-columns: repeat(4, minmax(100px, 3fr)); gap: 16px;">
|
|
106
|
+
<div v-for="icon in icons" style="display: flex;align-items: center;justify-content: center;border: 1px solid #eee;border-radius: 4px;padding: 2px 0;">
|
|
107
|
+
<CpIcon :key="icon" :type="icon" />
|
|
108
|
+
</div>
|
|
76
109
|
</div>
|
|
77
110
|
`,
|
|
78
111
|
}),
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"isolatedModules": true,
|
|
4
|
+
"strict": true,
|
|
5
|
+
"jsx": "preserve",
|
|
6
|
+
"jsxImportSource": "vue",
|
|
7
|
+
"baseUrl": ".",
|
|
8
|
+
"paths": {
|
|
9
|
+
"@/*": ["./src/*"]
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
|
|
13
|
+
"exclude": ["node_modules", "storybook-static", "dist", "build"]
|
|
14
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|