nuance-ui 0.2.8 → 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.vue +23 -23
- 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/box.vue +3 -3
- package/dist/runtime/components/breadcrumbs.vue +78 -78
- package/dist/runtime/components/button/button.vue +40 -40
- package/dist/runtime/components/button/unstyled-button.vue +23 -23
- package/dist/runtime/components/calendar/calendar.vue +60 -60
- package/dist/runtime/components/calendar/ui/core/calendar-header.vue +95 -95
- package/dist/runtime/components/calendar/ui/core/calendar-root.vue +3 -3
- package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue +40 -40
- package/dist/runtime/components/calendar/ui/levels/calendar-month.vue +77 -77
- package/dist/runtime/components/calendar/ui/levels/calendar-year.vue +40 -40
- package/dist/runtime/components/card/card-section.vue +3 -3
- package/dist/runtime/components/card/card.vue +3 -3
- package/dist/runtime/components/checkbox/checkbox-card.vue +37 -37
- package/dist/runtime/components/checkbox/checkbox-indicator.vue +117 -117
- package/dist/runtime/components/checkbox/checkbox.vue +139 -139
- package/dist/runtime/components/chip/chip-group.vue +2 -2
- package/dist/runtime/components/chip/chip.vue +200 -200
- 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.vue +21 -21
- package/dist/runtime/components/combobox/combobox-option-list.vue +3 -3
- package/dist/runtime/components/combobox/combobox-option.vue +22 -22
- package/dist/runtime/components/combobox/combobox-options-dropdown.vue +29 -29
- package/dist/runtime/components/combobox/combobox-root.vue +3 -3
- package/dist/runtime/components/combobox/combobox-target.vue +3 -3
- package/dist/runtime/components/container.vue +8 -8
- 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/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.vue +12 -12
- package/dist/runtime/components/files/file-upload-icon.vue +1 -1
- package/dist/runtime/components/input/date-picker.vue +85 -85
- package/dist/runtime/components/input/email-input.vue +19 -19
- package/dist/runtime/components/input/number-input.vue +134 -134
- package/dist/runtime/components/input/password-input.vue +28 -28
- package/dist/runtime/components/input/text-input.vue +35 -35
- package/dist/runtime/components/input/ui/input-inline.vue +105 -105
- package/dist/runtime/components/input/ui/input-wrapper.vue +54 -54
- package/dist/runtime/components/link/link-button.vue +16 -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.vue +132 -132
- package/dist/runtime/components/paper.vue +33 -33
- 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.vue +8 -8
- 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.vue +63 -63
- 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/ui/table-sortable-header.vue +11 -11
- package/dist/runtime/components/tabs/tabs-list.vue +10 -10
- package/dist/runtime/components/tabs/tabs-panel.vue +11 -11
- package/dist/runtime/components/tabs/tabs-root.vue +8 -8
- package/dist/runtime/components/tabs/tabs-tab.vue +22 -22
- package/dist/runtime/components/text.vue +67 -67
- package/dist/runtime/components/textarea.vue +36 -36
- package/dist/runtime/components/title.vue +14 -14
- package/dist/runtime/components/transition.vue +3 -3
- package/dist/runtime/components/tree/_ui/tree-item.vue +128 -129
- package/dist/runtime/components/tree/_ui/tree-root.vue +21 -21
- package/dist/runtime/components/visually-hidden/visually-hidden-input.vue +1 -1
- package/dist/runtime/components/visually-hidden/visually-hidden.vue +9 -9
- package/dist/runtime/styles/dark-theme.css +1 -1
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -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>
|
|
@@ -60,16 +60,16 @@ defineExpose({ files, reset });
|
|
|
60
60
|
</script>
|
|
61
61
|
|
|
62
62
|
<template>
|
|
63
|
-
<Button v-bind='props' @click='open'>
|
|
64
|
-
<template #leftSection>
|
|
65
|
-
<slot name='leftSection'>
|
|
66
|
-
<Icon :name='icon' />
|
|
67
|
-
</slot>
|
|
68
|
-
</template>
|
|
69
|
-
<template v-if='!!$slots.rightSection' #rightSection>
|
|
70
|
-
<slot name='rightSection' />
|
|
71
|
-
</template>
|
|
72
|
-
|
|
73
|
-
<slot>Загрузить файл</slot>
|
|
74
|
-
</Button>
|
|
63
|
+
<Button v-bind='props' @click='open'>
|
|
64
|
+
<template #leftSection>
|
|
65
|
+
<slot name='leftSection'>
|
|
66
|
+
<Icon :name='icon' />
|
|
67
|
+
</slot>
|
|
68
|
+
</template>
|
|
69
|
+
<template v-if='!!$slots.rightSection' #rightSection>
|
|
70
|
+
<slot name='rightSection' />
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<slot>Загрузить файл</slot>
|
|
74
|
+
</Button>
|
|
75
75
|
</template>
|
|
@@ -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>
|
|
@@ -22,23 +22,23 @@ const { icon = "gravity-ui:at", ...rest } = defineProps({
|
|
|
22
22
|
</script>
|
|
23
23
|
|
|
24
24
|
<template>
|
|
25
|
-
<TextInput type='email' :icon v-bind='rest'>
|
|
26
|
-
<template v-if='!!$slots.leftSection' #leftSection>
|
|
27
|
-
<slot name='leftSection' />
|
|
28
|
-
</template>
|
|
29
|
-
|
|
30
|
-
<template v-if='!!$slots.rightSection' #rightSection>
|
|
31
|
-
<slot name='rightSection' />
|
|
32
|
-
</template>
|
|
33
|
-
|
|
34
|
-
<template v-if='!!$slots.label' #label>
|
|
35
|
-
<slot name='label' />
|
|
36
|
-
</template>
|
|
37
|
-
<template v-if='!!$slots.error' #error>
|
|
38
|
-
<slot name='error' />
|
|
39
|
-
</template>
|
|
40
|
-
<template v-if='!!$slots.description' #description>
|
|
41
|
-
<slot name='description' />
|
|
42
|
-
</template>
|
|
43
|
-
</TextInput>
|
|
25
|
+
<TextInput type='email' :icon v-bind='rest'>
|
|
26
|
+
<template v-if='!!$slots.leftSection' #leftSection>
|
|
27
|
+
<slot name='leftSection' />
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<template v-if='!!$slots.rightSection' #rightSection>
|
|
31
|
+
<slot name='rightSection' />
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<template v-if='!!$slots.label' #label>
|
|
35
|
+
<slot name='label' />
|
|
36
|
+
</template>
|
|
37
|
+
<template v-if='!!$slots.error' #error>
|
|
38
|
+
<slot name='error' />
|
|
39
|
+
</template>
|
|
40
|
+
<template v-if='!!$slots.description' #description>
|
|
41
|
+
<slot name='description' />
|
|
42
|
+
</template>
|
|
43
|
+
</TextInput>
|
|
44
44
|
</template>
|