@nuxt/ui 3.0.2 → 3.1.1
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/.nuxt/ui/accordion.ts +2 -2
- package/.nuxt/ui/alert.ts +29 -29
- package/.nuxt/ui/avatar-group.ts +1 -1
- package/.nuxt/ui/avatar.ts +3 -3
- package/.nuxt/ui/badge.ts +33 -33
- package/.nuxt/ui/breadcrumb.ts +5 -5
- package/.nuxt/ui/button.ts +43 -43
- package/.nuxt/ui/calendar.ts +17 -17
- package/.nuxt/ui/card.ts +5 -5
- package/.nuxt/ui/carousel.ts +6 -6
- package/.nuxt/ui/checkbox-group.ts +61 -0
- package/.nuxt/ui/checkbox.ts +140 -27
- package/.nuxt/ui/chip.ts +8 -8
- package/.nuxt/ui/color-picker.ts +3 -3
- package/.nuxt/ui/command-palette.ts +14 -14
- package/.nuxt/ui/context-menu.ts +33 -33
- package/.nuxt/ui/drawer.ts +10 -10
- package/.nuxt/ui/dropdown-menu.ts +34 -34
- package/.nuxt/ui/form-field.ts +6 -6
- package/.nuxt/ui/index.ts +1 -0
- package/.nuxt/ui/input-menu.ts +42 -42
- package/.nuxt/ui/input-number.ts +20 -20
- package/.nuxt/ui/input.ts +23 -23
- package/.nuxt/ui/kbd.ts +4 -4
- package/.nuxt/ui/link.ts +3 -3
- package/.nuxt/ui/modal.ts +5 -5
- package/.nuxt/ui/navigation-menu.ts +78 -80
- package/.nuxt/ui/pin-input.ts +20 -20
- package/.nuxt/ui/popover.ts +2 -2
- package/.nuxt/ui/progress.ts +17 -17
- package/.nuxt/ui/radio-group.ts +250 -35
- package/.nuxt/ui/select-menu.ts +36 -33
- package/.nuxt/ui/select.ts +32 -32
- package/.nuxt/ui/separator.ts +8 -8
- package/.nuxt/ui/skeleton.ts +1 -1
- package/.nuxt/ui/slideover.ts +4 -4
- package/.nuxt/ui/slider.ts +16 -16
- package/.nuxt/ui/stepper.ts +18 -18
- package/.nuxt/ui/switch.ts +20 -20
- package/.nuxt/ui/table.ts +15 -15
- package/.nuxt/ui/tabs.ts +32 -32
- package/.nuxt/ui/textarea.ts +40 -35
- package/.nuxt/ui/toast.ts +24 -24
- package/.nuxt/ui/tooltip.ts +2 -2
- package/.nuxt/ui/tree.ts +18 -18
- package/.nuxt/ui.css +63 -12
- package/README.md +15 -0
- package/cli/templates.mjs +18 -17
- package/dist/module.json +5 -5
- package/dist/module.mjs +12 -7
- package/dist/runtime/components/Accordion.vue +36 -93
- package/dist/runtime/components/Accordion.vue.d.ts +75 -0
- package/dist/runtime/components/Alert.vue +37 -100
- package/dist/runtime/components/Alert.vue.d.ts +81 -0
- package/dist/runtime/components/App.vue +28 -34
- package/dist/runtime/components/App.vue.d.ts +24 -0
- package/dist/runtime/components/Avatar.vue +42 -75
- package/dist/runtime/components/Avatar.vue.d.ts +39 -0
- package/dist/runtime/components/AvatarGroup.vue +40 -77
- package/dist/runtime/components/AvatarGroup.vue.d.ts +31 -0
- package/dist/runtime/components/Badge.vue +33 -62
- package/dist/runtime/components/Badge.vue.d.ts +41 -0
- package/dist/runtime/components/Breadcrumb.vue +37 -90
- package/dist/runtime/components/Breadcrumb.vue.d.ts +64 -0
- package/dist/runtime/components/Button.vue +95 -104
- package/dist/runtime/components/Button.vue.d.ts +48 -0
- package/dist/runtime/components/ButtonGroup.vue +20 -46
- package/dist/runtime/components/ButtonGroup.vue.d.ts +34 -0
- package/dist/runtime/components/Calendar.vue +67 -150
- package/dist/runtime/components/Calendar.vue.d.ts +111 -0
- package/dist/runtime/components/Card.vue +18 -40
- package/dist/runtime/components/Card.vue.d.ts +29 -0
- package/dist/runtime/components/Carousel.vue +112 -234
- package/dist/runtime/components/Carousel.vue.d.ts +122 -0
- package/dist/runtime/components/Checkbox.vue +52 -93
- package/dist/runtime/components/Checkbox.vue.d.ts +73 -0
- package/dist/runtime/components/CheckboxGroup.vue +121 -0
- package/dist/runtime/components/CheckboxGroup.vue.d.ts +78 -0
- package/dist/runtime/components/Chip.vue +26 -69
- package/dist/runtime/components/Chip.vue.d.ts +57 -0
- package/dist/runtime/components/Collapsible.vue +22 -41
- package/dist/runtime/components/Collapsible.vue.d.ts +35 -0
- package/dist/runtime/components/ColorPicker.vue +111 -197
- package/dist/runtime/components/ColorPicker.vue.d.ts +48 -0
- package/dist/runtime/components/CommandPalette.vue +96 -237
- package/dist/runtime/components/CommandPalette.vue.d.ts +161 -0
- package/dist/runtime/components/Container.vue +15 -28
- package/dist/runtime/components/Container.vue.d.ts +18 -0
- package/dist/runtime/components/ContextMenu.vue +34 -133
- package/dist/runtime/components/ContextMenu.vue.d.ts +107 -0
- package/dist/runtime/components/ContextMenuContent.vue +73 -81
- package/dist/runtime/components/ContextMenuContent.vue.d.ts +65 -0
- package/dist/runtime/components/Drawer.vue +49 -83
- package/dist/runtime/components/Drawer.vue.d.ts +78 -0
- package/dist/runtime/components/DropdownMenu.vue +39 -142
- package/dist/runtime/components/DropdownMenu.vue.d.ts +117 -0
- package/dist/runtime/components/DropdownMenuContent.vue +78 -88
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +68 -0
- package/dist/runtime/components/Form.vue +135 -220
- package/dist/runtime/components/Form.vue.d.ts +69 -0
- package/dist/runtime/components/FormField.vue +35 -77
- package/dist/runtime/components/FormField.vue.d.ts +61 -0
- package/dist/runtime/components/Icon.vue +12 -19
- package/dist/runtime/components/Icon.vue.d.ts +8 -0
- package/dist/runtime/components/Input.vue +82 -140
- package/dist/runtime/components/Input.vue.d.ts +76 -0
- package/dist/runtime/components/InputMenu.vue +185 -332
- package/dist/runtime/components/InputMenu.vue.d.ts +324 -0
- package/dist/runtime/components/InputNumber.vue +71 -133
- package/dist/runtime/components/InputNumber.vue.d.ts +182 -0
- package/dist/runtime/components/Kbd.vue +20 -46
- package/dist/runtime/components/Kbd.vue.d.ts +34 -0
- package/dist/runtime/components/Link.vue +98 -176
- package/dist/runtime/components/Link.vue.d.ts +93 -0
- package/dist/runtime/components/LinkBase.vue +33 -42
- package/dist/runtime/components/LinkBase.vue.d.ts +25 -0
- package/dist/runtime/components/Modal.vue +53 -116
- package/dist/runtime/components/Modal.vue.d.ts +93 -0
- package/dist/runtime/components/NavigationMenu.vue +77 -209
- package/dist/runtime/components/NavigationMenu.vue.d.ts +139 -0
- package/dist/runtime/components/OverlayProvider.vue +14 -18
- package/dist/runtime/components/OverlayProvider.vue.d.ts +2 -0
- package/dist/runtime/components/Pagination.vue +46 -140
- package/dist/runtime/components/Pagination.vue.d.ts +119 -0
- package/dist/runtime/components/PinInput.vue +61 -78
- package/dist/runtime/components/PinInput.vue.d.ts +57 -0
- package/dist/runtime/components/Popover.vue +47 -84
- package/dist/runtime/components/Popover.vue.d.ts +63 -0
- package/dist/runtime/components/Progress.vue +70 -131
- package/dist/runtime/components/Progress.vue.d.ts +66 -0
- package/dist/runtime/components/RadioGroup.vue +70 -132
- package/dist/runtime/components/RadioGroup.vue.d.ts +91 -0
- package/dist/runtime/components/Select.vue +110 -224
- package/dist/runtime/components/Select.vue.d.ts +145 -0
- package/dist/runtime/components/SelectMenu.vue +161 -310
- package/dist/runtime/components/SelectMenu.vue.d.ts +196 -0
- package/dist/runtime/components/Separator.vue +29 -71
- package/dist/runtime/components/Separator.vue.d.ts +54 -0
- package/dist/runtime/components/Skeleton.vue +21 -23
- package/dist/runtime/components/Skeleton.vue.d.ts +17 -0
- package/dist/runtime/components/Slideover.vue +53 -120
- package/dist/runtime/components/Slideover.vue.d.ts +94 -0
- package/dist/runtime/components/Slider.vue +46 -84
- package/dist/runtime/components/Slider.vue.d.ts +52 -0
- package/dist/runtime/components/Stepper.vue +45 -115
- package/dist/runtime/components/Stepper.vue.d.ts +83 -0
- package/dist/runtime/components/Switch.vue +45 -93
- package/dist/runtime/components/Switch.vue.d.ts +70 -0
- package/dist/runtime/components/Table.vue +163 -267
- package/dist/runtime/components/Table.vue.d.ts +183 -0
- package/dist/runtime/components/Tabs.vue +41 -107
- package/dist/runtime/components/Tabs.vue.d.ts +88 -0
- package/dist/runtime/components/Textarea.vue +113 -158
- package/dist/runtime/components/Textarea.vue.d.ts +78 -0
- package/dist/runtime/components/Toast.vue +49 -110
- package/dist/runtime/components/Toast.vue.d.ts +157 -0
- package/dist/runtime/components/Toaster.vue +70 -107
- package/dist/runtime/components/Toaster.vue.d.ts +38 -0
- package/dist/runtime/components/Tooltip.vue +38 -65
- package/dist/runtime/components/Tooltip.vue.d.ts +50 -0
- package/dist/runtime/components/Tree.vue +59 -166
- package/dist/runtime/components/Tree.vue.d.ts +111 -0
- package/dist/runtime/composables/defineShortcuts.d.ts +1 -1
- package/dist/runtime/composables/defineShortcuts.js +6 -0
- package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
- package/dist/runtime/composables/useButtonGroup.d.ts +2 -2
- package/dist/runtime/composables/useFormField.d.ts +2 -2
- package/dist/runtime/composables/useKbd.d.ts +1 -0
- package/dist/runtime/composables/useKbd.js +4 -3
- package/dist/runtime/composables/useOverlay.d.ts +14 -8
- package/dist/runtime/composables/useOverlay.js +20 -7
- package/dist/runtime/composables/usePortal.d.ts +6 -0
- package/dist/runtime/composables/usePortal.js +17 -0
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/inertia/components/Link.vue +146 -0
- package/dist/runtime/inertia/components/Link.vue.d.ts +63 -0
- package/dist/runtime/inertia/stubs.d.ts +43 -0
- package/dist/runtime/inertia/stubs.js +82 -0
- package/dist/runtime/locale/bg.d.ts +3 -0
- package/dist/runtime/locale/bg.js +54 -0
- package/dist/runtime/locale/index.d.ts +5 -1
- package/dist/runtime/locale/index.js +5 -1
- package/dist/runtime/locale/kk.d.ts +3 -0
- package/dist/runtime/locale/kk.js +54 -0
- package/dist/runtime/locale/tj.d.ts +3 -0
- package/dist/runtime/locale/tj.js +54 -0
- package/dist/runtime/locale/ug_cn.d.ts +3 -0
- package/dist/runtime/locale/ug_cn.js +55 -0
- package/dist/runtime/types/form.d.ts +4 -1
- package/dist/runtime/types/index.d.ts +1 -0
- package/dist/runtime/types/index.js +1 -0
- package/dist/runtime/types/tv.d.ts +53 -0
- package/dist/runtime/types/tv.js +0 -0
- package/dist/runtime/types/utils.d.ts +7 -17
- package/dist/runtime/types/utils.js +1 -0
- package/dist/runtime/utils/link.d.ts +3 -3
- package/dist/runtime/utils/link.js +1 -0
- package/dist/runtime/utils/tv.js +2 -2
- package/dist/runtime/vue/components/Icon.vue +7 -8
- package/dist/runtime/vue/components/Icon.vue.d.ts +5 -0
- package/dist/runtime/vue/components/Link.vue +118 -202
- package/dist/runtime/vue/components/Link.vue.d.ts +93 -0
- package/dist/runtime/vue/stubs.d.ts +2 -2
- package/dist/shared/{ui.BkNUP964.mjs → ui.CbtTMMzt.mjs} +631 -366
- package/dist/types.d.mts +3 -5
- package/dist/unplugin.d.mts +6 -2
- package/dist/unplugin.mjs +25 -4
- package/dist/vite.d.mts +1 -1
- package/dist/vite.mjs +2 -2
- package/package.json +96 -54
- package/dist/module.cjs +0 -62
- package/dist/module.d.cts +0 -45
- package/dist/module.d.ts +0 -45
- package/dist/shared/ui.BL-XB3u1.cjs +0 -3555
- package/dist/types.d.ts +0 -7
- package/dist/unplugin.cjs +0 -232
- package/dist/unplugin.d.cts +0 -62
- package/dist/unplugin.d.ts +0 -62
- package/dist/vite.cjs +0 -23
- package/dist/vite.d.cts +0 -15
- package/dist/vite.d.ts +0 -15
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
2
|
+
import theme from '#build/ui/button';
|
|
3
|
+
import type { LinkProps } from './Link.vue';
|
|
4
|
+
import type { UseComponentIconsProps } from '../composables/useComponentIcons';
|
|
5
|
+
import type { ComponentConfig } from '../types/utils';
|
|
6
|
+
type Button = ComponentConfig<typeof theme, AppConfig, 'button'>;
|
|
7
|
+
export interface ButtonProps extends UseComponentIconsProps, Omit<LinkProps, 'raw' | 'custom'> {
|
|
8
|
+
label?: string;
|
|
9
|
+
/**
|
|
10
|
+
* @defaultValue 'primary'
|
|
11
|
+
*/
|
|
12
|
+
color?: Button['variants']['color'];
|
|
13
|
+
activeColor?: Button['variants']['color'];
|
|
14
|
+
/**
|
|
15
|
+
* @defaultValue 'solid'
|
|
16
|
+
*/
|
|
17
|
+
variant?: Button['variants']['variant'];
|
|
18
|
+
activeVariant?: Button['variants']['variant'];
|
|
19
|
+
/**
|
|
20
|
+
* @defaultValue 'md'
|
|
21
|
+
*/
|
|
22
|
+
size?: Button['variants']['size'];
|
|
23
|
+
/** Render the button with equal padding on all sides. */
|
|
24
|
+
square?: boolean;
|
|
25
|
+
/** Render the button full width. */
|
|
26
|
+
block?: boolean;
|
|
27
|
+
/** Set loading state automatically based on the `@click` promise state */
|
|
28
|
+
loadingAuto?: boolean;
|
|
29
|
+
onClick?: ((event: MouseEvent) => void | Promise<void>) | Array<((event: MouseEvent) => void | Promise<void>)>;
|
|
30
|
+
class?: any;
|
|
31
|
+
ui?: Button['slots'];
|
|
32
|
+
}
|
|
33
|
+
export interface ButtonSlots {
|
|
34
|
+
leading(props?: {}): any;
|
|
35
|
+
default(props?: {}): any;
|
|
36
|
+
trailing(props?: {}): any;
|
|
37
|
+
}
|
|
38
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{}>, {
|
|
39
|
+
activeClass: string;
|
|
40
|
+
active: boolean;
|
|
41
|
+
inactiveClass: string;
|
|
42
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ButtonSlots>;
|
|
43
|
+
export default _default;
|
|
44
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
45
|
+
new (): {
|
|
46
|
+
$slots: S;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -1,57 +1,31 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
import type { AppConfig } from '@nuxt/schema'
|
|
4
|
-
import _appConfig from '#build/app.config'
|
|
5
|
-
import theme from '#build/ui/button-group'
|
|
6
|
-
import { tv } from '../utils/tv'
|
|
7
|
-
|
|
8
|
-
const appConfigButtonGroup = _appConfig as AppConfig & { ui: { buttonGroup: Partial<typeof theme> } }
|
|
9
|
-
|
|
10
|
-
const buttonGroup = tv({ extend: tv(theme), ...(appConfigButtonGroup.ui?.buttonGroup) })
|
|
11
|
-
|
|
12
|
-
type ButtonGroupVariants = VariantProps<typeof buttonGroup>
|
|
13
|
-
|
|
14
|
-
export interface ButtonGroupProps {
|
|
15
|
-
/**
|
|
16
|
-
* The element or component this component should render as.
|
|
17
|
-
* @defaultValue 'div'
|
|
18
|
-
*/
|
|
19
|
-
as?: any
|
|
20
|
-
/**
|
|
21
|
-
* @defaultValue 'md'
|
|
22
|
-
*/
|
|
23
|
-
size?: ButtonGroupVariants['size']
|
|
24
|
-
/**
|
|
25
|
-
* The orientation the buttons are laid out.
|
|
26
|
-
* @defaultValue 'horizontal'
|
|
27
|
-
*/
|
|
28
|
-
orientation?: ButtonGroupVariants['orientation']
|
|
29
|
-
class?: any
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface ButtonGroupSlots {
|
|
33
|
-
default(props?: {}): any
|
|
34
|
-
}
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/button-group";
|
|
35
3
|
</script>
|
|
36
4
|
|
|
37
|
-
<script setup
|
|
38
|
-
import { provide, computed } from
|
|
39
|
-
import { Primitive } from
|
|
40
|
-
import {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
5
|
+
<script setup>
|
|
6
|
+
import { provide, computed } from "vue";
|
|
7
|
+
import { Primitive } from "reka-ui";
|
|
8
|
+
import { useAppConfig } from "#imports";
|
|
9
|
+
import { buttonGroupInjectionKey } from "../composables/useButtonGroup";
|
|
10
|
+
import { tv } from "../utils/tv";
|
|
11
|
+
const props = defineProps({
|
|
12
|
+
as: { type: null, required: false },
|
|
13
|
+
size: { type: null, required: false },
|
|
14
|
+
orientation: { type: null, required: false, default: "horizontal" },
|
|
15
|
+
class: { type: null, required: false },
|
|
16
|
+
ui: { type: null, required: false }
|
|
17
|
+
});
|
|
18
|
+
defineSlots();
|
|
19
|
+
const appConfig = useAppConfig();
|
|
20
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.buttonGroup || {} }));
|
|
47
21
|
provide(buttonGroupInjectionKey, computed(() => ({
|
|
48
22
|
orientation: props.orientation,
|
|
49
23
|
size: props.size
|
|
50
|
-
})))
|
|
24
|
+
})));
|
|
51
25
|
</script>
|
|
52
26
|
|
|
53
27
|
<template>
|
|
54
|
-
<Primitive :as="as" :class="
|
|
28
|
+
<Primitive :as="as" :class="ui({ orientation, class: props.class })">
|
|
55
29
|
<slot />
|
|
56
30
|
</Primitive>
|
|
57
31
|
</template>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
2
|
+
import theme from '#build/ui/button-group';
|
|
3
|
+
import type { ComponentConfig } from '../types/utils';
|
|
4
|
+
type ButtonGroup = ComponentConfig<typeof theme, AppConfig, 'buttonGroup'>;
|
|
5
|
+
export interface ButtonGroupProps {
|
|
6
|
+
/**
|
|
7
|
+
* The element or component this component should render as.
|
|
8
|
+
* @defaultValue 'div'
|
|
9
|
+
*/
|
|
10
|
+
as?: any;
|
|
11
|
+
/**
|
|
12
|
+
* @defaultValue 'md'
|
|
13
|
+
*/
|
|
14
|
+
size?: ButtonGroup['variants']['size'];
|
|
15
|
+
/**
|
|
16
|
+
* The orientation the buttons are laid out.
|
|
17
|
+
* @defaultValue 'horizontal'
|
|
18
|
+
*/
|
|
19
|
+
orientation?: ButtonGroup['variants']['orientation'];
|
|
20
|
+
class?: any;
|
|
21
|
+
ui?: ButtonGroup['slots'];
|
|
22
|
+
}
|
|
23
|
+
export interface ButtonGroupSlots {
|
|
24
|
+
default(props?: {}): any;
|
|
25
|
+
}
|
|
26
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ButtonGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonGroupProps> & Readonly<{}>, {
|
|
27
|
+
orientation: ButtonGroup["variants"]["orientation"];
|
|
28
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ButtonGroupSlots>;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -1,158 +1,75 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
import type { CalendarRootProps, CalendarRootEmits, RangeCalendarRootProps, RangeCalendarRootEmits, DateRange, CalendarCellTriggerProps } from 'reka-ui'
|
|
4
|
-
import type { DateValue } from '@internationalized/date'
|
|
5
|
-
import type { AppConfig } from '@nuxt/schema'
|
|
6
|
-
import type { ButtonProps } from '../types'
|
|
7
|
-
import _appConfig from '#build/app.config'
|
|
8
|
-
import theme from '#build/ui/calendar'
|
|
9
|
-
import { tv } from '../utils/tv'
|
|
10
|
-
import type { PartialString } from '../types/utils'
|
|
11
|
-
|
|
12
|
-
const appConfigCalendar = _appConfig as AppConfig & { ui: { calendar: Partial<typeof theme> } }
|
|
13
|
-
|
|
14
|
-
const calendar = tv({ extend: tv(theme), ...(appConfigCalendar.ui?.calendar || {}) })
|
|
15
|
-
|
|
16
|
-
type CalendarVariants = VariantProps<typeof calendar>
|
|
17
|
-
|
|
18
|
-
type CalendarDefaultValue<R extends boolean = false, M extends boolean = false> = R extends true
|
|
19
|
-
? DateRange
|
|
20
|
-
: M extends true
|
|
21
|
-
? DateValue[]
|
|
22
|
-
: DateValue
|
|
23
|
-
type CalendarModelValue<R extends boolean = false, M extends boolean = false> = R extends true
|
|
24
|
-
? (DateRange | null)
|
|
25
|
-
: M extends true
|
|
26
|
-
? (DateValue[] | undefined)
|
|
27
|
-
: (DateValue | undefined)
|
|
28
|
-
|
|
29
|
-
type _CalendarRootProps = Omit<CalendarRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir' | 'locale' | 'calendarLabel' | 'multiple'>
|
|
30
|
-
type _RangeCalendarRootProps = Omit<RangeCalendarRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir' | 'locale' | 'calendarLabel' | 'multiple'>
|
|
31
|
-
|
|
32
|
-
export interface CalendarProps<R extends boolean = false, M extends boolean = false> extends _RangeCalendarRootProps, _CalendarRootProps {
|
|
33
|
-
/**
|
|
34
|
-
* The element or component this component should render as.
|
|
35
|
-
* @defaultValue 'div'
|
|
36
|
-
*/
|
|
37
|
-
as?: any
|
|
38
|
-
/**
|
|
39
|
-
* The icon to use for the next year control.
|
|
40
|
-
* @defaultValue appConfig.ui.icons.chevronDoubleRight
|
|
41
|
-
* @IconifyIcon
|
|
42
|
-
*/
|
|
43
|
-
nextYearIcon?: string
|
|
44
|
-
/**
|
|
45
|
-
* Configure the next year button.
|
|
46
|
-
* `{ color: 'neutral', variant: 'ghost' }`{lang="ts-type"}
|
|
47
|
-
*/
|
|
48
|
-
nextYear?: ButtonProps
|
|
49
|
-
/**
|
|
50
|
-
* The icon to use for the next month control.
|
|
51
|
-
* @defaultValue appConfig.ui.icons.chevronRight
|
|
52
|
-
* @IconifyIcon
|
|
53
|
-
*/
|
|
54
|
-
nextMonthIcon?: string
|
|
55
|
-
/**
|
|
56
|
-
* Configure the next month button.
|
|
57
|
-
* `{ color: 'neutral', variant: 'ghost' }`{lang="ts-type"}
|
|
58
|
-
*/
|
|
59
|
-
nextMonth?: ButtonProps
|
|
60
|
-
/**
|
|
61
|
-
* The icon to use for the previous year control.
|
|
62
|
-
* @defaultValue appConfig.ui.icons.chevronDoubleLeft
|
|
63
|
-
* @IconifyIcon
|
|
64
|
-
*/
|
|
65
|
-
prevYearIcon?: string
|
|
66
|
-
/**
|
|
67
|
-
* Configure the prev year button.
|
|
68
|
-
* `{ color: 'neutral', variant: 'ghost' }`{lang="ts-type"}
|
|
69
|
-
*/
|
|
70
|
-
prevYear?: ButtonProps
|
|
71
|
-
/**
|
|
72
|
-
* The icon to use for the previous month control.
|
|
73
|
-
* @defaultValue appConfig.ui.icons.chevronLeft
|
|
74
|
-
* @IconifyIcon
|
|
75
|
-
*/
|
|
76
|
-
prevMonthIcon?: string
|
|
77
|
-
/**
|
|
78
|
-
* Configure the prev month button.
|
|
79
|
-
* `{ color: 'neutral', variant: 'ghost' }`{lang="ts-type"}
|
|
80
|
-
*/
|
|
81
|
-
prevMonth?: ButtonProps
|
|
82
|
-
/**
|
|
83
|
-
* @defaultValue 'primary'
|
|
84
|
-
*/
|
|
85
|
-
color?: CalendarVariants['color']
|
|
86
|
-
/**
|
|
87
|
-
* @defaultValue 'md'
|
|
88
|
-
*/
|
|
89
|
-
size?: CalendarVariants['size']
|
|
90
|
-
/** Whether or not a range of dates can be selected */
|
|
91
|
-
range?: R & boolean
|
|
92
|
-
/** Whether or not multiple dates can be selected */
|
|
93
|
-
multiple?: M & boolean
|
|
94
|
-
/** Show month controls */
|
|
95
|
-
monthControls?: boolean
|
|
96
|
-
/** Show year controls */
|
|
97
|
-
yearControls?: boolean
|
|
98
|
-
defaultValue?: CalendarDefaultValue<R, M>
|
|
99
|
-
modelValue?: CalendarModelValue<R, M>
|
|
100
|
-
class?: any
|
|
101
|
-
ui?: PartialString<typeof calendar.slots>
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export interface CalendarEmits<R extends boolean, M extends boolean> extends Omit<CalendarRootEmits & RangeCalendarRootEmits, 'update:modelValue'> {
|
|
105
|
-
'update:modelValue': [date: CalendarModelValue<R, M>]
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export interface CalendarSlots {
|
|
109
|
-
'heading': (props: { value: string }) => any
|
|
110
|
-
'day': (props: Pick<CalendarCellTriggerProps, 'day'>) => any
|
|
111
|
-
'week-day': (props: { day: string }) => any
|
|
112
|
-
}
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/calendar";
|
|
113
3
|
</script>
|
|
114
4
|
|
|
115
|
-
<script setup
|
|
116
|
-
import { computed } from
|
|
117
|
-
import { useForwardPropsEmits } from
|
|
118
|
-
import { Calendar as SingleCalendar, RangeCalendar } from
|
|
119
|
-
import { reactiveOmit } from
|
|
120
|
-
import { useAppConfig } from
|
|
121
|
-
import { useLocale } from
|
|
122
|
-
import
|
|
123
|
-
|
|
124
|
-
const props =
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { useForwardPropsEmits } from "reka-ui";
|
|
8
|
+
import { Calendar as SingleCalendar, RangeCalendar } from "reka-ui/namespaced";
|
|
9
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
10
|
+
import { useAppConfig } from "#imports";
|
|
11
|
+
import { useLocale } from "../composables/useLocale";
|
|
12
|
+
import { tv } from "../utils/tv";
|
|
13
|
+
import UButton from "./Button.vue";
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
as: { type: null, required: false },
|
|
16
|
+
nextYearIcon: { type: String, required: false },
|
|
17
|
+
nextYear: { type: Object, required: false },
|
|
18
|
+
nextMonthIcon: { type: String, required: false },
|
|
19
|
+
nextMonth: { type: Object, required: false },
|
|
20
|
+
prevYearIcon: { type: String, required: false },
|
|
21
|
+
prevYear: { type: Object, required: false },
|
|
22
|
+
prevMonthIcon: { type: String, required: false },
|
|
23
|
+
prevMonth: { type: Object, required: false },
|
|
24
|
+
color: { type: null, required: false },
|
|
25
|
+
size: { type: null, required: false },
|
|
26
|
+
range: { type: Boolean, required: false },
|
|
27
|
+
multiple: { type: Boolean, required: false },
|
|
28
|
+
monthControls: { type: Boolean, required: false, default: true },
|
|
29
|
+
yearControls: { type: Boolean, required: false, default: true },
|
|
30
|
+
defaultValue: { type: null, required: false },
|
|
31
|
+
modelValue: { type: null, required: false },
|
|
32
|
+
class: { type: null, required: false },
|
|
33
|
+
ui: { type: null, required: false },
|
|
34
|
+
defaultPlaceholder: { type: null, required: false },
|
|
35
|
+
placeholder: { type: null, required: false },
|
|
36
|
+
allowNonContiguousRanges: { type: Boolean, required: false },
|
|
37
|
+
pagedNavigation: { type: Boolean, required: false },
|
|
38
|
+
preventDeselect: { type: Boolean, required: false },
|
|
39
|
+
weekStartsOn: { type: Number, required: false },
|
|
40
|
+
weekdayFormat: { type: String, required: false },
|
|
41
|
+
fixedWeeks: { type: Boolean, required: false, default: true },
|
|
42
|
+
maxValue: { type: null, required: false },
|
|
43
|
+
minValue: { type: null, required: false },
|
|
44
|
+
numberOfMonths: { type: Number, required: false },
|
|
45
|
+
disabled: { type: Boolean, required: false },
|
|
46
|
+
readonly: { type: Boolean, required: false },
|
|
47
|
+
initialFocus: { type: Boolean, required: false },
|
|
48
|
+
isDateDisabled: { type: Function, required: false },
|
|
49
|
+
isDateUnavailable: { type: Function, required: false },
|
|
50
|
+
nextPage: { type: Function, required: false },
|
|
51
|
+
prevPage: { type: Function, required: false }
|
|
52
|
+
});
|
|
53
|
+
const emits = defineEmits(["update:modelValue", "update:placeholder", "update:startValue"]);
|
|
54
|
+
defineSlots();
|
|
55
|
+
const { code: locale, dir, t } = useLocale();
|
|
56
|
+
const appConfig = useAppConfig();
|
|
57
|
+
const rootProps = useForwardPropsEmits(reactiveOmit(props, "range", "modelValue", "defaultValue", "color", "size", "monthControls", "yearControls", "class", "ui"), emits);
|
|
58
|
+
const nextYearIcon = computed(() => props.nextYearIcon || (dir.value === "rtl" ? appConfig.ui.icons.chevronDoubleLeft : appConfig.ui.icons.chevronDoubleRight));
|
|
59
|
+
const nextMonthIcon = computed(() => props.nextMonthIcon || (dir.value === "rtl" ? appConfig.ui.icons.chevronLeft : appConfig.ui.icons.chevronRight));
|
|
60
|
+
const prevYearIcon = computed(() => props.prevYearIcon || (dir.value === "rtl" ? appConfig.ui.icons.chevronDoubleRight : appConfig.ui.icons.chevronDoubleLeft));
|
|
61
|
+
const prevMonthIcon = computed(() => props.prevMonthIcon || (dir.value === "rtl" ? appConfig.ui.icons.chevronRight : appConfig.ui.icons.chevronLeft));
|
|
62
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.calendar || {} })({
|
|
143
63
|
color: props.color,
|
|
144
64
|
size: props.size
|
|
145
|
-
}))
|
|
146
|
-
|
|
147
|
-
function paginateYear(date: DateValue, sign: -1 | 1) {
|
|
65
|
+
}));
|
|
66
|
+
function paginateYear(date, sign) {
|
|
148
67
|
if (sign === -1) {
|
|
149
|
-
return date.subtract({ years: 1 })
|
|
68
|
+
return date.subtract({ years: 1 });
|
|
150
69
|
}
|
|
151
|
-
|
|
152
|
-
return date.add({ years: 1 })
|
|
70
|
+
return date.add({ years: 1 });
|
|
153
71
|
}
|
|
154
|
-
|
|
155
|
-
const Calendar = computed(() => props.range ? RangeCalendar : SingleCalendar)
|
|
72
|
+
const Calendar = computed(() => props.range ? RangeCalendar : SingleCalendar);
|
|
156
73
|
</script>
|
|
157
74
|
|
|
158
75
|
<template>
|
|
@@ -166,7 +83,7 @@ const Calendar = computed(() => props.range ? RangeCalendar : SingleCalendar)
|
|
|
166
83
|
:class="ui.root({ class: [props.class, props.ui?.root] })"
|
|
167
84
|
>
|
|
168
85
|
<Calendar.Header :class="ui.header({ class: props.ui?.header })">
|
|
169
|
-
<Calendar.Prev v-if="props.yearControls" :prev-page="(date
|
|
86
|
+
<Calendar.Prev v-if="props.yearControls" :prev-page="(date) => paginateYear(date, -1)" :aria-label="t('calendar.prevYear')" as-child>
|
|
170
87
|
<UButton :icon="prevYearIcon" :size="props.size" color="neutral" variant="ghost" v-bind="props.prevYear" />
|
|
171
88
|
</Calendar.Prev>
|
|
172
89
|
<Calendar.Prev v-if="props.monthControls" :aria-label="t('calendar.prevMonth')" as-child>
|
|
@@ -180,7 +97,7 @@ const Calendar = computed(() => props.range ? RangeCalendar : SingleCalendar)
|
|
|
180
97
|
<Calendar.Next v-if="props.monthControls" :aria-label="t('calendar.nextMonth')" as-child>
|
|
181
98
|
<UButton :icon="nextMonthIcon" :size="props.size" color="neutral" variant="ghost" v-bind="props.nextMonth" />
|
|
182
99
|
</Calendar.Next>
|
|
183
|
-
<Calendar.Next v-if="props.yearControls" :next-page="(date
|
|
100
|
+
<Calendar.Next v-if="props.yearControls" :next-page="(date) => paginateYear(date, 1)" :aria-label="t('calendar.nextYear')" as-child>
|
|
184
101
|
<UButton :icon="nextYearIcon" :size="props.size" color="neutral" variant="ghost" v-bind="props.nextYear" />
|
|
185
102
|
</Calendar.Next>
|
|
186
103
|
</Calendar.Header>
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import type { CalendarRootProps, CalendarRootEmits, RangeCalendarRootProps, RangeCalendarRootEmits, DateRange, CalendarCellTriggerProps } from 'reka-ui';
|
|
2
|
+
import type { DateValue } from '@internationalized/date';
|
|
3
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
4
|
+
import theme from '#build/ui/calendar';
|
|
5
|
+
import type { ButtonProps } from '../types';
|
|
6
|
+
import type { ComponentConfig } from '../types/utils';
|
|
7
|
+
type Calendar = ComponentConfig<typeof theme, AppConfig, 'calendar'>;
|
|
8
|
+
type CalendarDefaultValue<R extends boolean = false, M extends boolean = false> = R extends true ? DateRange : M extends true ? DateValue[] : DateValue;
|
|
9
|
+
type CalendarModelValue<R extends boolean = false, M extends boolean = false> = R extends true ? (DateRange | null) : M extends true ? (DateValue[] | undefined) : (DateValue | undefined);
|
|
10
|
+
type _CalendarRootProps = Omit<CalendarRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir' | 'locale' | 'calendarLabel' | 'multiple'>;
|
|
11
|
+
type _RangeCalendarRootProps = Omit<RangeCalendarRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir' | 'locale' | 'calendarLabel' | 'multiple'>;
|
|
12
|
+
export interface CalendarProps<R extends boolean = false, M extends boolean = false> extends _RangeCalendarRootProps, _CalendarRootProps {
|
|
13
|
+
/**
|
|
14
|
+
* The element or component this component should render as.
|
|
15
|
+
* @defaultValue 'div'
|
|
16
|
+
*/
|
|
17
|
+
as?: any;
|
|
18
|
+
/**
|
|
19
|
+
* The icon to use for the next year control.
|
|
20
|
+
* @defaultValue appConfig.ui.icons.chevronDoubleRight
|
|
21
|
+
* @IconifyIcon
|
|
22
|
+
*/
|
|
23
|
+
nextYearIcon?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Configure the next year button.
|
|
26
|
+
* `{ color: 'neutral', variant: 'ghost' }`{lang="ts-type"}
|
|
27
|
+
*/
|
|
28
|
+
nextYear?: ButtonProps;
|
|
29
|
+
/**
|
|
30
|
+
* The icon to use for the next month control.
|
|
31
|
+
* @defaultValue appConfig.ui.icons.chevronRight
|
|
32
|
+
* @IconifyIcon
|
|
33
|
+
*/
|
|
34
|
+
nextMonthIcon?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Configure the next month button.
|
|
37
|
+
* `{ color: 'neutral', variant: 'ghost' }`{lang="ts-type"}
|
|
38
|
+
*/
|
|
39
|
+
nextMonth?: ButtonProps;
|
|
40
|
+
/**
|
|
41
|
+
* The icon to use for the previous year control.
|
|
42
|
+
* @defaultValue appConfig.ui.icons.chevronDoubleLeft
|
|
43
|
+
* @IconifyIcon
|
|
44
|
+
*/
|
|
45
|
+
prevYearIcon?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Configure the prev year button.
|
|
48
|
+
* `{ color: 'neutral', variant: 'ghost' }`{lang="ts-type"}
|
|
49
|
+
*/
|
|
50
|
+
prevYear?: ButtonProps;
|
|
51
|
+
/**
|
|
52
|
+
* The icon to use for the previous month control.
|
|
53
|
+
* @defaultValue appConfig.ui.icons.chevronLeft
|
|
54
|
+
* @IconifyIcon
|
|
55
|
+
*/
|
|
56
|
+
prevMonthIcon?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Configure the prev month button.
|
|
59
|
+
* `{ color: 'neutral', variant: 'ghost' }`{lang="ts-type"}
|
|
60
|
+
*/
|
|
61
|
+
prevMonth?: ButtonProps;
|
|
62
|
+
/**
|
|
63
|
+
* @defaultValue 'primary'
|
|
64
|
+
*/
|
|
65
|
+
color?: Calendar['variants']['color'];
|
|
66
|
+
/**
|
|
67
|
+
* @defaultValue 'md'
|
|
68
|
+
*/
|
|
69
|
+
size?: Calendar['variants']['size'];
|
|
70
|
+
/** Whether or not a range of dates can be selected */
|
|
71
|
+
range?: R & boolean;
|
|
72
|
+
/** Whether or not multiple dates can be selected */
|
|
73
|
+
multiple?: M & boolean;
|
|
74
|
+
/** Show month controls */
|
|
75
|
+
monthControls?: boolean;
|
|
76
|
+
/** Show year controls */
|
|
77
|
+
yearControls?: boolean;
|
|
78
|
+
defaultValue?: CalendarDefaultValue<R, M>;
|
|
79
|
+
modelValue?: CalendarModelValue<R, M>;
|
|
80
|
+
class?: any;
|
|
81
|
+
ui?: Calendar['slots'];
|
|
82
|
+
}
|
|
83
|
+
export interface CalendarEmits<R extends boolean, M extends boolean> extends Omit<CalendarRootEmits & RangeCalendarRootEmits, 'update:modelValue'> {
|
|
84
|
+
'update:modelValue': [date: CalendarModelValue<R, M>];
|
|
85
|
+
}
|
|
86
|
+
export interface CalendarSlots {
|
|
87
|
+
'heading': (props: {
|
|
88
|
+
value: string;
|
|
89
|
+
}) => any;
|
|
90
|
+
'day': (props: Pick<CalendarCellTriggerProps, 'day'>) => any;
|
|
91
|
+
'week-day': (props: {
|
|
92
|
+
day: string;
|
|
93
|
+
}) => any;
|
|
94
|
+
}
|
|
95
|
+
declare const _default: <R extends boolean, M extends boolean>(__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<{
|
|
96
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
97
|
+
readonly "onUpdate:modelValue"?: ((date: CalendarModelValue<R, M>) => any) | undefined;
|
|
98
|
+
readonly "onUpdate:placeholder"?: ((...args: unknown[]) => any) | undefined;
|
|
99
|
+
readonly "onUpdate:startValue"?: ((date: DateValue | undefined) => any) | undefined;
|
|
100
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue" | "onUpdate:placeholder" | "onUpdate:startValue"> & CalendarProps<R, M> & Partial<{}>> & import("vue").PublicProps;
|
|
101
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
102
|
+
attrs: any;
|
|
103
|
+
slots: CalendarSlots;
|
|
104
|
+
emit: ((evt: "update:modelValue", date: CalendarModelValue<R, M>) => void) & ((evt: "update:placeholder", ...args: [date: DateValue] & [date: DateValue]) => void) & ((evt: "update:startValue", date: DateValue | undefined) => void);
|
|
105
|
+
}>) => import("vue").VNode & {
|
|
106
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
107
|
+
};
|
|
108
|
+
export default _default;
|
|
109
|
+
type __VLS_PrettifyLocal<T> = {
|
|
110
|
+
[K in keyof T]: T[K];
|
|
111
|
+
} & {};
|
|
@@ -1,45 +1,23 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
import type { AppConfig } from '@nuxt/schema'
|
|
4
|
-
import _appConfig from '#build/app.config'
|
|
5
|
-
import theme from '#build/ui/card'
|
|
6
|
-
import { tv } from '../utils/tv'
|
|
7
|
-
|
|
8
|
-
const appConfigCard = _appConfig as AppConfig & { ui: { card: Partial<typeof theme> } }
|
|
9
|
-
|
|
10
|
-
const card = tv({ extend: tv(theme), ...(appConfigCard.ui?.card || {}) })
|
|
11
|
-
|
|
12
|
-
type CardVariants = VariantProps<typeof card>
|
|
13
|
-
|
|
14
|
-
export interface CardProps {
|
|
15
|
-
/**
|
|
16
|
-
* The element or component this component should render as.
|
|
17
|
-
* @defaultValue 'div'
|
|
18
|
-
*/
|
|
19
|
-
as?: any
|
|
20
|
-
/**
|
|
21
|
-
* @defaultValue 'outline'
|
|
22
|
-
*/
|
|
23
|
-
variant?: CardVariants['variant']
|
|
24
|
-
class?: any
|
|
25
|
-
ui?: Partial<typeof card.slots>
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface CardSlots {
|
|
29
|
-
header(props?: {}): any
|
|
30
|
-
default(props?: {}): any
|
|
31
|
-
footer(props?: {}): any
|
|
32
|
-
}
|
|
1
|
+
<script>
|
|
2
|
+
import theme from "#build/ui/card";
|
|
33
3
|
</script>
|
|
34
4
|
|
|
35
|
-
<script setup
|
|
36
|
-
import { computed } from
|
|
37
|
-
import { Primitive } from
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
5
|
+
<script setup>
|
|
6
|
+
import { computed } from "vue";
|
|
7
|
+
import { Primitive } from "reka-ui";
|
|
8
|
+
import { useAppConfig } from "#imports";
|
|
9
|
+
import { tv } from "../utils/tv";
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
as: { type: null, required: false },
|
|
12
|
+
variant: { type: null, required: false },
|
|
13
|
+
class: { type: null, required: false },
|
|
14
|
+
ui: { type: null, required: false }
|
|
15
|
+
});
|
|
16
|
+
const slots = defineSlots();
|
|
17
|
+
const appConfig = useAppConfig();
|
|
18
|
+
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.card || {} })({
|
|
19
|
+
variant: props.variant
|
|
20
|
+
}));
|
|
43
21
|
</script>
|
|
44
22
|
|
|
45
23
|
<template>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { AppConfig } from '@nuxt/schema';
|
|
2
|
+
import theme from '#build/ui/card';
|
|
3
|
+
import type { ComponentConfig } from '../types/utils';
|
|
4
|
+
type Card = ComponentConfig<typeof theme, AppConfig, 'card'>;
|
|
5
|
+
export interface CardProps {
|
|
6
|
+
/**
|
|
7
|
+
* The element or component this component should render as.
|
|
8
|
+
* @defaultValue 'div'
|
|
9
|
+
*/
|
|
10
|
+
as?: any;
|
|
11
|
+
/**
|
|
12
|
+
* @defaultValue 'outline'
|
|
13
|
+
*/
|
|
14
|
+
variant?: Card['variants']['variant'];
|
|
15
|
+
class?: any;
|
|
16
|
+
ui?: Card['slots'];
|
|
17
|
+
}
|
|
18
|
+
export interface CardSlots {
|
|
19
|
+
header(props?: {}): any;
|
|
20
|
+
default(props?: {}): any;
|
|
21
|
+
footer(props?: {}): any;
|
|
22
|
+
}
|
|
23
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<CardProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CardProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, CardSlots>;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|