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
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { clamp } from "@vueuse/core";
|
|
3
|
+
import { computed } from "vue";
|
|
4
|
+
import { padTime } from "../../time-picker";
|
|
5
|
+
const {
|
|
6
|
+
min,
|
|
7
|
+
max,
|
|
8
|
+
placeholder = "--",
|
|
9
|
+
step,
|
|
10
|
+
readonly,
|
|
11
|
+
allowTemporaryZero = false
|
|
12
|
+
} = defineProps({
|
|
13
|
+
min: { type: Number, required: true },
|
|
14
|
+
max: { type: Number, required: true },
|
|
15
|
+
step: { type: Number, required: true },
|
|
16
|
+
focusable: { type: Boolean, required: false },
|
|
17
|
+
allowTemporaryZero: { type: Boolean, required: false },
|
|
18
|
+
placeholder: { type: String, required: false },
|
|
19
|
+
readonly: { type: Boolean, required: false }
|
|
20
|
+
});
|
|
21
|
+
const emit = defineEmits(["next", "prev"]);
|
|
22
|
+
const maxDigit = computed(() => Number(max.toFixed(0)[0]));
|
|
23
|
+
const model = defineModel({ type: [Number, null], ...{ default: null } });
|
|
24
|
+
const value = computed({
|
|
25
|
+
get: () => model.value == null ? "" : padTime(model.value),
|
|
26
|
+
set: (newValue) => {
|
|
27
|
+
if (readonly)
|
|
28
|
+
return;
|
|
29
|
+
const clearValue = newValue.replace(/\D/g, "");
|
|
30
|
+
if (clearValue === "") {
|
|
31
|
+
model.value = null;
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const parsedValue = Number.parseInt(clearValue, 10);
|
|
35
|
+
const clampedValue = allowTemporaryZero && parsedValue === 0 && min > 0 ? 0 : clamp(parsedValue, min, max);
|
|
36
|
+
model.value = clampedValue;
|
|
37
|
+
if (clampedValue > maxDigit.value || newValue.startsWith("00"))
|
|
38
|
+
emit("next");
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
const arrowsMax = computed(() => max + 1 - step);
|
|
42
|
+
function handleKeyDown(event) {
|
|
43
|
+
if (readonly)
|
|
44
|
+
return;
|
|
45
|
+
if (event.key === "0" || event.key === "Num0") {
|
|
46
|
+
if (model.value === 0) {
|
|
47
|
+
event.preventDefault();
|
|
48
|
+
emit("next");
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (event.key === "Home") {
|
|
52
|
+
event.preventDefault();
|
|
53
|
+
model.value = min;
|
|
54
|
+
}
|
|
55
|
+
if (event.key === "End") {
|
|
56
|
+
event.preventDefault();
|
|
57
|
+
model.value = max;
|
|
58
|
+
}
|
|
59
|
+
if (event.key === "Backspace" || event.key === "Delete") {
|
|
60
|
+
event.preventDefault();
|
|
61
|
+
if (model.value !== null)
|
|
62
|
+
model.value = null;
|
|
63
|
+
else
|
|
64
|
+
emit("prev");
|
|
65
|
+
}
|
|
66
|
+
if (event.key === "ArrowRight") {
|
|
67
|
+
event.preventDefault();
|
|
68
|
+
emit("next");
|
|
69
|
+
}
|
|
70
|
+
if (event.key === "ArrowLeft") {
|
|
71
|
+
event.preventDefault();
|
|
72
|
+
emit("prev");
|
|
73
|
+
}
|
|
74
|
+
if (event.key === "ArrowUp") {
|
|
75
|
+
event.preventDefault();
|
|
76
|
+
const newValue = model.value === null ? min : clamp(model.value + step, min, arrowsMax.value);
|
|
77
|
+
model.value = newValue;
|
|
78
|
+
}
|
|
79
|
+
if (event.key === "ArrowDown") {
|
|
80
|
+
event.preventDefault();
|
|
81
|
+
const newValue = model.value === null ? arrowsMax.value : clamp(model.value - step, min, arrowsMax.value);
|
|
82
|
+
model.value = newValue;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
</script>
|
|
86
|
+
|
|
87
|
+
<template>
|
|
88
|
+
<input
|
|
89
|
+
v-model='value'
|
|
90
|
+
type='text'
|
|
91
|
+
role='spinbutton'
|
|
92
|
+
:aria-valuemin='min'
|
|
93
|
+
:aria-valuemax='max'
|
|
94
|
+
:aria-valuenow='value === null ? 0 : value'
|
|
95
|
+
:data-empty='value === null || void 0'
|
|
96
|
+
inputMode='numeric'
|
|
97
|
+
:placeholder
|
|
98
|
+
:readonly
|
|
99
|
+
:class='$style.field'
|
|
100
|
+
@keydown='handleKeyDown'
|
|
101
|
+
@focus='($event?.target).select()'
|
|
102
|
+
@click.stop='($event?.target).select()'
|
|
103
|
+
>
|
|
104
|
+
</template>
|
|
105
|
+
|
|
106
|
+
<style lang="postcss" module>
|
|
107
|
+
.field {
|
|
108
|
+
position: relative;
|
|
109
|
+
|
|
110
|
+
width: calc(2ch + 0.3em);
|
|
111
|
+
height: 100%;
|
|
112
|
+
padding-inline: 0.15em;
|
|
113
|
+
border: 0;
|
|
114
|
+
border-radius: 2px;
|
|
115
|
+
|
|
116
|
+
font-variant-numeric: tabular-nums;
|
|
117
|
+
line-height: 1;
|
|
118
|
+
color: var(--input-color);
|
|
119
|
+
text-align: center;
|
|
120
|
+
text-align-last: center;
|
|
121
|
+
|
|
122
|
+
appearance: none;
|
|
123
|
+
background-color: transparent;
|
|
124
|
+
caret-color: transparent;
|
|
125
|
+
|
|
126
|
+
&:where([data-am-pm]) {
|
|
127
|
+
width: auto;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&:where(:disabled) {
|
|
131
|
+
cursor: not-allowed;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&::selection {
|
|
135
|
+
background-color: transparent;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&::placeholder {
|
|
139
|
+
color: inherit;
|
|
140
|
+
|
|
141
|
+
opacity: 1;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&:focus {
|
|
145
|
+
color: var(--color-white);
|
|
146
|
+
|
|
147
|
+
background-color: var(--color-primary-filled);
|
|
148
|
+
outline: 0;
|
|
149
|
+
|
|
150
|
+
&::placeholder {
|
|
151
|
+
color: var(--color-white);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
</style>
|
|
@@ -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;
|
|
@@ -2,13 +2,13 @@ import type { NuxtLinkProps } from '#app';
|
|
|
2
2
|
import type { ButtonProps } from '../button/index.js';
|
|
3
3
|
export interface LinkButtonProps extends Omit<NuxtLinkProps, 'href' | 'custom'>, ButtonProps {
|
|
4
4
|
}
|
|
5
|
-
declare var
|
|
5
|
+
declare var __VLS_17: {}, __VLS_19: {}, __VLS_22: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
|
-
leftSection?: (props: typeof
|
|
7
|
+
leftSection?: (props: typeof __VLS_17) => any;
|
|
8
8
|
} & {
|
|
9
|
-
default?: (props: typeof
|
|
9
|
+
default?: (props: typeof __VLS_19) => any;
|
|
10
10
|
} & {
|
|
11
|
-
rightSection?: (props: typeof
|
|
11
|
+
rightSection?: (props: typeof __VLS_22) => any;
|
|
12
12
|
};
|
|
13
13
|
declare const __VLS_base: import("vue").DefineComponent<LinkButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
14
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -2,13 +2,13 @@ import type { NuxtLinkProps } from '#app';
|
|
|
2
2
|
import type { ButtonProps } from '../button/index.js';
|
|
3
3
|
export interface LinkButtonProps extends Omit<NuxtLinkProps, 'href' | 'custom'>, ButtonProps {
|
|
4
4
|
}
|
|
5
|
-
declare var
|
|
5
|
+
declare var __VLS_17: {}, __VLS_19: {}, __VLS_22: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
|
-
leftSection?: (props: typeof
|
|
7
|
+
leftSection?: (props: typeof __VLS_17) => any;
|
|
8
8
|
} & {
|
|
9
|
-
default?: (props: typeof
|
|
9
|
+
default?: (props: typeof __VLS_19) => any;
|
|
10
10
|
} & {
|
|
11
|
-
rightSection?: (props: typeof
|
|
11
|
+
rightSection?: (props: typeof __VLS_22) => any;
|
|
12
12
|
};
|
|
13
13
|
declare const __VLS_base: import("vue").DefineComponent<LinkButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
14
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -3,9 +3,9 @@ import type { TextProps } from '../text.vue.js';
|
|
|
3
3
|
export interface LinkProps extends Omit<NuxtLinkProps, 'href' | 'custom'>, Omit<TextProps, 'is'> {
|
|
4
4
|
underline?: boolean;
|
|
5
5
|
}
|
|
6
|
-
declare var
|
|
6
|
+
declare var __VLS_16: {};
|
|
7
7
|
type __VLS_Slots = {} & {
|
|
8
|
-
default?: (props: typeof
|
|
8
|
+
default?: (props: typeof __VLS_16) => any;
|
|
9
9
|
};
|
|
10
10
|
declare const __VLS_base: import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
11
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -29,7 +29,7 @@ const props = defineProps({
|
|
|
29
29
|
variant: { type: String, required: false },
|
|
30
30
|
fz: { type: null, required: false },
|
|
31
31
|
lh: { type: String, required: false },
|
|
32
|
-
fw: { type:
|
|
32
|
+
fw: { type: void 0, required: false },
|
|
33
33
|
c: { type: null, required: false },
|
|
34
34
|
mod: { type: [Object, Array, null], required: false }
|
|
35
35
|
});
|
|
@@ -3,9 +3,9 @@ import type { TextProps } from '../text.vue.js';
|
|
|
3
3
|
export interface LinkProps extends Omit<NuxtLinkProps, 'href' | 'custom'>, Omit<TextProps, 'is'> {
|
|
4
4
|
underline?: boolean;
|
|
5
5
|
}
|
|
6
|
-
declare var
|
|
6
|
+
declare var __VLS_16: {};
|
|
7
7
|
type __VLS_Slots = {} & {
|
|
8
|
-
default?: (props: typeof
|
|
8
|
+
default?: (props: typeof __VLS_16) => any;
|
|
9
9
|
};
|
|
10
10
|
declare const __VLS_base: import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
11
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -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 ModalHeaderProps 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<ModalHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ModalHeaderProps> & 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 ModalHeaderProps 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<ModalHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ModalHeaderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
9
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -11,9 +11,9 @@ type __VLS_ModelProps = {
|
|
|
11
11
|
'open'?: DialogModel['open'];
|
|
12
12
|
};
|
|
13
13
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
14
|
-
declare var
|
|
14
|
+
declare var __VLS_11: {};
|
|
15
15
|
type __VLS_Slots = {} & {
|
|
16
|
-
default?: (props: typeof
|
|
16
|
+
default?: (props: typeof __VLS_11) => any;
|
|
17
17
|
};
|
|
18
18
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
19
|
close: () => any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import DialogRoot from "../dialog/dialog-root.vue";
|
|
2
|
+
import DialogRoot from "../dialog/ui/dialog-root.vue";
|
|
3
3
|
import css from "./modal.module.css";
|
|
4
4
|
const {
|
|
5
5
|
centered,
|
|
@@ -11,8 +11,8 @@ const {
|
|
|
11
11
|
centered: { type: Boolean, required: false },
|
|
12
12
|
fullScreen: { type: Boolean, required: false },
|
|
13
13
|
withinPortal: { type: Boolean, required: false },
|
|
14
|
-
yOffset: { type:
|
|
15
|
-
xOffset: { type:
|
|
14
|
+
yOffset: { type: void 0, required: false },
|
|
15
|
+
xOffset: { type: void 0, required: false },
|
|
16
16
|
radius: { type: [String, Number], required: false },
|
|
17
17
|
size: { type: String, required: false },
|
|
18
18
|
shadow: { type: String, required: false },
|
|
@@ -11,9 +11,9 @@ type __VLS_ModelProps = {
|
|
|
11
11
|
'open'?: DialogModel['open'];
|
|
12
12
|
};
|
|
13
13
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
14
|
-
declare var
|
|
14
|
+
declare var __VLS_11: {};
|
|
15
15
|
type __VLS_Slots = {} & {
|
|
16
|
-
default?: (props: typeof
|
|
16
|
+
default?: (props: typeof __VLS_11) => any;
|
|
17
17
|
};
|
|
18
18
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
19
|
close: () => any;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { DialogTitleProps } from '../dialog/index.js';
|
|
2
2
|
export interface ModalTitleProps 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<ModalTitleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ModalTitleProps> & 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 ModalTitleProps 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<ModalTitleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ModalTitleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
9
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -12,9 +12,9 @@ export interface NavIconLinkProps extends ActionIconProps, Omit<NuxtLinkProps, '
|
|
|
12
12
|
/** Variant for not active state @default `filled` */
|
|
13
13
|
notActive?: ActionIconProps['variant'];
|
|
14
14
|
}
|
|
15
|
-
declare var
|
|
15
|
+
declare var __VLS_16: {};
|
|
16
16
|
type __VLS_Slots = {} & {
|
|
17
|
-
default?: (props: typeof
|
|
17
|
+
default?: (props: typeof __VLS_16) => any;
|
|
18
18
|
};
|
|
19
19
|
declare const __VLS_base: import("vue").DefineComponent<NavIconLinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NavIconLinkProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
20
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -12,9 +12,9 @@ export interface NavIconLinkProps extends ActionIconProps, Omit<NuxtLinkProps, '
|
|
|
12
12
|
/** Variant for not active state @default `filled` */
|
|
13
13
|
notActive?: ActionIconProps['variant'];
|
|
14
14
|
}
|
|
15
|
-
declare var
|
|
15
|
+
declare var __VLS_16: {};
|
|
16
16
|
type __VLS_Slots = {} & {
|
|
17
|
-
default?: (props: typeof
|
|
17
|
+
default?: (props: typeof __VLS_16) => any;
|
|
18
18
|
};
|
|
19
19
|
declare const __VLS_base: import("vue").DefineComponent<NavIconLinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NavIconLinkProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
20
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -14,15 +14,15 @@ export interface NavLinkProps extends BoxProps, Omit<NuxtLinkProps, 'href' | 'cu
|
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
variant?: 'filled' | 'light' | 'subtle';
|
|
16
16
|
}
|
|
17
|
-
declare var
|
|
17
|
+
declare var __VLS_16: {}, __VLS_24: {}, __VLS_32: {}, __VLS_34: {};
|
|
18
18
|
type __VLS_Slots = {} & {
|
|
19
|
-
leftSection?: (props: typeof
|
|
19
|
+
leftSection?: (props: typeof __VLS_16) => any;
|
|
20
20
|
} & {
|
|
21
|
-
default?: (props: typeof
|
|
21
|
+
default?: (props: typeof __VLS_24) => any;
|
|
22
22
|
} & {
|
|
23
|
-
description?: (props: typeof
|
|
23
|
+
description?: (props: typeof __VLS_32) => any;
|
|
24
24
|
} & {
|
|
25
|
-
rightSection?: (props: typeof
|
|
25
|
+
rightSection?: (props: typeof __VLS_34) => any;
|
|
26
26
|
};
|
|
27
27
|
declare const __VLS_base: import("vue").DefineComponent<NavLinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NavLinkProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -14,15 +14,15 @@ export interface NavLinkProps extends BoxProps, Omit<NuxtLinkProps, 'href' | 'cu
|
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
variant?: 'filled' | 'light' | 'subtle';
|
|
16
16
|
}
|
|
17
|
-
declare var
|
|
17
|
+
declare var __VLS_16: {}, __VLS_24: {}, __VLS_32: {}, __VLS_34: {};
|
|
18
18
|
type __VLS_Slots = {} & {
|
|
19
|
-
leftSection?: (props: typeof
|
|
19
|
+
leftSection?: (props: typeof __VLS_16) => any;
|
|
20
20
|
} & {
|
|
21
|
-
default?: (props: typeof
|
|
21
|
+
default?: (props: typeof __VLS_24) => any;
|
|
22
22
|
} & {
|
|
23
|
-
description?: (props: typeof
|
|
23
|
+
description?: (props: typeof __VLS_32) => any;
|
|
24
24
|
} & {
|
|
25
|
-
rightSection?: (props: typeof
|
|
25
|
+
rightSection?: (props: typeof __VLS_34) => any;
|
|
26
26
|
};
|
|
27
27
|
declare const __VLS_base: import("vue").DefineComponent<NavLinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NavLinkProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
28
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -5,9 +5,9 @@ export interface PaperProps extends BoxProps {
|
|
|
5
5
|
radius?: NuanceRadius;
|
|
6
6
|
withBorder?: boolean;
|
|
7
7
|
}
|
|
8
|
-
declare var
|
|
8
|
+
declare var __VLS_8: {};
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
|
-
default?: (props: typeof
|
|
10
|
+
default?: (props: typeof __VLS_8) => any;
|
|
11
11
|
};
|
|
12
12
|
declare const __VLS_base: import("vue").DefineComponent<PaperProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PaperProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -5,9 +5,9 @@ export interface PaperProps extends BoxProps {
|
|
|
5
5
|
radius?: NuanceRadius;
|
|
6
6
|
withBorder?: boolean;
|
|
7
7
|
}
|
|
8
|
-
declare var
|
|
8
|
+
declare var __VLS_8: {};
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
|
-
default?: (props: typeof
|
|
10
|
+
default?: (props: typeof __VLS_8) => any;
|
|
11
11
|
};
|
|
12
12
|
declare const __VLS_base: import("vue").DefineComponent<PaperProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PaperProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -19,5 +19,6 @@ export interface UsePopoverReturn {
|
|
|
19
19
|
arrowRef: ShallowRef<HTMLElement | null>;
|
|
20
20
|
targetRef: ShallowRef<HTMLElement | null>;
|
|
21
21
|
dropdownRef: ShallowRef<HTMLElement | null>;
|
|
22
|
+
opened: ModelRef<boolean>;
|
|
22
23
|
}
|
|
23
24
|
export declare function usePopover(options: PopoverOptions): UsePopoverReturn;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** Disables auto click targeting @default `false` */
|
|
3
|
+
disable?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_11: {};
|
|
2
6
|
type __VLS_Slots = {} & {
|
|
3
|
-
default?: (props: typeof
|
|
7
|
+
default?: (props: typeof __VLS_11) => any;
|
|
4
8
|
};
|
|
5
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
10
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
11
|
declare const _default: typeof __VLS_export;
|
|
8
12
|
export default _default;
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import Renderless from "../renderless/renderless.vue";
|
|
3
3
|
import { usePopoverState } from "./lib/context";
|
|
4
|
-
const {
|
|
4
|
+
const { disable = false } = defineProps({
|
|
5
|
+
disable: { type: Boolean, required: false }
|
|
6
|
+
});
|
|
7
|
+
const { id, store: { targetRef, opened }, disabled } = usePopoverState();
|
|
5
8
|
</script>
|
|
6
9
|
|
|
7
10
|
<template>
|
|
8
|
-
<Renderless
|
|
11
|
+
<Renderless
|
|
12
|
+
ref='targetRef'
|
|
13
|
+
:disabled
|
|
14
|
+
:popovertarget='id'
|
|
15
|
+
@click.stop.prevent='!disable && (opened = !opened)'
|
|
16
|
+
>
|
|
9
17
|
<slot />
|
|
10
18
|
</Renderless>
|
|
11
19
|
</template>
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** Disables auto click targeting @default `false` */
|
|
3
|
+
disable?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_11: {};
|
|
2
6
|
type __VLS_Slots = {} & {
|
|
3
|
-
default?: (props: typeof
|
|
7
|
+
default?: (props: typeof __VLS_11) => any;
|
|
4
8
|
};
|
|
5
|
-
declare const __VLS_base: import("vue").DefineComponent<
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
10
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
11
|
declare const _default: typeof __VLS_export;
|
|
8
12
|
export default _default;
|
|
@@ -21,7 +21,7 @@ const {
|
|
|
21
21
|
placement: { type: null, required: false },
|
|
22
22
|
offset: { type: [Number, Object, Function], required: false },
|
|
23
23
|
keepMounted: { type: Boolean, required: false },
|
|
24
|
-
width: { type: null, required: false },
|
|
24
|
+
width: { type: [String, null], required: false },
|
|
25
25
|
withArrow: { type: Boolean, required: false },
|
|
26
26
|
arrowSize: { type: Number, required: false },
|
|
27
27
|
arrowOffset: { type: Number, required: false },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BoxProps } from '@nui/components';
|
|
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<BoxProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BoxProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
7
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BoxProps } from '@nui/components';
|
|
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<BoxProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BoxProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
7
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|