@milaboratories/uikit 2.6.1 → 2.6.2

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 (64) hide show
  1. package/.turbo/turbo-build.log +48 -48
  2. package/.turbo/turbo-type-check.log +1 -1
  3. package/CHANGELOG.md +8 -0
  4. package/dist/components/DataTable/TableComponent.vue.js +4 -2
  5. package/dist/components/DataTable/TableComponent.vue.js.map +1 -1
  6. package/dist/components/PlAccordion/ExpandTransition.vue3.js +1 -1
  7. package/dist/components/PlAccordion/PlAccordionSection.vue2.js +1 -1
  8. package/dist/components/PlAutocomplete/PlAutocomplete.vue.d.ts +4 -0
  9. package/dist/components/PlAutocomplete/PlAutocomplete.vue.js +74 -68
  10. package/dist/components/PlAutocomplete/PlAutocomplete.vue.js.map +1 -1
  11. package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.vue.d.ts +4 -0
  12. package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.vue.js +52 -46
  13. package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.vue.js.map +1 -1
  14. package/dist/components/PlDropdown/PlDropdown.vue.d.ts +8 -0
  15. package/dist/components/PlDropdown/PlDropdown.vue.js +67 -60
  16. package/dist/components/PlDropdown/PlDropdown.vue.js.map +1 -1
  17. package/dist/components/PlDropdownLegacy/PlDropdownLegacy.vue.js +21 -19
  18. package/dist/components/PlDropdownLegacy/PlDropdownLegacy.vue.js.map +1 -1
  19. package/dist/components/PlDropdownMulti/PlDropdownMulti.vue.d.ts +4 -0
  20. package/dist/components/PlDropdownMulti/PlDropdownMulti.vue.js +47 -41
  21. package/dist/components/PlDropdownMulti/PlDropdownMulti.vue.js.map +1 -1
  22. package/dist/components/PlElementList/PlElementList.vue.d.ts +20 -0
  23. package/dist/components/PlElementList/PlElementList.vue2.js +180 -135
  24. package/dist/components/PlElementList/PlElementList.vue2.js.map +1 -1
  25. package/dist/components/PlElementList/PlElementListItem.vue.d.ts +20 -0
  26. package/dist/components/PlElementList/PlElementListItem.vue2.js +99 -74
  27. package/dist/components/PlElementList/PlElementListItem.vue2.js.map +1 -1
  28. package/dist/components/PlFileInput/PlFileInput.vue.js +24 -22
  29. package/dist/components/PlFileInput/PlFileInput.vue.js.map +1 -1
  30. package/dist/components/PlLogView/PlLogView.vue.js +24 -22
  31. package/dist/components/PlLogView/PlLogView.vue.js.map +1 -1
  32. package/dist/components/PlNumberField/PlNumberField.vue.d.ts +5 -0
  33. package/dist/components/PlNumberField/PlNumberField.vue.js +60 -54
  34. package/dist/components/PlNumberField/PlNumberField.vue.js.map +1 -1
  35. package/dist/components/PlSlideModal/PlPureSlideModal.vue.js +4 -2
  36. package/dist/components/PlSlideModal/PlPureSlideModal.vue.js.map +1 -1
  37. package/dist/components/PlTextArea/PlTextArea.vue.js +15 -13
  38. package/dist/components/PlTextArea/PlTextArea.vue.js.map +1 -1
  39. package/dist/components/PlTextField/PlTextField.vue.d.ts +4 -0
  40. package/dist/components/PlTextField/PlTextField.vue.js +45 -39
  41. package/dist/components/PlTextField/PlTextField.vue.js.map +1 -1
  42. package/dist/composition/filters/metadata.d.ts +205 -0
  43. package/dist/composition/filters/metadata.js +129 -19
  44. package/dist/composition/filters/metadata.js.map +1 -1
  45. package/dist/utils/DoubleContour.vue.d.ts +7 -1
  46. package/dist/utils/DoubleContour.vue.js +20 -13
  47. package/dist/utils/DoubleContour.vue.js.map +1 -1
  48. package/dist/utils/DoubleContour.vue2.js +19 -3
  49. package/dist/utils/DoubleContour.vue2.js.map +1 -1
  50. package/dist/utils/DoubleContour.vue3.js +7 -0
  51. package/dist/utils/DoubleContour.vue3.js.map +1 -0
  52. package/package.json +4 -4
  53. package/src/components/PlAutocomplete/PlAutocomplete.vue +6 -1
  54. package/src/components/PlAutocompleteMulti/PlAutocompleteMulti.vue +6 -1
  55. package/src/components/PlDropdown/PlDropdown.vue +12 -2
  56. package/src/components/PlDropdownMulti/PlDropdownMulti.vue +6 -1
  57. package/src/components/PlElementList/PlElementList.vue +40 -6
  58. package/src/components/PlElementList/PlElementListItem.vue +64 -47
  59. package/src/components/PlNumberField/PlNumberField.vue +4 -1
  60. package/src/components/PlTextField/PlTextField.vue +5 -1
  61. package/src/composition/filters/metadata.ts +105 -0
  62. package/src/utils/DoubleContour.vue +68 -2
  63. package/dist/components/PlAccordion/ExpandTransition.vue.js +0 -27
  64. package/dist/components/PlAccordion/ExpandTransition.vue.js.map +0 -1
