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
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { getRadius, getShadow, getSize, getSpacing, rem } from "@nui/utils";
|
|
3
3
|
import { onClickOutside, unrefElement } from "@vueuse/core";
|
|
4
4
|
import { computed, onMounted, shallowRef, watch } from "vue";
|
|
5
|
-
import Box from "
|
|
6
|
-
import NTransition from "
|
|
5
|
+
import Box from "../../box.vue";
|
|
6
|
+
import NTransition from "../../transition/transition.vue";
|
|
7
|
+
import { useProvideDialogState } from "../lib";
|
|
7
8
|
import css from "./dialog.module.css";
|
|
8
|
-
import { useProvideDialogState } from "./lib";
|
|
9
9
|
const {
|
|
10
10
|
withinPortal = true,
|
|
11
11
|
closeOnClickOutside = true,
|
|
@@ -23,8 +23,8 @@ const {
|
|
|
23
23
|
closeOnClickOutside: { type: Boolean, required: false },
|
|
24
24
|
withinPortal: { type: Boolean, required: false },
|
|
25
25
|
withoutOverlay: { type: Boolean, required: false },
|
|
26
|
-
yOffset: { type:
|
|
27
|
-
xOffset: { type:
|
|
26
|
+
yOffset: { type: void 0, required: false },
|
|
27
|
+
xOffset: { type: void 0, required: false },
|
|
28
28
|
radius: { type: [String, Number], required: false },
|
|
29
29
|
size: { type: String, required: false },
|
|
30
30
|
shadow: { type: String, required: false },
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { NuanceRadius, NuanceShadow, NuanceSize, NuanceSpacing } from '@nui/types';
|
|
2
2
|
import type { CSSProperties } from 'vue';
|
|
3
|
-
import type { BoxProps } from '
|
|
4
|
-
import type { TransitionName } from '
|
|
5
|
-
import type { DialogModel } from '
|
|
3
|
+
import type { BoxProps } from '../../box.vue.js';
|
|
4
|
+
import type { TransitionName } from '../../transition/index.js';
|
|
5
|
+
import type { DialogModel } from '../model.js';
|
|
6
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;
|
|
@@ -31,9 +31,9 @@ type __VLS_ModelProps = {
|
|
|
31
31
|
'open'?: DialogModel['open'];
|
|
32
32
|
};
|
|
33
33
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
34
|
-
declare var
|
|
34
|
+
declare var __VLS_31: {};
|
|
35
35
|
type __VLS_Slots = {} & {
|
|
36
|
-
default?: (props: typeof
|
|
36
|
+
default?: (props: typeof __VLS_31) => any;
|
|
37
37
|
};
|
|
38
38
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
39
39
|
close: () => any;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { TitleProps } from '
|
|
1
|
+
import type { TitleProps } from '../../title.vue.js';
|
|
2
2
|
export interface DialogTitleProps extends TitleProps {
|
|
3
3
|
}
|
|
4
|
-
declare var
|
|
4
|
+
declare var __VLS_8: {};
|
|
5
5
|
type __VLS_Slots = {} & {
|
|
6
|
-
default?: (props: typeof
|
|
6
|
+
default?: (props: typeof __VLS_8) => any;
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_base: import("vue").DefineComponent<DialogTitleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogTitleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
9
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import Title from "
|
|
2
|
+
import Title from "../../title.vue";
|
|
3
3
|
import css from "./dialog.module.css";
|
|
4
4
|
const { size = "md", lh = "1", ...props } = defineProps({
|
|
5
5
|
order: { type: String, required: false },
|
|
@@ -13,7 +13,7 @@ const { size = "md", lh = "1", ...props } = defineProps({
|
|
|
13
13
|
variant: { type: String, required: false },
|
|
14
14
|
fz: { type: null, required: false },
|
|
15
15
|
lh: { type: String, required: false },
|
|
16
|
-
fw: { type:
|
|
16
|
+
fw: { type: void 0, required: false },
|
|
17
17
|
c: { type: null, required: false },
|
|
18
18
|
mod: { type: [Object, Array, null], required: false }
|
|
19
19
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { TitleProps } from '
|
|
1
|
+
import type { TitleProps } from '../../title.vue.js';
|
|
2
2
|
export interface DialogTitleProps extends TitleProps {
|
|
3
3
|
}
|
|
4
|
-
declare var
|
|
4
|
+
declare var __VLS_8: {};
|
|
5
5
|
type __VLS_Slots = {} & {
|
|
6
|
-
default?: (props: typeof
|
|
6
|
+
default?: (props: typeof __VLS_8) => any;
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_base: import("vue").DefineComponent<DialogTitleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DialogTitleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
9
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.root{--dialog-size-xs:rem(320px);--dialog-size-sm:rem(380px);--dialog-size-md:rem(440px);--dialog-size-lg:rem(620px);--dialog-size-xl:rem(780px);--dialog-size:var(--dialog-size-md);--dialog-y-offset:0;--dialog-x-offset:0;--dialog-shadow:var(--shadow-md);--dialog-radius:var(--radius-default);--overlay-bg:rgba(0,0,0,.4);--overlay-filter:blur(.1rem);background:none;border:none;box-shadow:var(--dialog-shadow);display:grid;left:var(--dialog-x-offset);max-height:100%;max-width:100%;min-height:0;opacity:0;overflow:hidden;padding:0;top:var(--dialog-y-offset);transition:opacity .3s ease,overlay allow-discrete .3s ease,display allow-discrete .3s ease;width:var(--dialog-size)}.root::backdrop{backdrop-filter:var(--overlay-filter);background:var(--overlay-bg,rgba(0,0,0,.6));opacity:0;transition:opacity .3s ease,overlay allow-discrete .3s ease,display allow-discrete .3s ease}.root[open]{opacity:1}@starting-style{.root[open]{opacity:0}}.root[open]::backdrop{opacity:1}@starting-style{.root[open]::backdrop{opacity:0}}.root:not([open]){opacity:0;pointer-events:none}.root:not([open])::backdrop{opacity:0}.root[data-without-overlay]::backdrop{display:none}.content{background-color:var(--color-body);border-radius:var(--dialog-radius);color:var(--color-text);height:100%;min-height:0;padding:var(--spacing-sm);width:100%}.header{align-items:center;display:flex;justify-content:space-between}.title{font-weight:400}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ActionIconProps } from '../action-icon/index.js';
|
|
2
|
-
declare var
|
|
2
|
+
declare var __VLS_8: {};
|
|
3
3
|
type __VLS_Slots = {} & {
|
|
4
|
-
default?: (props: typeof
|
|
4
|
+
default?: (props: typeof __VLS_8) => any;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import("vue").DefineComponent<ActionIconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ActionIconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
7
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import DialogCloseButton from "../dialog/dialog-close-button.vue";
|
|
2
|
+
import DialogCloseButton from "../dialog/ui/dialog-close-button.vue";
|
|
3
3
|
const props = defineProps({
|
|
4
4
|
size: { type: null, required: false },
|
|
5
5
|
variant: { type: String, required: false },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ActionIconProps } from '../action-icon/index.js';
|
|
2
|
-
declare var
|
|
2
|
+
declare var __VLS_8: {};
|
|
3
3
|
type __VLS_Slots = {} & {
|
|
4
|
-
default?: (props: typeof
|
|
4
|
+
default?: (props: typeof __VLS_8) => any;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_base: import("vue").DefineComponent<ActionIconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ActionIconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
7
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { DialogHeaderProps } from '../dialog/index.js';
|
|
2
2
|
export interface DrawerHeaderProps extends DialogHeaderProps {
|
|
3
3
|
}
|
|
4
|
-
declare var
|
|
4
|
+
declare var __VLS_8: {};
|
|
5
5
|
type __VLS_Slots = {} & {
|
|
6
|
-
default?: (props: typeof
|
|
6
|
+
default?: (props: typeof __VLS_8) => any;
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_base: import("vue").DefineComponent<DrawerHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DrawerHeaderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
9
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { DialogHeaderProps } from '../dialog/index.js';
|
|
2
2
|
export interface DrawerHeaderProps extends DialogHeaderProps {
|
|
3
3
|
}
|
|
4
|
-
declare var
|
|
4
|
+
declare var __VLS_8: {};
|
|
5
5
|
type __VLS_Slots = {} & {
|
|
6
|
-
default?: (props: typeof
|
|
6
|
+
default?: (props: typeof __VLS_8) => any;
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_base: import("vue").DefineComponent<DrawerHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DrawerHeaderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
9
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -9,9 +9,9 @@ type __VLS_ModelProps = {
|
|
|
9
9
|
'open'?: DialogModel['open'];
|
|
10
10
|
};
|
|
11
11
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
|
-
declare var
|
|
12
|
+
declare var __VLS_11: {};
|
|
13
13
|
type __VLS_Slots = {} & {
|
|
14
|
-
default?: (props: typeof
|
|
14
|
+
default?: (props: typeof __VLS_11) => any;
|
|
15
15
|
};
|
|
16
16
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
17
|
close: () => any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { computed } from "vue";
|
|
3
|
-
import DialogRoot from "../dialog/dialog-root.vue";
|
|
3
|
+
import DialogRoot from "../dialog/ui/dialog-root.vue";
|
|
4
4
|
import css from "./drawer.module.css";
|
|
5
5
|
const {
|
|
6
6
|
position = "left",
|
|
@@ -12,8 +12,8 @@ const {
|
|
|
12
12
|
position: { type: String, required: false },
|
|
13
13
|
withinPortal: { type: Boolean, required: false },
|
|
14
14
|
withoutOverlay: { type: Boolean, required: false },
|
|
15
|
-
yOffset: { type:
|
|
16
|
-
xOffset: { type:
|
|
15
|
+
yOffset: { type: void 0, required: false },
|
|
16
|
+
xOffset: { type: void 0, required: false },
|
|
17
17
|
radius: { type: [String, Number], required: false },
|
|
18
18
|
size: { type: String, required: false },
|
|
19
19
|
shadow: { type: String, required: false },
|
|
@@ -9,9 +9,9 @@ type __VLS_ModelProps = {
|
|
|
9
9
|
'open'?: DialogModel['open'];
|
|
10
10
|
};
|
|
11
11
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
|
-
declare var
|
|
12
|
+
declare var __VLS_11: {};
|
|
13
13
|
type __VLS_Slots = {} & {
|
|
14
|
-
default?: (props: typeof
|
|
14
|
+
default?: (props: typeof __VLS_11) => any;
|
|
15
15
|
};
|
|
16
16
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
17
|
close: () => any;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { DialogTitleProps } from '../dialog/index.js';
|
|
2
2
|
export interface DrawerTitleProps extends DialogTitleProps {
|
|
3
3
|
}
|
|
4
|
-
declare var
|
|
4
|
+
declare var __VLS_8: {};
|
|
5
5
|
type __VLS_Slots = {} & {
|
|
6
|
-
default?: (props: typeof
|
|
6
|
+
default?: (props: typeof __VLS_8) => any;
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_base: import("vue").DefineComponent<DrawerTitleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DrawerTitleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
9
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import DialogTitle from "../dialog/dialog-title.vue";
|
|
2
|
+
import DialogTitle from "../dialog/ui/dialog-title.vue";
|
|
3
3
|
const props = defineProps({
|
|
4
4
|
order: { type: String, required: false },
|
|
5
5
|
textWrap: { type: String, required: false },
|
|
@@ -12,7 +12,7 @@ const props = defineProps({
|
|
|
12
12
|
variant: { type: String, required: false },
|
|
13
13
|
fz: { type: null, required: false },
|
|
14
14
|
lh: { type: String, required: false },
|
|
15
|
-
fw: { type:
|
|
15
|
+
fw: { type: void 0, required: false },
|
|
16
16
|
c: { type: null, required: false },
|
|
17
17
|
mod: { type: [Object, Array, null], required: false }
|
|
18
18
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { DialogTitleProps } from '../dialog/index.js';
|
|
2
2
|
export interface DrawerTitleProps extends DialogTitleProps {
|
|
3
3
|
}
|
|
4
|
-
declare var
|
|
4
|
+
declare var __VLS_8: {};
|
|
5
5
|
type __VLS_Slots = {} & {
|
|
6
|
-
default?: (props: typeof
|
|
6
|
+
default?: (props: typeof __VLS_8) => any;
|
|
7
7
|
};
|
|
8
8
|
declare const __VLS_base: import("vue").DefineComponent<DrawerTitleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DrawerTitleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
9
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.root{height:100%;overflow-
|
|
1
|
+
.root{height:100%;overflow:hidden}.root[data-position=left]{max-height:100dvh}.root[data-position=left] .content{border-radius:0 var(--dialog-radius) var(--dialog-radius) 0}.root[data-position=right]{left:unset;max-height:100dvh;right:var(--dialog-x-offset)}.root[data-position=right] .content{border-radius:var(--dialog-radius) 0 0 var(--dialog-radius)}.root[data-position=top]{height:var(--dialog-size);top:var(--dialog-y-offset);width:100%}.root[data-position=top] .content{border-radius:0 0 var(--dialog-radius) var(--dialog-radius)}.root[data-position=bottom]{bottom:var(--dialog-y-offset);height:var(--dialog-size);top:unset;width:100%}.root[data-position=bottom] .content{border-radius:var(--dialog-radius) var(--dialog-radius) 0 0}.content{min-height:0}
|
|
@@ -22,11 +22,13 @@ export interface FileUploadProps<M extends boolean> extends ActionIconProps, Use
|
|
|
22
22
|
*/
|
|
23
23
|
directory?: MaybeRef<boolean>;
|
|
24
24
|
}
|
|
25
|
-
declare const __VLS_export: <Multiple extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>,
|
|
26
|
-
props: __VLS_PrettifyLocal<FileUploadProps<Multiple> & {
|
|
25
|
+
declare const __VLS_export: <Multiple 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_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
26
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<FileUploadProps<Multiple> & {
|
|
27
27
|
onCancel?: (() => any) | undefined;
|
|
28
28
|
onChange?: ((files: (Multiple extends true ? File[] : File) | null) => any) | undefined;
|
|
29
|
-
}> &
|
|
29
|
+
}> & (typeof globalThis extends {
|
|
30
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
31
|
+
} ? P : {});
|
|
30
32
|
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
31
33
|
files: import("vue").Ref<FileList | null, FileList | null>;
|
|
32
34
|
reset: () => void;
|
|
@@ -39,6 +41,8 @@ declare const __VLS_export: <Multiple extends boolean = false>(__VLS_props: NonN
|
|
|
39
41
|
};
|
|
40
42
|
declare const _default: typeof __VLS_export;
|
|
41
43
|
export default _default;
|
|
42
|
-
type __VLS_PrettifyLocal<T> = {
|
|
44
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
45
|
+
[K in keyof T]: T[K];
|
|
46
|
+
} : {
|
|
43
47
|
[K in keyof T as K]: T[K];
|
|
44
|
-
} & {};
|
|
48
|
+
}) & {};
|
|
@@ -22,11 +22,13 @@ export interface FileUploadProps<M extends boolean> extends ActionIconProps, Use
|
|
|
22
22
|
*/
|
|
23
23
|
directory?: MaybeRef<boolean>;
|
|
24
24
|
}
|
|
25
|
-
declare const __VLS_export: <Multiple extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>,
|
|
26
|
-
props: __VLS_PrettifyLocal<FileUploadProps<Multiple> & {
|
|
25
|
+
declare const __VLS_export: <Multiple 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_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
26
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<FileUploadProps<Multiple> & {
|
|
27
27
|
onCancel?: (() => any) | undefined;
|
|
28
28
|
onChange?: ((files: (Multiple extends true ? File[] : File) | null) => any) | undefined;
|
|
29
|
-
}> &
|
|
29
|
+
}> & (typeof globalThis extends {
|
|
30
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
31
|
+
} ? P : {});
|
|
30
32
|
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
31
33
|
files: import("vue").Ref<FileList | null, FileList | null>;
|
|
32
34
|
reset: () => void;
|
|
@@ -39,6 +41,8 @@ declare const __VLS_export: <Multiple extends boolean = false>(__VLS_props: NonN
|
|
|
39
41
|
};
|
|
40
42
|
declare const _default: typeof __VLS_export;
|
|
41
43
|
export default _default;
|
|
42
|
-
type __VLS_PrettifyLocal<T> = {
|
|
44
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
45
|
+
[K in keyof T]: T[K];
|
|
46
|
+
} : {
|
|
43
47
|
[K in keyof T as K]: T[K];
|
|
44
|
-
} & {};
|
|
48
|
+
}) & {};
|
|
@@ -12,6 +12,7 @@ export * from './checkbox/index.js';
|
|
|
12
12
|
export * from './chip/index.js';
|
|
13
13
|
export * from './combobox/index.js';
|
|
14
14
|
export * from './container.vue.js';
|
|
15
|
+
export type * from './date-time-picker.vue';
|
|
15
16
|
export * from './dialog/index.js';
|
|
16
17
|
export * from './drawer/index.js';
|
|
17
18
|
export * from './file-upload.vue.js';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Format } from '@formkit/tempo';
|
|
2
|
+
import type { Selection, SelectionMode } from '../calendar/index.js';
|
|
3
|
+
import type { CalendarProps } from '../calendar/calendar.vue.js';
|
|
4
|
+
import type { ButtonInputProps } from './ui/button-input.vue.js';
|
|
5
|
+
/**
|
|
6
|
+
* - presets
|
|
7
|
+
*/
|
|
8
|
+
export interface DatePickerProps<Mode extends SelectionMode> extends CalendarProps<Mode>, ButtonInputProps {
|
|
9
|
+
/** Tempo format for value */
|
|
10
|
+
valueFormat?: Format;
|
|
11
|
+
}
|
|
12
|
+
declare const __VLS_export: <Mode extends SelectionMode>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
13
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<(DatePickerProps<Mode> & {
|
|
14
|
+
/** ISO string(s) */
|
|
15
|
+
modelValue?: Selection | Selection[];
|
|
16
|
+
}) & {
|
|
17
|
+
"onUpdate:modelValue"?: ((value: Selection | Selection[] | undefined) => any) | undefined;
|
|
18
|
+
}> & (typeof globalThis extends {
|
|
19
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
20
|
+
} ? P : {});
|
|
21
|
+
expose: (exposed: {}) => void;
|
|
22
|
+
attrs: any;
|
|
23
|
+
slots: {
|
|
24
|
+
leftSection?: (props: {}) => any;
|
|
25
|
+
} & {
|
|
26
|
+
rightSection?: (props: {}) => any;
|
|
27
|
+
} & {
|
|
28
|
+
label?: (props: {}) => any;
|
|
29
|
+
} & {
|
|
30
|
+
error?: (props: {}) => any;
|
|
31
|
+
} & {
|
|
32
|
+
description?: (props: {}) => any;
|
|
33
|
+
};
|
|
34
|
+
emit: (event: "update:modelValue", value: Selection | Selection[] | undefined) => void;
|
|
35
|
+
}>) => import("vue").VNode & {
|
|
36
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
37
|
+
};
|
|
38
|
+
declare const _default: typeof __VLS_export;
|
|
39
|
+
export default _default;
|
|
40
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
41
|
+
[K in keyof T]: T[K];
|
|
42
|
+
} : {
|
|
43
|
+
[K in keyof T as K]: T[K];
|
|
44
|
+
}) & {};
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { format } from "@formkit/tempo";
|
|
3
|
+
import { useDatesConfig } from "@nui/composals";
|
|
4
|
+
import { computed } from "vue";
|
|
5
|
+
import ActionIcon from "../action-icon/action-icon.vue";
|
|
6
|
+
import Badge from "../badge.vue";
|
|
7
|
+
import Calendar from "../calendar/calendar.vue";
|
|
8
|
+
import PopoverDropdown from "../popover/popover-dropdown.vue";
|
|
9
|
+
import PopoverTarget from "../popover/popover-target.vue";
|
|
10
|
+
import Popover from "../popover/popover.vue";
|
|
11
|
+
import ButtonInput from "./ui/button-input.vue";
|
|
12
|
+
const {
|
|
13
|
+
mode = "single",
|
|
14
|
+
valueFormat = "short",
|
|
15
|
+
// Calendar props
|
|
16
|
+
fixedWeeks = false,
|
|
17
|
+
withCellSpacing = false,
|
|
18
|
+
hideOutsideDates = false,
|
|
19
|
+
highlightToday = true,
|
|
20
|
+
excludeDate,
|
|
21
|
+
maxDate,
|
|
22
|
+
minDate,
|
|
23
|
+
minLevel,
|
|
24
|
+
maxLevel,
|
|
25
|
+
numberOfMonths,
|
|
26
|
+
prevDisabled,
|
|
27
|
+
nextDisabled,
|
|
28
|
+
weekdayFormat,
|
|
29
|
+
withWeekNumbers,
|
|
30
|
+
config: cfg,
|
|
31
|
+
...props
|
|
32
|
+
} = defineProps({
|
|
33
|
+
valueFormat: { type: [String, Object], required: false },
|
|
34
|
+
size: { type: String, required: false },
|
|
35
|
+
withWeekNumbers: { type: Boolean, required: false },
|
|
36
|
+
prevDisabled: { type: Function, required: false },
|
|
37
|
+
nextDisabled: { type: Function, required: false },
|
|
38
|
+
minLevel: { type: String, required: false },
|
|
39
|
+
maxLevel: { type: String, required: false },
|
|
40
|
+
withCellSpacing: { type: Boolean, required: false },
|
|
41
|
+
mode: { type: null, required: false },
|
|
42
|
+
numberOfMonths: { type: Number, required: false },
|
|
43
|
+
weekdayFormat: { type: String, required: false },
|
|
44
|
+
fixedWeeks: { type: Boolean, required: false },
|
|
45
|
+
minDate: { type: [Date, String], required: false },
|
|
46
|
+
maxDate: { type: [Date, String], required: false },
|
|
47
|
+
excludeDate: { type: Function, required: false },
|
|
48
|
+
highlightToday: { type: Boolean, required: false },
|
|
49
|
+
hideOutsideDates: { type: Boolean, required: false },
|
|
50
|
+
disabled: { type: Boolean, required: false },
|
|
51
|
+
readonly: { type: Boolean, required: false },
|
|
52
|
+
config: { type: Object, required: false },
|
|
53
|
+
multiline: { type: Boolean, required: false },
|
|
54
|
+
name: { type: String, required: false },
|
|
55
|
+
error: { type: String, required: false },
|
|
56
|
+
description: { type: String, required: false },
|
|
57
|
+
label: { type: String, required: false },
|
|
58
|
+
required: { type: Boolean, required: false },
|
|
59
|
+
id: { type: [String, null], required: false },
|
|
60
|
+
radius: { type: String, required: false },
|
|
61
|
+
variant: { type: String, required: false },
|
|
62
|
+
resize: { type: void 0, required: false },
|
|
63
|
+
leftSectionPE: { type: null, required: false },
|
|
64
|
+
rightSectionPE: { type: null, required: false },
|
|
65
|
+
classes: { type: Object, required: false }
|
|
66
|
+
});
|
|
67
|
+
const model = defineModel({ type: [String, null, Array] });
|
|
68
|
+
const config = useDatesConfig(cfg);
|
|
69
|
+
const formatValue = (date) => format({ date, format: valueFormat, ...config });
|
|
70
|
+
const visible = computed(() => {
|
|
71
|
+
if (!model.value)
|
|
72
|
+
return null;
|
|
73
|
+
switch (mode) {
|
|
74
|
+
case "single":
|
|
75
|
+
return formatValue(model.value);
|
|
76
|
+
case "week":
|
|
77
|
+
case "range": {
|
|
78
|
+
const [start, end] = model.value;
|
|
79
|
+
if (!start)
|
|
80
|
+
return null;
|
|
81
|
+
if (end && start !== end)
|
|
82
|
+
return `${formatValue(start)} - ${formatValue(end)}`;
|
|
83
|
+
else
|
|
84
|
+
return formatValue(start);
|
|
85
|
+
}
|
|
86
|
+
case "multiple":
|
|
87
|
+
return model.value.map(formatValue);
|
|
88
|
+
default:
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
</script>
|
|
93
|
+
|
|
94
|
+
<template>
|
|
95
|
+
<Popover>
|
|
96
|
+
<PopoverTarget>
|
|
97
|
+
<ButtonInput v-bind='props' :multiline='mode === "multiple"'>
|
|
98
|
+
<template #leftSection>
|
|
99
|
+
<slot name='leftSection'>
|
|
100
|
+
<Icon name='gravity-ui:calendar' />
|
|
101
|
+
</slot>
|
|
102
|
+
</template>
|
|
103
|
+
<template v-if='!!$slots.rightSection' #rightSection>
|
|
104
|
+
<slot name='rightSection' />
|
|
105
|
+
</template>
|
|
106
|
+
|
|
107
|
+
<div v-if='mode === "multiple"' :class='$style.list'>
|
|
108
|
+
<Badge
|
|
109
|
+
v-for='(date, ix) in visible'
|
|
110
|
+
:key='date'
|
|
111
|
+
variant='light'
|
|
112
|
+
color='gray'
|
|
113
|
+
>
|
|
114
|
+
{{ date }}
|
|
115
|
+
|
|
116
|
+
<template #rightSection>
|
|
117
|
+
<ActionIcon
|
|
118
|
+
icon='gravity-ui:xmark'
|
|
119
|
+
variant='subtle'
|
|
120
|
+
color='gray'
|
|
121
|
+
size='xs'
|
|
122
|
+
@click.stop.prevent='() => {
|
|
123
|
+
model = model.filter((_, _ix) => _ix !== ix);
|
|
124
|
+
}'
|
|
125
|
+
/>
|
|
126
|
+
</template>
|
|
127
|
+
</Badge>
|
|
128
|
+
</div>
|
|
129
|
+
<template v-else>
|
|
130
|
+
{{ visible }}
|
|
131
|
+
</template>
|
|
132
|
+
|
|
133
|
+
<template v-if='!!$slots.label' #label>
|
|
134
|
+
<slot name='label' />
|
|
135
|
+
</template>
|
|
136
|
+
<template v-if='!!$slots.error' #error>
|
|
137
|
+
<slot name='error' />
|
|
138
|
+
</template>
|
|
139
|
+
<template v-if='!!$slots.description' #description>
|
|
140
|
+
<slot name='description' />
|
|
141
|
+
</template>
|
|
142
|
+
</ButtonInput>
|
|
143
|
+
</PopoverTarget>
|
|
144
|
+
<PopoverDropdown>
|
|
145
|
+
<Calendar
|
|
146
|
+
v-model:value='model'
|
|
147
|
+
:mode
|
|
148
|
+
:fixed-weeks
|
|
149
|
+
:with-cell-spacing
|
|
150
|
+
:exclude-date
|
|
151
|
+
:hide-outside-dates
|
|
152
|
+
:highlight-today
|
|
153
|
+
:max-date
|
|
154
|
+
:min-date
|
|
155
|
+
:min-level
|
|
156
|
+
:max-level
|
|
157
|
+
:number-of-months
|
|
158
|
+
:prev-disabled
|
|
159
|
+
:next-disabled
|
|
160
|
+
:weekday-format
|
|
161
|
+
:with-week-numbers
|
|
162
|
+
:config
|
|
163
|
+
/>
|
|
164
|
+
</PopoverDropdown>
|
|
165
|
+
</Popover>
|
|
166
|
+
</template>
|
|
167
|
+
|
|
168
|
+
<style lang="postcss" module>
|
|
169
|
+
.list {
|
|
170
|
+
display: flex;
|
|
171
|
+
flex-wrap: wrap;
|
|
172
|
+
gap: .25rem;
|
|
173
|
+
}
|
|
174
|
+
</style>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Format } from '@formkit/tempo';
|
|
2
|
+
import type { Selection, SelectionMode } from '../calendar/index.js';
|
|
3
|
+
import type { CalendarProps } from '../calendar/calendar.vue.js';
|
|
4
|
+
import type { ButtonInputProps } from './ui/button-input.vue.js';
|
|
5
|
+
/**
|
|
6
|
+
* - presets
|
|
7
|
+
*/
|
|
8
|
+
export interface DatePickerProps<Mode extends SelectionMode> extends CalendarProps<Mode>, ButtonInputProps {
|
|
9
|
+
/** Tempo format for value */
|
|
10
|
+
valueFormat?: Format;
|
|
11
|
+
}
|
|
12
|
+
declare const __VLS_export: <Mode extends SelectionMode>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
13
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<(DatePickerProps<Mode> & {
|
|
14
|
+
/** ISO string(s) */
|
|
15
|
+
modelValue?: Selection | Selection[];
|
|
16
|
+
}) & {
|
|
17
|
+
"onUpdate:modelValue"?: ((value: Selection | Selection[] | undefined) => any) | undefined;
|
|
18
|
+
}> & (typeof globalThis extends {
|
|
19
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
20
|
+
} ? P : {});
|
|
21
|
+
expose: (exposed: {}) => void;
|
|
22
|
+
attrs: any;
|
|
23
|
+
slots: {
|
|
24
|
+
leftSection?: (props: {}) => any;
|
|
25
|
+
} & {
|
|
26
|
+
rightSection?: (props: {}) => any;
|
|
27
|
+
} & {
|
|
28
|
+
label?: (props: {}) => any;
|
|
29
|
+
} & {
|
|
30
|
+
error?: (props: {}) => any;
|
|
31
|
+
} & {
|
|
32
|
+
description?: (props: {}) => any;
|
|
33
|
+
};
|
|
34
|
+
emit: (event: "update:modelValue", value: Selection | Selection[] | undefined) => void;
|
|
35
|
+
}>) => import("vue").VNode & {
|
|
36
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
37
|
+
};
|
|
38
|
+
declare const _default: typeof __VLS_export;
|
|
39
|
+
export default _default;
|
|
40
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
41
|
+
[K in keyof T]: T[K];
|
|
42
|
+
} : {
|
|
43
|
+
[K in keyof T as K]: T[K];
|
|
44
|
+
}) & {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { TextInputProps } from './index.js';
|
|
2
|
-
declare var
|
|
2
|
+
declare var __VLS_9: {}, __VLS_17: {}, __VLS_20: {}, __VLS_23: {}, __VLS_26: {};
|
|
3
3
|
type __VLS_Slots = {} & {
|
|
4
|
-
leftSection?: (props: typeof
|
|
4
|
+
leftSection?: (props: typeof __VLS_9) => any;
|
|
5
5
|
} & {
|
|
6
|
-
rightSection?: (props: typeof
|
|
6
|
+
rightSection?: (props: typeof __VLS_17) => any;
|
|
7
7
|
} & {
|
|
8
|
-
label?: (props: typeof
|
|
8
|
+
label?: (props: typeof __VLS_20) => any;
|
|
9
9
|
} & {
|
|
10
|
-
error?: (props: typeof
|
|
10
|
+
error?: (props: typeof __VLS_23) => any;
|
|
11
11
|
} & {
|
|
12
|
-
description?: (props: typeof
|
|
12
|
+
description?: (props: typeof __VLS_26) => any;
|
|
13
13
|
};
|
|
14
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
15
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|