@bitrix24/b24ui-nuxt 0.5.10 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nuxt/b24ui/input-menu.ts +2 -2
- package/.nuxt/b24ui/select-menu.ts +4 -4
- package/.nuxt/b24ui/select.ts +2 -2
- package/dist/meta.d.mts +148 -1
- package/dist/meta.mjs +148 -1
- package/dist/module.json +2 -2
- package/dist/module.mjs +2 -2
- package/dist/runtime/components/Advice.vue +10 -30
- package/dist/runtime/components/Alert.vue +17 -53
- package/dist/runtime/components/App.vue +9 -22
- package/dist/runtime/components/Avatar.vue +12 -38
- package/dist/runtime/components/AvatarGroup.vue +7 -20
- package/dist/runtime/components/Badge.vue +18 -61
- package/dist/runtime/components/Button.vue +55 -177
- package/dist/runtime/components/ButtonGroup.vue +6 -22
- package/dist/runtime/components/Calendar.vue +38 -151
- package/dist/runtime/components/Checkbox.vue +17 -59
- package/dist/runtime/components/Chip.vue +11 -44
- package/dist/runtime/components/Collapsible.vue +8 -30
- package/dist/runtime/components/Container.vue +3 -8
- package/dist/runtime/components/Countdown.vue +15 -60
- package/dist/runtime/components/DescriptionList.vue +10 -34
- package/dist/runtime/components/DropdownMenu.vue +16 -61
- package/dist/runtime/components/DropdownMenuContent.vue +41 -106
- package/dist/runtime/components/Form.vue +12 -45
- package/dist/runtime/components/FormField.vue +16 -56
- package/dist/runtime/components/Input.vue +29 -110
- package/dist/runtime/components/InputMenu.vue +76 -192
- package/dist/runtime/components/InputMenu.vue.d.ts +25 -6
- package/dist/runtime/components/InputNumber.vue +35 -136
- package/dist/runtime/components/Kbd.vue +6 -21
- package/dist/runtime/components/Link.vue +28 -115
- package/dist/runtime/components/LinkBase.vue +11 -42
- package/dist/runtime/components/Modal.vue +20 -77
- package/dist/runtime/components/ModalDialogClose.vue +1 -0
- package/dist/runtime/components/Navbar.vue +4 -13
- package/dist/runtime/components/NavbarDivider.vue +4 -13
- package/dist/runtime/components/NavbarSection.vue +4 -13
- package/dist/runtime/components/NavbarSpacer.vue +4 -13
- package/dist/runtime/components/NavigationMenu.vue +39 -107
- package/dist/runtime/components/OverlayProvider.vue +1 -1
- package/dist/runtime/components/Popover.vue +12 -53
- package/dist/runtime/components/Progress.vue +13 -52
- package/dist/runtime/components/RadioGroup.vue +20 -81
- package/dist/runtime/components/Range.vue +16 -64
- package/dist/runtime/components/Select.vue +39 -141
- package/dist/runtime/components/Select.vue.d.ts +1 -0
- package/dist/runtime/components/SelectMenu.vue +79 -172
- package/dist/runtime/components/SelectMenu.vue.d.ts +1 -1
- package/dist/runtime/components/Separator.vue +13 -46
- package/dist/runtime/components/Sidebar.vue +4 -13
- package/dist/runtime/components/SidebarBody.vue +5 -18
- package/dist/runtime/components/SidebarFooter.vue +4 -13
- package/dist/runtime/components/SidebarHeader.vue +4 -13
- package/dist/runtime/components/SidebarHeading.vue +4 -13
- package/dist/runtime/components/SidebarLayout.vue +12 -18
- package/dist/runtime/components/SidebarSection.vue +4 -13
- package/dist/runtime/components/SidebarSpacer.vue +4 -13
- package/dist/runtime/components/Skeleton.vue +3 -8
- package/dist/runtime/components/Slideover.vue +20 -78
- package/dist/runtime/components/StackedLayout.vue +12 -18
- package/dist/runtime/components/Switch.vue +21 -75
- package/dist/runtime/components/Tabs.vue +22 -64
- package/dist/runtime/components/Textarea.vue +30 -115
- package/dist/runtime/components/Toast.vue +20 -67
- package/dist/runtime/components/Toaster.vue +15 -38
- package/dist/runtime/components/Tooltip.vue +16 -58
- package/dist/runtime/components/content/TableWrapper.vue +12 -46
- package/dist/runtime/composables/useFormField.d.ts +1 -1
- package/dist/runtime/composables/useOverlay.d.ts +14 -7
- package/dist/runtime/composables/useOverlay.js +14 -6
- package/dist/runtime/prose/A.vue +2 -8
- package/dist/runtime/prose/Blockquote.vue +2 -8
- package/dist/runtime/prose/Code.vue +3 -12
- package/dist/runtime/prose/Em.vue +2 -8
- package/dist/runtime/prose/H1.vue +2 -8
- package/dist/runtime/prose/H2.vue +2 -8
- package/dist/runtime/prose/H3.vue +2 -8
- package/dist/runtime/prose/H4.vue +2 -8
- package/dist/runtime/prose/H5.vue +2 -8
- package/dist/runtime/prose/H6.vue +2 -8
- package/dist/runtime/prose/Hr.vue +2 -8
- package/dist/runtime/prose/Img.vue +2 -8
- package/dist/runtime/prose/Li.vue +2 -8
- package/dist/runtime/prose/Ol.vue +2 -8
- package/dist/runtime/prose/P.vue +2 -8
- package/dist/runtime/prose/Pre.vue +5 -17
- package/dist/runtime/prose/Strong.vue +2 -8
- package/dist/runtime/prose/Table.vue +8 -33
- package/dist/runtime/prose/Tbody.vue +2 -8
- package/dist/runtime/prose/Td.vue +2 -8
- package/dist/runtime/prose/Th.vue +2 -8
- package/dist/runtime/prose/Thead.vue +2 -8
- package/dist/runtime/prose/Tr.vue +2 -8
- package/dist/runtime/prose/Ul.vue +2 -8
- package/dist/runtime/utils/link.d.ts +3 -3
- package/dist/runtime/vue/components/Link.vue +29 -115
- package/dist/shared/{b24ui-nuxt.CS9Lf0os.mjs → b24ui-nuxt.BA6Y2FnC.mjs} +6 -6
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +11 -7
|
@@ -8,129 +8,44 @@ const textarea = tv({ extend: tv(theme), ...appConfigTextarea.b24ui?.textarea ||
|
|
|
8
8
|
|
|
9
9
|
<script setup>
|
|
10
10
|
import { ref, computed, onMounted, nextTick, watch } from "vue";
|
|
11
|
+
import { Primitive } from "reka-ui";
|
|
11
12
|
import { useComponentIcons } from "../composables/useComponentIcons";
|
|
12
13
|
import { useFormField } from "../composables/useFormField";
|
|
13
14
|
import { looseToNumber } from "../utils";
|
|
15
|
+
import B24Avatar from "./Avatar.vue";
|
|
14
16
|
defineOptions({ inheritAttrs: false });
|
|
15
17
|
const props = defineProps({
|
|
16
|
-
as: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
underline: {
|
|
45
|
-
type: Boolean,
|
|
46
|
-
required: false
|
|
47
|
-
},
|
|
48
|
-
rounded: {
|
|
49
|
-
type: Boolean,
|
|
50
|
-
required: false
|
|
51
|
-
},
|
|
52
|
-
required: {
|
|
53
|
-
type: Boolean,
|
|
54
|
-
required: false
|
|
55
|
-
},
|
|
56
|
-
autofocus: {
|
|
57
|
-
type: Boolean,
|
|
58
|
-
required: false
|
|
59
|
-
},
|
|
60
|
-
autofocusDelay: {
|
|
61
|
-
type: Number,
|
|
62
|
-
required: false,
|
|
63
|
-
default: 0
|
|
64
|
-
},
|
|
65
|
-
autoresize: {
|
|
66
|
-
type: Boolean,
|
|
67
|
-
required: false
|
|
68
|
-
},
|
|
69
|
-
autoresizeDelay: {
|
|
70
|
-
type: Number,
|
|
71
|
-
required: false,
|
|
72
|
-
default: 0
|
|
73
|
-
},
|
|
74
|
-
disabled: {
|
|
75
|
-
type: Boolean,
|
|
76
|
-
required: false
|
|
77
|
-
},
|
|
78
|
-
rows: {
|
|
79
|
-
type: Number,
|
|
80
|
-
required: false,
|
|
81
|
-
default: 3
|
|
82
|
-
},
|
|
83
|
-
maxrows: {
|
|
84
|
-
type: Number,
|
|
85
|
-
required: false,
|
|
86
|
-
default: 5
|
|
87
|
-
},
|
|
88
|
-
tag: {
|
|
89
|
-
type: String,
|
|
90
|
-
required: false
|
|
91
|
-
},
|
|
92
|
-
tagColor: {
|
|
93
|
-
type: null,
|
|
94
|
-
required: false
|
|
95
|
-
},
|
|
96
|
-
highlight: {
|
|
97
|
-
type: Boolean,
|
|
98
|
-
required: false
|
|
99
|
-
},
|
|
100
|
-
class: {
|
|
101
|
-
type: null,
|
|
102
|
-
required: false
|
|
103
|
-
},
|
|
104
|
-
b24ui: {
|
|
105
|
-
type: null,
|
|
106
|
-
required: false
|
|
107
|
-
},
|
|
108
|
-
icon: {
|
|
109
|
-
type: [Function, Object],
|
|
110
|
-
required: false
|
|
111
|
-
},
|
|
112
|
-
avatar: {
|
|
113
|
-
type: Object,
|
|
114
|
-
required: false
|
|
115
|
-
},
|
|
116
|
-
loading: {
|
|
117
|
-
type: Boolean,
|
|
118
|
-
required: false
|
|
119
|
-
},
|
|
120
|
-
trailing: {
|
|
121
|
-
type: Boolean,
|
|
122
|
-
required: false
|
|
123
|
-
},
|
|
124
|
-
trailingIcon: {
|
|
125
|
-
type: [Function, Object],
|
|
126
|
-
required: false
|
|
127
|
-
}
|
|
18
|
+
as: { type: null, required: false },
|
|
19
|
+
id: { type: String, required: false },
|
|
20
|
+
name: { type: String, required: false },
|
|
21
|
+
placeholder: { type: String, required: false },
|
|
22
|
+
color: { type: null, required: false },
|
|
23
|
+
noPadding: { type: Boolean, required: false },
|
|
24
|
+
noBorder: { type: Boolean, required: false },
|
|
25
|
+
underline: { type: Boolean, required: false },
|
|
26
|
+
rounded: { type: Boolean, required: false },
|
|
27
|
+
required: { type: Boolean, required: false },
|
|
28
|
+
autofocus: { type: Boolean, required: false },
|
|
29
|
+
autofocusDelay: { type: Number, required: false, default: 0 },
|
|
30
|
+
autoresize: { type: Boolean, required: false },
|
|
31
|
+
autoresizeDelay: { type: Number, required: false, default: 0 },
|
|
32
|
+
disabled: { type: Boolean, required: false },
|
|
33
|
+
rows: { type: Number, required: false, default: 3 },
|
|
34
|
+
maxrows: { type: Number, required: false, default: 5 },
|
|
35
|
+
tag: { type: String, required: false },
|
|
36
|
+
tagColor: { type: null, required: false },
|
|
37
|
+
highlight: { type: Boolean, required: false },
|
|
38
|
+
class: { type: null, required: false },
|
|
39
|
+
b24ui: { type: null, required: false },
|
|
40
|
+
icon: { type: [Function, Object], required: false },
|
|
41
|
+
avatar: { type: Object, required: false },
|
|
42
|
+
loading: { type: Boolean, required: false },
|
|
43
|
+
trailing: { type: Boolean, required: false },
|
|
44
|
+
trailingIcon: { type: [Function, Object], required: false }
|
|
128
45
|
});
|
|
129
46
|
const slots = defineSlots();
|
|
130
47
|
const emits = defineEmits(["update:modelValue", "blur", "change"]);
|
|
131
|
-
const [modelValue, modelModifiers] = defineModel({
|
|
132
|
-
"type": [String, Number, null]
|
|
133
|
-
});
|
|
48
|
+
const [modelValue, modelModifiers] = defineModel({ type: [String, Number, null] });
|
|
134
49
|
const { emitFormFocus, emitFormBlur, emitFormInput, emitFormChange, color, id, name, highlight, disabled, ariaAttrs } = useFormField(props, { deferInputValidation: true });
|
|
135
50
|
const { isLeading, isTrailing, leadingIconName, trailingIconName } = useComponentIcons(props);
|
|
136
51
|
const isTag = computed(() => {
|
|
@@ -8,76 +8,29 @@ const toast = tv({ extend: tv(theme), ...appConfigToast.b24ui?.toast || {} });
|
|
|
8
8
|
|
|
9
9
|
<script setup>
|
|
10
10
|
import { ref, computed, onMounted } from "vue";
|
|
11
|
-
import { useForwardPropsEmits } from "reka-ui";
|
|
11
|
+
import { ToastRoot, ToastTitle, ToastDescription, ToastAction, ToastClose, useForwardPropsEmits } from "reka-ui";
|
|
12
12
|
import { reactivePick } from "@vueuse/core";
|
|
13
13
|
import { useLocale } from "../composables/useLocale";
|
|
14
|
+
import icons from "../dictionary/icons";
|
|
15
|
+
import B24Avatar from "./Avatar.vue";
|
|
16
|
+
import B24Button from "./Button.vue";
|
|
14
17
|
const props = defineProps({
|
|
15
|
-
as: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
avatar: {
|
|
32
|
-
type: Object,
|
|
33
|
-
required: false
|
|
34
|
-
},
|
|
35
|
-
color: {
|
|
36
|
-
type: null,
|
|
37
|
-
required: false
|
|
38
|
-
},
|
|
39
|
-
orientation: {
|
|
40
|
-
type: null,
|
|
41
|
-
required: false,
|
|
42
|
-
default: "vertical"
|
|
43
|
-
},
|
|
44
|
-
actions: {
|
|
45
|
-
type: Array,
|
|
46
|
-
required: false
|
|
47
|
-
},
|
|
48
|
-
close: {
|
|
49
|
-
type: [Boolean, Object],
|
|
50
|
-
required: false,
|
|
51
|
-
default: true
|
|
52
|
-
},
|
|
53
|
-
closeIcon: {
|
|
54
|
-
type: [Function, Object],
|
|
55
|
-
required: false
|
|
56
|
-
},
|
|
57
|
-
class: {
|
|
58
|
-
type: null,
|
|
59
|
-
required: false
|
|
60
|
-
},
|
|
61
|
-
b24ui: {
|
|
62
|
-
type: Object,
|
|
63
|
-
required: false
|
|
64
|
-
},
|
|
65
|
-
defaultOpen: {
|
|
66
|
-
type: Boolean,
|
|
67
|
-
required: false
|
|
68
|
-
},
|
|
69
|
-
open: {
|
|
70
|
-
type: Boolean,
|
|
71
|
-
required: false
|
|
72
|
-
},
|
|
73
|
-
type: {
|
|
74
|
-
type: String,
|
|
75
|
-
required: false
|
|
76
|
-
},
|
|
77
|
-
duration: {
|
|
78
|
-
type: Number,
|
|
79
|
-
required: false
|
|
80
|
-
}
|
|
18
|
+
as: { type: null, required: false },
|
|
19
|
+
title: { type: [String, Object, Function], required: false },
|
|
20
|
+
description: { type: [String, Object, Function], required: false },
|
|
21
|
+
icon: { type: [Function, Object], required: false },
|
|
22
|
+
avatar: { type: Object, required: false },
|
|
23
|
+
color: { type: null, required: false },
|
|
24
|
+
orientation: { type: null, required: false, default: "vertical" },
|
|
25
|
+
actions: { type: Array, required: false },
|
|
26
|
+
close: { type: [Boolean, Object], required: false, default: true },
|
|
27
|
+
closeIcon: { type: [Function, Object], required: false },
|
|
28
|
+
class: { type: null, required: false },
|
|
29
|
+
b24ui: { type: Object, required: false },
|
|
30
|
+
defaultOpen: { type: Boolean, required: false },
|
|
31
|
+
open: { type: Boolean, required: false },
|
|
32
|
+
type: { type: String, required: false },
|
|
33
|
+
duration: { type: Number, required: false }
|
|
81
34
|
});
|
|
82
35
|
const emits = defineEmits(["escapeKeyDown", "pause", "resume", "swipeStart", "swipeMove", "swipeCancel", "swipeEnd", "update:open"]);
|
|
83
36
|
const slots = defineSlots();
|
|
@@ -11,49 +11,26 @@ export default {
|
|
|
11
11
|
|
|
12
12
|
<script setup>
|
|
13
13
|
import { ref, computed } from "vue";
|
|
14
|
-
import { useForwardProps } from "reka-ui";
|
|
14
|
+
import { ToastProvider, ToastViewport, ToastPortal, useForwardProps } from "reka-ui";
|
|
15
15
|
import { reactivePick } from "@vueuse/core";
|
|
16
16
|
import { useToast } from "../composables/useToast";
|
|
17
|
+
import { omit } from "../utils";
|
|
18
|
+
import B24Toast from "./Toast.vue";
|
|
17
19
|
const props = defineProps({
|
|
18
|
-
position: {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
default: true
|
|
27
|
-
},
|
|
28
|
-
portal: {
|
|
29
|
-
type: Boolean,
|
|
30
|
-
required: false,
|
|
31
|
-
default: true
|
|
32
|
-
},
|
|
33
|
-
duration: {
|
|
34
|
-
type: Number,
|
|
35
|
-
required: false,
|
|
36
|
-
default: 5e3
|
|
37
|
-
},
|
|
38
|
-
class: {
|
|
39
|
-
type: null,
|
|
40
|
-
required: false
|
|
41
|
-
},
|
|
42
|
-
b24ui: {
|
|
43
|
-
type: Object,
|
|
44
|
-
required: false
|
|
45
|
-
},
|
|
46
|
-
label: {
|
|
47
|
-
type: String,
|
|
48
|
-
required: false
|
|
49
|
-
},
|
|
50
|
-
swipeThreshold: {
|
|
51
|
-
type: Number,
|
|
52
|
-
required: false
|
|
53
|
-
}
|
|
20
|
+
position: { type: null, required: false, default: "top-right" },
|
|
21
|
+
expand: { type: Boolean, required: false, default: true },
|
|
22
|
+
portal: { type: Boolean, required: false, default: true },
|
|
23
|
+
duration: { type: Number, required: false, default: 5e3 },
|
|
24
|
+
class: { type: null, required: false },
|
|
25
|
+
b24ui: { type: Object, required: false },
|
|
26
|
+
label: { type: String, required: false },
|
|
27
|
+
swipeThreshold: { type: Number, required: false }
|
|
54
28
|
});
|
|
55
29
|
defineSlots();
|
|
56
30
|
const providerProps = useForwardProps(reactivePick(props, "duration", "label", "swipeThreshold"));
|
|
31
|
+
const proxyToastProps = (toast) => {
|
|
32
|
+
return omit(toast, ["id", "close"]);
|
|
33
|
+
};
|
|
57
34
|
const { toasts, remove } = useToast();
|
|
58
35
|
const swipeDirection = computed(() => {
|
|
59
36
|
switch (props.position) {
|
|
@@ -98,7 +75,7 @@ function getOffset(index) {
|
|
|
98
75
|
v-for="(toast, index) in toasts"
|
|
99
76
|
:key="toast.id"
|
|
100
77
|
ref="refs"
|
|
101
|
-
v-bind="
|
|
78
|
+
v-bind="proxyToastProps(toast)"
|
|
102
79
|
:close="toast.close"
|
|
103
80
|
:data-expanded="expanded"
|
|
104
81
|
:data-front="!expanded && index === toasts.length - 1"
|
|
@@ -9,66 +9,24 @@ const tooltip = tv({ extend: tv(theme), ...appConfigTooltip.b24ui?.tooltip || {}
|
|
|
9
9
|
<script setup>
|
|
10
10
|
import { computed, toRef } from "vue";
|
|
11
11
|
import { defu } from "defu";
|
|
12
|
-
import { useForwardPropsEmits } from "reka-ui";
|
|
12
|
+
import { TooltipRoot, TooltipTrigger, TooltipPortal, TooltipContent, TooltipArrow, useForwardPropsEmits } from "reka-ui";
|
|
13
13
|
import { reactivePick } from "@vueuse/core";
|
|
14
|
+
import B24Kbd from "./Kbd.vue";
|
|
14
15
|
const props = defineProps({
|
|
15
|
-
text: {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
required: false
|
|
30
|
-
},
|
|
31
|
-
portal: {
|
|
32
|
-
type: Boolean,
|
|
33
|
-
required: false,
|
|
34
|
-
default: true
|
|
35
|
-
},
|
|
36
|
-
class: {
|
|
37
|
-
type: null,
|
|
38
|
-
required: false
|
|
39
|
-
},
|
|
40
|
-
b24ui: {
|
|
41
|
-
type: Object,
|
|
42
|
-
required: false
|
|
43
|
-
},
|
|
44
|
-
defaultOpen: {
|
|
45
|
-
type: Boolean,
|
|
46
|
-
required: false
|
|
47
|
-
},
|
|
48
|
-
open: {
|
|
49
|
-
type: Boolean,
|
|
50
|
-
required: false
|
|
51
|
-
},
|
|
52
|
-
delayDuration: {
|
|
53
|
-
type: Number,
|
|
54
|
-
required: false
|
|
55
|
-
},
|
|
56
|
-
disableHoverableContent: {
|
|
57
|
-
type: Boolean,
|
|
58
|
-
required: false
|
|
59
|
-
},
|
|
60
|
-
disableClosingTrigger: {
|
|
61
|
-
type: Boolean,
|
|
62
|
-
required: false
|
|
63
|
-
},
|
|
64
|
-
disabled: {
|
|
65
|
-
type: Boolean,
|
|
66
|
-
required: false
|
|
67
|
-
},
|
|
68
|
-
ignoreNonKeyboardFocus: {
|
|
69
|
-
type: Boolean,
|
|
70
|
-
required: false
|
|
71
|
-
}
|
|
16
|
+
text: { type: String, required: false },
|
|
17
|
+
kbds: { type: Array, required: false },
|
|
18
|
+
content: { type: Object, required: false },
|
|
19
|
+
arrow: { type: [Boolean, Object], required: false },
|
|
20
|
+
portal: { type: Boolean, required: false, default: true },
|
|
21
|
+
class: { type: null, required: false },
|
|
22
|
+
b24ui: { type: Object, required: false },
|
|
23
|
+
defaultOpen: { type: Boolean, required: false },
|
|
24
|
+
open: { type: Boolean, required: false },
|
|
25
|
+
delayDuration: { type: Number, required: false },
|
|
26
|
+
disableHoverableContent: { type: Boolean, required: false },
|
|
27
|
+
disableClosingTrigger: { type: Boolean, required: false },
|
|
28
|
+
disabled: { type: Boolean, required: false },
|
|
29
|
+
ignoreNonKeyboardFocus: { type: Boolean, required: false }
|
|
72
30
|
});
|
|
73
31
|
const emits = defineEmits(["update:open"]);
|
|
74
32
|
const slots = defineSlots();
|
|
@@ -8,54 +8,20 @@ const tableWrapper = tv({ extend: tv(theme), ...appConfigTableWrapper.b24ui?.con
|
|
|
8
8
|
|
|
9
9
|
<script setup>
|
|
10
10
|
import { computed } from "vue";
|
|
11
|
+
import { Primitive } from "reka-ui";
|
|
11
12
|
defineOptions({ inheritAttrs: false });
|
|
12
13
|
const props = defineProps({
|
|
13
|
-
as: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
required: false
|
|
25
|
-
},
|
|
26
|
-
zebra: {
|
|
27
|
-
type: Boolean,
|
|
28
|
-
required: false
|
|
29
|
-
},
|
|
30
|
-
pinRows: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
required: false
|
|
33
|
-
},
|
|
34
|
-
pinCols: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
required: false
|
|
37
|
-
},
|
|
38
|
-
rowHover: {
|
|
39
|
-
type: Boolean,
|
|
40
|
-
required: false
|
|
41
|
-
},
|
|
42
|
-
bordered: {
|
|
43
|
-
type: Boolean,
|
|
44
|
-
required: false
|
|
45
|
-
},
|
|
46
|
-
scrollbarThin: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
required: false,
|
|
49
|
-
default: true
|
|
50
|
-
},
|
|
51
|
-
class: {
|
|
52
|
-
type: null,
|
|
53
|
-
required: false
|
|
54
|
-
},
|
|
55
|
-
b24ui: {
|
|
56
|
-
type: Object,
|
|
57
|
-
required: false
|
|
58
|
-
}
|
|
14
|
+
as: { type: null, required: false, default: "div" },
|
|
15
|
+
size: { type: null, required: false },
|
|
16
|
+
rounded: { type: Boolean, required: false },
|
|
17
|
+
zebra: { type: Boolean, required: false },
|
|
18
|
+
pinRows: { type: Boolean, required: false },
|
|
19
|
+
pinCols: { type: Boolean, required: false },
|
|
20
|
+
rowHover: { type: Boolean, required: false },
|
|
21
|
+
bordered: { type: Boolean, required: false },
|
|
22
|
+
scrollbarThin: { type: Boolean, required: false, default: true },
|
|
23
|
+
class: { type: null, required: false },
|
|
24
|
+
b24ui: { type: Object, required: false }
|
|
59
25
|
});
|
|
60
26
|
const b24ui = computed(() => tableWrapper({
|
|
61
27
|
size: props.size,
|
|
@@ -31,7 +31,7 @@ export declare function useFormField<T>(props?: Props<T>, opts?: {
|
|
|
31
31
|
highlight: ComputedRef<boolean | undefined>;
|
|
32
32
|
disabled: ComputedRef<boolean | undefined>;
|
|
33
33
|
emitFormBlur: () => void;
|
|
34
|
-
emitFormInput: import("@vueuse/core").
|
|
34
|
+
emitFormInput: import("@vueuse/core").UseDebounceFnReturn<() => void>;
|
|
35
35
|
emitFormChange: () => void;
|
|
36
36
|
emitFormFocus: () => void;
|
|
37
37
|
ariaAttrs: ComputedRef<{
|
|
@@ -6,22 +6,29 @@ export type OverlayOptions<OverlayAttrs = Record<string, any>> = {
|
|
|
6
6
|
props?: OverlayAttrs;
|
|
7
7
|
destroyOnClose?: boolean;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
interface ManagedOverlayOptionsPrivate<T extends Component> {
|
|
10
10
|
component?: T;
|
|
11
11
|
id: symbol;
|
|
12
12
|
isMounted: boolean;
|
|
13
|
-
|
|
14
|
-
resolvePromise?: (value:
|
|
15
|
-
}
|
|
13
|
+
isOpen: boolean;
|
|
14
|
+
resolvePromise?: (value: any) => void;
|
|
15
|
+
}
|
|
16
16
|
export type Overlay = OverlayOptions<Component> & ManagedOverlayOptionsPrivate<Component>;
|
|
17
|
-
interface OverlayInstance<T> {
|
|
18
|
-
|
|
17
|
+
interface OverlayInstance<T extends Component> extends Omit<ManagedOverlayOptionsPrivate<T>, 'component'> {
|
|
18
|
+
id: symbol;
|
|
19
|
+
result: Promise<CloseEventArgType<ComponentEmit<T>>>;
|
|
20
|
+
open: (props?: ComponentProps<T>) => Omit<OverlayInstance<T>, 'open' | 'close' | 'patch' | 'modelValue' | 'resolvePromise'>;
|
|
19
21
|
close: (value?: any) => void;
|
|
20
22
|
patch: (props: Partial<ComponentProps<T>>) => void;
|
|
21
23
|
}
|
|
22
24
|
declare function _useOverlay(): {
|
|
23
25
|
overlays: import("vue").ShallowReactive<Overlay[]>;
|
|
24
|
-
open: <T extends Component>(id: symbol, props?: ComponentProps<T>) =>
|
|
26
|
+
open: <T extends Component>(id: symbol, props?: ComponentProps<T>) => {
|
|
27
|
+
id: symbol;
|
|
28
|
+
isMounted: boolean;
|
|
29
|
+
isOpen: boolean;
|
|
30
|
+
result: Promise<any>;
|
|
31
|
+
};
|
|
25
32
|
close: (id: symbol, value?: any) => void;
|
|
26
33
|
create: <T extends Component>(component: T, _options?: OverlayOptions<ComponentProps<T>>) => OverlayInstance<T>;
|
|
27
34
|
patch: <T extends Component>(id: symbol, props: Partial<ComponentProps<T>>) => void;
|
|
@@ -6,7 +6,7 @@ function _useOverlay() {
|
|
|
6
6
|
const { props, defaultOpen, destroyOnClose } = _options || {};
|
|
7
7
|
const options = reactive({
|
|
8
8
|
id: Symbol(import.meta.dev ? "useOverlay" : ""),
|
|
9
|
-
|
|
9
|
+
isOpen: !!defaultOpen,
|
|
10
10
|
component: markRaw(component),
|
|
11
11
|
isMounted: !!defaultOpen,
|
|
12
12
|
destroyOnClose: !!destroyOnClose,
|
|
@@ -14,6 +14,9 @@ function _useOverlay() {
|
|
|
14
14
|
});
|
|
15
15
|
overlays.push(options);
|
|
16
16
|
return {
|
|
17
|
+
...options,
|
|
18
|
+
result: new Promise(() => {
|
|
19
|
+
}),
|
|
17
20
|
open: (props2) => open(options.id, props2),
|
|
18
21
|
close: (value) => close(options.id, value),
|
|
19
22
|
patch: (props2) => patch(options.id, props2)
|
|
@@ -24,15 +27,20 @@ function _useOverlay() {
|
|
|
24
27
|
if (props) {
|
|
25
28
|
patch(overlay.id, props);
|
|
26
29
|
}
|
|
27
|
-
overlay.
|
|
30
|
+
overlay.isOpen = true;
|
|
28
31
|
overlay.isMounted = true;
|
|
29
|
-
return
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
return {
|
|
33
|
+
id,
|
|
34
|
+
isMounted: overlay.isMounted,
|
|
35
|
+
isOpen: overlay.isOpen,
|
|
36
|
+
result: new Promise((resolve) => {
|
|
37
|
+
overlay.resolvePromise = resolve;
|
|
38
|
+
})
|
|
39
|
+
};
|
|
32
40
|
};
|
|
33
41
|
const close = (id, value) => {
|
|
34
42
|
const overlay = getOverlay(id);
|
|
35
|
-
overlay.
|
|
43
|
+
overlay.isOpen = false;
|
|
36
44
|
if (overlay.resolvePromise) {
|
|
37
45
|
overlay.resolvePromise(value);
|
|
38
46
|
overlay.resolvePromise = void 0;
|
package/dist/runtime/prose/A.vue
CHANGED
|
@@ -8,14 +8,8 @@ const proseA = tv({ extend: tv(theme), ...appConfigProseA.b24ui?.prose?.a || {}
|
|
|
8
8
|
|
|
9
9
|
<script setup>
|
|
10
10
|
const props = defineProps({
|
|
11
|
-
class: {
|
|
12
|
-
|
|
13
|
-
required: false
|
|
14
|
-
},
|
|
15
|
-
b24ui: {
|
|
16
|
-
type: Object,
|
|
17
|
-
required: false
|
|
18
|
-
}
|
|
11
|
+
class: { type: null, required: false },
|
|
12
|
+
b24ui: { type: Object, required: false }
|
|
19
13
|
});
|
|
20
14
|
const b24ui = proseA({});
|
|
21
15
|
</script>
|
|
@@ -8,14 +8,8 @@ const proseBlockquote = tv({ extend: tv(theme), ...appConfigProseBlockquote.b24u
|
|
|
8
8
|
|
|
9
9
|
<script setup>
|
|
10
10
|
const props = defineProps({
|
|
11
|
-
class: {
|
|
12
|
-
|
|
13
|
-
required: false
|
|
14
|
-
},
|
|
15
|
-
b24ui: {
|
|
16
|
-
type: Object,
|
|
17
|
-
required: false
|
|
18
|
-
}
|
|
11
|
+
class: { type: null, required: false },
|
|
12
|
+
b24ui: { type: Object, required: false }
|
|
19
13
|
});
|
|
20
14
|
const b24ui = proseBlockquote({});
|
|
21
15
|
</script>
|
|
@@ -9,18 +9,9 @@ const proseCode = tv({ extend: tv(theme), ...appConfigProseCode.b24ui?.prose?.co
|
|
|
9
9
|
<script setup>
|
|
10
10
|
import { computed } from "vue";
|
|
11
11
|
const props = defineProps({
|
|
12
|
-
color: {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
class: {
|
|
17
|
-
type: null,
|
|
18
|
-
required: false
|
|
19
|
-
},
|
|
20
|
-
b24ui: {
|
|
21
|
-
type: Object,
|
|
22
|
-
required: false
|
|
23
|
-
}
|
|
12
|
+
color: { type: null, required: false },
|
|
13
|
+
class: { type: null, required: false },
|
|
14
|
+
b24ui: { type: Object, required: false }
|
|
24
15
|
});
|
|
25
16
|
const b24ui = computed(() => proseCode({
|
|
26
17
|
color: props.color
|
|
@@ -8,14 +8,8 @@ const proseEm = tv({ extend: tv(theme), ...appConfigProseEm.b24ui?.prose?.em ||
|
|
|
8
8
|
|
|
9
9
|
<script setup>
|
|
10
10
|
const props = defineProps({
|
|
11
|
-
class: {
|
|
12
|
-
|
|
13
|
-
required: false
|
|
14
|
-
},
|
|
15
|
-
b24ui: {
|
|
16
|
-
type: Object,
|
|
17
|
-
required: false
|
|
18
|
-
}
|
|
11
|
+
class: { type: null, required: false },
|
|
12
|
+
b24ui: { type: Object, required: false }
|
|
19
13
|
});
|
|
20
14
|
const b24ui = proseEm({});
|
|
21
15
|
</script>
|
|
@@ -8,14 +8,8 @@ const proseH1 = tv({ extend: tv(theme), ...appConfigProseH1.b24ui?.prose?.h1 ||
|
|
|
8
8
|
|
|
9
9
|
<script setup>
|
|
10
10
|
const props = defineProps({
|
|
11
|
-
class: {
|
|
12
|
-
|
|
13
|
-
required: false
|
|
14
|
-
},
|
|
15
|
-
b24ui: {
|
|
16
|
-
type: Object,
|
|
17
|
-
required: false
|
|
18
|
-
}
|
|
11
|
+
class: { type: null, required: false },
|
|
12
|
+
b24ui: { type: Object, required: false }
|
|
19
13
|
});
|
|
20
14
|
const b24ui = proseH1({});
|
|
21
15
|
</script>
|
|
@@ -8,14 +8,8 @@ const proseH2 = tv({ extend: tv(theme), ...appConfigProseH2.b24ui?.prose?.h2 ||
|
|
|
8
8
|
|
|
9
9
|
<script setup>
|
|
10
10
|
const props = defineProps({
|
|
11
|
-
class: {
|
|
12
|
-
|
|
13
|
-
required: false
|
|
14
|
-
},
|
|
15
|
-
b24ui: {
|
|
16
|
-
type: Object,
|
|
17
|
-
required: false
|
|
18
|
-
}
|
|
11
|
+
class: { type: null, required: false },
|
|
12
|
+
b24ui: { type: Object, required: false }
|
|
19
13
|
});
|
|
20
14
|
const b24ui = proseH2({});
|
|
21
15
|
</script>
|