@eturnity/eturnity_reusable_components 8.26.3 → 8.26.4--EPDM-15979.0
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/dist/main.es12.js +2 -2
- package/dist/main.es13.js +3 -3
- package/dist/main.es14.js +2 -2
- package/dist/main.es15.js +213 -21
- package/dist/main.es16.js +19 -1051
- package/dist/main.es17.js +1044 -215
- package/dist/main.es18.js +197 -69
- package/dist/main.es19.js +99 -2
- package/dist/main.es2.js +4 -4
- package/dist/main.es20.js +2 -541
- package/dist/main.es21.js +530 -188
- package/dist/main.es22.js +192 -209
- package/dist/main.es24.js +2 -2
- package/dist/main.es5.js +2 -2
- package/dist/main.es6.js +4 -4
- package/dist/main.es9.js +24 -6
- package/package.json +1 -1
- package/src/App.vue +3 -3
- package/src/components/buttons/buttonIcon/index.vue +26 -1
- package/src/components/infoText/index.vue +1 -1
- package/src/components/progressStep/index.vue +129 -0
- package/src/components/progressStep/progressStep.stories.js +58 -0
- package/src/components/tag/conversionTag/index.vue +37 -0
- package/src/components/tag/{proTag → freeTrialTag}/index.vue +10 -4
@@ -0,0 +1,129 @@
|
|
1
|
+
<template>
|
2
|
+
<ProgressionStepContainer :number-of-steps="progressionSteps.length">
|
3
|
+
<template v-for="(step, stepIndex) in progressionSteps" :key="step.index">
|
4
|
+
<ProgressionStepItem>
|
5
|
+
<BoxContainer
|
6
|
+
:is-active="stepIndex == currentStepIndex"
|
7
|
+
:is-valid="stepIndex < currentStepIndex"
|
8
|
+
@click="
|
9
|
+
stepIndex < currentStepIndex ? $emit('on-step-click', step) : null
|
10
|
+
"
|
11
|
+
>
|
12
|
+
<RcIcon
|
13
|
+
v-if="stepIndex < currentStepIndex"
|
14
|
+
color="white"
|
15
|
+
hovered-color="white"
|
16
|
+
name="all_good"
|
17
|
+
:size="'20px'"
|
18
|
+
/>
|
19
|
+
<NumberContainer
|
20
|
+
v-else
|
21
|
+
:is-active="stepIndex === currentStepIndex"
|
22
|
+
:is-valid="stepIndex < currentStepIndex"
|
23
|
+
>
|
24
|
+
{{ step.number }}
|
25
|
+
</NumberContainer>
|
26
|
+
</BoxContainer>
|
27
|
+
<StepLabel>{{ step.label }}</StepLabel>
|
28
|
+
</ProgressionStepItem>
|
29
|
+
<StepIntermediateLine
|
30
|
+
v-if="stepIndex < progressionSteps.length - 1"
|
31
|
+
:is-valid="stepIndex < currentStepIndex"
|
32
|
+
/>
|
33
|
+
</template>
|
34
|
+
</ProgressionStepContainer>
|
35
|
+
</template>
|
36
|
+
|
37
|
+
<script>
|
38
|
+
// import progressStep from "@eturnity/eturnity_reusable_components/src/components/progressStep"
|
39
|
+
//To use:
|
40
|
+
// <ProgressionSteps
|
41
|
+
// :current-step="ProgressionStep"
|
42
|
+
// :progression-steps="ProgressionSteps" [{label,value,number}]
|
43
|
+
// @on-step-click="onStepClick"
|
44
|
+
// />
|
45
|
+
import styled from 'vue3-styled-components'
|
46
|
+
import RcIcon from '../icon'
|
47
|
+
|
48
|
+
const StyledComponents = {
|
49
|
+
ProgressionStepContainer: styled('div', { numberOfSteps: Number })`
|
50
|
+
display: grid;
|
51
|
+
grid-template-columns:
|
52
|
+
repeat(${({ numberOfSteps }) => numberOfSteps - 1}, auto 1fr)
|
53
|
+
auto;
|
54
|
+
justify-content: center;
|
55
|
+
align-items: center;
|
56
|
+
width: 100%;
|
57
|
+
`,
|
58
|
+
ProgressionStepItem: styled.div`
|
59
|
+
display: flex;
|
60
|
+
flex-direction: row;
|
61
|
+
align-items: center;
|
62
|
+
`,
|
63
|
+
BoxContainer: styled('div', {
|
64
|
+
isActive: Boolean,
|
65
|
+
isValid: Boolean,
|
66
|
+
})`
|
67
|
+
display: flex;
|
68
|
+
justify-content: center;
|
69
|
+
align-items: center;
|
70
|
+
width: 32px;
|
71
|
+
height: 32px;
|
72
|
+
font-size: 16px;
|
73
|
+
background-color: ${({ theme, isValid, isActive }) =>
|
74
|
+
isActive
|
75
|
+
? theme.semanticColors.purple[500]
|
76
|
+
: isValid
|
77
|
+
? theme.semanticColors.purple[200]
|
78
|
+
: theme.semanticColors.purple[100]};
|
79
|
+
color: ${({ theme, isValid, isActive }) =>
|
80
|
+
isActive ? theme.colors.white : theme.semanticColors.teal[800]};
|
81
|
+
margin: 0 10px;
|
82
|
+
border-radius: 5px;
|
83
|
+
cursor: ${({ isValid }) => (isValid ? 'pointer' : 'default')};
|
84
|
+
&:hover {
|
85
|
+
${({ theme, isValid, isActive }) =>
|
86
|
+
isValid
|
87
|
+
? 'background-color:' + theme.semanticColors.purple[100] + ';'
|
88
|
+
: ''}
|
89
|
+
}
|
90
|
+
`,
|
91
|
+
StepIntermediateLine: styled('div', { isValid: Boolean })`
|
92
|
+
height: 2px;
|
93
|
+
margin: 0 10px;
|
94
|
+
background-color: ${({ theme, isValid }) =>
|
95
|
+
isValid
|
96
|
+
? theme.semanticColors.purple[500]
|
97
|
+
: theme.semanticColors.teal[200]};
|
98
|
+
`,
|
99
|
+
StepLabel: styled.div`
|
100
|
+
max-width: 220px;
|
101
|
+
margin: 0 10px;
|
102
|
+
`,
|
103
|
+
NumberContainer: styled.div``,
|
104
|
+
}
|
105
|
+
export default {
|
106
|
+
name: 'ProgressionSteps',
|
107
|
+
components: {
|
108
|
+
...StyledComponents,
|
109
|
+
RcIcon,
|
110
|
+
},
|
111
|
+
props: {
|
112
|
+
progressionSteps: {
|
113
|
+
type: Array,
|
114
|
+
required: true,
|
115
|
+
},
|
116
|
+
currentStep: {
|
117
|
+
type: String,
|
118
|
+
required: true,
|
119
|
+
},
|
120
|
+
},
|
121
|
+
computed: {
|
122
|
+
currentStepIndex() {
|
123
|
+
return this.progressionSteps.findIndex(
|
124
|
+
(step) => step.value === this.currentStep
|
125
|
+
)
|
126
|
+
},
|
127
|
+
},
|
128
|
+
}
|
129
|
+
</script>
|
@@ -0,0 +1,58 @@
|
|
1
|
+
import progressStep from './index.vue'
|
2
|
+
|
3
|
+
export default {
|
4
|
+
title: 'progressStep',
|
5
|
+
component: progressStep,
|
6
|
+
tags: ['autodocs'],
|
7
|
+
parameters: {
|
8
|
+
layout: 'centered',
|
9
|
+
},
|
10
|
+
}
|
11
|
+
|
12
|
+
// import progressStep from "@eturnity/eturnity_reusable_components/src/components/progressStep"
|
13
|
+
//To use:
|
14
|
+
// <ProgressionSteps
|
15
|
+
// :current-step="ProgressionStep"
|
16
|
+
// :progression-steps="ProgressionSteps" [{label,value,number}]
|
17
|
+
// @on-step-click="onStepClick"
|
18
|
+
// />
|
19
|
+
|
20
|
+
const PROGRESSION_STEP_LIST = [
|
21
|
+
{
|
22
|
+
label: 'progression step label 1',
|
23
|
+
value: 'step1',
|
24
|
+
number: 1,
|
25
|
+
},
|
26
|
+
{
|
27
|
+
label: 'progression step label 2',
|
28
|
+
value: 'step2',
|
29
|
+
number: 2,
|
30
|
+
},
|
31
|
+
{
|
32
|
+
label: 'progression step label 3',
|
33
|
+
value: 'step3',
|
34
|
+
number: 3,
|
35
|
+
},
|
36
|
+
]
|
37
|
+
|
38
|
+
export const Default = {
|
39
|
+
args: {
|
40
|
+
'current-step': 'step1',
|
41
|
+
'progression-steps': PROGRESSION_STEP_LIST,
|
42
|
+
},
|
43
|
+
}
|
44
|
+
|
45
|
+
export const Template = {
|
46
|
+
args: {
|
47
|
+
...Default.args,
|
48
|
+
},
|
49
|
+
render: (args) => ({
|
50
|
+
components: { progressStep },
|
51
|
+
setup() {
|
52
|
+
return { args }
|
53
|
+
},
|
54
|
+
template: `
|
55
|
+
<progressStep v-bind="args"/>
|
56
|
+
`,
|
57
|
+
}),
|
58
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<template>
|
2
|
+
<RCButton
|
3
|
+
button-size="tiny"
|
4
|
+
icon="star"
|
5
|
+
icon-color="yellow"
|
6
|
+
:text="textToDisplay"
|
7
|
+
type="protag"
|
8
|
+
variant="main"
|
9
|
+
/>
|
10
|
+
</template>
|
11
|
+
<script>
|
12
|
+
import RCButton from '../../buttons/mainButton'
|
13
|
+
export default {
|
14
|
+
name: 'ConversionTag',
|
15
|
+
components: {
|
16
|
+
RCButton,
|
17
|
+
},
|
18
|
+
props: {
|
19
|
+
text: {
|
20
|
+
type: String,
|
21
|
+
default: 'PRO',
|
22
|
+
},
|
23
|
+
isUpperCase: {
|
24
|
+
type: Boolean,
|
25
|
+
default: true,
|
26
|
+
},
|
27
|
+
},
|
28
|
+
computed: {
|
29
|
+
textToDisplay() {
|
30
|
+
if (this.isUpperCase) {
|
31
|
+
return this.text.toUpperCase()
|
32
|
+
}
|
33
|
+
return this.text
|
34
|
+
},
|
35
|
+
},
|
36
|
+
}
|
37
|
+
</script>
|
@@ -2,18 +2,24 @@
|
|
2
2
|
<RCButton
|
3
3
|
button-size="tiny"
|
4
4
|
icon="star"
|
5
|
-
icon-color="
|
6
|
-
text="
|
7
|
-
type="
|
5
|
+
icon-color="blue"
|
6
|
+
:text="text || $gettext('free_trial')"
|
7
|
+
type="freeTrialTag"
|
8
8
|
variant="main"
|
9
9
|
/>
|
10
10
|
</template>
|
11
11
|
<script>
|
12
12
|
import RCButton from '../../buttons/mainButton'
|
13
13
|
export default {
|
14
|
-
name: '
|
14
|
+
name: 'FreeTrialTag',
|
15
15
|
components: {
|
16
16
|
RCButton,
|
17
17
|
},
|
18
|
+
props: {
|
19
|
+
text: {
|
20
|
+
type: String,
|
21
|
+
default: '',
|
22
|
+
},
|
23
|
+
},
|
18
24
|
}
|
19
25
|
</script>
|