layers-design-system 1.2.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,61 +1,60 @@
1
1
  {
2
2
  "name": "layers-design-system",
3
3
  "main": "src/main.js",
4
- "version": "1.2.0",
4
+ "version": "2.0.1",
5
5
  "scripts": {
6
6
  "start": "vue-cli-service serve ./src/main-docs.js",
7
7
  "build": "vue-cli-service build --target lib ./src/main.js",
8
8
  "lint": "vue-cli-service lint"
9
9
  },
10
10
  "dependencies": {
11
- "@tenda.digital/vue-modals": "^1.1.1",
12
- "@tiptap/core": "^2.0.0-beta.112",
13
- "@tiptap/extension-blockquote": "^2.0.0-beta.15",
14
- "@tiptap/extension-bold": "^2.0.0-beta.15",
15
- "@tiptap/extension-bullet-list": "^2.0.0-beta.15",
16
- "@tiptap/extension-document": "^2.0.0-beta.13",
17
- "@tiptap/extension-hard-break": "^2.0.0-beta.21",
18
- "@tiptap/extension-heading": "^2.0.0-beta.15",
19
- "@tiptap/extension-history": "^2.0.0-beta.16",
20
- "@tiptap/extension-italic": "^2.0.0-beta.15",
21
- "@tiptap/extension-link": "^2.0.0-beta.20",
22
- "@tiptap/extension-list-item": "^2.0.0-beta.14",
23
- "@tiptap/extension-ordered-list": "^2.0.0-beta.16",
24
- "@tiptap/extension-paragraph": "^2.0.0-beta.17",
25
- "@tiptap/extension-placeholder": "^2.0.0-beta.31",
26
- "@tiptap/extension-text": "^2.0.0-beta.13",
27
- "@tiptap/extension-underline": "^2.0.0-beta.16",
28
- "@tiptap/vue-2": "^2.0.0-beta.53",
29
- "core-js": "^3.4.4",
30
- "currency.js": "^1.2.2",
31
- "dompurify": "^2.3.3",
32
- "element-ui": "^2.15.2",
33
- "layers-utils": "^1.0.4",
34
- "moment": "^2.24.0",
35
- "mustache": "^4.0.0",
36
- "node-sass": "^4.9.2",
37
- "sass-loader": "^7.3.1",
38
- "tiptap": "^1.32.2",
39
- "url-regex-safe": "^2.0.2",
40
- "vant": "^2.12.21",
41
- "vue": "^2.6.10",
42
- "vue-router": "^3.1.5",
43
- "vue-zoomer": "^0.3.9",
44
- "vuetify": "^2.1.0"
11
+ "@tenda.digital/vue-modals": "1.1.1",
12
+ "@tiptap/core": "2.0.0-beta.125",
13
+ "@tiptap/extension-blockquote": "2.0.0-beta.19",
14
+ "@tiptap/extension-bold": "2.0.0-beta.19",
15
+ "@tiptap/extension-bullet-list": "2.0.0-beta.18",
16
+ "@tiptap/extension-document": "2.0.0-beta.13",
17
+ "@tiptap/extension-hard-break": "2.0.0-beta.24",
18
+ "@tiptap/extension-heading": "2.0.0-beta.18",
19
+ "@tiptap/extension-history": "2.0.0-beta.16",
20
+ "@tiptap/extension-italic": "2.0.0-beta.19",
21
+ "@tiptap/extension-link": "2.0.0-beta.23",
22
+ "@tiptap/extension-list-item": "2.0.0-beta.14",
23
+ "@tiptap/extension-ordered-list": "2.0.0-beta.19",
24
+ "@tiptap/extension-paragraph": "2.0.0-beta.17",
25
+ "@tiptap/extension-placeholder": "2.0.0-beta.35",
26
+ "@tiptap/extension-text": "2.0.0-beta.13",
27
+ "@tiptap/extension-underline": "2.0.0-beta.16",
28
+ "@tiptap/vue-2": "2.0.0-beta.60",
29
+ "core-js": "^3.25.2",
30
+ "currency.js": "1.2.2",
31
+ "dompurify": "2.3.3",
32
+ "element-ui": "2.15.6",
33
+ "layers-utils": "1.0.4",
34
+ "moment": "2.29.1",
35
+ "mustache": "4.2.0",
36
+ "sass-loader": "7.3.1",
37
+ "tiptap": "1.32.2",
38
+ "url-regex-safe": "2.0.2",
39
+ "vant": "2.12.30",
40
+ "vue": "2.6.14",
41
+ "vue-router": "3.5.2",
42
+ "vue-zoomer": "0.3.9",
43
+ "vuetify": "2.5.10"
45
44
  },
46
45
  "devDependencies": {
47
- "@vue/cli-plugin-babel": "^4.1.0",
48
- "@vue/cli-plugin-eslint": "^4.1.0",
49
- "@vue/cli-service": "^4.1.0",
50
- "babel-eslint": "^10.0.3",
51
- "eslint": "^5.16.0",
52
- "eslint-plugin-vue": "^5.0.0",
53
- "hard-source-webpack-plugin": "^0.13.1",
54
- "sass": "^1.19.0",
55
- "vue-cli-plugin-element": "^1.0.1",
56
- "vue-cli-plugin-vuetify": "^2.0.3",
57
- "vue-template-compiler": "^2.6.10",
58
- "vuetify-loader": "^1.3.0"
46
+ "@vue/cli-plugin-babel": "4.5.14",
47
+ "@vue/cli-plugin-eslint": "4.5.14",
48
+ "@vue/cli-service": "4.5.14",
49
+ "babel-eslint": "10.1.0",
50
+ "eslint": "5.16.0",
51
+ "eslint-plugin-vue": "5.2.3",
52
+ "hard-source-webpack-plugin": "0.13.1",
53
+ "sass": "1.43.2",
54
+ "vue-cli-plugin-element": "1.0.1",
55
+ "vue-cli-plugin-vuetify": "2.4.3",
56
+ "vue-template-compiler": "2.6.14",
57
+ "vuetify-loader": "1.7.3"
59
58
  },
60
59
  "eslintConfig": {
61
60
  "root": true,
@@ -172,6 +172,7 @@
172
172
  <l-button type="primary" icon="el-icon-arrow-left">Previous Page</l-button>
173
173
  <l-button type="primary">
174
174
  Next Page
175
+ <i class="el-icon-arrow-right el-icon-right"></i>
175
176
  </l-button>
176
177
  </l-button-group>
177
178
  </div>
@@ -0,0 +1,36 @@
1
+ <template>
2
+ <div id="app">
3
+ <h1>Presentation</h1>
4
+ <l-presentation @close="toggleDialog" :value="dialog" color="#BAEAF8" image="https://cdn.staging.layers.digital/staging/uploads/32e16adb-2cd5-4284-8ee8-ba5531a31bee/Notification.png">
5
+ <slot slot="content">
6
+ Agora é possível administrar suas notificações. Diga como e por quais apps você deseja ser notificado em <strong>Notificações.</strong>
7
+ </slot>
8
+ <l-button @click="toggleDialog" style="width: fit-content; margin-top: 20px;">Apresentação por dialog</l-button>
9
+ </l-presentation>
10
+ <l-presentation @close="toggleTooltip" :isTooltip="true" :value="tooltip" placement="right" color="#BAEAF8" image="https://cdn.staging.layers.digital/staging/uploads/32e16adb-2cd5-4284-8ee8-ba5531a31bee/Notification.png">
11
+ <slot slot="content">
12
+ Administre suas notificações. Diga como e por quais apps você deseja ser notificado, acesse a aba de <strong>Notificações.</strong>
13
+ </slot>
14
+ <l-button @click="toggleTooltip" style="width: fit-content; margin-top: 20px;">Apresentação por tooltip</l-button>
15
+ </l-presentation>
16
+ </div>
17
+ </template>
18
+
19
+ <script>
20
+ export default {
21
+ name: "Presentation",
22
+ data: () => ({
23
+ tooltip: false,
24
+ dialog: false
25
+ }),
26
+ methods: {
27
+ toggleTooltip() {
28
+ this.tooltip = !this.tooltip;
29
+ },
30
+ toggleDialog() {
31
+ this.dialog = !this.dialog;
32
+ }
33
+ }
34
+ };
35
+ </script>
36
+
@@ -0,0 +1,142 @@
1
+ <template>
2
+ <l-tooltip v-if="isTooltip" ref="tooltip" :placement="placement" effect="light" :value="value" manual tooltipClass="l-presentation-popper">
3
+ <div class="tooltip-content" slot="content">
4
+ <div class="image" :style="{'background-color': color}">
5
+ <img :src="image" width="240" height="120" draggable="false" alt="Presentation">
6
+ <l-button @click="close" class="close-button" fab icon="uil-times" size="mini" type="info" />
7
+ </div>
8
+ <p><slot name="content" /></p>
9
+ </div>
10
+ <slot />
11
+ </l-tooltip>
12
+ <div v-else>
13
+ <l-dialog :visible.sync="value" :before-close="close" >
14
+ <div slot="title" class="image" :style="{'background-color': color}">
15
+ <img :src="image" width="280" height="160" draggable="false" alt="Presentation">
16
+ </div>
17
+ <div class="tooltip-content">
18
+ <p><slot name="content" /></p>
19
+ </div>
20
+ </l-dialog>
21
+ <slot />
22
+ </div>
23
+ </template>
24
+
25
+ <script>
26
+ import Vue from "vue";
27
+
28
+ export default {
29
+ tagName: "l-presentation",
30
+ props: {
31
+ image: {
32
+ type: String,
33
+ required: true,
34
+ },
35
+ color: {
36
+ type: String,
37
+ default: "#FFF"
38
+ },
39
+ placement: {
40
+ type: String,
41
+ default: "bottom"
42
+ },
43
+ value: {
44
+ type: Boolean,
45
+ default: false
46
+ },
47
+ isTooltip: {
48
+ type: Boolean,
49
+ default: false
50
+ }
51
+ },
52
+ watch: {
53
+ value(value) {
54
+ if (this.isTooltip && value) {
55
+ Vue.nextTick(this.updateTooltipArrow);
56
+ }
57
+ }
58
+ },
59
+ methods: {
60
+ updateTooltipArrow() {
61
+ const element = this.$refs.tooltip.popperElm;
62
+ element.style.setProperty("--popper-arrow", this.color);
63
+ },
64
+ close() {
65
+ this.$emit("close");
66
+ }
67
+ },
68
+ };
69
+ </script>
70
+
71
+ <style type="text/css" scoped>
72
+ .tooltip-content {
73
+ width: fit-content;
74
+ overflow: hidden;
75
+ border-radius: 2px;
76
+ max-width: 330px;
77
+ }
78
+ .image {
79
+ width: auto;
80
+ padding: 20px;
81
+ position: relative;
82
+ border-radius: 20px 20px 0 0;
83
+ }
84
+ .image img {
85
+ object-fit: contain;
86
+ }
87
+ .tooltip-content .close-button {
88
+ position: absolute;
89
+ top: 20px;
90
+ right: 20px;
91
+ background: rgba(0, 0, 0, 0.25);
92
+ }
93
+ .tooltip-content .close-button i {
94
+ margin-top: 1px;
95
+ }
96
+ .tooltip-content p {
97
+ width: auto;
98
+ padding: 20px;
99
+ padding-bottom: 30px;
100
+ margin: 0;
101
+ color: var(--color-lead-light);
102
+ font-size: 16px;
103
+ word-wrap: break-word;
104
+ }
105
+ </style>
106
+ <style>
107
+ .l-presentation-popper {
108
+ padding: 0 !important;
109
+ border: 0px !important;
110
+ box-shadow: 0px 4px 14px rgba(0, 0, 0, 0.15);
111
+ border-radius: 20px !important;
112
+ user-select: none;
113
+ --popper-arrow: #FFF;
114
+ }
115
+ .l-presentation-popper .popper__arrow {
116
+ border-width: 0 !important;
117
+
118
+ }
119
+ .l-presentation-popper .popper__arrow::after {
120
+ border-right-color: var(--popper-arrow) !important;
121
+ }
122
+ .l-presentation .el-dialog {
123
+ max-width: 80%;
124
+ width: 330px;
125
+ overflow: hidden;
126
+ border-radius: 2px;
127
+ }
128
+ .l-presentation .el-dialog__header {
129
+ padding: 0 !important;
130
+ border: none;
131
+ }
132
+ .l-presentation .el-dialog__header .image {
133
+ border-radius: 0px;
134
+ }
135
+ .l-presentation .el-dialog__body {
136
+ padding: 0 !important;
137
+ border: none;
138
+ margin: 0px;
139
+ margin-top: 10px;
140
+ text-align: center;
141
+ }
142
+ </style>
@@ -8,9 +8,10 @@ delete Base.props.popperClass; // Hack to overwrite base component prop
8
8
  export default {
9
9
  tagName: "l-tooltip",
10
10
  extends: Base,
11
+ props: ["tooltipClass"],
11
12
  computed: {
12
13
  popperClass() {
13
- return "l-tooltip-popper"
14
+ return this.tooltipClass || "l-tooltip-popper"
14
15
  }
15
16
  }
16
17
  };
@@ -1,6 +0,0 @@
1
- <component name="InspectionProjectProfileManager">
2
- <profile version="1.0">
3
- <option name="myName" value="Project Default" />
4
- <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
5
- </profile>
6
- </component>
@@ -1,12 +0,0 @@
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>
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
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 DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
- </component>
6
- </project>