@avenirs-esr/avenirs-dsav 0.1.104 → 0.1.106
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/avenirs-dsav.css +1 -1
- package/dist/components/interaction/inputs/AvInput/AvInput.stub.d.ts +2 -0
- package/dist/components/interaction/inputs/AvInput/AvInput.vue.d.ts +6 -1
- package/dist/components/interaction/inputs/AvInput/utils.d.ts +35 -0
- package/dist/components/interaction/inputs/AvInput/utils.test.d.ts +1 -0
- package/dist/components/interaction/selects/AvAutocomplete/AvAutocomplete.stories.d.ts +5 -0
- package/dist/components/interaction/selects/AvAutocomplete/AvAutocompleteInput.vue.d.ts +12 -6
- package/dist/index.cjs.js +5 -5
- package/dist/index.es.js +2246 -2027
- package/dist/test-utils.cjs.js +3 -3
- package/dist/test-utils.es.js +11 -10
- package/dist/tokens/icons.d.ts +5 -0
- package/package.json +1 -1
- package/src/styles/components/_icons.scss +5 -0
- package/src/styles/core/_typography.scss +65 -1
- package/src/styles/utilities/_spacing.scss +41 -0
|
@@ -23,6 +23,7 @@ export declare const AvInputStub: import("vue").DefineComponent<import("vue").Ex
|
|
|
23
23
|
noRadius: BooleanConstructor;
|
|
24
24
|
modelModifiers: ObjectConstructor;
|
|
25
25
|
textareaMinHeight: StringConstructor;
|
|
26
|
+
formatDateStr: StringConstructor;
|
|
26
27
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
27
28
|
modelValue: StringConstructor;
|
|
28
29
|
label: StringConstructor;
|
|
@@ -48,6 +49,7 @@ export declare const AvInputStub: import("vue").DefineComponent<import("vue").Ex
|
|
|
48
49
|
noRadius: BooleanConstructor;
|
|
49
50
|
modelModifiers: ObjectConstructor;
|
|
50
51
|
textareaMinHeight: StringConstructor;
|
|
52
|
+
formatDateStr: StringConstructor;
|
|
51
53
|
}>> & Readonly<{
|
|
52
54
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
53
55
|
}>, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Slot } from 'vue';
|
|
2
2
|
export interface AvInputProps {
|
|
3
3
|
/**
|
|
4
4
|
* ID of the input element
|
|
@@ -103,6 +103,11 @@ export interface AvInputProps {
|
|
|
103
103
|
* @default false
|
|
104
104
|
*/
|
|
105
105
|
noRadius?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Custom date format string for displayed date
|
|
108
|
+
* If invalid or not provided, defaults to standard format based on input type
|
|
109
|
+
*/
|
|
110
|
+
formatDateStr?: string;
|
|
106
111
|
}
|
|
107
112
|
/**
|
|
108
113
|
* Slots available for the component.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { AvInputProps } from '@/components/interaction/inputs/AvInput/AvInput.vue';
|
|
2
|
+
/** Supported date input types */
|
|
3
|
+
export declare const SUPPORTED_DATE_INPUT_TYPES: readonly ["date", "datetime-local", "month", "time", "week"];
|
|
4
|
+
/** Supported date input type */
|
|
5
|
+
export type DateInputType = (typeof SUPPORTED_DATE_INPUT_TYPES)[number];
|
|
6
|
+
/** Mapping of date input types to their corresponding date-fns format strings */
|
|
7
|
+
export declare const FORMAT_BY_TYPE: Record<DateInputType, string>;
|
|
8
|
+
/**
|
|
9
|
+
* Type guard to check if a value is a DateInputType
|
|
10
|
+
* @param value The value to check
|
|
11
|
+
* @returns True if the value is a DateInputType, false otherwise
|
|
12
|
+
*/
|
|
13
|
+
export declare function isDateInputType(value: string | undefined): value is DateInputType;
|
|
14
|
+
/**
|
|
15
|
+
* Formats a date according to the input type
|
|
16
|
+
* @param type The type of the input
|
|
17
|
+
* @param date The date to format
|
|
18
|
+
* @returns The formatted date string or undefined if invalid
|
|
19
|
+
*/
|
|
20
|
+
export declare function formatDateForInputType(type: AvInputProps['type'], date: Date | undefined): string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Formats the displayed date based on the input type and model value
|
|
23
|
+
* @param type The type of the input
|
|
24
|
+
* @param dateValue The model value of the input
|
|
25
|
+
* @param formatStr Optional custom format string
|
|
26
|
+
* @returns The formatted displayed date string
|
|
27
|
+
*/
|
|
28
|
+
export declare function formatDisplayedDate(type: AvInputProps['type'], dateValue: AvInputProps['modelValue'], formatStr?: string): string;
|
|
29
|
+
/**
|
|
30
|
+
* Returns the placeholder string for date input types
|
|
31
|
+
* @param type The type of the input
|
|
32
|
+
* @returns The placeholder string
|
|
33
|
+
*/
|
|
34
|
+
export declare function getDateInputPlaceholder(type: AvInputProps['type']): string;
|
|
35
|
+
export declare function getDateInputPrefixIcon(type: AvInputProps['type']): string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -502,10 +502,14 @@ export declare const WithCustomItemSlotExample: {
|
|
|
502
502
|
BACKUP_RESTORE: string;
|
|
503
503
|
BELL_NOTIFICATION: string;
|
|
504
504
|
BOOK_LOCATION_OUTLINE: string;
|
|
505
|
+
BOOK_OPEN_VARIANT: string;
|
|
505
506
|
BRIEFCASE_VARIANT_OUTLINE: string;
|
|
506
507
|
BUILDING: string;
|
|
508
|
+
CALENDAR_BLANK_OUTLINE: string;
|
|
507
509
|
CALENDAR_MONTH_OUTLINE: string;
|
|
508
510
|
CALENDAR_OUTLINE: string;
|
|
511
|
+
CALENDAR_TIME: string;
|
|
512
|
+
CALENDAR_WEEK_OUTLINE: string;
|
|
509
513
|
CHART_TIMELINE_VARIANT_SHIMMER: string;
|
|
510
514
|
CHAT_ALERT: string;
|
|
511
515
|
CHAT_BUBBLE_OUTLINE: string;
|
|
@@ -520,6 +524,7 @@ export declare const WithCustomItemSlotExample: {
|
|
|
520
524
|
CHEVRON_LEFT: string;
|
|
521
525
|
CIRCLE: string;
|
|
522
526
|
CIRCLE_OUTLINE: string;
|
|
527
|
+
CLOCK_OUTLINE: string;
|
|
523
528
|
CLOSE_CIRCLE_OUTLINE: string;
|
|
524
529
|
CLOSE_OCTAGON: string;
|
|
525
530
|
CONTENT_SAVE_OUTLINE: string;
|
|
@@ -24,7 +24,7 @@ declare const _default: <T extends AvAutocompleteOption = AvAutocompleteOption>(
|
|
|
24
24
|
readonly labelClass?: string | undefined;
|
|
25
25
|
readonly modelValue?: string | number | null | undefined;
|
|
26
26
|
readonly placeholder?: string | undefined;
|
|
27
|
-
readonly type?: "number" | "time" | "text" | "search" | "color" | "
|
|
27
|
+
readonly type?: "number" | "time" | "text" | "search" | "color" | "date" | "datetime-local" | "month" | "week" | "email" | "password" | "tel" | "url" | "file" | "hidden" | "range" | undefined;
|
|
28
28
|
readonly minDate?: Date | undefined;
|
|
29
29
|
readonly maxDate?: Date | undefined;
|
|
30
30
|
readonly disabled?: boolean | undefined;
|
|
@@ -37,6 +37,7 @@ declare const _default: <T extends AvAutocompleteOption = AvAutocompleteOption>(
|
|
|
37
37
|
readonly textareaMinHeight?: string | undefined;
|
|
38
38
|
readonly width?: string | undefined;
|
|
39
39
|
readonly noRadius?: boolean | undefined;
|
|
40
|
+
readonly formatDateStr?: string | undefined;
|
|
40
41
|
readonly "onUpdate:modelValue"?: ((value: string | number | null) => any) | undefined;
|
|
41
42
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
42
43
|
$attrs: {
|
|
@@ -105,7 +106,7 @@ declare const _default: <T extends AvAutocompleteOption = AvAutocompleteOption>(
|
|
|
105
106
|
readonly labelClass?: string | undefined;
|
|
106
107
|
readonly modelValue?: string | number | null | undefined;
|
|
107
108
|
readonly placeholder?: string | undefined;
|
|
108
|
-
readonly type?: "number" | "time" | "text" | "search" | "color" | "
|
|
109
|
+
readonly type?: "number" | "time" | "text" | "search" | "color" | "date" | "datetime-local" | "month" | "week" | "email" | "password" | "tel" | "url" | "file" | "hidden" | "range" | undefined;
|
|
109
110
|
readonly minDate?: Date | undefined;
|
|
110
111
|
readonly maxDate?: Date | undefined;
|
|
111
112
|
readonly disabled?: boolean | undefined;
|
|
@@ -118,6 +119,7 @@ declare const _default: <T extends AvAutocompleteOption = AvAutocompleteOption>(
|
|
|
118
119
|
readonly textareaMinHeight?: string | undefined;
|
|
119
120
|
readonly width?: string | undefined;
|
|
120
121
|
readonly noRadius?: boolean | undefined;
|
|
122
|
+
readonly formatDateStr?: string | undefined;
|
|
121
123
|
readonly "onUpdate:modelValue"?: ((value: string | number | null) => any) | undefined;
|
|
122
124
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
123
125
|
$attrs: {
|
|
@@ -194,7 +196,7 @@ declare const _default: <T extends AvAutocompleteOption = AvAutocompleteOption>(
|
|
|
194
196
|
readonly labelClass?: string | undefined;
|
|
195
197
|
readonly modelValue?: string | number | null | undefined;
|
|
196
198
|
readonly placeholder?: string | undefined;
|
|
197
|
-
readonly type?: "number" | "time" | "text" | "search" | "color" | "
|
|
199
|
+
readonly type?: "number" | "time" | "text" | "search" | "color" | "date" | "datetime-local" | "month" | "week" | "email" | "password" | "tel" | "url" | "file" | "hidden" | "range" | undefined;
|
|
198
200
|
readonly minDate?: Date | undefined;
|
|
199
201
|
readonly maxDate?: Date | undefined;
|
|
200
202
|
readonly disabled?: boolean | undefined;
|
|
@@ -207,6 +209,7 @@ declare const _default: <T extends AvAutocompleteOption = AvAutocompleteOption>(
|
|
|
207
209
|
readonly textareaMinHeight?: string | undefined;
|
|
208
210
|
readonly width?: string | undefined;
|
|
209
211
|
readonly noRadius?: boolean | undefined;
|
|
212
|
+
readonly formatDateStr?: string | undefined;
|
|
210
213
|
readonly "onUpdate:modelValue"?: ((value: string | number | null) => any) | undefined;
|
|
211
214
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
212
215
|
$attrs: {
|
|
@@ -275,7 +278,7 @@ declare const _default: <T extends AvAutocompleteOption = AvAutocompleteOption>(
|
|
|
275
278
|
readonly labelClass?: string | undefined;
|
|
276
279
|
readonly modelValue?: string | number | null | undefined;
|
|
277
280
|
readonly placeholder?: string | undefined;
|
|
278
|
-
readonly type?: "number" | "time" | "text" | "search" | "color" | "
|
|
281
|
+
readonly type?: "number" | "time" | "text" | "search" | "color" | "date" | "datetime-local" | "month" | "week" | "email" | "password" | "tel" | "url" | "file" | "hidden" | "range" | undefined;
|
|
279
282
|
readonly minDate?: Date | undefined;
|
|
280
283
|
readonly maxDate?: Date | undefined;
|
|
281
284
|
readonly disabled?: boolean | undefined;
|
|
@@ -288,6 +291,7 @@ declare const _default: <T extends AvAutocompleteOption = AvAutocompleteOption>(
|
|
|
288
291
|
readonly textareaMinHeight?: string | undefined;
|
|
289
292
|
readonly width?: string | undefined;
|
|
290
293
|
readonly noRadius?: boolean | undefined;
|
|
294
|
+
readonly formatDateStr?: string | undefined;
|
|
291
295
|
readonly "onUpdate:modelValue"?: ((value: string | number | null) => any) | undefined;
|
|
292
296
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
293
297
|
$attrs: {
|
|
@@ -373,7 +377,7 @@ declare const _default: <T extends AvAutocompleteOption = AvAutocompleteOption>(
|
|
|
373
377
|
readonly labelClass?: string | undefined;
|
|
374
378
|
readonly modelValue?: string | number | null | undefined;
|
|
375
379
|
readonly placeholder?: string | undefined;
|
|
376
|
-
readonly type?: "number" | "time" | "text" | "search" | "color" | "
|
|
380
|
+
readonly type?: "number" | "time" | "text" | "search" | "color" | "date" | "datetime-local" | "month" | "week" | "email" | "password" | "tel" | "url" | "file" | "hidden" | "range" | undefined;
|
|
377
381
|
readonly minDate?: Date | undefined;
|
|
378
382
|
readonly maxDate?: Date | undefined;
|
|
379
383
|
readonly disabled?: boolean | undefined;
|
|
@@ -386,6 +390,7 @@ declare const _default: <T extends AvAutocompleteOption = AvAutocompleteOption>(
|
|
|
386
390
|
readonly textareaMinHeight?: string | undefined;
|
|
387
391
|
readonly width?: string | undefined;
|
|
388
392
|
readonly noRadius?: boolean | undefined;
|
|
393
|
+
readonly formatDateStr?: string | undefined;
|
|
389
394
|
readonly "onUpdate:modelValue"?: ((value: string | number | null) => any) | undefined;
|
|
390
395
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
391
396
|
$attrs: {
|
|
@@ -454,7 +459,7 @@ declare const _default: <T extends AvAutocompleteOption = AvAutocompleteOption>(
|
|
|
454
459
|
readonly labelClass?: string | undefined;
|
|
455
460
|
readonly modelValue?: string | number | null | undefined;
|
|
456
461
|
readonly placeholder?: string | undefined;
|
|
457
|
-
readonly type?: "number" | "time" | "text" | "search" | "color" | "
|
|
462
|
+
readonly type?: "number" | "time" | "text" | "search" | "color" | "date" | "datetime-local" | "month" | "week" | "email" | "password" | "tel" | "url" | "file" | "hidden" | "range" | undefined;
|
|
458
463
|
readonly minDate?: Date | undefined;
|
|
459
464
|
readonly maxDate?: Date | undefined;
|
|
460
465
|
readonly disabled?: boolean | undefined;
|
|
@@ -467,6 +472,7 @@ declare const _default: <T extends AvAutocompleteOption = AvAutocompleteOption>(
|
|
|
467
472
|
readonly textareaMinHeight?: string | undefined;
|
|
468
473
|
readonly width?: string | undefined;
|
|
469
474
|
readonly noRadius?: boolean | undefined;
|
|
475
|
+
readonly formatDateStr?: string | undefined;
|
|
470
476
|
readonly "onUpdate:modelValue"?: ((value: string | number | null) => any) | undefined;
|
|
471
477
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
472
478
|
$attrs: {
|