@bitrix24/b24ui-nuxt 0.3.0 → 0.3.1
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/form-field.ts +1 -1
- package/.nuxt/b24ui/modal.ts +10 -2
- package/.nuxt/b24ui/toast.ts +2 -2
- package/README.md +10 -0
- package/dist/meta.cjs +351 -332
- package/dist/meta.d.cts +351 -332
- package/dist/meta.d.mts +351 -332
- package/dist/meta.d.ts +351 -332
- package/dist/meta.mjs +351 -332
- package/dist/module.cjs +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/Button.vue +3 -3
- package/dist/runtime/components/Modal.vue +4 -2
- package/dist/runtime/components/Toaster.vue +3 -2
- package/dist/runtime/composables/useComponentIcons.d.ts +2 -2
- package/dist/runtime/vue/components/Link.vue +24 -5
- package/dist/shared/{b24ui-nuxt.aLj37Bax.mjs → b24ui-nuxt.CxFyzKH7.mjs} +13 -5
- package/dist/shared/{b24ui-nuxt.BDw9-NAb.cjs → b24ui-nuxt.DkKTVBhL.cjs} +13 -5
- package/dist/unplugin.cjs +1 -1
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.cjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +1 -1
package/dist/module.cjs
CHANGED
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defu } from 'defu';
|
|
2
2
|
import { defineNuxtModule, createResolver, addVitePlugin, addPlugin, addComponentsDir, addImportsDir, hasNuxtModule, installModule } from '@nuxt/kit';
|
|
3
|
-
import { d as defaultOptions, a as getDefaultUiConfig, b as addTemplates } from './shared/b24ui-nuxt.
|
|
3
|
+
import { d as defaultOptions, a as getDefaultUiConfig, b as addTemplates } from './shared/b24ui-nuxt.CxFyzKH7.mjs';
|
|
4
4
|
import 'node:url';
|
|
5
5
|
import 'scule';
|
|
6
6
|
|
|
@@ -133,9 +133,9 @@ const b24ui = computed(() => button({
|
|
|
133
133
|
v-if="isLoading"
|
|
134
134
|
class="h-full w-full absolute inset-0 flex flex-row flex-nowrap items-center justify-center"
|
|
135
135
|
>
|
|
136
|
-
<LoaderWaitIcon v-if="useWait" class="
|
|
137
|
-
<LoaderClockIcon v-else-if="useClock" class="
|
|
138
|
-
<SpinnerIcon v-else class="animate-spin stroke-2
|
|
136
|
+
<LoaderWaitIcon v-if="useWait" class="w-[28px] h-[28px]" aria-hidden="true" />
|
|
137
|
+
<LoaderClockIcon v-else-if="useClock" class="w-[28px] h-[28px]" aria-hidden="true" />
|
|
138
|
+
<SpinnerIcon v-else class="size-lg animate-spin stroke-2" aria-hidden="true" />
|
|
139
139
|
</div>
|
|
140
140
|
<div
|
|
141
141
|
:class="[
|
|
@@ -51,6 +51,7 @@ export interface ModalProps extends DialogRootProps {
|
|
|
51
51
|
* @defaultValue true
|
|
52
52
|
*/
|
|
53
53
|
dismissible?: boolean
|
|
54
|
+
scrollbarThin?: boolean
|
|
54
55
|
class?: any
|
|
55
56
|
b24ui?: Partial<typeof modal.slots>
|
|
56
57
|
}
|
|
@@ -83,7 +84,8 @@ const props = withDefaults(defineProps<ModalProps>(), {
|
|
|
83
84
|
overlay: true,
|
|
84
85
|
transition: true,
|
|
85
86
|
modal: true,
|
|
86
|
-
dismissible: true
|
|
87
|
+
dismissible: true,
|
|
88
|
+
scrollbarThin: true
|
|
87
89
|
})
|
|
88
90
|
const emits = defineEmits<ModalEmits>()
|
|
89
91
|
const slots = defineSlots<ModalSlots>()
|
|
@@ -170,7 +172,7 @@ const b24ui = computed(() => modal({
|
|
|
170
172
|
</slot>
|
|
171
173
|
</div>
|
|
172
174
|
|
|
173
|
-
<div v-if="!!slots.body" :class="b24ui.body({ class: props.b24ui?.body })">
|
|
175
|
+
<div v-if="!!slots.body" :class="b24ui.body({ class: props.b24ui?.body, scrollbarThin: Boolean(props.scrollbarThin) })">
|
|
174
176
|
<slot name="body" />
|
|
175
177
|
</div>
|
|
176
178
|
|
|
@@ -46,9 +46,10 @@ import { omit } from '../utils'
|
|
|
46
46
|
import B24Toast from './Toast.vue'
|
|
47
47
|
|
|
48
48
|
const props = withDefaults(defineProps<ToasterProps>(), {
|
|
49
|
+
position: 'top-right' as const,
|
|
49
50
|
expand: true,
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
duration: 5000,
|
|
52
|
+
portal: true
|
|
52
53
|
})
|
|
53
54
|
defineSlots<ToasterSlots>()
|
|
54
55
|
|
|
@@ -15,6 +15,6 @@ export interface UseComponentIconsProps {
|
|
|
15
15
|
export declare function useComponentIcons(componentProps: MaybeRefOrGetter<UseComponentIconsProps>): {
|
|
16
16
|
isLeading: import("vue").ComputedRef<any>;
|
|
17
17
|
isTrailing: import("vue").ComputedRef<boolean>;
|
|
18
|
-
leadingIconName: import("vue").ComputedRef<
|
|
19
|
-
trailingIconName: import("vue").ComputedRef<
|
|
18
|
+
leadingIconName: import("vue").ComputedRef<import("vue").FunctionalComponent<import("vue").HTMLAttributes & import("vue").VNodeProps, {}, any, {}> | undefined>;
|
|
19
|
+
trailingIconName: import("vue").ComputedRef<import("vue").FunctionalComponent<import("vue").HTMLAttributes & import("vue").VNodeProps, {}, any, {}> | undefined>;
|
|
20
20
|
};
|
|
@@ -131,7 +131,7 @@ const route = computed(() => {
|
|
|
131
131
|
|
|
132
132
|
const routerLinkProps = useForwardProps(reactiveOmit(props, 'as', 'type', 'disabled', 'active', 'exact', 'exactQuery', 'exactHash', 'activeClass', 'inactiveClass', 'to', 'raw', 'class'))
|
|
133
133
|
|
|
134
|
-
const
|
|
134
|
+
const b24ui = computed(() => tv({
|
|
135
135
|
extend: link,
|
|
136
136
|
variants: {
|
|
137
137
|
active: {
|
|
@@ -193,7 +193,7 @@ function resolveLinkClass({ route, isActive, isExactActive }: any) {
|
|
|
193
193
|
return [props.class, active ? props.activeClass : props.inactiveClass]
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
return
|
|
196
|
+
return b24ui.value({
|
|
197
197
|
class: props.class,
|
|
198
198
|
active,
|
|
199
199
|
disabled: props.disabled,
|
|
@@ -201,12 +201,31 @@ function resolveLinkClass({ route, isActive, isExactActive }: any) {
|
|
|
201
201
|
})
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
+
function resolveLinkClassNoRouter() {
|
|
205
|
+
if (props.raw) {
|
|
206
|
+
return [props.class, props.inactiveClass]
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
return b24ui.value({
|
|
210
|
+
class: props.class,
|
|
211
|
+
disabled: props.disabled,
|
|
212
|
+
isAction: Boolean(props.isAction)
|
|
213
|
+
})
|
|
214
|
+
}
|
|
215
|
+
|
|
204
216
|
// Handle navigation without vue-router
|
|
205
217
|
const handleNavigation = (href: string) => {
|
|
206
218
|
if (isExternal.value) {
|
|
207
219
|
window.location.href = href
|
|
208
220
|
} else {
|
|
209
|
-
|
|
221
|
+
const [path, hash] = href.split('#')
|
|
222
|
+
|
|
223
|
+
window.location.pathname = path || ''
|
|
224
|
+
if (hash) {
|
|
225
|
+
window.location.hash = hash
|
|
226
|
+
} else {
|
|
227
|
+
window.location.hash = ''
|
|
228
|
+
}
|
|
210
229
|
}
|
|
211
230
|
}
|
|
212
231
|
</script>
|
|
@@ -266,9 +285,9 @@ const handleNavigation = (href: string) => {
|
|
|
266
285
|
as,
|
|
267
286
|
type,
|
|
268
287
|
disabled,
|
|
269
|
-
href: to ? (isExternal ? to as string :
|
|
288
|
+
href: to ? (isExternal ? to as string : to as string) : href as string
|
|
270
289
|
}"
|
|
271
|
-
:class="
|
|
290
|
+
:class="resolveLinkClassNoRouter()"
|
|
272
291
|
@click="to && handleNavigation(to as string)"
|
|
273
292
|
>
|
|
274
293
|
<slot :active="false" />
|
|
@@ -1982,7 +1982,7 @@ const formField = {
|
|
|
1982
1982
|
},
|
|
1983
1983
|
required: {
|
|
1984
1984
|
true: {
|
|
1985
|
-
label: "after:content-['*'] after:ms-0.5 after:text-red-500 after:
|
|
1985
|
+
label: "after:content-['*'] after:ms-0.5 after:text-red-500 dark:after:text-red-600"
|
|
1986
1986
|
}
|
|
1987
1987
|
}
|
|
1988
1988
|
},
|
|
@@ -3252,8 +3252,8 @@ const modal = {
|
|
|
3252
3252
|
"fixed bg-white dark:bg-base-950",
|
|
3253
3253
|
"flex flex-col focus:outline-none"
|
|
3254
3254
|
].join(" "),
|
|
3255
|
-
header: "flex items-center gap-1.5 pe-5 pt-0
|
|
3256
|
-
wrapper: "",
|
|
3255
|
+
header: "flex items-center gap-1.5 pe-5 pt-0",
|
|
3256
|
+
wrapper: "min-h-lg2",
|
|
3257
3257
|
body: "flex-1 overflow-y-auto my-2.5 text-md leading-normal",
|
|
3258
3258
|
footer: "flex items-center justify-center gap-3 mt-2.5 pt-4 border-t border-t-1 border-t-base-900/10 dark:border-t-white/20",
|
|
3259
3259
|
title: "font-bold text-md leading-normal text-base-900 dark:text-base-150",
|
|
@@ -3279,7 +3279,15 @@ const modal = {
|
|
|
3279
3279
|
"ring ring-base-300 dark:ring-base-800"
|
|
3280
3280
|
].join(" ")
|
|
3281
3281
|
}
|
|
3282
|
+
},
|
|
3283
|
+
scrollbarThin: {
|
|
3284
|
+
true: {
|
|
3285
|
+
body: "scrollbar-thin"
|
|
3286
|
+
}
|
|
3282
3287
|
}
|
|
3288
|
+
},
|
|
3289
|
+
defaultVariants: {
|
|
3290
|
+
scrollbarThin: true
|
|
3283
3291
|
}
|
|
3284
3292
|
};
|
|
3285
3293
|
|
|
@@ -4854,7 +4862,7 @@ const textarea = {
|
|
|
4854
4862
|
const toast = {
|
|
4855
4863
|
slots: {
|
|
4856
4864
|
root: [
|
|
4857
|
-
"relative group overflow-hidden rounded-[26px] py-3.5 ps-6 pe-4 flex gap-2.5 focus:outline-none",
|
|
4865
|
+
"relative group overflow-hidden rounded-[26px] py-3.5 ps-6 pe-4 flex items-center gap-2.5 focus:outline-none",
|
|
4858
4866
|
"font-b24-primary",
|
|
4859
4867
|
"dark:ring-2 dark:ring-base-900",
|
|
4860
4868
|
"bg-base-ebony/80 dark:bg-base-dark",
|
|
@@ -4920,7 +4928,7 @@ const toast = {
|
|
|
4920
4928
|
actions: "items-center"
|
|
4921
4929
|
},
|
|
4922
4930
|
vertical: {
|
|
4923
|
-
root: "items-
|
|
4931
|
+
root: "items-center",
|
|
4924
4932
|
actions: "items-start mt-1"
|
|
4925
4933
|
}
|
|
4926
4934
|
},
|
|
@@ -1984,7 +1984,7 @@ const formField = {
|
|
|
1984
1984
|
},
|
|
1985
1985
|
required: {
|
|
1986
1986
|
true: {
|
|
1987
|
-
label: "after:content-['*'] after:ms-0.5 after:text-red-500 after:
|
|
1987
|
+
label: "after:content-['*'] after:ms-0.5 after:text-red-500 dark:after:text-red-600"
|
|
1988
1988
|
}
|
|
1989
1989
|
}
|
|
1990
1990
|
},
|
|
@@ -3254,8 +3254,8 @@ const modal = {
|
|
|
3254
3254
|
"fixed bg-white dark:bg-base-950",
|
|
3255
3255
|
"flex flex-col focus:outline-none"
|
|
3256
3256
|
].join(" "),
|
|
3257
|
-
header: "flex items-center gap-1.5 pe-5 pt-0
|
|
3258
|
-
wrapper: "",
|
|
3257
|
+
header: "flex items-center gap-1.5 pe-5 pt-0",
|
|
3258
|
+
wrapper: "min-h-lg2",
|
|
3259
3259
|
body: "flex-1 overflow-y-auto my-2.5 text-md leading-normal",
|
|
3260
3260
|
footer: "flex items-center justify-center gap-3 mt-2.5 pt-4 border-t border-t-1 border-t-base-900/10 dark:border-t-white/20",
|
|
3261
3261
|
title: "font-bold text-md leading-normal text-base-900 dark:text-base-150",
|
|
@@ -3281,7 +3281,15 @@ const modal = {
|
|
|
3281
3281
|
"ring ring-base-300 dark:ring-base-800"
|
|
3282
3282
|
].join(" ")
|
|
3283
3283
|
}
|
|
3284
|
+
},
|
|
3285
|
+
scrollbarThin: {
|
|
3286
|
+
true: {
|
|
3287
|
+
body: "scrollbar-thin"
|
|
3288
|
+
}
|
|
3284
3289
|
}
|
|
3290
|
+
},
|
|
3291
|
+
defaultVariants: {
|
|
3292
|
+
scrollbarThin: true
|
|
3285
3293
|
}
|
|
3286
3294
|
};
|
|
3287
3295
|
|
|
@@ -4856,7 +4864,7 @@ const textarea = {
|
|
|
4856
4864
|
const toast = {
|
|
4857
4865
|
slots: {
|
|
4858
4866
|
root: [
|
|
4859
|
-
"relative group overflow-hidden rounded-[26px] py-3.5 ps-6 pe-4 flex gap-2.5 focus:outline-none",
|
|
4867
|
+
"relative group overflow-hidden rounded-[26px] py-3.5 ps-6 pe-4 flex items-center gap-2.5 focus:outline-none",
|
|
4860
4868
|
"font-b24-primary",
|
|
4861
4869
|
"dark:ring-2 dark:ring-base-900",
|
|
4862
4870
|
"bg-base-ebony/80 dark:bg-base-dark",
|
|
@@ -4922,7 +4930,7 @@ const toast = {
|
|
|
4922
4930
|
actions: "items-center"
|
|
4923
4931
|
},
|
|
4924
4932
|
vertical: {
|
|
4925
|
-
root: "items-
|
|
4933
|
+
root: "items-center",
|
|
4926
4934
|
actions: "items-start mt-1"
|
|
4927
4935
|
}
|
|
4928
4936
|
},
|
package/dist/unplugin.cjs
CHANGED
|
@@ -5,7 +5,7 @@ const pathe = require('pathe');
|
|
|
5
5
|
const unplugin = require('unplugin');
|
|
6
6
|
const defu = require('defu');
|
|
7
7
|
const tailwind = require('@tailwindcss/vite');
|
|
8
|
-
const templates = require('./shared/b24ui-nuxt.
|
|
8
|
+
const templates = require('./shared/b24ui-nuxt.DkKTVBhL.cjs');
|
|
9
9
|
const tinyglobby = require('tinyglobby');
|
|
10
10
|
const knitwork = require('knitwork');
|
|
11
11
|
const MagicString = require('magic-string');
|
package/dist/unplugin.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { join, normalize } from 'pathe';
|
|
|
3
3
|
import { createUnplugin } from 'unplugin';
|
|
4
4
|
import { defu } from 'defu';
|
|
5
5
|
import tailwind from '@tailwindcss/vite';
|
|
6
|
-
import { g as getTemplates, d as defaultOptions, a as getDefaultUiConfig } from './shared/b24ui-nuxt.
|
|
6
|
+
import { g as getTemplates, d as defaultOptions, a as getDefaultUiConfig } from './shared/b24ui-nuxt.CxFyzKH7.mjs';
|
|
7
7
|
import { globSync } from 'tinyglobby';
|
|
8
8
|
import { genSafeVariableName } from 'knitwork';
|
|
9
9
|
import MagicString from 'magic-string';
|
package/dist/vite.cjs
CHANGED
package/dist/vite.mjs
CHANGED
package/package.json
CHANGED