@citizenplane/pimp 8.28.3 → 8.30.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/{IconAccompaniedMinorEach-BhTRB0Xt.js → IconAccompaniedMinorEach-Chvln7ks.js} +1 -1
- package/dist/{IconAccompaniedMinorNone-CVDRfiLR.js → IconAccompaniedMinorNone-BlEBLGOE.js} +1 -1
- package/dist/{IconAccompaniedMinorOne-CjDJrkLH.js → IconAccompaniedMinorOne-DIRpn5zm.js} +1 -1
- package/dist/{IconAddReceipt-Dw57KIgu.js → IconAddReceipt-DaXDrYon.js} +1 -1
- package/dist/{IconAirportTerminal-CAMDLNK1.js → IconAirportTerminal-pU0mx9bq.js} +1 -1
- package/dist/{IconArrival-c3iHOjLS.js → IconArrival-uqa1cUzO.js} +1 -1
- package/dist/{IconBaggageCabinNone-CfGbgm2w.js → IconBaggageCabinNone-SnFrcMwI.js} +1 -1
- package/dist/{IconBaggageCheckedNone-HBugBdro.js → IconBaggageCheckedNone-4ZGeJX-T.js} +1 -1
- package/dist/{IconBaggagePersonalNone-D3yc1Nr3.js → IconBaggagePersonalNone-JVlWXsIc.js} +1 -1
- package/dist/{IconBroadcast-Cl25xZ3V.js → IconBroadcast-B7gcYIky.js} +1 -1
- package/dist/{IconCabinBag-nouejrQO.js → IconCabinBag-8gdUsqru.js} +1 -1
- package/dist/{IconCalendar-DB5c1Hb9.js → IconCalendar-RehatmPo.js} +1 -1
- package/dist/{IconCalendarDelay-C2ZSycA0.js → IconCalendarDelay-Du3a9TaA.js} +1 -1
- package/dist/{IconCheckedBaggage20-fvncgtMu.js → IconCheckedBaggage20-BaRTS3Dm.js} +1 -1
- package/dist/{IconCheckedBaggage30-D-5snpDi.js → IconCheckedBaggage30-DfnJcICl.js} +1 -1
- package/dist/{IconChild-6vzhDuGY.js → IconChild-BiRe6plt.js} +1 -1
- package/dist/{IconContact-DW2EQIvM.js → IconContact-B2q3Oix6.js} +1 -1
- package/dist/{IconDeparture-Dz7iVI4W.js → IconDeparture-CqOsm1p3.js} +1 -1
- package/dist/{IconDistribution-DpTX0efP.js → IconDistribution-BtAjLOH1.js} +1 -1
- package/dist/{IconDistributionClosed-1MnLvGpO.js → IconDistributionClosed-DvKcmH9O.js} +1 -1
- package/dist/{IconDistributionExclusivePair-D2KrS0uK.js → IconDistributionExclusivePair-C0EBa4Yz.js} +1 -1
- package/dist/{IconDistributionSided-jwGOXuS1.js → IconDistributionSided-CoSkKfc5.js} +1 -1
- package/dist/{IconDistributionSupplySided-DRkX2ogx.js → IconDistributionSupplySided-DsAhZSkC.js} +1 -1
- package/dist/{IconDynamicContent-Ce_7vPxD.js → IconDynamicContent-DK6fNt00.js} +1 -1
- package/dist/{IconEndDate-DU4Dy0D3.js → IconEndDate-Ct8mj0Ej.js} +1 -1
- package/dist/{IconFares-De8x8tAw.js → IconFares-D3e_h14B.js} +1 -1
- package/dist/{IconFaresOutlined-DXF-fqbv.js → IconFaresOutlined-BXDgpilA.js} +1 -1
- package/dist/{IconFemale-Dl_uoCsR.js → IconFemale-ctrm9N3Z.js} +1 -1
- package/dist/{IconFindConversation-08VqKEJ3.js → IconFindConversation-uAMWFXlW.js} +1 -1
- package/dist/{IconFire-lKbNb_Ws.js → IconFire-DZoDNAyw.js} +1 -1
- package/dist/{IconFlight-CNMq0SbK.js → IconFlight-C7O_qHJA.js} +1 -1
- package/dist/{IconFlightReturn-Bh38ue0g.js → IconFlightReturn-BNjLtbO6.js} +1 -1
- package/dist/{IconFlightSchedule-Bcl-Gaa1.js → IconFlightSchedule-WpBNLs2y.js} +1 -1
- package/dist/{IconHandHeart-DCuVQDKm.js → IconHandHeart-C_E0cCXP.js} +1 -1
- package/dist/{IconHistory-Bk26qQet.js → IconHistory-BqwHTTWY.js} +1 -1
- package/dist/{IconHourGlass-Dh3QiKYR.js → IconHourGlass-DOwuG_3m.js} +1 -1
- package/dist/{IconIdCard-DMfo5q29.js → IconIdCard-BNskK5uB.js} +1 -1
- package/dist/{IconInfant-CcFYbhBY.js → IconInfant-BQYVIka1.js} +1 -1
- package/dist/{IconItinerary-OX6XFnGw.js → IconItinerary-BKUEvJ4N.js} +1 -1
- package/dist/{IconLeave-BfNuG93H.js → IconLeave-DUomSUyI.js} +1 -1
- package/dist/{IconMale-B1Xztycy.js → IconMale-l4XJPya-.js} +1 -1
- package/dist/{IconMultiSegments-48Y0MOL0.js → IconMultiSegments-DyTODoLE.js} +1 -1
- package/dist/{IconNoPassport-t_A6_d-m.js → IconNoPassport-hOO36EG3.js} +1 -1
- package/dist/{IconNoRefund-CT3CmB1z.js → IconNoRefund-BAEjDfuQ.js} +1 -1
- package/dist/{IconNoSeat-DHaI_9g1.js → IconNoSeat-hPRh86Qu.js} +1 -1
- package/dist/{IconNotion-C01AxxT1.js → IconNotion-BdbLBTUX.js} +1 -1
- package/dist/{IconOffline-BtXwq9Rk.js → IconOffline-Cuw_8YAe.js} +1 -1
- package/dist/{IconOneWay-BvgNp-Tw.js → IconOneWay-B9BR28Bh.js} +1 -1
- package/dist/{IconPaid-eZeX0pTC.js → IconPaid-ComZJkK7.js} +1 -1
- package/dist/{IconPassport-BB53q3Xj.js → IconPassport-wqREy6VU.js} +1 -1
- package/dist/{IconPayout-agVkSjKR.js → IconPayout-BVbxGgeq.js} +1 -1
- package/dist/{IconPlug-DA0Rn_Dg.js → IconPlug-DoqFsBC5.js} +1 -1
- package/dist/{IconPlugOff-Bhz2gopr.js → IconPlugOff-D01qKq6o.js} +1 -1
- package/dist/{IconReceipt-C7iOyJr-.js → IconReceipt-C7nXDJWw.js} +1 -1
- package/dist/{IconRecurrence-PEFMHtkO.js → IconRecurrence-C6Bcbzej.js} +1 -1
- package/dist/{IconRefund-BCOgJ359.js → IconRefund-C4AU90vx.js} +1 -1
- package/dist/{IconRoundTrip-Czqp1msS.js → IconRoundTrip-JiO6XN3l.js} +1 -1
- package/dist/{IconRouteNoStop-BUAGzqXr.js → IconRouteNoStop-B9B7Lsho.js} +1 -1
- package/dist/{IconRouteOneStop-CXMbf4YJ.js → IconRouteOneStop-BUC7J7oa.js} +1 -1
- package/dist/{IconScheduleChange-Ba25qfvt.js → IconScheduleChange-fbuvLH__.js} +1 -1
- package/dist/{IconSeatEmpty-CzU3MZJ5.js → IconSeatEmpty-CstmVSzb.js} +1 -1
- package/dist/{IconSeatSold-CjZ0AsMC.js → IconSeatSold-DELO-Pvo.js} +1 -1
- package/dist/{IconSeatTotal-DuMf13IP.js → IconSeatTotal-836DH38g.js} +1 -1
- package/dist/{IconStartDate-CzdY32t3.js → IconStartDate-BEDLfvts.js} +1 -1
- package/dist/{IconTemplate-CKqtWoRS.js → IconTemplate-B6d3ILRN.js} +1 -1
- package/dist/{IconTicket-CKOuWpFj.js → IconTicket-CvynjvU9.js} +1 -1
- package/dist/{IconTimer-CniUunfF.js → IconTimer-Cd-3mYao.js} +1 -1
- package/dist/{IconTrafficControl-CecHfaNY.js → IconTrafficControl-CXNIPHel.js} +1 -1
- package/dist/{index-b9vCNG2n.js → index-CSEBCA97.js} +974 -975
- package/dist/pimp.es.js +1 -1
- package/dist/pimp.umd.js +14 -14
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/assets/styles/variables/_colors.scss +3 -1
- package/src/components/CpBadge.vue +51 -18
- package/src/components/CpIcon.vue +0 -6
- package/src/constants/CpCustomIcons.ts +1 -2
- package/src/stories/CpBadge.stories.ts +63 -53
- package/src/stories/CpIcon.stories.ts +0 -9
- package/dist/IconCheckedBaggage-CFuPo731.js +0 -18
- package/src/components/icons/IconCheckedBaggage.vue +0 -11
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/vue3'
|
|
1
|
+
import type { Args, Meta, StoryObj } from '@storybook/vue3'
|
|
2
2
|
|
|
3
3
|
import CpBadge from '@/components/CpBadge.vue'
|
|
4
4
|
|
|
5
|
+
import { Colors, Sizes } from '@/constants'
|
|
6
|
+
|
|
5
7
|
const meta = {
|
|
6
8
|
title: 'CpBadge',
|
|
7
9
|
component: CpBadge,
|
|
@@ -13,7 +15,7 @@ const meta = {
|
|
|
13
15
|
},
|
|
14
16
|
size: {
|
|
15
17
|
control: 'select',
|
|
16
|
-
options: ['sm', 'md'],
|
|
18
|
+
options: ['xs', 'sm', 'md'],
|
|
17
19
|
description: 'The size of the badge',
|
|
18
20
|
},
|
|
19
21
|
isStroked: {
|
|
@@ -26,12 +28,12 @@ const meta = {
|
|
|
26
28
|
},
|
|
27
29
|
leadingIcon: {
|
|
28
30
|
control: 'select',
|
|
29
|
-
options: ['check', 'arrow-right', 'arrow-left', 'arrow-up', 'arrow-down'],
|
|
31
|
+
options: ['', 'check', 'arrow-right', 'arrow-left', 'arrow-up', 'arrow-down', 'plus'],
|
|
30
32
|
description: 'Type of leading icon (if any)',
|
|
31
33
|
},
|
|
32
34
|
trailingIcon: {
|
|
33
35
|
control: 'select',
|
|
34
|
-
options: ['check', 'arrow-right', 'arrow-left', 'arrow-up', 'arrow-down'],
|
|
36
|
+
options: ['', 'check', 'arrow-right', 'arrow-left', 'arrow-up', 'arrow-down', 'plus'],
|
|
35
37
|
description: 'Type of trailing icon (if any)',
|
|
36
38
|
},
|
|
37
39
|
label: {
|
|
@@ -45,23 +47,26 @@ export default meta
|
|
|
45
47
|
|
|
46
48
|
type Story = StoryObj<typeof meta>
|
|
47
49
|
|
|
50
|
+
const defaultTemplate = '<CpBadge v-bind="args" />'
|
|
51
|
+
const defaultRender = (args: Args) => ({
|
|
52
|
+
components: { CpBadge },
|
|
53
|
+
setup() {
|
|
54
|
+
return { args }
|
|
55
|
+
},
|
|
56
|
+
template: defaultTemplate,
|
|
57
|
+
})
|
|
58
|
+
|
|
48
59
|
export const Default: Story = {
|
|
49
60
|
args: {
|
|
50
|
-
color:
|
|
51
|
-
size:
|
|
61
|
+
color: Colors.GRAY,
|
|
62
|
+
size: Sizes.MD,
|
|
52
63
|
isStroked: false,
|
|
53
64
|
isSquare: false,
|
|
54
65
|
leadingIcon: '',
|
|
55
66
|
trailingIcon: '',
|
|
56
67
|
label: 'Badge',
|
|
57
68
|
},
|
|
58
|
-
render:
|
|
59
|
-
components: { CpBadge },
|
|
60
|
-
setup() {
|
|
61
|
-
return { args }
|
|
62
|
-
},
|
|
63
|
-
template: '<CpBadge v-bind="args" />',
|
|
64
|
-
}),
|
|
69
|
+
render: defaultRender,
|
|
65
70
|
}
|
|
66
71
|
|
|
67
72
|
export const WithColors: Story = {
|
|
@@ -83,74 +88,79 @@ export const WithColors: Story = {
|
|
|
83
88
|
}
|
|
84
89
|
|
|
85
90
|
export const WithSizes: Story = {
|
|
86
|
-
render: () => ({
|
|
91
|
+
render: (args: Args) => ({
|
|
87
92
|
components: { CpBadge },
|
|
93
|
+
setup() {
|
|
94
|
+
return { args }
|
|
95
|
+
},
|
|
88
96
|
template: `
|
|
89
97
|
<div style="display: flex; gap: 8px; align-items: center;">
|
|
90
|
-
<CpBadge size="
|
|
91
|
-
<CpBadge size="
|
|
98
|
+
<CpBadge v-bind="args" leading-icon="plus" trailing-icon="plus" size="md" label="Medium" />
|
|
99
|
+
<CpBadge v-bind="args" leading-icon="plus" trailing-icon="plus" size="sm" label="Small" />
|
|
100
|
+
<CpBadge v-bind="args" leading-icon="plus" trailing-icon="plus" size="xs" label="Extra Small" />
|
|
92
101
|
</div>
|
|
93
102
|
`,
|
|
94
103
|
}),
|
|
95
104
|
}
|
|
96
105
|
|
|
106
|
+
export const WithLeadingIcon: Story = {
|
|
107
|
+
args: { ...Default.args, leadingIcon: 'check', label: 'Leading Icon' },
|
|
108
|
+
render: defaultRender,
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export const WithTrailingIcon: Story = {
|
|
112
|
+
args: { ...Default.args, trailingIcon: 'check', label: 'Trailing Icon' },
|
|
113
|
+
render: defaultRender,
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export const IconOnly: Story = {
|
|
117
|
+
args: { ...Default.args, leadingIcon: 'check', label: '' },
|
|
118
|
+
render: defaultRender,
|
|
119
|
+
}
|
|
120
|
+
|
|
97
121
|
export const IsStroked: Story = {
|
|
98
|
-
render: () => ({
|
|
122
|
+
render: (args: Args) => ({
|
|
99
123
|
components: { CpBadge },
|
|
124
|
+
setup() {
|
|
125
|
+
return { args }
|
|
126
|
+
},
|
|
100
127
|
template: `
|
|
101
|
-
<div style="display: flex; gap: 8px;
|
|
102
|
-
<CpBadge color="blue"
|
|
103
|
-
<CpBadge color="
|
|
104
|
-
<CpBadge color="
|
|
128
|
+
<div style="display: flex; gap: 8px; align-items: center;">
|
|
129
|
+
<CpBadge v-bind="args" is-stroked color="blue" leading-icon="plus" trailing-icon="plus" label="Label" />
|
|
130
|
+
<CpBadge v-bind="args" is-stroked color="red" leading-icon="plus" trailing-icon="plus" label="Label" />
|
|
131
|
+
<CpBadge v-bind="args" is-stroked color="orange" leading-icon="plus" trailing-icon="plus" label="Label" />
|
|
132
|
+
<CpBadge v-bind="args" is-stroked color="yellow" leading-icon="plus" trailing-icon="plus" label="Label" />
|
|
133
|
+
<CpBadge v-bind="args" is-stroked color="green" leading-icon="plus" trailing-icon="plus" label="Label" />
|
|
134
|
+
<CpBadge v-bind="args" is-stroked color="purple" leading-icon="plus" trailing-icon="plus" label="Label" />
|
|
135
|
+
<CpBadge v-bind="args" is-stroked color="gray" leading-icon="plus" trailing-icon="plus" label="Label" />
|
|
105
136
|
</div>
|
|
106
137
|
`,
|
|
107
138
|
}),
|
|
108
139
|
}
|
|
109
140
|
|
|
110
141
|
export const WithIcons: Story = {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
template: `
|
|
114
|
-
<div style="display: flex; gap: 8px; align-items: center;">
|
|
115
|
-
<CpBadge color="blue" leading-icon="check" label="Leading Icon" />
|
|
116
|
-
<CpBadge color="green" trailing-icon="arrow-right" label="Trailing Icon" />
|
|
117
|
-
<CpBadge color="red" leading-icon="check" trailing-icon="arrow-right" label="Both Icons" />
|
|
118
|
-
</div>
|
|
119
|
-
`,
|
|
120
|
-
}),
|
|
142
|
+
args: { ...Default.args, leadingIcon: 'check', trailingIcon: 'arrow-right', label: 'Both Icons' },
|
|
143
|
+
render: defaultRender,
|
|
121
144
|
}
|
|
122
145
|
|
|
123
146
|
export const IsSquare: Story = {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
template: `
|
|
127
|
-
<div style="display: flex; gap: 8px; align-items: center;">
|
|
128
|
-
<CpBadge color="blue" isSquare label="Square" />
|
|
129
|
-
<CpBadge color="green" isSquare label="Square" />
|
|
130
|
-
<CpBadge color="red" isSquare label="Square" />
|
|
131
|
-
</div>
|
|
132
|
-
`,
|
|
133
|
-
}),
|
|
147
|
+
args: { ...Default.args, isSquare: true, label: 'Square' },
|
|
148
|
+
render: defaultRender,
|
|
134
149
|
}
|
|
135
150
|
|
|
136
151
|
export const IsClearable: Story = {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
template: `
|
|
140
|
-
<div style="display: flex; gap: 8px; align-items: center;">
|
|
141
|
-
<CpBadge color="blue" isClearable label="Clearable" />
|
|
142
|
-
<CpBadge color="green" isClearable label="Clearable" />
|
|
143
|
-
<CpBadge color="red" isClearable label="Clearable" />
|
|
144
|
-
</div>
|
|
145
|
-
`,
|
|
146
|
-
}),
|
|
152
|
+
args: { ...Default.args, isClearable: true, label: 'Clearable' },
|
|
153
|
+
render: defaultRender,
|
|
147
154
|
}
|
|
148
155
|
|
|
149
156
|
export const WithSlot: Story = {
|
|
150
|
-
render: () => ({
|
|
157
|
+
render: (args: Args) => ({
|
|
151
158
|
components: { CpBadge },
|
|
159
|
+
setup() {
|
|
160
|
+
return { args }
|
|
161
|
+
},
|
|
152
162
|
template: `
|
|
153
|
-
<CpBadge
|
|
163
|
+
<CpBadge v-bind="args">
|
|
154
164
|
<template #leading-icon>
|
|
155
165
|
<span style="font-size: 16px; margin-right: 4px;">🌟</span>
|
|
156
166
|
</template>
|
|
@@ -46,15 +46,6 @@ const meta = {
|
|
|
46
46
|
control: 'text',
|
|
47
47
|
description: 'HTML tag to use for the icon wrapper',
|
|
48
48
|
},
|
|
49
|
-
weight: {
|
|
50
|
-
control: 'number',
|
|
51
|
-
description: 'Weight for specific icons like checked-baggage',
|
|
52
|
-
table: {
|
|
53
|
-
defaultValue: {
|
|
54
|
-
summary: '0',
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
49
|
},
|
|
59
50
|
} satisfies Meta<typeof CpIcon>
|
|
60
51
|
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { createElementBlock as e, openBlock as o } from "vue";
|
|
2
|
-
import { _ as r } from "./index-b9vCNG2n.js";
|
|
3
|
-
const t = {}, c = {
|
|
4
|
-
width: "24",
|
|
5
|
-
height: "24",
|
|
6
|
-
viewBox: "0 0 24 24",
|
|
7
|
-
fill: "currentColor",
|
|
8
|
-
"fill-rule": "evenodd",
|
|
9
|
-
"clip-rule": "evenodd",
|
|
10
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
11
|
-
};
|
|
12
|
-
function n(l, s) {
|
|
13
|
-
return o(), e("svg", c);
|
|
14
|
-
}
|
|
15
|
-
const d = /* @__PURE__ */ r(t, [["render", n]]);
|
|
16
|
-
export {
|
|
17
|
-
d as default
|
|
18
|
-
};
|