@citizenplane/pimp 9.5.12 → 9.6.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/pimp.es.js +3745 -3706
- package/dist/pimp.umd.js +18 -18
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/CpCalendar.vue +19 -24
- package/src/components/CpCheckbox.vue +7 -9
- package/src/components/CpDate.vue +13 -13
- package/src/components/CpDatepicker.vue +18 -18
- package/src/components/CpInput.vue +10 -10
- package/src/components/CpLoader.vue +59 -16
- package/src/components/CpRadio.vue +8 -8
- package/src/components/CpSelect.vue +9 -13
- package/src/components/CpSwitch.vue +8 -10
- package/src/components/CpTable.vue +13 -14
- package/src/components/CpTextarea.vue +6 -6
- package/src/components/CpToaster.vue +6 -12
- package/src/components/icons/IconPlane.vue +16 -0
- package/src/components/icons/IconPlaneLanding.vue +17 -0
- package/src/components/icons/IconPlaneTakeoff.vue +7 -0
- package/src/constants/CpCustomIcons.ts +6 -0
- package/src/helpers/index.ts +0 -4
- package/src/libs/CoreDatepicker.vue +11 -11
- package/src/stories/CpLoader.stories.ts +11 -10
|
@@ -18,17 +18,17 @@
|
|
|
18
18
|
</div>
|
|
19
19
|
<div class="asd__datepicker-header">
|
|
20
20
|
<button
|
|
21
|
-
type="button"
|
|
22
|
-
class="asd__change-month-button asd__change-month-button--previous"
|
|
23
21
|
aria-label="previous month"
|
|
22
|
+
class="asd__change-month-button asd__change-month-button--previous"
|
|
23
|
+
type="button"
|
|
24
24
|
@click="previousMonth"
|
|
25
25
|
>
|
|
26
26
|
<cp-icon type="chevron-left" />
|
|
27
27
|
</button>
|
|
28
28
|
<button
|
|
29
|
-
type="button"
|
|
30
|
-
class="asd__change-month-button asd__change-month-button--next"
|
|
31
29
|
aria-label="next month"
|
|
30
|
+
class="asd__change-month-button asd__change-month-button--next"
|
|
31
|
+
type="button"
|
|
32
32
|
@click="nextMonth"
|
|
33
33
|
>
|
|
34
34
|
<cp-icon type="chevron-right" />
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
<option
|
|
64
64
|
v-for="(monthName, idx) in monthNames"
|
|
65
65
|
:key="`month-${monthIndex}-${monthName}`"
|
|
66
|
-
:value="monthName"
|
|
67
66
|
:disabled="isMonthDisabled(month.year, idx)"
|
|
67
|
+
:value="monthName"
|
|
68
68
|
>
|
|
69
69
|
{{ monthName }}
|
|
70
70
|
</option>
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
<option
|
|
81
81
|
v-if="years.indexOf(month.year) === -1"
|
|
82
82
|
:key="`month-${monthIndex}-${month.year}`"
|
|
83
|
-
:value="month.year"
|
|
84
83
|
:disabled="true"
|
|
84
|
+
:value="month.year"
|
|
85
85
|
>
|
|
86
86
|
{{ month.year }}
|
|
87
87
|
</option>
|
|
@@ -99,17 +99,17 @@
|
|
|
99
99
|
:key="dayIndex + '_' + dayNumber"
|
|
100
100
|
:ref="`date-${dayDate}`"
|
|
101
101
|
class="asd__day"
|
|
102
|
-
:data-date="dayDate"
|
|
103
102
|
:class="getDayClasses(dayNumber, dayDate)"
|
|
103
|
+
:data-date="dayDate"
|
|
104
104
|
@mouseover="setHoverDate(dayDate)"
|
|
105
105
|
>
|
|
106
106
|
<button
|
|
107
107
|
v-if="dayNumber"
|
|
108
108
|
class="asd__day-button"
|
|
109
|
-
type="button"
|
|
110
|
-
tabindex="-1"
|
|
111
109
|
:date="dayDate"
|
|
112
110
|
:disabled="isDisabled(dayDate)"
|
|
111
|
+
tabindex="-1"
|
|
112
|
+
type="button"
|
|
113
113
|
@click="selectDate(dayDate)"
|
|
114
114
|
>
|
|
115
115
|
<span class="asd__day-number">{{ dayNumber }}</span>
|
|
@@ -128,11 +128,11 @@
|
|
|
128
128
|
|
|
129
129
|
<script lang="ts">
|
|
130
130
|
import { DateTime, Info } from 'luxon'
|
|
131
|
+
import { useId } from 'vue'
|
|
131
132
|
|
|
132
133
|
import CpIcon from '@/components/CpIcon.vue'
|
|
133
134
|
|
|
134
135
|
import ResizeSelect from '@/directives/ResizeSelect'
|
|
135
|
-
import { randomString } from '@/helpers'
|
|
136
136
|
|
|
137
137
|
export default {
|
|
138
138
|
name: 'CoreDatepicker',
|
|
@@ -263,7 +263,7 @@ export default {
|
|
|
263
263
|
],
|
|
264
264
|
data() {
|
|
265
265
|
return {
|
|
266
|
-
wrapperId: 'datepicker-wrapper-' +
|
|
266
|
+
wrapperId: 'datepicker-wrapper-' + useId(),
|
|
267
267
|
dateLabelFormat: 'dddd, MMMM D, YYYY',
|
|
268
268
|
showDatepicker: false,
|
|
269
269
|
showKeyboardShortcutsMenu: false,
|
|
@@ -2,13 +2,21 @@ import type { Meta, StoryObj } from '@storybook/vue3'
|
|
|
2
2
|
|
|
3
3
|
import CpLoader from '@/components/CpLoader.vue'
|
|
4
4
|
|
|
5
|
+
import { Colors } from '@/constants'
|
|
6
|
+
|
|
5
7
|
const meta = {
|
|
6
8
|
title: 'CpLoader',
|
|
7
9
|
component: CpLoader,
|
|
8
10
|
argTypes: {
|
|
11
|
+
size: {
|
|
12
|
+
control: 'select',
|
|
13
|
+
options: ['xs', 'sm', 'md', 'lg'],
|
|
14
|
+
description: 'The size of the button',
|
|
15
|
+
},
|
|
9
16
|
color: {
|
|
10
|
-
control: '
|
|
11
|
-
|
|
17
|
+
control: 'select',
|
|
18
|
+
options: ['Blue', 'Purple', 'Green', 'Orange', 'Red'],
|
|
19
|
+
description: 'The color variant of the button',
|
|
12
20
|
},
|
|
13
21
|
},
|
|
14
22
|
} satisfies Meta<typeof CpLoader>
|
|
@@ -18,13 +26,6 @@ type Story = StoryObj<typeof meta>
|
|
|
18
26
|
|
|
19
27
|
export const Default: Story = {
|
|
20
28
|
args: {
|
|
21
|
-
color:
|
|
22
|
-
},
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export const CustomColor: Story = {
|
|
26
|
-
args: {
|
|
27
|
-
...Default.args,
|
|
28
|
-
color: '#10B981',
|
|
29
|
+
color: Colors.PURPLE,
|
|
29
30
|
},
|
|
30
31
|
}
|