mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-14 13:27:13 +00:00
Improve all 169 component demo previews for catalog legibility and polish: - replace jagged clip-path cursor with a crisp SVG pointer (context-menu, cursor, simulated-cursor) - scale under-sized UI primitives to fill the frame; enrich sparse demos with context (sibling rows, skeleton content, profile cards) - normalize toward a neutral zinc/stone palette, bump small type, tidy spacing/radius/shadows - preserve GSAP timelines, data-* composition attrs, and determinism
124 lines
3.5 KiB
HTML
Vendored
124 lines
3.5 KiB
HTML
Vendored
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=1920, height=1080" />
|
|
<title>Native Select - Demo</title>
|
|
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
|
<style>
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
html,
|
|
body {
|
|
margin: 0;
|
|
width: 1920px;
|
|
height: 1080px;
|
|
overflow: hidden;
|
|
}
|
|
#demo {
|
|
width: 1920px;
|
|
height: 1080px;
|
|
display: grid;
|
|
place-items: center;
|
|
background: #f5f5f4;
|
|
font-family: Inter, system-ui, sans-serif;
|
|
}
|
|
.demo-frame {
|
|
display: grid;
|
|
place-items: center;
|
|
padding: 48px 56px;
|
|
background: #ffffff;
|
|
border: 1px solid #e4e4e7;
|
|
border-radius: 16px;
|
|
box-shadow: 0 24px 70px rgba(0, 0, 0, 0.08);
|
|
min-width: 320px;
|
|
transform: scale(3.4); /* ponytail: qa-scale, tune if widget grows */
|
|
}
|
|
.hf-ui-native-select {
|
|
display: grid;
|
|
gap: 10px;
|
|
width: 260px;
|
|
color: #18181b;
|
|
font-family: Inter, system-ui, sans-serif;
|
|
}
|
|
.hf-ui-native-select span {
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
color: #71717a;
|
|
letter-spacing: 0.01em;
|
|
}
|
|
/* chevron wrapper so we can overlay an SVG arrow (appearance:none hides native arrow) */
|
|
.select-wrapper {
|
|
position: relative;
|
|
}
|
|
.select-wrapper::after {
|
|
content: "";
|
|
position: absolute;
|
|
right: 13px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
width: 14px;
|
|
height: 14px;
|
|
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%2371717a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
|
|
pointer-events: none;
|
|
}
|
|
.hf-ui-native-select select {
|
|
width: 100%;
|
|
height: 42px;
|
|
padding: 0 38px 0 13px;
|
|
border: 1px solid #e4e4e7;
|
|
border-radius: 10px;
|
|
background: #fafafa;
|
|
color: #18181b;
|
|
font:
|
|
500 14px/1 Inter,
|
|
system-ui,
|
|
sans-serif;
|
|
appearance: none;
|
|
outline: none;
|
|
cursor: pointer;
|
|
box-shadow: 0 0 0 var(--hf-select-ring, 0px) rgba(24, 24, 27, 0.12);
|
|
transition: border-color 0.15s;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div
|
|
id="demo"
|
|
data-composition-id="native-select-demo"
|
|
data-start="0"
|
|
data-width="1920"
|
|
data-height="1080"
|
|
data-duration="5"
|
|
>
|
|
<div class="demo-frame">
|
|
<label class="hf-ui-native-select"
|
|
><span>Quality</span
|
|
><div class="select-wrapper"
|
|
><select>
|
|
<option>1080p</option>
|
|
<option>720p</option>
|
|
<option>4K Ultra HD</option>
|
|
<option>480p</option>
|
|
</select></div
|
|
></label
|
|
>
|
|
</div>
|
|
<script>
|
|
const tl = gsap.timeline({ paused: true });
|
|
const startTime = 0.45;
|
|
tl.fromTo(
|
|
".hf-ui-native-select select",
|
|
{ "--hf-select-ring": "0px" },
|
|
{ "--hf-select-ring": "5px", duration: 0.24, ease: "power2.out" },
|
|
startTime,
|
|
);
|
|
tl.set({}, {}, 5);
|
|
window.__timelines = window.__timelines || {};
|
|
window.__timelines["native-select-demo"] = tl;
|
|
</script>
|
|
</div>
|
|
</body>
|
|
</html>
|