nuance-ui 0.2.7 → 0.2.8
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/runtime/components/action-icon/action-icon.d.vue.ts +1 -1
- package/dist/runtime/components/action-icon/action-icon.vue +23 -23
- package/dist/runtime/components/action-icon/action-icon.vue.d.ts +1 -1
- package/dist/runtime/components/box.vue +3 -3
- package/dist/runtime/components/button/button.d.vue.ts +5 -3
- package/dist/runtime/components/button/button.vue +43 -39
- package/dist/runtime/components/button/button.vue.d.ts +5 -3
- package/dist/runtime/components/calendar/calendar.d.vue.ts +1 -1
- package/dist/runtime/components/calendar/calendar.vue +60 -60
- 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.d.ts +7 -1
- package/dist/runtime/components/calendar/ui/levels/calendar-decade.d.vue.ts +3 -1
- 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 +77 -77
- 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.d.ts +3 -1
- package/dist/runtime/components/card/card-section.d.vue.ts +2 -1
- 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.d.ts +1 -0
- package/dist/runtime/components/checkbox/checkbox-card.d.vue.ts +4 -1
- package/dist/runtime/components/checkbox/checkbox-card.vue +37 -37
- 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.d.ts +6 -0
- package/dist/runtime/components/checkbox/checkbox.d.vue.ts +12 -2
- package/dist/runtime/components/checkbox/checkbox.vue +139 -139
- 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.d.ts +3 -0
- package/dist/runtime/components/chip/chip.d.vue.ts +9 -0
- package/dist/runtime/components/chip/chip.vue +200 -200
- package/dist/runtime/components/chip/chip.vue.d.ts +9 -0
- package/dist/runtime/components/combobox/combobox-group.d.vue.ts +1 -0
- package/dist/runtime/components/combobox/combobox-group.vue.d.ts +1 -0
- package/dist/runtime/components/combobox/combobox-option.d.vue.ts +3 -0
- 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 +29 -29
- 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.d.ts +8 -4
- 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.d.ts +2 -0
- package/dist/runtime/components/dialog/types.d.ts +1 -0
- package/dist/runtime/components/files/file-upload-button.d.vue.ts +4 -2
- package/dist/runtime/components/files/file-upload-button.vue +12 -12
- 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 +1 -1
- package/dist/runtime/components/files/file-upload-icon.vue.d.ts +4 -2
- package/dist/runtime/components/input/email-input.d.vue.ts +5 -5
- package/dist/runtime/components/input/email-input.vue +5 -6
- 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 +6 -2
- package/dist/runtime/components/input/number-input.vue.d.ts +7 -5
- package/dist/runtime/components/input/password-input.vue +1 -0
- package/dist/runtime/components/input/text-input.d.vue.ts +7 -5
- package/dist/runtime/components/input/text-input.vue +37 -34
- 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 +105 -105
- 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 +54 -54
- package/dist/runtime/components/input/ui/input-wrapper.vue.d.ts +4 -1
- package/dist/runtime/components/link/link-button.vue +1 -0
- package/dist/runtime/components/nav-link/nav-link.d.vue.ts +6 -4
- package/dist/runtime/components/nav-link/nav-link.vue +7 -3
- 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 +33 -33
- package/dist/runtime/components/paper.vue.d.ts +3 -1
- package/dist/runtime/components/progress/progress-section.d.vue.ts +1 -1
- package/dist/runtime/components/progress/progress-section.vue.d.ts +1 -1
- package/dist/runtime/components/select.d.vue.ts +2 -0
- package/dist/runtime/components/select.vue +63 -63
- package/dist/runtime/components/select.vue.d.ts +2 -0
- package/dist/runtime/components/table/types.d.ts +10 -1
- package/dist/runtime/components/table/ui/table-sortable-header.vue +1 -0
- package/dist/runtime/components/tabs/tabs-list.d.vue.ts +2 -0
- 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.d.ts +1 -0
- package/dist/runtime/components/tabs/tabs-root.d.vue.ts +36 -9
- 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 +7 -4
- 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.d.ts +6 -1
- package/dist/runtime/components/textarea.d.vue.ts +7 -5
- package/dist/runtime/components/textarea.vue +6 -3
- 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.d.ts +5 -0
- package/dist/runtime/components/transition.d.vue.ts +12 -2
- 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.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.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 +1 -1
- 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.d.ts +1 -0
- package/package.json +1 -1
|
@@ -33,112 +33,112 @@ const style = computed(() => ({
|
|
|
33
33
|
</script>
|
|
34
34
|
|
|
35
35
|
<template>
|
|
36
|
-
<Box :style :class='$style.root' :mod='[{ "label-position": labelPosition }, mod]'>
|
|
37
|
-
<Box :is='bodyElement' :for='bodyElement === "label" ? id : void 0' :class='$style.body'>
|
|
38
|
-
<slot />
|
|
39
|
-
|
|
40
|
-
<div :class='$style.wrapper'>
|
|
41
|
-
<Box :is='labelElement' v-if='label || $slots.label' :class='$style.label' :for='labelElement === "label" ? id : void 0' :mod='{ disabled }'>
|
|
42
|
-
<slot name='label'>
|
|
43
|
-
{{ label }}
|
|
44
|
-
</slot>
|
|
45
|
-
</Box>
|
|
46
|
-
|
|
47
|
-
<Box is='p' v-if='error' :class='$style.error' :mod='{ disabled }'>
|
|
48
|
-
<slot name='error'>
|
|
49
|
-
{{ error }}
|
|
50
|
-
</slot>
|
|
51
|
-
</Box>
|
|
52
|
-
|
|
53
|
-
<Box is='p' v-else-if='description || $slots.description' :class='$style.description' :mod='{ disabled }'>
|
|
54
|
-
<slot name='description'>
|
|
55
|
-
{{ description }}
|
|
56
|
-
</slot>
|
|
57
|
-
</Box>
|
|
58
|
-
</div>
|
|
59
|
-
</Box>
|
|
60
|
-
</Box>
|
|
36
|
+
<Box :style :class='$style.root' :mod='[{ "label-position": labelPosition }, mod]'>
|
|
37
|
+
<Box :is='bodyElement' :for='bodyElement === "label" ? id : void 0' :class='$style.body'>
|
|
38
|
+
<slot />
|
|
39
|
+
|
|
40
|
+
<div :class='$style.wrapper'>
|
|
41
|
+
<Box :is='labelElement' v-if='label || $slots.label' :class='$style.label' :for='labelElement === "label" ? id : void 0' :mod='{ disabled }'>
|
|
42
|
+
<slot name='label'>
|
|
43
|
+
{{ label }}
|
|
44
|
+
</slot>
|
|
45
|
+
</Box>
|
|
46
|
+
|
|
47
|
+
<Box is='p' v-if='error' :class='$style.error' :mod='{ disabled }'>
|
|
48
|
+
<slot name='error'>
|
|
49
|
+
{{ error }}
|
|
50
|
+
</slot>
|
|
51
|
+
</Box>
|
|
52
|
+
|
|
53
|
+
<Box is='p' v-else-if='description || $slots.description' :class='$style.description' :mod='{ disabled }'>
|
|
54
|
+
<slot name='description'>
|
|
55
|
+
{{ description }}
|
|
56
|
+
</slot>
|
|
57
|
+
</Box>
|
|
58
|
+
</div>
|
|
59
|
+
</Box>
|
|
60
|
+
</Box>
|
|
61
61
|
</template>
|
|
62
62
|
|
|
63
63
|
<style lang="postcss" module>
|
|
64
|
-
.root {
|
|
65
|
-
--label-lh-xs: rem(16px);
|
|
66
|
-
--label-lh-sm: rem(20px);
|
|
67
|
-
--label-lh-md: rem(24px);
|
|
68
|
-
--label-lh-lg: rem(30px);
|
|
69
|
-
--label-lh-xl: rem(36px);
|
|
70
|
-
--label-lh: var(--label-lh-sm);
|
|
71
|
-
|
|
72
|
-
--label-fz: var(--font-size-sm);
|
|
73
|
-
|
|
74
|
-
&[data-label-position='left'] {
|
|
75
|
-
--label-order: 0;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
&[data-label-position='right'] {
|
|
79
|
-
--label-order: 1;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.body {
|
|
84
|
-
display: flex;
|
|
85
|
-
gap: var(--spacing-sm);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.wrapper {
|
|
89
|
-
--label-cursor: default;
|
|
90
|
-
|
|
91
|
-
cursor: var(--label-cursor);
|
|
92
|
-
|
|
93
|
-
display: inline-flex;
|
|
94
|
-
flex-direction: column;
|
|
95
|
-
gap: .25rem;
|
|
96
|
-
order: var(--label-order);
|
|
97
|
-
|
|
98
|
-
font-size: var(--label-fz);
|
|
99
|
-
line-height: var(--label-lh);
|
|
100
|
-
|
|
101
|
-
-webkit-tap-highlight-color: transparent;
|
|
102
|
-
|
|
103
|
-
fieldset:disabled &,
|
|
104
|
-
&[data-disabled] {
|
|
105
|
-
--label-cursor: not-allowed;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
&:empty {
|
|
109
|
-
display: none;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.label {
|
|
114
|
-
cursor: var(--label-cursor);
|
|
115
|
-
|
|
116
|
-
color: inherit;
|
|
117
|
-
|
|
118
|
-
fieldset:disabled &,
|
|
119
|
-
&:where([data-disabled]) {
|
|
120
|
-
color: var(--color-gray-5);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.error,
|
|
125
|
-
.description {
|
|
126
|
-
display: block;
|
|
127
|
-
|
|
128
|
-
margin: 0;
|
|
129
|
-
padding: 0;
|
|
130
|
-
|
|
131
|
-
line-height: 1.2;
|
|
132
|
-
overflow-wrap: break-word;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.description {
|
|
136
|
-
font-size: var(--input-description-size, calc(var(--font-size-sm) - rem(2px)));
|
|
137
|
-
color: var(--color-dimmed);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.error {
|
|
141
|
-
font-size: var(--input-error-size);
|
|
142
|
-
color: var(--color-error);
|
|
143
|
-
}
|
|
64
|
+
.root {
|
|
65
|
+
--label-lh-xs: rem(16px);
|
|
66
|
+
--label-lh-sm: rem(20px);
|
|
67
|
+
--label-lh-md: rem(24px);
|
|
68
|
+
--label-lh-lg: rem(30px);
|
|
69
|
+
--label-lh-xl: rem(36px);
|
|
70
|
+
--label-lh: var(--label-lh-sm);
|
|
71
|
+
|
|
72
|
+
--label-fz: var(--font-size-sm);
|
|
73
|
+
|
|
74
|
+
&[data-label-position='left'] {
|
|
75
|
+
--label-order: 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&[data-label-position='right'] {
|
|
79
|
+
--label-order: 1;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.body {
|
|
84
|
+
display: flex;
|
|
85
|
+
gap: var(--spacing-sm);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.wrapper {
|
|
89
|
+
--label-cursor: default;
|
|
90
|
+
|
|
91
|
+
cursor: var(--label-cursor);
|
|
92
|
+
|
|
93
|
+
display: inline-flex;
|
|
94
|
+
flex-direction: column;
|
|
95
|
+
gap: .25rem;
|
|
96
|
+
order: var(--label-order);
|
|
97
|
+
|
|
98
|
+
font-size: var(--label-fz);
|
|
99
|
+
line-height: var(--label-lh);
|
|
100
|
+
|
|
101
|
+
-webkit-tap-highlight-color: transparent;
|
|
102
|
+
|
|
103
|
+
fieldset:disabled &,
|
|
104
|
+
&[data-disabled] {
|
|
105
|
+
--label-cursor: not-allowed;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&:empty {
|
|
109
|
+
display: none;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.label {
|
|
114
|
+
cursor: var(--label-cursor);
|
|
115
|
+
|
|
116
|
+
color: inherit;
|
|
117
|
+
|
|
118
|
+
fieldset:disabled &,
|
|
119
|
+
&:where([data-disabled]) {
|
|
120
|
+
color: var(--color-gray-5);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.error,
|
|
125
|
+
.description {
|
|
126
|
+
display: block;
|
|
127
|
+
|
|
128
|
+
margin: 0;
|
|
129
|
+
padding: 0;
|
|
130
|
+
|
|
131
|
+
line-height: 1.2;
|
|
132
|
+
overflow-wrap: break-word;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.description {
|
|
136
|
+
font-size: var(--input-description-size, calc(var(--font-size-sm) - rem(2px)));
|
|
137
|
+
color: var(--color-dimmed);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.error {
|
|
141
|
+
font-size: var(--input-error-size);
|
|
142
|
+
color: var(--color-error);
|
|
143
|
+
}
|
|
144
144
|
</style>
|
|
@@ -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: {};
|
|
@@ -52,61 +52,61 @@ const style = computed(() => ({
|
|
|
52
52
|
</script>
|
|
53
53
|
|
|
54
54
|
<template>
|
|
55
|
-
<div :style :class='$style.wrapper'>
|
|
56
|
-
<InputLabel
|
|
57
|
-
:data-v-hidden='!label && !$slots.label || null'
|
|
58
|
-
:for='uid'
|
|
59
|
-
:class='$style.label'
|
|
60
|
-
:size
|
|
61
|
-
:required
|
|
62
|
-
>
|
|
63
|
-
<slot name='label'>
|
|
64
|
-
{{ label }}
|
|
65
|
-
</slot>
|
|
66
|
-
</InputLabel>
|
|
67
|
-
|
|
68
|
-
<slot />
|
|
69
|
-
|
|
70
|
-
<p v-if='error' :class='$style.error'>
|
|
71
|
-
<slot name='error'>
|
|
72
|
-
{{ error }}
|
|
73
|
-
</slot>
|
|
74
|
-
</p>
|
|
75
|
-
|
|
76
|
-
<p v-else-if='description || $slots.description' :class='$style.description'>
|
|
77
|
-
<slot name='description'>
|
|
78
|
-
{{ description }}
|
|
79
|
-
</slot>
|
|
80
|
-
</p>
|
|
81
|
-
</div>
|
|
55
|
+
<div :style :class='$style.wrapper'>
|
|
56
|
+
<InputLabel
|
|
57
|
+
:data-v-hidden='!label && !$slots.label || null'
|
|
58
|
+
:for='uid'
|
|
59
|
+
:class='$style.label'
|
|
60
|
+
:size
|
|
61
|
+
:required
|
|
62
|
+
>
|
|
63
|
+
<slot name='label'>
|
|
64
|
+
{{ label }}
|
|
65
|
+
</slot>
|
|
66
|
+
</InputLabel>
|
|
67
|
+
|
|
68
|
+
<slot />
|
|
69
|
+
|
|
70
|
+
<p v-if='error' :class='$style.error'>
|
|
71
|
+
<slot name='error'>
|
|
72
|
+
{{ error }}
|
|
73
|
+
</slot>
|
|
74
|
+
</p>
|
|
75
|
+
|
|
76
|
+
<p v-else-if='description || $slots.description' :class='$style.description'>
|
|
77
|
+
<slot name='description'>
|
|
78
|
+
{{ description }}
|
|
79
|
+
</slot>
|
|
80
|
+
</p>
|
|
81
|
+
</div>
|
|
82
82
|
</template>
|
|
83
83
|
|
|
84
84
|
<style lang="postcss" module>
|
|
85
|
-
.wrapper {
|
|
86
|
-
--input-error-size: calc(var(--font-size-sm) - rem(2px));
|
|
87
|
-
--input-description-size: calc(var(--font-size-sm) - rem(2px));
|
|
88
|
-
|
|
89
|
-
line-height: var(--line-height);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.error,
|
|
93
|
-
.description {
|
|
94
|
-
display: block;
|
|
95
|
-
|
|
96
|
-
margin: 0;
|
|
97
|
-
padding: 0;
|
|
98
|
-
|
|
99
|
-
line-height: 1.2;
|
|
100
|
-
overflow-wrap: break-word;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.error {
|
|
104
|
-
font-size: var(--input-error-size);
|
|
105
|
-
color: var(--color-error);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.description {
|
|
109
|
-
font-size: var(--input-description-size, calc(var(--font-size-sm) - rem(2px)));
|
|
110
|
-
color: var(--color-dimmed);
|
|
111
|
-
}
|
|
85
|
+
.wrapper {
|
|
86
|
+
--input-error-size: calc(var(--font-size-sm) - rem(2px));
|
|
87
|
+
--input-description-size: calc(var(--font-size-sm) - rem(2px));
|
|
88
|
+
|
|
89
|
+
line-height: var(--line-height);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.error,
|
|
93
|
+
.description {
|
|
94
|
+
display: block;
|
|
95
|
+
|
|
96
|
+
margin: 0;
|
|
97
|
+
padding: 0;
|
|
98
|
+
|
|
99
|
+
line-height: 1.2;
|
|
100
|
+
overflow-wrap: break-word;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.error {
|
|
104
|
+
font-size: var(--input-error-size);
|
|
105
|
+
color: var(--color-error);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.description {
|
|
109
|
+
font-size: var(--input-description-size, calc(var(--font-size-sm) - rem(2px)));
|
|
110
|
+
color: var(--color-dimmed);
|
|
111
|
+
}
|
|
112
112
|
</style>
|
|
@@ -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 },
|
|
@@ -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) => {
|
|
@@ -67,8 +69,10 @@ const style = computed(() => useStyleResolver((theme) => {
|
|
|
67
69
|
:target='"target" in linkProps ? linkProps?.target : void 0'
|
|
68
70
|
@click='navigate'
|
|
69
71
|
>
|
|
70
|
-
<span v-if='$slots.leftSection' :class='$style.section' data-position='left'>
|
|
71
|
-
<slot name='leftSection'
|
|
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>
|
|
72
76
|
</span>
|
|
73
77
|
|
|
74
78
|
<Box :class='$style.body' :mod='{ "no-wrap": noWrap }'>
|
|
@@ -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: {};
|
|
@@ -16,40 +16,40 @@ const style = computed(() => ({
|
|
|
16
16
|
</script>
|
|
17
17
|
|
|
18
18
|
<template>
|
|
19
|
-
<Box :is :style :class='$style.root' :mod='[mod, { "with-border": withBorder }]'>
|
|
20
|
-
<slot />
|
|
21
|
-
</Box>
|
|
19
|
+
<Box :is :style :class='$style.root' :mod='[mod, { "with-border": withBorder }]'>
|
|
20
|
+
<slot />
|
|
21
|
+
</Box>
|
|
22
22
|
</template>
|
|
23
23
|
|
|
24
24
|
<style module lang="postcss">
|
|
25
|
-
.root {
|
|
26
|
-
--paper-radius: var(--radius-default);
|
|
27
|
-
--paper-shadow: none;
|
|
28
|
-
|
|
29
|
-
touch-action: manipulation;
|
|
30
|
-
|
|
31
|
-
display: block;
|
|
32
|
-
|
|
33
|
-
border-radius: var(--paper-radius);
|
|
34
|
-
|
|
35
|
-
text-decoration: none;
|
|
36
|
-
|
|
37
|
-
background-color: var(--color-body);
|
|
38
|
-
|
|
39
|
-
outline: 0;
|
|
40
|
-
box-shadow: var(--paper-shadow);
|
|
41
|
-
-webkit-tap-highlight-color: transparent;
|
|
42
|
-
|
|
43
|
-
&:where([data-with-border]) {
|
|
44
|
-
border: rem(1px) solid var(--paper-border-color);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
@mixin light {
|
|
48
|
-
--paper-border-color: var(--color-gray-3);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
@mixin dark {
|
|
52
|
-
--paper-border-color: var(--color-slate-7);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
25
|
+
.root {
|
|
26
|
+
--paper-radius: var(--radius-default);
|
|
27
|
+
--paper-shadow: none;
|
|
28
|
+
|
|
29
|
+
touch-action: manipulation;
|
|
30
|
+
|
|
31
|
+
display: block;
|
|
32
|
+
|
|
33
|
+
border-radius: var(--paper-radius);
|
|
34
|
+
|
|
35
|
+
text-decoration: none;
|
|
36
|
+
|
|
37
|
+
background-color: var(--color-body);
|
|
38
|
+
|
|
39
|
+
outline: 0;
|
|
40
|
+
box-shadow: var(--paper-shadow);
|
|
41
|
+
-webkit-tap-highlight-color: transparent;
|
|
42
|
+
|
|
43
|
+
&:where([data-with-border]) {
|
|
44
|
+
border: rem(1px) solid var(--paper-border-color);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@mixin light {
|
|
48
|
+
--paper-border-color: var(--color-gray-3);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@mixin dark {
|
|
52
|
+
--paper-border-color: var(--color-slate-7);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
55
|
</style>
|
|
@@ -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: {};
|
|
@@ -3,7 +3,7 @@ import type { NuanceColor } from '@nui/types';
|
|
|
3
3
|
export interface ProgressSectionProps extends BoxProps {
|
|
4
4
|
/** Determines whether `aria-*` props should be added to the root element @default `true` */
|
|
5
5
|
withAria?: boolean;
|
|
6
|
-
/**
|
|
6
|
+
/** Color from theme */
|
|
7
7
|
color?: NuanceColor;
|
|
8
8
|
/** If set, the section has stripes @default `false` */
|
|
9
9
|
striped?: boolean;
|
|
@@ -3,7 +3,7 @@ import type { NuanceColor } from '@nui/types';
|
|
|
3
3
|
export interface ProgressSectionProps extends BoxProps {
|
|
4
4
|
/** Determines whether `aria-*` props should be added to the root element @default `true` */
|
|
5
5
|
withAria?: boolean;
|
|
6
|
-
/**
|
|
6
|
+
/** Color from theme */
|
|
7
7
|
color?: NuanceColor;
|
|
8
8
|
/** If set, the section has stripes @default `false` */
|
|
9
9
|
striped?: boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ComboboxData, ComboboxItemExt } from './combobox/index.js';
|
|
2
2
|
import type { TextInputProps } from './input/index.js';
|
|
3
3
|
export interface SelectProps<Value extends string = string, Ext extends ComboboxItemExt = object> extends Omit<TextInputProps, 'modelValue' | 'multiline' | 'resize' | 'is' | 'id'> {
|
|
4
|
+
/** List of options */
|
|
4
5
|
options: ComboboxData<Value, Ext>;
|
|
5
6
|
/** Determines whether the select should be searchable @default `false` */
|
|
6
7
|
searchable?: boolean;
|
|
@@ -19,6 +20,7 @@ export interface SelectProps<Value extends string = string, Ext extends Combobox
|
|
|
19
20
|
/** If set, the clear button is displayed in the right section when the component has value @default `false` */
|
|
20
21
|
/** Icon displayed in the left section by default */
|
|
21
22
|
icon?: string;
|
|
23
|
+
/** Maximum number of options rendered at a time */
|
|
22
24
|
limit?: number;
|
|
23
25
|
/** Input autocomplete attribute */
|
|
24
26
|
autoComplete?: string;
|