@juxtui/ui 0.1.0 → 0.2.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/components/accordion/JAccordion.vue.d.ts +34 -0
- package/dist/components/accordion/JAccordionItem.vue.d.ts +19 -0
- package/dist/components/accordion/context.d.ts +7 -0
- package/dist/components/alert/JAlert.vue.d.ts +30 -0
- package/dist/components/badge/JBadge.vue.d.ts +1 -1
- package/dist/components/button/JButton.vue.d.ts +1 -1
- package/dist/components/input/JInput.vue.d.ts +2 -2
- package/dist/components/kbd/JKbd.vue.d.ts +22 -0
- package/dist/components/popover/JPopover.vue.d.ts +43 -0
- package/dist/components/progress/JProgress.vue.d.ts +20 -0
- package/dist/components/radio/JRadio.vue.d.ts +20 -0
- package/dist/components/radio/JRadioGroup.vue.d.ts +38 -0
- package/dist/components/radio/context.d.ts +11 -0
- package/dist/components/select/JSelect.vue.d.ts +1 -1
- package/dist/components/separator/JSeparator.vue.d.ts +25 -0
- package/dist/components/sheet/JSheet.vue.d.ts +53 -0
- package/dist/components/skeleton/JSkeleton.vue.d.ts +15 -0
- package/dist/components/spinner/JSpinner.vue.d.ts +11 -0
- package/dist/components/switch/JSwitch.vue.d.ts +1 -1
- package/dist/components/tabs/JTabs.vue.d.ts +1 -1
- package/dist/components/tooltip/JTooltip.vue.d.ts +1 -1
- package/dist/components.d.ts +12 -0
- package/dist/composables/useModal.d.ts +20 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +1247 -463
- package/dist/index.js.map +1 -1
- package/dist/nuxt.js +12 -0
- package/dist/nuxt.js.map +1 -1
- package/dist/style.css +757 -0
- package/package.json +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface AccordionProps {
|
|
2
|
+
/** `single` keeps at most one item open; `multiple` lets any number stay open. */
|
|
3
|
+
type?: 'single' | 'multiple';
|
|
4
|
+
/** In `single` mode, allow closing the open item so none are open. */
|
|
5
|
+
collapsible?: boolean;
|
|
6
|
+
/** Heading level wrapping each trigger, for a correct document outline. */
|
|
7
|
+
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
8
|
+
}
|
|
9
|
+
type __VLS_Props = AccordionProps;
|
|
10
|
+
type __VLS_Slots = {
|
|
11
|
+
default?: () => unknown;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_ModelProps = {
|
|
14
|
+
/** Open item(s): a value in `single` mode, an array in `multiple` mode. */
|
|
15
|
+
modelValue?: string | string[] | null;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
18
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
+
"update:modelValue": (value: string | string[] | null) => any;
|
|
20
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
|
+
"onUpdate:modelValue"?: ((value: string | string[] | null) => any) | undefined;
|
|
22
|
+
}>, {
|
|
23
|
+
type: "single" | "multiple";
|
|
24
|
+
collapsible: boolean;
|
|
25
|
+
headingLevel: 2 | 3 | 4 | 5 | 6;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface AccordionItemProps {
|
|
2
|
+
/** Identifies the item in the accordion's `v-model`. */
|
|
3
|
+
value: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
type __VLS_Slots = {
|
|
8
|
+
default?: () => unknown;
|
|
9
|
+
title?: () => unknown;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_base: import("vue").DefineComponent<AccordionItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AccordionItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type AlertVariant = 'neutral' | 'info' | 'success' | 'warning' | 'destructive';
|
|
2
|
+
export interface AlertProps {
|
|
3
|
+
variant?: AlertVariant;
|
|
4
|
+
title?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
/** Show a close button; emits `dismiss`. */
|
|
7
|
+
dismissible?: boolean;
|
|
8
|
+
/** Hide the leading icon. */
|
|
9
|
+
hideIcon?: boolean;
|
|
10
|
+
}
|
|
11
|
+
type __VLS_Slots = {
|
|
12
|
+
default?: () => unknown;
|
|
13
|
+
icon?: () => unknown;
|
|
14
|
+
actions?: () => unknown;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<AlertProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
dismiss: () => any;
|
|
18
|
+
}, string, import("vue").PublicProps, Readonly<AlertProps> & Readonly<{
|
|
19
|
+
onDismiss?: (() => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
variant: AlertVariant;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -13,8 +13,8 @@ type __VLS_Slots = {
|
|
|
13
13
|
leading?: () => unknown;
|
|
14
14
|
};
|
|
15
15
|
declare const __VLS_base: import("vue").DefineComponent<BadgeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BadgeProps> & Readonly<{}>, {
|
|
16
|
-
size: "sm" | "md";
|
|
17
16
|
variant: BadgeVariant;
|
|
17
|
+
size: "sm" | "md";
|
|
18
18
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
19
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
20
|
declare const _default: typeof __VLS_export;
|
|
@@ -22,9 +22,9 @@ type __VLS_Slots = {
|
|
|
22
22
|
trailing?: () => unknown;
|
|
23
23
|
};
|
|
24
24
|
declare const __VLS_base: import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{}>, {
|
|
25
|
-
size: ButtonSize;
|
|
26
25
|
type: "button" | "submit" | "reset";
|
|
27
26
|
variant: ButtonVariant;
|
|
27
|
+
size: ButtonSize;
|
|
28
28
|
as: string | Component;
|
|
29
29
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
30
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -28,9 +28,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
28
28
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
29
29
|
"onUpdate:modelValue"?: ((value: string | number | null) => any) | undefined;
|
|
30
30
|
}>, {
|
|
31
|
-
size: InputSize;
|
|
32
|
-
error: string | boolean;
|
|
33
31
|
type: string;
|
|
32
|
+
error: string | boolean;
|
|
33
|
+
size: InputSize;
|
|
34
34
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
35
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
36
36
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface KbdProps {
|
|
2
|
+
/**
|
|
3
|
+
* A shortcut in hotkey syntax, e.g. `mod+k` or `shift+enter`. `mod` renders
|
|
4
|
+
* as ⌘ on Apple platforms and Ctrl elsewhere. Use the slot for literal keys.
|
|
5
|
+
*/
|
|
6
|
+
keys?: string;
|
|
7
|
+
size?: 'sm' | 'md';
|
|
8
|
+
}
|
|
9
|
+
type __VLS_Slots = {
|
|
10
|
+
default?: () => unknown;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<KbdProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KbdProps> & Readonly<{}>, {
|
|
13
|
+
size: "sm" | "md";
|
|
14
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Placement } from '../../composables/useFloating';
|
|
2
|
+
export interface PopoverProps {
|
|
3
|
+
placement?: Placement;
|
|
4
|
+
/** Distance from the trigger in px. */
|
|
5
|
+
offset?: number;
|
|
6
|
+
/** Accessible name of the popover content. */
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
/** Close when focus or a click leaves the popover. Defaults to true. */
|
|
9
|
+
closeOnOutside?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
type __VLS_Props = PopoverProps;
|
|
13
|
+
type __VLS_Slots = {
|
|
14
|
+
trigger?: (props: {
|
|
15
|
+
open: boolean;
|
|
16
|
+
}) => unknown;
|
|
17
|
+
default?: (props: {
|
|
18
|
+
close: () => void;
|
|
19
|
+
}) => unknown;
|
|
20
|
+
};
|
|
21
|
+
type __VLS_ModelProps = {
|
|
22
|
+
'open'?: boolean;
|
|
23
|
+
};
|
|
24
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
25
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
26
|
+
close: () => void;
|
|
27
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
28
|
+
"update:open": (value: boolean) => any;
|
|
29
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
30
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
31
|
+
}>, {
|
|
32
|
+
placement: Placement;
|
|
33
|
+
offset: number;
|
|
34
|
+
closeOnOutside: boolean;
|
|
35
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
37
|
+
declare const _default: typeof __VLS_export;
|
|
38
|
+
export default _default;
|
|
39
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface ProgressProps {
|
|
2
|
+
/** Current value. `null` shows an indeterminate bar. */
|
|
3
|
+
value?: number | null;
|
|
4
|
+
max?: number;
|
|
5
|
+
size?: 'sm' | 'md';
|
|
6
|
+
/** Visible label above the bar; also its accessible name. */
|
|
7
|
+
label?: string;
|
|
8
|
+
/** Show the percentage next to the label. */
|
|
9
|
+
showValue?: boolean;
|
|
10
|
+
/** `accent` for progress toward a goal, `neutral` for plain measurement. */
|
|
11
|
+
variant?: 'accent' | 'neutral';
|
|
12
|
+
}
|
|
13
|
+
declare const __VLS_export: import("vue").DefineComponent<ProgressProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ProgressProps> & Readonly<{}>, {
|
|
14
|
+
value: number | null;
|
|
15
|
+
variant: "accent" | "neutral";
|
|
16
|
+
size: "sm" | "md";
|
|
17
|
+
max: number;
|
|
18
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { RadioValue } from './context';
|
|
2
|
+
export interface RadioProps {
|
|
3
|
+
value: RadioValue;
|
|
4
|
+
label?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
type __VLS_Slots = {
|
|
9
|
+
default?: () => unknown;
|
|
10
|
+
description?: () => unknown;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<RadioProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<RadioProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { RadioValue } from './context';
|
|
2
|
+
export interface RadioGroupProps {
|
|
3
|
+
/** Group label, rendered as the fieldset legend. */
|
|
4
|
+
label?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
/** An error message, or `true` to mark the group invalid without one. */
|
|
7
|
+
error?: string | boolean;
|
|
8
|
+
orientation?: 'vertical' | 'horizontal';
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
/** Form field name. Generated when omitted. */
|
|
12
|
+
name?: string;
|
|
13
|
+
}
|
|
14
|
+
type __VLS_Props = RadioGroupProps;
|
|
15
|
+
type __VLS_Slots = {
|
|
16
|
+
default?: () => unknown;
|
|
17
|
+
label?: () => unknown;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_ModelProps = {
|
|
20
|
+
modelValue?: RadioValue | null;
|
|
21
|
+
};
|
|
22
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
23
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
24
|
+
"update:modelValue": (value: RadioValue | null) => any;
|
|
25
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
26
|
+
"onUpdate:modelValue"?: ((value: RadioValue | null) => any) | undefined;
|
|
27
|
+
}>, {
|
|
28
|
+
error: string | boolean;
|
|
29
|
+
orientation: "vertical" | "horizontal";
|
|
30
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
32
|
+
declare const _default: typeof __VLS_export;
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
35
|
+
new (): {
|
|
36
|
+
$slots: S;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ComputedRef, InjectionKey } from 'vue';
|
|
2
|
+
export type RadioValue = string | number;
|
|
3
|
+
export interface RadioGroupContext {
|
|
4
|
+
name: ComputedRef<string>;
|
|
5
|
+
value: ComputedRef<RadioValue | null | undefined>;
|
|
6
|
+
disabled: ComputedRef<boolean>;
|
|
7
|
+
required: ComputedRef<boolean>;
|
|
8
|
+
invalid: ComputedRef<boolean>;
|
|
9
|
+
select: (value: RadioValue) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const RADIO_GROUP: InjectionKey<RadioGroupContext>;
|
|
@@ -17,8 +17,8 @@ declare const __VLS_export: <T extends string | number = string>(__VLS_props: No
|
|
|
17
17
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<(SelectProps<T> & {
|
|
18
18
|
modelValue?: T | null;
|
|
19
19
|
}) & {
|
|
20
|
-
onClose?: (() => any) | undefined;
|
|
21
20
|
"onUpdate:modelValue"?: ((value: T | null) => any) | undefined;
|
|
21
|
+
onClose?: (() => any) | undefined;
|
|
22
22
|
onOpen?: (() => any) | undefined;
|
|
23
23
|
}> & (typeof globalThis extends {
|
|
24
24
|
__VLS_PROPS_FALLBACK: infer P;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface SeparatorProps {
|
|
2
|
+
orientation?: 'horizontal' | 'vertical';
|
|
3
|
+
/** Text in the middle of a horizontal separator, e.g. "or". */
|
|
4
|
+
label?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Purely visual (the default). Set to false when the separator divides
|
|
7
|
+
* meaningful groups and should be announced.
|
|
8
|
+
*/
|
|
9
|
+
decorative?: boolean;
|
|
10
|
+
}
|
|
11
|
+
type __VLS_Slots = {
|
|
12
|
+
default?: () => unknown;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<SeparatorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SeparatorProps> & Readonly<{}>, {
|
|
15
|
+
orientation: "horizontal" | "vertical";
|
|
16
|
+
decorative: boolean;
|
|
17
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export interface SheetProps {
|
|
2
|
+
title?: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
/** Edge the sheet slides in from. */
|
|
5
|
+
side?: 'right' | 'left' | 'bottom';
|
|
6
|
+
/** Width (or height for `bottom`): 320, 400 or 560px. */
|
|
7
|
+
size?: 'sm' | 'md' | 'lg';
|
|
8
|
+
closeOnOverlay?: boolean;
|
|
9
|
+
closeOnEscape?: boolean;
|
|
10
|
+
hideClose?: boolean;
|
|
11
|
+
/** Accessible label when there is no visible title. */
|
|
12
|
+
ariaLabel?: string;
|
|
13
|
+
}
|
|
14
|
+
type __VLS_Props = SheetProps;
|
|
15
|
+
type __VLS_Slots = {
|
|
16
|
+
default?: (props: {
|
|
17
|
+
close: () => void;
|
|
18
|
+
}) => unknown;
|
|
19
|
+
header?: (props: {
|
|
20
|
+
titleId: string;
|
|
21
|
+
descriptionId: string;
|
|
22
|
+
}) => unknown;
|
|
23
|
+
footer?: (props: {
|
|
24
|
+
close: () => void;
|
|
25
|
+
}) => unknown;
|
|
26
|
+
};
|
|
27
|
+
declare function close(): void;
|
|
28
|
+
type __VLS_ModelProps = {
|
|
29
|
+
'open'?: boolean;
|
|
30
|
+
};
|
|
31
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
32
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
33
|
+
close: typeof close;
|
|
34
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
35
|
+
"update:open": (value: boolean) => any;
|
|
36
|
+
afterClose: () => any;
|
|
37
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
38
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
39
|
+
onAfterClose?: (() => any) | undefined;
|
|
40
|
+
}>, {
|
|
41
|
+
size: "sm" | "md" | "lg";
|
|
42
|
+
closeOnOverlay: boolean;
|
|
43
|
+
closeOnEscape: boolean;
|
|
44
|
+
side: "right" | "left" | "bottom";
|
|
45
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
46
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
47
|
+
declare const _default: typeof __VLS_export;
|
|
48
|
+
export default _default;
|
|
49
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
50
|
+
new (): {
|
|
51
|
+
$slots: S;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface SkeletonProps {
|
|
2
|
+
/** `text` renders one or more lines; `circle` suits avatars. */
|
|
3
|
+
shape?: 'rect' | 'text' | 'circle';
|
|
4
|
+
/** Number of lines for `text`. The last one is shorter, like a real paragraph. */
|
|
5
|
+
lines?: number;
|
|
6
|
+
/** Any CSS length, e.g. `12rem` or `100%`. */
|
|
7
|
+
width?: string;
|
|
8
|
+
height?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<SkeletonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SkeletonProps> & Readonly<{}>, {
|
|
11
|
+
shape: "rect" | "text" | "circle";
|
|
12
|
+
lines: number;
|
|
13
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface SpinnerProps {
|
|
2
|
+
size?: 'sm' | 'md' | 'lg';
|
|
3
|
+
/** Announced to screen readers. Set to an empty string when the context already says it. */
|
|
4
|
+
label?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<SpinnerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SpinnerProps> & Readonly<{}>, {
|
|
7
|
+
label: string;
|
|
8
|
+
size: "sm" | "md" | "lg";
|
|
9
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -24,8 +24,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
24
24
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
25
25
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
|
-
size: "sm" | "md";
|
|
28
27
|
value: string;
|
|
28
|
+
size: "sm" | "md";
|
|
29
29
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
30
30
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
31
31
|
declare const _default: typeof __VLS_export;
|
|
@@ -35,8 +35,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
35
35
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
36
36
|
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
37
37
|
}>, {
|
|
38
|
-
size: "sm" | "md";
|
|
39
38
|
variant: "line" | "pill";
|
|
39
|
+
size: "sm" | "md";
|
|
40
40
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
41
41
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
42
42
|
declare const _default: typeof __VLS_export;
|
|
@@ -10,8 +10,8 @@ export interface TooltipProps {
|
|
|
10
10
|
declare const _default: typeof __VLS_export;
|
|
11
11
|
export default _default;
|
|
12
12
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<TooltipProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TooltipProps> & Readonly<{}>, {
|
|
13
|
-
align: "start" | "center" | "end";
|
|
14
13
|
side: "top" | "right" | "bottom" | "left";
|
|
14
|
+
align: "start" | "center" | "end";
|
|
15
15
|
delay: number;
|
|
16
16
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
17
17
|
default?: () => unknown;
|
package/dist/components.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export { default as JAccordion } from './components/accordion/JAccordion.vue';
|
|
2
|
+
export { default as JAccordionItem } from './components/accordion/JAccordionItem.vue';
|
|
3
|
+
export { default as JAlert } from './components/alert/JAlert.vue';
|
|
1
4
|
export { default as JAvatar } from './components/avatar/JAvatar.vue';
|
|
2
5
|
export { default as JBadge } from './components/badge/JBadge.vue';
|
|
3
6
|
export { default as JButton } from './components/button/JButton.vue';
|
|
@@ -11,7 +14,16 @@ export { default as JDropdownMenuLabel } from './components/dropdown-menu/JDropd
|
|
|
11
14
|
export { default as JDropdownMenuSeparator } from './components/dropdown-menu/JDropdownMenuSeparator.vue';
|
|
12
15
|
export { default as JDropdownMenuSub } from './components/dropdown-menu/JDropdownMenuSub.vue';
|
|
13
16
|
export { default as JInput } from './components/input/JInput.vue';
|
|
17
|
+
export { default as JKbd } from './components/kbd/JKbd.vue';
|
|
18
|
+
export { default as JPopover } from './components/popover/JPopover.vue';
|
|
19
|
+
export { default as JProgress } from './components/progress/JProgress.vue';
|
|
20
|
+
export { default as JRadio } from './components/radio/JRadio.vue';
|
|
21
|
+
export { default as JRadioGroup } from './components/radio/JRadioGroup.vue';
|
|
14
22
|
export { default as JSelect } from './components/select/JSelect.vue';
|
|
23
|
+
export { default as JSeparator } from './components/separator/JSeparator.vue';
|
|
24
|
+
export { default as JSheet } from './components/sheet/JSheet.vue';
|
|
25
|
+
export { default as JSkeleton } from './components/skeleton/JSkeleton.vue';
|
|
26
|
+
export { default as JSpinner } from './components/spinner/JSpinner.vue';
|
|
15
27
|
export { default as JSwitch } from './components/switch/JSwitch.vue';
|
|
16
28
|
export { default as JTabs } from './components/tabs/JTabs.vue';
|
|
17
29
|
export { default as JTextarea } from './components/textarea/JTextarea.vue';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
export interface ModalOptions {
|
|
3
|
+
closeOnEscape: () => boolean;
|
|
4
|
+
closeOnOverlay: () => boolean;
|
|
5
|
+
close: () => void;
|
|
6
|
+
/** Selector for the element to focus first, inside the panel. */
|
|
7
|
+
focusSelector?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Internal: everything a modal surface (Dialog, Sheet) shares — layering,
|
|
11
|
+
* focus trap and restoration, scroll lock, backdrop clicks and the "nudge"
|
|
12
|
+
* when dismissal is refused.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useModal(panel: Ref<HTMLElement | null>, open: Ref<boolean>, options: ModalOptions): {
|
|
15
|
+
nudging: Ref<boolean, boolean>;
|
|
16
|
+
onBackdropPointerDown: (event: PointerEvent) => void;
|
|
17
|
+
onBackdropClick: (event: MouseEvent) => void;
|
|
18
|
+
};
|
|
19
|
+
/** Form fields worth focusing first in a modal body. */
|
|
20
|
+
export declare const FIELD_SELECTOR = ":is(input:not([type=hidden]), textarea, select, [role=combobox]):not(:disabled)";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import './styles/index.css';
|
|
2
2
|
export * from './components';
|
|
3
|
+
export type { AccordionProps } from './components/accordion/JAccordion.vue';
|
|
4
|
+
export type { AccordionItemProps } from './components/accordion/JAccordionItem.vue';
|
|
5
|
+
export type { AlertProps, AlertVariant } from './components/alert/JAlert.vue';
|
|
3
6
|
export type { AvatarProps, AvatarStatus } from './components/avatar/JAvatar.vue';
|
|
4
7
|
export type { BadgeProps, BadgeVariant } from './components/badge/JBadge.vue';
|
|
5
8
|
export type { ButtonProps, ButtonSize, ButtonVariant } from './components/button/JButton.vue';
|
|
@@ -13,7 +16,17 @@ export type { DropdownMenuItemProps } from './components/dropdown-menu/JDropdown
|
|
|
13
16
|
export type { DropdownMenuSubProps } from './components/dropdown-menu/JDropdownMenuSub.vue';
|
|
14
17
|
export type { FieldProps } from './components/field/useField';
|
|
15
18
|
export type { InputProps, InputSize } from './components/input/JInput.vue';
|
|
19
|
+
export type { KbdProps } from './components/kbd/JKbd.vue';
|
|
20
|
+
export type { PopoverProps } from './components/popover/JPopover.vue';
|
|
21
|
+
export type { ProgressProps } from './components/progress/JProgress.vue';
|
|
22
|
+
export type { RadioValue } from './components/radio/context';
|
|
23
|
+
export type { RadioProps } from './components/radio/JRadio.vue';
|
|
24
|
+
export type { RadioGroupProps } from './components/radio/JRadioGroup.vue';
|
|
16
25
|
export type { SelectOption, SelectProps } from './components/select/JSelect.vue';
|
|
26
|
+
export type { SeparatorProps } from './components/separator/JSeparator.vue';
|
|
27
|
+
export type { SheetProps } from './components/sheet/JSheet.vue';
|
|
28
|
+
export type { SkeletonProps } from './components/skeleton/JSkeleton.vue';
|
|
29
|
+
export type { SpinnerProps } from './components/spinner/JSpinner.vue';
|
|
17
30
|
export type { SwitchProps } from './components/switch/JSwitch.vue';
|
|
18
31
|
export type { TabItem, TabsProps } from './components/tabs/JTabs.vue';
|
|
19
32
|
export type { TextareaProps } from './components/textarea/JTextarea.vue';
|