@bitrix24/b24ui-nuxt 0.4.5 → 0.4.7

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.
Files changed (67) hide show
  1. package/.nuxt/b24ui/content/table-wrapper.ts +1 -1
  2. package/.nuxt/b24ui/dropdown-menu.ts +1 -1
  3. package/.nuxt/b24ui/index.ts +1 -0
  4. package/.nuxt/b24ui/popover.ts +6 -0
  5. package/.nuxt/b24ui/prose/table.ts +6 -0
  6. package/.nuxt/b24ui/prose/tbody.ts +5 -0
  7. package/.nuxt/b24ui/prose/td.ts +5 -0
  8. package/.nuxt/b24ui/prose/th.ts +5 -0
  9. package/.nuxt/b24ui/prose/thead.ts +5 -0
  10. package/.nuxt/b24ui/prose/tr.ts +5 -0
  11. package/dist/meta.cjs +711 -36
  12. package/dist/meta.d.cts +711 -36
  13. package/dist/meta.d.mts +711 -36
  14. package/dist/meta.d.ts +711 -36
  15. package/dist/meta.mjs +711 -36
  16. package/dist/module.cjs +1 -1
  17. package/dist/module.json +1 -1
  18. package/dist/module.mjs +1 -1
  19. package/dist/runtime/components/App.vue +6 -6
  20. package/dist/runtime/components/Form.vue +5 -5
  21. package/dist/runtime/components/FormField.vue +1 -1
  22. package/dist/runtime/components/Popover.vue +105 -0
  23. package/dist/runtime/composables/defineLocale.d.ts +4 -4
  24. package/dist/runtime/composables/useLocale.d.ts +3 -3
  25. package/dist/runtime/composables/useLocale.js +3 -3
  26. package/dist/runtime/locale/ar.d.ts +2 -1
  27. package/dist/runtime/locale/br.d.ts +2 -1
  28. package/dist/runtime/locale/de.d.ts +2 -1
  29. package/dist/runtime/locale/en.d.ts +2 -1
  30. package/dist/runtime/locale/fr.d.ts +2 -1
  31. package/dist/runtime/locale/id.d.ts +2 -1
  32. package/dist/runtime/locale/it.d.ts +2 -1
  33. package/dist/runtime/locale/ja.d.ts +2 -1
  34. package/dist/runtime/locale/kz.d.ts +2 -1
  35. package/dist/runtime/locale/la.d.ts +2 -1
  36. package/dist/runtime/locale/ms.d.ts +2 -1
  37. package/dist/runtime/locale/pl.d.ts +2 -1
  38. package/dist/runtime/locale/ru.d.ts +2 -1
  39. package/dist/runtime/locale/sc.d.ts +2 -1
  40. package/dist/runtime/locale/tc.d.ts +2 -1
  41. package/dist/runtime/locale/th.d.ts +2 -1
  42. package/dist/runtime/locale/tr.d.ts +2 -1
  43. package/dist/runtime/locale/ua.d.ts +2 -1
  44. package/dist/runtime/locale/vn.d.ts +2 -1
  45. package/dist/runtime/plugins/colors.js +3 -1
  46. package/dist/runtime/prose/Code.vue +1 -1
  47. package/dist/runtime/prose/Img.vue +1 -1
  48. package/dist/runtime/prose/Table.vue +74 -0
  49. package/dist/runtime/prose/Tbody.vue +34 -0
  50. package/dist/runtime/prose/Td.vue +34 -0
  51. package/dist/runtime/prose/Th.vue +34 -0
  52. package/dist/runtime/prose/Thead.vue +34 -0
  53. package/dist/runtime/prose/Tr.vue +34 -0
  54. package/dist/runtime/types/form.d.ts +1 -1
  55. package/dist/runtime/types/index.d.ts +7 -0
  56. package/dist/runtime/types/index.js +7 -0
  57. package/dist/runtime/types/locale.d.ts +2 -2
  58. package/dist/runtime/utils/locale.d.ts +5 -5
  59. package/dist/runtime/vue/stubs.d.ts +3 -1
  60. package/dist/runtime/vue/stubs.js +3 -1
  61. package/dist/shared/{b24ui-nuxt.BH-d1ImO.mjs → b24ui-nuxt.CPOPpSQq.mjs} +69 -2
  62. package/dist/shared/{b24ui-nuxt.DxEKoBT7.cjs → b24ui-nuxt.lbv7ybxH.cjs} +69 -2
  63. package/dist/unplugin.cjs +1 -1
  64. package/dist/unplugin.mjs +1 -1
  65. package/dist/vite.cjs +1 -1
  66. package/dist/vite.mjs +1 -1
  67. package/package.json +8 -7
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.DxEKoBT7.cjs');
5
+ const templates = require('./shared/b24ui-nuxt.lbv7ybxH.cjs');
6
6
  require('node:url');
