@enos5/enos-vue-default 1.4.3 → 1.5.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.
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
declare const _default: typeof __VLS_export;
|
|
2
2
|
export default _default;
|
|
3
|
-
declare const __VLS_export:
|
|
3
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
4
|
+
type __VLS_WithSlots<T, S> = T & (new () => {
|
|
5
|
+
$slots: S;
|
|
6
|
+
});
|
|
7
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
8
|
modelValue: {
|
|
5
9
|
type: StringConstructor;
|
|
6
10
|
default: string;
|
|
@@ -91,3 +95,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
91
95
|
showDeletedToggle: boolean;
|
|
92
96
|
showDeletedLabel: string;
|
|
93
97
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
98
|
+
type __VLS_Slots = {
|
|
99
|
+
'search-fields'?: ((props: {}) => any) | undefined;
|
|
100
|
+
} & {
|
|
101
|
+
controls?: ((props: {}) => any) | undefined;
|
|
102
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface ToastMessage {
|
|
2
2
|
id: string;
|
|
3
|
-
title
|
|
3
|
+
title?: string;
|
|
4
4
|
message: string;
|
|
5
5
|
variant: "success" | "error";
|
|
6
6
|
duration?: number;
|
|
@@ -9,6 +9,7 @@ type __VLS_Props = {
|
|
|
9
9
|
maxToasts?: number;
|
|
10
10
|
position?: "top-right" | "top-left" | "bottom-right" | "bottom-left";
|
|
11
11
|
variant?: "success" | "error";
|
|
12
|
+
defaultTitle?: string;
|
|
12
13
|
};
|
|
13
14
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
14
15
|
addToast: (message: string, options?: {
|
package/dist/index.css
CHANGED
|
@@ -2782,10 +2782,18 @@
|
|
|
2782
2782
|
flex-direction: row;
|
|
2783
2783
|
}
|
|
2784
2784
|
|
|
2785
|
+
.lg\:flex-wrap {
|
|
2786
|
+
flex-wrap: wrap;
|
|
2787
|
+
}
|
|
2788
|
+
|
|
2785
2789
|
.lg\:items-center {
|
|
2786
2790
|
align-items: center;
|
|
2787
2791
|
}
|
|
2788
2792
|
|
|
2793
|
+
.lg\:justify-between {
|
|
2794
|
+
justify-content: space-between;
|
|
2795
|
+
}
|
|
2796
|
+
|
|
2789
2797
|
.lg\:justify-end {
|
|
2790
2798
|
justify-content: flex-end;
|
|
2791
2799
|
}
|
package/dist/index.js
CHANGED
|
@@ -659,7 +659,7 @@ const _sfc_main$J = /* @__PURE__ */ Object.assign({
|
|
|
659
659
|
return sizeClasses[props.size] ? props.size : "default";
|
|
660
660
|
});
|
|
661
661
|
const buttonClasses = computed(() => [
|
|
662
|
-
"inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*=size-])]:size-4 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
662
|
+
"inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*=size-])]:size-4 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
663
663
|
variantClasses[resolvedVariant.value],
|
|
664
664
|
sizeClasses[resolvedSize.value],
|
|
665
665
|
attrs.class
|
|
@@ -2967,7 +2967,7 @@ const _sfc_main$l = /* @__PURE__ */ Object.assign({
|
|
|
2967
2967
|
return variantClasses[props.variant] ? props.variant : "primary";
|
|
2968
2968
|
});
|
|
2969
2969
|
const linkClasses = computed(() => [
|
|
2970
|
-
"inline-flex h-9 min-w-[40px] shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md px-4 py-2 text-sm font-medium shadow-xs outline-none transition-all aria-invalid:border-red-500 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
2970
|
+
"inline-flex h-9 min-w-[40px] shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md px-4 py-2 text-sm font-medium shadow-xs outline-none transition-all aria-invalid:border-red-500 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
2971
2971
|
variantClasses[resolvedVariant.value],
|
|
2972
2972
|
attrs.class
|
|
2973
2973
|
]);
|
|
@@ -3678,28 +3678,29 @@ const _sfc_main$5 = {
|
|
|
3678
3678
|
};
|
|
3679
3679
|
}
|
|
3680
3680
|
};
|
|
3681
|
-
const _hoisted_1$4 = { class: "flex flex-col
|
|
3682
|
-
const _hoisted_2$3 = { class: "flex w-full lg:
|
|
3683
|
-
const _hoisted_3$3 = { class: "relative w-full" };
|
|
3681
|
+
const _hoisted_1$4 = { class: "flex flex-col items-start gap-4 lg:flex-row lg:flex-wrap lg:items-center lg:justify-between" };
|
|
3682
|
+
const _hoisted_2$3 = { class: "flex w-full min-w-0 flex-1 flex-col gap-3 lg:flex-row lg:items-center" };
|
|
3683
|
+
const _hoisted_3$3 = { class: "relative w-full lg:max-w-md" };
|
|
3684
3684
|
const _hoisted_4$2 = { class: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3" };
|
|
3685
3685
|
const _hoisted_5$2 = ["placeholder"];
|
|
3686
|
-
const _hoisted_6$2 = {
|
|
3686
|
+
const _hoisted_6$2 = { class: "min-w-0 flex-1" };
|
|
3687
|
+
const _hoisted_7$2 = {
|
|
3687
3688
|
key: 0,
|
|
3688
|
-
class: "flex
|
|
3689
|
+
class: "flex shrink-0 flex-col items-start gap-3 sm:flex-row sm:items-center lg:w-auto"
|
|
3689
3690
|
};
|
|
3690
|
-
const
|
|
3691
|
+
const _hoisted_8$2 = {
|
|
3691
3692
|
key: 0,
|
|
3692
3693
|
class: "flex items-center"
|
|
3693
3694
|
};
|
|
3694
|
-
const
|
|
3695
|
+
const _hoisted_9$2 = {
|
|
3695
3696
|
key: 1,
|
|
3696
3697
|
class: "flex items-center text-xs text-neutral-500 dark:text-neutral-400 sm:w-auto sm:text-sm lg:w-auto"
|
|
3697
3698
|
};
|
|
3698
|
-
const
|
|
3699
|
+
const _hoisted_10$2 = {
|
|
3699
3700
|
key: 0,
|
|
3700
3701
|
class: "ml-2"
|
|
3701
3702
|
};
|
|
3702
|
-
const
|
|
3703
|
+
const _hoisted_11$2 = { class: "font-medium text-neutral-700 dark:text-neutral-200" };
|
|
3703
3704
|
const _sfc_main$4 = {
|
|
3704
3705
|
__name: "TableSearch",
|
|
3705
3706
|
props: {
|
|
@@ -3770,21 +3771,25 @@ const _sfc_main$4 = {
|
|
|
3770
3771
|
}, null, 8, _hoisted_5$2), [
|
|
3771
3772
|
[vModelText, model.value]
|
|
3772
3773
|
])
|
|
3774
|
+
]),
|
|
3775
|
+
createElementVNode("div", _hoisted_6$2, [
|
|
3776
|
+
renderSlot(_ctx.$slots, "search-fields")
|
|
3773
3777
|
])
|
|
3774
3778
|
]),
|
|
3775
|
-
__props.showDeletedToggle || __props.count !== null ? (openBlock(), createElementBlock("div",
|
|
3776
|
-
__props.showDeletedToggle ? (openBlock(), createElementBlock("div",
|
|
3779
|
+
__props.showDeletedToggle || __props.count !== null || _ctx.$slots.controls ? (openBlock(), createElementBlock("div", _hoisted_7$2, [
|
|
3780
|
+
__props.showDeletedToggle ? (openBlock(), createElementBlock("div", _hoisted_8$2, [
|
|
3777
3781
|
createVNode(_sfc_main$y, {
|
|
3778
3782
|
modelValue: showDeletedModel.value,
|
|
3779
3783
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => showDeletedModel.value = $event),
|
|
3780
3784
|
label: __props.showDeletedLabel
|
|
3781
3785
|
}, null, 8, ["modelValue", "label"])
|
|
3782
3786
|
])) : createCommentVNode("", true),
|
|
3783
|
-
|
|
3787
|
+
renderSlot(_ctx.$slots, "controls"),
|
|
3788
|
+
__props.count !== null ? (openBlock(), createElementBlock("div", _hoisted_9$2, [
|
|
3784
3789
|
createElementVNode("span", null, toDisplayString(__props.count) + " " + toDisplayString(__props.countLabel), 1),
|
|
3785
|
-
model.value ? (openBlock(), createElementBlock("span",
|
|
3790
|
+
model.value ? (openBlock(), createElementBlock("span", _hoisted_10$2, [
|
|
3786
3791
|
createTextVNode(toDisplayString(__props.queryLabel) + " ", 1),
|
|
3787
|
-
createElementVNode("span",
|
|
3792
|
+
createElementVNode("span", _hoisted_11$2, ' "' + toDisplayString(model.value) + '" ', 1)
|
|
3788
3793
|
])) : createCommentVNode("", true)
|
|
3789
3794
|
])) : createCommentVNode("", true)
|
|
3790
3795
|
])) : createCommentVNode("", true)
|
|
@@ -4721,14 +4726,18 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
4721
4726
|
}
|
|
4722
4727
|
});
|
|
4723
4728
|
const _hoisted_1 = { class: "fixed top-4 right-4 z-50 space-y-2" };
|
|
4724
|
-
const _hoisted_2 = {
|
|
4729
|
+
const _hoisted_2 = {
|
|
4730
|
+
key: 0,
|
|
4731
|
+
class: "font-semibold"
|
|
4732
|
+
};
|
|
4725
4733
|
const _hoisted_3 = { class: "text-sm opacity-90" };
|
|
4726
4734
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4727
4735
|
__name: "ToastContainer",
|
|
4728
4736
|
props: {
|
|
4729
4737
|
maxToasts: {},
|
|
4730
4738
|
position: {},
|
|
4731
|
-
variant: {}
|
|
4739
|
+
variant: {},
|
|
4740
|
+
defaultTitle: {}
|
|
4732
4741
|
},
|
|
4733
4742
|
setup(__props, { expose: __expose }) {
|
|
4734
4743
|
const props = __props;
|
|
@@ -4742,7 +4751,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4742
4751
|
const id = Date.now().toString();
|
|
4743
4752
|
const toast = {
|
|
4744
4753
|
id,
|
|
4745
|
-
title: title
|
|
4754
|
+
title: title ?? (props.defaultTitle || void 0),
|
|
4746
4755
|
message,
|
|
4747
4756
|
variant,
|
|
4748
4757
|
duration
|
|
@@ -4760,9 +4769,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4760
4769
|
toasts.value.splice(index, 1);
|
|
4761
4770
|
}
|
|
4762
4771
|
};
|
|
4763
|
-
onMounted(() => {
|
|
4764
|
-
console.log("ToastContainer mounted");
|
|
4765
|
-
});
|
|
4766
4772
|
__expose({
|
|
4767
4773
|
addToast
|
|
4768
4774
|
});
|
|
@@ -4775,7 +4781,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4775
4781
|
onClose: ($event) => removeToast(toast.id)
|
|
4776
4782
|
}, {
|
|
4777
4783
|
default: withCtx(() => [
|
|
4778
|
-
|
|
4784
|
+
toast.title ? (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(toast.title), 1)) : createCommentVNode("", true),
|
|
4779
4785
|
createElementVNode("div", _hoisted_3, toDisplayString(toast.message), 1)
|
|
4780
4786
|
]),
|
|
4781
4787
|
_: 2
|