@altafusion/fugue-app-shell 0.0.0-stage → 0.9.0
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/CHANGELOG.md +153 -0
- package/LICENSE +21 -0
- package/README.md +110 -2
- package/app/app.config.ts +15 -0
- package/app/components/ShellAsidePlaceholder.vue +16 -0
- package/app/components/ShellBrandLogo.vue +26 -0
- package/app/components/ShellLangToggle.vue +129 -0
- package/app/components/ShellPageHeader.vue +25 -0
- package/app/components/ShellSiteHeader.vue +63 -0
- package/app/composables/useAppNav.ts +67 -0
- package/app/composables/useBrandTheme.ts +37 -0
- package/app/composables/usePageChrome.ts +40 -0
- package/app/composables/useShellChrome.ts +122 -0
- package/app/composables/useShellFooterRight.ts +13 -0
- package/app/composables/useShellHeaderActions.ts +18 -0
- package/app/composables/useShellHeaderRight.ts +13 -0
- package/app/composables/useShellI18n.ts +31 -0
- package/app/layouts/default.vue +80 -0
- package/app/layouts/fullscreen.vue +20 -0
- package/app/layouts/minimal.vue +11 -0
- package/app/layouts/product.vue +23 -0
- package/app/plugins/brand-theme.ts +29 -0
- package/app/plugins/shell-brand-head.ts +30 -0
- package/assets/css/brand-variants.css +50 -0
- package/assets/css/sections/landing-header.css +249 -0
- package/assets/css/sections/shell-chrome.css +34 -0
- package/assets/css/shell-sections.css +2 -0
- package/components/BaseButton.vue +106 -0
- package/eslint.config.mjs +4 -0
- package/lib/fugue-content-public-config.ts +39 -0
- package/lib/injection-keys.ts +9 -0
- package/lib/locale-switch-path.ts +20 -0
- package/lib/nuxt-ui-icons.ts +14 -0
- package/nuxt.config.ts +47 -0
- package/package.json +58 -3
- package/themes/tailwind-shell.css +28 -0
- package/types/app-brand.ts +42 -0
- package/types/nuxt-shell.d.ts +38 -0
- package/utils/altafusionBrandTheme.ts +15 -0
- package/utils/formatDate.ts +13 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface PageChromeBreadcrumb {
|
|
2
|
+
label: string
|
|
3
|
+
to?: string
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Page heading and breadcrumbs from route meta.
|
|
8
|
+
* Reads `definePageMeta` hints (`title`, `breadcrumb`).
|
|
9
|
+
*/
|
|
10
|
+
export function usePageChrome() {
|
|
11
|
+
const route = useRoute()
|
|
12
|
+
|
|
13
|
+
const title = computed(() => {
|
|
14
|
+
const metaTitle = route.meta.title
|
|
15
|
+
if (typeof metaTitle === 'string')
|
|
16
|
+
return metaTitle
|
|
17
|
+
return undefined
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
const breadcrumbs = computed((): PageChromeBreadcrumb[] => {
|
|
21
|
+
const crumb = route.meta.breadcrumb
|
|
22
|
+
if (typeof crumb === 'string' && crumb.length > 0) {
|
|
23
|
+
return [
|
|
24
|
+
{ label: crumb }
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
return []
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
const showAside = computed(() => {
|
|
31
|
+
const nav = route.meta.nav as { aside?: string[] } | undefined
|
|
32
|
+
return Boolean(nav?.aside?.length)
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
return {
|
|
36
|
+
title,
|
|
37
|
+
breadcrumbs,
|
|
38
|
+
showAside
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import type { Component, VNode } from 'vue'
|
|
2
|
+
import type { ShellBrand, ShellBrandConfig, ShellHeaderConfig } from '../../types/app-brand'
|
|
3
|
+
import type { AppNavItem } from './useAppNav'
|
|
4
|
+
import { shellDisplayNameKey } from '../../lib/injection-keys'
|
|
5
|
+
import { useShellI18n } from './useShellI18n'
|
|
6
|
+
|
|
7
|
+
export interface ShellChromeOptions {
|
|
8
|
+
/** Site header (FugueAppHeader). Default true except on `minimal` layout. */
|
|
9
|
+
header?: boolean
|
|
10
|
+
/** Footer chrome. Default true on `default` layout only. */
|
|
11
|
+
footer?: boolean
|
|
12
|
+
/** Padding on the main content region. Default true on `default` layout. */
|
|
13
|
+
mainPadding?: boolean
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Shell chrome flags from route meta with layout-aware defaults.
|
|
18
|
+
*/
|
|
19
|
+
export function useShellChrome() {
|
|
20
|
+
const route = useRoute()
|
|
21
|
+
|
|
22
|
+
const layout = computed(() => {
|
|
23
|
+
const name = route.meta.layout
|
|
24
|
+
if (name === false)
|
|
25
|
+
return 'none'
|
|
26
|
+
return typeof name === 'string'
|
|
27
|
+
? name
|
|
28
|
+
: 'default'
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
const metaChrome = computed(() => route.meta.shell as ShellChromeOptions | undefined)
|
|
32
|
+
|
|
33
|
+
const showHeader = computed(() => {
|
|
34
|
+
if (layout.value === 'minimal' || layout.value === 'none')
|
|
35
|
+
return false
|
|
36
|
+
return metaChrome.value?.header ?? true
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
const showFooter = computed(() => {
|
|
40
|
+
if (layout.value !== 'default')
|
|
41
|
+
return false
|
|
42
|
+
return metaChrome.value?.footer ?? true
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
const mainPadding = computed(() => {
|
|
46
|
+
if (layout.value === 'default')
|
|
47
|
+
return metaChrome.value?.mainPadding ?? true
|
|
48
|
+
return metaChrome.value?.mainPadding ?? false
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
return {
|
|
52
|
+
layout,
|
|
53
|
+
showHeader,
|
|
54
|
+
showFooter,
|
|
55
|
+
mainPadding
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface ShellSiteHeaderState {
|
|
60
|
+
title: ComputedRef<string>
|
|
61
|
+
brand: ComputedRef<ShellBrand>
|
|
62
|
+
homeTo: ComputedRef<string>
|
|
63
|
+
navItems: ComputedRef<AppNavItem[]>
|
|
64
|
+
activeNavId: ComputedRef<string | undefined>
|
|
65
|
+
showColorMode: ComputedRef<boolean>
|
|
66
|
+
visualStyle: ComputedRef<'default' | 'landing-fixed' | 'landing-static'>
|
|
67
|
+
headerActions: Component | (() => VNode) | null
|
|
68
|
+
headerRight: Component | (() => VNode) | null
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** Shared wiring for ShellSiteHeader — apps override the component, not this composable. */
|
|
72
|
+
export function useShellSiteHeader(): ShellSiteHeaderState {
|
|
73
|
+
const appConfig = useAppConfig()
|
|
74
|
+
const runtimeAppName = useRuntimeConfig().public.appName as string | undefined
|
|
75
|
+
const { items, activeId } = useAppNav()
|
|
76
|
+
const { localePath } = useShellI18n()
|
|
77
|
+
const headerActions = useShellHeaderActions()
|
|
78
|
+
const headerRight = useShellHeaderRight()
|
|
79
|
+
const studioDisplayName = inject(shellDisplayNameKey, ref<string | undefined>(undefined))
|
|
80
|
+
|
|
81
|
+
const homeTo = computed(() => localePath('/'))
|
|
82
|
+
|
|
83
|
+
const brand = computed<ShellBrand>(() => {
|
|
84
|
+
const configured = appConfig.brand as ShellBrandConfig | undefined
|
|
85
|
+
const header = appConfig.header as ShellHeaderConfig | undefined
|
|
86
|
+
const name = header?.title
|
|
87
|
+
?? studioDisplayName.value
|
|
88
|
+
?? configured?.name
|
|
89
|
+
?? runtimeAppName
|
|
90
|
+
?? 'App'
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
name,
|
|
94
|
+
logo: configured?.logo,
|
|
95
|
+
logoAlt: configured?.logoAlt ?? name,
|
|
96
|
+
logoClass: configured?.logoClass,
|
|
97
|
+
favicon: configured?.favicon
|
|
98
|
+
}
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
const title = computed(() => brand.value.name)
|
|
102
|
+
|
|
103
|
+
const showColorMode = computed(
|
|
104
|
+
() => (appConfig.header as ShellHeaderConfig | undefined)?.showColorMode ?? true
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
const visualStyle = computed(
|
|
108
|
+
() => (appConfig.header as ShellHeaderConfig | undefined)?.visualStyle ?? 'default'
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
return {
|
|
112
|
+
title,
|
|
113
|
+
brand,
|
|
114
|
+
homeTo,
|
|
115
|
+
navItems: items,
|
|
116
|
+
activeNavId: activeId,
|
|
117
|
+
showColorMode,
|
|
118
|
+
visualStyle,
|
|
119
|
+
headerActions,
|
|
120
|
+
headerRight
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Component, ShallowRef, VNode } from 'vue'
|
|
2
|
+
import { shallowRef } from 'vue'
|
|
3
|
+
|
|
4
|
+
const footerRight = shallowRef<Component | (() => VNode) | null>(null)
|
|
5
|
+
|
|
6
|
+
/** Set trailing footer chrome (e.g. fugue-content-site Edit entry) — clear with `null` on unmount. */
|
|
7
|
+
export function setShellFooterRight(actions: Component | (() => VNode) | null) {
|
|
8
|
+
footerRight.value = actions
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function useShellFooterRight(): ShallowRef<Component | (() => VNode) | null> {
|
|
12
|
+
return footerRight
|
|
13
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Component, ShallowRef, VNode } from 'vue'
|
|
2
|
+
import { shallowRef } from 'vue'
|
|
3
|
+
|
|
4
|
+
const headerActions = shallowRef<Component | (() => VNode) | null>(null)
|
|
5
|
+
|
|
6
|
+
/** Set header actions for the current page (clear with `null` on unmount). */
|
|
7
|
+
export function setShellHeaderActions(actions: Component | (() => VNode) | null) {
|
|
8
|
+
headerActions.value = actions
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** @deprecated Prefer `setShellHeaderActions` from pages with lifecycle cleanup. */
|
|
12
|
+
export function provideShellHeaderActions(actions: Component | (() => VNode)) {
|
|
13
|
+
setShellHeaderActions(actions)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function useShellHeaderActions(): ShallowRef<Component | (() => VNode) | null> {
|
|
17
|
+
return headerActions
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Component, ShallowRef, VNode } from 'vue'
|
|
2
|
+
import { shallowRef } from 'vue'
|
|
3
|
+
|
|
4
|
+
const headerRight = shallowRef<Component | (() => VNode) | null>(null)
|
|
5
|
+
|
|
6
|
+
/** Set trailing header chrome (e.g. editor avatar menu) — clear with `null` on unmount. */
|
|
7
|
+
export function setShellHeaderRight(actions: Component | (() => VNode) | null) {
|
|
8
|
+
headerRight.value = actions
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function useShellHeaderRight(): ShallowRef<Component | (() => VNode) | null> {
|
|
12
|
+
return headerRight
|
|
13
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { useShellFugueContentPublicConfig } from '../../lib/fugue-content-public-config'
|
|
2
|
+
|
|
3
|
+
/** Locale helpers for shell chrome when `@nuxtjs/i18n` is enabled via `@altafusion/fugue-content`. */
|
|
4
|
+
export function useShellI18n() {
|
|
5
|
+
const cms = useShellFugueContentPublicConfig()
|
|
6
|
+
const nuxtApp = useNuxtApp()
|
|
7
|
+
const isEnabled = computed(() => !!cms?.i18nEnabled)
|
|
8
|
+
|
|
9
|
+
function localePath(path: string) {
|
|
10
|
+
if (!isEnabled.value)
|
|
11
|
+
return path
|
|
12
|
+
const fn = nuxtApp.$localePath as ((target: string) => string) | undefined
|
|
13
|
+
return fn?.(path) ?? path
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function t(key: string, fallback: string) {
|
|
17
|
+
if (!isEnabled.value || !key)
|
|
18
|
+
return fallback
|
|
19
|
+
const i18n = nuxtApp.$i18n as { t?: (messageKey: string) => string } | undefined
|
|
20
|
+
const translated = i18n?.t?.(key)
|
|
21
|
+
return translated && translated !== key
|
|
22
|
+
? translated
|
|
23
|
+
: fallback
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
isEnabled,
|
|
28
|
+
localePath,
|
|
29
|
+
t
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const { title } = usePageChrome()
|
|
3
|
+
const { showHeader, showFooter, mainPadding } = useShellChrome()
|
|
4
|
+
const { brand } = useShellSiteHeader()
|
|
5
|
+
const footerRight = useShellFooterRight()
|
|
6
|
+
// The site's own version, when the fugue-devtools layer is extended (it reads package.json at build time). Nothing without it.
|
|
7
|
+
const appVersion = (useRuntimeConfig().public as { fugueDevtools?: { app?: { version?: string } } }).fugueDevtools?.app?.version
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div class="shell flex min-h-dvh min-w-0 flex-col overflow-x-clip">
|
|
12
|
+
<ShellSiteHeader
|
|
13
|
+
v-if="showHeader"
|
|
14
|
+
class="shrink-0"
|
|
15
|
+
>
|
|
16
|
+
<template #logo>
|
|
17
|
+
<slot name="header-logo" />
|
|
18
|
+
</template>
|
|
19
|
+
</ShellSiteHeader>
|
|
20
|
+
|
|
21
|
+
<main
|
|
22
|
+
class="shell-main min-h-0 w-full flex-1"
|
|
23
|
+
:class="{ 'shell-main--padded': mainPadding }"
|
|
24
|
+
>
|
|
25
|
+
<ShellPageHeader v-if="title" :title="title" />
|
|
26
|
+
<slot />
|
|
27
|
+
</main>
|
|
28
|
+
|
|
29
|
+
<footer
|
|
30
|
+
v-if="showFooter"
|
|
31
|
+
class="shell-footer shrink-0"
|
|
32
|
+
>
|
|
33
|
+
<slot name="footer">
|
|
34
|
+
<div class="shell-footer__inner">
|
|
35
|
+
<p class="shell-footer__default">
|
|
36
|
+
© {{ new Date().getFullYear() }} {{ brand.name }}
|
|
37
|
+
<span
|
|
38
|
+
v-if="appVersion"
|
|
39
|
+
class="shell-footer__version"
|
|
40
|
+
>v{{ appVersion }}</span>
|
|
41
|
+
</p>
|
|
42
|
+
<Component
|
|
43
|
+
:is="footerRight"
|
|
44
|
+
v-if="footerRight"
|
|
45
|
+
/>
|
|
46
|
+
</div>
|
|
47
|
+
</slot>
|
|
48
|
+
</footer>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<style scoped>
|
|
53
|
+
.shell-main--padded {
|
|
54
|
+
padding: var(--space-6, 1.5rem);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.shell-footer {
|
|
58
|
+
border-top: 1px solid var(--color-border, rgb(255 255 255 / 0.12));
|
|
59
|
+
padding: var(--space-4, 1rem) var(--space-6, 1.5rem);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.shell-footer__inner {
|
|
63
|
+
display: flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: space-between;
|
|
66
|
+
gap: var(--space-4, 1rem);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.shell-footer__version {
|
|
70
|
+
margin-inline-start: var(--space-2, 0.5rem);
|
|
71
|
+
opacity: 0.55;
|
|
72
|
+
font-size: 0.75rem;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.shell-footer__default {
|
|
76
|
+
margin: 0;
|
|
77
|
+
font-size: var(--font-size-sm, 0.875rem);
|
|
78
|
+
color: var(--color-text-secondary, #a1a1aa);
|
|
79
|
+
}
|
|
80
|
+
</style>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const { showHeader } = useShellChrome()
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<div class="shell-fullscreen flex min-h-dvh min-w-0 flex-col overflow-x-clip">
|
|
7
|
+
<ShellSiteHeader
|
|
8
|
+
v-if="showHeader"
|
|
9
|
+
class="shrink-0"
|
|
10
|
+
>
|
|
11
|
+
<template #logo>
|
|
12
|
+
<slot name="header-logo" />
|
|
13
|
+
</template>
|
|
14
|
+
</ShellSiteHeader>
|
|
15
|
+
|
|
16
|
+
<div class="min-h-0 w-full flex-1">
|
|
17
|
+
<slot />
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!--
|
|
3
|
+
flex-1 / min-h-0: fill a parent flex column shell without Nuxt UI's default
|
|
4
|
+
`min-h-[calc(100vh-header)]` (that + footer forces always-on page scroll).
|
|
5
|
+
-->
|
|
6
|
+
<UMain class="min-h-0 w-full flex-1">
|
|
7
|
+
<UContainer>
|
|
8
|
+
<UPage>
|
|
9
|
+
<template v-if="$slots.aside" #left>
|
|
10
|
+
<UPageAside>
|
|
11
|
+
<slot name="aside" />
|
|
12
|
+
</UPageAside>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<!-- UPage only exposes #left / #default / #right — header belongs in default slot -->
|
|
16
|
+
<slot v-if="$slots.header" name="header" />
|
|
17
|
+
<UPageBody>
|
|
18
|
+
<slot />
|
|
19
|
+
</UPageBody>
|
|
20
|
+
</UPage>
|
|
21
|
+
</UContainer>
|
|
22
|
+
</UMain>
|
|
23
|
+
</template>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* brand-theme.ts – shell layer plugin.
|
|
3
|
+
*
|
|
4
|
+
* Syncs cookie-backed brand to `html[data-brand]` and Nuxt UI primary scale (SSR + client).
|
|
5
|
+
*/
|
|
6
|
+
import { resolveBrandMeta } from '@altafusion/fugue-ui/utils/brandTheme'
|
|
7
|
+
import { ALTAFUSION_BRAND_THEME } from '../../utils/altafusionBrandTheme'
|
|
8
|
+
|
|
9
|
+
export default defineNuxtPlugin(() => {
|
|
10
|
+
const { brand } = useBrandTheme()
|
|
11
|
+
const appConfig = useAppConfig()
|
|
12
|
+
|
|
13
|
+
const brandMeta = computed(() => resolveBrandMeta(ALTAFUSION_BRAND_THEME, brand.value))
|
|
14
|
+
|
|
15
|
+
useHead({
|
|
16
|
+
htmlAttrs: {
|
|
17
|
+
'data-brand': computed(() => brandMeta.value.id)
|
|
18
|
+
}
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
watch(
|
|
22
|
+
brandMeta,
|
|
23
|
+
(meta) => {
|
|
24
|
+
if (appConfig.ui?.colors)
|
|
25
|
+
appConfig.ui.colors.primary = meta.primary
|
|
26
|
+
},
|
|
27
|
+
{ immediate: true }
|
|
28
|
+
)
|
|
29
|
+
})
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ShellAppConfig } from '../../types/app-brand'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Default favicon + SEO from `app.config` brand/seo blocks.
|
|
5
|
+
*/
|
|
6
|
+
export default defineNuxtPlugin(() => {
|
|
7
|
+
const { brand, seo } = useAppConfig() as ShellAppConfig
|
|
8
|
+
|
|
9
|
+
if (brand?.favicon) {
|
|
10
|
+
useHead({
|
|
11
|
+
link: [
|
|
12
|
+
{ rel: 'icon', type: 'image/svg+xml', href: brand.favicon }
|
|
13
|
+
]
|
|
14
|
+
})
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if (seo?.title || seo?.description || seo?.titleTemplate) {
|
|
18
|
+
useSeoMeta({
|
|
19
|
+
...(seo.title
|
|
20
|
+
? { title: seo.title }
|
|
21
|
+
: {}),
|
|
22
|
+
...(seo.description
|
|
23
|
+
? { description: seo.description }
|
|
24
|
+
: {}),
|
|
25
|
+
...(seo.titleTemplate
|
|
26
|
+
? { titleTemplate: seo.titleTemplate }
|
|
27
|
+
: {})
|
|
28
|
+
})
|
|
29
|
+
}
|
|
30
|
+
})
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime brand overrides — applied when `html[data-brand="…"]` (see `@altafusion/fugue-app-shell` `brand-theme` plugin).
|
|
3
|
+
* `default` uses base tokens from `colors.css` (blue primary). Canvas and text unchanged.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
[data-brand='violet'] {
|
|
7
|
+
--brand-primary: #7c3aed;
|
|
8
|
+
--brand-primary-hover: #6d28d9;
|
|
9
|
+
--brand-primary-active: #5b21b6;
|
|
10
|
+
|
|
11
|
+
--color-primary: var(--brand-primary);
|
|
12
|
+
--color-primary-hover: var(--brand-primary-hover);
|
|
13
|
+
--color-primary-active: var(--brand-primary-active);
|
|
14
|
+
--color-border-focus: #8b5cf6;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.dark[data-brand='violet'],
|
|
18
|
+
[data-theme='dark'][data-brand='violet'] {
|
|
19
|
+
--brand-primary: #a78bfa;
|
|
20
|
+
--brand-primary-hover: #c4b5fd;
|
|
21
|
+
--brand-primary-active: #8b5cf6;
|
|
22
|
+
|
|
23
|
+
--color-primary: var(--brand-primary);
|
|
24
|
+
--color-primary-hover: var(--brand-primary-hover);
|
|
25
|
+
--color-primary-active: var(--brand-primary-active);
|
|
26
|
+
--color-border-focus: #a78bfa;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
[data-brand='green'] {
|
|
30
|
+
--brand-primary: #16a34a;
|
|
31
|
+
--brand-primary-hover: #15803d;
|
|
32
|
+
--brand-primary-active: #166534;
|
|
33
|
+
|
|
34
|
+
--color-primary: var(--brand-primary);
|
|
35
|
+
--color-primary-hover: var(--brand-primary-hover);
|
|
36
|
+
--color-primary-active: var(--brand-primary-active);
|
|
37
|
+
--color-border-focus: #22c55e;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.dark[data-brand='green'],
|
|
41
|
+
[data-theme='dark'][data-brand='green'] {
|
|
42
|
+
--brand-primary: #4ade80;
|
|
43
|
+
--brand-primary-hover: #86efac;
|
|
44
|
+
--brand-primary-active: #22c55e;
|
|
45
|
+
|
|
46
|
+
--color-primary: var(--brand-primary);
|
|
47
|
+
--color-primary-hover: var(--brand-primary-hover);
|
|
48
|
+
--color-primary-active: var(--brand-primary-active);
|
|
49
|
+
--color-border-focus: #4ade80;
|
|
50
|
+
}
|