@eturnity/eturnity_reusable_components 8.16.8-EPDM-EPDM-14492.0 → 8.16.9-SLD.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": "8.16.8-EPDM-EPDM-14492.0",
3
+ "version": "8.16.9-SLD.0",
4
4
  "files": [
5
5
  "dist",
6
6
  "src"
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
2
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M5 5.75C5 5.33579 5.33579 5 5.75 5H18.25C18.6642 5 19 5.33579 19 5.75C19 6.16421 18.6642 6.5 18.25 6.5H5.75C5.33579 6.5 5 6.16421 5 5.75Z" fill="white"/>
4
+ <path d="M5 9.75C5 9.33579 5.33579 9 5.75 9H18.25C18.6642 9 19 9.33579 19 9.75C19 10.1642 18.6642 10.5 18.25 10.5H5.75C5.33579 10.5 5 10.1642 5 9.75Z" fill="white"/>
5
+ <path d="M5 13.75C5 13.3358 5.33579 13 5.75 13H18.25C18.6642 13 19 13.3358 19 13.75C19 14.1642 18.6642 14.5 18.25 14.5H5.75C5.33579 14.5 5 14.1642 5 13.75Z" fill="white"/>
6
+ <path d="M5 17.75C5 17.3358 5.33579 17 5.75 17H18.25C18.6642 17 19 17.3358 19 17.75C19 18.1642 18.6642 18.5 18.25 18.5H5.75C5.33579 18.5 5 18.1642 5 17.75Z" fill="white"/>
7
+ </svg>
@@ -0,0 +1,15 @@
1
+ <?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
2
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M3 6C3 5.44772 3.44772 5 4 5H7C7.55228 5 8 5.44772 8 6C8 6.55228 7.55228 7 7 7H4C3.44772 7 3 6.55228 3 6Z" fill="#212121"/>
4
+ <path d="M9.58 6C9.58 5.44772 10.0277 5 10.58 5H13.58C14.1323 5 14.58 5.44772 14.58 6C14.58 6.55228 14.1323 7 13.58 7H10.58C10.0277 7 9.58 6.55228 9.58 6Z" fill="#212121"/>
5
+ <path d="M16 6C16 5.44772 16.4477 5 17 5H20C20.5523 5 21 5.44772 21 6C21 6.55228 20.5523 7 20 7H17C16.4477 7 16 6.55228 16 6Z" fill="#212121"/>
6
+ <path d="M3 10C3 9.44772 3.44772 9 4 9H7C7.55228 9 8 9.44772 8 10C8 10.5523 7.55228 11 7 11H4C3.44772 11 3 10.5523 3 10Z" fill="#212121"/>
7
+ <path d="M9.58 10C9.58 9.44772 10.0277 9 10.58 9H13.58C14.1323 9 14.58 9.44772 14.58 10C14.58 10.5523 14.1323 11 13.58 11H10.58C10.0277 11 9.58 10.5523 9.58 10Z" fill="#212121"/>
8
+ <path d="M16 10C16 9.44772 16.4477 9 17 9H20C20.5523 9 21 9.44772 21 10C21 10.5523 20.5523 11 20 11H17C16.4477 11 16 10.5523 16 10Z" fill="#212121"/>
9
+ <path d="M3 14C3 13.4477 3.44772 13 4 13H7C7.55228 13 8 13.4477 8 14C8 14.5523 7.55228 15 7 15H4C3.44772 15 3 14.5523 3 14Z" fill="#212121"/>
10
+ <path d="M9.58 14C9.58 13.4477 10.0277 13 10.58 13H13.58C14.1323 13 14.58 13.4477 14.58 14C14.58 14.5523 14.1323 15 13.58 15H10.58C10.0277 15 9.58 14.5523 9.58 14Z" fill="#212121"/>
11
+ <path d="M16 14C16 13.4477 16.4477 13 17 13H20C20.5523 13 21 13.4477 21 14C21 14.5523 20.5523 15 20 15H17C16.4477 15 16 14.5523 16 14Z" fill="#212121"/>
12
+ <path d="M3 18C3 17.4477 3.44772 17 4 17H7C7.55228 17 8 17.4477 8 18C8 18.5523 7.55228 19 7 19H4C3.44772 19 3 18.5523 3 18Z" fill="#212121"/>
13
+ <path d="M9.58 18C9.58 17.4477 10.0277 17 10.58 17H13.58C14.1323 17 14.58 17.4477 14.58 18C14.58 18.5523 14.1323 19 13.58 19H10.58C10.0277 19 9.58 18.5523 9.58 18Z" fill="#212121"/>
14
+ <path d="M16 18C16 17.4477 16.4477 17 17 17H20C20.5523 17 21 17.4477 21 18C21 18.5523 20.5523 19 20 19H17C16.4477 19 16 18.5523 16 18Z" fill="#212121"/>
15
+ </svg>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
2
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M3 6C3 5.44772 3.44772 5 4 5H10C10.5523 5 11 5.44772 11 6C11 6.55228 10.5523 7 10 7H4C3.44772 7 3 6.55228 3 6Z" fill="white"/>
4
+ <path d="M3 10C3 9.44772 3.44772 9 4 9H10C10.5523 9 11 9.44772 11 10C11 10.5523 10.5523 11 10 11H4C3.44772 11 3 10.5523 3 10Z" fill="white"/>
5
+ <path d="M3 14C3 13.4477 3.44772 13 4 13H10C10.5523 13 11 13.4477 11 14C11 14.5523 10.5523 15 10 15H4C3.44772 15 3 14.5523 3 14Z" fill="white"/>
6
+ <path d="M3 18C3 17.4477 3.44772 17 4 17H10C10.5523 17 11 17.4477 11 18C11 18.5523 10.5523 19 10 19H4C3.44772 19 3 18.5523 3 18Z" fill="white"/>
7
+ <path d="M13 6C13 5.44772 13.4477 5 14 5H20C20.5523 5 21 5.44772 21 6C21 6.55228 20.5523 7 20 7H14C13.4477 7 13 6.55228 13 6Z" fill="white"/>
8
+ <path d="M13 10C13 9.44772 13.4477 9 14 9H20C20.5523 9 21 9.44772 21 10C21 10.5523 20.5523 11 20 11H14C13.4477 11 13 10.5523 13 10Z" fill="white"/>
9
+ <path d="M13 14C13 13.4477 13.4477 13 14 13H20C20.5523 13 21 13.4477 21 14C21 14.5523 20.5523 15 20 15H14C13.4477 15 13 14.5523 13 14Z" fill="white"/>
10
+ <path d="M13 18C13 17.4477 13.4477 17 14 17H20C20.5523 17 21 17.4477 21 18C21 18.5523 20.5523 19 20 19H14C13.4477 19 13 18.5523 13 18Z" fill="white"/>
11
+ </svg>
@@ -100,6 +100,7 @@
100
100
  :min-option-length="1"
101
101
  select-height="36px"
102
102
  select-width="100%"
103
+ :should-use-teleport="false"
103
104
  >
104
105
  <template #selector>
105
106
  <OptionTitle> {{ filter.selectedText }} </OptionTitle>
@@ -255,6 +256,7 @@
255
256
  :label="filter.label"
256
257
  select-height="36px"
257
258
  select-width="100%"
259
+ :should-use-teleport="false"
258
260
  >
259
261
  <template #selector="{ selectedValue }">
260
262
  <OptionTitle>
@@ -513,10 +513,9 @@
513
513
  default: '40px',
514
514
  },
