@eturnity/eturnity_reusable_components 9.19.4 → 9.19.6

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.
Files changed (53) hide show
  1. package/package.json +25 -20
  2. package/src/DemoChart.vue +16 -16
  3. package/src/assets/svgIcons/3d_house.svg +3 -0
  4. package/src/assets/svgIcons/activities_app.svg +3 -0
  5. package/src/assets/svgIcons/apps_navigation.svg +3 -0
  6. package/src/assets/svgIcons/chevron_down.svg +3 -0
  7. package/src/assets/svgIcons/chevron_up.svg +3 -0
  8. package/src/assets/svgIcons/collapse_sidebar.svg +3 -0
  9. package/src/assets/svgIcons/consumption_profile.svg +3 -0
  10. package/src/assets/svgIcons/cross_filled.svg +3 -0
  11. package/src/assets/svgIcons/data_transfer.svg +2 -2
  12. package/src/assets/svgIcons/esdec.svg +3 -0
  13. package/src/assets/svgIcons/expand_sidebar.svg +3 -0
  14. package/src/assets/svgIcons/external_link.svg +3 -0
  15. package/src/assets/svgIcons/folder_unfilled.svg +3 -0
  16. package/src/assets/svgIcons/leads_app.svg +9 -0
  17. package/src/assets/svgIcons/library_app.svg +3 -0
  18. package/src/assets/svgIcons/mail.svg +3 -0
  19. package/src/assets/svgIcons/mounting_system.svg +2 -2
  20. package/src/assets/svgIcons/portal.svg +3 -0
  21. package/src/assets/svgIcons/projects_app.svg +9 -0
  22. package/src/assets/svgIcons/question_mark.svg +2 -2
  23. package/src/assets/svgIcons/recurring_costs.svg +3 -0
  24. package/src/assets/svgIcons/settings.svg +8 -2
  25. package/src/assets/svgIcons/shading_snow.svg +3 -0
  26. package/src/assets/svgIcons/signature.svg +3 -0
  27. package/src/assets/svgIcons/tariff_menu.svg +3 -0
  28. package/src/assets/svgIcons/zev_community_solar.svg +3 -0
  29. package/src/components/banner/actionBanner/index.vue +1 -1
  30. package/src/components/barchart/BottomFields.vue +5 -2
  31. package/src/components/barchart/ChartControls.vue +5 -5
  32. package/src/components/barchart/index.vue +7 -2
  33. package/src/components/buttons/buttonIcon/index.vue +9 -0
  34. package/src/components/buttons/mainButton/index.vue +26 -26
  35. package/src/components/buttons/splitButtons/index.vue +1 -1
  36. package/src/components/card/index.vue +35 -5
  37. package/src/components/dropdown/index.vue +7 -7
  38. package/src/components/infoCard/index.vue +30 -4
  39. package/src/components/inputs/searchInput/SearchInput.stories.js +1 -1
  40. package/src/components/inputs/searchInput/searchInput.spec.js +1 -1
  41. package/src/components/inputs/select/index.vue +406 -79
  42. package/src/components/inputs/select/option/index.vue +9 -1
  43. package/src/components/modals/cookieConsent/CookieConsent.vue +4 -4
  44. package/src/components/navigationSideMenu/index.vue +1098 -0
  45. package/src/components/pageSubtitle/index.vue +1 -1
  46. package/src/components/progressStep/index.vue +82 -18
  47. package/src/components/progressStep/progressStep.stories.js +8 -0
  48. package/src/components/projectMarker/ProjectMarker.stories.js +26 -36
  49. package/src/components/projectMarker/index.vue +172 -93
  50. package/src/components/tabsHeader/index.vue +9 -1
  51. package/src/components/videoThumbnail/index.vue +1 -1
  52. package/src/helpers/cookieHelper.js +23 -13
  53. package/src/helpers/dateTimeFormatting.js +0 -1
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <SubtitleText
3
- data-test-id="page_wrapper"
4
3
  :color="color"
4
+ data-test-id="page_wrapper"
5
5
  :has-info-text="!!infoText"
