@fishawack/lab-velocity 0.3.8 → 0.4.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.
@@ -1,8 +1,8 @@
1
- @import "@fishawack/lab-ui/_icon.scss";
1
+ // @import "@fishawack/lab-ui/_icon.scss";
2
2
 
3
3
  .vel-icon {
4
4
 
5
- .el-link &, .el-button & {
5
+ .el-link &, .el-button &, .vel-side-bar__button & {
6
6
  width: 1em;
7
7
  min-width: 1em;
8
8
  padding-bottom: 0px;
@@ -1,47 +1,95 @@
1
1
  @import 'element-plus/theme-chalk/el-menu';
2
2
  @import 'element-plus/theme-chalk/el-menu-item';
3
+ @import 'element-plus/theme-chalk/el-sub-menu';
3
4
 
4
- ul.el-menu--vertical {
5
+ ul.vel-menu {
5
6
  li {
6
7
  --el-menu-level-padding : 0;
7
8
  padding-right: 0px;
8
9
  }
9
-
10
- a {
11
- padding: 1.5 * $spacing 2.5 * $spacing;
12
- height: 100%;
10
+ .el-sub-menu__title, a, .el-menu-item > * {
11
+ font-size: get-ratio(18px);
12
+ border-left: solid .5 * $spacing transparent;
13
+ padding: 0 2.5 * $spacing !important;
13
14
  width: 100%;
14
- border-left: solid .5 * $spacing $color8;
15
- box-sizing: border-box;
16
15
  display: flex;
17
16
  align-items: center;
18
17
  overflow: hidden;
19
- font-size: get-ratio(18px);
20
-
21
- &.active{
22
- border-left-color: $color1;
18
+ .vel-icon {
19
+ * {
20
+ vertical-align: middle;
21
+ }
22
+ vertical-align: middle;
23
+ width: 2.5 * $spacing;
24
+ min-width: 2.5 * $spacing;
25
+ fill: currentColor;
26
+ margin-right: .5 * $spacing;
23
27
  }
24
28
 
25
- .icon {
29
+ }
30
+
31
+ a {
32
+ height: 100%;
33
+ box-sizing: border-box;
34
+ border-left: solid .5 * $spacing $color8;
35
+ .vel-icon {
26
36
  width: 2.5 * $spacing;
27
37
  max-width: 2.5 * $spacing;
28
38
  min-width: 2.5 * $spacing;
29
39
  padding-bottom: 0px;
30
- * {
31
- vertical-align: middle;
32
- }
33
40
  }
41
+ &.active{
42
+ border-left-color: $color1;
43
+ }
44
+
34
45
  }
35
46
 
36
- span {
47
+ span, .el-sub-menu__icon-arrow {
37
48
  opacity: 0;
38
49
  transition: .2s ease-in-out opacity;
39
50
  margin-left: .5 * $spacing;
40
51
  }
41
52
 
42
53
  .active & {
43
- span {
54
+ span,.el-sub-menu__icon-arrow {
44
55
  opacity: 1;
45
56
  }
46
57
  }
58
+
59
+ .el-icon {
60
+ flex-shrink: 1;
61
+ width: auto;
62
+ }
63
+ }
64
+
65
+
66
+
67
+ .vel-sub-menu {
68
+ --el-menu-level-padding: 0;
69
+ .el-menu-item, .vel-sub-menu {
70
+ padding-left: 5 * $spacing !important;
71
+ }
72
+ .el-sub-menu__title {
73
+ height: auto;
74
+ line-height: get-ratio(48px);
75
+ }
76
+ }
77
+
78
+ .vel-menu-item {
79
+ height: auto;
80
+ line-height: get-ratio(48px);
81
+ * {
82
+ vertical-align: middle;
83
+ }
84
+ }
85
+
86
+ .vel-menu {
87
+ display: flex;
88
+ flex-direction: column;
89
+ height: 100%;
90
+
91
+ li:last-child {
92
+ margin-top: auto;
93
+ margin-bottom: 0px;
94
+ }
47
95
  }
@@ -24,7 +24,7 @@
24
24
  &.active {
25
25
  flex-basis: 31.5 * $spacing;
26
26
 
27
- .side-bar__button {
27
+ .vel-side-bar__button {
28
28
  transform: rotateY(180deg);
29
29
  }
30
30
  }
@@ -35,12 +35,6 @@
35
35
  background-color: transparent;
36
36
  border: none;
37
37
  cursor: pointer;
38
- .icon {
39
- width: 2.5 * $spacing;
40
- min-width: 2.5 * $spacing;
41
- padding-bottom: 2.5 * $spacing;
42
- fill: currentColor;
43
- }
44
38
  &:focus {
45
39
  outline: 1px solid;
46
40
  }
@@ -0,0 +1,20 @@
1
+ @import "element-plus/theme-chalk/el-table-column";
2
+ @import "element-plus/theme-chalk/el-table";
3
+ @import "element-plus/theme-chalk/el-pagination";
4
+
5
+ .el-table {
6
+ padding: get-ratio(8px);
7
+ thead tr .el-table__cell{
8
+ background-color: #F7F7F7;
9
+ }
10
+ .el-table__cell {
11
+ padding: get-ratio(8px) get-ratio(12px);
12
+ }
13
+ }
14
+
15
+ .table-wrapper {
16
+ // display: flex;
17
+ display: flex;
18
+ width: 100%;
19
+ max-width: 100%;
20
+ }
@@ -1,3 +1,4 @@
1
+ @import "@fishawack/lab-ui/_typography.scss";
1
2
  /* Primary font
2
3
  -------------------------------------------------- */
3
4
  @font-face {
package/form/Select.vue CHANGED
@@ -18,23 +18,27 @@
18
18
  @clear="this.$emit('clear')"
19
19
  @blur="this.$emit('blur')"
20
20
  >
21
- <el-option
22
- v-if="!options[0]?.value"
23
- v-for="(label, value) in options"
24
- :key="value"
25
- :label="label"
26
- :value="castValue(value)"
27
- >
28
- </el-option>
29
- <el-option
30
- v-else
31
- v-for="option in options"
32
- :key="option.value"
33
- :label="option.label"
34
- :disabled="option.disabled"
35
- :value="castValue(option.value)"
36
- >
37
- </el-option>
21
+ <template #default>
22
+ <slot name="default">
23
+ <el-option
24
+ v-if="!options[0]?.value"
25
+ v-for="(label, value) in options"
26
+ :key="value"
27
+ :label="label"
28
+ :value="castValue(value)"
29
+ >
30
+ </el-option>
31
+ <el-option
32
+ v-else
33
+ v-for="option in options"
34
+ :key="option.value"
35
+ :label="option.label"
36
+ :disabled="option.disabled"
37
+ :value="castValue(option.value)"
38
+ >
39
+ </el-option>
40
+ </slot>
41
+ </template>
38
42
  </el-select>
39
43
  </XInput>
40
44
  </template>
package/form/Wysiwyg.vue CHANGED
@@ -65,19 +65,18 @@ export default {
65
65
  },
66
66
  // Function to remove p tags from inside li tags, breaks the wysiwyg
67
67
  formatCleaner(unformmatted) {
68
- const regex = new RegExp(/(\<li\>(?:\n)*(?:.*)(?:\n)*\<\/li\>)/gm);
69
- if(regex.test(unformmatted)) {
70
- let parser = document.createElement('div');
71
- parser.innerHTML = unformmatted;
72
- const lists = parser.getElementsByTagName('ul');
73
- for(var x = 0; x < lists.length; x++) {
74
- lists[x].innerHTML = sanitizeHtml(lists[x].innerHTML, {
75
- allowedTags: [ 'b', 'i', 'em', 'strong', 'a','li' ]
76
- });
77
- }
78
- return parser.innerHTML;
68
+ if(!unformmatted) {
69
+ return "";
70
+ }
71
+ let parser = document.createElement('div');
72
+ parser.innerHTML = unformmatted.replace(/(\r\n|\n|\r|\t)/gm,"");
73
+ const lists = parser.getElementsByTagName('ul');
74
+ for(var x = 0; x < lists.length; x++) {
75
+ lists[x].innerHTML = sanitizeHtml(lists[x].innerHTML, {
76
+ allowedTags: [ 'b', 'i', 'em', 'strong', 'a','li']
77
+ });
79
78
  }
80
- return unformmatted;
79
+ return parser.innerHTML;
81
80
  }
82
81
  },
83
82
 
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <el-menu-item v-bind="$props">
2
+ <el-menu-item class="vel-menu-item" v-bind="$props">
3
3
  <template #title>
4
4
  <slot name="title" />
5
5
  </template>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <el-sub-menu v-bind="$props">
2
+ <el-sub-menu class="vel-sub-menu" v-bind="$props">
3
3
  <template #title>
4
4
  <slot name="title" />
5
5
  </template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fishawack/lab-velocity",
3
- "version": "0.3.8",
3
+ "version": "0.4.0",
4
4
  "description": "Avalere Health branded style system",
5
5
  "scripts": {
6
6
  "setup": "npm ci || npm i && npm run content",