515
515
  value: {
516
+ type: [String, Number],
516
517
  required: true,
517
518
  default: null,
518
- validator: (val) =>
519
- typeof val === 'string' || typeof val === 'number' || val === null,
520
519
  },
521
520
  clearInput: {
522
521
  type: Boolean,
@@ -133,7 +133,10 @@
133
133
  </Caret>
134
134
  </SelectButton>
135
135
  <DropdownWrapper ref="dropdownWrapperRef" :no-relative="noRelative">
136
- <Teleport to="body">
136
+ <component
137
+ :is="shouldUseTeleport ? 'Teleport' : 'div'"
138
+ :to="shouldUseTeleport ? 'body' : undefined"
139
+ >
137
140
  <SelectDropdown
138
141
  v-show="isSelectDropdownShown"
139
142
  ref="dropdown"
@@ -164,22 +167,27 @@
164
167
  :is-active="isActive"
165
168
  :is-fixed-dropdown-position="isFixedDropdownPosition"
166
169
  :is-parent-modal="isParentModal"
170
+ :is-teleport="shouldUseTeleport"
167
171
  :min-width="minWidth"
168
172
  :no-relative="noRelative"
169
173
  :option-width="getOptionWidth"
170
174
  :selected-value="selectedValue"
171
- :style="{
172
- transform: `translate(${dropdownPosition?.left}px, ${
173
- noRelative ? 'auto' : `${dropdownPosition?.top}px`
174
- })`,
175
- }"
175
+ :style="
176
+ shouldUseTeleport
177
+ ? {
178
+ transform: `translate(${dropdownPosition?.left}px, ${
179
+ noRelative ? 'auto' : `${dropdownPosition?.top}px`
180
+ })`,
181
+ }
182
+ : undefined
183
+ "
176
184
  @mouseleave="optionLeave"
