@eturnity/eturnity_reusable_components 7.2.0 → 7.2.2

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": "7.2.0",
3
+ "version": "7.2.2",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -4,11 +4,11 @@
4
4
  v-for="(tab, index) in tabsData"
5
5
  :key="tab.id"
6
6
  :isDisabled="!!tab['isDisabled']"
7
- :hasDisabledLook="!!tab['hasDisabledLook']"
7
+ :textColor="tab['textColor']"
8
8
  :active="isIndexKey ? index === activeTab : tab[tabKey] === activeTab"
9
9
  @click="$emit('tab-click', isIndexKey ? index : tab[tabKey])"
10
10
  >
11
- <Option :isDisabled="!!tab['isDisabled']" :hasDisabledLook="!!tab['hasDisabledLook']">
11
+ <Option :isDisabled="!!tab['isDisabled']" :textColor="tab['textColor']">
12
12
  <Uppercase>{{ tab[tabLabel] }}</Uppercase>
13
13
  <info-text
14
14
  v-if="tab['labelInfoText']"
@@ -29,7 +29,7 @@ import InfoText from '../infoText'
29
29
  const TabAttr = {
30
30
  active: Boolean,
31
31
  isDisabled: Boolean,
32
- hasDisabledLook: Boolean
32
+ textColor: String
33
33
  }
34
34
 
35
35
  const bottomLine = styled('div')`
@@ -57,17 +57,19 @@ const Option = styled('div',TabAttr)`
57
57
  justify-content: center;
58
58
  flex-direction: row;
59
59
  gap: 10px;
60
- color: ${props=>props.hasDisabledLook ? props.theme.colors.grey2 : props.theme.colors.black};
60
+ color: ${props=>props.textColor ?
61
+ props.theme.colors[props.textColor] ? props.theme.colors[props.textColor] : props.textColor :
62
+ props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.black};
61
63
  `
62
64
  const Tab = styled('div', TabAttr)`
63
65
  padding: 16px 10px;
64
66
  margin-right: 5px;
65
67
  position: relative;
66
- top: ${(props) => (props.hasDisabledLook ? '-1px' : '0')};
68
+ top: ${(props) => (props.isDisabled ? '-1px' : '0')};
67
69
  z-index: 10;
68
70
  border-bottom: 2px solid
69
71
  ${(props) => (props.active ? props.theme.colors.primary : 'transparent')};
70
- background-color: ${(props) => (props.hasDisabledLook ? props.theme.colors.grey5 : 'transparent')};
72
+ background-color: ${(props) => (props.isDisabled ? props.theme.colors.grey5 : 'transparent')};
71
73
  transition: 0.2s ease;
72
74
  cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
73
75
  min-width: 140px;
@@ -76,7 +78,7 @@ const Tab = styled('div', TabAttr)`
76
78
  justify-content: space-between;
77
79
  min-height: 55px;
78
80
  &:hover {
79
- border-color: ${(props) => props.hasDisabledLook ? props.theme.colors.grey2 : props.theme.colors.primary};
81
+ border-color: ${(props) => props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.primary};
80
82
  }
81
83
  `
82
84
 
@@ -38,7 +38,7 @@ export const stringToNumber = ({
38
38
  .replace(/[.\s]/g, '')
39
39
  .replace(/[,\s]/, '.')
40
40
  }
41
- } else if (selectedLang === 'en-us') {
41
+ } else if (selectedLang === 'en-us' || selectedLang === 'en-gb') {
42
42
  // replace commas with blank: 1,234.56 --> 1234.56
43
43
  if (allowNegative) {
44
44
  newVal = newVal.replace(/[^\d-.,']/g, '').replace(/[,\s]/g, '')