@uxfront/ui 0.9.1 → 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 +4 -4
- 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
package/src/styles/base.css
CHANGED
|
@@ -2,133 +2,133 @@
|
|
|
2
2
|
specificity of plain element selectors, so component styles always win. */
|
|
3
3
|
|
|
4
4
|
:root:has(.ux-site) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
background: var(--ux-bg);
|
|
6
|
+
-webkit-text-size-adjust: 100%;
|
|
7
|
+
text-size-adjust: 100%;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
/* In-page links glide while Motion is on. The scroll itself stays native.
|
|
11
11
|
The media query keeps reduced-motion visitors out before hydration, while
|
|
12
12
|
the server-rendered data-motion is still "true". */
|
|
13
13
|
@media (prefers-reduced-motion: no-preference) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
:root:has(.ux-site[data-motion="true"]) {
|
|
15
|
+
scroll-behavior: smooth;
|
|
16
|
+
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
:root:has(.ux-site) body {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
margin: 0;
|
|
21
|
+
min-height: 100vh;
|
|
22
|
+
font-family: var(--font-ux-sans);
|
|
23
|
+
font-size: 1rem;
|
|
24
|
+
line-height: 1.6;
|
|
25
|
+
color: var(--ux-fg);
|
|
26
|
+
background: var(--ux-bg);
|
|
27
|
+
-webkit-font-smoothing: antialiased;
|
|
28
|
+
-moz-osx-font-smoothing: grayscale;
|
|
29
|
+
text-rendering: optimizeLegibility;
|
|
30
|
+
font-feature-settings: "ss01", "cv11";
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
:where(.ux-site),
|
|
34
34
|
:where(.ux-site) *,
|
|
35
35
|
:where(.ux-site) *::before,
|
|
36
36
|
:where(.ux-site) *::after {
|
|
37
|
-
|
|
37
|
+
box-sizing: border-box;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
:where(.ux-site) ::selection {
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
color: var(--ux-bg);
|
|
42
|
+
background: var(--ux-fg);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
:where(.ux-site) :focus-visible {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
outline: 1px solid var(--ux-fg);
|
|
47
|
+
outline-offset: 4px;
|
|
48
|
+
border-radius: 2px;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
:where(.ux-site) :is(h1, h2, h3, p, ul, ol, dl, dd) {
|
|
52
|
-
|
|
52
|
+
margin: 0;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
:where(.ux-site) a {
|
|
56
|
-
|
|
56
|
+
color: inherit;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
.ux-serif {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
font-family: var(--font-ux-serif);
|
|
61
|
+
font-style: italic;
|
|
62
|
+
font-weight: 400;
|
|
63
|
+
letter-spacing: -0.02em;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
.ux-sr-only {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
67
|
+
position: absolute;
|
|
68
|
+
width: 1px;
|
|
69
|
+
height: 1px;
|
|
70
|
+
margin: -1px;
|
|
71
|
+
padding: 0;
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
clip-path: inset(50%);
|
|
74
|
+
white-space: nowrap;
|
|
75
|
+
border: 0;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
.ux-mono {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
font-family: var(--font-ux-mono);
|
|
80
|
+
font-size: 0.75rem;
|
|
81
|
+
letter-spacing: 0.08em;
|
|
82
|
+
text-transform: uppercase;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
/* Copy rises into focus as it arrives (the scene adds `.is-in`). Only with
|
|
86
86
|
scripting, so it never hides. */
|
|
87
87
|
@media (scripting: enabled) {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
88
|
+
.ux-site [data-reveal] > * {
|
|
89
|
+
opacity: 0;
|
|
90
|
+
transform: translate3d(0, 1.25rem, 0);
|
|
91
|
+
filter: blur(8px);
|
|
92
|
+
transition:
|
|
93
|
+
opacity 0.9s var(--ux-ease-out),
|
|
94
|
+
transform 1.2s var(--ux-ease-out),
|
|
95
|
+
filter 1s var(--ux-ease-out);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.ux-site [data-reveal].is-in > * {
|
|
99
|
+
opacity: 1;
|
|
100
|
+
transform: none;
|
|
101
|
+
filter: none;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.ux-site [data-reveal].is-in > :nth-child(2) {
|
|
105
|
+
transition-delay: 0.07s;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.ux-site [data-reveal].is-in > :nth-child(3) {
|
|
109
|
+
transition-delay: 0.14s;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.ux-site [data-reveal].is-in > :nth-child(4) {
|
|
113
|
+
transition-delay: 0.21s;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.ux-site [data-reveal].is-in > :nth-child(5) {
|
|
117
|
+
transition-delay: 0.28s;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.ux-site [data-reveal].is-in > :nth-child(n + 6) {
|
|
121
|
+
transition-delay: 0.35s;
|
|
122
|
+
}
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
/* Step-through highlights as a section scrolls by (`data-steps` on the
|
|
126
126
|
section, `data-step-item` on its items): the current item gets --active: 1. */
|
|
127
127
|
:where(.ux-site) [data-step-item] {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
128
|
+
transition:
|
|
129
|
+
color 0.5s var(--ux-ease-out),
|
|
130
|
+
border-color 0.5s var(--ux-ease-out),
|
|
131
|
+
background-color 0.5s var(--ux-ease-out);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
[data-step="0"] [data-step-item="0"],
|
|
@@ -141,14 +141,14 @@
|
|
|
141
141
|
[data-step="7"] [data-step-item="7"],
|
|
142
142
|
[data-step="8"] [data-step-item="8"],
|
|
143
143
|
[data-step="9"] [data-step-item="9"] {
|
|
144
|
-
|
|
144
|
+
--active: 1;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
@media (prefers-reduced-motion: reduce) {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
148
|
+
.ux-site [data-reveal] > * {
|
|
149
|
+
opacity: 1;
|
|
150
|
+
transform: none;
|
|
151
|
+
filter: none;
|
|
152
|
+
transition: none;
|
|
153
|
+
}
|
|
154
154
|
}
|
package/src/styles/tokens.css
CHANGED
|
@@ -2,39 +2,39 @@
|
|
|
2
2
|
docs page in the same app keeps its own). Override them with the same
|
|
3
3
|
selector; keep --ux-bg, which the scene's canvas paints itself. */
|
|
4
4
|
:root:has(.ux-site) {
|
|
5
|
-
|
|
5
|
+
color-scheme: dark;
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
--ux-bg: #050507;
|
|
8
|
+
--ux-fg: #f2f2f5;
|
|
9
|
+
--ux-fg-2: #b4b4c0;
|
|
10
|
+
--ux-fg-3: #8b8b98;
|
|
11
|
+
--ux-line: rgb(255 255 255 / 0.1);
|
|
12
|
+
--ux-line-strong: rgb(255 255 255 / 0.24);
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
/* The prism's spectrum, one colour per rail (see FRAMEWORKS). */
|
|
15
|
+
--ux-spectrum-0: #ff4a5a;
|
|
16
|
+
--ux-spectrum-1: #ff8a3d;
|
|
17
|
+
--ux-spectrum-2: #ffd24d;
|
|
18
|
+
--ux-spectrum-3: #4dff8f;
|
|
19
|
+
--ux-spectrum-4: #4dcfff;
|
|
20
|
+
--ux-spectrum-5: #6f86ff;
|
|
21
|
+
--ux-spectrum-6: #b27dff;
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
/* Named `--font-*` so @nuxt/fonts finds the families to self-host. */
|
|
24
|
+
--font-ux-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
25
|
+
--font-ux-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
26
|
+
--font-ux-serif: "Instrument Serif", ui-serif, Georgia, "Times New Roman", serif;
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
/* Past the frame's width, the gutter grows by half the extra, so every
|
|
29
29
|
section sits in a centred frame while the scene's canvas fills the
|
|
30
30
|
screen. The scene reads --ux-frame too, and frames its formations to
|
|
31
31
|
match. A px length; 100vw turns the frame off. */
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
--ux-frame: 1920px;
|
|
33
|
+
--ux-gutter-base: clamp(1.25rem, 3.2vw, 3rem);
|
|
34
|
+
--ux-gutter: max(
|
|
35
|
+
var(--ux-gutter-base),
|
|
36
|
+
calc((100vw - var(--ux-frame)) / 2 + var(--ux-gutter-base))
|
|
37
|
+
);
|
|
38
|
+
--ux-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
|
|
39
|
+
--ux-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
|
|
40
40
|
}
|
package/src/types.ts
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import type { Framework } from "./frameworks";
|
|
2
2
|
|
|
3
3
|
export interface UxNavItem {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
/** A section anchor (`#id`) marks the item current while its section is held. */
|
|
5
|
+
href: string;
|
|
6
|
+
label: string;
|
|
7
|
+
/** Shown before the label, like `01`. */
|
|
8
|
+
index?: string;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export interface UxPillar {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
/** A short mono code, like `UX`. */
|
|
13
|
+
code: string;
|
|
14
|
+
title: string;
|
|
15
|
+
text: string;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export interface UxChip {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
label: string;
|
|
20
|
+
/** Border and highlight colour, like `var(--ux-spectrum-0)`. */
|
|
21
|
+
tone?: string;
|
|
22
|
+
/** Shows the framework's mark before the label. */
|
|
23
|
+
framework?: Framework;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export interface UxTrait {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
title: string;
|
|
28
|
+
text: string;
|
|
29
|
+
/** Makes the cell a link, and `UxTraits` adds an arrow. A plain `<a>`, so it loads the page. */
|
|
30
|
+
href?: string;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export interface UxSpecRow {
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
term: string;
|
|
35
|
+
detail: string;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
export interface UxFinaleCard {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
href: string;
|
|
40
|
+
name: string;
|
|
41
|
+
/** Mono line above the name, like `01 · Standard`. */
|
|
42
|
+
meta?: string;
|
|
43
|
+
/** Mono line below the name, scrambled on hover; defaults to `href` without its protocol. */
|
|
44
|
+
domain?: string;
|
|
45
45
|
}
|