6
6
  :margin-bottom="marginBottom"
7
7
  >
@@ -2,9 +2,11 @@
2
2
  <ProgressionStepContainer :number-of-steps="progressionSteps.length">
3
3
  <template v-for="(step, stepIndex) in progressionSteps" :key="step.index">
4
4
  <ProgressionStepItem>
5
- <BoxContainer
5
+ <MarkerContainer
6
+ :disable-click="disableClick"
6
7
  :is-active="stepIndex == currentStepIndex"
7
8
  :is-valid="stepIndex < currentStepIndex"
9
+ :shape="markerShape"
8
10
  @click="
9
11
  stepIndex < currentStepIndex ? $emit('on-step-click', step) : null
10
12
  "
@@ -14,7 +16,7 @@
14
16
  :color="theme.semanticColors.purple[500]"
15
17
  :hovered-color="theme.semanticColors.purple[500]"
16
18
  name="checkmark_thin"
17
- size="16px"
19
+ :size="markerShape === 'circle' ? '10px' : '16px'"
18
20
  />
19
21
  <NumberContainer
20
22
  v-else
@@ -23,13 +25,32 @@
23
25
  >
24
26
  {{ step.number }}
25
27
  </NumberContainer>
26
- </BoxContainer>
27
- <StepLabel>{{ step.label }}</StepLabel>
28
+ </MarkerContainer>
29
+ <StepLabel>
30
+ <StyledText
31
+ :font-color="
32
+ stepIndex === currentStepIndex
33
+ ? theme.semanticColors.grey[900]
34
+ : theme.semanticColors.grey[800]
35
+ "
36
+ :type="labelTextType"
37
+ >
38
+ {{ step.label }}
39
+ </StyledText>
40
+ </StepLabel>
28
41
  </ProgressionStepItem>
29
42
  <StepIntermediateLine
30
- v-if="stepIndex < progressionSteps.length - 1"
31
- :is-valid="stepIndex < currentStepIndex"
43
+ v-if="
44
+ separatorType === 'line' && stepIndex < progressionSteps.length - 1
45
+ "
32
46
  />
47
+ <IconContainer
48
+ v-if="
49
+ separatorType === 'arrow' && stepIndex < progressionSteps.length - 1
50
+ "
51
+ >
52
+ <RcIcon :color="theme.colors.black" name="next" size="16px" />
53
+ </IconContainer>
33
54
  </template>
34
55
  </ProgressionStepContainer>
35
56
  </template>
@@ -40,10 +61,12 @@
40
61
  // <ProgressionSteps
41
62
  // :current-step="ProgressionStep"
42
63
  // :progression-steps="ProgressionSteps" [{label,value,number}]
64
+ // marker-shape="box" | "circle"
43
65
  // @on-step-click="onStepClick"
44
66
  // />
45
67
  import styled from 'vue3-styled-components'
46
68
  import RcIcon from '../icon'
69
+ import StyledText from '../styledText'
47
70
  import theme from '@/assets/theme.js'
48
71
 
