@aleph-alpha/ui-library 1.7.0 → 1.8.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.
@@ -7,6 +7,7 @@ import { Component } from 'vue';
7
7
  import { ComponentCustomProps } from 'vue';
8
8
  import { ComponentOptionsMixin } from 'vue';
9
9
  import { ComponentProvideOptions } from 'vue';
10
+ import { DateRange } from 'reka-ui';
10
11
  import { DateValue } from 'reka-ui';
11
12
  import { DefineComponent } from 'vue';
12
13
  import { getLocalTimeZone } from '@internationalized/date';
@@ -364,9 +365,9 @@ declare const __VLS_component_65: DefineComponent<UiTabsTriggerProps, {}, {}, {}
364
365
 
365
366
  declare const __VLS_component_66: DefineComponent<UiTabsContentProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<UiTabsContentProps> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
366
367
 
367
- declare const __VLS_component_67: DefineComponent<__VLS_PublicProps_10, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
368
+ declare const __VLS_component_67: DefineComponent<__VLS_PublicProps_11, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
368
369
  "update:open": (value: boolean) => any;
369
- }, string, PublicProps, Readonly<__VLS_PublicProps_10> & Readonly<{
370
+ }, string, PublicProps, Readonly<__VLS_PublicProps_11> & Readonly<{
370
371
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
371
372
  }>, {
372
373
  class: string;
@@ -381,19 +382,19 @@ declare const __VLS_component_68: DefineComponent<Props, {}, {}, {}, {}, Compone
381
382
  as: AsTag | Component;
382
383
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
383
384
 
384
- declare const __VLS_component_69: DefineComponent<__VLS_Props_10, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
385
+ declare const __VLS_component_69: DefineComponent<__VLS_Props_11, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
385
386
  "update:modelValue": (payload: string | number) => any;
386
- }, string, PublicProps, Readonly<__VLS_Props_10> & Readonly<{
387
+ }, string, PublicProps, Readonly<__VLS_Props_11> & Readonly<{
387
388
  "onUpdate:modelValue"?: ((payload: string | number) => any) | undefined;
388
389
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
389
390
 
390
391
  declare const __VLS_component_7: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
391
392
 
392
- declare const __VLS_component_70: DefineComponent<__VLS_Props_11, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_11> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
393
+ declare const __VLS_component_70: DefineComponent<__VLS_Props_12, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_12> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
393
394
 
394
- declare const __VLS_component_71: DefineComponent<__VLS_Props_12, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_12> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
395
+ declare const __VLS_component_71: DefineComponent<__VLS_Props_13, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_13> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
395
396
 
396
- declare const __VLS_component_72: DefineComponent<__VLS_Props_13, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_13> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
397
+ declare const __VLS_component_72: DefineComponent<__VLS_Props_14, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_14> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
397
398
 
398
399
  declare const __VLS_component_73: DefineComponent<TooltipRootProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
399
400
  "update:open": (value: boolean) => any;
@@ -401,10 +402,10 @@ declare const __VLS_component_73: DefineComponent<TooltipRootProps, {}, {}, {},
401
402
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
402
403
  }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
403
404
 
404
- declare const __VLS_component_74: DefineComponent<__VLS_Props_14, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
405
+ declare const __VLS_component_74: DefineComponent<__VLS_Props_15, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
405
406
  escapeKeyDown: (event: KeyboardEvent) => any;
406
407
  pointerDownOutside: (event: Event) => any;
