@eturnity/eturnity_reusable_components 8.7.5-EPIC-8593.2 → 8.7.5-EPIC-8593.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "8.7.5-EPIC-8593.2",
3
+ "version": "8.7.5-EPIC-8593.3",
4
4
  "files": [
5
5
  "dist",
6
6
  "src"
@@ -8,7 +8,11 @@
8
8
  :is-active="activeTab === item.id"
9
9
  @click="onTabClick({ id: item.id })"
10
10
  >
11
- <div>{{ item.text }}</div>
11
+ <NameContainer>
12
+ <div>{{ item.text }}</div>
13
+ <DotIcon v-if="item.subText" :is-active="activeTab === item.id" />
14
+ <SubText v-if="item.subText">{{ item.subText }}</SubText>
15
+ </NameContainer>
12
16
  <RCIcon v-if="item.hasError" name="warning" size="14px" />
13
17
  </TabItem>
14
18
  </TabsContainer>
@@ -36,6 +40,27 @@
36
40
  import styled from 'vue3-styled-components'
37
41
  import RCIcon from '../icon'
38
42
 
43
+ const NameContainer = styled.div`
44
+ display: flex;
45
+ align-items: center;
46
+ justify-content: center;
47
+ gap: 8px;
48
+ `
49
+
50
+ const DotIconAttrs = { isActive: Boolean }
51
+ const DotIcon = styled('div', DotIconAttrs)`
52
+ width: 4px;
53
+ height: 4px;
54
+ border-radius: 100%;
55
+ background-color: ${(props) =>
56
+ props.isActive ? props.theme.colors.purple6 : props.theme.colors.black};
57
+ `
58
+
59
+ const SubText = styled.div`
60
+ font-size: 12px;
61
+ color: ${(props) => props.theme.colors.black};
62
+ `
63
+
39
64
  const PageContainer = styled.div``
40
65
 
41
66
  const TabsContainer = styled.div`
@@ -67,7 +92,10 @@
67
92
  components: {
68
93
  PageContainer,
69
94
  TabsContainer,
95
+ NameContainer,
70
96
  TabItem,
97
+ SubText,
98
+ DotIcon,
71
99
  RCIcon,
72
100
  },
73
101
  props: {
@@ -0,0 +1,11 @@
1
+ import { langForLocaleString } from './translateLang'
2
+
3
+ export const toLocaleNumber = (value, digit = 0) => {
4
+ if (isNaN(value)) {
5
+ return '-'
6
+ }
7
+ return new Intl.NumberFormat(langForLocaleString(), {
8
+ minimumFractionDigits: digit,
9
+ maximumFractionDigits: digit,
10
+ }).format(value)
11
+ }