@eturnity/eturnity_reusable_components 1.1.17 → 1.1.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "1.1.17",
3
+ "version": "1.1.20",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -0,0 +1,4 @@
1
+ <svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M22 10V12L0 12L1.19209e-07 10L22 10Z" fill="white"/>
3
+ <path d="M10 0H12V22H10V0Z" fill="white"/>
4
+ </svg>
@@ -0,0 +1,58 @@
1
+ <template>
2
+ <page-container :shouldPosition="shouldPosition">
3
+ <button-container>
4
+ <plus-button :src="require('../../assets/icons/plus_button.svg')" />
5
+ </button-container>
6
+ </page-container>
7
+ </template>
8
+
9
+ <script>
10
+ // import AddNewButton from "@eturnity/eturnity_reusable_components/src/components/addNewButton"
11
+ import styled from "vue-styled-components"
12
+
13
+ const pageAttrs = { shouldPosition: Boolean }
14
+ const PageContainer = styled("div", pageAttrs)`
15
+ position: ${(props) => (props.shouldPosition ? "fixed" : "unset")};
16
+ bottom: 30px;
17
+ right: 30px;
18
+ `
19
+
20
+ const ButtonContainer = styled.div`
21
+ height: 60px;
22
+ width: 60px;
23
+ background-color: ${(props) => props.theme.colors.green};
24
+ box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
25
+ border-radius: 100%;
26
+ cursor: pointer;
27
+ display: grid;
28
+ align-items: center;
29
+ justify-items: center;
30
+
31
+ &:hover {
32
+ background: linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
33
+ ${(props) => props.theme.colors.green};
34
+ }
35
+
36
+ &:active,
37
+ &:focus {
38
+ background: ${(props) => props.theme.colors.green};
39
+ }
40
+ `
41
+
42
+ const PlusButton = styled.img``
43
+
44
+ export default {
45
+ name: "add-new-button",
46
+ components: {
47
+ PageContainer,
48
+ ButtonContainer,
49
+ PlusButton,
50
+ },
51
+ props: {
52
+ shouldPosition: {
53
+ required: false,
54
+ default: true,
55
+ },
56
+ },
57
+ }
58
+ </script>
@@ -303,6 +303,8 @@ export default {
303
303
  })
304
304
  let unit = this.showLinearUnitName ? "" : this.unitName
305
305
  return input + " " + unit
306
+ } else if (!value) {
307
+ return null
306
308
  } else {
307
309
  return numberToString({
308
310
  value: value,
@@ -15,7 +15,7 @@
15
15
  // import Modal from "@eturnity/eturnity_reusable_components/src/components/modals/modal"
16
16
  // This is a more flexible modal box, where the parent can decide how the body of the modal looks
17
17
  // To use:
18
- // <modal :isOpen="isOpen" @on-close="$emit('on-close-summary')">
18
+ // <modal :isOpen="isOpen" @on-close="$emit('on-close-summary')" :preventOutsideClose="true">
19
19
  // <div>Data....</div>
20
20
  // </modal>
21
21