nuance-ui 0.1.5 → 0.1.7
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 +1 -1
- package/dist/runtime/components/action-icon/action-icon-group.vue +3 -1
- package/dist/runtime/components/action-icon/action-icon-group.vue.d.ts +1 -1
- package/dist/runtime/components/action-icon/action-icon-section.d.vue.ts +1 -1
- package/dist/runtime/components/action-icon/action-icon-section.vue +3 -1
- package/dist/runtime/components/action-icon/action-icon-section.vue.d.ts +1 -1
- package/dist/runtime/components/action-icon/action-icon.vue +1 -1
- package/dist/runtime/components/app-shell/app-shell-section.d.vue.ts +1 -1
- package/dist/runtime/components/app-shell/app-shell-section.vue +3 -1
- package/dist/runtime/components/app-shell/app-shell-section.vue.d.ts +1 -1
- package/dist/runtime/components/app-shell/app-shell.d.vue.ts +1 -1
- package/dist/runtime/components/app-shell/app-shell.vue +3 -1
- package/dist/runtime/components/app-shell/app-shell.vue.d.ts +1 -1
- package/dist/runtime/components/background-image.d.vue.ts +1 -1
- package/dist/runtime/components/background-image.vue +3 -1
- package/dist/runtime/components/background-image.vue.d.ts +1 -1
- package/dist/runtime/components/button/button-group.d.vue.ts +1 -1
- package/dist/runtime/components/button/button-group.vue +3 -1
- package/dist/runtime/components/button/button-group.vue.d.ts +1 -1
- package/dist/runtime/components/button/button.d.vue.ts +1 -1
- package/dist/runtime/components/button/button.vue +3 -1
- package/dist/runtime/components/button/button.vue.d.ts +1 -1
- package/dist/runtime/components/button/unstyled-button.d.vue.ts +3 -2
- package/dist/runtime/components/button/unstyled-button.vue +3 -2
- package/dist/runtime/components/button/unstyled-button.vue.d.ts +3 -2
- package/dist/runtime/components/card/card-section.d.vue.ts +1 -1
- package/dist/runtime/components/card/card-section.vue +3 -1
- package/dist/runtime/components/card/card-section.vue.d.ts +1 -1
- package/dist/runtime/components/card/card.d.vue.ts +1 -1
- package/dist/runtime/components/card/card.vue +6 -1
- package/dist/runtime/components/card/card.vue.d.ts +1 -1
- package/dist/runtime/components/checkbox/checkbox-group.d.vue.ts +1 -1
- package/dist/runtime/components/checkbox/checkbox-group.vue +9 -1
- package/dist/runtime/components/checkbox/checkbox-group.vue.d.ts +1 -1
- package/dist/runtime/components/checkbox/checkbox.d.vue.ts +1 -1
- package/dist/runtime/components/checkbox/checkbox.vue +11 -2
- package/dist/runtime/components/checkbox/checkbox.vue.d.ts +1 -1
- package/dist/runtime/components/checkbox/lib/card.context.d.ts +1 -1
- package/dist/runtime/components/checkbox/lib/card.context.js +3 -4
- package/dist/runtime/components/checkbox/lib/group.context.d.ts +1 -1
- package/dist/runtime/components/checkbox/lib/group.context.js +3 -4
- package/dist/runtime/components/chip/chip.vue +2 -2
- package/dist/runtime/components/combobox/combobox-empty.d.vue.ts +1 -1
- package/dist/runtime/components/combobox/combobox-empty.vue +5 -2
- package/dist/runtime/components/combobox/combobox-empty.vue.d.ts +1 -1
- package/dist/runtime/components/combobox/combobox-group.d.vue.ts +1 -1
- package/dist/runtime/components/combobox/combobox-group.vue +2 -0
- package/dist/runtime/components/combobox/combobox-group.vue.d.ts +1 -1
- package/dist/runtime/components/combobox/combobox-option-list.d.vue.ts +1 -1
- package/dist/runtime/components/combobox/combobox-option-list.vue +3 -1
- package/dist/runtime/components/combobox/combobox-option-list.vue.d.ts +1 -1
- package/dist/runtime/components/combobox/combobox-option.d.vue.ts +1 -1
- package/dist/runtime/components/combobox/combobox-option.vue +2 -0
- package/dist/runtime/components/combobox/combobox-option.vue.d.ts +1 -1
- package/dist/runtime/components/combobox/combobox-root.d.vue.ts +1 -1
- package/dist/runtime/components/combobox/combobox-root.vue +14 -1
- package/dist/runtime/components/combobox/combobox-root.vue.d.ts +1 -1
- package/dist/runtime/components/container.d.vue.ts +1 -1
- package/dist/runtime/components/container.vue +3 -1
- package/dist/runtime/components/container.vue.d.ts +1 -1
- package/dist/runtime/components/dialog/dialog-header.d.vue.ts +1 -1
- package/dist/runtime/components/dialog/dialog-header.vue +5 -2
- package/dist/runtime/components/dialog/dialog-header.vue.d.ts +1 -1
- package/dist/runtime/components/dialog/dialog-root.d.vue.ts +1 -1
- package/dist/runtime/components/dialog/dialog-root.vue +3 -1
- package/dist/runtime/components/dialog/dialog-root.vue.d.ts +1 -1
- package/dist/runtime/components/dialog/dialog-title.d.vue.ts +1 -1
- package/dist/runtime/components/dialog/dialog-title.vue +16 -1
- package/dist/runtime/components/dialog/dialog-title.vue.d.ts +1 -1
- package/dist/runtime/components/drawer/drawer-header.d.vue.ts +1 -1
- package/dist/runtime/components/drawer/drawer-header.vue +4 -1
- package/dist/runtime/components/drawer/drawer-header.vue.d.ts +1 -1
- package/dist/runtime/components/drawer/drawer-root.d.vue.ts +2 -1
- package/dist/runtime/components/drawer/drawer-root.vue +11 -1
- package/dist/runtime/components/drawer/drawer-root.vue.d.ts +2 -1
- package/dist/runtime/components/drawer/drawer-title.d.vue.ts +1 -1
- package/dist/runtime/components/drawer/drawer-title.vue +16 -1
- package/dist/runtime/components/drawer/drawer-title.vue.d.ts +1 -1
- package/dist/runtime/components/input/email-input.d.vue.ts +22 -0
- package/dist/runtime/components/input/email-input.vue +41 -0
- package/dist/runtime/components/input/email-input.vue.d.ts +22 -0
- package/dist/runtime/components/input/input.d.vue.ts +5 -5
- package/dist/runtime/components/input/input.vue +16 -7
- package/dist/runtime/components/input/input.vue.d.ts +5 -5
- package/dist/runtime/components/input/lib/input-wrapper.context.d.ts +2 -2
- package/dist/runtime/components/input/lib/input-wrapper.context.js +4 -5
- package/dist/runtime/components/input/number-input.d.vue.ts +8 -2
- package/dist/runtime/components/input/number-input.vue +17 -1
- package/dist/runtime/components/input/number-input.vue.d.ts +8 -2
- package/dist/runtime/components/input/password-input.d.vue.ts +19 -1
- package/dist/runtime/components/input/password-input.vue +25 -5
- package/dist/runtime/components/input/password-input.vue.d.ts +19 -1
- package/dist/runtime/components/input/text-input.d.vue.ts +6 -6
- package/dist/runtime/components/input/text-input.vue +14 -4
- package/dist/runtime/components/input/text-input.vue.d.ts +6 -6
- package/dist/runtime/components/input/ui/input-base.d.vue.ts +4 -3
- package/dist/runtime/components/input/ui/input-base.vue +10 -9
- package/dist/runtime/components/input/ui/input-base.vue.d.ts +4 -3
- package/dist/runtime/components/input/ui/input-inline.d.vue.ts +1 -1
- package/dist/runtime/components/input/ui/input-inline.vue +3 -1
- package/dist/runtime/components/input/ui/input-inline.vue.d.ts +1 -1
- package/dist/runtime/components/input/ui/input-wrapper.d.vue.ts +2 -2
- package/dist/runtime/components/input/ui/input-wrapper.vue +17 -7
- package/dist/runtime/components/input/ui/input-wrapper.vue.d.ts +2 -2
- package/dist/runtime/components/link/link-button.d.vue.ts +1 -1
- package/dist/runtime/components/link/link-button.vue +18 -1
- package/dist/runtime/components/link/link-button.vue.d.ts +1 -1
- package/dist/runtime/components/link/link.d.vue.ts +1 -1
- package/dist/runtime/components/link/link.vue +17 -1
- package/dist/runtime/components/link/link.vue.d.ts +1 -1
- package/dist/runtime/components/modal/modal-header.d.vue.ts +1 -1
- package/dist/runtime/components/modal/modal-header.vue +4 -1
- package/dist/runtime/components/modal/modal-header.vue.d.ts +1 -1
- package/dist/runtime/components/modal/modal-root.d.vue.ts +2 -1
- package/dist/runtime/components/modal/modal-root.vue +11 -1
- package/dist/runtime/components/modal/modal-root.vue.d.ts +2 -1
- package/dist/runtime/components/modal/modal-title.d.vue.ts +1 -1
- package/dist/runtime/components/modal/modal-title.vue +16 -1
- package/dist/runtime/components/modal/modal-title.vue.d.ts +1 -1
- package/dist/runtime/components/nav-link/nav-link.d.vue.ts +1 -1
- package/dist/runtime/components/nav-link/nav-link.vue +2 -0
- package/dist/runtime/components/nav-link/nav-link.vue.d.ts +1 -1
- package/dist/runtime/components/paper.d.vue.ts +1 -1
- package/dist/runtime/components/paper.vue +3 -1
- package/dist/runtime/components/paper.vue.d.ts +1 -1
- package/dist/runtime/components/select/select.d.vue.ts +5 -2
- package/dist/runtime/components/select/select.vue +13 -1
- package/dist/runtime/components/select/select.vue.d.ts +5 -2
- package/dist/runtime/components/tabs/tabs-list.d.vue.ts +1 -1
- package/dist/runtime/components/tabs/tabs-list.vue +3 -1
- package/dist/runtime/components/tabs/tabs-list.vue.d.ts +1 -1
- package/dist/runtime/components/tabs/tabs-panel.d.vue.ts +1 -1
- package/dist/runtime/components/tabs/tabs-panel.vue +3 -1
- package/dist/runtime/components/tabs/tabs-panel.vue.d.ts +1 -1
- package/dist/runtime/components/tabs/tabs-root.d.vue.ts +1 -1
- package/dist/runtime/components/tabs/tabs-root.vue +3 -1
- package/dist/runtime/components/tabs/tabs-root.vue.d.ts +1 -1
- package/dist/runtime/components/text.d.vue.ts +1 -1
- package/dist/runtime/components/text.vue +3 -1
- package/dist/runtime/components/text.vue.d.ts +1 -1
- package/dist/runtime/components/textarea.d.vue.ts +1 -1
- package/dist/runtime/components/textarea.vue +15 -2
- package/dist/runtime/components/textarea.vue.d.ts +1 -1
- package/dist/runtime/components/title.d.vue.ts +1 -1
- package/dist/runtime/components/title.vue +13 -1
- package/dist/runtime/components/title.vue.d.ts +1 -1
- package/dist/runtime/components/visually-hidden/visually-hidden-input.d.vue.ts +1 -1
- package/dist/runtime/components/visually-hidden/visually-hidden-input.vue +4 -1
- package/dist/runtime/components/visually-hidden/visually-hidden-input.vue.d.ts +1 -1
- package/dist/runtime/components/visually-hidden/visually-hidden.d.vue.ts +1 -1
- package/dist/runtime/components/visually-hidden/visually-hidden.vue +3 -1
- package/dist/runtime/components/visually-hidden/visually-hidden.vue.d.ts +1 -1
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@ import type { NuanceSize } from '@nui/types';
|
|
|
2
2
|
import type { CSSProperties } from 'vue';
|
|
3
3
|
import type { PopoverProps } from '../popover/index.js';
|
|
4
4
|
import type { ComboboxStore } from './lib/use-combobox/index.js';
|
|
5
|
-
export interface ComboboxProps extends
|
|
5
|
+
export interface ComboboxProps extends PopoverProps {
|
|
6
6
|
store?: ComboboxStore;
|
|
7
7
|
/** Determines whether arrow key presses should loop though items (first to last and last to first), `true` by default */
|
|
8
8
|
loop?: boolean;
|
|
@@ -16,7 +16,20 @@ const {
|
|
|
16
16
|
scrollBehavior: { type: null, required: false },
|
|
17
17
|
size: { type: String, required: false },
|
|
18
18
|
dropdownPadding: { type: null, required: false },
|
|
19
|
-
readOnly: { type: Boolean, required: false }
|
|
19
|
+
readOnly: { type: Boolean, required: false },
|
|
20
|
+
placement: { type: null, required: false },
|
|
21
|
+
offset: { type: [Number, Object, Function], required: false },
|
|
22
|
+
keepMounted: { type: Boolean, required: false },
|
|
23
|
+
width: { type: null, required: false },
|
|
24
|
+
withArrow: { type: Boolean, required: false },
|
|
25
|
+
arrowSize: { type: Number, required: false },
|
|
26
|
+
arrowOffset: { type: Number, required: false },
|
|
27
|
+
arrowRadius: { type: Number, required: false },
|
|
28
|
+
arrowPosition: { type: String, required: false },
|
|
29
|
+
radius: { type: [String, Number], required: false },
|
|
30
|
+
shadow: { type: String, required: false },
|
|
31
|
+
disabled: { type: Boolean, required: false },
|
|
32
|
+
floatingStrategy: { type: String, required: false }
|
|
20
33
|
});
|
|
21
34
|
const emit = defineEmits(["clear", "select", "open", "close", "submit"]);
|
|
22
35
|
const opened = defineModel("open", { type: Boolean, ...{ default: false } });
|
|
@@ -2,7 +2,7 @@ import type { NuanceSize } from '@nui/types';
|
|
|
2
2
|
import type { CSSProperties } from 'vue';
|
|
3
3
|
import type { PopoverProps } from '../popover/index.js';
|
|
4
4
|
import type { ComboboxStore } from './lib/use-combobox/index.js';
|
|
5
|
-
export interface ComboboxProps extends
|
|
5
|
+
export interface ComboboxProps extends PopoverProps {
|
|
6
6
|
store?: ComboboxStore;
|
|
7
7
|
/** Determines whether arrow key presses should loop though items (first to last and last to first), `true` by default */
|
|
8
8
|
loop?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NuanceSize } from '@nui/types';
|
|
2
2
|
import type { BoxProps } from './box.vue.js';
|
|
3
|
-
export interface ContainerProps extends
|
|
3
|
+
export interface ContainerProps extends BoxProps {
|
|
4
4
|
size?: NuanceSize | string | number;
|
|
5
5
|
fluid?: boolean;
|
|
6
6
|
}
|
|
@@ -9,7 +9,9 @@ const {
|
|
|
9
9
|
size
|
|
10
10
|
} = defineProps({
|
|
11
11
|
size: { type: [String, Number], required: false },
|
|
12
|
-
fluid: { type: Boolean, required: false }
|
|
12
|
+
fluid: { type: Boolean, required: false },
|
|
13
|
+
is: { type: null, required: false },
|
|
14
|
+
mod: { type: [Object, Array, null], required: false }
|
|
13
15
|
});
|
|
14
16
|
const style = computed(() => ({
|
|
15
17
|
"--container-size": fluid ? void 0 : getSize(size, "container-size")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NuanceSize } from '@nui/types';
|
|
2
2
|
import type { BoxProps } from './box.vue.js';
|
|
3
|
-
export interface ContainerProps extends
|
|
3
|
+
export interface ContainerProps extends BoxProps {
|
|
4
4
|
size?: NuanceSize | string | number;
|
|
5
5
|
fluid?: boolean;
|
|
6
6
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import Box from "../box.vue";
|
|
3
3
|
import css from "./dialog.module.css";
|
|
4
|
-
const
|
|
4
|
+
const { is = "header", mod } = defineProps({
|
|
5
|
+
is: { type: null, required: false },
|
|
6
|
+
mod: { type: [Object, Array, null], required: false }
|
|
7
|
+
});
|
|
5
8
|
</script>
|
|
6
9
|
|
|
7
10
|
<template>
|
|
8
|
-
<Box is
|
|
11
|
+
<Box :is :mod :class='css.header'>
|
|
9
12
|
<slot />
|
|
10
13
|
</Box>
|
|
11
14
|
</template>
|
|
@@ -3,7 +3,7 @@ import type { CSSProperties } from 'vue';
|
|
|
3
3
|
import type { BoxProps } from '../box.vue.js';
|
|
4
4
|
import type { TransitionName } from '../transition/index.js';
|
|
5
5
|
import type { DialogModel } from './types/index.js';
|
|
6
|
-
export interface DialogRootProps extends
|
|
6
|
+
export interface DialogRootProps extends BoxProps {
|
|
7
7
|
/** If set, the dialog is closed when user clicks on the overlay @default `true` */
|
|
8
8
|
closeOnClickOutside?: boolean;
|
|
9
9
|
/** If set, the component is rendered inside `Portal` @default `true` */
|
|
@@ -30,7 +30,9 @@ const {
|
|
|
30
30
|
shadow: { type: String, required: false },
|
|
31
31
|
padding: { type: [String, Number], required: false },
|
|
32
32
|
rootClass: { type: String, required: false },
|
|
33
|
-
transition: { type: String, required: false }
|
|
33
|
+
transition: { type: String, required: false },
|
|
34
|
+
is: { type: null, required: false },
|
|
35
|
+
mod: { type: [Object, Array, null], required: false }
|
|
34
36
|
});
|
|
35
37
|
const emit = defineEmits(["open", "close"]);
|
|
36
38
|
const opened = defineModel("open", { type: Boolean, ...{ default: false } });
|
|
@@ -3,7 +3,7 @@ import type { CSSProperties } from 'vue';
|
|
|
3
3
|
import type { BoxProps } from '../box.vue.js';
|
|
4
4
|
import type { TransitionName } from '../transition/index.js';
|
|
5
5
|
import type { DialogModel } from './types/index.js';
|
|
6
|
-
export interface DialogRootProps extends
|
|
6
|
+
export interface DialogRootProps extends BoxProps {
|
|
7
7
|
/** If set, the dialog is closed when user clicks on the overlay @default `true` */
|
|
8
8
|
closeOnClickOutside?: boolean;
|
|
9
9
|
/** If set, the component is rendered inside `Portal` @default `true` */
|
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import Title from "../title.vue";
|
|
3
3
|
import css from "./dialog.module.css";
|
|
4
|
-
const { size = "md", lh = "1", ...props } = defineProps({
|
|
4
|
+
const { size = "md", lh = "1", ...props } = defineProps({
|
|
5
|
+
order: { type: String, required: false },
|
|
6
|
+
textWrap: { type: String, required: false },
|
|
7
|
+
size: { type: null, required: false },
|
|
8
|
+
lineClamp: { type: Number, required: false },
|
|
9
|
+
truncate: { type: [String, Boolean], required: false },
|
|
10
|
+
inline: { type: Boolean, required: false },
|
|
11
|
+
inherit: { type: Boolean, required: false },
|
|
12
|
+
gradient: { type: Object, required: false },
|
|
13
|
+
variant: { type: String, required: false },
|
|
14
|
+
fz: { type: null, required: false },
|
|
15
|
+
lh: { type: String, required: false },
|
|
16
|
+
fw: { type: null, required: false },
|
|
17
|
+
c: { type: null, required: false },
|
|
18
|
+
mod: { type: [Object, Array, null], required: false }
|
|
19
|
+
});
|
|
5
20
|
</script>
|
|
6
21
|
|
|
7
22
|
<template>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import DialogHeader from "../dialog/dialog-header.vue";
|
|
3
|
-
const props = defineProps({
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
is: { type: null, required: false },
|
|
5
|
+
mod: { type: [Object, Array, null], required: false }
|
|
6
|
+
});
|
|
4
7
|
</script>
|
|
5
8
|
|
|
6
9
|
<template>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DialogModel, DialogRootProps } from '../dialog/index.js';
|
|
2
|
-
|
|
2
|
+
type OmittedDialogRootProps = Omit<DialogRootProps, 'modal' | 'closeOnClickOutside' | 'rootClass' | 'transition'>;
|
|
3
|
+
export interface DrawerRootProps extends OmittedDialogRootProps {
|
|
3
4
|
/** Side of the screen on which drawer will be opened @default `'left'` */
|
|
4
5
|
position?: 'bottom' | 'left' | 'right' | 'top';
|
|
5
6
|
}
|
|
@@ -9,7 +9,17 @@ const {
|
|
|
9
9
|
withinPortal = true,
|
|
10
10
|
...rest
|
|
11
11
|
} = defineProps({
|
|
12
|
-
position: { type: String, required: false }
|
|
12
|
+
position: { type: String, required: false },
|
|
13
|
+
withinPortal: { type: Boolean, required: false },
|
|
14
|
+
withoutOverlay: { type: Boolean, required: false },
|
|
15
|
+
yOffset: { type: null, required: false },
|
|
16
|
+
xOffset: { type: null, required: false },
|
|
17
|
+
radius: { type: [String, Number], required: false },
|
|
18
|
+
size: { type: String, required: false },
|
|
19
|
+
shadow: { type: String, required: false },
|
|
20
|
+
padding: { type: [String, Number], required: false },
|
|
21
|
+
is: { type: null, required: false },
|
|
22
|
+
mod: { type: [Object, Array, null], required: false }
|
|
13
23
|
});
|
|
14
24
|
defineEmits(["open", "close"]);
|
|
15
25
|
const opened = defineModel("open", { type: Boolean, ...{ default: false } });
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DialogModel, DialogRootProps } from '../dialog/index.js';
|
|
2
|
-
|
|
2
|
+
type OmittedDialogRootProps = Omit<DialogRootProps, 'modal' | 'closeOnClickOutside' | 'rootClass' | 'transition'>;
|
|
3
|
+
export interface DrawerRootProps extends OmittedDialogRootProps {
|
|
3
4
|
/** Side of the screen on which drawer will be opened @default `'left'` */
|
|
4
5
|
position?: 'bottom' | 'left' | 'right' | 'top';
|
|
5
6
|
}
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import DialogTitle from "../dialog/dialog-title.vue";
|
|
3
|
-
const props = defineProps({
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
order: { type: String, required: false },
|
|
5
|
+
textWrap: { type: String, required: false },
|
|
6
|
+
size: { type: null, required: false },
|
|
7
|
+
lineClamp: { type: Number, required: false },
|
|
8
|
+
truncate: { type: [String, Boolean], required: false },
|
|
9
|
+
inline: { type: Boolean, required: false },
|
|
10
|
+
inherit: { type: Boolean, required: false },
|
|
11
|
+
gradient: { type: Object, required: false },
|
|
12
|
+
variant: { type: String, required: false },
|
|
13
|
+
fz: { type: null, required: false },
|
|
14
|
+
lh: { type: String, required: false },
|
|
15
|
+
fw: { type: null, required: false },
|
|
16
|
+
c: { type: null, required: false },
|
|
17
|
+
mod: { type: [Object, Array, null], required: false }
|
|
18
|
+
});
|
|
4
19
|
</script>
|
|
5
20
|
|
|
6
21
|
<template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { TextInputProps } from './index.js';
|
|
2
|
+
declare var __VLS_7: {}, __VLS_19: {}, __VLS_22: {}, __VLS_25: {}, __VLS_28: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
leftSection?: (props: typeof __VLS_7) => any;
|
|
5
|
+
} & {
|
|
6
|
+
rightSection?: (props: typeof __VLS_19) => any;
|
|
7
|
+
} & {
|
|
8
|
+
label?: (props: typeof __VLS_22) => any;
|
|
9
|
+
} & {
|
|
10
|
+
error?: (props: typeof __VLS_25) => any;
|
|
11
|
+
} & {
|
|
12
|
+
description?: (props: typeof __VLS_28) => any;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<TextInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextInputProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import ActionIcon from "../action-icon/action-icon.vue";
|
|
3
|
+
import TextInput from "./text-input.vue";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
error: { type: String, required: false },
|
|
6
|
+
description: { type: String, required: false },
|
|
7
|
+
label: { type: String, required: false },
|
|
8
|
+
required: { type: Boolean, required: false },
|
|
9
|
+
radius: { type: String, required: false },
|
|
10
|
+
size: { type: String, required: false },
|
|
11
|
+
variant: { type: String, required: false },
|
|
12
|
+
leftSectionPE: { type: null, required: false },
|
|
13
|
+
rightSectionPE: { type: null, required: false }
|
|
14
|
+
});
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<TextInput type='email' v-bind='props'>
|
|
19
|
+
<template #leftSection>
|
|
20
|
+
<slot name='leftSection'>
|
|
21
|
+
<ActionIcon variant='subtle'>
|
|
22
|
+
<Icon name='gravity-ui:at' />
|
|
23
|
+
</ActionIcon>
|
|
24
|
+
</slot>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<template #rightSection>
|
|
28
|
+
<slot name='rightSection' />
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<template v-if='$slots.label' #label>
|
|
32
|
+
<slot name='label' />
|
|
33
|
+
</template>
|
|
34
|
+
<template v-if='$slots.error' #error>
|
|
35
|
+
<slot name='error' />
|
|
36
|
+
</template>
|
|
37
|
+
<template v-if='$slots.description' #description>
|
|
38
|
+
<slot name='description' />
|
|
39
|
+
</template>
|
|
40
|
+
</TextInput>
|
|
41
|
+
</template>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { TextInputProps } from './index.js';
|
|
2
|
+
declare var __VLS_7: {}, __VLS_19: {}, __VLS_22: {}, __VLS_25: {}, __VLS_28: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
leftSection?: (props: typeof __VLS_7) => any;
|
|
5
|
+
} & {
|
|
6
|
+
rightSection?: (props: typeof __VLS_19) => any;
|
|
7
|
+
} & {
|
|
8
|
+
label?: (props: typeof __VLS_22) => any;
|
|
9
|
+
} & {
|
|
10
|
+
error?: (props: typeof __VLS_25) => any;
|
|
11
|
+
} & {
|
|
12
|
+
description?: (props: typeof __VLS_28) => any;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<TextInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextInputProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { InputBaseProps } from './types/index.js';
|
|
2
2
|
import type { InputWrapperProps } from './ui/input-wrapper.vue.js';
|
|
3
|
-
export interface InputProps extends
|
|
3
|
+
export interface InputProps extends InputWrapperProps, InputBaseProps {
|
|
4
4
|
/** If set, the input can have multiple lines, for example when `component="textarea"` @default `false` */
|
|
5
5
|
multiline?: boolean;
|
|
6
6
|
/** If set, `aria-` and other accessibility attributes are added to the input @default `true` */
|
|
@@ -11,13 +11,13 @@ type __VLS_ModelProps = {
|
|
|
11
11
|
modelValue?: any;
|
|
12
12
|
};
|
|
13
13
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
14
|
-
declare var
|
|
14
|
+
declare var __VLS_11: {}, __VLS_14: {}, __VLS_17: {}, __VLS_20: {}, __VLS_23: {};
|
|
15
15
|
type __VLS_Slots = {} & {
|
|
16
|
-
|
|
16
|
+
leftSection?: (props: typeof __VLS_11) => any;
|
|
17
17
|
} & {
|
|
18
|
-
|
|
18
|
+
rightSection?: (props: typeof __VLS_14) => any;
|
|
19
19
|
} & {
|
|
20
|
-
|
|
20
|
+
label?: (props: typeof __VLS_17) => any;
|
|
21
21
|
} & {
|
|
22
22
|
error?: (props: typeof __VLS_20) => any;
|
|
23
23
|
} & {
|
|
@@ -5,6 +5,17 @@ import InputWrapper from "./ui/input-wrapper.vue";
|
|
|
5
5
|
const { id, ...rest } = defineProps({
|
|
6
6
|
multiline: { type: Boolean, required: false },
|
|
7
7
|
withAria: { type: Boolean, required: false },
|
|
8
|
+
error: { type: String, required: false },
|
|
9
|
+
description: { type: String, required: false },
|
|
10
|
+
label: { type: String, required: false },
|
|
11
|
+
required: { type: Boolean, required: false },
|
|
12
|
+
id: { type: [String, null], required: false },
|
|
13
|
+
radius: { type: String, required: false },
|
|
14
|
+
size: { type: String, required: false },
|
|
15
|
+
variant: { type: String, required: false },
|
|
16
|
+
resize: { type: null, required: false },
|
|
17
|
+
leftSectionPE: { type: null, required: false },
|
|
18
|
+
rightSectionPE: { type: null, required: false },
|
|
8
19
|
readonly: { type: Boolean, required: false },
|
|
9
20
|
disabled: { type: Boolean, required: false }
|
|
10
21
|
});
|
|
@@ -14,10 +25,6 @@ const uid = id ?? useId();
|
|
|
14
25
|
|
|
15
26
|
<template>
|
|
16
27
|
<InputWrapper :id='uid' v-bind='rest'>
|
|
17
|
-
<template #label>
|
|
18
|
-
<slot name='label' />
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
28
|
<BaseInput :id='uid' v-model='value' v-bind='$attrs'>
|
|
22
29
|
<template v-if='$slots.leftSection' #leftSection>
|
|
23
30
|
<slot name='leftSection' />
|
|
@@ -27,11 +34,13 @@ const uid = id ?? useId();
|
|
|
27
34
|
</template>
|
|
28
35
|
</BaseInput>
|
|
29
36
|
|
|
30
|
-
<template #
|
|
37
|
+
<template v-if='$slots.label' #label>
|
|
38
|
+
<slot name='label' />
|
|
39
|
+
</template>
|
|
40
|
+
<template v-if='$slots.error' #error>
|
|
31
41
|
<slot name='error' />
|
|
32
42
|
</template>
|
|
33
|
-
|
|
34
|
-
<template #description>
|
|
43
|
+
<template v-if='$slots.description' #description>
|
|
35
44
|
<slot name='description' />
|
|
36
45
|
</template>
|
|
37
46
|
</InputWrapper>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { InputBaseProps } from './types/index.js';
|
|
2
2
|
import type { InputWrapperProps } from './ui/input-wrapper.vue.js';
|
|
3
|
-
export interface InputProps extends
|
|
3
|
+
export interface InputProps extends InputWrapperProps, InputBaseProps {
|
|
4
4
|
/** If set, the input can have multiple lines, for example when `component="textarea"` @default `false` */
|
|
5
5
|
multiline?: boolean;
|
|
6
6
|
/** If set, `aria-` and other accessibility attributes are added to the input @default `true` */
|
|
@@ -11,13 +11,13 @@ type __VLS_ModelProps = {
|
|
|
11
11
|
modelValue?: any;
|
|
12
12
|
};
|
|
13
13
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
14
|
-
declare var
|
|
14
|
+
declare var __VLS_11: {}, __VLS_14: {}, __VLS_17: {}, __VLS_20: {}, __VLS_23: {};
|
|
15
15
|
type __VLS_Slots = {} & {
|
|
16
|
-
|
|
16
|
+
leftSection?: (props: typeof __VLS_11) => any;
|
|
17
17
|
} & {
|
|
18
|
-
|
|
18
|
+
rightSection?: (props: typeof __VLS_14) => any;
|
|
19
19
|
} & {
|
|
20
|
-
|
|
20
|
+
label?: (props: typeof __VLS_17) => any;
|
|
21
21
|
} & {
|
|
22
22
|
error?: (props: typeof __VLS_20) => any;
|
|
23
23
|
} & {
|
|
@@ -14,5 +14,5 @@ export interface WrapperContext {
|
|
|
14
14
|
/** section pointer-events */
|
|
15
15
|
rightSectionPE?: CSSStyleDeclaration['pointerEvents'];
|
|
16
16
|
}
|
|
17
|
-
export declare const useProvideInputWrapper: (
|
|
18
|
-
export declare const useInputWrapperState: () => import("vue").
|
|
17
|
+
export declare const useProvideInputWrapper: (init: any) => import("vue").ComputedRef<any>;
|
|
18
|
+
export declare const useInputWrapperState: () => import("vue").ComputedRef<any> | undefined;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { createInjectionState } from "@vueuse/core";
|
|
2
|
+
import { computed } from "vue";
|
|
3
3
|
const injectionKey = Symbol("InputWrapper");
|
|
4
|
-
const [useProvide, useState] =
|
|
5
|
-
injectionKey
|
|
6
|
-
name: "InputWrapper"
|
|
4
|
+
const [useProvide, useState] = createInjectionState((init) => computed(() => init), {
|
|
5
|
+
injectionKey
|
|
7
6
|
});
|
|
8
7
|
export const useProvideInputWrapper = useProvide;
|
|
9
8
|
export const useInputWrapperState = useState;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { InputWrapperProps } from './index.js';
|
|
2
2
|
import type { InputBaseProps } from './types/index.js';
|
|
3
|
-
export interface NumberInputProps extends
|
|
3
|
+
export interface NumberInputProps extends InputBaseProps, Omit<InputWrapperProps, 'multiline' | 'resize' | 'id'> {
|
|
4
4
|
/** Minimum possible value */
|
|
5
5
|
min?: number;
|
|
6
6
|
/** Maximum possible value */
|
|
@@ -15,11 +15,17 @@ type __VLS_ModelProps = {
|
|
|
15
15
|
modelValue?: number;
|
|
16
16
|
};
|
|
17
17
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
18
|
-
declare var __VLS_16: {}, __VLS_19: {};
|
|
18
|
+
declare var __VLS_16: {}, __VLS_19: {}, __VLS_46: {}, __VLS_49: {}, __VLS_52: {};
|
|
19
19
|
type __VLS_Slots = {} & {
|
|
20
20
|
leftSection?: (props: typeof __VLS_16) => any;
|
|
21
21
|
} & {
|
|
22
22
|
rightSection?: (props: typeof __VLS_19) => any;
|
|
23
|
+
} & {
|
|
24
|
+
label?: (props: typeof __VLS_46) => any;
|
|
25
|
+
} & {
|
|
26
|
+
error?: (props: typeof __VLS_49) => any;
|
|
27
|
+
} & {
|
|
28
|
+
description?: (props: typeof __VLS_52) => any;
|
|
23
29
|
};
|
|
24
30
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
31
|
"update:modelValue": (value: number) => any;
|
|
@@ -18,11 +18,17 @@ const {
|
|
|
18
18
|
max: { type: Number, required: false },
|
|
19
19
|
step: { type: Number, required: false },
|
|
20
20
|
hideControls: { type: Boolean, required: false },
|
|
21
|
+
readonly: { type: Boolean, required: false },
|
|
22
|
+
disabled: { type: Boolean, required: false },
|
|
21
23
|
error: { type: String, required: false },
|
|
22
24
|
description: { type: String, required: false },
|
|
23
25
|
label: { type: String, required: false },
|
|
24
26
|
required: { type: Boolean, required: false },
|
|
25
|
-
|
|
27
|
+
radius: { type: String, required: false },
|
|
28
|
+
size: { type: String, required: false },
|
|
29
|
+
variant: { type: String, required: false },
|
|
30
|
+
leftSectionPE: { type: null, required: false },
|
|
31
|
+
rightSectionPE: { type: null, required: false }
|
|
26
32
|
});
|
|
27
33
|
const id = useId();
|
|
28
34
|
const value = defineModel({ type: Number, ...{ default: 0 } });
|
|
@@ -86,6 +92,16 @@ function handleBlur() {
|
|
|
86
92
|
</slot>
|
|
87
93
|
</template>
|
|
88
94
|
</BaseInput>
|
|
95
|
+
|
|
96
|
+
<template v-if='$slots.label' #label>
|
|
97
|
+
<slot name='label' />
|
|
98
|
+
</template>
|
|
99
|
+
<template v-if='$slots.error' #error>
|
|
100
|
+
<slot name='error' />
|
|
101
|
+
</template>
|
|
102
|
+
<template v-if='$slots.description' #description>
|
|
103
|
+
<slot name='description' />
|
|
104
|
+
</template>
|
|
89
105
|
</InputWrapper>
|
|
90
106
|
</template>
|
|
91
107
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { InputWrapperProps } from './index.js';
|
|
2
2
|
import type { InputBaseProps } from './types/index.js';
|
|
3
|
-
export interface NumberInputProps extends
|
|
3
|
+
export interface NumberInputProps extends InputBaseProps, Omit<InputWrapperProps, 'multiline' | 'resize' | 'id'> {
|
|
4
4
|
/** Minimum possible value */
|
|
5
5
|
min?: number;
|
|
6
6
|
/** Maximum possible value */
|
|
@@ -15,11 +15,17 @@ type __VLS_ModelProps = {
|
|
|
15
15
|
modelValue?: number;
|
|
16
16
|
};
|
|
17
17
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
18
|
-
declare var __VLS_16: {}, __VLS_19: {};
|
|
18
|
+
declare var __VLS_16: {}, __VLS_19: {}, __VLS_46: {}, __VLS_49: {}, __VLS_52: {};
|
|
19
19
|
type __VLS_Slots = {} & {
|
|
20
20
|
leftSection?: (props: typeof __VLS_16) => any;
|
|
21
21
|
} & {
|
|
22
22
|
rightSection?: (props: typeof __VLS_19) => any;
|
|
23
|
+
} & {
|
|
24
|
+
label?: (props: typeof __VLS_46) => any;
|
|
25
|
+
} & {
|
|
26
|
+
error?: (props: typeof __VLS_49) => any;
|
|
27
|
+
} & {
|
|
28
|
+
description?: (props: typeof __VLS_52) => any;
|
|
23
29
|
};
|
|
24
30
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
31
|
"update:modelValue": (value: number) => any;
|
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
import type { TextInputProps } from './index.js';
|
|
2
|
-
declare
|
|
2
|
+
declare var __VLS_7: {}, __VLS_27: {}, __VLS_30: {}, __VLS_33: {}, __VLS_36: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
rightSection?: (props: typeof __VLS_7) => any;
|
|
5
|
+
} & {
|
|
6
|
+
leftSection?: (props: typeof __VLS_27) => any;
|
|
7
|
+
} & {
|
|
8
|
+
label?: (props: typeof __VLS_30) => any;
|
|
9
|
+
} & {
|
|
10
|
+
error?: (props: typeof __VLS_33) => any;
|
|
11
|
+
} & {
|
|
12
|
+
description?: (props: typeof __VLS_36) => any;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<TextInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextInputProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
3
16
|
declare const _default: typeof __VLS_export;
|
|
4
17
|
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|