@citizenplane/pimp 18.2.0 → 18.3.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/CpBadge.vue.d.ts +2 -2
- package/dist/components/CpBadge.vue.d.ts.map +1 -1
- package/dist/components/CpMenu.vue.d.ts +7 -1
- package/dist/components/CpMenu.vue.d.ts.map +1 -1
- package/dist/components/icons/IconAirportAlt.vue.d.ts +3 -0
- package/dist/components/icons/IconAirportAlt.vue.d.ts.map +1 -0
- package/dist/constants/CpCustomIcons.d.ts +1 -0
- package/dist/constants/CpCustomIcons.d.ts.map +1 -1
- package/dist/pimp.es.js +2086 -2067
- package/dist/pimp.umd.js +44 -44
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/assets/css/dimensions.css +1 -0
- package/src/components/CpBadge.vue +12 -1
- package/src/components/CpMenu.vue +8 -1
- package/src/components/icons/IconAirportAlt.vue +12 -0
- package/src/constants/CpCustomIcons.ts +2 -0
- package/src/stories/CpBadge.stories.ts +1 -1
package/package.json
CHANGED
|
@@ -27,7 +27,7 @@ interface Props {
|
|
|
27
27
|
isSquare?: boolean
|
|
28
28
|
label?: string
|
|
29
29
|
leadingIcon?: string
|
|
30
|
-
size?: '2xs' | 'xs' | 'sm' | 'md'
|
|
30
|
+
size?: '2xs' | 'xs' | 'sm' | 'md' | 'lg'
|
|
31
31
|
trailingIcon?: string
|
|
32
32
|
variant?: 'outline' | 'soft' | 'solid'
|
|
33
33
|
}
|
|
@@ -128,6 +128,17 @@ const componentDynamicClasses = computed(() => [
|
|
|
128
128
|
white-space: nowrap;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
@include cp-badge-sized(
|
|
132
|
+
'lg',
|
|
133
|
+
var(--cp-text-size-md),
|
|
134
|
+
var(--cp-line-height-md),
|
|
135
|
+
var(--cp-spacing-sm) var(--cp-spacing-md),
|
|
136
|
+
var(--cp-radius-md),
|
|
137
|
+
var(--cp-spacing-sm-md),
|
|
138
|
+
var(--cp-dimensions-5),
|
|
139
|
+
var(--cp-dimensions-4_5)
|
|
140
|
+
);
|
|
141
|
+
|
|
131
142
|
@include cp-badge-sized(
|
|
132
143
|
'md',
|
|
133
144
|
var(--cp-text-size-sm),
|
|
@@ -86,6 +86,11 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
86
86
|
keepOpenOnClick: false,
|
|
87
87
|
})
|
|
88
88
|
|
|
89
|
+
const emits = defineEmits<{
|
|
90
|
+
hide: []
|
|
91
|
+
show: []
|
|
92
|
+
}>()
|
|
93
|
+
|
|
89
94
|
const MOBILE_BREAKPOINT_PX = 640
|
|
90
95
|
|
|
91
96
|
const trigger = ref<HTMLElement | null>(null)
|
|
@@ -122,11 +127,13 @@ const drawerPt = {
|
|
|
122
127
|
const show = (event: Event) => {
|
|
123
128
|
if (isDrawer.value) isOpen.value = true
|
|
124
129
|
else popover.value?.show(event, trigger.value)
|
|
130
|
+
emits('show')
|
|
125
131
|
}
|
|
126
132
|
|
|
127
133
|
const hide = () => {
|
|
128
134
|
if (isDrawer.value) isOpen.value = false
|
|
129
135
|
else popover.value?.hide()
|
|
136
|
+
emits('hide')
|
|
130
137
|
}
|
|
131
138
|
|
|
132
139
|
const onItemClick = () => {
|
|
@@ -167,7 +174,7 @@ defineExpose({ show, hide, toggle })
|
|
|
167
174
|
|
|
168
175
|
&__overlay {
|
|
169
176
|
position: absolute;
|
|
170
|
-
margin-top: var(--cp-spacing-
|
|
177
|
+
margin-top: var(--cp-spacing-sm-md);
|
|
171
178
|
min-width: calc(var(--cp-dimensions-1) * 62.5);
|
|
172
179
|
border-radius: var(--cp-radius-md);
|
|
173
180
|
background-color: var(--cp-background-primary);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg fill="currentColor" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<path
|
|
4
|
+
clip-rule="evenodd"
|
|
5
|
+
d="M6 4.00048C6.55228 4.00048 7 4.4482 7 5.00048V6.00048H9.53223C10.1392 6.00059 10.606 6.53699 10.5225 7.13818L9.9668 11.1382C9.89903 11.6244 9.48847 11.987 9 11.9985V15.0005H18C19.6569 15.0005 21 16.3436 21 18.0005V21.0005H22C22.5523 21.0005 23 21.4482 23 22.0005C22.9998 22.5526 22.5522 23.0005 22 23.0005H2C1.44785 23.0005 1.00021 22.5526 1 22.0005C1 21.4482 1.44772 21.0005 2 21.0005H3V11.9985C2.51153 11.987 2.10097 11.6244 2.0332 11.1382L1.47754 7.13818C1.39398 6.53699 1.86083 6.00059 2.46777 6.00048H5V5.00048C5 4.4482 5.44772 4.00048 6 4.00048ZM5 21.0005H7V12.0005H5V21.0005ZM9 21.0005H19V18.0005C19 17.4482 18.5523 17.0005 18 17.0005H9V21.0005ZM3.84668 10.0005H8.15332L8.31934 8.00048H3.68066L3.84668 10.0005Z"
|
|
6
|
+
fill-rule="evenodd"
|
|
7
|
+
/>
|
|
8
|
+
<path
|
|
9
|
+
d="M20.3838 3.40673C20.8472 2.83472 21.6865 2.74644 22.2588 3.20947C22.5451 3.4411 22.5891 3.86071 22.3574 4.14697L20.3018 6.68506L21.0781 10.9546C21.2096 11.6789 20.7293 12.3728 20.0049 12.5044C19.6427 12.5701 19.2963 12.3294 19.2305 11.9673L18.6426 8.73388L16.5342 11.3394C16.0223 11.9715 15.1779 12.2305 14.3994 11.9946L12.3477 11.3735C11.9954 11.2667 11.7965 10.8938 11.9033 10.5415C12.117 9.83688 12.8617 9.43837 13.5664 9.65185L14.9785 10.0806L17.4102 7.07763L14.1006 6.34326C13.7413 6.26336 13.5151 5.90767 13.5947 5.54834C13.7544 4.82919 14.4664 4.37581 15.1855 4.53564L18.8154 5.34131L20.3838 3.40673Z"
|
|
10
|
+
/>
|
|
11
|
+
</svg>
|
|
12
|
+
</template>
|
|
@@ -5,6 +5,7 @@ import IconAddReceipt from '@/components/icons/IconAddReceipt.vue'
|
|
|
5
5
|
import IconAerosol from '@/components/icons/IconAerosol.vue'
|
|
6
6
|
import IconAggregator from '@/components/icons/IconAggregator.vue'
|
|
7
7
|
import IconAirline from '@/components/icons/IconAirline.vue'
|
|
8
|
+
import IconAirportAlt from '@/components/icons/IconAirportAlt.vue'
|
|
8
9
|
import IconAirportTerminal from '@/components/icons/IconAirportTerminal.vue'
|
|
9
10
|
import IconAllFlightAlt from '@/components/icons/IconAllFlightAlt.vue'
|
|
10
11
|
import IconArrival from '@/components/icons/IconArrival.vue'
|
|
@@ -138,6 +139,7 @@ export const CustomCpIcons = {
|
|
|
138
139
|
aerosol: IconAerosol,
|
|
139
140
|
aggregator: IconAggregator,
|
|
140
141
|
airline: IconAirline,
|
|
142
|
+
'airport-alt': IconAirportAlt,
|
|
141
143
|
'airport-terminal': IconAirportTerminal,
|
|
142
144
|
'all-flight-alt': IconAllFlightAlt,
|
|
143
145
|
arrival: IconArrival,
|