@tagplus/components 5.3.4 → 5.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/_virtual/_plugin-vue_export-helper.mjs +10 -0
- package/dist/es/components.css +2391 -0
- package/dist/es/node_modules/@element-plus/icons-vue/dist/index.mjs +148 -0
- package/dist/es/node_modules/@popperjs/core/lib/enums.mjs +22 -0
- package/dist/es/node_modules/@vue/shared/dist/shared.esm-bundler.mjs +28 -0
- package/dist/es/node_modules/@vueuse/core/index.mjs +172 -0
- package/dist/es/node_modules/@vueuse/shared/index.mjs +68 -0
- package/dist/es/node_modules/element-plus/es/constants/size.mjs +4 -0
- package/dist/es/node_modules/element-plus/es/hooks/use-focus-controller/index.mjs +64 -0
- package/dist/es/node_modules/element-plus/es/hooks/use-id/index.mjs +30 -0
- package/dist/es/node_modules/element-plus/es/hooks/use-locale/index.mjs +29 -0
- package/dist/es/node_modules/element-plus/es/hooks/use-namespace/index.mjs +79 -0
- package/dist/es/node_modules/element-plus/es/hooks/use-prop/index.mjs +11 -0
- package/dist/es/node_modules/element-plus/es/hooks/use-size/index.mjs +20 -0
- package/dist/es/node_modules/element-plus/es/locale/lang/en.mjs +182 -0
- package/dist/es/node_modules/element-plus/es/utils/error.mjs +16 -0
- package/dist/es/node_modules/element-plus/es/utils/types.mjs +9 -0
- package/dist/es/node_modules/element-plus/es/utils/vue/props/runtime.mjs +42 -0
- package/dist/es/src/components/Autosuggest/Autosuggest.vue.mjs +446 -0
- package/dist/es/src/components/Autosuggest/Multisuggest.vue.mjs +17 -0
- package/dist/es/src/components/Autosuggest/autosuggest-props.mjs +204 -0
- package/dist/es/src/components/Autosuggest/core.mjs +62 -0
- package/dist/es/src/components/Autosuggest/multisuggest-props.mjs +11 -0
- package/dist/es/src/components/Autosuggest/option.vue.mjs +118 -0
- package/dist/es/src/components/Autosuggest/select-dropdown.vue.mjs +62 -0
- package/dist/es/src/components/Autosuggest/useOption.mjs +93 -0
- package/dist/es/src/components/Autosuggest/useSelect.mjs +803 -0
- package/dist/es/src/components/Inline/Inline.vue.mjs +130 -0
- package/dist/es/src/components/Inline/index.mjs +4 -0
- package/dist/es/src/components/InputNumber/InputNumber.vue.mjs +358 -0
- package/dist/es/src/components/InputNumber/index.mjs +4 -0
- package/dist/es/src/components/InputNumber/input-number.mjs +128 -0
- package/dist/es/src/components/Loader/Loader.vue.mjs +59 -0
- package/dist/es/src/components/Loader/index.mjs +4 -0
- package/dist/es/src/components/Money/Money.vue.mjs +76 -0
- package/dist/es/src/components/Money/index.mjs +4 -0
- package/dist/es/src/components/Multisuggest/index.mjs +4 -0
- package/dist/es/src/components/OptionsList/OptionsList.vue.mjs +28 -0
- package/dist/es/src/components/OptionsList/index.mjs +4 -0
- package/dist/es/src/components/OptionsListItem/OptionsListItem.vue.mjs +96 -0
- package/dist/es/src/components/OptionsListItem/index.mjs +4 -0
- package/dist/es/src/components/Percent/Percent.vue.mjs +77 -0
- package/dist/es/src/components/Percent/index.mjs +4 -0
- package/dist/es/src/components/Skeleton/Skeleton.vue.mjs +79 -0
- package/dist/es/src/components/Skeleton/index.mjs +4 -0
- package/dist/es/src/components/Step/Step.vue.mjs +206 -0
- package/dist/es/src/components/Step/index.mjs +4 -0
- package/dist/es/src/components/Steps/Steps.vue.mjs +15 -0
- package/dist/es/src/components/Steps/index.mjs +4 -0
- package/dist/es/src/components/Tip/Tip.vue.mjs +165 -0
- package/dist/es/src/components/Tip/index.mjs +4 -0
- package/dist/es/src/components/index.mjs +22 -0
- package/dist/es/src/locale/i18nCreator.mjs +93 -0
- package/dist/es/src/locale/lang/pt-br.mjs +21 -0
- package/dist/es/src/main.mjs +18 -0
- package/dist/es/src/mixins/floatFormatter.mjs +42 -0
- package/dist/es/src/plugins/currency.mjs +69 -0
- package/dist/es/src/utils/constants.mjs +6 -0
- package/dist/es/src/utils/error.mjs +20 -0
- package/dist/es/src/utils/i18n.mjs +4 -0
- package/dist/es/src/utils/icon.mjs +9 -0
- package/dist/es/src/utils/index.mjs +8 -0
- package/dist/es/src/utils/runtime.mjs +50 -0
- package/dist/es/src/utils/scroll.mjs +26 -0
- package/dist/es/src/utils/strings.mjs +4 -0
- package/dist/es/src/utils/types.mjs +9 -0
- package/dist/es/src/utils/use-derived-namespace.mjs +15 -0
- package/dist/es/src/utils/use-form-common-props.mjs +25 -0
- package/dist/es/src/utils/use-form-item.mjs +61 -0
- package/dist/es/src/utils/use-id.mjs +35 -0
- package/dist/es/src/utils/use-input.mjs +31 -0
- package/{src/locale → dist}/lang/en.js +3 -2
- package/{src/locale → dist}/lang/pt-br.js +3 -2
- package/dist/lib/_virtual/_plugin-vue_export-helper.js +10 -0
- package/dist/lib/components.css +2391 -0
- package/dist/lib/node_modules/@element-plus/icons-vue/dist/index.js +148 -0
- package/dist/lib/node_modules/@popperjs/core/lib/enums.js +22 -0
- package/dist/lib/node_modules/@vue/shared/dist/shared.esm-bundler.js +28 -0
- package/dist/lib/node_modules/@vueuse/core/index.js +170 -0
- package/dist/lib/node_modules/@vueuse/shared/index.js +68 -0
- package/dist/lib/node_modules/element-plus/es/constants/size.js +4 -0
- package/dist/lib/node_modules/element-plus/es/hooks/use-focus-controller/index.js +64 -0
- package/dist/lib/node_modules/element-plus/es/hooks/use-id/index.js +30 -0
- package/dist/lib/node_modules/element-plus/es/hooks/use-locale/index.js +29 -0
- package/dist/lib/node_modules/element-plus/es/hooks/use-namespace/index.js +79 -0
- package/dist/lib/node_modules/element-plus/es/hooks/use-prop/index.js +11 -0
- package/dist/lib/node_modules/element-plus/es/hooks/use-size/index.js +20 -0
- package/dist/lib/node_modules/element-plus/es/locale/lang/en.js +182 -0
- package/dist/lib/node_modules/element-plus/es/utils/error.js +16 -0
- package/dist/lib/node_modules/element-plus/es/utils/types.js +9 -0
- package/dist/lib/node_modules/element-plus/es/utils/vue/props/runtime.js +42 -0
- package/dist/lib/src/components/Autosuggest/Autosuggest.vue.js +446 -0
- package/dist/lib/src/components/Autosuggest/Multisuggest.vue.js +17 -0
- package/dist/lib/src/components/Autosuggest/autosuggest-props.js +204 -0
- package/dist/lib/src/components/Autosuggest/core.js +62 -0
- package/dist/lib/src/components/Autosuggest/multisuggest-props.js +11 -0
- package/dist/lib/src/components/Autosuggest/option.vue.js +118 -0
- package/dist/lib/src/components/Autosuggest/select-dropdown.vue.js +62 -0
- package/dist/lib/src/components/Autosuggest/useOption.js +93 -0
- package/dist/lib/src/components/Autosuggest/useSelect.js +803 -0
- package/dist/lib/src/components/Inline/Inline.vue.js +130 -0
- package/dist/lib/src/components/Inline/index.js +4 -0
- package/dist/lib/src/components/InputNumber/InputNumber.vue.js +358 -0
- package/dist/lib/src/components/InputNumber/index.js +4 -0
- package/dist/lib/src/components/InputNumber/input-number.js +128 -0
- package/dist/lib/src/components/Loader/Loader.vue.js +59 -0
- package/dist/lib/src/components/Loader/index.js +4 -0
- package/dist/lib/src/components/Money/Money.vue.js +76 -0
- package/dist/lib/src/components/Money/index.js +4 -0
- package/dist/lib/src/components/Multisuggest/index.js +4 -0
- package/dist/lib/src/components/OptionsList/OptionsList.vue.js +28 -0
- package/dist/lib/src/components/OptionsList/index.js +4 -0
- package/dist/lib/src/components/OptionsListItem/OptionsListItem.vue.js +96 -0
- package/dist/lib/src/components/OptionsListItem/index.js +4 -0
- package/dist/lib/src/components/Percent/Percent.vue.js +77 -0
- package/dist/lib/src/components/Percent/index.js +4 -0
- package/dist/lib/src/components/Skeleton/Skeleton.vue.js +79 -0
- package/dist/lib/src/components/Skeleton/index.js +4 -0
- package/dist/lib/src/components/Step/Step.vue.js +206 -0
- package/dist/lib/src/components/Step/index.js +4 -0
- package/dist/lib/src/components/Steps/Steps.vue.js +15 -0
- package/dist/lib/src/components/Steps/index.js +4 -0
- package/dist/lib/src/components/Tip/Tip.vue.js +165 -0
- package/dist/lib/src/components/Tip/index.js +4 -0
- package/dist/lib/src/components/index.js +22 -0
- package/dist/lib/src/locale/i18nCreator.js +93 -0
- package/dist/lib/src/locale/lang/pt-br.js +21 -0
- package/dist/lib/src/main.js +18 -0
- package/dist/lib/src/mixins/floatFormatter.js +42 -0
- package/dist/lib/src/plugins/currency.js +69 -0
- package/dist/lib/src/utils/constants.js +6 -0
- package/dist/lib/src/utils/error.js +20 -0
- package/dist/lib/src/utils/i18n.js +4 -0
- package/dist/lib/src/utils/icon.js +9 -0
- package/dist/lib/src/utils/index.js +8 -0
- package/dist/lib/src/utils/runtime.js +50 -0
- package/dist/lib/src/utils/scroll.js +26 -0
- package/dist/lib/src/utils/strings.js +4 -0
- package/dist/lib/src/utils/types.js +12 -0
- package/dist/lib/src/utils/use-derived-namespace.js +15 -0
- package/dist/lib/src/utils/use-form-common-props.js +25 -0
- package/dist/lib/src/utils/use-form-item.js +61 -0
- package/dist/lib/src/utils/use-id.js +35 -0
- package/dist/lib/src/utils/use-input.js +31 -0
- package/package.json +84 -62
- package/dist/demo.html +0 -1
- package/dist/fonts/bevi-bold.7e4dcd11.woff +0 -0
- package/dist/fonts/bevi-bold.873def84.woff2 +0 -0
- package/dist/fonts/bevi-medium.6187e050.woff2 +0 -0
- package/dist/fonts/bevi-medium.65b3056d.woff +0 -0
- package/dist/fonts/bevi-regular.c89f126e.woff +0 -0
- package/dist/fonts/bevi-regular.f81e4b8f.woff2 +0 -0
- package/dist/tp.common.js +0 -2
- package/dist/tp.common.js.map +0 -1
- package/dist/tp.css +0 -167
- package/dist/tp.umd.js +0 -2
- package/dist/tp.umd.js.map +0 -1
- package/dist/tp.umd.min.js +0 -2
- package/dist/tp.umd.min.js.map +0 -1
- package/src/assets/scss/_fonts.scss +0 -27
- package/src/assets/scss/_functions.scss +0 -22
- package/src/assets/scss/_helpers.scss +0 -112
- package/src/assets/scss/_mixins.scss +0 -69
- package/src/assets/scss/_overrides.scss +0 -69
- package/src/assets/scss/_resass.scss +0 -83
- package/src/assets/scss/_variables.scss +0 -27
- package/src/assets/scss/index.scss +0 -11
- package/src/components/Autosuggest/Autosuggest.vue +0 -791
- package/src/components/Autosuggest/index.js +0 -3
- package/src/components/Dialog/Dialog.vue +0 -253
- package/src/components/Dialog/index.js +0 -3
- package/src/components/Inline/Inline.vue +0 -149
- package/src/components/Inline/index.js +0 -3
- package/src/components/InputNumber/InputNumber.vue +0 -430
- package/src/components/InputNumber/index.js +0 -3
- package/src/components/Loader/Loader.vue +0 -317
- package/src/components/Loader/animations.scss +0 -68
- package/src/components/Loader/index.js +0 -3
- package/src/components/Money/Money.vue +0 -82
- package/src/components/Money/index.js +0 -3
- package/src/components/Multisuggest/Multisuggest.vue +0 -858
- package/src/components/Multisuggest/index.js +0 -3
- package/src/components/OptionsList/OptionsList.vue +0 -61
- package/src/components/OptionsList/index.js +0 -3
- package/src/components/OptionsListItem/OptionsListItem.vue +0 -191
- package/src/components/OptionsListItem/index.js +0 -3
- package/src/components/Percent/Percent.vue +0 -81
- package/src/components/Percent/index.js +0 -3
- package/src/components/Skeleton/Skeleton.vue +0 -137
- package/src/components/Skeleton/index.js +0 -3
- package/src/components/Step/Step.vue +0 -230
- package/src/components/Step/index.js +0 -3
- package/src/components/Steps/Steps.vue +0 -18
- package/src/components/Steps/index.js +0 -3
- package/src/components/Tip/Tip.vue +0 -193
- package/src/components/Tip/index.js +0 -3
- package/src/components/index.js +0 -31
- package/src/locale/index.js +0 -78
- package/src/main.js +0 -26
- package/src/mixins/floatFormatter.js +0 -53
- package/src/mixins/locale.js +0 -9
- package/src/utils/currency.js +0 -180
- package/src/utils/filters.js +0 -84
|
@@ -1,791 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
v-clickoutside="handleClose"
|
|
4
|
-
class="el-select tp-autosuggest"
|
|
5
|
-
data-is-search="true"
|
|
6
|
-
:class="[selectSize ? 'el-select--' + selectSize : '']"
|
|
7
|
-
@click.stop="toggleMenu"
|
|
8
|
-
>
|
|
9
|
-
<el-tooltip
|
|
10
|
-
placement="top"
|
|
11
|
-
:manual="true"
|
|
12
|
-
:value="tooltipVisible"
|
|
13
|
-
:content="selectedLabel + ''"
|
|
14
|
-
:tabindex="-1"
|
|
15
|
-
>
|
|
16
|
-
<!-- Div é importante para funcionar o tooltip -->
|
|
17
|
-
<div />
|
|
18
|
-
</el-tooltip>
|
|
19
|
-
<el-input
|
|
20
|
-
:id="`${_id}-input`"
|
|
21
|
-
ref="reference"
|
|
22
|
-
v-model="selectedLabel"
|
|
23
|
-
type="text"
|
|
24
|
-
:placeholder="currentPlaceholder"
|
|
25
|
-
:name="name"
|
|
26
|
-
:autocomplete="autoComplete || autocomplete"
|
|
27
|
-
:size="selectSize"
|
|
28
|
-
:disabled="selectDisabled"
|
|
29
|
-
:readonly="readonly"
|
|
30
|
-
:validate-event="false"
|
|
31
|
-
:class="{ 'is-focus': visible }"
|
|
32
|
-
:tabindex="(multiple && filterable) ? '-1' : null"
|
|
33
|
-
popper-append-to-body="teste"
|
|
34
|
-
@focus="handleFocus"
|
|
35
|
-
@blur="handleBlur"
|
|
36
|
-
@keyup.native="debouncedOnInputChange"
|
|
37
|
-
@keydown.native.down.stop.prevent="navigateOptions('next')"
|
|
38
|
-
@keydown.native.up.stop.prevent="navigateOptions('prev')"
|
|
39
|
-
@keydown.native.enter.prevent="selectOption"
|
|
40
|
-
@keydown.native.esc.stop.prevent="visible = false"
|
|
41
|
-
@keydown.native.tab="visible = false"
|
|
42
|
-
@paste.native="debouncedOnInputChange"
|
|
43
|
-
@mouseenter.native="inputHovering = true"
|
|
44
|
-
@mouseleave.native="inputHovering = false"
|
|
45
|
-
>
|
|
46
|
-
<template v-if="prepend">
|
|
47
|
-
<template
|
|
48
|
-
v-if="$slots.prepend || typeof(prepend) == 'string'"
|
|
49
|
-
slot="prepend"
|
|
50
|
-
>
|
|
51
|
-
<slot name="prepend">
|
|
52
|
-
{{ prepend }}
|
|
53
|
-
</slot>
|
|
54
|
-
</template>
|
|
55
|
-
<template
|
|
56
|
-
v-else
|
|
57
|
-
slot="prepend"
|
|
58
|
-
>
|
|
59
|
-
<em class="far fa-search" />
|
|
60
|
-
</template>
|
|
61
|
-
</template>
|
|
62
|
-
|
|
63
|
-
<template
|
|
64
|
-
v-if="$slots.prefix"
|
|
65
|
-
slot="prefix"
|
|
66
|
-
>
|
|
67
|
-
<slot name="prefix" />
|
|
68
|
-
</template>
|
|
69
|
-
|
|
70
|
-
<template slot="append">
|
|
71
|
-
<el-row
|
|
72
|
-
type="flex"
|
|
73
|
-
:justify="selectedLabel ? 'space-between' : 'end'"
|
|
74
|
-
align="middle"
|
|
75
|
-
>
|
|
76
|
-
<em
|
|
77
|
-
v-if="selectedLabel && !selectDisabled"
|
|
78
|
-
:id="`${_id}-btn-clear`"
|
|
79
|
-
class="fa fa-times-circle icon-close"
|
|
80
|
-
@click.stop.prevent="clearTags"
|
|
81
|
-
/>
|
|
82
|
-
<el-row
|
|
83
|
-
align="middle"
|
|
84
|
-
type="flex"
|
|
85
|
-
justify="space-around"
|
|
86
|
-
class="rightContent"
|
|
87
|
-
>
|
|
88
|
-
<el-divider
|
|
89
|
-
direction="vertical"
|
|
90
|
-
class="dividerSuggest"
|
|
91
|
-
/>
|
|
92
|
-
|
|
93
|
-
<em
|
|
94
|
-
v-show="!showClose && !selectDisabled"
|
|
95
|
-
:id="`${_id}-btn-close`"
|
|
96
|
-
:class="['el-select__caret', 'el-input__icon', 'el-icon-' + iconClass]"
|
|
97
|
-
/>
|
|
98
|
-
</el-row>
|
|
99
|
-
</el-row>
|
|
100
|
-
</template>
|
|
101
|
-
</el-input>
|
|
102
|
-
<transition
|
|
103
|
-
name="el-zoom-in-top"
|
|
104
|
-
@before-enter="handleMenuEnter"
|
|
105
|
-
@after-leave="doDestroy"
|
|
106
|
-
>
|
|
107
|
-
<el-select-menu
|
|
108
|
-
v-show="visible && emptyText !== false"
|
|
109
|
-
:id="`${_id}-select`"
|
|
110
|
-
ref="popper"
|
|
111
|
-
:append-to-body="popperAppendToBody"
|
|
112
|
-
>
|
|
113
|
-
<el-scrollbar
|
|
114
|
-
v-show="options.length > 0 && !loading"
|
|
115
|
-
:id="`${_id}-scrollbar`"
|
|
116
|
-
ref="scrollbar"
|
|
117
|
-
tag="ul"
|
|
118
|
-
wrap-class="tp-select-dropdown__wrap el-select-dropdown__wrap"
|
|
119
|
-
view-class="tp-select-dropdown__list el-select-dropdown__list"
|
|
120
|
-
:class="{ 'is-empty': !allowCreate && query && filteredOptionsCount === 0 }"
|
|
121
|
-
>
|
|
122
|
-
<el-option
|
|
123
|
-
v-for="(item, i) in suggestionsList"
|
|
124
|
-
:id="`${_id}-option-${i}`"
|
|
125
|
-
:key="i"
|
|
126
|
-
:label="item[labelKey]"
|
|
127
|
-
:value="item[valueKey]"
|
|
128
|
-
:created="item.created"
|
|
129
|
-
:class="{'created': item.created}"
|
|
130
|
-
>
|
|
131
|
-
<template v-if="item.created">
|
|
132
|
-
<a :id="`${_id}-btn-create`"><em class="far fa-plus" /> {{ newItem }}</a>
|
|
133
|
-
</template>
|
|
134
|
-
<slot
|
|
135
|
-
v-else
|
|
136
|
-
:item="item"
|
|
137
|
-
/>
|
|
138
|
-
</el-option>
|
|
139
|
-
</el-scrollbar>
|
|
140
|
-
<template v-if="emptyText && (!allowCreate || loading || (allowCreate && options.length === 0 ))">
|
|
141
|
-
<slot
|
|
142
|
-
v-if="$slots.empty"
|
|
143
|
-
name="empty"
|
|
144
|
-
/>
|
|
145
|
-
<p
|
|
146
|
-
v-else-if="loading"
|
|
147
|
-
class="tp-autosuggest-loading"
|
|
148
|
-
>
|
|
149
|
-
<tp-skeleton :count="4" />
|
|
150
|
-
</p>
|
|
151
|
-
<p
|
|
152
|
-
v-else
|
|
153
|
-
class="el-select-dropdown__empty"
|
|
154
|
-
>
|
|
155
|
-
{{ emptyText }}
|
|
156
|
-
</p>
|
|
157
|
-
</template>
|
|
158
|
-
</el-select-menu>
|
|
159
|
-
</transition>
|
|
160
|
-
</div>
|
|
161
|
-
</template>
|
|
162
|
-
|
|
163
|
-
<script>
|
|
164
|
-
import debounce from 'throttle-debounce/debounce'
|
|
165
|
-
import { Select } from 'element-ui'
|
|
166
|
-
import { getValueByPath, valueEquals } from 'element-ui/src/utils/util'
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Cria um select com opções obtidas de forma assíncrona e remota.
|
|
170
|
-
* Basicamente um atalho de configurações
|
|
171
|
-
* Vide documentação ElementUI: https://element.eleme.io/#/en-US/component/select
|
|
172
|
-
*/
|
|
173
|
-
export default {
|
|
174
|
-
name: 'TpAutosuggest',
|
|
175
|
-
|
|
176
|
-
extends: Select,
|
|
177
|
-
|
|
178
|
-
props: {
|
|
179
|
-
value: {
|
|
180
|
-
type: [Boolean, String, Object, Number, Array],
|
|
181
|
-
required: false,
|
|
182
|
-
default: ''
|
|
183
|
-
},
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* Substituição do valor padrão em relação ao ElementUi
|
|
187
|
-
*/
|
|
188
|
-
remote: {
|
|
189
|
-
type: Boolean,
|
|
190
|
-
required: false,
|
|
191
|
-
default: true
|
|
192
|
-
},
|
|
193
|
-
/**
|
|
194
|
-
* Lista ou Objeto contendo conjunto de itens como opções ou sugestões do componente
|
|
195
|
-
*/
|
|
196
|
-
suggestions: {
|
|
197
|
-
type: [Array, Object],
|
|
198
|
-
required: true
|
|
199
|
-
},
|
|
200
|
-
/**
|
|
201
|
-
* Informa o campo correspondente em cada item referente ao valor sendo selecionado
|
|
202
|
-
*/
|
|
203
|
-
valueKey: {
|
|
204
|
-
type: String,
|
|
205
|
-
default: 'id'
|
|
206
|
-
},
|
|
207
|
-
/**
|
|
208
|
-
* Identificação do campo correspondente em cada item referente ao texto de exibição.
|
|
209
|
-
* Quando utilizado o slot de itens, este campo passa a não ser utilizado
|
|
210
|
-
*/
|
|
211
|
-
labelKey: {
|
|
212
|
-
type: String,
|
|
213
|
-
default: 'label'
|
|
214
|
-
},
|
|
215
|
-
/**
|
|
216
|
-
* Indica quando o campo pode ser utilizado como filtro.
|
|
217
|
-
* Sobrescreve valor padrão do atributo no Select do ElementUI
|
|
218
|
-
*/
|
|
219
|
-
filterable: {
|
|
220
|
-
type: Boolean,
|
|
221
|
-
required: false,
|
|
222
|
-
default: true
|
|
223
|
-
},
|
|
224
|
-
/**
|
|
225
|
-
* Sobrescreve valor padrão do atributo no Select do ElementUI
|
|
226
|
-
*/
|
|
227
|
-
reserveKeyword: {
|
|
228
|
-
type: Boolean,
|
|
229
|
-
required: false,
|
|
230
|
-
default: true
|
|
231
|
-
},
|
|
232
|
-
/**
|
|
233
|
-
* Sobrescreve valor padrão do atributo no Select do ElementUI
|
|
234
|
-
*/
|
|
235
|
-
defaultFirstOption: {
|
|
236
|
-
type: Boolean,
|
|
237
|
-
required: false,
|
|
238
|
-
default: true
|
|
239
|
-
},
|
|
240
|
-
/**
|
|
241
|
-
* Sobrescreve valor padrão do atributo no Select do ElementUI
|
|
242
|
-
*/
|
|
243
|
-
loadOnCreate: {
|
|
244
|
-
type: Boolean,
|
|
245
|
-
required: false,
|
|
246
|
-
default: true
|
|
247
|
-
},
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
* Quando Boolean: identifica se exibe ou não o ícone de lupa. "False" oculta prepend.
|
|
251
|
-
* Quando String: Informa o texto a ser inserido no prepend
|
|
252
|
-
*/
|
|
253
|
-
prepend: {
|
|
254
|
-
type: [Boolean, String],
|
|
255
|
-
required: false,
|
|
256
|
-
default: true
|
|
257
|
-
},
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* Método que realiza a busca dos registros remotos para as opções.
|
|
261
|
-
*
|
|
262
|
-
* *IMPORTANTE*: deve considerar o "valueKey" nas consultas
|
|
263
|
-
* pois o valor selecionado será baseado nas opções remotas carregadas ao criar o componente.
|
|
264
|
-
*/
|
|
265
|
-
remoteMethod: {
|
|
266
|
-
type: Function,
|
|
267
|
-
required: true
|
|
268
|
-
},
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Informa a mensagem de cadastrar novo item
|
|
272
|
-
*/
|
|
273
|
-
msgNewItem: {
|
|
274
|
-
type: String,
|
|
275
|
-
required: false,
|
|
276
|
-
default: 'Cadastrar novo item'
|
|
277
|
-
}
|
|
278
|
-
},
|
|
279
|
-
|
|
280
|
-
data () {
|
|
281
|
-
return {
|
|
282
|
-
tooltipVisible: false,
|
|
283
|
-
modifiedLabel: null
|
|
284
|
-
}
|
|
285
|
-
},
|
|
286
|
-
|
|
287
|
-
computed: {
|
|
288
|
-
_id () {
|
|
289
|
-
return this.id || this.$options.name
|
|
290
|
-
},
|
|
291
|
-
newItem () {
|
|
292
|
-
return this.query
|
|
293
|
-
? this.$tpI18n.t('autosuggests.cadastrar', { nameItem: this.query })
|
|
294
|
-
: this.$tpI18n.t(`autosuggests.newItem.${this.$parent.$options.name}`)
|
|
295
|
-
},
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* Trata o caso que o autosuggest recebe um objeto com o valueKey e labelKey
|
|
299
|
-
*/
|
|
300
|
-
formatedValue () {
|
|
301
|
-
let newVal = ''
|
|
302
|
-
if (typeof this.value === 'boolean') {
|
|
303
|
-
newVal = ''
|
|
304
|
-
} else if (Array.isArray(this.value)) {
|
|
305
|
-
newVal = this.value
|
|
306
|
-
} else if (this.value && typeof this.value === 'object') {
|
|
307
|
-
if (!Object.keys(newVal).length) { return {} }
|
|
308
|
-
if (!this.value[this.valueKey] && this.value[this.valueKey] !== '') {
|
|
309
|
-
if (process.env.DEBUG === 'true') {
|
|
310
|
-
console.error(
|
|
311
|
-
`Autosuggest '${this.$options.name}' option doesn't have a valueKey '${this.valueKey}' key`
|
|
312
|
-
)
|
|
313
|
-
}
|
|
314
|
-
} else {
|
|
315
|
-
newVal = this.value[this.valueKey]
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
return newVal
|
|
320
|
-
},
|
|
321
|
-
iconClass () {
|
|
322
|
-
return this.visible ? 'arrow-up is-reverse' : 'arrow-up'
|
|
323
|
-
},
|
|
324
|
-
showNewOption () {
|
|
325
|
-
const hasExistingOption = this.options
|
|
326
|
-
.filter(option => !option.created)
|
|
327
|
-
.some(option => option.currentLabel === this.query)
|
|
328
|
-
|
|
329
|
-
return this.filterable && this.allowCreate && !hasExistingOption
|
|
330
|
-
},
|
|
331
|
-
// Monta a lista com ou sem "Cadastrar Novo Item"
|
|
332
|
-
suggestionsList () {
|
|
333
|
-
if (this.loading) return []
|
|
334
|
-
|
|
335
|
-
// transformando em Array
|
|
336
|
-
const list =
|
|
337
|
-
typeof this.suggestions === 'object'
|
|
338
|
-
? Object.values(this.suggestions)
|
|
339
|
-
: this.suggestions
|
|
340
|
-
|
|
341
|
-
if (this.allowCreate) {
|
|
342
|
-
const createdSuggestion = { created: true }
|
|
343
|
-
|
|
344
|
-
createdSuggestion[this.valueKey] = this.query !== '' ? this.query : null
|
|
345
|
-
createdSuggestion[this.labelKey] = ''
|
|
346
|
-
list.push(createdSuggestion)
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
return list
|
|
350
|
-
},
|
|
351
|
-
|
|
352
|
-
emptyText () {
|
|
353
|
-
if (this.loading) {
|
|
354
|
-
return this.loadingText || this.t('el.select.loading')
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
if (this.remote && this.query === '' && this.options.length === 0) {
|
|
358
|
-
return this.noDataText || this.$tpI18n.t('autosuggests.sem_dados')
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
if (this.filterable && this.query && this.options.length > 0 && this.filteredOptionsCount === 0) {
|
|
362
|
-
return this.noMatchText || this.t('el.select.noMatch')
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
if (this.options.length === 0) {
|
|
366
|
-
return this.noDataText || this.$tpI18n.t('autosuggests.sem_dados')
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
return null
|
|
370
|
-
}
|
|
371
|
-
},
|
|
372
|
-
|
|
373
|
-
created () {
|
|
374
|
-
this.debouncedOnInputChange = debounce(this.debounce, e => {
|
|
375
|
-
// Correção para mobile ativar a busca enquanto digita
|
|
376
|
-
if (e.isComposing) {
|
|
377
|
-
// Se está apagando
|
|
378
|
-
if (e.target.value === '') {
|
|
379
|
-
this.selectedLabel = this.selectedLabel.slice(0, -1)
|
|
380
|
-
} else {
|
|
381
|
-
// Pega valor ignorando composition mode
|
|
382
|
-
this.selectedLabel = e.target.value
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
this.onInputChange(e)
|
|
387
|
-
})
|
|
388
|
-
},
|
|
389
|
-
|
|
390
|
-
beforeMount () {
|
|
391
|
-
this.doRequest = false
|
|
392
|
-
|
|
393
|
-
if (this.loadOnCreate) {
|
|
394
|
-
this.previousQuery = false
|
|
395
|
-
// Chama função do element-ui select que faz o remote method
|
|
396
|
-
this.handleQueryChange('')
|
|
397
|
-
} else {
|
|
398
|
-
// Marca para fazer a requisição no primeiro clique
|
|
399
|
-
this.doRequest = true
|
|
400
|
-
}
|
|
401
|
-
},
|
|
402
|
-
|
|
403
|
-
mounted () {
|
|
404
|
-
this.$nextTick(() => {
|
|
405
|
-
// Componente tooltip -> autosuggest -> input
|
|
406
|
-
const componenteInputInterno = this.$children[1].$refs.input
|
|
407
|
-
|
|
408
|
-
// Mostra o tooltip só quando
|
|
409
|
-
this.createHandler(componenteInputInterno, 'mouseenter', () => {
|
|
410
|
-
if (this.selectedLabel) {
|
|
411
|
-
this.tooltipVisible = true
|
|
412
|
-
}
|
|
413
|
-
})
|
|
414
|
-
this.createHandler(componenteInputInterno, 'mouseleave', () => {
|
|
415
|
-
this.tooltipVisible = false
|
|
416
|
-
})
|
|
417
|
-
document.addEventListener('focusin', this.fixElSelect)
|
|
418
|
-
document.addEventListener('click', this.fixElSelect)
|
|
419
|
-
document.addEventListener('touchstart', this.fixElSelect)
|
|
420
|
-
})
|
|
421
|
-
},
|
|
422
|
-
|
|
423
|
-
beforeDestroy () {
|
|
424
|
-
document.removeEventListener('focusin', this.fixElSelect, false)
|
|
425
|
-
document.removeEventListener('click', this.fixElSelect, false)
|
|
426
|
-
document.removeEventListener('touchstart', this.fixElSelect, false)
|
|
427
|
-
},
|
|
428
|
-
|
|
429
|
-
methods: {
|
|
430
|
-
/**
|
|
431
|
-
* Adiciona um evento no elemento dinamicamente
|
|
432
|
-
* @args el {Object} Elemento que tem o listener
|
|
433
|
-
* @args ev {String} Nome do listener (mouseenter, click, etc)
|
|
434
|
-
* @args func {Function} Função a ser executada
|
|
435
|
-
*/
|
|
436
|
-
createHandler (el, ev, func) {
|
|
437
|
-
if (el) {
|
|
438
|
-
el.addEventListener(
|
|
439
|
-
ev,
|
|
440
|
-
() => {
|
|
441
|
-
func()
|
|
442
|
-
},
|
|
443
|
-
false
|
|
444
|
-
)
|
|
445
|
-
}
|
|
446
|
-
},
|
|
447
|
-
|
|
448
|
-
onInputChange () {
|
|
449
|
-
if (this.filterable && this.query !== this.selectedLabel) {
|
|
450
|
-
this.query = this.selectedLabel
|
|
451
|
-
this.handleQueryChange(this.query)
|
|
452
|
-
}
|
|
453
|
-
},
|
|
454
|
-
|
|
455
|
-
emitChange (val) {
|
|
456
|
-
if (!valueEquals(this.formatedValue, val)) {
|
|
457
|
-
this.$nextTick(() => {
|
|
458
|
-
this.$emit('change', val, this.createdSelected)
|
|
459
|
-
})
|
|
460
|
-
}
|
|
461
|
-
},
|
|
462
|
-
|
|
463
|
-
// eslint-disable-next-line no-unused-vars
|
|
464
|
-
clearTags (event) {
|
|
465
|
-
this.selectedLabel = ''
|
|
466
|
-
// Faz uma requisição limpa
|
|
467
|
-
this.query = ''
|
|
468
|
-
this.doRequest = true
|
|
469
|
-
this.previousQuery = ''
|
|
470
|
-
this.handleQueryChange(this.query)
|
|
471
|
-
|
|
472
|
-
// Eventos ao limpar
|
|
473
|
-
this.$emit('input', null)
|
|
474
|
-
|
|
475
|
-
if (typeof this.value === 'undefined') {
|
|
476
|
-
this.$emit('change', null, null)
|
|
477
|
-
} else {
|
|
478
|
-
this.$emit('change', null, this.value)
|
|
479
|
-
}
|
|
480
|
-
},
|
|
481
|
-
|
|
482
|
-
/**
|
|
483
|
-
* Sobrescreve o getOption do select para mostrar o labelValue em vez do idValue
|
|
484
|
-
*/
|
|
485
|
-
getOption (val) {
|
|
486
|
-
let value = ''
|
|
487
|
-
let initialLabel = false
|
|
488
|
-
if (typeof this.value === 'boolean') {
|
|
489
|
-
value = ''
|
|
490
|
-
} else if (Array.isArray(val)) {
|
|
491
|
-
value = val
|
|
492
|
-
} else if (val && typeof val === 'object') {
|
|
493
|
-
if (!Object.keys(val).length) { return {} }
|
|
494
|
-
// Se val for Object converte para outro tipo
|
|
495
|
-
if (!this.value[this.valueKey] && this.value[this.valueKey] !== '') {
|
|
496
|
-
console.error(
|
|
497
|
-
`Autosuggest '${this.$options.name}' option doesn't have a valueKey '${this.valueKey}' key`
|
|
498
|
-
)
|
|
499
|
-
} else {
|
|
500
|
-
// Se mandou a label no objeto value
|
|
501
|
-
if (this.value[this.labelKey]) {
|
|
502
|
-
initialLabel = this.value[this.labelKey]
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
value = this.value[this.valueKey]
|
|
506
|
-
}
|
|
507
|
-
} else {
|
|
508
|
-
value = val
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
let option
|
|
512
|
-
const isObject =
|
|
513
|
-
Object.prototype.toString.call(value).toLowerCase() ===
|
|
514
|
-
'[object object]'
|
|
515
|
-
const isNull =
|
|
516
|
-
Object.prototype.toString.call(value).toLowerCase() === '[object null]'
|
|
517
|
-
const isUndefined =
|
|
518
|
-
Object.prototype.toString.call(value).toLowerCase() ===
|
|
519
|
-
'[object undefined]'
|
|
520
|
-
|
|
521
|
-
for (let i = 0; i <= this.cachedOptions.length - 1; i++) {
|
|
522
|
-
const cachedOption = this.cachedOptions[i]
|
|
523
|
-
let isEqual = false
|
|
524
|
-
if (isObject) {
|
|
525
|
-
isEqual = getValueByPath(cachedOption.value, this.valueKey) === getValueByPath(value, this.valueKey)
|
|
526
|
-
} else {
|
|
527
|
-
isEqual = cachedOption.value === value
|
|
528
|
-
if (initialLabel) {
|
|
529
|
-
this.modifiedLabel = initialLabel
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
if (isEqual) {
|
|
534
|
-
option = cachedOption
|
|
535
|
-
break
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
if (option) return option
|
|
540
|
-
|
|
541
|
-
const label = !isObject && !isNull && !isUndefined ? value : ''
|
|
542
|
-
const newOption = {
|
|
543
|
-
value,
|
|
544
|
-
currentLabel: this.modifiedLabel || label
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
if (this.multiple) {
|
|
548
|
-
newOption.hitState = false
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
return newOption
|
|
552
|
-
},
|
|
553
|
-
|
|
554
|
-
checkDefaultFirstOption () {
|
|
555
|
-
this.$nextTick(() => {
|
|
556
|
-
this.hoverIndex = -1
|
|
557
|
-
|
|
558
|
-
for (let i = 0; i !== this.options.length; ++i) {
|
|
559
|
-
const option = this.options[i]
|
|
560
|
-
|
|
561
|
-
if (this.query) {
|
|
562
|
-
// highlight first options that passes the filter
|
|
563
|
-
if (!option.disabled && !option.groupDisabled && option.visible) {
|
|
564
|
-
this.hoverIndex = i
|
|
565
|
-
break
|
|
566
|
-
}
|
|
567
|
-
} else {
|
|
568
|
-
// highlight currently selected option
|
|
569
|
-
if (option.itemSelected) {
|
|
570
|
-
this.hoverIndex = i
|
|
571
|
-
break
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
})
|
|
576
|
-
},
|
|
577
|
-
/**
|
|
578
|
-
* Sobrescreve a função de abrir menu do select para fazer a busca quando loadOnCreate = false
|
|
579
|
-
*/
|
|
580
|
-
toggleMenu () {
|
|
581
|
-
if (!this.selectDisabled) {
|
|
582
|
-
// Se mantem visivel quando clica nele aberto
|
|
583
|
-
if (this.menuVisibleOnFocus) {
|
|
584
|
-
this.menuVisibleOnFocus = false
|
|
585
|
-
} else {
|
|
586
|
-
this.visible = !this.visible
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
if (this.doRequest) {
|
|
590
|
-
this.handleQueryChange(this.query)
|
|
591
|
-
this.doRequest = false
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
(this.$refs.input || this.$refs.reference).focus()
|
|
595
|
-
}
|
|
596
|
-
},
|
|
597
|
-
|
|
598
|
-
handleClose () {
|
|
599
|
-
this.visible = false
|
|
600
|
-
// Limpa busca quando fecha
|
|
601
|
-
this.doRequest = true
|
|
602
|
-
},
|
|
603
|
-
|
|
604
|
-
/**
|
|
605
|
-
* Sobrescreve função do select
|
|
606
|
-
*/
|
|
607
|
-
handleQueryChange (val) {
|
|
608
|
-
const _this6 = this
|
|
609
|
-
|
|
610
|
-
// Correção aqui para forçar primeeira request com createOnLoad = false
|
|
611
|
-
if (
|
|
612
|
-
(!this.doRequest && this.previousQuery === val) ||
|
|
613
|
-
this.isOnComposition
|
|
614
|
-
) { return }
|
|
615
|
-
|
|
616
|
-
if (
|
|
617
|
-
this.previousQuery === null &&
|
|
618
|
-
(typeof this.filterMethod === 'function' ||
|
|
619
|
-
typeof this.remoteMethod === 'function')
|
|
620
|
-
) {
|
|
621
|
-
this.previousQuery = val
|
|
622
|
-
|
|
623
|
-
return
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
this.previousQuery = val
|
|
627
|
-
this.$nextTick(() => {
|
|
628
|
-
if (_this6.visible) _this6.broadcast('ElSelectDropdown', 'updatePopper')
|
|
629
|
-
})
|
|
630
|
-
this.hoverIndex = -1
|
|
631
|
-
|
|
632
|
-
if (this.multiple && this.filterable) {
|
|
633
|
-
this.$nextTick(() => {
|
|
634
|
-
const length = _this6.$refs.input.value.length * 15 + 20
|
|
635
|
-
|
|
636
|
-
_this6.inputLength = _this6.collapseTags
|
|
637
|
-
? Math.min(50, length)
|
|
638
|
-
: length
|
|
639
|
-
_this6.managePlaceholder()
|
|
640
|
-
_this6.resetInputHeight()
|
|
641
|
-
})
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
if (this.remote && typeof this.remoteMethod === 'function') {
|
|
645
|
-
this.hoverIndex = -1
|
|
646
|
-
this.remoteMethod(val)
|
|
647
|
-
} else if (typeof this.filterMethod === 'function') {
|
|
648
|
-
this.filterMethod(val)
|
|
649
|
-
this.broadcast('ElOptionGroup', 'queryChange')
|
|
650
|
-
} else {
|
|
651
|
-
this.filteredOptionsCount = this.optionsCount
|
|
652
|
-
this.broadcast('ElOption', 'queryChange', val)
|
|
653
|
-
this.broadcast('ElOptionGroup', 'queryChange')
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
if (
|
|
657
|
-
this.defaultFirstOption &&
|
|
658
|
-
(this.filterable || this.remote) &&
|
|
659
|
-
this.filteredOptionsCount
|
|
660
|
-
) {
|
|
661
|
-
this.checkDefaultFirstOption()
|
|
662
|
-
}
|
|
663
|
-
},
|
|
664
|
-
|
|
665
|
-
// Correção para habilitar teclado mobile em iOS
|
|
666
|
-
fixElSelect () {
|
|
667
|
-
document
|
|
668
|
-
.querySelectorAll('.el-select[data-is-search="true"]:hover')
|
|
669
|
-
.forEach(() => {
|
|
670
|
-
const elInput = document.querySelector(
|
|
671
|
-
'.el-select[data-is-search="true"]:hover input[readonly]'
|
|
672
|
-
)
|
|
673
|
-
|
|
674
|
-
if (elInput) {
|
|
675
|
-
elInput.readOnly = false
|
|
676
|
-
elInput.blur()
|
|
677
|
-
elInput.focus()
|
|
678
|
-
}
|
|
679
|
-
})
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
</script>
|
|
684
|
-
|
|
685
|
-
<style lang="scss" scoped>
|
|
686
|
-
:deep(){
|
|
687
|
-
.el-input-group__append {
|
|
688
|
-
padding: 0px 6px 0px 0px;
|
|
689
|
-
border: 0;
|
|
690
|
-
width: 58px;
|
|
691
|
-
max-width: 58px;
|
|
692
|
-
.rightContent {
|
|
693
|
-
width: 40px;
|
|
694
|
-
max-width: 40px;
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
input.el-input__inner {
|
|
700
|
-
margin-right: 0px;
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
.el-input__icon {
|
|
704
|
-
width: auto;
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
.icon-close {
|
|
708
|
-
color: #606266;
|
|
709
|
-
cursor: pointer;
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
.el-select .el-input__inner {
|
|
713
|
-
padding-right: 15px;
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
.dividerSuggest {
|
|
717
|
-
height: 33.59px;
|
|
718
|
-
margin: 0px;
|
|
719
|
-
}
|
|
720
|
-
.tp-autosuggest.el-select {
|
|
721
|
-
> .el-input {
|
|
722
|
-
display: inline-table;
|
|
723
|
-
}
|
|
724
|
-
.el-input__suffix {
|
|
725
|
-
cursor: pointer;
|
|
726
|
-
}
|
|
727
|
-
.el-button.is-circle {
|
|
728
|
-
padding: 3px;
|
|
729
|
-
&:hover {
|
|
730
|
-
background-color: #c0c4cc25;
|
|
731
|
-
border: 1px solid #dcdfe6;
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
|
|
735
|
-
.el-icon-close {
|
|
736
|
-
color: #c0c4cc;
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
.padding-x {
|
|
741
|
-
padding-right: 2px;
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
.tp-autosuggest-loading {
|
|
745
|
-
text-align: center;
|
|
746
|
-
font-size: 1.5em;
|
|
747
|
-
padding: 10px;
|
|
748
|
-
margin: 0;
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
.tp-select-dropdown__list.el-select-dropdown__list {
|
|
752
|
-
li.el-select-dropdown__item {
|
|
753
|
-
line-height: 1.5em;
|
|
754
|
-
height: auto;
|
|
755
|
-
padding: $--popover-padding;
|
|
756
|
-
position: relative;
|
|
757
|
-
transition: 100ms all linear;
|
|
758
|
-
|
|
759
|
-
&.hover {
|
|
760
|
-
padding-left: 20px;
|
|
761
|
-
|
|
762
|
-
&::before {
|
|
763
|
-
position: absolute;
|
|
764
|
-
display: inline-block;
|
|
765
|
-
width: 4px;
|
|
766
|
-
top: 5px;
|
|
767
|
-
bottom: 5px;
|
|
768
|
-
left: 5px;
|
|
769
|
-
background: $--color-primary;
|
|
770
|
-
border-radius: 2px;
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
&.selected {
|
|
775
|
-
color: $--color-text-regular;
|
|
776
|
-
}
|
|
777
|
-
&.created a {
|
|
778
|
-
color: $--color-primary;
|
|
779
|
-
font-weight: normal;
|
|
780
|
-
border-bottom: 1px solid $--color-primary;
|
|
781
|
-
line-height: 1.5em;
|
|
782
|
-
display: inline-block;
|
|
783
|
-
}
|
|
784
|
-
|
|
785
|
-
small {
|
|
786
|
-
font-size: $--font-size-base;
|
|
787
|
-
color: mix($--color-white, $--color-text-secondary, 40%);
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
</style>
|