nuance-ui 0.1.38 → 0.1.39
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/runtime/components/action-icon/action-icon-group.d.vue.ts +2 -2
- package/dist/runtime/components/action-icon/action-icon-group.vue.d.ts +2 -2
- package/dist/runtime/components/action-icon/action-icon-section.d.vue.ts +2 -2
- package/dist/runtime/components/action-icon/action-icon-section.vue.d.ts +2 -2
- package/dist/runtime/components/action-icon/action-icon.d.vue.ts +2 -2
- package/dist/runtime/components/action-icon/action-icon.vue.d.ts +2 -2
- package/dist/runtime/components/alert.d.vue.ts +3 -3
- package/dist/runtime/components/alert.vue.d.ts +3 -3
- package/dist/runtime/components/app-shell/app-shell-aside.d.vue.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell-aside.vue.d.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell-footer.d.vue.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell-footer.vue.d.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell-header.d.vue.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell-header.vue.d.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell-main.d.vue.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell-main.vue.d.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell-navbar.d.vue.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell-navbar.vue.d.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell-section.d.vue.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell-section.vue.d.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell.d.vue.ts +2 -2
- package/dist/runtime/components/app-shell/app-shell.vue.d.ts +2 -2
- package/dist/runtime/components/avatar/avatar-group.d.vue.ts +2 -2
- package/dist/runtime/components/avatar/avatar-group.vue.d.ts +2 -2
- package/dist/runtime/components/avatar/avatar.d.vue.ts +2 -2
- package/dist/runtime/components/avatar/avatar.vue.d.ts +2 -2
- package/dist/runtime/components/badge.d.vue.ts +4 -4
- package/dist/runtime/components/badge.vue +45 -24
- package/dist/runtime/components/badge.vue.d.ts +4 -4
- package/dist/runtime/components/box.d.vue.ts +2 -2
- package/dist/runtime/components/box.vue.d.ts +2 -2
- package/dist/runtime/components/breadcrumbs.d.vue.ts +4 -4
- package/dist/runtime/components/breadcrumbs.vue.d.ts +4 -4
- package/dist/runtime/components/button/button-group.d.vue.ts +2 -2
- package/dist/runtime/components/button/button-group.vue.d.ts +2 -2
- package/dist/runtime/components/button/button.d.vue.ts +8 -8
- package/dist/runtime/components/button/button.module.css +1 -1
- package/dist/runtime/components/button/button.vue.d.ts +8 -8
- package/dist/runtime/components/button/unstyled-button.d.vue.ts +2 -2
- package/dist/runtime/components/button/unstyled-button.vue +2 -2
- package/dist/runtime/components/button/unstyled-button.vue.d.ts +2 -2
- package/dist/runtime/components/calendar/calendar.d.vue.ts +20 -8
- package/dist/runtime/components/calendar/calendar.vue +1 -1
- package/dist/runtime/components/calendar/calendar.vue.d.ts +20 -8
- package/dist/runtime/components/calendar/lib/context.d.ts +1 -1
- package/dist/runtime/components/calendar/lib/use-calendar-selection.js +5 -4
- package/dist/runtime/components/calendar/model.d.ts +3 -2
- package/dist/runtime/components/calendar/ui/core/calendar-cell.d.vue.ts +2 -2
- package/dist/runtime/components/calendar/ui/core/calendar-cell.vue +22 -13
- package/dist/runtime/components/calendar/ui/core/calendar-cell.vue.d.ts +2 -2
- package/dist/runtime/components/calendar/ui/core/calendar-header.d.vue.ts +2 -2
- package/dist/runtime/components/calendar/ui/core/calendar-header.vue +22 -17
- package/dist/runtime/components/calendar/ui/core/calendar-header.vue.d.ts +2 -2
- package/dist/runtime/components/calendar/ui/core/calendar-root.d.vue.ts +19 -9
- package/dist/runtime/components/calendar/ui/core/calendar-root.vue +6 -7
- package/dist/runtime/components/calendar/ui/core/calendar-root.vue.d.ts +19 -9
- package/dist/runtime/components/calendar/ui/levels/calendar-decade.d.vue.ts +1 -1
- package/dist/runtime/components/calendar/ui/levels/calendar-decade.vue.d.ts +1 -1
- package/dist/runtime/components/calendar/ui/levels/calendar-month.d.vue.ts +3 -3
- package/dist/runtime/components/calendar/ui/levels/calendar-month.vue +9 -16
- package/dist/runtime/components/calendar/ui/levels/calendar-month.vue.d.ts +3 -3
- package/dist/runtime/components/calendar/ui/levels/calendar-year.d.vue.ts +1 -1
- package/dist/runtime/components/calendar/ui/levels/calendar-year.vue +9 -5
- package/dist/runtime/components/calendar/ui/levels/calendar-year.vue.d.ts +1 -1
- package/dist/runtime/components/card/card-section.d.vue.ts +2 -2
- package/dist/runtime/components/card/card-section.vue.d.ts +2 -2
- package/dist/runtime/components/card/card.d.vue.ts +2 -2
- package/dist/runtime/components/card/card.vue.d.ts +2 -2
- package/dist/runtime/components/checkbox/checkbox-card.d.vue.ts +2 -2
- package/dist/runtime/components/checkbox/checkbox-card.vue.d.ts +2 -2
- package/dist/runtime/components/checkbox/checkbox-group.d.vue.ts +5 -5
- package/dist/runtime/components/checkbox/checkbox-group.vue.d.ts +5 -5
- package/dist/runtime/components/checkbox/checkbox-indicator.d.vue.ts +2 -2
- package/dist/runtime/components/checkbox/checkbox-indicator.vue.d.ts +2 -2
- package/dist/runtime/components/checkbox/checkbox.d.vue.ts +2 -2
- package/dist/runtime/components/checkbox/checkbox.vue.d.ts +2 -2
- package/dist/runtime/components/chip/chip-group.d.vue.ts +10 -6
- package/dist/runtime/components/chip/chip-group.vue.d.ts +10 -6
- package/dist/runtime/components/chip/chip.d.vue.ts +2 -2
- package/dist/runtime/components/chip/chip.vue.d.ts +2 -2
- package/dist/runtime/components/combobox/combobox-dropdown.d.vue.ts +2 -2
- package/dist/runtime/components/combobox/combobox-dropdown.vue.d.ts +2 -2
- package/dist/runtime/components/combobox/combobox-empty.d.vue.ts +2 -2
- package/dist/runtime/components/combobox/combobox-empty.vue.d.ts +2 -2
- package/dist/runtime/components/combobox/combobox-group.d.vue.ts +10 -6
- package/dist/runtime/components/combobox/combobox-group.vue.d.ts +10 -6
- package/dist/runtime/components/combobox/combobox-option-list.d.vue.ts +2 -2
- package/dist/runtime/components/combobox/combobox-option-list.vue.d.ts +2 -2
- package/dist/runtime/components/combobox/combobox-option.d.vue.ts +8 -4
- package/dist/runtime/components/combobox/combobox-option.vue.d.ts +8 -4
- package/dist/runtime/components/combobox/combobox-options-dropdown.d.vue.ts +10 -7
- package/dist/runtime/components/combobox/combobox-options-dropdown.vue +1 -3
- package/dist/runtime/components/combobox/combobox-options-dropdown.vue.d.ts +10 -7
- package/dist/runtime/components/combobox/combobox-root.d.vue.ts +2 -2
- package/dist/runtime/components/combobox/combobox-root.vue +2 -2
- package/dist/runtime/components/combobox/combobox-root.vue.d.ts +2 -2
- package/dist/runtime/components/combobox/combobox-target.d.vue.ts +2 -2
- package/dist/runtime/components/combobox/combobox-target.vue +1 -1
- package/dist/runtime/components/combobox/combobox-target.vue.d.ts +2 -2
- package/dist/runtime/components/container.d.vue.ts +2 -2
- package/dist/runtime/components/container.vue.d.ts +2 -2
- package/dist/runtime/components/date-time-picker.d.vue.ts +47 -0
- package/dist/runtime/components/date-time-picker.vue +151 -0
- package/dist/runtime/components/date-time-picker.vue.d.ts +47 -0
- package/dist/runtime/components/dialog/index.d.ts +4 -4
- package/dist/runtime/components/dialog/{dialog-close-button.d.vue.ts → ui/dialog-close-button.d.vue.ts} +3 -3
- package/dist/runtime/components/dialog/{dialog-close-button.vue → ui/dialog-close-button.vue} +2 -2
- package/dist/runtime/components/dialog/{dialog-close-button.vue.d.ts → ui/dialog-close-button.vue.d.ts} +3 -3
- package/dist/runtime/components/dialog/{dialog-header.d.vue.ts → ui/dialog-header.d.vue.ts} +3 -3
- package/dist/runtime/components/dialog/{dialog-header.vue → ui/dialog-header.vue} +1 -1
- package/dist/runtime/components/dialog/{dialog-header.vue.d.ts → ui/dialog-header.vue.d.ts} +3 -3
- package/dist/runtime/components/dialog/{dialog-root.d.vue.ts → ui/dialog-root.d.vue.ts} +5 -5
- package/dist/runtime/components/dialog/{dialog-root.vue → ui/dialog-root.vue} +5 -5
- package/dist/runtime/components/dialog/{dialog-root.vue.d.ts → ui/dialog-root.vue.d.ts} +5 -5
- package/dist/runtime/components/dialog/{dialog-title.d.vue.ts → ui/dialog-title.d.vue.ts} +3 -3
- package/dist/runtime/components/dialog/{dialog-title.vue → ui/dialog-title.vue} +2 -2
- package/dist/runtime/components/dialog/{dialog-title.vue.d.ts → ui/dialog-title.vue.d.ts} +3 -3
- package/dist/runtime/components/dialog/ui/dialog.module.css +1 -0
- package/dist/runtime/components/drawer/drawer-close-button.d.vue.ts +2 -2
- package/dist/runtime/components/drawer/drawer-close-button.vue +1 -1
- package/dist/runtime/components/drawer/drawer-close-button.vue.d.ts +2 -2
- package/dist/runtime/components/drawer/drawer-header.d.vue.ts +2 -2
- package/dist/runtime/components/drawer/drawer-header.vue +1 -1
- package/dist/runtime/components/drawer/drawer-header.vue.d.ts +2 -2
- package/dist/runtime/components/drawer/drawer-root.d.vue.ts +2 -2
- package/dist/runtime/components/drawer/drawer-root.vue +3 -3
- package/dist/runtime/components/drawer/drawer-root.vue.d.ts +2 -2
- package/dist/runtime/components/drawer/drawer-title.d.vue.ts +2 -2
- package/dist/runtime/components/drawer/drawer-title.vue +2 -2
- package/dist/runtime/components/drawer/drawer-title.vue.d.ts +2 -2
- package/dist/runtime/components/drawer/drawer.module.css +1 -1
- package/dist/runtime/components/file-upload.d.vue.ts +9 -5
- package/dist/runtime/components/file-upload.vue.d.ts +9 -5
- package/dist/runtime/components/index.d.ts +1 -0
- package/dist/runtime/components/input/date-picker.d.vue.ts +44 -0
- package/dist/runtime/components/input/date-picker.vue +174 -0
- package/dist/runtime/components/input/date-picker.vue.d.ts +44 -0
- package/dist/runtime/components/input/email-input.d.vue.ts +6 -6
- package/dist/runtime/components/input/email-input.vue +9 -5
- package/dist/runtime/components/input/email-input.vue.d.ts +6 -6
- package/dist/runtime/components/input/index.d.ts +2 -1
- package/dist/runtime/components/input/lib/input-wrapper.context.d.ts +2 -2
- package/dist/runtime/components/input/lib/input-wrapper.context.js +1 -2
- package/dist/runtime/components/input/number-input.d.vue.ts +5 -5
- package/dist/runtime/components/input/number-input.vue +19 -18
- package/dist/runtime/components/input/number-input.vue.d.ts +5 -5
- package/dist/runtime/components/input/password-input.d.vue.ts +6 -6
- package/dist/runtime/components/input/password-input.vue +8 -1
- package/dist/runtime/components/input/password-input.vue.d.ts +6 -6
- package/dist/runtime/components/input/text-input.d.vue.ts +21 -11
- package/dist/runtime/components/input/text-input.vue +34 -15
- package/dist/runtime/components/input/text-input.vue.d.ts +21 -11
- package/dist/runtime/components/input/types/index.d.ts +2 -0
- package/dist/runtime/components/input/ui/button-input.d.vue.ts +42 -0
- package/dist/runtime/components/input/ui/button-input.vue +103 -0
- package/dist/runtime/components/input/ui/button-input.vue.d.ts +42 -0
- package/dist/runtime/components/input/ui/input-base.d.vue.ts +11 -63
- package/dist/runtime/components/input/ui/input-base.vue +55 -78
- package/dist/runtime/components/input/ui/input-base.vue.d.ts +11 -63
- package/dist/runtime/components/input/ui/input-inline.d.vue.ts +5 -5
- package/dist/runtime/components/input/ui/input-inline.vue +2 -6
- package/dist/runtime/components/input/ui/input-inline.vue.d.ts +5 -5
- package/dist/runtime/components/input/ui/input-label.vue +2 -5
- package/dist/runtime/components/input/ui/input-wrapper.d.vue.ts +5 -5
- package/dist/runtime/components/input/ui/input-wrapper.vue +11 -5
- package/dist/runtime/components/input/ui/input-wrapper.vue.d.ts +5 -5
- package/dist/runtime/components/input/ui/spin-input.d.vue.ts +25 -0
- package/dist/runtime/components/input/ui/spin-input.vue +155 -0
- package/dist/runtime/components/input/ui/spin-input.vue.d.ts +25 -0
- package/dist/runtime/components/link/link-button.d.vue.ts +4 -4
- package/dist/runtime/components/link/link-button.vue.d.ts +4 -4
- package/dist/runtime/components/link/link.d.vue.ts +2 -2
- package/dist/runtime/components/link/link.vue +1 -1
- package/dist/runtime/components/link/link.vue.d.ts +2 -2
- package/dist/runtime/components/modal/modal-close-button.d.vue.ts +2 -2
- package/dist/runtime/components/modal/modal-close-button.vue +1 -1
- package/dist/runtime/components/modal/modal-close-button.vue.d.ts +2 -2
- package/dist/runtime/components/modal/modal-header.d.vue.ts +2 -2
- package/dist/runtime/components/modal/modal-header.vue +1 -1
- package/dist/runtime/components/modal/modal-header.vue.d.ts +2 -2
- package/dist/runtime/components/modal/modal-root.d.vue.ts +2 -2
- package/dist/runtime/components/modal/modal-root.vue +3 -3
- package/dist/runtime/components/modal/modal-root.vue.d.ts +2 -2
- package/dist/runtime/components/modal/modal-title.d.vue.ts +2 -2
- package/dist/runtime/components/modal/modal-title.vue +2 -2
- package/dist/runtime/components/modal/modal-title.vue.d.ts +2 -2
- package/dist/runtime/components/nav-link/nav-icon-link.d.vue.ts +2 -2
- package/dist/runtime/components/nav-link/nav-icon-link.vue.d.ts +2 -2
- package/dist/runtime/components/nav-link/nav-link.d.vue.ts +5 -5
- package/dist/runtime/components/nav-link/nav-link.vue.d.ts +5 -5
- package/dist/runtime/components/paper.d.vue.ts +2 -2
- package/dist/runtime/components/paper.vue.d.ts +2 -2
- package/dist/runtime/components/popover/lib/use-popover.d.ts +1 -0
- package/dist/runtime/components/popover/lib/use-popover.js +2 -1
- package/dist/runtime/components/popover/popover-dropdown.vue +2 -0
- package/dist/runtime/components/popover/popover-target.d.vue.ts +7 -3
- package/dist/runtime/components/popover/popover-target.vue +10 -2
- package/dist/runtime/components/popover/popover-target.vue.d.ts +7 -3
- package/dist/runtime/components/popover/popover.vue +1 -1
- package/dist/runtime/components/progress/progress-label.d.vue.ts +2 -2
- package/dist/runtime/components/progress/progress-label.vue.d.ts +2 -2
- package/dist/runtime/components/progress/progress-root.d.vue.ts +2 -2
- package/dist/runtime/components/progress/progress-root.vue.d.ts +2 -2
- package/dist/runtime/components/progress/progress-section.d.vue.ts +2 -2
- package/dist/runtime/components/progress/progress-section.vue.d.ts +2 -2
- package/dist/runtime/components/renderless/renderless.d.vue.ts +2 -2
- package/dist/runtime/components/renderless/renderless.vue.d.ts +2 -2
- package/dist/runtime/components/roving-focus/roving-focus-item.d.vue.ts +2 -2
- package/dist/runtime/components/roving-focus/roving-focus-item.vue.d.ts +2 -2
- package/dist/runtime/components/roving-focus/roving-focus.d.vue.ts +2 -2
- package/dist/runtime/components/roving-focus/roving-focus.vue.d.ts +2 -2
- package/dist/runtime/components/select/select.d.vue.ts +12 -8
- package/dist/runtime/components/select/select.vue +9 -11
- package/dist/runtime/components/select/select.vue.d.ts +12 -8
- package/dist/runtime/components/table/table.d.vue.ts +10 -6
- package/dist/runtime/components/table/table.vue +1 -1
- package/dist/runtime/components/table/table.vue.d.ts +10 -6
- package/dist/runtime/components/tabs/tabs-list.d.vue.ts +2 -2
- package/dist/runtime/components/tabs/tabs-list.vue +1 -1
- package/dist/runtime/components/tabs/tabs-list.vue.d.ts +2 -2
- package/dist/runtime/components/tabs/tabs-panel.d.vue.ts +2 -2
- package/dist/runtime/components/tabs/tabs-panel.vue.d.ts +2 -2
- package/dist/runtime/components/tabs/tabs-root.d.vue.ts +2 -2
- package/dist/runtime/components/tabs/tabs-root.vue.d.ts +2 -2
- package/dist/runtime/components/tabs/tabs-tab.d.vue.ts +4 -4
- package/dist/runtime/components/tabs/tabs-tab.vue.d.ts +4 -4
- package/dist/runtime/components/text.d.vue.ts +2 -2
- package/dist/runtime/components/text.vue +1 -1
- package/dist/runtime/components/text.vue.d.ts +2 -2
- package/dist/runtime/components/textarea.d.vue.ts +11 -9
- package/dist/runtime/components/textarea.vue +42 -30
- package/dist/runtime/components/textarea.vue.d.ts +11 -9
- package/dist/runtime/components/time-picker/index.d.ts +6 -0
- package/dist/runtime/components/time-picker/index.js +5 -0
- package/dist/runtime/components/time-picker/lib/clamp-time.d.ts +13 -0
- package/dist/runtime/components/time-picker/lib/clamp-time.js +23 -0
- package/dist/runtime/components/time-picker/lib/get-parsed-time.d.ts +16 -0
- package/dist/runtime/components/time-picker/lib/get-parsed-time.js +26 -0
- package/dist/runtime/components/time-picker/lib/get-time-string.d.ts +13 -0
- package/dist/runtime/components/time-picker/lib/get-time-string.js +41 -0
- package/dist/runtime/components/time-picker/lib/pad-time.d.ts +1 -0
- package/dist/runtime/components/time-picker/lib/pad-time.js +3 -0
- package/dist/runtime/components/time-picker/lib/split-time-string.d.ts +5 -0
- package/dist/runtime/components/time-picker/lib/split-time-string.js +4 -0
- package/dist/runtime/components/time-picker/lib/use-time-picker.d.ts +29 -0
- package/dist/runtime/components/time-picker/lib/use-time-picker.js +103 -0
- package/dist/runtime/components/time-picker/model.d.ts +17 -0
- package/dist/runtime/components/time-picker/model.js +0 -0
- package/dist/runtime/components/time-picker/time-picker.d.vue.ts +88 -0
- package/dist/runtime/components/time-picker/time-picker.vue +313 -0
- package/dist/runtime/components/time-picker/time-picker.vue.d.ts +88 -0
- package/dist/runtime/components/title.d.vue.ts +2 -2
- package/dist/runtime/components/title.vue +1 -1
- package/dist/runtime/components/title.vue.d.ts +2 -2
- package/dist/runtime/components/tree/_ui/tree-root.d.vue.ts +2 -2
- package/dist/runtime/components/tree/_ui/tree-root.vue.d.ts +2 -2
- package/dist/runtime/components/visually-hidden/visually-hidden-input.d.vue.ts +10 -6
- package/dist/runtime/components/visually-hidden/visually-hidden-input.vue.d.ts +10 -6
- package/dist/runtime/components/visually-hidden/visually-hidden.d.vue.ts +2 -2
- package/dist/runtime/components/visually-hidden/visually-hidden.vue.d.ts +2 -2
- package/dist/runtime/composals/use-date-config.d.ts +11 -1
- package/dist/runtime/composals/use-date-config.js +8 -5
- package/dist/runtime/helpers/date/create-months.d.ts +1 -7
- package/dist/runtime/helpers/date/create-months.js +1 -1
- package/dist/runtime/helpers/date/get-days-between.js +4 -1
- package/dist/runtime/types/index.d.ts +1 -1
- package/package.json +18 -18
- package/dist/runtime/components/dialog/dialog.module.css +0 -1
- package/dist/runtime/components/input/input.d.vue.ts +0 -38
- package/dist/runtime/components/input/input.vue +0 -47
- package/dist/runtime/components/input/input.vue.d.ts +0 -38
- /package/dist/runtime/components/dialog/{types/index.d.ts → model.d.ts} +0 -0
- /package/dist/runtime/components/dialog/{types/index.js → model.js} +0 -0
|
@@ -1,69 +1,17 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Classes } from '@nui/types';
|
|
2
2
|
import type { WrapperContext } from '../lib/input-wrapper.context.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
id: string;
|
|
6
|
-
is?: 'input' | 'textarea' | Component;
|
|
7
|
-
modelValue?: string | number;
|
|
3
|
+
export interface BaseInputProps extends Omit<WrapperContext, 'id'> {
|
|
4
|
+
classes?: Classes<'root' | 'section'>;
|
|
8
5
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
type __VLS_Slots = {
|
|
7
|
+
leftSection: [];
|
|
8
|
+
default: (props: {
|
|
9
|
+
id: string;
|
|
10
|
+
css: string;
|
|
11
|
+
}) => any;
|
|
12
|
+
rightSection: [];
|
|
14
13
|
};
|
|
15
|
-
declare const __VLS_base: import("vue").DefineComponent<BaseInputProps, {
|
|
16
|
-
ref: Readonly<import("vue").ShallowRef<({
|
|
17
|
-
$: import("vue").ComponentInternalInstance;
|
|
18
|
-
$data: {};
|
|
19
|
-
$props: {
|
|
20
|
-
readonly is?: (keyof HTMLElementTagNameMap | Component) | undefined;
|
|
21
|
-
readonly mod?: (import("@nui/utils").Mod | import("@nui/utils").Mod[] | import("@nui/utils").Mod[][] | null) | undefined;
|
|
22
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
23
|
-
$attrs: {
|
|
24
|
-
[x: string]: unknown;
|
|
25
|
-
};
|
|
26
|
-
$refs: {
|
|
27
|
-
[x: string]: unknown;
|
|
28
|
-
};
|
|
29
|
-
$slots: Readonly<{
|
|
30
|
-
[name: string]: import("vue").Slot<any> | undefined;
|
|
31
|
-
}>;
|
|
32
|
-
$root: import("vue").ComponentPublicInstance | null;
|
|
33
|
-
$parent: import("vue").ComponentPublicInstance | null;
|
|
34
|
-
$host: Element | null;
|
|
35
|
-
$emit: (event: string, ...args: any[]) => void;
|
|
36
|
-
$el: any;
|
|
37
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("../../index.js").BoxProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
38
|
-
beforeCreate?: (() => void) | (() => void)[];
|
|
39
|
-
created?: (() => void) | (() => void)[];
|
|
40
|
-
beforeMount?: (() => void) | (() => void)[];
|
|
41
|
-
mounted?: (() => void) | (() => void)[];
|
|
42
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
|
43
|
-
updated?: (() => void) | (() => void)[];
|
|
44
|
-
activated?: (() => void) | (() => void)[];
|
|
45
|
-
deactivated?: (() => void) | (() => void)[];
|
|
46
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
|
47
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
|
48
|
-
destroyed?: (() => void) | (() => void)[];
|
|
49
|
-
unmounted?: (() => void) | (() => void)[];
|
|
50
|
-
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
51
|
-
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
52
|
-
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
53
|
-
};
|
|
54
|
-
$forceUpdate: () => void;
|
|
55
|
-
$nextTick: typeof import("vue").nextTick;
|
|
56
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
57
|
-
} & Readonly<{}> & Omit<Readonly<import("../../index.js").BoxProps> & Readonly<{}>, never> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
58
|
-
$slots: {
|
|
59
|
-
default?: (props: {}) => any;
|
|
60
|
-
};
|
|
61
|
-
}) | null>>;
|
|
62
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
63
|
-
"update:modelValue": (value: string | number | undefined) => any;
|
|
64
|
-
}, string, import("vue").PublicProps, Readonly<BaseInputProps> & Readonly<{
|
|
65
|
-
"onUpdate:modelValue"?: ((value: string | number | undefined) => any) | undefined;
|
|
66
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<BaseInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BaseInputProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
67
15
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
68
16
|
declare const _default: typeof __VLS_export;
|
|
69
17
|
export default _default;
|
|
@@ -1,31 +1,21 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { getFontSize, getRadius, getSize } from "@nui/utils";
|
|
3
|
-
import { computed
|
|
3
|
+
import { computed } from "vue";
|
|
4
4
|
import Box from "../../box.vue";
|
|
5
5
|
import { useInputWrapperState } from "../lib/input-wrapper.context";
|
|
6
|
-
const {
|
|
7
|
-
|
|
8
|
-
modelValue = "",
|
|
9
|
-
readonly,
|
|
10
|
-
disabled,
|
|
11
|
-
...props
|
|
12
|
-
} = defineProps({
|
|
13
|
-
id: { type: String, required: true },
|
|
14
|
-
is: { type: null, required: false },
|
|
15
|
-
modelValue: { type: [String, Number], required: false },
|
|
16
|
-
readonly: { type: Boolean, required: false },
|
|
17
|
-
disabled: { type: Boolean, required: false },
|
|
6
|
+
const { classes, ...props } = defineProps({
|
|
7
|
+
classes: { type: Object, required: false },
|
|
18
8
|
required: { type: Boolean, required: false },
|
|
19
9
|
radius: { type: String, required: false },
|
|
20
10
|
size: { type: String, required: false },
|
|
21
11
|
variant: { type: String, required: false },
|
|
22
12
|
multiline: { type: Boolean, required: false },
|
|
23
|
-
resize: { type:
|
|
13
|
+
resize: { type: void 0, required: false },
|
|
24
14
|
leftSectionPE: { type: null, required: false },
|
|
25
15
|
rightSectionPE: { type: null, required: false }
|
|
26
16
|
});
|
|
27
|
-
|
|
28
|
-
const api =
|
|
17
|
+
defineSlots();
|
|
18
|
+
const api = computed(() => useInputWrapperState() ?? props);
|
|
29
19
|
const style = computed(() => ({
|
|
30
20
|
"--input-height": getSize(api.value.size, "input-height"),
|
|
31
21
|
"--input-fz": getFontSize(api.value.size),
|
|
@@ -35,43 +25,32 @@ const style = computed(() => ({
|
|
|
35
25
|
"--input-right-section-pointer-events": api.value.rightSectionPE,
|
|
36
26
|
"--input-resize": api.value.resize
|
|
37
27
|
}));
|
|
38
|
-
const ref = useTemplateRef("input");
|
|
39
|
-
defineExpose({ ref });
|
|
40
28
|
</script>
|
|
41
29
|
|
|
42
30
|
<template>
|
|
43
31
|
<Box
|
|
44
32
|
:style
|
|
45
|
-
:class='[$style.root,
|
|
33
|
+
:class='[$style.root, classes?.root]'
|
|
46
34
|
:mod='[{
|
|
47
35
|
"with-left-section": !!$slots.leftSection,
|
|
48
36
|
"with-right-section": !!$slots.rightSection,
|
|
49
|
-
"variant": api.variant
|
|
37
|
+
"variant": api.variant,
|
|
38
|
+
"error": !!api?.error
|
|
50
39
|
}]'
|
|
51
40
|
>
|
|
52
41
|
<span
|
|
53
42
|
v-if='$slots.leftSection'
|
|
54
|
-
:class='$style.section'
|
|
43
|
+
:class='[$style.section, classes?.section]'
|
|
55
44
|
data-position='left'
|
|
56
45
|
>
|
|
57
46
|
<slot name='leftSection' />
|
|
58
47
|
</span>
|
|
59
48
|
|
|
60
|
-
<
|
|
61
|
-
:is
|
|
62
|
-
:id='api.id'
|
|
63
|
-
v-bind='{ ...$attrs, disabled, class: void 0 }'
|
|
64
|
-
ref='input'
|
|
65
|
-
:class='$style.input'
|
|
66
|
-
:value='modelValue'
|
|
67
|
-
:readonly
|
|
68
|
-
:disabled
|
|
69
|
-
@input="$emit('update:modelValue', $event.target.value)"
|
|
70
|
-
/>
|
|
49
|
+
<slot :id='api.id' :css='$style.input' />
|
|
71
50
|
|
|
72
51
|
<span
|
|
73
52
|
v-if='$slots.rightSection'
|
|
74
|
-
:class='$style.section'
|
|
53
|
+
:class='[$style.section, classes?.section]'
|
|
75
54
|
data-position='right'
|
|
76
55
|
>
|
|
77
56
|
<slot name='rightSection' />
|
|
@@ -123,50 +102,7 @@ defineExpose({ ref });
|
|
|
123
102
|
--right-section-end: 1px;
|
|
124
103
|
--right-section-border-radius: 0 var(--input-radius) var(--input-radius) 0;
|
|
125
104
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
&[data-variant='unstyled'] {
|
|
129
|
-
--input-padding: 0;
|
|
130
|
-
--input-padding-y: 0;
|
|
131
|
-
--input-padding-inline-start: 0;
|
|
132
|
-
--input-padding-inline-end: 0;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
&[data-pointer] {
|
|
136
|
-
--input-cursor: pointer;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
&[data-multiline] {
|
|
140
|
-
--input-padding-y-xs: 4.5px;
|
|
141
|
-
--input-padding-y-sm: 5.5px;
|
|
142
|
-
--input-padding-y-md: 7px;
|
|
143
|
-
--input-padding-y-lg: 9.5px;
|
|
144
|
-
--input-padding-y-xl: 13px;
|
|
145
|
-
|
|
146
|
-
--input-size: auto;
|
|
147
|
-
--input-line-height: var(--line-height);
|
|
148
|
-
--input-padding-y: var(--input-padding-y-sm);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
&[data-with-left-section] {
|
|
152
|
-
--input-padding-inline-start: var(--input-left-section-size);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
&[data-with-right-section] {
|
|
156
|
-
--input-padding-inline-end: var(--input-right-section-size);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
[data-color-scheme] &[data-error] {
|
|
160
|
-
--input-color: var(--color-error);
|
|
161
|
-
--input-placeholder-color: var(--color-error);
|
|
162
|
-
--input-section-color: var(--color-error);
|
|
163
|
-
|
|
164
|
-
&:not([data-variant='unstyled']) {
|
|
165
|
-
--input-bd: var(--color-error);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
@mixin light {
|
|
105
|
+
@mixin where-light {
|
|
170
106
|
--input-disabled-bg: var(--color-gray-1);
|
|
171
107
|
--input-disabled-color: var(--color-gray-6);
|
|
172
108
|
|
|
@@ -189,7 +125,7 @@ defineExpose({ ref });
|
|
|
189
125
|
}
|
|
190
126
|
}
|
|
191
127
|
|
|
192
|
-
@mixin dark {
|
|
128
|
+
@mixin where-dark {
|
|
193
129
|
--input-disabled-bg: var(--color-dark-6);
|
|
194
130
|
--input-disabled-color: var(--color-dark-2);
|
|
195
131
|
|
|
@@ -217,6 +153,47 @@ defineExpose({ ref });
|
|
|
217
153
|
--left-section-border-radius: 0 var(--input-radius) var(--input-radius) 0;
|
|
218
154
|
--right-section-border-radius: var(--input-radius) 0 0 var(--input-radius);
|
|
219
155
|
}
|
|
156
|
+
|
|
157
|
+
position: relative;
|
|
158
|
+
|
|
159
|
+
&[data-variant='unstyled'] {
|
|
160
|
+
--input-padding: 0;
|
|
161
|
+
--input-padding-y: 0;
|
|
162
|
+
--input-padding-inline-start: 0;
|
|
163
|
+
--input-padding-inline-end: 0;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&[data-pointer] {
|
|
167
|
+
--input-cursor: pointer;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
&[data-multiline] {
|
|
171
|
+
--input-padding-y-xs: 4.5px;
|
|
172
|
+
--input-padding-y-sm: 5.5px;
|
|
173
|
+
--input-padding-y-md: 7px;
|
|
174
|
+
--input-padding-y-lg: 9.5px;
|
|
175
|
+
--input-padding-y-xl: 13px;
|
|
176
|
+
|
|
177
|
+
--input-size: auto;
|
|
178
|
+
--input-line-height: var(--line-height);
|
|
179
|
+
--input-padding-y: var(--input-padding-y-sm);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
&[data-with-left-section] {
|
|
183
|
+
--input-padding-inline-start: var(--input-left-section-size);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
&[data-with-right-section] {
|
|
187
|
+
--input-padding-inline-end: var(--input-right-section-size);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&[data-error] {
|
|
191
|
+
--input-color: var(--color-error);
|
|
192
|
+
--input-placeholder-color: var(--color-error);
|
|
193
|
+
--input-section-color: var(--color-error);
|
|
194
|
+
|
|
195
|
+
--input-bd: var(--color-error);
|
|
196
|
+
}
|
|
220
197
|
}
|
|
221
198
|
|
|
222
199
|
.input {
|
|
@@ -1,69 +1,17 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Classes } from '@nui/types';
|
|
2
2
|
import type { WrapperContext } from '../lib/input-wrapper.context.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
id: string;
|
|
6
|
-
is?: 'input' | 'textarea' | Component;
|
|
7
|
-
modelValue?: string | number;
|
|
3
|
+
export interface BaseInputProps extends Omit<WrapperContext, 'id'> {
|
|
4
|
+
classes?: Classes<'root' | 'section'>;
|
|
8
5
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
type __VLS_Slots = {
|
|
7
|
+
leftSection: [];
|
|
8
|
+
default: (props: {
|
|
9
|
+
id: string;
|
|
10
|
+
css: string;
|
|
11
|
+
}) => any;
|
|
12
|
+
rightSection: [];
|
|
14
13
|
};
|
|
15
|
-
declare const __VLS_base: import("vue").DefineComponent<BaseInputProps, {
|
|
16
|
-
ref: Readonly<import("vue").ShallowRef<({
|
|
17
|
-
$: import("vue").ComponentInternalInstance;
|
|
18
|
-
$data: {};
|
|
19
|
-
$props: {
|
|
20
|
-
readonly is?: (keyof HTMLElementTagNameMap | Component) | undefined;
|
|
21
|
-
readonly mod?: (import("@nui/utils").Mod | import("@nui/utils").Mod[] | import("@nui/utils").Mod[][] | null) | undefined;
|
|
22
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
23
|
-
$attrs: {
|
|
24
|
-
[x: string]: unknown;
|
|
25
|
-
};
|
|
26
|
-
$refs: {
|
|
27
|
-
[x: string]: unknown;
|
|
28
|
-
};
|
|
29
|
-
$slots: Readonly<{
|
|
30
|
-
[name: string]: import("vue").Slot<any> | undefined;
|
|
31
|
-
}>;
|
|
32
|
-
$root: import("vue").ComponentPublicInstance | null;
|
|
33
|
-
$parent: import("vue").ComponentPublicInstance | null;
|
|
34
|
-
$host: Element | null;
|
|
35
|
-
$emit: (event: string, ...args: any[]) => void;
|
|
36
|
-
$el: any;
|
|
37
|
-
$options: import("vue").ComponentOptionsBase<Readonly<import("../../index.js").BoxProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
38
|
-
beforeCreate?: (() => void) | (() => void)[];
|
|
39
|
-
created?: (() => void) | (() => void)[];
|
|
40
|
-
beforeMount?: (() => void) | (() => void)[];
|
|
41
|
-
mounted?: (() => void) | (() => void)[];
|
|
42
|
-
beforeUpdate?: (() => void) | (() => void)[];
|
|
43
|
-
updated?: (() => void) | (() => void)[];
|
|
44
|
-
activated?: (() => void) | (() => void)[];
|
|
45
|
-
deactivated?: (() => void) | (() => void)[];
|
|
46
|
-
beforeDestroy?: (() => void) | (() => void)[];
|
|
47
|
-
beforeUnmount?: (() => void) | (() => void)[];
|
|
48
|
-
destroyed?: (() => void) | (() => void)[];
|
|
49
|
-
unmounted?: (() => void) | (() => void)[];
|
|
50
|
-
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
51
|
-
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
52
|
-
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
53
|
-
};
|
|
54
|
-
$forceUpdate: () => void;
|
|
55
|
-
$nextTick: typeof import("vue").nextTick;
|
|
56
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
57
|
-
} & Readonly<{}> & Omit<Readonly<import("../../index.js").BoxProps> & Readonly<{}>, never> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
58
|
-
$slots: {
|
|
59
|
-
default?: (props: {}) => any;
|
|
60
|
-
};
|
|
61
|
-
}) | null>>;
|
|
62
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
63
|
-
"update:modelValue": (value: string | number | undefined) => any;
|
|
64
|
-
}, string, import("vue").PublicProps, Readonly<BaseInputProps> & Readonly<{
|
|
65
|
-
"onUpdate:modelValue"?: ((value: string | number | undefined) => any) | undefined;
|
|
66
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<BaseInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BaseInputProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
67
15
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
68
16
|
declare const _default: typeof __VLS_export;
|
|
69
17
|
export default _default;
|
|
@@ -9,15 +9,15 @@ export interface InlineInputProps extends BoxProps {
|
|
|
9
9
|
size?: NuanceSize | string;
|
|
10
10
|
labelPosition?: 'left' | 'right';
|
|
11
11
|
}
|
|
12
|
-
declare var
|
|
12
|
+
declare var __VLS_8: {}, __VLS_16: {}, __VLS_24: {}, __VLS_32: {};
|
|
13
13
|
type __VLS_Slots = {} & {
|
|
14
|
-
default?: (props: typeof
|
|
14
|
+
default?: (props: typeof __VLS_8) => any;
|
|
15
15
|
} & {
|
|
16
|
-
label?: (props: typeof
|
|
16
|
+
label?: (props: typeof __VLS_16) => any;
|
|
17
17
|
} & {
|
|
18
|
-
error?: (props: typeof
|
|
18
|
+
error?: (props: typeof __VLS_24) => any;
|
|
19
19
|
} & {
|
|
20
|
-
description?: (props: typeof
|
|
20
|
+
description?: (props: typeof __VLS_32) => any;
|
|
21
21
|
};
|
|
22
22
|
declare const __VLS_base: import("vue").DefineComponent<InlineInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<InlineInputProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
23
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -10,7 +10,7 @@ const {
|
|
|
10
10
|
description,
|
|
11
11
|
error,
|
|
12
12
|
label,
|
|
13
|
-
mod
|
|
13
|
+
mod
|
|
14
14
|
} = defineProps({
|
|
15
15
|
id: { type: String, required: true },
|
|
16
16
|
label: { type: String, required: false },
|
|
@@ -26,14 +26,10 @@ const style = computed(() => ({
|
|
|
26
26
|
"--label-fz": getFontSize(size),
|
|
27
27
|
"--label-lh": getSize(size)
|
|
28
28
|
}));
|
|
29
|
-
const mod = computed(() => [
|
|
30
|
-
{ "label-position": labelPosition },
|
|
31
|
-
_mod
|
|
32
|
-
]);
|
|
33
29
|
</script>
|
|
34
30
|
|
|
35
31
|
<template>
|
|
36
|
-
<Box :style :class='$style.root' :mod>
|
|
32
|
+
<Box :style :class='$style.root' :mod='[{ "label-position": labelPosition }, mod]'>
|
|
37
33
|
<div :class='$style.body'>
|
|
38
34
|
<slot />
|
|
39
35
|
|
|
@@ -9,15 +9,15 @@ export interface InlineInputProps extends BoxProps {
|
|
|
9
9
|
size?: NuanceSize | string;
|
|
10
10
|
labelPosition?: 'left' | 'right';
|
|
11
11
|
}
|
|
12
|
-
declare var
|
|
12
|
+
declare var __VLS_8: {}, __VLS_16: {}, __VLS_24: {}, __VLS_32: {};
|
|
13
13
|
type __VLS_Slots = {} & {
|
|
14
|
-
default?: (props: typeof
|
|
14
|
+
default?: (props: typeof __VLS_8) => any;
|
|
15
15
|
} & {
|
|
16
|
-
label?: (props: typeof
|
|
16
|
+
label?: (props: typeof __VLS_16) => any;
|
|
17
17
|
} & {
|
|
18
|
-
error?: (props: typeof
|
|
18
|
+
error?: (props: typeof __VLS_24) => any;
|
|
19
19
|
} & {
|
|
20
|
-
description?: (props: typeof
|
|
20
|
+
description?: (props: typeof __VLS_32) => any;
|
|
21
21
|
};
|
|
22
22
|
declare const __VLS_base: import("vue").DefineComponent<InlineInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<InlineInputProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
23
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { getFontSize } from "@nui/utils";
|
|
3
3
|
import { computed } from "vue";
|
|
4
|
-
const {
|
|
5
|
-
required = false,
|
|
6
|
-
size = "sm"
|
|
7
|
-
} = defineProps({
|
|
4
|
+
const { required = false, size = "sm" } = defineProps({
|
|
8
5
|
required: { type: Boolean, required: false },
|
|
9
6
|
size: { type: String, required: false }
|
|
10
7
|
});
|
|
@@ -22,5 +19,5 @@ const style = computed(() => ({
|
|
|
22
19
|
</template>
|
|
23
20
|
|
|
24
21
|
<style module>
|
|
25
|
-
.root{--input-label-size:var(--font-size-sm);--input-asterisk-color:var(--color-error);cursor:default;display:
|
|
22
|
+
.root{--input-label-size:var(--font-size-sm);--input-asterisk-color:var(--color-error);cursor:default;display:block;font-size:var(--input-label-size);font-weight:500;overflow-wrap:anywhere;word-break:normal;-webkit-tap-highlight-color:transparent}.required{color:var(--input-asterisk-color)}
|
|
26
23
|
</style>
|
|
@@ -5,15 +5,15 @@ export interface InputWrapperProps extends WrapperContext {
|
|
|
5
5
|
label?: string;
|
|
6
6
|
required?: boolean;
|
|
7
7
|
}
|
|
8
|
-
declare var
|
|
8
|
+
declare var __VLS_7: {}, __VLS_9: {}, __VLS_11: {}, __VLS_13: {};
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
|
-
label?: (props: typeof
|
|
10
|
+
label?: (props: typeof __VLS_7) => any;
|
|
11
11
|
} & {
|
|
12
|
-
default?: (props: typeof
|
|
12
|
+
default?: (props: typeof __VLS_9) => any;
|
|
13
13
|
} & {
|
|
14
|
-
error?: (props: typeof
|
|
14
|
+
error?: (props: typeof __VLS_11) => any;
|
|
15
15
|
} & {
|
|
16
|
-
description?: (props: typeof
|
|
16
|
+
description?: (props: typeof __VLS_13) => any;
|
|
17
17
|
};
|
|
18
18
|
declare const __VLS_base: import("vue").DefineComponent<InputWrapperProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<InputWrapperProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
19
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -12,7 +12,10 @@ const {
|
|
|
12
12
|
variant = "default",
|
|
13
13
|
size = "sm",
|
|
14
14
|
radius = "sm",
|
|
15
|
-
|
|
15
|
+
leftSectionPE,
|
|
16
|
+
rightSectionPE,
|
|
17
|
+
multiline,
|
|
18
|
+
resize
|
|
16
19
|
} = defineProps({
|
|
17
20
|
error: { type: String, required: false },
|
|
18
21
|
description: { type: String, required: false },
|
|
@@ -23,7 +26,7 @@ const {
|
|
|
23
26
|
size: { type: String, required: false },
|
|
24
27
|
variant: { type: String, required: false },
|
|
25
28
|
multiline: { type: Boolean, required: false },
|
|
26
|
-
resize: { type:
|
|
29
|
+
resize: { type: void 0, required: false },
|
|
27
30
|
leftSectionPE: { type: null, required: false },
|
|
28
31
|
rightSectionPE: { type: null, required: false }
|
|
29
32
|
});
|
|
@@ -37,7 +40,10 @@ useProvideInputWrapper({
|
|
|
37
40
|
variant,
|
|
38
41
|
size,
|
|
39
42
|
radius,
|
|
40
|
-
|
|
43
|
+
leftSectionPE,
|
|
44
|
+
rightSectionPE,
|
|
45
|
+
multiline,
|
|
46
|
+
resize
|
|
41
47
|
});
|
|
42
48
|
const style = computed(() => ({
|
|
43
49
|
"--input-error-size": `calc(${getFontSize(size)} - .125rem)`,
|
|
@@ -46,7 +52,7 @@ const style = computed(() => ({
|
|
|
46
52
|
</script>
|
|
47
53
|
|
|
48
54
|
<template>
|
|
49
|
-
<div :style :class='$style.
|
|
55
|
+
<div :style :class='$style.wrapper'>
|
|
50
56
|
<InputLabel
|
|
51
57
|
:data-v-hidden='!label && !$slots.label || null'
|
|
52
58
|
:for='uid'
|
|
@@ -76,7 +82,7 @@ const style = computed(() => ({
|
|
|
76
82
|
</template>
|
|
77
83
|
|
|
78
84
|
<style lang="postcss" module>
|
|
79
|
-
.
|
|
85
|
+
.wrapper {
|
|
80
86
|
--input-error-size: calc(var(--font-size-sm) - rem(2px));
|
|
81
87
|
--input-description-size: calc(var(--font-size-sm) - rem(2px));
|
|
82
88
|
|
|
@@ -5,15 +5,15 @@ export interface InputWrapperProps extends WrapperContext {
|
|
|
5
5
|
label?: string;
|
|
6
6
|
required?: boolean;
|
|
7
7
|
}
|
|
8
|
-
declare var
|
|
8
|
+
declare var __VLS_7: {}, __VLS_9: {}, __VLS_11: {}, __VLS_13: {};
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
|
-
label?: (props: typeof
|
|
10
|
+
label?: (props: typeof __VLS_7) => any;
|
|
11
11
|
} & {
|
|
12
|
-
default?: (props: typeof
|
|
12
|
+
default?: (props: typeof __VLS_9) => any;
|
|
13
13
|
} & {
|
|
14
|
-
error?: (props: typeof
|
|
14
|
+
error?: (props: typeof __VLS_11) => any;
|
|
15
15
|
} & {
|
|
16
|
-
description?: (props: typeof
|
|
16
|
+
description?: (props: typeof __VLS_13) => any;
|
|
17
17
|
};
|
|
18
18
|
declare const __VLS_base: import("vue").DefineComponent<InputWrapperProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<InputWrapperProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
19
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface SpinInputProps {
|
|
2
|
+
min: number;
|
|
3
|
+
max: number;
|
|
4
|
+
step: number;
|
|
5
|
+
focusable?: boolean;
|
|
6
|
+
allowTemporaryZero?: boolean;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
readonly?: boolean;
|
|
9
|
+
}
|
|
10
|
+
type __VLS_Props = SpinInputProps;
|
|
11
|
+
type __VLS_ModelProps = {
|
|
12
|
+
modelValue?: number | null;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
15
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
+
next: () => any;
|
|
17
|
+
"update:modelValue": (value: number | null) => any;
|
|
18
|
+
prev: () => any;
|
|
19
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
20
|
+
onNext?: (() => any) | undefined;
|
|
21
|
+
"onUpdate:modelValue"?: ((value: number | null) => any) | undefined;
|
|
22
|
+
onPrev?: (() => any) | undefined;
|
|
23
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|