nuance-ui 0.2.7 → 0.2.9
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/LICENSE.md +9 -9
- package/README.md +75 -75
- package/dist/module.json +1 -1
- package/dist/runtime/components/action-icon/action-icon-group.vue +3 -3
- package/dist/runtime/components/action-icon/action-icon.d.vue.ts +1 -1
- package/dist/runtime/components/action-icon/action-icon.vue.d.ts +1 -1
- package/dist/runtime/components/app-shell/app-shell-aside.vue +30 -30
- package/dist/runtime/components/app-shell/app-shell-footer.vue +29 -29
- package/dist/runtime/components/app-shell/app-shell-header.vue +30 -30
- package/dist/runtime/components/app-shell/app-shell-main.vue +18 -18
- package/dist/runtime/components/app-shell/app-shell-navbar.vue +34 -34
- package/dist/runtime/components/app-shell/app-shell-section.vue +10 -10
- package/dist/runtime/components/app-shell/app-shell.vue +34 -34
- package/dist/runtime/components/breadcrumbs.vue +78 -78
- package/dist/runtime/components/button/button.d.vue.ts +5 -3
- package/dist/runtime/components/button/button.vue +7 -3
- package/dist/runtime/components/button/button.vue.d.ts +5 -3
- package/dist/runtime/components/button/unstyled-button.vue +23 -23
- package/dist/runtime/components/calendar/calendar.d.vue.ts +1 -1
- package/dist/runtime/components/calendar/calendar.vue.d.ts +1 -1
- package/dist/runtime/components/calendar/types.d.ts +4 -3
- package/dist/runtime/components/calendar/ui/core/calendar-header.d.vue.ts +7 -1
- package/dist/runtime/components/calendar/ui/core/calendar-header.vue +95 -95
- package/dist/runtime/components/calendar/ui/core/calendar-header.vue.d.ts +7 -1
- package/dist/runtime/components/calendar/ui/core/calendar-root.vue +3 -3
- package/dist/runtime/components/calendar/ui/levels/calendar-decade.d.vue.ts +3 -1
- package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue +40 -40
- package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue.d.ts +3 -1
- package/dist/runtime/components/calendar/ui/levels/calendar-month.d.vue.ts +2 -1
- package/dist/runtime/components/calendar/ui/levels/calendar-month.vue.d.ts +2 -1
- package/dist/runtime/components/calendar/ui/levels/calendar-year.d.vue.ts +3 -1
- package/dist/runtime/components/calendar/ui/levels/calendar-year.vue +40 -40
- package/dist/runtime/components/calendar/ui/levels/calendar-year.vue.d.ts +3 -1
- package/dist/runtime/components/card/card-section.d.vue.ts +2 -1
- package/dist/runtime/components/card/card-section.vue +3 -3
- package/dist/runtime/components/card/card-section.vue.d.ts +2 -1
- package/dist/runtime/components/card/card.d.vue.ts +1 -0
- package/dist/runtime/components/card/card.vue +3 -3
- package/dist/runtime/components/card/card.vue.d.ts +1 -0
- package/dist/runtime/components/checkbox/checkbox-card.d.vue.ts +4 -1
- package/dist/runtime/components/checkbox/checkbox-card.vue.d.ts +4 -1
- package/dist/runtime/components/checkbox/checkbox-indicator.d.vue.ts +6 -0
- package/dist/runtime/components/checkbox/checkbox-indicator.vue +117 -117
- package/dist/runtime/components/checkbox/checkbox-indicator.vue.d.ts +6 -0
- package/dist/runtime/components/checkbox/checkbox.d.vue.ts +12 -2
- package/dist/runtime/components/checkbox/checkbox.vue.d.ts +12 -2
- package/dist/runtime/components/chip/chip-group.d.vue.ts +3 -0
- package/dist/runtime/components/chip/chip-group.vue +2 -2
- package/dist/runtime/components/chip/chip-group.vue.d.ts +3 -0
- package/dist/runtime/components/chip/chip.d.vue.ts +9 -0
- package/dist/runtime/components/chip/chip.vue.d.ts +9 -0
- package/dist/runtime/components/combobox/combobox-dropdown.vue +14 -14
- package/dist/runtime/components/combobox/combobox-empty.vue +3 -3
- package/dist/runtime/components/combobox/combobox-group.d.vue.ts +1 -0
- package/dist/runtime/components/combobox/combobox-group.vue +21 -21
- package/dist/runtime/components/combobox/combobox-group.vue.d.ts +1 -0
- package/dist/runtime/components/combobox/combobox-option-list.vue +3 -3
- package/dist/runtime/components/combobox/combobox-option.d.vue.ts +3 -0
- package/dist/runtime/components/combobox/combobox-option.vue +22 -22
- package/dist/runtime/components/combobox/combobox-option.vue.d.ts +3 -0
- package/dist/runtime/components/combobox/combobox-options-dropdown.d.vue.ts +10 -0
- package/dist/runtime/components/combobox/combobox-options-dropdown.vue.d.ts +10 -0
- package/dist/runtime/components/combobox/combobox-root.d.vue.ts +8 -4
- package/dist/runtime/components/combobox/combobox-root.vue +3 -3
- package/dist/runtime/components/combobox/combobox-root.vue.d.ts +8 -4
- package/dist/runtime/components/combobox/combobox-target.vue +3 -3
- package/dist/runtime/components/combobox/types.d.ts +11 -0
- package/dist/runtime/components/container.d.vue.ts +2 -0
- package/dist/runtime/components/container.vue +8 -8
- package/dist/runtime/components/container.vue.d.ts +2 -0
- package/dist/runtime/components/date-time-picker.d.vue.ts +3 -3
- package/dist/runtime/components/date-time-picker.vue +66 -66
- package/dist/runtime/components/date-time-picker.vue.d.ts +3 -3
- package/dist/runtime/components/dialog/types.d.ts +1 -0
- package/dist/runtime/components/dialog/ui/dialog-close-button.vue +11 -11
- package/dist/runtime/components/dialog/ui/dialog-header.vue +5 -5
- package/dist/runtime/components/dialog/ui/dialog-title.vue +5 -5
- package/dist/runtime/components/drawer/drawer-close-button.vue +3 -3
- package/dist/runtime/components/drawer/drawer-header.vue +3 -3
- package/dist/runtime/components/drawer/drawer-root.vue +15 -15
- package/dist/runtime/components/drawer/drawer-title.vue +3 -3
- package/dist/runtime/components/files/file-upload-button.d.vue.ts +4 -2
- package/dist/runtime/components/files/file-upload-button.vue.d.ts +4 -2
- package/dist/runtime/components/files/file-upload-icon.d.vue.ts +4 -2
- package/dist/runtime/components/files/file-upload-icon.vue.d.ts +4 -2
- package/dist/runtime/components/input/date-picker.vue +85 -85
- package/dist/runtime/components/input/email-input.d.vue.ts +5 -5
- package/dist/runtime/components/input/email-input.vue +21 -22
- package/dist/runtime/components/input/email-input.vue.d.ts +5 -5
- package/dist/runtime/components/input/lib/input-wrapper.context.d.ts +8 -2
- package/dist/runtime/components/input/number-input.d.vue.ts +7 -5
- package/dist/runtime/components/input/number-input.vue +136 -132
- package/dist/runtime/components/input/number-input.vue.d.ts +7 -5
- package/dist/runtime/components/input/password-input.vue +29 -28
- package/dist/runtime/components/input/text-input.d.vue.ts +7 -5
- package/dist/runtime/components/input/text-input.vue +6 -3
- package/dist/runtime/components/input/text-input.vue.d.ts +7 -5
- package/dist/runtime/components/input/ui/input-inline.d.vue.ts +7 -3
- package/dist/runtime/components/input/ui/input-inline.vue.d.ts +7 -3
- package/dist/runtime/components/input/ui/input-wrapper.d.vue.ts +4 -1
- package/dist/runtime/components/input/ui/input-wrapper.vue.d.ts +4 -1
- package/dist/runtime/components/link/link-button.vue +17 -16
- package/dist/runtime/components/link/link.vue +10 -10
- package/dist/runtime/components/loader/_loaders/bars-loader.vue +5 -5
- package/dist/runtime/components/loader/_loaders/dots-loader.vue +5 -5
- package/dist/runtime/components/loader/_loaders/oval-loader.vue +1 -1
- package/dist/runtime/components/modal/modal-close-button.vue +3 -3
- package/dist/runtime/components/modal/modal-header.vue +3 -3
- package/dist/runtime/components/modal/modal-root.vue +13 -13
- package/dist/runtime/components/modal/modal-title.vue +3 -3
- package/dist/runtime/components/nav-link/nav-icon-link.vue +15 -15
- package/dist/runtime/components/nav-link/nav-link.d.vue.ts +6 -4
- package/dist/runtime/components/nav-link/nav-link.vue +135 -131
- package/dist/runtime/components/nav-link/nav-link.vue.d.ts +6 -4
- package/dist/runtime/components/paper.d.vue.ts +3 -1
- package/dist/runtime/components/paper.vue.d.ts +3 -1
- package/dist/runtime/components/popover/popover-dropdown.vue +69 -70
- package/dist/runtime/components/popover/popover-target.vue +8 -8
- package/dist/runtime/components/popover/popover.vue +1 -1
- package/dist/runtime/components/progress/progress-label.vue +3 -3
- package/dist/runtime/components/progress/progress-root.vue +3 -3
- package/dist/runtime/components/progress/progress-section.d.vue.ts +1 -1
- package/dist/runtime/components/progress/progress-section.vue +8 -8
- package/dist/runtime/components/progress/progress-section.vue.d.ts +1 -1
- package/dist/runtime/components/progress/progress.vue +9 -9
- package/dist/runtime/components/renderless/renderless.vue +3 -3
- package/dist/runtime/components/roving-focus/roving-focus-item.vue +14 -14
- package/dist/runtime/components/select.d.vue.ts +2 -0
- package/dist/runtime/components/select.vue.d.ts +2 -0
- package/dist/runtime/components/switch/switch-group.vue +16 -16
- package/dist/runtime/components/table/table.d.ts +30 -30
- package/dist/runtime/components/table/types.d.ts +10 -1
- package/dist/runtime/components/table/ui/table-sortable-header.vue +12 -11
- package/dist/runtime/components/tabs/tabs-list.d.vue.ts +2 -0
- package/dist/runtime/components/tabs/tabs-list.vue +10 -10
- package/dist/runtime/components/tabs/tabs-list.vue.d.ts +2 -0
- package/dist/runtime/components/tabs/tabs-panel.d.vue.ts +1 -0
- package/dist/runtime/components/tabs/tabs-panel.vue +11 -11
- package/dist/runtime/components/tabs/tabs-panel.vue.d.ts +1 -0
- package/dist/runtime/components/tabs/tabs-root.d.vue.ts +36 -9
- package/dist/runtime/components/tabs/tabs-root.vue +8 -8
- package/dist/runtime/components/tabs/tabs-root.vue.d.ts +36 -9
- package/dist/runtime/components/tabs/tabs-tab.d.vue.ts +7 -3
- package/dist/runtime/components/tabs/tabs-tab.vue +25 -22
- package/dist/runtime/components/tabs/tabs-tab.vue.d.ts +7 -3
- package/dist/runtime/components/text.d.vue.ts +6 -1
- package/dist/runtime/components/text.vue +67 -67
- package/dist/runtime/components/text.vue.d.ts +6 -1
- package/dist/runtime/components/textarea.d.vue.ts +7 -5
- package/dist/runtime/components/textarea.vue +38 -35
- package/dist/runtime/components/textarea.vue.d.ts +7 -5
- package/dist/runtime/components/title.d.vue.ts +5 -0
- package/dist/runtime/components/title.vue +14 -14
- package/dist/runtime/components/title.vue.d.ts +5 -0
- package/dist/runtime/components/transition.d.vue.ts +12 -2
- package/dist/runtime/components/transition.vue +3 -3
- package/dist/runtime/components/transition.vue.d.ts +12 -2
- package/dist/runtime/components/tree/_ui/tree-item.d.vue.ts +1 -0
- package/dist/runtime/components/tree/_ui/tree-item.vue +128 -129
- package/dist/runtime/components/tree/_ui/tree-item.vue.d.ts +1 -0
- package/dist/runtime/components/tree/_ui/tree-root.d.vue.ts +8 -0
- package/dist/runtime/components/tree/_ui/tree-root.vue +21 -21
- package/dist/runtime/components/tree/_ui/tree-root.vue.d.ts +8 -0
- package/dist/runtime/components/tree/lib/context.d.ts +15 -0
- package/dist/runtime/components/tree/types.d.ts +9 -0
- package/dist/runtime/components/visually-hidden/visually-hidden-input.d.vue.ts +2 -0
- package/dist/runtime/components/visually-hidden/visually-hidden-input.vue.d.ts +2 -0
- package/dist/runtime/components/visually-hidden/visually-hidden.d.vue.ts +1 -0
- package/dist/runtime/components/visually-hidden/visually-hidden.vue +9 -9
- package/dist/runtime/components/visually-hidden/visually-hidden.vue.d.ts +1 -0
- package/dist/runtime/styles/dark-theme.css +1 -1
- package/package.json +1 -1
|
@@ -3,17 +3,21 @@ import type { BoxProps } from '../../box.vue.js';
|
|
|
3
3
|
export interface InlineInputProps extends BoxProps {
|
|
4
4
|
/** Input id */
|
|
5
5
|
id: string;
|
|
6
|
+
/** Label text */
|
|
6
7
|
label?: string;
|
|
8
|
+
/** Helper text displayed below the label */
|
|
7
9
|
description?: string;
|
|
10
|
+
/** Error message displayed below the label */
|
|
8
11
|
error?: string;
|
|
9
|
-
/**
|
|
12
|
+
/** Disables the component */
|
|
10
13
|
disabled?: boolean | undefined;
|
|
11
14
|
/** Component size */
|
|
12
15
|
size?: NuanceSize | string;
|
|
16
|
+
/** Position of the label relative to the input control */
|
|
13
17
|
labelPosition?: 'left' | 'right';
|
|
14
|
-
/**
|
|
18
|
+
/** HTML element used for the body wrapper */
|
|
15
19
|
bodyElement?: keyof HTMLElementTagNameMap;
|
|
16
|
-
/**
|
|
20
|
+
/** HTML element used for the label */
|
|
17
21
|
labelElement?: keyof HTMLElementTagNameMap;
|
|
18
22
|
}
|
|
19
23
|
declare var __VLS_14: {}, __VLS_22: {}, __VLS_30: {}, __VLS_38: {};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { WrapperContext } from '../lib/input-wrapper.context.js';
|
|
2
2
|
export interface InputWrapperProps extends WrapperContext {
|
|
3
|
+
/** Error message displayed below the input */
|
|
3
4
|
error?: string;
|
|
5
|
+
/** Helper text displayed below the input */
|
|
4
6
|
description?: string;
|
|
7
|
+
/** Label displayed above the input */
|
|
5
8
|
label?: string;
|
|
6
|
-
/**
|
|
9
|
+
/** Marks the field as required */
|
|
7
10
|
required?: boolean;
|
|
8
11
|
}
|
|
9
12
|
declare var __VLS_7: {}, __VLS_9: {}, __VLS_11: {}, __VLS_13: {};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { WrapperContext } from '../lib/input-wrapper.context.js';
|
|
2
2
|
export interface InputWrapperProps extends WrapperContext {
|
|
3
|
+
/** Error message displayed below the input */
|
|
3
4
|
error?: string;
|
|
5
|
+
/** Helper text displayed below the input */
|
|
4
6
|
description?: string;
|
|
7
|
+
/** Label displayed above the input */
|
|
5
8
|
label?: string;
|
|
6
|
-
/**
|
|
9
|
+
/** Marks the field as required */
|
|
7
10
|
required?: boolean;
|
|
8
11
|
}
|
|
9
12
|
declare var __VLS_7: {}, __VLS_9: {}, __VLS_11: {}, __VLS_13: {};
|
|
@@ -27,6 +27,7 @@ const props = defineProps({
|
|
|
27
27
|
classes: { type: Object, required: false },
|
|
28
28
|
leftSectionPE: { type: null, required: false },
|
|
29
29
|
leftSectionProps: { type: Object, required: false },
|
|
30
|
+
icon: { type: String, required: false },
|
|
30
31
|
rightSectionPE: { type: null, required: false },
|
|
31
32
|
rightSectionProps: { type: Object, required: false },
|
|
32
33
|
is: { type: null, required: false },
|
|
@@ -36,26 +37,26 @@ const { link, rest } = pickLinkProps(props);
|
|
|
36
37
|
</script>
|
|
37
38
|
|
|
38
39
|
<template>
|
|
39
|
-
<NuxtLink v-slot='{ href, navigate, ...linkProps }' v-bind='link' custom>
|
|
40
|
-
<Button
|
|
40
|
+
<NuxtLink v-slot='{ href, navigate, ...linkProps }' v-bind='link' custom>
|
|
41
|
+
<Button
|
|
41
42
|
v-bind='{
|
|
42
43
|
...rest,
|
|
43
44
|
is: rest?.is || "a",
|
|
44
45
|
href,
|
|
45
46
|
rel: "rel" in linkProps ? linkProps.rel : void 0,
|
|
46
47
|
target: "target" in linkProps ? linkProps.target : void 0
|
|
47
|
-
}'
|
|
48
|
-
@click='navigate'
|
|
49
|
-
>
|
|
50
|
-
<template v-if='$slots.leftSection' #leftSection>
|
|
51
|
-
<slot name='leftSection' />
|
|
52
|
-
</template>
|
|
53
|
-
|
|
54
|
-
<slot />
|
|
55
|
-
|
|
56
|
-
<template v-if='$slots.rightSection' #rightSection>
|
|
57
|
-
<slot name='rightSection' />
|
|
58
|
-
</template>
|
|
59
|
-
</Button>
|
|
60
|
-
</NuxtLink>
|
|
48
|
+
}'
|
|
49
|
+
@click='navigate'
|
|
50
|
+
>
|
|
51
|
+
<template v-if='$slots.leftSection' #leftSection>
|
|
52
|
+
<slot name='leftSection' />
|
|
53
|
+
</template>
|
|
54
|
+
|
|
55
|
+
<slot />
|
|
56
|
+
|
|
57
|
+
<template v-if='$slots.rightSection' #rightSection>
|
|
58
|
+
<slot name='rightSection' />
|
|
59
|
+
</template>
|
|
60
|
+
</Button>
|
|
61
|
+
</NuxtLink>
|
|
61
62
|
</template>
|
|
@@ -37,22 +37,22 @@ const { link, rest: { underline, ...rest } } = pickLinkProps(props);
|
|
|
37
37
|
</script>
|
|
38
38
|
|
|
39
39
|
<template>
|
|
40
|
-
<NuxtLink v-slot='{ href, navigate, ...linkProps }' v-bind='link' custom>
|
|
41
|
-
<Text
|
|
42
|
-
is='a'
|
|
43
|
-
:class='[$style.root, { [$style.underline]: underline }]'
|
|
40
|
+
<NuxtLink v-slot='{ href, navigate, ...linkProps }' v-bind='link' custom>
|
|
41
|
+
<Text
|
|
42
|
+
is='a'
|
|
43
|
+
:class='[$style.root, { [$style.underline]: underline }]'
|
|
44
44
|
v-bind='{
|
|
45
45
|
...rest,
|
|
46
46
|
...$attrs,
|
|
47
47
|
href,
|
|
48
48
|
rel: "rel" in linkProps ? linkProps.rel : void 0,
|
|
49
49
|
target: "target" in linkProps ? linkProps.target : void 0
|
|
50
|
-
}'
|
|
51
|
-
@click='navigate'
|
|
52
|
-
>
|
|
53
|
-
<slot />
|
|
54
|
-
</Text>
|
|
55
|
-
</NuxtLink>
|
|
50
|
+
}'
|
|
51
|
+
@click='navigate'
|
|
52
|
+
>
|
|
53
|
+
<slot />
|
|
54
|
+
</Text>
|
|
55
|
+
</NuxtLink>
|
|
56
56
|
</template>
|
|
57
57
|
|
|
58
58
|
<style module>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<span :class='$style.root'>
|
|
3
|
-
<span :class='$style.bar' />
|
|
4
|
-
<span :class='$style.bar' />
|
|
5
|
-
<span :class='$style.bar' />
|
|
6
|
-
</span>
|
|
2
|
+
<span :class='$style.root'>
|
|
3
|
+
<span :class='$style.bar' />
|
|
4
|
+
<span :class='$style.bar' />
|
|
5
|
+
<span :class='$style.bar' />
|
|
6
|
+
</span>
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<style module>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<span :class='$style.root'>
|
|
3
|
-
<span :class='$style.dot' />
|
|
4
|
-
<span :class='$style.dot' />
|
|
5
|
-
<span :class='$style.dot' />
|
|
6
|
-
</span>
|
|
2
|
+
<span :class='$style.root'>
|
|
3
|
+
<span :class='$style.dot' />
|
|
4
|
+
<span :class='$style.dot' />
|
|
5
|
+
<span :class='$style.dot' />
|
|
6
|
+
</span>
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<style module>
|
|
@@ -31,17 +31,17 @@ const opened = defineModel("open", { type: Boolean, ...{ default: false } });
|
|
|
31
31
|
</script>
|
|
32
32
|
|
|
33
33
|
<template>
|
|
34
|
-
<DialogRoot
|
|
35
|
-
v-model:open='opened'
|
|
36
|
-
:mod='[{ centered, "full-screen": fullScreen }, mod]'
|
|
37
|
-
:root-class='css.root'
|
|
38
|
-
:within-portal
|
|
39
|
-
:close-on-click-outside
|
|
40
|
-
:without-overlay
|
|
41
|
-
v-bind='rest'
|
|
42
|
-
@open='$emit("open")'
|
|
43
|
-
@close='$emit("close")'
|
|
44
|
-
>
|
|
45
|
-
<slot />
|
|
46
|
-
</DialogRoot>
|
|
34
|
+
<DialogRoot
|
|
35
|
+
v-model:open='opened'
|
|
36
|
+
:mod='[{ centered, "full-screen": fullScreen }, mod]'
|
|
37
|
+
:root-class='css.root'
|
|
38
|
+
:within-portal
|
|
39
|
+
:close-on-click-outside
|
|
40
|
+
:without-overlay
|
|
41
|
+
v-bind='rest'
|
|
42
|
+
@open='$emit("open")'
|
|
43
|
+
@close='$emit("close")'
|
|
44
|
+
>
|
|
45
|
+
<slot />
|
|
46
|
+
</DialogRoot>
|
|
47
47
|
</template>
|
|
@@ -40,19 +40,19 @@ const { link, rest } = pickLinkProps(etc);
|
|
|
40
40
|
</script>
|
|
41
41
|
|
|
42
42
|
<template>
|
|
43
|
-
<NuxtLink v-slot='{ href, navigate, isActive, ...linkProps }' v-bind='link' custom>
|
|
44
|
-
<ActionIcon
|
|
45
|
-
is='a'
|
|
46
|
-
v-bind='{ ...rest, ...$attrs }'
|
|
47
|
-
:href
|
|
48
|
-
:variant='isActive ? active : notActive'
|
|
49
|
-
:mod='[{ active: isActive }, mod]'
|
|
50
|
-
:aria-current="isActive ? 'page' : void 0"
|
|
51
|
-
:rel='"rel" in linkProps ? linkProps?.rel : void 0'
|
|
52
|
-
:target='"target" in linkProps ? linkProps?.target : void 0'
|
|
53
|
-
@click='navigate'
|
|
54
|
-
>
|
|
55
|
-
<slot />
|
|
56
|
-
</ActionIcon>
|
|
57
|
-
</NuxtLink>
|
|
43
|
+
<NuxtLink v-slot='{ href, navigate, isActive, ...linkProps }' v-bind='link' custom>
|
|
44
|
+
<ActionIcon
|
|
45
|
+
is='a'
|
|
46
|
+
v-bind='{ ...rest, ...$attrs }'
|
|
47
|
+
:href
|
|
48
|
+
:variant='isActive ? active : notActive'
|
|
49
|
+
:mod='[{ active: isActive }, mod]'
|
|
50
|
+
:aria-current="isActive ? 'page' : void 0"
|
|
51
|
+
:rel='"rel" in linkProps ? linkProps?.rel : void 0'
|
|
52
|
+
:target='"target" in linkProps ? linkProps?.target : void 0'
|
|
53
|
+
@click='navigate'
|
|
54
|
+
>
|
|
55
|
+
<slot />
|
|
56
|
+
</ActionIcon>
|
|
57
|
+
</NuxtLink>
|
|
58
58
|
</template>
|
|
@@ -19,16 +19,18 @@ export interface NavLinkProps extends BoxProps, Omit<NuxtLinkProps, 'href' | 'cu
|
|
|
19
19
|
* @default `'filled'`
|
|
20
20
|
*/
|
|
21
21
|
variant?: 'filled' | 'light' | 'subtle';
|
|
22
|
+
/** Icon displayed before the label */
|
|
23
|
+
icon?: string;
|
|
22
24
|
}
|
|
23
|
-
declare var __VLS_16: {},
|
|
25
|
+
declare var __VLS_16: {}, __VLS_29: {}, __VLS_37: {}, __VLS_39: {};
|
|
24
26
|
type __VLS_Slots = {} & {
|
|
25
27
|
leftSection?: (props: typeof __VLS_16) => any;
|
|
26
28
|
} & {
|
|
27
|
-
default?: (props: typeof
|
|
29
|
+
default?: (props: typeof __VLS_29) => any;
|
|
28
30
|
} & {
|
|
29
|
-
description?: (props: typeof
|
|
31
|
+
description?: (props: typeof __VLS_37) => any;
|
|
30
32
|
} & {
|
|
31
|
-
rightSection?: (props: typeof
|
|
33
|
+
rightSection?: (props: typeof __VLS_39) => any;
|
|
32
34
|
};
|
|
33
35
|
declare const __VLS_base: import("vue").DefineComponent<NavLinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NavLinkProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
36
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -13,6 +13,7 @@ const props = defineProps({
|
|
|
13
13
|
noWrap: { type: Boolean, required: false },
|
|
14
14
|
disabled: { type: Boolean, required: false },
|
|
15
15
|
variant: { type: String, required: false },
|
|
16
|
+
icon: { type: String, required: false },
|
|
16
17
|
is: { type: null, required: false },
|
|
17
18
|
mod: { type: [Object, Array, null], required: false },
|
|
18
19
|
to: { type: null, required: false },
|
|
@@ -40,7 +41,8 @@ const {
|
|
|
40
41
|
color,
|
|
41
42
|
noWrap,
|
|
42
43
|
description,
|
|
43
|
-
spacing
|
|
44
|
+
spacing,
|
|
45
|
+
icon
|
|
44
46
|
}
|
|
45
47
|
} = pickLinkProps(props);
|
|
46
48
|
const style = computed(() => useStyleResolver((theme) => {
|
|
@@ -55,137 +57,139 @@ const style = computed(() => useStyleResolver((theme) => {
|
|
|
55
57
|
</script>
|
|
56
58
|
|
|
57
59
|
<template>
|
|
58
|
-
<NuxtLink v-slot='{ href, navigate, isActive, ...linkProps }' v-bind='link' custom>
|
|
59
|
-
<UnstyledButton
|
|
60
|
-
is='a'
|
|
61
|
-
:href
|
|
62
|
-
:style
|
|
63
|
-
:class='$style.root'
|
|
64
|
-
:mod='[{ active: isActive, disabled }, mod]'
|
|
65
|
-
:aria-current="isActive ? 'page' : void 0"
|
|
66
|
-
:rel='"rel" in linkProps ? linkProps?.rel : void 0'
|
|
67
|
-
:target='"target" in linkProps ? linkProps?.target : void 0'
|
|
68
|
-
@click='navigate'
|
|
69
|
-
>
|
|
70
|
-
<span v-if='$slots.leftSection' :class='$style.section' data-position='left'>
|
|
71
|
-
<slot name='leftSection'
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
60
|
+
<NuxtLink v-slot='{ href, navigate, isActive, ...linkProps }' v-bind='link' custom>
|
|
61
|
+
<UnstyledButton
|
|
62
|
+
is='a'
|
|
63
|
+
:href
|
|
64
|
+
:style
|
|
65
|
+
:class='$style.root'
|
|
66
|
+
:mod='[{ active: isActive, disabled }, mod]'
|
|
67
|
+
:aria-current="isActive ? 'page' : void 0"
|
|
68
|
+
:rel='"rel" in linkProps ? linkProps?.rel : void 0'
|
|
69
|
+
:target='"target" in linkProps ? linkProps?.target : void 0'
|
|
70
|
+
@click='navigate'
|
|
71
|
+
>
|
|
72
|
+
<span v-if='$slots.leftSection || icon' :class='$style.section' data-position='left'>
|
|
73
|
+
<slot name='leftSection'>
|
|
74
|
+
<Icon v-if='icon' :name='icon' />
|
|
75
|
+
</slot>
|
|
76
|
+
</span>
|
|
77
|
+
|
|
78
|
+
<Box :class='$style.body' :mod='{ "no-wrap": noWrap }'>
|
|
79
|
+
<span :class='$style.label'>
|
|
80
|
+
<slot />
|
|
81
|
+
</span>
|
|
82
|
+
<Box :class='$style.description' :mod='{ active }'>
|
|
83
|
+
<slot name='description'>
|
|
84
|
+
{{ description }}
|
|
85
|
+
</slot>
|
|
86
|
+
</Box>
|
|
87
|
+
</Box>
|
|
88
|
+
|
|
89
|
+
<span v-if='$slots.rightSection' :class='$style.section' data-position='right'>
|
|
90
|
+
<slot name='rightSection' />
|
|
91
|
+
</span>
|
|
92
|
+
</UnstyledButton>
|
|
93
|
+
</NuxtLink>
|
|
90
94
|
</template>
|
|
91
95
|
|
|
92
96
|
<style module lang="postcss">
|
|
93
|
-
.root {
|
|
94
|
-
--nl-spacing-xs: .25rem;
|
|
95
|
-
--nl-spacing-sm: .5rem;
|
|
96
|
-
--nl-spacing-md: .75rem;
|
|
97
|
-
--nl-spacing-lg: 1rem;
|
|
98
|
-
--nl-spacing-xl: 1.25rem;
|
|
99
|
-
|
|
100
|
-
--nl-bg: var(--color-primary-light);
|
|
101
|
-
--nl-hover: var(--color-primary-light-hover);
|
|
102
|
-
--nl-color: var(--color-primary-light-color);
|
|
103
|
-
--nl-spacing: var(--nl-spacing-xs);
|
|
104
|
-
|
|
105
|
-
user-select: none;
|
|
106
|
-
|
|
107
|
-
display: flex;
|
|
108
|
-
gap: var(--nl-spacing);
|
|
109
|
-
align-items: center;
|
|
110
|
-
|
|
111
|
-
width: 100%;
|
|
112
|
-
padding: .25rem var(--spacing-sm);
|
|
113
|
-
border-radius: var(--radius-default);
|
|
114
|
-
|
|
115
|
-
&:where([data-disabled]) {
|
|
116
|
-
pointer-events: none;
|
|
117
|
-
|
|
118
|
-
opacity: 0.4;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
&:hover {
|
|
122
|
-
@mixin where-light {
|
|
123
|
-
background-color: var(--color-gray-0);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
@mixin where-dark {
|
|
127
|
-
background-color: var(--color-dark-6);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
&:where([data-active]) {
|
|
132
|
-
color: var(--nl-color);
|
|
133
|
-
|
|
134
|
-
background-color: var(--nl-bg);
|
|
135
|
-
|
|
136
|
-
.description {
|
|
137
|
-
--description-opacity: 0.9;
|
|
138
|
-
--description-color: var(--nl-color);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
&:hover {
|
|
142
|
-
background-color: var(--nl-hover);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.section {
|
|
148
|
-
display: flex;
|
|
149
|
-
align-items: center;
|
|
150
|
-
justify-content: center;
|
|
151
|
-
|
|
152
|
-
transition: transform 150ms ease;
|
|
153
|
-
|
|
154
|
-
&>svg {
|
|
155
|
-
display: block;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
&:where([data-rotate]) {
|
|
159
|
-
transform: rotate(90deg);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.label {
|
|
164
|
-
font-size: var(--font-size-sm);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.body {
|
|
168
|
-
overflow: hidden;
|
|
169
|
-
flex: 1;
|
|
170
|
-
|
|
171
|
-
text-overflow: ellipsis;
|
|
172
|
-
|
|
173
|
-
&:where([data-no-wrap]) {
|
|
174
|
-
white-space: nowrap;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.description {
|
|
179
|
-
overflow: hidden;
|
|
180
|
-
|
|
181
|
-
font-size: var(--font-size-xs);
|
|
182
|
-
color: var(--description-color, var(--color-dimmed));
|
|
183
|
-
text-overflow: ellipsis;
|
|
184
|
-
|
|
185
|
-
opacity: var(--description-opacity, 1);
|
|
186
|
-
|
|
187
|
-
:where([data-no-wrap]) & {
|
|
188
|
-
white-space: nowrap;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
97
|
+
.root {
|
|
98
|
+
--nl-spacing-xs: .25rem;
|
|
99
|
+
--nl-spacing-sm: .5rem;
|
|
100
|
+
--nl-spacing-md: .75rem;
|
|
101
|
+
--nl-spacing-lg: 1rem;
|
|
102
|
+
--nl-spacing-xl: 1.25rem;
|
|
103
|
+
|
|
104
|
+
--nl-bg: var(--color-primary-light);
|
|
105
|
+
--nl-hover: var(--color-primary-light-hover);
|
|
106
|
+
--nl-color: var(--color-primary-light-color);
|
|
107
|
+
--nl-spacing: var(--nl-spacing-xs);
|
|
108
|
+
|
|
109
|
+
user-select: none;
|
|
110
|
+
|
|
111
|
+
display: flex;
|
|
112
|
+
gap: var(--nl-spacing);
|
|
113
|
+
align-items: center;
|
|
114
|
+
|
|
115
|
+
width: 100%;
|
|
116
|
+
padding: .25rem var(--spacing-sm);
|
|
117
|
+
border-radius: var(--radius-default);
|
|
118
|
+
|
|
119
|
+
&:where([data-disabled]) {
|
|
120
|
+
pointer-events: none;
|
|
121
|
+
|
|
122
|
+
opacity: 0.4;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&:hover {
|
|
126
|
+
@mixin where-light {
|
|
127
|
+
background-color: var(--color-gray-0);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@mixin where-dark {
|
|
131
|
+
background-color: var(--color-dark-6);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&:where([data-active]) {
|
|
136
|
+
color: var(--nl-color);
|
|
137
|
+
|
|
138
|
+
background-color: var(--nl-bg);
|
|
139
|
+
|
|
140
|
+
.description {
|
|
141
|
+
--description-opacity: 0.9;
|
|
142
|
+
--description-color: var(--nl-color);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&:hover {
|
|
146
|
+
background-color: var(--nl-hover);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.section {
|
|
152
|
+
display: flex;
|
|
153
|
+
align-items: center;
|
|
154
|
+
justify-content: center;
|
|
155
|
+
|
|
156
|
+
transition: transform 150ms ease;
|
|
157
|
+
|
|
158
|
+
&>svg {
|
|
159
|
+
display: block;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&:where([data-rotate]) {
|
|
163
|
+
transform: rotate(90deg);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.label {
|
|
168
|
+
font-size: var(--font-size-sm);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.body {
|
|
172
|
+
overflow: hidden;
|
|
173
|
+
flex: 1;
|
|
174
|
+
|
|
175
|
+
text-overflow: ellipsis;
|
|
176
|
+
|
|
177
|
+
&:where([data-no-wrap]) {
|
|
178
|
+
white-space: nowrap;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.description {
|
|
183
|
+
overflow: hidden;
|
|
184
|
+
|
|
185
|
+
font-size: var(--font-size-xs);
|
|
186
|
+
color: var(--description-color, var(--color-dimmed));
|
|
187
|
+
text-overflow: ellipsis;
|
|
188
|
+
|
|
189
|
+
opacity: var(--description-opacity, 1);
|
|
190
|
+
|
|
191
|
+
:where([data-no-wrap]) & {
|
|
192
|
+
white-space: nowrap;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
191
195
|
</style>
|
|
@@ -19,16 +19,18 @@ export interface NavLinkProps extends BoxProps, Omit<NuxtLinkProps, 'href' | 'cu
|
|
|
19
19
|
* @default `'filled'`
|
|
20
20
|
*/
|
|
21
21
|
variant?: 'filled' | 'light' | 'subtle';
|
|
22
|
+
/** Icon displayed before the label */
|
|
23
|
+
icon?: string;
|
|
22
24
|
}
|
|
23
|
-
declare var __VLS_16: {},
|
|
25
|
+
declare var __VLS_16: {}, __VLS_29: {}, __VLS_37: {}, __VLS_39: {};
|
|
24
26
|
type __VLS_Slots = {} & {
|
|
25
27
|
leftSection?: (props: typeof __VLS_16) => any;
|
|
26
28
|
} & {
|
|
27
|
-
default?: (props: typeof
|
|
29
|
+
default?: (props: typeof __VLS_29) => any;
|
|
28
30
|
} & {
|
|
29
|
-
description?: (props: typeof
|
|
31
|
+
description?: (props: typeof __VLS_37) => any;
|
|
30
32
|
} & {
|
|
31
|
-
rightSection?: (props: typeof
|
|
33
|
+
rightSection?: (props: typeof __VLS_39) => any;
|
|
32
34
|
};
|
|
33
35
|
declare const __VLS_base: import("vue").DefineComponent<NavLinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NavLinkProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
36
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { NuanceRadius, NuanceShadow } from '@nui/types';
|
|
2
2
|
import type { BoxProps } from './box.vue.js';
|
|
3
3
|
export interface PaperProps extends BoxProps {
|
|
4
|
+
/** Shadow token */
|
|
4
5
|
shadow?: NuanceShadow;
|
|
5
|
-
/** Border radius
|
|
6
|
+
/** Border radius */
|
|
6
7
|
radius?: NuanceRadius;
|
|
8
|
+
/** Adds a border */
|
|
7
9
|
withBorder?: boolean;
|
|
8
10
|
}
|
|
9
11
|
declare var __VLS_8: {};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { NuanceRadius, NuanceShadow } from '@nui/types';
|
|
2
2
|
import type { BoxProps } from './box.vue.js';
|
|
3
3
|
export interface PaperProps extends BoxProps {
|
|
4
|
+
/** Shadow token */
|
|
4
5
|
shadow?: NuanceShadow;
|
|
5
|
-
/** Border radius
|
|
6
|
+
/** Border radius */
|
|
6
7
|
radius?: NuanceRadius;
|
|
8
|
+
/** Adds a border */
|
|
7
9
|
withBorder?: boolean;
|
|
8
10
|
}
|
|
9
11
|
declare var __VLS_8: {};
|