layers-design-system 2.3.0 → 2.5.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.
Files changed (186) hide show
  1. package/dist/layers-design-system.js +78496 -0
  2. package/dist/layers-design-system.umd.cjs +285 -0
  3. package/dist/style.css +1 -0
  4. package/package.json +26 -12
  5. package/.nvmrc +0 -1
  6. package/babel.config.js +0 -5
  7. package/src/assets/button-text-editor/double-quotes.svg +0 -4
  8. package/src/assets/button-text-editor/remove-formatting.svg +0 -5
  9. package/src/assets/button-text-editor/title.svg +0 -4
  10. package/src/assets/failed-to-load/failed-to-load.svg +0 -60
  11. package/src/assets/l-presentation/external-apps.png +0 -0
  12. package/src/assets/l-presentation/notification.png +0 -0
  13. package/src/assets/search-topics/empty-tags.svg +0 -59
  14. package/src/components/LAlert/docs.vue +0 -81
  15. package/src/components/LAlert/index.vue +0 -43
  16. package/src/components/LAttachmentChip/docs.vue +0 -84
  17. package/src/components/LAttachmentChip/index.vue +0 -179
  18. package/src/components/LBox/docs.vue +0 -26
  19. package/src/components/LBox/index.vue +0 -19
  20. package/src/components/LBoxHeader/index.vue +0 -24
  21. package/src/components/LBreadcrumb/docs.vue +0 -21
  22. package/src/components/LBreadcrumb/index.vue +0 -22
  23. package/src/components/LBreadcrumbItem/index.vue +0 -7
  24. package/src/components/LButton/docs.vue +0 -205
  25. package/src/components/LButton/index.vue +0 -369
  26. package/src/components/LButtonGroup/index.vue +0 -7
  27. package/src/components/LCarousel/docs.vue +0 -32
  28. package/src/components/LCarousel/index.vue +0 -88
  29. package/src/components/LCheckbox/docs.vue +0 -62
  30. package/src/components/LCheckbox/index.vue +0 -34
  31. package/src/components/LCheckboxButton/index.vue +0 -30
  32. package/src/components/LCheckboxGroup/index.vue +0 -53
  33. package/src/components/LChip/docs.vue +0 -113
  34. package/src/components/LChip/index.vue +0 -78
  35. package/src/components/LCircularLoader/docs.vue +0 -30
  36. package/src/components/LCircularLoader/index.vue +0 -97
  37. package/src/components/LCollapse/docs.vue +0 -68
  38. package/src/components/LCollapse/index.vue +0 -13
  39. package/src/components/LCollapseItem/index.vue +0 -28
  40. package/src/components/LDatePicker/docs.vue +0 -66
  41. package/src/components/LDatePicker/index.vue +0 -63
  42. package/src/components/LDialog/docs.vue +0 -36
  43. package/src/components/LDialog/index.vue +0 -37
  44. package/src/components/LDropdown/index.vue +0 -7
  45. package/src/components/LDropdownItem/index.vue +0 -13
  46. package/src/components/LDropdownMenu/docs.vue +0 -44
  47. package/src/components/LDropdownMenu/index.vue +0 -12
  48. package/src/components/LFailedToLoad/docs.vue +0 -37
  49. package/src/components/LFailedToLoad/index.vue +0 -61
  50. package/src/components/LForm/index.vue +0 -7
  51. package/src/components/LFormItem/index.vue +0 -12
  52. package/src/components/LHelperBox/assets/link.svg +0 -4
  53. package/src/components/LHelperBox/assets/open-envelope.svg +0 -9
  54. package/src/components/LHelperBox/docs.vue +0 -29
  55. package/src/components/LHelperBox/index.vue +0 -83
  56. package/src/components/LIcon/docs.vue +0 -174
  57. package/src/components/LIcon/index.vue +0 -55
  58. package/src/components/LImage/index.vue +0 -7
  59. package/src/components/LImageViewer/docs.vue +0 -111
  60. package/src/components/LImageViewer/index.vue +0 -449
  61. package/src/components/LInput/docs.vue +0 -43
  62. package/src/components/LInput/index.vue +0 -60
  63. package/src/components/LLinearProgress/docs.vue +0 -21
  64. package/src/components/LLinearProgress/index.vue +0 -74
  65. package/src/components/LNotice/docs.vue +0 -26
  66. package/src/components/LNotice/index.vue +0 -86
  67. package/src/components/LNotification/index.vue +0 -182
  68. package/src/components/LOption/index.vue +0 -7
  69. package/src/components/LOptionGroup/index.vue +0 -7
  70. package/src/components/LPresentation/docs.vue +0 -35
  71. package/src/components/LPresentation/index.vue +0 -182
  72. package/src/components/LProgress/index.vue +0 -7
  73. package/src/components/LPromptDialog/index.vue +0 -82
  74. package/src/components/LRadio/docs.vue +0 -54
  75. package/src/components/LRadio/index.vue +0 -13
  76. package/src/components/LRadioButton/index.vue +0 -30
  77. package/src/components/LRadioGroup/index.vue +0 -54
  78. package/src/components/LSearchBar/AddFilterButton.vue +0 -71
  79. package/src/components/LSearchBar/Filters/Editors/AmountEditor.vue +0 -110
  80. package/src/components/LSearchBar/Filters/Editors/DateEditor.vue +0 -146
  81. package/src/components/LSearchBar/Filters/Editors/NumberEditor.vue +0 -141
  82. package/src/components/LSearchBar/Filters/Editors/StringEditor.vue +0 -140
  83. package/src/components/LSearchBar/Filters/Editors/index.js +0 -16
  84. package/src/components/LSearchBar/Filters/FilterChip.vue +0 -105
  85. package/src/components/LSearchBar/Filters/Views/AmountView.vue +0 -28
  86. package/src/components/LSearchBar/Filters/Views/DateView.vue +0 -46
  87. package/src/components/LSearchBar/Filters/Views/NumberView.vue +0 -24
  88. package/src/components/LSearchBar/Filters/Views/StringView.vue +0 -47
  89. package/src/components/LSearchBar/Filters/Views/index.js +0 -16
  90. package/src/components/LSearchBar/docs.vue +0 -60
  91. package/src/components/LSearchBar/index.vue +0 -240
  92. package/src/components/LSearchTopics/RecentTermSearched.vue +0 -30
  93. package/src/components/LSearchTopics/TopicItem.vue +0 -346
  94. package/src/components/LSearchTopics/docs/drawer.vue +0 -254
  95. package/src/components/LSearchTopics/docs.vue +0 -60
  96. package/src/components/LSearchTopics/header.vue +0 -199
  97. package/src/components/LSearchTopics/helpers/showDialogConfirmation.js +0 -30
  98. package/src/components/LSearchTopics/helpers/showDiscardChangesDialog.js +0 -27
  99. package/src/components/LSearchTopics/index.vue +0 -750
  100. package/src/components/LSelect/docs.vue +0 -129
  101. package/src/components/LSelect/index.vue +0 -9
  102. package/src/components/LSlider/index.vue +0 -7
  103. package/src/components/LSwitch/docs.vue +0 -24
  104. package/src/components/LSwitch/index.vue +0 -60
  105. package/src/components/LTabPane/index.vue +0 -7
  106. package/src/components/LTable/FieldTypes/AmountView.vue +0 -16
  107. package/src/components/LTable/FieldTypes/DateView.vue +0 -18
  108. package/src/components/LTable/FieldTypes/EmailView.vue +0 -8
  109. package/src/components/LTable/FieldTypes/NumberView.vue +0 -13
  110. package/src/components/LTable/FieldTypes/PaymentStatusView.vue +0 -8
  111. package/src/components/LTable/FieldTypes/StringView.vue +0 -24
  112. package/src/components/LTable/FieldTypes/index.js +0 -18
  113. package/src/components/LTable/LTableBody.vue +0 -245
  114. package/src/components/LTable/LTableBodySpacer.vue +0 -17
  115. package/src/components/LTable/LTableEndspace.vue +0 -20
  116. package/src/components/LTable/LTableHeader.vue +0 -155
  117. package/src/components/LTable/LTableHeaderCell.vue +0 -188
  118. package/src/components/LTable/LTableHeaderLoader.vue +0 -62
  119. package/src/components/LTable/LTableHeaderResizer.vue +0 -162
  120. package/src/components/LTable/LTableLoadMore.vue +0 -56
  121. package/src/components/LTable/LTablePagination.vue +0 -174
  122. package/src/components/LTable/LTableReloader.vue +0 -61
  123. package/src/components/LTable/ListAdapter.js +0 -74
  124. package/src/components/LTable/docs.vue +0 -111
  125. package/src/components/LTable/helpers.js +0 -194
  126. package/src/components/LTable/index.vue +0 -961
  127. package/src/components/LTabs/docs.vue +0 -28
  128. package/src/components/LTabs/index.vue +0 -37
  129. package/src/components/LTargetChip/docs.vue +0 -86
  130. package/src/components/LTargetChip/index.vue +0 -64
  131. package/src/components/LTargetInput/docs.vue +0 -72
  132. package/src/components/LTargetInput/index.vue +0 -78
  133. package/src/components/LTextEditor/FloatingLink.vue +0 -91
  134. package/src/components/LTextEditor/LinkBox.vue +0 -94
  135. package/src/components/LTextEditor/docs.vue +0 -32
  136. package/src/components/LTextEditor/extensions/LayersBlockquote.js +0 -12
  137. package/src/components/LTextEditor/extensions/LayersBold.js +0 -11
  138. package/src/components/LTextEditor/extensions/LayersBreakLine.js +0 -16
  139. package/src/components/LTextEditor/extensions/LayersBubbleMenu.js +0 -10
  140. package/src/components/LTextEditor/extensions/LayersBulletList.js +0 -12
  141. package/src/components/LTextEditor/extensions/LayersHeading.js +0 -13
  142. package/src/components/LTextEditor/extensions/LayersHistory.js +0 -10
  143. package/src/components/LTextEditor/extensions/LayersItalic.js +0 -11
  144. package/src/components/LTextEditor/extensions/LayersLink.js +0 -29
  145. package/src/components/LTextEditor/extensions/LayersOrderedList.js +0 -12
  146. package/src/components/LTextEditor/extensions/LayersParagraph.js +0 -44
  147. package/src/components/LTextEditor/extensions/LayersPlaceholder.js +0 -11
  148. package/src/components/LTextEditor/extensions/LayersUnderline.js +0 -29
  149. package/src/components/LTextEditor/helpers/addProtocol.js +0 -5
  150. package/src/components/LTextEditor/helpers/removeEmptyTags.js +0 -5
  151. package/src/components/LTextEditor/index.vue +0 -421
  152. package/src/components/LTimeSelect/docs.vue +0 -41
  153. package/src/components/LTimeSelect/index.vue +0 -49
  154. package/src/components/LToggleButtonGroup/index.vue +0 -87
  155. package/src/components/LTooltip/docs.vue +0 -66
  156. package/src/components/LTooltip/index.vue +0 -28
  157. package/src/components/LTransitionExpand/docs.vue +0 -26
  158. package/src/components/LTransitionExpand/index.vue +0 -88
  159. package/src/components/LUpload/index.vue +0 -7
  160. package/src/docs/Colors.vue +0 -50
  161. package/src/docs/Home.vue +0 -11
  162. package/src/docs/Notifications.vue +0 -88
  163. package/src/docs/index.vue +0 -76
  164. package/src/docs/routes.js +0 -20
  165. package/src/helpers/Colors.js +0 -79
  166. package/src/helpers/FieldTypeComponents.js +0 -43
  167. package/src/helpers/Icons.js +0 -67
  168. package/src/helpers/Notification.js +0 -94
  169. package/src/helpers/PrettySize.js +0 -25
  170. package/src/helpers/RegisterElementUIComponents.js +0 -9
  171. package/src/helpers/Schemas.js +0 -18
  172. package/src/helpers/util.js +0 -15
  173. package/src/main-docs.js +0 -132
  174. package/src/main.js +0 -101
  175. package/src/style/colors.scss +0 -31
  176. package/src/style/element-variables.scss +0 -21
  177. package/src/style/icons.scss +0 -5
  178. package/src/style/layers-variables.scss +0 -73
  179. package/src/style/layout.scss +0 -2288
  180. package/src/style/main.scss +0 -11
  181. package/src/style/notifications.scss +0 -88
  182. package/src/style/transitions.scss +0 -43
  183. package/src/style/typography.scss +0 -155
  184. package/vue.config.js +0 -14
  185. /package/{public → dist}/favicon.ico +0 -0
  186. /package/{public → dist}/index.html +0 -0
