renusify 2.5.2 → 3.0.0
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/components/app/index.vue +74 -22
- package/components/app/toast/index.vue +76 -71
- package/components/app/toast/toast.vue +62 -44
- package/components/avatar/index.vue +208 -84
- package/components/button/buttonConfirm.vue +53 -26
- package/components/button/buttonGroup.js +0 -2
- package/components/button/buttonGroup.vue +310 -62
- package/components/button/index.vue +584 -100
- package/components/calendar/index.js +0 -2
- package/components/calendar/index.vue +326 -262
- package/components/calendar/month.vue +64 -55
- package/components/calendar/year.vue +30 -25
- package/components/card/index.vue +139 -59
- package/components/codeEditor/highlightCss.vue +38 -39
- package/components/codeEditor/highlightHtml.vue +64 -64
- package/components/codeEditor/highlightJs.vue +37 -38
- package/components/codeEditor/index.vue +129 -79
- package/components/codeEditor/run.vue +225 -39
- package/components/codeEditor/useCodeFormatter.js +150 -0
- package/components/confirm/index.vue +139 -80
- package/components/container/col.vue +5 -4
- package/components/container/divider.vue +28 -19
- package/components/container/index.vue +34 -15
- package/components/container/row.vue +26 -9
- package/components/container/spacer.vue +2 -4
- package/components/container/style.scss +3 -0
- package/components/content/index.vue +49 -32
- package/components/cropper/index.vue +401 -244
- package/components/float/index.vue +542 -415
- package/components/form/addressInput/index.vue +184 -109
- package/components/form/camInput/index.vue +370 -244
- package/components/form/checkInput/index.vue +138 -71
- package/components/form/checkboxInput/index.vue +87 -47
- package/components/form/colorInput/Alpha.vue +81 -83
- package/components/form/colorInput/Hue.vue +91 -68
- package/components/form/colorInput/Preview.vue +43 -47
- package/components/form/colorInput/Saturation.vue +101 -86
- package/components/form/colorInput/index.vue +71 -39
- package/components/form/colorInput/picker.vue +111 -106
- package/components/form/colorInput/useColor.js +153 -0
- package/components/form/dateInput/index.vue +691 -356
- package/components/form/dateInput/month.vue +63 -54
- package/components/form/dateInput/year.vue +35 -25
- package/components/form/fileInput/index.js +0 -1
- package/components/form/fileInput/index.vue +263 -106
- package/components/form/fileInput/single.vue +323 -164
- package/components/form/groupInput/index.vue +199 -101
- package/components/form/index.vue +189 -83
- package/components/form/input/index.vue +416 -377
- package/components/form/jsonInput/JsonView.vue +54 -56
- package/components/form/jsonInput/index.vue +247 -165
- package/components/form/maskInput/index.vue +252 -132
- package/components/form/numberInput/index.js +0 -1
- package/components/form/numberInput/index.vue +226 -117
- package/components/form/passwordInput/index.js +2 -1
- package/components/form/passwordInput/index.vue +269 -102
- package/components/form/radioInput/index.vue +143 -72
- package/components/form/rangeInput/index.vue +280 -167
- package/components/form/ratingInput/index.vue +57 -57
- package/components/form/selectInput/index.js +1 -3
- package/components/form/selectInput/index.vue +584 -296
- package/components/form/switchInput/index.vue +73 -59
- package/components/form/telInput/index.js +0 -1
- package/components/form/telInput/index.vue +238 -135
- package/components/form/textArea/index.vue +72 -35
- package/components/form/textEditor/index.vue +739 -0
- package/components/form/{text-editor → textEditor}/style.scss +8 -16
- package/components/form/textInput/index.vue +54 -32
- package/components/form/timeInput/index.vue +82 -55
- package/components/form/timeInput/range.vue +115 -94
- package/components/form/timeInput/timepicker.vue +382 -449
- package/components/form/uniqueInput/index.vue +105 -48
- package/components/form/unitInput/index.vue +139 -84
- package/components/formCreator/index.js +0 -1
- package/components/formCreator/index.vue +314 -148
- package/components/highlight/index.vue +41 -25
- package/components/highlight/style.scss +2 -2
- package/components/highlight/{mixin.js → useHighlight.js} +181 -160
- package/components/icon/index.vue +79 -33
- package/components/img/index.vue +249 -147
- package/components/img/preview.vue +180 -198
- package/components/img/svgImg.vue +42 -39
- package/components/index.js +5 -20
- package/components/infinite/index.js +1 -2
- package/components/infinite/index.vue +248 -66
- package/components/map/index.vue +428 -261
- package/components/map/route.vue +794 -487
- package/components/map/select.vue +118 -58
- package/components/menu/index.vue +201 -91
- package/components/meta/meta.js +26 -3
- package/components/modal/index.vue +382 -156
- package/components/notify/index.vue +204 -86
- package/components/notify/notification.vue +38 -55
- package/components/progress/circle.vue +189 -70
- package/components/progress/line.vue +266 -46
- package/components/searchBox/index.js +1 -3
- package/components/searchBox/index.vue +194 -101
- package/components/skeleton/index.vue +45 -20
- package/components/slider/index.vue +318 -156
- package/components/swiper/index.vue +254 -106
- package/components/table/crud/footer.vue +77 -53
- package/components/table/crud/header.vue +71 -72
- package/components/table/crud/index.vue +629 -399
- package/components/table/index.vue +721 -278
- package/components/timeAgo/index.vue +145 -96
- package/components/tour/index.vue +338 -235
- package/components/tree/index.vue +235 -89
- package/components/tree/tree-element.vue +106 -106
- package/directive/animate/index.js +77 -0
- package/directive/clickOutSide/index.js +98 -0
- package/directive/drag/index.js +153 -0
- package/directive/index.js +11 -13
- package/directive/intersect/index.js +263 -0
- package/directive/mask/index.js +67 -0
- package/directive/parallax/index.js +78 -0
- package/directive/ripple/index.js +14 -0
- package/directive/scroll/index.js +244 -0
- package/directive/sortable/index.js +274 -0
- package/directive/title/index.js +75 -0
- package/directive/touch/index.js +268 -0
- package/index.js +10 -8
- package/package.json +5 -2
- package/plugins/validation/Validate.js +88 -79
- package/scripts/generate-docs.mjs +226 -0
- package/scripts/menu.mjs +240 -0
- package/scripts/parser.mjs +1086 -0
- package/style/_index.scss +7 -0
- package/style/app.scss +13 -65
- package/style/colors.scss +5 -22
- package/style/functions/index.scss +8 -0
- package/style/mixins/index.scss +17 -5
- package/style/variables/base.scss +154 -175
- package/style/variables/color.scss +0 -12
- package/style/variables/utilities.scss +0 -180
- package/tools/helper.js +0 -8
- package/tools/icons.js +6 -1
- package/tools/root.js +71 -0
- package/components/app/style.scss +0 -41
- package/components/app/toast/style.scss +0 -20
- package/components/avatar/style.scss +0 -32
- package/components/bar/bottomNav.js +0 -1
- package/components/bar/bottomNav.vue +0 -28
- package/components/bar/bottomNavigationCircle.js +0 -2
- package/components/bar/bottomNavigationCircle.vue +0 -99
- package/components/bar/scss/bottomNav.scss +0 -67
- package/components/bar/scss/toolbar.scss +0 -174
- package/components/bar/toolbar/index.js +0 -8
- package/components/bar/toolbar/index.vue +0 -35
- package/components/bar/toolbar/laptop.vue +0 -33
- package/components/bar/toolbar/menuChilds.vue +0 -41
- package/components/bar/toolbar/menuLaptop.vue +0 -41
- package/components/bar/toolbar/menuMob.vue +0 -39
- package/components/bar/toolbar/mixin.js +0 -43
- package/components/bar/toolbar/mobile.vue +0 -34
- package/components/breadcrumb/bredcrumbItem.vue +0 -39
- package/components/breadcrumb/index.js +0 -3
- package/components/breadcrumb/index.vue +0 -71
- package/components/breadcrumb/style.scss +0 -51
- package/components/button/style.scss +0 -411
- package/components/card/style.scss +0 -86
- package/components/chart/chart.js +0 -1
- package/components/chart/chart.vue +0 -69
- package/components/chart/worldMap.js +0 -2
- package/components/chart/worldMap.vue +0 -1112
- package/components/chat/MessageList.vue +0 -163
- package/components/chat/chatInput.vue +0 -150
- package/components/chat/chatMsg.vue +0 -276
- package/components/chat/index.js +0 -11
- package/components/chat/index.vue +0 -113
- package/components/chip/index.js +0 -3
- package/components/chip/index.vue +0 -77
- package/components/chip/style.scss +0 -199
- package/components/codeEditor/mixin.js +0 -145
- package/components/countdown/index.js +0 -1
- package/components/countdown/index.vue +0 -105
- package/components/form/colorInput/mixin.js +0 -132
- package/components/form/fileInput/file.js +0 -148
- package/components/form/telInput/assets/flags.png +0 -0
- package/components/form/telInput/assets/flags@2x.png +0 -0
- package/components/form/text-editor/index.vue +0 -705
- package/components/icon/style.scss +0 -17
- package/components/infinite/div.js +0 -6
- package/components/infinite/div.vue +0 -193
- package/components/infinite/page.js +0 -3
- package/components/infinite/page.vue +0 -105
- package/components/list/index.js +0 -3
- package/components/list/index.vue +0 -122
- package/components/list/style.scss +0 -66
- package/components/message/index.js +0 -4
- package/components/message/index.vue +0 -40
- package/components/modal/style.scss +0 -146
- package/components/nestable/NestableItem.vue +0 -307
- package/components/nestable/editable.js +0 -44
- package/components/nestable/index.js +0 -1
- package/components/nestable/index.vue +0 -226
- package/components/nestable/methods.js +0 -416
- package/components/progress/style.scss +0 -229
- package/components/table/style.scss +0 -338
- package/components/tabs/index.js +0 -3
- package/components/tabs/index.vue +0 -151
- package/components/timeline/index.js +0 -6
- package/components/timeline/index.vue +0 -76
- package/directive/resize/index.js +0 -30
- package/directive/skeleton/index.js +0 -27
- package/directive/skeleton/style.scss +0 -37
- package/plugins/request/Request.js +0 -68
- package/style/animation.scss +0 -94
- package/style/style.scss +0 -8
- package/tools/rootable.js +0 -75
- /package/components/form/{text-editor → textEditor}/index.js +0 -0
- /package/components/form/{text-editor → textEditor}/preview.js +0 -0
- /package/components/form/{text-editor → textEditor}/preview.vue +0 -0
|
@@ -1,356 +1,623 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
2
|
+
<div ref="selectRef" v-click-outside="showMode==='modal'?()=>{}:closeList"
|
|
3
|
+
:class="[`${$r.prefix}select-container`,{'open-to-top':openToTop}]">
|
|
4
|
+
<r-input :active="active||openList"
|
|
4
5
|
v-bind="$attrs"
|
|
5
|
-
:
|
|
6
|
-
:modelValue="$helper.ifHas(chips,null,0,value)"
|
|
6
|
+
:modelValue="modelValue"
|
|
7
7
|
@click.prevent="handleClick()">
|
|
8
|
-
<div class="
|
|
9
|
-
:class="{
|
|
10
|
-
'h-center':disableSearch,
|
|
8
|
+
<div :class="{
|
|
11
9
|
'flex-nowrap':!multiple
|
|
12
|
-
}"
|
|
13
|
-
|
|
10
|
+
}"
|
|
11
|
+
class="select-wrap v-center">
|
|
12
|
+
<span
|
|
14
13
|
v-for="(item,key) in chips"
|
|
15
14
|
:key="key"
|
|
16
|
-
:class="{'px-0':!multiple}"
|
|
17
|
-
|
|
18
|
-
:text="textChip || !multiple"
|
|
19
|
-
class="my-0 ms-0"
|
|
20
|
-
selectable
|
|
21
|
-
@update:modelValue="handleChip($event,key)">
|
|
15
|
+
:class="{'px-0':!multiple,'chip body-3':multiple}"
|
|
16
|
+
class=" ms-0 d-flex v-center">
|
|
22
17
|
{{ item ? item[text] : '' }}
|
|
23
|
-
|
|
18
|
+
<r-icon v-if="multiple" class="chip-icon cursor-pointer ms-1" height="16" width="16"
|
|
19
|
+
@click="handleChip(false,key)"
|
|
20
|
+
v-html="$r.icons.close"></r-icon>
|
|
21
|
+
|
|
22
|
+
</span>
|
|
24
23
|
<span>
|
|
25
|
-
<input
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
<input v-if="!disableSearch"
|
|
25
|
+
ref="inputRef"
|
|
26
|
+
:autofocus="autofocus"
|
|
27
|
+
:placeholder="modelValue?'':placeholder"
|
|
28
|
+
:type="type"
|
|
29
|
+
:value="inputVal"
|
|
30
30
|
autocomplete="no"
|
|
31
31
|
class="select-input"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
:value="inputVal"
|
|
32
|
+
@focusin="focusInput(true)"
|
|
33
|
+
@focusout="focusInput(false)"
|
|
35
34
|
@input="e => inputVal = e.target.value"
|
|
35
|
+
@keydown.enter="add"
|
|
36
36
|
/>
|
|
37
37
|
</span>
|
|
38
38
|
</div>
|
|
39
39
|
<r-progress-line v-if="loading" color="color-two"></r-progress-line>
|
|
40
40
|
</r-input>
|
|
41
|
-
<
|
|
42
|
-
'card-
|
|
43
|
-
'
|
|
44
|
-
}"
|
|
45
|
-
|
|
46
|
-
width:$refs.select&&$refs.select.getBoundingClientRect().width+'px'
|
|
41
|
+
<div v-if="showMode!=='modal'" :class="{
|
|
42
|
+
'card-no-float':showMode==='noFloat',
|
|
43
|
+
'card-select-active':genItems.length>0 && openList
|
|
44
|
+
}" :style="{
|
|
45
|
+
width:width+'px'
|
|
47
46
|
}"
|
|
47
|
+
class="card-select"
|
|
48
48
|
>
|
|
49
|
-
<
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
<template v-slot="props">
|
|
58
|
-
<slot :item="props.item">
|
|
59
|
-
<div class="list-title">
|
|
60
|
-
{{ props.item[text] }}
|
|
61
|
-
</div>
|
|
62
|
-
</slot>
|
|
49
|
+
<div v-for="(item,i) in genItems"
|
|
50
|
+
:key="i"
|
|
51
|
+
:class="{'card-item-active':$helper.searchArray(chips,text,item[text])!==false}"
|
|
52
|
+
class="card-item"
|
|
53
|
+
@click="handle_item(item)">
|
|
54
|
+
<!-- Default slot for list item. Provide item prop. -->
|
|
55
|
+
<slot :item="item">
|
|
56
|
+
{{ item[text] }}
|
|
63
57
|
<transition name="fade">
|
|
64
|
-
<r-icon class="pe-1"
|
|
58
|
+
<r-icon v-if="$helper.searchArray(chips,text,item[text])!==false" class="pe-1"
|
|
59
|
+
exact
|
|
65
60
|
v-html="$r.icons.check"
|
|
66
|
-
v-if="$helper.searchArray(props.list,text,props.item[text])!==false"
|
|
67
61
|
></r-icon>
|
|
68
62
|
</transition>
|
|
69
|
-
</
|
|
70
|
-
</
|
|
71
|
-
</
|
|
63
|
+
</slot>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
<r-modal v-else v-model="openList" full-width position="bottom">
|
|
67
|
+
<div :class="`${$r.prefix}select-container`" class="pa-3">
|
|
68
|
+
<r-input v-if="!disableSearch" :active="true"
|
|
69
|
+
:modelValue="$helper.ifHas(chips,null,0,value)"
|
|
70
|
+
v-bind="$attrs"
|
|
71
|
+
@click.prevent="handleClick()">
|
|
72
|
+
<div :class="{
|
|
73
|
+
'h-center':disableSearch,
|
|
74
|
+
'flex-nowrap':!multiple
|
|
75
|
+
}"
|
|
76
|
+
class="select-wrap v-center">
|
|
77
|
+
<span
|
|
78
|
+
v-for="(item,key) in chips"
|
|
79
|
+
:key="key"
|
|
80
|
+
:class="{'px-0':!multiple,'chip body-3':multiple}"
|
|
81
|
+
class=" ms-0 d-flex v-center">
|
|
82
|
+
{{ item ? item[text] : '' }}
|
|
83
|
+
<r-icon v-if="multiple" class="chip-icon cursor-pointer ms-1" height="16" width="16"
|
|
84
|
+
@click="handleChip(false,key)"
|
|
85
|
+
v-html="$r.icons.close"></r-icon>
|
|
86
|
+
|
|
87
|
+
</span>
|
|
88
|
+
<span>
|
|
89
|
+
<input :type="type"
|
|
90
|
+
v-if="!disableSearch"
|
|
91
|
+
@focusin="focusInput(true)"
|
|
92
|
+
@focusout="focusInput(false)"
|
|
93
|
+
@keydown.enter="add"
|
|
94
|
+
autocomplete="no"
|
|
95
|
+
class="select-input"
|
|
96
|
+
:value="inputVal"
|
|
97
|
+
@input="e => inputVal = e.target.value"
|
|
98
|
+
/>
|
|
99
|
+
</span>
|
|
100
|
+
</div>
|
|
101
|
+
<r-progress-line v-if="loading" color="color-two"></r-progress-line>
|
|
102
|
+
</r-input>
|
|
103
|
+
<div v-for="(item,i) in genItems"
|
|
104
|
+
:key="i"
|
|
105
|
+
:class="{'card-item-active':$helper.searchArray(chips,text,item[text])!==false}"
|
|
106
|
+
class="card-item"
|
|
107
|
+
@click="handle_item(item)">
|
|
108
|
+
<!-- Default slot for list item. Provide item prop. -->
|
|
109
|
+
<slot :item="item">
|
|
110
|
+
{{ item[text] }}
|
|
111
|
+
<transition name="fade">
|
|
112
|
+
<r-icon v-if="$helper.searchArray(chips,text,item[text])!==false" class="pe-1"
|
|
113
|
+
exact
|
|
114
|
+
v-html="$r.icons.check"
|
|
115
|
+
></r-icon>
|
|
116
|
+
</transition>
|
|
117
|
+
</slot>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
</r-modal>
|
|
72
121
|
</div>
|
|
73
122
|
</template>
|
|
74
|
-
<script>
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
inheritAttrs: false
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
multiple: Boolean,
|
|
100
|
-
justValue: Boolean,
|
|
101
|
-
openToTop: Boolean,
|
|
102
|
-
translate: Boolean,
|
|
103
|
-
firstSelect: Boolean,
|
|
104
|
-
headers: Object
|
|
123
|
+
<script setup>
|
|
124
|
+
import {ref, computed, watch, onMounted, inject, nextTick, useAttrs} from 'vue'
|
|
125
|
+
|
|
126
|
+
defineOptions({
|
|
127
|
+
inheritAttrs: false
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
const attr = useAttrs()
|
|
131
|
+
const placeholder = attr.placeholder
|
|
132
|
+
const autofocus = attr.autofocus
|
|
133
|
+
|
|
134
|
+
const props = defineProps({
|
|
135
|
+
/**
|
|
136
|
+
* API endpoint URL for fetching search results
|
|
137
|
+
* @type {String}
|
|
138
|
+
*/
|
|
139
|
+
searchLink: String,
|
|
140
|
+
/**
|
|
141
|
+
* Input type for the select component
|
|
142
|
+
* @type {String}
|
|
143
|
+
* @default 'text'
|
|
144
|
+
*/
|
|
145
|
+
type: {
|
|
146
|
+
type: String,
|
|
147
|
+
default: 'text'
|
|
105
148
|
},
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
chips: []
|
|
115
|
-
}
|
|
149
|
+
/**
|
|
150
|
+
* Property name for display text in items
|
|
151
|
+
* @type {String}
|
|
152
|
+
* @default 'name'
|
|
153
|
+
*/
|
|
154
|
+
text: {
|
|
155
|
+
type: String,
|
|
156
|
+
default: 'name'
|
|
116
157
|
},
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
158
|
+
/**
|
|
159
|
+
* Property name for value in items
|
|
160
|
+
* @type {String}
|
|
161
|
+
* @default 'value'
|
|
162
|
+
*/
|
|
163
|
+
value: {
|
|
164
|
+
type: String,
|
|
165
|
+
default: 'value'
|
|
126
166
|
},
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
167
|
+
/**
|
|
168
|
+
* Disable search functionality
|
|
169
|
+
* @type {Boolean}
|
|
170
|
+
*/
|
|
171
|
+
disableSearch: Boolean,
|
|
172
|
+
/**
|
|
173
|
+
* Static array of select items
|
|
174
|
+
* @type {Array}
|
|
175
|
+
*/
|
|
176
|
+
items: Array,
|
|
177
|
+
/**
|
|
178
|
+
* The selected value(s)
|
|
179
|
+
* @type {String|Number|Array|Object}
|
|
180
|
+
*/
|
|
181
|
+
modelValue: [String, Number, Array, Object],
|
|
182
|
+
/**
|
|
183
|
+
* Enable tag mode (allow custom values not in items)
|
|
184
|
+
* @type {Boolean}
|
|
185
|
+
*/
|
|
186
|
+
tags: Boolean,
|
|
187
|
+
/**
|
|
188
|
+
* Enable multiple selection
|
|
189
|
+
* @type {Boolean}
|
|
190
|
+
*/
|
|
191
|
+
multiple: Boolean,
|
|
192
|
+
/**
|
|
193
|
+
* Emit only values instead of full objects
|
|
194
|
+
* @type {Boolean}
|
|
195
|
+
*/
|
|
196
|
+
justValue: Boolean,
|
|
197
|
+
/**
|
|
198
|
+
* Open dropdown above the input
|
|
199
|
+
* @type {Boolean}
|
|
200
|
+
*/
|
|
201
|
+
openToTop: Boolean,
|
|
202
|
+
/**
|
|
203
|
+
* Enable translation for item texts
|
|
204
|
+
* @type {Boolean}
|
|
205
|
+
*/
|
|
206
|
+
translate: Boolean,
|
|
207
|
+
/**
|
|
208
|
+
* Automatically select first item when empty
|
|
209
|
+
* @type {Boolean}
|
|
210
|
+
*/
|
|
211
|
+
firstSelect: Boolean,
|
|
212
|
+
/**
|
|
213
|
+
* Disable floating label
|
|
214
|
+
* @type {Boolean}
|
|
215
|
+
*/
|
|
216
|
+
noFloat: Boolean,
|
|
217
|
+
/**
|
|
218
|
+
* Force modal display on all screen sizes
|
|
219
|
+
* @type {Boolean}
|
|
220
|
+
*/
|
|
221
|
+
modal: Boolean,
|
|
222
|
+
/**
|
|
223
|
+
* Auto display mode based on screen size
|
|
224
|
+
* @type {String}
|
|
225
|
+
* @default 'modal'
|
|
226
|
+
* @validator ['modal', 'float', 'none']
|
|
227
|
+
*/
|
|
228
|
+
auto: {type: String, default: 'modal', validator: value => ['modal', 'float', 'none'].includes(value)},
|
|
229
|
+
/**
|
|
230
|
+
* Additional headers for API requests
|
|
231
|
+
* @type {Object}
|
|
232
|
+
*/
|
|
233
|
+
headers: Object
|
|
234
|
+
})
|
|
133
235
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
236
|
+
const emit = defineEmits([
|
|
237
|
+
/**
|
|
238
|
+
* Emitted when selected value(s) change
|
|
239
|
+
* @param {String|Number|Array|Object} value - Updated selected value(s)
|
|
240
|
+
*/
|
|
241
|
+
'update:modelValue',
|
|
242
|
+
/**
|
|
243
|
+
* Emitted when a chip/tag is deleted
|
|
244
|
+
* @param {Array} deletedItem - Array containing [index, deletedItem]
|
|
245
|
+
*/
|
|
246
|
+
'del'
|
|
247
|
+
])
|
|
137
248
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
249
|
+
const {$helper, $t, $r} = inject('renusify')
|
|
250
|
+
const $axios = inject('axios')
|
|
251
|
+
|
|
252
|
+
// Reactive data
|
|
253
|
+
const apiData = ref([])
|
|
254
|
+
const loading = ref(false)
|
|
255
|
+
const active = ref(false)
|
|
256
|
+
const openList = ref(false)
|
|
257
|
+
const inputVal = ref(null)
|
|
258
|
+
const width = ref(100)
|
|
259
|
+
const chips = ref([])
|
|
260
|
+
|
|
261
|
+
// Template refs
|
|
262
|
+
const selectRef = ref(null)
|
|
263
|
+
const inputRef = ref(null)
|
|
264
|
+
|
|
265
|
+
// Computed properties
|
|
266
|
+
/**
|
|
267
|
+
* Determines display mode based on props and screen size
|
|
268
|
+
* @returns {String} Display mode: 'modal', 'noFloat', or 'none'
|
|
269
|
+
*/
|
|
270
|
+
const showMode = computed(() => {
|
|
271
|
+
if ($r.breakpoint.mdAndDown) {
|
|
272
|
+
if (props.auto === 'modal') {
|
|
273
|
+
return 'modal'
|
|
156
274
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
'inputVal': function (newVal) {
|
|
160
|
-
if (this.searchLink) {
|
|
161
|
-
if (newVal && newVal.length > 0) {
|
|
162
|
-
this.get()
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
'modelValue': function (n) {
|
|
167
|
-
this.chips = this.getValue()
|
|
275
|
+
if (props.auto === 'float') {
|
|
276
|
+
return 'noFloat'
|
|
168
277
|
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
278
|
+
} else {
|
|
279
|
+
if (props.modal) {
|
|
280
|
+
return 'modal'
|
|
281
|
+
}
|
|
282
|
+
if (props.noFloat) {
|
|
283
|
+
return 'noFloat'
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
return 'none'
|
|
287
|
+
})
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Generates and filters items for display
|
|
291
|
+
* @returns {Array} Processed and filtered items array
|
|
292
|
+
*/
|
|
293
|
+
const genItems = computed(() => {
|
|
294
|
+
let res = []
|
|
295
|
+
|
|
296
|
+
if (apiData.value.length > 0) {
|
|
297
|
+
res = apiData.value
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
if (props.items) {
|
|
301
|
+
res = [...(res || []), ...props.items]
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// Convert primitive values to objects
|
|
305
|
+
if (res.length > 0 && typeof res[0] !== 'object') {
|
|
306
|
+
res = res.map(item => ({
|
|
307
|
+
[props.text]: item.toString(),
|
|
308
|
+
[props.value]: item
|
|
309
|
+
}))
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
// Apply translation if enabled
|
|
313
|
+
if (props.translate) {
|
|
314
|
+
res = res.map(item => ({
|
|
315
|
+
...item,
|
|
316
|
+
[props.text]: $t(item[props.text])
|
|
317
|
+
}))
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
// Filter by search term if not using API search
|
|
321
|
+
if (!props.searchLink && inputVal.value) {
|
|
322
|
+
const searchTerm = inputVal.value.trim()
|
|
323
|
+
return res.filter(el => {
|
|
324
|
+
return el[props.text] && el[props.text].toLowerCase().includes(searchTerm.toLowerCase())
|
|
325
|
+
})
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
return res
|
|
329
|
+
})
|
|
330
|
+
|
|
331
|
+
// Methods
|
|
332
|
+
/**
|
|
333
|
+
* Fetches data from API search endpoint
|
|
334
|
+
*/
|
|
335
|
+
const get = async () => {
|
|
336
|
+
if (!props.searchLink) return
|
|
337
|
+
|
|
338
|
+
loading.value = true
|
|
339
|
+
try {
|
|
340
|
+
const {data} = await $axios.get(props.searchLink, {
|
|
341
|
+
params: {
|
|
342
|
+
s: inputVal.value || ''
|
|
343
|
+
},
|
|
344
|
+
headers: props.headers
|
|
345
|
+
})
|
|
346
|
+
apiData.value = data
|
|
347
|
+
} catch (error) {
|
|
348
|
+
console.error('Error fetching select data:', error)
|
|
349
|
+
} finally {
|
|
350
|
+
loading.value = false
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Converts modelValue to chip format
|
|
356
|
+
* @returns {Array} Array of chip objects
|
|
357
|
+
*/
|
|
358
|
+
const getValue = () => {
|
|
359
|
+
// Validate modelValue against available items if not using tags
|
|
360
|
+
if (!props.searchLink && !props.tags && props.modelValue !== undefined && props.modelValue !== null) {
|
|
361
|
+
if (typeof props.modelValue === 'string' || typeof props.modelValue === 'number') {
|
|
362
|
+
const index = $helper?.searchArray(genItems.value, props.value, props.modelValue)
|
|
363
|
+
if (index === false) {
|
|
364
|
+
emit('update:modelValue', null)
|
|
365
|
+
return []
|
|
366
|
+
}
|
|
367
|
+
} else if (Array.isArray(props.modelValue)) {
|
|
368
|
+
for (const item of props.modelValue) {
|
|
369
|
+
if (typeof item === 'string' || typeof item === 'number') {
|
|
370
|
+
const index = $helper?.searchArray(genItems.value, props.value, item)
|
|
189
371
|
if (index === false) {
|
|
190
|
-
|
|
372
|
+
emit('update:modelValue', null)
|
|
191
373
|
return []
|
|
192
374
|
}
|
|
193
|
-
} else if (this.$helper.isArray(this.modelValue)) {
|
|
194
|
-
this.modelValue.forEach((item) => {
|
|
195
|
-
if (typeof item === 'string' || typeof item === 'number') {
|
|
196
|
-
const index = this.$helper.searchArray(this.genItems, this.value, item)
|
|
197
|
-
if (index === false) {
|
|
198
|
-
this.$emit('update:modelValue', null)
|
|
199
|
-
return []
|
|
200
|
-
}
|
|
201
|
-
} else {
|
|
202
|
-
const index = this.$helper.searchArray(this.genItems, this.value, item[this.value])
|
|
203
|
-
if (index === false) {
|
|
204
|
-
this.$emit('update:modelValue', null)
|
|
205
|
-
return []
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
})
|
|
209
375
|
} else {
|
|
210
|
-
const index =
|
|
376
|
+
const index = $helper?.searchArray(genItems.value, props.value, item[props.value])
|
|
211
377
|
if (index === false) {
|
|
212
|
-
|
|
378
|
+
emit('update:modelValue', null)
|
|
213
379
|
return []
|
|
214
380
|
}
|
|
215
381
|
}
|
|
216
382
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
if (index !== false) {
|
|
223
|
-
return [this.genItems[index]]
|
|
224
|
-
}
|
|
225
|
-
return [{
|
|
226
|
-
[this.text]: this.modelValue.toString(), [this.value]: this.modelValue
|
|
227
|
-
}]
|
|
228
|
-
} else if (typeof this.modelValue[0] === 'string' || typeof this.modelValue[0] === 'number') {
|
|
229
|
-
let res = []
|
|
230
|
-
const lng = this.modelValue.length
|
|
231
|
-
for (let i = 0; i < lng; i++) {
|
|
232
|
-
const index = this.$helper.searchArray(this.genItems, this.value, this.modelValue[i])
|
|
233
|
-
if (index !== false) {
|
|
234
|
-
res.push(this.genItems[index])
|
|
235
|
-
} else {
|
|
236
|
-
res.push({[this.text]: this.modelValue[i].toString(), [this.value]: this.modelValue[i]})
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
return res
|
|
240
|
-
} else {
|
|
241
|
-
return this.modelValue
|
|
242
|
-
}
|
|
383
|
+
} else {
|
|
384
|
+
const index = $helper?.searchArray(genItems.value, props.value, props.modelValue[props.value])
|
|
385
|
+
if (index === false) {
|
|
386
|
+
emit('update:modelValue', null)
|
|
387
|
+
return []
|
|
243
388
|
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
},
|
|
247
|
-
handleChip(e, key) {
|
|
248
|
-
if (e === false) {
|
|
249
|
-
this.$emit('del', [key, this.chips[key]])
|
|
250
|
-
this.chips.splice(key, 1)
|
|
251
|
-
this.emitVal()
|
|
252
|
-
} else {
|
|
253
|
-
this.handleClick()
|
|
254
|
-
}
|
|
255
|
-
},
|
|
256
|
-
handleClick() {
|
|
257
|
-
if (this.$refs.input) {
|
|
258
|
-
this.$refs.input.focus()
|
|
259
|
-
this.$refs.select.scrollIntoView({
|
|
260
|
-
block: "start",
|
|
261
|
-
behavior: "smooth"
|
|
262
|
-
})
|
|
263
|
-
} else {
|
|
264
|
-
this.focusInput(true)
|
|
265
|
-
}
|
|
266
|
-
},
|
|
267
|
-
add() {
|
|
268
|
-
if (this.inputVal) {
|
|
269
|
-
let val = {[this.text]: this.inputVal.toString(), [this.value]: this.inputVal}
|
|
270
|
-
if (!this.multiple) {
|
|
271
|
-
this.chips = []
|
|
272
|
-
}
|
|
273
|
-
if (!this.tags) {
|
|
274
|
-
const exist = this.$helper.searchArray(this.genItems, this.text, val[this.text])
|
|
275
|
-
if (exist !== false) {
|
|
276
|
-
this.chips.push(val)
|
|
277
|
-
}
|
|
278
|
-
} else {
|
|
279
|
-
this.chips.push(val)
|
|
280
|
-
}
|
|
281
|
-
this.inputVal = null
|
|
389
|
+
}
|
|
390
|
+
}
|
|
282
391
|
|
|
283
|
-
|
|
392
|
+
// Convert modelValue to chip format
|
|
393
|
+
if (props.modelValue !== undefined && props.modelValue !== null) {
|
|
394
|
+
if ($helper?.ifHas(props.modelValue, false, props.text)) {
|
|
395
|
+
return [props.modelValue]
|
|
396
|
+
} else if (typeof props.modelValue === 'string' || typeof props.modelValue === 'number') {
|
|
397
|
+
const index = $helper?.searchArray(genItems.value, props.value, props.modelValue)
|
|
398
|
+
if (index !== false) {
|
|
399
|
+
return [genItems.value[index]]
|
|
284
400
|
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
val.push(this.chips[i][this.value])
|
|
295
|
-
}
|
|
401
|
+
return [{
|
|
402
|
+
[props.text]: props.modelValue.toString(),
|
|
403
|
+
[props.value]: props.modelValue
|
|
404
|
+
}]
|
|
405
|
+
} else if (Array.isArray(props.modelValue) && (typeof props.modelValue[0] === 'string' || typeof props.modelValue[0] === 'number')) {
|
|
406
|
+
return props.modelValue.map(item => {
|
|
407
|
+
const index = $helper?.searchArray(genItems.value, props.value, item)
|
|
408
|
+
if (index !== false) {
|
|
409
|
+
return genItems.value[index]
|
|
296
410
|
}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
if (val) {
|
|
301
|
-
this.closeList()
|
|
411
|
+
return {
|
|
412
|
+
[props.text]: item.toString(),
|
|
413
|
+
[props.value]: item
|
|
302
414
|
}
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
415
|
+
})
|
|
416
|
+
} else {
|
|
417
|
+
return Array.isArray(props.modelValue) ? props.modelValue : [props.modelValue]
|
|
418
|
+
}
|
|
419
|
+
}
|
|
307
420
|
|
|
308
|
-
|
|
421
|
+
emit('update:modelValue', null)
|
|
422
|
+
return []
|
|
423
|
+
}
|
|
309
424
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
425
|
+
/**
|
|
426
|
+
* Handles chip deletion or click
|
|
427
|
+
* @param {Boolean} e - False if deleting, otherwise clicking
|
|
428
|
+
* @param {Number} key - Chip index
|
|
429
|
+
*/
|
|
430
|
+
const handleChip = (e, key) => {
|
|
431
|
+
if (e === false) {
|
|
432
|
+
emit('del', [key, chips.value[key]])
|
|
433
|
+
chips.value.splice(key, 1)
|
|
434
|
+
emitVal()
|
|
435
|
+
} else {
|
|
436
|
+
handleClick()
|
|
437
|
+
}
|
|
438
|
+
}
|
|
316
439
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
440
|
+
/**
|
|
441
|
+
* Handles input click to open dropdown
|
|
442
|
+
*/
|
|
443
|
+
const handleClick = () => {
|
|
444
|
+
if (selectRef.value) {
|
|
445
|
+
nextTick(() => {
|
|
446
|
+
width.value = selectRef.value.getBoundingClientRect().width
|
|
447
|
+
})
|
|
448
|
+
}
|
|
449
|
+
if (inputRef.value) {
|
|
450
|
+
inputRef.value.focus()
|
|
451
|
+
} else {
|
|
452
|
+
focusInput(true)
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Adds custom tag from input value
|
|
458
|
+
*/
|
|
459
|
+
const add = () => {
|
|
460
|
+
if (inputVal.value) {
|
|
461
|
+
const val = {
|
|
462
|
+
[props.text]: inputVal.value.toString(),
|
|
463
|
+
[props.value]: inputVal.value
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
if (!props.multiple) {
|
|
467
|
+
chips.value = []
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
if (!props.tags) {
|
|
471
|
+
const exist = $helper?.searchArray(genItems.value, props.text, val[props.text])
|
|
472
|
+
if (exist !== false) {
|
|
473
|
+
chips.value.push(val)
|
|
331
474
|
}
|
|
475
|
+
} else {
|
|
476
|
+
chips.value.push(val)
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
inputVal.value = null
|
|
480
|
+
emitVal()
|
|
481
|
+
}
|
|
482
|
+
}
|
|
332
483
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
484
|
+
/**
|
|
485
|
+
* Emits updated value to parent
|
|
486
|
+
*/
|
|
487
|
+
const emitVal = () => {
|
|
488
|
+
chips.value = $helper?.uniqArray(chips.value) || chips.value
|
|
338
489
|
|
|
490
|
+
let val = chips.value
|
|
491
|
+
if (props.justValue) {
|
|
492
|
+
val = chips.value.map(chip => chip[props.value])
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
if (!props.multiple) {
|
|
496
|
+
val = val[0]
|
|
497
|
+
if (val) {
|
|
498
|
+
closeList()
|
|
339
499
|
}
|
|
340
500
|
}
|
|
501
|
+
|
|
502
|
+
if (val === undefined) {
|
|
503
|
+
val = null
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
emit('update:modelValue', val)
|
|
341
507
|
}
|
|
342
508
|
|
|
509
|
+
/**
|
|
510
|
+
* Focuses input and opens dropdown
|
|
511
|
+
* @param {Boolean} val - Whether to focus/open
|
|
512
|
+
*/
|
|
513
|
+
const focusInput = (val) => {
|
|
514
|
+
active.value = val
|
|
515
|
+
if (val === true) {
|
|
516
|
+
openList.value = true
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
setTimeout(() => {
|
|
520
|
+
add()
|
|
521
|
+
}, 200)
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* Handles item selection from dropdown
|
|
526
|
+
* @param {Object} item - Selected item
|
|
527
|
+
*/
|
|
528
|
+
const handle_item = (item) => {
|
|
529
|
+
const index = $helper?.searchArray(chips.value, props.text, item[props.text])
|
|
530
|
+
|
|
531
|
+
if (index !== false) {
|
|
532
|
+
chips.value.splice(index, 1)
|
|
533
|
+
} else {
|
|
534
|
+
if (!props.multiple) {
|
|
535
|
+
chips.value = []
|
|
536
|
+
}
|
|
537
|
+
chips.value.push(item)
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
inputVal.value = null
|
|
541
|
+
if (!props.multiple && chips.value.length > 0) {
|
|
542
|
+
chips.value = [chips.value[0]]
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
emitVal()
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* Closes dropdown list
|
|
550
|
+
*/
|
|
551
|
+
const closeList = () => {
|
|
552
|
+
active.value = false
|
|
553
|
+
openList.value = false
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
// Watchers
|
|
557
|
+
watch(inputVal, (newVal) => {
|
|
558
|
+
if (props.searchLink && newVal && newVal.length > 0) {
|
|
559
|
+
get()
|
|
560
|
+
}
|
|
561
|
+
})
|
|
562
|
+
|
|
563
|
+
watch(() => props.modelValue, (n) => {
|
|
564
|
+
chips.value = getValue()
|
|
565
|
+
})
|
|
566
|
+
|
|
567
|
+
// Lifecycle hooks
|
|
568
|
+
onMounted(() => {
|
|
569
|
+
chips.value = getValue()
|
|
570
|
+
|
|
571
|
+
if (props.firstSelect && chips.value.length === 0 && genItems.value.length > 0) {
|
|
572
|
+
chips.value.push(genItems.value[0])
|
|
573
|
+
emitVal()
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
if (props.searchLink) {
|
|
577
|
+
get()
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
if (selectRef.value) {
|
|
581
|
+
nextTick(() => {
|
|
582
|
+
width.value = selectRef.value.getBoundingClientRect().width
|
|
583
|
+
})
|
|
584
|
+
}
|
|
585
|
+
})
|
|
343
586
|
</script>
|
|
344
587
|
<style lang="scss">
|
|
345
588
|
@use "sass:map";
|
|
346
|
-
@use "../../../style
|
|
589
|
+
@use "../../../style" as *;
|
|
347
590
|
|
|
348
591
|
|
|
349
592
|
$min-height: 40px;
|
|
350
|
-
.#{
|
|
593
|
+
.#{$prefix}select-container {
|
|
351
594
|
position: relative;
|
|
352
595
|
scroll-margin: $min-height;
|
|
353
596
|
|
|
597
|
+
&.open-to-top {
|
|
598
|
+
display: flex;
|
|
599
|
+
flex-direction: column-reverse;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
.chip {
|
|
603
|
+
background: var(--color-sheet);
|
|
604
|
+
color: var(--color-on-sheet);
|
|
605
|
+
border-radius: 50px;
|
|
606
|
+
margin: 4px;
|
|
607
|
+
@include rtl() {
|
|
608
|
+
padding: 2px 8px 2px 4px;
|
|
609
|
+
}
|
|
610
|
+
@include ltr() {
|
|
611
|
+
padding: 2px 4px 2px 8px;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.chip-icon {
|
|
615
|
+
background: var(--color-sheet-container);
|
|
616
|
+
border-radius: 50%;
|
|
617
|
+
padding: 2px;
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
|
|
354
621
|
.input-control {
|
|
355
622
|
min-height: $min-height;
|
|
356
623
|
height: auto;
|
|
@@ -378,7 +645,7 @@ $min-height: 40px;
|
|
|
378
645
|
position: relative;
|
|
379
646
|
}
|
|
380
647
|
|
|
381
|
-
.#{
|
|
648
|
+
.#{$prefix}chip {
|
|
382
649
|
flex: 0 1 auto;
|
|
383
650
|
margin: 4px;
|
|
384
651
|
}
|
|
@@ -387,18 +654,39 @@ $min-height: 40px;
|
|
|
387
654
|
max-height: 0;
|
|
388
655
|
overflow: auto;
|
|
389
656
|
opacity: .5;
|
|
390
|
-
transition: all .3s
|
|
391
|
-
position: absolute;
|
|
657
|
+
transition: all .3s $primary-transition;
|
|
392
658
|
left: 0;
|
|
393
|
-
z-index: map.get(
|
|
659
|
+
z-index: map.get($z-index, 'default');
|
|
660
|
+
background: var(--color-sheet-container);
|
|
661
|
+
color: var(--color-on-sheet);
|
|
662
|
+
|
|
663
|
+
&:not(.card-no-float) {
|
|
664
|
+
position: absolute;
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
&.open-to-top {
|
|
669
|
+
.card-select {
|
|
670
|
+
bottom: $min-height+2px;
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
.card-item {
|
|
676
|
+
display: flex;
|
|
677
|
+
justify-content: space-between;
|
|
678
|
+
padding: 12px;
|
|
679
|
+
cursor: pointer;
|
|
680
|
+
border-bottom: 1px solid var(--color-sheet-container-low);
|
|
394
681
|
}
|
|
395
682
|
|
|
396
|
-
.
|
|
397
|
-
|
|
683
|
+
.card-item-active {
|
|
684
|
+
background: var(--color-one-container);
|
|
685
|
+
color: var(--color-on-one-container);
|
|
398
686
|
}
|
|
399
687
|
|
|
400
688
|
.card-select-active {
|
|
401
|
-
transition: all 0.3s
|
|
689
|
+
transition: all 0.3s $primary-transition;
|
|
402
690
|
max-height: 300px;
|
|
403
691
|
opacity: 1;
|
|
404
692
|
}
|