@byyuurin/ui 0.1.0 → 0.2.0
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/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/Accordion.vue +2 -2
- package/dist/runtime/components/Badge.vue +3 -3
- package/dist/runtime/components/Breadcrumb.vue +4 -4
- package/dist/runtime/components/Button.vue +3 -3
- package/dist/runtime/components/Calendar.vue +6 -8
- package/dist/runtime/components/Carousel.vue +19 -0
- package/dist/runtime/components/Checkbox.vue +1 -1
- package/dist/runtime/components/CheckboxGroup.vue +131 -0
- package/dist/runtime/components/CheckboxGroup.vue.d.ts +89 -0
- package/dist/runtime/components/DropdownMenuContent.vue +11 -11
- package/dist/runtime/components/FormField.vue +1 -1
- package/dist/runtime/components/Input.vue +3 -3
- package/dist/runtime/components/InputNumber.vue +2 -4
- package/dist/runtime/components/InputNumber.vue.d.ts +0 -5
- package/dist/runtime/components/InputTags.vue +155 -0
- package/dist/runtime/components/InputTags.vue.d.ts +85 -0
- package/dist/runtime/components/Marquee.vue +38 -0
- package/dist/runtime/components/Marquee.vue.d.ts +54 -0
- package/dist/runtime/components/NavigationMenu.vue +46 -37
- package/dist/runtime/components/NavigationMenu.vue.d.ts +44 -9
- package/dist/runtime/components/RadioGroup.vue.d.ts +2 -2
- package/dist/runtime/components/Select.vue +11 -11
- package/dist/runtime/components/Slider.vue +1 -1
- package/dist/runtime/components/Table.vue +54 -32
- package/dist/runtime/components/Table.vue.d.ts +14 -14
- package/dist/runtime/components/Tabs.vue +3 -3
- package/dist/runtime/components/Textarea.vue +3 -3
- package/dist/runtime/components/Timeline.vue +102 -0
- package/dist/runtime/components/Timeline.vue.d.ts +74 -0
- package/dist/runtime/types/index.d.ts +5 -0
- package/dist/runtime/types/index.js +5 -0
- package/dist/runtime/types/utils.d.ts +6 -3
- package/dist/shared/{ui.DSyJHSTk.mjs → ui.DLOxhmP0.mjs} +523 -68
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { VariantProps } from '@byyuurin/ui-kit';
|
|
2
|
-
import type { AccordionRootProps, NavigationMenuContentEmits, NavigationMenuContentProps,
|
|
1
|
+
import type { MaybeArray, VariantProps } from '@byyuurin/ui-kit';
|
|
2
|
+
import type { AccordionRootProps, NavigationMenuContentEmits, NavigationMenuContentProps, NavigationMenuRootProps } from 'reka-ui';
|
|
3
3
|
import theme from '#build/ui/navigation-menu';
|
|
4
4
|
import type { AvatarProps, BadgeProps, ComponentBaseProps, ComponentStyler, ComponentUIProps, IconProps, LinkProps, PopoverProps, TooltipProps } from '../types';
|
|
5
5
|
import type { ArrayOrNested, DynamicSlots, EmitsToProps, GetItemKeys, MergeTypes, NestedItem, StaticSlot } from '../types/utils';
|
|
@@ -53,12 +53,40 @@ export interface NavigationMenuItem extends ComponentBaseProps, Omit<LinkProps,
|
|
|
53
53
|
[key: string]: any;
|
|
54
54
|
}
|
|
55
55
|
type ThemeVariants = VariantProps<typeof theme>;
|
|
56
|
-
|
|
56
|
+
type SingleOrMultipleType = 'single' | 'multiple';
|
|
57
|
+
type Orientation = ThemeVariants['orientation'];
|
|
58
|
+
type NavigationMenuModelValue<K extends SingleOrMultipleType = SingleOrMultipleType, O extends Orientation = Orientation> = O extends 'horizontal' ? string : K extends 'single' ? string : K extends 'multiple' ? string[] : MaybeArray<string>;
|
|
59
|
+
export interface NavigationMenuProps<T extends ArrayOrNested<NavigationMenuItem> = ArrayOrNested<NavigationMenuItem>, K extends SingleOrMultipleType = SingleOrMultipleType, O extends Orientation = Orientation> extends ComponentBaseProps, Pick<NavigationMenuRootProps, 'delayDuration' | 'disableClickTrigger' | 'disableHoverTrigger' | 'skipDelayDuration' | 'disablePointerLeaveClose' | 'unmountOnHide'>, Pick<AccordionRootProps, 'disabled' | 'type' | 'collapsible'> {
|
|
57
60
|
/**
|
|
58
61
|
* The element or component this component should render as.
|
|
59
62
|
* @default "div"
|
|
60
63
|
*/
|
|
61
64
|
as?: NavigationMenuRootProps['as'];
|
|
65
|
+
/**
|
|
66
|
+
* Determines whether a "single" or "multiple" items can be selected at a time.
|
|
67
|
+
*
|
|
68
|
+
* Only works when `orientation` is `vertical`.
|
|
69
|
+
* @default "multiple"
|
|
70
|
+
*/
|
|
71
|
+
type?: K;
|
|
72
|
+
/**
|
|
73
|
+
* The controlled value of the active item(s).
|
|
74
|
+
* - In horizontal orientation: always `string`
|
|
75
|
+
* - In vertical orientation with `type="single"`: `string`
|
|
76
|
+
* - In vertical orientation with `type="multiple"`: `string[]`
|
|
77
|
+
*
|
|
78
|
+
* Use this when you need to control the state of the items. Can be binded with `v-model`
|
|
79
|
+
*/
|
|
80
|
+
modelValue?: NavigationMenuModelValue<K, O>;
|
|
81
|
+
/**
|
|
82
|
+
* The default active value of the item(s).
|
|
83
|
+
* - In horizontal orientation: always `string`
|
|
84
|
+
* - In vertical orientation with `type="single"`: `string`
|
|
85
|
+
* - In vertical orientation with `type="multiple"`: `string[]`
|
|
86
|
+
*
|
|
87
|
+
* Use when you do not need to control the state of the item(s).
|
|
88
|
+
*/
|
|
89
|
+
defaultValue?: NavigationMenuModelValue<K, O>;
|
|
62
90
|
/**
|
|
63
91
|
* The icon displayed to open the menu.
|
|
64
92
|
* @default app.icons.chevronDown
|
|
@@ -79,7 +107,7 @@ export interface NavigationMenuProps<T extends ArrayOrNested<NavigationMenuItem>
|
|
|
79
107
|
* The orientation of the menu.
|
|
80
108
|
* @default "horizontal"
|
|
81
109
|
*/
|
|
82
|
-
orientation?:
|
|
110
|
+
orientation?: O;
|
|
83
111
|
/**
|
|
84
112
|
* Collapse the navigation menu to only show icons.
|
|
85
113
|
* Only works when `orientation` is `vertical`.
|
|
@@ -120,7 +148,14 @@ export interface NavigationMenuProps<T extends ArrayOrNested<NavigationMenuItem>
|
|
|
120
148
|
labelKey?: GetItemKeys<T>;
|
|
121
149
|
ui?: ComponentUIProps<typeof theme>;
|
|
122
150
|
}
|
|
123
|
-
export interface NavigationMenuEmits extends
|
|
151
|
+
export interface NavigationMenuEmits<K extends SingleOrMultipleType = SingleOrMultipleType, O extends Orientation = Orientation> {
|
|
152
|
+
/**
|
|
153
|
+
* Event handler called when the value changes.
|
|
154
|
+
* - In horizontal orientation: emits `string`
|
|
155
|
+
* - In vertical orientation with `type="single"`: emits `string | undefined`
|
|
156
|
+
* - In vertical orientation with `type="multiple"`: emits `string[] | undefined`
|
|
157
|
+
*/
|
|
158
|
+
'update:modelValue': [value: NavigationMenuModelValue<K, O> | undefined];
|
|
124
159
|
}
|
|
125
160
|
export type NavigationMenuSlots<A extends ArrayOrNested<NavigationMenuItem> = ArrayOrNested<NavigationMenuItem>, T extends NestedItem<A> = NestedItem<A>> = {
|
|
126
161
|
'item': StaticSlot<{
|
|
@@ -163,14 +198,14 @@ export type NavigationMenuSlots<A extends ArrayOrNested<NavigationMenuItem> = Ar
|
|
|
163
198
|
active: boolean;
|
|
164
199
|
ui: ComponentStyler<typeof theme>;
|
|
165
200
|
}>;
|
|
166
|
-
declare const __VLS_export: <T extends ArrayOrNested<NavigationMenuItem
|
|
167
|
-
props: __VLS_PrettifyLocal<NavigationMenuProps<T> & {
|
|
168
|
-
"onUpdate:modelValue"?: ((value:
|
|
201
|
+
declare const __VLS_export: <T extends ArrayOrNested<NavigationMenuItem>, K extends SingleOrMultipleType = SingleOrMultipleType, O extends Orientation = Orientation>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
202
|
+
props: __VLS_PrettifyLocal<NavigationMenuProps<T, K, O> & {
|
|
203
|
+
"onUpdate:modelValue"?: ((value: NavigationMenuModelValue<K, O> | undefined) => any) | undefined;
|
|
169
204
|
}> & import("vue").PublicProps;
|
|
170
205
|
expose: (exposed: {}) => void;
|
|
171
206
|
attrs: any;
|
|
172
207
|
slots: NavigationMenuSlots<T, NestedItem<T>>;
|
|
173
|
-
emit: (evt: "update:modelValue", value:
|
|
208
|
+
emit: (evt: "update:modelValue", value: NavigationMenuModelValue<K, O> | undefined) => void;
|
|
174
209
|
}>) => import("vue").VNode & {
|
|
175
210
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
176
211
|
};
|
|
@@ -80,12 +80,12 @@ export interface RadioGroupSlots<T extends RadioGroupItem[] = RadioGroupItem[]>
|
|
|
80
80
|
declare const __VLS_export: <T extends RadioGroupItem[], VK extends GetItemKeys<T> = "value">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
81
81
|
props: __VLS_PrettifyLocal<RadioGroupProps<T, VK> & {
|
|
82
82
|
onChange?: ((event: Event) => any) | undefined;
|
|
83
|
-
"onUpdate:modelValue"?: ((value: import("../types
|
|
83
|
+
"onUpdate:modelValue"?: ((value: import("../types").GetItemValue<T, VK, NestedItem<T>>) => any) | undefined;
|
|
84
84
|
}> & import("vue").PublicProps;
|
|
85
85
|
expose: (exposed: {}) => void;
|
|
86
86
|
attrs: any;
|
|
87
87
|
slots: RadioGroupSlots<T>;
|
|
88
|
-
emit: ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: import("../types
|
|
88
|
+
emit: ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: import("../types").GetItemValue<T, VK, NestedItem<T>>) => void);
|
|
89
89
|
}>) => import("vue").VNode & {
|
|
90
90
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
91
91
|
};
|
|
@@ -156,14 +156,14 @@ defineExpose({
|
|
|
156
156
|
v-if="isLeading && leadingIconName"
|
|
157
157
|
:name="leadingIconName"
|
|
158
158
|
:class="ui.leadingIcon({ class: props.ui?.leadingIcon })"
|
|
159
|
-
data-part="
|
|
159
|
+
data-part="leadingIcon"
|
|
160
160
|
/>
|
|
161
161
|
<Avatar
|
|
162
162
|
v-else-if="props.avatar"
|
|
163
163
|
:size="props.ui?.itemLeadingChipSize || ui.itemLeadingAvatarSize()"
|
|
164
164
|
v-bind="props.avatar"
|
|
165
165
|
:class="ui.leadingAvatar({ class: props.ui?.leadingAvatar })"
|
|
166
|
-
data-part="
|
|
166
|
+
data-part="leadingAvatar"
|
|
167
167
|
/>
|
|
168
168
|
</slot>
|
|
169
169
|
</span>
|
|
@@ -182,7 +182,7 @@ defineExpose({
|
|
|
182
182
|
|
|
183
183
|
<span v-if="isTrailing || !!slots.trailing" :class="ui.trailing({ class: props.ui?.trailing })" data-part="trailing">
|
|
184
184
|
<slot name="trailing" :model-value="modelValue" :open="open" :ui="ui">
|
|
185
|
-
<Icon v-if="trailingIconName" :name="trailingIconName" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" data-part="
|
|
185
|
+
<Icon v-if="trailingIconName" :name="trailingIconName" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" data-part="trailingIcon" />
|
|
186
186
|
</slot>
|
|
187
187
|
</span>
|
|
188
188
|
</SelectTrigger>
|
|
@@ -214,14 +214,14 @@ defineExpose({
|
|
|
214
214
|
v-if="isSelectItem(item) && item.icon"
|
|
215
215
|
:name="item.icon"
|
|
216
216
|
:class="ui.itemLeadingIcon({ class: [props.ui?.itemLeadingIcon, item.ui?.itemLeadingIcon] })"
|
|
217
|
-
data-part="
|
|
217
|
+
data-part="itemLeadingIcon"
|
|
218
218
|
/>
|
|
219
219
|
<Avatar
|
|
220
220
|
v-else-if="isSelectItem(item) && item.avatar"
|
|
221
221
|
:size="item.ui?.itemLeadingAvatarSize || props.ui?.itemLeadingAvatarSize || ui.itemLeadingAvatarSize()"
|
|
222
222
|
v-bind="item.avatar"
|
|
223
223
|
:class="ui.itemLeadingAvatar({ class: [props.ui?.leadingAvatar, item.ui?.itemLeadingAvatar] })"
|
|
224
|
-
data-part="
|
|
224
|
+
data-part="itemLeadingAvatar"
|
|
225
225
|
/>
|
|
226
226
|
<Chip
|
|
227
227
|
v-else-if="isSelectItem(item) && item.chip"
|
|
@@ -230,12 +230,12 @@ defineExpose({
|
|
|
230
230
|
standalone
|
|
231
231
|
v-bind="item.chip"
|
|
232
232
|
:class="ui.itemLeadingChip({ class: [props.ui?.itemLeadingChip, item.ui?.itemLeadingChip] })"
|
|
233
|
-
data-part="
|
|
233
|
+
data-part="itemLeadingChip"
|
|
234
234
|
/>
|
|
235
235
|
</slot>
|
|
236
236
|
|
|
237
|
-
<span :class="ui.itemWrapper({ class: [props.ui?.itemWrapper, ...isSelectItem(item) ? [item.ui?.itemWrapper] : []] })" data-part="
|
|
238
|
-
<SelectItemText :class="ui.itemLabel({ class: [props.ui?.itemLabel, isSelectItem(item) && item.ui?.itemLabel] })" data-part="
|
|
237
|
+
<span :class="ui.itemWrapper({ class: [props.ui?.itemWrapper, ...isSelectItem(item) ? [item.ui?.itemWrapper] : []] })" data-part="itemWrapper">
|
|
238
|
+
<SelectItemText :class="ui.itemLabel({ class: [props.ui?.itemLabel, isSelectItem(item) && item.ui?.itemLabel] })" data-part="itemLabel">
|
|
239
239
|
<slot name="item-label" :item="item" :index="index">
|
|
240
240
|
{{ isSelectItem(item) ? get(item, props.labelKey) : item }}
|
|
241
241
|
</slot>
|
|
@@ -244,7 +244,7 @@ defineExpose({
|
|
|
244
244
|
<span
|
|
245
245
|
v-if="isSelectItem(item) && get(item, props.descriptionKey) || !!slots['item-description']"
|
|
246
246
|
:class="ui.itemDescription({ class: [props.ui?.itemDescription, ...isSelectItem(item) ? [item.ui?.itemDescription] : []] })"
|
|
247
|
-
data-part="
|
|
247
|
+
data-part="itemDescription"
|
|
248
248
|
>
|
|
249
249
|
<slot name="item-description" :item="item" :index="index">
|
|
250
250
|
{{ isSelectItem(item) ? get(item, props.descriptionKey) : "" }}
|
|
@@ -252,11 +252,11 @@ defineExpose({
|
|
|
252
252
|
</span>
|
|
253
253
|
</span>
|
|
254
254
|
|
|
255
|
-
<span :class="ui.itemTrailing({ class: [props.ui?.itemTrailing, isSelectItem(item) && item.ui?.itemTrailing] })" data-part="
|
|
255
|
+
<span :class="ui.itemTrailing({ class: [props.ui?.itemTrailing, isSelectItem(item) && item.ui?.itemTrailing] })" data-part="itemTrailing">
|
|
256
256
|
<slot name="item-trailing" :item="item" :index="index" :ui="ui"></slot>
|
|
257
257
|
|
|
258
258
|
<SelectItemIndicator as-child>
|
|
259
|
-
<Icon :name="props.selectedIcon || appConfig.ui.icons.check" :class="ui.itemTrailingIcon({ class: [props.ui?.itemTrailingIcon, isSelectItem(item) && item.ui?.itemTrailingIcon] })" data-part="
|
|
259
|
+
<Icon :name="props.selectedIcon || appConfig.ui.icons.check" :class="ui.itemTrailingIcon({ class: [props.ui?.itemTrailingIcon, isSelectItem(item) && item.ui?.itemTrailingIcon] })" data-part="itemTrailingIcon" />
|
|
260
260
|
</SelectItemIndicator>
|
|
261
261
|
</span>
|
|
262
262
|
</slot>
|
|
@@ -88,7 +88,7 @@ function onChange(value) {
|
|
|
88
88
|
:disabled="!props.tooltip"
|
|
89
89
|
disable-closing-trigger
|
|
90
90
|
>
|
|
91
|
-
<SliderThumb :class="ui.thumb({ class: props.ui?.thumb })" data-part="thumb" />
|
|
91
|
+
<SliderThumb :class="ui.thumb({ class: props.ui?.thumb })" data-part="thumb" :aria-label="thumbs === 1 ? 'Thumb' : `Thumb ${thumb} of ${thumbs}`" />
|
|
92
92
|
</Tooltip>
|
|
93
93
|
</SliderRoot>
|
|
94
94
|
</template>
|
|
@@ -5,9 +5,9 @@ import theme from "#build/ui/table";
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { FlexRender, getCoreRowModel, getExpandedRowModel, getFilteredRowModel, getSortedRowModel, useVueTable } from "@tanstack/vue-table";
|
|
7
7
|
import { useVirtualizer } from "@tanstack/vue-virtual";
|
|
8
|
-
import { createReusableTemplate,
|
|
8
|
+
import { createReusableTemplate, reactivePick } from "@vueuse/core";
|
|
9
9
|
import { defu } from "defu";
|
|
10
|
-
import { Primitive } from "reka-ui";
|
|
10
|
+
import { Primitive, useForwardProps } from "reka-ui";
|
|
11
11
|
import { upperFirst } from "scule";
|
|
12
12
|
import { computed, ref, shallowRef, toRef, watch } from "vue";
|
|
13
13
|
import { useAppConfig } from "#imports";
|
|
@@ -90,19 +90,19 @@ const [DefineRowTemplate, ReuseRowTemplate] = createReusableTemplate({
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
|
-
const globalFilterState = defineModel("globalFilter", { type: String
|
|
94
|
-
const columnFiltersState = defineModel("columnFilters", { type: Array
|
|
95
|
-
const columnOrderState = defineModel("columnOrder", { type: Array
|
|
96
|
-
const columnVisibilityState = defineModel("columnVisibility", { type: Object
|
|
97
|
-
const columnPinningState = defineModel("columnPinning", { type: Object
|
|
98
|
-
const columnSizingState = defineModel("columnSizing", { type: Object
|
|
99
|
-
const columnSizingInfoState = defineModel("columnSizingInfo", { type: Object
|
|
100
|
-
const rowSelectionState = defineModel("rowSelection", { type: Object
|
|
101
|
-
const rowPinningState = defineModel("rowPinning", { type: Object
|
|
102
|
-
const sortingState = defineModel("sorting", { type: Array
|
|
103
|
-
const groupingState = defineModel("grouping", { type: Array
|
|
104
|
-
const expandedState = defineModel("expanded", { type: [Boolean, Object]
|
|
105
|
-
const paginationState = defineModel("pagination", { type: Object
|
|
93
|
+
const globalFilterState = defineModel("globalFilter", { type: String });
|
|
94
|
+
const columnFiltersState = defineModel("columnFilters", { type: Array });
|
|
95
|
+
const columnOrderState = defineModel("columnOrder", { type: Array });
|
|
96
|
+
const columnVisibilityState = defineModel("columnVisibility", { type: Object });
|
|
97
|
+
const columnPinningState = defineModel("columnPinning", { type: Object });
|
|
98
|
+
const columnSizingState = defineModel("columnSizing", { type: Object });
|
|
99
|
+
const columnSizingInfoState = defineModel("columnSizingInfo", { type: Object });
|
|
100
|
+
const rowSelectionState = defineModel("rowSelection", { type: Object });
|
|
101
|
+
const rowPinningState = defineModel("rowPinning", { type: Object });
|
|
102
|
+
const sortingState = defineModel("sorting", { type: Array });
|
|
103
|
+
const groupingState = defineModel("grouping", { type: Array });
|
|
104
|
+
const expandedState = defineModel("expanded", { type: [Boolean, Object] });
|
|
105
|
+
const paginationState = defineModel("pagination", { type: Object });
|
|
106
106
|
const rootRef = shallowRef();
|
|
107
107
|
const tableRef = shallowRef(null);
|
|
108
108
|
const data = ref(props.data ?? []);
|
|
@@ -138,41 +138,44 @@ const hasFooter = computed(() => {
|
|
|
138
138
|
}
|
|
139
139
|
return hasFooterRecursive(columns.value);
|
|
140
140
|
});
|
|
141
|
+
const tableProps = useForwardProps(reactivePick(props, "_features", "autoResetAll", "debugAll", "debugCells", "debugColumns", "debugHeaders", "debugRows", "debugTable", "defaultColumn", "getRowId", "getSubRows", "initialState", "mergeOptions", "renderFallbackValue"));
|
|
141
142
|
const tableApi = useVueTable({
|
|
142
|
-
...
|
|
143
|
-
data
|
|
143
|
+
...tableProps.value,
|
|
144
|
+
get data() {
|
|
145
|
+
return data.value;
|
|
146
|
+
},
|
|
144
147
|
get columns() {
|
|
145
148
|
return columns.value;
|
|
146
149
|
},
|
|
147
150
|
meta: meta.value,
|
|
148
151
|
getCoreRowModel: getCoreRowModel(),
|
|
149
152
|
...props.globalFilterOptions,
|
|
150
|
-
onGlobalFilterChange: (updaterOrValue) => valueUpdater(updaterOrValue, globalFilterState),
|
|
153
|
+
...globalFilterState.value !== void 0 && { onGlobalFilterChange: (updaterOrValue) => valueUpdater(updaterOrValue, globalFilterState) },
|
|
151
154
|
...props.columnFiltersOptions,
|
|
152
155
|
getFilteredRowModel: getFilteredRowModel(),
|
|
153
|
-
onColumnFiltersChange: (updaterOrValue) => valueUpdater(updaterOrValue, columnFiltersState),
|
|
154
|
-
onColumnOrderChange: (updaterOrValue) => valueUpdater(updaterOrValue, columnOrderState),
|
|
156
|
+
...columnFiltersState.value !== void 0 && { onColumnFiltersChange: (updaterOrValue) => valueUpdater(updaterOrValue, columnFiltersState) },
|
|
157
|
+
...columnOrderState.value !== void 0 && { onColumnOrderChange: (updaterOrValue) => valueUpdater(updaterOrValue, columnOrderState) },
|
|
155
158
|
...props.visibilityOptions,
|
|
156
|
-
onColumnVisibilityChange: (updaterOrValue) => valueUpdater(updaterOrValue, columnVisibilityState),
|
|
159
|
+
...columnVisibilityState.value !== void 0 && { onColumnVisibilityChange: (updaterOrValue) => valueUpdater(updaterOrValue, columnVisibilityState) },
|
|
157
160
|
...props.columnPinningOptions,
|
|
158
|
-
onColumnPinningChange: (updaterOrValue) => valueUpdater(updaterOrValue, columnPinningState),
|
|
161
|
+
...columnPinningState.value !== void 0 && { onColumnPinningChange: (updaterOrValue) => valueUpdater(updaterOrValue, columnPinningState) },
|
|
159
162
|
...props.columnSizingOptions,
|
|
160
|
-
onColumnSizingChange: (updaterOrValue) => valueUpdater(updaterOrValue, columnSizingState),
|
|
161
|
-
onColumnSizingInfoChange: (updaterOrValue) => valueUpdater(updaterOrValue, columnSizingInfoState),
|
|
163
|
+
...columnSizingState.value !== void 0 && { onColumnSizingChange: (updaterOrValue) => valueUpdater(updaterOrValue, columnSizingState) },
|
|
164
|
+
...columnSizingInfoState.value !== void 0 && { onColumnSizingInfoChange: (updaterOrValue) => valueUpdater(updaterOrValue, columnSizingInfoState) },
|
|
162
165
|
...props.rowSelectionOptions,
|
|
163
|
-
onRowSelectionChange: (updaterOrValue) => valueUpdater(updaterOrValue, rowSelectionState),
|
|
166
|
+
...rowSelectionState.value !== void 0 && { onRowSelectionChange: (updaterOrValue) => valueUpdater(updaterOrValue, rowSelectionState) },
|
|
164
167
|
...props.rowPinningOptions,
|
|
165
|
-
onRowPinningChange: (updaterOrValue) => valueUpdater(updaterOrValue, rowPinningState),
|
|
168
|
+
...rowPinningState.value !== void 0 && { onRowPinningChange: (updaterOrValue) => valueUpdater(updaterOrValue, rowPinningState) },
|
|
166
169
|
...props.sortingOptions,
|
|
167
170
|
getSortedRowModel: getSortedRowModel(),
|
|
168
|
-
onSortingChange: (updaterOrValue) => valueUpdater(updaterOrValue, sortingState),
|
|
171
|
+
...sortingState.value !== void 0 && { onSortingChange: (updaterOrValue) => valueUpdater(updaterOrValue, sortingState) },
|
|
169
172
|
...props.groupingOptions,
|
|
170
|
-
onGroupingChange: (updaterOrValue) => valueUpdater(updaterOrValue, groupingState),
|
|
173
|
+
...groupingState.value !== void 0 && { onGroupingChange: (updaterOrValue) => valueUpdater(updaterOrValue, groupingState) },
|
|
171
174
|
...props.expandedOptions,
|
|
172
175
|
getExpandedRowModel: getExpandedRowModel(),
|
|
173
|
-
onExpandedChange: (updaterOrValue) => valueUpdater(updaterOrValue, expandedState),
|
|
176
|
+
...expandedState.value !== void 0 && { onExpandedChange: (updaterOrValue) => valueUpdater(updaterOrValue, expandedState) },
|
|
174
177
|
...props.paginationOptions,
|
|
175
|
-
onPaginationChange: (updaterOrValue) => valueUpdater(updaterOrValue, paginationState),
|
|
178
|
+
...paginationState.value !== void 0 && { onPaginationChange: (updaterOrValue) => valueUpdater(updaterOrValue, paginationState) },
|
|
176
179
|
...props.facetedOptions,
|
|
177
180
|
state: {
|
|
178
181
|
get globalFilter() {
|
|
@@ -262,6 +265,15 @@ function resolveValue(prop, arg) {
|
|
|
262
265
|
}
|
|
263
266
|
return prop;
|
|
264
267
|
}
|
|
268
|
+
function getColumnStyles(column) {
|
|
269
|
+
const styles = {};
|
|
270
|
+
const pinned = column.getIsPinned();
|
|
271
|
+
if (pinned === "left")
|
|
272
|
+
styles.left = `${column.getStart("left")}px`;
|
|
273
|
+
else if (pinned === "right")
|
|
274
|
+
styles.right = `${column.getAfter("right")}px`;
|
|
275
|
+
return styles;
|
|
276
|
+
}
|
|
265
277
|
watch(() => props.data, () => {
|
|
266
278
|
data.value = props.data ? [...props.data] : [];
|
|
267
279
|
}, props.watchOptions);
|
|
@@ -319,7 +331,10 @@ defineExpose({
|
|
|
319
331
|
})"
|
|
320
332
|
:data-pinned="cell.column.getIsPinned()"
|
|
321
333
|
data-part="td"
|
|
322
|
-
:style="
|
|
334
|
+
:style="[
|
|
335
|
+
getColumnStyles(cell.column),
|
|
336
|
+
resolveValue(cell.column.columnDef.meta?.style?.td, cell)
|
|
337
|
+
]"
|
|
323
338
|
>
|
|
324
339
|
<slot :name="`${cell.column.id}-cell`" v-bind="cell.getContext()">
|
|
325
340
|
<FlexRender :render="cell.column.columnDef.cell" :props="cell.getContext()" />
|
|
@@ -359,6 +374,10 @@ defineExpose({
|
|
|
359
374
|
pinned: !!header.column.getIsPinned()
|
|
360
375
|
})"
|
|
361
376
|
data-part="th"
|
|
377
|
+
:style="[
|
|
378
|
+
getColumnStyles(header.column),
|
|
379
|
+
resolveValue(header.column.columnDef.meta?.style?.th, header)
|
|
380
|
+
]"
|
|
362
381
|
>
|
|
363
382
|
<slot :name="`${header.id}-header`" v-bind="header.getContext()">
|
|
364
383
|
<FlexRender v-if="!header.isPlaceholder" :render="header.column.columnDef.header" :props="header.getContext()" />
|
|
@@ -432,7 +451,10 @@ defineExpose({
|
|
|
432
451
|
pinned: !!header.column.getIsPinned()
|
|
433
452
|
})"
|
|
434
453
|
data-part="th"
|
|
435
|
-
:style="
|
|
454
|
+
:style="[
|
|
455
|
+
getColumnStyles(header.column),
|
|
456
|
+
resolveValue(header.column.columnDef.meta?.style?.th, header)
|
|
457
|
+
]"
|
|
436
458
|
>
|
|
437
459
|
<slot :name="`${header.id}-footer`" v-bind="header.getContext()">
|
|
438
460
|
<FlexRender v-if="!header.isPlaceholder" :render="header.column.columnDef.footer" :props="header.getContext()" />
|
|
@@ -202,19 +202,19 @@ declare const __VLS_export: <T extends TableData>(__VLS_props: NonNullable<Await
|
|
|
202
202
|
expanded?: ExpandedState;
|
|
203
203
|
pagination?: PaginationState;
|
|
204
204
|
}) & {
|
|
205
|
-
"onUpdate:globalFilter"?: ((value: string) => any) | undefined;
|
|
206
|
-
"onUpdate:columnFilters"?: ((value: ColumnFiltersState) => any) | undefined;
|
|
207
|
-
"onUpdate:columnOrder"?: ((value: ColumnOrderState) => any) | undefined;
|
|
208
|
-
"onUpdate:columnVisibility"?: ((value: VisibilityState) => any) | undefined;
|
|
209
|
-
"onUpdate:columnPinning"?: ((value: ColumnPinningState) => any) | undefined;
|
|
210
|
-
"onUpdate:columnSizing"?: ((value: ColumnSizingState) => any) | undefined;
|
|
211
|
-
"onUpdate:columnSizingInfo"?: ((value: ColumnSizingInfoState) => any) | undefined;
|
|
212
|
-
"onUpdate:rowSelection"?: ((value: RowSelectionState) => any) | undefined;
|
|
213
|
-
"onUpdate:rowPinning"?: ((value: RowPinningState) => any) | undefined;
|
|
214
|
-
"onUpdate:sorting"?: ((value: SortingState) => any) | undefined;
|
|
215
|
-
"onUpdate:grouping"?: ((value: GroupingState) => any) | undefined;
|
|
216
|
-
"onUpdate:expanded"?: ((value: ExpandedState) => any) | undefined;
|
|
217
|
-
"onUpdate:pagination"?: ((value: PaginationState) => any) | undefined;
|
|
205
|
+
"onUpdate:globalFilter"?: ((value: string | undefined) => any) | undefined;
|
|
206
|
+
"onUpdate:columnFilters"?: ((value: ColumnFiltersState | undefined) => any) | undefined;
|
|
207
|
+
"onUpdate:columnOrder"?: ((value: ColumnOrderState | undefined) => any) | undefined;
|
|
208
|
+
"onUpdate:columnVisibility"?: ((value: VisibilityState | undefined) => any) | undefined;
|
|
209
|
+
"onUpdate:columnPinning"?: ((value: ColumnPinningState | undefined) => any) | undefined;
|
|
210
|
+
"onUpdate:columnSizing"?: ((value: ColumnSizingState | undefined) => any) | undefined;
|
|
211
|
+
"onUpdate:columnSizingInfo"?: ((value: ColumnSizingInfoState | undefined) => any) | undefined;
|
|
212
|
+
"onUpdate:rowSelection"?: ((value: RowSelectionState | undefined) => any) | undefined;
|
|
213
|
+
"onUpdate:rowPinning"?: ((value: RowPinningState | undefined) => any) | undefined;
|
|
214
|
+
"onUpdate:sorting"?: ((value: SortingState | undefined) => any) | undefined;
|
|
215
|
+
"onUpdate:grouping"?: ((value: GroupingState | undefined) => any) | undefined;
|
|
216
|
+
"onUpdate:expanded"?: ((value: ExpandedState | undefined) => any) | undefined;
|
|
217
|
+
"onUpdate:pagination"?: ((value: PaginationState | undefined) => any) | undefined;
|
|
218
218
|
}> & import("vue").PublicProps;
|
|
219
219
|
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
220
220
|
readonly $el: any;
|
|
@@ -223,7 +223,7 @@ declare const __VLS_export: <T extends TableData>(__VLS_props: NonNullable<Await
|
|
|
223
223
|
}>) => void;
|
|
224
224
|
attrs: any;
|
|
225
225
|
slots: TableSlots<T>;
|
|
226
|
-
emit: ((evt: "update:globalFilter", value: string) => void) & ((evt: "update:columnFilters", value: ColumnFiltersState) => void) & ((evt: "update:columnOrder", value: ColumnOrderState) => void) & ((evt: "update:columnVisibility", value: VisibilityState) => void) & ((evt: "update:columnPinning", value: ColumnPinningState) => void) & ((evt: "update:columnSizing", value: ColumnSizingState) => void) & ((evt: "update:columnSizingInfo", value: ColumnSizingInfoState) => void) & ((evt: "update:rowSelection", value: RowSelectionState) => void) & ((evt: "update:rowPinning", value: RowPinningState) => void) & ((evt: "update:sorting", value: SortingState) => void) & ((evt: "update:grouping", value: GroupingState) => void) & ((evt: "update:expanded", value: ExpandedState) => void) & ((evt: "update:pagination", value: PaginationState) => void);
|
|
226
|
+
emit: ((evt: "update:globalFilter", value: string | undefined) => void) & ((evt: "update:columnFilters", value: ColumnFiltersState | undefined) => void) & ((evt: "update:columnOrder", value: ColumnOrderState | undefined) => void) & ((evt: "update:columnVisibility", value: VisibilityState | undefined) => void) & ((evt: "update:columnPinning", value: ColumnPinningState | undefined) => void) & ((evt: "update:columnSizing", value: ColumnSizingState | undefined) => void) & ((evt: "update:columnSizingInfo", value: ColumnSizingInfoState | undefined) => void) & ((evt: "update:rowSelection", value: RowSelectionState | undefined) => void) & ((evt: "update:rowPinning", value: RowPinningState | undefined) => void) & ((evt: "update:sorting", value: SortingState | undefined) => void) & ((evt: "update:grouping", value: GroupingState | undefined) => void) & ((evt: "update:expanded", value: ExpandedState | undefined) => void) & ((evt: "update:pagination", value: PaginationState | undefined) => void);
|
|
227
227
|
}>) => import("vue").VNode & {
|
|
228
228
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
229
229
|
};
|
|
@@ -72,14 +72,14 @@ defineExpose({
|
|
|
72
72
|
v-if="item.icon"
|
|
73
73
|
:name="item.icon"
|
|
74
74
|
:class="ui.leadingIcon({ class: [props.ui?.leadingIcon, item.ui?.leadingIcon] })"
|
|
75
|
-
data-part="
|
|
75
|
+
data-part="leadingIcon"
|
|
76
76
|
/>
|
|
77
77
|
<Avatar
|
|
78
78
|
v-else-if="item.avatar"
|
|
79
79
|
:size="item.ui?.leadingAvatarSize || props.ui?.leadingAvatarSize || ui.leadingAvatarSize()"
|
|
80
80
|
v-bind="item.avatar"
|
|
81
81
|
:class="ui.leadingAvatar({ class: [props.ui?.leadingAvatar, item.ui?.leadingAvatar] })"
|
|
82
|
-
data-part="
|
|
82
|
+
data-part="leadingAvatar"
|
|
83
83
|
/>
|
|
84
84
|
</slot>
|
|
85
85
|
|
|
@@ -95,7 +95,7 @@ defineExpose({
|
|
|
95
95
|
:size="item.ui?.trailingBadgeSize || props.ui?.trailingBadgeSize || ui.trailingBadgeSize()"
|
|
96
96
|
v-bind="typeof item.badge === 'string' || typeof item.badge === 'number' ? { label: item.badge } : item.badge"
|
|
97
97
|
:class="ui.trailingBadge({ class: [props.ui?.trailingBadge, item.ui?.trailingBadge] })"
|
|
98
|
-
data-part="
|
|
98
|
+
data-part="trailingBadge"
|
|
99
99
|
/>
|
|
100
100
|
</slot>
|
|
101
101
|
</TabsTrigger>
|
|
@@ -132,14 +132,14 @@ defineExpose({
|
|
|
132
132
|
v-if="isLeading && leadingIconName"
|
|
133
133
|
:name="leadingIconName"
|
|
134
134
|
:class="ui.leadingIcon({ class: props.ui?.leadingIcon })"
|
|
135
|
-
data-part="
|
|
135
|
+
data-part="leadingIcon"
|
|
136
136
|
/>
|
|
137
137
|
<Avatar
|
|
138
138
|
v-else-if="props.avatar"
|
|
139
139
|
:size="props.ui?.leadingAvatarSize || ui.leadingAvatarSize()"
|
|
140
140
|
v-bind="props.avatar"
|
|
141
141
|
:class="ui.leadingAvatar({ class: props.ui?.leadingAvatar })"
|
|
142
|
-
data-part="
|
|
142
|
+
data-part="leadingAvatar"
|
|
143
143
|
/>
|
|
144
144
|
</slot>
|
|
145
145
|
</span>
|
|
@@ -167,7 +167,7 @@ defineExpose({
|
|
|
167
167
|
v-if="trailingIconName"
|
|
168
168
|
:name="trailingIconName"
|
|
169
169
|
:class="ui.trailingIcon({ class: props.ui?.trailingIcon })"
|
|
170
|
-
data-part="
|
|
170
|
+
data-part="trailingIcon"
|
|
171
171
|
/>
|
|
172
172
|
</slot>
|
|
173
173
|
</span>
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/timeline";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { useVModel } from "@vueuse/core";
|
|
7
|
+
import { Primitive, Separator } from "reka-ui";
|
|
8
|
+
import { computed } from "vue";
|
|
9
|
+
import { useAppConfig } from "#imports";
|
|
10
|
+
import { cv, merge } from "../utils/style";
|
|
11
|
+
import Avatar from "./Avatar.vue";
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
as: { type: null, required: false },
|
|
14
|
+
items: { type: Array, required: true },
|
|
15
|
+
size: { type: null, required: false },
|
|
16
|
+
color: { type: null, required: false },
|
|
17
|
+
orientation: { type: null, required: false, default: "vertical" },
|
|
18
|
+
defaultValue: { type: [String, Number], required: false },
|
|
19
|
+
modelValue: { type: [String, Number], required: false },
|
|
20
|
+
reverse: { type: Boolean, required: false },
|
|
21
|
+
ui: { type: null, required: false },
|
|
22
|
+
class: { type: [Object, String, Number, Boolean, null, Array], required: false, skipCheck: true }
|
|
23
|
+
});
|
|
24
|
+
const emit = defineEmits(["update:model-value"]);
|
|
25
|
+
const slots = defineSlots();
|
|
26
|
+
const modelValue = useVModel(props, "modelValue", emit);
|
|
27
|
+
const currentStepIndex = computed(() => {
|
|
28
|
+
const value = modelValue.value ?? props.defaultValue;
|
|
29
|
+
if (typeof value === "string")
|
|
30
|
+
return props.items.findIndex((item) => item.value === value) ?? -1;
|
|
31
|
+
if (props.reverse)
|
|
32
|
+
return value == null ? -1 : props.items.length - 1 - value;
|
|
33
|
+
return value ?? -1;
|
|
34
|
+
});
|
|
35
|
+
function getItemState(index) {
|
|
36
|
+
if (currentStepIndex.value === -1)
|
|
37
|
+
return void 0;
|
|
38
|
+
if (index === currentStepIndex.value)
|
|
39
|
+
return "active";
|
|
40
|
+
if (props.reverse)
|
|
41
|
+
return index > currentStepIndex.value ? "completed" : void 0;
|
|
42
|
+
return index < currentStepIndex.value ? "completed" : void 0;
|
|
43
|
+
}
|
|
44
|
+
const appConfig = useAppConfig();
|
|
45
|
+
const ui = computed(() => {
|
|
46
|
+
const styler = cv(merge(theme, appConfig.ui.timeline));
|
|
47
|
+
return styler(props);
|
|
48
|
+
});
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<template>
|
|
52
|
+
<Primitive :as="props.as" :data-orientation="props.orientation" :class="ui.root({ class: [props.ui?.root, props.class] })" data-part="root">
|
|
53
|
+
<div
|
|
54
|
+
v-for="(item, index) in props.items"
|
|
55
|
+
:key="item.value ?? index"
|
|
56
|
+
:class="ui.item({ class: [props.ui?.item, item.ui?.item, item.class] })"
|
|
57
|
+
data-part="item"
|
|
58
|
+
:data-state="getItemState(index)"
|
|
59
|
+
>
|
|
60
|
+
<div :class="ui.container({ class: [props.ui?.container, item.ui?.container] })" data-part="container">
|
|
61
|
+
<Avatar
|
|
62
|
+
:size="props.size"
|
|
63
|
+
:icon="item.icon"
|
|
64
|
+
v-bind="typeof item.avatar === 'object' ? item.avatar : {}"
|
|
65
|
+
:ui="{
|
|
66
|
+
icon: ui.indicatorIcon({ class: props.ui?.indicatorIcon }),
|
|
67
|
+
fallback: ui.indicatorFallback({ class: props.ui?.indicatorFallback })
|
|
68
|
+
}"
|
|
69
|
+
:class="ui.indicator({ class: [props.ui?.indicator, item.ui?.indicator] })"
|
|
70
|
+
data-part="indicator"
|
|
71
|
+
>
|
|
72
|
+
<slot :name="item.slot ? `${item.slot}-indicator` : 'indicator'" :item="item"></slot>
|
|
73
|
+
</Avatar>
|
|
74
|
+
|
|
75
|
+
<Separator
|
|
76
|
+
v-if="index < items.length - 1"
|
|
77
|
+
:orientation="props.orientation"
|
|
78
|
+
:class="ui.separator({ class: [props.ui?.separator, item.ui?.separator] })"
|
|
79
|
+
data-part="separator"
|
|
80
|
+
/>
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
<div :class="ui.wrapper({ class: [props.ui?.wrapper, item.ui?.wrapper] })" data-part="wrapper">
|
|
84
|
+
<div v-if="item.date" :class="ui.date({ class: [props.ui?.date, item.ui?.date] })" data-part="date">
|
|
85
|
+
<slot :name="item.slot ? `${item.slot}-date` : 'date'" :item="item">
|
|
86
|
+
{{ item.date }}
|
|
87
|
+
</slot>
|
|
88
|
+
</div>
|
|
89
|
+
<div v-if="item.title || !!slots.title" :class="ui.title({ class: [props.ui?.title, item.ui?.title] })" data-part="title">
|
|
90
|
+
<slot :name="item.slot ? `${item.slot}-title` : 'title'" :item="item">
|
|
91
|
+
{{ item.title }}
|
|
92
|
+
</slot>
|
|
93
|
+
</div>
|
|
94
|
+
<div v-if="item.description || !!slots.description" :class="ui.description({ class: [props.ui?.description, item.ui?.description] })" data-part="description">
|
|
95
|
+
<slot :name="item.slot ? `${item.slot}-description` : 'description'" :item="item">
|
|
96
|
+
{{ item.description }}
|
|
97
|
+
</slot>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
</Primitive>
|
|
102
|
+
</template>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { VariantProps } from '@byyuurin/ui-kit';
|
|
2
|
+
import type { PrimitiveProps } from 'reka-ui';
|
|
3
|
+
import theme from '#build/ui/timeline';
|
|
4
|
+
import type { AvatarProps, ComponentBaseProps, ComponentUIProps, IconProps } from '../types';
|
|
5
|
+
import type { DynamicSlots, StaticSlot } from '../types/utils';
|
|
6
|
+
export interface TimelineItem {
|
|
7
|
+
date?: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
icon?: IconProps['name'];
|
|
11
|
+
avatar?: AvatarProps;
|
|
12
|
+
value?: string | number;
|
|
13
|
+
slot?: string;
|
|
14
|
+
class?: ComponentBaseProps['class'];
|
|
15
|
+
ui?: Pick<ComponentUIProps<typeof theme>, 'item' | 'container' | 'indicator' | 'separator' | 'wrapper' | 'date' | 'title' | 'description'>;
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}
|
|
18
|
+
type ThemeVariants = VariantProps<typeof theme>;
|
|
19
|
+
export interface TimelineProps<T extends TimelineItem = TimelineItem> extends ComponentBaseProps {
|
|
20
|
+
/**
|
|
21
|
+
* The element or component this component should render as.
|
|
22
|
+
* @default "div"
|
|
23
|
+
*/
|
|
24
|
+
as?: PrimitiveProps['as'];
|
|
25
|
+
items: T[];
|
|
26
|
+
/** @default "md" */
|
|
27
|
+
size?: ThemeVariants['size'];
|
|
28
|
+
/** @default "primary" */
|
|
29
|
+
color?: ThemeVariants['color'];
|
|
30
|
+
/**
|
|
31
|
+
* The orientation of the Timeline.
|
|
32
|
+
* @default "vertical"
|
|
33
|
+
*/
|
|
34
|
+
orientation?: ThemeVariants['orientation'];
|
|
35
|
+
defaultValue?: string | number;
|
|
36
|
+
modelValue?: string | number;
|
|
37
|
+
reverse?: boolean;
|
|
38
|
+
ui?: ComponentUIProps<typeof theme>;
|
|
39
|
+
}
|
|
40
|
+
export interface TimelineEmits {
|
|
41
|
+
'update:model-value': [value: string | number];
|
|
42
|
+
}
|
|
43
|
+
export type TimelineSlots<T extends TimelineItem = TimelineItem> = {
|
|
44
|
+
indicator: StaticSlot<{
|
|
45
|
+
item: T;
|
|
46
|
+
}>;
|
|
47
|
+
date: StaticSlot<{
|
|
48
|
+
item: T;
|
|
49
|
+
}>;
|
|
50
|
+
title: StaticSlot<{
|
|
51
|
+
item: T;
|
|
52
|
+
}>;
|
|
53
|
+
description: StaticSlot<{
|
|
54
|
+
item: T;
|
|
55
|
+
}>;
|
|
56
|
+
} & DynamicSlots<T, 'indicator' | 'date' | 'title' | 'description', {
|
|
57
|
+
item: T;
|
|
58
|
+
}, false>;
|
|
59
|
+
declare const __VLS_export: <T extends TimelineItem>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
60
|
+
props: __VLS_PrettifyLocal<TimelineProps<T> & {
|
|
61
|
+
"onUpdate:model-value"?: ((value: string | number) => any) | undefined;
|
|
62
|
+
}> & import("vue").PublicProps;
|
|
63
|
+
expose: (exposed: {}) => void;
|
|
64
|
+
attrs: any;
|
|
65
|
+
slots: TimelineSlots<T>;
|
|
66
|
+
emit: (evt: "update:model-value", value: string | number) => void;
|
|
67
|
+
}>) => import("vue").VNode & {
|
|
68
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
69
|
+
};
|
|
70
|
+
declare const _default: typeof __VLS_export;
|
|
71
|
+
export default _default;
|
|
72
|
+
type __VLS_PrettifyLocal<T> = {
|
|
73
|
+
[K in keyof T as K]: T[K];
|
|
74
|
+
} & {};
|