177
185
  @option-hovered="optionHovered"
178
186
  @option-selected="optionSelected"
179
187
  >
180
188
  <slot name="dropdown"></slot>
181
189
  </SelectDropdown>
182
- </Teleport>
190
+ </component>
183
191
  </DropdownWrapper>
184
192
  </SelectButtonWrapper>
185
193
  </InputWrapper>
@@ -396,6 +404,7 @@
396
404
  minWidth: String,
397
405
  isParentModal: Boolean,
398
406
  isFixedDropdownPosition: Boolean,
407
+ isTeleport: Boolean,
399
408
  }
400
409
  const SelectDropdown = styled('div', selectDropdownAttrs)`
401
410
  box-sizing: border-box;
@@ -403,7 +412,7 @@
403
412
  props.isActive ? '2' : props.isParentModal ? '9999999' : '99999'};
404
413
  position: ${(props) =>
405
414
  props.isFixedDropdownPosition ? 'fixed' : 'absolute'};
406
- top: 0px;
415
+ top: ${(props) => (props.isTeleport ? '0px' : '4px')};
407
416
  left: 0px;
408
417
  border: ${BORDER_WIDTH} solid ${(props) => props.theme.colors.grey4};
409
418
  border-radius: 4px;
@@ -657,6 +666,11 @@
657
666
  required: false,
658
667
  default: false,
659
668
  },
669
+ shouldUseTeleport: {
670
+ type: Boolean,
671
+ required: false,
672
+ default: true,
673
+ },
660
674
  },
661
675
  setup() {
662
676
  const modalRef = inject('modalRef')
@@ -2,18 +2,19 @@
2
2
  <OptionContainer
3
3
  :background-color="
4
4
  colorMode == 'dark'
5
- ? '#000000'
5
+ ? theme.semanticColors.teal[900]
6
6
  : colorMode == 'transparent'
7
7
  ? 'black'
8
8
  : backgroundColor
9
9
  "
10
+ :color-mode="colorMode"
10
11
  :cursor-type="cursorType"
11
12
  :data-value="value"
12
13
  :disabled-bg-color="disabledBgColor"
13
14
  :disabled-text-color="disabledTextColor"
14
15
  :hovered-bg-color="
15
16
  colorMode == 'dark'
16
- ? '#000000'
17
+ ? theme.semanticColors.teal[800]
17
18
  : colorMode == 'transparent'
18
19
  ? 'grey6'
19
20
  : hoveredBgColor
@@ -36,6 +37,7 @@
36
37
  // import selectButton from './selectButton'
37
38
  // import selectDropdown from './selectDropDown'
38
39
  import styled from 'vue3-styled-components'
40
+ import theme from '@/assets/theme'
39
41
  const optionProps = {
40
42
  isDisabled: Boolean,
41
43
  hoveredBgColor: String,
@@ -46,6 +48,7 @@
46
48
  disabledTextColor: String,
47
49
  padding: String,
48
50
  textColor: String,
51
+ colorMode: String,
49
52
  }
50
53
  const OptionContainer = styled('div', optionProps)`
