страница пакета→ /design/explore-kit/explore.css
pages/design/explore-kit/explore.css
163 строки, 9.5 КБ. Открыть как есть (в проекте рядом лежат другие файлы, здесь их может не быть).
Файл как есть в пакете: код и комментарии в нём не переводятся.
- /* explore-kit 0.1.1 - the control panel for exploration pages and lenses.
- * Styled only with the token contract v1 (shadcn names + Tailwind namespaces); the fallbacks after the comma
- * keep the panel readable on a page with no style installed. Everything is scoped under .xp. */
- .xp {
- /* On a lens page the kit's own variables come first: the kit uses --muted for grey text, --accent for its blue and
- * --card for a white tile, so the shadcn names mean something else there. Without the kit, the contract names apply. */
- --xp-bg: var(--panel, var(--popover, #fff));
- --xp-fg: var(--ink, var(--popover-foreground, #191919));
- --xp-muted: var(--bg3, var(--muted, #f1f1ef));
- --xp-muted-fg: var(--muted-foreground, var(--faint, #6b6a66));
- --xp-accent: var(--wash2, var(--accent, #e9e9e6));
- --xp-border: var(--line, var(--border, #e6e5e3));
- --xp-ring: var(--ring, #9b9a96);
- --xp-strong: var(--foreground, #191919);
- --xp-strong-fg: var(--background, #fff);
- --xp-radius: var(--radius, 10px);
- --xp-font: var(--font-sans, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif);
- --xp-mono: var(--font-mono, ui-monospace, "SF Mono", Menlo, monospace);
- --xp-shadow: var(--shadow-lg, 0 10px 30px -8px rgb(0 0 0 / .18), 0 2px 6px rgb(0 0 0 / .06));
- --xp-ease: var(--sb-ease, cubic-bezier(.2, .7, .2, 1));
- --xp-dur: var(--sb-dur, 160ms);
- --xp-w: 288px;
- position: fixed; top: 12px; right: 12px; z-index: 1000;
- font: 400 12px/1.35 var(--xp-font); color: var(--xp-fg);
- -webkit-font-smoothing: antialiased;
- }
- .xp *, .xp *::before, .xp *::after { box-sizing: border-box; }
- .xp button, .xp select, .xp input { font: inherit; color: inherit; margin: 0; }
- .xp :focus-visible { outline: 2px solid var(--xp-ring); outline-offset: 2px; }
- /* the small button of the collapsed state */
- .xp-open {
- display: none; width: 36px; height: 36px; padding: 9px; border: 0; cursor: pointer;
- border-radius: calc(var(--xp-radius) + 2px); background: var(--xp-bg); color: var(--xp-fg);
- box-shadow: var(--xp-shadow), 0 0 0 1px var(--xp-border);
- transition: transform var(--xp-dur) var(--xp-ease);
- }
- .xp-open:hover { transform: translateY(-1px); }
- .xp-open svg { width: 18px; height: 18px; display: block; }
- .xp-collapsed .xp-open { display: block; }
- /* the panel */
- .xp-panel {
- width: var(--xp-w); max-height: calc(100vh - 24px); display: flex; flex-direction: column;
- background: var(--xp-bg); border-radius: calc(var(--xp-radius) + 4px);
- box-shadow: var(--xp-shadow), 0 0 0 1px var(--xp-border);
- animation: xp-in var(--xp-dur) var(--xp-ease);
- }
- .xp-panel[hidden] { display: none; }
- @keyframes xp-in { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
- @media (prefers-reduced-motion: reduce) { .xp-panel { animation: none; } .xp-open { transition: none; } }
- .xp-head { display: flex; align-items: center; gap: 8px; padding: 12px 10px 8px 16px; }
- .xp-title { flex: 1; font-weight: 600; font-size: 13px; letter-spacing: -.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
- .xp-icon {
- width: 26px; height: 26px; padding: 5px; border: 0; border-radius: 7px; cursor: pointer;
- background: transparent; color: var(--xp-muted-fg);
- }
- .xp-icon:hover { background: var(--xp-muted); color: var(--xp-fg); }
- .xp-icon svg { width: 16px; height: 16px; display: block; }
- .xp-body { overflow: auto; padding: 0 16px 6px; overscroll-behavior: contain; }
- .xp-presetrow { padding: 2px 0 10px; border-bottom: 1px solid var(--xp-border); margin-bottom: 4px; }
- /* sections: small caps headers that fold */
- .xp-section + .xp-section { border-top: 1px solid var(--xp-border); }
- .xp-shead {
- display: flex; align-items: center; gap: 6px; width: 100%; padding: 10px 0 6px; border: 0; background: none; cursor: pointer;
- font-weight: 600; font-size: 10px; line-height: 1; letter-spacing: .07em; text-transform: uppercase; color: var(--xp-muted-fg); text-align: left;
- }
- .xp-shead span { flex: 1; }
- .xp-shead svg { width: 10px; height: 10px; transition: transform var(--xp-dur) var(--xp-ease); }
- .xp-shead:hover { color: var(--xp-fg); }
- .xp-folded .xp-shead svg { transform: rotate(-90deg); }
- .xp-folded .xp-controls { display: none; }
- .xp-controls { display: grid; gap: 7px; padding: 2px 0 12px; }
- .xp-untitled .xp-controls { padding-top: 8px; }
- /* a row: label on the left, control on the right */
- .xp-row { display: grid; grid-template-columns: 78px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 26px; }
- .xp-label { color: var(--xp-muted-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
- .xp-k-swatch { align-items: start; }
- .xp-k-swatch .xp-label { padding-top: 3px; }
- /* select: a grey rounded dropdown */
- .xp-sel {
- appearance: none; -webkit-appearance: none; width: 100%; min-width: 0; border: 0; border-radius: 7px; cursor: pointer;
- font-weight: 500; padding: 6px 24px 6px 9px; line-height: 1.2; color: var(--xp-fg);
- background: var(--xp-muted) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M.5.5 4 4 7.5.5' fill='none' stroke='%23888' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat right 9px center;
- text-overflow: ellipsis;
- }
- .xp-sel:hover { background-color: var(--xp-accent); }
- /* segment: 2-4 options as a segmented switch */
- .xp-seg { display: flex; padding: 2px; gap: 2px; border-radius: 8px; background: var(--xp-muted); }
- .xp-seg button {
- flex: 1 1 auto; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
- padding: 4px 6px; border: 0; border-radius: 6px; background: transparent; cursor: pointer;
- font-weight: 500; color: var(--xp-muted-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
- transition: background var(--xp-dur) var(--xp-ease), color var(--xp-dur) var(--xp-ease);
- }
- .xp-seg button span { overflow: hidden; text-overflow: ellipsis; }
- .xp-seg button:hover { color: var(--xp-fg); }
- .xp-seg button[aria-checked="true"] { background: var(--xp-bg); color: var(--xp-fg); box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 0 0 1px var(--xp-border); }
- .xp-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
- /* bool: a toggle */
- .xp-switch {
- justify-self: start; position: relative; width: 30px; height: 18px; padding: 0; border: 0; border-radius: 99px; cursor: pointer;
- background: var(--xp-accent); box-shadow: inset 0 0 0 1px var(--xp-border); transition: background var(--xp-dur) var(--xp-ease);
- }
- .xp-switch i {
- position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--xp-bg);
- box-shadow: 0 1px 2px rgb(0 0 0 / .2); transition: transform var(--xp-dur) var(--xp-ease);
- }
- .xp-switch[aria-checked="true"] { background: var(--xp-strong); box-shadow: none; }
- .xp-switch[aria-checked="true"] i { transform: translateX(12px); }
- /* range: a black-thumb slider with a mono value */
- .xp-rangebox { display: flex; align-items: center; gap: 8px; }
- .xp-range { flex: 1; min-width: 0; height: 18px; accent-color: var(--xp-strong); cursor: pointer; background: transparent; -webkit-appearance: none; appearance: none; }
- .xp-range::-webkit-slider-runnable-track { height: 4px; border-radius: 99px; background: var(--xp-accent); }
- .xp-range::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; margin-top: -4.5px; border: 0; border-radius: 50%; background: var(--xp-strong); }
- .xp-range::-moz-range-track { height: 4px; border-radius: 99px; background: var(--xp-accent); }
- .xp-range::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: var(--xp-strong); }
- .xp-val { min-width: 34px; text-align: right; font: 11px/1 var(--xp-mono); color: var(--xp-muted-fg); font-variant-numeric: tabular-nums; }
- /* swatch: colour dots, a ring on the chosen one */
- .xp-swatches { display: flex; flex-wrap: wrap; gap: 6px; padding: 3px 2px; }
- .xp-swatch {
- width: 16px; height: 16px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: var(--sw);
- box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--xp-fg) 16%, transparent); transition: transform var(--xp-dur) var(--xp-ease);
- }
- .xp-swatch:hover { transform: scale(1.12); }
- .xp-swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--xp-bg), 0 0 0 3.5px var(--xp-strong); }
- /* text */
- .xp-text { width: 100%; min-width: 0; border: 0; border-radius: 7px; padding: 6px 9px; background: var(--xp-muted); color: var(--xp-fg); }
- .xp-text:hover { background: var(--xp-accent); }
- /* footer: reset and copy link */
- .xp-foot { display: flex; gap: 6px; padding: 10px 16px 14px; border-top: 1px solid var(--xp-border); }
- .xp-btn {
- flex: 1; border: 0; border-radius: 8px; padding: 7px 10px; cursor: pointer; font-weight: 500;
- background: var(--xp-muted); color: var(--xp-fg);
- }
- .xp-btn:hover { background: var(--xp-accent); }
- .xp-copy { position: fixed; left: -9999px; top: 0; }
- /* inline: the panel stands in a container of the page (a lens puts it first in its side panel) instead of floating */
- .xp.xp-inline { position: static; z-index: auto; }
- /* the container draws the frame (a lens section is already a card), so the panel has none of its own */
- .xp-inline .xp-panel { width: 100%; max-height: none; animation: none; background: transparent; box-shadow: none; border-radius: 0; }
- .xp-inline .xp-head { padding: 0 0 6px; }
- .xp-inline .xp-body { padding-left: 0; padding-right: 0; }
- .xp-inline .xp-foot { padding-left: 0; padding-right: 0; padding-bottom: 0; }
- @media (max-width: 560px) {
- .xp:not(.xp-inline) { top: auto; bottom: 10px; right: 10px; }
- .xp:not(.xp-inline) .xp-panel { width: min(var(--xp-w), calc(100vw - 20px)); max-height: 70vh; }
- }
- @media print { .xp { display: none; } }