@1337exp/taoui 4.0.0 → 4.0.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/CHANGELOG.md +4 -0
- package/dist/index.cjs +3 -33
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +4 -34
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createElementBlock, normalizeStyle, normalizeClass, unref, createCommentVNode, toDisplayString, createElementVNode, renderSlot, getCurrentInstance, camelize, inject, useId, ref, shallowRef, watch, createTextVNode, useSlots, onBeforeUnmount, createBlock, Teleport, createVNode, Transition, withCtx, nextTick, Fragment, renderList, onMounted, mergeProps, createSlots, normalizeProps, guardReactiveProps, provide, resolveDynamicComponent, withModifiers, useCssVars,
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, normalizeStyle, normalizeClass, unref, createCommentVNode, toDisplayString, createElementVNode, renderSlot, getCurrentInstance, camelize, inject, useId, ref, shallowRef, watch, createTextVNode, useSlots, onBeforeUnmount, createBlock, Teleport, createVNode, Transition, withCtx, nextTick, Fragment, renderList, onMounted, mergeProps, createSlots, normalizeProps, guardReactiveProps, provide, resolveDynamicComponent, withModifiers, useCssVars, onBeforeMount, reactive, withKeys, TransitionGroup, onUpdated, createApp } from "vue";
|
|
2
2
|
const sizes = ["small", "medium", "large"];
|
|
3
3
|
function sizeClass(size) {
|
|
4
4
|
return size ? `tao-size-${size}` : void 0;
|
|
@@ -3831,11 +3831,10 @@ const TaoTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "dat
|
|
|
3831
3831
|
const _hoisted_1$w = ["tabindex", "aria-label"];
|
|
3832
3832
|
const _hoisted_2$t = { class: "tao-scroll-top__content" };
|
|
3833
3833
|
const _hoisted_3$p = {
|
|
3834
|
-
key:
|
|
3834
|
+
key: 0,
|
|
3835
3835
|
class: "tao-scroll-top__text",
|
|
3836
3836
|
"aria-hidden": "true"
|
|
3837
3837
|
};
|
|
3838
|
-
const RIPPLE_DURATION = 750;
|
|
3839
3838
|
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
3840
3839
|
...{ name: "TaoScrollTop", inheritAttrs: false },
|
|
3841
3840
|
__name: "TaoScrollTop",
|
|
@@ -3874,14 +3873,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
3874
3873
|
const captionSide = computed(() => props.labelSide ?? (props.side === "right" ? "left" : "right"));
|
|
3875
3874
|
const caption = computed(() => props.label ?? (isText.value ? l10n.value.ariaLabel : void 0));
|
|
3876
3875
|
const accessibleName = computed(() => props.ariaLabel || props.label || l10n.value.ariaLabel);
|
|
3877
|
-
const rippleStyle = reactive({
|
|
3878
|
-
top: fmtProp(-1 * props.size),
|
|
3879
|
-
left: fmtProp(-1 * props.size),
|
|
3880
|
-
width: "200%",
|
|
3881
|
-
height: "200%"
|
|
3882
|
-
});
|
|
3883
3876
|
const isActive = ref(false);
|
|
3884
|
-
const isRippleActive = ref(false);
|
|
3885
3877
|
function getScrollValue() {
|
|
3886
3878
|
if (typeof window.pageYOffset !== "undefined") {
|
|
3887
3879
|
return window.pageYOffset;
|
|
@@ -3915,23 +3907,6 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
3915
3907
|
prevPos = pY;
|
|
3916
3908
|
isActive.value = tooFar && activeBack;
|
|
3917
3909
|
}
|
|
3918
|
-
function onClick(e) {
|
|
3919
|
-
if (!isText.value && !isRippleActive.value) {
|
|
3920
|
-
const elTarget = e.currentTarget;
|
|
3921
|
-
if (elTarget) {
|
|
3922
|
-
const rect = elTarget.getBoundingClientRect();
|
|
3923
|
-
const top = e.clientY - rect.top;
|
|
3924
|
-
const left = e.clientX - rect.left;
|
|
3925
|
-
rippleStyle.top = fmtProp(top - props.size);
|
|
3926
|
-
rippleStyle.left = fmtProp(left - props.size);
|
|
3927
|
-
}
|
|
3928
|
-
isRippleActive.value = true;
|
|
3929
|
-
setTimeout(() => {
|
|
3930
|
-
isRippleActive.value = false;
|
|
3931
|
-
}, RIPPLE_DURATION);
|
|
3932
|
-
}
|
|
3933
|
-
goToTop();
|
|
3934
|
-
}
|
|
3935
3910
|
onBeforeMount(() => {
|
|
3936
3911
|
window.addEventListener("scroll", onScroll);
|
|
3937
3912
|
});
|
|
@@ -3960,14 +3935,9 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
3960
3935
|
isText.value && `tao-scroll-top--caption-${captionSide.value}`
|
|
3961
3936
|
]],
|
|
3962
3937
|
"aria-label": accessibleName.value,
|
|
3963
|
-
onClick: withModifiers(
|
|
3938
|
+
onClick: withModifiers(goToTop, ["prevent"])
|
|
3964
3939
|
}), [
|
|
3965
3940
|
createElementVNode("span", _hoisted_2$t, [
|
|
3966
|
-
!isText.value ? (openBlock(), createElementBlock("span", {
|
|
3967
|
-
key: 0,
|
|
3968
|
-
class: normalizeClass([{ "tao-scroll-top__ripple--active": isRippleActive.value }, "tao-scroll-top__ripple"]),
|
|
3969
|
-
style: normalizeStyle(rippleStyle)
|
|
3970
|
-
}, null, 6)) : createCommentVNode("", true),
|
|
3971
3941
|
isText.value && caption.value ? (openBlock(), createElementBlock("span", _hoisted_3$p, toDisplayString(caption.value), 1)) : createCommentVNode("", true),
|
|
3972
3942
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
3973
3943
|
_cache[0] || (_cache[0] = createElementVNode("svg", {
|
|
@@ -3994,7 +3964,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
3994
3964
|
};
|
|
3995
3965
|
}
|
|
3996
3966
|
});
|
|
3997
|
-
const TaoScrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-
|
|
3967
|
+
const TaoScrollTop = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["__scopeId", "data-v-7bcb0179"]]);
|
|
3998
3968
|
const _hoisted_1$v = { class: "tao-progress" };
|
|
3999
3969
|
const _hoisted_2$s = {
|
|
4000
3970
|
key: 0,
|