@ousi-ui/vue 0.7.1 → 0.7.3

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/index.d.ts CHANGED
@@ -97,6 +97,7 @@ disabled: boolean;
97
97
  animated: boolean;
98
98
  required: boolean;
99
99
  multiple: boolean;
100
+ autoSelectSingle: boolean;
100
101
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
101
102
  triggerRef: HTMLButtonElement;
102
103
  popoverRef: HTMLDivElement;
@@ -359,6 +360,7 @@ animated: boolean;
359
360
  required: boolean;
360
361
  readonly: boolean;
361
362
  clearable: boolean;
363
+ autoSelectSingle: boolean;
362
364
  scrollShadow: boolean;
363
365
  allowCustomValue: boolean;
364
366
  emptyMessage: string;
@@ -3059,6 +3061,8 @@ export declare interface AutocompleteProps {
3059
3061
  readonly?: boolean;
3060
3062
  /** Whether a value is required. */
3061
3063
  required?: boolean;
3064
+ /** Pick the only enabled option when the field is empty. Defaults to the global `autoSelectSingle` config for required fields. */
3065
+ autoSelectSingle?: boolean;
3062
3066
  /** Show clear button. */
3063
3067
  clearable?: boolean;
3064
3068
  /** Allow values not in the options list. */
@@ -6398,6 +6402,8 @@ export declare interface OusiConfig {
6398
6402
  dir: Ref<'ltr' | 'rtl'>;
6399
6403
  /** Backdrop of dialogs and drawers that don't set their own. Defaults to 'opaque'. */
6400
6404
  backdrop: Ref<OverlayBackdrop>;
6405
+ /** Required OSelect and OAutocomplete fields with exactly one option pick it. Defaults to false. */
6406
+ autoSelectSingle: Ref<boolean>;
6401
6407
  }
6402
6408
 
6403
6409
  export declare interface OusiConfigInit {
@@ -6406,6 +6412,7 @@ export declare interface OusiConfigInit {
6406
6412
  firstDayOfWeek?: WeekDay;
6407
6413
  dir?: 'ltr' | 'rtl';
6408
6414
  backdrop?: OverlayBackdrop;
6415
+ autoSelectSingle?: boolean;
6409
6416
  }
6410
6417
 
6411
6418
  /** Texts the components render on their own: placeholders, buttons and accessible names. */
@@ -6424,6 +6431,10 @@ export declare interface OusiMessages {
6424
6431
  notifications: string;
6425
6432
  breadcrumb: string;
6426
6433
  pagination: string;
6434
+ /** `{page}` and `{total}` are replaced. */
6435
+ pageOf: string;
6436
+ /** `{page}` is replaced. */
6437
+ goToPage: string;
6427
6438
  previousPage: string;
6428
6439
  nextPage: string;
6429
6440
  previous: string;
@@ -6436,6 +6447,12 @@ export declare interface OusiMessages {
6436
6447
  openCalendar: string;
6437
6448
  datePicker: string;
6438
6449
  dateField: string;
6450
+ year: string;
6451
+ month: string;
6452
+ day: string;
6453
+ yearPlaceholder: string;
6454
+ monthPlaceholder: string;
6455
+ dayPlaceholder: string;
6439
6456
  dateRangePicker: string;
6440
6457
  dateRangeCalendar: string;
6441
6458
  timePicker: string;
@@ -6578,7 +6595,8 @@ export declare const paginationTheme = "flex w-full flex-col items-center justif
6578
6595
 
6579
6596
  export declare function parseDateValue(input: string, pattern: string): DateFieldValue | null;
6580
6597
 
6581
- export declare function patternToSegments(pattern: string): Segment[];
6598
+ /** Segments of a display pattern; placeholders come from the locale messages (`aaaa` in Spanish). */
6599
+ export declare function patternToSegments(pattern: string, placeholders?: SegmentPlaceholders): Segment[];
6582
6600
 
6583
6601
  export declare const popoverDialogTheme = "p-4 outline-none";
6584
6602
 
@@ -7094,6 +7112,12 @@ export declare interface SegmentedGaugeSlots {
7094
7112
  }) => unknown;
7095
7113
  }
7096
7114
 
7115
+ declare interface SegmentPlaceholders {
7116
+ year: string;
7117
+ month: string;
7118
+ day: string;
7119
+ }
7120
+
7097
7121
  declare type SegmentType = 'year' | 'month' | 'day' | 'literal';
7098
7122
 
7099
7123
  export declare interface SelectEmits {
@@ -7145,6 +7169,8 @@ export declare interface SelectProps {
7145
7169
  disabled?: boolean;
7146
7170
  /** Whether the select is required. */
7147
7171
  required?: boolean;
7172
+ /** Pick the only enabled option when the field is empty. Defaults to the global `autoSelectSingle` config for required fields. */
7173
+ autoSelectSingle?: boolean;
7148
7174
  /** Haptic feedback on option select. Pass false to disable. */
7149
7175
  haptic?: HapticInput;
7150
7176
  /** Additional CSS classes on the outer container. */