@citizenplane/pimp 18.9.4 → 18.9.6
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/biome.json +20 -14
- package/dist/components/CpButton.vue.d.ts +4 -4
- package/dist/components/CpButton.vue.d.ts.map +1 -1
- package/dist/components/CpCalendar.vue.d.ts.map +1 -1
- package/dist/components/CpSelectableButton.vue.d.ts.map +1 -1
- package/dist/components/CpTable.vue.d.ts.map +1 -1
- package/dist/components/CpTripTimeline.vue.d.ts.map +1 -1
- package/dist/pimp.es.js +49166 -36250
- package/dist/pimp.umd.js +85 -81
- package/dist/resolver.js +11 -12
- package/dist/style.css +2 -1
- package/package.json +34 -34
- package/src/assets/styles/helpers/_functions.scss +1 -1
- package/src/assets/styles/helpers/_mixins.scss +2 -4
- package/src/assets/styles/utilities/_index.scss +4 -12
- package/src/components/CpButton.vue +1 -0
- package/src/components/CpCalendar.vue +11 -3
- package/src/components/CpSelectableButton.vue +0 -1
- package/src/components/CpTable.vue +0 -1
- package/src/components/CpTripTimeline.vue +2 -2
- package/vite.config.js +62 -0
- package/vite.resolver.config.js +20 -0
- package/vitest.workspace.js +2 -2
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citizenplane/pimp",
|
|
3
|
-
"version": "18.9.
|
|
3
|
+
"version": "18.9.6",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "storybook dev -p 8081",
|
|
6
6
|
"build-storybook": "storybook build --output-dir ./docs",
|
|
7
|
-
"build": "vite build && vite build --config vite.resolver.config.
|
|
7
|
+
"build": "vite build && vite build --config vite.resolver.config.js",
|
|
8
8
|
"lint": "biome check .",
|
|
9
9
|
"lint:fix": "biome check --write .",
|
|
10
10
|
"lint:style": "stylelint \"**/*.{css,scss,vue}\"",
|
|
@@ -52,54 +52,54 @@
|
|
|
52
52
|
"feather-icons": "^4.29.2",
|
|
53
53
|
"floating-vue": "^5.2.2",
|
|
54
54
|
"luxon": "^3.7.2",
|
|
55
|
-
"maska": "^3.
|
|
55
|
+
"maska": "^3.2.0",
|
|
56
56
|
"modern-normalize": "^3.0.1",
|
|
57
|
-
"primevue": "^4.5.
|
|
58
|
-
"vue": "^3.5.
|
|
57
|
+
"primevue": "^4.5.5",
|
|
58
|
+
"vue": "^3.5.38",
|
|
59
59
|
"vue-bind-once": "^0.2.1",
|
|
60
|
-
"vue-tel-input": "^9.
|
|
60
|
+
"vue-tel-input": "^9.8.0",
|
|
61
61
|
"web-haptics": "^0.0.6"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@babel/core": "^7.
|
|
65
|
-
"@biomejs/biome": "2.
|
|
66
|
-
"@commitlint/cli": "
|
|
67
|
-
"@storybook/addon-docs": "^10.
|
|
68
|
-
"@storybook/addon-onboarding": "^10.
|
|
69
|
-
"@storybook/addon-vitest": "^10.
|
|
64
|
+
"@babel/core": "^7.29.7",
|
|
65
|
+
"@biomejs/biome": "2.5.1",
|
|
66
|
+
"@commitlint/cli": "21.1.0",
|
|
67
|
+
"@storybook/addon-docs": "^10.4.6",
|
|
68
|
+
"@storybook/addon-onboarding": "^10.4.6",
|
|
69
|
+
"@storybook/addon-vitest": "^10.4.6",
|
|
70
70
|
"@storybook/preset-scss": "^1.0.3",
|
|
71
|
-
"@storybook/vue3-vite": "^10.
|
|
71
|
+
"@storybook/vue3-vite": "^10.4.6",
|
|
72
72
|
"@types/feather-icons": "^4.29.4",
|
|
73
73
|
"@types/vue-tel-input": "^9.7.91",
|
|
74
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
75
|
-
"@vitest/browser": "^4.
|
|
76
|
-
"@vitest/coverage-v8": "^4.
|
|
77
|
-
"@vue/babel-preset-app": "^5.0.
|
|
78
|
-
"@vue/test-utils": "^2.4.
|
|
74
|
+
"@vitejs/plugin-vue": "^6.0.7",
|
|
75
|
+
"@vitest/browser": "^4.1.9",
|
|
76
|
+
"@vitest/coverage-v8": "^4.1.9",
|
|
77
|
+
"@vue/babel-preset-app": "^5.0.9",
|
|
78
|
+
"@vue/test-utils": "^2.4.11",
|
|
79
79
|
"@vue/vue3-jest": "^29.2.6",
|
|
80
80
|
"babel-core": "^7.0.0-bridge.0",
|
|
81
81
|
"commitlint-config-gitmoji": "2.3.1",
|
|
82
82
|
"husky": "^9.1.7",
|
|
83
83
|
"jest": "~29.7.0",
|
|
84
|
-
"jest-environment-jsdom": "^30.
|
|
85
|
-
"lint-staged": "^17.0.
|
|
86
|
-
"playwright": "^1.
|
|
87
|
-
"sass": "~1.
|
|
88
|
-
"sass-loader": "^16.0.
|
|
89
|
-
"storybook": "^10.
|
|
90
|
-
"stylelint": "
|
|
84
|
+
"jest-environment-jsdom": "^30.4.1",
|
|
85
|
+
"lint-staged": "^17.0.8",
|
|
86
|
+
"playwright": "^1.61.0",
|
|
87
|
+
"sass": "~1.101.0",
|
|
88
|
+
"sass-loader": "^16.0.8",
|
|
89
|
+
"storybook": "^10.4.6",
|
|
90
|
+
"stylelint": "17.13.0",
|
|
91
91
|
"stylelint-config-html": "1.1.0",
|
|
92
92
|
"stylelint-config-idiomatic-order": "10.0.0",
|
|
93
|
-
"stylelint-config-recommended-scss": "
|
|
93
|
+
"stylelint-config-recommended-scss": " 17.0.1",
|
|
94
94
|
"stylelint-config-recommended-vue": "1.6.1",
|
|
95
|
-
"stylelint-config-standard-scss": "
|
|
96
|
-
"stylelint-order": "
|
|
97
|
-
"ts-jest": "^29.4.
|
|
98
|
-
"unplugin-vue-components": "^32.
|
|
99
|
-
"vite": "^
|
|
100
|
-
"vite-plugin-dts": "^5.0.
|
|
101
|
-
"vitest": "^4.
|
|
102
|
-
"vue-tsc": "3.
|
|
95
|
+
"stylelint-config-standard-scss": "17.0.0",
|
|
96
|
+
"stylelint-order": "8.1.1",
|
|
97
|
+
"ts-jest": "^29.4.11",
|
|
98
|
+
"unplugin-vue-components": "^32.1.0",
|
|
99
|
+
"vite": "^8.1.0",
|
|
100
|
+
"vite-plugin-dts": "^5.0.2",
|
|
101
|
+
"vitest": "^4.1.9",
|
|
102
|
+
"vue-tsc": "3.3.5"
|
|
103
103
|
},
|
|
104
104
|
"engines": {
|
|
105
105
|
"npm": "11",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use
|
|
1
|
+
@use "../helpers/functions" as fn;
|
|
2
2
|
|
|
3
3
|
// Popover
|
|
4
4
|
@mixin popover-desktop($transitionName) {
|
|
@@ -42,9 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
@mixin v-dropdown-transition() {
|
|
44
44
|
.v-popper__wrapper {
|
|
45
|
-
transition:
|
|
46
|
-
scale 200ms var(--cp-easing-elastic),
|
|
47
|
-
opacity 200ms ease;
|
|
45
|
+
transition: scale 200ms var(--cp-easing-elastic), opacity 200ms ease;
|
|
48
46
|
}
|
|
49
47
|
|
|
50
48
|
.v-popper__popper--hidden .v-popper__wrapper {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use
|
|
1
|
+
@use "../helpers/functions" as fn;
|
|
2
2
|
|
|
3
3
|
.u-text-ellipsis,
|
|
4
4
|
%u-text-ellipsis {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
line-height: normal;
|
|
24
24
|
|
|
25
25
|
&::after {
|
|
26
|
-
content:
|
|
26
|
+
content: " ";
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -54,15 +54,7 @@ label .u-asterisk {
|
|
|
54
54
|
radial-gradient(farthest-side at 100% 50%, #3e3e5b33, #3e3e5b00) 0 100%;
|
|
55
55
|
background-attachment: local, local, scroll, scroll;
|
|
56
56
|
background-color: var(--cp-background-primary);
|
|
57
|
-
background-position:
|
|
58
|
-
0 0,
|
|
59
|
-
100%,
|
|
60
|
-
0 0,
|
|
61
|
-
100%;
|
|
57
|
+
background-position: 0 0, 100%, 0 0, 100%;
|
|
62
58
|
background-repeat: no-repeat;
|
|
63
|
-
background-size:
|
|
64
|
-
40px 100%,
|
|
65
|
-
40px 100%,
|
|
66
|
-
14px 100%,
|
|
67
|
-
14px 100%;
|
|
59
|
+
background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
|
|
68
60
|
}
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
</div>
|
|
65
65
|
</div>
|
|
66
66
|
<div key="action" class="asd__recurency--action">
|
|
67
|
-
<cp-button class="asd__button-switch" @click.stop="
|
|
67
|
+
<cp-button class="asd__button-switch" @click.stop="handleRecurency">
|
|
68
68
|
{{ isDaysDisplayed ? 'Remove recurency' : 'Add recurency' }}
|
|
69
69
|
</cp-button>
|
|
70
70
|
<cp-button
|
|
@@ -181,6 +181,14 @@ const toggleDay = (index: number): void => {
|
|
|
181
181
|
emitToParent()
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
+
const handleRecurency = (): void => {
|
|
185
|
+
if (isDaysDisplayed.value) {
|
|
186
|
+
removeRecurency()
|
|
187
|
+
} else {
|
|
188
|
+
addRecurency()
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
184
192
|
const addRecurency = (): void => {
|
|
185
193
|
const dt = DateTime.local()
|
|
186
194
|
mode.value = 'range'
|
|
@@ -200,11 +208,11 @@ const removeRecurency = (): void => {
|
|
|
200
208
|
|
|
201
209
|
const emitToParent = (): void => {
|
|
202
210
|
let dates = [dateOne.value]
|
|
203
|
-
|
|
211
|
+
|
|
204
212
|
if (isDaysDisplayed.value) {
|
|
205
213
|
dates = recurenceDates.value.length ? datesToStringArray(recurenceDates.value) : []
|
|
206
214
|
}
|
|
207
|
-
|
|
215
|
+
|
|
208
216
|
emit('dates', dates)
|
|
209
217
|
}
|
|
210
218
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<cp-badge :size="badgeDynamicSize">
|
|
8
8
|
{{ flightDuration }}
|
|
9
9
|
</cp-badge>
|
|
10
|
-
<cp-tooltip v-if="!hideAirlines" allow-outside-container>
|
|
10
|
+
<cp-tooltip v-if="!hideAirlines" allow-outside-container color="neutral">
|
|
11
11
|
<div class="cpTripTimeline__airlines">
|
|
12
12
|
<div
|
|
13
13
|
v-for="(airline, index) in firstAirlines"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<span class="cpTripTimeline__dot" />
|
|
29
29
|
</div>
|
|
30
30
|
</div>
|
|
31
|
-
<cp-tooltip class="cpTripTimeline__tooltip" :disabled="!hasStops" allow-outside-container>
|
|
31
|
+
<cp-tooltip class="cpTripTimeline__tooltip" :disabled="!hasStops" allow-outside-container color="neutral">
|
|
32
32
|
<p class="cpTripTimeline__summary">
|
|
33
33
|
<template v-if="hasStops">
|
|
34
34
|
<span class="cpTripTimeline__stop">{{ stopLabel }}</span>
|
package/vite.config.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import vue from '@vitejs/plugin-vue'
|
|
2
|
+
import path from 'path'
|
|
3
|
+
import { defineConfig } from 'vite'
|
|
4
|
+
import dts from 'vite-plugin-dts'
|
|
5
|
+
|
|
6
|
+
// https://vitejs.dev/config/
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
plugins: [
|
|
9
|
+
vue(),
|
|
10
|
+
dts({
|
|
11
|
+
tsconfigPath: path.resolve(__dirname, 'tsconfig.build.json'),
|
|
12
|
+
// Types for the package root are resolved via package.json "types"
|
|
13
|
+
// pointing at dist/components/index.d.ts (library entry lives there).
|
|
14
|
+
insertTypesEntry: false,
|
|
15
|
+
}),
|
|
16
|
+
],
|
|
17
|
+
resolve: {
|
|
18
|
+
alias: {
|
|
19
|
+
'@': path.resolve(__dirname, 'src'),
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
server: {
|
|
23
|
+
port: 8080,
|
|
24
|
+
},
|
|
25
|
+
css: {
|
|
26
|
+
preprocessorOptions: {
|
|
27
|
+
scss: {
|
|
28
|
+
additionalData: `
|
|
29
|
+
@use "sass:math";
|
|
30
|
+
@use '@/assets/styles/helpers/functions' as fn;
|
|
31
|
+
@use '@/assets/styles/helpers/mixins' as mx;
|
|
32
|
+
@use '@/assets/styles/utilities';`,
|
|
33
|
+
api: 'modern-compiler',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
build: {
|
|
38
|
+
lib: {
|
|
39
|
+
entry: path.resolve(__dirname, 'src/components/index.ts'),
|
|
40
|
+
name: 'Pimp',
|
|
41
|
+
fileName: (format) => `pimp.${format}.js`,
|
|
42
|
+
cssFileName: 'style',
|
|
43
|
+
},
|
|
44
|
+
rollupOptions: {
|
|
45
|
+
// make sure to externalize deps that shouldn't be bundled
|
|
46
|
+
// into your library
|
|
47
|
+
external: ['vue'],
|
|
48
|
+
output: {
|
|
49
|
+
// Avoid emitting a separate chunk for dynamic imports (e.g. libphonenumber).
|
|
50
|
+
// A sibling chunk can declare top-level `var h` while the main entry imports
|
|
51
|
+
// `openBlock as h` from Vue; some downstream bundlers merge those scopes and
|
|
52
|
+
// hit "Identifier 'h' has already been declared".
|
|
53
|
+
codeSplitting: false,
|
|
54
|
+
// Provide global variables to use in the UMD build
|
|
55
|
+
// for externalized deps
|
|
56
|
+
globals: {
|
|
57
|
+
vue: 'Vue',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
})
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import path from 'path'
|
|
2
|
+
import { defineConfig } from 'vite'
|
|
3
|
+
import dts from 'vite-plugin-dts'
|
|
4
|
+
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
plugins: [
|
|
7
|
+
dts({
|
|
8
|
+
tsconfigPath: path.resolve(__dirname, 'tsconfig.resolver.json'),
|
|
9
|
+
insertTypesEntry: false,
|
|
10
|
+
}),
|
|
11
|
+
],
|
|
12
|
+
build: {
|
|
13
|
+
emptyOutDir: false,
|
|
14
|
+
lib: {
|
|
15
|
+
entry: path.resolve(__dirname, 'src/resolver.ts'),
|
|
16
|
+
fileName: () => 'resolver.js',
|
|
17
|
+
formats: ['es'],
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
})
|
package/vitest.workspace.js
CHANGED
|
@@ -7,9 +7,9 @@ const dirname = typeof __dirname !== 'undefined' ? __dirname : path.dirname(file
|
|
|
7
7
|
|
|
8
8
|
// More info at: https://storybook.js.org/docs/writing-tests/test-addon
|
|
9
9
|
export default defineWorkspace([
|
|
10
|
-
'vite.config.
|
|
10
|
+
'vite.config.js',
|
|
11
11
|
{
|
|
12
|
-
extends: 'vite.config.
|
|
12
|
+
extends: 'vite.config.js',
|
|
13
13
|
plugins: [
|
|
14
14
|
// The plugin will run tests for the stories defined in your Storybook config
|
|
15
15
|
// See options at: https://storybook.js.org/docs/writing-tests/test-addon#storybooktest
|