@@ -14,6 +14,10 @@ const props = withDefaults(
14
14
  getItemKey?: (item: T, index: number) => K;
15
15
 
16
16
  itemClass?: string | string[] | ((item: T, index: number) => string | string[]);
17
+ itemClassTitle?: string | string[] | ((item: T, index: number) => string | string[]);
18
+ itemClassBefore?: string | string[] | ((item: T, index: number) => string | string[]);
19
+ itemClassAfter?: string | string[] | ((item: T, index: number) => string | string[]);
20
+ itemClassContent?: string | string[] | ((item: T, index: number) => string | string[]);
17
21
  isActive?: (item: T, index: number) => boolean;
18
22
 
19
23
  disableDragging?: boolean;
@@ -43,6 +47,10 @@ const props = withDefaults(
43
47
  getItemKey: (item: T) => JSON.stringify(item) as K,
44
48
 
45
49
  itemClass: undefined,
50
+ itemClassTitle: undefined,
51
+ itemClassContent: undefined,
52
+ itemClassBefore: undefined,
53
+ itemClassAfter: undefined,
46
54
  isActive: undefined,
47
55
 
48
56
  disableDragging: undefined,
@@ -78,6 +86,8 @@ const emits = defineEmits<{
78
86
  const slots = defineSlots<{
79
87
  ['item-title']: (props: { item: T; index: number }) => unknown;
80
88
  ['item-content']?: (props: { item: T; index: number }) => unknown;
89
+ ['item-before']?: (props: { item: T; index: number }) => unknown;
90
+ ['item-after']?: (props: { item: T; index: number }) => unknown;
81
91
  }>();
82
92
 
83
93
  const dndSortingEnabled = computed((): boolean => {
@@ -237,12 +247,19 @@ function handleRemove(item: T, index: number) {
237
247
  itemsRef.value.splice(index, 1);
238
248
  }
239
249
 
240
- const getItemClass = (item: T, index: number): null | string | string[] => {
241
- if (typeof props.itemClass === 'function') {
242
- return props.itemClass(item, index);
243
- }
244
- return props.itemClass ?? null;
245
- };
250
+ function getClassFunction(propsItemClass: string | string[] | ((item: T, index: number) => string | string[]) | undefined): (item: T, index: number) => null | string | string[] {
251
+ return (item: T, index: number): null | string | string[] => {
252
+ if (typeof propsItemClass === 'function') {
253
+ return propsItemClass(item, index);
254
+ }
255
+ return propsItemClass ?? null;
256
+ };
257
+ }
258
+ const getItemClass = getClassFunction(props.itemClass);
259
+ const getItemClassTitle = getClassFunction(props.itemClassTitle);
260
+ const getItemClassContent = getClassFunction(props.itemClassContent);
261
+ const getItemClassBefore = getClassFunction(props.itemClassBefore);
262
+ const getItemClassAfter = getClassFunction(props.itemClassAfter);
246
263
 
247
264
  </script>
248
265
 
@@ -252,6 +269,10 @@ const getItemClass = (item: T, index: number): null | string | string[] => {
252
269
  <PlElementListItem
253
270
  v-for="(pinnedItem, pinnedIndex) in pinnedItemsRef" :key="pinnedKeysRef[pinnedIndex]"
254
271
  :class="[$style.item, getItemClass(pinnedItem, pinnedIndex)]"
272
+ :titleClass="getItemClassTitle(pinnedItem, pinnedIndex)"
273
+ :contentClass="getItemClassContent(pinnedItem, pinnedIndex)"
274
+ :beforeClass="getItemClassBefore(pinnedItem, pinnedIndex)"
275
+ :afterClass="getItemClassAfter(pinnedItem, pinnedIndex)"
255
276
 
256
277
  :index="pinnedIndex"
257
278
  :item="pinnedItem"
@@ -272,18 +293,28 @@ const getItemClass = (item: T, index: number): null | string | string[] => {
272
293
  @pin="handlePin"
273
294
  @expand="handleExpand"
274
295
  >
296
+ <template v-if="slots['item-before']" #before="{ item, index }">
297
+ <slot :index="index" :item="item" name="item-before" />
298
+ </template>
275
299
  <template #title="{ item, index }">
276
300
  <slot :index="index" :item="item" name="item-title" />
277
301
  </template>
278
302
  <template v-if="slots['item-content']" #content="{ item, index }">
279
303
  <slot :index="index" :item="item" name="item-content" />
280
304
  </template>
305
+ <template v-if="slots['item-after']" #after="{ item, index }">
306
+ <slot :index="index" :item="item" name="item-after" />
307
+ </template>
281
308
  </PlElementListItem>
282
309
  </div>
283
310
  <div v-if="hasUnpinnedItems" ref="unpinnedContainerRef" :class="$style.list">
284
311
  <PlElementListItem
285
312
  v-for="(unpinnedItem, unpinnedIndex) in unpinnedItemsRef" :key="unpinnedKeysRef[unpinnedIndex]"
286
313
  :class="[$style.item, getItemClass(unpinnedItem, unpinnedIndex)]"
314
+ :titleClass="getItemClassTitle(unpinnedItem, unpinnedIndex)"
315
+ :contentClass="getItemClassContent(unpinnedItem, unpinnedIndex)"
316
+ :beforeClass="getItemClassBefore(unpinnedItem, unpinnedIndex)"
317
+ :afterClass="getItemClassAfter(unpinnedItem, unpinnedIndex)"
287
318
 
288
319
  :index="unpinnedIndex + (pinnedItemsRef?.length ?? 0)"
289
320
  :item="unpinnedItem"
@@ -310,6 +341,9 @@ const getItemClass = (item: T, index: number): null | string | string[] => {
310
341
  <template v-if="slots['item-content']" #content="{ item, index }">
311
342
  <slot :index="index" :item="item" name="item-content" />
312
343
  </template>
344
+ <template v-if="slots['item-after']" #after="{ item, index }">
345
+ <slot :index="index" :item="item" name="item-after" />
346
+ </template>
313
347
  </PlElementListItem>
314
348
  </div>
315
349
  </div>
@@ -16,13 +16,22 @@ const props = defineProps<{
16
16
  isToggled: boolean;
17
17
  isPinnable: boolean;
18
18
  isPinned: boolean;
19
+ titleClass: string | string[] | null;
20
+ contentClass: string | string[] | null;
21
+ afterClass: string | string[] | null;
22
+ beforeClass: string | string[] | null;
19
23
  }>();
24
+ defineOptions({ inheritAttrs: false });
20
25
 
21
26
  const slots = defineSlots<{
22
27
  title: (props: { item: T; index: number }) => unknown;
23
28
  content?: (props: { item: T; index: number }) => unknown;
29
+ after?: (props: { item: T; index: number }) => unknown;
30
+ before?: (props: { item: T; index: number }) => unknown;
24
31
  }>();
25
32
  const hasContentSlot = computed(() => slots['content'] !== undefined);
33
+ const hasAfterSlot = computed(() => slots['after'] !== undefined);
34
+ const hasBeforeSlot = computed(() => slots['before'] !== undefined);
26
35
 
27
36
  const emit = defineEmits<{
28
37
  (e: 'expand', item: T, index: number): void;
@@ -33,65 +42,73 @@ const emit = defineEmits<{
33
42
  </script>
34
43
 
35
44
  <template>
36
- <div
37
- :class="[$style.root, {
38
- [$style.active]: props.isActive,
39
- [$style.pinned]: props.isPinned,
40
- [$style.opened]: props.isExpanded,
41
- [$style.disabled]: props.isToggled,
42
- }]"
43
- >
45
+ <div>
46
+ <div v-if="hasBeforeSlot" :class="beforeClass">
47
+ <slot name="before" :item="props.item" :index="props.index" />
48
+ </div>
44
49
  <div
45
- :class="[$style.head, {
46
- [$style.clickable]: hasContentSlot,
50
+ :class="[$style.root, $attrs.class, {
51
+ [$style.active]: props.isActive,
52
+ [$style.pinned]: props.isPinned,
53
+ [$style.opened]: props.isExpanded,
54
+ [$style.disabled]: props.isToggled,
47
55
  }]"
48
- @click="isExpandable && emit('expand', props.item, props.index)"
49
56
  >
50
57
  <div
51
- v-if="props.showDragHandle"
52
- :class="[$style.action, $style.draggable, { [$style.disable]: !props.isDraggable } ]"
53
- :data-draggable="props.isDraggable"
58
+ :class="[$style.head, titleClass, {
59
+ [$style.clickable]: hasContentSlot,
60
+ }]"
61
+ @click="isExpandable && emit('expand', props.item, props.index)"
54
62
  >
55
- <PlIcon16 name="drag-dots" />
56
- </div>
57
- <PlIcon16 v-if="isExpandable" :class="[$style.contentChevron, { [$style.opened]: props.isExpanded }]" name="chevron-down" />
58
-
59
- <div :class="$style.title">
60
- <slot name="title" :item="props.item" :index="props.index" />
61
- </div>
62
-
63
- <div :class="[$style.actions, $style.showOnHover]">
64
63
  <div
65
- v-if="props.isToggable"
66
- :class="[$style.action, $style.clickable, { [$style.disable]: !props.isToggable }]"
67
- @click.stop="emit('toggle', props.item, props.index)"
64
+ v-if="props.showDragHandle"
65
+ :class="[$style.action, $style.draggable, { [$style.disable]: !props.isDraggable } ]"
66
+ :data-draggable="props.isDraggable"
68
67
  >
69
- <PlIcon24 :name="props.isToggled === true ? 'view-hide' : 'view-show'" size="16" />
68
+ <PlIcon16 name="drag-dots" />
70
69
  </div>
71
- <div
72
- v-if="props.isPinnable"
73
- :class="[$style.action, $style.clickable, {
74
- [$style.disable]: !props.isPinnable,
75
- [$style.activated]: props.isPinned,
76
- }]"
77
- @click.stop="emit('pin', props.item, props.index)"
78
- >
79
- <PlIcon24 name="pin" size="16" />
70
+ <PlIcon16 v-if="isExpandable" :class="[$style.contentChevron, { [$style.opened]: props.isExpanded }]" name="chevron-down" />
71
+
72
+ <div :class="$style.title">
73
+ <slot name="title" :item="props.item" :index="props.index" />
80
74
  </div>
81
- <div
82
- v-if="props.isRemovable"
83
- :class="[$style.action, $style.clickable]"
84
- @click.stop="emit('remove', props.item, props.index)"
85
- >
86
- <PlIcon16 name="close" />
75
+
76
+ <div :class="[$style.actions, $style.showOnHover]">
77
+ <div
78
+ v-if="props.isToggable"
79
+ :class="[$style.action, $style.clickable, { [$style.disable]: !props.isToggable }]"
80
+ @click.stop="emit('toggle', props.item, props.index)"
81
+ >
82
+ <PlIcon24 :name="props.isToggled === true ? 'view-hide' : 'view-show'" size="16" />
83
+ </div>
84
+ <div
85
+ v-if="props.isPinnable"
86
+ :class="[$style.action, $style.clickable, {
87
+ [$style.disable]: !props.isPinnable,
88
+ [$style.activated]: props.isPinned,
89
+ }]"
90
+ @click.stop="emit('pin', props.item, props.index)"
91
+ >
92
+ <PlIcon24 name="pin" size="16" />
93
+ </div>
94
+ <div
95
+ v-if="props.isRemovable"
96
+ :class="[$style.action, $style.clickable]"
97
+ @click.stop="emit('remove', props.item, props.index)"
98
+ >
99
+ <PlIcon16 name="close" />
100
+ </div>
87
101
  </div>
