@ousi-ui/vue 0.4.0 → 0.5.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/index.cjs +3 -3
- package/dist/index.d.ts +121 -27
- package/dist/index.mjs +7118 -6804
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -115,6 +115,7 @@ variant: "primary" | "secondary";
|
|
|
115
115
|
size: TabsSize;
|
|
116
116
|
shadow: TabsShadow;
|
|
117
117
|
orientation: "horizontal" | "vertical";
|
|
118
|
+
hideBorder: boolean;
|
|
118
119
|
showSeparator: boolean;
|
|
119
120
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
120
121
|
listRef: HTMLDivElement;
|
|
@@ -186,6 +187,7 @@ onChange?: ((value: boolean) => any) | undefined;
|
|
|
186
187
|
"onUpdate:indeterminate"?: ((value: boolean) => any) | undefined;
|
|
187
188
|
}>, {
|
|
188
189
|
variant: "primary" | "secondary";
|
|
190
|
+
size: CheckboxSize;
|
|
189
191
|
shadow: CheckboxShadow;
|
|
190
192
|
disabled: boolean;
|
|
191
193
|
required: boolean;
|
|
@@ -580,16 +582,26 @@ required: boolean;
|
|
|
580
582
|
allowDuplicates: boolean;
|
|
581
583
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
582
584
|
|
|
583
|
-
declare const __VLS_component_55: DefineComponent<ContextMenuProps, {
|
|
585
|
+
declare const __VLS_component_55: DefineComponent<ContextMenuProps, {
|
|
586
|
+
show: (input?: MouseEvent | {
|
|
587
|
+
x: number;
|
|
588
|
+
y: number;
|
|
589
|
+
}) => void;
|
|
590
|
+
hide: () => void;
|
|
591
|
+
isOpen: Ref<boolean>;
|
|
592
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
584
593
|
select: (key: string, item: ContextMenuItem) => any;
|
|
594
|
+
close: () => any;
|
|
595
|
+
open: () => any;
|
|
585
596
|
}, string, PublicProps, Readonly<ContextMenuProps> & Readonly<{
|
|
586
597
|
onSelect?: ((key: string, item: ContextMenuItem) => any) | undefined;
|
|
598
|
+
onClose?: (() => any) | undefined;
|
|
599
|
+
onOpen?: (() => any) | undefined;
|
|
587
600
|
}>, {
|
|
588
601
|
shadow: ContextMenuShadow;
|
|
589
602
|
disabled: boolean;
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
}, any>;
|
|
603
|
+
submenuOffset: number;
|
|
604
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
593
605
|
|
|
594
606
|
declare const __VLS_component_56: DefineComponent<MarqueeProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<MarqueeProps> & Readonly<{}>, {
|
|
595
607
|
direction: MarqueeDirection;
|
|
@@ -1345,10 +1357,11 @@ declare function __VLS_template_55(): {
|
|
|
1345
1357
|
attrs: Partial<{}>;
|
|
1346
1358
|
slots: {
|
|
1347
1359
|
default?(_: {}): any;
|
|
1360
|
+
icon?(_: {
|
|
1361
|
+
item: ContextMenuItem;
|
|
1362
|
+
}): any;
|
|
1348
1363
|
};
|
|
1349
|
-
refs: {
|
|
1350
|
-
menuRef: HTMLDivElement;
|
|
1351
|
-
};
|
|
1364
|
+
refs: {};
|
|
1352
1365
|
rootEl: any;
|
|
1353
1366
|
};
|
|
1354
1367
|
|
|
@@ -2660,7 +2673,9 @@ export declare interface ChartWindowOption {
|
|
|
2660
2673
|
|
|
2661
2674
|
export declare const checkboxContentTheme = "flex flex-col gap-0";
|
|
2662
2675
|
|
|
2663
|
-
export declare const checkboxDescriptionTheme
|
|
2676
|
+
export declare const checkboxDescriptionTheme: (props?: ({
|
|
2677
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
2678
|
+
} & ClassProp) | undefined) => string;
|
|
2664
2679
|
|
|
2665
2680
|
export declare interface CheckboxEmits {
|
|
2666
2681
|
'update:modelValue': [value: boolean];
|
|
@@ -2670,7 +2685,9 @@ export declare interface CheckboxEmits {
|
|
|
2670
2685
|
|
|
2671
2686
|
export declare const checkboxErrorTheme = "text-xs text-ousi-danger mt-0.5";
|
|
2672
2687
|
|
|
2673
|
-
export declare const checkboxLabelTheme
|
|
2688
|
+
export declare const checkboxLabelTheme: (props?: ({
|
|
2689
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
2690
|
+
} & ClassProp) | undefined) => string;
|
|
2674
2691
|
|
|
2675
2692
|
export declare interface CheckboxProps {
|
|
2676
2693
|
/** Controlled checked state (v-model). */
|
|
@@ -2695,6 +2712,8 @@ export declare interface CheckboxProps {
|
|
|
2695
2712
|
invalid?: boolean;
|
|
2696
2713
|
/** Visual variant. */
|
|
2697
2714
|
variant?: 'primary' | 'secondary';
|
|
2715
|
+
/** Control box + label size. Defaults to 'md'. */
|
|
2716
|
+
size?: CheckboxSize;
|
|
2698
2717
|
/** Elevation shadow on the control box. Defaults to 'none'. */
|
|
2699
2718
|
shadow?: CheckboxShadow;
|
|
2700
2719
|
/** Haptic feedback on toggle. Pass false to disable. */
|
|
@@ -2703,10 +2722,13 @@ export declare interface CheckboxProps {
|
|
|
2703
2722
|
class?: string;
|
|
2704
2723
|
}
|
|
2705
2724
|
|
|
2706
|
-
declare type CheckboxShadow = 'none' | 'xs' | 'sm';
|
|
2725
|
+
export declare type CheckboxShadow = 'none' | 'xs' | 'sm';
|
|
2726
|
+
|
|
2727
|
+
export declare type CheckboxSize = 'sm' | 'md' | 'lg';
|
|
2707
2728
|
|
|
2708
2729
|
export declare const checkboxWrapperTheme: (props?: ({
|
|
2709
2730
|
hasDescription?: boolean | null | undefined;
|
|
2731
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
2710
2732
|
} & ClassProp) | undefined) => string;
|
|
2711
2733
|
|
|
2712
2734
|
export declare type ChipColor = 'accent' | 'success' | 'warning' | 'danger' | 'default';
|
|
@@ -3051,36 +3073,82 @@ export declare interface ConfettiProps {
|
|
|
3051
3073
|
|
|
3052
3074
|
export declare const confettiTheme = "fixed inset-0 pointer-events-none z-[9999] overflow-hidden";
|
|
3053
3075
|
|
|
3076
|
+
export declare const contextMenuChevronTheme = "ml-auto size-3.5 text-ousi-muted shrink-0";
|
|
3077
|
+
|
|
3054
3078
|
export declare interface ContextMenuEmits {
|
|
3079
|
+
/** Fired when a leaf item is selected. */
|
|
3055
3080
|
'select': [key: string, item: ContextMenuItem];
|
|
3081
|
+
/** Fired when the menu opens. */
|
|
3082
|
+
'open': [];
|
|
3083
|
+
/** Fired when the menu closes. */
|
|
3084
|
+
'close': [];
|
|
3085
|
+
}
|
|
3086
|
+
|
|
3087
|
+
/** Exposed imperative methods on OContextMenu (via template ref). */
|
|
3088
|
+
export declare interface ContextMenuExposed {
|
|
3089
|
+
/** Open the menu programmatically. Accepts a MouseEvent (uses clientX/clientY)
|
|
3090
|
+
* or a coordinate pair. Calling without args opens at (0, 0). */
|
|
3091
|
+
show: (input?: MouseEvent | {
|
|
3092
|
+
x: number;
|
|
3093
|
+
y: number;
|
|
3094
|
+
}) => void;
|
|
3095
|
+
/** Close the menu programmatically. */
|
|
3096
|
+
hide: () => void;
|
|
3097
|
+
/** Reactive open state. */
|
|
3098
|
+
isOpen: Ref<boolean>;
|
|
3056
3099
|
}
|
|
3057
3100
|
|
|
3101
|
+
/** Section heading — uppercase muted, non-interactive. */
|
|
3102
|
+
export declare const contextMenuHeadingTheme: string;
|
|
3103
|
+
|
|
3104
|
+
export declare const contextMenuIconTheme = "size-4 text-ousi-muted shrink-0";
|
|
3105
|
+
|
|
3058
3106
|
export declare interface ContextMenuItem {
|
|
3059
|
-
label
|
|
3060
|
-
key
|
|
3061
|
-
|
|
3107
|
+
/** Item key — emitted on `select`. Falls back to `label` if not provided. */
|
|
3108
|
+
key?: string;
|
|
3109
|
+
/** Visible label. Required unless `separator: true`. */
|
|
3110
|
+
label?: string;
|
|
3111
|
+
/** Icon — string (treated as a CSS class), a Vue component, or anything renderable.
|
|
3112
|
+
* For full control (e.g. Hugeicons array format), use the per-item `#icon` slot. */
|
|
3113
|
+
icon?: string | Component | any;
|
|
3114
|
+
/** Right-aligned keyboard shortcut hint (e.g. '⌘C'). Hidden when the item has children. */
|
|
3062
3115
|
shortcut?: string;
|
|
3116
|
+
/** Disable the item — not focusable, not selectable. */
|
|
3063
3117
|
disabled?: boolean;
|
|
3118
|
+
/** Render label in danger color. */
|
|
3064
3119
|
danger?: boolean;
|
|
3120
|
+
/** Render as a horizontal separator line. Other fields are ignored. */
|
|
3065
3121
|
separator?: boolean;
|
|
3122
|
+
/** Render as a section heading — uppercase muted text, non-interactive, skipped in keyboard nav. */
|
|
3123
|
+
heading?: boolean;
|
|
3124
|
+
/** Keep the menu open after selecting this item. Useful for toggles (column visibility, etc.). */
|
|
3125
|
+
keepOpen?: boolean;
|
|
3126
|
+
/** Nested submenu items. When present, the item opens a submenu instead of being selected. */
|
|
3127
|
+
children?: ContextMenuItem[];
|
|
3066
3128
|
}
|
|
3067
3129
|
|
|
3068
|
-
export declare const contextMenuItemTheme
|
|
3130
|
+
export declare const contextMenuItemTheme: string;
|
|
3069
3131
|
|
|
3070
3132
|
export declare interface ContextMenuProps {
|
|
3133
|
+
/** Items to render in the menu. */
|
|
3071
3134
|
items: ContextMenuItem[];
|
|
3135
|
+
/** Disable right-click activation on the trigger slot. */
|
|
3072
3136
|
disabled?: boolean;
|
|
3073
3137
|
/** Elevation shadow. Defaults to 'lg'. */
|
|
3074
3138
|
shadow?: ContextMenuShadow;
|
|
3139
|
+
/** Pixel gap between a parent item and its open submenu. Defaults to 4. */
|
|
3140
|
+
submenuOffset?: number;
|
|
3141
|
+
/** Additional CSS classes on the menu surface. */
|
|
3075
3142
|
class?: string;
|
|
3076
3143
|
}
|
|
3077
3144
|
|
|
3078
|
-
export declare const contextMenuSeparatorTheme = "my-1 h-px bg-ousi-border/
|
|
3145
|
+
export declare const contextMenuSeparatorTheme = "my-1 mx-1 h-px bg-ousi-border/40";
|
|
3079
3146
|
|
|
3080
|
-
declare type ContextMenuShadow = 'sm' | 'md' | 'lg' | 'xl';
|
|
3147
|
+
export declare type ContextMenuShadow = 'sm' | 'md' | 'lg' | 'xl';
|
|
3081
3148
|
|
|
3082
|
-
export declare const contextMenuShortcutTheme = "ml-auto text-xs text-ousi-muted";
|
|
3149
|
+
export declare const contextMenuShortcutTheme = "ml-auto text-xs text-ousi-muted tracking-wide";
|
|
3083
3150
|
|
|
3151
|
+
/** Menu surface — no border, just shadow on overlay bg (matches Popover styling). */
|
|
3084
3152
|
export declare const contextMenuTheme: (props?: ({
|
|
3085
3153
|
shadow?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
3086
3154
|
} & ClassProp) | undefined) => string;
|
|
@@ -3154,8 +3222,8 @@ export declare const dateFieldWrapperTheme: (props?: ({
|
|
|
3154
3222
|
export declare const datePickerDescriptionTheme = "text-xs text-ousi-muted";
|
|
3155
3223
|
|
|
3156
3224
|
export declare interface DatePickerEmits {
|
|
3157
|
-
'update:modelValue': [value: DateFieldValue | null];
|
|
3158
|
-
'change': [value: DateFieldValue | null];
|
|
3225
|
+
'update:modelValue': [value: DateFieldValue | string | null];
|
|
3226
|
+
'change': [value: DateFieldValue | string | null];
|
|
3159
3227
|
}
|
|
3160
3228
|
|
|
3161
3229
|
/** Error message text. */
|
|
@@ -3175,10 +3243,10 @@ export declare const datePickerLabelTheme: (props?: ({
|
|
|
3175
3243
|
export declare const datePickerPopoverTheme: string;
|
|
3176
3244
|
|
|
3177
3245
|
export declare interface DatePickerProps {
|
|
3178
|
-
/** Current date value (v-model). */
|
|
3179
|
-
modelValue?: DateFieldValue | null;
|
|
3180
|
-
/** Default date value. */
|
|
3181
|
-
defaultValue?: DateFieldValue | null;
|
|
3246
|
+
/** Current date value (v-model). When `format` is set, accepts/emits a string in that format. */
|
|
3247
|
+
modelValue?: DateFieldValue | string | null;
|
|
3248
|
+
/** Default date value. When `format` is set, accepts a string in that format. */
|
|
3249
|
+
defaultValue?: DateFieldValue | string | null;
|
|
3182
3250
|
/** Label text. */
|
|
3183
3251
|
label?: string;
|
|
3184
3252
|
/** Description text below the field. */
|
|
@@ -3187,6 +3255,13 @@ export declare interface DatePickerProps {
|
|
|
3187
3255
|
errorMessage?: string;
|
|
3188
3256
|
/** Locale for segment ordering and month names. */
|
|
3189
3257
|
locale?: string;
|
|
3258
|
+
/** When set, v-model is parsed/emitted as a string in this pattern.
|
|
3259
|
+
* Tokens: `YYYY` `YY` `MM` `M` `DD` `D` — anything else is a literal.
|
|
3260
|
+
* Example: `'YYYY-MM-DD'` → v-model is `'2026-05-29'`. Defaults to unset (object). */
|
|
3261
|
+
format?: string;
|
|
3262
|
+
/** When set, the trigger shows segments in this pattern instead of the locale-derived order.
|
|
3263
|
+
* Uses the same tokens as `format`. Independent from `format` — set both to keep them in sync. */
|
|
3264
|
+
displayFormat?: string;
|
|
3190
3265
|
/** Minimum selectable date. */
|
|
3191
3266
|
minValue?: DateFieldValue;
|
|
3192
3267
|
/** Maximum selectable date. */
|
|
@@ -3609,6 +3684,8 @@ declare function fire(): void;
|
|
|
3609
3684
|
|
|
3610
3685
|
declare function focusKey(key: string): void;
|
|
3611
3686
|
|
|
3687
|
+
export declare function formatDateValue(value: DateFieldValue, pattern: string): string;
|
|
3688
|
+
|
|
3612
3689
|
declare interface FormContext {
|
|
3613
3690
|
/** Server-side validation errors keyed by field name. */
|
|
3614
3691
|
validationErrors: Ref<Record<string, string | string[]>>;
|
|
@@ -4380,11 +4457,11 @@ readOnly: boolean;
|
|
|
4380
4457
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
4381
4458
|
|
|
4382
4459
|
export declare const ODatePicker: DefineComponent<DatePickerProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
4383
|
-
change: (value: DateFieldValue | null) => any;
|
|
4384
|
-
"update:modelValue": (value: DateFieldValue | null) => any;
|
|
4460
|
+
change: (value: string | DateFieldValue | null) => any;
|
|
4461
|
+
"update:modelValue": (value: string | DateFieldValue | null) => any;
|
|
4385
4462
|
}, string, PublicProps, Readonly<DatePickerProps> & Readonly<{
|
|
4386
|
-
onChange?: ((value: DateFieldValue | null) => any) | undefined;
|
|
4387
|
-
"onUpdate:modelValue"?: ((value: DateFieldValue | null) => any) | undefined;
|
|
4463
|
+
onChange?: ((value: string | DateFieldValue | null) => any) | undefined;
|
|
4464
|
+
"onUpdate:modelValue"?: ((value: string | DateFieldValue | null) => any) | undefined;
|
|
4388
4465
|
}>, {
|
|
4389
4466
|
variant: "primary" | "secondary";
|
|
4390
4467
|
size: DatePickerSize;
|
|
@@ -4872,6 +4949,10 @@ export declare const paginationSummaryTheme: (props?: ({
|
|
|
4872
4949
|
|
|
4873
4950
|
export declare const paginationTheme = "flex w-full flex-col items-center justify-between gap-4 sm:flex-row";
|
|
4874
4951
|
|
|
4952
|
+
export declare function parseDateValue(input: string, pattern: string): DateFieldValue | null;
|
|
4953
|
+
|
|
4954
|
+
export declare function patternToSegments(pattern: string): Segment[];
|
|
4955
|
+
|
|
4875
4956
|
export declare const popoverDialogTheme = "p-4 outline-none";
|
|
4876
4957
|
|
|
4877
4958
|
export declare interface PopoverEmits {
|
|
@@ -5140,6 +5221,15 @@ export declare const scrollShadowTheme: (props?: ({
|
|
|
5140
5221
|
hideScrollbar?: boolean | null | undefined;
|
|
5141
5222
|
} & ClassProp) | undefined) => string;
|
|
5142
5223
|
|
|
5224
|
+
declare interface Segment {
|
|
5225
|
+
type: SegmentType;
|
|
5226
|
+
text: string;
|
|
5227
|
+
value?: number;
|
|
5228
|
+
placeholder: string;
|
|
5229
|
+
}
|
|
5230
|
+
|
|
5231
|
+
declare type SegmentType = 'year' | 'month' | 'day' | 'literal';
|
|
5232
|
+
|
|
5143
5233
|
export declare interface SelectEmits {
|
|
5144
5234
|
'update:modelValue': [value: SelectValue];
|
|
5145
5235
|
'change': [value: SelectValue];
|
|
@@ -5643,6 +5733,7 @@ export declare const tabsListTheme: (props?: ({
|
|
|
5643
5733
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
5644
5734
|
orientation?: "vertical" | "horizontal" | null | undefined;
|
|
5645
5735
|
shadow?: "none" | "sm" | "md" | "xs" | null | undefined;
|
|
5736
|
+
hideBorder?: boolean | null | undefined;
|
|
5646
5737
|
} & ClassProp) | undefined) => string;
|
|
5647
5738
|
|
|
5648
5739
|
export declare interface TabsProps {
|
|
@@ -5660,6 +5751,9 @@ export declare interface TabsProps {
|
|
|
5660
5751
|
shadow?: TabsShadow;
|
|
5661
5752
|
/** Layout orientation. */
|
|
5662
5753
|
orientation?: 'horizontal' | 'vertical';
|
|
5754
|
+
/** Hide the secondary variant's track border (the long underline / left rail).
|
|
5755
|
+
* Has no effect on `primary`. The active-tab indicator is unaffected. Defaults to `false`. */
|
|
5756
|
+
hideBorder?: boolean;
|
|
5663
5757
|
/** Show separator lines between tabs. */
|
|
5664
5758
|
showSeparator?: boolean;
|
|
5665
5759
|
/** Haptic feedback on tab switch. Pass false to disable. */
|