@@ -1,87 +0,0 @@
1
- <template>
2
- <l-button-group class="l-toggle-button-group">
3
- <l-tooltip
4
- effect="dark"
5
- :content="option.title"
6
- placement="bottom"
7
- v-for="option of options"
8
- :key="option.value"
9
- >
10
- <l-button
11
- :disabled="disabled"
12
- :type="optionType(option)"
13
- :icon="option.icon"
14
- size="small"
15
- plain
16
- @click="selectOption(option)"
17
- ></l-button>
18
- </l-tooltip>
19
- </l-button-group>
20
- </template>
21
- <script>
22
- export default {
23
- tagName: 'l-toggle-button-group',
24
- model: {
25
- prop: "modelValue",
26
- event: "change"
27
- },
28
- props: {
29
- options: Array,
30
- modelValue: String,
31
- disabled: {
32
- type: Boolean,
33
- default: false
34
- }
35
- },
36
- data() {
37
- return {
38
- value: this.modelValue
39
- };
40
- },
41
- watch: {
42
- modelValue(val) {
43
- if (this.value !== val) {
44
- this.value = val;
45
- this.$emit("change", this.value);
46
- }
47
- }
48
- },
49
- methods: {
50
- optionType(option) {
51
- if (this.disabled) return "default"
52
- if (option.value === this.value) return "primary";
53
- return "default";
54
- },
55
- selectOption(option) {
56
- this.value = option.value;
57
- this.$emit("change", this.value);
58
- }
59
- }
60
- };
61
- </script>
62
- <style lang="scss">
63
- @import "../../style/main.scss";
64
-
65
- .l-toggle-button-group {
66
- .el-button {
67
- height: 32px;
68
- width: 32px;
69
- padding: 0px;
70
-
71
- &.el-button--primary,
72
- &.el-button--primary + .el-button {
73
- border-left-color: $--color-primary !important;
74
- }
75
- &.el-button--primary {
76
- border-color: $--color-primary !important;
77
- }
78
- &.el-button--default {
79
- color: #dcdfe6;
80
- }
81
-
82
- i {
83
- font-size: 18px;
84
- }
85
- }
86
- }
87
- </style>
@@ -1,66 +0,0 @@
1
- <template>
2
- <div id="app">
3
- <h1>Tooltip</h1>
4
- <l-tooltip class="item" content="Top Left prompts info" placement="right-start" effect="light" :value="true" manual>
5
- <l-button>top-start</l-button>
6
- </l-tooltip>
7
- <br>
8
- <l-tooltip class="item" content="Top Left prompts info" placement="right-start" effect="dark" :value="true" manual>
9
- <l-button>top-start</l-button>
10
- </l-tooltip>
11
- <div class="box">
12
- <div class="row">
13
- <l-tooltip class="item" content="Top Left prompts info" placement="top-start">
14
- <l-button>top-start</l-button>
15
- </l-tooltip>
16
- <l-tooltip class="item" content="Top Center prompts info" placement="top">
17
- <l-button>top</l-button>
18
- </l-tooltip>
19
- <l-tooltip class="item" content="Top Right prompts info" placement="top-end">
20
- <l-button>top-end</l-button>
21
- </l-tooltip>
22
- </div>
23
- <div class="row">
24
- <l-tooltip class="item" content="Left Top prompts info" placement="left-start">
25
- <l-button>left-start</l-button>
26
- </l-tooltip>
27
- <l-tooltip class="item" content="Left Center prompts info" placement="left">
28
- <l-button>left</l-button>
29
- </l-tooltip>
30
- <l-tooltip class="item" content="Left Bottom prompts info" placement="left-end">
31
- <l-button>left-end</l-button>
32
- </l-tooltip>
33
- </div>
34
-
35
- <div class="row">
36
- <l-tooltip class="item" content="Right Top prompts info" placement="right-start">
37
- <l-button>right-start</l-button>
38
- </l-tooltip>
39
- <l-tooltip class="item" content="Right Center prompts info" placement="right">
40
- <l-button>right</l-button>
41
- </l-tooltip>
42
- <l-tooltip class="item" content="Right Bottom prompts info" placement="right-end">
43
- <l-button>right-end</l-button>
44
- </l-tooltip>
45
- </div>
46
-
47
- <div class="row">
48
- <l-tooltip class="item" content="Bottom Left prompts info" placement="bottom-start">
49
- <l-button>bottom-start</l-button>
50
- </l-tooltip>
51
- <l-tooltip class="item" content="Bottom Center prompts info" placement="bottom">
52
- <l-button>bottom</l-button>
53
- </l-tooltip>
54
- <l-tooltip class="item" content="Bottom Right prompts info" placement="bottom-end">
55
- <l-button>bottom-end</l-button>
56
- </l-tooltip>
57
- </div>
58
- </div>
59
- </div>
60
- </template>
61
-
62
- <script>
63
- export default {
64
- name: "Tooltip"
65
- };
66
- </script>
@@ -1,28 +0,0 @@
1
- <script>
2
- import clone from "lodash/clone";
3
- import { Tooltip } from "element-ui";
4
-
5
- const Base = clone(Tooltip);
6
- delete Base.props.popperClass; // Hack to overwrite base component prop
7
-
8
- export default {
9
- tagName: "l-tooltip",
10
- extends: Base,
11
- props: ["tooltipClass"],
12
- computed: {
13
- popperClass() {
14
- return this.tooltipClass || "l-tooltip-popper"
15
- }
16
- }
17
- };
18
- </script>
19
- <style>
20
- .l-tooltip-popper.el-tooltip__popper.is-light {
21
- background: #ffffff;
22
- border: 0px solid #303133;
23
- box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
24
- }
25
- .l-tooltip-popper.el-tooltip__popper.is-light .popper__arrow {
26
- border-width: 0;
27
- }
28
- </style>
@@ -1,26 +0,0 @@
1
- <template>
2
- <div id="app">
3
- <h1>Transition Expand</h1>
4
- <div class="box">
5
- <div class="row">
6
- <div class="item">
7
- <l-button @click="expand = !expand">Expand!</l-button>
8
- <l-transition-expand>
9
- <div class="content" v-if="expand">Hi!</div>
10
- </l-transition-expand>
11
- </div>
12
- </div>
13
- </div>
14
- </div>
15
- </template>
16
-
17
- <script>
18
- export default {
19
- name: "TransitionExpand",
20
- data() {
21
- return {
22
- expand: false
23
- }
24
- }
25
- };
26
- </script>
@@ -1,88 +0,0 @@
1
- <template>
2
- <transition
3
- class="l-transition-expand"
4
- name="expand"
5
- @enter="enter"
6
- @after-enter="afterEnter"
7
- @leave="leave">
8
- <slot/>
9
- </transition>
10
- </template>
11
-
12
- <script>
13
- export default {
14
- tagName: "l-transition-expand",
15
- methods: {
16
- enter(element) {
17
- const width = getComputedStyle(element).width;
18
-
19
- element.style.width = width;
20
- element.style.position = 'absolute';
21
- element.style.visibility = 'hidden';
22
- element.style.height = 'auto';
23
-
24
- const height = getComputedStyle(element).height;
25
-
26
- element.style.width = null;
27
- element.style.position = null;
28
- element.style.visibility = null;
29
- element.style.height = 0;
30
-
31
- // Force repaint to make sure the
32
- // animation is triggered correctly.
33
- getComputedStyle(element).height;
34
-
35
- // Trigger the animation.
36
- requestAnimationFrame(() => {
37
- element.style.height = height;
38
- });
39
- },
40
- afterEnter(element) {
41
- element.style.height = 'auto'
42
- },
43
- leave(element) {
44
- const height = getComputedStyle(element).height
45
-
46
- element.style.height = height
47
-
48
- // Force repaint to make sure the
49
- // animation is triggered correctly.
50
- getComputedStyle(element).height
51
-
52
- requestAnimationFrame(() => {
53
- element.style.height = 0
54
- })
55
- },
56
- },
57
- }
58
- </script>
59
-
60
- <style scoped>
61
- * {
62
- will-change: height;
63
- transform: translateZ(0);
64
- backface-visibility: hidden;
65
- perspective: 1000px;
66
- }
67
-
68
- .expand-enter-active,
69
- .expand-leave-active {
70
- transition: height 0.3s ease-in-out;
71
- overflow: hidden;
72
- }
73
-
74
- .expand-enter,
75
- .expand-leave-to {
76
- height: 0;
77
- }
78
-
79
- .expand-enter-active,
80
- .expand-leave-active {
81
- transition-property: opacity, height;
82
- }
83
-
84
- .expand-enter,
85
- .expand-leave-to {
86
- opacity: 0;
87
- }
88
- </style>
@@ -1,7 +0,0 @@
1
- <script>
2
- import { Upload } from 'element-ui';
3
- export default {
4
- tagName: 'l-upload',
5
- extends: Upload
6
- }
7
- </script>
@@ -1,50 +0,0 @@
1
- <template>
2
- <div id="app">
3
- <h1>Colors</h1>
4
-
5
- <el-card class="primary">
6
- <h2>Primary</h2>
7
- </el-card>
8
- <el-card class="success">
9
- <h2>Success</h2>
10
- </el-card>
11
- <el-card class="warning">
12
- <h2>Warning</h2>
13
- </el-card>
14
- <el-card class="danger">
15
- <h2>Danger</h2>
16
- </el-card>
17
- <el-card class="info">
18
- <h2>Info</h2>
19
- </el-card>
20
- </div>
21
- </template>
22
-
23
- <script>
24
- export default {
25
- name: "app"
26
- };
27
- </script>
28
- <style lang="scss" scoped>
29
- @import "../style/main.scss";
30
-
31
- .row {
32
- padding: 8px 0;
33
- }
34
-
35
- .el-card.primary {
36
- background: $--color-primary;
37
- }
38
- .el-card.success {
39
- background: $--color-success;
40
- }
41
- .el-card.warning {
42
- background: $--color-warning;
43
- }
44
- .el-card.danger {
45
- background: $--color-danger;
46
- }
47
- .el-card.info {
48
- background: $--color-info;
49
- }
50
- </style>
package/src/docs/Home.vue DELETED
@@ -1,11 +0,0 @@
1
- <template>
2
- <div>
3
- Home
4
- </div>
5
- </template>
6
-
7
- <script>
8
- export default {
9
- name: "app"
10
- };
11
- </script>
@@ -1,88 +0,0 @@
1
- <template>
2
- <div id="app">
3
- <h1>Notifications</h1>
4
-
5
- <l-button @click="defaultNotification">Default</l-button>
6
- </div>
7
- </template>
8
-
9
- <script>
10
- export default {
11
- name: "Notifications",
12
-
13
- methods: {
14
- async defaultNotification() {
15
- const sleep = ms => new Promise(resolve => setTimeout(resolve, ms))
16
-
17
- this.$notify({
18
- message: 'Alguma coisa aconteceu e ela é neutra.',
19
- duration: 10000,
20
- loading: true,
21
- position: 'bottom',
22
- actionLabel: 'ATUALIZAR',
23
- action: () => {
24
- alert('Você me clicou')
25
- }
26
- });
27
- await sleep(1)
28
-
29
- this.$notify({
30
- type: 'error',
31
- message: 'Algo aconteceu aqui e falhou :(',
32
- duration: 10000,
33
- position: 'top',
34
- loading: true,
35
- loadingPosition: 'right',
36
- action: () => {
37
- alert('Você me clicou')
38
- }
39
- });
40
- await sleep(1)
41
-
42
- this.$notify({
43
- type: 'warning',
44
- showClose: false,
45
- actionLabel: 'ATUALIZAR',
46
- action: () => {
47
- alert('Você me clicou')
48
- },
49
- message: 'Parece que você está offline. Alguma outra info...',
50
- duration: 10000,
51
- position: 'top',
52
- });
53
- await sleep(1)
54
-
55
- this.$notify({
56
- type: 'success',
57
- message: 'Algo aconteceu aqui e foi um sucesso!',
58
- duration: 10000
59
- });
60
- await sleep(1)
61
-
62
- this.$notify({
63
- type: 'success',
64
- message: 'Algo aconteceu aqui e foi um sucesso! Algo aconteceu aqui e foi um sucesso! Algo aconteceu aqui e foi um sucesso!',
65
- duration: 10000
66
- });
67
- await sleep(1)
68
-
69
- this.$notify({
70
- type: 'success',
71
- message: 'Algo aconteceu e é clicável',
72
- duration: 10000,
73
- onClick() {}
74
- });
75
-
76
- await sleep(1)
77
-
78
- this.$notify({
79
- type: 'success',
80
- title: 'Algo aconteceu...',
81
- message: 'e tem título!',
82
- duration: 0,
83
- onClick() {}
84
- });
85
- }
86
- }
87
- };
88
- </script>
@@ -1,76 +0,0 @@
1
- <template>
2
- <el-container id="app" class="layers-design-system">
3
- <el-header>
4
- <h1>Layers Design System</h1>
5
- </el-header>
6
-
7
- <el-container>
8
- <el-aside
9
- width="200px"
10
- style="background-color: rgb(238, 241, 246); height: calc(100vh - 80px)"
11
- >
12
- <el-menu>
13
- <router-link
14
- :to="item.path"
15
- v-for="item in menuItems"
16
- :key="item.title"
17
- >
18
- <el-menu-item>{{ item.title }}</el-menu-item>
19
- </router-link>
20
- </el-menu>
21
- </el-aside>
22
-
23
- <div class="docs-content">
24
- <router-view></router-view>
25
- </div>
26
- </el-container>
27
- <vue-modals-stack name="default"></vue-modals-stack>
28
- </el-container>
29
- </template>
30
-
31
- <style>
32
- body {
33
- margin: 0;
34
- }
35
-
36
- .docs-content {
37
- position: relative;
38
- display: flex;
39
- flex-direction: column;
40
- height: calc(100vh - 80px);
41
- width: calc(100vw - 200px);
42
- margin-left: 64px;
43
- margin-right: 64px;
44
- }
45
-
46
- .docs-content > *:first-child {
47
- height: 100%;
48
- max-height: 100%;
49
- min-height: 100%;
50
- display: flex;
51
- flex-direction: column;
52
- }
53
-
54
- .row {
55
- padding: 8px 0;
56
- }
57
- .el-aside {
58
- color: #333;
59
- }
60
- .el-aside .el-menu-item a {
61
- color: inherit;
62
- text-decoration: none;
63
- }
64
- </style>
65
-
66
- <script>
67
- import routes from './routes'
68
-
69
- export default {
70
- computed: {
71
- menuItems() {
72
- return routes
73
- },
74
- },
75
- }
76
- </script>
@@ -1,20 +0,0 @@
1
- import Home from './Home'
2
- import Colors from './Colors'
3
- import Notifications from './Notifications'
4
-
5
- const componentsPages = require.context('../components', true, /docs.vue$/);
6
- const componentsRoutes = componentsPages.keys().map(path => {
7
- const component = componentsPages(path).default
8
- return {
9
- title: component.name,
10
- path: '/component/' + component.name,
11
- component: component
12
- }
13
- })
14
-
15
- export default [
16
- { title: 'Home', path: '/', component: Home },
17
- { title: 'Colors', path: '/colors', component: Colors },
18
- { title: 'Notifications', path: '/notifications', component: Notifications },
19
- ...componentsRoutes
20
- ]
@@ -1,79 +0,0 @@
1
- const CUSTOM_COLORS = [
2
- "aqua",
3
- "aqua-dark",
4
- "purple",
5
- "purple-dark",
6
- "salmon",
7
- "salmon-dark",
8
- "yellow",
9
- "yellow-dark",
10
- "lead",
11
- "lead-light",
12
- "link",
13
- "link-light",
14
- "success",
15
- "success-light",
16
- "warning",
17
- "warning-light",
18
- "danger",
19
- "danger-light",
20
- "white",
21
- "red",
22
- "green",
23
- "gray",
24
- "gray-10",
25
- "gray-20",
26
- "gray-30",
27
- "gray-40",
28
- "gray-50",
29
- "gray-60",
30
- "gray-70",
31
- "gray-80",
32
- "gray-90",
33
- ];
34
-
35
- export function getColor(color) {
36
- if (CUSTOM_COLORS.includes(color)) {
37
- return `var(--color-${color})`;
38
- }
39
- return color;
40
- }
41
-
42
- export function getColorLight(color) {
43
- if (CUSTOM_COLORS.includes(color)) {
44
- return `var(--color-${color}-op)`;
45
- }
46
-
47
- return hexToRgbA(color)
48
- }
49
-
50
- function hexToRgbA(hex){
51
- var c;
52
- if(/^#([A-Fa-f0-9]{3}){1,2}$/.test(hex)){
53
- c= hex.substring(1).split('');
54
- if(c.length== 3){
55
- c= [c[0], c[0], c[1], c[1], c[2], c[2]];
56
- }
57
- c= '0x'+c.join('');
58
- return 'rgba('+[(c>>16)&255, (c>>8)&255, c&255].join(',')+',0.1)';
59
- }
60
-
61
- return `var(--color-gray-60-op)`
62
- }
63
-
64
- const Plugin = {}
65
- Plugin.install = function (Vue) {
66
-
67
- Vue.prototype.$L.getColor = getColor;
68
- Vue.prototype.$L.getColorLight = getColorLight;
69
-
70
- Vue.mixin({
71
- beforeCreate: function() {
72
- if (this.$options && this.$options.propsData && this.$options.propsData.color) {
73
- this.$options.propsData.color = getColor(this.$options.propsData.color)
74
- }
75
- }
76
- })
77
- }
78
-
79
- export default Plugin
@@ -1,43 +0,0 @@
1
- import { buildFieldKeys } from "./util"
2
-
3
- const COMPONENTS = new Map();
4
-
5
- function getComponent(fieldSchema, componentType) {
6
- if (!fieldSchema) {
7
- throw new Error(`Received ${fieldSchema} fieldSchema, componentType ${componentType}`)
8
- }
9
- if (fieldSchema.components && fieldSchema.components[componentType]) {
10
- return fieldSchema.components[componentType]
11
- }
12
-
13
- const fieldKeys = buildFieldKeys(fieldSchema)
14
- for (const fieldKey of fieldKeys) {
15
- const component = COMPONENTS.get(`${fieldKey}:${componentType}`);
16
- if (component) {
17
- return component
18
- }
19
- }
20
- throw new Error(`Component not found for field schema ${JSON.stringify(fieldSchema)} and component type ${componentType}`)
21
- }
22
-
23
- function registerComponent(fieldSchema, componentType, component) {
24
- const fieldKey = buildFieldKeys(fieldSchema)[0] // Only set most prioritary key
25
- const key = `${fieldKey}:${componentType}`
26
- if (COMPONENTS.has(key) && COMPONENTS.get(key) !== component) {
27
- // eslint-disable-next-line no-console
28
- console.warn(`Overwriting component for key ${key}`)
29
- }
30
- COMPONENTS.set(key, component);
31
- }
32
-
33
- export const FieldTypeComponents = {
34
- get: getComponent,
35
- register: registerComponent,
36
- }
37
-
38
- const Plugin = {};
39
- Plugin.install = function (Vue) {
40
- Vue.prototype.$L.FieldTypeComponents = FieldTypeComponents
41
- }
42
-
43
- export default Plugin;