sprintify-ui 0.6.60 → 0.6.62
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/sprintify-ui.es.js +928 -924
- package/dist/types/src/components/BaseDatePicker.vue.d.ts +3 -3
- package/dist/types/src/components/BaseTableRow.vue.d.ts +10 -2
- package/package.json +1 -1
- package/src/components/BaseDatePicker.stories.js +20 -0
- package/src/components/BaseDatePicker.vue +2 -1
- package/src/components/BaseTableRow.vue +8 -1
|
@@ -53,7 +53,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
53
53
|
default: boolean;
|
|
54
54
|
};
|
|
55
55
|
disableDates: {
|
|
56
|
-
type: import("vue").PropType<string
|
|
56
|
+
type: import("vue").PropType<(string | Date | ((date: Date) => boolean))[]>;
|
|
57
57
|
default: () => never[];
|
|
58
58
|
};
|
|
59
59
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -112,7 +112,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
112
112
|
default: boolean;
|
|
113
113
|
};
|
|
114
114
|
disableDates: {
|
|
115
|
-
type: import("vue").PropType<string
|
|
115
|
+
type: import("vue").PropType<(string | Date | ((date: Date) => boolean))[]>;
|
|
116
116
|
default: () => never[];
|
|
117
117
|
};
|
|
118
118
|
}>> & {
|
|
@@ -131,6 +131,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
131
131
|
showInput: boolean;
|
|
132
132
|
enableTime: boolean;
|
|
133
133
|
noCalendar: boolean;
|
|
134
|
-
disableDates: string
|
|
134
|
+
disableDates: (string | Date | ((date: Date) => boolean))[];
|
|
135
135
|
}, {}>;
|
|
136
136
|
export default _default;
|
|
@@ -21,7 +21,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
21
21
|
type: import("vue").PropType<string>;
|
|
22
22
|
default: undefined;
|
|
23
23
|
};
|
|
24
|
-
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
|
+
click: (...args: any[]) => void;
|
|
26
|
+
mouseenter: (...args: any[]) => void;
|
|
27
|
+
mouseleave: (...args: any[]) => void;
|
|
28
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
29
|
class: {
|
|
26
30
|
type: import("vue").PropType<string | false | 0 | ClassNameValue[] | null>;
|
|
27
31
|
default: undefined;
|
|
@@ -42,7 +46,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
42
46
|
type: import("vue").PropType<string>;
|
|
43
47
|
default: undefined;
|
|
44
48
|
};
|
|
45
|
-
}
|
|
49
|
+
}>> & {
|
|
50
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
51
|
+
onMouseenter?: ((...args: any[]) => any) | undefined;
|
|
52
|
+
onMouseleave?: ((...args: any[]) => any) | undefined;
|
|
53
|
+
}, {
|
|
46
54
|
class: string | false | 0 | ClassNameValue[] | null;
|
|
47
55
|
title: string;
|
|
48
56
|
to: RouteLocationRaw;
|
package/package.json
CHANGED
|
@@ -81,6 +81,26 @@ DisableDates.args = {
|
|
|
81
81
|
],
|
|
82
82
|
};
|
|
83
83
|
|
|
84
|
+
const DisableMondayAndTuesdayTemplate = (args) => ({
|
|
85
|
+
components: { BaseDatePicker, ShowValue },
|
|
86
|
+
setup() {
|
|
87
|
+
const value = ref('2022-01-03');
|
|
88
|
+
const disableDates = [
|
|
89
|
+
(date) => {
|
|
90
|
+
return date.getDay() == 1 || date.getDay() == 2;
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
return { value, args, disableDates };
|
|
94
|
+
},
|
|
95
|
+
template: `
|
|
96
|
+
<BaseDatePicker v-model="value" v-bind="args" :disableDates="disableDates">
|
|
97
|
+
</BaseDatePicker>
|
|
98
|
+
<ShowValue :value="value" />
|
|
99
|
+
`,
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
export const DisableMondayAndTuesday = DisableMondayAndTuesdayTemplate.bind({});
|
|
103
|
+
|
|
84
104
|
export const RangeDisableDates = Template.bind({});
|
|
85
105
|
RangeDisableDates.args = {
|
|
86
106
|
disableDates: [
|
|
@@ -72,7 +72,7 @@ const props = withDefaults(
|
|
|
72
72
|
enableTime?: boolean;
|
|
73
73
|
mode?: 'single' | 'multiple' | 'range' | 'time';
|
|
74
74
|
noCalendar?: boolean;
|
|
75
|
-
disableDates?: string
|
|
75
|
+
disableDates?: (string | Date | ((date: Date) => boolean))[];
|
|
76
76
|
}>(),
|
|
77
77
|
{
|
|
78
78
|
modelValue: null,
|
|
@@ -167,6 +167,7 @@ const datepicker = ref(null) as Ref<HTMLInputElement | null>;
|
|
|
167
167
|
let picker = null as Instance | null;
|
|
168
168
|
|
|
169
169
|
const flatpickrConfig = computed(() => {
|
|
170
|
+
|
|
170
171
|
return {
|
|
171
172
|
enableTime: props.enableTime,
|
|
172
173
|
dateFormat: formatInternal.value,
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<tr
|
|
2
|
+
<tr
|
|
3
|
+
:class="classes"
|
|
4
|
+
@click="emit('click')"
|
|
5
|
+
@mouseenter="emit('mouseenter')"
|
|
6
|
+
@mouseleave="emit('mouseleave')"
|
|
7
|
+
>
|
|
3
8
|
<slot />
|
|
4
9
|
</tr>
|
|
5
10
|
</template>
|
|
@@ -18,6 +23,8 @@ if (!baseTable) {
|
|
|
18
23
|
throw new Error('baseTable must be used within a BaseTable.');
|
|
19
24
|
}
|
|
20
25
|
|
|
26
|
+
const emit = defineEmits(['click', 'mouseenter', 'mouseleave']);
|
|
27
|
+
|
|
21
28
|
const props = withDefaults(defineProps<{
|
|
22
29
|
href?: string,
|
|
23
30
|
to?: RouteLocationRaw,
|