@eturnity/eturnity_reusable_components 8.16.8-EPDM-EPDM-14492.0 → 8.16.9

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",
4
4
  "files": [
5
5
  "dist",
6
6
  "src"
@@ -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')