@eturnity/eturnity_reusable_components 7.22.1 → 7.22.3
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 +1 -1
- package/src/assets/svgIcons/drag_icon.svg +8 -0
- package/src/assets/svgIcons/inclination.svg +3 -0
- package/src/assets/svgIcons/length_2d.svg +3 -0
- package/src/assets/svgIcons/length_3d.svg +5 -0
- package/src/assets/svgIcons/length_calculator.svg +3 -0
- package/src/components/icon/index.vue +35 -23
- package/src/components/inputs/inputNumber/index.vue +2 -6
package/package.json
CHANGED
@@ -0,0 +1,8 @@
|
|
1
|
+
<svg width="10" height="16" viewBox="0 0 10 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<path d="M4 2C4 3.10457 3.10457 4 2 4C0.89543 4 0 3.10457 0 2C0 0.89543 0.89543 0 2 0C3.10457 0 4 0.89543 4 2Z" fill="#B2B9C5"/>
|
3
|
+
<path d="M10 2C10 3.10457 9.10457 4 8 4C6.89543 4 6 3.10457 6 2C6 0.89543 6.89543 0 8 0C9.10457 0 10 0.89543 10 2Z" fill="#B2B9C5"/>
|
4
|
+
<path d="M4 8C4 9.10457 3.10457 10 2 10C0.89543 10 0 9.10457 0 8C0 6.89543 0.89543 6 2 6C3.10457 6 4 6.89543 4 8Z" fill="#B2B9C5"/>
|
5
|
+
<path d="M10 8C10 9.10457 9.10457 10 8 10C6.89543 10 6 9.10457 6 8C6 6.89543 6.89543 6 8 6C9.10457 6 10 6.89543 10 8Z" fill="#B2B9C5"/>
|
6
|
+
<path d="M4 14C4 15.1046 3.10457 16 2 16C0.89543 16 0 15.1046 0 14C0 12.8954 0.89543 12 2 12C3.10457 12 4 12.8954 4 14Z" fill="#B2B9C5"/>
|
7
|
+
<path d="M10 14C10 15.1046 9.10457 16 8 16C6.89543 16 6 15.1046 6 14C6 12.8954 6.89543 12 8 12C9.10457 12 10 12.8954 10 14Z" fill="#B2B9C5"/>
|
8
|
+
</svg>
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="12" viewBox="0 0 14 12" fill="none">
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.09548 3.62522L10.8209 1.59974L9.53978 0.508423L0.199219 11.4916H13.7992V9.80865H11.9546C11.7571 7.4083 10.7198 5.25339 9.09548 3.62522ZM10.2648 9.80859C10.0777 7.91689 9.26383 6.22054 8.00053 4.91205L3.83843 9.80864L10.2648 9.80859Z" fill="white"/>
|
3
|
+
</svg>
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="10" viewBox="0 0 14 10" fill="none">
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.199219 9.85718V0.142822H1.75351L1.75352 9.85718H0.199219ZM5.38021 8.20572L2.14209 4.99999L5.38021 1.79425V4.19855L8.61833 4.19855V1.79425L11.8564 4.99999L8.61832 8.20572L8.61833 5.80142L5.38021 5.80142V8.20572ZM12.2449 0.142822V9.85718H13.7992V0.142822H12.2449Z" fill="white"/>
|
3
|
+
</svg>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none">
|
2
|
+
<path d="M5.33336 14L0 8.66664L1.06667 7.59997L6.40003 12.9333L5.33336 14Z" fill="white"/>
|
3
|
+
<path d="M8.42227 9.97776L4.00002 9.99998L4.02224 5.57774L5.67225 7.22775L7.22781 5.67219L5.57781 4.02218L10.0001 3.99996L9.97783 8.4222L8.32782 6.7722L6.77226 8.32776L8.42227 9.97776Z" fill="white"/>
|
4
|
+
<path d="M7.59997 1.06667L12.9333 6.40003L14 5.33336L8.66664 0L7.59997 1.06667Z" fill="white"/>
|
5
|
+
</svg>
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none">
|
2
|
+
<path d="M12.4444 0H1.55556C0.7 0 0 0.7 0 1.55556V12.4444C0 13.3 0.7 14 1.55556 14H12.4444C13.3 14 14 13.3 14 12.4444V1.55556C14 0.7 13.3 0 12.4444 0ZM7.80111 3.15778L8.62556 2.33333L9.72222 3.43L10.8189 2.33333L11.6433 3.15778L10.5467 4.25444L11.6433 5.35111L10.8189 6.17556L9.72222 5.08667L8.62556 6.18333L7.80111 5.35889L8.89778 4.26222L7.80111 3.15778ZM2.52778 3.67111H6.41667V4.83778H2.52778V3.67111ZM6.61111 10.1111H5.05556V11.6667H3.88889V10.1111H2.33333V8.94444H3.88889V7.38889H5.05556V8.94444H6.61111V10.1111ZM11.6667 11.0833H7.77778V9.91667H11.6667V11.0833ZM11.6667 9.13889H7.77778V7.97222H11.6667V9.13889Z" fill="#263238"/>
|
3
|
+
</svg>
|
@@ -1,9 +1,13 @@
|
|
1
1
|
<template>
|
2
|
-
<wrapper>
|
3
|
-
<icon-image
|
2
|
+
<wrapper :disabled="disabled" :size="size" :cursor="cursor">
|
3
|
+
<icon-image
|
4
|
+
:color="color"
|
5
|
+
:background-color="backgroundColor"
|
6
|
+
:hovered-color="hoveredColor"
|
7
|
+
>
|
4
8
|
<i v-html="icon.html" />
|
5
9
|
</icon-image>
|
6
|
-
<striked-line v-if="isStriked"></striked-line>
|
10
|
+
<striked-line v-if="isStriked" :color="color"></striked-line>
|
7
11
|
</wrapper>
|
8
12
|
</template>
|
9
13
|
|
@@ -48,27 +52,31 @@ const props = defineProps({
|
|
48
52
|
isStriked: {
|
49
53
|
required: false,
|
50
54
|
default: false
|
55
|
+
},
|
56
|
+
backgroundColor: {
|
57
|
+
required: false,
|
58
|
+
default: null
|
51
59
|
}
|
52
60
|
})
|
53
61
|
|
54
|
-
const Wrapper = styled('div'
|
62
|
+
const Wrapper = styled('div', {
|
63
|
+
size: String,
|
64
|
+
disabled: Boolean,
|
65
|
+
cursor: String
|
66
|
+
})`
|
55
67
|
display: flex;
|
56
68
|
position: relative;
|
57
69
|
align-content: center;
|
58
70
|
justify-content: center;
|
59
|
-
width: ${props.size};
|
60
|
-
height: ${props.size};
|
61
|
-
min-width: ${props.size};
|
62
|
-
min-height: ${props.size};
|
63
|
-
cursor: ${props.disabled ? 'not-allowed' : props.cursor};
|
71
|
+
width: ${(props) => props.size};
|
72
|
+
height: ${(props) => props.size};
|
73
|
+
min-width: ${(props) => props.size};
|
74
|
+
min-height: ${(props) => props.size};
|
75
|
+
cursor: ${(props) => (props.disabled ? 'not-allowed' : props.cursor)};
|
64
76
|
line-height: 0;
|
65
77
|
`
|
66
|
-
|
67
|
-
|
68
|
-
color: String,
|
69
|
-
hoveredColor: String
|
70
|
-
}
|
71
|
-
const StrikedLine = styled.div`
|
78
|
+
|
79
|
+
const StrikedLine = styled('div', { color: String })`
|
72
80
|
display: flex;
|
73
81
|
position: absolute;
|
74
82
|
bottom: 0;
|
@@ -77,29 +85,33 @@ const StrikedLine = styled.div`
|
|
77
85
|
justify-content: center;
|
78
86
|
width: 143%;
|
79
87
|
height: 8%;
|
80
|
-
background-color: ${({ theme }) => theme.colors[
|
88
|
+
background-color: ${({ theme, color }) => theme.colors[color] || color};
|
81
89
|
min-height: 0;
|
82
90
|
line-height: 0;
|
83
91
|
transform-origin: 0% 100%;
|
84
92
|
transform: rotate(-45deg);
|
85
93
|
`
|
86
|
-
const IconImage = styled
|
94
|
+
const IconImage = styled('div', {
|
95
|
+
color: String,
|
96
|
+
backgroundColor: String,
|
97
|
+
hoveredColor: String
|
98
|
+
})`
|
87
99
|
width: 100%;
|
88
100
|
svg {
|
89
101
|
width: 100%;
|
90
102
|
height: 100%;
|
91
|
-
background-color: ${(props) =>
|
92
|
-
|
103
|
+
background-color: ${(props) =>
|
104
|
+
props.backgroundColor ? props.backgroundColor : 'transparent'};
|
105
|
+
padding: ${(props) => (props.backgroundColor ? '3px' : '0')};
|
93
106
|
}
|
94
107
|
svg path {
|
95
|
-
${({ theme }) =>
|
96
|
-
props.color && `fill: ${theme.colors[props.color] || props.color};`}
|
108
|
+
${({ theme, color }) => color && `fill: ${theme.colors[color] || color};`}
|
97
109
|
}
|
98
110
|
&:hover > svg path {
|
99
|
-
${props.hoveredColor && `fill: ${props.hoveredColor};`}
|
111
|
+
${(props) => props.hoveredColor && `fill: ${props.hoveredColor};`}
|
100
112
|
}
|
101
113
|
&:hover + div {
|
102
|
-
background-color: ${props.hoveredColor};
|
114
|
+
background-color: ${(props) => props.hoveredColor};
|
103
115
|
}
|
104
116
|
`
|
105
117
|
|
@@ -313,8 +313,7 @@ export default {
|
|
313
313
|
return {
|
314
314
|
textInput: '',
|
315
315
|
isFocused: false,
|
316
|
-
warningIcon: warningIcon
|
317
|
-
isBlurred: false
|
316
|
+
warningIcon: warningIcon
|
318
317
|
}
|
319
318
|
},
|
320
319
|
props: {
|
@@ -549,8 +548,7 @@ export default {
|
|
549
548
|
return array
|
550
549
|
},
|
551
550
|
onInput(event) {
|
552
|
-
if (this.
|
553
|
-
this.isBlurred = false
|
551
|
+
if (!this.isFocused) {
|
554
552
|
return
|
555
553
|
}
|
556
554
|
if (event.target.value === '') {
|
@@ -567,8 +565,6 @@ export default {
|
|
567
565
|
},
|
568
566
|
onInputBlur(e) {
|
569
567
|
this.isFocused = false
|
570
|
-
// setting isBlurred so we don't trigger onInput as well
|
571
|
-
this.isBlurred = true
|
572
568
|
let value = e.target.value
|
573
569
|
let evaluatedInput = this.onEvaluateCode(e)
|
574
570
|
this.onChangeHandler(evaluatedInput ? evaluatedInput : value)
|