edvoyui-component-library-test-flight 0.0.217 → 0.0.219
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/dist/components/accordion/EUIAccordion.d.ts +9 -0
- package/dist/components/accordion/EUIAccordion.vue +39 -7
- package/dist/components/select/EUISelect.vue +4 -2
- package/dist/edvoy-ui.cjs.js +3 -3
- package/dist/edvoy-ui.css +1 -1
- package/dist/edvoy-ui.es.js +4345 -4333
- package/dist/edvoy-ui.umd.js +8 -8
- package/package.json +1 -1
|
@@ -36,6 +36,10 @@ declare const __VLS_component: import('../../../node_modules/vue').DefineCompone
|
|
|
36
36
|
type: PropType<"grouped" | "separated">;
|
|
37
37
|
default: string;
|
|
38
38
|
};
|
|
39
|
+
rightIconActions: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
39
43
|
className: {
|
|
40
44
|
type: StringConstructor;
|
|
41
45
|
required: false;
|
|
@@ -64,6 +68,10 @@ declare const __VLS_component: import('../../../node_modules/vue').DefineCompone
|
|
|
64
68
|
type: PropType<"grouped" | "separated">;
|
|
65
69
|
default: string;
|
|
66
70
|
};
|
|
71
|
+
rightIconActions: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
default: boolean;
|
|
74
|
+
};
|
|
67
75
|
className: {
|
|
68
76
|
type: StringConstructor;
|
|
69
77
|
required: false;
|
|
@@ -79,6 +87,7 @@ declare const __VLS_component: import('../../../node_modules/vue').DefineCompone
|
|
|
79
87
|
defaultOpen: number[];
|
|
80
88
|
collapse: boolean;
|
|
81
89
|
accordionStyle: "grouped" | "separated";
|
|
90
|
+
rightIconActions: boolean;
|
|
82
91
|
animateContent: boolean;
|
|
83
92
|
}, {}, {}, {}, string, import('../../../node_modules/vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
84
93
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -33,7 +33,9 @@
|
|
|
33
33
|
<div
|
|
34
34
|
:class="[
|
|
35
35
|
'text-gray-600 transition-all duration-200 ease-in-out faq-title group-hover/accordion:text-gray-900 group-open/accordion:text-gray-900',
|
|
36
|
-
|
|
36
|
+
rightIconActions
|
|
37
|
+
? 'flex-1 min-w-0'
|
|
38
|
+
: accordionStyle === 'grouped' ? 'w-11/12' : 'flex-initial w-[calc(75%-1.5rem)]',
|
|
37
39
|
]"
|
|
38
40
|
>
|
|
39
41
|
<slot name="title" :item="item">
|
|
@@ -41,12 +43,22 @@
|
|
|
41
43
|
</slot>
|
|
42
44
|
</div>
|
|
43
45
|
|
|
44
|
-
<
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
<div
|
|
47
|
+
:class="[
|
|
48
|
+
'flex items-center gap-3',
|
|
49
|
+
rightIconActions
|
|
50
|
+
? 'justify-end shrink-0'
|
|
51
|
+
: accordionStyle === 'grouped'
|
|
52
|
+
? 'absolute right-4'
|
|
53
|
+
: 'justify-end min-w-0 shrink-0',
|
|
54
|
+
]"
|
|
55
|
+
@click="onRightSideClick"
|
|
56
|
+
>
|
|
57
|
+
<slot name="right-icon" :item="item" :open="openAccordions[index]" :toggle="() => onClick(index)">
|
|
58
|
+
<svg
|
|
59
|
+
class="text-gray-500 transition-all duration-150 ease-out pointer-events-none expand-icon group-open/accordion:text-gray-900 group-open/accordion:rotate-90" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M10 8.13867C11.4619 9.20073 12.7713 10.4457 13.8942 11.8408C14.0353 12.016 14.0353 12.2613 13.8942 12.4365C12.7713 13.8316 11.4619 15.0766 10 16.1387" stroke="currentColor" stroke-opacity="0.8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
60
|
+
</svg>
|
|
61
|
+
</slot>
|
|
50
62
|
</div>
|
|
51
63
|
</summary>
|
|
52
64
|
<div
|
|
@@ -86,6 +98,14 @@ const props = defineProps({
|
|
|
86
98
|
type: String as PropType<"grouped" | "separated">,
|
|
87
99
|
default: "grouped",
|
|
88
100
|
},
|
|
101
|
+
// When true, the `right-icon` slot becomes an interactive "actions" area:
|
|
102
|
+
// clicks inside it no longer toggle the accordion (so buttons/menus work
|
|
103
|
+
// on their own), and it renders in normal flow instead of as an absolute
|
|
104
|
+
// overlay — in both `grouped` and `separated` styles.
|
|
105
|
+
rightIconActions: {
|
|
106
|
+
type: Boolean,
|
|
107
|
+
default: false,
|
|
108
|
+
},
|
|
89
109
|
className: {
|
|
90
110
|
type: String,
|
|
91
111
|
required: false,
|
|
@@ -123,6 +143,18 @@ onMounted(() => {
|
|
|
123
143
|
});
|
|
124
144
|
});
|
|
125
145
|
|
|
146
|
+
// In actions mode, stop clicks on the right-icon side from toggling the
|
|
147
|
+
// accordion: `.stop` skips the summary's managed onClick and `.prevent`
|
|
148
|
+
// blocks the native <details> toggle. Slot click handlers still run (they
|
|
149
|
+
// fire earlier, during bubbling). When the prop is off this is a no-op, so
|
|
150
|
+
// the default chevron keeps toggling on click.
|
|
151
|
+
const onRightSideClick = (e: MouseEvent) => {
|
|
152
|
+
if (props.rightIconActions) {
|
|
153
|
+
e.stopPropagation();
|
|
154
|
+
e.preventDefault();
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
|
|
126
158
|
const emit = defineEmits(['update:activeItem']);
|
|
127
159
|
const onClick = (index: number) => {
|
|
128
160
|
// openAccordions.value = openAccordions.value.map((isOpen, i) => i === index ? !isOpen : isOpen);
|
|
@@ -295,8 +295,10 @@ type VirtualElement = {
|
|
|
295
295
|
|
|
296
296
|
const showPlaceholder = computed(() => {
|
|
297
297
|
const label = props.placeholder || `Select ${name}`;
|
|
298
|
-
|
|
299
|
-
|
|
298
|
+
// Only surface the required marker in the placeholder when there's no label,
|
|
299
|
+
// otherwise it duplicates the asterisk the label already renders.
|
|
300
|
+
const labelReq = props.required && !props.label ? "*" : "";
|
|
301
|
+
return `${label} ${labelReq}`.trim();
|
|
300
302
|
});
|
|
301
303
|
|
|
302
304
|
const startCaseText = (x: string) => {
|