pxd 0.1.3 → 0.1.4
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/_internal/dismiss-container.vue +1 -1
- package/dist/components/_internal/mention-editor.d.vue.ts +1 -1
- package/dist/components/_internal/mention-editor.vue +2 -2
- package/dist/components/_internal/step-item.vue +1 -1
- package/dist/components/_internal/tree-node.d.vue.ts +3 -0
- package/dist/components/_internal/tree-node.vue +16 -7
- package/dist/components/active-graph/index.vue +1 -1
- package/dist/components/avatar/index.d.vue.ts +2 -2
- package/dist/components/avatar/index.vue +1 -1
- package/dist/components/backtop/index.vue +1 -1
- package/dist/components/badge/index.vue +3 -3
- package/dist/components/browser/index.vue +1 -1
- package/dist/components/bubble/index.vue +5 -5
- package/dist/components/button/index.d.vue.ts +1 -1
- package/dist/components/button/index.vue +6 -5
- package/dist/components/button/types.d.ts +1 -1
- package/dist/components/button-group/types.d.ts +1 -1
- package/dist/components/calendar/index.vue +5 -5
- package/dist/components/card/index.vue +2 -2
- package/dist/components/carousel/index.d.vue.ts +0 -1
- package/dist/components/carousel/index.vue +22 -17
- package/dist/components/carousel/types.d.ts +0 -1
- package/dist/components/checkbox/index.vue +1 -1
- package/dist/components/choicebox-item/index.vue +2 -2
- package/dist/components/code-block/index.d.vue.ts +22 -0
- package/dist/components/code-block/index.vue +166 -0
- package/dist/components/code-block/types.d.ts +14 -0
- package/dist/components/command-menu/index.d.vue.ts +1 -1
- package/dist/components/command-menu/index.vue +1 -2
- package/dist/components/config-provider/index.d.vue.ts +4 -0
- package/dist/components/confirm-popover/index.d.vue.ts +7 -8
- package/dist/components/confirm-popover/index.vue +36 -10
- package/dist/components/confirm-popover/types.d.ts +2 -0
- package/dist/components/copy-button/index.vue +1 -5
- package/dist/components/date-picker/index.vue +1 -1
- package/dist/components/description/index.vue +1 -1
- package/dist/components/drawer/index.d.vue.ts +3 -3
- package/dist/components/drawer/index.vue +9 -15
- package/dist/components/ellipsis-text/index.vue +1 -1
- package/dist/components/error/index.vue +2 -2
- package/dist/components/image-preview/index.d.vue.ts +38 -0
- package/dist/components/image-preview/index.vue +351 -0
- package/dist/components/image-preview/types.d.ts +18 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/input/index.vue +5 -4
- package/dist/components/kbd/index.vue +1 -1
- package/dist/components/list-group/index.vue +7 -1
- package/dist/components/list-item/index.vue +21 -8
- package/dist/components/marquee/index.vue +6 -2
- package/dist/components/mention/index.d.vue.ts +1 -1
- package/dist/components/message/index.vue +1 -1
- package/dist/components/modal/index.d.vue.ts +2 -2
- package/dist/components/modal/index.vue +9 -15
- package/dist/components/note/index.vue +1 -1
- package/dist/components/number-input/index.vue +6 -6
- package/dist/components/overlay/index.d.vue.ts +0 -1
- package/dist/components/overlay/index.vue +2 -8
- package/dist/components/overlay/types.d.ts +1 -2
- package/dist/components/pagination/index.vue +4 -4
- package/dist/components/pin-input/index.d.vue.ts +1 -1
- package/dist/components/pin-input/index.vue +5 -1
- package/dist/components/popover/index.vue +26 -21
- package/dist/components/popover/types.d.ts +1 -0
- package/dist/components/project-banner/index.vue +22 -9
- package/dist/components/questionnaire/index.vue +1 -1
- package/dist/components/resizable/index.d.vue.ts +5 -0
- package/dist/components/resizable/index.vue +256 -107
- package/dist/components/resizable/types.d.ts +6 -0
- package/dist/components/select/index.vue +4 -2
- package/dist/components/skeleton/index.d.vue.ts +1 -1
- package/dist/components/swipe-cell/index.vue +1 -1
- package/dist/components/switch/index.vue +1 -1
- package/dist/components/tabs/index.vue +1 -1
- package/dist/components/teleport/index.vue +20 -22
- package/dist/components/textarea/index.vue +1 -0
- package/dist/components/time-picker/index.vue +4 -4
- package/dist/components/toc/index.vue +1 -1
- package/dist/components/todo-list/index.d.vue.ts +1 -1
- package/dist/components/toggle/index.vue +2 -2
- package/dist/components/toggle-button/index.vue +11 -5
- package/dist/components/toggle-button/types.d.ts +3 -2
- package/dist/components/toggle-button-group/index.vue +1 -0
- package/dist/components/toggle-button-group/types.d.ts +2 -2
- package/dist/components/tour/index.vue +3 -3
- package/dist/components/tree/index.d.vue.ts +18 -15
- package/dist/components/tree/index.vue +102 -77
- package/dist/components/tree/types.d.ts +4 -0
- package/dist/composables/_internal/use-code-highlight.d.ts +12 -0
- package/dist/composables/_internal/use-code-highlight.js +47 -0
- package/dist/composables/_internal/use-lock-scroll.js +5 -22
- package/dist/composables/_internal/use-overlay-manager.d.ts +0 -1
- package/dist/composables/_internal/use-overlay-manager.js +2 -18
- package/dist/composables/_internal/use-popover-responsive.js +9 -12
- package/dist/composables/_internal/use-swipe-gesture.d.ts +1 -1
- package/dist/composables/_internal/use-swipe-gesture.js +5 -4
- package/dist/composables/_internal/use-tailwind-variant.js +1 -1
- package/dist/composables/use-media-query.d.ts +3 -1
- package/dist/composables/use-media-query.js +33 -51
- package/dist/composables/use-outside-click.d.ts +2 -1
- package/dist/composables/use-outside-click.js +3 -7
- package/dist/composables/use-repeat-action.d.ts +1 -1
- package/dist/composables/use-repeat-action.js +3 -3
- package/dist/constants/size.d.ts +1 -0
- package/dist/constants/size.js +7 -6
- package/dist/constants/tooltip-variants.d.ts +1 -1
- package/dist/constants/tooltip-variants.js +1 -1
- package/dist/locales/en-us.d.ts +4 -0
- package/dist/locales/en-us.js +4 -0
- package/dist/locales/zh-cn.d.ts +4 -0
- package/dist/locales/zh-cn.js +4 -0
- package/dist/styles/styles.css +1 -1
- package/dist/styles/tw.css +12 -7
- package/dist/utils/_internal/cn-tables.d.ts +27 -0
- package/dist/utils/_internal/cn-tables.js +131 -0
- package/dist/utils/cn.d.ts +1 -0
- package/dist/utils/cn.js +3 -0
- package/package.json +6 -4
- package/volar.d.ts +2 -0
|
@@ -12,20 +12,12 @@ function lockElementScroll(el) {
|
|
|
12
12
|
return false;
|
|
13
13
|
}
|
|
14
14
|
const { y: yScrollbar } = hasScrollbar(el);
|
|
15
|
-
const
|
|
15
|
+
const classes = ["scrollbar-disabled"];
|
|
16
16
|
if (yScrollbar && yScrollable) {
|
|
17
|
-
|
|
17
|
+
classes.push("scrollbar-gutter-stable!");
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
lockedValue,
|
|
22
|
-
prevValue: el.style.getPropertyValue(property),
|
|
23
|
-
prevPriority: el.style.getPropertyPriority(property)
|
|
24
|
-
}));
|
|
25
|
-
for (const { property, lockedValue } of lockedStyles) {
|
|
26
|
-
el.style.setProperty(property, lockedValue, "important");
|
|
27
|
-
}
|
|
28
|
-
elementLocks.set(el, { count: 1, styles: lockedStyles });
|
|
19
|
+
el.classList.add(...classes);
|
|
20
|
+
elementLocks.set(el, { count: 1, classes });
|
|
29
21
|
return true;
|
|
30
22
|
}
|
|
31
23
|
function unlockElementScroll(el) {
|
|
@@ -33,16 +25,7 @@ function unlockElementScroll(el) {
|
|
|
33
25
|
if (!lock || --lock.count > 0) {
|
|
34
26
|
return;
|
|
35
27
|
}
|
|
36
|
-
|
|
37
|
-
if (el.style.getPropertyValue(property) !== lockedValue) {
|
|
38
|
-
continue;
|
|
39
|
-
}
|
|
40
|
-
if (prevValue) {
|
|
41
|
-
el.style.setProperty(property, prevValue, prevPriority);
|
|
42
|
-
} else {
|
|
43
|
-
el.style.removeProperty(property);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
28
|
+
el.classList.remove(...lock.classes);
|
|
46
29
|
elementLocks.delete(el);
|
|
47
30
|
}
|
|
48
31
|
export function useLockScroll(target, options = {}) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { onScopeDispose
|
|
1
|
+
import { onScopeDispose } from "vue";
|
|
2
2
|
import {
|
|
3
3
|
cachedOff,
|
|
4
4
|
cachedOn,
|
|
@@ -75,7 +75,7 @@ function removeKeydownListener() {
|
|
|
75
75
|
isKeydownListening = false;
|
|
76
76
|
}
|
|
77
77
|
export function useOverlayManager(options) {
|
|
78
|
-
const {
|
|
78
|
+
const { lockScrollOnVisible, lockScroll, unlockScroll, onPressEscape, zIndex } = options;
|
|
79
79
|
let isLockedScroll = false;
|
|
80
80
|
const overlayId = Symbol("pxd-overlay-id");
|
|
81
81
|
function isTopOverlay(entry) {
|
|
@@ -83,9 +83,6 @@ export function useOverlayManager(options) {
|
|
|
83
83
|
return entry?.id === overlayId;
|
|
84
84
|
}
|
|
85
85
|
function registerOverlay() {
|
|
86
|
-
if (!toValue(enabled)) {
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
86
|
const shouldLockScroll = toValue(lockScrollOnVisible);
|
|
90
87
|
if (shouldLockScroll && !isLockedScroll) {
|
|
91
88
|
lockScroll();
|
|
@@ -115,19 +112,6 @@ export function useOverlayManager(options) {
|
|
|
115
112
|
}
|
|
116
113
|
removeKeydownListener();
|
|
117
114
|
}
|
|
118
|
-
watch(
|
|
119
|
-
() => toValue(enabled),
|
|
120
|
-
(isEnabled, wasEnabled) => {
|
|
121
|
-
if (isEnabled === wasEnabled) {
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
if (isEnabled) {
|
|
125
|
-
registerOverlay();
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
unregisterOverlay();
|
|
129
|
-
}
|
|
130
|
-
);
|
|
131
115
|
onScopeDispose(() => {
|
|
132
116
|
unregisterOverlay();
|
|
133
117
|
});
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import { computed } from "vue";
|
|
2
2
|
import { PRESET_MEDIA_QUERIES, useMediaQuery } from "../use-media-query.js";
|
|
3
|
+
const ADAPTIVE_CLASSES = {
|
|
4
|
+
content: "bg-background-100 shadow-border-menu w-full rounded-tl-xl rounded-tr-xl",
|
|
5
|
+
wrapper: "fixed w-full h-full items-end pointer-events-none"
|
|
6
|
+
};
|
|
7
|
+
const DEFAULT_CLASSES = {
|
|
8
|
+
content: "bg-background-100 shadow-border-menu rounded-xl",
|
|
9
|
+
wrapper: ""
|
|
10
|
+
};
|
|
3
11
|
export function usePopoverResponsive() {
|
|
4
12
|
const isAdaptive = useMediaQuery(PRESET_MEDIA_QUERIES.IS_XS);
|
|
5
|
-
const responsiveClasses = computed(() =>
|
|
6
|
-
if (isAdaptive.value) {
|
|
7
|
-
return {
|
|
8
|
-
content: `bg-background-100 shadow-border-menu w-full rounded-tl-xl rounded-tr-xl`,
|
|
9
|
-
wrapper: "fixed w-full h-full items-end pointer-events-none"
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
return {
|
|
13
|
-
content: `bg-background-100 shadow-border-menu rounded-xl`,
|
|
14
|
-
wrapper: ""
|
|
15
|
-
};
|
|
16
|
-
});
|
|
13
|
+
const responsiveClasses = computed(() => isAdaptive.value ? ADAPTIVE_CLASSES : DEFAULT_CLASSES);
|
|
17
14
|
return {
|
|
18
15
|
isAdaptive,
|
|
19
16
|
responsiveClasses
|
|
@@ -47,7 +47,7 @@ export interface SwipeTapState {
|
|
|
47
47
|
vetoed: boolean;
|
|
48
48
|
}
|
|
49
49
|
export interface SwipeGestureOptions {
|
|
50
|
-
|
|
50
|
+
enabled?: MaybeRefOrGetter<boolean>;
|
|
51
51
|
/** CSS selector for the drag handle element within the container. */
|
|
52
52
|
handleSelector?: string;
|
|
53
53
|
/** Swipe axis. Reactive; accepts a ref or getter. */
|
|
@@ -6,6 +6,7 @@ function isThenable(value) {
|
|
|
6
6
|
}
|
|
7
7
|
export function useSwipeGesture(containerRef, options = {}) {
|
|
8
8
|
const {
|
|
9
|
+
enabled = true,
|
|
9
10
|
handleSelector,
|
|
10
11
|
axisLockThreshold = 0,
|
|
11
12
|
axisLockRatio = 1,
|
|
@@ -190,14 +191,14 @@ export function useSwipeGesture(containerRef, options = {}) {
|
|
|
190
191
|
unbind();
|
|
191
192
|
}
|
|
192
193
|
const unwatch = watch(
|
|
193
|
-
() => [getElement(containerRef), toValue(
|
|
194
|
-
async ([el,
|
|
195
|
-
if (!el ||
|
|
194
|
+
() => [getElement(containerRef), toValue(enabled), toValue(options.axis)],
|
|
195
|
+
async ([el, active]) => {
|
|
196
|
+
if (!el || !active) {
|
|
196
197
|
unbind();
|
|
197
198
|
return;
|
|
198
199
|
}
|
|
199
200
|
await nextTick();
|
|
200
|
-
if (stopped || getElement(containerRef) !== el || toValue(
|
|
201
|
+
if (stopped || getElement(containerRef) !== el || !toValue(enabled)) {
|
|
201
202
|
return;
|
|
202
203
|
}
|
|
203
204
|
bind();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cn } from "cn";
|
|
2
1
|
import { computed, useAttrs } from "vue";
|
|
2
|
+
import { cn } from "../../utils/cn.js";
|
|
3
3
|
function createTailwindVariantResolver(config) {
|
|
4
4
|
const compoundVariants = config.compoundVariants?.map(({ class: classes, ...conditions }) => ({
|
|
5
5
|
classes,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Ref } from 'vue';
|
|
2
|
+
type QueryCallback = (e: MediaQueryList) => void;
|
|
2
3
|
export declare const PRESET_MEDIA_QUERIES: {
|
|
3
4
|
COLOR_SCHEME_DARK: string;
|
|
4
5
|
COLOR_SCHEME_LIGHT: string;
|
|
@@ -10,4 +11,5 @@ export declare const PRESET_MEDIA_QUERIES: {
|
|
|
10
11
|
XL_UP: string;
|
|
11
12
|
XXL_UP: string;
|
|
12
13
|
};
|
|
13
|
-
export declare function useMediaQuery(condition: string, callback?:
|
|
14
|
+
export declare function useMediaQuery(condition: string, callback?: QueryCallback): Ref<boolean>;
|
|
15
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { onScopeDispose, shallowRef } from "vue";
|
|
2
2
|
import { cachedOn } from "../utils/event.js";
|
|
3
3
|
import { isServer } from "../utils/is.js";
|
|
4
4
|
export const PRESET_MEDIA_QUERIES = {
|
|
@@ -17,60 +17,42 @@ export const PRESET_MEDIA_QUERIES = {
|
|
|
17
17
|
XXL_UP: "(width >= 96rem)"
|
|
18
18
|
};
|
|
19
19
|
const CACHED_QUERIES = {};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
let cached = CACHED_QUERIES[condition];
|
|
32
|
-
if (cached) {
|
|
33
|
-
cached.count++;
|
|
34
|
-
} else {
|
|
35
|
-
cached = CACHED_QUERIES[condition] = {
|
|
36
|
-
count: 1,
|
|
37
|
-
query: window.matchMedia(condition),
|
|
38
|
-
cleanups: []
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
const entry = cached;
|
|
42
|
-
const handler = () => {
|
|
43
|
-
callback?.(entry.query);
|
|
44
|
-
trigger();
|
|
45
|
-
};
|
|
46
|
-
unbindChange = cachedOn(entry.query, "change", handler, { passive: true });
|
|
47
|
-
entry.cleanups.push(unbindChange);
|
|
48
|
-
mediaQuery = entry;
|
|
49
|
-
initialized = true;
|
|
20
|
+
function createEntry(condition) {
|
|
21
|
+
const query = window.matchMedia(condition);
|
|
22
|
+
const matches = shallowRef(query.matches);
|
|
23
|
+
const callbacks = /* @__PURE__ */ new Set();
|
|
24
|
+
const unbind = cachedOn(
|
|
25
|
+
query,
|
|
26
|
+
"change",
|
|
27
|
+
() => {
|
|
28
|
+
matches.value = query.matches;
|
|
29
|
+
for (const callback of callbacks) {
|
|
30
|
+
callback(query);
|
|
50
31
|
}
|
|
51
|
-
return mediaQuery?.query.matches ?? false;
|
|
52
32
|
},
|
|
53
|
-
|
|
54
|
-
|
|
33
|
+
{ passive: true }
|
|
34
|
+
);
|
|
35
|
+
return { count: 0, matches, query, callbacks, unbind };
|
|
36
|
+
}
|
|
37
|
+
export function useMediaQuery(condition, callback) {
|
|
38
|
+
if (isServer()) {
|
|
39
|
+
return shallowRef(false);
|
|
40
|
+
}
|
|
41
|
+
const entry = CACHED_QUERIES[condition] ??= createEntry(condition);
|
|
42
|
+
const handler = callback ? () => callback(entry.query) : null;
|
|
43
|
+
entry.count++;
|
|
44
|
+
if (handler) {
|
|
45
|
+
entry.callbacks.add(handler);
|
|
46
|
+
}
|
|
47
|
+
onScopeDispose(() => {
|
|
48
|
+
if (handler) {
|
|
49
|
+
entry.callbacks.delete(handler);
|
|
55
50
|
}
|
|
56
|
-
|
|
57
|
-
function stop() {
|
|
58
|
-
if (!mediaQuery) {
|
|
51
|
+
if (--entry.count > 0) {
|
|
59
52
|
return;
|
|
60
53
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
unbindChange = void 0;
|
|
64
|
-
entry.count--;
|
|
65
|
-
if (entry.count <= 0) {
|
|
66
|
-
entry.cleanups.forEach((unbind) => unbind());
|
|
67
|
-
entry.cleanups = [];
|
|
68
|
-
delete CACHED_QUERIES[condition];
|
|
69
|
-
}
|
|
70
|
-
mediaQuery = void 0;
|
|
71
|
-
}
|
|
72
|
-
onScopeDispose(() => {
|
|
73
|
-
stop();
|
|
54
|
+
entry.unbind();
|
|
55
|
+
delete CACHED_QUERIES[condition];
|
|
74
56
|
});
|
|
75
|
-
return matches;
|
|
57
|
+
return entry.matches;
|
|
76
58
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { MaybeElementRef } from '../types/shared/utils';
|
|
2
|
+
import type { MaybeRefOrGetter } from 'vue';
|
|
2
3
|
interface Options<E extends Event = PointerEvent> {
|
|
3
4
|
allowList?: MaybeElementRef<HTMLElement>[];
|
|
4
5
|
eventName?: string;
|
|
5
6
|
listenerOptions?: AddEventListenerOptions;
|
|
6
|
-
enabled?:
|
|
7
|
+
enabled?: MaybeRefOrGetter<boolean>;
|
|
7
8
|
onTrigger?: (ev: E) => void;
|
|
8
9
|
}
|
|
9
10
|
export declare function useOutsideClick<E extends Event = PointerEvent>(container: MaybeElementRef<HTMLElement>, options?: Options<E>): {
|
|
@@ -4,10 +4,6 @@ import { toValue } from "../utils/helper.js";
|
|
|
4
4
|
import { isServer } from "../utils/is.js";
|
|
5
5
|
export function useOutsideClick(container, options = {}) {
|
|
6
6
|
function onClick(ev) {
|
|
7
|
-
const { enabled } = options;
|
|
8
|
-
if (typeof enabled === "function" && !enabled(ev)) {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
7
|
const { onTrigger, allowList = [container] } = options;
|
|
12
8
|
const currentTarget = ev.target;
|
|
13
9
|
const isInside = allowList.some((el) => toValue(el)?.contains(currentTarget));
|
|
@@ -26,10 +22,10 @@ export function useOutsideClick(container, options = {}) {
|
|
|
26
22
|
cachedOff(target, event, onClick, listenerOptions);
|
|
27
23
|
}
|
|
28
24
|
const unwatch = watch(
|
|
29
|
-
() => toValue(container),
|
|
30
|
-
(
|
|
25
|
+
() => Boolean(toValue(container)) && toValue(options.enabled ?? true),
|
|
26
|
+
(active) => {
|
|
31
27
|
unbind();
|
|
32
|
-
if (
|
|
28
|
+
if (active) {
|
|
33
29
|
bind();
|
|
34
30
|
}
|
|
35
31
|
},
|
|
@@ -2,7 +2,7 @@ import type { Callback } from '../types/shared/utils';
|
|
|
2
2
|
import type { MaybeRefOrGetter } from 'vue';
|
|
3
3
|
interface Options {
|
|
4
4
|
action: Callback;
|
|
5
|
-
|
|
5
|
+
enabled?: MaybeRefOrGetter<boolean>;
|
|
6
6
|
finalInterval?: number;
|
|
7
7
|
initialInterval?: number;
|
|
8
8
|
accelerationDuration?: number;
|
|
@@ -4,7 +4,7 @@ import { toValue } from "../utils/helper.js";
|
|
|
4
4
|
export function useRepeatAction(actionOrOptions) {
|
|
5
5
|
const {
|
|
6
6
|
action,
|
|
7
|
-
|
|
7
|
+
enabled = true,
|
|
8
8
|
finalInterval = 30,
|
|
9
9
|
initialInterval = 500,
|
|
10
10
|
accelerationDuration = 1e3
|
|
@@ -21,7 +21,7 @@ export function useRepeatAction(actionOrOptions) {
|
|
|
21
21
|
return initialInterval - (initialInterval - finalInterval) * progress;
|
|
22
22
|
}
|
|
23
23
|
function step() {
|
|
24
|
-
if (!running || toValue(
|
|
24
|
+
if (!running || !toValue(enabled)) {
|
|
25
25
|
stop();
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
@@ -43,7 +43,7 @@ export function useRepeatAction(actionOrOptions) {
|
|
|
43
43
|
off(document, "pointercancel", stop);
|
|
44
44
|
}
|
|
45
45
|
function start() {
|
|
46
|
-
if (running || toValue(
|
|
46
|
+
if (running || !toValue(enabled)) {
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
49
|
running = true;
|
package/dist/constants/size.d.ts
CHANGED
package/dist/constants/size.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
export const BASIC_HEIGHTS = {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
xxs: "h-6",
|
|
3
|
+
xs: "h-7",
|
|
4
|
+
sm: "h-8",
|
|
4
5
|
md: "h-9",
|
|
5
|
-
lg: "h-
|
|
6
|
+
lg: "h-10"
|
|
6
7
|
};
|
|
7
8
|
export const BASIC_MIN_HEIGHTS = {
|
|
8
|
-
xs: "min-h-
|
|
9
|
-
sm: "min-h-
|
|
9
|
+
xs: "min-h-7",
|
|
10
|
+
sm: "min-h-8",
|
|
10
11
|
md: "min-h-9",
|
|
11
|
-
lg: "min-h-
|
|
12
|
+
lg: "min-h-10"
|
|
12
13
|
};
|
|
@@ -24,5 +24,5 @@ export declare const TOOLTIP_VARIANTS: {
|
|
|
24
24
|
base: string;
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
-
export declare const TOOLTIP_CONTENT_CLASS = "px-3 py-2 rounded-md text-
|
|
27
|
+
export declare const TOOLTIP_CONTENT_CLASS = "px-3 py-2 rounded-md text-13px break-words whitespace-pre-line bg-(--popover-arrow-color) motion-safe:transition-colors";
|
|
28
28
|
export type TooltipVariant = keyof typeof TOOLTIP_VARIANTS;
|
|
@@ -24,4 +24,4 @@ export const TOOLTIP_VARIANTS = {
|
|
|
24
24
|
base: "text-gray-100 dark:text-gray-1000"
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
|
-
export const TOOLTIP_CONTENT_CLASS = "px-3 py-2 rounded-md text-
|
|
27
|
+
export const TOOLTIP_CONTENT_CLASS = "px-3 py-2 rounded-md text-13px break-words whitespace-pre-line bg-(--popover-arrow-color) motion-safe:transition-colors";
|
package/dist/locales/en-us.d.ts
CHANGED
package/dist/locales/en-us.js
CHANGED
package/dist/locales/zh-cn.d.ts
CHANGED
package/dist/locales/zh-cn.js
CHANGED