7
7
  require('scule');
8
8
 
package/dist/module.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "nuxt": ">=3.16.0"
6
6
  },
7
7
  "docs": "https://bitrix24.github.io/b24ui/guide/installation-nuxt-app.html",
8
- "version": "0.4.5",
8
+ "version": "0.4.7",
9
9
  "builder": {
10
10
  "@nuxt/module-builder": "0.8.4",
11
11
  "unbuild": "2.0.0"
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.BH-d1ImO.mjs';
3
+ import { d as defaultOptions, a as getDefaultUiConfig, b as addTemplates } from './shared/b24ui-nuxt.CPOPpSQq.mjs';
4
4
  import 'node:url';
5
5
  import 'scule';
6
6
 
@@ -1,12 +1,11 @@
1
1
  <script lang="ts">
2
2
  import type { ConfigProviderProps, TooltipProviderProps } from 'reka-ui'
3
- import { localeContextInjectionKey } from '../composables/useLocale'
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'))
@@ -29,7 +29,7 @@ export interface FormEmits<T extends object> {
29
29
  }
30
30
 
31
31
  export interface FormSlots {
32
- default(props?: {}): any
32
+ default(props?: { errors: FormError[] }): any
33
33
  }
34
34
  </script>
35
35
 
@@ -120,7 +120,7 @@ const blurredFields = new Set<keyof T>()
120
120
  function resolveErrorIds(errs: FormError[]): FormErrorWithId[] {
121
121
  return errs.map(err => ({
122
122
  ...err,
123
- id: inputs.value[err.name]?.id
123
+ id: err?.name ? inputs.value[err.name]?.id : undefined
124
124
  }))
125
125
  }
126
126
 
@@ -158,12 +158,12 @@ async function _validate(opts: { name?: keyof T | (keyof T)[], silent?: boolean,
158
158
  if (names) {
159
159
  const otherErrors = errors.value.filter(error => !names.some((name) => {
160
160
  const pattern = inputs.value?.[name]?.pattern
161
- return name === error.name || (pattern && error.name.match(pattern))
161
+ return name === error.name || (pattern && error.name?.match(pattern))
162
162
  }))
163
163
 
164
164
  const pathErrors = (await getErrors()).filter(error => names.some((name) => {
165
165
  const pattern = inputs.value?.[name]?.pattern
166
- return name === error.name || (pattern && error.name.match(pattern))
166
+ return name === error.name || (pattern && error.name?.match(pattern))
167
167
  }))
168
168
 
169
169
  errors.value = otherErrors.concat(pathErrors)
@@ -268,6 +268,6 @@ defineExpose<Form<T>>({
268
268
  :class="form({ class: props.class })"
269
269
  @submit.prevent="onSubmitWrapper"
270
270
  >
271
- <slot />
271
+ <slot :errors="errors" />
272
272
  </component>
273
273
  </template>
@@ -68,7 +68,7 @@ const b24ui = computed(() => formField({
68
68
 
69
69
  const formErrors = inject<Ref<FormError[]> | null>('form-errors', null)
70
70
 
71
- const error = computed(() => props.error || formErrors?.value?.find(error => error.name === props.name || (props.errorPattern && error.name.match(props.errorPattern)))?.message)
71
+ const error = computed(() => props.error || formErrors?.value?.find(error => error.name && (error.name === props.name || (props.errorPattern && error.name.match(props.errorPattern))))?.message)
72
72
 
73
73
  const id = ref(useId())
74
74
  // Copies id's initial value to bind aria-attributes such as aria-describedby.
@@ -0,0 +1,105 @@
1
+ <script lang="ts">
2
+ import type { PopoverRootProps, HoverCardRootProps, PopoverRootEmits, PopoverContentProps, PopoverArrowProps } from 'reka-ui'
3
+ import type { AppConfig } from '@nuxt/schema'
4
+ import _appConfig from '#build/app.config'
5
+ import theme from '#build/b24ui/popover'
6
+ import { tv } from '../utils/tv'
7
+
8
+ const appConfigPopover = _appConfig as AppConfig & { b24ui: { popover: Partial<typeof theme> } }
9
+
10
+ const popover = tv({ extend: tv(theme), ...(appConfigPopover.b24ui?.popover || {}) })
11
+
12
+ export interface PopoverProps extends PopoverRootProps, Pick<HoverCardRootProps, 'openDelay' | 'closeDelay'> {
13
+ /**
14
+ * The display mode of the popover.
15
+ * @defaultValue 'click'
16
+ */
17
+ mode?: 'click' | 'hover'
18
+ /**
19
+ * The content of the popover.
20
+ * @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8 }
21
+ */
22
+ content?: Omit<PopoverContentProps, 'as' | 'asChild' | 'forceMount'>
23
+ /**
24
+ * Display an arrow alongside the popover.
25
+ * @defaultValue false
26
+ */
27
+ arrow?: boolean | Omit<PopoverArrowProps, 'as' | 'asChild'>
28
+ /**
29
+ * Render the popover in a portal.
30
+ * @defaultValue true
31
+ */
32
+ portal?: boolean
33
+ /**
34
+ * When `false`, the popover will not close when clicking outside or pressing escape.
35
+ * @defaultValue true
36
+ */
37
+ dismissible?: boolean
38
+ class?: any
39
+ b24ui?: Partial<typeof popover.slots>
40
+ }
41
+
42
+ export interface PopoverEmits extends PopoverRootEmits {}
43
+
44
+ export interface PopoverSlots {
45
+ default(props: { open: boolean }): any
46
+ content(props?: {}): any
47
+ }
48
+ </script>
49
+
50
+ <script setup lang="ts">
51
+ import { computed, toRef } from 'vue'
52
+ import { defu } from 'defu'
53
+ import { useForwardPropsEmits } from 'reka-ui'
54
+ import { Popover, HoverCard } from 'reka-ui/namespaced'
55
+ import { reactivePick } from '@vueuse/core'
56
+
57
+ const props = withDefaults(defineProps<PopoverProps>(), {
58
+ portal: true,
59
+ mode: 'click',
60
+ openDelay: 0,
61
+ closeDelay: 0,
62
+ dismissible: true
63
+ })
64
+ const emits = defineEmits<PopoverEmits>()
65
+ const slots = defineSlots<PopoverSlots>()
66
+
67
+ const pick = props.mode === 'hover' ? reactivePick(props, 'defaultOpen', 'open', 'openDelay', 'closeDelay') : reactivePick(props, 'defaultOpen', 'open', 'modal')
68
+ const rootProps = useForwardPropsEmits(pick, emits)
69
+ const contentProps = toRef(() => defu(props.content, { side: 'bottom', sideOffset: 8, collisionPadding: 8 }) as PopoverContentProps)
70
+ const contentEvents = computed(() => {
71
+ if (!props.dismissible) {
72
+ return {
73
+ pointerDownOutside: (e: Event) => e.preventDefault(),
74
+ interactOutside: (e: Event) => e.preventDefault(),
75
+ escapeKeyDown: (e: Event) => e.preventDefault()
76
+ }
77
+ }
78
+
79
+ return {}
80
+ })
81
+ const arrowProps = toRef(() => props.arrow as PopoverArrowProps)
82
+
83
+ // eslint-disable-next-line vue/no-dupe-keys
84
+ const b24ui = computed(() => popover({
85
+ side: contentProps.value.side
86
+ }))
87
+
88
+ const Component = computed(() => props.mode === 'hover' ? HoverCard : Popover)
89
+ </script>
90
+
91
+ <template>
92
+ <Component.Root v-slot="{ open }" v-bind="rootProps">
93
+ <Component.Trigger v-if="!!slots.default" as-child :class="props.class">
94
+ <slot :open="open" />
95
+ </Component.Trigger>
96
+
97
+ <Component.Portal :disabled="!portal">
98
+ <Component.Content v-bind="contentProps" :class="b24ui.content({ class: [!slots.default && props.class, props.b24ui?.content] })" v-on="contentEvents">
99
+ <slot name="content" />
100
+
101
+ <Component.Arrow v-if="!!arrow" v-bind="arrowProps" :class="b24ui.arrow({ class: props.b24ui?.arrow })" />
102
+ </Component.Content>
103
+ </Component.Portal>
104
+ </Component.Root>
105
+ </template>
@@ -1,9 +1,9 @@
1
- import type { Locale, Direction, Messages } from '../types/locale';
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: 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, ref } from "vue";
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, ref());
7
+ const locale = localeOverrides || toRef(inject(localeContextInjectionKey));
8
8
  return buildLocaleContext(computed(() => locale.value || en));
9
9
  };
10
10
  export const useLocale = createSharedComposable(_useLocale);
@@ -1,2 +1,3 @@
1
- declare const _default: import("../types").Locale;
1
+ import type { Messages } from '../types';
2
+ declare const _default: import("../types").Locale<Messages>;
2
3
  export default _default;
@@ -1,2 +1,3 @@
1
- declare const _default: import("../types").Locale;
1
+ import type { Messages } from '../types';
2
+ declare const _default: import("../types").Locale<Messages>;
2
3
  export default _default;
@@ -1,2 +1,3 @@
1
- declare const _default: import("../types").Locale;
1
+ import type { Messages } from '../types';
2
+ declare const _default: import("../types").Locale<Messages>;
2
3
  export default _default;
@@ -1,2 +1,3 @@
1
- declare const _default: import("../types").Locale;
1
+ import type { Messages } from '../types';
2
+ declare const _default: import("../types").Locale<Messages>;
2
3
  export default _default;
@@ -1,2 +1,3 @@
1
- declare const _default: import("../types").Locale;
1
+ import type { Messages } from '../types';
2
+ declare const _default: import("../types").Locale<Messages>;
2
3
  export default _default;
@@ -1,2 +1,3 @@
1
- declare const _default: import("../types").Locale;
1
+ import type { Messages } from '../types';
2
+ declare const _default: import("../types").Locale<Messages>;
2
3
  export default _default;
@@ -1,2 +1,3 @@
1
- declare const _default: import("../types").Locale;
1
+ import type { Messages } from '../types';
2
+ declare const _default: import("../types").Locale<Messages>;
2
3
  export default _default;
@@ -1,2 +1,3 @@
1
- declare const _default: import("../types").Locale;
1
+ import type { Messages } from '../types';
2
+ declare const _default: import("../types").Locale<Messages>;
2
3
  export default _default;
@@ -1,2 +1,3 @@
1
- declare const _default: import("../types").Locale;
1
+ import type { Messages } from '../types';
2
+ declare const _default: import("../types").Locale<Messages>;
2
3
  export default _default;
@@ -1,2 +1,3 @@
1
- declare const _default: import("../types").Locale;
1
+ import type { Messages } from '../types';
2
+ declare const _default: import("../types").Locale<Messages>;
2
3
  export default _default;
@@ -1,2 +1,3 @@
1
- declare const _default: import("../types").Locale;
1
+ import type { Messages } from '../types';
2
+ declare const _default: import("../types").Locale<Messages>;
2
3
  export default _default;
@@ -1,2 +1,3 @@
1
- declare const _default: import("../types").Locale;
1
+ import type { Messages } from '../types';
2
+ declare const _default: import("../types").Locale<Messages>;
2
3
  export default _default;
@@ -1,2 +1,3 @@
1
- declare const _default: import("../types").Locale;
1
+ import type { Messages } from '../types';
2
+ declare const _default: import("../types").Locale<Messages>;
2
3
  export default _default;
@@ -1,2 +1,3 @@
1
- declare const _default: import("../types").Locale;
1
+ import type { Messages } from '../types';
2
+ declare const _default: import("../types").Locale<Messages>;
2
3
  export default _default;
@@ -1,2 +1,3 @@
1
- declare const _default: import("../types").Locale;
1
+ import type { Messages } from '../types';
2
+ declare const _default: import("../types").Locale<Messages>;
2
3
  export default _default;
@@ -1,2 +1,3 @@
1
- declare const _default: import("../types").Locale;
1
+ import type { Messages } from '../types';
2
+ declare const _default: import("../types").Locale<Messages>;
2
3
  export default _default;
@@ -1,2 +1,3 @@
1
- declare const _default: import("../types").Locale;
1
+ import type { Messages } from '../types';
2
+ declare const _default: import("../types").Locale<Messages>;
2
3
  export default _default;
@@ -1,2 +1,3 @@
1
- declare const _default: import("../types").Locale;
1
+ import type { Messages } from '../types';
2
+ declare const _default: import("../types").Locale<Messages>;
2
3
  export default _default;
@@ -1,2 +1,3 @@
1
- declare const _default: import("../types").Locale;
1
+ import type { Messages } from '../types';
2
+ declare const _default: import("../types").Locale<Messages>;
2
3
  export default _default;
@@ -38,5 +38,7 @@ export default defineNuxtPlugin(() => {
38
38
  }];
39
39
  }
40
40
  }
41
- useHead(headData);
41
+ if (!nuxtApp.isVue) {
42
+ useHead(headData);
43
+ }
42
44
  });
@@ -37,6 +37,6 @@ const b24ui = computed(() => proseCode({
37
37
 
38
38
  <template>
39
39
  <code
40
- :class="b24ui.base({ class: props.b24ui?.base })"
40
+ :class="b24ui.base({ class: [props.class, props.b24ui?.base] })"
41
41
  ><slot /></code>
42
42
  </template>
@@ -28,5 +28,5 @@ const b24ui = proseImg({})
28
28
  <template>
29
29
  <img
30
30
  :class="b24ui.base({ class: [props.class, props.b24ui?.base] })"
31
- />
31
+ >
32
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>