pxd 0.0.52 → 0.0.53
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/README.md +6 -3
- package/dist/components/active-graph/index.d.vue.ts +0 -2
- package/dist/components/active-graph/index.vue +35 -37
- package/dist/components/avatar/index.d.vue.ts +2 -2
- package/dist/components/avatar/index.vue +17 -16
- package/dist/components/avatar-group/index.d.vue.ts +1 -1
- package/dist/components/avatar-group/index.vue +4 -1
- package/dist/components/badge/cn.d.ts +90 -0
- package/dist/components/badge/cn.js +44 -0
- package/dist/components/badge/index.d.vue.ts +5 -33
- package/dist/components/badge/index.vue +10 -56
- package/dist/components/book/index.vue +90 -17
- package/dist/components/browser/index.vue +21 -6
- package/dist/components/button/cn.d.ts +121 -0
- package/dist/components/button/cn.js +55 -0
- package/dist/components/button/index.d.vue.ts +8 -14
- package/dist/components/button/index.vue +22 -74
- package/dist/components/carousel-group/index.d.vue.ts +1 -1
- package/dist/components/carousel-group/index.vue +32 -28
- package/dist/components/checkbox/cn.d.ts +67 -0
- package/dist/components/checkbox/cn.js +31 -0
- package/dist/components/checkbox/index.vue +9 -19
- package/dist/components/chip/cn.d.ts +49 -0
- package/dist/components/chip/cn.js +26 -0
- package/dist/components/chip/index.vue +13 -21
- package/dist/components/choicebox/index.vue +1 -1
- package/dist/components/choicebox-group/index.vue +6 -3
- package/dist/components/collapse/index.vue +7 -1
- package/dist/components/collapse-group/index.vue +7 -7
- package/dist/components/command-menu/index.vue +9 -8
- package/dist/components/command-menu-group/index.vue +4 -1
- package/dist/components/config-provider/index.d.vue.ts +1 -0
- package/dist/components/config-provider/index.vue +2 -1
- package/dist/components/countdown/index.vue +2 -10
- package/dist/components/dash-line/index.vue +22 -16
- package/dist/components/description/index.vue +4 -2
- package/dist/components/drawer/index.vue +19 -11
- package/dist/components/empty-state/index.vue +3 -1
- package/dist/components/error/cn.d.ts +22 -0
- package/dist/components/error/cn.js +15 -0
- package/dist/components/error/index.vue +13 -14
- package/dist/components/fader/index.vue +30 -14
- package/dist/components/gauge/index.vue +6 -6
- package/dist/components/grid/index.vue +16 -12
- package/dist/components/grid-item/index.vue +4 -4
- package/dist/components/hold-button/index.vue +19 -13
- package/dist/components/input/cn.d.ts +73 -0
- package/dist/components/input/cn.js +36 -0
- package/dist/components/input/index.d.vue.ts +14 -16
- package/dist/components/input/index.vue +74 -101
- package/dist/components/intersection-observer/index.vue +7 -3
- package/dist/components/kbd/index.vue +2 -2
- package/dist/components/link-button/index.d.vue.ts +8 -8
- package/dist/components/link-button/index.vue +17 -25
- package/dist/components/list/index.d.vue.ts +0 -1
- package/dist/components/list/index.vue +58 -57
- package/dist/components/list-item/cn.d.ts +22 -0
- package/dist/components/list-item/cn.js +15 -0
- package/dist/components/list-item/index.d.vue.ts +3 -3
- package/dist/components/list-item/index.vue +14 -25
- package/dist/components/loading-bar/cn.d.ts +70 -0
- package/dist/components/loading-bar/cn.js +32 -0
- package/dist/components/loading-bar/index.d.vue.ts +2 -0
- package/dist/components/loading-bar/index.vue +68 -61
- package/dist/components/loading-dots/index.vue +12 -4
- package/dist/components/menu/index.d.vue.ts +2 -2
- package/dist/components/menu/index.vue +4 -4
- package/dist/components/message/index.vue +82 -48
- package/dist/components/message-item/index.vue +7 -2
- package/dist/components/modal/index.vue +20 -12
- package/dist/components/more-button/index.d.vue.ts +1 -3
- package/dist/components/more-button/index.vue +7 -17
- package/dist/components/note/cn.d.ts +121 -0
- package/dist/components/note/cn.js +66 -0
- package/dist/components/note/index.d.vue.ts +3 -39
- package/dist/components/note/index.vue +18 -37
- package/dist/components/number-input/index.d.vue.ts +19 -10
- package/dist/components/number-input/index.vue +121 -75
- package/dist/components/overlay/index.vue +4 -20
- package/dist/components/pagination/index.vue +25 -8
- package/dist/components/pin-input/cn.d.ts +46 -0
- package/dist/components/pin-input/cn.js +25 -0
- package/dist/components/pin-input/index.vue +11 -20
- package/dist/components/placeholder/index.vue +11 -4
- package/dist/components/popover/index.d.vue.ts +4 -3
- package/dist/components/popover/index.vue +107 -54
- package/dist/components/progress/cn.d.ts +19 -0
- package/dist/components/progress/cn.js +14 -0
- package/dist/components/progress/index.d.vue.ts +1 -1
- package/dist/components/progress/index.vue +21 -14
- package/dist/components/radio/cn.d.ts +46 -0
- package/dist/components/radio/cn.js +42 -0
- package/dist/components/radio/index.vue +11 -18
- package/dist/components/resizable/index.vue +8 -2
- package/dist/components/resizable-handle/index.vue +1 -0
- package/dist/components/resizable-panel/index.vue +12 -11
- package/dist/components/skeleton/cn.d.ts +43 -0
- package/dist/components/skeleton/cn.js +24 -0
- package/dist/components/skeleton/index.d.vue.ts +4 -3
- package/dist/components/skeleton/index.vue +11 -20
- package/dist/components/slider/index.d.vue.ts +1 -1
- package/dist/components/slider/index.vue +14 -12
- package/dist/components/snippet/cn.d.ts +52 -0
- package/dist/components/snippet/cn.js +27 -0
- package/dist/components/snippet/index.vue +21 -29
- package/dist/components/spinner/index.vue +3 -1
- package/dist/components/stack/cn.d.ts +70 -0
- package/dist/components/stack/cn.js +33 -0
- package/dist/components/stack/index.d.vue.ts +2 -2
- package/dist/components/stack/index.vue +16 -31
- package/dist/components/status-dot/index.vue +5 -1
- package/dist/components/switch/cn.d.ts +16 -0
- package/dist/components/switch/cn.js +13 -0
- package/dist/components/switch/index.vue +5 -11
- package/dist/components/switch-group/index.vue +7 -4
- package/dist/components/text/cn.d.ts +67 -0
- package/dist/components/text/cn.js +34 -0
- package/dist/components/text/index.d.vue.ts +1 -1
- package/dist/components/text/index.vue +16 -25
- package/dist/components/textarea/cn.d.ts +58 -0
- package/dist/components/textarea/cn.js +30 -0
- package/dist/components/textarea/index.d.vue.ts +2 -0
- package/dist/components/textarea/index.vue +17 -24
- package/dist/components/theme-switcher/index.vue +6 -3
- package/dist/components/time-picker/index.d.vue.ts +2 -2
- package/dist/components/time-picker/index.vue +45 -25
- package/dist/components/toggle/index.vue +10 -6
- package/dist/components/tooltip/index.vue +3 -3
- package/dist/components/virtual-list/index.vue +1 -7
- package/dist/composables/use-browser-observer.d.ts +1 -1
- package/dist/composables/use-browser-observer.js +19 -15
- package/dist/composables/use-config-provider-context.d.ts +1 -0
- package/dist/composables/use-config-provider-context.js +5 -10
- package/dist/composables/use-countdown.js +1 -3
- package/dist/composables/use-deferred-value.js +1 -5
- package/dist/composables/use-delay-change.js +1 -4
- package/dist/composables/use-delay-destroy.js +1 -5
- package/dist/composables/use-loading-bar.d.ts +6 -14
- package/dist/composables/use-loading-bar.js +3 -14
- package/dist/composables/use-message.d.ts +9 -3
- package/dist/composables/use-message.js +9 -9
- package/dist/composables/use-model-value.d.ts +1 -0
- package/dist/composables/use-model-value.js +4 -2
- package/dist/composables/use-outside-click.js +12 -8
- package/dist/composables/use-pointer-gesture.js +5 -1
- package/dist/composables/use-toggle-value.js +1 -4
- package/dist/composables/use-virtual-list.js +14 -7
- package/dist/contexts/avatar.js +4 -4
- package/dist/contexts/carousel.js +1 -4
- package/dist/contexts/checkbox.js +1 -4
- package/dist/contexts/choicebox.js +2 -8
- package/dist/contexts/collapse.js +1 -4
- package/dist/contexts/list.js +5 -8
- package/dist/contexts/radio.js +4 -4
- package/dist/contexts/resizable.js +1 -4
- package/dist/contexts/switch.js +2 -8
- package/dist/index.d.ts +1 -0
- package/dist/styles/source.css +106 -59
- package/dist/styles/styles.css +1 -1
- package/dist/styles/tw.css +106 -59
- package/dist/types/components/avatar.d.ts +2 -2
- package/dist/types/components/button.d.ts +11 -4
- package/dist/types/components/index.d.ts +12 -0
- package/dist/types/components/input.d.ts +4 -5
- package/dist/types/components/list.d.ts +1 -1
- package/dist/types/components/switch.d.ts +1 -1
- package/dist/types/shared/props.d.ts +6 -4
- package/dist/types/shared/utils.d.ts +3 -1
- package/dist/utils/context.d.ts +2 -8
- package/dist/utils/date.d.ts +1 -1
- package/dist/utils/date.js +1 -5
- package/dist/utils/event.js +6 -18
- package/dist/utils/format.d.ts +1 -1
- package/dist/utils/format.js +1 -1
- package/dist/utils/is.d.ts +0 -1
- package/dist/utils/is.js +3 -2
- package/dist/utils/responsive.js +7 -4
- package/dist/utils/throttle.js +4 -2
- package/package.json +45 -43
- package/dist/components/_internal/fragment-container.vue.d.ts +0 -13
- package/dist/components/active-graph/index.vue.d.ts +0 -51
- package/dist/components/avatar/index.vue.d.ts +0 -34
- package/dist/components/avatar-group/index.vue.d.ts +0 -8
- package/dist/components/backtop/index.vue.d.ts +0 -21
- package/dist/components/badge/index.vue.d.ts +0 -52
- package/dist/components/book/index.vue.d.ts +0 -28
- package/dist/components/browser/index.vue.d.ts +0 -16
- package/dist/components/button/index.vue.d.ts +0 -29
- package/dist/components/carousel/index.vue.d.ts +0 -13
- package/dist/components/carousel-group/index.vue.d.ts +0 -35
- package/dist/components/checkbox/index.vue.d.ts +0 -26
- package/dist/components/checkbox-group/index.vue.d.ts +0 -28
- package/dist/components/chip/index.vue.d.ts +0 -24
- package/dist/components/choicebox/index.vue.d.ts +0 -16
- package/dist/components/choicebox-group/index.vue.d.ts +0 -24
- package/dist/components/collapse/index.vue.d.ts +0 -22
- package/dist/components/collapse-group/index.vue.d.ts +0 -20
- package/dist/components/command-menu/index.vue.d.ts +0 -42
- package/dist/components/command-menu-group/index.vue.d.ts +0 -17
- package/dist/components/command-menu-item/index.vue.d.ts +0 -13
- package/dist/components/config-provider/index.vue.d.ts +0 -22
- package/dist/components/countdown/index.vue.d.ts +0 -51
- package/dist/components/dash-line/index.vue.d.ts +0 -13
- package/dist/components/description/index.vue.d.ts +0 -20
- package/dist/components/drawer/index.vue.d.ts +0 -60
- package/dist/components/empty-state/index.vue.d.ts +0 -23
- package/dist/components/error/index.vue.d.ts +0 -22
- package/dist/components/fader/index.vue.d.ts +0 -12
- package/dist/components/gauge/index.vue.d.ts +0 -14
- package/dist/components/grid/index.vue.d.ts +0 -19
- package/dist/components/grid-item/index.vue.d.ts +0 -18
- package/dist/components/hold-button/index.vue.d.ts +0 -42
- package/dist/components/input/index.vue.d.ts +0 -55
- package/dist/components/intersection-observer/index.vue.d.ts +0 -39
- package/dist/components/kbd/index.vue.d.ts +0 -24
- package/dist/components/label/index.vue.d.ts +0 -13
- package/dist/components/link-button/index.vue.d.ts +0 -33
- package/dist/components/list/index.vue.d.ts +0 -44
- package/dist/components/list-item/index.vue.d.ts +0 -29
- package/dist/components/loading-bar/index.vue.d.ts +0 -15
- package/dist/components/loading-dots/index.vue.d.ts +0 -15
- package/dist/components/material/index.vue.d.ts +0 -18
- package/dist/components/menu/index.vue.d.ts +0 -33
- package/dist/components/message/index.vue.d.ts +0 -176
- package/dist/components/message-item/index.vue.d.ts +0 -15
- package/dist/components/modal/index.vue.d.ts +0 -58
- package/dist/components/more-button/index.vue.d.ts +0 -20
- package/dist/components/noise-background/index.vue.d.ts +0 -19
- package/dist/components/note/index.vue.d.ts +0 -64
- package/dist/components/number-input/index.vue.d.ts +0 -39
- package/dist/components/overlay/index.vue.d.ts +0 -35
- package/dist/components/pagination/index.vue.d.ts +0 -21
- package/dist/components/pin-input/index.vue.d.ts +0 -28
- package/dist/components/placeholder/index.vue.d.ts +0 -18
- package/dist/components/popover/index.vue.d.ts +0 -73
- package/dist/components/progress/index.vue.d.ts +0 -34
- package/dist/components/radio/index.vue.d.ts +0 -20
- package/dist/components/radio-group/index.vue.d.ts +0 -22
- package/dist/components/resizable/index.vue.d.ts +0 -19
- package/dist/components/resizable-handle/index.vue.d.ts +0 -3
- package/dist/components/resizable-panel/index.vue.d.ts +0 -20
- package/dist/components/scrollable/index.vue.d.ts +0 -0
- package/dist/components/skeleton/index.vue.d.ts +0 -26
- package/dist/components/slider/index.vue.d.ts +0 -26
- package/dist/components/snippet/index.vue.d.ts +0 -18
- package/dist/components/spinner/index.vue.d.ts +0 -3
- package/dist/components/stack/index.vue.d.ts +0 -30
- package/dist/components/status-dot/index.vue.d.ts +0 -11
- package/dist/components/switch/index.vue.d.ts +0 -20
- package/dist/components/switch-group/index.vue.d.ts +0 -23
- package/dist/components/teleport/index.vue.d.ts +0 -21
- package/dist/components/text/index.vue.d.ts +0 -26
- package/dist/components/textarea/index.vue.d.ts +0 -28
- package/dist/components/theme-switcher/index.vue.d.ts +0 -8
- package/dist/components/time-picker/index.vue.d.ts +0 -35
- package/dist/components/toggle/index.vue.d.ts +0 -41
- package/dist/components/tooltip/index.vue.d.ts +0 -32
- package/dist/components/virtual-list/index.vue.d.ts +0 -24
|
@@ -36,20 +36,21 @@ onMounted(() => {
|
|
|
36
36
|
onBeforeUnmount(() => {
|
|
37
37
|
resizableContext?.unregisterPanel(uniqueId);
|
|
38
38
|
});
|
|
39
|
-
watch(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
watch(
|
|
40
|
+
() => [props.size, props.minSize],
|
|
41
|
+
() => {
|
|
42
|
+
resizableContext?.registerPanel({
|
|
43
|
+
id: uniqueId,
|
|
44
|
+
size: props.size,
|
|
45
|
+
minSize: props.minSize
|
|
46
|
+
});
|
|
47
|
+
},
|
|
48
|
+
{ deep: true }
|
|
49
|
+
);
|
|
46
50
|
</script>
|
|
47
51
|
|
|
48
52
|
<template>
|
|
49
|
-
<div
|
|
50
|
-
class="pxd-resizable-panel min-w-0 min-h-0 overflow-hidden"
|
|
51
|
-
:style="computedStyle"
|
|
52
|
-
>
|
|
53
|
+
<div class="pxd-resizable-panel min-w-0 min-h-0 overflow-hidden" :style="computedStyle">
|
|
53
54
|
<slot />
|
|
54
55
|
</div>
|
|
55
56
|
</template>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare const skeletonVariant: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
loading: {
|
|
3
|
+
true: string;
|
|
4
|
+
false: string;
|
|
5
|
+
};
|
|
6
|
+
shape: {
|
|
7
|
+
default: string;
|
|
8
|
+
square: string;
|
|
9
|
+
rounded: string;
|
|
10
|
+
};
|
|
11
|
+
animated: {
|
|
12
|
+
true: string;
|
|
13
|
+
false: string;
|
|
14
|
+
};
|
|
15
|
+
}, undefined, "pxd-skeleton relative block shrink-0 overflow-hidden", {
|
|
16
|
+
loading: {
|
|
17
|
+
true: string;
|
|
18
|
+
false: string;
|
|
19
|
+
};
|
|
20
|
+
shape: {
|
|
21
|
+
default: string;
|
|
22
|
+
square: string;
|
|
23
|
+
rounded: string;
|
|
24
|
+
};
|
|
25
|
+
animated: {
|
|
26
|
+
true: string;
|
|
27
|
+
false: string;
|
|
28
|
+
};
|
|
29
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
30
|
+
loading: {
|
|
31
|
+
true: string;
|
|
32
|
+
false: string;
|
|
33
|
+
};
|
|
34
|
+
shape: {
|
|
35
|
+
default: string;
|
|
36
|
+
square: string;
|
|
37
|
+
rounded: string;
|
|
38
|
+
};
|
|
39
|
+
animated: {
|
|
40
|
+
true: string;
|
|
41
|
+
false: string;
|
|
42
|
+
};
|
|
43
|
+
}, undefined, "pxd-skeleton relative block shrink-0 overflow-hidden", unknown, unknown, undefined>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { tv } from "tailwind-variants";
|
|
2
|
+
export const skeletonVariant = tv({
|
|
3
|
+
base: "pxd-skeleton relative block shrink-0 overflow-hidden",
|
|
4
|
+
variants: {
|
|
5
|
+
loading: {
|
|
6
|
+
true: "loading invisible",
|
|
7
|
+
false: ""
|
|
8
|
+
},
|
|
9
|
+
shape: {
|
|
10
|
+
default: "rounded-md",
|
|
11
|
+
square: "rounded-none",
|
|
12
|
+
rounded: "rounded-full"
|
|
13
|
+
},
|
|
14
|
+
animated: {
|
|
15
|
+
true: "animated after:default-animation-timing-function!",
|
|
16
|
+
false: ""
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
loading: true,
|
|
21
|
+
shape: "default",
|
|
22
|
+
animated: true
|
|
23
|
+
}
|
|
24
|
+
});
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
+
import type { ComponentShape } from '../../types/shared';
|
|
1
2
|
interface Props {
|
|
2
3
|
loading?: boolean;
|
|
3
4
|
animated?: boolean;
|
|
4
5
|
width?: string | number;
|
|
5
6
|
height?: string | number;
|
|
6
7
|
boxHeight?: string | number;
|
|
7
|
-
shape?:
|
|
8
|
+
shape?: ComponentShape;
|
|
8
9
|
}
|
|
9
10
|
declare var __VLS_1: {};
|
|
10
11
|
type __VLS_Slots = {} & {
|
|
11
12
|
default?: (props: typeof __VLS_1) => any;
|
|
12
13
|
};
|
|
13
14
|
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
14
|
-
height: string | number;
|
|
15
|
-
shape: "default" | "squared" | "rounded";
|
|
16
15
|
loading: boolean;
|
|
16
|
+
height: string | number;
|
|
17
|
+
shape: ComponentShape;
|
|
17
18
|
animated: boolean;
|
|
18
19
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
20
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { getCssUnitValue, increaseWithUnit } from "../../utils/format";
|
|
4
|
+
import { skeletonVariant } from "./cn";
|
|
4
5
|
defineOptions({
|
|
5
|
-
name: "PSkeleton"
|
|
6
|
+
name: "PSkeleton",
|
|
7
|
+
inheritAttrs: false
|
|
6
8
|
});
|
|
7
9
|
const props = defineProps({
|
|
8
10
|
loading: { type: Boolean, required: false, default: true },
|
|
@@ -23,32 +25,21 @@ const computedStyle = computed(() => {
|
|
|
23
25
|
}
|
|
24
26
|
return styles;
|
|
25
27
|
});
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
if (shape === "rounded") {
|
|
33
|
-
classes.push("rounded-full");
|
|
34
|
-
} else if (shape === "squared") {
|
|
35
|
-
classes.push("rounded-none");
|
|
36
|
-
} else {
|
|
37
|
-
classes.push("rounded-md");
|
|
38
|
-
}
|
|
39
|
-
if (animated) {
|
|
40
|
-
classes.push("animated");
|
|
41
|
-
}
|
|
42
|
-
return classes.join(" ");
|
|
28
|
+
const computedClasses = computed(() => {
|
|
29
|
+
return skeletonVariant({
|
|
30
|
+
shape: props.shape,
|
|
31
|
+
loading: props.loading,
|
|
32
|
+
animated: props.animated
|
|
33
|
+
});
|
|
43
34
|
});
|
|
44
35
|
</script>
|
|
45
36
|
|
|
46
37
|
<template>
|
|
47
|
-
<div :class="
|
|
38
|
+
<div :class="computedClasses" :style="computedStyle" v-bind="$attrs">
|
|
48
39
|
<slot />
|
|
49
40
|
</div>
|
|
50
41
|
</template>
|
|
51
42
|
|
|
52
43
|
<style>
|
|
53
|
-
.pxd-skeleton.loading:after{background:linear-gradient(90deg,var(--color-gray-100),var(--color-gray-200),var(--color-gray-100)) 0 0 /50% 100%;content:"";inset:0 -200% 0 0;position:absolute;visibility:visible}.pxd-skeleton.animated:after{animation:skeleton-loading 1.5s
|
|
44
|
+
.pxd-skeleton.loading:after{background:linear-gradient(90deg,var(--color-gray-100),var(--color-gray-200),var(--color-gray-100)) 0 0 /50% 100%;content:"";inset:0 -200% 0 0;position:absolute;visibility:visible}.pxd-skeleton.animated:after{animation:skeleton-loading 1.5s infinite reverse}@keyframes skeleton-loading{to{transform:translate3d(-50%,0,0)}}
|
|
54
45
|
</style>
|
|
@@ -16,8 +16,8 @@ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {},
|
|
|
16
16
|
onChange?: ((args_0: NonNullable<number | [number, number] | null | undefined>) => any) | undefined;
|
|
17
17
|
"onUpdate:modelValue"?: ((args_0: NonNullable<number | [number, number] | null | undefined>) => any) | undefined;
|
|
18
18
|
}>, {
|
|
19
|
-
variant: ComponentVariant | "secondary";
|
|
20
19
|
max: number;
|
|
20
|
+
variant: ComponentVariant | "secondary";
|
|
21
21
|
modelValue: number | [number, number] | null;
|
|
22
22
|
min: number;
|
|
23
23
|
step: number;
|
|
@@ -46,11 +46,11 @@ const VARIANTS = {
|
|
|
46
46
|
let isDragging = false;
|
|
47
47
|
let lastClientX;
|
|
48
48
|
let animationFrameId;
|
|
49
|
-
const
|
|
49
|
+
const configProvider = useConfigProvider();
|
|
50
50
|
const sliderRef = shallowRef();
|
|
51
51
|
const modelValue = useModelValue(props, emits);
|
|
52
52
|
const activeThumb = shallowRef();
|
|
53
|
-
const computedSize = computed(() => getFallbackValue(props.size, SIZES,
|
|
53
|
+
const computedSize = computed(() => getFallbackValue(props.size, SIZES, configProvider.size));
|
|
54
54
|
const valueArray = computed(() => {
|
|
55
55
|
if (props.range) {
|
|
56
56
|
return Array.isArray(modelValue.value) ? modelValue.value : [props.min, modelValue.value];
|
|
@@ -88,22 +88,21 @@ function updateValueFromPosition(clientX) {
|
|
|
88
88
|
const rawValue = props.min + posPercentage * range;
|
|
89
89
|
const newValue = Math.max(
|
|
90
90
|
props.min,
|
|
91
|
-
Math.min(
|
|
92
|
-
props.max,
|
|
93
|
-
props.step > 0 ? Math.round(rawValue / props.step) * props.step : rawValue
|
|
94
|
-
)
|
|
91
|
+
Math.min(props.max, props.step > 0 ? Math.round(rawValue / props.step) * props.step : rawValue)
|
|
95
92
|
);
|
|
96
93
|
if (props.range) {
|
|
97
94
|
const newValueArray = [...valueArray.value];
|
|
98
95
|
if (activeThumb.value === "start") {
|
|
99
96
|
newValueArray[0] = newValue;
|
|
100
97
|
if (newValue > newValueArray[1]) {
|
|
98
|
+
;
|
|
101
99
|
[newValueArray[0], newValueArray[1]] = [newValueArray[1], newValueArray[0]];
|
|
102
100
|
activeThumb.value = "end";
|
|
103
101
|
}
|
|
104
102
|
} else {
|
|
105
103
|
newValueArray[1] = newValue;
|
|
106
104
|
if (newValue < newValueArray[0]) {
|
|
105
|
+
;
|
|
107
106
|
[newValueArray[0], newValueArray[1]] = [newValueArray[1], newValueArray[0]];
|
|
108
107
|
activeThumb.value = "start";
|
|
109
108
|
}
|
|
@@ -207,22 +206,25 @@ onBeforeUnmount(() => {
|
|
|
207
206
|
:class="[{ 'cursor-not-allowed': disabled }, computedSize.track]"
|
|
208
207
|
@pointerdown.prevent="onWrapperPointerdown"
|
|
209
208
|
>
|
|
210
|
-
<div
|
|
211
|
-
class="pxd-slider--track absolute h-full touch-none rounded-full"
|
|
212
|
-
:style="trackStyle"
|
|
213
|
-
/>
|
|
209
|
+
<div class="pxd-slider--track absolute h-full touch-none rounded-full" :style="trackStyle" />
|
|
214
210
|
|
|
215
211
|
<div
|
|
216
212
|
v-if="props.range"
|
|
217
213
|
class="pxd-slider--thumb rounded-xs absolute -translate-x-1/2 touch-none bg-background-100 hover:scale-130 active:z-1 active:scale-130 motion-safe:transition-transform"
|
|
218
|
-
:class="[
|
|
214
|
+
:class="[
|
|
215
|
+
{ 'scale-130': activeThumb === 'start', 'pointer-events-none': disabled },
|
|
216
|
+
computedSize.thumb
|
|
217
|
+
]"
|
|
219
218
|
:style="{ left: `${startPercentage}%` }"
|
|
220
219
|
@pointerdown.prevent.stop="startDragging($event, 'start')"
|
|
221
220
|
/>
|
|
222
221
|
|
|
223
222
|
<div
|
|
224
223
|
class="pxd-slider--thumb rounded-xs absolute -translate-x-1/2 touch-none bg-background-100 hover:scale-130 active:z-1 active:scale-130 motion-safe:transition-transform"
|
|
225
|
-
:class="[
|
|
224
|
+
:class="[
|
|
225
|
+
{ 'scale-130': activeThumb === 'end', 'pointer-events-none': disabled },
|
|
226
|
+
computedSize.thumb
|
|
227
|
+
]"
|
|
226
228
|
:style="{ left: `${endPercentage}%` }"
|
|
227
229
|
@pointerdown.prevent.stop="startDragging($event, 'end')"
|
|
228
230
|
/>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export declare const snippetVariant: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
size: {
|
|
3
|
+
sm: string;
|
|
4
|
+
md: string;
|
|
5
|
+
lg: string;
|
|
6
|
+
};
|
|
7
|
+
variant: {
|
|
8
|
+
default: string;
|
|
9
|
+
primary: string;
|
|
10
|
+
success: string;
|
|
11
|
+
error: string;
|
|
12
|
+
warning: string;
|
|
13
|
+
};
|
|
14
|
+
prompt: {
|
|
15
|
+
true: string;
|
|
16
|
+
false: string;
|
|
17
|
+
};
|
|
18
|
+
}, undefined, "pxd-snippet pr-12 relative flex items-center rounded-lg border motion-safe:transition-all", {
|
|
19
|
+
size: {
|
|
20
|
+
sm: string;
|
|
21
|
+
md: string;
|
|
22
|
+
lg: string;
|
|
23
|
+
};
|
|
24
|
+
variant: {
|
|
25
|
+
default: string;
|
|
26
|
+
primary: string;
|
|
27
|
+
success: string;
|
|
28
|
+
error: string;
|
|
29
|
+
warning: string;
|
|
30
|
+
};
|
|
31
|
+
prompt: {
|
|
32
|
+
true: string;
|
|
33
|
+
false: string;
|
|
34
|
+
};
|
|
35
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
36
|
+
size: {
|
|
37
|
+
sm: string;
|
|
38
|
+
md: string;
|
|
39
|
+
lg: string;
|
|
40
|
+
};
|
|
41
|
+
variant: {
|
|
42
|
+
default: string;
|
|
43
|
+
primary: string;
|
|
44
|
+
success: string;
|
|
45
|
+
error: string;
|
|
46
|
+
warning: string;
|
|
47
|
+
};
|
|
48
|
+
prompt: {
|
|
49
|
+
true: string;
|
|
50
|
+
false: string;
|
|
51
|
+
};
|
|
52
|
+
}, undefined, "pxd-snippet pr-12 relative flex items-center rounded-lg border motion-safe:transition-all", unknown, unknown, undefined>>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { tv } from "tailwind-variants";
|
|
2
|
+
export const snippetVariant = tv({
|
|
3
|
+
base: "pxd-snippet pr-12 relative flex items-center rounded-lg border motion-safe:transition-all",
|
|
4
|
+
variants: {
|
|
5
|
+
size: {
|
|
6
|
+
sm: "min-h-7.5 pl-3.5 pr-1.5 py-2 text-sm",
|
|
7
|
+
md: "min-h-9 pl-3.5 pr-2.5 py-2.5 text-sm",
|
|
8
|
+
lg: "min-h-10 pl-3.5 pr-3.5 py-3 text-base"
|
|
9
|
+
},
|
|
10
|
+
variant: {
|
|
11
|
+
default: "border-gray-alpha-300 bg-background-100",
|
|
12
|
+
primary: "border-gray-alpha-300 bg-primary text-gray-100",
|
|
13
|
+
success: "border-gray-alpha-300 bg-blue-200 text-blue-900",
|
|
14
|
+
error: "border-gray-alpha-300 bg-red-200 text-red-900",
|
|
15
|
+
warning: "border-gray-alpha-300 bg-amber-200 text-amber-900"
|
|
16
|
+
},
|
|
17
|
+
prompt: {
|
|
18
|
+
true: "pxd-snippet--prompt",
|
|
19
|
+
false: ""
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
size: "md",
|
|
24
|
+
variant: "default",
|
|
25
|
+
prompt: false
|
|
26
|
+
}
|
|
27
|
+
});
|
|
@@ -4,10 +4,11 @@ import CopyIcon from "@gdsicon/vue/copy";
|
|
|
4
4
|
import { computed } from "vue";
|
|
5
5
|
import { useConfigProvider } from "../../composables/use-config-provider-context";
|
|
6
6
|
import { useCopyClick } from "../../composables/use-copy-click";
|
|
7
|
-
import { getCssUnitValue, toArray } from "../../utils/format";
|
|
8
|
-
import {
|
|
7
|
+
import { getCssUnitValue, isTruthyProp, toArray } from "../../utils/format";
|
|
8
|
+
import { snippetVariant } from "./cn";
|
|
9
9
|
defineOptions({
|
|
10
|
-
name: "PSnippet"
|
|
10
|
+
name: "PSnippet",
|
|
11
|
+
inheritAttrs: false
|
|
11
12
|
});
|
|
12
13
|
const props = defineProps({
|
|
13
14
|
text: { type: [String, Array], required: true },
|
|
@@ -17,33 +18,17 @@ const props = defineProps({
|
|
|
17
18
|
variant: { type: String, required: false, default: "default" }
|
|
18
19
|
});
|
|
19
20
|
const emits = defineEmits(["copy"]);
|
|
20
|
-
const
|
|
21
|
-
sm: "min-h-7.5 pl-3.5 pr-1.5 py-2 text-sm",
|
|
22
|
-
md: "min-h-9 pl-3.5 pr-2.5 py-2.5 text-sm",
|
|
23
|
-
lg: "min-h-10 pl-3.5 pr-3.5 py-3 text-base"
|
|
24
|
-
};
|
|
25
|
-
const VARIANTS = {
|
|
26
|
-
default: "border-gray-alpha-300 bg-background-100",
|
|
27
|
-
primary: "text-gray-100 border-gray-alpha-300 bg-primary",
|
|
28
|
-
success: "text-blue-900 border-gray-alpha-300 bg-blue-200",
|
|
29
|
-
error: "text-red-900 border-gray-alpha-300 bg-red-200",
|
|
30
|
-
warning: "text-amber-900 border-gray-alpha-300 bg-amber-200"
|
|
31
|
-
};
|
|
32
|
-
const config = useConfigProvider();
|
|
21
|
+
const configProvider = useConfigProvider();
|
|
33
22
|
const { isCopied, copyText } = useCopyClick();
|
|
34
23
|
const renderIcon = computed(() => isCopied.value ? CheckIcon : CopyIcon);
|
|
35
|
-
const computedClass = computed(() => {
|
|
36
|
-
const classes = [
|
|
37
|
-
"pxd-snippet pr-12 relative flex items-center rounded-lg border motion-safe:transition-all",
|
|
38
|
-
getFallbackValue(props.variant, VARIANTS),
|
|
39
|
-
getFallbackValue(props.size, SIZES, config.size)
|
|
40
|
-
];
|
|
41
|
-
if (props.prompt) {
|
|
42
|
-
classes.push("pxd-snippet--prompt");
|
|
43
|
-
}
|
|
44
|
-
return classes.join(" ");
|
|
45
|
-
});
|
|
46
24
|
const computedTextArray = computed(() => toArray(props.text));
|
|
25
|
+
const computedClasses = computed(() => {
|
|
26
|
+
return snippetVariant({
|
|
27
|
+
size: props.size || configProvider.size,
|
|
28
|
+
variant: props.variant,
|
|
29
|
+
prompt: isTruthyProp(props.prompt)
|
|
30
|
+
});
|
|
31
|
+
});
|
|
47
32
|
async function onCopyButtonClick() {
|
|
48
33
|
const text = computedTextArray.value.join("\n");
|
|
49
34
|
await copyText(text);
|
|
@@ -52,9 +37,16 @@ async function onCopyButtonClick() {
|
|
|
52
37
|
</script>
|
|
53
38
|
|
|
54
39
|
<template>
|
|
55
|
-
<div :class="
|
|
40
|
+
<div :class="computedClasses" :style="{ width: getCssUnitValue(props.width) }" v-bind="$attrs">
|
|
56
41
|
<div class="pxd-snippet--container">
|
|
57
|
-
<pre
|
|
42
|
+
<pre
|
|
43
|
+
v-for="(t, i) of computedTextArray"
|
|
44
|
+
:key="i"
|
|
45
|
+
class="m-0 p-0"
|
|
46
|
+
:data-prompt="prompt"
|
|
47
|
+
:class="{ 'before:content-[attr(data-prompt)] before:select-none': prompt }"
|
|
48
|
+
>{{ t }}</pre
|
|
49
|
+
>
|
|
58
50
|
</div>
|
|
59
51
|
|
|
60
52
|
<div
|
|
@@ -8,7 +8,9 @@ const OPACITY_STEP = 1 / ITEMS_COUNT;
|
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<template>
|
|
11
|
-
<div
|
|
11
|
+
<div
|
|
12
|
+
class="pxd-spinner transform-origin-center motion-safe:animate-spin pointer-events-none relative size-em overflow-hidden text-gray-700"
|
|
13
|
+
>
|
|
12
14
|
<div class="pxd-spinner-container top-0 left-0 absolute size-full">
|
|
13
15
|
<div
|
|
14
16
|
v-for="i of ITEMS_COUNT"
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export declare const stackVariant: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
wrap: {
|
|
3
|
+
true: string;
|
|
4
|
+
false: string;
|
|
5
|
+
};
|
|
6
|
+
align: {
|
|
7
|
+
start: string;
|
|
8
|
+
end: string;
|
|
9
|
+
center: string;
|
|
10
|
+
between: string;
|
|
11
|
+
around: string;
|
|
12
|
+
evenly: string;
|
|
13
|
+
stretch: string;
|
|
14
|
+
};
|
|
15
|
+
justify: {
|
|
16
|
+
start: string;
|
|
17
|
+
end: string;
|
|
18
|
+
center: string;
|
|
19
|
+
between: string;
|
|
20
|
+
around: string;
|
|
21
|
+
evenly: string;
|
|
22
|
+
stretch: string;
|
|
23
|
+
};
|
|
24
|
+
}, undefined, "pxd-stack flex max-w-full gap-(--xs) [--xs:1rem]", {
|
|
25
|
+
wrap: {
|
|
26
|
+
true: string;
|
|
27
|
+
false: string;
|
|
28
|
+
};
|
|
29
|
+
align: {
|
|
30
|
+
start: string;
|
|
31
|
+
end: string;
|
|
32
|
+
center: string;
|
|
33
|
+
between: string;
|
|
34
|
+
around: string;
|
|
35
|
+
evenly: string;
|
|
36
|
+
stretch: string;
|
|
37
|
+
};
|
|
38
|
+
justify: {
|
|
39
|
+
start: string;
|
|
40
|
+
end: string;
|
|
41
|
+
center: string;
|
|
42
|
+
between: string;
|
|
43
|
+
around: string;
|
|
44
|
+
evenly: string;
|
|
45
|
+
stretch: string;
|
|
46
|
+
};
|
|
47
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
48
|
+
wrap: {
|
|
49
|
+
true: string;
|
|
50
|
+
false: string;
|
|
51
|
+
};
|
|
52
|
+
align: {
|
|
53
|
+
start: string;
|
|
54
|
+
end: string;
|
|
55
|
+
center: string;
|
|
56
|
+
between: string;
|
|
57
|
+
around: string;
|
|
58
|
+
evenly: string;
|
|
59
|
+
stretch: string;
|
|
60
|
+
};
|
|
61
|
+
justify: {
|
|
62
|
+
start: string;
|
|
63
|
+
end: string;
|
|
64
|
+
center: string;
|
|
65
|
+
between: string;
|
|
66
|
+
around: string;
|
|
67
|
+
evenly: string;
|
|
68
|
+
stretch: string;
|
|
69
|
+
};
|
|
70
|
+
}, undefined, "pxd-stack flex max-w-full gap-(--xs) [--xs:1rem]", unknown, unknown, undefined>>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { tv } from "tailwind-variants";
|
|
2
|
+
export const stackVariant = tv({
|
|
3
|
+
base: "pxd-stack flex max-w-full gap-(--xs) [--xs:1rem]",
|
|
4
|
+
variants: {
|
|
5
|
+
wrap: {
|
|
6
|
+
true: "flex-wrap",
|
|
7
|
+
false: ""
|
|
8
|
+
},
|
|
9
|
+
align: {
|
|
10
|
+
start: "items-start",
|
|
11
|
+
end: "items-end",
|
|
12
|
+
center: "items-center",
|
|
13
|
+
between: "items-between",
|
|
14
|
+
around: "items-around",
|
|
15
|
+
evenly: "items-evenly",
|
|
16
|
+
stretch: "items-stretch"
|
|
17
|
+
},
|
|
18
|
+
justify: {
|
|
19
|
+
start: "flex-start",
|
|
20
|
+
end: "flex-end",
|
|
21
|
+
center: "justify-center",
|
|
22
|
+
between: "justify-between",
|
|
23
|
+
around: "justify-around",
|
|
24
|
+
evenly: "justify-evenly",
|
|
25
|
+
stretch: "justify-stretch"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
defaultVariants: {
|
|
29
|
+
wrap: true,
|
|
30
|
+
align: "start",
|
|
31
|
+
justify: "start"
|
|
32
|
+
}
|
|
33
|
+
});
|
|
@@ -14,11 +14,11 @@ type __VLS_Slots = {} & {
|
|
|
14
14
|
default?: (props: typeof __VLS_8) => any;
|
|
15
15
|
};
|
|
16
16
|
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
17
|
-
as: ComponentAs;
|
|
18
17
|
align: Align;
|
|
18
|
+
as: ComponentAs;
|
|
19
19
|
wrap: boolean;
|
|
20
|
-
scale: number;
|
|
21
20
|
justify: Align;
|
|
21
|
+
scale: number;
|
|
22
22
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
23
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
24
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed } from "vue";
|
|
3
3
|
import { getResponsiveValue } from "../../utils/responsive";
|
|
4
|
+
import { stackVariant } from "./cn";
|
|
4
5
|
defineOptions({
|
|
5
6
|
name: "PStack",
|
|
6
7
|
inheritAttrs: false
|
|
@@ -14,7 +15,7 @@ const props = defineProps({
|
|
|
14
15
|
justify: { type: String, required: false, default: "start" },
|
|
15
16
|
direction: { type: [String, Object], required: false }
|
|
16
17
|
});
|
|
17
|
-
const
|
|
18
|
+
const presetDir = {
|
|
18
19
|
"--xs:vertical": "flex-col",
|
|
19
20
|
"--xs:horizontal": "flex-row",
|
|
20
21
|
"--sm:vertical": "sm:flex-col",
|
|
@@ -26,31 +27,13 @@ const presetDirClasses = {
|
|
|
26
27
|
"--xl:vertical": "xl:flex-col",
|
|
27
28
|
"--xl:horizontal": "xl:flex-row"
|
|
28
29
|
};
|
|
29
|
-
const
|
|
30
|
+
const presetGap = {
|
|
30
31
|
"--xs": "gap-(--xs)",
|
|
31
32
|
"--sm": "sm:gap-(--sm)",
|
|
32
33
|
"--md": "md:gap-(--md)",
|
|
33
34
|
"--lg": "lg:gap-(--lg)",
|
|
34
35
|
"--xl": "xl:gap-(--xl)"
|
|
35
36
|
};
|
|
36
|
-
const presetAlignClasses = {
|
|
37
|
-
start: "items-start",
|
|
38
|
-
end: "items-end",
|
|
39
|
-
center: "items-center",
|
|
40
|
-
between: "items-between",
|
|
41
|
-
around: "items-around",
|
|
42
|
-
evenly: "items-evenly",
|
|
43
|
-
stretch: "items-stretch"
|
|
44
|
-
};
|
|
45
|
-
const presetJustifyClasses = {
|
|
46
|
-
start: "flex-start",
|
|
47
|
-
end: "flex-end",
|
|
48
|
-
center: "justify-center",
|
|
49
|
-
between: "justify-between",
|
|
50
|
-
around: "justify-around",
|
|
51
|
-
evenly: "justify-evenly",
|
|
52
|
-
stretch: "justify-stretch"
|
|
53
|
-
};
|
|
54
37
|
const formattedGap = computed(() => {
|
|
55
38
|
const { gap, scale } = props;
|
|
56
39
|
return getResponsiveValue(
|
|
@@ -65,20 +48,22 @@ const formattedDirection = computed(() => {
|
|
|
65
48
|
props.direction,
|
|
66
49
|
(typeof direction === "object" ? direction.xs : direction) ?? "horizontal",
|
|
67
50
|
(acc, bp, value) => {
|
|
68
|
-
acc[bp] =
|
|
51
|
+
acc[bp] = presetDir[`--${bp}:${value}`];
|
|
69
52
|
}
|
|
70
53
|
);
|
|
71
54
|
});
|
|
72
|
-
const
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
55
|
+
const computedClasses = computed(() => {
|
|
56
|
+
const baseClass = stackVariant({
|
|
57
|
+
wrap: props.wrap,
|
|
58
|
+
align: props.align,
|
|
59
|
+
justify: props.justify
|
|
60
|
+
});
|
|
61
|
+
const classes = [
|
|
62
|
+
baseClass,
|
|
78
63
|
...Object.values(formattedDirection.value),
|
|
79
|
-
...Object.keys(formattedGap.value).map((bp) =>
|
|
80
|
-
);
|
|
81
|
-
return classes
|
|
64
|
+
...Object.keys(formattedGap.value).map((bp) => presetGap[bp])
|
|
65
|
+
].filter(Boolean).join(" ");
|
|
66
|
+
return classes;
|
|
82
67
|
});
|
|
83
68
|
</script>
|
|
84
69
|
|
|
@@ -86,7 +71,7 @@ const computedClass = computed(() => {
|
|
|
86
71
|
<Component
|
|
87
72
|
:is="props.as"
|
|
88
73
|
class="pxd-stack flex max-w-full"
|
|
89
|
-
:class="
|
|
74
|
+
:class="computedClasses"
|
|
90
75
|
v-bind="$attrs"
|
|
91
76
|
:style="formattedGap"
|
|
92
77
|
>
|
|
@@ -25,7 +25,11 @@ function getLabelText() {
|
|
|
25
25
|
|
|
26
26
|
<template>
|
|
27
27
|
<span class="pxd-state-dot inline-flex items-center">
|
|
28
|
-
<i
|
|
28
|
+
<i
|
|
29
|
+
aria-hidden="true"
|
|
30
|
+
class="w-2.5 h-2.5 inline-block rounded-full"
|
|
31
|
+
:class="stateClassNames[state]"
|
|
32
|
+
/>
|
|
29
33
|
|
|
30
34
|
<span v-if="label" class="pl-2 pr-1 min-w-0 text-sm truncate after:content-[attr(aria-label)]">
|
|
31
35
|
{{ getLabelText() }}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const switchVariant: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
disabled: {
|
|
3
|
+
true: string;
|
|
4
|
+
false: string;
|
|
5
|
+
};
|
|
6
|
+
}, undefined, "pxd-switch--label px-3 text-sm font-medium flex size-full items-center justify-center truncate rounded-sm text-foreground-secondary peer-focus-ring select-none peer-checked:bg-gray-100 peer-disabled:cursor-not-allowed peer-disabled:text-gray-800 empty:hidden motion-safe:transition-all", {
|
|
7
|
+
disabled: {
|
|
8
|
+
true: string;
|
|
9
|
+
false: string;
|
|
10
|
+
};
|
|
11
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
12
|
+
disabled: {
|
|
13
|
+
true: string;
|
|
14
|
+
false: string;
|
|
15
|
+
};
|
|
16
|
+
}, undefined, "pxd-switch--label px-3 text-sm font-medium flex size-full items-center justify-center truncate rounded-sm text-foreground-secondary peer-focus-ring select-none peer-checked:bg-gray-100 peer-disabled:cursor-not-allowed peer-disabled:text-gray-800 empty:hidden motion-safe:transition-all", unknown, unknown, undefined>>;
|