49
72
  const StyledComponents = {
@@ -61,37 +84,52 @@
61
84
  flex-direction: row;
62
85
  align-items: center;
63
86
  `,
64
- BoxContainer: styled('div', {
87
+ MarkerContainer: styled('div', {
88
+ disableClick: Boolean,
65
89
  isActive: Boolean,
66
90
  isValid: Boolean,
91
+ shape: String,
67
92
  })`
68
93
  display: flex;
69
94
  justify-content: center;
70
95
  align-items: center;
71
- width: 32px;
72
- height: 32px;
73
- font-size: 16px;
74
- background-color: ${({ theme, isValid, isActive }) =>
96
+ flex-shrink: 0;
97
+ box-sizing: border-box;
98
+ width: ${({ shape }) => (shape === 'circle' ? '16px' : '32px')};
99
+ height: ${({ shape }) => (shape === 'circle' ? '16px' : '32px')};
100
+ min-width: ${({ shape }) => (shape === 'circle' ? '16px' : '32px')};
101
+ min-height: ${({ shape }) => (shape === 'circle' ? '16px' : '32px')};
102
+ aspect-ratio: ${({ shape }) => (shape === 'circle' ? '1' : 'auto')};
103
+ font-size: ${({ shape }) => (shape === 'circle' ? '10px' : '16px')};
104
+ background-color: ${({ theme, isValid, isActive, shape }) =>
75
105
  isActive
76
106
  ? theme.semanticColors.purple[500]
77
107
  : isValid
78
108
  ? theme.semanticColors.purple[200]
109
+ : shape === 'circle'
110
+ ? theme.semanticColors.grey[50]
79
111
  : theme.semanticColors.grey[200]};
80
- color: ${({ theme, isValid, isActive }) =>
112
+ color: ${({ theme, isActive }) =>
81
113
  isActive ? theme.colors.white : theme.semanticColors.grey[800]};
82
114
  margin: 0 10px;
83
- border-radius: 5px;
84
- cursor: ${({ isValid }) => (isValid ? 'pointer' : 'default')};
115
+ border-radius: ${({ shape }) => (shape === 'circle' ? '50%' : '5px')};
116
+ cursor: ${({ isValid, disableClick }) =>
117
+ isValid && !disableClick ? 'pointer' : 'default'};
85
118
  &:hover {
86
- ${({ theme, isValid, isActive }) =>
87
- isValid
119
+ ${({ theme, isValid, disableClick }) =>
120
+ isValid && !disableClick
88
121
  ? 'background-color:' + theme.semanticColors.purple[100] + ';'
89
122
  : ''}
90
123
  }
124
+
125
+ ${({ shape, isActive, isValid }) =>
126
+ shape === 'circle' &&
127
+ !isActive &&
128
+ !isValid &&
129
+ `border: 1px solid ${theme.semanticColors.grey[400]};`}
91
130
  `,
92
- StepIntermediateLine: styled('div', { isValid: Boolean })`
131
+ StepIntermediateLine: styled.div`
93
132
  height: 2px;
94
- margin: 0 10px;
95
133
  background-color: ${({ theme }) => theme.semanticColors.grey[400]};
96
134
  `,
97
135
  StepLabel: styled.div`
@@ -99,12 +137,16 @@
99
137
  margin: 0 10px;
100
138
  `,
101
139
  NumberContainer: styled.div``,
140
+ IconContainer: styled.div`
141
+ margin: 0 16px;
142
+ `,
102
143
  }
103
144
  export default {
104
145
  name: 'ProgressionSteps',
105
146
  components: {
106
147
  ...StyledComponents,
107
148
  RcIcon,
149
+ StyledText,
108
150
  },
109
151
  props: {
110
152
  progressionSteps: {
@@ -115,7 +157,29 @@
115
157
  type: String,
116
158
  required: true,
117
159
  },
160
+ labelTextType: {
161
+ type: String,
162
+ required: false,
163
+ default: 'subheading-large',
164
+ },
165
+ separatorType: {
166
+ type: String,
167
+ required: false,
168
+ default: 'line',
169
+ },
170
+ markerShape: {
171
+ type: String,
172
+ required: false,
173
+ default: 'box',
174
+ validator: (value) => ['box', 'circle'].includes(value),
175
+ },
176
+ disableClick: {
177
+ type: Boolean,
178
+ required: false,
179
+ default: false,
180
+ },
118
181
  },
182
+ emits: ['on-step-click'],
119
183
  data() {
120
184
  return {
121
185
  theme,
@@ -39,6 +39,14 @@ export const Default = {
39
39
  args: {
40
40
  'current-step': 'step1',
41
41
  'progression-steps': PROGRESSION_STEP_LIST,
42
+ 'marker-shape': 'box',
43
+ },
44
+ }
45
+
46
+ export const CircleIndicators = {
47
+ args: {
48
+ ...Default.args,
49
+ 'marker-shape': 'circle',
42
50
  },
43
51
  }
44
52
 
@@ -9,7 +9,7 @@ export default {
9
9
  markerData: {
10
10
  control: 'object',
11
11
  description:
12
- 'Object containing marker data including translations and color',
12
+ 'Object containing marker data including translations, color, and choice (sold/lost/transferred)',
13
13
  },
14
14
  activeLanguage: {
15
15
  control: 'text',
@@ -19,9 +19,18 @@ export default {
19
19
  control: 'text',
20
20
  description: 'Optional date to display next to the marker',
21
21
  },
22
+ cursor: {
23
+ control: 'text',
24
+ description: 'Cursor style for the marker',
25
+ },
26
+ theme: {
27
+ control: false,
28
+ description: 'Optional theme object for sold/lost icon colors',
29
+ },
22
30
  isEditable: {
23
31
  control: 'boolean',
24
- description: 'Whether the marker can be edited',
32
+ description:
33
+ 'Whether the marker can be edited/deleted (shows three-dots menu)',
25
34
  },
26
35
  isGroupSupport: {
27
36
  control: 'boolean',
@@ -31,14 +40,6 @@ export default {
31
40
  control: 'boolean',
32
41
  description: 'Whether the user is a limited partner',
33
42
  },
34
- cursor: {
35
- control: 'text',
36
- description: 'Cursor style for the marker',
37
- },
38
- hasBorderRadius: {
39
- control: 'boolean',
40
- description: 'Whether to show border radius',
41
- },
42
43
  },
43
44
  }
44
45
 
@@ -48,9 +49,6 @@ const Template = (args) => ({
48
49
  return { args }
49
50
  },
50
51
  template: '<ProjectMarker v-bind="args" />',
51
- provide: {
52
- theme,
53
- },
54
52
  })
55
53
 
56
54
  export const Default = Template.bind({})
@@ -65,11 +63,11 @@ Default.args = {
65
63
  },
66
64
  activeLanguage: 'en-us',
67
65
  date: '23.07.2022',
66
+ cursor: 'pointer',
67
+ theme,
68
68
  isEditable: true,
69
69
  isGroupSupport: false,
70
70
  isLimitedPartner: false,
71
- cursor: 'pointer',
72
- hasBorderRadius: true,
73
71
  }
74
72
 
75
73
  export const Lost = Template.bind({})
@@ -81,8 +79,8 @@ Lost.args = {
81
79
  'en-us': { name: 'Lost' },
82
80
  },
83
81
  color: '#F44336',
84
- can_be_deleted: true,
85
82
  },
83
+ theme,
86
84
  }
87
85
 
88
86
  export const Transferred = Template.bind({})
@@ -94,7 +92,6 @@ Transferred.args = {
94
92
  'en-us': { name: 'Transferred' },
95
93
  },
96
94
  color: '#2196F3',
97
- can_be_deleted: true,
98
95
  },
99
96
  }
100
97
 
@@ -104,27 +101,20 @@ WithoutDate.args = {
104
101
  date: null,
105
102
  }
106
103
 
107
- export const NotEditable = Template.bind({})
108
- NotEditable.args = {
109
- ...Default.args,
110
- isEditable: false,
111
- }
112
-
113
- export const LimitedPartner = Template.bind({})
114
- LimitedPartner.args = {
115
- ...Default.args,
116
- isLimitedPartner: true,
117
- }
118
-
119
- export const WithGroupSupport = Template.bind({})
120
- WithGroupSupport.args = {
104
+ export const CustomColor = Template.bind({})
105
+ CustomColor.args = {
121
106
  ...Default.args,
122
- isGroupSupport: true,
123
- isLimitedPartner: true,
107
+ markerData: {
108
+ choice: null,
109
+ translations: {
110
+ 'en-us': { name: 'In progress' },
111
+ },
112
+ color: '#9C27B0',
113
+ },
124
114
  }
125
115
 
126
- export const WithoutBorderRadius = Template.bind({})
127
- WithoutBorderRadius.args = {
116
+ export const NotEditable = Template.bind({})
117
+ NotEditable.args = {
128
118
  ...Default.args,
129
- hasBorderRadius: false,
119
+ isEditable: false,
130
120
  }