@bitrix24/b24ui-nuxt 0.4.1 → 0.4.3
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/button.ts +8 -0
- package/.nuxt/b24ui/modal.ts +22 -4
- package/.nuxt/b24ui/prose/a.ts +5 -0
- package/.nuxt/b24ui/prose/blockquote.ts +5 -0
- package/.nuxt/b24ui/prose/code.ts +31 -0
- package/.nuxt/b24ui/prose/em.ts +5 -0
- package/.nuxt/b24ui/prose/h1.ts +6 -0
- package/.nuxt/b24ui/prose/{prose-h2.ts → h2.ts} +1 -1
- package/.nuxt/b24ui/prose/{prose-h3.ts → h3.ts} +1 -1
- package/.nuxt/b24ui/prose/h4.ts +16 -0
- package/.nuxt/b24ui/prose/h5.ts +16 -0
- package/.nuxt/b24ui/prose/h6.ts +16 -0
- package/.nuxt/b24ui/prose/hr.ts +5 -0
- package/.nuxt/b24ui/prose/ol.ts +5 -0
- package/.nuxt/b24ui/prose/pre.ts +6 -0
- package/.nuxt/b24ui/prose/strong.ts +5 -0
- package/.nuxt/b24ui/prose/ul.ts +5 -0
- package/.nuxt/b24ui/slideover.ts +25 -7
- package/dist/meta.cjs +1543 -220
- package/dist/meta.d.cts +1543 -220
- package/dist/meta.d.mts +1543 -220
- package/dist/meta.d.ts +1543 -220
- package/dist/meta.mjs +1543 -220
- package/dist/module.cjs +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +2 -2
- package/dist/runtime/components/Avatar.vue +2 -1
- package/dist/runtime/components/Button.vue +83 -45
- package/dist/runtime/components/Modal.vue +13 -2
- package/dist/runtime/components/RadioGroup.vue +3 -1
- package/dist/runtime/components/Slideover.vue +10 -2
- package/dist/runtime/composables/useComponentIcons.d.ts +2 -2
- package/dist/runtime/prose/A.vue +32 -0
- package/dist/runtime/prose/Blockquote.vue +34 -0
- package/dist/runtime/prose/Code.vue +42 -0
- package/dist/runtime/prose/Em.vue +32 -0
- package/dist/runtime/prose/{ProseH1.vue → H1.vue} +1 -3
- package/dist/runtime/prose/{ProseH2.vue → H2.vue} +1 -3
- package/dist/runtime/prose/{ProseH3.vue → H3.vue} +1 -3
- package/dist/runtime/prose/H4.vue +34 -0
- package/dist/runtime/prose/H5.vue +34 -0
- package/dist/runtime/prose/H6.vue +34 -0
- package/dist/runtime/prose/Hr.vue +28 -0
- package/dist/runtime/prose/{ProseLi.vue → Li.vue} +1 -3
- package/dist/runtime/prose/{ProseOl.vue → Ol.vue} +1 -3
- package/dist/runtime/prose/{ProseP.vue → P.vue} +1 -3
- package/dist/runtime/prose/Pre.vue +44 -0
- package/dist/runtime/prose/Strong.vue +34 -0
- package/dist/runtime/prose/{ProseUl.vue → Ul.vue} +1 -3
- package/dist/runtime/types/index.d.ts +17 -7
- package/dist/runtime/types/index.js +17 -7
- package/dist/runtime/vue/components/Link.vue +2 -2
- package/dist/shared/{b24ui-nuxt.BGGwh89R.mjs → b24ui-nuxt.BRwBcdAH.mjs} +276 -40
- package/dist/shared/{b24ui-nuxt.CnMGpwQb.cjs → b24ui-nuxt.C1tIhR9w.cjs} +276 -40
- package/dist/unplugin.cjs +3 -3
- package/dist/unplugin.mjs +3 -3
- package/dist/vite.cjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +7 -7
- package/.nuxt/b24ui/prose/prose-h1.ts +0 -6
- package/.nuxt/b24ui/prose/prose-ol.ts +0 -5
- package/.nuxt/b24ui/prose/prose-ul.ts +0 -5
- /package/.nuxt/b24ui/prose/{prose-li.ts → li.ts} +0 -0
- /package/.nuxt/b24ui/prose/{prose-p.ts → p.ts} +0 -0
package/dist/module.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const defu = require('defu');
|
|
4
4
|
const kit = require('@nuxt/kit');
|
|
5
|
-
const templates = require('./shared/b24ui-nuxt.
|
|
5
|
+
const templates = require('./shared/b24ui-nuxt.C1tIhR9w.cjs');
|
|
6
6
|
require('node:url');
|
|
7
7
|
require('scule');
|
|
8
8
|
|
|
@@ -48,7 +48,7 @@ const module$1 = kit.defineNuxtModule({
|
|
|
48
48
|
});
|
|
49
49
|
kit.addComponentsDir({
|
|
50
50
|
path: resolve("./runtime/prose"),
|
|
51
|
-
prefix: "",
|
|
51
|
+
prefix: "Prose",
|
|
52
52
|
pathPrefix: false
|
|
53
53
|
});
|
|
54
54
|
kit.addImportsDir(resolve("./runtime/composables"));
|
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.BRwBcdAH.mjs';
|
|
4
4
|
import 'node:url';
|
|
5
5
|
import 'scule';
|
|
6
6
|
|
|
@@ -45,7 +45,7 @@ const module = defineNuxtModule({
|
|
|
45
45
|
});
|
|
46
46
|
addComponentsDir({
|
|
47
47
|
path: resolve("./runtime/prose"),
|
|
48
|
-
prefix: "",
|
|
48
|
+
prefix: "Prose",
|
|
49
49
|
pathPrefix: false
|
|
50
50
|
});
|
|
51
51
|
addImportsDir(resolve("./runtime/composables"));
|
|
@@ -31,6 +31,7 @@ export interface AvatarProps {
|
|
|
31
31
|
*/
|
|
32
32
|
size?: AvatarVariants['size']
|
|
33
33
|
class?: any
|
|
34
|
+
style?: any
|
|
34
35
|
b24ui?: Partial<typeof avatar.slots>
|
|
35
36
|
}
|
|
36
37
|
|
|
@@ -90,7 +91,7 @@ function onError() {
|
|
|
90
91
|
</script>
|
|
91
92
|
|
|
92
93
|
<template>
|
|
93
|
-
<Primitive :as="as" :class="b24ui.root({ class: [props.class, props.b24ui?.root] })">
|
|
94
|
+
<Primitive :as="as" :class="b24ui.root({ class: [props.class, props.b24ui?.root] })" :style="props.style">
|
|
94
95
|
<component
|
|
95
96
|
:is="ImageComponent"
|
|
96
97
|
v-if="src && !error"
|
|
@@ -21,10 +21,12 @@ export interface ButtonProps extends Omit<UseComponentIconsProps, 'trailing' | '
|
|
|
21
21
|
* @defaultValue 'default'
|
|
22
22
|
*/
|
|
23
23
|
color?: ButtonVariants['color']
|
|
24
|
+
activeColor?: ButtonVariants['color']
|
|
24
25
|
/**
|
|
25
26
|
* @defaultValue 'normal'
|
|
26
27
|
*/
|
|
27
28
|
depth?: ButtonVariants['depth']
|
|
29
|
+
activeDepth?: ButtonVariants['depth']
|
|
28
30
|
/**
|
|
29
31
|
* @defaultValue 'md'
|
|
30
32
|
*/
|
|
@@ -66,6 +68,16 @@ export interface ButtonProps extends Omit<UseComponentIconsProps, 'trailing' | '
|
|
|
66
68
|
useDropdown?: boolean
|
|
67
69
|
onClick?: ((event: MouseEvent) => void | Promise<void>) | Array<((event: MouseEvent) => void | Promise<void>)>
|
|
68
70
|
class?: any
|
|
71
|
+
/**
|
|
72
|
+
* The class to apply when the link is active
|
|
73
|
+
* @defaultValue ''
|
|
74
|
+
*/
|
|
75
|
+
activeClass?: string
|
|
76
|
+
/**
|
|
77
|
+
* The class to apply when the link is inactive
|
|
78
|
+
* @defaultValue ''
|
|
79
|
+
*/
|
|
80
|
+
inactiveClass?: string
|
|
69
81
|
b24ui?: PartialString<typeof button.slots>
|
|
70
82
|
}
|
|
71
83
|
|
|
@@ -92,7 +104,10 @@ import LoaderClockIcon from '@bitrix24/b24icons-vue/animated/LoaderClockIcon'
|
|
|
92
104
|
import SpinnerIcon from '@bitrix24/b24icons-vue/specialized/SpinnerIcon'
|
|
93
105
|
|
|
94
106
|
const props = withDefaults(defineProps<ButtonProps>(), {
|
|
95
|
-
type: 'button'
|
|
107
|
+
type: 'button',
|
|
108
|
+
active: undefined,
|
|
109
|
+
activeClass: '',
|
|
110
|
+
inactiveClass: ''
|
|
96
111
|
})
|
|
97
112
|
|
|
98
113
|
const slots = defineSlots<ButtonSlots>()
|
|
@@ -132,7 +147,19 @@ const isLabel = computed(() => {
|
|
|
132
147
|
return (props?.label || '').length > 0 || isUseSlot
|
|
133
148
|
})
|
|
134
149
|
|
|
135
|
-
const b24ui = computed(() =>
|
|
150
|
+
const b24ui = computed(() => tv({
|
|
151
|
+
extend: button,
|
|
152
|
+
variants: {
|
|
153
|
+
active: {
|
|
154
|
+
true: {
|
|
155
|
+
base: props.activeClass
|
|
156
|
+
},
|
|
157
|
+
false: {
|
|
158
|
+
base: props.inactiveClass
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
})({
|
|
136
163
|
color: props.color,
|
|
137
164
|
depth: props.depth,
|
|
138
165
|
size: buttonSize.value,
|
|
@@ -152,54 +179,65 @@ const b24ui = computed(() => button({
|
|
|
152
179
|
|
|
153
180
|
<template>
|
|
154
181
|
<B24Link
|
|
182
|
+
v-slot="{ active, ...slotProps }"
|
|
155
183
|
:type="type"
|
|
156
184
|
:disabled="disabled || isLoading"
|
|
157
185
|
:class="b24ui.base({ class: [props.class, props.b24ui?.base] })"
|
|
158
186
|
v-bind="omit(linkProps, ['type', 'disabled'])"
|
|
159
|
-
|
|
160
|
-
@click="onClickWrapper"
|
|
187
|
+
custom
|
|
161
188
|
>
|
|
162
|
-
<
|
|
163
|
-
v-
|
|
164
|
-
class="
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
:class="[
|
|
172
|
-
b24ui.baseLine({ class: [props.b24ui?.baseLine] }),
|
|
173
|
-
isLoading ? 'invisible' : ''
|
|
174
|
-
]"
|
|
189
|
+
<B24LinkBase
|
|
190
|
+
v-bind="slotProps"
|
|
191
|
+
:class="b24ui.base({
|
|
192
|
+
class: [props.class, props.b24ui?.base],
|
|
193
|
+
active,
|
|
194
|
+
...(active && activeDepth ? { depth: activeDepth } : {}),
|
|
195
|
+
...(active && activeColor ? { color: activeColor } : {})
|
|
196
|
+
})"
|
|
197
|
+
@click="onClickWrapper"
|
|
175
198
|
>
|
|
176
|
-
<
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
/>
|
|
182
|
-
<
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
199
|
+
<div
|
|
200
|
+
v-if="isLoading"
|
|
201
|
+
class="h-full w-full absolute inset-0 flex flex-row flex-nowrap items-center justify-center"
|
|
202
|
+
>
|
|
203
|
+
<LoaderWaitIcon v-if="useWait" class="w-[28px] h-[28px]" aria-hidden="true" />
|
|
204
|
+
<LoaderClockIcon v-else-if="useClock" class="w-[28px] h-[28px]" aria-hidden="true" />
|
|
205
|
+
<SpinnerIcon v-else class="size-lg animate-spin stroke-2" aria-hidden="true" />
|
|
206
|
+
</div>
|
|
207
|
+
<div
|
|
208
|
+
:class="[
|
|
209
|
+
b24ui.baseLine({ class: [props.b24ui?.baseLine] }),
|
|
210
|
+
isLoading ? 'invisible' : ''
|
|
211
|
+
]"
|
|
212
|
+
>
|
|
213
|
+
<slot name="leading">
|
|
214
|
+
<Component
|
|
215
|
+
:is="leadingIconName"
|
|
216
|
+
v-if="isLeading && (typeof leadingIconName !== 'undefined')"
|
|
217
|
+
:class="b24ui.leadingIcon({ class: props.b24ui?.leadingIcon })"
|
|
218
|
+
/>
|
|
219
|
+
<B24Avatar
|
|
220
|
+
v-else-if="!!avatar"
|
|
221
|
+
:size="((props.b24ui?.leadingAvatarSize || b24ui.leadingAvatarSize()) as AvatarProps['size'])"
|
|
222
|
+
v-bind="avatar"
|
|
223
|
+
:class="b24ui.leadingAvatar({ class: props.b24ui?.leadingAvatar })"
|
|
224
|
+
/>
|
|
225
|
+
</slot>
|
|
226
|
+
|
|
227
|
+
<slot>
|
|
228
|
+
<span v-if="label" :class="b24ui.label({ class: props.b24ui?.label, active })">
|
|
229
|
+
{{ label }}
|
|
230
|
+
</span>
|
|
231
|
+
</slot>
|
|
232
|
+
|
|
233
|
+
<slot name="trailing">
|
|
234
|
+
<ChevronDownIcon
|
|
235
|
+
v-if="useDropdown"
|
|
236
|
+
:class="b24ui.trailingIcon({ class: props.b24ui?.trailingIcon })"
|
|
237
|
+
aria-hidden="true"
|
|
238
|
+
/>
|
|
239
|
+
</slot>
|
|
240
|
+
</div>
|
|
241
|
+
</B24LinkBase>
|
|
204
242
|
</B24Link>
|
|
205
243
|
</template>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { DialogRootProps, DialogRootEmits, DialogContentProps } from 'reka-ui'
|
|
3
|
+
import type { VariantProps } from 'tailwind-variants'
|
|
3
4
|
import type { AppConfig } from '@nuxt/schema'
|
|
4
5
|
import _appConfig from '#build/app.config'
|
|
5
6
|
import theme from '#build/b24ui/modal'
|
|
@@ -10,6 +11,8 @@ const appConfigModal = _appConfig as AppConfig & { b24ui: { modal: Partial<typeo
|
|
|
10
11
|
|
|
11
12
|
const modal = tv({ extend: tv(theme), ...(appConfigModal.b24ui?.modal || {}) })
|
|
12
13
|
|
|
14
|
+
type ModalVariants = VariantProps<typeof modal>
|
|
15
|
+
|
|
13
16
|
export interface ModalProps extends DialogRootProps {
|
|
14
17
|
title?: string
|
|
15
18
|
description?: string
|
|
@@ -22,6 +25,12 @@ export interface ModalProps extends DialogRootProps {
|
|
|
22
25
|
* @defaultValue true
|
|
23
26
|
*/
|
|
24
27
|
overlay?: boolean
|
|
28
|
+
/**
|
|
29
|
+
* Render an overlay blur behind the modal.
|
|
30
|
+
* `auto` use `motion-safe`.
|
|
31
|
+
* @defaultValue 'auto'
|
|
32
|
+
*/
|
|
33
|
+
overlayBlur?: ModalVariants['overlayBlur']
|
|
25
34
|
/**
|
|
26
35
|
* Animate the modal when opening or closing.
|
|
27
36
|
* @defaultValue true
|
|
@@ -93,7 +102,8 @@ const props = withDefaults(defineProps<ModalProps>(), {
|
|
|
93
102
|
transition: true,
|
|
94
103
|
modal: true,
|
|
95
104
|
dismissible: true,
|
|
96
|
-
scrollbarThin: true
|
|
105
|
+
scrollbarThin: true,
|
|
106
|
+
overlayBlur: 'auto'
|
|
97
107
|
})
|
|
98
108
|
const emits = defineEmits<ModalEmits>()
|
|
99
109
|
const slots = defineSlots<ModalSlots>()
|
|
@@ -119,7 +129,8 @@ const contentEvents = computed(() => {
|
|
|
119
129
|
|
|
120
130
|
const b24ui = computed(() => modal({
|
|
121
131
|
transition: props.transition,
|
|
122
|
-
fullscreen: props.fullscreen
|
|
132
|
+
fullscreen: props.fullscreen,
|
|
133
|
+
overlayBlur: props.overlayBlur
|
|
123
134
|
}))
|
|
124
135
|
</script>
|
|
125
136
|
|
|
@@ -170,7 +170,9 @@ function onUpdate(value: any) {
|
|
|
170
170
|
|
|
171
171
|
<div :class="b24ui.wrapper({ class: props.b24ui?.wrapper })">
|
|
172
172
|
<Label :class="b24ui.label({ class: props.b24ui?.label })" :for="item.id">
|
|
173
|
-
<slot name="label" :item="item" :model-value="modelValue">
|
|
173
|
+
<slot name="label" :item="item" :model-value="modelValue">
|
|
174
|
+
{{ item.label }}
|
|
175
|
+
</slot>
|
|
174
176
|
</Label>
|
|
175
177
|
<p v-if="item.description || !!slots.description" :class="b24ui.description({ class: props.b24ui?.description })">
|
|
176
178
|
<slot name="description" :item="item" :model-value="modelValue">
|
|
@@ -25,6 +25,12 @@ export interface SlideoverProps extends DialogRootProps {
|
|
|
25
25
|
* @defaultValue true
|
|
26
26
|
*/
|
|
27
27
|
overlay?: boolean
|
|
28
|
+
/**
|
|
29
|
+
* Render an overlay blur behind the slideover.
|
|
30
|
+
* `auto` use `motion-safe`.
|
|
31
|
+
* @defaultValue 'auto'
|
|
32
|
+
*/
|
|
33
|
+
overlayBlur?: SlideoverVariants['overlayBlur']
|
|
28
34
|
/**
|
|
29
35
|
* Animate the slideover when opening or closing.
|
|
30
36
|
* @defaultValue true
|
|
@@ -98,7 +104,8 @@ const props = withDefaults(defineProps<SlideoverProps>(), {
|
|
|
98
104
|
modal: true,
|
|
99
105
|
dismissible: true,
|
|
100
106
|
side: 'right',
|
|
101
|
-
scrollbarThin: true
|
|
107
|
+
scrollbarThin: true,
|
|
108
|
+
overlayBlur: 'auto'
|
|
102
109
|
})
|
|
103
110
|
const emits = defineEmits<SlideoverEmits>()
|
|
104
111
|
const slots = defineSlots<SlideoverSlots>()
|
|
@@ -124,7 +131,8 @@ const contentEvents = computed(() => {
|
|
|
124
131
|
|
|
125
132
|
const b24ui = computed(() => slideover({
|
|
126
133
|
transition: props.transition,
|
|
127
|
-
side: props.side
|
|
134
|
+
side: props.side,
|
|
135
|
+
overlayBlur: props.overlayBlur
|
|
128
136
|
}))
|
|
129
137
|
</script>
|
|
130
138
|
|
|
@@ -22,6 +22,6 @@ export interface UseComponentIconsProps {
|
|
|
22
22
|
export declare function useComponentIcons(componentProps: MaybeRefOrGetter<UseComponentIconsProps>): {
|
|
23
23
|
isLeading: import("vue").ComputedRef<any>;
|
|
24
24
|
isTrailing: import("vue").ComputedRef<boolean>;
|
|
25
|
-
leadingIconName: import("vue").ComputedRef<
|
|
26
|
-
trailingIconName: import("vue").ComputedRef<
|
|
25
|
+
leadingIconName: import("vue").ComputedRef<IconComponent | undefined>;
|
|
26
|
+
trailingIconName: import("vue").ComputedRef<IconComponent | undefined>;
|
|
27
27
|
};
|
|
@@ -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/a'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigProseA = _appConfig as AppConfig & { b24ui: { prose: { a: Partial<typeof theme> } } }
|
|
8
|
+
|
|
9
|
+
const proseA = tv({ extend: tv(theme), ...(appConfigProseA.b24ui?.prose?.a || {}) })
|
|
10
|
+
|
|
11
|
+
export interface proseAProps {
|
|
12
|
+
class?: any
|
|
13
|
+
b24ui?: Partial<typeof proseA.slots>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface proseASlots {
|
|
17
|
+
default(props?: {}): any
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
const props = defineProps<proseAProps>()
|
|
23
|
+
|
|
24
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
25
|
+
const b24ui = proseA({})
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<a
|
|
30
|
+
:class="b24ui.base({ class: props.b24ui?.base })"
|
|
31
|
+
><slot /></a>
|
|
32
|
+
</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/blockquote'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigProseBlockquote = _appConfig as AppConfig & { b24ui: { prose: { blockquote: Partial<typeof theme> } } }
|
|
8
|
+
|
|
9
|
+
const proseBlockquote = tv({ extend: tv(theme), ...(appConfigProseBlockquote.b24ui?.prose?.blockquote || {}) })
|
|
10
|
+
|
|
11
|
+
export interface proseBlockquoteProps {
|
|
12
|
+
class?: any
|
|
13
|
+
b24ui?: Partial<typeof proseBlockquote.slots>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface proseBlockquoteSlots {
|
|
17
|
+
default(props?: {}): any
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
const props = defineProps<proseBlockquoteProps>()
|
|
23
|
+
|
|
24
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
25
|
+
const b24ui = proseBlockquote({})
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<blockquote
|
|
30
|
+
:class="b24ui.base({ class: [props.class, props.b24ui?.base] })"
|
|
31
|
+
>
|
|
32
|
+
<slot />
|
|
33
|
+
</blockquote>
|
|
34
|
+
</template>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { VariantProps } from 'tailwind-variants'
|
|
3
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
4
|
+
import _appConfig from '#build/app.config'
|
|
5
|
+
import theme from '#build/b24ui/prose/code'
|
|
6
|
+
import { tv } from '../utils/tv'
|
|
7
|
+
|
|
8
|
+
const appConfigProseCode = _appConfig as AppConfig & { b24ui: { prose: { code: Partial<typeof theme> } } }
|
|
9
|
+
|
|
10
|
+
const proseCode = tv({ extend: tv(theme), ...(appConfigProseCode.b24ui?.prose?.code || {}) })
|
|
11
|
+
|
|
12
|
+
type ProseCodeVariants = VariantProps<typeof proseCode>
|
|
13
|
+
|
|
14
|
+
export interface proseCodeProps {
|
|
15
|
+
/**
|
|
16
|
+
* @defaultValue 'default'
|
|
17
|
+
*/
|
|
18
|
+
color?: ProseCodeVariants['color']
|
|
19
|
+
class?: any
|
|
20
|
+
b24ui?: Partial<typeof proseCode.slots>
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface proseCodeSlots {
|
|
24
|
+
default(props?: {}): any
|
|
25
|
+
}
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<script setup lang="ts">
|
|
29
|
+
import { computed } from 'vue'
|
|
30
|
+
|
|
31
|
+
const props = defineProps<proseCodeProps>()
|
|
32
|
+
|
|
33
|
+
const b24ui = computed(() => proseCode({
|
|
34
|
+
color: props.color
|
|
35
|
+
}))
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<template>
|
|
39
|
+
<code
|
|
40
|
+
:class="b24ui.base({ class: props.b24ui?.base })"
|
|
41
|
+
><slot /></code>
|
|
42
|
+
</template>
|
|
@@ -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/em'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigProseEm = _appConfig as AppConfig & { b24ui: { prose: { em: Partial<typeof theme> } } }
|
|
8
|
+
|
|
9
|
+
const proseEm = tv({ extend: tv(theme), ...(appConfigProseEm.b24ui?.prose?.em || {}) })
|
|
10
|
+
|
|
11
|
+
export interface proseEmProps {
|
|
12
|
+
class?: any
|
|
13
|
+
b24ui?: Partial<typeof proseEm.slots>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface proseEmSlots {
|
|
17
|
+
default(props?: {}): any
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
const props = defineProps<proseEmProps>()
|
|
23
|
+
|
|
24
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
25
|
+
const b24ui = proseEm({})
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<em
|
|
30
|
+
:class="b24ui.base({ class: [props.class, props.b24ui?.base] })"
|
|
31
|
+
><slot /></em>
|
|
32
|
+
</template>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { AppConfig } from '@nuxt/schema'
|
|
3
3
|
import _appConfig from '#build/app.config'
|
|
4
|
-
import theme from '#build/b24ui/prose/
|
|
4
|
+
import theme from '#build/b24ui/prose/h1'
|
|
5
5
|
import { tv } from '../utils/tv'
|
|
6
6
|
|
|
7
7
|
const appConfigProseH1 = _appConfig as AppConfig & { b24ui: { prose: { h1: Partial<typeof theme> } } }
|
|
@@ -19,8 +19,6 @@ export interface proseH1Slots {
|
|
|
19
19
|
</script>
|
|
20
20
|
|
|
21
21
|
<script setup lang="ts">
|
|
22
|
-
defineOptions({ inheritAttrs: false })
|
|
23
|
-
|
|
24
22
|
const props = defineProps<proseH1Props>()
|
|
25
23
|
|
|
26
24
|
// eslint-disable-next-line vue/no-dupe-keys
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { AppConfig } from '@nuxt/schema'
|
|
3
3
|
import _appConfig from '#build/app.config'
|
|
4
|
-
import theme from '#build/b24ui/prose/
|
|
4
|
+
import theme from '#build/b24ui/prose/h2'
|
|
5
5
|
import { tv } from '../utils/tv'
|
|
6
6
|
|
|
7
7
|
const appConfigProseH2 = _appConfig as AppConfig & { b24ui: { prose: { h2: Partial<typeof theme> } } }
|
|
@@ -19,8 +19,6 @@ export interface proseH2Slots {
|
|
|
19
19
|
</script>
|
|
20
20
|
|
|
21
21
|
<script setup lang="ts">
|
|
22
|
-
defineOptions({ inheritAttrs: false })
|
|
23
|
-
|
|
24
22
|
const props = defineProps<proseH2Props>()
|
|
25
23
|
|
|
26
24
|
// eslint-disable-next-line vue/no-dupe-keys
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { AppConfig } from '@nuxt/schema'
|
|
3
3
|
import _appConfig from '#build/app.config'
|
|
4
|
-
import theme from '#build/b24ui/prose/
|
|
4
|
+
import theme from '#build/b24ui/prose/h3'
|
|
5
5
|
import { tv } from '../utils/tv'
|
|
6
6
|
|
|
7
7
|
const appConfigProseH3 = _appConfig as AppConfig & { b24ui: { prose: { h3: Partial<typeof theme> } } }
|
|
@@ -19,8 +19,6 @@ export interface proseH3Slots {
|
|
|
19
19
|
</script>
|
|
20
20
|
|
|
21
21
|
<script setup lang="ts">
|
|
22
|
-
defineOptions({ inheritAttrs: false })
|
|
23
|
-
|
|
24
22
|
const props = defineProps<proseH3Props>()
|
|
25
23
|
|
|
26
24
|
// eslint-disable-next-line vue/no-dupe-keys
|
|
@@ -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/h4'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigProseH4 = _appConfig as AppConfig & { b24ui: { prose: { h4: Partial<typeof theme> } } }
|
|
8
|
+
|
|
9
|
+
const proseH4 = tv({ extend: tv(theme), ...(appConfigProseH4.b24ui?.prose?.h4 || {}) })
|
|
10
|
+
|
|
11
|
+
export interface proseH4Props {
|
|
12
|
+
class?: any
|
|
13
|
+
b24ui?: Partial<typeof proseH4.slots>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface proseH4Slots {
|
|
17
|
+
default(props?: {}): any
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
const props = defineProps<proseH4Props>()
|
|
23
|
+
|
|
24
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
25
|
+
const b24ui = proseH4({})
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<h4
|
|
30
|
+
:class="b24ui.base({ class: [props.class, props.b24ui?.base] })"
|
|
31
|
+
>
|
|
32
|
+
<slot />
|
|
33
|
+
</h4>
|
|
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/h5'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigProseH5 = _appConfig as AppConfig & { b24ui: { prose: { h5: Partial<typeof theme> } } }
|
|
8
|
+
|
|
9
|
+
const proseH5 = tv({ extend: tv(theme), ...(appConfigProseH5.b24ui?.prose?.h5 || {}) })
|
|
10
|
+
|
|
11
|
+
export interface proseH5Props {
|
|
12
|
+
class?: any
|
|
13
|
+
b24ui?: Partial<typeof proseH5.slots>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface proseH5Slots {
|
|
17
|
+
default(props?: {}): any
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
const props = defineProps<proseH5Props>()
|
|
23
|
+
|
|
24
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
25
|
+
const b24ui = proseH5({})
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<h5
|
|
30
|
+
:class="b24ui.base({ class: [props.class, props.b24ui?.base] })"
|
|
31
|
+
>
|
|
32
|
+
<slot />
|
|
33
|
+
</h5>
|
|
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/h6'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigProseH6 = _appConfig as AppConfig & { b24ui: { prose: { h6: Partial<typeof theme> } } }
|
|
8
|
+
|
|
9
|
+
const proseH6 = tv({ extend: tv(theme), ...(appConfigProseH6.b24ui?.prose?.h6 || {}) })
|
|
10
|
+
|
|
11
|
+
export interface proseH6Props {
|
|
12
|
+
class?: any
|
|
13
|
+
b24ui?: Partial<typeof proseH6.slots>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface proseH6Slots {
|
|
17
|
+
default(props?: {}): any
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
const props = defineProps<proseH6Props>()
|
|
23
|
+
|
|
24
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
25
|
+
const b24ui = proseH6({})
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<h6
|
|
30
|
+
:class="b24ui.base({ class: [props.class, props.b24ui?.base] })"
|
|
31
|
+
>
|
|
32
|
+
<slot />
|
|
33
|
+
</h6>
|
|
34
|
+
</template>
|
|
@@ -0,0 +1,28 @@
|
|
|
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/hr'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigProseHr = _appConfig as AppConfig & { b24ui: { prose: { hr: Partial<typeof theme> } } }
|
|
8
|
+
|
|
9
|
+
const proseHr = tv({ extend: tv(theme), ...(appConfigProseHr.b24ui?.prose?.hr || {}) })
|
|
10
|
+
|
|
11
|
+
export interface proseHrProps {
|
|
12
|
+
class?: any
|
|
13
|
+
b24ui?: Partial<typeof proseHr.slots>
|
|
14
|
+
}
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<script setup lang="ts">
|
|
18
|
+
const props = defineProps<proseHrProps>()
|
|
19
|
+
|
|
20
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
21
|
+
const b24ui = proseHr({})
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<hr
|
|
26
|
+
:class="b24ui.base({ class: [props.class, props.b24ui?.base] })"
|
|
27
|
+
>
|
|
28
|
+
</template>
|