pxd 0.1.2 → 0.1.3
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/calendar-day.vue +19 -19
- package/dist/components/_internal/dismiss-container.d.vue.ts +1 -1
- package/dist/components/_internal/dismiss-container.vue +19 -19
- package/dist/components/_internal/loading-mask.vue +9 -1
- package/dist/components/_internal/mention-editor.d.vue.ts +1 -1
- package/dist/components/_internal/mention-editor.vue +1 -1
- package/dist/components/_internal/popover-arrow.d.vue.ts +1 -1
- package/dist/components/_internal/popover-arrow.vue +1 -1
- package/dist/components/{steps → _internal}/step-item.d.vue.ts +1 -1
- package/dist/components/{steps → _internal}/step-item.vue +1 -1
- package/dist/components/_internal/tree-node.d.vue.ts +20 -20
- package/dist/components/_internal/tree-node.vue +53 -45
- package/dist/components/active-graph/index.d.vue.ts +2 -2
- package/dist/components/approval-card/index.d.vue.ts +1 -1
- package/dist/components/approval-card/index.vue +34 -17
- package/dist/components/approval-card/types.d.ts +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.d.vue.ts +3 -3
- package/dist/components/backtop/index.vue +17 -17
- package/dist/components/backtop/types.d.ts +1 -1
- package/dist/components/badge/index.d.vue.ts +3 -3
- package/dist/components/badge/index.vue +43 -43
- package/dist/components/badge/types.d.ts +1 -1
- package/dist/components/book/types.d.ts +1 -1
- package/dist/components/border-beam/index.vue +1 -1
- package/dist/components/border-beam/types.d.ts +1 -1
- package/dist/components/bubble/index.vue +1 -1
- package/dist/components/bubble-group/index.d.vue.ts +4 -4
- package/dist/components/button/index.d.vue.ts +5 -5
- package/dist/components/button/index.vue +13 -13
- package/dist/components/button/types.d.ts +1 -1
- package/dist/components/button-group/types.d.ts +1 -1
- package/dist/components/calendar/index.d.vue.ts +2 -2
- package/dist/components/calendar/index.vue +5 -5
- package/dist/components/calendar/types.d.ts +1 -1
- package/dist/components/card/types.d.ts +1 -1
- package/dist/components/carousel/index.d.vue.ts +7 -7
- package/dist/components/carousel/index.vue +1 -1
- package/dist/components/carousel/types.d.ts +1 -1
- package/dist/components/checkbox/index.vue +1 -1
- package/dist/components/checkbox/types.d.ts +1 -1
- package/dist/components/checkbox-group/index.d.vue.ts +2 -2
- package/dist/components/checkbox-group/types.d.ts +1 -1
- package/dist/components/chip/index.d.vue.ts +1 -1
- package/dist/components/chip/types.d.ts +1 -1
- package/dist/components/choicebox/index.d.vue.ts +3 -3
- package/dist/components/choicebox/types.d.ts +1 -1
- package/dist/components/choicebox-item/index.vue +8 -8
- package/dist/components/choicebox-item/types.d.ts +1 -1
- package/dist/components/collapse/index.vue +2 -2
- package/dist/components/collapse-group/index.vue +1 -1
- package/dist/components/collapse-group/types.d.ts +1 -1
- package/dist/components/command-menu/index.d.vue.ts +5 -5
- package/dist/components/command-menu/index.vue +10 -3
- package/dist/components/config-provider/index.d.vue.ts +40 -5
- package/dist/components/config-provider/types.d.ts +2 -1
- package/dist/components/confirm-popover/index.d.vue.ts +39 -0
- package/dist/components/confirm-popover/index.vue +177 -0
- package/dist/components/confirm-popover/types.d.ts +23 -0
- package/dist/components/copy-button/index.d.vue.ts +2 -6
- package/dist/components/copy-button/index.vue +4 -6
- package/dist/components/dash-line/index.d.vue.ts +1 -1
- package/dist/components/dash-line/index.vue +8 -8
- package/dist/components/dash-line/types.d.ts +1 -1
- package/dist/components/date-picker/index.d.vue.ts +1 -1
- package/dist/components/date-picker/index.vue +3 -3
- package/dist/components/date-picker/types.d.ts +1 -1
- package/dist/components/drawer/index.d.vue.ts +7 -7
- package/dist/components/drawer/index.vue +30 -15
- package/dist/components/drawer/types.d.ts +2 -2
- package/dist/components/effort-slider/index.vue +12 -18
- package/dist/components/effort-slider/types.d.ts +1 -1
- package/dist/components/ellipsis-text/index.d.vue.ts +2 -2
- package/dist/components/ellipsis-text/index.vue +75 -75
- package/dist/components/error/types.d.ts +1 -1
- package/dist/components/fader/index.vue +2 -2
- package/dist/components/fader/types.d.ts +1 -1
- package/dist/components/gauge/index.vue +2 -2
- package/dist/components/gauge/types.d.ts +1 -1
- package/dist/components/grid/types.d.ts +1 -1
- package/dist/components/grid-item/types.d.ts +1 -1
- package/dist/components/hint/index.d.vue.ts +32 -0
- package/dist/components/hint/index.vue +239 -0
- package/dist/components/hint/types.d.ts +17 -0
- package/dist/components/hold-button/index.d.vue.ts +4 -4
- package/dist/components/hold-button/index.vue +10 -10
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +4 -0
- package/dist/components/input/index.d.vue.ts +1 -1
- package/dist/components/input/index.vue +14 -7
- package/dist/components/input/types.d.ts +1 -1
- package/dist/components/intersection-observer/index.vue +3 -3
- package/dist/components/kbd/index.vue +2 -2
- package/dist/components/kbd/types.d.ts +1 -1
- package/dist/components/link-button/index.d.vue.ts +5 -5
- package/dist/components/list/index.d.vue.ts +4 -4
- package/dist/components/list/index.vue +126 -47
- package/dist/components/list/types.d.ts +1 -1
- package/dist/components/list-group/types.d.ts +1 -1
- package/dist/components/list-item/index.d.vue.ts +2 -2
- package/dist/components/list-item/index.vue +26 -8
- package/dist/components/loading-bar/index.vue +5 -5
- package/dist/components/marching-ants/index.d.vue.ts +2 -2
- package/dist/components/marching-ants/index.vue +56 -56
- package/dist/components/marching-ants/types.d.ts +1 -1
- package/dist/components/marquee/index.d.vue.ts +6 -6
- package/dist/components/marquee/index.vue +16 -16
- package/dist/components/marquee/types.d.ts +1 -1
- package/dist/components/material/index.d.vue.ts +3 -3
- package/dist/components/mention/index.d.vue.ts +5 -5
- package/dist/components/mention/index.vue +68 -68
- package/dist/components/menu/index.d.vue.ts +4 -4
- package/dist/components/menu/index.vue +10 -10
- package/dist/components/menu/types.d.ts +1 -1
- package/dist/components/message/index.d.vue.ts +1 -1
- package/dist/components/message/index.vue +19 -25
- package/dist/components/message/types.d.ts +1 -1
- package/dist/components/message-item/index.vue +2 -6
- package/dist/components/modal/index.d.vue.ts +7 -7
- package/dist/components/modal/index.vue +26 -11
- package/dist/components/modal/types.d.ts +2 -2
- package/dist/components/noise-background/types.d.ts +1 -1
- package/dist/components/note/index.vue +6 -2
- package/dist/components/note/types.d.ts +2 -1
- package/dist/components/number-input/index.d.vue.ts +11 -6
- package/dist/components/number-input/index.vue +57 -16
- package/dist/components/number-input/types.d.ts +2 -1
- package/dist/components/overlay/index.d.vue.ts +2 -3
- package/dist/components/overlay/index.vue +10 -62
- package/dist/components/overlay/types.d.ts +0 -2
- package/dist/components/page-number/index.vue +30 -29
- package/dist/components/page-number/types.d.ts +1 -1
- package/dist/components/pin-input/index.d.vue.ts +1 -1
- package/dist/components/pin-input/index.vue +6 -6
- package/dist/components/pin-input/types.d.ts +1 -1
- package/dist/components/popover/index.vue +49 -21
- package/dist/components/popover/types.d.ts +3 -1
- package/dist/components/progress/index.d.vue.ts +2 -2
- package/dist/components/progress/index.vue +12 -12
- package/dist/components/progress/types.d.ts +1 -1
- package/dist/components/project-banner/types.d.ts +1 -1
- package/dist/components/questionnaire/index.vue +14 -14
- package/dist/components/radio/index.vue +1 -1
- package/dist/components/radio/types.d.ts +1 -1
- package/dist/components/radio-group/index.d.vue.ts +2 -2
- package/dist/components/radio-group/types.d.ts +1 -1
- package/dist/components/rating/index.vue +28 -28
- package/dist/components/rating/types.d.ts +1 -1
- package/dist/components/resizable/index.d.vue.ts +1 -0
- package/dist/components/resizable/index.vue +130 -195
- package/dist/components/resizable/types.d.ts +2 -10
- package/dist/components/reveal/index.d.vue.ts +3 -3
- package/dist/components/reveal/index.vue +4 -4
- package/dist/components/reveal/types.d.ts +1 -1
- package/dist/components/rolling-number/index.d.vue.ts +2 -2
- package/dist/components/rolling-number/index.vue +15 -15
- package/dist/components/scalable-text/index.vue +9 -9
- package/dist/components/scroll-text/index.d.vue.ts +3 -3
- package/dist/components/scroll-text/index.vue +6 -6
- package/dist/components/scroll-text/types.d.ts +1 -1
- package/dist/components/scrollable/types.d.ts +2 -1
- package/dist/components/search-input/index.d.vue.ts +5 -5
- package/dist/components/search-input/index.vue +2 -1
- package/dist/components/select/index.d.vue.ts +12 -9
- package/dist/components/select/index.vue +165 -42
- package/dist/components/select/types.d.ts +3 -1
- package/dist/components/separator/index.d.vue.ts +1 -1
- package/dist/components/separator/types.d.ts +1 -1
- package/dist/components/skeleton/index.d.vue.ts +1 -1
- package/dist/components/skeleton/index.vue +11 -11
- package/dist/components/skeleton/types.d.ts +1 -1
- package/dist/components/slider/index.d.vue.ts +1 -1
- package/dist/components/slider/index.vue +1 -1
- package/dist/components/slider/types.d.ts +1 -1
- package/dist/components/snippet/index.d.vue.ts +3 -3
- package/dist/components/snippet/index.vue +7 -5
- package/dist/components/snippet/types.d.ts +1 -1
- package/dist/components/spinner/index.vue +5 -1
- package/dist/components/spinner-dots/index.d.vue.ts +1 -1
- package/dist/components/split-button/index.d.vue.ts +5 -5
- package/dist/components/split-button/types.d.ts +1 -1
- package/dist/components/stack/index.d.vue.ts +3 -3
- package/dist/components/stack/index.vue +28 -29
- package/dist/components/stack/types.d.ts +1 -1
- package/dist/components/status-dot/types.d.ts +1 -1
- package/dist/components/steps/index.d.vue.ts +2 -2
- package/dist/components/steps/index.vue +6 -6
- package/dist/components/steps/types.d.ts +1 -1
- package/dist/components/stick-to-bottom/types.d.ts +1 -1
- package/dist/components/swipe-cell/index.d.vue.ts +6 -6
- package/dist/components/swipe-cell/index.vue +64 -64
- package/dist/components/swipe-cell/types.d.ts +2 -1
- package/dist/components/switch/index.vue +1 -1
- package/dist/components/switch/types.d.ts +1 -1
- package/dist/components/switch-item/index.vue +1 -1
- package/dist/components/switch-item/types.d.ts +1 -1
- package/dist/components/tabs/index.d.vue.ts +1 -1
- package/dist/components/tabs/index.vue +48 -51
- package/dist/components/tabs/types.d.ts +1 -1
- package/dist/components/teleport/index.vue +2 -2
- package/dist/components/text/index.d.vue.ts +3 -3
- package/dist/components/text/index.vue +11 -11
- package/dist/components/text/types.d.ts +1 -1
- package/dist/components/textarea/index.vue +1 -1
- package/dist/components/textarea/types.d.ts +1 -1
- package/dist/components/theme-switcher/index.d.vue.ts +3 -2
- package/dist/components/theme-switcher/index.vue +15 -7
- package/dist/components/theme-switcher/types.d.ts +2 -2
- package/dist/components/time-ago/index.d.vue.ts +6 -0
- package/dist/components/time-ago/index.vue +143 -0
- package/dist/components/time-ago/types.d.ts +4 -0
- package/dist/components/time-picker/index.d.vue.ts +1 -1
- package/dist/components/time-picker/index.vue +7 -7
- package/dist/components/time-picker/types.d.ts +1 -1
- package/dist/components/toc/index.d.vue.ts +2 -2
- package/dist/components/toc/index.vue +1 -1
- package/dist/components/todo-list/index.d.vue.ts +4 -4
- package/dist/components/todo-list/index.vue +15 -15
- package/dist/components/todo-list/types.d.ts +1 -1
- package/dist/components/toggle/index.vue +3 -3
- package/dist/components/toggle/types.d.ts +1 -1
- package/dist/components/toggle-button/index.vue +14 -11
- package/dist/components/toggle-button/types.d.ts +2 -2
- package/dist/components/toggle-button-group/index.d.vue.ts +3 -3
- package/dist/components/toggle-button-group/index.vue +2 -2
- package/dist/components/toggle-button-group/types.d.ts +2 -2
- package/dist/components/tool-call/index.vue +5 -5
- package/dist/components/tooltip/index.d.vue.ts +4 -5
- package/dist/components/tooltip/index.vue +4 -49
- package/dist/components/tooltip/types.d.ts +3 -7
- package/dist/components/tour/index.d.vue.ts +33 -0
- package/dist/components/tour/index.vue +302 -0
- package/dist/components/tour/types.d.ts +29 -0
- package/dist/components/tree/index.d.vue.ts +24 -28
- package/dist/components/tree/index.vue +290 -223
- package/dist/components/tree/types.d.ts +38 -13
- package/dist/components/virtual-list/index.d.vue.ts +4 -4
- package/dist/composables/_internal/use-list-keyboard-controller.js +9 -10
- package/dist/composables/_internal/use-list-rows.d.ts +4 -0
- package/dist/composables/_internal/use-list-rows.js +12 -4
- package/dist/composables/_internal/use-list-selection.d.ts +1 -1
- package/dist/composables/_internal/use-lock-scroll.d.ts +8 -1
- package/dist/composables/_internal/use-lock-scroll.js +57 -36
- package/dist/composables/_internal/use-mention-editor.js +1 -1
- package/dist/composables/_internal/use-message-group.d.ts +22 -0
- package/dist/composables/_internal/use-message-group.js +143 -0
- package/dist/composables/_internal/use-overlay-dialog.js +1 -3
- package/dist/composables/_internal/use-overlay-manager.d.ts +4 -1
- package/dist/composables/_internal/use-overlay-manager.js +67 -8
- package/dist/composables/_internal/use-swipe-gesture.d.ts +1 -1
- package/dist/composables/_internal/use-tour-target.d.ts +29 -0
- package/dist/composables/_internal/use-tour-target.js +201 -0
- package/dist/composables/_internal/use-tree.d.ts +103 -0
- package/dist/composables/_internal/use-tree.js +676 -0
- package/dist/composables/_internal/use-word-limit.d.ts +1 -1
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/index.js +1 -0
- package/dist/composables/use-color-scheme.d.ts +1 -1
- package/dist/composables/use-color-scheme.js +7 -6
- package/dist/composables/use-delay-destroy.d.ts +1 -1
- package/dist/composables/use-document-hidden.d.ts +1 -1
- package/dist/composables/use-intersection-observer.d.ts +1 -1
- package/dist/composables/use-intersection-observer.js +1 -1
- package/dist/composables/{_internal/use-motion-reduce.js → use-motion-reduce.js} +2 -2
- package/dist/composables/use-mutation-observer.d.ts +1 -1
- package/dist/composables/use-mutation-observer.js +1 -1
- package/dist/composables/use-resize-observer.d.ts +1 -1
- package/dist/composables/use-resize-observer.js +1 -1
- package/dist/composables/use-view-transition.js +1 -0
- package/dist/composables/use-virtual-list.d.ts +1 -1
- package/dist/constants/tooltip-variants.d.ts +28 -0
- package/dist/constants/tooltip-variants.js +27 -0
- package/dist/contexts/avatar.js +1 -1
- package/dist/contexts/breadcrumb.js +1 -1
- package/dist/contexts/button.js +1 -1
- package/dist/contexts/checkbox.js +1 -1
- package/dist/contexts/choicebox.js +1 -1
- package/dist/contexts/collapse.js +1 -1
- package/dist/contexts/config-provider.js +1 -1
- package/dist/contexts/list.js +1 -1
- package/dist/contexts/radio.js +1 -1
- package/dist/contexts/switch.js +1 -1
- package/dist/contexts/toggle-button.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/locales/en-us.d.ts +35 -0
- package/dist/locales/en-us.js +20 -0
- package/dist/locales/zh-cn.d.ts +35 -0
- package/dist/locales/zh-cn.js +20 -0
- package/dist/styles/styles.css +1 -1
- package/dist/styles/tw.css +43 -30
- package/dist/utils/{context.js → _internal/context.js} +1 -1
- package/dist/utils/{observer.d.ts → _internal/observer.d.ts} +1 -1
- package/dist/utils/{observer.js → _internal/observer.js} +4 -4
- package/dist/{components/swipe-cell/instances.d.ts → utils/_internal/swipe-cell-instances.d.ts} +1 -1
- package/dist/utils/event.d.ts +2 -1
- package/dist/utils/event.js +3 -0
- package/package.json +26 -50
- package/volar.d.ts +4 -0
- package/dist/components/message/composables/use-group-expand.d.ts +0 -13
- package/dist/components/message/composables/use-group-expand.js +0 -50
- package/dist/components/message/composables/use-message-timer.d.ts +0 -9
- package/dist/components/message/composables/use-message-timer.js +0 -62
- package/dist/components/message/composables/use-promise-message.d.ts +0 -4
- package/dist/components/message/composables/use-promise-message.js +0 -49
- package/dist/components/resizable/utils.d.ts +0 -4
- package/dist/components/resizable/utils.js +0 -10
- package/dist/composables/_internal/use-tree-drag.d.ts +0 -23
- package/dist/composables/_internal/use-tree-drag.js +0 -196
- package/dist/composables/_internal/use-tree-move.d.ts +0 -20
- package/dist/composables/_internal/use-tree-move.js +0 -96
- package/dist/composables/_internal/use-tree-rows.d.ts +0 -46
- package/dist/composables/_internal/use-tree-rows.js +0 -101
- package/dist/composables/_internal/use-tree-selection.d.ts +0 -22
- package/dist/composables/_internal/use-tree-selection.js +0 -87
- package/dist/styles/source.css +0 -675
- package/dist/types/shared/index.d.ts +0 -2
- /package/dist/composables/{_internal/use-motion-reduce.d.ts → use-motion-reduce.d.ts} +0 -0
- /package/dist/utils/{context.d.ts → _internal/context.d.ts} +0 -0
- /package/dist/utils/{mention-html.d.ts → _internal/mention-html.d.ts} +0 -0
- /package/dist/utils/{mention-html.js → _internal/mention-html.js} +0 -0
- /package/dist/{components/swipe-cell/instances.js → utils/_internal/swipe-cell-instances.js} +0 -0
|
@@ -34,9 +34,9 @@ const emits = defineEmits([
|
|
|
34
34
|
"loadstart"
|
|
35
35
|
]);
|
|
36
36
|
const loadingStatus = shallowRef("idle");
|
|
37
|
+
const isHideAvatar = computed(() => !props.src || props.placeholder || loadingStatus.value === "error");
|
|
37
38
|
const avatarGroupContext = useAvatarGroupContext();
|
|
38
39
|
const computedSize = computed(() => getCssUnitValue(props.size || avatarGroupContext?.props.size));
|
|
39
|
-
const isHideAvatar = computed(() => !props.src || props.placeholder || loadingStatus.value === "error");
|
|
40
40
|
function onLoadError(event) {
|
|
41
41
|
loadingStatus.value = "error";
|
|
42
42
|
emits("error", event);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BacktopProps } from './types';
|
|
2
|
-
declare var
|
|
2
|
+
declare var __VLS_13: {};
|
|
3
3
|
type __VLS_Slots = {} & {
|
|
4
|
-
default?: (props: typeof
|
|
4
|
+
default?: (props: typeof __VLS_13) => any;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import("vue").DefineComponent<BacktopProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
7
|
click: (args_0: PointerEvent) => any;
|
|
@@ -10,7 +10,7 @@ declare const __VLS_base: import("vue").DefineComponent<BacktopProps, {}, {}, {}
|
|
|
10
10
|
}>, {
|
|
11
11
|
appendToBody: boolean;
|
|
12
12
|
visibleThreshold: number;
|
|
13
|
-
scrollTarget: "
|
|
13
|
+
scrollTarget: "bottom" | "top";
|
|
14
14
|
scrollBehavior: ScrollBehavior;
|
|
15
15
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
16
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import ArrowUpIcon from "@gdsicon/vue/arrow-up";
|
|
3
3
|
import { computed, onBeforeUnmount, onMounted, shallowRef } from "vue";
|
|
4
|
-
import { useMotionReduced } from "../../composables/
|
|
4
|
+
import { useMotionReduced } from "../../composables/use-motion-reduce.js";
|
|
5
5
|
import { useTailwindVariant } from "../../composables/_internal/use-tailwind-variant.js";
|
|
6
6
|
import { getScrollTarget, getScrollElement, resolveScrollBehavior } from "../../utils/dom.js";
|
|
7
7
|
import { cachedOff, cachedOn, throttleByRaf } from "../../utils/event.js";
|
|
@@ -40,6 +40,22 @@ const props = defineProps({
|
|
|
40
40
|
const emits = defineEmits(["click"]);
|
|
41
41
|
let scrollContainer;
|
|
42
42
|
let scrollContainerEl;
|
|
43
|
+
const scrollTop = shallowRef(0);
|
|
44
|
+
const maxScrollTop = shallowRef(0);
|
|
45
|
+
const updateScrollTop = throttleByRaf(() => {
|
|
46
|
+
if (!scrollContainerEl) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
scrollTop.value = scrollContainerEl.scrollTop;
|
|
50
|
+
maxScrollTop.value = Math.max(0, scrollContainerEl.scrollHeight - scrollContainerEl.clientHeight);
|
|
51
|
+
});
|
|
52
|
+
const wrapperRef = shallowRef();
|
|
53
|
+
const isVisible = computed(() => {
|
|
54
|
+
if (props.scrollTarget === "top") {
|
|
55
|
+
return scrollTop.value >= props.visibleThreshold;
|
|
56
|
+
}
|
|
57
|
+
return maxScrollTop.value - scrollTop.value >= props.visibleThreshold;
|
|
58
|
+
});
|
|
43
59
|
const { attrs, classes } = useTailwindVariant({
|
|
44
60
|
base: "pxd-backtop",
|
|
45
61
|
variants: {
|
|
@@ -54,22 +70,6 @@ const { attrs, classes } = useTailwindVariant({
|
|
|
54
70
|
visible: isVisible.value
|
|
55
71
|
}) });
|
|
56
72
|
const motionReduce = useMotionReduced();
|
|
57
|
-
const scrollTop = shallowRef(0);
|
|
58
|
-
const maxScrollTop = shallowRef(0);
|
|
59
|
-
const wrapperRef = shallowRef();
|
|
60
|
-
const isVisible = computed(() => {
|
|
61
|
-
if (props.scrollTarget === "top") {
|
|
62
|
-
return scrollTop.value >= props.visibleThreshold;
|
|
63
|
-
}
|
|
64
|
-
return maxScrollTop.value - scrollTop.value >= props.visibleThreshold;
|
|
65
|
-
});
|
|
66
|
-
const updateScrollTop = throttleByRaf(() => {
|
|
67
|
-
if (!scrollContainerEl) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
scrollTop.value = scrollContainerEl.scrollTop;
|
|
71
|
-
maxScrollTop.value = Math.max(0, scrollContainerEl.scrollHeight - scrollContainerEl.clientHeight);
|
|
72
|
-
});
|
|
73
73
|
function onActionClick(ev) {
|
|
74
74
|
emits("click", ev);
|
|
75
75
|
if (!scrollContainer || !scrollContainerEl) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { BadgeProps } from './types';
|
|
2
|
-
declare var
|
|
2
|
+
declare var __VLS_7: {}, __VLS_9: {};
|
|
3
3
|
type __VLS_Slots = {} & {
|
|
4
|
-
prefix?: (props: typeof
|
|
4
|
+
prefix?: (props: typeof __VLS_7) => any;
|
|
5
5
|
} & {
|
|
6
|
-
default?: (props: typeof
|
|
6
|
+
default?: (props: typeof __VLS_9) => any;
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_base: import("vue").DefineComponent<BadgeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
9
|
close: (args_0: Event) => any;
|
|
@@ -33,6 +33,49 @@ const props = defineProps({
|
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
35
|
const emits = defineEmits(["close"]);
|
|
36
|
+
const iconSlotClasses = createTailwindVariant({
|
|
37
|
+
base: "inline-flex shrink-0 items-center justify-center",
|
|
38
|
+
variants: {
|
|
39
|
+
size: {
|
|
40
|
+
sm: "w-3 h-3 p-0.5 text-11",
|
|
41
|
+
md: "w-4 h-4 text-xs",
|
|
42
|
+
lg: "w-5 h-5 text-sm"
|
|
43
|
+
},
|
|
44
|
+
slot: {}
|
|
45
|
+
},
|
|
46
|
+
compoundVariants: [
|
|
47
|
+
{
|
|
48
|
+
size: "sm",
|
|
49
|
+
slot: "prefix",
|
|
50
|
+
class: "-ms-0.5"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
size: "md",
|
|
54
|
+
slot: "prefix",
|
|
55
|
+
class: "-ms-01"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
size: "lg",
|
|
59
|
+
slot: "prefix",
|
|
60
|
+
class: "-ms-1.5"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
size: "sm",
|
|
64
|
+
slot: "suffix",
|
|
65
|
+
class: "-me-0.5"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
size: "md",
|
|
69
|
+
slot: "suffix",
|
|
70
|
+
class: "-me-1.5"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
size: "lg",
|
|
74
|
+
slot: "suffix",
|
|
75
|
+
class: "-me-1.5"
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
});
|
|
36
79
|
const configProvider = useConfigProvider();
|
|
37
80
|
const computedSize = computed(() => props.size || configProvider.size);
|
|
38
81
|
const { attrs, classes } = useTailwindVariant({
|
|
@@ -79,49 +122,6 @@ const { attrs, classes } = useTailwindVariant({
|
|
|
79
122
|
shape: props.shape,
|
|
80
123
|
size: computedSize.value
|
|
81
124
|
}) });
|
|
82
|
-
const iconSlotClasses = createTailwindVariant({
|
|
83
|
-
base: "inline-flex shrink-0 items-center justify-center",
|
|
84
|
-
variants: {
|
|
85
|
-
size: {
|
|
86
|
-
sm: "w-3 h-3 p-0.5 text-11",
|
|
87
|
-
md: "w-4 h-4 text-xs",
|
|
88
|
-
lg: "w-5 h-5 text-sm"
|
|
89
|
-
},
|
|
90
|
-
slot: {}
|
|
91
|
-
},
|
|
92
|
-
compoundVariants: [
|
|
93
|
-
{
|
|
94
|
-
size: "sm",
|
|
95
|
-
slot: "prefix",
|
|
96
|
-
class: "-ms-0.5"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
size: "md",
|
|
100
|
-
slot: "prefix",
|
|
101
|
-
class: "-ms-01"
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
size: "lg",
|
|
105
|
-
slot: "prefix",
|
|
106
|
-
class: "-ms-1.5"
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
size: "sm",
|
|
110
|
-
slot: "suffix",
|
|
111
|
-
class: "-me-0.5"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
size: "md",
|
|
115
|
-
slot: "suffix",
|
|
116
|
-
class: "-me-1.5"
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
size: "lg",
|
|
120
|
-
slot: "suffix",
|
|
121
|
-
class: "-me-1.5"
|
|
122
|
-
}
|
|
123
|
-
]
|
|
124
|
-
});
|
|
125
125
|
function onClose(ev) {
|
|
126
126
|
emits("close", ev);
|
|
127
127
|
}
|
|
@@ -60,5 +60,5 @@ const computedStyle = computed(() => {
|
|
|
60
60
|
</template>
|
|
61
61
|
|
|
62
62
|
<style>
|
|
63
|
-
@property --pxd-border-beam-angle{syntax:"<angle>";initial-value:0deg;inherits:true}.pxd-border-beam{--pxd-border-beam-mask-conic:conic-gradient(from var(--pxd-border-beam-angle),transparent 0%,transparent 30%,hsla(0,0%,100%,.1) 36%,hsla(0,0%,100%,.35) 44%,#fff 52%,#fff 80%,hsla(0,0%,100%,.35) 86%,hsla(0,0%,100%,.1) 92%,transparent 95%,transparent 100%);animation:pxd-animation-border-beam-spin 1.96s linear infinite}.pxd-border-beam:after{background:conic-gradient(from var(--pxd-border-beam-angle),transparent 0,transparent 54%,hsla(0,0%,100%,.1) 57%,hsla(0,0%,100%,.3) 60%,hsla(0,0%,100%,.6) 63%,hsla(0,0%,100%,.75) 66%,hsla(0,0%,100%,.6) 69%,hsla(0,0%,100%,.3) 72%,hsla(0,0%,100%,.1) 75%,transparent 78%,transparent 100%),radial-gradient(ellipse 70px 40px at 33% -7.4%,var(--border-beam-stroke-color-1,var(--color-pink-700)),transparent),radial-gradient(ellipse 60px 35px at 12% -5%,var(--border-beam-stroke-color-2,var(--color-blue-600)),transparent),radial-gradient(ellipse 40px 70px at 2.1% 68.3%,var(--border-beam-stroke-color-3,var(--color-green-600)),transparent),radial-gradient(ellipse 20px 35px at 2.1% 68.3%,var(--border-beam-stroke-color-4,var(--color-teal-700)),transparent),radial-gradient(ellipse 180px 32px at 74.4% 100%,var(--border-beam-stroke-color-5,var(--color-purple-600)),transparent),radial-gradient(ellipse 85px 26px at 55% 100%,var(--border-beam-stroke-color-6,var(--color-blue-600)),transparent),radial-gradient(ellipse 74px 32px at 93.9% 0,var(--border-beam-stroke-color-7,var(--color-amber-600)),transparent),radial-gradient(ellipse 26px 42px at 100% 27.1%,var(--border-beam-stroke-color-8,var(--color-pink-700)),transparent),radial-gradient(ellipse 52px 48px at 100% 27.1%,var(--border-beam-stroke-color-9,var(--color-purple-700)),transparent);-webkit-mask:var(--pxd-border-beam-mask-conic),linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:var(--pxd-border-beam-mask-conic),linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:source-in,xor,xor;mask-composite:intersect,exclude}.pxd-border-beam:after,.pxd-border-beam:before{animation:pxd-animation-border-beam-hue 12s ease-in-out infinite;opacity:var(--border-beam-strength)}.pxd-border-beam:before{background:radial-gradient(ellipse 63px 36px at 33% -7.4%,var(--border-beam-glow-color-1,hsla(var(--color-pink-700-value),40%)),transparent),radial-gradient(ellipse 54px 32px at 12% -5%,var(--border-beam-glow-color-2,hsla(var(--color-blue-700-value),40%)),transparent),radial-gradient(ellipse 36px 63px at 2.1% 68.3%,var(--border-beam-glow-color-3,hsla(var(--color-green-700-value),40%)),transparent),radial-gradient(ellipse 18px 32px at 2.1% 68.3%,var(--border-beam-glow-color-4,hsla(var(--color-teal-700-value),40%)),transparent),radial-gradient(ellipse 162px 29px at 74.4% 100%,var(--border-beam-glow-color-5,hsla(var(--color-purple-700-value),40%)),transparent),radial-gradient(ellipse 77px 23px at 55% 100%,var(--border-beam-glow-color-6,hsla(var(--color-blue-700-value),40%)),transparent),radial-gradient(ellipse 67px 29px at 93.9% 0,var(--border-beam-glow-color-7,hsla(var(--color-amber-700-value),40%)),transparent),radial-gradient(ellipse 23px 38px at 100% 27.1%,var(--border-beam-glow-color-8,hsla(var(--color-pink-700-value),40%)),transparent),radial-gradient(ellipse 47px 43px at 100% 27.1%,var(--border-beam-glow-color-9,hsla(var(--color-purple-700-value),40%)),transparent);box-shadow:inset 0 0 9px 1px hsla(0,0%,100%,.27);-webkit-mask-composite:source-in,source-over,xor;mask-composite:intersect,add;-webkit-mask-image:var(--pxd-border-beam-mask-conic),linear-gradient(#fff,transparent 28px,transparent calc(100% - 28px),#fff),linear-gradient(to right,#fff,transparent 28px,transparent calc(100% - 28px),#fff);mask-image:var(--pxd-border-beam-mask-conic),linear-gradient(#fff,transparent 28px,transparent calc(100% - 28px),#fff),linear-gradient(to right,#fff,transparent 28px,transparent calc(100% - 28px),#fff)}.pxd-border-beam--bloom{background:conic-gradient(from var(--pxd-border-beam-angle),transparent 0,transparent 58%,hsla(0,0%,100%,.03) 62%,hsla(0,0%,100%,.08) 65%,hsla(0,0%,100%,.2) 67%,hsla(0,0%,100%,.45) 69%,hsla(0,0%,100%,.85) 70%,hsla(0,0%,100%,.85) 70.5%,hsla(0,0%,100%,.45) 71.5%,hsla(0,0%,100%,.2) 73%,hsla(0,0%,100%,.08) 75%,hsla(0,0%,100%,.03) 78%,transparent 82%);filter:blur(10px) brightness(1.3) saturate(1.2);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:var(--border-beam-strength)}.pxd-border-beam[data-variant=line] .pxd-border-beam--bloom,.pxd-border-beam[data-variant=line]:before{display:none}.pxd-border-beam[data-variant=line]:after{animation:none;background:conic-gradient(from var(--pxd-border-beam-angle),transparent 0,transparent 68%,var(--border-beam-stroke-color-1,var(--color-blue-600)) 74%,var(--border-beam-stroke-color-2,var(--color-purple-600)) 80%,var(--border-beam-stroke-color-3,var(--color-pink-700)) 86%,var(--border-beam-stroke-color-4,var(--color-amber-600)) 92%,transparent 97%,transparent 100%);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;padding:1px}.pxd-border-beam[data-disabled=true]{animation-play-state:paused}.pxd-border-beam[data-disabled=true] .pxd-border-beam--bloom,.pxd-border-beam[data-disabled=true]:after,.pxd-border-beam[data-disabled=true]:before{animation:pxd-animation-border-beam-fade-out .5s ease forwards}@keyframes pxd-animation-border-beam-spin{to{--pxd-border-beam-angle:360deg}}@keyframes pxd-animation-border-beam-hue{0%{filter:hue-rotate(-30deg) brightness(1.3) saturate(1.2)}50%{filter:hue-rotate(30deg) brightness(1.3) saturate(1.2)}to{filter:hue-rotate(-30deg) brightness(1.3) saturate(1.2)}}@keyframes pxd-animation-border-beam-fade-out{to{opacity:0}}
|
|
63
|
+
@property --pxd-border-beam-angle{syntax:"<angle>";initial-value:0deg;inherits:true}@property --pxd-border-beam-x{syntax:"<number>";initial-value:.5;inherits:true}@property --pxd-border-beam-edge{syntax:"<number>";initial-value:1;inherits:true}.pxd-border-beam{--pxd-border-beam-mask-conic:conic-gradient(from var(--pxd-border-beam-angle),transparent 0%,transparent 30%,hsla(0,0%,100%,.1) 36%,hsla(0,0%,100%,.35) 44%,#fff 52%,#fff 80%,hsla(0,0%,100%,.35) 86%,hsla(0,0%,100%,.1) 92%,transparent 95%,transparent 100%);animation:pxd-animation-border-beam-spin 1.96s linear infinite}.pxd-border-beam:after{background:conic-gradient(from var(--pxd-border-beam-angle),transparent 0,transparent 54%,hsla(0,0%,100%,.1) 57%,hsla(0,0%,100%,.3) 60%,hsla(0,0%,100%,.6) 63%,hsla(0,0%,100%,.75) 66%,hsla(0,0%,100%,.6) 69%,hsla(0,0%,100%,.3) 72%,hsla(0,0%,100%,.1) 75%,transparent 78%,transparent 100%),radial-gradient(ellipse 70px 40px at 33% -7.4%,var(--border-beam-stroke-color-1,var(--color-pink-700)),transparent),radial-gradient(ellipse 60px 35px at 12% -5%,var(--border-beam-stroke-color-2,var(--color-blue-600)),transparent),radial-gradient(ellipse 40px 70px at 2.1% 68.3%,var(--border-beam-stroke-color-3,var(--color-green-600)),transparent),radial-gradient(ellipse 20px 35px at 2.1% 68.3%,var(--border-beam-stroke-color-4,var(--color-teal-700)),transparent),radial-gradient(ellipse 180px 32px at 74.4% 100%,var(--border-beam-stroke-color-5,var(--color-purple-600)),transparent),radial-gradient(ellipse 85px 26px at 55% 100%,var(--border-beam-stroke-color-6,var(--color-blue-600)),transparent),radial-gradient(ellipse 74px 32px at 93.9% 0,var(--border-beam-stroke-color-7,var(--color-amber-600)),transparent),radial-gradient(ellipse 26px 42px at 100% 27.1%,var(--border-beam-stroke-color-8,var(--color-pink-700)),transparent),radial-gradient(ellipse 52px 48px at 100% 27.1%,var(--border-beam-stroke-color-9,var(--color-purple-700)),transparent);-webkit-mask:var(--pxd-border-beam-mask-conic),linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:var(--pxd-border-beam-mask-conic),linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:source-in,xor,xor;mask-composite:intersect,exclude}.pxd-border-beam:after,.pxd-border-beam:before{animation:pxd-animation-border-beam-hue 12s ease-in-out infinite;opacity:var(--border-beam-strength)}.pxd-border-beam:before{background:radial-gradient(ellipse 63px 36px at 33% -7.4%,var(--border-beam-glow-color-1,hsla(var(--color-pink-700-value),40%)),transparent),radial-gradient(ellipse 54px 32px at 12% -5%,var(--border-beam-glow-color-2,hsla(var(--color-blue-700-value),40%)),transparent),radial-gradient(ellipse 36px 63px at 2.1% 68.3%,var(--border-beam-glow-color-3,hsla(var(--color-green-700-value),40%)),transparent),radial-gradient(ellipse 18px 32px at 2.1% 68.3%,var(--border-beam-glow-color-4,hsla(var(--color-teal-700-value),40%)),transparent),radial-gradient(ellipse 162px 29px at 74.4% 100%,var(--border-beam-glow-color-5,hsla(var(--color-purple-700-value),40%)),transparent),radial-gradient(ellipse 77px 23px at 55% 100%,var(--border-beam-glow-color-6,hsla(var(--color-blue-700-value),40%)),transparent),radial-gradient(ellipse 67px 29px at 93.9% 0,var(--border-beam-glow-color-7,hsla(var(--color-amber-700-value),40%)),transparent),radial-gradient(ellipse 23px 38px at 100% 27.1%,var(--border-beam-glow-color-8,hsla(var(--color-pink-700-value),40%)),transparent),radial-gradient(ellipse 47px 43px at 100% 27.1%,var(--border-beam-glow-color-9,hsla(var(--color-purple-700-value),40%)),transparent);box-shadow:inset 0 0 9px 1px hsla(0,0%,100%,.27);-webkit-mask-composite:source-in,source-over,xor;mask-composite:intersect,add;-webkit-mask-image:var(--pxd-border-beam-mask-conic),linear-gradient(#fff,transparent 28px,transparent calc(100% - 28px),#fff),linear-gradient(to right,#fff,transparent 28px,transparent calc(100% - 28px),#fff);mask-image:var(--pxd-border-beam-mask-conic),linear-gradient(#fff,transparent 28px,transparent calc(100% - 28px),#fff),linear-gradient(to right,#fff,transparent 28px,transparent calc(100% - 28px),#fff)}.pxd-border-beam--bloom{background:conic-gradient(from var(--pxd-border-beam-angle),transparent 0,transparent 58%,hsla(0,0%,100%,.03) 62%,hsla(0,0%,100%,.08) 65%,hsla(0,0%,100%,.2) 67%,hsla(0,0%,100%,.45) 69%,hsla(0,0%,100%,.85) 70%,hsla(0,0%,100%,.85) 70.5%,hsla(0,0%,100%,.45) 71.5%,hsla(0,0%,100%,.2) 73%,hsla(0,0%,100%,.08) 75%,hsla(0,0%,100%,.03) 78%,transparent 82%);filter:blur(10px) brightness(1.3) saturate(1.2);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:var(--border-beam-strength)}.pxd-border-beam[data-variant=line] .pxd-border-beam--bloom,.pxd-border-beam[data-variant=line]:before{display:none}.pxd-border-beam[data-variant=line]:after{animation:none;background:conic-gradient(from var(--pxd-border-beam-angle),transparent 0,transparent 68%,var(--border-beam-stroke-color-1,var(--color-blue-600)) 74%,var(--border-beam-stroke-color-2,var(--color-purple-600)) 80%,var(--border-beam-stroke-color-3,var(--color-pink-700)) 86%,var(--border-beam-stroke-color-4,var(--color-amber-600)) 92%,transparent 97%,transparent 100%);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;padding:1px}.pxd-border-beam[data-variant=bottom]{animation:pxd-animation-border-beam-travel 2.4s linear infinite,pxd-animation-border-beam-edge 2.4s linear infinite}.pxd-border-beam[data-variant=bottom]:before{display:none}.pxd-border-beam[data-variant=bottom]:after{animation:none;background:radial-gradient(ellipse 32px 23px at calc(var(--pxd-border-beam-x)*100%) calc(100% + 2px),hsla(0,0%,100%,.38),transparent),radial-gradient(ellipse 36px 27px at calc(var(--pxd-border-beam-x)*100%) 100%,var(--border-beam-stroke-color-1,var(--color-pink-700)),transparent),radial-gradient(ellipse 30px 24px at calc(var(--pxd-border-beam-x)*100% + 39px) 100%,var(--border-beam-stroke-color-2,var(--color-blue-600)),transparent),radial-gradient(ellipse 33px 21px at calc(var(--pxd-border-beam-x)*100% - 36px) 100%,var(--border-beam-stroke-color-3,var(--color-green-600)),transparent),radial-gradient(ellipse 29px 26px at calc(var(--pxd-border-beam-x)*100% - 54px) 100%,var(--border-beam-stroke-color-4,var(--color-teal-700)),transparent),radial-gradient(ellipse 27px 23px at calc(var(--pxd-border-beam-x)*100% + 51px) 100%,var(--border-beam-stroke-color-5,var(--color-purple-600)),transparent),radial-gradient(ellipse 36px 18px at calc(var(--pxd-border-beam-x)*100% + 21px) 100%,var(--border-beam-stroke-color-6,var(--color-blue-600)),transparent),radial-gradient(ellipse 30px 17px at calc(var(--pxd-border-beam-x)*100% - 21px) 100%,var(--border-beam-stroke-color-7,var(--color-amber-600)),transparent),radial-gradient(ellipse 25px 21px at calc(var(--pxd-border-beam-x)*100% + 66px) 100%,var(--border-beam-stroke-color-8,var(--color-pink-700)),transparent),radial-gradient(ellipse 23px 23px at calc(var(--pxd-border-beam-x)*100% - 66px) 100%,var(--border-beam-stroke-color-9,var(--color-purple-700)),transparent);-webkit-mask:radial-gradient(ellipse 78px 45px at calc(var(--pxd-border-beam-x)*100%) 100%,#fff 0,hsla(0,0%,100%,.5) 45%,transparent 100%),linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:radial-gradient(ellipse 78px 45px at calc(var(--pxd-border-beam-x)*100%) 100%,#fff 0,hsla(0,0%,100%,.5) 45%,transparent 100%),linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:source-in,xor,xor;mask-composite:intersect,exclude;opacity:calc(var(--border-beam-strength)*var(--pxd-border-beam-edge));padding:1px}.pxd-border-beam[data-variant=bottom] .pxd-border-beam--bloom{background:radial-gradient(ellipse 42px 30px at calc(var(--pxd-border-beam-x)*100%) 100%,hsla(0,0%,100%,.3),transparent),radial-gradient(ellipse 36px 27px at calc(var(--pxd-border-beam-x)*100%) 100%,var(--border-beam-glow-color-1,hsla(var(--color-pink-700-value),40%)),transparent),radial-gradient(ellipse 30px 24px at calc(var(--pxd-border-beam-x)*100% + 39px) 100%,var(--border-beam-glow-color-2,hsla(var(--color-blue-700-value),40%)),transparent),radial-gradient(ellipse 33px 21px at calc(var(--pxd-border-beam-x)*100% - 36px) 100%,var(--border-beam-glow-color-3,hsla(var(--color-green-700-value),40%)),transparent),radial-gradient(ellipse 29px 26px at calc(var(--pxd-border-beam-x)*100% - 54px) 100%,var(--border-beam-glow-color-4,hsla(var(--color-teal-700-value),40%)),transparent),radial-gradient(ellipse 27px 23px at calc(var(--pxd-border-beam-x)*100% + 51px) 100%,var(--border-beam-glow-color-5,hsla(var(--color-purple-700-value),40%)),transparent),radial-gradient(ellipse 36px 18px at calc(var(--pxd-border-beam-x)*100% + 21px) 100%,var(--border-beam-glow-color-6,hsla(var(--color-blue-700-value),40%)),transparent),radial-gradient(ellipse 30px 17px at calc(var(--pxd-border-beam-x)*100% - 21px) 100%,var(--border-beam-glow-color-7,hsla(var(--color-amber-700-value),40%)),transparent),radial-gradient(ellipse 25px 21px at calc(var(--pxd-border-beam-x)*100% + 66px) 100%,var(--border-beam-glow-color-8,hsla(var(--color-pink-700-value),40%)),transparent),radial-gradient(ellipse 23px 23px at calc(var(--pxd-border-beam-x)*100% - 66px) 100%,var(--border-beam-glow-color-9,hsla(var(--color-purple-700-value),40%)),transparent);-webkit-mask:radial-gradient(ellipse 84px 82px at calc(var(--pxd-border-beam-x)*100%) 100%,#fff 0,hsla(0,0%,100%,.5) 35%,transparent 100%);mask:radial-gradient(ellipse 84px 82px at calc(var(--pxd-border-beam-x)*100%) 100%,#fff 0,hsla(0,0%,100%,.5) 35%,transparent 100%);-webkit-mask-composite:source-over;mask-composite:add;opacity:calc(var(--border-beam-strength)*var(--pxd-border-beam-edge))}.pxd-border-beam[data-disabled=true]{animation-play-state:paused}.pxd-border-beam[data-disabled=true] .pxd-border-beam--bloom,.pxd-border-beam[data-disabled=true]:after,.pxd-border-beam[data-disabled=true]:before{animation:pxd-animation-border-beam-fade-out .5s ease forwards}@keyframes pxd-animation-border-beam-spin{to{--pxd-border-beam-angle:360deg}}@keyframes pxd-animation-border-beam-hue{0%{filter:hue-rotate(-30deg) brightness(1.3) saturate(1.2)}50%{filter:hue-rotate(30deg) brightness(1.3) saturate(1.2)}to{filter:hue-rotate(-30deg) brightness(1.3) saturate(1.2)}}@keyframes pxd-animation-border-beam-travel{0%{--pxd-border-beam-x:0.06}to{--pxd-border-beam-x:0.94}}@keyframes pxd-animation-border-beam-edge{0%{--pxd-border-beam-edge:0}12.5%{--pxd-border-beam-edge:0}32.5%{--pxd-border-beam-edge:1}67.5%{--pxd-border-beam-edge:1}87.5%{--pxd-border-beam-edge:0}to{--pxd-border-beam-edge:0}}@keyframes pxd-animation-border-beam-fade-out{to{opacity:0}}
|
|
64
64
|
</style>
|
|
@@ -35,6 +35,7 @@ const props = defineProps({
|
|
|
35
35
|
default: "default"
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
|
+
const ariaLabel = computed(() => props.role === "user" ? "User message" : "System message");
|
|
38
39
|
const { attrs, classes } = useTailwindVariant({
|
|
39
40
|
base: "pxd-bubble group/bubble sibling:mbs-2 gap-2 flex max-w-full cursor-default",
|
|
40
41
|
variants: { role: {
|
|
@@ -68,7 +69,6 @@ const { classes: contentClasses } = useTailwindVariant({
|
|
|
68
69
|
variant: props.variant
|
|
69
70
|
})
|
|
70
71
|
});
|
|
71
|
-
const ariaLabel = computed(() => props.role === "user" ? "User message" : "System message");
|
|
72
72
|
</script>
|
|
73
73
|
|
|
74
74
|
<template>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { BubbleGroupProps } from './types';
|
|
2
|
-
declare var
|
|
2
|
+
declare var __VLS_8: {
|
|
3
3
|
item: any;
|
|
4
4
|
index: number;
|
|
5
|
-
},
|
|
5
|
+
}, __VLS_10: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
|
-
item?: (props: typeof
|
|
7
|
+
item?: (props: typeof __VLS_8) => any;
|
|
8
8
|
} & {
|
|
9
|
-
default?: (props: typeof
|
|
9
|
+
default?: (props: typeof __VLS_10) => any;
|
|
10
10
|
};
|
|
11
11
|
declare const __VLS_base: import("vue").DefineComponent<BubbleGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BubbleGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
12
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { ButtonProps } from './types';
|
|
2
|
-
declare var
|
|
2
|
+
declare var __VLS_12: {}, __VLS_14: {}, __VLS_16: {};
|
|
3
3
|
type __VLS_Slots = {} & {
|
|
4
|
-
prefix?: (props: typeof
|
|
4
|
+
prefix?: (props: typeof __VLS_12) => any;
|
|
5
5
|
} & {
|
|
6
|
-
default?: (props: typeof
|
|
6
|
+
default?: (props: typeof __VLS_14) => any;
|
|
7
7
|
} & {
|
|
8
|
-
suffix?: (props: typeof
|
|
8
|
+
suffix?: (props: typeof __VLS_16) => any;
|
|
9
9
|
};
|
|
10
10
|
declare const __VLS_base: import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{}>, {
|
|
11
|
-
icon: boolean;
|
|
12
11
|
as: import("../../types/shared/props.js").ComponentAs;
|
|
13
12
|
shape: import("../../types/shared/props.js").ComponentShape;
|
|
13
|
+
icon: boolean;
|
|
14
14
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
15
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
16
|
declare const _default: typeof __VLS_export;
|
|
@@ -57,6 +57,19 @@ const isDisabled = computed(() => isTruthyProp(props.disabled) || isTruthyProp(p
|
|
|
57
57
|
const computedVariant = computed(() => {
|
|
58
58
|
return props.variant || buttonGroupContext?.props.variant || "default";
|
|
59
59
|
});
|
|
60
|
+
const btnContentClasses = computed(() => {
|
|
61
|
+
const { icon, align } = props;
|
|
62
|
+
const internalAlign = icon ? "center" : align;
|
|
63
|
+
const alignClasses = {
|
|
64
|
+
left: "justify-start",
|
|
65
|
+
center: "justify-center",
|
|
66
|
+
right: "justify-end"
|
|
67
|
+
}[internalAlign || buttonGroupContext?.props.align || "center"];
|
|
68
|
+
return {
|
|
69
|
+
"px-1.5": !icon,
|
|
70
|
+
[alignClasses]: true
|
|
71
|
+
};
|
|
72
|
+
});
|
|
60
73
|
const { attrs, classes } = useTailwindVariant({
|
|
61
74
|
base: "pxd-button inline-flex shrink-0 cursor-pointer touch-manipulation items-center font-inherit select-none focus-visible:z-1 motion-safe:transition-appearance within-group:not-first:rounded-l-none within-group:not-first:border-l-0 within-group:not-last:rounded-r-none",
|
|
62
75
|
variants: {
|
|
@@ -110,19 +123,6 @@ const { attrs, classes } = useTailwindVariant({
|
|
|
110
123
|
disabled: isDisabled.value
|
|
111
124
|
};
|
|
112
125
|
} });
|
|
113
|
-
const btnContentClasses = computed(() => {
|
|
114
|
-
const { icon, align } = props;
|
|
115
|
-
const internalAlign = icon ? "center" : align;
|
|
116
|
-
const alignClasses = {
|
|
117
|
-
left: "justify-start",
|
|
118
|
-
center: "justify-center",
|
|
119
|
-
right: "justify-end"
|
|
120
|
-
}[internalAlign || buttonGroupContext?.props.align || "center"];
|
|
121
|
-
return {
|
|
122
|
-
"px-1.5": !icon,
|
|
123
|
-
[alignClasses]: true
|
|
124
|
-
};
|
|
125
|
-
});
|
|
126
126
|
</script>
|
|
127
127
|
|
|
128
128
|
<template>
|
|
@@ -2,7 +2,7 @@ import type { CalendarPanelInfo, CalendarProps } from './types';
|
|
|
2
2
|
declare var __VLS_1: {
|
|
3
3
|
year: number;
|
|
4
4
|
month: number;
|
|
5
|
-
},
|
|
5
|
+
}, __VLS_74: {
|
|
6
6
|
isSelected: boolean;
|
|
7
7
|
key: string;
|
|
8
8
|
timestamp: number;
|
|
@@ -16,7 +16,7 @@ declare var __VLS_1: {
|
|
|
16
16
|
type __VLS_Slots = {} & {
|
|
17
17
|
header?: (props: typeof __VLS_1) => any;
|
|
18
18
|
} & {
|
|
19
|
-
item?: (props: typeof
|
|
19
|
+
item?: (props: typeof __VLS_74) => any;
|
|
20
20
|
};
|
|
21
21
|
declare const __VLS_base: import("vue").DefineComponent<CalendarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
22
|
change: (args_0: import("../../types/shared/props.js").ComponentDateTimeValue) => any;
|
|
@@ -56,7 +56,6 @@ const emits = defineEmits([
|
|
|
56
56
|
"change",
|
|
57
57
|
"update:modelValue"
|
|
58
58
|
]);
|
|
59
|
-
const configProvider = useConfigProvider();
|
|
60
59
|
const today = dayjs();
|
|
61
60
|
const todayKey = today.format("YYYY-MM-DD");
|
|
62
61
|
const uncontrolledValue = shallowRef(props.defaultValue);
|
|
@@ -67,10 +66,6 @@ const selectedValue = computed(() => {
|
|
|
67
66
|
const selectedDateKey = computed(() => {
|
|
68
67
|
return isNil(selectedValue.value) ? null : dayjs(selectedValue.value).format("YYYY-MM-DD");
|
|
69
68
|
});
|
|
70
|
-
const weekDays = computed(() => {
|
|
71
|
-
const days = configProvider.locale.date.day;
|
|
72
|
-
return [...days.slice(1), days[0]];
|
|
73
|
-
});
|
|
74
69
|
const calendarDays = computed(() => {
|
|
75
70
|
const firstDayOfMonth = panelDate.value.startOf("month");
|
|
76
71
|
const startOffset = (firstDayOfMonth.day() + 6) % 7;
|
|
@@ -96,6 +91,11 @@ const panelInfo = computed(() => ({
|
|
|
96
91
|
year: panelDate.value.year(),
|
|
97
92
|
month: panelDate.value.month() + 1
|
|
98
93
|
}));
|
|
94
|
+
const configProvider = useConfigProvider();
|
|
95
|
+
const weekDays = computed(() => {
|
|
96
|
+
const days = configProvider.locale.date.day;
|
|
97
|
+
return [...days.slice(1), days[0]];
|
|
98
|
+
});
|
|
99
99
|
function emitPanelChange() {
|
|
100
100
|
emits("panel-change", panelInfo.value);
|
|
101
101
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import type { CarouselProps } from './types';
|
|
2
|
-
declare var
|
|
2
|
+
declare var __VLS_2: {
|
|
3
3
|
item: import("./types").CarouselOption;
|
|
4
4
|
index: number;
|
|
5
|
-
},
|
|
5
|
+
}, __VLS_4: {
|
|
6
6
|
current: number;
|
|
7
7
|
total: number;
|
|
8
8
|
};
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
|
-
item?: (props: typeof
|
|
10
|
+
item?: (props: typeof __VLS_2) => any;
|
|
11
11
|
} & {
|
|
12
|
-
indicator?: (props: typeof
|
|
12
|
+
indicator?: (props: typeof __VLS_4) => any;
|
|
13
13
|
};
|
|
14
14
|
declare const __VLS_base: import("vue").DefineComponent<CarouselProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
15
|
change: (index: number) => any;
|
|
16
16
|
}, string, import("vue").PublicProps, Readonly<CarouselProps> & Readonly<{
|
|
17
17
|
onChange?: ((index: number) => any) | undefined;
|
|
18
18
|
}>, {
|
|
19
|
-
height:
|
|
19
|
+
height: string | number;
|
|
20
20
|
options: import("./types").CarouselOption[];
|
|
21
21
|
index: number;
|
|
22
22
|
loop: boolean;
|
|
@@ -25,8 +25,8 @@ declare const __VLS_base: import("vue").DefineComponent<CarouselProps, {}, {}, {
|
|
|
25
25
|
interval: number;
|
|
26
26
|
indicator: boolean;
|
|
27
27
|
direction: import("../../types/shared/props.js").ComponentDirection;
|
|
28
|
-
indicatorType: "
|
|
29
|
-
indicatorPosition: import("../../types/shared/props.js").BasePosition
|
|
28
|
+
indicatorType: "line" | "dot";
|
|
29
|
+
indicatorPosition: "center" | import("../../types/shared/props.js").BasePosition;
|
|
30
30
|
pauseOnHover: boolean;
|
|
31
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
32
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -80,7 +80,6 @@ let pendingDelta = null;
|
|
|
80
80
|
let autoPlayTimerId = null;
|
|
81
81
|
let isPointerEntering = false;
|
|
82
82
|
let maxDrag = 0;
|
|
83
|
-
const slots = useSlots();
|
|
84
83
|
const sliderRef = shallowRef();
|
|
85
84
|
const virtualIndex = shallowRef(props.index);
|
|
86
85
|
const gestureMoveOffset = shallowRef(0);
|
|
@@ -120,6 +119,7 @@ const loopPlacement = computed(() => {
|
|
|
120
119
|
}
|
|
121
120
|
return "none";
|
|
122
121
|
});
|
|
122
|
+
const slots = useSlots();
|
|
123
123
|
useSwipeGesture(sliderRef, {
|
|
124
124
|
axis: () => props.direction,
|
|
125
125
|
onPress: ({ size }) => {
|
|
@@ -54,6 +54,7 @@ const props = defineProps({
|
|
|
54
54
|
const emits = defineEmits(["change", "update:modelValue"]);
|
|
55
55
|
const uniqueId = getUniqueId();
|
|
56
56
|
const checkboxGroupContext = useCheckboxGroupContext();
|
|
57
|
+
const isDisabled = computed(() => props.disabled || checkboxGroupContext?.props.disabled || false);
|
|
57
58
|
const modelValue = useModelValue(checkboxGroupContext?.props ?? props, checkboxGroupContext?.emits ?? emits);
|
|
58
59
|
const isSelected = computed(() => {
|
|
59
60
|
if (Array.isArray(modelValue.value)) {
|
|
@@ -64,7 +65,6 @@ const isSelected = computed(() => {
|
|
|
64
65
|
}
|
|
65
66
|
return modelValue.value === props.value;
|
|
66
67
|
});
|
|
67
|
-
const isDisabled = computed(() => props.disabled || checkboxGroupContext?.props.disabled || false);
|
|
68
68
|
const { classes } = useTailwindVariant({
|
|
69
69
|
base: "pxd-checkbox--inner size-4 p-0.5 pointer-events-none inline-flex shrink-0 transform-gpu items-center justify-center overflow-hidden border text-primary-foreground peer-focus-ring motion-safe:transition-colors",
|
|
70
70
|
variants: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CheckboxGroupProps } from './types';
|
|
2
|
-
declare var
|
|
2
|
+
declare var __VLS_7: {};
|
|
3
3
|
type __VLS_Slots = {} & {
|
|
4
|
-
default?: (props: typeof
|
|
4
|
+
default?: (props: typeof __VLS_7) => any;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import("vue").DefineComponent<CheckboxGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
7
|
change: (args_0: import("./types").CheckboxGroupModelValue[]) => any;
|
|
@@ -4,7 +4,7 @@ type __VLS_Slots = {} & {
|
|
|
4
4
|
default?: (props: typeof __VLS_1) => any;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import("vue").DefineComponent<ChipProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ChipProps> & Readonly<{}>, {
|
|
7
|
-
variant: import("../../types/shared/props.js").ComponentVariant
|
|
7
|
+
variant: "secondary" | import("../../types/shared/props.js").ComponentVariant;
|
|
8
8
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
9
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
10
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ChoiceboxProps } from './types';
|
|
2
|
-
declare var
|
|
2
|
+
declare var __VLS_7: {};
|
|
3
3
|
type __VLS_Slots = {} & {
|
|
4
|
-
default?: (props: typeof
|
|
4
|
+
default?: (props: typeof __VLS_7) => any;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import("vue").DefineComponent<ChoiceboxProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
7
|
change: (args_0: NonNullable<import("../../types/shared/props.js").ComponentValue | import("../../types/shared/props.js").ComponentValue[] | undefined>) => any;
|
|
@@ -10,7 +10,7 @@ declare const __VLS_base: import("vue").DefineComponent<ChoiceboxProps, {}, {},
|
|
|
10
10
|
onChange?: ((args_0: NonNullable<import("../../types/shared/props.js").ComponentValue | import("../../types/shared/props.js").ComponentValue[] | undefined>) => any) | undefined;
|
|
11
11
|
"onUpdate:modelValue"?: ((args_0: NonNullable<import("../../types/shared/props.js").ComponentValue | import("../../types/shared/props.js").ComponentValue[] | undefined>) => any) | undefined;
|
|
12
12
|
}>, {
|
|
13
|
-
gap: import("../../types/shared/props.js").ResponsiveValue<
|
|
13
|
+
gap: import("../../types/shared/props.js").ResponsiveValue<string | number>;
|
|
14
14
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
15
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
16
|
declare const _default: typeof __VLS_export;
|
|
@@ -28,16 +28,22 @@ const props = defineProps({
|
|
|
28
28
|
required: false
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
const choiceboxGroupContext = useChoiceboxContext();
|
|
32
31
|
const inputId = getUniqueId();
|
|
33
32
|
const internalId = getUniqueId();
|
|
34
|
-
const
|
|
33
|
+
const choiceboxGroupContext = useChoiceboxContext();
|
|
35
34
|
const isMultiple = computed(() => {
|
|
36
35
|
return !!choiceboxGroupContext?.props.multiple;
|
|
37
36
|
});
|
|
38
37
|
const isDisabled = computed(() => {
|
|
39
38
|
return props.disabled || !!choiceboxGroupContext?.props.disabled || false;
|
|
40
39
|
});
|
|
40
|
+
const inputName = computed(() => {
|
|
41
|
+
if (isMultiple.value) {
|
|
42
|
+
return internalId;
|
|
43
|
+
}
|
|
44
|
+
return choiceboxGroupContext?.name || internalId;
|
|
45
|
+
});
|
|
46
|
+
const modelValue = useModelValue(choiceboxGroupContext?.props, choiceboxGroupContext?.emits);
|
|
41
47
|
const isSelected = computed(() => {
|
|
42
48
|
if (isMultiple.value) {
|
|
43
49
|
return toArray(modelValue.value).includes(props.value);
|
|
@@ -105,12 +111,6 @@ const { classes: innerClasses } = useTailwindVariant({
|
|
|
105
111
|
selected: isSelected.value
|
|
106
112
|
})
|
|
107
113
|
});
|
|
108
|
-
const inputName = computed(() => {
|
|
109
|
-
if (isMultiple.value) {
|
|
110
|
-
return internalId;
|
|
111
|
-
}
|
|
112
|
-
return choiceboxGroupContext?.name || internalId;
|
|
113
|
-
});
|
|
114
114
|
function onInputChange(event) {
|
|
115
115
|
if (isDisabled.value) {
|
|
116
116
|
return;
|