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.
Files changed (186) hide show
  1. package/dist/layers-design-system.js +78505 -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/public/favicon.ico +0 -0
  8. package/public/index.html +0 -20
  9. package/src/assets/button-text-editor/double-quotes.svg +0 -4
  10. package/src/assets/button-text-editor/remove-formatting.svg +0 -5
  11. package/src/assets/button-text-editor/title.svg +0 -4
  12. package/src/assets/failed-to-load/failed-to-load.svg +0 -60
  13. package/src/assets/l-presentation/external-apps.png +0 -0
  14. package/src/assets/l-presentation/notification.png +0 -0
  15. package/src/assets/search-topics/empty-tags.svg +0 -59
  16. package/src/components/LAlert/docs.vue +0 -81
  17. package/src/components/LAlert/index.vue +0 -43
  18. package/src/components/LAttachmentChip/docs.vue +0 -84
  19. package/src/components/LAttachmentChip/index.vue +0 -179
  20. package/src/components/LBox/docs.vue +0 -26
  21. package/src/components/LBox/index.vue +0 -19
  22. package/src/components/LBoxHeader/index.vue +0 -24
  23. package/src/components/LBreadcrumb/docs.vue +0 -21
  24. package/src/components/LBreadcrumb/index.vue +0 -22
  25. package/src/components/LBreadcrumbItem/index.vue +0 -7
  26. package/src/components/LButton/docs.vue +0 -205
  27. package/src/components/LButton/index.vue +0 -369
  28. package/src/components/LButtonGroup/index.vue +0 -7
  29. package/src/components/LCarousel/docs.vue +0 -32
  30. package/src/components/LCarousel/index.vue +0 -88
  31. package/src/components/LCheckbox/docs.vue +0 -62
  32. package/src/components/LCheckbox/index.vue +0 -34
  33. package/src/components/LCheckboxButton/index.vue +0 -30
  34. package/src/components/LCheckboxGroup/index.vue +0 -53
  35. package/src/components/LChip/docs.vue +0 -113
  36. package/src/components/LChip/index.vue +0 -78
  37. package/src/components/LCircularLoader/docs.vue +0 -30
  38. package/src/components/LCircularLoader/index.vue +0 -97
  39. package/src/components/LCollapse/docs.vue +0 -68
  40. package/src/components/LCollapse/index.vue +0 -13
  41. package/src/components/LCollapseItem/index.vue +0 -28
  42. package/src/components/LDatePicker/docs.vue +0 -66
  43. package/src/components/LDatePicker/index.vue +0 -63
  44. package/src/components/LDialog/docs.vue +0 -36
  45. package/src/components/LDialog/index.vue +0 -37
  46. package/src/components/LDropdown/index.vue +0 -7
  47. package/src/components/LDropdownItem/index.vue +0 -13
  48. package/src/components/LDropdownMenu/docs.vue +0 -44
  49. package/src/components/LDropdownMenu/index.vue +0 -12
  50. package/src/components/LFailedToLoad/docs.vue +0 -37
  51. package/src/components/LFailedToLoad/index.vue +0 -61
  52. package/src/components/LForm/index.vue +0 -7
  53. package/src/components/LFormItem/index.vue +0 -12
  54. package/src/components/LHelperBox/assets/link.svg +0 -4
  55. package/src/components/LHelperBox/assets/open-envelope.svg +0 -9
  56. package/src/components/LHelperBox/docs.vue +0 -29
  57. package/src/components/LHelperBox/index.vue +0 -83
  58. package/src/components/LIcon/docs.vue +0 -174
  59. package/src/components/LIcon/index.vue +0 -55
  60. package/src/components/LImage/index.vue +0 -7
  61. package/src/components/LImageViewer/docs.vue +0 -111
  62. package/src/components/LImageViewer/index.vue +0 -449
  63. package/src/components/LInput/docs.vue +0 -43
  64. package/src/components/LInput/index.vue +0 -60
  65. package/src/components/LLinearProgress/docs.vue +0 -21
  66. package/src/components/LLinearProgress/index.vue +0 -74
  67. package/src/components/LNotice/docs.vue +0 -26
  68. package/src/components/LNotice/index.vue +0 -86
  69. package/src/components/LNotification/index.vue +0 -182
  70. package/src/components/LOption/index.vue +0 -7
  71. package/src/components/LOptionGroup/index.vue +0 -7
  72. package/src/components/LPresentation/docs.vue +0 -35
  73. package/src/components/LPresentation/index.vue +0 -182
  74. package/src/components/LProgress/index.vue +0 -7
  75. package/src/components/LPromptDialog/index.vue +0 -82
  76. package/src/components/LRadio/docs.vue +0 -54
  77. package/src/components/LRadio/index.vue +0 -13
  78. package/src/components/LRadioButton/index.vue +0 -30
  79. package/src/components/LRadioGroup/index.vue +0 -54
  80. package/src/components/LSearchBar/AddFilterButton.vue +0 -71
  81. package/src/components/LSearchBar/Filters/Editors/AmountEditor.vue +0 -110
  82. package/src/components/LSearchBar/Filters/Editors/DateEditor.vue +0 -146
  83. package/src/components/LSearchBar/Filters/Editors/NumberEditor.vue +0 -141
  84. package/src/components/LSearchBar/Filters/Editors/StringEditor.vue +0 -140
  85. package/src/components/LSearchBar/Filters/Editors/index.js +0 -16
  86. package/src/components/LSearchBar/Filters/FilterChip.vue +0 -105
  87. package/src/components/LSearchBar/Filters/Views/AmountView.vue +0 -28
  88. package/src/components/LSearchBar/Filters/Views/DateView.vue +0 -46
  89. package/src/components/LSearchBar/Filters/Views/NumberView.vue +0 -24
  90. package/src/components/LSearchBar/Filters/Views/StringView.vue +0 -47
  91. package/src/components/LSearchBar/Filters/Views/index.js +0 -16
  92. package/src/components/LSearchBar/docs.vue +0 -60
  93. package/src/components/LSearchBar/index.vue +0 -240
  94. package/src/components/LSearchTopics/RecentTermSearched.vue +0 -30
  95. package/src/components/LSearchTopics/TopicItem.vue +0 -346
  96. package/src/components/LSearchTopics/docs/drawer.vue +0 -254
  97. package/src/components/LSearchTopics/docs.vue +0 -60
  98. package/src/components/LSearchTopics/header.vue +0 -199
  99. package/src/components/LSearchTopics/helpers/showDialogConfirmation.js +0 -30
  100. package/src/components/LSearchTopics/helpers/showDiscardChangesDialog.js +0 -27
  101. package/src/components/LSearchTopics/index.vue +0 -750
  102. package/src/components/LSelect/docs.vue +0 -129
  103. package/src/components/LSelect/index.vue +0 -9
  104. package/src/components/LSlider/index.vue +0 -7
  105. package/src/components/LSwitch/docs.vue +0 -24
  106. package/src/components/LSwitch/index.vue +0 -60
  107. package/src/components/LTabPane/index.vue +0 -7
  108. package/src/components/LTable/FieldTypes/AmountView.vue +0 -16
  109. package/src/components/LTable/FieldTypes/DateView.vue +0 -18
  110. package/src/components/LTable/FieldTypes/EmailView.vue +0 -8
  111. package/src/components/LTable/FieldTypes/NumberView.vue +0 -13
  112. package/src/components/LTable/FieldTypes/PaymentStatusView.vue +0 -8
  113. package/src/components/LTable/FieldTypes/StringView.vue +0 -24
  114. package/src/components/LTable/FieldTypes/index.js +0 -18
  115. package/src/components/LTable/LTableBody.vue +0 -245
  116. package/src/components/LTable/LTableBodySpacer.vue +0 -17
  117. package/src/components/LTable/LTableEndspace.vue +0 -20
  118. package/src/components/LTable/LTableHeader.vue +0 -155
  119. package/src/components/LTable/LTableHeaderCell.vue +0 -188
  120. package/src/components/LTable/LTableHeaderLoader.vue +0 -62
  121. package/src/components/LTable/LTableHeaderResizer.vue +0 -162
  122. package/src/components/LTable/LTableLoadMore.vue +0 -56
  123. package/src/components/LTable/LTablePagination.vue +0 -174
  124. package/src/components/LTable/LTableReloader.vue +0 -61
  125. package/src/components/LTable/ListAdapter.js +0 -74
  126. package/src/components/LTable/docs.vue +0 -111
  127. package/src/components/LTable/helpers.js +0 -194
  128. package/src/components/LTable/index.vue +0 -961
  129. package/src/components/LTabs/docs.vue +0 -28
  130. package/src/components/LTabs/index.vue +0 -37
  131. package/src/components/LTargetChip/docs.vue +0 -86
  132. package/src/components/LTargetChip/index.vue +0 -64
  133. package/src/components/LTargetInput/docs.vue +0 -72
  134. package/src/components/LTargetInput/index.vue +0 -78
  135. package/src/components/LTextEditor/FloatingLink.vue +0 -91
  136. package/src/components/LTextEditor/LinkBox.vue +0 -94
  137. package/src/components/LTextEditor/docs.vue +0 -32
  138. package/src/components/LTextEditor/extensions/LayersBlockquote.js +0 -12
  139. package/src/components/LTextEditor/extensions/LayersBold.js +0 -11
  140. package/src/components/LTextEditor/extensions/LayersBreakLine.js +0 -16
  141. package/src/components/LTextEditor/extensions/LayersBubbleMenu.js +0 -10
  142. package/src/components/LTextEditor/extensions/LayersBulletList.js +0 -12
  143. package/src/components/LTextEditor/extensions/LayersHeading.js +0 -13
  144. package/src/components/LTextEditor/extensions/LayersHistory.js +0 -10
  145. package/src/components/LTextEditor/extensions/LayersItalic.js +0 -11
  146. package/src/components/LTextEditor/extensions/LayersLink.js +0 -29
  147. package/src/components/LTextEditor/extensions/LayersOrderedList.js +0 -12
  148. package/src/components/LTextEditor/extensions/LayersParagraph.js +0 -44
  149. package/src/components/LTextEditor/extensions/LayersPlaceholder.js +0 -11
  150. package/src/components/LTextEditor/extensions/LayersUnderline.js +0 -29
  151. package/src/components/LTextEditor/helpers/addProtocol.js +0 -5
  152. package/src/components/LTextEditor/helpers/removeEmptyTags.js +0 -5
  153. package/src/components/LTextEditor/index.vue +0 -421
  154. package/src/components/LTimeSelect/docs.vue +0 -41
  155. package/src/components/LTimeSelect/index.vue +0 -49
  156. package/src/components/LToggleButtonGroup/index.vue +0 -87
  157. package/src/components/LTooltip/docs.vue +0 -66
  158. package/src/components/LTooltip/index.vue +0 -28
  159. package/src/components/LTransitionExpand/docs.vue +0 -26
  160. package/src/components/LTransitionExpand/index.vue +0 -88
  161. package/src/components/LUpload/index.vue +0 -7
  162. package/src/docs/Colors.vue +0 -50
  163. package/src/docs/Home.vue +0 -11
  164. package/src/docs/Notifications.vue +0 -88
  165. package/src/docs/index.vue +0 -76
  166. package/src/docs/routes.js +0 -20
  167. package/src/helpers/Colors.js +0 -79
  168. package/src/helpers/FieldTypeComponents.js +0 -43
  169. package/src/helpers/Icons.js +0 -67
  170. package/src/helpers/Notification.js +0 -94
  171. package/src/helpers/PrettySize.js +0 -25
  172. package/src/helpers/RegisterElementUIComponents.js +0 -9
  173. package/src/helpers/Schemas.js +0 -18
  174. package/src/helpers/util.js +0 -15
  175. package/src/main-docs.js +0 -132
  176. package/src/main.js +0 -100
  177. package/src/style/colors.scss +0 -31
  178. package/src/style/element-variables.scss +0 -21
  179. package/src/style/icons.scss +0 -5
  180. package/src/style/layers-variables.scss +0 -73
  181. package/src/style/layout.scss +0 -2288
  182. package/src/style/main.scss +0 -11
  183. package/src/style/notifications.scss +0 -88
  184. package/src/style/transitions.scss +0 -43
  185. package/src/style/typography.scss +0 -155
  186. package/vue.config.js +0 -14
