nuance-ui 0.3.0 → 0.3.2
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/module.json +1 -1
- package/dist/module.mjs +2 -1
- package/dist/runtime/components/accordion/accordion-header.d.vue.ts +28 -0
- package/dist/runtime/components/accordion/accordion-header.vue +79 -0
- package/dist/runtime/components/accordion/accordion-header.vue.d.ts +28 -0
- package/dist/runtime/components/accordion/accordion-item.d.vue.ts +18 -0
- package/dist/runtime/components/accordion/accordion-item.vue +44 -0
- package/dist/runtime/components/accordion/accordion-item.vue.d.ts +18 -0
- package/dist/runtime/components/accordion/accordion-panel.d.vue.ts +18 -0
- package/dist/runtime/components/accordion/accordion-panel.vue +40 -0
- package/dist/runtime/components/accordion/accordion-panel.vue.d.ts +18 -0
- package/dist/runtime/components/accordion/accordion.d.vue.ts +61 -0
- package/dist/runtime/components/accordion/accordion.module.css +1 -0
- package/dist/runtime/components/accordion/accordion.vue +91 -0
- package/dist/runtime/components/accordion/accordion.vue.d.ts +61 -0
- package/dist/runtime/components/accordion/index.d.ts +6 -0
- package/dist/runtime/components/accordion/index.js +4 -0
- package/dist/runtime/components/accordion/lib/context.d.ts +34 -0
- package/dist/runtime/components/accordion/lib/context.js +9 -0
- package/dist/runtime/components/collapse.d.vue.ts +65 -0
- package/dist/runtime/components/collapse.vue +144 -0
- package/dist/runtime/components/collapse.vue.d.ts +65 -0
- package/dist/runtime/components/date-time-picker.d.vue.ts +2 -2
- package/dist/runtime/components/date-time-picker.vue.d.ts +2 -2
- package/dist/runtime/components/dialog/ui/dialog-root.d.vue.ts +1 -1
- package/dist/runtime/components/dialog/ui/dialog-root.vue +1 -1
- package/dist/runtime/components/dialog/ui/dialog-root.vue.d.ts +1 -1
- package/dist/runtime/components/index.d.ts +5 -3
- package/dist/runtime/components/index.js +2 -1
- package/dist/runtime/components/input/date-picker.d.vue.ts +2 -2
- package/dist/runtime/components/input/date-picker.vue.d.ts +2 -2
- package/dist/runtime/components/kbd.d.vue.ts +25 -0
- package/dist/runtime/components/kbd.vue +28 -0
- package/dist/runtime/components/kbd.vue.d.ts +25 -0
- package/dist/runtime/components/link/lib.d.ts +2 -2
- package/dist/runtime/components/notification.d.vue.ts +82 -0
- package/dist/runtime/components/notification.vue +144 -0
- package/dist/runtime/components/notification.vue.d.ts +82 -0
- package/dist/runtime/components/tabs/tabs-root.d.vue.ts +1 -1
- package/dist/runtime/components/tabs/tabs-root.vue.d.ts +1 -1
- package/dist/runtime/components/text.vue +1 -1
- package/dist/runtime/components/transition/index.d.ts +2 -0
- package/dist/runtime/components/transition/index.js +0 -0
- package/dist/runtime/components/transition/transition-group.d.vue.ts +35 -0
- package/dist/runtime/components/transition/transition-group.vue +32 -0
- package/dist/runtime/components/transition/transition-group.vue.d.ts +35 -0
- package/dist/runtime/components/transition/transition.vue +33 -0
- package/dist/runtime/components/tree/_ui/tree-item.vue +3 -3
- package/dist/runtime/composables/index.d.ts +1 -0
- package/dist/runtime/composables/index.js +1 -0
- package/dist/runtime/composables/use-countdown.d.ts +19 -0
- package/dist/runtime/composables/use-countdown.js +30 -0
- package/dist/runtime/notifications/index.d.ts +4 -0
- package/dist/runtime/notifications/index.js +3 -0
- package/dist/runtime/notifications/lib.d.ts +4 -0
- package/dist/runtime/notifications/lib.js +14 -0
- package/dist/runtime/notifications/notification-container.d.vue.ts +20 -0
- package/dist/runtime/notifications/notification-container.vue +35 -0
- package/dist/runtime/notifications/notification-container.vue.d.ts +20 -0
- package/dist/runtime/notifications/notifications-provider.d.vue.ts +22 -0
- package/dist/runtime/notifications/notifications-provider.vue +117 -0
- package/dist/runtime/notifications/notifications-provider.vue.d.ts +22 -0
- package/dist/runtime/notifications/notifications-store.d.ts +25 -0
- package/dist/runtime/notifications/notifications-store.js +80 -0
- package/dist/runtime/notifications/types.d.ts +50 -0
- package/dist/runtime/notifications/types.js +0 -0
- package/dist/runtime/notifications/use-notifications.d.ts +7 -0
- package/dist/runtime/notifications/use-notifications.js +10 -0
- package/dist/runtime/styles/global.css +1 -1
- package/dist/runtime/styles/transitions.css +1 -0
- package/dist/runtime/types/index.d.ts +2 -0
- package/package.json +10 -6
- package/dist/runtime/components/accordion.d.vue.ts +0 -79
- package/dist/runtime/components/accordion.vue +0 -44
- package/dist/runtime/components/accordion.vue.d.ts +0 -79
- package/dist/runtime/components/collapsible/collapsible-content.d.vue.ts +0 -18
- package/dist/runtime/components/collapsible/collapsible-content.vue +0 -76
- package/dist/runtime/components/collapsible/collapsible-content.vue.d.ts +0 -18
- package/dist/runtime/components/collapsible/collapsible-root.d.vue.ts +0 -42
- package/dist/runtime/components/collapsible/collapsible-root.vue +0 -41
- package/dist/runtime/components/collapsible/collapsible-root.vue.d.ts +0 -42
- package/dist/runtime/components/collapsible/collapsible-trigger.d.vue.ts +0 -13
- package/dist/runtime/components/collapsible/collapsible-trigger.vue +0 -20
- package/dist/runtime/components/collapsible/collapsible-trigger.vue.d.ts +0 -13
- package/dist/runtime/components/collapsible/index.d.ts +0 -3
- package/dist/runtime/components/collapsible/index.js +0 -1
- package/dist/runtime/components/transition.vue +0 -42
- /package/dist/runtime/components/{transition.d.vue.ts → transition/transition.d.vue.ts} +0 -0
- /package/dist/runtime/components/{transition.vue.d.ts → transition/transition.vue.d.ts} +0 -0
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, onMounted, ref, useTemplateRef, watch } from "vue";
|
|
3
|
+
import { useVarsResolver } from "#imports";
|
|
4
|
+
import NotificationContainer from "./notification-container.vue";
|
|
5
|
+
import { $notifications } from "./notifications-store";
|
|
6
|
+
import { useNotifications } from "./use-notifications";
|
|
7
|
+
const {
|
|
8
|
+
position = "bottom-right",
|
|
9
|
+
autoClose = 4e3,
|
|
10
|
+
limit = 5,
|
|
11
|
+
zIndex = 1,
|
|
12
|
+
containerWidth = 440,
|
|
13
|
+
transitionDuration = 250,
|
|
14
|
+
pauseOnHover = "all"
|
|
15
|
+
} = defineProps({
|
|
16
|
+
position: { type: String, required: false },
|
|
17
|
+
autoClose: { type: [Number, Boolean], required: false },
|
|
18
|
+
limit: { type: Number, required: false },
|
|
19
|
+
zIndex: { type: [Number, String], required: false },
|
|
20
|
+
containerWidth: { type: [Number, String], required: false },
|
|
21
|
+
transitionDuration: { type: Number, required: false },
|
|
22
|
+
pauseOnHover: { type: String, required: false },
|
|
23
|
+
classes: { type: Object, required: false }
|
|
24
|
+
});
|
|
25
|
+
const POSITIONS = [
|
|
26
|
+
"top-left",
|
|
27
|
+
"top-center",
|
|
28
|
+
"top-right",
|
|
29
|
+
"bottom-left",
|
|
30
|
+
"bottom-center",
|
|
31
|
+
"bottom-right"
|
|
32
|
+
];
|
|
33
|
+
const { notifications } = useNotifications();
|
|
34
|
+
const hoveredId = ref(null);
|
|
35
|
+
const grouped = computed(() => {
|
|
36
|
+
const acc = Object.fromEntries(
|
|
37
|
+
POSITIONS.map((p) => [p, []])
|
|
38
|
+
);
|
|
39
|
+
for (const n of notifications.value)
|
|
40
|
+
acc[n.position ?? position].push(n);
|
|
41
|
+
return acc;
|
|
42
|
+
});
|
|
43
|
+
function isPaused(id) {
|
|
44
|
+
if (pauseOnHover === "all")
|
|
45
|
+
return hoveredId.value !== null;
|
|
46
|
+
return hoveredId.value === id;
|
|
47
|
+
}
|
|
48
|
+
function transitionName(position2) {
|
|
49
|
+
if (position2.startsWith("top"))
|
|
50
|
+
return "slide-down";
|
|
51
|
+
return "slide-up";
|
|
52
|
+
}
|
|
53
|
+
const style = useVarsResolver(() => ({
|
|
54
|
+
root: {
|
|
55
|
+
"--notifications-z-index": String(zIndex),
|
|
56
|
+
"--notifications-width": typeof containerWidth === "number" ? `${containerWidth}px` : containerWidth,
|
|
57
|
+
"--transition-duration": `${transitionDuration}ms`
|
|
58
|
+
}
|
|
59
|
+
}));
|
|
60
|
+
const viewportRefs = useTemplateRef("viewports");
|
|
61
|
+
function showPopovers() {
|
|
62
|
+
for (const el of viewportRefs.value ?? []) {
|
|
63
|
+
if (el && "showPopover" in el && !el.matches(":popover-open")) {
|
|
64
|
+
try {
|
|
65
|
+
el.showPopover();
|
|
66
|
+
} catch {
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
onMounted(() => {
|
|
72
|
+
$notifications.updateState({
|
|
73
|
+
limit,
|
|
74
|
+
defaultPosition: position
|
|
75
|
+
});
|
|
76
|
+
showPopovers();
|
|
77
|
+
});
|
|
78
|
+
watch(() => limit, (limit2) => $notifications.updateState({ limit: limit2 }));
|
|
79
|
+
watch(() => position, (position2) => $notifications.updateState({ defaultPosition: position2 }));
|
|
80
|
+
</script>
|
|
81
|
+
|
|
82
|
+
<template>
|
|
83
|
+
<div
|
|
84
|
+
v-for='viewportPosition in POSITIONS'
|
|
85
|
+
:key='viewportPosition'
|
|
86
|
+
ref='viewports'
|
|
87
|
+
popover='manual'
|
|
88
|
+
role='region'
|
|
89
|
+
aria-label='Notifications'
|
|
90
|
+
aria-live='polite'
|
|
91
|
+
aria-atomic='false'
|
|
92
|
+
:data-position='viewportPosition'
|
|
93
|
+
:class='[$style.viewport, classes?.root]'
|
|
94
|
+
:style='style.root'
|
|
95
|
+
>
|
|
96
|
+
<TransitionGroup
|
|
97
|
+
:name='transitionName(viewportPosition)'
|
|
98
|
+
:duration='transitionDuration'
|
|
99
|
+
>
|
|
100
|
+
<NotificationContainer
|
|
101
|
+
v-for='n in grouped[viewportPosition]'
|
|
102
|
+
:key='n.id'
|
|
103
|
+
:data='n'
|
|
104
|
+
:auto-close
|
|
105
|
+
:paused='isPaused(n.id)'
|
|
106
|
+
:class='classes?.notification'
|
|
107
|
+
@hide='$notifications.hide($event)'
|
|
108
|
+
@hover-start='hoveredId = n.id'
|
|
109
|
+
@hover-end='hoveredId = null'
|
|
110
|
+
/>
|
|
111
|
+
</TransitionGroup>
|
|
112
|
+
</div>
|
|
113
|
+
</template>
|
|
114
|
+
|
|
115
|
+
<style module>
|
|
116
|
+
.viewport{background:transparent;border:0;display:flex;flex-direction:column-reverse;gap:var(--spacing-sm);inset:auto;margin:0;max-width:100%;overflow:visible;padding:var(--spacing-md);position:fixed;width:var(--notifications-width);z-index:var(--notifications-z-index)}.viewport[data-position=top-left]{left:0;top:0}.viewport[data-position=top-center]{left:50%;top:0;transform:translateX(-50%)}.viewport[data-position=top-right]{right:0;top:0}.viewport[data-position=bottom-left]{bottom:0;flex-direction:column;left:0}.viewport[data-position=bottom-center]{bottom:0;flex-direction:column;left:50%;transform:translateX(-50%)}.viewport[data-position=bottom-right]{bottom:0;flex-direction:column;right:0}.viewport:not(:popover-open){display:none}
|
|
117
|
+
</style>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Classes } from '@nui/types';
|
|
2
|
+
import type { NotificationPosition } from './types.js';
|
|
3
|
+
export interface NotificationProviderProps {
|
|
4
|
+
/** Default notification position @default 'bottom-right' */
|
|
5
|
+
position?: NotificationPosition;
|
|
6
|
+
/** Auto-close in ms, or `false` to disable @default 4000 */
|
|
7
|
+
autoClose?: number | false;
|
|
8
|
+
/** Max visible at once @default 5 */
|
|
9
|
+
limit?: number;
|
|
10
|
+
/** Viewport z-index @default 1 */
|
|
11
|
+
zIndex?: number | string;
|
|
12
|
+
/** Container width @default 440 */
|
|
13
|
+
containerWidth?: number | string;
|
|
14
|
+
/** Transition duration in ms @default 250 */
|
|
15
|
+
transitionDuration?: number;
|
|
16
|
+
/** Which notifications pause auto-close on hover @default 'all' */
|
|
17
|
+
pauseOnHover?: 'all' | 'notification';
|
|
18
|
+
classes?: Classes<'root' | 'notification'>;
|
|
19
|
+
}
|
|
20
|
+
declare const __VLS_export: import("vue").DefineComponent<NotificationProviderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NotificationProviderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { NotificationInput, NotificationsState } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Global notifications store.
|
|
4
|
+
*
|
|
5
|
+
* Holds a reactive list of visible notifications plus an overflow queue.
|
|
6
|
+
* Shows, updates, and removes notifications from any context.
|
|
7
|
+
*/
|
|
8
|
+
export declare class NotificationsStore {
|
|
9
|
+
readonly state: NotificationsState;
|
|
10
|
+
private constructor();
|
|
11
|
+
static get instance(): NotificationsStore;
|
|
12
|
+
/** Shows a notification, or queues it past the limit. Returns its id. */
|
|
13
|
+
show(data: NotificationInput): string;
|
|
14
|
+
/** Removes a notification and promotes the next queued one. */
|
|
15
|
+
hide(id: string): void;
|
|
16
|
+
/** Patches an existing notification in place. Noop if absent. */
|
|
17
|
+
update(id: string, data: Partial<NotificationInput>): void;
|
|
18
|
+
/** Removes everything. */
|
|
19
|
+
clean(): void;
|
|
20
|
+
/** Removes only queued notifications. */
|
|
21
|
+
cleanQueue(): void;
|
|
22
|
+
/** Patches store configuration (limit / defaultPosition). */
|
|
23
|
+
updateState(patch: Partial<Pick<NotificationsState, 'limit' | 'defaultPosition'>>): void;
|
|
24
|
+
}
|
|
25
|
+
export declare const $notifications: import("vue").Raw<NotificationsStore>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { markRaw, reactive } from "vue";
|
|
2
|
+
import { createId } from "./lib.js";
|
|
3
|
+
const GLOBAL_KEY = "__nui_notifications_store__";
|
|
4
|
+
export class NotificationsStore {
|
|
5
|
+
state = reactive({
|
|
6
|
+
notifications: [],
|
|
7
|
+
queue: [],
|
|
8
|
+
limit: 5,
|
|
9
|
+
defaultPosition: "bottom-right"
|
|
10
|
+
});
|
|
11
|
+
constructor() {
|
|
12
|
+
}
|
|
13
|
+
static get instance() {
|
|
14
|
+
if (!globalThis[GLOBAL_KEY])
|
|
15
|
+
globalThis[GLOBAL_KEY] = new NotificationsStore();
|
|
16
|
+
return globalThis[GLOBAL_KEY];
|
|
17
|
+
}
|
|
18
|
+
/** Shows a notification, or queues it past the limit. Returns its id. */
|
|
19
|
+
show(data) {
|
|
20
|
+
const id = data.id ?? createId();
|
|
21
|
+
const visible = this.state.notifications.find((n) => n.id === id);
|
|
22
|
+
if (visible) {
|
|
23
|
+
Object.assign(visible, data, { id });
|
|
24
|
+
return id;
|
|
25
|
+
}
|
|
26
|
+
const queued = this.state.queue.find((n) => n.id === id);
|
|
27
|
+
if (queued) {
|
|
28
|
+
Object.assign(queued, data, { id });
|
|
29
|
+
return id;
|
|
30
|
+
}
|
|
31
|
+
const next = { ...data, id };
|
|
32
|
+
if (this.state.notifications.length < this.state.limit)
|
|
33
|
+
this.state.notifications.push(next);
|
|
34
|
+
else
|
|
35
|
+
this.state.queue.push(next);
|
|
36
|
+
return id;
|
|
37
|
+
}
|
|
38
|
+
/** Removes a notification and promotes the next queued one. */
|
|
39
|
+
hide(id) {
|
|
40
|
+
const index = this.state.notifications.findIndex((n) => n.id === id);
|
|
41
|
+
if (index === -1) {
|
|
42
|
+
const queuedIndex = this.state.queue.findIndex((n) => n.id === id);
|
|
43
|
+
if (queuedIndex !== -1)
|
|
44
|
+
this.state.queue.splice(queuedIndex, 1);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
this.state.notifications.splice(index, 1);
|
|
48
|
+
const next = this.state.queue.shift();
|
|
49
|
+
if (next)
|
|
50
|
+
this.state.notifications.push(next);
|
|
51
|
+
}
|
|
52
|
+
/** Patches an existing notification in place. Noop if absent. */
|
|
53
|
+
update(id, data) {
|
|
54
|
+
const visible = this.state.notifications.find((n) => n.id === id);
|
|
55
|
+
if (visible) {
|
|
56
|
+
Object.assign(visible, data, { id });
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const queued = this.state.queue.find((n) => n.id === id);
|
|
60
|
+
if (queued)
|
|
61
|
+
Object.assign(queued, data, { id });
|
|
62
|
+
}
|
|
63
|
+
/** Removes everything. */
|
|
64
|
+
clean() {
|
|
65
|
+
this.state.notifications = [];
|
|
66
|
+
this.state.queue = [];
|
|
67
|
+
}
|
|
68
|
+
/** Removes only queued notifications. */
|
|
69
|
+
cleanQueue() {
|
|
70
|
+
this.state.queue = [];
|
|
71
|
+
}
|
|
72
|
+
/** Patches store configuration (limit / defaultPosition). */
|
|
73
|
+
updateState(patch) {
|
|
74
|
+
if (patch.limit !== void 0)
|
|
75
|
+
this.state.limit = patch.limit;
|
|
76
|
+
if (patch.defaultPosition !== void 0)
|
|
77
|
+
this.state.defaultPosition = patch.defaultPosition;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
export const $notifications = markRaw(NotificationsStore.instance);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { StringOrVNode } from '@nui/types';
|
|
2
|
+
import type { ButtonProps } from '../components/button/button.vue.js';
|
|
3
|
+
import type { NotificationProps } from '../components/notification.vue.js';
|
|
4
|
+
/** Notification placement on screen. */
|
|
5
|
+
export type NotificationPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
6
|
+
/** Actions/close layout. */
|
|
7
|
+
export type NotificationOrientation = 'vertical' | 'horizontal';
|
|
8
|
+
/** Action button rendered inside a notification. */
|
|
9
|
+
export interface NotificationAction extends ButtonProps {
|
|
10
|
+
/** Button label */
|
|
11
|
+
label: string;
|
|
12
|
+
/** Click handler */
|
|
13
|
+
onClick?: (event: MouseEvent) => void;
|
|
14
|
+
}
|
|
15
|
+
/** Argument of `$notifications.show()`. */
|
|
16
|
+
export interface NotificationInput extends Omit<NotificationProps, 'title' | 'message'> {
|
|
17
|
+
/** Stable id. Reusing an existing id updates that notification in place. */
|
|
18
|
+
id?: string;
|
|
19
|
+
/** Notification title */
|
|
20
|
+
title?: StringOrVNode;
|
|
21
|
+
/** Notification body */
|
|
22
|
+
message?: StringOrVNode;
|
|
23
|
+
/** Action buttons */
|
|
24
|
+
actions?: NotificationAction[];
|
|
25
|
+
/** Actions/close layout @default 'vertical' */
|
|
26
|
+
orientation?: NotificationOrientation;
|
|
27
|
+
/** Overrides the provider position */
|
|
28
|
+
position?: NotificationPosition;
|
|
29
|
+
/** Auto-close in ms, or `false` to keep open. Overrides the provider value */
|
|
30
|
+
autoClose?: number | false;
|
|
31
|
+
/** Called after the notification is removed */
|
|
32
|
+
onClose?: (id: string) => void;
|
|
33
|
+
/** Called once when the notification mounts */
|
|
34
|
+
onOpen?: (id: string) => void;
|
|
35
|
+
}
|
|
36
|
+
/** Stored notification — always has an id. */
|
|
37
|
+
export interface NotificationData extends NotificationInput {
|
|
38
|
+
id: string;
|
|
39
|
+
}
|
|
40
|
+
/** Reactive store state. */
|
|
41
|
+
export interface NotificationsState {
|
|
42
|
+
/** Currently visible notifications (<= limit) */
|
|
43
|
+
notifications: NotificationData[];
|
|
44
|
+
/** Notifications waiting for a free slot */
|
|
45
|
+
queue: NotificationData[];
|
|
46
|
+
/** Max visible at once */
|
|
47
|
+
limit: number;
|
|
48
|
+
/** Position used when a notification has none */
|
|
49
|
+
defaultPosition: NotificationPosition;
|
|
50
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Reactive access to the global notifications state. */
|
|
2
|
+
export declare function useNotifications(): {
|
|
3
|
+
/** Currently visible notifications. */
|
|
4
|
+
notifications: import("vue").ComputedRef<import("./types.js").NotificationData[]>;
|
|
5
|
+
/** Queued notifications waiting for a free slot. */
|
|
6
|
+
queue: import("vue").ComputedRef<import("./types.js").NotificationData[]>;
|
|
7
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
import { $notifications } from "./notifications-store.js";
|
|
3
|
+
export function useNotifications() {
|
|
4
|
+
return {
|
|
5
|
+
/** Currently visible notifications. */
|
|
6
|
+
notifications: computed(() => $notifications.state.notifications),
|
|
7
|
+
/** Queued notifications waiting for a free slot. */
|
|
8
|
+
queue: computed(() => $notifications.state.queue)
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@import url(./baseline.css);@import url(./const.css);@import url(./colors.css);@import url(./dark-theme.css);@import url(./light-theme.css);.light-hidden{@mixin light{display:none}}.dark-hidden{@mixin dark{display:none}}.focus-auto:focus-visible{outline:2px solid var(--color-primary-filled);outline-offset:2px}.focus-always:focus{outline:2px solid var(--color-primary-filled);outline-offset:2px}.focus-never:focus{outline:none}.active:active{transform:translateY(rem(1px))}fieldset:disabled .active:active{transform:none}.rotate-rtl{@mixin where-rtl{transform:rotate(180deg)}}[data-v-hidden]{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}
|
|
1
|
+
@import url(./baseline.css);@import url(./const.css);@import url(./colors.css);@import url(./dark-theme.css);@import url(./light-theme.css);@import url(./transitions.css);.light-hidden{@mixin light{display:none}}.dark-hidden{@mixin dark{display:none}}.focus-auto:focus-visible{outline:2px solid var(--color-primary-filled);outline-offset:2px}.focus-always:focus{outline:2px solid var(--color-primary-filled);outline-offset:2px}.focus-never:focus{outline:none}.active:active{transform:translateY(rem(1px))}fieldset:disabled .active:active{transform:none}.rotate-rtl{@mixin where-rtl{transform:rotate(180deg)}}[data-v-hidden]{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--transition-delay:0ms;--transition-duration:250ms}.transition-move{transition:transform var(--transition-duration) var(--transition-delay) ease}.fade-enter-active,.fade-leave-active{transition:opacity var(--transition-duration) var(--transition-delay) ease}.fade-enter-from,.fade-leave-to{opacity:0}.fade-up-enter-active,.fade-up-leave-active{transform:translateY(0);transition:opacity var(--transition-duration) var(--transition-delay) ease,transform var(--transition-duration) ease}.fade-up-enter-from,.fade-up-leave-to{opacity:0;transform:translateY(30px)}.fade-down-enter-active,.fade-down-leave-active{transform:translateY(0);transition:opacity var(--transition-duration) var(--transition-delay) ease,transform var(--transition-duration) ease}.fade-down-enter-from,.fade-down-leave-to{opacity:0;transform:translateY(-30px)}.fade-left-enter-active,.fade-left-leave-active{transform:translateX(0);transition:opacity var(--transition-duration) var(--transition-delay) ease,transform var(--transition-duration) ease}.fade-left-enter-from,.fade-left-leave-to{opacity:0;transform:translateX(30px)}.fade-right-enter-active,.fade-right-leave-active{transform:translateX(0);transition:opacity var(--transition-duration) var(--transition-delay) ease,transform var(--transition-duration) ease}.fade-right-enter-from,.fade-right-leave-to{opacity:0;transform:translateX(-30px)}.scale-enter-active,.scale-leave-active{transform:scale(1);transform-origin:top;transition:opacity var(--transition-duration) var(--transition-delay) ease,transform var(--transition-duration) ease}.scale-enter-from,.scale-leave-to{opacity:0;transform:scale(0)}.scale-y-enter-active,.scale-y-leave-active{transform:scaleY(1);transform-origin:top;transition:opacity var(--transition-duration) var(--transition-delay) ease,transform var(--transition-duration) ease}.scale-y-enter-from,.scale-y-leave-to{opacity:0;transform:scaleY(0)}.scale-x-enter-active,.scale-x-leave-active{transform:scaleX(1);transform-origin:top;transition:opacity var(--transition-duration) var(--transition-delay) ease,transform var(--transition-duration) ease}.scale-x-enter-from,.scale-x-leave-to{opacity:0;transform:scaleX(0)}.skew-up-enter-active,.skew-up-leave-active{transform:translateY(0) skew(0deg,0deg);transform-origin:top;transition:opacity var(--transition-duration) var(--transition-delay) ease,transform var(--transition-duration) ease}.skew-up-enter-from,.skew-up-leave-to{opacity:0;transform:translateY(-20px) skew(-10deg,-5deg)}.skew-down-enter-active,.skew-down-leave-active{transform:translateY(0) skew(0deg,0deg);transform-origin:bottom;transition:opacity var(--transition-duration) var(--transition-delay) ease,transform var(--transition-duration) ease}.skew-down-enter-from,.skew-down-leave-to{opacity:0;transform:translateY(20px) skew(-10deg,-5deg)}.rotate-left-enter-active,.rotate-left-leave-active{transform:translateY(0) rotate(0deg);transform-origin:bottom;transition:opacity var(--transition-duration) var(--transition-delay) ease,transform var(--transition-duration) ease}.rotate-left-enter-from,.rotate-left-leave-to{opacity:0;transform:translateY(20px) rotate(-5deg)}.rotate-right-enter-active,.rotate-right-leave-active{transform:translateY(0) rotate(0deg);transform-origin:bottom;transition:opacity var(--transition-duration) var(--transition-delay) ease,transform var(--transition-duration) ease}.rotate-right-enter-from,.rotate-right-leave-to{opacity:0;transform:translateY(20px) rotate(5deg)}.slide-down-enter-active,.slide-down-leave-active{transform:translateY(0);transform-origin:top;transition:opacity var(--transition-duration) var(--transition-delay) ease,transform var(--transition-duration) ease}.slide-down-enter-from,.slide-down-leave-to{opacity:0;transform:translateY(-100%)}.slide-up-enter-active,.slide-up-leave-active{transform:translateY(0);transform-origin:top;transition:opacity var(--transition-duration) var(--transition-delay) ease,transform var(--transition-duration) ease}.slide-up-enter-from,.slide-up-leave-to{opacity:0;transform:translateY(100%)}.slide-left-enter-active,.slide-left-leave-active{transform:translateX(0);transform-origin:top;transition:opacity var(--transition-duration) var(--transition-delay) ease,transform var(--transition-duration) ease}.slide-left-enter-from,.slide-left-leave-to{opacity:0;transform:translateX(100%)}.slide-right-enter-active,.slide-right-leave-active{transform:translateX(0);transform-origin:top;transition:opacity var(--transition-duration) var(--transition-delay) ease,transform var(--transition-duration) ease}.slide-right-enter-from,.slide-right-leave-to{opacity:0;transform:translateX(-100%)}.pop-enter-active,.pop-leave-active{transform:scale(1);transform-origin:center center;transition:opacity var(--transition-duration) var(--transition-delay) ease,transform var(--transition-duration) ease}.pop-enter-from,.pop-leave-to{opacity:0;transform:scale(.9) translateY(10px);transform-origin:center center}.pop-bottom-left-enter-active,.pop-bottom-left-leave-active{transform:scale(1);transform-origin:bottom left;transition:opacity var(--transition-duration) var(--transition-delay) ease,transform var(--transition-duration) ease}.pop-bottom-left-enter-from,.pop-bottom-left-leave-to{opacity:0;transform:scale(.9) translateY(10px);transform-origin:bottom left}.pop-bottom-right-enter-active,.pop-bottom-right-leave-active{transform:scale(1);transform-origin:bottom right;transition:opacity var(--transition-duration) var(--transition-delay) ease,transform var(--transition-duration) ease}.pop-bottom-right-enter-from,.pop-bottom-right-leave-to{opacity:0;transform:scale(.9) translateY(10px);transform-origin:bottom right}.pop-top-left-enter-active,.pop-top-left-leave-active{transform:scale(1);transform-origin:top left;transition:opacity var(--transition-duration) var(--transition-delay) ease,transform var(--transition-duration) ease}.pop-top-left-enter-from,.pop-top-left-leave-to{opacity:0;transform:scale(.9) translateY(-10px);transform-origin:top left}.pop-top-right-enter-active,.pop-top-right-leave-active{transform:scale(1);transform-origin:top right;transition:opacity var(--transition-duration) var(--transition-delay) ease,transform var(--transition-duration) ease}.pop-top-right-enter-from,.pop-top-right-leave-to{opacity:0;transform:scale(.9) translateY(-10px);transform-origin:top right}
|
|
@@ -4,6 +4,8 @@ export type * from './styling';
|
|
|
4
4
|
export type * from './theme';
|
|
5
5
|
/** Value that may be synchronous or wrapped in a promise. */
|
|
6
6
|
export type MaybePromise<T = unknown> = T | Promise<T>;
|
|
7
|
+
/** String, VNode, or a render function producing a VNode. */
|
|
8
|
+
export type StringOrVNode = string | VNode | (() => VNode);
|
|
7
9
|
export type AnyString = string & {};
|
|
8
10
|
export type DynamicSlotsKeys<Name extends string | undefined, Suffix extends string | undefined = undefined> = (Name extends string ? Suffix extends string ? Name | `${Name}-${Suffix}` : Name : never);
|
|
9
11
|
export type SlotProps<T extends {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuance-ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "A modern Nuxt UI library inspired by the best of the React ecosystem.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"dev": "npm run dev:prepare && nuxi dev playground",
|
|
47
47
|
"dev:build": "nuxi build playground",
|
|
48
48
|
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
49
|
-
"release": "npm run lint && npm run prepack && changelogen --release
|
|
49
|
+
"release": "npm run lint && npm run prepack && changelogen --release && git push --follow-tags",
|
|
50
50
|
"lint": "eslint ./src",
|
|
51
|
-
"test": "vitest
|
|
52
|
-
"
|
|
53
|
-
"
|
|
51
|
+
"test": "vitest",
|
|
52
|
+
"lint:ts": "vue-tsc --noEmit",
|
|
53
|
+
"lint:playground:ts": "cd playground && vue-tsc --noEmit"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@floating-ui/vue": "^1.1.10",
|
|
@@ -90,9 +90,13 @@
|
|
|
90
90
|
"@nuxtjs/stylelint-module": "^5.2.1",
|
|
91
91
|
"@types/node": "latest",
|
|
92
92
|
"@vee-validate/nuxt": "^4.15.1",
|
|
93
|
+
"@vitejs/plugin-vue": "^6.0.7",
|
|
94
|
+
"@vue/test-utils": "^2.4.11",
|
|
93
95
|
"changelogen": "^0.6.2",
|
|
94
96
|
"eslint": "^9.39.2",
|
|
97
|
+
"happy-dom": "^20.10.6",
|
|
95
98
|
"nuxt": "^4.4.2",
|
|
99
|
+
"playwright-core": "^1.61.1",
|
|
96
100
|
"postcss": "^8.5.6",
|
|
97
101
|
"postcss-preset-mantine": "^1.18.0",
|
|
98
102
|
"postcss-simple-vars": "^7.0.1",
|
|
@@ -117,4 +121,4 @@
|
|
|
117
121
|
"vue-components",
|
|
118
122
|
"ui"
|
|
119
123
|
]
|
|
120
|
-
}
|
|
124
|
+
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import type { Classes, NuanceRadius } from '@nui/types';
|
|
2
|
-
import type { TitleProps } from './title.vue.js';
|
|
3
|
-
export interface AccordionItem {
|
|
4
|
-
label?: string;
|
|
5
|
-
slot?: string;
|
|
6
|
-
content?: string;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
/** Iconify icon */
|
|
9
|
-
icon?: string;
|
|
10
|
-
/** Iconify icon */
|
|
11
|
-
trailingIcon?: string;
|
|
12
|
-
/**
|
|
13
|
-
* A unique value for the accordion item. Defaults to the index.
|
|
14
|
-
* Also used as the Vue `key` for this item, so providing a stable value prevents
|
|
15
|
-
* accordion content (and its local state) from remounting when items are added, removed,
|
|
16
|
-
* or reordered.
|
|
17
|
-
*/
|
|
18
|
-
value?: string;
|
|
19
|
-
}
|
|
20
|
-
type AccordionVariant = 'default' | 'contained' | 'filled' | 'separated';
|
|
21
|
-
export interface AccordionProps<Multiple extends boolean = false> {
|
|
22
|
-
/** If set, multiple items can be opened at the same time @default false */
|
|
23
|
-
multiple?: Multiple;
|
|
24
|
-
/** If set, arrow keys loop through items (first to last and last to first) @default true */
|
|
25
|
-
loop?: boolean;
|
|
26
|
-
/** @default 'default' */
|
|
27
|
-
variant?: AccordionVariant;
|
|
28
|
-
/** Transition duration in ms @default 200 */
|
|
29
|
-
transitionDuration?: number;
|
|
30
|
-
/** If set, chevron rotation is disabled @default false */
|
|
31
|
-
disableChevronRotation?: boolean;
|
|
32
|
-
/** Position of the chevron relative to the item label @default right */
|
|
33
|
-
chevronPosition?: 'left' | 'right';
|
|
34
|
-
/** Size of the chevron icon container @default auto */
|
|
35
|
-
chevronSize?: number | string;
|
|
36
|
-
/**
|
|
37
|
-
* Size of the default chevron icon. Ignored when `chevron` prop is set.
|
|
38
|
-
* Use `chevronSize` instead when using custom chevron.
|
|
39
|
-
* @default 16
|
|
40
|
-
*/
|
|
41
|
-
chevronIconSize?: number | string;
|
|
42
|
-
/**
|
|
43
|
-
* Sets heading level (h2-h6) for `Accordion.Control` elements.
|
|
44
|
-
* Wraps each control in the corresponding heading tag, recommended to meet WAI-ARIA accessibility requirements.
|
|
45
|
-
* Has no visual effect.
|
|
46
|
-
*/
|
|
47
|
-
order?: TitleProps['order'];
|
|
48
|
-
/** Custom chevron icon */
|
|
49
|
-
chevron?: string;
|
|
50
|
-
/**
|
|
51
|
-
* Key of `theme.radius` or any valid CSS value to set border-radius.
|
|
52
|
-
* Numbers are converted to rem.
|
|
53
|
-
* @default theme.defaultRadius */
|
|
54
|
-
radius?: NuanceRadius;
|
|
55
|
-
/**
|
|
56
|
-
* If set to `false`, panels are unmounted when collapsed.
|
|
57
|
-
* By default, panels stay mounted when collapsed. @default true
|
|
58
|
-
*/
|
|
59
|
-
keepMounted?: boolean;
|
|
60
|
-
classes?: Classes<'root' | 'content' | 'item' | 'panel' | 'icon' | 'chevron' | 'label' | 'itemTitle' | 'control'>;
|
|
61
|
-
}
|
|
62
|
-
declare const _default: typeof __VLS_export;
|
|
63
|
-
export default _default;
|
|
64
|
-
declare const __VLS_export: <Multiple extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
65
|
-
props: import("vue").PublicProps & __VLS_PrettifyLocal<AccordionProps<Multiple>> & (typeof globalThis extends {
|
|
66
|
-
__VLS_PROPS_FALLBACK: infer P;
|
|
67
|
-
} ? P : {});
|
|
68
|
-
expose: (exposed: {}) => void;
|
|
69
|
-
attrs: any;
|
|
70
|
-
slots: {};
|
|
71
|
-
emit: {};
|
|
72
|
-
}>) => import("vue").VNode & {
|
|
73
|
-
__ctx?: Awaited<typeof __VLS_setup>;
|
|
74
|
-
};
|
|
75
|
-
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
76
|
-
[K in keyof T]: T[K];
|
|
77
|
-
} : {
|
|
78
|
-
[K in keyof T as K]: T[K];
|
|
79
|
-
}) & {};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<script setup>
|
|
6
|
-
import { getRadius, getSize, useVarsResolver } from "#imports";
|
|
7
|
-
import Box from "./box.vue";
|
|
8
|
-
const {
|
|
9
|
-
transitionDuration,
|
|
10
|
-
chevronSize,
|
|
11
|
-
radius
|
|
12
|
-
} = defineProps({
|
|
13
|
-
multiple: { type: null, required: false },
|
|
14
|
-
loop: { type: Boolean, required: false },
|
|
15
|
-
variant: { type: String, required: false },
|
|
16
|
-
transitionDuration: { type: Number, required: false },
|
|
17
|
-
disableChevronRotation: { type: Boolean, required: false },
|
|
18
|
-
chevronPosition: { type: String, required: false },
|
|
19
|
-
chevronSize: { type: [Number, String], required: false },
|
|
20
|
-
chevronIconSize: { type: [Number, String], required: false },
|
|
21
|
-
order: { type: String, required: false },
|
|
22
|
-
chevron: { type: String, required: false },
|
|
23
|
-
radius: { type: [String, Number], required: false },
|
|
24
|
-
keepMounted: { type: Boolean, required: false },
|
|
25
|
-
classes: { type: Object, required: false }
|
|
26
|
-
});
|
|
27
|
-
const style = useVarsResolver(() => ({
|
|
28
|
-
root: {
|
|
29
|
-
"--accordion-transition-duration": transitionDuration === void 0 ? void 0 : `${transitionDuration}ms`,
|
|
30
|
-
"--accordion-chevron-size": chevronSize === void 0 ? void 0 : getSize(chevronSize),
|
|
31
|
-
"--accordion-radius": radius === void 0 ? void 0 : getRadius(radius)
|
|
32
|
-
}
|
|
33
|
-
}));
|
|
34
|
-
</script>
|
|
35
|
-
|
|
36
|
-
<template>
|
|
37
|
-
<Box :style='style.root'>
|
|
38
|
-
accordion
|
|
39
|
-
</Box>
|
|
40
|
-
</template>
|
|
41
|
-
|
|
42
|
-
<style module>
|
|
43
|
-
.root{--accordion-radius:var(--radius-default)}.panel{overflow-wrap:break-word}.content{padding:var(--spacing-md);padding-top:calc(var(--spacing-xs)/2)}.itemTitle{margin:0;padding:0;width:100%}.control{align-items:center;background-color:transparent;color:var(--color-bright);cursor:pointer;display:flex;flex-direction:row-reverse;opacity:1;padding-inline:var(--spacing-md);width:100%}.control:where([data-chevron-position=left]){flex-direction:row;padding-inline-start:0}.control:where(:disabled,[data-disabled]){cursor:not-allowed;opacity:.4}.control--contained:where(:not(:disabled,[data-disabled])),.control--default:where(:not(:disabled,[data-disabled])){@mixin hover{@mixin where-light{background-color:var(--color-gray-0)}@mixin where-dark{background-color:var(--color-dark-6)}}}.label{color:inherit;flex:1;font-weight:var(--font-weight-regular);overflow:hidden;padding-bottom:var(--spacing-sm);padding-top:var(--spacing-sm);text-overflow:ellipsis}.chevron{align-items:center;display:flex;justify-content:flex-start;min-width:var(--accordion-chevron-size,rem(15px));transform:rotate(0deg);transition:transform var(--accordion-transition-duration,.2s) ease;width:var(--accordion-chevron-size,rem(15px))}.chevron:where([data-rotate]){transform:rotate(180deg)}.chevron:where([data-position=left]){margin-inline-end:var(--spacing-md);margin-inline-start:var(--spacing-md)}.icon{align-items:center;display:flex;justify-content:center;margin-inline-end:var(--spacing-sm)}.icon:where([data-chevron-position=left]){margin-inline-end:0;margin-inline-start:var(--spacing-lg)}.item{@mixin where-light{--item-border-color:var(--color-gray-3);--item-filled-color:var(--color-gray-0)}@mixin where-dark{--item-border-color:var(--color-dark-4);--item-filled-color:var(--color-dark-6)}}.item--default{border-bottom:1px solid var(--item-border-color)}.item--contained{border:1px solid var(--item-border-color);transition:background-color .15s ease}.item--contained:where([data-active]){background-color:var(--item-filled-color)}.item--contained:first-of-type,.item--contained:first-of-type>[data-accordion-control]{border-start-end-radius:var(--accordion-radius);border-start-start-radius:var(--accordion-radius)}.item--contained:last-of-type,.item--contained:last-of-type>[data-accordion-control]{border-end-end-radius:var(--accordion-radius);border-end-start-radius:var(--accordion-radius)}.item--contained+.item--contained{border-top:0}.item--filled{border-radius:var(--accordion-radius)}.item--filled:where([data-active]){background-color:var(--item-filled-color)}.item--separated{background-color:var(--item-filled-color);border:1px solid transparent;border-radius:var(--accordion-radius);transition:background-color .15s ease}.item--separated[data-active]{border-color:var(--item-border-color);@mixin where-light{background-color:var(--color-white)}@mixin where-dark{background-color:var(--color-dark-7)}}.item--separated+.item--separated{margin-top:var(--spacing-md)}
|
|
44
|
-
</style>
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import type { Classes, NuanceRadius } from '@nui/types';
|
|
2
|
-
import type { TitleProps } from './title.vue.js';
|
|
3
|
-
export interface AccordionItem {
|
|
4
|
-
label?: string;
|
|
5
|
-
slot?: string;
|
|
6
|
-
content?: string;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
/** Iconify icon */
|
|
9
|
-
icon?: string;
|
|
10
|
-
/** Iconify icon */
|
|
11
|
-
trailingIcon?: string;
|
|
12
|
-
/**
|
|
13
|
-
* A unique value for the accordion item. Defaults to the index.
|
|
14
|
-
* Also used as the Vue `key` for this item, so providing a stable value prevents
|
|
15
|
-
* accordion content (and its local state) from remounting when items are added, removed,
|
|
16
|
-
* or reordered.
|
|
17
|
-
*/
|
|
18
|
-
value?: string;
|
|
19
|
-
}
|
|
20
|
-
type AccordionVariant = 'default' | 'contained' | 'filled' | 'separated';
|
|
21
|
-
export interface AccordionProps<Multiple extends boolean = false> {
|
|
22
|
-
/** If set, multiple items can be opened at the same time @default false */
|
|
23
|
-
multiple?: Multiple;
|
|
24
|
-
/** If set, arrow keys loop through items (first to last and last to first) @default true */
|
|
25
|
-
loop?: boolean;
|
|
26
|
-
/** @default 'default' */
|
|
27
|
-
variant?: AccordionVariant;
|
|
28
|
-
/** Transition duration in ms @default 200 */
|
|
29
|
-
transitionDuration?: number;
|
|
30
|
-
/** If set, chevron rotation is disabled @default false */
|
|
31
|
-
disableChevronRotation?: boolean;
|
|
32
|
-
/** Position of the chevron relative to the item label @default right */
|
|
33
|
-
chevronPosition?: 'left' | 'right';
|
|
34
|
-
/** Size of the chevron icon container @default auto */
|
|
35
|
-
chevronSize?: number | string;
|
|
36
|
-
/**
|
|
37
|
-
* Size of the default chevron icon. Ignored when `chevron` prop is set.
|
|
38
|
-
* Use `chevronSize` instead when using custom chevron.
|
|
39
|
-
* @default 16
|
|
40
|
-
*/
|
|
41
|
-
chevronIconSize?: number | string;
|
|
42
|
-
/**
|
|
43
|
-
* Sets heading level (h2-h6) for `Accordion.Control` elements.
|
|
44
|
-
* Wraps each control in the corresponding heading tag, recommended to meet WAI-ARIA accessibility requirements.
|
|
45
|
-
* Has no visual effect.
|
|
46
|
-
*/
|
|
47
|
-
order?: TitleProps['order'];
|
|
48
|
-
/** Custom chevron icon */
|
|
49
|
-
chevron?: string;
|
|
50
|
-
/**
|
|
51
|
-
* Key of `theme.radius` or any valid CSS value to set border-radius.
|
|
52
|
-
* Numbers are converted to rem.
|
|
53
|
-
* @default theme.defaultRadius */
|
|
54
|
-
radius?: NuanceRadius;
|
|
55
|
-
/**
|
|
56
|
-
* If set to `false`, panels are unmounted when collapsed.
|
|
57
|
-
* By default, panels stay mounted when collapsed. @default true
|
|
58
|
-
*/
|
|
59
|
-
keepMounted?: boolean;
|
|
60
|
-
classes?: Classes<'root' | 'content' | 'item' | 'panel' | 'icon' | 'chevron' | 'label' | 'itemTitle' | 'control'>;
|
|
61
|
-
}
|
|
62
|
-
declare const _default: typeof __VLS_export;
|
|
63
|
-
export default _default;
|
|
64
|
-
declare const __VLS_export: <Multiple extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
65
|
-
props: import("vue").PublicProps & __VLS_PrettifyLocal<AccordionProps<Multiple>> & (typeof globalThis extends {
|
|
66
|
-
__VLS_PROPS_FALLBACK: infer P;
|
|
67
|
-
} ? P : {});
|
|
68
|
-
expose: (exposed: {}) => void;
|
|
69
|
-
attrs: any;
|
|
70
|
-
slots: {};
|
|
71
|
-
emit: {};
|
|
72
|
-
}>) => import("vue").VNode & {
|
|
73
|
-
__ctx?: Awaited<typeof __VLS_setup>;
|
|
74
|
-
};
|
|
75
|
-
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
76
|
-
[K in keyof T]: T[K];
|
|
77
|
-
} : {
|
|
78
|
-
[K in keyof T as K]: T[K];
|
|
79
|
-
}) & {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { BoxProps } from '../box.vue.js';
|
|
2
|
-
export interface CollapsibleContentProps extends BoxProps {
|
|
3
|
-
/**
|
|
4
|
-
* Used to force mounting when more control is needed. Useful when
|
|
5
|
-
* controlling animation with Vue animation libraries.
|
|
6
|
-
*/
|
|
7
|
-
forceMount?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare const _default: typeof __VLS_export;
|
|
10
|
-
export default _default;
|
|
11
|
-
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CollapsibleContentProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CollapsibleContentProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
12
|
-
default?: (props: {}) => any;
|
|
13
|
-
}>;
|
|
14
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
-
new (): {
|
|
16
|
-
$slots: S;
|
|
17
|
-
};
|
|
18
|
-
};
|