88
102
  </div>
103
+ <div
104
+ v-if="hasContentSlot && props.isExpanded"
105
+ :class="[$style.body, contentClass, { [$style.disabled]: props.isToggled }]"
106
+ >
107
+ <slot name="content" :item="props.item" :index="props.index" />
108
+ </div>
89
109
  </div>
90
- <div
91
- v-if="hasContentSlot && props.isExpanded"
92
- :class="[$style.body, { [$style.disabled]: props.isToggled }]"
93
- >
94
- <slot name="content" :item="props.item" :index="props.index" />
110
+ <div v-if="hasAfterSlot" :class="afterClass">
111
+ <slot name="after" :item="props.item" :index="props.index" />
95
112
  </div>
96
113
  </div>
97
114
  </template>
@@ -47,6 +47,8 @@ const props = withDefaults(defineProps<{
47
47
  errorMessage?: string;
48
48
  /** Additional validity check for input value that must return an error text if failed */
49
49
  validate?: (v: number) => string | undefined;
50
+ /** Makes some of corners not rounded */
51
+ groupPosition?: 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'middle';
50
52
  }>(), {
51
53
  step: 1,
52
54
  label: undefined,
@@ -57,6 +59,7 @@ const props = withDefaults(defineProps<{
57
59
  updateOnEnter: false,
58
60
  errorMessage: undefined,
59
61
  validate: undefined,
62
+ groupPosition: undefined,
60
63
  });
61
64
 
62
65
  const modelValue = defineModel<number | undefined>({ required: true });
@@ -239,7 +242,7 @@ const onMousedown = (ev: MouseEvent) => {
239
242
  @keydown="handleKeyPress($event)"
240
243
  >
241
244
  <div class="pl-number-field__main-wrapper d-flex">
242
- <DoubleContour class="pl-number-field__contour"/>
245
+ <DoubleContour class="pl-number-field__contour" :group-position="groupPosition"/>
243
246
  <div
244
247
  class="pl-number-field__wrapper flex-grow d-flex flex-align-center"
245
248
  :class="{withoutArrows: !useIncrementButtons}"
@@ -83,6 +83,10 @@ const props = defineProps<{
83
83
  * The string specifies whether the field should be a password or not, value could be "password" or undefined.
84
84
  */
85
85
  type?: 'password';
86
+ /**
87
+ * Makes some of corners not rounded
88
+ * */
89
+ groupPosition?: 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'middle';
86
90
  }>();
87
91
 
88
92
  const rootRef = ref<HTMLInputElement | undefined>(undefined);
@@ -217,7 +221,7 @@ useLabelNotch(rootRef);
217
221
  <PlIcon24 v-if="type === 'password'" :name="passwordIcon" style="cursor: pointer" @click.stop="togglePasswordVisibility" />
218
222
  <slot name="append" />
219
223
  </div>
220
- <DoubleContour class="pl-text-field__contour" />
224
+ <DoubleContour class="pl-text-field__contour" :group-position="groupPosition" />
221
225
  </div>
222
226
  <div v-if="hasErrors" class="pl-text-field__error">
223
227
  {{ displayErrors.join(' ') }}
@@ -23,6 +23,27 @@ export const filterUiMetadata = {
23
23
  },
24
24
  supportedFor: isNumericValueType,
25
25
  },
26
+ notEqual: {
27
+ label: 'Col ≠ X (Not Equal)',
28
+ form: {
29
+ column: {
30
+ label: 'Column',
31
+ fieldType: 'SUniversalPColumnId',
32
+ defaultValue: () => undefined,
33
+ },
34
+ type: {
35
+ label: 'Predicate',
36
+ fieldType: 'FilterType',
37
+ defaultValue: () => 'notEqual',
38
+ },
39
+ x: {
40
+ label: 'X',
41
+ fieldType: 'number',
42
+ defaultValue: () => 0,
43
+ },
44
+ },
45
+ supportedFor: isNumericValueType,
46
+ },
26
47
  lessThan: {
27
48
  label: 'Col < X (Less Than)',
28
49
  form: {
@@ -450,6 +471,90 @@ export const filterUiMetadata = {
450
471
  },
451
472
  supportedFor: () => false,
452
473
  },
474
+ patternMatchesRegularExpression: {
475
+ label: 'Col ~ X (Matches Regular Expression)',
476
+ form: {
477
+ column: {
478
+ label: 'Column',
479
+ fieldType: 'SUniversalPColumnId',
480
+ defaultValue: () => undefined,
481
+ },
482
+ type: {
483
+ label: 'Predicate',
484
+ fieldType: 'FilterType',
485
+ defaultValue: () => 'patternMatchesRegularExpression',
486
+ },
487
+ value: {
488
+ label: 'Seq',
489
+ fieldType: 'string',
490
+ defaultValue: () => '',
491
+ },
492
+ },
493
+ supportedFor: isStringValueType,
494
+ },
495
+ patternFuzzyContainSubsequence: {
496
+ label: 'Col ~ Seq (Fuzzy Contain Subsequence)',
497
+ form: {
498
+ column: {
499
+ label: 'Column',
500
+ fieldType: 'SUniversalPColumnId',
501
+ defaultValue: () => undefined,
502
+ },
503
+ type: {
504
+ label: 'Predicate',
505
+ fieldType: 'FilterType',
506
+ defaultValue: () => 'patternFuzzyContainSubsequence',
507
+ },
508
+ value: {
509
+ label: 'Set',
510
+ fieldType: 'string',
511
+ defaultValue: () => '',
512
+ },
513
+ },
514
+ supportedFor: isStringValueType,
515
+ },
516
+ inSet: {
517
+ label: 'Col ∈ Set (In Set)',
518
+ form: {
519
+ column: {
520
+ label: 'Column',
521
+ fieldType: 'SUniversalPColumnId',
522
+ defaultValue: () => undefined,
523
+ },
524
+ type: {
525
+ label: 'Predicate',
526
+ fieldType: 'FilterType',
527
+ defaultValue: () => 'inSet',
528
+ },
529
+ value: {
530
+ fieldType: 'unknown[]',
531
+ label: 'Set',
532
+ defaultValue: () => [],
533
+ },
534
+ },
535
+ supportedFor: isStringValueType,
536
+ },
537
+ notInSet: {
538
+ label: 'Col ∉ Set (Not In Set)',
539
+ form: {
540
+ column: {
541
+ label: 'Column',
542
+ fieldType: 'SUniversalPColumnId',
543
+ defaultValue: () => undefined,
544
+ },
545
+ type: {
546
+ label: 'Predicate',
547
+ fieldType: 'FilterType',
548
+ defaultValue: () => 'notInSet',
549
+ },
550
+ value: {
551
+ label: 'Seq',
552
+ fieldType: 'unknown[]',
553
+ defaultValue: () => [],
554
+ },
555
+ },
556
+ supportedFor: isStringValueType,
557
+ },
453
558
  } satisfies FilterSpecMetadataRecord<FilterSpecType>;
454
559
 
455
560
  export function getFilterUiTypeOptions(columnSpec?: SimplifiedPColumnSpec) {
@@ -1,15 +1,81 @@
1
- <script lang="ts" setup></script>
1
+ <script lang="ts" setup>
2
+ withDefaults(defineProps<{
3
+ groupPosition?: 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'middle';
4
+ }>(), {
5
+ groupPosition: undefined,
6
+ });
7
+ </script>
2
8
 
3
9
  <script lang="ts">
10
+
4
11
  export default {
5
12
  inheritAttrs: false,
6
13
  };
7
14
  </script>
8
15
 
9
16
  <template>
10
- <div class="double-contour">
17
+ <div class="double-contour" :class="{ [groupPosition]: true }">
11
18
  <div v-bind="$attrs">
12
19
  <slot />
13
20
  </div>
14
21
  </div>
15
22
  </template>
23
+ <style>
24
+ .double-contour {
25
+ &.top > div {
26
+ border-bottom-right-radius: 0;
27
+ border-bottom-left-radius: 0;
28
+ }
29
+ }
30
+ .double-contour {
31
+ &.bottom > div {
32
+ border-top-right-radius: 0;
33
+ border-top-left-radius: 0;
34
+ }
35
+ }
36
+ .double-contour {
37
+ &.left > div {
38
+ border-top-right-radius: 0;
39
+ border-bottom-right-radius: 0;
40
+ }
41
+ }
42
+ .double-contour {
43
+ &.right > div {
44
+ border-top-left-radius: 0;
45
+ border-bottom-left-radius: 0;
46
+ }
47
+ }
48
+ .double-contour {
49
+ &.top-left > div{
50
+ border-top-right-radius: 0;
51
+ border-bottom-left-radius: 0;
52
+ border-bottom-right-radius: 0;
53
+ }
54
+ }
55
+ .double-contour {
56
+ &.top-right > div {
57
+ border-bottom-right-radius: 0;
58
+ border-top-left-radius: 0;
59
+ border-top-right-radius: 0;
60
+ }
61
+ }
62
+ .double-contour {
63
+ &.bottom-left > div {
64
+ border-top-right-radius: 0;
65
+ border-bottom-right-radius: 0;
66
+ border-top-left-radius: 0;
67
+ }
68
+ }
69
+ .double-contour {
70
+ &.bottom-right > div {
71
+ border-top-right-radius: 0;
72
+ border-bottom-left-radius: 0;
73
+ border-top-left-radius: 0;
74
+ }
75
+ }
76
+ .double-contour {
77
+ &.middle > div {
78
+ border-radius: 0;
79
+ }
80
+ }
81
+ </style>
@@ -1,27 +0,0 @@
1
- import { defineComponent as n, createBlock as r, openBlock as a, Transition as s, withCtx as p, renderSlot as c } from "vue";
2
- const f = /* @__PURE__ */ n({
3
- __name: "ExpandTransition",
4
- setup(l) {
5
- const t = (e) => {
6
- e.classList.add("expand-collapse-fix"), e.style.setProperty("--component-height", e.scrollHeight + "px");
7
- }, o = (e) => {
8
- e.style.removeProperty("--component-height"), e.classList.remove("expand-collapse-fix");
9
- };
10
- return (e, i) => (a(), r(s, {
11
- name: "expand-collapse",
12
- onEnter: t,
13
- onLeave: t,
14
- onAfterEnter: o,
15
- onAfterLeave: o
16
- }, {
17
- default: p(() => [
18
- c(e.$slots, "default")
19
- ]),
20
- _: 3
21
- }));
22
- }
23
- });
24
- export {
25
- f as default
26
- };
27
- //# sourceMappingURL=ExpandTransition.vue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ExpandTransition.vue.js","sources":["../../../src/components/PlAccordion/ExpandTransition.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nconst onStart = (el: Element) => {\n el.classList.add('expand-collapse-fix');\n (el as HTMLElement).style.setProperty('--component-height', el.scrollHeight + 'px');\n};\n\nconst onAfter = (el: Element) => {\n (el as HTMLElement).style.removeProperty('--component-height');\n el.classList.remove('expand-collapse-fix');\n};\n</script>\n\n<template>\n <Transition name=\"expand-collapse\" @enter=\"onStart\" @leave=\"onStart\" @after-enter=\"onAfter\" @after-leave=\"onAfter\">\n <slot/>\n </Transition>\n</template>\n\n<style>\n.expand-collapse-fix {\n overflow: hidden;\n}\n\n.expand-collapse-enter-active,\n.expand-collapse-leave-active {\n transition:\n height 0.2s ease-in-out,\n opacity 0.2s ease-in-out;\n height: var(--component-height);\n}\n\n.expand-collapse-enter-from,\n.expand-collapse-leave-to {\n opacity: 0.5;\n height: 0;\n}\n</style>\n"],"names":["onStart","el","onAfter"],"mappings":";;;;AACA,UAAMA,IAAU,CAACC,MAAgB;AAC/B,MAAAA,EAAG,UAAU,IAAI,qBAAqB,GACrCA,EAAmB,MAAM,YAAY,sBAAsBA,EAAG,eAAe,IAAI;AAAA,IACpF,GAEMC,IAAU,CAACD,MAAgB;AAC9B,MAAAA,EAAmB,MAAM,eAAe,oBAAoB,GAC7DA,EAAG,UAAU,OAAO,qBAAqB;AAAA,IAC3C;;;;;;;;;;;;;;;"}