@nuxt/ui 4.0.0-alpha.0 → 4.0.0-alpha.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/changelog-version.ts +1 -1
- package/.nuxt/ui/changelog-versions.ts +2 -2
- package/README.md +10 -10
- package/dist/module.json +2 -2
- package/dist/module.mjs +3 -3
- package/dist/runtime/components/Accordion.vue +1 -1
- package/dist/runtime/components/Accordion.vue.d.ts +5 -4
- package/dist/runtime/components/Alert.vue +2 -2
- package/dist/runtime/components/Alert.vue.d.ts +4 -4
- package/dist/runtime/components/App.vue +1 -1
- package/dist/runtime/components/App.vue.d.ts +1 -1
- package/dist/runtime/components/AuthForm.vue +1 -1
- package/dist/runtime/components/AuthForm.vue.d.ts +3 -3
- package/dist/runtime/components/Avatar.vue +1 -1
- package/dist/runtime/components/Avatar.vue.d.ts +3 -3
- package/dist/runtime/components/AvatarGroup.vue.d.ts +1 -1
- package/dist/runtime/components/Badge.vue +3 -3
- package/dist/runtime/components/Badge.vue.d.ts +1 -1
- package/dist/runtime/components/Banner.vue +2 -2
- package/dist/runtime/components/Banner.vue.d.ts +4 -4
- package/dist/runtime/components/BlogPost.vue.d.ts +1 -1
- package/dist/runtime/components/BlogPosts.vue.d.ts +1 -1
- package/dist/runtime/components/Breadcrumb.vue +1 -1
- package/dist/runtime/components/Breadcrumb.vue.d.ts +4 -4
- package/dist/runtime/components/Button.vue +4 -4
- package/dist/runtime/components/Button.vue.d.ts +1 -1
- package/dist/runtime/components/Calendar.vue +5 -5
- package/dist/runtime/components/Calendar.vue.d.ts +8 -7
- package/dist/runtime/components/Card.vue.d.ts +1 -1
- package/dist/runtime/components/Carousel.vue +3 -3
- package/dist/runtime/components/Carousel.vue.d.ts +4 -4
- package/dist/runtime/components/ChangelogVersion.vue.d.ts +1 -1
- package/dist/runtime/components/ChangelogVersions.vue.d.ts +1 -1
- package/dist/runtime/components/ChatMessage.vue +1 -1
- package/dist/runtime/components/ChatMessage.vue.d.ts +3 -3
- package/dist/runtime/components/ChatMessages.vue +1 -1
- package/dist/runtime/components/ChatMessages.vue.d.ts +3 -3
- package/dist/runtime/components/ChatPalette.vue.d.ts +1 -1
- package/dist/runtime/components/ChatPromptSubmit.vue +4 -4
- package/dist/runtime/components/ChatPromptSubmit.vue.d.ts +6 -6
- package/dist/runtime/components/Checkbox.vue +2 -2
- package/dist/runtime/components/Checkbox.vue.d.ts +7 -6
- package/dist/runtime/components/CheckboxGroup.vue +1 -1
- package/dist/runtime/components/CheckboxGroup.vue.d.ts +4 -4
- package/dist/runtime/components/Chip.vue.d.ts +2 -2
- package/dist/runtime/components/Collapsible.vue.d.ts +1 -1
- package/dist/runtime/components/ColorPicker.vue.d.ts +1 -1
- package/dist/runtime/components/CommandPalette.vue +6 -6
- package/dist/runtime/components/CommandPalette.vue.d.ts +9 -9
- package/dist/runtime/components/Container.vue.d.ts +1 -1
- package/dist/runtime/components/ContextMenu.vue +4 -3
- package/dist/runtime/components/ContextMenu.vue.d.ts +6 -6
- package/dist/runtime/components/ContextMenuContent.vue +3 -3
- package/dist/runtime/components/ContextMenuContent.vue.d.ts +5 -5
- package/dist/runtime/components/DashboardGroup.vue.d.ts +1 -1
- package/dist/runtime/components/DashboardNavbar.vue +1 -1
- package/dist/runtime/components/DashboardNavbar.vue.d.ts +3 -3
- package/dist/runtime/components/DashboardPanel.vue.d.ts +1 -1
- package/dist/runtime/components/DashboardResizeHandle.vue.d.ts +1 -1
- package/dist/runtime/components/DashboardSearch.vue +3 -3
- package/dist/runtime/components/DashboardSearch.vue.d.ts +4 -4
- package/dist/runtime/components/DashboardSearchButton.vue +1 -1
- package/dist/runtime/components/DashboardSearchButton.vue.d.ts +3 -3
- package/dist/runtime/components/DashboardSidebar.vue.d.ts +1 -1
- package/dist/runtime/components/DashboardSidebarCollapse.vue.d.ts +1 -1
- package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +1 -1
- package/dist/runtime/components/DashboardToolbar.vue.d.ts +1 -1
- package/dist/runtime/components/Drawer.vue.d.ts +1 -1
- package/dist/runtime/components/DropdownMenu.vue +3 -3
- package/dist/runtime/components/DropdownMenu.vue.d.ts +6 -6
- package/dist/runtime/components/DropdownMenuContent.vue +3 -3
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +5 -5
- package/dist/runtime/components/Error.vue.d.ts +1 -1
- package/dist/runtime/components/FieldGroup.vue.d.ts +1 -1
- package/dist/runtime/components/FileUpload.vue +4 -4
- package/dist/runtime/components/FileUpload.vue.d.ts +9 -10
- package/dist/runtime/components/Footer.vue.d.ts +1 -1
- package/dist/runtime/components/FooterColumns.vue.d.ts +3 -3
- package/dist/runtime/components/Form.vue +2 -2
- package/dist/runtime/components/Form.vue.d.ts +7 -7
- package/dist/runtime/components/FormField.vue +2 -2
- package/dist/runtime/components/FormField.vue.d.ts +1 -1
- package/dist/runtime/components/Header.vue.d.ts +1 -1
- package/dist/runtime/components/Icon.vue +3 -2
- package/dist/runtime/components/Icon.vue.d.ts +2 -2
- package/dist/runtime/components/Input.vue +8 -5
- package/dist/runtime/components/Input.vue.d.ts +6 -11
- package/dist/runtime/components/InputMenu.vue +7 -7
- package/dist/runtime/components/InputMenu.vue.d.ts +14 -14
- package/dist/runtime/components/InputNumber.vue +12 -6
- package/dist/runtime/components/InputNumber.vue.d.ts +13 -9
- package/dist/runtime/components/InputTags.vue +5 -5
- package/dist/runtime/components/InputTags.vue.d.ts +3 -2
- package/dist/runtime/components/Kbd.vue.d.ts +1 -1
- package/dist/runtime/components/Link.vue.d.ts +1 -1
- package/dist/runtime/components/LinkBase.vue.d.ts +1 -1
- package/dist/runtime/components/Main.vue.d.ts +1 -1
- package/dist/runtime/components/Marquee.vue.d.ts +1 -1
- package/dist/runtime/components/Modal.vue +1 -1
- package/dist/runtime/components/Modal.vue.d.ts +3 -3
- package/dist/runtime/components/NavigationMenu.vue +2 -2
- package/dist/runtime/components/NavigationMenu.vue.d.ts +6 -6
- package/dist/runtime/components/OverlayProvider.vue.d.ts +1 -1
- package/dist/runtime/components/Page.vue.d.ts +1 -1
- package/dist/runtime/components/PageAnchors.vue.d.ts +3 -3
- package/dist/runtime/components/PageAside.vue.d.ts +1 -1
- package/dist/runtime/components/PageBody.vue.d.ts +1 -1
- package/dist/runtime/components/PageCTA.vue.d.ts +1 -1
- package/dist/runtime/components/PageCard.vue +1 -1
- package/dist/runtime/components/PageCard.vue.d.ts +3 -3
- package/dist/runtime/components/PageColumns.vue.d.ts +1 -1
- package/dist/runtime/components/PageFeature.vue +1 -1
- package/dist/runtime/components/PageFeature.vue.d.ts +3 -3
- package/dist/runtime/components/PageGrid.vue.d.ts +1 -1
- package/dist/runtime/components/PageHeader.vue.d.ts +1 -1
- package/dist/runtime/components/PageHero.vue.d.ts +1 -1
- package/dist/runtime/components/PageLinks.vue.d.ts +3 -3
- package/dist/runtime/components/PageList.vue.d.ts +1 -1
- package/dist/runtime/components/PageLogos.vue.d.ts +1 -1
- package/dist/runtime/components/PageSection.vue +1 -1
- package/dist/runtime/components/PageSection.vue.d.ts +3 -3
- package/dist/runtime/components/Pagination.vue +5 -5
- package/dist/runtime/components/Pagination.vue.d.ts +7 -7
- package/dist/runtime/components/PinInput.vue.d.ts +6 -6
- package/dist/runtime/components/Popover.vue.d.ts +1 -1
- package/dist/runtime/components/PricingPlan.vue.d.ts +3 -3
- package/dist/runtime/components/PricingPlans.vue.d.ts +1 -1
- package/dist/runtime/components/PricingTable.vue.d.ts +1 -1
- package/dist/runtime/components/Progress.vue.d.ts +1 -1
- package/dist/runtime/components/RadioGroup.vue.d.ts +4 -4
- package/dist/runtime/components/Select.vue +5 -5
- package/dist/runtime/components/Select.vue.d.ts +13 -13
- package/dist/runtime/components/SelectMenu.vue +5 -5
- package/dist/runtime/components/SelectMenu.vue.d.ts +13 -13
- package/dist/runtime/components/Separator.vue +1 -1
- package/dist/runtime/components/Separator.vue.d.ts +3 -3
- package/dist/runtime/components/Skeleton.vue.d.ts +1 -1
- package/dist/runtime/components/Slideover.vue +1 -1
- package/dist/runtime/components/Slideover.vue.d.ts +3 -3
- package/dist/runtime/components/Slider.vue +1 -1
- package/dist/runtime/components/Slider.vue.d.ts +6 -7
- package/dist/runtime/components/Stepper.vue.d.ts +8 -7
- package/dist/runtime/components/Switch.vue +3 -3
- package/dist/runtime/components/Switch.vue.d.ts +8 -7
- package/dist/runtime/components/Table.vue +2 -2
- package/dist/runtime/components/Table.vue.d.ts +1 -1
- package/dist/runtime/components/Tabs.vue.d.ts +3 -3
- package/dist/runtime/components/Textarea.vue +8 -5
- package/dist/runtime/components/Textarea.vue.d.ts +6 -11
- package/dist/runtime/components/Timeline.vue.d.ts +3 -3
- package/dist/runtime/components/Toast.vue +2 -2
- package/dist/runtime/components/Toast.vue.d.ts +3 -3
- package/dist/runtime/components/Toaster.vue.d.ts +1 -1
- package/dist/runtime/components/Tooltip.vue.d.ts +1 -1
- package/dist/runtime/components/Tree.vue +3 -3
- package/dist/runtime/components/Tree.vue.d.ts +9 -8
- package/dist/runtime/components/User.vue.d.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeAvatar.vue.d.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeButton.vue.d.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeImage.vue.d.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeSelect.vue.d.ts +1 -1
- package/dist/runtime/components/color-mode/ColorModeSwitch.vue.d.ts +1 -1
- package/dist/runtime/components/content/ContentNavigation.vue +1 -1
- package/dist/runtime/components/content/ContentNavigation.vue.d.ts +5 -5
- package/dist/runtime/components/content/ContentSearch.vue +3 -3
- package/dist/runtime/components/content/ContentSearch.vue.d.ts +7 -7
- package/dist/runtime/components/content/ContentSearchButton.vue +1 -1
- package/dist/runtime/components/content/ContentSearchButton.vue.d.ts +3 -3
- package/dist/runtime/components/content/ContentSurround.vue +2 -2
- package/dist/runtime/components/content/ContentSurround.vue.d.ts +5 -4
- package/dist/runtime/components/content/ContentToc.vue +1 -1
- package/dist/runtime/components/content/ContentToc.vue.d.ts +3 -2
- package/dist/runtime/components/locale/LocaleSelect.vue.d.ts +1 -1
- package/dist/runtime/components/prose/A.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Accordion.vue.d.ts +1 -1
- package/dist/runtime/components/prose/AccordionItem.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Badge.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Blockquote.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Callout.vue +1 -1
- package/dist/runtime/components/prose/Callout.vue.d.ts +3 -3
- package/dist/runtime/components/prose/Card.vue +1 -1
- package/dist/runtime/components/prose/Card.vue.d.ts +3 -3
- package/dist/runtime/components/prose/CardGroup.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Code.vue.d.ts +1 -1
- package/dist/runtime/components/prose/CodeCollapse.vue +1 -1
- package/dist/runtime/components/prose/CodeCollapse.vue.d.ts +3 -2
- package/dist/runtime/components/prose/CodeGroup.vue.d.ts +1 -1
- package/dist/runtime/components/prose/CodeIcon.vue +1 -1
- package/dist/runtime/components/prose/CodeIcon.vue.d.ts +3 -2
- package/dist/runtime/components/prose/CodePreview.vue.d.ts +1 -1
- package/dist/runtime/components/prose/CodeTree.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Collapsible.vue +1 -1
- package/dist/runtime/components/prose/Collapsible.vue.d.ts +3 -2
- package/dist/runtime/components/prose/Em.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Field.vue.d.ts +1 -1
- package/dist/runtime/components/prose/FieldGroup.vue.d.ts +1 -1
- package/dist/runtime/components/prose/H1.vue.d.ts +1 -1
- package/dist/runtime/components/prose/H2.vue.d.ts +1 -1
- package/dist/runtime/components/prose/H3.vue.d.ts +1 -1
- package/dist/runtime/components/prose/H4.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Hr.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Icon.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Img.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Kbd.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Li.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Ol.vue.d.ts +1 -1
- package/dist/runtime/components/prose/P.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Pre.vue +1 -1
- package/dist/runtime/components/prose/Pre.vue.d.ts +3 -2
- package/dist/runtime/components/prose/Script.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Steps.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Strong.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Table.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Tabs.vue.d.ts +1 -1
- package/dist/runtime/components/prose/TabsItem.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Tbody.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Td.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Th.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Thead.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Tr.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Ul.vue.d.ts +1 -1
- package/dist/runtime/components/prose/callout/Caution.vue.d.ts +1 -1
- package/dist/runtime/components/prose/callout/Note.vue.d.ts +1 -1
- package/dist/runtime/components/prose/callout/Tip.vue.d.ts +1 -1
- package/dist/runtime/components/prose/callout/Warning.vue.d.ts +1 -1
- package/dist/runtime/composables/useComponentIcons.d.ts +5 -5
- package/dist/runtime/composables/useFormField.d.ts +2 -1
- package/dist/runtime/composables/useFormField.js +1 -0
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/inertia/components/Link.vue +3 -0
- package/dist/runtime/inertia/components/Link.vue.d.ts +1 -1
- package/dist/runtime/inertia/components/LinkBase.vue.d.ts +1 -1
- package/dist/runtime/types/form.d.ts +3 -3
- package/dist/runtime/types/input.d.ts +8 -0
- package/dist/runtime/types/input.js +0 -0
- package/dist/runtime/types/utils.d.ts +1 -1
- package/dist/runtime/utils/index.d.ts +1 -0
- package/dist/runtime/utils/index.js +30 -1
- package/dist/runtime/utils/tv.d.ts +1 -1
- package/dist/runtime/vue/components/Icon.vue +3 -2
- package/dist/runtime/vue/components/Icon.vue.d.ts +3 -2
- package/dist/runtime/vue/components/Link.vue.d.ts +1 -1
- package/dist/runtime/vue/components/color-mode/ColorModeButton.vue.d.ts +1 -1
- package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue.d.ts +1 -1
- package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue.d.ts +1 -1
- package/dist/shared/{ui.DT-jTZu1.mjs → ui.BEZXPd3d.mjs} +3 -3
- package/dist/unplugin.mjs +12 -4
- package/dist/vite.mjs +1 -1
- package/package.json +20 -22
|
@@ -35,14 +35,14 @@ const props = defineProps({
|
|
|
35
35
|
modelModifiers: { type: Object, required: false },
|
|
36
36
|
class: { type: null, required: false },
|
|
37
37
|
ui: { type: null, required: false },
|
|
38
|
-
icon: { type: String, required: false },
|
|
38
|
+
icon: { type: [String, Object], required: false },
|
|
39
39
|
avatar: { type: Object, required: false },
|
|
40
40
|
leading: { type: Boolean, required: false },
|
|
41
|
-
leadingIcon: { type: String, required: false },
|
|
41
|
+
leadingIcon: { type: [String, Object], required: false },
|
|
42
42
|
trailing: { type: Boolean, required: false },
|
|
43
|
-
trailingIcon: { type: String, required: false },
|
|
43
|
+
trailingIcon: { type: [String, Object], required: false },
|
|
44
44
|
loading: { type: Boolean, required: false },
|
|
45
|
-
loadingIcon: { type: String, required: false }
|
|
45
|
+
loadingIcon: { type: [String, Object], required: false }
|
|
46
46
|
});
|
|
47
47
|
const emits = defineEmits(["update:modelValue", "blur", "change"]);
|
|
48
48
|
const slots = defineSlots();
|
|
@@ -71,9 +71,12 @@ function updateInput(value) {
|
|
|
71
71
|
if (props.modelModifiers?.number || props.type === "number") {
|
|
72
72
|
value = looseToNumber(value);
|
|
73
73
|
}
|
|
74
|
-
if (props.modelModifiers?.
|
|
74
|
+
if (props.modelModifiers?.nullable) {
|
|
75
75
|
value ||= null;
|
|
76
76
|
}
|
|
77
|
+
if (props.modelModifiers?.optional) {
|
|
78
|
+
value ||= void 0;
|
|
79
|
+
}
|
|
77
80
|
modelValue.value = value;
|
|
78
81
|
emitFormInput();
|
|
79
82
|
}
|
|
@@ -2,6 +2,7 @@ import type { InputHTMLAttributes } from 'vue';
|
|
|
2
2
|
import type { AppConfig } from '@nuxt/schema';
|
|
3
3
|
import theme from '#build/ui/input';
|
|
4
4
|
import type { UseComponentIconsProps } from '../composables/useComponentIcons';
|
|
5
|
+
import type { ModelModifiers } from '../types/input';
|
|
5
6
|
import type { AcceptableValue } from '../types/utils';
|
|
6
7
|
import type { ComponentConfig } from '../types/tv';
|
|
7
8
|
type Input = ComponentConfig<typeof theme, AppConfig, 'input'>;
|
|
@@ -37,18 +38,12 @@ export interface InputProps<T extends AcceptableValue = AcceptableValue> extends
|
|
|
37
38
|
highlight?: boolean;
|
|
38
39
|
modelValue?: T;
|
|
39
40
|
defaultValue?: T;
|
|
40
|
-
modelModifiers?:
|
|
41
|
-
string?: boolean;
|
|
42
|
-
number?: boolean;
|
|
43
|
-
trim?: boolean;
|
|
44
|
-
lazy?: boolean;
|
|
45
|
-
nullify?: boolean;
|
|
46
|
-
};
|
|
41
|
+
modelModifiers?: ModelModifiers;
|
|
47
42
|
class?: any;
|
|
48
43
|
ui?: Input['slots'];
|
|
49
44
|
}
|
|
50
45
|
export interface InputEmits<T extends AcceptableValue = AcceptableValue> {
|
|
51
|
-
'update:modelValue': [
|
|
46
|
+
'update:modelValue': [value: T];
|
|
52
47
|
'blur': [event: FocusEvent];
|
|
53
48
|
'change': [event: Event];
|
|
54
49
|
}
|
|
@@ -61,14 +56,14 @@ declare const _default: <T extends AcceptableValue>(__VLS_props: NonNullable<Awa
|
|
|
61
56
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
62
57
|
readonly onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
63
58
|
readonly onChange?: ((event: Event) => any) | undefined;
|
|
64
|
-
readonly "onUpdate:modelValue"?: ((
|
|
65
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onBlur" | "onChange" | "onUpdate:modelValue"> & InputProps<T> &
|
|
59
|
+
readonly "onUpdate:modelValue"?: ((value: T) => any) | undefined;
|
|
60
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onBlur" | "onChange" | "onUpdate:modelValue"> & InputProps<T> & {}> & import("vue").PublicProps;
|
|
66
61
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
67
62
|
inputRef: import("vue").Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
68
63
|
}>): void;
|
|
69
64
|
attrs: any;
|
|
70
65
|
slots: InputSlots;
|
|
71
|
-
emit: ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue",
|
|
66
|
+
emit: ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: T) => void);
|
|
72
67
|
}>) => import("vue").VNode & {
|
|
73
68
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
74
69
|
};
|
|
@@ -31,9 +31,9 @@ const props = defineProps({
|
|
|
31
31
|
required: { type: Boolean, required: false },
|
|
32
32
|
autofocus: { type: Boolean, required: false },
|
|
33
33
|
autofocusDelay: { type: Number, required: false, default: 0 },
|
|
34
|
-
trailingIcon: { type: String, required: false },
|
|
35
|
-
selectedIcon: { type: String, required: false },
|
|
36
|
-
deleteIcon: { type: String, required: false },
|
|
34
|
+
trailingIcon: { type: [String, Object], required: false },
|
|
35
|
+
selectedIcon: { type: [String, Object], required: false },
|
|
36
|
+
deleteIcon: { type: [String, Object], required: false },
|
|
37
37
|
content: { type: Object, required: false },
|
|
38
38
|
arrow: { type: [Boolean, Object], required: false },
|
|
39
39
|
portal: { type: [Boolean, String], required: false, skipCheck: true, default: true },
|
|
@@ -58,13 +58,13 @@ const props = defineProps({
|
|
|
58
58
|
highlightOnHover: { type: Boolean, required: false },
|
|
59
59
|
openOnClick: { type: Boolean, required: false },
|
|
60
60
|
openOnFocus: { type: Boolean, required: false },
|
|
61
|
-
icon: { type: String, required: false },
|
|
61
|
+
icon: { type: [String, Object], required: false },
|
|
62
62
|
avatar: { type: Object, required: false },
|
|
63
63
|
leading: { type: Boolean, required: false },
|
|
64
|
-
leadingIcon: { type: String, required: false },
|
|
64
|
+
leadingIcon: { type: [String, Object], required: false },
|
|
65
65
|
trailing: { type: Boolean, required: false },
|
|
66
66
|
loading: { type: Boolean, required: false },
|
|
67
|
-
loadingIcon: { type: String, required: false }
|
|
67
|
+
loadingIcon: { type: [String, Object], required: false }
|
|
68
68
|
});
|
|
69
69
|
const emits = defineEmits(["update:open", "change", "blur", "focus", "create", "highlight", "remove-tag", "update:modelValue"]);
|
|
70
70
|
const slots = defineSlots();
|
|
@@ -314,7 +314,7 @@ defineExpose({
|
|
|
314
314
|
</ComboboxAnchor>
|
|
315
315
|
|
|
316
316
|
<ComboboxPortal v-bind="portalProps">
|
|
317
|
-
<ComboboxContent :class="ui.content({ class: props.ui?.content })" v-bind="contentProps">
|
|
317
|
+
<ComboboxContent :class="ui.content({ class: props.ui?.content })" v-bind="contentProps" @focus-outside.prevent>
|
|
318
318
|
<slot name="content-top" />
|
|
319
319
|
|
|
320
320
|
<ComboboxEmpty :class="ui.empty({ class: props.ui?.empty })">
|
|
@@ -4,7 +4,7 @@ import type { ComboboxRootProps, ComboboxRootEmits, ComboboxContentProps, Combob
|
|
|
4
4
|
import type { AppConfig } from '@nuxt/schema';
|
|
5
5
|
import theme from '#build/ui/input-menu';
|
|
6
6
|
import type { UseComponentIconsProps } from '../composables/useComponentIcons';
|
|
7
|
-
import type { AvatarProps, ChipProps } from '../types';
|
|
7
|
+
import type { AvatarProps, ChipProps, IconProps } from '../types';
|
|
8
8
|
import type { AcceptableValue, ArrayOrNested, GetItemKeys, GetModelValue, GetModelValueEmits, NestedItem, EmitsToProps } from '../types/utils';
|
|
9
9
|
import type { ComponentConfig } from '../types/tv';
|
|
10
10
|
type InputMenu = ComponentConfig<typeof theme, AppConfig, 'inputMenu'>;
|
|
@@ -13,7 +13,7 @@ interface _InputMenuItem {
|
|
|
13
13
|
/**
|
|
14
14
|
* @IconifyIcon
|
|
15
15
|
*/
|
|
16
|
-
icon?:
|
|
16
|
+
icon?: IconProps['name'];
|
|
17
17
|
avatar?: AvatarProps;
|
|
18
18
|
chip?: ChipProps;
|
|
19
19
|
/**
|
|
@@ -58,20 +58,20 @@ export interface InputMenuProps<T extends ArrayOrNested<InputMenuItem> = ArrayOr
|
|
|
58
58
|
* @defaultValue appConfig.ui.icons.chevronDown
|
|
59
59
|
* @IconifyIcon
|
|
60
60
|
*/
|
|
61
|
-
trailingIcon?:
|
|
61
|
+
trailingIcon?: IconProps['name'];
|
|
62
62
|
/**
|
|
63
63
|
* The icon displayed when an item is selected.
|
|
64
64
|
* @defaultValue appConfig.ui.icons.check
|
|
65
65
|
* @IconifyIcon
|
|
66
66
|
*/
|
|
67
|
-
selectedIcon?:
|
|
67
|
+
selectedIcon?: IconProps['name'];
|
|
68
68
|
/**
|
|
69
69
|
* The icon displayed to delete a tag.
|
|
70
70
|
* Works only when `multiple` is `true`.
|
|
71
71
|
* @defaultValue appConfig.ui.icons.close
|
|
72
72
|
* @IconifyIcon
|
|
73
73
|
*/
|
|
74
|
-
deleteIcon?:
|
|
74
|
+
deleteIcon?: IconProps['name'];
|
|
75
75
|
/**
|
|
76
76
|
* The content of the menu.
|
|
77
77
|
* @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8, position: 'popper' }
|
|
@@ -128,9 +128,9 @@ export interface InputMenuProps<T extends ArrayOrNested<InputMenuItem> = ArrayOr
|
|
|
128
128
|
ui?: InputMenu['slots'];
|
|
129
129
|
}
|
|
130
130
|
export type InputMenuEmits<A extends ArrayOrNested<InputMenuItem>, VK extends GetItemKeys<A> | undefined, M extends boolean> = Pick<ComboboxRootEmits, 'update:open'> & {
|
|
131
|
-
'change': [
|
|
132
|
-
'blur': [
|
|
133
|
-
'focus': [
|
|
131
|
+
'change': [event: Event];
|
|
132
|
+
'blur': [event: FocusEvent];
|
|
133
|
+
'focus': [event: FocusEvent];
|
|
134
134
|
'create': [item: string];
|
|
135
135
|
/** Event handler when highlighted element changes. */
|
|
136
136
|
'highlight': [
|
|
@@ -177,12 +177,12 @@ export interface InputMenuSlots<A extends ArrayOrNested<InputMenuItem> = ArrayOr
|
|
|
177
177
|
}
|
|
178
178
|
declare const _default: <T extends ArrayOrNested<InputMenuItem>, VK extends GetItemKeys<T> | undefined = undefined, M extends boolean = false>(__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<{
|
|
179
179
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
180
|
-
readonly onBlur?: ((
|
|
181
|
-
readonly onChange?: ((
|
|
182
|
-
readonly onFocus?: ((
|
|
180
|
+
readonly onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
181
|
+
readonly onChange?: ((event: Event) => any) | undefined;
|
|
182
|
+
readonly onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
183
183
|
readonly onCreate?: ((item: string) => any) | undefined;
|
|
184
184
|
readonly "onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
185
|
-
readonly "onUpdate:modelValue"?: ((
|
|
185
|
+
readonly "onUpdate:modelValue"?: ((value: GetModelValue<T, VK, M>) => any) | undefined;
|
|
186
186
|
readonly onHighlight?: ((payload: {
|
|
187
187
|
ref: HTMLElement;
|
|
188
188
|
value: GetModelValue<T, VK, M>;
|
|
@@ -191,7 +191,7 @@ declare const _default: <T extends ArrayOrNested<InputMenuItem>, VK extends GetI
|
|
|
191
191
|
readonly "onRemove-tag"?: ((item: GetModelValue<T, VK, M>) => any) | undefined;
|
|
192
192
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onFocus" | "onBlur" | "onChange" | "onUpdate:open" | "onUpdate:modelValue" | "onCreate" | "onHighlight" | "onUpdate:searchTerm" | "onRemove-tag"> & (InputMenuProps<T, VK, M> & {
|
|
193
193
|
searchTerm?: string;
|
|
194
|
-
}) &
|
|
194
|
+
}) & {}> & import("vue").PublicProps;
|
|
195
195
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
196
196
|
inputRef: import("vue").Ref<({
|
|
197
197
|
$: import("vue").ComponentInternalInstance;
|
|
@@ -317,7 +317,7 @@ declare const _default: <T extends ArrayOrNested<InputMenuItem>, VK extends GetI
|
|
|
317
317
|
}>): void;
|
|
318
318
|
attrs: any;
|
|
319
319
|
slots: InputMenuSlots<T, VK, M, NestedItem<T>>;
|
|
320
|
-
emit: (((evt: "blur",
|
|
320
|
+
emit: (((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "focus", event: FocusEvent) => void) & ((evt: "create", item: string) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "update:modelValue", value: GetModelValue<T, VK, M>) => void) & ((evt: "highlight", payload: {
|
|
321
321
|
ref: HTMLElement;
|
|
322
322
|
value: GetModelValue<T, VK, M>;
|
|
323
323
|
} | undefined) => void) & ((evt: "remove-tag", item: GetModelValue<T, VK, M>) => void)) & ((evt: "update:searchTerm", value: string) => void);
|
|
@@ -5,7 +5,7 @@ import theme from "#build/ui/input-number";
|
|
|
5
5
|
<script setup>
|
|
6
6
|
import { onMounted, ref, computed } from "vue";
|
|
7
7
|
import { NumberFieldRoot, NumberFieldInput, NumberFieldDecrement, NumberFieldIncrement, useForwardPropsEmits } from "reka-ui";
|
|
8
|
-
import { reactivePick } from "@vueuse/core";
|
|
8
|
+
import { reactivePick, useVModel } from "@vueuse/core";
|
|
9
9
|
import { useAppConfig } from "#imports";
|
|
10
10
|
import { useFieldGroup } from "../composables/useFieldGroup";
|
|
11
11
|
import { useFormField } from "../composables/useFormField";
|
|
@@ -22,18 +22,19 @@ const props = defineProps({
|
|
|
22
22
|
highlight: { type: Boolean, required: false },
|
|
23
23
|
orientation: { type: String, required: false, default: "horizontal" },
|
|
24
24
|
increment: { type: Object, required: false },
|
|
25
|
-
incrementIcon: { type: String, required: false },
|
|
25
|
+
incrementIcon: { type: [String, Object], required: false },
|
|
26
26
|
incrementDisabled: { type: Boolean, required: false },
|
|
27
27
|
decrement: { type: Object, required: false },
|
|
28
|
-
decrementIcon: { type: String, required: false },
|
|
28
|
+
decrementIcon: { type: [String, Object], required: false },
|
|
29
29
|
decrementDisabled: { type: Boolean, required: false },
|
|
30
30
|
autofocus: { type: Boolean, required: false },
|
|
31
31
|
autofocusDelay: { type: Number, required: false },
|
|
32
|
+
modelValue: { type: Number, required: false },
|
|
33
|
+
defaultValue: { type: Number, required: false },
|
|
34
|
+
modelModifiers: { type: Object, required: false },
|
|
32
35
|
locale: { type: String, required: false },
|
|
33
36
|
class: { type: null, required: false },
|
|
34
37
|
ui: { type: null, required: false },
|
|
35
|
-
modelValue: { type: [Number, null], required: false },
|
|
36
|
-
defaultValue: { type: Number, required: false },
|
|
37
38
|
min: { type: Number, required: false },
|
|
38
39
|
max: { type: Number, required: false },
|
|
39
40
|
step: { type: Number, required: false },
|
|
@@ -49,9 +50,10 @@ const props = defineProps({
|
|
|
49
50
|
});
|
|
50
51
|
const emits = defineEmits(["update:modelValue", "blur", "change"]);
|
|
51
52
|
defineSlots();
|
|
53
|
+
const modelValue = useVModel(props, "modelValue", emits, { defaultValue: props.defaultValue });
|
|
52
54
|
const { t, code: codeLocale } = useLocale();
|
|
53
55
|
const appConfig = useAppConfig();
|
|
54
|
-
const rootProps = useForwardPropsEmits(reactivePick(props, "as", "
|
|
56
|
+
const rootProps = useForwardPropsEmits(reactivePick(props, "as", "defaultValue", "min", "max", "step", "stepSnapping", "formatOptions", "disableWheelChange", "invertWheelChange", "readonly"), emits);
|
|
55
57
|
const { emitFormBlur, emitFormFocus, emitFormChange, emitFormInput, id, color, size: formGroupSize, name, highlight, disabled, ariaAttrs } = useFormField(props);
|
|
56
58
|
const { orientation, size: fieldGroupSize } = useFieldGroup(props);
|
|
57
59
|
const locale = computed(() => props.locale || codeLocale.value);
|
|
@@ -68,6 +70,9 @@ const incrementIcon = computed(() => props.incrementIcon || (props.orientation =
|
|
|
68
70
|
const decrementIcon = computed(() => props.decrementIcon || (props.orientation === "horizontal" ? appConfig.ui.icons.minus : appConfig.ui.icons.chevronDown));
|
|
69
71
|
const inputRef = ref(null);
|
|
70
72
|
function onUpdate(value) {
|
|
73
|
+
if (props.modelModifiers?.optional) {
|
|
74
|
+
value = value ?? void 0;
|
|
75
|
+
}
|
|
71
76
|
const event = new Event("change", { target: { value } });
|
|
72
77
|
emits("change", event);
|
|
73
78
|
emitFormChange();
|
|
@@ -96,6 +101,7 @@ defineExpose({
|
|
|
96
101
|
<NumberFieldRoot
|
|
97
102
|
v-bind="rootProps"
|
|
98
103
|
:id="id"
|
|
104
|
+
:model-value="modelValue"
|
|
99
105
|
:class="ui.root({ class: [props.ui?.root, props.class] })"
|
|
100
106
|
:name="name"
|
|
101
107
|
:disabled="disabled"
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { NumberFieldRootProps } from 'reka-ui';
|
|
2
2
|
import type { AppConfig } from '@nuxt/schema';
|
|
3
3
|
import theme from '#build/ui/input-number';
|
|
4
|
-
import type { ButtonProps } from '../types';
|
|
4
|
+
import type { ButtonProps, IconProps } from '../types';
|
|
5
|
+
import type { ModelModifiers } from '../types/input';
|
|
5
6
|
import type { ComponentConfig } from '../types/tv';
|
|
6
7
|
type InputNumber = ComponentConfig<typeof theme, AppConfig, 'inputNumber'>;
|
|
7
8
|
export interface InputNumberProps extends Pick<NumberFieldRootProps, 'modelValue' | 'defaultValue' | 'min' | 'max' | 'step' | 'stepSnapping' | 'disabled' | 'required' | 'id' | 'name' | 'formatOptions' | 'disableWheelChange' | 'invertWheelChange' | 'readonly'> {
|
|
@@ -32,7 +33,7 @@ export interface InputNumberProps extends Pick<NumberFieldRootProps, 'modelValue
|
|
|
32
33
|
* @defaultValue appConfig.ui.icons.plus
|
|
33
34
|
* @IconifyIcon
|
|
34
35
|
*/
|
|
35
|
-
incrementIcon?:
|
|
36
|
+
incrementIcon?: IconProps['name'];
|
|
36
37
|
/** Disable the increment button. */
|
|
37
38
|
incrementDisabled?: boolean;
|
|
38
39
|
/**
|
|
@@ -45,11 +46,14 @@ export interface InputNumberProps extends Pick<NumberFieldRootProps, 'modelValue
|
|
|
45
46
|
* @defaultValue appConfig.ui.icons.minus
|
|
46
47
|
* @IconifyIcon
|
|
47
48
|
*/
|
|
48
|
-
decrementIcon?:
|
|
49
|
+
decrementIcon?: IconProps['name'];
|
|
49
50
|
/** Disable the decrement button. */
|
|
50
51
|
decrementDisabled?: boolean;
|
|
51
52
|
autofocus?: boolean;
|
|
52
53
|
autofocusDelay?: number;
|
|
54
|
+
modelValue?: number;
|
|
55
|
+
defaultValue?: number;
|
|
56
|
+
modelModifiers?: Pick<ModelModifiers, 'optional'>;
|
|
53
57
|
/**
|
|
54
58
|
* The locale to use for formatting and parsing numbers.
|
|
55
59
|
* @defaultValue UApp.locale.code
|
|
@@ -59,9 +63,9 @@ export interface InputNumberProps extends Pick<NumberFieldRootProps, 'modelValue
|
|
|
59
63
|
ui?: InputNumber['slots'];
|
|
60
64
|
}
|
|
61
65
|
export interface InputNumberEmits {
|
|
62
|
-
'update:modelValue': [
|
|
66
|
+
'update:modelValue': [value: number];
|
|
63
67
|
'blur': [event: FocusEvent];
|
|
64
|
-
'change': [
|
|
68
|
+
'change': [event: Event];
|
|
65
69
|
}
|
|
66
70
|
export interface InputNumberSlots {
|
|
67
71
|
increment(props?: {}): any;
|
|
@@ -169,12 +173,12 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<InputNumbe
|
|
|
169
173
|
}) | null>;
|
|
170
174
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
171
175
|
blur: (event: FocusEvent) => any;
|
|
172
|
-
change: (
|
|
173
|
-
"update:modelValue": (
|
|
176
|
+
change: (event: Event) => any;
|
|
177
|
+
"update:modelValue": (value: number) => any;
|
|
174
178
|
}, string, import("vue").PublicProps, Readonly<InputNumberProps> & Readonly<{
|
|
175
179
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
176
|
-
onChange?: ((
|
|
177
|
-
"onUpdate:modelValue"?: ((
|
|
180
|
+
onChange?: ((event: Event) => any) | undefined;
|
|
181
|
+
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
178
182
|
}>, {
|
|
179
183
|
orientation: "vertical" | "horizontal";
|
|
180
184
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, InputNumberSlots>;
|
|
@@ -23,7 +23,7 @@ const props = defineProps({
|
|
|
23
23
|
size: { type: null, required: false },
|
|
24
24
|
autofocus: { type: Boolean, required: false },
|
|
25
25
|
autofocusDelay: { type: Number, required: false, default: 0 },
|
|
26
|
-
deleteIcon: { type: String, required: false },
|
|
26
|
+
deleteIcon: { type: [String, Object], required: false },
|
|
27
27
|
highlight: { type: Boolean, required: false },
|
|
28
28
|
class: { type: null, required: false },
|
|
29
29
|
ui: { type: null, required: false },
|
|
@@ -41,14 +41,14 @@ const props = defineProps({
|
|
|
41
41
|
displayValue: { type: Function, required: false },
|
|
42
42
|
name: { type: String, required: false },
|
|
43
43
|
required: { type: Boolean, required: false },
|
|
44
|
-
icon: { type: String, required: false },
|
|
44
|
+
icon: { type: [String, Object], required: false },
|
|
45
45
|
avatar: { type: Object, required: false },
|
|
46
46
|
leading: { type: Boolean, required: false },
|
|
47
|
-
leadingIcon: { type: String, required: false },
|
|
47
|
+
leadingIcon: { type: [String, Object], required: false },
|
|
48
48
|
trailing: { type: Boolean, required: false },
|
|
49
|
-
trailingIcon: { type: String, required: false },
|
|
49
|
+
trailingIcon: { type: [String, Object], required: false },
|
|
50
50
|
loading: { type: Boolean, required: false },
|
|
51
|
-
loadingIcon: { type: String, required: false }
|
|
51
|
+
loadingIcon: { type: [String, Object], required: false }
|
|
52
52
|
});
|
|
53
53
|
const emits = defineEmits(["change", "blur", "focus", "update:modelValue", "invalid", "addTag", "removeTag"]);
|
|
54
54
|
const slots = defineSlots();
|
|
@@ -2,6 +2,7 @@ import type { AppConfig } from '@nuxt/schema';
|
|
|
2
2
|
import type { TagsInputRootProps, TagsInputRootEmits, AcceptableInputValue } from 'reka-ui';
|
|
3
3
|
import theme from '#build/ui/input-tags';
|
|
4
4
|
import type { UseComponentIconsProps } from '../composables/useComponentIcons';
|
|
5
|
+
import type { IconProps } from '../types';
|
|
5
6
|
import type { ComponentConfig } from '../types/tv';
|
|
6
7
|
type InputTags = ComponentConfig<typeof theme, AppConfig, 'inputTags'>;
|
|
7
8
|
export type InputTagItem = AcceptableInputValue;
|
|
@@ -34,7 +35,7 @@ export interface InputTagsProps<T extends InputTagItem = InputTagItem> extends P
|
|
|
34
35
|
* @defaultValue appConfig.ui.icons.close
|
|
35
36
|
* @IconifyIcon
|
|
36
37
|
*/
|
|
37
|
-
deleteIcon?:
|
|
38
|
+
deleteIcon?: IconProps['name'];
|
|
38
39
|
/** Highlight the ring color like a focus state. */
|
|
39
40
|
highlight?: boolean;
|
|
40
41
|
class?: any;
|
|
@@ -65,7 +66,7 @@ declare const _default: <T extends InputTagItem>(__VLS_props: NonNullable<Awaite
|
|
|
65
66
|
readonly "onUpdate:modelValue"?: ((payload: T[]) => any) | undefined;
|
|
66
67
|
readonly onAddTag?: ((payload: T) => any) | undefined;
|
|
67
68
|
readonly onRemoveTag?: ((payload: T) => any) | undefined;
|
|
68
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onFocus" | "onBlur" | "onChange" | "onInvalid" | "onUpdate:modelValue" | "onRemoveTag" | "onAddTag"> & InputTagsProps<T> &
|
|
69
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onFocus" | "onBlur" | "onChange" | "onInvalid" | "onUpdate:modelValue" | "onRemoveTag" | "onAddTag"> & InputTagsProps<T> & {}> & import("vue").PublicProps;
|
|
69
70
|
expose(exposed: import("vue").ShallowUnwrapRef<{
|
|
70
71
|
inputRef: import("vue").Ref<({
|
|
71
72
|
$: import("vue").ComponentInternalInstance;
|
|
@@ -27,7 +27,7 @@ export interface KbdProps {
|
|
|
27
27
|
export interface KbdSlots {
|
|
28
28
|
default(props?: {}): any;
|
|
29
29
|
}
|
|
30
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<KbdProps,
|
|
30
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<KbdProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<KbdProps> & Readonly<{}>, {
|
|
31
31
|
as: any;
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, KbdSlots>;
|
|
33
33
|
export default _default;
|
|
@@ -77,7 +77,7 @@ export interface LinkSlots {
|
|
|
77
77
|
active: boolean;
|
|
78
78
|
}): any;
|
|
79
79
|
}
|
|
80
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<LinkProps,
|
|
80
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
|
|
81
81
|
type: "reset" | "submit" | "button";
|
|
82
82
|
as: any;
|
|
83
83
|
ariaCurrentValue: "page" | "step" | "location" | "date" | "time" | "true" | "false";
|
|
@@ -11,7 +11,7 @@ export interface LinkBaseProps {
|
|
|
11
11
|
active?: boolean;
|
|
12
12
|
isExternal?: boolean;
|
|
13
13
|
}
|
|
14
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<LinkBaseProps,
|
|
14
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<LinkBaseProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkBaseProps> & Readonly<{}>, {
|
|
15
15
|
type: string;
|
|
16
16
|
as: string;
|
|
17
17
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
@@ -9,7 +9,7 @@ export interface MainProps {
|
|
|
9
9
|
export interface MainSlots {
|
|
10
10
|
default(props?: {}): any;
|
|
11
11
|
}
|
|
12
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<MainProps,
|
|
12
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<MainProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MainProps> & Readonly<{}>, {
|
|
13
13
|
as: any;
|
|
14
14
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, MainSlots>;
|
|
15
15
|
export default _default;
|
|
@@ -19,7 +19,7 @@ export interface MarqueeProps {
|
|
|
19
19
|
export interface MarqueeSlots {
|
|
20
20
|
default(props?: {}): any;
|
|
21
21
|
}
|
|
22
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<MarqueeProps,
|
|
22
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<MarqueeProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MarqueeProps> & Readonly<{}>, {
|
|
23
23
|
repeat: number;
|
|
24
24
|
orientation: Marquee["variants"]["orientation"];
|
|
25
25
|
overlay: boolean;
|
|
@@ -20,7 +20,7 @@ const props = defineProps({
|
|
|
20
20
|
fullscreen: { type: Boolean, required: false },
|
|
21
21
|
portal: { type: [Boolean, String], required: false, skipCheck: true, default: true },
|
|
22
22
|
close: { type: [Boolean, Object], required: false, default: true },
|
|
23
|
-
closeIcon: { type: String, required: false },
|
|
23
|
+
closeIcon: { type: [String, Object], required: false },
|
|
24
24
|
dismissible: { type: Boolean, required: false, default: true },
|
|
25
25
|
class: { type: null, required: false },
|
|
26
26
|
ui: { type: null, required: false },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DialogRootProps, DialogRootEmits, DialogContentProps, DialogContentEmits } from 'reka-ui';
|
|
2
2
|
import type { AppConfig } from '@nuxt/schema';
|
|
3
3
|
import theme from '#build/ui/modal';
|
|
4
|
-
import type { ButtonProps } from '../types';
|
|
4
|
+
import type { ButtonProps, IconProps } from '../types';
|
|
5
5
|
import type { EmitsToProps } from '../types/utils';
|
|
6
6
|
import type { ComponentConfig } from '../types/tv';
|
|
7
7
|
type Modal = ComponentConfig<typeof theme, AppConfig, 'modal'>;
|
|
@@ -41,7 +41,7 @@ export interface ModalProps extends DialogRootProps {
|
|
|
41
41
|
* @defaultValue appConfig.ui.icons.close
|
|
42
42
|
* @IconifyIcon
|
|
43
43
|
*/
|
|
44
|
-
closeIcon?:
|
|
44
|
+
closeIcon?: IconProps['name'];
|
|
45
45
|
/**
|
|
46
46
|
* When `false`, the modal will not close when clicking outside or pressing escape.
|
|
47
47
|
* @defaultValue true
|
|
@@ -81,7 +81,7 @@ export interface ModalSlots {
|
|
|
81
81
|
close: () => void;
|
|
82
82
|
}): any;
|
|
83
83
|
}
|
|
84
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ModalProps,
|
|
84
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ModalProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
85
85
|
"update:open": (value: boolean) => any;
|
|
86
86
|
"after:leave": () => any;
|
|
87
87
|
"after:enter": () => any;
|
|
@@ -21,8 +21,8 @@ import UTooltip from "./Tooltip.vue";
|
|
|
21
21
|
defineOptions({ inheritAttrs: false });
|
|
22
22
|
const props = defineProps({
|
|
23
23
|
as: { type: null, required: false },
|
|
24
|
-
trailingIcon: { type: String, required: false },
|
|
25
|
-
externalIcon: { type: [Boolean, String], required: false, default: true },
|
|
24
|
+
trailingIcon: { type: [String, Object], required: false },
|
|
25
|
+
externalIcon: { type: [Boolean, String, Object], required: false, default: true },
|
|
26
26
|
items: { type: null, required: false },
|
|
27
27
|
color: { type: null, required: false },
|
|
28
28
|
variant: { type: null, required: false },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { NavigationMenuRootProps, NavigationMenuRootEmits, NavigationMenuContentProps, NavigationMenuContentEmits, AccordionRootProps } from 'reka-ui';
|
|
2
2
|
import type { AppConfig } from '@nuxt/schema';
|
|
3
3
|
import theme from '#build/ui/navigation-menu';
|
|
4
|
-
import type { AvatarProps, BadgeProps, LinkProps, PopoverProps, TooltipProps } from '../types';
|
|
4
|
+
import type { AvatarProps, BadgeProps, IconProps, LinkProps, PopoverProps, TooltipProps } from '../types';
|
|
5
5
|
import type { ArrayOrNested, DynamicSlots, MergeTypes, NestedItem, EmitsToProps } from '../types/utils';
|
|
6
6
|
import type { ComponentConfig } from '../types/tv';
|
|
7
7
|
type NavigationMenu = ComponentConfig<typeof theme, AppConfig, 'navigationMenu'>;
|
|
@@ -15,7 +15,7 @@ export interface NavigationMenuItem extends Omit<LinkProps, 'type' | 'raw' | 'cu
|
|
|
15
15
|
/**
|
|
16
16
|
* @IconifyIcon
|
|
17
17
|
*/
|
|
18
|
-
icon?:
|
|
18
|
+
icon?: IconProps['name'];
|
|
19
19
|
avatar?: AvatarProps;
|
|
20
20
|
/**
|
|
21
21
|
* Display a badge on the item.
|
|
@@ -35,7 +35,7 @@ export interface NavigationMenuItem extends Omit<LinkProps, 'type' | 'raw' | 'cu
|
|
|
35
35
|
/**
|
|
36
36
|
* @IconifyIcon
|
|
37
37
|
*/
|
|
38
|
-
trailingIcon?:
|
|
38
|
+
trailingIcon?: IconProps['name'];
|
|
39
39
|
/**
|
|
40
40
|
* The type of the item.
|
|
41
41
|
* The `label` type is only displayed in `vertical` orientation.
|
|
@@ -68,14 +68,14 @@ export interface NavigationMenuProps<T extends ArrayOrNested<NavigationMenuItem>
|
|
|
68
68
|
* @defaultValue appConfig.ui.icons.chevronDown
|
|
69
69
|
* @IconifyIcon
|
|
70
70
|
*/
|
|
71
|
-
trailingIcon?:
|
|
71
|
+
trailingIcon?: IconProps['name'];
|
|
72
72
|
/**
|
|
73
73
|
* The icon displayed when the item is an external link.
|
|
74
74
|
* Set to `false` to hide the external icon.
|
|
75
75
|
* @defaultValue appConfig.ui.icons.external
|
|
76
76
|
* @IconifyIcon
|
|
77
77
|
*/
|
|
78
|
-
externalIcon?: boolean |
|
|
78
|
+
externalIcon?: boolean | IconProps['name'];
|
|
79
79
|
items?: T;
|
|
80
80
|
/**
|
|
81
81
|
* @defaultValue 'primary'
|
|
@@ -157,7 +157,7 @@ export type NavigationMenuSlots<A extends ArrayOrNested<NavigationMenuItem> = Ar
|
|
|
157
157
|
declare const _default: <T extends ArrayOrNested<NavigationMenuItem>>(__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<{
|
|
158
158
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
159
159
|
readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
160
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue"> & NavigationMenuProps<T> &
|
|
160
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue"> & NavigationMenuProps<T> & {}> & import("vue").PublicProps;
|
|
161
161
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
162
162
|
attrs: any;
|
|
163
163
|
slots: NavigationMenuSlots<T, NestedItem<T>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{},
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
export default _default;
|
|
@@ -16,7 +16,7 @@ export interface PageSlots {
|
|
|
16
16
|
default(props?: {}): any;
|
|
17
17
|
right(props?: {}): any;
|
|
18
18
|
}
|
|
19
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<PageProps,
|
|
19
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<PageProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PageProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, PageSlots>;
|
|
20
20
|
export default _default;
|
|
21
21
|
type __VLS_WithSlots<T, S> = T & {
|
|
22
22
|
new (): {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AppConfig } from '@nuxt/schema';
|
|
2
2
|
import theme from '#build/ui/page-anchors';
|
|
3
|
-
import type { LinkProps } from '../types';
|
|
3
|
+
import type { IconProps, LinkProps } from '../types';
|
|
4
4
|
import type { ComponentConfig } from '../types/tv';
|
|
5
5
|
type PageAnchors = ComponentConfig<typeof theme, AppConfig, 'pageAnchors'>;
|
|
6
6
|
export interface PageAnchor extends Omit<LinkProps, 'custom'> {
|
|
@@ -8,7 +8,7 @@ export interface PageAnchor extends Omit<LinkProps, 'custom'> {
|
|
|
8
8
|
/**
|
|
9
9
|
* @IconifyIcon
|
|
10
10
|
*/
|
|
11
|
-
icon?:
|
|
11
|
+
icon?: IconProps['name'];
|
|
12
12
|
class?: any;
|
|
13
13
|
ui?: Pick<PageAnchors['slots'], 'item' | 'link' | 'linkLabel' | 'linkLabelExternalIcon' | 'linkLeading' | 'linkLeadingIcon'>;
|
|
14
14
|
}
|
|
@@ -33,7 +33,7 @@ export interface PageAnchorsSlots<T extends PageAnchor = PageAnchor> {
|
|
|
33
33
|
'link-trailing': SlotProps<T>;
|
|
34
34
|
}
|
|
35
35
|
declare const _default: <T extends PageAnchor>(__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<{
|
|
36
|
-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & PageAnchorsProps<T> &
|
|
36
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & PageAnchorsProps<T> & {}> & import("vue").PublicProps;
|
|
37
37
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
38
38
|
attrs: any;
|
|
39
39
|
slots: PageAnchorsSlots<T>;
|
|
@@ -16,7 +16,7 @@ export interface PageAsideSlots {
|
|
|
16
16
|
default(props?: {}): any;
|
|
17
17
|
bottom(props?: {}): any;
|
|
18
18
|
}
|
|
19
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<PageAsideProps,
|
|
19
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<PageAsideProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PageAsideProps> & Readonly<{}>, {
|
|
20
20
|
as: any;
|
|
21
21
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, PageAsideSlots>;
|
|
22
22
|
export default _default;
|
|
@@ -9,7 +9,7 @@ export interface PageBodyProps {
|
|
|
9
9
|
export interface PageBodySlots {
|
|
10
10
|
default(props?: {}): any;
|
|
11
11
|
}
|
|
12
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<PageBodyProps,
|
|
12
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<PageBodyProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PageBodyProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, PageBodySlots>;
|
|
13
13
|
export default _default;
|
|
14
14
|
type __VLS_WithSlots<T, S> = T & {
|
|
15
15
|
new (): {
|
|
@@ -44,7 +44,7 @@ export interface PageCTASlots {
|
|
|
44
44
|
default(props?: {}): any;
|
|
45
45
|
bottom(props?: {}): any;
|
|
46
46
|
}
|
|
47
|
-
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<PageCTAProps,
|
|
47
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<PageCTAProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PageCTAProps> & Readonly<{}>, {
|
|
48
48
|
reverse: boolean;
|
|
49
49
|
orientation: PageCTA["variants"]["orientation"];
|
|
50
50
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, PageCTASlots>;
|