@fishawack/lab-velocity 0.3.9 → 0.5.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/_base.scss CHANGED
@@ -1 +1,5 @@
1
- @import "element-plus/theme-chalk/base";
1
+ @import "element-plus/theme-chalk/base";
2
+ @import "element-plus/theme-chalk/el-message-box";
3
+ @import "element-plus/theme-chalk/el-message";
4
+ @import "element-plus/theme-chalk/el-notification";
5
+ @import "element-plus/theme-chalk/el-overlay";
@@ -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
+ vertical-align: middle;
20
+ width: 2.5 * $spacing;
21
+ min-width: 2.5 * $spacing;
22
+ fill: currentColor;
23
+ margin-right: .5 * $spacing;
24
+ * {
25
+ vertical-align: middle;
26
+ }
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 {
@@ -0,0 +1 @@
1
+ @import "element-plus/theme-chalk/el-upload";
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>
@@ -0,0 +1,79 @@
1
+ <template>
2
+ <XInput v-bind="$props">
3
+ <template #label>
4
+ <slot name="label" />
5
+ </template>
6
+
7
+ <el-upload
8
+ v-bind="$attrs.props"
9
+ :class="[`${baseClass}`]"
10
+ :name="name"
11
+ :id="name"
12
+ :disabled="disabled"
13
+ :limit="limit"
14
+ :action="action"
15
+ v-model:file-list="content"
16
+ :auto-upload="autoUpload"
17
+ :required="required"
18
+ >
19
+ <template #trigger>
20
+ <slot name="trigger">
21
+ <el-button type="primary">Select file</el-button>
22
+ </slot>
23
+ </template>
24
+ <template #tip>
25
+ <slot name="tip" />
26
+ </template>
27
+ <slot name="default">
28
+ </slot>
29
+ </el-upload>
30
+ </XInput>
31
+ </template>
32
+
33
+ <script>
34
+ import { ElUpload } from "element-plus";
35
+ import input from "./input.js";
36
+ import ElButton from "../basic/Button.vue";
37
+ import XInput from "./input.vue";
38
+
39
+ export default {
40
+ mixins: [input],
41
+ props: {
42
+ ...input.props,
43
+ baseClass: {
44
+ type: String,
45
+ default: "vel-upload",
46
+ },
47
+ limit: {
48
+ type: Number,
49
+ default: 1,
50
+ },
51
+ action: {
52
+ type: Function,
53
+ default: null,
54
+ },
55
+ autoUpload: {
56
+ type: Boolean,
57
+ default: false
58
+ }
59
+ },
60
+
61
+ components: {
62
+ XInput,
63
+ ElUpload,
64
+ ElButton,
65
+ },
66
+
67
+ emits: ["upload"],
68
+
69
+ watch: {
70
+ content: {
71
+ immediate: true,
72
+ handler(val) {
73
+ this.handleInput();
74
+ },
75
+ },
76
+ },
77
+
78
+ };
79
+ </script>
package/general.scss CHANGED
@@ -13,6 +13,7 @@
13
13
  @import "./components/_link.scss";
14
14
  @import "./components/_cascader.scss";
15
15
  @import "./components/_wysiwyg.scss";
16
+ @import "./components/_upload.scss";
16
17
 
17
18
  @import "./components/_breadcrumbs.scss";
18
19
  @import "./components/_sidebar.scss";
package/index.js CHANGED
@@ -10,6 +10,7 @@ export { default as file } from "./form/file.vue";
10
10
  export { default as Select } from "./form/Select.vue";
11
11
  export { default as Switch } from "./form/Switch.vue";
12
12
  export { default as Wysiwyg } from "./form/Wysiwyg.vue";
13
+ export { default as Upload } from "./form/Upload.vue";
13
14
 
14
15
  export { default as SideBar } from "./layout/sideBar.vue";
15
16
  export { default as Footer } from "./layout/Footer.vue";
@@ -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.9",
3
+ "version": "0.5.0",
4
4
  "description": "Avalere Health branded style system",
5
5
  "scripts": {
6
6
  "setup": "npm ci || npm i && npm run content",