kmcom-nuxt-layers 1.6.11 → 1.6.15
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/layers/motion/app/assets/css/motion.css +0 -3
- package/layers/theme/app/assets/css/theme.css +9 -0
- package/layers/ui/app/assets/css/ui.css +6 -0
- package/layers/ui/app/components/Site/Subtitle.vue +5 -0
- package/layers/ui/app/components/Site/Title.vue +3 -13
- package/layers/ui/app/components/Typography/HeadlineScreen.vue +70 -0
- package/layers/ui/app/composables/useSite.ts +13 -0
- package/layers/ui/app/types/typography.ts +7 -0
- package/package.json +1 -1
|
@@ -6,6 +6,15 @@
|
|
|
6
6
|
* same Tailwind pass as all utility generation (avoids HMR regeneration shift).
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
/* --- Theme Transition --- */
|
|
10
|
+
@layer utilities {
|
|
11
|
+
.theme-transition {
|
|
12
|
+
transition-property: color, background-color, border-color, fill, stroke, box-shadow;
|
|
13
|
+
transition-duration: 700ms;
|
|
14
|
+
transition-delay: 0ms;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
9
18
|
/* --- Reduced Motion --- */
|
|
10
19
|
[data-theme-motion='reduced'] *,
|
|
11
20
|
[data-theme-motion='reduced'] *::before,
|
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { splitSpaces } from '../../utils/regex'
|
|
3
|
-
|
|
4
|
-
defineProps<{
|
|
5
|
-
siteTitle: string
|
|
6
|
-
tag: string
|
|
7
|
-
titleVariant: string
|
|
8
|
-
}>()
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
1
|
<template>
|
|
12
|
-
<
|
|
13
|
-
{{
|
|
14
|
-
</
|
|
2
|
+
<span v-for="(word, index) in useSite().titleWords" :key="index" class="site-word">
|
|
3
|
+
{{ word }}
|
|
4
|
+
</span>
|
|
15
5
|
</template>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { useColor } from '../../composables/color'
|
|
3
|
+
import { useTypography } from '../../composables/typography'
|
|
4
|
+
import type { UiColors } from '../../types/colors'
|
|
5
|
+
import type {
|
|
6
|
+
FontLeading,
|
|
7
|
+
FontScreenSize,
|
|
8
|
+
FontSlant,
|
|
9
|
+
FontTracking,
|
|
10
|
+
FontWeight,
|
|
11
|
+
FontWidth,
|
|
12
|
+
TextAlign,
|
|
13
|
+
TextTransform,
|
|
14
|
+
} from '../../types/typography'
|
|
15
|
+
|
|
16
|
+
defineOptions({ inheritAttrs: false })
|
|
17
|
+
|
|
18
|
+
const props = withDefaults(
|
|
19
|
+
defineProps<{
|
|
20
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6
|
|
21
|
+
size?: FontScreenSize
|
|
22
|
+
weight?: FontWeight
|
|
23
|
+
width?: FontWidth
|
|
24
|
+
slant?: FontSlant
|
|
25
|
+
leading?: FontLeading
|
|
26
|
+
tracking?: FontTracking
|
|
27
|
+
align?: TextAlign
|
|
28
|
+
transform?: TextTransform
|
|
29
|
+
color?: UiColors
|
|
30
|
+
class?: string
|
|
31
|
+
}>(),
|
|
32
|
+
{
|
|
33
|
+
level: 1,
|
|
34
|
+
size: 'screen-xxl',
|
|
35
|
+
weight: 'font-bold',
|
|
36
|
+
width: 'font-stretch-normal',
|
|
37
|
+
slant: 'normal',
|
|
38
|
+
leading: 'leading-tight',
|
|
39
|
+
tracking: 'tracking-tight',
|
|
40
|
+
align: 'left',
|
|
41
|
+
transform: 'none',
|
|
42
|
+
class: '',
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
const tag = computed(() => `h${props.level}` as const)
|
|
47
|
+
const sizeClass = computed(() => `text-${props.size}`)
|
|
48
|
+
|
|
49
|
+
const { classes } = useTypography({
|
|
50
|
+
weight: props.weight,
|
|
51
|
+
width: props.width,
|
|
52
|
+
slant: props.slant,
|
|
53
|
+
leading: props.leading,
|
|
54
|
+
tracking: props.tracking,
|
|
55
|
+
align: props.align,
|
|
56
|
+
transform: props.transform,
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
const colorClass = useColor(props.color, 'text')
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<template>
|
|
63
|
+
<component
|
|
64
|
+
:is="tag"
|
|
65
|
+
:class="[sizeClass, classes, colorClass, props.class]"
|
|
66
|
+
v-bind="$attrs"
|
|
67
|
+
>
|
|
68
|
+
<slot />
|
|
69
|
+
</component>
|
|
70
|
+
</template>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { splitSpaces } from '../utils/regex'
|
|
2
|
+
|
|
3
|
+
export function useSite() {
|
|
4
|
+
const config = useAppConfig().site
|
|
5
|
+
|
|
6
|
+
return {
|
|
7
|
+
title: config.title as string,
|
|
8
|
+
titleWords: splitSpaces(config.title as string) as string[],
|
|
9
|
+
subtitle: config.subtitle as string,
|
|
10
|
+
subtitleWords: splitSpaces(config.subtitle as string) as string[],
|
|
11
|
+
description: config.description as string,
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -112,6 +112,13 @@ export type FontTracking =
|
|
|
112
112
|
| 'tracking-widest'
|
|
113
113
|
| FontTrackingNumber
|
|
114
114
|
|
|
115
|
+
/* ======================================================
|
|
116
|
+
Screen-scale Font Sizes
|
|
117
|
+
- Companion to text-screen-* fluid tokens
|
|
118
|
+
====================================================== */
|
|
119
|
+
|
|
120
|
+
export type FontScreenSize = 'screen' | 'screen-xl' | 'screen-xxl' | 'screen-xxxl'
|
|
121
|
+
|
|
115
122
|
/* ======================================================
|
|
116
123
|
Text Layout
|
|
117
124
|
====================================================== */
|