407
- }, string, PublicProps, Readonly<__VLS_Props_14> & Readonly<{
408
+ }, string, PublicProps, Readonly<__VLS_Props_15> & Readonly<{
408
409
  onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
409
410
  onPointerDownOutside?: ((event: Event) => any) | undefined;
410
411
  }>, {
@@ -429,23 +430,25 @@ declare type __VLS_PrettifyLocal<T> = {
429
430
 
430
431
  declare type __VLS_Props = UiCalendarProps;
431
432
 
432
- declare type __VLS_Props_10 = TabsRootProps & {
433
+ declare type __VLS_Props_10 = UiTooltipProps;
434
+
435
+ declare type __VLS_Props_11 = TabsRootProps & {
433
436
  class?: HTMLAttributes['class'];
434
437
  };
435
438
 
436
- declare type __VLS_Props_11 = TabsContentProps & {
439
+ declare type __VLS_Props_12 = TabsContentProps & {
437
440
  class?: HTMLAttributes['class'];
438
441
  };
439
442
 
440
- declare type __VLS_Props_12 = TabsListProps & {
443
+ declare type __VLS_Props_13 = TabsListProps & {
441
444
  class?: HTMLAttributes['class'];
442
445
  };
443
446
 
444
- declare type __VLS_Props_13 = TabsTriggerProps & {
447
+ declare type __VLS_Props_14 = TabsTriggerProps & {
445
448
  class?: HTMLAttributes['class'];
446
449
  };
447
450
 
448
- declare type __VLS_Props_14 = TooltipContentProps & {
451
+ declare type __VLS_Props_15 = TooltipContentProps & {
449
452
  class?: HTMLAttributes['class'];
450
453
  };
451
454
 
@@ -461,20 +464,24 @@ declare type __VLS_Props_6 = UiRadioGroupProps & {
461
464
  class?: HTMLAttributes['class'];
462
465
  };
463
466
 
464
- declare type __VLS_Props_7 = UiSwitchProps;
467
+ declare type __VLS_Props_7 = UiRangeCalendarProps;
465
468
 
466
- declare type __VLS_Props_8 = UiTextareaProps;
469
+ declare type __VLS_Props_8 = UiSwitchProps;
467
470
 
468
- declare type __VLS_Props_9 = UiTooltipProps;
471
+ declare type __VLS_Props_9 = UiTextareaProps;
469
472
 
470
473
  declare type __VLS_PublicProps = {
471
474
  modelValue?: boolean;
472
475
  };
473
476
 
474
477
  declare type __VLS_PublicProps_10 = {
475
- 'open'?: boolean;
478
+ modelValue?: string;
476
479
  } & __VLS_Props_9;
477
480
 
481
+ declare type __VLS_PublicProps_11 = {
482
+ 'open'?: boolean;
483
+ } & __VLS_Props_10;
484
+
478
485
  declare type __VLS_PublicProps_2 = {
479
486
  modelValue?: UiCalendarProps['modelValue'];
480
487
  'placeholder'?: UiCalendarProps['placeholder'];
@@ -501,11 +508,12 @@ declare type __VLS_PublicProps_7 = {
501
508
  } & __VLS_Props_6;
502
509
 
503
510
  declare type __VLS_PublicProps_8 = {
504
- modelValue?: boolean;
511
+ modelValue?: UiRangeCalendarProps['modelValue'];
512
+ 'placeholder'?: UiRangeCalendarProps['placeholder'];
505
513
  } & __VLS_Props_7;
506
514
 
507
515
  declare type __VLS_PublicProps_9 = {
508
- modelValue?: string;
516
+ modelValue?: boolean;
509
517
  } & __VLS_Props_8;
510
518
 
511
519
  declare function __VLS_template(): {
@@ -1865,6 +1873,8 @@ export declare const DATA_TABLE_LABELS: {
1865
1873
 
1866
1874
  export declare type DataTableLabels = typeof DATA_TABLE_LABELS;
1867
1875
 
1876
+ export { DateRange }
1877
+
1868
1878
  export { DateValue }
1869
1879
 
1870
1880
  declare const _default: {
@@ -3134,6 +3144,178 @@ export declare type UiRadioGroupSharedProps = {
3134
3144
  required?: boolean;
3135
3145
  };
3136
3146
 
3147
+ export declare const UiRangeCalendar: DefineComponent<__VLS_PublicProps_8, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
3148
+ "update:modelValue": (value: DateRange | undefined) => any;
3149
+ "update:placeholder": (value: DateValue | undefined) => any;
3150
+ }, string, PublicProps, Readonly<__VLS_PublicProps_8> & Readonly<{
3151
+ "onUpdate:modelValue"?: ((value: DateRange | undefined) => any) | undefined;
3152
+ "onUpdate:placeholder"?: ((value: DateValue | undefined) => any) | undefined;
3153
+ }>, {
3154
+ disabled: boolean;
3155
+ pagedNavigation: boolean;
3156
+ preventDeselect: boolean;
3157
+ weekStartsOn: UiRangeCalendarWeekStartsOn;
3158
+ weekdayFormat: UiRangeCalendarWeekdayFormat;
3159
+ fixedWeeks: boolean;
3160
+ locale: string;
3161
+ numberOfMonths: number;
3162
+ readonly: boolean;
3163
+ initialFocus: boolean;
3164
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
3165
+
3166
+ /**
3167
+ * Emits for UiRangeCalendar component.
3168
+ */
3169
+ export declare interface UiRangeCalendarEmits {
3170
+ /**
3171
+ * Emitted when the selected date range changes.
3172
+ */
3173
+ (e: 'update:modelValue', value: DateRange): void;
3174
+ /**
3175
+ * Emitted when the placeholder (displayed month/year) changes.
3176
+ */
3177
+ (e: 'update:placeholder', value: DateValue): void;
3178
+ }
3179
+
3180
+ /**
3181
+ * Props for UiRangeCalendar component.
3182
+ */
3183
+ export declare interface UiRangeCalendarProps {
3184
+ /**
3185
+ * The controlled selected date range value.
3186
+ * Use with v-model for two-way binding.
3187
+ */
3188
+ modelValue?: DateRange;
3189
+ /**
3190
+ * The default selected date range when first rendered.
3191
+ * Use when you don't need controlled state.
3192
+ */
3193
+ defaultValue?: DateRange;
3194
+ /**
3195
+ * The placeholder date used to determine which month/year to display.
3196
+ * Defaults to today's date if not provided.
3197
+ * Use with `v-model:placeholder` for two-way binding.
3198
+ */
3199
+ placeholder?: DateValue;
3200
+ /**
3201
+ * The default placeholder date when first rendered.
3202
+ */
3203
+ defaultPlaceholder?: DateValue;
3204
+ /**
3205
+ * The minimum selectable date.
3206
+ * Dates before this will be disabled.
3207
+ */
3208
+ minValue?: DateValue;
3209
+ /**
3210
+ * The maximum selectable date.
3211
+ * Dates after this will be disabled.
3212
+ */
3213
+ maxValue?: DateValue;
3214
+ /**
3215
+ * Whether the calendar is disabled.
3216
+ * @default false
3217
+ */
3218
+ disabled?: boolean;
3219
+ /**
3220
+ * Whether the calendar is read-only.
3221
+ * Users can navigate but not select dates.
3222
+ * @default false
3223
+ */
3224
+ readonly?: boolean;
3225
+ /**
3226
+ * The locale to use for formatting dates and weekday names.
3227
+ * @default 'en'
3228
+ * @example 'de', 'fr', 'es'
3229
+ */
3230
+ locale?: string;
3231
+ /**
3232
+ * The day of the week to start on.
3233
+ * @default 0 (Sunday)
3234
+ */
3235
+ weekStartsOn?: UiRangeCalendarWeekStartsOn;
3236
+ /**
3237
+ * The number of months to display at once.
3238
+ * @default 1
3239
+ */
3240
+ numberOfMonths?: number;
3241
+ /**
3242
+ * Whether to navigate by page (all visible months) or by single month.
3243
+ * @default false
3244
+ */
3245
+ pagedNavigation?: boolean;
3246
+ /**
3247
+ * The format to use for weekday labels.
3248
+ * @default 'narrow'
3249
+ */
3250
+ weekdayFormat?: UiRangeCalendarWeekdayFormat;
3251
+ /**
3252
+ * Whether to always show 6 weeks in the calendar.
3253
+ * Useful for consistent height.
3254
+ * @default false
3255
+ */
3256
+ fixedWeeks?: boolean;
3257
+ /**
3258
+ * Whether to prevent the user from deselecting a date without selecting another date first.
3259
+ * @default false
3260
+ */
3261
+ preventDeselect?: boolean;
3262
+ /**
3263
+ * The accessible label for the calendar.
3264
+ * Used for screen readers.
3265
+ */
3266
+ calendarLabel?: string;
3267
+ /**
3268
+ * If true, the calendar will focus the selected day, today, or the first day
3269
+ * of the month depending on what is visible when the calendar is mounted.
3270
+ * @default false
3271
+ */
3272
+ initialFocus?: boolean;
3273
+ /**
3274
+ * A function that returns whether or not a date is disabled.
3275
+ * Disabled dates cannot be selected.
3276
+ * @example (date) => date.dayOfWeek === 0 // Disable Sundays
3277
+ */
3278
+ isDateDisabled?: Matcher;
3279
+ /**
3280
+ * A function that returns whether or not a date is unavailable.
3281
+ * Unavailable dates are styled differently but may still be selectable.
3282
+ * @example (date) => isHoliday(date)
3283
+ */
3284
+ isDateUnavailable?: Matcher;
3285
+ /**
3286
+ * A function that returns the next page of the calendar.
3287
+ * Receives the current placeholder as an argument.
3288
+ */
3289
+ nextPage?: (placeholder: DateValue) => DateValue;
3290
+ /**
3291
+ * A function that returns the previous page of the calendar.
3292
+ * Receives the current placeholder as an argument.
3293
+ */
3294
+ prevPage?: (placeholder: DateValue) => DateValue;
3295
+ }
3296
+
3297
+ /**
3298
+ * Format options for weekday labels displayed in the calendar header.
3299
+ *
3300
+ * - `'narrow'` - Single letter (e.g., "M", "T", "W")
3301
+ * - `'short'` - Abbreviated (e.g., "Mon", "Tue", "Wed")
3302
+ * - `'long'` - Full name (e.g., "Monday", "Tuesday", "Wednesday")
3303
+ */
3304
+ export declare type UiRangeCalendarWeekdayFormat = 'narrow' | 'short' | 'long';
3305
+
3306
+ /**
3307
+ * Day of the week to start the calendar on.
3308
+ *
3309
+ * - `0` - Sunday
3310
+ * - `1` - Monday
3311
+ * - `2` - Tuesday
3312
+ * - `3` - Wednesday
3313
+ * - `4` - Thursday
3314
+ * - `5` - Friday
3315
+ * - `6` - Saturday
3316
+ */
3317
+ export declare type UiRangeCalendarWeekStartsOn = 0 | 1 | 2 | 3 | 4 | 5 | 6;
3318
+
3137
3319
  export declare const UiSelect: __VLS_WithTemplateSlots_47<typeof __VLS_component_47, __VLS_TemplateResult_47["slots"]>;
3138
3320
 
3139
3321
  export declare const UiSelectContent: __VLS_WithTemplateSlots_49<typeof __VLS_component_49, __VLS_TemplateResult_49["slots"]>;
@@ -3292,9 +3474,9 @@ export declare interface UiSpinnerProps {
3292
3474
  ariaLabel?: string;
3293
3475
  }
3294
3476
 
3295
- export declare const UiSwitch: DefineComponent<__VLS_PublicProps_8, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
3477
+ export declare const UiSwitch: DefineComponent<__VLS_PublicProps_9, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
3296
3478
  "update:modelValue": (value: boolean) => any;
3297
- }, string, PublicProps, Readonly<__VLS_PublicProps_8> & Readonly<{
3479
+ }, string, PublicProps, Readonly<__VLS_PublicProps_9> & Readonly<{
3298
3480
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
3299
3481
  }>, {
3300
3482
  required: boolean;
@@ -3549,9 +3731,9 @@ export declare type UiTabsTriggerProps = {
3549
3731
 
3550
3732
  export declare const UiTemplatePlaceholder: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
3551
3733
 
3552
- export declare const UiTextarea: DefineComponent<__VLS_PublicProps_9, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
3734
+ export declare const UiTextarea: DefineComponent<__VLS_PublicProps_10, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
3553
3735
  "update:modelValue": (value: string) => any;
3554
- }, string, PublicProps, Readonly<__VLS_PublicProps_9> & Readonly<{
3736
+ }, string, PublicProps, Readonly<__VLS_PublicProps_10> & Readonly<{
3555
3737
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
3556
3738
  }>, {
3557
3739
  placeholder: string;