@@ -1,67 +0,0 @@
1
- const CUSTOM_ICONS = {
2
- "type:String": "uil-text",
3
- "type:Number": "uil-star",
4
- "type:Date": "uil-calender",
5
-
6
- "format:Email": "uil-at",
7
- "format:Amount": "uil-usd-circle",
8
- "format:PaymentStatus": "uil-bolt-alt",
9
-
10
- "amount": "uil-usd-circle",
11
- "recurrence": "uil-repeat",
12
- "date": "uil-calender",
13
- "user": "uil-user-circle",
14
- "email": "uil-at",
15
- "key": "uil-key-skeleton"
16
- };
17
-
18
- function get(key) {
19
- if (!key) {
20
- return null
21
- }
22
-
23
- if (key.icon) {
24
- key = key.icon
25
- }
26
- else if (key.format) {
27
- key = `format:${key.format}`
28
- }
29
- else if (key.type) {
30
- key = `type:${key.type}`
31
- }
32
- if (key in CUSTOM_ICONS) {
33
- key = CUSTOM_ICONS[key];
34
- }
35
-
36
- return key;
37
- }
38
- function register(key, className) {
39
- CUSTOM_ICONS[key] = className
40
- }
41
- function registerForType(type, className) {
42
- CUSTOM_ICONS[`type:${type}`] = className
43
- }
44
- function registerForFormat(format, className) {
45
- CUSTOM_ICONS[`format:${format}`] = className
46
- }
47
-
48
- const Plugin = {};
49
- Plugin.install = function (Vue) {
50
- Vue.prototype.$L.Icons = {
51
- get,
52
- register,
53
- registerForType,
54
- registerForFormat
55
- }
56
-
57
- // Vue.mixin({
58
- // beforeCreate() {
59
- // window['console'].log('beforeCreate', this)
60
- // if (this.$options && this.$options.propsData && this.$options.propsData.icon) {
61
- // this.$options.propsData.icon = get(this.$options.propsData.icon)
62
- // }
63
- // }
64
- // })
65
- }
66
-
67
- export default Plugin;
@@ -1,94 +0,0 @@
1
- import Vue from 'vue';
2
- import Main from '../components/LNotification/index.vue';
3
- import merge from 'element-ui/src/utils/merge';
4
- import { PopupManager } from 'element-ui/src/utils/popup';
5
- import { isVNode } from 'element-ui/src/utils/vdom';
6
- const NotificationConstructor = Vue.extend(Main);
7
-
8
- let instance;
9
- let instances = [];
10
- let seed = 1;
11
-
12
- const Notification = function(options) {
13
- if (Vue.prototype.$isServer) return;
14
- options = merge({}, options);
15
- const userOnClose = options.onClose;
16
- const id = 'notification_' + seed++;
17
- const position = options.position || 'top-right';
18
-
19
- options.onClose = function() {
20
- Notification.close(id, userOnClose);
21
- };
22
-
23
- instance = new NotificationConstructor({
24
- data: options
25
- });
26
-
27
- if (isVNode(options.message)) {
28
- instance.$slots.default = [options.message];
29
- options.message = 'REPLACED_BY_VNODE';
30
- }
31
- instance.id = id;
32
- instance.$mount();
33
- document.body.appendChild(instance.$el);
34
- instance.visible = true;
35
- instance.dom = instance.$el;
36
- instance.dom.style.zIndex = PopupManager.nextZIndex();
37
-
38
- let verticalOffset = options.offset || 0;
39
- instances.filter(item => item.position === position).forEach(item => {
40
- verticalOffset += item.$el.offsetHeight + 16;
41
- });
42
- verticalOffset += 16;
43
- instance.verticalOffset = verticalOffset;
44
- instances.push(instance);
45
- return instance;
46
- };
47
-
48
- ['success', 'warning', 'info', 'error'].forEach(type => {
49
- Notification[type] = options => {
50
- if (typeof options === 'string' || isVNode(options)) {
51
- options = {
52
- message: options
53
- };
54
- }
55
- options.type = type;
56
- return Notification(options);
57
- };
58
- });
59
-
60
- Notification.close = function(id, userOnClose) {
61
- let index = -1;
62
- const len = instances.length;
63
- const instance = instances.filter((instance, i) => {
64
- if (instance.id === id) {
65
- index = i;
66
- return true;
67
- }
68
- return false;
69
- })[0];
70
- if (!instance) return;
71
-
72
- if (typeof userOnClose === 'function') {
73
- userOnClose(instance);
74
- }
75
- instances.splice(index, 1);
76
-
77
- if (len <= 1) return;
78
- const position = instance.position;
79
- const removedHeight = instance.dom.offsetHeight;
80
- for (let i = index; i < len - 1 ; i++) {
81
- if (instances[i].position === position) {
82
- instances[i].dom.style[instance.verticalProperty] =
83
- parseInt(instances[i].dom.style[instance.verticalProperty], 10) - removedHeight - 16 + 'px';
84
- }
85
- }
86
- };
87
-
88
- Notification.closeAll = function() {
89
- for (let i = instances.length - 1; i >= 0; i--) {
90
- instances[i].close();
91
- }
92
- };
93
-
94
- export default Notification;
@@ -1,25 +0,0 @@
1
- /*
2
- * Source: https://stackoverflow.com/a/14919494
3
- *
4
- * Returns a pretty form of "size" to show in UI. Examples:
5
- * 10 => '10B'
6
- * 1024 => '10KB'
7
- */
8
- export default function PrettySize(bytes) {
9
- if (!bytes) return '';
10
-
11
- var si = true
12
- var thresh = si ? 1000 : 1024;
13
- if(Math.abs(bytes) < thresh) {
14
- return bytes + ' B';
15
- }
16
- var units = si
17
- ? ['kb','MB','GB','TB','PB','EB','ZB','YB']
18
- : ['KiB','MiB','GiB','TiB','PiB','EiB','ZiB','YiB'];
19
- var u = -1;
20
- do {
21
- bytes /= thresh;
22
- ++u;
23
- } while(Math.abs(bytes) >= thresh && u < units.length - 1);
24
- return bytes.toFixed(1)+' '+units[u];
25
- }
@@ -1,9 +0,0 @@
1
- import { Input } from "element-ui"
2
-
3
- const Plugin = {}
4
-
5
- Plugin.install = function (Vue) {
6
- Vue.component(Input.name, Input)
7
- }
8
-
9
- export default Plugin
@@ -1,18 +0,0 @@
1
- const SCHEMAS = new Map();
2
-
3
- function getSchema(key) {
4
- return SCHEMAS.get(key);
5
- }
6
- function registerSchema(key, schema) {
7
- SCHEMAS.set(key, schema);
8
- }
9
-
10
- const Plugin = {};
11
- Plugin.install = function (Vue) {
12
- Vue.prototype.$L.Schemas = {
13
- get: getSchema,
14
- register: registerSchema,
15
- }
16
- }
17
-
18
- export default Plugin;
@@ -1,15 +0,0 @@
1
- export function buildFieldKeys(fieldSchema) {
2
- const keys = []
3
- if (fieldSchema && fieldSchema.format) {
4
- keys.push(`format:${fieldSchema.format}`)
5
- }
6
- if (fieldSchema && fieldSchema.type) {
7
- keys.push(`type:${fieldSchema.type}`)
8
- }
9
- keys.push('DEFAULT')
10
-
11
- if (keys.length === 0) {
12
- throw new Error(`Unprocessable fieldSchema ${fieldSchema}`)
13
- }
14
- return keys
15
- }
package/src/main-docs.js DELETED
@@ -1,132 +0,0 @@
1
- import Vue from 'vue'
2
-
3
- import Element from 'element-ui'
4
- import './style/element-variables.scss'
5
- import locale from 'element-ui/lib/locale/lang/pt-br'
6
- Vue.use(Element, { locale })
7
-
8
- import LayersDesignSystem from './main.js'
9
- Vue.use(LayersDesignSystem)
10
- window.$L = Vue.prototype.$L
11
-
12
- import VueModals from '@tenda.digital/vue-modals'
13
- import '@tenda.digital/vue-modals/dist/vue-modals.css'
14
- Vue.use(VueModals)
15
-
16
- import VueRouter from 'vue-router'
17
- Vue.use(VueRouter)
18
-
19
- const PayableSchema = {
20
- title: 'Cobranças',
21
- description: '',
22
- collection: 'payables',
23
- url: 'https://api.layers.digital/v1/payments/payables',
24
- fields: [
25
- {
26
- title: 'Código da Cobrança',
27
- description: 'Identificador único da cobrança',
28
- reason: '',
29
- path: 'code',
30
- type: 'String',
31
- options: {
32
- routerLink: '/payments/payables/{{ id }}',
33
- },
34
- sortable: false,
35
- displayable: true,
36
- filterable: true,
37
- editable: false,
38
- icon: 'key',
39
- },
40
- {
41
- title: 'Data da Cobrança',
42
- description: 'Data de vencimento da cobrança',
43
- reason: '',
44
- path: 'dueAt',
45
- type: 'Date',
46
- options: {
47
- format: 'LL',
48
- },
49
- sortable: true,
50
- displayable: true,
51
- filterable: true,
52
- editable: true,
53
- },
54
- {
55
- title: 'Cliente',
56
- description: 'Nome de quem fez a compra',
57
- reason: '',
58
- path: 'customer.name',
59
- type: 'String',
60
- options: null,
61
- sortable: true,
62
- displayable: true,
63
- filterable: true,
64
- editable: false,
65
- icon: 'user',
66
- },
67
- {
68
- title: 'Parcela',
69
- description: 'Número da parcela da venda',
70
- reason: '',
71
- path: 'installment',
72
- format: 'Installment',
73
- type: 'Number',
74
- options: null,
75
- sortable: true,
76
- displayable: true,
77
- filterable: true,
78
- editable: false,
79
- },
80
- {
81
- title: 'Status',
82
- description: 'Status atual da cobrança',
83
- reason: '',
84
- path: 'status',
85
- format: 'PaymentStatus',
86
- type: 'String',
87
- options: {
88
- enum: [
89
- 'open',
90
- 'refunded',
91
- 'chargeback',
92
- 'in_protest',
93
- 'paid',
94
- 'released',
95
- 'pending',
96
- 'failed',
97
- 'expired',
98
- 'late',
99
- 'canceled',
100
- ],
101
- },
102
- sortable: false,
103
- displayable: true,
104
- filterable: true,
105
- editable: false,
106
- },
107
- {
108
- title: 'Valor',
109
- description: 'Valor total cobrado do cliente',
110
- reason: '',
111
- path: 'price.amount',
112
- format: 'Amount',
113
- type: 'Number',
114
- options: null,
115
- sortable: true,
116
- displayable: true,
117
- filterable: true,
118
- editable: true,
119
- },
120
- ],
121
- }
122
- Vue.prototype.$L.Schemas.register('payable', PayableSchema)
123
-
124
- import App from './docs'
125
- import routes from './docs/routes'
126
-
127
- const router = new VueRouter({ routes })
128
-
129
- new Vue({
130
- router,
131
- render: (h) => h(App),
132
- }).$mount('#app')
package/src/main.js DELETED
@@ -1,100 +0,0 @@
1
- import lang from "element-ui/lib/locale/lang/pt-br";
2
- import locale from "element-ui/lib/locale";
3
- import "dayjs/locale/pt-br";
4
- import dayjs from "dayjs";
5
- import localizedFormatPlugin from "dayjs/plugin/localizedFormat";
6
-
7
- import "./style/main.scss";
8
- import Colors from "./helpers/Colors";
9
- import Icons from "./helpers/Icons";
10
- import Schemas from "./helpers/Schemas";
11
- import Notification from "./helpers/Notification";
12
- import FieldTypeComponents from "./helpers/FieldTypeComponents";
13
- import RegisterElementUIComponents from "./helpers/RegisterElementUIComponents";
14
-
15
- // Vant
16
- import Vant from "vant";
17
- import "vant/lib/index.css";
18
- // Zoomer
19
- import VueZoomer from "vue-zoomer";
20
-
21
- function hasRequire() {
22
- try {
23
- return typeof require.context !== "undefined";
24
- } catch (e) {
25
- return false;
26
- }
27
- }
28
-
29
- const LayersDesignSystem = {};
30
- LayersDesignSystem.install = function (Vue) {
31
- Vue.prototype.$L = {};
32
-
33
- Vue.use(Vant);
34
- Vue.use(VueZoomer);
35
- Vue.use(Colors);
36
- Vue.use(Icons);
37
- Vue.use(Schemas);
38
- Vue.use(FieldTypeComponents);
39
- Vue.use(RegisterElementUIComponents);
40
-
41
- locale.use(lang);
42
- dayjs.extend(localizedFormatPlugin);
43
-
44
- Vue.mixin({
45
- mounted() {
46
- this.__layers_addClassName();
47
- },
48
- updated() {
49
- this.__layers_addClassName();
50
- },
51
- methods: {
52
- __layers_addClassName() {
53
- if (!this.__layers_addedClassName) {
54
- const tagName = this.$options.tagName || "";
55
- if (/^l-/.test(tagName) && this.$el.classList) {
56
- this.$el.classList.add(tagName);
57
- }
58
- }
59
- },
60
- },
61
- });
62
-
63
- Vue.prototype.$notify = function (params) {
64
- const isClickable = params.onClick && params.onClick instanceof Function;
65
- const customClasses = [
66
- params.customClass,
67
- params.type,
68
- !params.customClass && !params.type && "default",
69
- isClickable && "cursor-pointer",
70
- ];
71
-
72
- return Notification({
73
- ...params,
74
- customClass: customClasses.filter((customClass) => customClass).join(" "),
75
- });
76
- };
77
-
78
- if (hasRequire()) {
79
- const requireComponent = require.context(
80
- "./components",
81
- true,
82
- /index.vue$/
83
- );
84
- requireComponent.keys().forEach((path) => {
85
- const component = requireComponent(path).default;
86
- if (!component.tagName) throw new Error(`Missing tagName for ${path}`);
87
- Vue.component(component.tagName, component);
88
- });
89
- } else {
90
- const components = import.meta.glob("./components/**/index.vue", {
91
- eager: true,
92
- });
93
- for (const componentModule of Object.values(components)) {
94
- Vue.component(componentModule.default.tagName, componentModule.default);
95
- }
96
- }
97
- };
98
-
99
- export { Notification };
100
- export default LayersDesignSystem;
@@ -1,31 +0,0 @@
1
- @function hexToRGBString($hexColor) {
2
- @return "#{red($hexColor)},#{green($hexColor)},#{blue($hexColor)}";
3
- }
4
-
5
- @function setOpacity($color) {
6
- @return "rgba(#{hexToRGBString($color)}, 0.12)";
7
- }
8
-
9
- @each $key, $value in $colors {
10
- .#{"" + $key} {
11
- background-color: #{$value} !important;
12
- }
13
- .#{"" + $key}-outline {
14
- border-color: #{$value} !important;
15
- }
16
- .#{"" + $key}--text {
17
- color: #{$value} !important;
18
- }
19
- .color-#{"" + $key} {
20
- color: #{$value};
21
- }
22
- .bg-color-#{"" + $key} {
23
- background-color: #{$value};
24
- }
25
- & {
26
- --#{"" + $key}: #{$value};
27
- --color-#{"" + $key}: #{$value};
28
- --color-#{"" + $key}-rgb: #{hexToRGBString($value)};
29
- --color-#{"" + $key}-op: #{setOpacity($value)};
30
- }
31
- }
@@ -1,21 +0,0 @@
1
- @import "./layers-variables.scss";
2
-
3
- $--color-primary: $aqua;
4
- $--color-success: $success;
5
- $--color-warning: $yellow-dark;
6
- $--color-danger: $danger;
7
- $--color-info: $lead-light;
8
-
9
- :root {
10
- --color-primary: #{$--color-primary};
11
- --color-success: #{$--color-success};
12
- --color-warning: #{$--color-warning};
13
- --color-danger: #{$--color-danger};
14
- --color-info: #{$--color-info};
15
- --white: #{$white};
16
- }
17
-
18
- /* icon font path, required */
19
- $--font-path: '~element-ui/lib/theme-chalk/fonts';
20
-
21
- @import "~element-ui/packages/theme-chalk/src/index";
@@ -1,5 +0,0 @@
1
- /* unicons fix */
2
- [class^="uil-"]:before,
3
- [class*=" uil-"]:before {
4
- margin: 0 !important;
5
- }
@@ -1,73 +0,0 @@
1
- /* Brand Colors */
2
- $aqua: #00b8ad;
3
- $aqua-dark: #00a69c;
4
- $aqua-light: rgba($aqua, 0.1);
5
- $purple: #5451d6;
6
- $purple-dark: #4644b5;
7
- $salmon: #f97777;
8
- $salmon-dark: #e86161;
9
- $yellow: #ffca65;
10
- $yellow-dark: #f5b845;
11
- $lead: #232b34;
12
- $lead-light: #434e5b;
13
- $white: #ffffff;
14
- $gray: #808080;
15
- $red: #ed6b4f;
16
- $green: #30b565;
17
-
18
- /* Feedback Colors */
19
- $link: #2f8af5;
20
- $link-light: rgba($link, 0.1);
21
- $success: #30b565;
22
- $success-light: rgba($success, 0.1);
23
- $warning: #f0af09;
24
- $warning-light: rgba($warning, 0.12);
25
- $danger: #ed6b4f;
26
- $danger-light: rgba($danger, 0.1);
27
-
28
- /* Greyscale Colors */
29
- $gray-10: #F4F6F8;
30
- $gray-20: #EEF1F5;
31
- $gray-30: #E8ECEF;
32
- $gray-40: #D7DEE3;
33
- $gray-50: #C8D0D8;
34
- $gray-60: #A3B1BF;
35
- $gray-70: #748494;
36
- $gray-80: #405261;
37
- $gray-90: #1D2B36;
38
-
39
-
40
- $colors: (
41
- aqua: $aqua,
42
- aqua-dark: $aqua-dark,
43
- aqua-light: $aqua-light,
44
- purple: $purple,
45
- purple-dark: $purple-dark,
46
- salmon: $salmon,
47
- salmon-dark: $salmon-dark,
48
- yellow: $yellow,
49
- yellow-dark: $yellow-dark,
50
- lead: $lead,
51
- lead-light: $lead-light,
52
- white: $white,
53
- red: $red,
54
- green: $green,
55
- link: $link,
56
- link-light: $link-light,
57
- success: $success,
58
- success-light: $success-light,
59
- warning: $warning,
60
- warning-light: $warning-light,
61
- danger: $danger,
62
- danger-light: $danger-light,
63
- gray: $gray,
64
- gray-10: $gray-10,
65
- gray-20: $gray-20,
66
- gray-30: $gray-30,
67
- gray-40: $gray-40,
68
- gray-50: $gray-50,
69
- gray-60: $gray-60,
70
- gray-70: $gray-70,
71
- gray-80: $gray-80,
72
- gray-90: $gray-90,
73
- );