UNPKG

zircle

Version:

Zircle's circular components, rebuilt with Orbit and Zumly for the web. No Vue required.

567 lines (566 loc) 12.4 kB
/*! Zircle, Orbit, and Zumly are MIT licensed. See LICENSES.txt for copyright and permission notices. */ /* src/styles/zircle.css */ z-canvas { display: block; position: relative; min-height: 320px; height: 100%; } .zircle { --shade-color: #859ba6; --primary-color: #283237; --accent-color: #000; --success-color: #26834a; --warning-color: #d2a117; --danger-color: #c73131; --z-size-xxl: 420px; --z-size-xl: 260px; --z-size-l: 160px; --z-size-m: 100px; --z-size-s: 62px; --z-size-xs: 38px; --z-size-xxs: 16px; --background-color: var(--primary-color); --main-color: var(--primary-color); --main-text-color: var(--shade-color); --accent-text-color: var(--accent-color); --z-border-width: 2px; --z-radius: 50%; font: inherit; color: var(--main-text-color); background: var(--background-color); } .zircle[data-theme=white] { --shade-color: #000; --primary-color: #fff; --accent-color: #808080; } .zircle[data-theme=light-blue] { --shade-color: #f1f1f1; --primary-color: #5fc9f3; --accent-color: #0d7fac; } .zircle[data-theme=black] { --shade-color: #859ba6; --primary-color: #283237; --accent-color: #000; } .zircle[data-theme=purple] { --shade-color: #fdecf0; --primary-color: #ee305a; --accent-color: #7b0a23; } .zircle[data-theme=orange] { --shade-color: #fff8f3; --primary-color: #f7892f; --accent-color: #884005; } .zircle[data-theme=yellow] { --shade-color: #fffcf2; --primary-color: #ffca26; --accent-color: #8c6a00; } .zircle[data-theme=blue] { --shade-color: #d4e1f1; --primary-color: #3e78bb; --accent-color: #182e48; } .zircle[data-theme=green] { --shade-color: #f6fbf6; --primary-color: #69bf66; --accent-color: #2b6329; } .zircle[data-theme=red] { --shade-color: #fef8f8; --primary-color: #ef3c3b; --accent-color: #860c0b; } .zircle[data-theme=gray] { --shade-color: #e4e4e5; --primary-color: #7c7e81; --accent-color: #313233; } .zircle[data-mode=light] { --background-color: var(--shade-color); --main-color: var(--shade-color); --main-text-color: var(--primary-color); --accent-text-color: var(--accent-color); } .zircle[data-mode=light-filled] { --background-color: var(--shade-color); --main-color: var(--primary-color); --main-text-color: var(--accent-color); --accent-text-color: var(--accent-color); } .zircle[data-mode=dark] { --background-color: var(--primary-color); --main-color: var(--primary-color); --main-text-color: var(--shade-color); --accent-text-color: var(--accent-color); } .zircle[data-mode=dark-filled] { --background-color: var(--primary-color); --main-color: var(--shade-color); --main-text-color: var(--accent-color); --accent-text-color: var(--shade-color); } .zircle[data-shape=square] { --z-radius: 0; } .zircle.zumly-canvas { position: absolute; inset: 0; width: 100%; height: 100%; } .zircle.z-stage { position: absolute; inset: 0; overflow: hidden; } .zircle *, .zircle *::before, .zircle *::after { box-sizing: border-box; } .zircle [hidden] { display: none !important; } .zircle :is(button, input, select, textarea) { font: inherit; } .zircle a { color: inherit; text-underline-offset: 3px; } .zircle :is(button, a, [tabindex]):focus-visible { outline: 2px solid currentColor; outline-offset: 5px; } .zircle .z-surface { --z-surface: var(--main-color); --z-ink: var(--main-text-color); --z-line: var(--main-text-color); --z-radius: 50%; width: var(--z-diameter); height: var(--z-diameter); color: var(--z-ink); border-radius: var(--z-radius); isolation: isolate; } .zircle[data-shape=square] .z-surface { --z-radius: 0; } .zircle .z-surface[square], .zircle[data-shape] .z-surface[square] { --z-radius: 0; } .zircle .z-surface[circle], .zircle[data-shape] .z-surface[circle] { --z-radius: 50%; } .zircle z-view.z-view { position: absolute; top: 0; left: 0; contain: layout style; content-visibility: visible; overflow: visible; } .zircle z-spot.satellite { width: var(--z-diameter); height: var(--z-diameter); border: 0; border-radius: var(--z-radius); } .zircle .z-surface-body { position: absolute; inset: 0; border: var(--z-border-width) solid var(--z-line); border-radius: inherit; background: var(--z-surface); } .zircle .z-plate { position: absolute; inset: -14px; border: 1px solid currentColor; border-radius: inherit; opacity: .16; pointer-events: none; } .zircle z-spot > .z-plate { inset: -7px; opacity: 0; transition: opacity 180ms, scale 180ms; } .zircle z-spot.zoom-me:hover > .z-plate { opacity: .4; scale: 1.04; } .zircle z-spot:is(.zoom-me, [button]):active > .z-plate { opacity: .4; scale: 1.18; } .zircle :is(z-spot[button], z-spot.zoom-me) { cursor: pointer; } .zircle z-spot.zoom-me { cursor: zoom-in; } .zircle z-spot[button]:active > .z-surface-body { filter: brightness(.9); } .zircle .z-surface[disabled] { opacity: .45; cursor: default; } .zircle .z-surface.shade { --z-surface: var(--shade-color); --z-ink: var(--primary-color); --z-line: var(--shade-color); } .zircle .z-surface.accent, .zircle .z-surface.active { --z-surface: var(--accent-color); --z-ink: var(--primary-color); --z-line: var(--accent-color); } .zircle .z-surface.transparent { --z-surface: transparent; --z-line: transparent; } .zircle .transparent > .z-plate { display: none; } .zircle .success { --z-surface: var(--success-color); --z-line: var(--success-color); --z-ink: #fff; } .zircle .warning { --z-surface: var(--warning-color); --z-line: var(--warning-color); --z-ink: #000; } .zircle .danger { --z-surface: var(--danger-color); --z-line: var(--danger-color); --z-ink: #fff; } .zircle .z-image { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; overflow: hidden; pointer-events: none; } .zircle .z-image img, .zircle img.z-image { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; } .zircle .z-image:has(> .z-image-source) > :not(.z-image-source) { display: none; } .zircle .z-content { position: absolute; inset: 20%; display: flex; flex-direction: column; justify-content: safe center; align-items: center; overflow: auto; text-align: center; line-height: 1.5; scrollbar-width: thin; z-index: 1; } .zircle z-spot > .z-content, .zircle z-spot > .z-surface-body > .z-content { inset: 10%; font-size: .85em; line-height: 1.2; } .zircle .z-content > * { flex-shrink: 0; max-width: 100%; } .zircle .z-content p { margin: .5em 0; } .zircle .z-media { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; z-index: 2; } .zircle .z-media:empty { display: none; } .zircle .z-extensions { position: absolute; inset: 0; pointer-events: none; z-index: 3; } .zircle .z-extensions > .bigbang { position: absolute; inset: 0; } .zircle .z-orbit-layout > .gravity-spot { pointer-events: none; } .zircle .z-extensions :is(z-spot, button, a, input, select) { pointer-events: auto; } .zircle .z-label { position: absolute; z-index: 4; white-space: nowrap; line-height: 1.2; font-size: 13px; font-weight: 400; pointer-events: none; color: var(--main-text-color); } .zircle .z-label.bottom { left: 50%; top: calc(100% + 14px); transform: translateX(-50%); } .zircle .z-label.top { left: 50%; bottom: calc(100% + 14px); transform: translateX(-50%); } .zircle .z-label.left { right: calc(100% + 14px); top: 50%; transform: translateY(-50%); } .zircle .z-label.right { left: calc(100% + 14px); top: 50%; transform: translateY(-50%); } .zircle :is(z-slider, z-knob, z-scroll).gravity-spot { position: absolute; inset: 0; width: 100%; height: 100%; --o-force: var(--z-diameter, 100px); --o-stroke: var(--accent-color); --o-back-stroke: color-mix(in srgb, currentColor 15%, transparent); --o-stroke-width: 3; --o-back-stroke-width: 2; } .zircle z-slider { pointer-events: none; } .zircle :is(z-knob, z-scroll) { touch-action: none; user-select: none; cursor: grab; border-radius: 50%; z-index: 5; } .zircle z-knob.gravity-spot { pointer-events: auto; } .zircle :is(z-knob, z-scroll):active { cursor: grabbing; } .zircle .z-control-orbit { pointer-events: none; border: 0; } .zircle .z-control-handle.satellite { width: 12px; height: 12px; background: var(--main-text-color); border: 2px solid var(--main-color); border-radius: 50%; pointer-events: none; } .zircle .z-knob-value { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 2px; font-size: 1.25em; color: inherit; } .zircle .z-knob-unit { font-size: .6em; } .zircle z-scroll { --o-force: calc(var(--z-diameter, 100px) + 24px) !important; pointer-events: none; } .zircle z-scroll .z-control-handle { pointer-events: auto; } .zircle .z-control-progress { --o-stroke: var(--accent-color); --o-back-stroke: color-mix(in srgb, currentColor 15%, transparent); --o-stroke-width: 3; --o-back-stroke-width: 2; } .zircle z-list.gravity-spot { position: absolute; top: 50%; left: 50%; width: 0; height: 0; pointer-events: none; --o-force: var(--z-list-size, var(--z-size-xxl)); } .zircle .z-list-pagination { --o-force: max(240px, calc(var(--z-list-size, var(--z-size-xxl)) + 80px)); --o-force-ratio: 1; --o-range: 0deg; pointer-events: none; border: 0; } .zircle .z-list-page.satellite { width: 36px; height: 36px; pointer-events: auto; } .zircle .z-list-page:disabled { opacity: .4; cursor: default; } .zircle :is(.z-list-page, .z-pagination-button) { min-width: 36px; min-height: 36px; padding: 4px; border: 1px solid var(--main-text-color); color: var(--main-text-color); background: var(--main-color); border-radius: 50%; cursor: pointer; } .zircle z-pagination.satellite { width: var(--z-pagination-size, 38px); height: var(--z-pagination-size, 38px); } .zircle :is(.z-list-page, .z-pagination-button)[aria-current=page], .zircle .z-pagination-button[aria-pressed=true] { color: var(--main-color); background: var(--main-text-color); } .zircle z-dialog { display: contents; } .zircle .z-dialog-panel { --z-diameter: min(var(--z-dialog-size, 300px), calc(100vw - 64px)); position: fixed; margin: auto; width: var(--z-diameter); height: var(--z-diameter); padding: 0; border: 2px solid var(--main-text-color); border-radius: 50%; background: var(--main-color); color: var(--main-text-color); overflow: visible; } .zircle .z-dialog-panel.is-square { border-radius: 0; } .zircle .z-dialog-image, .zircle .z-dialog-image-slot, .zircle .z-dialog-media { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; overflow: hidden; object-fit: cover; pointer-events: none; } .zircle .z-dialog-image-slot > * { width: 100%; height: 100%; object-fit: cover; } .zircle .z-dialog-media { z-index: 2; } .zircle .z-dialog-media > * { pointer-events: auto; } .zircle .z-dialog-extensions { position: absolute; inset: 0; pointer-events: none; z-index: 3; } .zircle .z-dialog-extensions > * { pointer-events: auto; } .zircle .z-dialog-panel::backdrop { background: rgb(0 0 0 / .25); backdrop-filter: blur(3px); } .zircle .z-dialog-content { position: absolute; inset: 20%; display: flex; flex-direction: column; justify-content: safe center; text-align: center; overflow: auto; } .zircle .z-dialog-content > * { flex-shrink: 0; } .zircle .z-dialog-close { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; background: var(--main-color); color: inherit; border: 1px solid currentColor; border-radius: 50%; cursor: pointer; z-index: 6; } .zircle .z-back { position: absolute; left: 24px; bottom: 24px; width: 48px; height: 48px; display: grid; place-items: center; font-size: 24px; border: 1px solid var(--main-text-color); color: var(--main-text-color); background: var(--main-color); border-radius: 50%; cursor: pointer; pointer-events: auto; z-index: 20; } @media (prefers-reduced-motion: reduce) { .zircle *, .zircle *::before, .zircle *::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: 0s !important; } } /*# sourceMappingURL=zircle.components.css.map */