@bitrix24/b24ui-nuxt 0.4.8 → 0.4.10
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/index.ts +13 -0
- package/.nuxt/b24ui/navbar-divider.ts +5 -0
- package/.nuxt/b24ui/navbar-section.ts +5 -0
- package/.nuxt/b24ui/navbar-spacer.ts +5 -0
- package/.nuxt/b24ui/navbar.ts +5 -0
- package/.nuxt/b24ui/sidebar-body.ts +15 -0
- package/.nuxt/b24ui/sidebar-footer.ts +5 -0
- package/.nuxt/b24ui/sidebar-header.ts +5 -0
- package/.nuxt/b24ui/sidebar-heading.ts +5 -0
- package/.nuxt/b24ui/sidebar-layout.ts +38 -0
- package/.nuxt/b24ui/sidebar-section.ts +5 -0
- package/.nuxt/b24ui/sidebar-spacer.ts +5 -0
- package/.nuxt/b24ui/sidebar.ts +5 -0
- package/.nuxt/b24ui/stacked-layout.ts +9 -0
- package/dist/meta.cjs +974 -11
- package/dist/meta.d.cts +974 -11
- package/dist/meta.d.mts +974 -11
- package/dist/meta.d.ts +974 -11
- package/dist/meta.mjs +974 -11
- package/dist/module.cjs +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/Navbar.vue +44 -0
- package/dist/runtime/components/NavbarDivider.vue +43 -0
- package/dist/runtime/components/NavbarSection.vue +47 -0
- package/dist/runtime/components/NavbarSpacer.vue +43 -0
- package/dist/runtime/components/Sidebar.vue +44 -0
- package/dist/runtime/components/SidebarBody.vue +49 -0
- package/dist/runtime/components/SidebarFooter.vue +43 -0
- package/dist/runtime/components/SidebarHeader.vue +43 -0
- package/dist/runtime/components/SidebarHeading.vue +43 -0
- package/dist/runtime/components/SidebarLayout.vue +131 -0
- package/dist/runtime/components/SidebarSection.vue +47 -0
- package/dist/runtime/components/SidebarSpacer.vue +43 -0
- package/dist/runtime/components/StackedLayout.vue +51 -0
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/plugins/colors.js +2 -5
- package/dist/runtime/types/index.d.ts +13 -0
- package/dist/runtime/types/index.js +13 -0
- package/dist/runtime/utils/link.d.ts +7 -7
- package/dist/runtime/vue/plugins/head.js +3 -0
- package/dist/runtime/vue/stubs.d.ts +1 -2
- package/dist/runtime/vue/stubs.js +1 -2
- package/dist/shared/{b24ui-nuxt.CH0xlXgy.cjs → b24ui-nuxt.CY35QViH.cjs} +230 -0
- package/dist/shared/{b24ui-nuxt.D6rkGFKm.mjs → b24ui-nuxt._rviRWFf.mjs} +230 -0
- package/dist/unplugin.cjs +6 -2
- package/dist/unplugin.mjs +6 -2
- package/dist/vite.cjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +7 -7
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._rviRWFf.mjs';
|
|
4
4
|
import 'node:url';
|
|
5
5
|
import 'scule';
|
|
6
6
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
3
|
+
import _appConfig from '#build/app.config'
|
|
4
|
+
import theme from '#build/b24ui/navbar'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigNavbar = _appConfig as AppConfig & { b24ui: { navbar: Partial<typeof theme> } }
|
|
8
|
+
|
|
9
|
+
const navbar = tv({ extend: tv(theme), ...(appConfigNavbar.b24ui?.navbar || {}) })
|
|
10
|
+
|
|
11
|
+
export interface NavbarProps {
|
|
12
|
+
/**
|
|
13
|
+
* The element or component this component should render as.
|
|
14
|
+
* @defaultValue 'nav'
|
|
15
|
+
*/
|
|
16
|
+
as?: any
|
|
17
|
+
class?: any
|
|
18
|
+
b24ui?: Partial<typeof navbar.slots>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface NavbarSlots {
|
|
22
|
+
default(props?: {}): any
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<script setup lang="ts">
|
|
27
|
+
import { computed } from 'vue'
|
|
28
|
+
import { Primitive } from 'reka-ui'
|
|
29
|
+
|
|
30
|
+
const props = withDefaults(defineProps<NavbarProps>(), {
|
|
31
|
+
as: 'nav'
|
|
32
|
+
})
|
|
33
|
+
defineSlots<NavbarSlots>()
|
|
34
|
+
|
|
35
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
36
|
+
const b24ui = computed(() => navbar({}))
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<!-- Navbar -->
|
|
41
|
+
<Primitive :as="as" :class="b24ui.root({ class: [props.class, props.b24ui?.root] })">
|
|
42
|
+
<slot />
|
|
43
|
+
</Primitive>
|
|
44
|
+
</template>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
3
|
+
import _appConfig from '#build/app.config'
|
|
4
|
+
import theme from '#build/b24ui/navbar-divider'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigNavbarDivider = _appConfig as AppConfig & { b24ui: { navbarDivider: Partial<typeof theme> } }
|
|
8
|
+
|
|
9
|
+
const navbarDivider = tv({ extend: tv(theme), ...(appConfigNavbarDivider.b24ui?.navbarDivider || {}) })
|
|
10
|
+
|
|
11
|
+
export interface NavbarDividerProps {
|
|
12
|
+
/**
|
|
13
|
+
* The element or component this component should render as.
|
|
14
|
+
* @defaultValue 'div'
|
|
15
|
+
*/
|
|
16
|
+
as?: any
|
|
17
|
+
class?: any
|
|
18
|
+
b24ui?: Partial<typeof navbarDivider.slots>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface NavbarDividerSlots {
|
|
22
|
+
default(props?: {}): any
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<script setup lang="ts">
|
|
27
|
+
import { computed } from 'vue'
|
|
28
|
+
import { Primitive } from 'reka-ui'
|
|
29
|
+
|
|
30
|
+
const props = withDefaults(defineProps<NavbarDividerProps>(), {
|
|
31
|
+
as: 'div'
|
|
32
|
+
})
|
|
33
|
+
defineSlots<NavbarDividerSlots>()
|
|
34
|
+
|
|
35
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
36
|
+
const b24ui = computed(() => navbarDivider({}))
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<Primitive :as="as" aria-hidden="true" :class="b24ui.root({ class: [props.class, props.b24ui?.root] })">
|
|
41
|
+
<slot />
|
|
42
|
+
</Primitive>
|
|
43
|
+
</template>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
3
|
+
import _appConfig from '#build/app.config'
|
|
4
|
+
import theme from '#build/b24ui/navbar-section'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigNavSection = _appConfig as AppConfig & { b24ui: { navbarSection: Partial<typeof theme> } }
|
|
8
|
+
|
|
9
|
+
const navbarSection = tv({ extend: tv(theme), ...(appConfigNavSection.b24ui?.navbarSection || {}) })
|
|
10
|
+
|
|
11
|
+
export interface NavbarSectionProps {
|
|
12
|
+
/**
|
|
13
|
+
* The element or component this component should render as.
|
|
14
|
+
* @defaultValue 'div'
|
|
15
|
+
*/
|
|
16
|
+
as?: any
|
|
17
|
+
class?: any
|
|
18
|
+
b24ui?: Partial<typeof navbarSection.slots>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface NavbarSectionSlots {
|
|
22
|
+
default(props?: {}): any
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<script setup lang="ts">
|
|
27
|
+
import { computed } from 'vue'
|
|
28
|
+
import { Primitive } from 'reka-ui'
|
|
29
|
+
|
|
30
|
+
const props = withDefaults(defineProps<NavbarSectionProps>(), {
|
|
31
|
+
as: 'div'
|
|
32
|
+
})
|
|
33
|
+
defineSlots<NavbarSectionSlots>()
|
|
34
|
+
|
|
35
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
36
|
+
const b24ui = computed(() => navbarSection({}))
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<Primitive
|
|
41
|
+
:as="as"
|
|
42
|
+
:class="b24ui.root({ class: [props.class, props.b24ui?.root] })"
|
|
43
|
+
data-slot="section"
|
|
44
|
+
>
|
|
45
|
+
<slot />
|
|
46
|
+
</Primitive>
|
|
47
|
+
</template>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
3
|
+
import _appConfig from '#build/app.config'
|
|
4
|
+
import theme from '#build/b24ui/navbar-spacer'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigNavbarSpacer = _appConfig as AppConfig & { b24ui: { navbarSpacer: Partial<typeof theme> } }
|
|
8
|
+
|
|
9
|
+
const navbarSpacer = tv({ extend: tv(theme), ...(appConfigNavbarSpacer.b24ui?.navbarSpacer || {}) })
|
|
10
|
+
|
|
11
|
+
export interface NavbarSpacerProps {
|
|
12
|
+
/**
|
|
13
|
+
* The element or component this component should render as.
|
|
14
|
+
* @defaultValue 'div'
|
|
15
|
+
*/
|
|
16
|
+
as?: any
|
|
17
|
+
class?: any
|
|
18
|
+
b24ui?: Partial<typeof navbarSpacer.slots>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface NavbarSpacerSlots {
|
|
22
|
+
default(props?: {}): any
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<script setup lang="ts">
|
|
27
|
+
import { computed } from 'vue'
|
|
28
|
+
import { Primitive } from 'reka-ui'
|
|
29
|
+
|
|
30
|
+
const props = withDefaults(defineProps<NavbarSpacerProps>(), {
|
|
31
|
+
as: 'div'
|
|
32
|
+
})
|
|
33
|
+
defineSlots<NavbarSpacerSlots>()
|
|
34
|
+
|
|
35
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
36
|
+
const b24ui = computed(() => navbarSpacer({}))
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<Primitive :as="as" aria-hidden="true" :class="b24ui.root({ class: [props.class, props.b24ui?.root] })">
|
|
41
|
+
<slot />
|
|
42
|
+
</Primitive>
|
|
43
|
+
</template>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
3
|
+
import _appConfig from '#build/app.config'
|
|
4
|
+
import theme from '#build/b24ui/sidebar'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigSidebar = _appConfig as AppConfig & { b24ui: { sidebar: Partial<typeof theme> } }
|
|
8
|
+
|
|
9
|
+
const sidebar = tv({ extend: tv(theme), ...(appConfigSidebar.b24ui?.sidebar || {}) })
|
|
10
|
+
|
|
11
|
+
export interface SidebarProps {
|
|
12
|
+
/**
|
|
13
|
+
* The element or component this component should render as.
|
|
14
|
+
* @defaultValue 'div'
|
|
15
|
+
*/
|
|
16
|
+
as?: any
|
|
17
|
+
class?: any
|
|
18
|
+
b24ui?: Partial<typeof sidebar.slots>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface SidebarSlots {
|
|
22
|
+
default(props?: {}): any
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<script setup lang="ts">
|
|
27
|
+
import { computed } from 'vue'
|
|
28
|
+
import { Primitive } from 'reka-ui'
|
|
29
|
+
|
|
30
|
+
const props = withDefaults(defineProps<SidebarProps>(), {
|
|
31
|
+
as: 'div'
|
|
32
|
+
})
|
|
33
|
+
defineSlots<SidebarSlots>()
|
|
34
|
+
|
|
35
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
36
|
+
const b24ui = computed(() => sidebar({}))
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<!-- Sidebar -->
|
|
41
|
+
<Primitive :as="as" :class="b24ui.root({ class: [props.class, props.b24ui?.root] })">
|
|
42
|
+
<slot />
|
|
43
|
+
</Primitive>
|
|
44
|
+
</template>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
3
|
+
import _appConfig from '#build/app.config'
|
|
4
|
+
import theme from '#build/b24ui/sidebar-body'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigSidebarBody = _appConfig as AppConfig & { b24ui: { sidebarBody: Partial<typeof theme> } }
|
|
8
|
+
|
|
9
|
+
const sidebarBody = tv({ extend: tv(theme), ...(appConfigSidebarBody.b24ui?.sidebarBody || {}) })
|
|
10
|
+
|
|
11
|
+
export interface SidebarBodyProps {
|
|
12
|
+
/**
|
|
13
|
+
* The element or component this component should render as.
|
|
14
|
+
* @defaultValue 'div'
|
|
15
|
+
*/
|
|
16
|
+
as?: any
|
|
17
|
+
/**
|
|
18
|
+
* @defaultValue true
|
|
19
|
+
*/
|
|
20
|
+
scrollbarThin?: boolean
|
|
21
|
+
class?: any
|
|
22
|
+
b24ui?: Partial<typeof sidebarBody.slots>
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface SidebarBodySlots {
|
|
26
|
+
default(props?: {}): any
|
|
27
|
+
}
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<script setup lang="ts">
|
|
31
|
+
import { computed } from 'vue'
|
|
32
|
+
import { Primitive } from 'reka-ui'
|
|
33
|
+
|
|
34
|
+
const props = withDefaults(defineProps<SidebarBodyProps>(), {
|
|
35
|
+
as: 'div',
|
|
36
|
+
scrollbarThin: true
|
|
37
|
+
})
|
|
38
|
+
defineSlots<SidebarBodySlots>()
|
|
39
|
+
|
|
40
|
+
const b24ui = computed(() => sidebarBody({
|
|
41
|
+
scrollbarThin: Boolean(props.scrollbarThin)
|
|
42
|
+
}))
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<Primitive :as="as" :class="b24ui.root({ class: [props.class, props.b24ui?.root] })">
|
|
47
|
+
<slot />
|
|
48
|
+
</Primitive>
|
|
49
|
+
</template>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
3
|
+
import _appConfig from '#build/app.config'
|
|
4
|
+
import theme from '#build/b24ui/sidebar-footer'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigSidebarFooter = _appConfig as AppConfig & { b24ui: { sidebarFooter: Partial<typeof theme> } }
|
|
8
|
+
|
|
9
|
+
const sidebarFooter = tv({ extend: tv(theme), ...(appConfigSidebarFooter.b24ui?.sidebarFooter || {}) })
|
|
10
|
+
|
|
11
|
+
export interface SidebarFooterProps {
|
|
12
|
+
/**
|
|
13
|
+
* The element or component this component should render as.
|
|
14
|
+
* @defaultValue 'div'
|
|
15
|
+
*/
|
|
16
|
+
as?: any
|
|
17
|
+
class?: any
|
|
18
|
+
b24ui?: Partial<typeof sidebarFooter.slots>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface SidebarFooterSlots {
|
|
22
|
+
default(props?: {}): any
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<script setup lang="ts">
|
|
27
|
+
import { computed } from 'vue'
|
|
28
|
+
import { Primitive } from 'reka-ui'
|
|
29
|
+
|
|
30
|
+
const props = withDefaults(defineProps<SidebarFooterProps>(), {
|
|
31
|
+
as: 'div'
|
|
32
|
+
})
|
|
33
|
+
defineSlots<SidebarFooterSlots>()
|
|
34
|
+
|
|
35
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
36
|
+
const b24ui = computed(() => sidebarFooter({}))
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<Primitive :as="as" :class="b24ui.root({ class: [props.class, props.b24ui?.root] })">
|
|
41
|
+
<slot />
|
|
42
|
+
</Primitive>
|
|
43
|
+
</template>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
3
|
+
import _appConfig from '#build/app.config'
|
|
4
|
+
import theme from '#build/b24ui/sidebar-header'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigSidebarHeader = _appConfig as AppConfig & { b24ui: { sidebarHeader: Partial<typeof theme> } }
|
|
8
|
+
|
|
9
|
+
const sidebarHeader = tv({ extend: tv(theme), ...(appConfigSidebarHeader.b24ui?.sidebarHeader || {}) })
|
|
10
|
+
|
|
11
|
+
export interface SidebarHeaderProps {
|
|
12
|
+
/**
|
|
13
|
+
* The element or component this component should render as.
|
|
14
|
+
* @defaultValue 'div'
|
|
15
|
+
*/
|
|
16
|
+
as?: any
|
|
17
|
+
class?: any
|
|
18
|
+
b24ui?: Partial<typeof sidebarHeader.slots>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface SidebarHeaderSlots {
|
|
22
|
+
default(props?: {}): any
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<script setup lang="ts">
|
|
27
|
+
import { computed } from 'vue'
|
|
28
|
+
import { Primitive } from 'reka-ui'
|
|
29
|
+
|
|
30
|
+
const props = withDefaults(defineProps<SidebarHeaderProps>(), {
|
|
31
|
+
as: 'div'
|
|
32
|
+
})
|
|
33
|
+
defineSlots<SidebarHeaderSlots>()
|
|
34
|
+
|
|
35
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
36
|
+
const b24ui = computed(() => sidebarHeader({}))
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<Primitive :as="as" :class="b24ui.root({ class: [props.class, props.b24ui?.root] })">
|
|
41
|
+
<slot />
|
|
42
|
+
</Primitive>
|
|
43
|
+
</template>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
3
|
+
import _appConfig from '#build/app.config'
|
|
4
|
+
import theme from '#build/b24ui/sidebar-heading'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigSidebarHeading = _appConfig as AppConfig & { b24ui: { sidebarHeading: Partial<typeof theme> } }
|
|
8
|
+
|
|
9
|
+
const sidebarHeading = tv({ extend: tv(theme), ...(appConfigSidebarHeading.b24ui?.sidebarHeading || {}) })
|
|
10
|
+
|
|
11
|
+
export interface SidebarHeadingProps {
|
|
12
|
+
/**
|
|
13
|
+
* The element or component this component should render as.
|
|
14
|
+
* @defaultValue 'h6'
|
|
15
|
+
*/
|
|
16
|
+
as?: any
|
|
17
|
+
class?: any
|
|
18
|
+
b24ui?: Partial<typeof sidebarHeading.slots>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface SidebarHeadingSlots {
|
|
22
|
+
default(props?: {}): any
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<script setup lang="ts">
|
|
27
|
+
import { computed } from 'vue'
|
|
28
|
+
import { Primitive } from 'reka-ui'
|
|
29
|
+
|
|
30
|
+
const props = withDefaults(defineProps<SidebarHeadingProps>(), {
|
|
31
|
+
as: 'h6'
|
|
32
|
+
})
|
|
33
|
+
defineSlots<SidebarHeadingSlots>()
|
|
34
|
+
|
|
35
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
36
|
+
const b24ui = computed(() => sidebarHeading({}))
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<Primitive :as="as" :class="b24ui.root({ class: [props.class, props.b24ui?.root] })">
|
|
41
|
+
<slot />
|
|
42
|
+
</Primitive>
|
|
43
|
+
</template>
|
|
@@ -0,0 +1,131 @@
|
|
|
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/sidebar-layout'
|
|
6
|
+
import { tv } from '../utils/tv'
|
|
7
|
+
|
|
8
|
+
const appConfigSidebarLayout = _appConfig as AppConfig & { b24ui: { sidebarLayout: Partial<typeof theme> } }
|
|
9
|
+
|
|
10
|
+
const sidebarLayout = tv({ extend: tv(theme), ...(appConfigSidebarLayout.b24ui?.sidebarLayout || {}) })
|
|
11
|
+
|
|
12
|
+
// type SidebarLayoutVariants = VariantProps<typeof sidebarLayout>
|
|
13
|
+
|
|
14
|
+
export interface SidebarLayoutProps {
|
|
15
|
+
/**
|
|
16
|
+
* The element or component this component should render as.
|
|
17
|
+
* @defaultValue 'div'
|
|
18
|
+
*/
|
|
19
|
+
as?: any
|
|
20
|
+
useSidebar?: boolean
|
|
21
|
+
useLightContent?: boolean
|
|
22
|
+
class?: any
|
|
23
|
+
b24ui?: Partial<typeof sidebarLayout.slots>
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface SidebarLayoutSlots {
|
|
27
|
+
/**
|
|
28
|
+
* Menu for all screen sizes.
|
|
29
|
+
*/
|
|
30
|
+
sidebar(props?: {}): any
|
|
31
|
+
/**
|
|
32
|
+
* Menu for mobile screen sizes.
|
|
33
|
+
*/
|
|
34
|
+
navbar(props?: {}): any
|
|
35
|
+
/**
|
|
36
|
+
* The page content.
|
|
37
|
+
*/
|
|
38
|
+
default(props?: {}): any
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<script setup lang="ts">
|
|
43
|
+
import { computed } from 'vue'
|
|
44
|
+
import { Primitive } from 'reka-ui'
|
|
45
|
+
import B24Slideover from './Slideover.vue'
|
|
46
|
+
import B24Sidebar from './Sidebar.vue'
|
|
47
|
+
import B24ModalDialogClose from './ModalDialogClose.vue'
|
|
48
|
+
import B24Navbar from './Navbar.vue'
|
|
49
|
+
import MenuIcon from '@bitrix24/b24icons-vue/main/MenuIcon'
|
|
50
|
+
import Cross50Icon from '@bitrix24/b24icons-vue/actions/Cross50Icon'
|
|
51
|
+
|
|
52
|
+
const props = withDefaults(defineProps<SidebarLayoutProps>(), {
|
|
53
|
+
as: 'div',
|
|
54
|
+
useLightContent: true
|
|
55
|
+
})
|
|
56
|
+
const slots = defineSlots<SidebarLayoutSlots>()
|
|
57
|
+
|
|
58
|
+
const isUseSideBar = computed(() => !!slots.sidebar)
|
|
59
|
+
|
|
60
|
+
const b24ui = computed(() => sidebarLayout({
|
|
61
|
+
useSidebar: isUseSideBar.value,
|
|
62
|
+
useLightContent: Boolean(props.useLightContent)
|
|
63
|
+
}))
|
|
64
|
+
</script>
|
|
65
|
+
|
|
66
|
+
<template>
|
|
67
|
+
<Primitive :as="as" :class="b24ui.root({ class: [props.class, props.b24ui?.root] })">
|
|
68
|
+
<template v-if="isUseSideBar">
|
|
69
|
+
<div :class="b24ui.sidebar({ class: props.b24ui?.sidebar })">
|
|
70
|
+
<B24Sidebar>
|
|
71
|
+
<slot name="sidebar" />
|
|
72
|
+
</B24Sidebar>
|
|
73
|
+
</div>
|
|
74
|
+
</template>
|
|
75
|
+
|
|
76
|
+
<header :class="b24ui.header({ class: props.b24ui?.header })">
|
|
77
|
+
<div :class="b24ui.headerPaddings({ class: props.b24ui?.headerPaddings })">
|
|
78
|
+
<B24Slideover
|
|
79
|
+
title="Navigation"
|
|
80
|
+
description="Content navigation"
|
|
81
|
+
side="left"
|
|
82
|
+
:b24ui="{ content: b24ui.sidebarSlideoverContainer({ class: props.b24ui?.sidebarSlideoverContainer }) }"
|
|
83
|
+
>
|
|
84
|
+
<!-- @todo: lang -->
|
|
85
|
+
<B24Button
|
|
86
|
+
aria-label="Open navigation"
|
|
87
|
+
color="link"
|
|
88
|
+
size="sm"
|
|
89
|
+
:icon="MenuIcon"
|
|
90
|
+
/>
|
|
91
|
+
|
|
92
|
+
<template #content>
|
|
93
|
+
<div :class="b24ui.sidebarSlideover({ class: props.b24ui?.sidebarSlideover })">
|
|
94
|
+
<B24Sidebar>
|
|
95
|
+
<div :class="b24ui.sidebarSlideoverBtnClose({ class: props.b24ui?.sidebarSlideoverBtnClose })">
|
|
96
|
+
<!-- @todo: lang -->
|
|
97
|
+
<B24ModalDialogClose>
|
|
98
|
+
<B24Button
|
|
99
|
+
color="link"
|
|
100
|
+
size="lg"
|
|
101
|
+
:icon="Cross50Icon"
|
|
102
|
+
aria-label="Close navigation"
|
|
103
|
+
/>
|
|
104
|
+
</B24ModalDialogClose>
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
<slot name="sidebar" />
|
|
108
|
+
</B24Sidebar>
|
|
109
|
+
</div>
|
|
110
|
+
</template>
|
|
111
|
+
</B24Slideover>
|
|
112
|
+
</div>
|
|
113
|
+
<div :class="b24ui.headerWrapper({ class: props.b24ui?.headerWrapper })">
|
|
114
|
+
<B24Navbar :class="b24ui.headerPaddings({ class: props.b24ui?.headerPaddings })">
|
|
115
|
+
<slot name="navbar" />
|
|
116
|
+
</B24Navbar>
|
|
117
|
+
</div>
|
|
118
|
+
</header>
|
|
119
|
+
|
|
120
|
+
<!-- Page Content -->
|
|
121
|
+
<template v-if="!!slots.default">
|
|
122
|
+
<main :class="b24ui.container({ class: props.b24ui?.container })">
|
|
123
|
+
<div :class="b24ui.containerWrapper({ class: props.b24ui?.containerWrapper })">
|
|
124
|
+
<div :class="b24ui.containerWrapperInner({ class: props.b24ui?.containerWrapperInner })">
|
|
125
|
+
<slot />
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
</main>
|
|
129
|
+
</template>
|
|
130
|
+
</Primitive>
|
|
131
|
+
</template>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
3
|
+
import _appConfig from '#build/app.config'
|
|
4
|
+
import theme from '#build/b24ui/sidebar-section'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigSidebarSection = _appConfig as AppConfig & { b24ui: { sidebarSection: Partial<typeof theme> } }
|
|
8
|
+
|
|
9
|
+
const sidebarSection = tv({ extend: tv(theme), ...(appConfigSidebarSection.b24ui?.sidebarSection || {}) })
|
|
10
|
+
|
|
11
|
+
export interface SidebarSectionProps {
|
|
12
|
+
/**
|
|
13
|
+
* The element or component this component should render as.
|
|
14
|
+
* @defaultValue 'div'
|
|
15
|
+
*/
|
|
16
|
+
as?: any
|
|
17
|
+
class?: any
|
|
18
|
+
b24ui?: Partial<typeof sidebarSection.slots>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface SidebarSectionSlots {
|
|
22
|
+
default(props?: {}): any
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<script setup lang="ts">
|
|
27
|
+
import { computed } from 'vue'
|
|
28
|
+
import { Primitive } from 'reka-ui'
|
|
29
|
+
|
|
30
|
+
const props = withDefaults(defineProps<SidebarSectionProps>(), {
|
|
31
|
+
as: 'div'
|
|
32
|
+
})
|
|
33
|
+
defineSlots<SidebarSectionSlots>()
|
|
34
|
+
|
|
35
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
36
|
+
const b24ui = computed(() => sidebarSection({}))
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<Primitive
|
|
41
|
+
:as="as"
|
|
42
|
+
:class="b24ui.root({ class: [props.class, props.b24ui?.root] })"
|
|
43
|
+
data-slot="section"
|
|
44
|
+
>
|
|
45
|
+
<slot />
|
|
46
|
+
</Primitive>
|
|
47
|
+
</template>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
3
|
+
import _appConfig from '#build/app.config'
|
|
4
|
+
import theme from '#build/b24ui/sidebar-spacer'
|
|
5
|
+
import { tv } from '../utils/tv'
|
|
6
|
+
|
|
7
|
+
const appConfigSidebarSpacer = _appConfig as AppConfig & { b24ui: { sidebarSpacer: Partial<typeof theme> } }
|
|
8
|
+
|
|
9
|
+
const sidebarSpacer = tv({ extend: tv(theme), ...(appConfigSidebarSpacer.b24ui?.sidebarSpacer || {}) })
|
|
10
|
+
|
|
11
|
+
export interface SidebarSpacerProps {
|
|
12
|
+
/**
|
|
13
|
+
* The element or component this component should render as.
|
|
14
|
+
* @defaultValue 'div'
|
|
15
|
+
*/
|
|
16
|
+
as?: any
|
|
17
|
+
class?: any
|
|
18
|
+
b24ui?: Partial<typeof sidebarSpacer.slots>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface SidebarSpacerSlots {
|
|
22
|
+
default(props?: {}): any
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<script setup lang="ts">
|
|
27
|
+
import { computed } from 'vue'
|
|
28
|
+
import { Primitive } from 'reka-ui'
|
|
29
|
+
|
|
30
|
+
const props = withDefaults(defineProps<SidebarSpacerProps>(), {
|
|
31
|
+
as: 'div'
|
|
32
|
+
})
|
|
33
|
+
defineSlots<SidebarSpacerSlots>()
|
|
34
|
+
|
|
35
|
+
// eslint-disable-next-line vue/no-dupe-keys
|
|
36
|
+
const b24ui = computed(() => sidebarSpacer({}))
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<Primitive :as="as" aria-hidden="true" :class="b24ui.root({ class: [props.class, props.b24ui?.root] })">
|
|
41
|
+
<slot />
|
|
42
|
+
</Primitive>
|
|
43
|
+
</template>
|