@fishawack/lab-velocity 0.6.3 → 0.7.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/_defaults.scss CHANGED
@@ -6,6 +6,11 @@ $colors: variables.dynamic('color', module-variables("variables"));
6
6
 
7
7
  // Override lab-ui defaults here, e.g $button: $color6;
8
8
  $spacing: get-ratio(8px);
9
+ .container {
10
+ margin-left: 0;
11
+ padding: 0px 5 * $spacing;
12
+ }
13
+
9
14
 
10
15
  body {
11
16
  font-family: $primaryFont, sans-serif;
@@ -13,8 +18,4 @@ body {
13
18
  line-height: 1.5;
14
19
  color: $color1;
15
20
  background-color: $color3;
16
- }
17
- .container {
18
- margin-left: 0;
19
- padding: 0px 5 * $spacing;
20
- }
21
+ }
package/basic/Button.vue CHANGED
@@ -38,6 +38,10 @@ export default {
38
38
  type: String,
39
39
  default: null,
40
40
  },
41
+ name: {
42
+ type: String,
43
+ default: null,
44
+ },
41
45
  nativeType: {
42
46
  type: String,
43
47
  default: "button",
@@ -54,6 +58,14 @@ export default {
54
58
  type: Boolean,
55
59
  default: false,
56
60
  },
61
+ disabled: {
62
+ type: Boolean,
63
+ default: false,
64
+ },
65
+ autofocus: {
66
+ type: Boolean,
67
+ default: false,
68
+ },
57
69
  text: {
58
70
  type: Boolean,
59
71
  default: false,
package/basic/link.vue CHANGED
@@ -2,7 +2,7 @@
2
2
  <el-link
3
3
  :class="[`link ${baseClass} vel-link--${size} ${ underline ? 'vel-link--underline' : ''}`]"
4
4
  :name="name"
5
- :underline="true"
5
+ :underline="underline"
6
6
  :id="name"
7
7
  :disabled="disabled"
8
8
  :href="href"
@@ -28,7 +28,7 @@ export default {
28
28
  },
29
29
  underline: {
30
30
  type: Boolean,
31
- default: false
31
+ default: true
32
32
  },
33
33
  href: {
34
34
  type: String,
@@ -42,6 +42,18 @@ export default {
42
42
  type: String,
43
43
  default: "default",
44
44
  },
45
+ name: {
46
+ type: String,
47
+ default: null,
48
+ },
49
+ disabled: {
50
+ type: Boolean,
51
+ default: false,
52
+ },
53
+ autofocus: {
54
+ type: Boolean,
55
+ default: false,
56
+ },
45
57
  },
46
58
 
47
59
  components: {
@@ -1,8 +1,6 @@
1
- footer {
1
+ .vel-footer {
2
2
  background-color: $color1;
3
- // width: 100%;
4
- min-height: $spacing * 20.5;
5
- padding: $spacing * 5 $spacing * 3;
3
+ padding: $spacing * 3 $spacing * 3 $spacing * 2 $spacing * 3;
6
4
  box-sizing: border-box;
7
5
  width: 100%;
8
6
 
@@ -13,5 +11,36 @@ footer {
13
11
  display: inline-block;
14
12
  margin-right: $spacing;
15
13
  }
14
+ * {
15
+ font-size: get-ratio(14px);
16
+ line-height: get-ratio(21px);
17
+ }
18
+ }
19
+
20
+ .vel-footer__bottom {
21
+ display: flex;
22
+ flex-wrap: wrap;
23
+ align-items: stretch;
24
+ align-content: stretch;
25
+ flex-basis: 100%;
26
+ justify-content: space-between;
27
+ margin-top: 3.5 * $spacing;
28
+
29
+ > * {
30
+ max-width: 50%;
31
+ flex-basis: 50%;
32
+ }
33
+ }
34
+ .vel-footer__bottom__links {
35
+ display: flex;
36
+ flex-wrap: wrap;
37
+ align-items: self-end;
38
+ flex-basis: 100%;
39
+ }
16
40
 
17
- }
41
+ .vel-footer__bottom__end {
42
+ justify-content: end;
43
+ flex-wrap: wrap;
44
+ align-items: self-end;
45
+ display: flex;
46
+ }
@@ -2,6 +2,7 @@
2
2
  .form__group {
3
3
  label {
4
4
  margin-bottom: $spacing;
5
+ display: inline-block;
5
6
  }
6
7
 
7
8
  &:not(:last-child) {
@@ -3,6 +3,20 @@
3
3
  background-color: $color0;
4
4
  width: 100%;
5
5
  box-sizing: border-box;
6
+ display: flex;
7
+ flex-wrap: wrap;
8
+ align-items: center;
9
+ align-content: center;
10
+ flex-basis: 100%;
11
+ justify-content: space-between;
12
+ padding: 1.5 * $spacing 3 * $spacing;
13
+
14
+ > * {
15
+ max-width: 50%;
16
+ flex-basis: 50%;
17
+ justify-content: flex-end !important;
18
+
19
+ }
6
20
 
7
21
  .icon {
8
22
  min-width: $spacing * 2.5;
@@ -14,6 +28,15 @@
14
28
  }
15
29
 
16
30
  .vel-header__list {
31
+ display: flex;
32
+ flex-wrap: wrap;
33
+ align-items: stretch;
34
+ align-content: stretch;
35
+ flex-basis: 100%;
36
+ padding-right: 1.5 * $spacing;
37
+ margin-left: -1.5 * $spacing;
38
+ margin-right: -1.5 * $spacing;
39
+
17
40
  > div {
18
41
  align-items: center;
19
42
  &:not(:last-child) {
@@ -0,0 +1,17 @@
1
+ @import "element-plus/theme-chalk/el-input-number";
2
+
3
+ .vel-input-number {
4
+ display: block;
5
+ font-size: 1rem;
6
+
7
+ .el-input__wrapper {
8
+ // padding: .5 * $spacing $spacing;
9
+ }
10
+
11
+ .el-input__inner {
12
+ --el-input-inner-height:38px
13
+ }
14
+ .el-input-group__append, .el-input-group__prepend {
15
+ padding: 0 2 * $spacing;
16
+ }
17
+ }
@@ -2,27 +2,27 @@
2
2
 
3
3
  .vel-link.el-link--default {
4
4
  &:hover{
5
- color:$color12;
5
+ color:currentColor;
6
6
  &:after{
7
- border-color: $color12;
7
+ border-color: currentColor;
8
8
  }
9
9
  }
10
10
  }
11
11
  .vel-link--underline.vel-link {
12
12
  &:after {
13
- border-bottom: 1px solid $color12;
13
+ border-bottom: 1px solid currentColor;
14
14
  bottom: 0;
15
15
  content: "";
16
16
  height: 0;
17
17
  left: 0;
18
18
  position: absolute;
19
19
  right: 0;
20
- border-color: $color12;
20
+ border-color: currentColor;
21
21
  }
22
22
  &:hover{
23
- color:$color12;
23
+ color:currentColor;
24
24
  &:after{
25
- border-color: $color12;
25
+ border-color: currentColor;
26
26
  }
27
27
  }
28
28
  }
@@ -0,0 +1,90 @@
1
+ <template>
2
+ <XInput v-bind="$props">
3
+ <template #label>
4
+ <slot name="label" />
5
+ </template>
6
+
7
+ <el-input-number
8
+ v-bind="{ ...$attrs, class: undefined }"
9
+ :class="[`${baseClass}`]"
10
+ :name="name"
11
+ :id="name"
12
+ :disabled="disabled"
13
+ :min="min"
14
+ :max="max"
15
+ :size="size"
16
+ :precision="precision"
17
+ :step="step"
18
+ :controls="controls"
19
+ :step-strictly="stepStrictly"
20
+ :placeholder="placeholder"
21
+ v-model="content"
22
+ :required="required"
23
+ @input="handleInput"
24
+ >
25
+
26
+ <template #prefix>
27
+ <slot name="prefix" />
28
+ </template>
29
+ <template #suffix>
30
+ <slot name="suffix" />
31
+ </template>
32
+ <template #decrease-icon>
33
+ <slot name="decrease-icon" />
34
+ </template>
35
+ <template #increase-icon>
36
+ <slot name="increase-icon" />
37
+ </template>
38
+ </el-input-number>
39
+ </XInput>
40
+ </template>
41
+
42
+ <script>
43
+ import { ElInputNumber } from "element-plus";
44
+ import input from "./input.js";
45
+ import XInput from "./input.vue";
46
+
47
+ export default {
48
+ mixins: [input],
49
+ props: {
50
+ ...input.props,
51
+ baseClass: {
52
+ type: String,
53
+ default: "vel-input-number",
54
+ },
55
+ min: {
56
+ type: Number,
57
+ default: -Infinity,
58
+ },
59
+ max: {
60
+ type: Number,
61
+ default: Infinity,
62
+ },
63
+ precision: {
64
+ type: Number,
65
+ default: null,
66
+ },
67
+ step: {
68
+ type: Number,
69
+ default: 1,
70
+ },
71
+ stepStrictly: {
72
+ type: Boolean,
73
+ default: true,
74
+ },
75
+ size: {
76
+ type: String,
77
+ default: "default",
78
+ },
79
+ controls: {
80
+ type: Boolean,
81
+ default: true,
82
+ }
83
+ },
84
+
85
+ components: {
86
+ XInput,
87
+ ElInputNumber,
88
+ },
89
+ };
90
+ </script>
package/form/basic.vue CHANGED
@@ -61,11 +61,11 @@ export default {
61
61
  default: null,
62
62
  },
63
63
  parser: {
64
- type: String,
64
+ type: Function,
65
65
  default: null,
66
66
  },
67
67
  formatter: {
68
- type: String,
68
+ type: Function,
69
69
  default: null,
70
70
  },
71
71
  },
package/form/input.js CHANGED
@@ -21,7 +21,7 @@ export default {
21
21
  default: false,
22
22
  },
23
23
  modelValue: {
24
- type: String,
24
+ type: [String,Number],
25
25
  default: null,
26
26
  },
27
27
  label: {
@@ -33,7 +33,7 @@ export default {
33
33
  default: null,
34
34
  },
35
35
  error: {
36
- type: String,
36
+ type: [String,Object],
37
37
  default: null,
38
38
  },
39
39
  baseClass: {
package/general.scss CHANGED
@@ -14,6 +14,7 @@
14
14
  @import "./components/_cascader.scss";
15
15
  @import "./components/_wysiwyg.scss";
16
16
  @import "./components/_upload.scss";
17
+ @import "./components/_inputNumber.scss";
17
18
 
18
19
  @import "./components/_breadcrumbs.scss";
19
20
  @import "./components/_sidebar.scss";
package/index.js CHANGED
@@ -11,6 +11,7 @@ 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
13
  export { default as Upload } from "./form/Upload.vue";
14
+ export { default as InputNumber } from "./form/InputNumber.vue";
14
15
 
15
16
  export { default as SideBar } from "./layout/sideBar.vue";
16
17
  export { default as Footer } from "./layout/Footer.vue";
package/layout/Footer.vue CHANGED
@@ -1,29 +1,35 @@
1
1
  <template>
2
2
  <footer class="vel-footer">
3
3
  <div>
4
- <h5 class="color-0 flex items-center">
4
+ <h5 class="color-0">
5
5
  <slot/>
6
6
  </h5>
7
7
  </div>
8
- <div class="grid grid--1/2 justify-between mt-3.5">
9
- <div class="grid">
10
- <p class="color-0">&copy; 2024 Avalere Avalere Health</p>
11
- <a class="color-0 link ml" href="https://avalerehealth.com/privacy-policy/" target="_blank">Privacy Policy</a>
8
+ <div class="vel-footer__bottom">
9
+ <div class="vel-footer__bottom__links">
10
+ <p class="color-0">&copy; 2024 Avalere. Part of Avalere Health</p>
11
+ <el-link underline class="color-0 ml" href="https://avalerehealth.com/privacy-policy/" target="_blank">Privacy Policy</el-link>
12
+ <el-link underline class="color-0 ml" href="https://avalerehealth.com/privacy-policy/" target="_blank">Terms of Use</el-link>
12
13
  </div>
13
- <div class="justify-end flex">
14
- <p class="color-0">Have a question? <a class="link" :href="contact">Contact our Support Team</a></p>
14
+ <div class="vel-footer__bottom__end">
15
+ <p class="color-0">Have a question?</p><el-link underline class="color-0 ml" :href="contact">Contact our Support Team</el-link>
15
16
  </div>
16
17
  </div>
17
18
  </footer>
18
19
  </template>
19
20
 
20
21
  <script>
22
+ import elLink from "../basic/link.vue";
23
+
21
24
  export default {
22
25
  props: {
23
26
  contact: {
24
27
  required:true,
25
28
  type:String
26
29
  }
30
+ },
31
+ components: {
32
+ elLink
27
33
  }
28
34
  }
29
35
  </script>
package/layout/Header.vue CHANGED
@@ -1,8 +1,8 @@
1
1
  <template>
2
- <header class="vel-header grid justify-between items-center justify-end-dive grid--1/2 p-1.5">
2
+ <header class="vel-header">
3
3
  <slot/>
4
4
 
5
- <div class="grid pr-1.5 grid--gutters-x-1.5 vel-header__list">
5
+ <div class="vel-header__list">
6
6
  <slot name="links"/>
7
7
  </div>
8
8
  </header>
@@ -1,8 +1,6 @@
1
1
  <template>
2
2
  <el-menu
3
3
  class="vel-menu"
4
- @open="handleOpen"
5
- @close="handleClose"
6
4
  >
7
5
  <slot />
8
6
  </el-menu>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <el-menu-item class="vel-menu-item" v-bind="$props">
2
+ <el-menu-item :index="index" class="vel-menu-item" v-bind="$props">
3
3
  <template #title>
4
4
  <slot name="title" />
5
5
  </template>
@@ -14,6 +14,7 @@ import { ElMenuItem } from "element-plus";
14
14
  export default {
15
15
  components: {
16
16
  ElMenuItem
17
- }
17
+ },
18
+ props: ['index']
18
19
  }
19
20
  </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <el-sub-menu v-bind="$props">
2
+ <el-sub-menu :index="index" v-bind="$props">
3
3
  <template #title>
4
4
  <slot name="title" />
5
5
  </template>
@@ -10,10 +10,11 @@
10
10
  </template>
11
11
 
12
12
  <script>
13
- import { ElMenuItemGroup } from "element-plus";
13
+ import ElSubMenu from "./SubMenu.vue";
14
14
  export default {
15
15
  components: {
16
- ElMenuItemGroup
17
- }
16
+ ElSubMenu
17
+ },
18
+ props:['index']
18
19
  }
19
20
  </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <el-sub-menu class="vel-sub-menu" v-bind="$props">
2
+ <el-sub-menu :index="index" class="vel-sub-menu" >
3
3
  <template #title>
4
4
  <slot name="title" />
5
5
  </template>
@@ -14,6 +14,7 @@ import { ElSubMenu } from "element-plus";
14
14
  export default {
15
15
  components: {
16
16
  ElSubMenu
17
- }
17
+ },
18
+ props: ['index']
18
19
  }
19
20
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fishawack/lab-velocity",
3
- "version": "0.6.3",
3
+ "version": "0.7.0",
4
4
  "description": "Avalere Health branded style system",
5
5
  "scripts": {
6
6
  "setup": "npm ci || npm i && npm run content",