@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.
Files changed (34) hide show
  1. package/README.md +46 -46
  2. package/package.json +4 -4
  3. package/src/components/UxAnchor.vue +100 -100
  4. package/src/components/UxChapter.vue +157 -157
  5. package/src/components/UxChips.vue +32 -32
  6. package/src/components/UxCode.vue +42 -42
  7. package/src/components/UxErrorPage.vue +37 -37
  8. package/src/components/UxFeatures.vue +70 -70
  9. package/src/components/UxFinale.vue +148 -148
  10. package/src/components/UxHeader.vue +171 -171
  11. package/src/components/UxHero.vue +179 -179
  12. package/src/components/UxHeroLine.vue +18 -18
  13. package/src/components/UxHud.vue +139 -137
  14. package/src/components/UxPillLink.vue +41 -41
  15. package/src/components/UxPillars.vue +22 -22
  16. package/src/components/UxSection.vue +60 -60
  17. package/src/components/UxSite.vue +52 -48
  18. package/src/components/UxSpec.vue +21 -21
  19. package/src/components/UxSplit.vue +138 -138
  20. package/src/components/UxStage.vue +40 -38
  21. package/src/components/UxStageFallback.vue +28 -28
  22. package/src/components/UxTraits.vue +55 -55
  23. package/src/components/UxVideo.vue +50 -40
  24. package/src/components/icons/UxArrowIcon.vue +4 -4
  25. package/src/components/icons/UxFrameworkLogo.vue +4 -4
  26. package/src/components/icons/UxFrontMark.vue +10 -10
  27. package/src/components/icons/UxGithubIcon.vue +6 -6
  28. package/src/components/icons/UxStarIcon.vue +6 -6
  29. package/src/composables/experience.ts +58 -53
  30. package/src/directives/scramble.ts +41 -37
  31. package/src/frameworks.ts +12 -12
  32. package/src/styles/base.css +88 -88
  33. package/src/styles/tokens.css +28 -28
  34. package/src/types.ts +26 -26
@@ -4,238 +4,238 @@ import type { UxFinaleCard } from "../types";
4
4
  import UxArrowIcon from "./icons/UxArrowIcon.vue";
5
5
 
6
6
  const { id = "build", cards = [] } = defineProps<{
7
- id?: string;
8
- kicker?: string;
9
- cards?: UxFinaleCard[];
7
+ id?: string;
8
+ kicker?: string;
9
+ cards?: Array<UxFinaleCard>;
10
10
  }>();
11
11
 
12
12
  defineSlots<{
13
- /** Above the kicker, drawn large, like `UxFrontMark`. */
14
- mark?(): unknown;
15
- title(): unknown;
16
- lead?(): unknown;
17
- /** Below the lead, like a `UxPillLink` to the docs. */
18
- actions?(): unknown;
19
- /** The page's footer, at the bottom of the screen. Links in it are styled. */
20
- footer?(): unknown;
13
+ /** Above the kicker, drawn large, like `UxFrontMark`. */
14
+ mark?(): unknown;
15
+ title(): unknown;
16
+ lead?(): unknown;
17
+ /** Below the lead, like a `UxPillLink` to the docs. */
18
+ actions?(): unknown;
19
+ /** The page's footer, at the bottom of the screen. Links in it are styled. */
20
+ footer?(): unknown;
21
21
  }>();
22
22
  </script>
23
23
 
24
24
  <template>
