pukaad-ui-lib 1.308.0 → 1.309.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/module.json +1 -1
- package/dist/runtime/components/button.vue +10 -10
- package/dist/runtime/components/input/input-date-picker.d.vue.ts +2 -0
- package/dist/runtime/components/input/input-date-picker.vue +29 -17
- package/dist/runtime/components/input/input-date-picker.vue.d.ts +2 -0
- package/package.json +1 -1
- /package/dist/runtime/assets/svg/socials/{Whatsapp.svg → WhatsApp.svg} +0 -0
package/dist/module.json
CHANGED
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
props.variant === 'text' || props.variant === 'link' ? '!p-0 !h-auto' : '',
|
|
5
5
|
props.circle && 'rounded-full aspect-square',
|
|
6
6
|
props.class
|
|
7
|
-
]" :variant="props.variant" :color="props.color" :size="resolvedSize" :type="props.type"
|
|
8
|
-
:disabled="props.loading || props.disabled">
|
|
9
|
-
<span class="inline-grid place-items-center">
|
|
10
|
-
<span class="inline-flex items-center justify-center gap-[8px] [grid-area:1/1]"
|
|
11
|
-
:class="{ invisible: props.loading }">
|
|
12
|
-
<slot />
|
|
13
|
-
</span>
|
|
14
|
-
<ShadSpinner v-if="props.loading" class="[grid-area:1/1]" />
|
|
15
|
-
</span>
|
|
16
|
-
</ShadButton>
|
|
7
|
+
]" :variant="props.variant" :color="props.color" :size="resolvedSize" :type="props.type"
|
|
8
|
+
:disabled="props.loading || props.disabled">
|
|
9
|
+
<span class="inline-grid place-items-center">
|
|
10
|
+
<span class="inline-flex items-center justify-center gap-[8px] [grid-area:1/1]"
|
|
11
|
+
:class="{ invisible: props.loading }">
|
|
12
|
+
<slot />
|
|
13
|
+
</span>
|
|
14
|
+
<ShadSpinner v-if="props.loading" class="[grid-area:1/1]" />
|
|
15
|
+
</span>
|
|
16
|
+
</ShadButton>
|
|
17
17
|
</template>
|
|
18
18
|
|
|
19
19
|
<script setup>
|
|
@@ -21,6 +21,7 @@ export interface InputDatePickerProps {
|
|
|
21
21
|
isDateDisabled?: (date: DateValue) => boolean;
|
|
22
22
|
defaultPlaceholder?: DateValue;
|
|
23
23
|
reverseYears?: boolean;
|
|
24
|
+
variant?: "default" | "button";
|
|
24
25
|
}
|
|
25
26
|
type __VLS_Props = InputDatePickerProps;
|
|
26
27
|
type __VLS_ModelProps = {
|
|
@@ -38,6 +39,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
38
39
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
39
40
|
"onUpdate:modelValue"?: ((value: Date | undefined) => any) | undefined;
|
|
40
41
|
}>, {
|
|
42
|
+
variant: "default" | "button";
|
|
41
43
|
disabled: boolean;
|
|
42
44
|
required: boolean;
|
|
43
45
|
id: string;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
v-slot="{ errorMessage }"
|
|
7
7
|
v-model="modelValue"
|
|
8
8
|
>
|
|
9
|
-
<ShadFormItem>
|
|
9
|
+
<ShadFormItem :class="cn('flex flex-col w-full', props.class)">
|
|
10
10
|
<ShadFormLabel v-if="props.label || $slots.label" class="w-full">
|
|
11
11
|
<slot name="label">
|
|
12
12
|
<div class="flex-1">
|
|
@@ -25,26 +25,37 @@
|
|
|
25
25
|
:disabled="props.disabled"
|
|
26
26
|
:class="
|
|
27
27
|
cn(
|
|
28
|
-
'w-full flex items-center
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
'w-full flex items-center gap-2 font-body-large',
|
|
29
|
+
!modelValue && props.variant === 'button' ? 'justify-center' : 'justify-between',
|
|
30
|
+
errorMessage && 'border-destructive hover:border-destructive'
|
|
31
31
|
)
|
|
32
32
|
"
|
|
33
33
|
>
|
|
34
|
-
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
<!-- Filled State -->
|
|
35
|
+
<template v-if="modelValue">
|
|
36
|
+
<span>{{ formattedDate }}</span>
|
|
37
|
+
<Icon
|
|
38
|
+
name="lucide:x"
|
|
39
|
+
:size="16"
|
|
40
|
+
class="!pointer-events-auto cursor-pointer shrink-0"
|
|
41
|
+
@click.stop.prevent="clearDate"
|
|
42
|
+
/>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<!-- Empty State: button mode -->
|
|
46
|
+
<template v-else-if="props.variant === 'button'">
|
|
47
|
+
<span>{{ placeholder }}</span>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<!-- Empty State: default mode -->
|
|
51
|
+
<template v-else>
|
|
52
|
+
<span class="text-cloud">{{ placeholder }}</span>
|
|
53
|
+
<Icon name="lucide:calendar" :size="16" class="shrink-0" />
|
|
54
|
+
</template>
|
|
44
55
|
</Button>
|
|
45
56
|
</PopoverTrigger>
|
|
46
57
|
<PopoverContent class="w-auto p-0" align="start">
|
|
47
|
-
<div :class="cn('sm:flex', showTime && 'flex-row')">
|
|
58
|
+
<div :class="cn('sm:flex', props.showTime && 'flex-row')">
|
|
48
59
|
<Calendar
|
|
49
60
|
v-model="calendarValue"
|
|
50
61
|
initial-focus
|
|
@@ -58,7 +69,7 @@
|
|
|
58
69
|
/>
|
|
59
70
|
<!-- Time Picker -->
|
|
60
71
|
<div
|
|
61
|
-
v-if="showTime"
|
|
72
|
+
v-if="props.showTime"
|
|
62
73
|
class="flex flex-col sm:flex-row sm:h-[300px] divide-y sm:divide-y-0 sm:divide-x sm:border-t-0"
|
|
63
74
|
>
|
|
64
75
|
<!-- Hours -->
|
|
@@ -144,7 +155,8 @@ const props = defineProps({
|
|
|
144
155
|
minValue: { type: Date, required: false },
|
|
145
156
|
isDateDisabled: { type: Function, required: false },
|
|
146
157
|
defaultPlaceholder: { type: null, required: false },
|
|
147
|
-
reverseYears: { type: Boolean, required: false }
|
|
158
|
+
reverseYears: { type: Boolean, required: false },
|
|
159
|
+
variant: { type: String, required: false, default: "default" }
|
|
148
160
|
});
|
|
149
161
|
const maxCalendarValue = computed(() => {
|
|
150
162
|
if (!props.maxValue) return void 0;
|
|
@@ -21,6 +21,7 @@ export interface InputDatePickerProps {
|
|
|
21
21
|
isDateDisabled?: (date: DateValue) => boolean;
|
|
22
22
|
defaultPlaceholder?: DateValue;
|
|
23
23
|
reverseYears?: boolean;
|
|
24
|
+
variant?: "default" | "button";
|
|
24
25
|
}
|
|
25
26
|
type __VLS_Props = InputDatePickerProps;
|
|
26
27
|
type __VLS_ModelProps = {
|
|
@@ -38,6 +39,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
38
39
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
39
40
|
"onUpdate:modelValue"?: ((value: Date | undefined) => any) | undefined;
|
|
40
41
|
}>, {
|
|
42
|
+
variant: "default" | "button";
|
|
41
43
|
disabled: boolean;
|
|
42
44
|
required: boolean;
|
|
43
45
|
id: string;
|
package/package.json
CHANGED
|
File without changes
|