@kazee-ds/vue 0.5.0 → 0.5.1
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/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/dist/types/Toast.vue.d.ts +2 -0
- package/dist/types/ToastProvider.vue.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2736,6 +2736,7 @@ function useToast() {
|
|
|
2736
2736
|
var _hoisted_1$13 = [
|
|
2737
2737
|
"data-toast-id",
|
|
2738
2738
|
"data-tone",
|
|
2739
|
+
"data-has-close",
|
|
2739
2740
|
"data-loading",
|
|
2740
2741
|
"data-state",
|
|
2741
2742
|
"data-placement",
|
|
@@ -2794,6 +2795,10 @@ var Toast_default = /* @__PURE__ */ defineComponent({
|
|
|
2794
2795
|
type: Boolean,
|
|
2795
2796
|
default: false
|
|
2796
2797
|
},
|
|
2798
|
+
showCloseButton: {
|
|
2799
|
+
type: Boolean,
|
|
2800
|
+
default: false
|
|
2801
|
+
},
|
|
2797
2802
|
swipeThreshold: { default: 50 }
|
|
2798
2803
|
},
|
|
2799
2804
|
setup(__props) {
|
|
@@ -2901,6 +2906,7 @@ var Toast_default = /* @__PURE__ */ defineComponent({
|
|
|
2901
2906
|
class: "toast",
|
|
2902
2907
|
"data-toast-id": __props.entry.id,
|
|
2903
2908
|
"data-tone": __props.entry.tone,
|
|
2909
|
+
"data-has-close": __props.showCloseButton || void 0,
|
|
2904
2910
|
"data-loading": __props.entry.isLoading || void 0,
|
|
2905
2911
|
"data-state": __props.entry.state,
|
|
2906
2912
|
"data-placement": __props.placement,
|
|
@@ -2972,7 +2978,8 @@ var Toast_default = /* @__PURE__ */ defineComponent({
|
|
|
2972
2978
|
_: 1
|
|
2973
2979
|
}, 8, ["alt-text", "disabled"])) : createCommentVNode("", true)])) : createCommentVNode("", true)
|
|
2974
2980
|
])]),
|
|
2975
|
-
|
|
2981
|
+
__props.showCloseButton ? (openBlock(), createBlock(unref(ToastClose), {
|
|
2982
|
+
key: 0,
|
|
2976
2983
|
class: "toast__close",
|
|
2977
2984
|
"aria-label": __props.closeLabel,
|
|
2978
2985
|
disabled: closing.value,
|
|
@@ -2987,7 +2994,7 @@ var Toast_default = /* @__PURE__ */ defineComponent({
|
|
|
2987
2994
|
"stroke-linecap": "round"
|
|
2988
2995
|
}, [createElementVNode("path", { d: "m6 6 12 12M6 18 18 6" })], -1)])]),
|
|
2989
2996
|
_: 1
|
|
2990
|
-
}, 8, ["aria-label", "disabled"]),
|
|
2997
|
+
}, 8, ["aria-label", "disabled"])) : createCommentVNode("", true),
|
|
2991
2998
|
__props.showProgress && __props.entry.duration > 0 && !__props.entry.isLoading ? (openBlock(), createElementBlock("span", {
|
|
2992
2999
|
key: `${__props.entry.generation}-${__props.entry.remaining}-${__props.entry.paused}`,
|
|
2993
3000
|
class: "toast__progress",
|
|
@@ -3297,6 +3304,10 @@ var ToastProvider_default = /* @__PURE__ */ defineComponent({
|
|
|
3297
3304
|
type: Boolean,
|
|
3298
3305
|
default: false
|
|
3299
3306
|
},
|
|
3307
|
+
showCloseButton: {
|
|
3308
|
+
type: Boolean,
|
|
3309
|
+
default: false
|
|
3310
|
+
},
|
|
3300
3311
|
swipeThreshold: { default: 50 }
|
|
3301
3312
|
},
|
|
3302
3313
|
setup(__props) {
|
|
@@ -3518,6 +3529,7 @@ var ToastProvider_default = /* @__PURE__ */ defineComponent({
|
|
|
3518
3529
|
dir: __props.dir,
|
|
3519
3530
|
"close-label": __props.closeLabel,
|
|
3520
3531
|
"show-progress": __props.showProgress,
|
|
3532
|
+
"show-close-button": __props.showCloseButton,
|
|
3521
3533
|
"swipe-threshold": __props.swipeThreshold
|
|
3522
3534
|
}, createSlots({ _: 2 }, [_ctx.$slots.toast ? {
|
|
3523
3535
|
name: "default",
|
|
@@ -3534,6 +3546,7 @@ var ToastProvider_default = /* @__PURE__ */ defineComponent({
|
|
|
3534
3546
|
"dir",
|
|
3535
3547
|
"close-label",
|
|
3536
3548
|
"show-progress",
|
|
3549
|
+
"show-close-button",
|
|
3537
3550
|
"swipe-threshold"
|
|
3538
3551
|
]);
|
|
3539
3552
|
}), 128))
|