nuance-ui 0.1.62 → 0.2.1
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/module.mjs +11 -6
- package/dist/runtime/components/action-icon/action-icon-section.vue +3 -3
- package/dist/runtime/components/action-icon/action-icon.vue +22 -22
- package/dist/runtime/components/alert.vue +128 -128
- 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-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/avatar/avatar-group.vue +3 -3
- package/dist/runtime/components/avatar/avatar.vue +14 -14
- package/dist/runtime/components/background-image.vue +18 -18
- package/dist/runtime/components/badge.vue +160 -159
- package/dist/runtime/components/box.vue +3 -3
- package/dist/runtime/components/breadcrumbs.vue +78 -78
- package/dist/runtime/components/button/button-group.vue +3 -3
- package/dist/runtime/components/button/button.vue +37 -37
- 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-cell.vue +115 -115
- 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 +41 -37
- package/dist/runtime/components/calendar/ui/levels/calendar-month.vue +77 -77
- package/dist/runtime/components/calendar/ui/levels/calendar-year.vue +41 -41
- 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 +36 -36
- package/dist/runtime/components/checkbox/checkbox-group.vue +16 -16
- package/dist/runtime/components/checkbox/checkbox-indicator.vue +116 -116
- package/dist/runtime/components/checkbox/checkbox.vue +140 -140
- 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 +26 -26
- package/dist/runtime/components/combobox/combobox-options-dropdown.vue +28 -28
- 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.vue +65 -65
- 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-root.vue +20 -20
- 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 +21 -21
- package/dist/runtime/components/input/number-input.vue +132 -132
- package/dist/runtime/components/input/password-input.vue +28 -28
- package/dist/runtime/components/input/text-input.vue +33 -33
- package/dist/runtime/components/input/ui/button-input.vue +64 -64
- package/dist/runtime/components/input/ui/input-base.vue +283 -283
- package/dist/runtime/components/input/ui/input-inline.vue +105 -105
- package/dist/runtime/components/input/ui/input-label.vue +4 -4
- package/dist/runtime/components/input/ui/input-wrapper.vue +54 -54
- package/dist/runtime/components/input/ui/spin-input.vue +69 -69
- 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/loader/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 +130 -130
- package/dist/runtime/components/paper.vue +33 -33
- package/dist/runtime/components/popover/popover-dropdown.vue +70 -69
- 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/roving-focus/roving-focus.vue +3 -3
- package/dist/runtime/components/select/select.vue +59 -59
- package/dist/runtime/components/table/table.d.ts +30 -30
- package/dist/runtime/components/table/ui/table-sort-icon.vue +1 -1
- package/dist/runtime/components/table/ui/table-sortable-header.vue +11 -11
- package/dist/runtime/components/table/ui/table.vue +295 -295
- 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 +20 -20
- package/dist/runtime/components/text.vue +67 -67
- package/dist/runtime/components/textarea.vue +34 -34
- package/dist/runtime/components/time-picker/time-picker.vue +230 -230
- package/dist/runtime/components/title.vue +14 -14
- package/dist/runtime/components/transition/transition.vue +3 -3
- package/dist/runtime/components/tree/_ui/tree-item.vue +129 -128
- package/dist/runtime/components/tree/_ui/tree-root.vue +21 -21
- package/dist/runtime/components/tree/tree.vue +20 -20
- 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/helpers/date/create-months.js +1 -1
- package/dist/runtime/modals/_confirm-modal/confirm-modal.vue +31 -31
- package/dist/runtime/modals/modals-provider.vue +10 -10
- package/dist/runtime/utils/color-functions/get-gradient.js +1 -1
- package/dist/runtime/utils/{parse-theme-color → color-functions}/parse-theme-color.js +1 -1
- package/dist/runtime/utils/{vars-resolver/create-variant-color-resolver.js → create-variant-color-resolver.js} +3 -3
- package/dist/runtime/utils/{get-size/get-size.js → get-size.js} +2 -2
- package/dist/runtime/utils/index.d.ts +3 -5
- package/dist/runtime/utils/index.js +3 -5
- package/package.json +11 -11
- package/dist/runtime/server/tsconfig.json +0 -3
- package/dist/runtime/utils/chunk.d.ts +0 -12
- package/dist/runtime/utils/chunk.js +0 -6
- package/dist/runtime/utils/get-safe-id.d.ts +0 -1
- package/dist/runtime/utils/get-safe-id.js +0 -8
- /package/dist/runtime/utils/{get-color-var.d.ts → color-functions/get-color-var.d.ts} +0 -0
- /package/dist/runtime/utils/{get-color-var.js → color-functions/get-color-var.js} +0 -0
- /package/dist/runtime/utils/{parse-theme-color → color-functions}/parse-theme-color.d.ts +0 -0
- /package/dist/runtime/utils/{vars-resolver/create-variant-color-resolver.d.ts → create-variant-color-resolver.d.ts} +0 -0
- /package/dist/runtime/utils/{get-size/get-size.d.ts → get-size.d.ts} +0 -0
|
@@ -20,14 +20,14 @@ const _mod = computed(() => [{ fluid }, mod]);
|
|
|
20
20
|
</script>
|
|
21
21
|
|
|
22
22
|
<template>
|
|
23
|
-
<Box
|
|
24
|
-
:is
|
|
25
|
-
:style
|
|
26
|
-
:mod='_mod'
|
|
27
|
-
:class='$style.root'
|
|
28
|
-
>
|
|
29
|
-
<slot />
|
|
30
|
-
</Box>
|
|
23
|
+
<Box
|
|
24
|
+
:is
|
|
25
|
+
:style
|
|
26
|
+
:mod='_mod'
|
|
27
|
+
:class='$style.root'
|
|
28
|
+
>
|
|
29
|
+
<slot />
|
|
30
|
+
</Box>
|
|
31
31
|
</template>
|
|
32
32
|
|
|
33
33
|
<style module>
|
|
@@ -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>
|
|
@@ -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>
|
|
@@ -74,24 +74,24 @@ const style = computed(() => ({
|
|
|
74
74
|
</script>
|
|
75
75
|
|
|
76
76
|
<template>
|
|
77
|
-
<ClientOnly>
|
|
78
|
-
<Teleport :disabled='!withinPortal' :to='portalTarget'>
|
|
79
|
-
<Box
|
|
80
|
-
is='dialog'
|
|
81
|
-
ref='dialogRef'
|
|
82
|
-
:class='[css.root, rootClass]'
|
|
83
|
-
:mod='[{ "without-overlay": withoutOverlay }, mod]'
|
|
84
|
-
:style
|
|
85
|
-
@click='overlayClick'
|
|
86
|
-
@close='$emit("close")'
|
|
87
|
-
@cancel.prevent='opened = false'
|
|
88
|
-
>
|
|
89
|
-
<NTransition :name='transition'>
|
|
90
|
-
<Box is='section' v-if='opened' :class='css.content' v-bind='$attrs'>
|
|
91
|
-
<slot />
|
|
92
|
-
</Box>
|
|
93
|
-
</NTransition>
|
|
94
|
-
</Box>
|
|
95
|
-
</Teleport>
|
|
96
|
-
</ClientOnly>
|
|
77
|
+
<ClientOnly>
|
|
78
|
+
<Teleport :disabled='!withinPortal' :to='portalTarget'>
|
|
79
|
+
<Box
|
|
80
|
+
is='dialog'
|
|
81
|
+
ref='dialogRef'
|
|
82
|
+
:class='[css.root, rootClass]'
|
|
83
|
+
:mod='[{ "without-overlay": withoutOverlay }, mod]'
|
|
84
|
+
:style
|
|
85
|
+
@click='overlayClick'
|
|
86
|
+
@close='$emit("close")'
|
|
87
|
+
@cancel.prevent='opened = false'
|
|
88
|
+
>
|
|
89
|
+
<NTransition :name='transition'>
|
|
90
|
+
<Box is='section' v-if='opened' :class='css.content' v-bind='$attrs'>
|
|
91
|
+
<slot />
|
|
92
|
+
</Box>
|
|
93
|
+
</NTransition>
|
|
94
|
+
</Box>
|
|
95
|
+
</Teleport>
|
|
96
|
+
</ClientOnly>
|
|
97
97
|
</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>
|
|
@@ -21,25 +21,25 @@ const props = defineProps({
|
|
|
21
21
|
</script>
|
|
22
22
|
|
|
23
23
|
<template>
|
|
24
|
-
<TextInput type='email' v-bind='props'>
|
|
25
|
-
<template #leftSection>
|
|
26
|
-
<slot name='leftSection'>
|
|
27
|
-
<Icon name='gravity-ui:at' />
|
|
28
|
-
</slot>
|
|
29
|
-
</template>
|
|
30
|
-
|
|
31
|
-
<template v-if='!!$slots.rightSection' #rightSection>
|
|
32
|
-
<slot name='rightSection' />
|
|
33
|
-
</template>
|
|
34
|
-
|
|
35
|
-
<template v-if='!!$slots.label' #label>
|
|
36
|
-
<slot name='label' />
|
|
37
|
-
</template>
|
|
38
|
-
<template v-if='!!$slots.error' #error>
|
|
39
|
-
<slot name='error' />
|
|
40
|
-
</template>
|
|
41
|
-
<template v-if='!!$slots.description' #description>
|
|
42
|
-
<slot name='description' />
|
|
43
|
-
</template>
|
|
44
|
-
</TextInput>
|
|
24
|
+
<TextInput type='email' v-bind='props'>
|
|
25
|
+
<template #leftSection>
|
|
26
|
+
<slot name='leftSection'>
|
|
27
|
+
<Icon name='gravity-ui:at' />
|
|
28
|
+
</slot>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<template v-if='!!$slots.rightSection' #rightSection>
|
|
32
|
+
<slot name='rightSection' />
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<template v-if='!!$slots.label' #label>
|
|
36
|
+
<slot name='label' />
|
|
37
|
+
</template>
|
|
38
|
+
<template v-if='!!$slots.error' #error>
|
|
39
|
+
<slot name='error' />
|
|
40
|
+
</template>
|
|
41
|
+
<template v-if='!!$slots.description' #description>
|
|
42
|
+
<slot name='description' />
|
|
43
|
+
</template>
|
|
44
|
+
</TextInput>
|
|
45
45
|
</template>
|