@eturnity/eturnity_reusable_components 7.18.0--EPDM-5518.4 → 7.18.0--EPDM-10564.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "7.18.0--EPDM-5518.4",
3
+ "version": "7.18.0--EPDM-10564.0",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -261,12 +261,6 @@
261
261
  :text="buttonText.cancel"
262
262
  @click.native="$emit('on-cancel-view')"
263
263
  />
264
- <reset-container v-if="!filterViews || !filterViews.length">
265
- <reset-button @click="$emit('on-reset-filters')">
266
- <icon :name="'update'" size="14px" :color="theme.colors.blue" />
267
- <div>{{ $gettext('reset_filters') }}</div>
268
- </reset-button>
269
- </reset-container>
270
264
  </button-container>
271
265
  </container-wrapper>
272
266
  </template>
@@ -334,16 +328,6 @@ const ButtonContainer = styled.div`
334
328
  padding: 15px;
335
329
  `
336
330
 
337
- const ResetContainer = styled.div`
338
- display: grid;
339
- align-content: center;
340
- margin-left: auto;
341
- div {
342
- margin-top: 0;
343
- align-self: center;
344
- }
345
- `
346
-
347
331
  const ColumnContainer = styled.div``
348
332
 
349
333
  const DragContainer = styled.div`
@@ -509,8 +493,7 @@ export default {
509
493
  ViewContainer,
510
494
  DeleteIcon,
511
495
  UpperContainer,
512
- ResetButton,
513
- ResetContainer
496
+ ResetButton
514
497
  },
515
498
  props: {
516
499
  filterData: {
@@ -26,7 +26,7 @@
26
26
  //To use:
27
27
  // <info-text
28
28
  // text="Veritatis et quasi architecto beatae vitae"
29
- // size="20"
29
+ // size="20px"
30
30
  // alignArrow="right" // which side the arrow should be on
31
31
  // />
32
32
  import theme from '../../assets/theme.js'
@@ -3,11 +3,10 @@
3
3
  <container
4
4
  :checkColor="checkColor"
5
5
  :size="size"
6
- :hasLabel="label && !!label.length"
6
+ :hasLabel="!!label.length"
7
7
  :backgroundColor="backgroundColor"
8
8
  :isChecked="isChecked"
9
9
  :isDisabled="isDisabled"
10
- :cursorType="cursorType"
11
10
  >
12
11
  <input-checkbox
13
12
  type="checkbox"
@@ -18,7 +17,7 @@
18
17
  <div>
19
18
  <span class="checkmark"></span>
20
19
  </div>
21
- <label-text v-if="label && !!label.length">{{ label }}</label-text>
20
+ <label-text v-if="!!label.length">{{ label }}</label-text>
22
21
  </container>
23
22
  </component-wrapper>
24
23
  </template>
@@ -34,7 +33,6 @@
34
33
  // size="small"
35
34
  // backgroundColor="red"
36
35
  // :isDisabled="true"
37
- // cursorType="default"
38
36
  // />
39
37
  import styled from 'vue-styled-components'
40
38
 
@@ -48,8 +46,7 @@ const containerAttrs = {
48
46
  hasLabel: Boolean,
49
47
  backgroundColor: String,
50
48
  isChecked: Boolean,
51
- isDisabled: Boolean,
52
- cursorType: String
49
+ isDisabled: Boolean
53
50
  }
54
51
  const Container = styled('label', containerAttrs)`
55
52
  display: grid;
@@ -58,7 +55,7 @@ const Container = styled('label', containerAttrs)`
58
55
  align-content: center;
59
56
  color: ${(props) => props.theme.colors.black};
60
57
  position: relative;
61
- cursor: ${(props) => (props.isDisabled ? 'not-allowed' : props.cursorType)};
58
+ cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
62
59
  font-size: 16px;
63
60
  user-select: none;
64
61
 
@@ -83,7 +80,7 @@ const Container = styled('label', containerAttrs)`
83
80
  : props.theme.colors.green
84
81
  : props.isDisabled
85
82
  ? props.theme.colors.lightGray
