@bitrix24/b24ui-nuxt 0.4.4 → 0.4.6
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/content/table-wrapper.ts +1 -1
- package/.nuxt/b24ui/prose/img.ts +5 -0
- package/.nuxt/b24ui/prose/table.ts +6 -0
- package/.nuxt/b24ui/prose/tbody.ts +5 -0
- package/.nuxt/b24ui/prose/td.ts +5 -0
- package/.nuxt/b24ui/prose/th.ts +5 -0
- package/.nuxt/b24ui/prose/thead.ts +5 -0
- package/.nuxt/b24ui/prose/tr.ts +5 -0
- package/dist/meta.cjs +480 -48
- package/dist/meta.d.cts +480 -48
- package/dist/meta.d.mts +480 -48
- package/dist/meta.d.ts +480 -48
- package/dist/meta.mjs +480 -48
- package/dist/module.cjs +2 -2
- package/dist/module.json +2 -2
- package/dist/module.mjs +2 -2
- package/dist/runtime/components/App.vue +6 -6
- package/dist/runtime/components/Button.vue +1 -0
- package/dist/runtime/components/Form.vue +1 -1
- package/dist/runtime/components/Input.vue +7 -3
- package/dist/runtime/components/LinkBase.vue +4 -2
- package/dist/runtime/components/Textarea.vue +7 -3
- package/dist/runtime/composables/defineLocale.d.ts +4 -4
- package/dist/runtime/composables/useLocale.d.ts +3 -3
- package/dist/runtime/composables/useLocale.js +3 -3
- package/dist/runtime/locale/ar.d.ts +2 -1
- package/dist/runtime/locale/br.d.ts +2 -1
- package/dist/runtime/locale/de.d.ts +2 -1
- package/dist/runtime/locale/en.d.ts +2 -1
- package/dist/runtime/locale/fr.d.ts +2 -1
- package/dist/runtime/locale/id.d.ts +2 -1
- package/dist/runtime/locale/index.d.ts +1 -1
- package/dist/runtime/locale/index.js +1 -1
- package/dist/runtime/locale/it.d.ts +2 -1
- package/dist/runtime/locale/ja.d.ts +2 -1
- package/dist/runtime/locale/kz.d.ts +2 -1
- package/dist/runtime/locale/la.d.ts +2 -1
- package/dist/runtime/locale/ms.d.ts +2 -1
- package/dist/runtime/locale/pl.d.ts +2 -1
- package/dist/runtime/locale/ru.d.ts +2 -1
- package/dist/runtime/locale/sc.d.ts +2 -1
- package/dist/runtime/locale/tc.d.ts +2 -1
- package/dist/runtime/locale/th.d.ts +2 -1
- package/dist/runtime/locale/tr.d.ts +2 -1
- package/dist/runtime/locale/ua.d.ts +2 -1
- package/dist/runtime/locale/vn.d.ts +2 -1
- package/dist/runtime/prose/A.vue +1 -1
- package/dist/runtime/prose/Code.vue +1 -1
- package/dist/runtime/prose/Img.vue +32 -0
- package/dist/runtime/prose/Table.vue +74 -0
- package/dist/runtime/prose/Tbody.vue +34 -0
- package/dist/runtime/prose/Td.vue +34 -0
- package/dist/runtime/prose/Th.vue +34 -0
- package/dist/runtime/prose/Thead.vue +34 -0
- package/dist/runtime/prose/Tr.vue +34 -0
- package/dist/runtime/types/index.d.ts +7 -0
- package/dist/runtime/types/index.js +7 -0
- package/dist/runtime/types/locale.d.ts +2 -2
- package/dist/runtime/utils/locale.d.ts +5 -5
- package/dist/runtime/utils/tv.d.ts +1 -1
- package/dist/runtime/vue/plugins/head.d.ts +1 -1
- package/dist/runtime/vue/plugins/head.js +4 -3
- package/dist/runtime/vue/stubs.d.ts +5 -1
- package/dist/runtime/vue/stubs.js +2 -1
- package/dist/shared/{b24ui-nuxt.BRwBcdAH.mjs → b24ui-nuxt.BiEJAB1L.mjs} +65 -1
- package/dist/shared/{b24ui-nuxt.C1tIhR9w.cjs → b24ui-nuxt.yyScbwpE.cjs} +65 -1
- 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 +20 -20
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.BiEJAB1L.mjs';
|
|
4
4
|
import 'node:url';
|
|
5
5
|
import 'scule';
|
|
6
6
|
|
|
@@ -9,7 +9,7 @@ const module = defineNuxtModule({
|
|
|
9
9
|
name: "b24ui",
|
|
10
10
|
configKey: "b24ui",
|
|
11
11
|
compatibility: {
|
|
12
|
-
nuxt: ">=3.
|
|
12
|
+
nuxt: ">=3.16.0"
|
|
13
13
|
},
|
|
14
14
|
docs: "https://bitrix24.github.io/b24ui/guide/installation-nuxt-app.html"
|
|
15
15
|
},
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { ConfigProviderProps, TooltipProviderProps } from 'reka-ui'
|
|
3
|
-
import {
|
|
4
|
-
import type { ToasterProps, Locale } from '../types'
|
|
3
|
+
import type { ToasterProps, Locale, Messages } from '../types'
|
|
5
4
|
|
|
6
|
-
export interface AppProps extends Omit<ConfigProviderProps, 'useId' | 'dir' | 'locale'> {
|
|
5
|
+
export interface AppProps<T extends Messages = Messages> extends Omit<ConfigProviderProps, 'useId' | 'dir' | 'locale'> {
|
|
7
6
|
tooltip?: TooltipProviderProps
|
|
8
7
|
toaster?: ToasterProps | null
|
|
9
|
-
locale?: Locale
|
|
8
|
+
locale?: Locale<T>
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
export interface AppSlots {
|
|
@@ -18,14 +17,15 @@ export default {
|
|
|
18
17
|
}
|
|
19
18
|
</script>
|
|
20
19
|
|
|
21
|
-
<script setup lang="ts">
|
|
20
|
+
<script setup lang="ts" generic="T extends Messages = Messages">
|
|
22
21
|
import { toRef, useId, provide } from 'vue'
|
|
23
22
|
import { ConfigProvider, TooltipProvider, useForwardProps } from 'reka-ui'
|
|
24
23
|
import { reactivePick } from '@vueuse/core'
|
|
24
|
+
import { localeContextInjectionKey } from '../composables/useLocale'
|
|
25
25
|
import B24Toaster from './Toaster.vue'
|
|
26
26
|
import B24OverlayProvider from './OverlayProvider.vue'
|
|
27
27
|
|
|
28
|
-
const props = defineProps<AppProps
|
|
28
|
+
const props = defineProps<AppProps<T>>()
|
|
29
29
|
defineSlots<AppSlots>()
|
|
30
30
|
|
|
31
31
|
const configProviderProps = useForwardProps(reactivePick(props, 'scrollBody'))
|
|
@@ -98,6 +98,7 @@ import { omit } from '../utils'
|
|
|
98
98
|
import { pickLinkProps } from '../utils/link'
|
|
99
99
|
import B24Avatar from './Avatar.vue'
|
|
100
100
|
import B24Link from './Link.vue'
|
|
101
|
+
import B24LinkBase from './LinkBase.vue'
|
|
101
102
|
import ChevronDownIcon from '@bitrix24/b24icons-vue/actions/ChevronDownIcon'
|
|
102
103
|
import LoaderWaitIcon from '@bitrix24/b24icons-vue/animated/LoaderWaitIcon'
|
|
103
104
|
import LoaderClockIcon from '@bitrix24/b24icons-vue/animated/LoaderClockIcon'
|
|
@@ -68,7 +68,7 @@ onMounted(async () => {
|
|
|
68
68
|
nestedForms.value.set(event.formId, { validate: event.validate })
|
|
69
69
|
} else if (event.type === 'detach') {
|
|
70
70
|
nestedForms.value.delete(event.formId)
|
|
71
|
-
} else if (props.validateOn?.includes(event.type)) {
|
|
71
|
+
} else if (props.validateOn?.includes(event.type) && !loading.value) {
|
|
72
72
|
if (event.type !== 'input') {
|
|
73
73
|
await _validate({ name: event.name, silent: true, nested: false })
|
|
74
74
|
} else if (event.eager || blurredFields.has(event.name)) {
|
|
@@ -125,7 +125,7 @@ const props = withDefaults(defineProps<InputProps>(), {
|
|
|
125
125
|
const emits = defineEmits<InputEmits>()
|
|
126
126
|
const slots = defineSlots<InputSlots>()
|
|
127
127
|
|
|
128
|
-
const [modelValue, modelModifiers] = defineModel<string | number>()
|
|
128
|
+
const [modelValue, modelModifiers] = defineModel<string | number | null>()
|
|
129
129
|
|
|
130
130
|
const { emitFormBlur, emitFormInput, emitFormChange, size: formGroupSize, color, id, name, highlight, disabled, emitFormFocus, ariaAttrs } = useFormField<InputProps>(props, { deferInputValidation: true })
|
|
131
131
|
const { orientation, size: buttonGroupSize } = useButtonGroup<InputProps>(props)
|
|
@@ -162,15 +162,19 @@ function autoFocus() {
|
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
// Custom function to handle the v-model properties
|
|
165
|
-
function updateInput(value: string) {
|
|
165
|
+
function updateInput(value: string | null) {
|
|
166
166
|
if (modelModifiers.trim) {
|
|
167
|
-
value = value
|
|
167
|
+
value = value?.trim() ?? null
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
if (modelModifiers.number || props.type === 'number') {
|
|
171
171
|
value = looseToNumber(value)
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
+
if (modelModifiers.nullify) {
|
|
175
|
+
value ||= null
|
|
176
|
+
}
|
|
177
|
+
|
|
174
178
|
modelValue.value = value
|
|
175
179
|
emitFormInput()
|
|
176
180
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import type { LinkProps } from '../types'
|
|
3
|
+
|
|
2
4
|
export interface LinkBaseProps {
|
|
3
5
|
as?: string
|
|
4
6
|
type?: string
|
|
@@ -6,8 +8,8 @@ export interface LinkBaseProps {
|
|
|
6
8
|
onClick?: ((e: MouseEvent) => void | Promise<void>) | Array<((e: MouseEvent) => void | Promise<void>)>
|
|
7
9
|
href?: string
|
|
8
10
|
navigate?: (e: MouseEvent) => void
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
target?: LinkProps['target']
|
|
12
|
+
rel?: LinkProps['rel']
|
|
11
13
|
isExternal?: boolean
|
|
12
14
|
}
|
|
13
15
|
</script>
|
|
@@ -117,7 +117,7 @@ const props = withDefaults(defineProps<TextareaProps>(), {
|
|
|
117
117
|
defineSlots<TextareaSlots>()
|
|
118
118
|
const emits = defineEmits<TextareaEmits>()
|
|
119
119
|
|
|
120
|
-
const [modelValue, modelModifiers] = defineModel<string | number>()
|
|
120
|
+
const [modelValue, modelModifiers] = defineModel<string | number | null>()
|
|
121
121
|
|
|
122
122
|
const { emitFormFocus, emitFormBlur, emitFormInput, emitFormChange, color, id, name, highlight, disabled, ariaAttrs } = useFormField<TextareaProps>(props, { deferInputValidation: true })
|
|
123
123
|
|
|
@@ -144,15 +144,19 @@ function autoFocus() {
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
// Custom function to handle the v-model properties
|
|
147
|
-
function updateInput(value: string) {
|
|
147
|
+
function updateInput(value: string | null) {
|
|
148
148
|
if (modelModifiers.trim) {
|
|
149
|
-
value = value
|
|
149
|
+
value = value?.trim() ?? null
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
if (modelModifiers.number) {
|
|
153
153
|
value = looseToNumber(value)
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
+
if (modelModifiers.nullify) {
|
|
157
|
+
value ||= null
|
|
158
|
+
}
|
|
159
|
+
|
|
156
160
|
modelValue.value = value
|
|
157
161
|
emitFormInput()
|
|
158
162
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { Locale, Direction
|
|
2
|
-
interface DefineLocaleOptions {
|
|
1
|
+
import type { Locale, Direction } from '../types/locale';
|
|
2
|
+
interface DefineLocaleOptions<M> {
|
|
3
3
|
name: string;
|
|
4
4
|
code: string;
|
|
5
5
|
dir?: Direction;
|
|
6
|
-
messages:
|
|
6
|
+
messages: M;
|
|
7
7
|
}
|
|
8
|
-
export declare function defineLocale(options: DefineLocaleOptions): Locale
|
|
8
|
+
export declare function defineLocale<M>(options: DefineLocaleOptions<M>): Locale<M>;
|
|
9
9
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { InjectionKey, Ref } from 'vue';
|
|
2
|
-
import type { Locale } from '../types/locale';
|
|
3
|
-
export declare const localeContextInjectionKey: InjectionKey<Ref<Locale | undefined>>;
|
|
4
|
-
export declare const useLocale: (localeOverrides?: Ref<Locale | undefined>) => import("../utils/locale").LocaleContext
|
|
2
|
+
import type { Locale, Messages } from '../types/locale';
|
|
3
|
+
export declare const localeContextInjectionKey: InjectionKey<Ref<Locale<unknown> | undefined>>;
|
|
4
|
+
export declare const useLocale: (localeOverrides?: Ref<Locale<Messages> | undefined>) => import("../utils/locale").LocaleContext<Messages>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { computed, inject,
|
|
1
|
+
import { computed, inject, toRef } from "vue";
|
|
2
|
+
import { createSharedComposable } from "@vueuse/core";
|
|
2
3
|
import { buildLocaleContext } from "../utils/locale.js";
|
|
3
4
|
import en from "../locale/en.js";
|
|
4
|
-
import { createSharedComposable } from "@vueuse/core";
|
|
5
5
|
export const localeContextInjectionKey = Symbol("bitrix24-ui.locale-context");
|
|
6
6
|
const _useLocale = (localeOverrides) => {
|
|
7
|
-
const locale = localeOverrides || inject(localeContextInjectionKey
|
|
7
|
+
const locale = localeOverrides || toRef(inject(localeContextInjectionKey));
|
|
8
8
|
return buildLocaleContext(computed(() => locale.value || en));
|
|
9
9
|
};
|
|
10
10
|
export const useLocale = createSharedComposable(_useLocale);
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
*/
|
|
28
28
|
export { default as en } from './en';
|
|
29
29
|
export { default as de } from './de';
|
|
30
|
-
export { default as
|
|
30
|
+
export { default as la } from './la';
|
|
31
31
|
export { default as br } from './br';
|
|
32
32
|
export { default as fr } from './fr';
|
|
33
33
|
export { default as it } from './it';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as en } from "./en.js";
|
|
2
2
|
export { default as de } from "./de.js";
|
|
3
|
-
export { default as
|
|
3
|
+
export { default as la } from "./la.js";
|
|
4
4
|
export { default as br } from "./br.js";
|
|
5
5
|
export { default as fr } from "./fr.js";
|
|
6
6
|
export { default as it } from "./it.js";
|
package/dist/runtime/prose/A.vue
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
3
|
+
import _appConfig from '#build/app.config'
|
|
4
|
+
import theme from '#build/b24ui/prose/img'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigProseImg = _appConfig as AppConfig & { b24ui: { prose: { img: Partial<typeof theme> } } }
|
|
8
|
+
|
|
9
|
+
const proseImg = tv({ extend: tv(theme), ...(appConfigProseImg.b24ui?.prose?.img || {}) })
|
|
10
|
+
|
|
11
|
+
export interface proseImgProps {
|
|
12
|
+
class?: any
|
|
13
|
+
b24ui?: Partial<typeof proseImg.slots>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface proseImgSlots {
|
|
17
|
+
default(props?: {}): any
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
const props = defineProps<proseImgProps>()
|
|
23
|
+
|
|
24
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
25
|
+
const b24ui = proseImg({})
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<img
|
|
30
|
+
:class="b24ui.base({ class: [props.class, props.b24ui?.base] })"
|
|
31
|
+
>
|
|
32
|
+
</template>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
3
|
+
import _appConfig from '#build/app.config'
|
|
4
|
+
import theme from '#build/b24ui/prose/table'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigProseTable = _appConfig as AppConfig & { b24ui: { prose: { table: Partial<typeof theme> } } }
|
|
8
|
+
|
|
9
|
+
const proseTable = tv({ extend: tv(theme), ...(appConfigProseTable.b24ui?.prose?.table || {}) })
|
|
10
|
+
|
|
11
|
+
export interface proseTableProps {
|
|
12
|
+
/**
|
|
13
|
+
* The element or component this component should render as.
|
|
14
|
+
* @defaultValue 'div'
|
|
15
|
+
*/
|
|
16
|
+
as?: any
|
|
17
|
+
/**
|
|
18
|
+
* @defaultValue true
|
|
19
|
+
*/
|
|
20
|
+
rounded?: boolean
|
|
21
|
+
/**
|
|
22
|
+
* @defaultValue true
|
|
23
|
+
*/
|
|
24
|
+
zebra?: boolean
|
|
25
|
+
/**
|
|
26
|
+
* @defaultValue false
|
|
27
|
+
*/
|
|
28
|
+
rowHover?: boolean
|
|
29
|
+
/**
|
|
30
|
+
* @defaultValue false
|
|
31
|
+
*/
|
|
32
|
+
bordered?: boolean
|
|
33
|
+
class?: any
|
|
34
|
+
b24ui?: Partial<typeof proseTable.slots>
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface proseTableSlots {
|
|
38
|
+
default(props?: {}): any
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<script setup lang="ts">
|
|
43
|
+
import B24TableWrapper from './../components/content/TableWrapper.vue'
|
|
44
|
+
|
|
45
|
+
defineOptions({ inheritAttrs: false })
|
|
46
|
+
|
|
47
|
+
const props = withDefaults(defineProps<proseTableProps>(), {
|
|
48
|
+
as: 'div',
|
|
49
|
+
rounded: true,
|
|
50
|
+
zebra: true,
|
|
51
|
+
rowHover: true,
|
|
52
|
+
bordered: true
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
56
|
+
const b24ui = proseTable({})
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<template>
|
|
60
|
+
<B24TableWrapper
|
|
61
|
+
:as="as"
|
|
62
|
+
:class="b24ui.root({ class: [props.class, props.b24ui?.root] })"
|
|
63
|
+
:zebra="props.zebra"
|
|
64
|
+
:row-hover="props.rowHover"
|
|
65
|
+
:rounded="props.rounded"
|
|
66
|
+
:bordered="props.bordered"
|
|
67
|
+
>
|
|
68
|
+
<table
|
|
69
|
+
:class="b24ui.base({ class: props.b24ui?.base })"
|
|
70
|
+
>
|
|
71
|
+
<slot />
|
|
72
|
+
</table>
|
|
73
|
+
</B24TableWrapper>
|
|
74
|
+
</template>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
3
|
+
import _appConfig from '#build/app.config'
|
|
4
|
+
import theme from '#build/b24ui/prose/tbody'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigProseTbody = _appConfig as AppConfig & { b24ui: { prose: { tbody: Partial<typeof theme> } } }
|
|
8
|
+
|
|
9
|
+
const proseTbody = tv({ extend: tv(theme), ...(appConfigProseTbody.b24ui?.prose?.tbody || {}) })
|
|
10
|
+
|
|
11
|
+
export interface proseTbodyProps {
|
|
12
|
+
class?: any
|
|
13
|
+
b24ui?: Partial<typeof proseTbody.slots>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface proseTbodySlots {
|
|
17
|
+
default(props?: {}): any
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
const props = defineProps<proseTbodyProps>()
|
|
23
|
+
|
|
24
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
25
|
+
const b24ui = proseTbody({})
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<tbody
|
|
30
|
+
:class="b24ui.base({ class: [props.class, props.b24ui?.base] })"
|
|
31
|
+
>
|
|
32
|
+
<slot />
|
|
33
|
+
</tbody>
|
|
34
|
+
</template>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
3
|
+
import _appConfig from '#build/app.config'
|
|
4
|
+
import theme from '#build/b24ui/prose/td'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigProseTd = _appConfig as AppConfig & { b24ui: { prose: { td: Partial<typeof theme> } } }
|
|
8
|
+
|
|
9
|
+
const proseTd = tv({ extend: tv(theme), ...(appConfigProseTd.b24ui?.prose?.td || {}) })
|
|
10
|
+
|
|
11
|
+
export interface proseTdProps {
|
|
12
|
+
class?: any
|
|
13
|
+
b24ui?: Partial<typeof proseTd.slots>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface proseTdSlots {
|
|
17
|
+
default(props?: {}): any
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
const props = defineProps<proseTdProps>()
|
|
23
|
+
|
|
24
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
25
|
+
const b24ui = proseTd({})
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<td
|
|
30
|
+
:class="b24ui.base({ class: [props.class, props.b24ui?.base] })"
|
|
31
|
+
>
|
|
32
|
+
<slot />
|
|
33
|
+
</td>
|
|
34
|
+
</template>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
3
|
+
import _appConfig from '#build/app.config'
|
|
4
|
+
import theme from '#build/b24ui/prose/th'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigProseTh = _appConfig as AppConfig & { b24ui: { prose: { th: Partial<typeof theme> } } }
|
|
8
|
+
|
|
9
|
+
const proseTh = tv({ extend: tv(theme), ...(appConfigProseTh.b24ui?.prose?.th || {}) })
|
|
10
|
+
|
|
11
|
+
export interface proseThProps {
|
|
12
|
+
class?: any
|
|
13
|
+
b24ui?: Partial<typeof proseTh.slots>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface proseThSlots {
|
|
17
|
+
default(props?: {}): any
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
const props = defineProps<proseThProps>()
|
|
23
|
+
|
|
24
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
25
|
+
const b24ui = proseTh({})
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<th
|
|
30
|
+
:class="b24ui.base({ class: [props.class, props.b24ui?.base] })"
|
|
31
|
+
>
|
|
32
|
+
<slot />
|
|
33
|
+
</th>
|
|
34
|
+
</template>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
3
|
+
import _appConfig from '#build/app.config'
|
|
4
|
+
import theme from '#build/b24ui/prose/thead'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigProseThead = _appConfig as AppConfig & { b24ui: { prose: { thead: Partial<typeof theme> } } }
|
|
8
|
+
|
|
9
|
+
const proseThead = tv({ extend: tv(theme), ...(appConfigProseThead.b24ui?.prose?.thead || {}) })
|
|
10
|
+
|
|
11
|
+
export interface proseTheadProps {
|
|
12
|
+
class?: any
|
|
13
|
+
b24ui?: Partial<typeof proseThead.slots>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface proseTheadSlots {
|
|
17
|
+
default(props?: {}): any
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
const props = defineProps<proseTheadProps>()
|
|
23
|
+
|
|
24
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
25
|
+
const b24ui = proseThead({})
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<thead
|
|
30
|
+
:class="b24ui.base({ class: [props.class, props.b24ui?.base] })"
|
|
31
|
+
>
|
|
32
|
+
<slot />
|
|
33
|
+
</thead>
|
|
34
|
+
</template>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
3
|
+
import _appConfig from '#build/app.config'
|
|
4
|
+
import theme from '#build/b24ui/prose/tr'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigProseTr = _appConfig as AppConfig & { b24ui: { prose: { tr: Partial<typeof theme> } } }
|
|
8
|
+
|
|
9
|
+
const proseTr = tv({ extend: tv(theme), ...(appConfigProseTr.b24ui?.prose?.tr || {}) })
|
|
10
|
+
|
|
11
|
+
export interface proseTrProps {
|
|
12
|
+
class?: any
|
|
13
|
+
b24ui?: Partial<typeof proseTr.slots>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface proseTrSlots {
|
|
17
|
+
default(props?: {}): any
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
const props = defineProps<proseTrProps>()
|
|
23
|
+
|
|
24
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
25
|
+
const b24ui = proseTr({})
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<tr
|
|
30
|
+
:class="b24ui.base({ class: [props.class, props.b24ui?.base] })"
|
|
31
|
+
>
|
|
32
|
+
<slot />
|
|
33
|
+
</tr>
|
|
34
|
+
</template>
|
|
@@ -51,6 +51,13 @@ export * from '../prose/Ol.vue';
|
|
|
51
51
|
export * from '../prose/Ul.vue';
|
|
52
52
|
export * from '../prose/Li.vue';
|
|
53
53
|
export * from '../prose/Hr.vue';
|
|
54
|
+
export * from '../prose/Table.vue';
|
|
55
|
+
export * from '../prose/Thead.vue';
|
|
56
|
+
export * from '../prose/Tbody.vue';
|
|
57
|
+
export * from '../prose/Tr.vue';
|
|
58
|
+
export * from '../prose/Th.vue';
|
|
59
|
+
export * from '../prose/Td.vue';
|
|
60
|
+
export * from '../prose/Img.vue';
|
|
54
61
|
export * from '../prose/Code.vue';
|
|
55
62
|
export * from '../prose/Pre.vue';
|
|
56
63
|
export * from './form';
|