@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/README.md
CHANGED
|
@@ -15,8 +15,8 @@ The package ships Vue single-file components as source, so each component's styl
|
|
|
15
15
|
```ts
|
|
16
16
|
// vite.config.ts
|
|
17
17
|
export default defineConfig({
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
optimizeDeps: { exclude: ["@uxfront/ui"] },
|
|
19
|
+
ssr: { noExternal: ["@uxfront/ui"] },
|
|
20
20
|
});
|
|
21
21
|
```
|
|
22
22
|
|
|
@@ -28,51 +28,51 @@ import { corridor, ink, monolith } from "@uxfront/scene/formations";
|
|
|
28
28
|
|
|
29
29
|
// One formation per section: the hero, each chapter, the finale.
|
|
30
30
|
const scene = [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
monolith({ label: "Foundation" }),
|
|
32
|
+
ink({ label: "Inkline" }),
|
|
33
|
+
corridor({ label: "Build" }),
|
|
34
34
|
];
|
|
35
35
|
</script>
|
|
36
36
|
|
|
37
37
|
<template>
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
38
|
+
<UxSite :scene="scene" skip-to="#inkline">
|
|
39
|
+
<template #header>
|
|
40
|
+
<UxHeader brand="Inkline" :nav="[{ href: '#inkline', label: 'Library', index: '01' }]" />
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<UxHero kicker="Inkline" title="The UI library for every framework" scroll-href="#inkline">
|
|
44
|
+
<template #lines>
|
|
45
|
+
<UxHeroLine>The UI library</UxHeroLine>
|
|
46
|
+
<UxHeroLine>for <em class="ux-serif">every</em> framework</UxHeroLine>
|
|
47
|
+
</template>
|
|
48
|
+
<template #lead>Perfectly designed components, in all seven frameworks.</template>
|
|
49
|
+
</UxHero>
|
|
50
|
+
|
|
51
|
+
<UxChapter
|
|
52
|
+
id="inkline"
|
|
53
|
+
index="01"
|
|
54
|
+
role="Library"
|
|
55
|
+
title="Inkline"
|
|
56
|
+
href="https://inkline.io"
|
|
57
|
+
:steps="2"
|
|
58
|
+
>
|
|
59
|
+
<template #lead>Built on the foundation.</template>
|
|
60
|
+
<UxSpec
|
|
61
|
+
:items="[
|
|
62
|
+
{ term: 'Built with', detail: 'Unframework' },
|
|
63
|
+
{ term: 'Ships to', detail: 'Seven frameworks' },
|
|
64
|
+
]"
|
|
65
|
+
/>
|
|
66
|
+
</UxChapter>
|
|
67
|
+
|
|
68
|
+
<UxFinale
|
|
69
|
+
kicker="Inkline"
|
|
70
|
+
:cards="[{ href: 'https://inkline.io', name: 'Inkline', meta: '01 · UI library' }]"
|
|
71
|
+
>
|
|
72
|
+
<template #title>Build on the <em class="ux-serif">foundation</em>.</template>
|
|
73
|
+
<template #footer><span>© 2026 Inkline</span></template>
|
|
74
|
+
</UxFinale>
|
|
75
|
+
</UxSite>
|
|
76
76
|
</template>
|
|
77
77
|
```
|
|
78
78
|
|
|
@@ -111,8 +111,8 @@ The tokens are the shared look, so sites shouldn't need to change them. If one m
|
|
|
111
111
|
|
|
112
112
|
```css
|
|
113
113
|
:root:has(.ux-site) {
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
--ux-fg: #f2f2f5;
|
|
115
|
+
--ux-spectrum-0: #ff4a5a; /* …to 6: the prism's rails and the chips' tones */
|
|
116
116
|
}
|
|
117
117
|
```
|
|
118
118
|
|
|
@@ -134,6 +134,6 @@ Override `--ux-frame` on `:root:has(.ux-site)`, where the gutter is computed: on
|
|
|
134
134
|
|
|
135
135
|
```css
|
|
136
136
|
:root:has(.ux-site) {
|
|
137
|
-
|
|
137
|
+
--ux-frame: 1200px; /* or 100vw, for no frame */
|
|
138
138
|
}
|
|
139
139
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uxfront/ui",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2",
|
|
4
4
|
"description": "Vue components for the uxfront.com family of homepages: a scroll-driven WebGL scene with pinned chapters, a HUD, a header and a finale, in one look.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@uxfront/scene": "^0.5.
|
|
42
|
+
"@uxfront/scene": "^0.5.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@uxfront/typescript-config": "0.1
|
|
45
|
+
"@uxfront/typescript-config": "0.2.1",
|
|
46
46
|
"@vitejs/plugin-vue": "^6.0.9",
|
|
47
47
|
"@vue/test-utils": "^2.5.1",
|
|
48
|
-
"happy-dom": "^
|
|
48
|
+
"happy-dom": "^21.0.4",
|
|
49
49
|
"vitest": "^5.0.1",
|
|
50
50
|
"vue": "^3.5.43"
|
|
51
51
|
},
|
|
@@ -1,162 +1,162 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
const { variant = "tag" } = defineProps<{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
/** A formation anchor id, like `plates:0` (see each formation's docs). */
|
|
4
|
+
anchor: string;
|
|
5
|
+
/**
|
|
6
|
+
* `callout`: a dot, a leader line, a bold label and a detail line.
|
|
7
|
+
* `tag`: an optional icon and a label.
|
|
8
|
+
* `button`: a clickable label; place it in `UxSite`'s `controls` slot.
|
|
9
|
+
*/
|
|
10
|
+
variant?: "callout" | "tag" | "button";
|
|
11
|
+
label?: string;
|
|
12
|
+
/** Callouts only. Hidden where the formation stacks above the copy. */
|
|
13
|
+
detail?: string;
|
|
14
14
|
}>();
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
17
|
<template>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
18
|
+
<button
|
|
19
|
+
v-if="variant === 'button'"
|
|
20
|
+
type="button"
|
|
21
|
+
class="ux-anchor ux-anchor--button"
|
|
22
|
+
:data-anchor="anchor"
|
|
23
|
+
>
|
|
24
|
+
<span class="ux-anchor__text"
|
|
25
|
+
><slot>{{ label }}</slot></span
|
|
26
|
+
>
|
|
27
|
+
</button>
|
|
28
|
+
<div v-else class="ux-anchor" :class="`ux-anchor--${variant}`" :data-anchor="anchor">
|
|
29
|
+
<template v-if="variant === 'callout'">
|
|
30
|
+
<span class="ux-anchor__dot" />
|
|
31
|
+
<span class="ux-anchor__line" />
|
|
32
|
+
<span class="ux-anchor__text">
|
|
33
|
+
<slot>
|
|
34
|
+
<b>{{ label }}</b>
|
|
35
|
+
<span v-if="detail" class="ux-anchor__detail">{{ detail }}</span>
|
|
36
|
+
</slot>
|
|
37
|
+
</span>
|
|
38
|
+
</template>
|
|
39
|
+
<template v-else>
|
|
40
|
+
<slot name="icon" />
|
|
41
|
+
<span class="ux-anchor__text"
|
|
42
|
+
><slot>{{ label }}</slot></span
|
|
43
|
+
>
|
|
44
|
+
</template>
|
|
45
|
+
</div>
|
|
46
46
|
</template>
|
|
47
47
|
|
|
48
48
|
<style scoped>
|
|
49
49
|
.ux-anchor {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
50
|
+
position: absolute;
|
|
51
|
+
top: 0;
|
|
52
|
+
left: 0;
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
gap: 0.6rem;
|
|
56
|
+
visibility: hidden;
|
|
57
|
+
font-family: var(--font-ux-mono);
|
|
58
|
+
font-size: 0.75rem;
|
|
59
|
+
letter-spacing: 0.06em;
|
|
60
|
+
line-height: 1;
|
|
61
|
+
text-transform: uppercase;
|
|
62
|
+
white-space: nowrap;
|
|
63
|
+
color: var(--ux-fg);
|
|
64
|
+
will-change: transform, opacity;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
.ux-anchor :deep(b) {
|
|
68
|
-
|
|
68
|
+
font-weight: 500;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
.ux-anchor__dot {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
72
|
+
width: 5px;
|
|
73
|
+
height: 5px;
|
|
74
|
+
margin-left: -2.5px;
|
|
75
|
+
border-radius: 50%;
|
|
76
|
+
background: var(--ux-fg);
|
|
77
|
+
box-shadow: 0 0 12px rgb(255 255 255 / 0.8);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
.ux-anchor--callout {
|
|
81
|
-
|
|
81
|
+
translate: 0 -50%;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
.ux-anchor--callout .ux-anchor__line {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
width: clamp(1.25rem, 3vw, 2.5rem);
|
|
86
|
+
height: 1px;
|
|
87
|
+
background: linear-gradient(90deg, rgb(255 255 255 / 0.7), rgb(255 255 255 / 0.15));
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
.ux-anchor--callout .ux-anchor__text {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
display: grid;
|
|
92
|
+
gap: 0.4rem;
|
|
93
|
+
color: var(--ux-fg-2);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
.ux-anchor__detail {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
font-family: var(--font-ux-sans);
|
|
98
|
+
letter-spacing: 0;
|
|
99
|
+
text-transform: none;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
.ux-anchor--callout :deep(b) {
|
|
103
|
-
|
|
103
|
+
color: var(--ux-fg);
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
.ux-anchor--tag {
|
|
107
|
-
|
|
107
|
+
translate: 1.1rem -50%;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
.ux-anchor--tag :deep(svg) {
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
width: 0.875rem;
|
|
112
|
+
height: 0.875rem;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
.ux-anchor--button {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
116
|
+
translate: 0 -50%;
|
|
117
|
+
padding: 0;
|
|
118
|
+
color: var(--ux-fg-2);
|
|
119
|
+
background: none;
|
|
120
|
+
border: 0;
|
|
121
|
+
cursor: pointer;
|
|
122
|
+
pointer-events: auto;
|
|
123
|
+
transition: color 0.3s var(--ux-ease-out);
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
/* A comfortable hit area around the small label. */
|
|
127
127
|
.ux-anchor--button::before {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
content: "";
|
|
129
|
+
position: absolute;
|
|
130
|
+
inset: -0.75rem -0.5rem;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
.ux-anchor--button :deep(b) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
134
|
+
margin-left: 0.4rem;
|
|
135
|
+
color: var(--ux-fg);
|
|
136
|
+
text-decoration: underline dotted rgb(255 255 255 / 0.45);
|
|
137
|
+
text-underline-offset: 0.35em;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
.ux-anchor--button:hover {
|
|
141
|
-
|
|
141
|
+
color: var(--ux-fg);
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
.ux-anchor--button:hover :deep(b) {
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
text-decoration-style: solid;
|
|
146
|
+
text-decoration-color: currentColor;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
/* Stacked layout (see UxChapter): less room beside the formations. */
|
|
150
150
|
@media (max-width: 1099px), (max-aspect-ratio: 5/4) {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
151
|
+
.ux-anchor__detail,
|
|
152
|
+
.ux-anchor--button {
|
|
153
|
+
display: none;
|
|
154
|
+
}
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
@media (max-width: 760px) {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
158
|
+
.ux-anchor--tag {
|
|
159
|
+
display: none;
|
|
160
|
+
}
|
|
161
161
|
}
|
|
162
162
|
</style>
|