25
- <section :id="id" class="ux-finale" data-stage :aria-labelledby="`${id}-title`">
26
- <div class="ux-finale__body" data-reveal>
27
- <div v-if="$slots.mark" class="ux-finale__mark"><slot name="mark" /></div>
28
- <p v-if="kicker" class="ux-finale__kicker ux-mono">{{ kicker }}</p>
29
- <h2 :id="`${id}-title`" class="ux-finale__title"><slot name="title" /></h2>
30
- <p v-if="$slots.lead" class="ux-finale__lead"><slot name="lead" /></p>
31
- <div v-if="$slots.actions" class="ux-finale__actions"><slot name="actions" /></div>
32
- <ul v-if="cards.length" class="ux-finale__grid">
33
- <li v-for="card in cards" :key="card.href">
34
- <a :href="card.href">
35
- <span v-if="card.meta" class="ux-mono">{{ card.meta }}</span>
36
- <strong>{{ card.name }}</strong>
37
- <span class="ux-finale__domain">
38
- <span v-scramble>{{ card.domain ?? card.href.replace(/^https?:\/\//, "") }}</span>
39
- <UxArrowIcon />
40
- </span>
41
- </a>
42
- </li>
43
- </ul>
44
- </div>
45
- <footer v-if="$slots.footer" class="ux-finale__footer ux-mono"><slot name="footer" /></footer>
46
- </section>
25
+ <section :id="id" class="ux-finale" data-stage :aria-labelledby="`${id}-title`">
26
+ <div class="ux-finale__body" data-reveal>
27
+ <div v-if="$slots.mark" class="ux-finale__mark"><slot name="mark" /></div>
28
+ <p v-if="kicker" class="ux-finale__kicker ux-mono">{{ kicker }}</p>
29
+ <h2 :id="`${id}-title`" class="ux-finale__title"><slot name="title" /></h2>
30
+ <p v-if="$slots.lead" class="ux-finale__lead"><slot name="lead" /></p>
31
+ <div v-if="$slots.actions" class="ux-finale__actions"><slot name="actions" /></div>
32
+ <ul v-if="cards.length" class="ux-finale__grid">
33
+ <li v-for="card in cards" :key="card.href">
34
+ <a :href="card.href">
35
+ <span v-if="card.meta" class="ux-mono">{{ card.meta }}</span>
36
+ <strong>{{ card.name }}</strong>
37
+ <span class="ux-finale__domain">
38
+ <span v-scramble>{{ card.domain ?? card.href.replace(/^https?:\/\//, "") }}</span>
39
+ <UxArrowIcon />
40
+ </span>
41
+ </a>
42
+ </li>
43
+ </ul>
44
+ </div>
45
+ <footer v-if="$slots.footer" class="ux-finale__footer ux-mono"><slot name="footer" /></footer>
46
+ </section>
47
47
  </template>
48
48
 
49
49
  <style scoped>
50
50
  .ux-finale {
51
- position: relative;
52
- display: flex;
53
- flex-direction: column;
54
- justify-content: center;
55
- align-items: center;
56
- min-height: 100vh;
57
- min-height: 100svh;
58
- padding: 6rem var(--ux-gutter) 4rem;
59
- text-align: center;
51
+ position: relative;
52
+ display: flex;
53
+ flex-direction: column;
54
+ justify-content: center;
55
+ align-items: center;
56
+ min-height: 100vh;
57
+ min-height: 100svh;
58
+ padding: 6rem var(--ux-gutter) 4rem;
59
+ text-align: center;
60
60
  }
61
61
 
62
62
  .ux-finale__body {
63
- position: relative;
64
- isolation: isolate;
65
- display: flex;
66
- flex-direction: column;
67
- align-items: center;
68
- width: min(100%, 64rem);
63
+ position: relative;
64
+ isolation: isolate;
65
+ display: flex;
66
+ flex-direction: column;
67
+ align-items: center;
68
+ width: min(100%, 64rem);
69
69
  }
70
70
 
71
71
  .ux-finale__body::before {
72
- content: "";
73
- position: absolute;
74
- inset: -15% -10%;
75
- z-index: -1;
76
- background: radial-gradient(closest-side, rgb(5 5 7 / 0.7), rgb(5 5 7 / 0));
72
+ content: "";
73
+ position: absolute;
74
+ inset: -15% -10%;
75
+ z-index: -1;
76
+ background: radial-gradient(closest-side, rgb(5 5 7 / 0.7), rgb(5 5 7 / 0));
77
77
  }
78
78
 
79
79
  .ux-finale__mark {
80
- display: flex;
81
- margin-bottom: clamp(1.75rem, 1rem + 2vw, 3rem);
82
- color: var(--ux-fg);
80
+ display: flex;
81
+ margin-bottom: clamp(1.75rem, 1rem + 2vw, 3rem);
82
+ color: var(--ux-fg);
83
83
  }
84
84
 
85
85
  .ux-finale__mark :slotted(svg) {
86
- width: clamp(4.5rem, 2.5rem + 6vw, 8.5rem);
87
- height: auto;
88
- filter: drop-shadow(0 0 1.5rem rgb(255 255 255 / 0.25));
86
+ width: clamp(4.5rem, 2.5rem + 6vw, 8.5rem);
87
+ height: auto;
88
+ filter: drop-shadow(0 0 1.5rem rgb(255 255 255 / 0.25));
89
89
  }
90
90
 
91
91
  .ux-finale__kicker {
92
- margin-bottom: 1.5rem;
93
- color: var(--ux-fg-2);
92
+ margin-bottom: 1.5rem;
93
+ color: var(--ux-fg-2);
94
94
  }
95
95
 
96
96
  .ux-finale__title {
97
- font-size: clamp(2.75rem, 1rem + 6vw, 7.5rem);
98
- font-weight: 500;
99
- line-height: 0.95;
100
- letter-spacing: -0.055em;
101
- text-wrap: balance;
97
+ font-size: clamp(2.75rem, 1rem + 6vw, 7.5rem);
98
+ font-weight: 500;
99
+ line-height: 0.95;
100
+ letter-spacing: -0.055em;
101
+ text-wrap: balance;
102
102
  }
103
103
 
104
104
  .ux-finale__lead {
105
- max-width: 32rem;
106
- margin-top: 1.75rem;
107
- font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.25rem);
108
- line-height: 1.45;
109
- color: var(--ux-fg-2);
105
+ max-width: 32rem;
106
+ margin-top: 1.75rem;
107
+ font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.25rem);
108
+ line-height: 1.45;
109
+ color: var(--ux-fg-2);
110
110
  }
111
111
 
112
112
  .ux-finale__actions {
113
- display: flex;
114
- flex-wrap: wrap;
115
- justify-content: center;
116
- gap: 0.75rem;
117
- margin-top: 2.5rem;
113
+ display: flex;
114
+ flex-wrap: wrap;
115
+ justify-content: center;
116
+ gap: 0.75rem;
117
+ margin-top: 2.5rem;
118
118
  }
119
119
 
120
120
  .ux-finale__grid {
121
- display: grid;
122
- grid-template-columns: repeat(4, minmax(0, 1fr));
123
- gap: 1px;
124
- width: 100%;
125
- margin-top: 3rem;
126
- padding: 0;
127
- list-style: none;
128
- text-align: left;
129
- border: 1px solid var(--ux-line);
130
- background: var(--ux-line);
121
+ display: grid;
122
+ grid-template-columns: repeat(4, minmax(0, 1fr));
123
+ gap: 1px;
124
+ width: 100%;
125
+ margin-top: 3rem;
126
+ padding: 0;
127
+ list-style: none;
128
+ text-align: left;
129
+ border: 1px solid var(--ux-line);
130
+ background: var(--ux-line);
131
131
  }
132
132
 
133
133
  .ux-finale__grid a {
134
- display: grid;
135
- gap: 0.6rem;
136
- height: 100%;
137
- padding: 1.25rem 1.25rem 1.1rem;
138
- color: var(--ux-fg);
139
- text-decoration: none;
140
- background: rgb(5 5 7 / 0.72);
141
- backdrop-filter: blur(10px);
142
- transition: background 0.5s var(--ux-ease-out);
134
+ display: grid;
135
+ gap: 0.6rem;
136
+ height: 100%;
137
+ padding: 1.25rem 1.25rem 1.1rem;
138
+ color: var(--ux-fg);
139
+ text-decoration: none;
140
+ background: rgb(5 5 7 / 0.72);
141
+ backdrop-filter: blur(10px);
142
+ transition: background 0.5s var(--ux-ease-out);
143
143
  }
144
144
 
145
145
  .ux-finale__grid a:hover {
146
- background: rgb(255 255 255 / 0.08);
146
+ background: rgb(255 255 255 / 0.08);
147
147
  }
148
148
 
149
149
  .ux-finale__grid .ux-mono {
150
- color: var(--ux-fg-3);
150
+ color: var(--ux-fg-3);
151
151
  }
152
152
 
153
153
  .ux-finale__grid strong {
154
- font-size: 1.25rem;
155
- font-weight: 500;
156
- letter-spacing: -0.03em;
154
+ font-size: 1.25rem;
155
+ font-weight: 500;
156
+ letter-spacing: -0.03em;
157
157
  }
158
158
 
159
159
  .ux-finale__domain {
160
- display: inline-flex;
161
- align-items: center;
162
- gap: 0.4rem;
163
- overflow-wrap: anywhere;
164
- font-family: var(--font-ux-mono);
165
- font-size: 0.75rem;
166
- color: var(--ux-fg-2);
160
+ display: inline-flex;
161
+ align-items: center;
162
+ gap: 0.4rem;
163
+ overflow-wrap: anywhere;
164
+ font-family: var(--font-ux-mono);
165
+ font-size: 0.75rem;
166
+ color: var(--ux-fg-2);
167
167
  }
168
168
 
169
169
  .ux-finale__domain svg {
170
- width: 0.875rem;
171
- height: 0.875rem;
172
- transition: transform 0.4s var(--ux-ease-out);
170
+ width: 0.875rem;
171
+ height: 0.875rem;
172
+ transition: transform 0.4s var(--ux-ease-out);
173
173
  }
174
174
 
175
175
  .ux-finale__grid a:hover .ux-finale__domain svg {
176
- transform: translate(2px, -2px);
176
+ transform: translate(2px, -2px);
177
177
  }
178
178
 
179
179
  .ux-finale__footer {
180
- position: absolute;
181
- left: var(--ux-gutter);
182
- right: var(--ux-gutter);
183
- bottom: 4.25rem;
184
- display: flex;
185
- justify-content: space-between;
186
- gap: 1rem;
187
- color: var(--ux-fg-3);
180
+ position: absolute;
181
+ left: var(--ux-gutter);
182
+ right: var(--ux-gutter);
183
+ bottom: 4.25rem;
184
+ display: flex;
185
+ justify-content: space-between;
186
+ gap: 1rem;
187
+ color: var(--ux-fg-3);
188
188
  }
189
189
 
190
190
  .ux-finale__footer :slotted(a) {
191
- display: inline-flex;
192
- align-items: center;
193
- min-height: 1.5rem;
194
- color: var(--ux-fg-2);
195
- text-decoration: none;
191
+ display: inline-flex;
192
+ align-items: center;
193
+ min-height: 1.5rem;
194
+ color: var(--ux-fg-2);
195
+ text-decoration: none;
196
196
  }
197
197
 
198
198
  .ux-finale__footer :slotted(a:hover) {
199
- color: var(--ux-fg);
199
+ color: var(--ux-fg);
200
200
  }
201
201
 
202
202
  @media (max-width: 960px) {
203
- .ux-finale__grid {
204
- grid-template-columns: repeat(2, minmax(0, 1fr));
205
- }
203
+ .ux-finale__grid {
204
+ grid-template-columns: repeat(2, minmax(0, 1fr));
205
+ }
206
206
  }
207
207
 
208
208
  /* The finale no longer fits one screen beside its footer: footer last. */
209
209
  @media (max-width: 1099px), (max-aspect-ratio: 5/4), (max-height: 700px) {
210
- .ux-finale {
211
- padding: 7rem var(--ux-gutter) 5.5rem;
212
- }
210
+ .ux-finale {
211
+ padding: 7rem var(--ux-gutter) 5.5rem;
212
+ }
213
213
 
214
- .ux-finale__footer {
215
- position: static;
216
- width: 100%;
217
- margin-top: 3rem;
218
- }
214
+ .ux-finale__footer {
215
+ position: static;
216
+ width: 100%;
217
+ margin-top: 3rem;
218
+ }
219
219
  }
220
220
 
221
221
  @media (max-width: 760px) {
222
- .ux-finale__grid {
223
- margin-top: 2rem;
224
- }
222
+ .ux-finale__grid {
223
+ margin-top: 2rem;
224
+ }
225
225
 
226
- .ux-finale__grid strong {
227
- font-size: 1.0625rem;
228
- }
226
+ .ux-finale__grid strong {
227
+ font-size: 1.0625rem;
228
+ }
229
229
  }
230
230
 
231
231
  /* Two columns leave no room for the domains on the narrowest phones. */
232
232
  @media (max-width: 430px) {
233
- .ux-finale__grid {
234
- grid-template-columns: 1fr;
235
- }
233
+ .ux-finale__grid {
234
+ grid-template-columns: 1fr;
235
+ }
236
236
 
237
- .ux-finale__grid a {
238
- padding: 1rem 1.1rem;
239
- }
237
+ .ux-finale__grid a {
238
+ padding: 1rem 1.1rem;
239
+ }
240
240
  }
241
241
  </style>