@eturnity/eturnity_reusable_components 7.39.4-EPDM-11314.0 → 7.39.4-EPDM-11313.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "7.39.4-EPDM-11314.0",
3
+ "version": "7.39.4-EPDM-11313.0",
4
4
  "files": [
5
5
  "dist",
6
6
  "src"
@@ -11,7 +11,7 @@
11
11
  :type="type"
12
12
  >
13
13
  <LabelComponent :has-icon="Boolean(icon)">
14
- <Icon v-if="icon" :name="icon" size="14px" />
14
+ <Icon v-if="icon" :name="icon" :color="iconColor" size="14px" />
15
15
  {{ text }}
16
16
  </LabelComponent>
17
17
  </ButtonContainer>
@@ -112,6 +112,11 @@
112
112
  default: null,
113
113
  type: String,
114
114
  },
115
+ iconColor: {
116
+ required: false,
117
+ default: '',
118
+ type: String,
119
+ },
115
120
  text: {
116
121
  required: true,
117
122
  type: String,
@@ -1,18 +1,6 @@
1
1
  <template>
2
- <InfoContainer
3
- :min-width="minWidth"
4
- :color="color"
5
- :align-items="alignItems"
6
- :padding="padding"
7
- :border-color="borderColor"
8
- :border-style="borderStyle"
9
- :preset-styles="presetStyles"
10
- >
11
- <RCIcon
12
- name="info"
13
- size="24px"
14
- :color="color ? color : presetStyles.iconColor"
15
- />
2
+ <InfoContainer>
3
+ <RCIcon name="info" size="24px" :color="color" />
16
4
  <TextContainer>
17
5
  <slot></slot>
18
6
  </TextContainer>
@@ -21,37 +9,14 @@
21
9
 
22
10
  <script>
23
11
  import styled from 'vue3-styled-components'
24
- import theme from '../../assets/theme.js'
25
12
  import RCIcon from '../icon'
26
13
 
27
- const infoContainerAttrs = {
28
- minWidth: String,
29
- color: String,
30
- alignItems: String,
31
- padding: String,
32
- borderColor: String,
33
- borderStyle: String,
34
- presetStyles: Object,
35
- }
36
- const InfoContainer = styled('div', infoContainerAttrs)`
14
+ const InfoContainer = styled.div`
37
15
  display: flex;
38
- align-items: ${(props) =>
39
- props.alignItems ? props.alignItems : props.presetStyles.alignItems};
40
16
  gap: 15px;
41
- min-width: ${(props) => props.minWidth};
42
- padding: ${(props) =>
43
- props.padding ? props.padding : props.presetStyles.padding};
44
- color: ${(props) => (props.color ? props.color : props.presetStyles.color)};
17
+ padding: 20px;
18
+ border: 1px dashed ${(props) => props.theme.colors.grey4};
45
19
  border-radius: 4px;
46
- background-color: ${(props) =>
47
- props.backgroundColor
48
- ? props.backgroundColor
49
- : props.presetStyles.backgroundColor};
50
- border-width: ${(props) => props.presetStyles.borderWidth};
51
- border-style: ${(props) =>
52
- props.borderStyle ? props.borderStyle : props.presetStyles.borderStyle};
53
- border-color: ${(props) =>
54
- props.borderColor ? props.borderColor : props.presetStyles.borderColor};
55
20
  `
56
21
 
57
22
  const TextContainer = styled.div`
@@ -67,60 +32,9 @@
67
32
  TextContainer,
68
33
  },
69
34
  props: {
70
- type: {
71
- required: false,
72
- type: String,
73
- default: 'info',
74
- },
75
- minWidth: {
76
- required: false,
77
- type: String,
78
- },
79
35
  color: {
80
- required: false,
81
- },
82
- alignItems: {
83
- required: false,
84
- type: String,
85
- },
86
- padding: {
87
- required: false,
88
- type: String,
89
- },
90
- borderColor: {
91
- required: false,
92
- type: String,
93
- },
94
- borderStyle: {
95
- required: false,
96
- type: String,
97
- },
98
- },
99
- computed: {
100
- isInfo() {
101
- return this.type === 'info'
102
- },
103
- isWarning() {
104
- return this.type === 'warning'
105
- },
106
- presetStyles() {
107
- let stylesCollection = {}
108
-
109
- if (this.isWarning) {
110
- stylesCollection.alignItems = 'center'
111
- stylesCollection.padding = '6px 10px'
112
- stylesCollection.color = theme.colors.white
113
- stylesCollection.backgroundColor = theme.colors.yellow
114
- stylesCollection.iconColor = theme.colors.white
115
- } else {
116
- stylesCollection.padding = '20px'
117
- stylesCollection.borderWidth = '1px'
118
- stylesCollection.borderStyle = 'dashed'
119
- stylesCollection.borderColor = theme.colors.grey4
120
- }
121
-
122
- return stylesCollection
123
- },
124
- },
36
+ required: false
37
+ }
38
+ }
125
39
  }
126
40
  </script>
@@ -86,7 +86,6 @@
86
86
  />
87
87
  <Selector
88
88
  v-else
89
- :disabled="disabled"
90
89
  :padding-left="paddingLeft"
91
90
  :select-width="selectWidth"
92
91
  :show-border="showBorder"
@@ -97,9 +96,7 @@
97
96
  <Icon
98
97
  v-if="isDropdownOpen"
99
98
  :color="
100
- caretColor || disabled
101
- ? 'grey2'
102
- : colorMode == 'dark'
99
+ caretColor || colorMode == 'dark'
103
100
  ? 'white'
104
101
  : 'transparentBlack1'
105
102
  "
@@ -109,9 +106,7 @@
109
106
  <Icon
110
107
  v-else
111
108
  :color="
112
- caretColor || disabled
113
- ? 'grey2'
114
- : colorMode == 'dark'
109
+ caretColor || colorMode == 'dark'
115
110
  ? 'white'
116
111
  : 'transparentBlack1'
117
112
  "
@@ -204,13 +199,11 @@
204
199
  `
205
200
 
206
201
  const selectorProps = {
207
- disabled: String,
208
202
  selectWidth: String,
209
203
  paddingLeft: String,
210
204
  showBorder: Boolean,
211
205
  }
212
206
  const Selector = styled('div', selectorProps)`
213
- color: ${(props) => (props.disabled ? props.theme.colors.grey2 : '')};
214
207
  ${(props) =>
215
208
  props.selectWidth === '100%'
216
209
  ? 'width: 100%;'