layers-design-system 1.0.119 → 1.2.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/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/layers-core-design-system.iml +12 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/package.json +1 -1
- package/src/components/LButton/docs.vue +0 -1
- package/src/components/LCarousel/docs.vue +32 -0
- package/src/components/LCarousel/index.vue +88 -0
- package/src/components/LTable/docs.vue +2 -1
- package/src/components/LTable/index.vue +13 -1
- package/src/components/LTextEditor/FloatingLink.vue +3 -2
- package/src/components/LTextEditor/index.vue +6 -8
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="WEB_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager">
|
|
4
|
+
<content url="file://$MODULE_DIR$">
|
|
5
|
+
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
6
|
+
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
7
|
+
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
8
|
+
</content>
|
|
9
|
+
<orderEntry type="inheritedJdk" />
|
|
10
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
11
|
+
</component>
|
|
12
|
+
</module>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectModuleManager">
|
|
4
|
+
<modules>
|
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/layers-core-design-system.iml" filepath="$PROJECT_DIR$/.idea/layers-core-design-system.iml" />
|
|
6
|
+
</modules>
|
|
7
|
+
</component>
|
|
8
|
+
</project>
|
package/.idea/vcs.xml
ADDED
package/package.json
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="display: flex; flex: 1 1 auto; max-width: 80%">
|
|
3
|
+
<l-carousel :images="demoImages"/>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
name: 'Carousel',
|
|
10
|
+
data: function() {
|
|
11
|
+
return {
|
|
12
|
+
demoImages: [
|
|
13
|
+
{
|
|
14
|
+
name: "Imagem 1",
|
|
15
|
+
id: "1",
|
|
16
|
+
src: "https://image.shutterstock.com/image-photo/panoramic-background-wide-old-red-600w-1642362355.jpg",
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: "Imagem 2",
|
|
20
|
+
id: "2",
|
|
21
|
+
src: "https://image.shutterstock.com/image-photo/panoramic-background-wide-old-red-600w-1642362355.jpg",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: "Imagem 3",
|
|
25
|
+
id: "3",
|
|
26
|
+
src: "https://image.shutterstock.com/image-photo/panoramic-background-wide-old-red-600w-1642362355.jpg",
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
</script>
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="carousel">
|
|
3
|
+
<l-button class="slider-control" circle icon="uil-angle-left" style="left: 1em;" @click="previous" v-if="selected > 0"></l-button>
|
|
4
|
+
<div class="slider-container">
|
|
5
|
+
<div v-for="(image, index) of images" :key="image.index"
|
|
6
|
+
class="slide" :ref="`img:${index}`">
|
|
7
|
+
<div class="img-container">
|
|
8
|
+
<img :src="image.src" :height="height" :width="width" style="border-radius: 10px;"/>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
<l-button class="slider-control" circle icon="uil-angle-right" style="right: 1em;" @click="next" v-if="selected < images.length - 1"></l-button>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
tagName: 'l-carousel',
|
|
20
|
+
name: 'Lcarousel',
|
|
21
|
+
props:['images', 'height', 'width'],
|
|
22
|
+
data: function() {
|
|
23
|
+
return {
|
|
24
|
+
selected: 0
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
methods: {
|
|
28
|
+
previous() {
|
|
29
|
+
this.selected--
|
|
30
|
+
const el = this.$refs[`img:${this.selected}`]
|
|
31
|
+
el[0].scrollIntoView({ behavior: 'smooth' })
|
|
32
|
+
},
|
|
33
|
+
next() {
|
|
34
|
+
this.selected++
|
|
35
|
+
const el = this.$refs[`img:${this.selected}`]
|
|
36
|
+
el[0].scrollIntoView({ behavior: 'smooth' })
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<style scoped>
|
|
43
|
+
.carousel {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: row;
|
|
46
|
+
height: 100%;
|
|
47
|
+
max-width: 100%;
|
|
48
|
+
position: relative;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.slider-container {
|
|
52
|
+
height: 100%;
|
|
53
|
+
padding-bottom: 1em;
|
|
54
|
+
padding-top: 1em;
|
|
55
|
+
position: relative;
|
|
56
|
+
overflow-x: scroll;
|
|
57
|
+
scroll-snap-type: x mandatory;
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: row;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.slide {
|
|
63
|
+
display: flex;
|
|
64
|
+
height: 100%;
|
|
65
|
+
min-width: 80%;
|
|
66
|
+
scroll-snap-align: center;
|
|
67
|
+
scroll-snap-stop: always;
|
|
68
|
+
}
|
|
69
|
+
.slide + .slide {
|
|
70
|
+
margin-left: 1rem;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.slider-control {
|
|
74
|
+
position: absolute;
|
|
75
|
+
top: 50%;
|
|
76
|
+
z-index: 999;
|
|
77
|
+
height: 24px;
|
|
78
|
+
width: 24px
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.img-container {
|
|
82
|
+
display: flex;
|
|
83
|
+
flex: 1 1 auto;
|
|
84
|
+
justify-content: center;
|
|
85
|
+
align-items: center;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
</style>
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
:selectable="selectable"
|
|
31
31
|
:autoLoadMore="false"
|
|
32
32
|
pagination
|
|
33
|
+
limitPerPage="10"
|
|
33
34
|
:style="{'--l-table-primary-color': 'var(--color-aqua)'}"
|
|
34
35
|
/>
|
|
35
36
|
</div>
|
|
@@ -89,7 +90,7 @@ export default {
|
|
|
89
90
|
const total = 451
|
|
90
91
|
|
|
91
92
|
var items = [];
|
|
92
|
-
for (var i = offset; i < offset + Math.min(total - offset,
|
|
93
|
+
for (var i = offset; i < offset + Math.min(total - offset, limit); i++) {
|
|
93
94
|
items.push({ id: i, code: "#" + (i + 1), "dueAt": new Date(), price: {amount: i * 50}, customer: {name: "Teste da Silva"}, status: "paid" });
|
|
94
95
|
}
|
|
95
96
|
|
|
@@ -260,6 +260,14 @@ export default {
|
|
|
260
260
|
type: Boolean,
|
|
261
261
|
default: true,
|
|
262
262
|
},
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* If set, will load this number of rows at a time
|
|
266
|
+
*/
|
|
267
|
+
limitPerPage: {
|
|
268
|
+
type: Number,
|
|
269
|
+
default: 50,
|
|
270
|
+
},
|
|
263
271
|
},
|
|
264
272
|
|
|
265
273
|
mounted() {
|
|
@@ -275,7 +283,6 @@ export default {
|
|
|
275
283
|
|
|
276
284
|
// Internal identification for hole state of loaded pages
|
|
277
285
|
id: 0,
|
|
278
|
-
perPage: 50,
|
|
279
286
|
extraRows: 15,
|
|
280
287
|
|
|
281
288
|
lastComputedOffsetY: 0,
|
|
@@ -310,6 +317,11 @@ export default {
|
|
|
310
317
|
},
|
|
311
318
|
|
|
312
319
|
computed: {
|
|
320
|
+
|
|
321
|
+
perPage() {
|
|
322
|
+
return this.limitPerPage;
|
|
323
|
+
},
|
|
324
|
+
|
|
313
325
|
pagesCount() {
|
|
314
326
|
return Math.floor(this.totalCount / this.perPage) + 1;
|
|
315
327
|
},
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
rel="nofollow noopener noreferrer"
|
|
11
11
|
style="display: inline"
|
|
12
12
|
:href="dataLink"
|
|
13
|
-
open-delay="
|
|
13
|
+
:open-delay="tooltipDelay"
|
|
14
14
|
>
|
|
15
15
|
{{ dataLink }}
|
|
16
16
|
</a>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
v-for="(button, idx) in boxButtons"
|
|
21
21
|
:key="idx"
|
|
22
22
|
:content="button.tooltip"
|
|
23
|
-
open-delay="
|
|
23
|
+
:open-delay="tooltipDelay"
|
|
24
24
|
>
|
|
25
25
|
<l-icon
|
|
26
26
|
size="20"
|
|
@@ -50,6 +50,7 @@ export default {
|
|
|
50
50
|
event: 'remove',
|
|
51
51
|
},
|
|
52
52
|
],
|
|
53
|
+
tooltipDelay: 125,
|
|
53
54
|
}
|
|
54
55
|
},
|
|
55
56
|
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
:key="markUp.name"
|
|
25
25
|
:content="markUp.tooltip"
|
|
26
26
|
class="item"
|
|
27
|
-
open-delay="
|
|
27
|
+
:open-delay="tooltipDelay"
|
|
28
28
|
>
|
|
29
29
|
<l-button
|
|
30
30
|
@click="markUpText(markUp.name)"
|
|
@@ -157,6 +157,7 @@ export default {
|
|
|
157
157
|
],
|
|
158
158
|
showLinkBox: false,
|
|
159
159
|
isEditorFocused: null,
|
|
160
|
+
tooltipDelay: 125,
|
|
160
161
|
}
|
|
161
162
|
},
|
|
162
163
|
|
|
@@ -223,7 +224,7 @@ export default {
|
|
|
223
224
|
|
|
224
225
|
addSpaceToFinalParagraphTag(text) {
|
|
225
226
|
return text.replace(/<\/p>/g, ' </p>')
|
|
226
|
-
}
|
|
227
|
+
},
|
|
227
228
|
},
|
|
228
229
|
|
|
229
230
|
computed: {
|
|
@@ -238,12 +239,9 @@ export default {
|
|
|
238
239
|
const textEditorHTMLSpaced = this.addSpaceToFinalParagraphTag(textEditorHTML)
|
|
239
240
|
const textEditorHTMLWithLinks = mountLink(textEditorHTMLSpaced)
|
|
240
241
|
|
|
241
|
-
return DOMPurify.sanitize(
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
ADD_ATTR: ['target'],
|
|
245
|
-
}
|
|
246
|
-
)
|
|
242
|
+
return DOMPurify.sanitize(removeEmptyTags(textEditorHTMLWithLinks), {
|
|
243
|
+
ADD_ATTR: ['target'],
|
|
244
|
+
})
|
|
247
245
|
},
|
|
248
246
|
currentTextSelection() {
|
|
249
247
|
const { view, state } = this.editor
|