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
|
@@ -42,7 +42,7 @@ const {
|
|
|
42
42
|
withSeconds: { type: Boolean, required: false }
|
|
43
43
|
});
|
|
44
44
|
defineEmits(["open", "close", "select", "prev", "level", "next"]);
|
|
45
|
-
const model = defineModel({ type: [String, Date] });
|
|
45
|
+
const model = defineModel({ type: [String, Date, null] });
|
|
46
46
|
const date = computed({
|
|
47
47
|
get: () => model.value ? format(model.value, "YYYY-MM-DD") : "",
|
|
48
48
|
set: (value) => {
|
|
@@ -90,72 +90,72 @@ const isClearable = computed(() => clearable && !props.disabled && !props.readon
|
|
|
90
90
|
</script>
|
|
91
91
|
|
|
92
92
|
<template>
|
|
93
|
-
<Popover :disabled @open='$emit("open")' @close='$emit("close")'>
|
|
94
|
-
<PopoverTarget>
|
|
95
|
-
<ButtonInput v-bind='props' :right-section-p-e>
|
|
96
|
-
<template #leftSection>
|
|
97
|
-
<slot name='leftSection'>
|
|
98
|
-
<Icon name='gravity-ui:calendar' />
|
|
99
|
-
</slot>
|
|
100
|
-
</template>
|
|
101
|
-
|
|
102
|
-
<template
|
|
103
|
-
v-if='!$slots.rightSection && isClearable || !!$slots.rightSection'
|
|
104
|
-
#rightSection
|
|
105
|
-
>
|
|
106
|
-
<slot name='rightSection'>
|
|
107
|
-
<ActionIcon
|
|
108
|
-
icon='gravity-ui:xmark'
|
|
109
|
-
variant='subtle'
|
|
110
|
-
color='gray'
|
|
111
|
-
size='sm'
|
|
112
|
-
@click.stop='model = ""'
|
|
113
|
-
/>
|
|
114
|
-
</slot>
|
|
115
|
-
</template>
|
|
116
|
-
|
|
117
|
-
<template #default>
|
|
118
|
-
{{ visible }}
|
|
119
|
-
</template>
|
|
120
|
-
|
|
121
|
-
<template v-if='!!$slots.label' #label>
|
|
122
|
-
<slot name='label' />
|
|
123
|
-
</template>
|
|
124
|
-
<template v-if='!!$slots.error' #error>
|
|
125
|
-
<slot name='error' />
|
|
126
|
-
</template>
|
|
127
|
-
<template v-if='!!$slots.description' #description>
|
|
128
|
-
<slot name='description' />
|
|
129
|
-
</template>
|
|
130
|
-
</ButtonInput>
|
|
131
|
-
</PopoverTarget>
|
|
132
|
-
<PopoverDropdown>
|
|
133
|
-
<Calendar
|
|
134
|
-
v-model:value='date'
|
|
135
|
-
v-bind='calendarProps'
|
|
136
|
-
:disabled='props.disabled'
|
|
137
|
-
:readonly='props.readonly'
|
|
138
|
-
@next='$emit("next")'
|
|
139
|
-
@prev='$emit("prev")'
|
|
140
|
-
@level='$emit("level")'
|
|
141
|
-
@select='(d) => $emit("select", d)'
|
|
142
|
-
/>
|
|
143
|
-
<TimePicker
|
|
144
|
-
v-model='time'
|
|
145
|
-
v-bind='timePickerProps'
|
|
146
|
-
:disabled='props.disabled'
|
|
147
|
-
:readonly='props.readonly'
|
|
148
|
-
:with-seconds
|
|
149
|
-
:clearable
|
|
150
|
-
/>
|
|
151
|
-
</PopoverDropdown>
|
|
152
|
-
</Popover>
|
|
93
|
+
<Popover :disabled @open='$emit("open")' @close='$emit("close")'>
|
|
94
|
+
<PopoverTarget>
|
|
95
|
+
<ButtonInput v-bind='props' :right-section-p-e>
|
|
96
|
+
<template #leftSection>
|
|
97
|
+
<slot name='leftSection'>
|
|
98
|
+
<Icon name='gravity-ui:calendar' />
|
|
99
|
+
</slot>
|
|
100
|
+
</template>
|
|
101
|
+
|
|
102
|
+
<template
|
|
103
|
+
v-if='!$slots.rightSection && isClearable || !!$slots.rightSection'
|
|
104
|
+
#rightSection
|
|
105
|
+
>
|
|
106
|
+
<slot name='rightSection'>
|
|
107
|
+
<ActionIcon
|
|
108
|
+
icon='gravity-ui:xmark'
|
|
109
|
+
variant='subtle'
|
|
110
|
+
color='gray'
|
|
111
|
+
size='sm'
|
|
112
|
+
@click.stop='model = ""'
|
|
113
|
+
/>
|
|
114
|
+
</slot>
|
|
115
|
+
</template>
|
|
116
|
+
|
|
117
|
+
<template #default>
|
|
118
|
+
{{ visible }}
|
|
119
|
+
</template>
|
|
120
|
+
|
|
121
|
+
<template v-if='!!$slots.label' #label>
|
|
122
|
+
<slot name='label' />
|
|
123
|
+
</template>
|
|
124
|
+
<template v-if='!!$slots.error' #error>
|
|
125
|
+
<slot name='error' />
|
|
126
|
+
</template>
|
|
127
|
+
<template v-if='!!$slots.description' #description>
|
|
128
|
+
<slot name='description' />
|
|
129
|
+
</template>
|
|
130
|
+
</ButtonInput>
|
|
131
|
+
</PopoverTarget>
|
|
132
|
+
<PopoverDropdown>
|
|
133
|
+
<Calendar
|
|
134
|
+
v-model:value='date'
|
|
135
|
+
v-bind='calendarProps'
|
|
136
|
+
:disabled='props.disabled'
|
|
137
|
+
:readonly='props.readonly'
|
|
138
|
+
@next='$emit("next")'
|
|
139
|
+
@prev='$emit("prev")'
|
|
140
|
+
@level='$emit("level")'
|
|
141
|
+
@select='(d) => $emit("select", d)'
|
|
142
|
+
/>
|
|
143
|
+
<TimePicker
|
|
144
|
+
v-model='time'
|
|
145
|
+
v-bind='timePickerProps'
|
|
146
|
+
:disabled='props.disabled'
|
|
147
|
+
:readonly='props.readonly'
|
|
148
|
+
:with-seconds
|
|
149
|
+
:clearable
|
|
150
|
+
/>
|
|
151
|
+
</PopoverDropdown>
|
|
152
|
+
</Popover>
|
|
153
153
|
</template>
|
|
154
154
|
|
|
155
155
|
<style lang="postcss" module>
|
|
156
|
-
.list {
|
|
157
|
-
display: flex;
|
|
158
|
-
flex-wrap: wrap;
|
|
159
|
-
gap: .25rem;
|
|
160
|
-
}
|
|
156
|
+
.list {
|
|
157
|
+
display: flex;
|
|
158
|
+
flex-wrap: wrap;
|
|
159
|
+
gap: .25rem;
|
|
160
|
+
}
|
|
161
161
|
</style>
|
|
@@ -20,7 +20,7 @@ export interface DatePickerProps extends ButtonInputProps, Pick<TimePickerProps,
|
|
|
20
20
|
type __VLS_Props = DatePickerProps;
|
|
21
21
|
type __VLS_ModelProps = {
|
|
22
22
|
/** ISO string */
|
|
23
|
-
modelValue?: string | Date;
|
|
23
|
+
modelValue?: string | Date | null;
|
|
24
24
|
};
|
|
25
25
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
26
26
|
declare var __VLS_24: {}, __VLS_32: {}, __VLS_43: {}, __VLS_46: {}, __VLS_49: {};
|
|
@@ -39,7 +39,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
39
39
|
select: (date: import("./calendar/index.js").Selection) => any;
|
|
40
40
|
close: () => any;
|
|
41
41
|
next: () => any;
|
|
42
|
-
"update:modelValue": (value: string | Date | undefined) => any;
|
|
42
|
+
"update:modelValue": (value: string | Date | null | undefined) => any;
|
|
43
43
|
prev: () => any;
|
|
44
44
|
level: () => any;
|
|
45
45
|
open: () => any;
|
|
@@ -47,7 +47,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
47
47
|
onSelect?: ((date: import("./calendar/index.js").Selection) => any) | undefined;
|
|
48
48
|
onClose?: (() => any) | undefined;
|
|
49
49
|
onNext?: (() => any) | undefined;
|
|
50
|
-
"onUpdate:modelValue"?: ((value: string | Date | undefined) => any) | undefined;
|
|
50
|
+
"onUpdate:modelValue"?: ((value: string | Date | null | undefined) => any) | undefined;
|
|
51
51
|
onPrev?: (() => any) | undefined;
|
|
52
52
|
onLevel?: (() => any) | undefined;
|
|
53
53
|
onOpen?: (() => any) | undefined;
|
|
@@ -17,15 +17,15 @@ const close = useDialogState();
|
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
19
|
<template>
|
|
20
|
-
<ClientOnly>
|
|
21
|
-
<ActionIcon
|
|
22
|
-
:icon
|
|
23
|
-
:variant
|
|
24
|
-
tabindex='0'
|
|
25
|
-
v-bind='props'
|
|
26
|
-
@click='close'
|
|
27
|
-
>
|
|
28
|
-
<slot />
|
|
29
|
-
</ActionIcon>
|
|
30
|
-
</ClientOnly>
|
|
20
|
+
<ClientOnly>
|
|
21
|
+
<ActionIcon
|
|
22
|
+
:icon
|
|
23
|
+
:variant
|
|
24
|
+
tabindex='0'
|
|
25
|
+
v-bind='props'
|
|
26
|
+
@click='close'
|
|
27
|
+
>
|
|
28
|
+
<slot />
|
|
29
|
+
</ActionIcon>
|
|
30
|
+
</ClientOnly>
|
|
31
31
|
</template>
|
|
@@ -8,9 +8,9 @@ const { is = "header", mod } = defineProps({
|
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<template>
|
|
11
|
-
<ClientOnly>
|
|
12
|
-
<Box :is :mod :class='css.header'>
|
|
13
|
-
<slot />
|
|
14
|
-
</Box>
|
|
15
|
-
</ClientOnly>
|
|
11
|
+
<ClientOnly>
|
|
12
|
+
<Box :is :mod :class='css.header'>
|
|
13
|
+
<slot />
|
|
14
|
+
</Box>
|
|
15
|
+
</ClientOnly>
|
|
16
16
|
</template>
|
|
@@ -20,9 +20,9 @@ const { size = "md", lh = "1", ...props } = defineProps({
|
|
|
20
20
|
</script>
|
|
21
21
|
|
|
22
22
|
<template>
|
|
23
|
-
<ClientOnly>
|
|
24
|
-
<Title :class='css.title' :lh :size v-bind='props'>
|
|
25
|
-
<slot />
|
|
26
|
-
</Title>
|
|
27
|
-
</ClientOnly>
|
|
23
|
+
<ClientOnly>
|
|
24
|
+
<Title :class='css.title' :lh :size v-bind='props'>
|
|
25
|
+
<slot />
|
|
26
|
+
</Title>
|
|
27
|
+
</ClientOnly>
|
|
28
28
|
</template>
|
|
@@ -41,19 +41,19 @@ const transition = computed(() => {
|
|
|
41
41
|
</script>
|
|
42
42
|
|
|
43
43
|
<template>
|
|
44
|
-
<DialogRoot
|
|
45
|
-
v-model:open='opened'
|
|
46
|
-
:mod='[{ position }, mod]'
|
|
47
|
-
:root-class='css.root'
|
|
48
|
-
:class='css.content'
|
|
49
|
-
:within-portal
|
|
50
|
-
:without-overlay
|
|
51
|
-
:close-on-click-outside
|
|
52
|
-
:transition
|
|
53
|
-
v-bind='rest'
|
|
54
|
-
@open='$emit("open")'
|
|
55
|
-
@close='$emit("close")'
|
|
56
|
-
>
|
|
57
|
-
<slot />
|
|
58
|
-
</DialogRoot>
|
|
44
|
+
<DialogRoot
|
|
45
|
+
v-model:open='opened'
|
|
46
|
+
:mod='[{ position }, mod]'
|
|
47
|
+
:root-class='css.root'
|
|
48
|
+
:class='css.content'
|
|
49
|
+
:within-portal
|
|
50
|
+
:without-overlay
|
|
51
|
+
:close-on-click-outside
|
|
52
|
+
:transition
|
|
53
|
+
v-bind='rest'
|
|
54
|
+
@open='$emit("open")'
|
|
55
|
+
@close='$emit("close")'
|
|
56
|
+
>
|
|
57
|
+
<slot />
|
|
58
|
+
</DialogRoot>
|
|
59
59
|
</template>
|
|
@@ -5,20 +5,22 @@ export interface FileUploadButtonProps<M extends boolean> extends ButtonProps, U
|
|
|
5
5
|
/** Icon passed to leftSection */
|
|
6
6
|
icon?: string;
|
|
7
7
|
/**
|
|
8
|
+
* Allows selecting multiple files
|
|
8
9
|
* @default false
|
|
9
10
|
*/
|
|
10
11
|
multiple?: MaybeRef<M>;
|
|
11
12
|
/**
|
|
13
|
+
* Accepted file types
|
|
12
14
|
* @default '*'
|
|
13
15
|
*/
|
|
14
16
|
accept?: MaybeRef<string>;
|
|
15
17
|
/**
|
|
16
|
-
*
|
|
18
|
+
* Resets selected files when the dialog opens
|
|
17
19
|
* @default false
|
|
18
20
|
*/
|
|
19
21
|
reset?: MaybeRef<boolean>;
|
|
20
22
|
/**
|
|
21
|
-
*
|
|
23
|
+
* Selects directories instead of files
|
|
22
24
|
* @see [HTMLInputElement webkitdirectory](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/webkitdirectory)
|
|
23
25
|
* @default false
|
|
24
26
|
*/
|
|
@@ -5,20 +5,22 @@ export interface FileUploadButtonProps<M extends boolean> extends ButtonProps, U
|
|
|
5
5
|
/** Icon passed to leftSection */
|
|
6
6
|
icon?: string;
|
|
7
7
|
/**
|
|
8
|
+
* Allows selecting multiple files
|
|
8
9
|
* @default false
|
|
9
10
|
*/
|
|
10
11
|
multiple?: MaybeRef<M>;
|
|
11
12
|
/**
|
|
13
|
+
* Accepted file types
|
|
12
14
|
* @default '*'
|
|
13
15
|
*/
|
|
14
16
|
accept?: MaybeRef<string>;
|
|
15
17
|
/**
|
|
16
|
-
*
|
|
18
|
+
* Resets selected files when the dialog opens
|
|
17
19
|
* @default false
|
|
18
20
|
*/
|
|
19
21
|
reset?: MaybeRef<boolean>;
|
|
20
22
|
/**
|
|
21
|
-
*
|
|
23
|
+
* Selects directories instead of files
|
|
22
24
|
* @see [HTMLInputElement webkitdirectory](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/webkitdirectory)
|
|
23
25
|
* @default false
|
|
24
26
|
*/
|
|
@@ -3,20 +3,22 @@ import type { MaybeRef } from 'vue';
|
|
|
3
3
|
import type { ActionIconProps } from '../action-icon/action-icon.vue.js';
|
|
4
4
|
export interface FileUploadIconProps<M extends boolean> extends ActionIconProps, UseFileDialogOptions {
|
|
5
5
|
/**
|
|
6
|
+
* Allows selecting multiple files
|
|
6
7
|
* @default false
|
|
7
8
|
*/
|
|
8
9
|
multiple?: MaybeRef<M>;
|
|
9
10
|
/**
|
|
11
|
+
* Accepted file types
|
|
10
12
|
* @default '*'
|
|
11
13
|
*/
|
|
12
14
|
accept?: MaybeRef<string>;
|
|
13
15
|
/**
|
|
14
|
-
*
|
|
16
|
+
* Resets selected files when the dialog opens
|
|
15
17
|
* @default false
|
|
16
18
|
*/
|
|
17
19
|
reset?: MaybeRef<boolean>;
|
|
18
20
|
/**
|
|
19
|
-
*
|
|
21
|
+
* Selects directories instead of files
|
|
20
22
|
* @see [HTMLInputElement webkitdirectory](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/webkitdirectory)
|
|
21
23
|
* @default false
|
|
22
24
|
*/
|
|
@@ -3,20 +3,22 @@ import type { MaybeRef } from 'vue';
|
|
|
3
3
|
import type { ActionIconProps } from '../action-icon/action-icon.vue.js';
|
|
4
4
|
export interface FileUploadIconProps<M extends boolean> extends ActionIconProps, UseFileDialogOptions {
|
|
5
5
|
/**
|
|
6
|
+
* Allows selecting multiple files
|
|
6
7
|
* @default false
|
|
7
8
|
*/
|
|
8
9
|
multiple?: MaybeRef<M>;
|
|
9
10
|
/**
|
|
11
|
+
* Accepted file types
|
|
10
12
|
* @default '*'
|
|
11
13
|
*/
|
|
12
14
|
accept?: MaybeRef<string>;
|
|
13
15
|
/**
|
|
14
|
-
*
|
|
16
|
+
* Resets selected files when the dialog opens
|
|
15
17
|
* @default false
|
|
16
18
|
*/
|
|
17
19
|
reset?: MaybeRef<boolean>;
|
|
18
20
|
/**
|
|
19
|
-
*
|
|
21
|
+
* Selects directories instead of files
|
|
20
22
|
* @see [HTMLInputElement webkitdirectory](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/webkitdirectory)
|
|
21
23
|
* @default false
|
|
22
24
|
*/
|
|
@@ -93,94 +93,94 @@ const visible = computed(() => {
|
|
|
93
93
|
</script>
|
|
94
94
|
|
|
95
95
|
<template>
|
|
96
|
-
<Popover
|
|
97
|
-
:disabled='props?.disabled || props?.readonly'
|
|
98
|
-
@open='$emit("open")'
|
|
99
|
-
@close='$emit("close")'
|
|
100
|
-
>
|
|
101
|
-
<PopoverTarget>
|
|
102
|
-
<ButtonInput
|
|
103
|
-
v-bind='props'
|
|
104
|
-
v-model='model'
|
|
105
|
-
:multiline='mode === "multiple"'
|
|
106
|
-
>
|
|
107
|
-
<template #leftSection>
|
|
108
|
-
<slot name='leftSection'>
|
|
109
|
-
<Icon name='gravity-ui:calendar' />
|
|
110
|
-
</slot>
|
|
111
|
-
</template>
|
|
112
|
-
<template v-if='!!$slots.rightSection' #rightSection>
|
|
113
|
-
<slot name='rightSection' />
|
|
114
|
-
</template>
|
|
115
|
-
|
|
116
|
-
<div v-if='mode === "multiple"' :class='$style.list'>
|
|
117
|
-
<Badge
|
|
118
|
-
v-for='(date, ix) in visible'
|
|
119
|
-
:key='date'
|
|
120
|
-
variant='light'
|
|
121
|
-
color='gray'
|
|
122
|
-
>
|
|
123
|
-
{{ date }}
|
|
124
|
-
|
|
125
|
-
<template #rightSection>
|
|
126
|
-
<ActionIcon
|
|
127
|
-
icon='gravity-ui:xmark'
|
|
128
|
-
variant='subtle'
|
|
129
|
-
color='gray'
|
|
130
|
-
size='xs'
|
|
96
|
+
<Popover
|
|
97
|
+
:disabled='props?.disabled || props?.readonly'
|
|
98
|
+
@open='$emit("open")'
|
|
99
|
+
@close='$emit("close")'
|
|
100
|
+
>
|
|
101
|
+
<PopoverTarget>
|
|
102
|
+
<ButtonInput
|
|
103
|
+
v-bind='props'
|
|
104
|
+
v-model='model'
|
|
105
|
+
:multiline='mode === "multiple"'
|
|
106
|
+
>
|
|
107
|
+
<template #leftSection>
|
|
108
|
+
<slot name='leftSection'>
|
|
109
|
+
<Icon name='gravity-ui:calendar' />
|
|
110
|
+
</slot>
|
|
111
|
+
</template>
|
|
112
|
+
<template v-if='!!$slots.rightSection' #rightSection>
|
|
113
|
+
<slot name='rightSection' />
|
|
114
|
+
</template>
|
|
115
|
+
|
|
116
|
+
<div v-if='mode === "multiple"' :class='$style.list'>
|
|
117
|
+
<Badge
|
|
118
|
+
v-for='(date, ix) in visible'
|
|
119
|
+
:key='date'
|
|
120
|
+
variant='light'
|
|
121
|
+
color='gray'
|
|
122
|
+
>
|
|
123
|
+
{{ date }}
|
|
124
|
+
|
|
125
|
+
<template #rightSection>
|
|
126
|
+
<ActionIcon
|
|
127
|
+
icon='gravity-ui:xmark'
|
|
128
|
+
variant='subtle'
|
|
129
|
+
color='gray'
|
|
130
|
+
size='xs'
|
|
131
131
|
@click.stop.prevent='() => {
|
|
132
132
|
model = model?.filter((_, _ix) => _ix !== ix);
|
|
133
|
-
}'
|
|
134
|
-
/>
|
|
135
|
-
</template>
|
|
136
|
-
</Badge>
|
|
137
|
-
</div>
|
|
138
|
-
<template v-else>
|
|
139
|
-
{{ visible }}
|
|
140
|
-
</template>
|
|
141
|
-
|
|
142
|
-
<template v-if='!!$slots.label' #label>
|
|
143
|
-
<slot name='label' />
|
|
144
|
-
</template>
|
|
145
|
-
<template v-if='!!$slots.error' #error>
|
|
146
|
-
<slot name='error' />
|
|
147
|
-
</template>
|
|
148
|
-
<template v-if='!!$slots.description' #description>
|
|
149
|
-
<slot name='description' />
|
|
150
|
-
</template>
|
|
151
|
-
</ButtonInput>
|
|
152
|
-
</PopoverTarget>
|
|
153
|
-
<PopoverDropdown>
|
|
154
|
-
<Calendar
|
|
155
|
-
v-model:value='model'
|
|
156
|
-
:mode
|
|
157
|
-
:fixed-weeks
|
|
158
|
-
:with-cell-spacing
|
|
159
|
-
:exclude-date
|
|
160
|
-
:hide-outside-dates
|
|
161
|
-
:highlight-today
|
|
162
|
-
:max-date
|
|
163
|
-
:min-date
|
|
164
|
-
:min-level
|
|
165
|
-
:max-level
|
|
166
|
-
:number-of-months
|
|
167
|
-
:prev-disabled
|
|
168
|
-
:next-disabled
|
|
169
|
-
:weekday-format
|
|
170
|
-
:with-week-numbers
|
|
171
|
-
:config
|
|
172
|
-
@prev='$emit("prev")'
|
|
173
|
-
@next='$emit("next")'
|
|
174
|
-
@select='(d) => $emit("select", d)'
|
|
175
|
-
/>
|
|
176
|
-
</PopoverDropdown>
|
|
177
|
-
</Popover>
|
|
133
|
+
}'
|
|
134
|
+
/>
|
|
135
|
+
</template>
|
|
136
|
+
</Badge>
|
|
137
|
+
</div>
|
|
138
|
+
<template v-else>
|
|
139
|
+
{{ visible }}
|
|
140
|
+
</template>
|
|
141
|
+
|
|
142
|
+
<template v-if='!!$slots.label' #label>
|
|
143
|
+
<slot name='label' />
|
|
144
|
+
</template>
|
|
145
|
+
<template v-if='!!$slots.error' #error>
|
|
146
|
+
<slot name='error' />
|
|
147
|
+
</template>
|
|
148
|
+
<template v-if='!!$slots.description' #description>
|
|
149
|
+
<slot name='description' />
|
|
150
|
+
</template>
|
|
151
|
+
</ButtonInput>
|
|
152
|
+
</PopoverTarget>
|
|
153
|
+
<PopoverDropdown>
|
|
154
|
+
<Calendar
|
|
155
|
+
v-model:value='model'
|
|
156
|
+
:mode
|
|
157
|
+
:fixed-weeks
|
|
158
|
+
:with-cell-spacing
|
|
159
|
+
:exclude-date
|
|
160
|
+
:hide-outside-dates
|
|
161
|
+
:highlight-today
|
|
162
|
+
:max-date
|
|
163
|
+
:min-date
|
|
164
|
+
:min-level
|
|
165
|
+
:max-level
|
|
166
|
+
:number-of-months
|
|
167
|
+
:prev-disabled
|
|
168
|
+
:next-disabled
|
|
169
|
+
:weekday-format
|
|
170
|
+
:with-week-numbers
|
|
171
|
+
:config
|
|
172
|
+
@prev='$emit("prev")'
|
|
173
|
+
@next='$emit("next")'
|
|
174
|
+
@select='(d) => $emit("select", d)'
|
|
175
|
+
/>
|
|
176
|
+
</PopoverDropdown>
|
|
177
|
+
</Popover>
|
|
178
178
|
</template>
|
|
179
179
|
|
|
180
180
|
<style lang="postcss" module>
|
|
181
|
-
.list {
|
|
182
|
-
display: flex;
|
|
183
|
-
flex-wrap: wrap;
|
|
184
|
-
gap: .25rem;
|
|
185
|
-
}
|
|
181
|
+
.list {
|
|
182
|
+
display: flex;
|
|
183
|
+
flex-wrap: wrap;
|
|
184
|
+
gap: .25rem;
|
|
185
|
+
}
|
|
186
186
|
</style>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { TextInputProps } from './index.js';
|
|
2
|
-
declare var __VLS_9: {},
|
|
2
|
+
declare var __VLS_9: {}, __VLS_12: {}, __VLS_15: {}, __VLS_18: {}, __VLS_21: {};
|
|
3
3
|
type __VLS_Slots = {} & {
|
|
4
4
|
leftSection?: (props: typeof __VLS_9) => any;
|
|
5
5
|
} & {
|
|
6
|
-
rightSection?: (props: typeof
|
|
6
|
+
rightSection?: (props: typeof __VLS_12) => any;
|
|
7
7
|
} & {
|
|
8
|
-
label?: (props: typeof
|
|
8
|
+
label?: (props: typeof __VLS_15) => any;
|
|
9
9
|
} & {
|
|
10
|
-
error?: (props: typeof
|
|
10
|
+
error?: (props: typeof __VLS_18) => any;
|
|
11
11
|
} & {
|
|
12
|
-
description?: (props: typeof
|
|
12
|
+
description?: (props: typeof __VLS_21) => any;
|
|
13
13
|
};
|
|
14
14
|
declare const __VLS_base: import("vue").DefineComponent<TextInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextInputProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
15
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|