86
- : props.theme.colors.white};
83
+ : '#fff'};
87
84
  border-radius: 4px;
88
85
  border: 1px solid
89
86
  ${(props) =>
@@ -176,10 +173,6 @@ export default {
176
173
  dataId: {
177
174
  type: String,
178
175
  default: ''
179
- },
180
- cursorType: {
181
- type: String,
182
- default: 'pointer'
183
176
  }
184
177
  },
185
178
  methods: {
@@ -469,7 +469,7 @@ export default {
469
469
  }
470
470
  },
471
471
  methods: {
472
- onEnterPress() {
472
+ onEnterPress(){
473
473
  this.$emit('on-enter-click')
474
474
  this.$refs.inputField1.$el.blur()
475
475
  },
@@ -328,7 +328,7 @@ export default {
328
328
  }
329
329
  },
330
330
  methods: {
331
- onEnterPress() {
331
+ onEnterPress(event){
332
332
  this.$emit('on-enter-click')
333
333
  this.$refs.inputElement.$el.blur()
334
334
  },
@@ -1,18 +1,16 @@
1
1
  <template>
2
2
  <Container
3
3
  :selectWidth="selectWidth"
4
+ :noRelative="noRelative"
4
5
  @mouseenter="mouseEnterHandler"
5
6
  @mouseleave="mouseLeaveHandler"
6
7
  >
7
8
  <input-wrapper
8
9
  :hasLabel="!!label && label.length > 0"
9
10
  :alignItems="alignItems"
11
+ :noRelative="noRelative"
10
12
  >
11
- <label-wrapper
12
- v-if="label"
13
- :data-id="labelDataId"
14
- :shownDropdown="shownDropdown"
15
- >
13
+ <label-wrapper v-if="label" :data-id="labelDataId">
16
14
  <input-label
17
15
  :fontColor="
18
16
  labelFontColor || colorMode == 'dark' ? 'white' : 'eturnityGrey'
@@ -49,7 +47,9 @@
49
47
  :showBorder="showBorder"
50
48
  :data-id="dataId"
51
49
  :paddingLeft="paddingLeft"
52
- :shownDropdown="shownDropdown"
50
+ :tablePaddingLeft="tablePaddingLeft"
51
+ :noRelative="noRelative"
52
+ :showDisabledBackground="showDisabledBackground"
53
53
  >
54
54
  <draggableInputHandle
55
55
  v-if="isDraggable && !isSearchBarVisible"
@@ -73,14 +73,13 @@
73
73
  />
74
74
  <selector
75
75
  v-else
76
+ :showBorder="showBorder"
76
77
  :selectWidth="selectWidth"
77
78
  :paddingLeft="paddingLeft"
78
- :noMaxWidth="noMaxWidth"
79
- :showBorder="showBorder"
80
79
  >
81
80
  <slot name="selector" :selectedValue="selectedValue"></slot>
82
81
  </selector>
83
- <Caret @click.stop="toggleCaretDropdown">
82
+ <Caret @click.stop="toggleCaretDropdown" class="caret_dropdown">
84
83
  <icon
85
84
  v-if="isDropdownOpen"
86
85
  name="arrow_up"
@@ -103,7 +102,7 @@
103
102
  />
104
103
  </Caret>
105
104
  </selectButton>
106
- <DropdownWrapper>
105
+ <DropdownWrapper :noRelative="noRelative">
107
106
  <selectDropdown
108
107
  ref="dropdown"
109
108
  v-show="isDropdownOpen"
@@ -116,7 +115,9 @@
116
115
  :fontColor="
117
116
  dropdownFontColor || colorMode == 'dark' ? 'white' : 'black'
118
117
  "
118
+ :noRelative="noRelative"
119
119
  :selectedValue="selectedValue"
120
+ :minWidth="minWidth"
120
121
  @option-selected="optionSelected"
121
122
  @option-hovered="optionHovered"
122
123
  @mouseleave="optionLeave"
@@ -175,17 +176,22 @@ const Caret = styled.div`
175
176
  const selectorProps = {
176
177
  selectWidth: String,
177
178
  paddingLeft: String,
178
- showBorder: Boolean,
179
- noMaxWidth: Boolean
179
+ showBorder: Boolean
180
180
  }
181
181
  const Selector = styled('div', selectorProps)`
182
- max-width: ${(props) =>
183
- props.noMaxWidth
184
- ? '100%'
185
- : `calc(${props.selectWidth} - (${CARET_WIDTH} + ${props.paddingLeft} + (${BORDER_WIDTH} * 2)))`};
186
- white-space: nowrap;
187
- text-overflow: ellipsis;
188
- overflow: hidden;
182
+ ${(props) =>
183
+ props.selectWidth === '100%'
184
+ ? 'width: 100%;'
185
+ : `width: calc(${props.selectWidth} -
186
+ (
187
+ ${CARET_WIDTH} +
188
+ ${props.paddingLeft}
189
+ ${props.showBorder ? `+ (${BORDER_WIDTH} * 2)` : ''}
190
+ )
191
+ );
192
+ white-space: nowrap;
193
+ text-overflow: ellipsis;
194
+ overflow: hidden;`}
189
195
  `
190
196
 
191
197
  const labelAttrs = { fontSize: String, fontColor: String }
@@ -200,18 +206,20 @@ const InputLabel = styled('div', labelAttrs)`
200
206
  const optionalLabel = styled.span`
201
207
  font-weight: 300;
202
208
  `
203
- const inputProps = { selectWidth: String, optionWidth: String }
209
+ const inputProps = {
210
+ selectWidth: String,
211
+ optionWidth: String,
212
+ noRelative: Boolean
213
+ }
204
214
  const Container = styled('div', inputProps)`
205
215
  width: ${(props) => props.selectWidth};
206
- position: relative;
216
+ position: ${(props) => (props.noRelative ? 'static' : 'relative')};
207
217
  display: inline-block;
208
218
  `
209
-
210
- const LabelAttrs = { shownDropdown: Boolean }
211
- const LabelWrapper = styled('div', LabelAttrs)`
219
+ const LabelWrapper = styled.div`
212
220
  display: inline-grid;
213
221
  grid-template-columns: auto auto;
214
- grid-gap: ${(props) => (props.shownDropdown ? '0' : '12px')};
222
+ grid-gap: 12px;
215
223
  align-items: center;
216
224
  justify-content: start;
217
225
  `
@@ -234,16 +242,20 @@ const selectButtonAttrs = {
234
242
  isSearchBarVisible: Boolean,
235
243
  showBorder: Boolean,
236
244
  paddingLeft: String,
237
- shownDropdown: Boolean
245
+ noRelative: Boolean,
246
+ tablePaddingLeft: String,
247
+ showDisabledBackground: Boolean
238
248
  }
239
249
  const selectButton = styled('div', selectButtonAttrs)`
240
- position: relative;
250
+ position: ${(props) => (props.noRelative ? 'static' : 'relative')};
241
251
  box-sizing: border-box;
242
252
  border-radius: 4px;
243
253
  ${(props) =>
244
254
  props.isSearchBarVisible
245
255
  ? ''
246
- : `padding-left: ${props.shownDropdown ? '0' : props.paddingLeft}`};
256
+ : `padding-left: ${
257
+ props.tablePaddingLeft ? props.tablePaddingLeft : props.paddingLeft
258
+ }`};
247
259
  text-align: left;
248
260
  min-height: ${(props) =>
249
261
  props.selectHeight
@@ -264,7 +276,7 @@ const selectButton = styled('div', selectButtonAttrs)`
264
276
  }
265
277
  `}
266
278
  background-color:${(props) =>
267
- props.disabled
279
+ props.disabled && props.showDisabledBackground
268
280
  ? props.theme.colors.grey5
269
281
  : props.theme.colors[props.bgColor]
270
282
  ? props.theme.colors[props.bgColor]
@@ -288,13 +300,15 @@ const selectDropdownAttrs = {
288
300
  optionWidth: String,
289
301
  hoveredIndex: Number,
290
302
  hoveredValue: Number | String,
291
- selectedValue: Number | String
303
+ selectedValue: Number | String,
304
+ noRelative: Boolean,
305
+ minWidth: String
292
306
  }
293
307
  const selectDropdown = styled('div', selectDropdownAttrs)`
294
308
  box-sizing: border-box;
295
309
  z-index: ${(props) => (props.isActive ? '2' : '1')};
296
310
  position: absolute;
297
- top: 5px;
311
+ top: ${(props) => (props.noRelative ? 'auto' : '5px')};
298
312
  border: ${BORDER_WIDTH} solid ${(props) => props.theme.colors.grey4};
299
313
  border-radius: 4px;
300
314
  display: flex;
@@ -303,6 +317,7 @@ const selectDropdown = styled('div', selectDropdownAttrs)`
303
317
  padding: 0px;
304
318
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
305
319
  width: ${(props) => (props.optionWidth ? props.optionWidth : '100%')};
320
+ min-width: ${(props) => (props.minWidth ? props.minWidth : '100%')};
306
321
  background-color: ${(props) =>
307
322
  props.theme.colors[props.bgColor]
308
323
  ? props.theme.colors[props.bgColor]
@@ -320,12 +335,17 @@ const selectDropdown = styled('div', selectDropdownAttrs)`
320
335
  : props.hoveredBgColor};
321
336
  }
322
337
  `
323
- const DropdownWrapper = styled('div')`
324
- position: relative;
338
+ const DropdownAttrs = { noRelative: Boolean }
339
+ const DropdownWrapper = styled('div', DropdownAttrs)`
340
+ position: ${(props) => (props.noRelative ? 'static' : 'relative')};
325
341
  `
326
- const inputAttrs = { alignItems: String, hasLabel: Boolean }
342
+ const inputAttrs = {
343
+ alignItems: String,
344
+ hasLabel: Boolean,
345
+ noRelative: Boolean
346
+ }
327
347
  const InputWrapper = styled('div', inputAttrs)`
328
- position: relative;
348
+ position: ${(props) => (props.noRelative ? 'static' : 'relative')};
329
349
  display: grid;
330
350
  align-items: center;
331
351
  gap: 8px;
@@ -344,6 +364,10 @@ export default {
344
364
  required: false,
345
365
  default: '13px'
346
366
  },
367
+ noRelative: {
368
+ required: false,
369
+ default: false
370
+ },
347
371
  label: {
348
372
  required: false
349
373
  },
@@ -376,6 +400,9 @@ export default {
376
400
  required: false,
377
401
  default: '36px'
378
402
  },
403
+ minWidth: {
404
+ required: false
405
+ },
379
406
  optionWidth: {
380
407
  required: false,
381
408
  default: null
@@ -447,13 +474,12 @@ export default {
447
474
  type: Boolean,
448
475
  default: false
449
476
  },
450
- noMaxWidth: {
451
- type: Boolean,
452
- default: false
477
+ tablePaddingLeft: {
478
+ required: false
453
479
  },
454
- shownDropdown: {
455
- type: Boolean,
456
- default: false
480
+ showDisabledBackground: {
481
+ required: false,
482
+ default: true
457
483
  }
458
484
  },
459
485
 
@@ -543,20 +569,13 @@ export default {
543
569
  searchChange(value) {
544
570
  this.textSearch = value
545
571
  this.$emit('search-change', value)
546
- const children =
547
- this.$refs.dropdown.$children &&
548
- this.$refs.dropdown.$children[0] &&
549
- this.$refs.dropdown.$children.length === 1 &&
550
- this.$refs.dropdown.$children[0].$children.length
551
- ? this.$refs.dropdown.$children[0].$children
552
- : this.$refs.dropdown.$children
553
- children
572
+ this.$refs.dropdown.$children
554
573
  .map((component) => component.$el)
555
574
  .forEach((el) => {
556
575
  if (!el.textContent.toLowerCase().includes(value.toLowerCase())) {
557
576
  el.style.display = 'none'
558
577
  } else {
559
- el.style.display = 'grid'
578
+ el.style.display = 'inherit'
560
579
  }
561
580
  })
562
581
  },
@@ -14,6 +14,7 @@
14
14
  :isDisabled="isDisabled"
15
15
  :backgroundColor="colorMode == 'dark' ? '#000000' : backgroundColor"
16
16
  :title="hoverText"
17
+ :minWidth="minWidth"
17
18
  >
18
19
  <slot></slot>
19
20
  </optionContainer>
@@ -27,7 +28,8 @@ const optionProps = {
27
28
  isDisabled: Boolean,
28
29
  hoveredBgColor: String,
29
30
  cursorType: String,
30
- backgroundColor: String
31
+ backgroundColor: String,
32
+ minWidth: String
31
33
  }
32
34
  const optionContainer = styled('div', optionProps)`
33
35
  display: flex;
@@ -37,7 +39,8 @@ const optionContainer = styled('div', optionProps)`
37
39
  align-items: center;
38
40
  padding: 12px 10px;
39
41
  gap: 14px;
40
- width: 100%;
42
+ width: max-content;
43
+ min-width: ${(props) => (props.minWidth ? props.minWidth : '100%')};
41
44
  background-color: ${(props) =>
42
45
  props.theme.colors[props.backgroundColor]
43
46
  ? props.theme.colors[props.backgroundColor]
@@ -85,6 +88,9 @@ export default {
85
88
  isDisabled: {
86
89
  required: false,
87
90
  default: false
91
+ },
92
+ minWidth: {
93
+ required: false
88
94
  }
89
95
  },
90
96
 
@@ -49,7 +49,7 @@
49
49
  // label="Question 5"
50
50
  // alignItems="horizontal" // horizontal, vertical
51
51
  // :isDisabled="true"
52
- // fontSize="13px"
52
+ // . fontSize="13px"
53
53
  // />
54
54
  import styled from 'vue-styled-components'
55
55
  import InfoText from '../../infoText'
@@ -29,11 +29,6 @@
29
29
 
30
30
  import styled from 'vue-styled-components'
31
31
  import Icon from '../icon'
32
- import Modal from '../modals/modal'
33
- import PageTitle from '../pageTitle'
34
- import DeleteIcon from '../deleteIcon'
35
- import PageSubtitle from '../pageSubtitle'
36
- import MainButton from '../buttons/mainButton'
37
32
 
38
33
  const PageContainer = styled.div`
39
34
  display: flex;
@@ -65,11 +60,6 @@ const MarkerContainer = styled('div', MarkerAttrs)`
65
60
  cursor: ${(props) => (props.isEditionAllowed ? 'pointer' : props.cursor)};
66
61
  `
67
62
 
68
- // const IconContainer = styled.div`
69
- // padding: 8px;
70
- // line-height: 0;
71
- // `
72
-
73
63
  export default {
74
64
  name: 'project-marker',
75
65
  components: {
@@ -3,11 +3,7 @@
3
3
  <title-text :color="color" :fontSize="fontSize" :uppercase="uppercase">
4
4
  {{ text }}
5
5
  </title-text>
6
- <info-text
7
- v-if="!!infoText"
8
- :text="infoText"
9
- :alignArrow="infoAlign"
10
- />
6
+ <info-text v-if="!!infoText" :text="infoText" :alignArrow="infoAlign" />
11
7
  </title-wrap>
12
8
  </template>
13
9
 
@@ -18,16 +14,16 @@
18
14
  // text="My Page Title"
19
15
  // color="red"
20
16
  // />
21
- import styled from "vue-styled-components"
22
- import InfoText from "../infoText"
17
+ import styled from 'vue-styled-components'
18
+ import InfoText from '../infoText'
23
19
 
24
20
  const wrapAttrs = { hasInfoText: Boolean }
25
- const TitleWrap = styled("div", wrapAttrs)`
21
+ const TitleWrap = styled('div', wrapAttrs)`
26
22
  display: grid;
27
23
  align-items: center;
28
24
  grid-gap: 12px;
29
25
  grid-template-columns: ${(props) =>
30
- props.hasInfoText ? "auto auto 1fr" : "1fr"};
26
+ props.hasInfoText ? 'auto auto 1fr' : '1fr'};
31
27
  margin-bottom: 20px;
32
28
  `
33
29
 
@@ -35,12 +31,12 @@ const titleAttrs = { color: String, fontSize: String, uppercase: Boolean }
35
31
  const TitleText = styled('span', titleAttrs)`
36
32
  color: ${(props) => (props.color ? props.color : props.theme.colors.black)};
37
33
  font-weight: bold;
38
- font-size: ${(props) => (props.fontSize ? props.fontSize : '16px')};
34
+ font-size: ${(props) => (props.fontSize ? props.fontSize : '18px')};
39
35
  text-transform: ${(props) => (props.uppercase ? 'uppercase' : 'none')};
40
36
  `
41
37
 
42
38
  export default {
43
- name: "page-title",
39
+ name: 'page-title',
44
40
  components: {
45
41
  TitleText,
46
42
  TitleWrap,
@@ -48,14 +44,13 @@ export default {
48
44
  },
49
45
  props: {
50
46
  text: {
51
- required: true,
47
+ required: true
52
48
  },
53
49
  color: {
54
- required: false,
50
+ required: false
55
51
  },
56
52
  fontSize: {
57
- required: false,
58
- default: '16px'
53
+ required: false
59
54
  },
60
55
  uppercase: {
61
56
  required: false,
@@ -63,11 +58,11 @@ export default {
63
58
  },
64
59
  infoText: {
65
60
  required: false,
66
- default: null,
61
+ default: null
67
62
  },
68
63
  infoAlign: {
69
- required: false,
64
+ required: false
70
65
  }
71
- },
66
+ }
72
67
  }
73
68
  </script>
@@ -81,6 +81,8 @@ const paginationWrapper = styled.nav`
81
81
  flex-wrap: wrap;
82
82
  justify-content: flex-end;
83
83
  align-items: center;
84
+ margin-bottom: 2px;
85
+ margin-top: 10px;
84
86
  `
85
87
  const paginationLink = styled.div`
86
88
  display: flex;
@@ -90,18 +92,15 @@ const paginationLink = styled.div`
90
92
  border-radius: 3px;
91
93
  white-space: nowrap;
92
94
  cursor: pointer;
93
- color: ${(props) => props.theme.colors.brightBlue};
94
95
 
95
96
  &.active {
96
- color: ${(props) => props.theme.colors.white};
97
- background-color: ${(props) => props.theme.colors.brightBlue};
97
+ color: #fff;
98
+ background-color: ${(props) => props.theme.brightBlue};
98
99
  padding: 7px 12px;
99
100
  border-radius: 4px;
100
101
  }
101
102
  `
102
- const arrowText = styled.div`
103
- color: ${(props) => props.theme.colors.brightBlue};
104
- `
103
+ const arrowText = styled.div``
105
104
  const arrowIconContainer = styled.div`
106
105
  margin: 0 10px;
107
106
  display: flex;
@@ -65,7 +65,7 @@
65
65
  </template>
66
66
 
67
67
  <script>
68
- // import ProjectMarker from "@eturnity/eturnity_reusable_components/src/components/projectMarker"
68
+ // import ThreeDots from "@eturnity/eturnity_reusable_components/src/components/projectMarker"
69
69
  // To use:
70
70
  // <project-marker
71
71
  // :activeLanguage="'en-us'"
@@ -1,3 +0,0 @@
1
- <svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M5 10C7.76142 10 10 7.76142 10 5C10 2.23858 7.76142 0 5 0C2.23858 0 0 2.23858 0 5C0 7.76142 2.23858 10 5 10ZM5.875 5.05243V2.125H4.125V5.92743L6.19061 7.47663L7.24061 6.07663L5.875 5.05243Z" fill="white"/>
3
- </svg>
@@ -1,145 +0,0 @@
1
- <template>
2
- <page-container>
3
- <box-container>
4
- <selected-container
5
- >{{ numberSelected }} {{ $gettext('selected') }}</selected-container
6
- >
7
- <list-container v-if="optionsList.length">
8
- <list-item
9
- v-for="item in optionsList"
10
- :key="item.type"
11
- :hoverColor="item.hoverColor"
12
- @click="$emit('on-' + item.type)"
13
- >
14
- {{ item.name }}
15
- </list-item>
16
- </list-container>
17
- <empty-text v-if="!optionsList.length">
18
- {{ $gettext('no_batch_actions_available') }}
19
- </empty-text>
20
- <icon-container @click="$emit('on-close')">
21
- <icon
22
- name="close_for_modals,_tool_tips"
23
- color="white"
24
- size="14px"
25
- cursor="pointer"
26
- />
27
- </icon-container>
28
- </box-container>
29
- </page-container>
30
- </template>
31
-
32
- <script>
33
- // import SelectedOptions from "@eturnity/eturnity_reusable_components/src/components/selectedOptions"
34
- // optionsList = [
35
- // {
36
- // type: 'export',
37
- // name: 'Export'
38
- // },
39
- // {
40
- // type: 'delete',
41
- // name: 'Delete',
42
- // hoverColor: 'red' // default is green
43
- // }
44
- // ]
45
- // @on-${type}="function" should $emit the callback for the 'type' in the optionsList
46
- // <selected-options
47
- // :numberSelected="numberSelected"
48
- // :optionsList="optionsList"
49
- // @on-close="onCloseFunction()"
50
- // @on-export="function()" @on-delete="function()"
51
- // />
52
- import styled from 'vue-styled-components'
53
- import Icon from '../icon'
54
-
55
- const PageContainer = styled.div`
56
- position: fixed;
57
- bottom: 30px;
58
- left: 50%;
59
- transform: translateX(-50%);
60
- `
61
-
62
- const SelectedContainer = styled.div`
63
- display: grid;
64
- align-items: center;
65
- height: 100%;
66
- padding-right: 20px;
67
- border-right: 1px solid rgba(255, 255, 255, 0.2);
68
- `
69
-
70
- const BoxContainer = styled.div`
71
- display: flex;
72
- align-items: center;
73
- background-color: ${(props) => props.theme.colors.black};
74
- opacity: 90%;
75
- color: ${(props) => props.theme.colors.white};
76
- border-radius: 4px;
77
- padding: 8px 10px 8px 20px;
78
- font-size: 14px;
79
- height: 40px;
80
- `
81
-
82
- const ListContainer = styled.div`
83
- padding: 0 20px;
84
- display: flex;
85
- gap: 20px;
86
- color: ${(props) => props.theme.colors.white};
87
- `
88
-
89
- const ListAttrs = {
90
- hoverColor: String
91
- }
92
- const ListItem = styled('div', ListAttrs)`
93
- cursor: pointer;
94
- &:hover {
95
- color: ${(props) =>
96
- props.hoverColor
97
- ? props.theme.colors[props.hoverColor]
98
- : props.theme.colors.green};
99
- }
100
- `
101
-
102
- const IconContainer = styled.div`
103
- display: grid;
104
- align-items: center;
105
- justify-items: center;
106
- height: 30px;
107
- width: 30px;
108
- cursor: pointer;
109
- margin-left: 20px;
110
-
111
- &:hover {
112
- background: rgba(255, 255, 255, 0.1);
113
- border-radius: 4px;
114
- }
115
- `
116
-
117
- const EmptyText = styled.div`
118
- color: ${(props) => props.theme.colors.white};
119
- font-size: 13px;
120
- padding-left: 16px;
121
- `
122
-
123
- export default {
124
- name: 'selected-options',
125
- components: {
126
- PageContainer,
127
- BoxContainer,
128
- SelectedContainer,
129
- ListContainer,
130
- ListItem,
131
- Icon,
132
- IconContainer,
133
- EmptyText
134
- },
135
- props: {
136
- optionsList: {
137
- required: true
138
- },
139
- numberSelected: {
140
- required: true,
141
- default: 0
142
- }
143
- }
144
- }
145
- </script>