layers-design-system 2.4.0 → 2.6.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/dist/layers-design-system.js +78505 -0
- package/dist/layers-design-system.umd.cjs +285 -0
- package/dist/style.css +1 -0
- package/package.json +26 -12
- package/.nvmrc +0 -1
- package/babel.config.js +0 -5
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -20
- package/src/assets/button-text-editor/double-quotes.svg +0 -4
- package/src/assets/button-text-editor/remove-formatting.svg +0 -5
- package/src/assets/button-text-editor/title.svg +0 -4
- package/src/assets/failed-to-load/failed-to-load.svg +0 -60
- package/src/assets/l-presentation/external-apps.png +0 -0
- package/src/assets/l-presentation/notification.png +0 -0
- package/src/assets/search-topics/empty-tags.svg +0 -59
- package/src/components/LAlert/docs.vue +0 -81
- package/src/components/LAlert/index.vue +0 -43
- package/src/components/LAttachmentChip/docs.vue +0 -84
- package/src/components/LAttachmentChip/index.vue +0 -179
- package/src/components/LBox/docs.vue +0 -26
- package/src/components/LBox/index.vue +0 -19
- package/src/components/LBoxHeader/index.vue +0 -24
- package/src/components/LBreadcrumb/docs.vue +0 -21
- package/src/components/LBreadcrumb/index.vue +0 -22
- package/src/components/LBreadcrumbItem/index.vue +0 -7
- package/src/components/LButton/docs.vue +0 -205
- package/src/components/LButton/index.vue +0 -369
- package/src/components/LButtonGroup/index.vue +0 -7
- package/src/components/LCarousel/docs.vue +0 -32
- package/src/components/LCarousel/index.vue +0 -88
- package/src/components/LCheckbox/docs.vue +0 -62
- package/src/components/LCheckbox/index.vue +0 -34
- package/src/components/LCheckboxButton/index.vue +0 -30
- package/src/components/LCheckboxGroup/index.vue +0 -53
- package/src/components/LChip/docs.vue +0 -113
- package/src/components/LChip/index.vue +0 -78
- package/src/components/LCircularLoader/docs.vue +0 -30
- package/src/components/LCircularLoader/index.vue +0 -97
- package/src/components/LCollapse/docs.vue +0 -68
- package/src/components/LCollapse/index.vue +0 -13
- package/src/components/LCollapseItem/index.vue +0 -28
- package/src/components/LDatePicker/docs.vue +0 -66
- package/src/components/LDatePicker/index.vue +0 -63
- package/src/components/LDialog/docs.vue +0 -36
- package/src/components/LDialog/index.vue +0 -37
- package/src/components/LDropdown/index.vue +0 -7
- package/src/components/LDropdownItem/index.vue +0 -13
- package/src/components/LDropdownMenu/docs.vue +0 -44
- package/src/components/LDropdownMenu/index.vue +0 -12
- package/src/components/LFailedToLoad/docs.vue +0 -37
- package/src/components/LFailedToLoad/index.vue +0 -61
- package/src/components/LForm/index.vue +0 -7
- package/src/components/LFormItem/index.vue +0 -12
- package/src/components/LHelperBox/assets/link.svg +0 -4
- package/src/components/LHelperBox/assets/open-envelope.svg +0 -9
- package/src/components/LHelperBox/docs.vue +0 -29
- package/src/components/LHelperBox/index.vue +0 -83
- package/src/components/LIcon/docs.vue +0 -174
- package/src/components/LIcon/index.vue +0 -55
- package/src/components/LImage/index.vue +0 -7
- package/src/components/LImageViewer/docs.vue +0 -111
- package/src/components/LImageViewer/index.vue +0 -449
- package/src/components/LInput/docs.vue +0 -43
- package/src/components/LInput/index.vue +0 -60
- package/src/components/LLinearProgress/docs.vue +0 -21
- package/src/components/LLinearProgress/index.vue +0 -74
- package/src/components/LNotice/docs.vue +0 -26
- package/src/components/LNotice/index.vue +0 -86
- package/src/components/LNotification/index.vue +0 -182
- package/src/components/LOption/index.vue +0 -7
- package/src/components/LOptionGroup/index.vue +0 -7
- package/src/components/LPresentation/docs.vue +0 -35
- package/src/components/LPresentation/index.vue +0 -182
- package/src/components/LProgress/index.vue +0 -7
- package/src/components/LPromptDialog/index.vue +0 -82
- package/src/components/LRadio/docs.vue +0 -54
- package/src/components/LRadio/index.vue +0 -13
- package/src/components/LRadioButton/index.vue +0 -30
- package/src/components/LRadioGroup/index.vue +0 -54
- package/src/components/LSearchBar/AddFilterButton.vue +0 -71
- package/src/components/LSearchBar/Filters/Editors/AmountEditor.vue +0 -110
- package/src/components/LSearchBar/Filters/Editors/DateEditor.vue +0 -146
- package/src/components/LSearchBar/Filters/Editors/NumberEditor.vue +0 -141
- package/src/components/LSearchBar/Filters/Editors/StringEditor.vue +0 -140
- package/src/components/LSearchBar/Filters/Editors/index.js +0 -16
- package/src/components/LSearchBar/Filters/FilterChip.vue +0 -105
- package/src/components/LSearchBar/Filters/Views/AmountView.vue +0 -28
- package/src/components/LSearchBar/Filters/Views/DateView.vue +0 -46
- package/src/components/LSearchBar/Filters/Views/NumberView.vue +0 -24
- package/src/components/LSearchBar/Filters/Views/StringView.vue +0 -47
- package/src/components/LSearchBar/Filters/Views/index.js +0 -16
- package/src/components/LSearchBar/docs.vue +0 -60
- package/src/components/LSearchBar/index.vue +0 -240
- package/src/components/LSearchTopics/RecentTermSearched.vue +0 -30
- package/src/components/LSearchTopics/TopicItem.vue +0 -346
- package/src/components/LSearchTopics/docs/drawer.vue +0 -254
- package/src/components/LSearchTopics/docs.vue +0 -60
- package/src/components/LSearchTopics/header.vue +0 -199
- package/src/components/LSearchTopics/helpers/showDialogConfirmation.js +0 -30
- package/src/components/LSearchTopics/helpers/showDiscardChangesDialog.js +0 -27
- package/src/components/LSearchTopics/index.vue +0 -750
- package/src/components/LSelect/docs.vue +0 -129
- package/src/components/LSelect/index.vue +0 -9
- package/src/components/LSlider/index.vue +0 -7
- package/src/components/LSwitch/docs.vue +0 -24
- package/src/components/LSwitch/index.vue +0 -60
- package/src/components/LTabPane/index.vue +0 -7
- package/src/components/LTable/FieldTypes/AmountView.vue +0 -16
- package/src/components/LTable/FieldTypes/DateView.vue +0 -18
- package/src/components/LTable/FieldTypes/EmailView.vue +0 -8
- package/src/components/LTable/FieldTypes/NumberView.vue +0 -13
- package/src/components/LTable/FieldTypes/PaymentStatusView.vue +0 -8
- package/src/components/LTable/FieldTypes/StringView.vue +0 -24
- package/src/components/LTable/FieldTypes/index.js +0 -18
- package/src/components/LTable/LTableBody.vue +0 -245
- package/src/components/LTable/LTableBodySpacer.vue +0 -17
- package/src/components/LTable/LTableEndspace.vue +0 -20
- package/src/components/LTable/LTableHeader.vue +0 -155
- package/src/components/LTable/LTableHeaderCell.vue +0 -188
- package/src/components/LTable/LTableHeaderLoader.vue +0 -62
- package/src/components/LTable/LTableHeaderResizer.vue +0 -162
- package/src/components/LTable/LTableLoadMore.vue +0 -56
- package/src/components/LTable/LTablePagination.vue +0 -174
- package/src/components/LTable/LTableReloader.vue +0 -61
- package/src/components/LTable/ListAdapter.js +0 -74
- package/src/components/LTable/docs.vue +0 -111
- package/src/components/LTable/helpers.js +0 -194
- package/src/components/LTable/index.vue +0 -961
- package/src/components/LTabs/docs.vue +0 -28
- package/src/components/LTabs/index.vue +0 -37
- package/src/components/LTargetChip/docs.vue +0 -86
- package/src/components/LTargetChip/index.vue +0 -64
- package/src/components/LTargetInput/docs.vue +0 -72
- package/src/components/LTargetInput/index.vue +0 -78
- package/src/components/LTextEditor/FloatingLink.vue +0 -91
- package/src/components/LTextEditor/LinkBox.vue +0 -94
- package/src/components/LTextEditor/docs.vue +0 -32
- package/src/components/LTextEditor/extensions/LayersBlockquote.js +0 -12
- package/src/components/LTextEditor/extensions/LayersBold.js +0 -11
- package/src/components/LTextEditor/extensions/LayersBreakLine.js +0 -16
- package/src/components/LTextEditor/extensions/LayersBubbleMenu.js +0 -10
- package/src/components/LTextEditor/extensions/LayersBulletList.js +0 -12
- package/src/components/LTextEditor/extensions/LayersHeading.js +0 -13
- package/src/components/LTextEditor/extensions/LayersHistory.js +0 -10
- package/src/components/LTextEditor/extensions/LayersItalic.js +0 -11
- package/src/components/LTextEditor/extensions/LayersLink.js +0 -29
- package/src/components/LTextEditor/extensions/LayersOrderedList.js +0 -12
- package/src/components/LTextEditor/extensions/LayersParagraph.js +0 -44
- package/src/components/LTextEditor/extensions/LayersPlaceholder.js +0 -11
- package/src/components/LTextEditor/extensions/LayersUnderline.js +0 -29
- package/src/components/LTextEditor/helpers/addProtocol.js +0 -5
- package/src/components/LTextEditor/helpers/removeEmptyTags.js +0 -5
- package/src/components/LTextEditor/index.vue +0 -421
- package/src/components/LTimeSelect/docs.vue +0 -41
- package/src/components/LTimeSelect/index.vue +0 -49
- package/src/components/LToggleButtonGroup/index.vue +0 -87
- package/src/components/LTooltip/docs.vue +0 -66
- package/src/components/LTooltip/index.vue +0 -28
- package/src/components/LTransitionExpand/docs.vue +0 -26
- package/src/components/LTransitionExpand/index.vue +0 -88
- package/src/components/LUpload/index.vue +0 -7
- package/src/docs/Colors.vue +0 -50
- package/src/docs/Home.vue +0 -11
- package/src/docs/Notifications.vue +0 -88
- package/src/docs/index.vue +0 -76
- package/src/docs/routes.js +0 -20
- package/src/helpers/Colors.js +0 -79
- package/src/helpers/FieldTypeComponents.js +0 -43
- package/src/helpers/Icons.js +0 -67
- package/src/helpers/Notification.js +0 -94
- package/src/helpers/PrettySize.js +0 -25
- package/src/helpers/RegisterElementUIComponents.js +0 -9
- package/src/helpers/Schemas.js +0 -18
- package/src/helpers/util.js +0 -15
- package/src/main-docs.js +0 -132
- package/src/main.js +0 -100
- package/src/style/colors.scss +0 -31
- package/src/style/element-variables.scss +0 -21
- package/src/style/icons.scss +0 -5
- package/src/style/layers-variables.scss +0 -73
- package/src/style/layout.scss +0 -2288
- package/src/style/main.scss +0 -11
- package/src/style/notifications.scss +0 -88
- package/src/style/transitions.scss +0 -43
- package/src/style/typography.scss +0 -155
- package/vue.config.js +0 -14
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="app">
|
|
3
|
-
<h1>Tabs</h1>
|
|
4
|
-
|
|
5
|
-
<div>
|
|
6
|
-
<h2>Basic</h2>
|
|
7
|
-
|
|
8
|
-
<l-tabs v-model="activeName">
|
|
9
|
-
<l-tab-pane label="User" name="first">User</l-tab-pane>
|
|
10
|
-
<l-tab-pane label="Config" name="second">Config</l-tab-pane>
|
|
11
|
-
<l-tab-pane label="Role" name="third">Role</l-tab-pane>
|
|
12
|
-
<l-tab-pane label="Task" name="fourth">Task</l-tab-pane>
|
|
13
|
-
</l-tabs>
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
</template>
|
|
17
|
-
|
|
18
|
-
<script>
|
|
19
|
-
export default {
|
|
20
|
-
name: "Tabs",
|
|
21
|
-
|
|
22
|
-
data() {
|
|
23
|
-
return {
|
|
24
|
-
activeName: "first",
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
</script>
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { Tabs } from "element-ui";
|
|
3
|
-
export default {
|
|
4
|
-
tagName: "l-tabs",
|
|
5
|
-
extends: Tabs,
|
|
6
|
-
methods: {
|
|
7
|
-
calcPaneInstances(isForceUpdate = false) {
|
|
8
|
-
if (this.$slots.default) {
|
|
9
|
-
const paneSlots = this.$slots.default.filter(
|
|
10
|
-
(vnode) =>
|
|
11
|
-
vnode.tag &&
|
|
12
|
-
vnode.componentOptions &&
|
|
13
|
-
vnode.componentOptions.Ctor.options.tagName === "l-tab-pane"
|
|
14
|
-
);
|
|
15
|
-
// update indeed
|
|
16
|
-
const panes = paneSlots.map(
|
|
17
|
-
({ componentInstance }) => componentInstance
|
|
18
|
-
);
|
|
19
|
-
const panesChanged = !(
|
|
20
|
-
panes.length === this.panes.length &&
|
|
21
|
-
panes.every((pane, index) => pane === this.panes[index])
|
|
22
|
-
);
|
|
23
|
-
if (isForceUpdate || panesChanged) {
|
|
24
|
-
this.panes = panes;
|
|
25
|
-
}
|
|
26
|
-
} else if (this.panes.length !== 0) {
|
|
27
|
-
this.panes = [];
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
</script>
|
|
33
|
-
<style>
|
|
34
|
-
.l-tabs .el-tabs__item:not(.is-active) {
|
|
35
|
-
color: var(--color-gray-70);
|
|
36
|
-
}
|
|
37
|
-
</style>
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="app">
|
|
3
|
-
<h1>Target Chip</h1>
|
|
4
|
-
|
|
5
|
-
<div>
|
|
6
|
-
<div class="row">
|
|
7
|
-
<ul>
|
|
8
|
-
<li>
|
|
9
|
-
<l-target-chip class="ml-3 mt-3" kind="user" name="Usuário Teste" />
|
|
10
|
-
</li>
|
|
11
|
-
<li>
|
|
12
|
-
<l-target-chip class="ml-3 mt-3" kind="member" name="Aluno Teste" />
|
|
13
|
-
</li>
|
|
14
|
-
<li>
|
|
15
|
-
<l-target-chip class="ml-3 mt-3" kind="group" name="Turma Teste" />
|
|
16
|
-
</li>
|
|
17
|
-
<li>
|
|
18
|
-
<l-target-chip class="ml-3 mt-3" kind="tag" name="Marcador Teste" />
|
|
19
|
-
</li>
|
|
20
|
-
<li>
|
|
21
|
-
<l-target-chip
|
|
22
|
-
:count="1"
|
|
23
|
-
class="ml-3 mt-3"
|
|
24
|
-
kind="community"
|
|
25
|
-
name="Comunidade Teste"
|
|
26
|
-
/>
|
|
27
|
-
<l-target-chip
|
|
28
|
-
:count="2"
|
|
29
|
-
class="ml-3 mt-3"
|
|
30
|
-
kind="community"
|
|
31
|
-
name="Comunidade Teste"
|
|
32
|
-
/>
|
|
33
|
-
<l-target-chip
|
|
34
|
-
:count="3"
|
|
35
|
-
class="ml-3 mt-3"
|
|
36
|
-
kind="community"
|
|
37
|
-
name="Comunidade Teste"
|
|
38
|
-
/>
|
|
39
|
-
</li>
|
|
40
|
-
<li>
|
|
41
|
-
<l-target-chip class="ml-3 mt-3" kind="role" name="Administrador" />
|
|
42
|
-
<l-target-chip class="ml-3 mt-3" kind="role" name="Professor" />
|
|
43
|
-
<l-target-chip class="ml-3 mt-3" kind="role" name="Responsável" />
|
|
44
|
-
</li>
|
|
45
|
-
<li>
|
|
46
|
-
<l-target-chip
|
|
47
|
-
v-if="showTargetChip"
|
|
48
|
-
closeable
|
|
49
|
-
@remove="showTargetChip = false"
|
|
50
|
-
class="ml-3 mt-3"
|
|
51
|
-
kind="tag"
|
|
52
|
-
name="Marcador Teste"
|
|
53
|
-
/>
|
|
54
|
-
<l-button
|
|
55
|
-
class="ml-3 mt-3"
|
|
56
|
-
v-if="!showTargetChip"
|
|
57
|
-
@click="showTargetChip = true"
|
|
58
|
-
>
|
|
59
|
-
mostrar
|
|
60
|
-
</l-button>
|
|
61
|
-
</li>
|
|
62
|
-
</ul>
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
</template>
|
|
67
|
-
|
|
68
|
-
<script>
|
|
69
|
-
export default {
|
|
70
|
-
name: 'TargetChip',
|
|
71
|
-
data: () => {
|
|
72
|
-
return {
|
|
73
|
-
showTargetChip: true,
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
}
|
|
77
|
-
</script>
|
|
78
|
-
|
|
79
|
-
<style scoped>
|
|
80
|
-
ul li {
|
|
81
|
-
margin: 8px 0;
|
|
82
|
-
}
|
|
83
|
-
.teste {
|
|
84
|
-
margin-right: 8px;
|
|
85
|
-
}
|
|
86
|
-
</style>
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<l-chip style="height: 24px" bold fill :color="color" :icon="icon">
|
|
3
|
-
<div class="l-d-flex l-align-items">
|
|
4
|
-
{{ count }}
|
|
5
|
-
{{ name }}
|
|
6
|
-
<l-icon
|
|
7
|
-
@click="$emit('remove')"
|
|
8
|
-
class="l-d-flex l-align-items-center ml-1 mr-0"
|
|
9
|
-
style="cursor: pointer"
|
|
10
|
-
size="15"
|
|
11
|
-
v-if="closeable"
|
|
12
|
-
>
|
|
13
|
-
uis-times-circle
|
|
14
|
-
</l-icon>
|
|
15
|
-
</div>
|
|
16
|
-
</l-chip>
|
|
17
|
-
</template>
|
|
18
|
-
<script>
|
|
19
|
-
export default {
|
|
20
|
-
tagName: 'l-target-chip',
|
|
21
|
-
name: 'LTargetChip',
|
|
22
|
-
props: {
|
|
23
|
-
kind: {
|
|
24
|
-
type: String,
|
|
25
|
-
required: true,
|
|
26
|
-
},
|
|
27
|
-
closeable: {
|
|
28
|
-
type: Boolean,
|
|
29
|
-
default: false,
|
|
30
|
-
},
|
|
31
|
-
name: {
|
|
32
|
-
type: String,
|
|
33
|
-
required: true,
|
|
34
|
-
},
|
|
35
|
-
count: {
|
|
36
|
-
type: Number,
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
computed: {
|
|
40
|
-
color: function() {
|
|
41
|
-
return (
|
|
42
|
-
{
|
|
43
|
-
member: 'purple',
|
|
44
|
-
group: 'aqua',
|
|
45
|
-
user: 'link',
|
|
46
|
-
tag: 'warning',
|
|
47
|
-
community: 'danger',
|
|
48
|
-
role: 'lead-light',
|
|
49
|
-
}[this.kind] || 'lead'
|
|
50
|
-
)
|
|
51
|
-
},
|
|
52
|
-
icon: function() {
|
|
53
|
-
return {
|
|
54
|
-
member: 'uil-graduation-cap',
|
|
55
|
-
group: 'uil-users-alt',
|
|
56
|
-
user: 'uil-user',
|
|
57
|
-
tag: 'uil-tag-alt',
|
|
58
|
-
role: 'uil-user',
|
|
59
|
-
community: 'uil-channel',
|
|
60
|
-
}[this.kind]
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
}
|
|
64
|
-
</script>
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="app">
|
|
3
|
-
<h1>Target Input</h1>
|
|
4
|
-
|
|
5
|
-
<h3 class="mt-5">Non-editable</h3>
|
|
6
|
-
<l-target-input
|
|
7
|
-
:topics="topics"
|
|
8
|
-
></l-target-input>
|
|
9
|
-
<h3 class="mt-3">Editable</h3>
|
|
10
|
-
<l-target-input
|
|
11
|
-
:topics="topics"
|
|
12
|
-
:limit="5"
|
|
13
|
-
editable
|
|
14
|
-
></l-target-input>
|
|
15
|
-
</div>
|
|
16
|
-
</template>
|
|
17
|
-
|
|
18
|
-
<script>
|
|
19
|
-
export default {
|
|
20
|
-
name: 'TargetInput',
|
|
21
|
-
data: () => {
|
|
22
|
-
return {
|
|
23
|
-
topics: [
|
|
24
|
-
{
|
|
25
|
-
name: 'Aluno',
|
|
26
|
-
id: '123',
|
|
27
|
-
kind: 'member'
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
name: 'Aluno 2',
|
|
31
|
-
id: '234',
|
|
32
|
-
kind: 'member'
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name: 'User',
|
|
36
|
-
id: 'u123',
|
|
37
|
-
kind: 'user'
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
name: 'Turma',
|
|
41
|
-
id: 't123',
|
|
42
|
-
kind: 'group'
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
name: 'Marcador',
|
|
46
|
-
id: 'm123',
|
|
47
|
-
kind: 'tag'
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
name: 'Marcador 2',
|
|
51
|
-
id: 'm234',
|
|
52
|
-
kind: 'tag'
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
name: 'Marcador 3',
|
|
56
|
-
id: 'm345',
|
|
57
|
-
kind: 'tag'
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
}
|
|
63
|
-
</script>
|
|
64
|
-
|
|
65
|
-
<style scoped>
|
|
66
|
-
ul li {
|
|
67
|
-
margin: 8px 0;
|
|
68
|
-
}
|
|
69
|
-
.teste {
|
|
70
|
-
margin-right: 8px;
|
|
71
|
-
}
|
|
72
|
-
</style>
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
:class="'l-target-input' + (editable? ' editable' : '') "
|
|
4
|
-
v-if="topics && topics.length"
|
|
5
|
-
>
|
|
6
|
-
<l-target-chip
|
|
7
|
-
v-for="topic in topicsToShow"
|
|
8
|
-
:kind="topic.kind"
|
|
9
|
-
:name="topic.name"
|
|
10
|
-
:key="topic.id"
|
|
11
|
-
class="mr-2 mb-2"
|
|
12
|
-
/>
|
|
13
|
-
<l-chip
|
|
14
|
-
color="purple"
|
|
15
|
-
class="mb-2"
|
|
16
|
-
fill
|
|
17
|
-
hide-icon
|
|
18
|
-
v-if="topics.length > this.limit"
|
|
19
|
-
>
|
|
20
|
-
{{ moreTopicsText }}
|
|
21
|
-
</l-chip>
|
|
22
|
-
</div>
|
|
23
|
-
</template>
|
|
24
|
-
|
|
25
|
-
<script>
|
|
26
|
-
|
|
27
|
-
export default {
|
|
28
|
-
tagName: 'l-target-input',
|
|
29
|
-
name: 'LTargetInput',
|
|
30
|
-
|
|
31
|
-
props: {
|
|
32
|
-
topics: {
|
|
33
|
-
type: Array,
|
|
34
|
-
required: true
|
|
35
|
-
},
|
|
36
|
-
limit: {
|
|
37
|
-
type: Number,
|
|
38
|
-
default: 3,
|
|
39
|
-
},
|
|
40
|
-
editable: {
|
|
41
|
-
type: Boolean,
|
|
42
|
-
default: false,
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
computed: {
|
|
47
|
-
topicsToShow() {
|
|
48
|
-
return this.topics.slice(0, this.limit)
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
moreTopicsText() {
|
|
52
|
-
const isPlural = this.topics.length - this.limit > 1
|
|
53
|
-
return (
|
|
54
|
-
`+ ${this.topics.length - this.limit} destinatário` +
|
|
55
|
-
(isPlural ? 's' : '')
|
|
56
|
-
)
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
</script>
|
|
61
|
-
|
|
62
|
-
<style scoped>
|
|
63
|
-
.l-target-input {
|
|
64
|
-
display: flex;
|
|
65
|
-
justify-content: left;
|
|
66
|
-
flex-wrap: wrap;
|
|
67
|
-
flex-direction: initial;
|
|
68
|
-
align-items: center;
|
|
69
|
-
min-height: 24px;
|
|
70
|
-
}
|
|
71
|
-
.editable {
|
|
72
|
-
border: 1px solid var(--gray-50);
|
|
73
|
-
border-radius: 5px;
|
|
74
|
-
cursor: pointer;
|
|
75
|
-
padding-left: 8px;
|
|
76
|
-
padding-top: 8px;
|
|
77
|
-
}
|
|
78
|
-
</style>
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="wrapper-floating-link l-ra-1 px-2 py-2 row l-align-items-center l-align-content-center"
|
|
4
|
-
>
|
|
5
|
-
<l-icon size="24" class="color-lead-light mr-2" icon="uil-globe" />
|
|
6
|
-
<l-tooltip class="item color-link" :content="tooltipLink">
|
|
7
|
-
<a
|
|
8
|
-
class="l-flex-grow-1 h6 color-link l-ellipsis"
|
|
9
|
-
target="_blank"
|
|
10
|
-
rel="nofollow noopener noreferrer"
|
|
11
|
-
style="display: inline"
|
|
12
|
-
:href="dataLink"
|
|
13
|
-
:open-delay="tooltipDelay"
|
|
14
|
-
>
|
|
15
|
-
{{ dataLink }}
|
|
16
|
-
</a>
|
|
17
|
-
</l-tooltip>
|
|
18
|
-
<l-tooltip
|
|
19
|
-
class="item"
|
|
20
|
-
v-for="(button, idx) in boxButtons"
|
|
21
|
-
:key="idx"
|
|
22
|
-
:content="button.tooltip"
|
|
23
|
-
:open-delay="tooltipDelay"
|
|
24
|
-
>
|
|
25
|
-
<l-icon
|
|
26
|
-
size="20"
|
|
27
|
-
class="color-lead-light ml-2"
|
|
28
|
-
:icon="button.icon"
|
|
29
|
-
@click="actionButtonBased(button.event)"
|
|
30
|
-
></l-icon
|
|
31
|
-
></l-tooltip>
|
|
32
|
-
</div>
|
|
33
|
-
</template>
|
|
34
|
-
|
|
35
|
-
<script>
|
|
36
|
-
export default {
|
|
37
|
-
props: { dataLink: String },
|
|
38
|
-
|
|
39
|
-
data() {
|
|
40
|
-
return {
|
|
41
|
-
boxButtons: [
|
|
42
|
-
{
|
|
43
|
-
tooltip: 'Editar link',
|
|
44
|
-
icon: 'uil-edit',
|
|
45
|
-
event: 'edit',
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
tooltip: 'Remover link',
|
|
49
|
-
icon: 'uil-link-broken',
|
|
50
|
-
event: 'remove',
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
tooltipDelay: 125,
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
methods: {
|
|
58
|
-
actionButtonBased(value) {
|
|
59
|
-
this.$emit(value)
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
computed: {
|
|
64
|
-
tooltipLink() {
|
|
65
|
-
if (this.dataLink.length >= 60) {
|
|
66
|
-
return this.dataLink.slice(0, 60) + '...'
|
|
67
|
-
} else {
|
|
68
|
-
return this.dataLink
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
}
|
|
73
|
-
</script>
|
|
74
|
-
|
|
75
|
-
<style scoped>
|
|
76
|
-
.wrapper-floating-link {
|
|
77
|
-
border: 1px solid var(--color-gray-50);
|
|
78
|
-
min-height: 24px;
|
|
79
|
-
justify-content: start;
|
|
80
|
-
background-color: var(--white);
|
|
81
|
-
box-sizing: content-box;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.wrapper-floating-link >>> .uil-globe {
|
|
85
|
-
cursor: default;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.wrapper-floating-link >>> * {
|
|
89
|
-
cursor: pointer;
|
|
90
|
-
}
|
|
91
|
-
</style>
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<l-box class="link-box column">
|
|
3
|
-
<div class="wrapper-input mb-3">
|
|
4
|
-
<l-input
|
|
5
|
-
v-model="linkToAppend"
|
|
6
|
-
placeholder="Insira um link"
|
|
7
|
-
:error="linkError"
|
|
8
|
-
autofocus
|
|
9
|
-
style="box-sizing: border-box"
|
|
10
|
-
>
|
|
11
|
-
</l-input>
|
|
12
|
-
<div class="l-input-error-message" v-if="linkError">
|
|
13
|
-
Insira um link válido
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
<div class="wrapper-buttons row l-justify-content-end">
|
|
17
|
-
<l-button size="small" @click="$emit('close')">Cancelar</l-button>
|
|
18
|
-
<l-button
|
|
19
|
-
size="small"
|
|
20
|
-
type="primary"
|
|
21
|
-
@click="insertLink()"
|
|
22
|
-
:disabled="disableButton"
|
|
23
|
-
>Inserir</l-button
|
|
24
|
-
>
|
|
25
|
-
</div>
|
|
26
|
-
</l-box>
|
|
27
|
-
</template>
|
|
28
|
-
|
|
29
|
-
<script>
|
|
30
|
-
import Autolinker from 'autolinker'
|
|
31
|
-
import { addProtocol } from './helpers/addProtocol'
|
|
32
|
-
|
|
33
|
-
export default {
|
|
34
|
-
props: {
|
|
35
|
-
previousURL: String,
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
data() {
|
|
39
|
-
return {
|
|
40
|
-
linkToAppend: this.previousURL,
|
|
41
|
-
linkError: '',
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
methods: {
|
|
46
|
-
insertLink() {
|
|
47
|
-
if (this.isLinkValid(this.linkToAppend)) {
|
|
48
|
-
this.linkError = false
|
|
49
|
-
this.$emit('setLink', {
|
|
50
|
-
url: addProtocol(this.linkToAppend),
|
|
51
|
-
insertedText: this.linkToAppend,
|
|
52
|
-
})
|
|
53
|
-
this.$emit('close')
|
|
54
|
-
} else {
|
|
55
|
-
this.linkError = true
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
isLinkValid(link) {
|
|
60
|
-
const validating = Autolinker.link(link, {
|
|
61
|
-
email: false,
|
|
62
|
-
})
|
|
63
|
-
return validating.includes('href')
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
computed: {
|
|
68
|
-
disableButton() {
|
|
69
|
-
return this.linkToAppend === '' || this.linkToAppend === undefined
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
}
|
|
73
|
-
</script>
|
|
74
|
-
|
|
75
|
-
<style scoped>
|
|
76
|
-
.wrapper-link-box {
|
|
77
|
-
position: relative;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.link-box {
|
|
81
|
-
width: min(calc(100vw - 2rem), 456px);
|
|
82
|
-
padding: 16px;
|
|
83
|
-
position: relative;
|
|
84
|
-
box-sizing: border-box;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.l-input-error-message {
|
|
88
|
-
color: var(--color-danger);
|
|
89
|
-
font-weight: 600;
|
|
90
|
-
font-size: 12px;
|
|
91
|
-
line-height: 130%;
|
|
92
|
-
margin-top: 2px;
|
|
93
|
-
}
|
|
94
|
-
</style>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div id="app">
|
|
3
|
-
<h1>Text Editor</h1>
|
|
4
|
-
|
|
5
|
-
<l-text-editor v-model="textEditorContent" />
|
|
6
|
-
|
|
7
|
-
<section>
|
|
8
|
-
<h1>Output Text</h1>
|
|
9
|
-
<div v-html="textEditorContent"></div>
|
|
10
|
-
</section>
|
|
11
|
-
|
|
12
|
-
<section>
|
|
13
|
-
<h1>Output HTML</h1>
|
|
14
|
-
<div>
|
|
15
|
-
<code>{{ textEditorContent }}</code>
|
|
16
|
-
</div>
|
|
17
|
-
</section>
|
|
18
|
-
</div>
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<script>
|
|
22
|
-
export default {
|
|
23
|
-
name: 'TextEditor',
|
|
24
|
-
data() {
|
|
25
|
-
return {
|
|
26
|
-
textEditorContent: 'Text for test 3.0 ',
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
}
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
|
-
<style></style>
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import Blockquote from '@tiptap/extension-blockquote'
|
|
2
|
-
|
|
3
|
-
const LayersBlockquote = Blockquote.extend({
|
|
4
|
-
addAttributes() {
|
|
5
|
-
return {
|
|
6
|
-
class: { default: 'px-3 mx-0 my-2' },
|
|
7
|
-
style: { default: 'border-left: 3px solid var(--color-gray-50)'}
|
|
8
|
-
}
|
|
9
|
-
},
|
|
10
|
-
})
|
|
11
|
-
|
|
12
|
-
export default LayersBlockquote
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import HardBreak from '@tiptap/extension-hard-break'
|
|
2
|
-
|
|
3
|
-
const LayersBreakLine = HardBreak.extend({
|
|
4
|
-
defaultOptions: {
|
|
5
|
-
...HardBreak.options,
|
|
6
|
-
keepMarks: false,
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
addKeyboardShortcuts() {
|
|
10
|
-
return {
|
|
11
|
-
'Shift-Enter': () => this.editor.commands.setHardBreak(),
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
export default LayersBreakLine
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import BulletList from '@tiptap/extension-bullet-list'
|
|
2
|
-
|
|
3
|
-
const LayersBulletList = BulletList.extend({
|
|
4
|
-
addAttributes() {
|
|
5
|
-
return {
|
|
6
|
-
class: { default: 'color-lead-light pl-4' },
|
|
7
|
-
style: { default: 'list-style-type: disc;' },
|
|
8
|
-
}
|
|
9
|
-
},
|
|
10
|
-
})
|
|
11
|
-
|
|
12
|
-
export default LayersBulletList
|