@uxfront/ui 0.9.0 → 0.9.2
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/README.md +46 -46
- package/package.json +5 -5
- package/src/components/UxAnchor.vue +100 -100
- package/src/components/UxChapter.vue +157 -157
- package/src/components/UxChips.vue +32 -32
- package/src/components/UxCode.vue +42 -42
- package/src/components/UxErrorPage.vue +37 -37
- package/src/components/UxFeatures.vue +70 -70
- package/src/components/UxFinale.vue +148 -148
- package/src/components/UxHeader.vue +171 -171
- package/src/components/UxHero.vue +179 -179
- package/src/components/UxHeroLine.vue +18 -18
- package/src/components/UxHud.vue +139 -137
- package/src/components/UxPillLink.vue +41 -41
- package/src/components/UxPillars.vue +22 -22
- package/src/components/UxSection.vue +60 -60
- package/src/components/UxSite.vue +52 -48
- package/src/components/UxSpec.vue +21 -21
- package/src/components/UxSplit.vue +138 -138
- package/src/components/UxStage.vue +40 -38
- package/src/components/UxStageFallback.vue +28 -28
- package/src/components/UxTraits.vue +55 -55
- package/src/components/UxVideo.vue +50 -40
- package/src/components/icons/UxArrowIcon.vue +4 -4
- package/src/components/icons/UxFrameworkLogo.vue +4 -4
- package/src/components/icons/UxFrontMark.vue +10 -10
- package/src/components/icons/UxGithubIcon.vue +6 -6
- package/src/components/icons/UxStarIcon.vue +6 -6
- package/src/composables/experience.ts +58 -53
- package/src/directives/scramble.ts +41 -37
- package/src/frameworks.ts +12 -12
- package/src/styles/base.css +88 -88
- package/src/styles/tokens.css +28 -28
- package/src/types.ts +26 -26
|
@@ -5,16 +5,16 @@ import { uxRenderHookKey } from "../keys";
|
|
|
5
5
|
import UxPillLink from "./UxPillLink.vue";
|
|
6
6
|
|
|
7
7
|
const { homeHref = "/" } = defineProps<{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
code: number | string;
|
|
9
|
+
title: string;
|
|
10
|
+
lead?: string;
|
|
11
|
+
homeHref?: string;
|
|
12
|
+
homeLabel: string;
|
|
13
13
|
}>();
|
|
14
14
|
|
|
15
15
|
defineEmits<{
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
/** The home link was clicked; call `preventDefault()` to navigate yourself. */
|
|
17
|
+
home: [event: MouseEvent];
|
|
18
18
|
}>();
|
|
19
19
|
|
|
20
20
|
// Like UxSite, it brings its own styles: the host can load everything else after first paint.
|
|
@@ -22,20 +22,20 @@ inject(uxRenderHookKey, null)?.();
|
|
|
22
22
|
</script>
|
|
23
23
|
|
|
24
24
|
<template>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
25
|
+
<div class="ux-site">
|
|
26
|
+
<main class="ux-error">
|
|
27
|
+
<p class="ux-error__code ux-mono">Error {{ code }}</p>
|
|
28
|
+
<h1 class="ux-error__title">{{ title }}</h1>
|
|
29
|
+
<p v-if="lead" class="ux-error__lead">{{ lead }}</p>
|
|
30
|
+
<UxPillLink
|
|
31
|
+
:href="homeHref"
|
|
32
|
+
:label="homeLabel"
|
|
33
|
+
:arrow="false"
|
|
34
|
+
:scramble="false"
|
|
35
|
+
@click="$emit('home', $event)"
|
|
36
|
+
/>
|
|
37
|
+
</main>
|
|
38
|
+
</div>
|
|
39
39
|
</template>
|
|
40
40
|
|
|
41
41
|
<style>
|
|
@@ -45,30 +45,30 @@ inject(uxRenderHookKey, null)?.();
|
|
|
45
45
|
|
|
46
46
|
<style scoped>
|
|
47
47
|
.ux-error {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
display: grid;
|
|
49
|
+
align-content: center;
|
|
50
|
+
justify-items: start;
|
|
51
|
+
gap: 1.5rem;
|
|
52
|
+
min-height: 100vh;
|
|
53
|
+
min-height: 100svh;
|
|
54
|
+
padding: var(--ux-gutter-base) var(--ux-gutter);
|
|
55
|
+
background: radial-gradient(60% 50% at 70% 40%, rgb(120 140 255 / 0.08), transparent 70%);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
.ux-error__code {
|
|
59
|
-
|
|
59
|
+
color: var(--ux-fg-2);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.ux-error__title {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
font-size: clamp(2.75rem, 1rem + 6vw, 6.5rem);
|
|
64
|
+
font-weight: 500;
|
|
65
|
+
line-height: 0.95;
|
|
66
|
+
letter-spacing: -0.055em;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
.ux-error__lead {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
max-width: 30rem;
|
|
71
|
+
font-size: 1.125rem;
|
|
72
|
+
color: var(--ux-fg-2);
|
|
73
73
|
}
|
|
74
74
|
</style>
|
|
@@ -1,121 +1,121 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { UxTrait } from "../types";
|
|
3
3
|
|
|
4
|
-
defineProps<{ items: UxTrait
|
|
4
|
+
defineProps<{ items: Array<UxTrait> }>();
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
7
|
<template>
|
|
8
|
-
|
|
8
|
+
<!-- A strip of features: columns of a title over muted text, split by
|
|
9
9
|
hairlines, on a scrim that keeps it legible over the scene. A cell with
|
|
10
10
|
`href` is a link. -->
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
11
|
+
<ul class="ux-features">
|
|
12
|
+
<template v-for="item in items" :key="item.title">
|
|
13
|
+
<li v-if="item.href" class="ux-features__linked">
|
|
14
|
+
<a class="ux-features__link" :href="item.href">
|
|
15
|
+
<strong>{{ item.title }}</strong>
|
|
16
|
+
<span>{{ item.text }}</span>
|
|
17
|
+
</a>
|
|
18
|
+
</li>
|
|
19
|
+
<li v-else>
|
|
20
|
+
<strong>{{ item.title }}</strong>
|
|
21
|
+
<span>{{ item.text }}</span>
|
|
22
|
+
</li>
|
|
23
|
+
</template>
|
|
24
|
+
</ul>
|
|
25
25
|
</template>
|
|
26
26
|
|
|
27
27
|
<style scoped>
|
|
28
28
|
.ux-features {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
--ux-features-inset: clamp(1rem, 2.5vw, 3rem);
|
|
30
|
+
display: grid;
|
|
31
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
32
|
+
row-gap: 2rem;
|
|
33
|
+
padding: 3rem var(--ux-gutter);
|
|
34
|
+
list-style: none;
|
|
35
|
+
background: rgb(5 5 7 / 0.82);
|
|
36
|
+
backdrop-filter: blur(12px);
|
|
37
|
+
text-shadow: none;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
/* The hairline, and the inset after it. The first cell of a row has neither,
|
|
41
41
|
so its text starts at the gutter, under the section's heading. */
|
|
42
42
|
.ux-features li {
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
--ux-features-start: var(--ux-features-inset);
|
|
44
|
+
border-left: 1px solid var(--ux-line);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
.ux-features li:nth-child(3n + 1) {
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
--ux-features-start: 0;
|
|
49
|
+
border-left: 0;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
.ux-features li,
|
|
53
53
|
.ux-features__link {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
display: grid;
|
|
55
|
+
align-content: start;
|
|
56
|
+
gap: 0.4rem;
|
|
57
|
+
padding: 0.25rem var(--ux-features-inset) 0.25rem var(--ux-features-start);
|
|
58
|
+
font-size: 0.875rem;
|
|
59
|
+
line-height: 1.45;
|
|
60
|
+
color: var(--ux-fg-3);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
/* A linked cell is the link, edge to edge. */
|
|
64
64
|
.ux-features .ux-features__linked {
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
display: block;
|
|
66
|
+
padding: 0;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
.ux-features__link {
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
height: 100%;
|
|
71
|
+
text-decoration: none;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
.ux-features strong {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
font-size: 1rem;
|
|
76
|
+
font-weight: 500;
|
|
77
|
+
letter-spacing: -0.01em;
|
|
78
|
+
color: var(--ux-fg);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
.ux-features span {
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
text-wrap: pretty;
|
|
83
|
+
transition: color 0.3s var(--ux-ease-out);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
.ux-features__link:hover span {
|
|
87
|
-
|
|
87
|
+
color: var(--ux-fg-2);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
/* STACKED_QUERY in @uxfront/scene: two columns, on the screens the scene
|
|
91
91
|
stacks. */
|
|
92
92
|
@media (max-aspect-ratio: 5/4), (max-width: 1099px) and (max-aspect-ratio: 8/5) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
93
|
+
.ux-features {
|
|
94
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.ux-features li:nth-child(n) {
|
|
98
|
+
--ux-features-start: var(--ux-features-inset);
|
|
99
|
+
border-left: 1px solid var(--ux-line);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.ux-features li:nth-child(2n + 1) {
|
|
103
|
+
--ux-features-start: 0;
|
|
104
|
+
border-left: 0;
|
|
105
|
+
}
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
/* Six cells have to stay short on a phone, so the spacing tightens. */
|
|
109
109
|
@media (max-width: 760px) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
110
|
+
.ux-features {
|
|
111
|
+
--ux-features-inset: 0;
|
|
112
|
+
grid-template-columns: minmax(0, 1fr);
|
|
113
|
+
row-gap: 1rem;
|
|
114
|
+
padding-block: 2rem;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.ux-features li:nth-child(n) {
|
|
118
|
+
border-left: 0;
|
|
119
|
+
}
|
|
120
120
|
}
|
|
121
121
|
</style>
|