51
54
  display: flex;
@@ -77,6 +80,8 @@
77
80
  ? props.theme.colors[props.disabledTextColor]
78
81
  : props.disabledTextColor
79
82
  : props.theme.colors.grey3
83
+ : props.colorMode == 'dark'
84
+ ? props.theme.colors['white']
80
85
  : props.theme.colors[props.textColor]
81
86
  ? props.theme.colors[props.textColor]
82
87
  : props.textColor};
@@ -145,7 +150,9 @@
145
150
  },
146
151
  emits: ['option-hovered', 'option-selected'],
147
152
  data() {
148
- return {}
153
+ return {
154
+ theme,
155
+ }
149
156
  },
150
157
  computed: {},
151
158
  methods: {
@@ -33,8 +33,18 @@
33
33
  :is-active="selectedValue == item.value"
34
34
  :primary-color="primaryColor"
35
35
  :secondary-color="secondaryColor"
36
+ :size="size"
36
37
  @click="selectItem(item.value)"
37
38
  >
39
+ <OptionIconContainer v-if="item.icon">
40
+ <RCIcon
41
+ :color="
42
+ selectedValue == item.value ? primaryColor : secondaryColor
43
+ "
44
+ :name="item.icon"
45
+ :size="item.iconSize"
46
+ />
47
+ </OptionIconContainer>
38
48
  {{ item.content }}
39
49
  </SwitchOption>
40
50
  </SwitchWrapper>
@@ -70,6 +80,12 @@
70
80
  import styled from 'vue3-styled-components'
71
81
  import InfoText from '../../infoText'
72
82
  import theme from '../../../assets/theme'
83
+ import RCIcon from '../../icon'
84
+ const OptionIconContainer = styled.div`
85
+ display: flex;
86
+ align-items: center;
87
+ margin-right: 5px;
88
+ `
73
89
  const Container = styled.div``
74
90
 
75
91
  const flexAttrs = {
@@ -89,7 +105,6 @@
89
105
  `
90
106
 
91
107
  const toggleAttrs = {
92
- size: String,
93
108
  fontColor: String,
94
109
  disabled: Boolean,
95
110
  backgroundColor: String,
@@ -105,20 +120,16 @@
105
120
 
106
121
  const SwitchWrapper = styled('span', toggleAttrs)`
107
122
  display: flex;
123
+ align-items: center
108
124
  position: relative;
109
125
  cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};
110
- height: ${(props) =>
111
- props.size === 'medium'
112
- ? '24px'
113
- : props.size === 'small'
114
- ? '16px'
115
- : '24px'};
116
126
  `
117
127
  const optionAttrs = {
118
128
  isActive: Boolean,
119
129
  primaryColor: String,
120
130
  secondaryColor: String,
121
131
  inactiveColor: String,
132
+ size: String,
122
133
  }
123
134
  const SwitchOption = styled('div', optionAttrs)`
124
135
  color: ${(props) =>
@@ -135,7 +146,13 @@
135
146
  font-size: 13px;
136
147
  line-height: 1;
137
148
  text-align: center;
138
- padding: 10px;
149
+ height: ${(props) =>
150
+ props.size === 'medium'
151
+ ? '24px'
152
+ : props.size === 'small'
153
+ ? '16px'
154
+ : '24px'};
155
+ padding: 0 10px;
139
156
  margin-right: -1px;
140
157
  transition: all 0.1s ease-in-out;
141
158
  overflow: hidden;
@@ -169,6 +186,8 @@
169
186
  InfoText,
170
187
  LabelContainer,
171
188
  SwitchOption,
189
+ OptionIconContainer,
190
+ RCIcon,
172
191
  },
173
192
  props: {
174
193
  label: {
@@ -124,6 +124,7 @@
124
124
  : props.size === 'small'
125
125
  ? '13px'
126
126
  : '16px'};
127
+ font-weight: 700;
127
128
  `
128
129
 
129
130
  const ToggleWrapper = styled('span', toggleAttrs)`