@eturnity/eturnity_reusable_components 7.48.1-EPDM-12680.25 → 7.48.1-EPDM-12680.26

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.48.1-EPDM-12680.25",
3
+ "version": "7.48.1-EPDM-12680.26",
4
4
  "files": [
5
5
  "dist",
6
6
  "src"
@@ -0,0 +1,3 @@
1
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M17.0686 17.0686C20.9771 13.1601 20.9771 6.83992 17.0686 2.93139C13.1601 -0.977131 6.83992 -0.977131 2.93139 2.93139C-0.977131 6.83992 -0.977131 13.1601 2.93139 17.0686C6.83992 20.9771 13.1601 20.9771 17.0686 17.0686ZM6.42412 8.50312L8.66944 10.7484L13.5759 5.842L15.3222 7.58836L10.4158 12.4948L8.66944 14.158L6.92308 12.4948L4.67775 10.2495L6.42412 8.50312Z" fill="white"/>
3
+ </svg>
@@ -0,0 +1,131 @@
1
+ <template>
2
+ <PageContainer v-if="showBanner">
3
+ <BannerContainer
4
+ :background-color="backgroundColor"
5
+ :text-color="textColor"
6
+ >
7
+ <IconContainer>
8
+ <RCIcon color="white" :name="iconName" size="20px" />
9
+ </IconContainer>
10
+ <TextContainer>
11
+ <TextContent>
12
+ {{ mainText }}
13
+ </TextContent>
14
+ </TextContainer>
15
+ <ButtonContainer>
16
+ <MainButton
17
+ :custom-color="theme.colors.white"
18
+ :font-color="theme.colors.black"
19
+ :text="buttonText"
20
+ @click="$emit('on-button-click')"
21
+ />
22
+ </ButtonContainer>
23
+ </BannerContainer>
24
+ </PageContainer>
25
+ </template>
26
+
27
+ <script>
28
+ // import NotificationBanner from "@eturnity/eturnity_reusable_components/src/components/banner/notificationBanner"
29
+ import styled from 'vue3-styled-components'
30
+ import RCIcon from '../../icon'
31
+ import MainButton from '../../buttons/mainButton'
32
+ import theme from '@/assets/theme'
33
+
34
+ const PageContainer = styled.div`
35
+ position: fixed;
36
+ bottom: 24px;
37
+ left: 50%;
38
+ transform: translateX(-50%);
39
+ z-index: 999999;
40
+ `
41
+
42
+ const bannerAttrs = { backgroundColor: String, textColor: String }
43
+ const BannerContainer = styled('div', bannerAttrs)`
44
+ display: grid;
45
+ grid-template-columns: auto 1fr auto;
46
+ gap: 20px;
47
+ padding: 10px 20px;
48
+ border-radius: 4px;
49
+ align-items: center;
50
+ justify-content: center;
51
+ background-color: ${(props) => props.theme.colors[props.backgroundColor]};
52
+ color: ${(props) => props.theme.colors[props.textColor]};
53
+ font-size: 14px;
54
+ `
55
+
56
+ const IconContainer = styled.div``
57
+
58
+ const TextContainer = styled.div``
59
+
60
+ const TextContent = styled.div`
61
+ line-height: 150%;
62
+ `
63
+
64
+ const ButtonContainer = styled.div`
65
+ display: flex;
66
+ gap: 20px;
67
+ align-items: center;
68
+ justify-content: center;
69
+ `
70
+
71
+ export default {
72
+ name: 'NotificationBanner',
73
+ components: {
74
+ PageContainer,
75
+ BannerContainer,
76
+ RCIcon,
77
+ IconContainer,
78
+ TextContainer,
79
+ TextContent,
80
+ ButtonContainer,
81
+ MainButton,
82
+ },
83
+ props: {
84
+ backgroundColor: {
85
+ type: String,
86
+ default: 'green',
87
+ required: false,
88
+ },
89
+ textColor: {
90
+ type: String,
91
+ default: 'white',
92
+ required: false,
93
+ },
94
+ iconName: {
95
+ type: String,
96
+ default: 'checkmark',
97
+ required: false,
98
+ },
99
+ mainText: {
100
+ type: String,
101
+ required: true,
102
+ },
103
+ buttonText: {
104
+ type: String,
105
+ required: true,
106
+ },
107
+ isOpen: {
108
+ type: Boolean,
109
+ default: false,
110
+ required: true,
111
+ },
112
+ },
113
+ data() {
114
+ return {
115
+ theme,
116
+ showBanner: false,
117
+ }
118
+ },
119
+ watch: {
120
+ isOpen(newVal) {
121
+ if (newVal) {
122
+ this.showBanner = true
123
+ setTimeout(() => {
124
+ this.showBanner = false
125
+ this.$emit('on-close')
126
+ }, 10000)
127
+ }
128
+ },
129
+ },
130
+ }
131
+ </script>
@@ -163,7 +163,7 @@
163
163
  const LabelText = styled.div`
164
164
  font-size: 13px;
165
165
  display: grid;
166
- align-items: flex-start;
166
+ align-items: center;
167
167
  min-height: 18px;
168
168
  `
169
169