pxd 0.0.53 → 0.0.55
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/active-graph/index.d.vue.ts +4 -28
- package/dist/components/active-graph/index.vue +43 -23
- package/dist/components/active-graph/types.d.ts +41 -0
- package/dist/components/avatar/index.d.vue.ts +4 -11
- package/dist/components/avatar/index.vue +3 -1
- package/dist/components/avatar/types.d.ts +27 -0
- package/dist/components/avatar-group/index.d.vue.ts +2 -2
- package/dist/components/avatar-group/index.vue +1 -1
- package/dist/components/backtop/index.d.vue.ts +2 -7
- package/dist/components/backtop/types.d.ts +6 -0
- package/dist/components/badge/index.d.vue.ts +4 -11
- package/dist/components/badge/types.d.ts +9 -0
- package/dist/components/book/index.d.vue.ts +2 -9
- package/dist/components/book/types.d.ts +9 -0
- package/dist/components/browser/index.d.vue.ts +2 -4
- package/dist/components/browser/types.d.ts +3 -0
- package/dist/components/button/index.d.vue.ts +2 -2
- package/dist/{types/components/button.d.ts → components/button/types.d.ts} +1 -1
- package/dist/{types/components/carousel.d.ts → components/carousel/types.d.ts} +5 -1
- package/dist/components/carousel-group/index.d.vue.ts +2 -2
- package/dist/components/checkbox/index.d.vue.ts +1 -1
- package/dist/components/checkbox/index.vue +2 -0
- package/dist/{types/components/checkbox.d.ts → components/checkbox/types.d.ts} +18 -8
- package/dist/components/checkbox-group/index.d.vue.ts +1 -1
- package/dist/components/chip/index.d.vue.ts +4 -10
- package/dist/components/chip/types.d.ts +8 -0
- package/dist/components/choicebox/index.d.vue.ts +1 -1
- package/dist/{types/components/choicebox.d.ts → components/choicebox/types.d.ts} +12 -7
- package/dist/components/choicebox-group/index.d.vue.ts +1 -1
- package/dist/components/collapse/index.d.vue.ts +2 -5
- package/dist/components/collapse/types.d.ts +11 -0
- package/dist/components/collapse-group/index.d.vue.ts +2 -6
- package/dist/components/command-menu/index.d.vue.ts +4 -11
- package/dist/components/command-menu/types.d.ts +23 -0
- package/dist/components/command-menu-group/index.d.vue.ts +2 -5
- package/dist/components/config-provider/index.d.vue.ts +1 -1
- package/dist/components/config-provider/types.d.ts +7 -0
- package/dist/components/countdown/index.d.vue.ts +3 -6
- package/dist/components/countdown/types.d.ts +11 -0
- package/dist/components/dash-line/index.d.vue.ts +3 -10
- package/dist/components/dash-line/types.d.ts +9 -0
- package/dist/components/description/index.d.vue.ts +2 -6
- package/dist/components/description/types.d.ts +5 -0
- package/dist/components/drawer/index.d.vue.ts +4 -20
- package/dist/components/drawer/types.d.ts +27 -0
- package/dist/components/empty-state/index.d.vue.ts +2 -5
- package/dist/components/empty-state/types.d.ts +4 -0
- package/dist/components/error/index.d.vue.ts +3 -9
- package/dist/components/error/index.vue +1 -1
- package/dist/components/error/types.d.ts +8 -0
- package/dist/components/fader/index.d.vue.ts +3 -9
- package/dist/components/fader/types.d.ts +8 -0
- package/dist/components/gauge/index.d.vue.ts +2 -9
- package/dist/components/gauge/types.d.ts +9 -0
- package/dist/components/grid/index.d.vue.ts +2 -7
- package/dist/components/grid/types.d.ts +12 -0
- package/dist/components/grid-item/index.d.vue.ts +2 -6
- package/dist/components/hold-button/index.d.vue.ts +3 -10
- package/dist/components/hold-button/types.d.ts +19 -0
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.js +0 -1
- package/dist/components/input/index.d.vue.ts +4 -6
- package/dist/components/input/index.vue +5 -4
- package/dist/{types/components/input.d.ts → components/input/types.d.ts} +13 -0
- package/dist/components/intersection-observer/index.d.vue.ts +3 -10
- package/dist/components/intersection-observer/types.d.ts +17 -0
- package/dist/components/kbd/index.d.vue.ts +2 -12
- package/dist/components/kbd/index.vue +1 -1
- package/dist/components/kbd/types.d.ts +11 -0
- package/dist/components/link-button/index.d.vue.ts +3 -11
- package/dist/components/link-button/types.d.ts +14 -0
- package/dist/components/list/index.d.vue.ts +4 -11
- package/dist/components/list/types.d.ts +40 -0
- package/dist/components/list-item/index.d.vue.ts +6 -13
- package/dist/components/list-item/index.vue +6 -3
- package/dist/components/loading-bar/cn.js +1 -1
- package/dist/components/loading-bar/index.d.vue.ts +2 -9
- package/dist/components/loading-bar/types.d.ts +10 -0
- package/dist/components/material/index.d.vue.ts +2 -4
- package/dist/components/material/index.vue +7 -0
- package/dist/components/material/types.d.ts +3 -0
- package/dist/components/menu/index.d.vue.ts +3 -10
- package/dist/components/menu/types.d.ts +11 -0
- package/dist/components/message/index.d.vue.ts +10 -17
- package/dist/components/message/index.vue +4 -0
- package/dist/components/message/types.d.ts +25 -0
- package/dist/components/message-item/index.d.vue.ts +3 -8
- package/dist/components/modal/index.d.vue.ts +3 -18
- package/dist/components/modal/types.d.ts +26 -0
- package/dist/components/more-button/index.d.vue.ts +3 -7
- package/dist/components/more-button/types.d.ts +10 -0
- package/dist/components/noise-background/index.d.vue.ts +3 -6
- package/dist/components/noise-background/types.d.ts +5 -0
- package/dist/components/note/index.d.vue.ts +3 -9
- package/dist/components/note/types.d.ts +9 -0
- package/dist/components/number-input/index.d.vue.ts +3 -13
- package/dist/components/number-input/types.d.ts +24 -0
- package/dist/components/overlay/index.d.vue.ts +3 -12
- package/dist/components/overlay/types.d.ts +16 -0
- package/dist/components/pagination/index.d.vue.ts +2 -9
- package/dist/components/pagination/types.d.ts +9 -0
- package/dist/components/pin-input/index.d.vue.ts +3 -16
- package/dist/components/pin-input/index.vue +7 -1
- package/dist/components/pin-input/types.d.ts +27 -0
- package/dist/components/placeholder/index.d.vue.ts +2 -6
- package/dist/components/placeholder/types.d.ts +5 -0
- package/dist/components/popover/index.d.vue.ts +4 -30
- package/dist/components/popover/index.vue +20 -1
- package/dist/components/popover/types.d.ts +37 -0
- package/dist/components/progress/index.d.vue.ts +4 -13
- package/dist/components/progress/index.vue +2 -0
- package/dist/components/progress/types.d.ts +16 -0
- package/dist/components/radio/cn.d.ts +2 -2
- package/dist/components/radio/cn.js +1 -1
- package/dist/components/radio/index.d.vue.ts +1 -1
- package/dist/{types/components/radio.d.ts → components/radio/types.d.ts} +17 -7
- package/dist/components/radio-group/index.d.vue.ts +1 -1
- package/dist/components/resizable/index.d.vue.ts +3 -6
- package/dist/components/resizable/index.vue +3 -1
- package/dist/components/resizable/types.d.ts +23 -0
- package/dist/components/resizable-handle/index.vue +3 -1
- package/dist/components/resizable-panel/index.d.vue.ts +2 -5
- package/dist/components/scrollable/index.vue +3 -1
- package/dist/components/scrollable/types.d.ts +24 -0
- package/dist/components/skeleton/index.d.vue.ts +3 -11
- package/dist/components/skeleton/types.d.ts +10 -0
- package/dist/components/slider/index.d.vue.ts +4 -14
- package/dist/components/slider/types.d.ts +17 -0
- package/dist/components/snippet/index.d.vue.ts +4 -11
- package/dist/components/snippet/types.d.ts +13 -0
- package/dist/components/stack/index.d.vue.ts +5 -15
- package/dist/components/stack/types.d.ts +13 -0
- package/dist/components/status-dot/index.d.vue.ts +3 -7
- package/dist/components/status-dot/index.vue +1 -1
- package/dist/components/status-dot/types.d.ts +6 -0
- package/dist/components/switch/index.d.vue.ts +2 -8
- package/dist/components/switch/types.d.ts +22 -0
- package/dist/components/switch-group/index.d.vue.ts +1 -1
- package/dist/components/teleport/index.d.vue.ts +2 -5
- package/dist/components/teleport/types.d.ts +9 -0
- package/dist/components/text/index.d.vue.ts +3 -11
- package/dist/components/text/types.d.ts +10 -0
- package/dist/components/textarea/index.d.vue.ts +8 -22
- package/dist/components/textarea/types.d.ts +23 -0
- package/dist/components/theme-switcher/index.d.vue.ts +2 -3
- package/dist/components/theme-switcher/types.d.ts +5 -0
- package/dist/components/time-picker/index.d.vue.ts +5 -19
- package/dist/components/time-picker/types.d.ts +28 -0
- package/dist/components/toggle/index.d.vue.ts +9 -23
- package/dist/components/toggle/types.d.ts +22 -0
- package/dist/components/tooltip/index.d.vue.ts +4 -16
- package/dist/components/tooltip/types.d.ts +15 -0
- package/dist/components/virtual-list/index.d.vue.ts +2 -6
- package/dist/components/virtual-list/types.d.ts +5 -0
- package/dist/composables/use-config-provider-context.d.ts +1 -6
- package/dist/composables/use-countdown.d.ts +2 -2
- package/dist/composables/use-delay-destroy.d.ts +2 -1
- package/dist/composables/use-delay-destroy.js +1 -1
- package/dist/composables/use-message.d.ts +1 -1
- package/dist/contexts/avatar.d.ts +1 -1
- package/dist/contexts/carousel.d.ts +1 -1
- package/dist/contexts/checkbox.d.ts +1 -1
- package/dist/contexts/choicebox.d.ts +1 -1
- package/dist/contexts/list.d.ts +1 -1
- package/dist/contexts/radio.d.ts +1 -1
- package/dist/contexts/switch.d.ts +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/styles/styles.css +1 -1
- package/package.json +10 -9
- package/volar.d.ts +78 -80
- package/dist/components/command-menu-item/index.d.vue.ts +0 -13
- package/dist/components/command-menu-item/index.vue +0 -13
- package/dist/types/components/avatar.d.ts +0 -11
- package/dist/types/components/error.d.ts +0 -6
- package/dist/types/components/index.d.ts +0 -12
- package/dist/types/components/list.d.ts +0 -12
- package/dist/types/components/popover.d.ts +0 -1
- package/dist/types/components/switch.d.ts +0 -10
- package/dist/types/components/time-picker.d.ts +0 -4
- /package/dist/{types/components/time-picker.js → components/virtual-list/types.js} +0 -0
|
@@ -1,41 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
date: string;
|
|
3
|
-
count: string;
|
|
4
|
-
}
|
|
5
|
-
interface Props {
|
|
6
|
-
data?: Record<string, any>[];
|
|
7
|
-
legend?: boolean;
|
|
8
|
-
startDate?: string | Date;
|
|
9
|
-
endDate?: string | Date;
|
|
10
|
-
colors?: Record<string, string>;
|
|
11
|
-
graphOnly?: boolean;
|
|
12
|
-
transpose?: boolean;
|
|
13
|
-
tooltip?: boolean;
|
|
14
|
-
fieldNames?: FieldNames;
|
|
15
|
-
itemRadius?: string | number;
|
|
16
|
-
}
|
|
17
|
-
interface TooltipInfo {
|
|
18
|
-
date: string;
|
|
19
|
-
count: number;
|
|
20
|
-
left: number;
|
|
21
|
-
top: number;
|
|
22
|
-
}
|
|
1
|
+
import type { ActiveGraphProps, ActiveGraphTooltipInfo } from './types';
|
|
23
2
|
declare var __VLS_7: {
|
|
24
|
-
data:
|
|
3
|
+
data: ActiveGraphTooltipInfo;
|
|
25
4
|
};
|
|
26
5
|
type __VLS_Slots = {} & {
|
|
27
6
|
tooltip?: (props: typeof __VLS_7) => any;
|
|
28
7
|
};
|
|
29
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<ActiveGraphProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
30
9
|
"cell-click": (args_0: MouseEvent, args_1: string) => any;
|
|
31
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<ActiveGraphProps> & Readonly<{
|
|
32
11
|
"onCell-click"?: ((args_0: MouseEvent, args_1: string) => any) | undefined;
|
|
33
12
|
}>, {
|
|
34
13
|
data: Record<string, any>[];
|
|
35
14
|
legend: boolean;
|
|
36
|
-
startDate: string | Date;
|
|
37
|
-
endDate: string | Date;
|
|
38
|
-
colors: Record<string, string>;
|
|
39
15
|
graphOnly: boolean;
|
|
40
16
|
tooltip: boolean;
|
|
41
17
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -6,27 +6,15 @@ import { getAllDatesBetween } from "../../utils/date";
|
|
|
6
6
|
import { getCssUnitValue } from "../../utils/format";
|
|
7
7
|
import { getColorByThreshold } from "../../utils/get";
|
|
8
8
|
defineOptions({
|
|
9
|
-
name: "PActiveGraph"
|
|
9
|
+
name: "PActiveGraph",
|
|
10
|
+
inheritAttrs: false
|
|
10
11
|
});
|
|
11
12
|
const props = defineProps({
|
|
12
13
|
data: { type: Array, required: false, default: () => [] },
|
|
13
14
|
legend: { type: Boolean, required: false, default: true },
|
|
14
|
-
startDate: { type: [String, Date], required: false,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
while (date.getDay() !== 0) {
|
|
18
|
-
date.setDate(date.getDate() - 1);
|
|
19
|
-
}
|
|
20
|
-
return date;
|
|
21
|
-
} },
|
|
22
|
-
endDate: { type: [String, Date], required: false, default: () => /* @__PURE__ */ new Date() },
|
|
23
|
-
colors: { type: Object, required: false, default: () => ({
|
|
24
|
-
0: "",
|
|
25
|
-
5: "var(--color-green-300)",
|
|
26
|
-
10: "var(--color-green-500)",
|
|
27
|
-
15: "var(--color-green-700)",
|
|
28
|
-
20: "var(--color-green-900)"
|
|
29
|
-
}) },
|
|
15
|
+
startDate: { type: [String, Date], required: false },
|
|
16
|
+
endDate: { type: [String, Date], required: false },
|
|
17
|
+
colors: { type: Object, required: false },
|
|
30
18
|
graphOnly: { type: Boolean, required: false, default: false },
|
|
31
19
|
transpose: { type: Boolean, required: false },
|
|
32
20
|
tooltip: { type: Boolean, required: false, default: true },
|
|
@@ -37,7 +25,35 @@ const emits = defineEmits(["cell-click"]);
|
|
|
37
25
|
const configProvider = useConfigProvider();
|
|
38
26
|
const CELL_GAP = 3;
|
|
39
27
|
const CELL_SIZE = 12;
|
|
40
|
-
const
|
|
28
|
+
const getDefaultStartDate = () => {
|
|
29
|
+
const date = /* @__PURE__ */ new Date();
|
|
30
|
+
date.setFullYear(date.getFullYear() - 1);
|
|
31
|
+
while (date.getDay() !== 0) {
|
|
32
|
+
date.setDate(date.getDate() - 1);
|
|
33
|
+
}
|
|
34
|
+
return date;
|
|
35
|
+
};
|
|
36
|
+
const getDefaultEndDate = () => {
|
|
37
|
+
return /* @__PURE__ */ new Date();
|
|
38
|
+
};
|
|
39
|
+
const computedColors = computed(() => {
|
|
40
|
+
if (props.colors) {
|
|
41
|
+
return props.colors;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
0: "",
|
|
45
|
+
5: "var(--color-green-300)",
|
|
46
|
+
10: "var(--color-green-500)",
|
|
47
|
+
15: "var(--color-green-700)",
|
|
48
|
+
20: "var(--color-green-900)"
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
const rangedDates = computed(
|
|
52
|
+
() => getAllDatesBetween(
|
|
53
|
+
props.startDate || getDefaultStartDate(),
|
|
54
|
+
props.endDate || getDefaultEndDate()
|
|
55
|
+
)
|
|
56
|
+
);
|
|
41
57
|
const dateCountMap = computed(() => {
|
|
42
58
|
const { date, count } = props.fieldNames || { date: "date", count: "count" };
|
|
43
59
|
return props.data.reduce(
|
|
@@ -123,7 +139,7 @@ function createTransposedTableData() {
|
|
|
123
139
|
hidden: false,
|
|
124
140
|
date: dateStr,
|
|
125
141
|
count,
|
|
126
|
-
color: getColorByThreshold(count,
|
|
142
|
+
color: getColorByThreshold(count, computedColors.value)
|
|
127
143
|
});
|
|
128
144
|
if (month !== currentMonth || year !== currentYear) {
|
|
129
145
|
currentMonth = month;
|
|
@@ -175,7 +191,7 @@ function createStandardTableData() {
|
|
|
175
191
|
hidden: false,
|
|
176
192
|
date: dateStr,
|
|
177
193
|
count,
|
|
178
|
-
color: getColorByThreshold(count,
|
|
194
|
+
color: getColorByThreshold(count, computedColors.value)
|
|
179
195
|
});
|
|
180
196
|
}
|
|
181
197
|
return result;
|
|
@@ -254,7 +270,11 @@ onBeforeUnmount(() => {
|
|
|
254
270
|
</script>
|
|
255
271
|
|
|
256
272
|
<template>
|
|
257
|
-
<div
|
|
273
|
+
<div
|
|
274
|
+
class="pxd-active-graph relative"
|
|
275
|
+
:class="[graphOnly ? 'py-0.75 pr-0.75' : 'pr-5']"
|
|
276
|
+
v-bind="$attrs"
|
|
277
|
+
>
|
|
258
278
|
<table
|
|
259
279
|
role="grid"
|
|
260
280
|
aria-readonly="true"
|
|
@@ -302,7 +322,7 @@ onBeforeUnmount(() => {
|
|
|
302
322
|
/>
|
|
303
323
|
</tr>
|
|
304
324
|
|
|
305
|
-
<template v-if="
|
|
325
|
+
<template v-if="legend">
|
|
306
326
|
<tr class="pxd-active-graph--placeholder h-0.5 pointer-events-none" />
|
|
307
327
|
<tr class="pxd-active-graph--legend pointer-events-none">
|
|
308
328
|
<td class="h-3 relative text-foreground-secondary">
|
|
@@ -312,7 +332,7 @@ onBeforeUnmount(() => {
|
|
|
312
332
|
</td>
|
|
313
333
|
|
|
314
334
|
<td
|
|
315
|
-
v-for="color in
|
|
335
|
+
v-for="color in computedColors"
|
|
316
336
|
:key="color"
|
|
317
337
|
class="w-3 h-3 rounded-(--item-radius) bg-gray-alpha-200 motion-safe:transition-colors"
|
|
318
338
|
:style="`background-color: ${color}`"
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
interface FieldNames {
|
|
2
|
+
date: string
|
|
3
|
+
count: string
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface ActiveGraphProps {
|
|
7
|
+
data?: Record<string, any>[]
|
|
8
|
+
legend?: boolean
|
|
9
|
+
startDate?: string | Date
|
|
10
|
+
endDate?: string | Date
|
|
11
|
+
colors?: Record<string, string>
|
|
12
|
+
graphOnly?: boolean
|
|
13
|
+
transpose?: boolean
|
|
14
|
+
tooltip?: boolean
|
|
15
|
+
fieldNames?: FieldNames
|
|
16
|
+
itemRadius?: string | number
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface ActiveGraphEmits {
|
|
20
|
+
'cell-click': [MouseEvent, string]
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface ActiveGraphCellData {
|
|
24
|
+
hidden?: boolean
|
|
25
|
+
count: number
|
|
26
|
+
color?: string
|
|
27
|
+
date?: string
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface ActiveGraphRowData extends Array<ActiveGraphCellData> {
|
|
31
|
+
isMonthFirstRow?: boolean
|
|
32
|
+
monthName?: string
|
|
33
|
+
headerText: string
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface ActiveGraphTooltipInfo {
|
|
37
|
+
date: string
|
|
38
|
+
count: number
|
|
39
|
+
left: number
|
|
40
|
+
top: number
|
|
41
|
+
}
|
|
@@ -1,25 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
alt?: string;
|
|
4
|
-
size?: number | string;
|
|
5
|
-
loading?: boolean;
|
|
6
|
-
placeholder?: boolean;
|
|
7
|
-
}
|
|
8
|
-
type LoadingStatus = 'idle' | 'loading' | 'loaded' | 'error';
|
|
9
|
-
declare function getLoadingStatus(): LoadingStatus;
|
|
1
|
+
import type { AvatarStatus, AvatarProps } from './types';
|
|
2
|
+
declare function getLoadingStatus(): AvatarStatus;
|
|
10
3
|
declare var __VLS_1: {}, __VLS_3: {};
|
|
11
4
|
type __VLS_Slots = {} & {
|
|
12
5
|
default?: (props: typeof __VLS_1) => any;
|
|
13
6
|
} & {
|
|
14
7
|
icon?: (props: typeof __VLS_3) => any;
|
|
15
8
|
};
|
|
16
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<AvatarProps, {
|
|
17
10
|
getLoadingStatus: typeof getLoadingStatus;
|
|
18
11
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
12
|
load: (args_0: Event) => any;
|
|
20
13
|
error: (args_0: Event) => any;
|
|
21
14
|
loadstart: (args_0: Event) => any;
|
|
22
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<AvatarProps> & Readonly<{
|
|
23
16
|
onLoad?: ((args_0: Event) => any) | undefined;
|
|
24
17
|
onError?: ((args_0: Event) => any) | undefined;
|
|
25
18
|
onLoadstart?: ((args_0: Event) => any) | undefined;
|
|
@@ -3,7 +3,8 @@ import { computed, shallowRef } from "vue";
|
|
|
3
3
|
import { useAvatarGroupContext } from "../../contexts/avatar";
|
|
4
4
|
import { getCssUnitValue } from "../../utils/format";
|
|
5
5
|
defineOptions({
|
|
6
|
-
name: "PAvatar"
|
|
6
|
+
name: "PAvatar",
|
|
7
|
+
inheritAttrs: false
|
|
7
8
|
});
|
|
8
9
|
const props = defineProps({
|
|
9
10
|
src: { type: String, required: false },
|
|
@@ -43,6 +44,7 @@ defineExpose({
|
|
|
43
44
|
<div
|
|
44
45
|
class="pxd-avatar relative inline-flex size-(--avatar-size) items-center justify-center rounded-full border border-background-100 select-none before:default-animation-timing-function! motion-safe:before:animate-[placeholder_8s_infinite]"
|
|
45
46
|
:style="{ '--avatar-size': computedSize }"
|
|
47
|
+
v-bind="$attrs"
|
|
46
48
|
>
|
|
47
49
|
<slot>
|
|
48
50
|
<img
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type AvatarStatus = 'idle' | 'loading' | 'loaded' | 'error'
|
|
2
|
+
|
|
3
|
+
export interface AvatarProps {
|
|
4
|
+
src?: string
|
|
5
|
+
alt?: string
|
|
6
|
+
size?: number | string
|
|
7
|
+
loading?: boolean
|
|
8
|
+
placeholder?: boolean
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface AvatarEmits {
|
|
12
|
+
load: [Event]
|
|
13
|
+
error: [Event]
|
|
14
|
+
loadstart: [Event]
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface AvatarOptions {
|
|
18
|
+
src?: string
|
|
19
|
+
alt?: string
|
|
20
|
+
loading?: boolean
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface AvatarGroupProps {
|
|
24
|
+
max?: number
|
|
25
|
+
size?: number | string
|
|
26
|
+
options?: AvatarOptions[]
|
|
27
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { AvatarGroupProps } from '
|
|
1
|
+
import type { AvatarGroupProps } from '../avatar/types';
|
|
2
2
|
declare const __VLS_export: import("vue").DefineComponent<AvatarGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvatarGroupProps> & Readonly<{}>, {
|
|
3
3
|
size: number | string;
|
|
4
4
|
max: number;
|
|
5
|
-
options: import("
|
|
5
|
+
options: import("../avatar/types").AvatarOptions[];
|
|
6
6
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
7
|
declare const _default: typeof __VLS_export;
|
|
8
8
|
export default _default;
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
right?: string | number;
|
|
3
|
-
bottom?: string | number;
|
|
4
|
-
zIndex?: string | number;
|
|
5
|
-
visibleThreshold?: number;
|
|
6
|
-
}
|
|
1
|
+
import type { BacktopProps } from './types';
|
|
7
2
|
declare var __VLS_7: {};
|
|
8
3
|
type __VLS_Slots = {} & {
|
|
9
4
|
default?: (props: typeof __VLS_7) => any;
|
|
10
5
|
};
|
|
11
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<BacktopProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BacktopProps> & Readonly<{}>, {
|
|
12
7
|
visibleThreshold: number;
|
|
13
8
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
9
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { BadgeVariant } from './cn';
|
|
3
|
-
interface Props {
|
|
4
|
-
as?: ComponentAs;
|
|
5
|
-
href?: string;
|
|
6
|
-
size?: ComponentSize;
|
|
7
|
-
variant?: BadgeVariant;
|
|
8
|
-
}
|
|
1
|
+
import type { BadgeProps } from './types';
|
|
9
2
|
declare var __VLS_8: {};
|
|
10
3
|
type __VLS_Slots = {} & {
|
|
11
4
|
default?: (props: typeof __VLS_8) => any;
|
|
12
5
|
};
|
|
13
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
14
|
-
variant: BadgeVariant;
|
|
15
|
-
as: ComponentAs;
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<BadgeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BadgeProps> & Readonly<{}>, {
|
|
7
|
+
variant: import("./cn").BadgeVariant;
|
|
8
|
+
as: import("../../types/shared").ComponentAs;
|
|
16
9
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
10
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
11
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
interface Props {
|
|
3
|
-
color?: string;
|
|
4
|
-
title?: ComponentLabel;
|
|
5
|
-
width?: ResponsiveValue<string | number>;
|
|
6
|
-
variant?: 'simple' | 'stripe';
|
|
7
|
-
textured?: boolean;
|
|
8
|
-
}
|
|
1
|
+
import type { BookProps } from './types';
|
|
9
2
|
declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
|
|
10
3
|
type __VLS_Slots = {} & {
|
|
11
4
|
icon?: (props: typeof __VLS_1) => any;
|
|
@@ -14,7 +7,7 @@ type __VLS_Slots = {} & {
|
|
|
14
7
|
} & {
|
|
15
8
|
icon?: (props: typeof __VLS_5) => any;
|
|
16
9
|
};
|
|
17
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<BookProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BookProps> & Readonly<{}>, {
|
|
18
11
|
variant: "simple" | "stripe";
|
|
19
12
|
textured: boolean;
|
|
20
13
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
address?: string;
|
|
3
|
-
}
|
|
1
|
+
import type { BrowserProps } from './types';
|
|
4
2
|
declare var __VLS_40: {};
|
|
5
3
|
type __VLS_Slots = {} & {
|
|
6
4
|
default?: (props: typeof __VLS_40) => any;
|
|
7
5
|
};
|
|
8
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<BrowserProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BrowserProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
7
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
8
|
declare const _default: typeof __VLS_export;
|
|
11
9
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ButtonProps } from '
|
|
1
|
+
import type { ButtonProps } from './types';
|
|
2
2
|
declare var __VLS_13: {}, __VLS_15: {}, __VLS_17: {};
|
|
3
3
|
type __VLS_Slots = {} & {
|
|
4
4
|
prefix?: (props: typeof __VLS_13) => any;
|
|
@@ -9,7 +9,7 @@ type __VLS_Slots = {} & {
|
|
|
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
11
|
icon: boolean;
|
|
12
|
-
variant: import("
|
|
12
|
+
variant: import("./types").ButtonVariant;
|
|
13
13
|
align: "left" | "center" | "right";
|
|
14
14
|
as: import("../../types/shared").ComponentAs;
|
|
15
15
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BasePosition, ComponentDirection } from '
|
|
1
|
+
import type { BasePosition, ComponentDirection } from '../../types/shared'
|
|
2
2
|
|
|
3
3
|
export interface CarouselGroupProps {
|
|
4
4
|
index?: number
|
|
@@ -14,3 +14,7 @@ export interface CarouselGroupProps {
|
|
|
14
14
|
pauseOnHover?: boolean
|
|
15
15
|
toggleOnWheel?: boolean
|
|
16
16
|
}
|
|
17
|
+
|
|
18
|
+
export interface CarouselGroupEmits {
|
|
19
|
+
change: [index: number]
|
|
20
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CarouselGroupProps } from '
|
|
1
|
+
import type { CarouselGroupProps } from '../carousel/types';
|
|
2
2
|
declare var __VLS_1: {}, __VLS_3: {
|
|
3
3
|
current: number;
|
|
4
4
|
total: number;
|
|
@@ -13,8 +13,8 @@ declare const __VLS_base: import("vue").DefineComponent<CarouselGroupProps, {},
|
|
|
13
13
|
}, string, import("vue").PublicProps, Readonly<CarouselGroupProps> & Readonly<{
|
|
14
14
|
onChange?: ((index: number) => any) | undefined;
|
|
15
15
|
}>, {
|
|
16
|
-
index: number;
|
|
17
16
|
height: number | string;
|
|
17
|
+
index: number;
|
|
18
18
|
loop: boolean;
|
|
19
19
|
arrow: boolean;
|
|
20
20
|
autoplay: boolean;
|
|
@@ -8,6 +8,7 @@ import { getUniqueId } from "../../utils/uid";
|
|
|
8
8
|
import { checkboxVariant } from "./cn";
|
|
9
9
|
defineOptions({
|
|
10
10
|
name: "PCheckbox",
|
|
11
|
+
inheritAttrs: false,
|
|
11
12
|
model: {
|
|
12
13
|
prop: "modelValue",
|
|
13
14
|
event: "update:modelValue"
|
|
@@ -71,6 +72,7 @@ defineExpose({
|
|
|
71
72
|
:data-disabled="computedDisabled"
|
|
72
73
|
:class="computedClasses.wrapper()"
|
|
73
74
|
:for="uniqueId"
|
|
75
|
+
v-bind="$attrs"
|
|
74
76
|
>
|
|
75
77
|
<input
|
|
76
78
|
:id="uniqueId"
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import type { ComponentLabel, ComponentOption, ComponentValue } from '
|
|
2
|
-
|
|
3
|
-
export interface CheckboxGroupProps {
|
|
4
|
-
disabled?: boolean
|
|
5
|
-
required?: boolean
|
|
6
|
-
modelValue?: ComponentValue[]
|
|
7
|
-
options?: ComponentOption[]
|
|
8
|
-
}
|
|
1
|
+
import type { ComponentLabel, ComponentOption, ComponentValue } from '../../types/shared'
|
|
9
2
|
|
|
10
3
|
export interface CheckboxProps {
|
|
11
4
|
label?: ComponentLabel
|
|
@@ -15,3 +8,20 @@ export interface CheckboxProps {
|
|
|
15
8
|
modelValue?: ComponentValue | ComponentValue[]
|
|
16
9
|
indeterminate?: boolean
|
|
17
10
|
}
|
|
11
|
+
|
|
12
|
+
export interface CheckboxEmits {
|
|
13
|
+
change: [NonNullable<CheckboxProps['modelValue']>]
|
|
14
|
+
'update:modelValue': [NonNullable<CheckboxProps['modelValue']>]
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface CheckboxGroupProps {
|
|
18
|
+
disabled?: boolean
|
|
19
|
+
required?: boolean
|
|
20
|
+
modelValue?: ComponentValue[]
|
|
21
|
+
options?: ComponentOption[]
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface CheckboxGroupEmits {
|
|
25
|
+
change: [NonNullable<CheckboxGroupProps['modelValue']>]
|
|
26
|
+
'update:modelValue': [NonNullable<CheckboxGroupProps['modelValue']>]
|
|
27
|
+
}
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
interface Props {
|
|
3
|
-
size?: number | string;
|
|
4
|
-
inset?: boolean;
|
|
5
|
-
label?: ComponentLabel;
|
|
6
|
-
variant?: ComponentVariant | 'secondary';
|
|
7
|
-
}
|
|
1
|
+
import type { ChipProps } from './types';
|
|
8
2
|
declare var __VLS_1: {};
|
|
9
3
|
type __VLS_Slots = {} & {
|
|
10
4
|
default?: (props: typeof __VLS_1) => any;
|
|
11
5
|
};
|
|
12
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<ChipProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ChipProps> & Readonly<{}>, {
|
|
13
7
|
size: number | string;
|
|
14
|
-
label: ComponentLabel;
|
|
15
|
-
variant: ComponentVariant | "secondary";
|
|
8
|
+
label: import("../../types/shared").ComponentLabel;
|
|
9
|
+
variant: import("../../types/shared").ComponentVariant | "secondary";
|
|
16
10
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
11
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
12
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import type { ComponentLabel, ComponentOption, ComponentValue } from '
|
|
1
|
+
import type { ComponentLabel, ComponentOption, ComponentValue } from '../../types/shared'
|
|
2
2
|
|
|
3
3
|
interface Option extends ComponentOption {
|
|
4
4
|
description?: string
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
+
export interface ChoiceboxProps {
|
|
8
|
+
label?: ComponentLabel
|
|
9
|
+
value?: ComponentValue
|
|
10
|
+
disabled?: boolean
|
|
11
|
+
required?: boolean
|
|
12
|
+
description?: string
|
|
13
|
+
}
|
|
14
|
+
|
|
7
15
|
export interface ChoiceboxGroupProps {
|
|
8
16
|
label?: ComponentLabel
|
|
9
17
|
multiple?: boolean
|
|
@@ -13,10 +21,7 @@ export interface ChoiceboxGroupProps {
|
|
|
13
21
|
modelValue?: ComponentValue | ComponentValue[]
|
|
14
22
|
}
|
|
15
23
|
|
|
16
|
-
export interface
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
disabled?: boolean
|
|
20
|
-
required?: boolean
|
|
21
|
-
description?: string
|
|
24
|
+
export interface ChoiceboxGroupEmits {
|
|
25
|
+
change: [NonNullable<ChoiceboxGroupProps['modelValue']>]
|
|
26
|
+
'update:modelValue': [NonNullable<ChoiceboxGroupProps['modelValue']>]
|
|
22
27
|
}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
title?: string;
|
|
3
|
-
expand?: boolean;
|
|
4
|
-
}
|
|
1
|
+
import type { CollapseProps } from './types';
|
|
5
2
|
declare var __VLS_1: {}, __VLS_20: {};
|
|
6
3
|
type __VLS_Slots = {} & {
|
|
7
4
|
title?: (props: typeof __VLS_1) => any;
|
|
8
5
|
} & {
|
|
9
6
|
default?: (props: typeof __VLS_20) => any;
|
|
10
7
|
};
|
|
11
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<CollapseProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CollapseProps> & Readonly<{}>, {
|
|
12
9
|
title: string;
|
|
13
10
|
expand: boolean;
|
|
14
11
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|