@birdycom/omniaui 0.12.1 → 0.12.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/dist/components.css +196 -2
- package/dist/components.min.css +1 -1
- package/dist/oc-theme.css +1 -1
- package/dist/parts/media-live-frame.css +38 -0
- package/dist/parts/media-watermark.css +96 -0
- package/dist/parts/site-link-row.css +54 -0
- package/manifest.json +24 -0
- package/package.json +2 -2
- package/snippets/link-row.html +14 -0
- package/snippets/live-frame.html +20 -0
- package/snippets/watermark.html +40 -0
package/dist/components.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* File: oc-theme.css — generated from tokens/semantic.json by @birdycom/omniacss 0.12.
|
|
1
|
+
/* File: oc-theme.css — generated from tokens/semantic.json by @birdycom/omniacss 0.12.2. Do not edit. */
|
|
2
2
|
/* Semantic theme tokens: every color is light-dark() of an Omnia palette token (oc-colors.css). */
|
|
3
3
|
/* Same source as the desktop export: npx omniacss tokens --format json|dtcg|python */
|
|
4
4
|
:root {
|
|
@@ -1718,7 +1718,7 @@ textarea.oc-input {
|
|
|
1718
1718
|
display: none;
|
|
1719
1719
|
}
|
|
1720
1720
|
|
|
1721
|
-
/* Optional Iconify/MDI chevron: put <
|
|
1721
|
+
/* Optional Iconify/MDI chevron: put <iconify-icon icon="mdi:chevron-down" class="oc-accordion-chevron size-4" height="unset" aria-hidden="true"></iconify-icon> in the trigger (the older <span class="iconify" data-icon="…"> works the same) */
|
|
1722
1722
|
.oc-accordion-trigger .oc-accordion-chevron {
|
|
1723
1723
|
flex-shrink: 0;
|
|
1724
1724
|
transition: transform var(--oc-transition-fast);
|
|
@@ -8844,6 +8844,46 @@ a.oc-attachment-image:hover > :is(img, .oc-media-art) { filter: brightness(1.05)
|
|
|
8844
8844
|
}
|
|
8845
8845
|
@keyframes oc-lightbox-in { from { opacity: 0; scale: 0.98; } }
|
|
8846
8846
|
|
|
8847
|
+
/* parts/media-live-frame.css */
|
|
8848
|
+
/* File: packages/ui/src/parts/media-live-frame.css
|
|
8849
|
+
Map: frame (virtual size -> ratio, container) -> content at the virtual size, scaled to the frame width -> static
|
|
8850
|
+
Live frame: shows a page (an <iframe>, or a <video>/<img>) at a virtual size such as 1280x720 and scales it down to
|
|
8851
|
+
the width of its box, so a live site looks like a screenshot that is still alive. Pure CSS: the scale is
|
|
8852
|
+
tan(atan2(100cqi, <virtual width>)), which is the frame width divided by the virtual width. On .oc-browser-frame__view
|
|
8853
|
+
or on its own. Set the size with --oc-live-w / --oc-live-h (unitless px, default 1280 x 720). */
|
|
8854
|
+
|
|
8855
|
+
.oc-live-frame {
|
|
8856
|
+
--oc-live-w: 1280;
|
|
8857
|
+
--oc-live-h: 720;
|
|
8858
|
+
position: relative;
|
|
8859
|
+
display: block;
|
|
8860
|
+
/* Always the full width of its column (also inside flex or grid centring), the height follows the ratio. */
|
|
8861
|
+
inline-size: 100%;
|
|
8862
|
+
overflow: hidden;
|
|
8863
|
+
aspect-ratio: var(--oc-live-w) / var(--oc-live-h);
|
|
8864
|
+
container-type: inline-size;
|
|
8865
|
+
background: var(--oc-background);
|
|
8866
|
+
}
|
|
8867
|
+
/* .oc-live-frame__content: any element (a whole demo page) at the virtual size. The class inside :is() also makes this
|
|
8868
|
+
rule as strong as the .oc-browser-frame__view rule, which comes earlier, so on the view slot this one wins. */
|
|
8869
|
+
.oc-live-frame > :is(iframe, video, img, object, .oc-live-frame__content) {
|
|
8870
|
+
position: absolute;
|
|
8871
|
+
inset-block-start: 0;
|
|
8872
|
+
inset-inline-start: 0;
|
|
8873
|
+
display: block;
|
|
8874
|
+
inline-size: calc(var(--oc-live-w) * 1px);
|
|
8875
|
+
max-inline-size: none;
|
|
8876
|
+
block-size: calc(var(--oc-live-h) * 1px);
|
|
8877
|
+
border: 0;
|
|
8878
|
+
transform-origin: 0 0;
|
|
8879
|
+
scale: tan(atan2(100cqi, calc(var(--oc-live-w) * 1px)));
|
|
8880
|
+
}
|
|
8881
|
+
/* Right-to-left pages: scale from the other corner. */
|
|
8882
|
+
.oc-live-frame:dir(rtl) > :is(iframe, video, img, object, .oc-live-frame__content) { transform-origin: 100% 0; }
|
|
8883
|
+
|
|
8884
|
+
/* A picture of a page, not a page to use: clicks and scrolling pass the frame by. */
|
|
8885
|
+
.oc-live-frame--static > :is(iframe, video, img, object, .oc-live-frame__content) { pointer-events: none; }
|
|
8886
|
+
|
|
8847
8887
|
/* parts/media-message-thread.css */
|
|
8848
8888
|
/* File: packages/ui/src/parts/media-message-thread.css | Map: frame (grid: header / messages / composer) -> header (title, meta,
|
|
8849
8889
|
people, status, actions) -> wallpaper (masked doodles in a token color) -> scroll area (starts at the bottom)
|
|
@@ -9459,6 +9499,104 @@ a.oc-message__quote:focus-visible { outline: 2px solid var(--oc-ring); outline-o
|
|
|
9459
9499
|
.oc-media-thumb:hover > :is(img, video, .oc-media-art) { transform: scale(1.04); }
|
|
9460
9500
|
}
|
|
9461
9501
|
|
|
9502
|
+
/* parts/media-watermark.css */
|
|
9503
|
+
/* File: packages/ui/src/parts/media-watermark.css
|
|
9504
|
+
Map: overlay (click-through, sized to its box) -> text -> straight -> tiled -> corner stamp -> tones -> print
|
|
9505
|
+
Watermark: a light layer with large slanted text ("CONCEPT", "DRAFT", "SAMPLE") over an image, a card or a live
|
|
9506
|
+
frame. Put .oc-watermark as the last child of a positioned box (the utility .relative, or any position) with the
|
|
9507
|
+
text in a <span>. Clicks go through to what is underneath (pointer-events: none). The text scales with the box
|
|
9508
|
+
(container query units). Tokens: --oc-watermark-color, -opacity, -angle, -size. Omnia tokens only. */
|
|
9509
|
+
|
|
9510
|
+
.oc-watermark {
|
|
9511
|
+
--oc-watermark-color: var(--oc-foreground);
|
|
9512
|
+
--oc-watermark-opacity: 0.12;
|
|
9513
|
+
--oc-watermark-angle: -18deg;
|
|
9514
|
+
--oc-watermark-size: clamp(1.75rem, 14cqi, 12rem);
|
|
9515
|
+
position: absolute;
|
|
9516
|
+
z-index: 2;
|
|
9517
|
+
inset: 0;
|
|
9518
|
+
display: grid;
|
|
9519
|
+
place-items: center;
|
|
9520
|
+
overflow: hidden;
|
|
9521
|
+
container-type: size;
|
|
9522
|
+
border-radius: inherit;
|
|
9523
|
+
pointer-events: none;
|
|
9524
|
+
user-select: none;
|
|
9525
|
+
}
|
|
9526
|
+
.oc-watermark > span {
|
|
9527
|
+
rotate: var(--oc-watermark-angle);
|
|
9528
|
+
color: oklch(from var(--oc-watermark-color) l c h / var(--oc-watermark-opacity));
|
|
9529
|
+
font-size: var(--oc-watermark-size);
|
|
9530
|
+
font-weight: 800;
|
|
9531
|
+
line-height: 1;
|
|
9532
|
+
letter-spacing: 0.25em;
|
|
9533
|
+
text-transform: uppercase;
|
|
9534
|
+
white-space: nowrap;
|
|
9535
|
+
}
|
|
9536
|
+
|
|
9537
|
+
/* A logo (<img>, or an inline <svg> logo) or an icon (inline <svg> with currentColor) instead of, or next to, text.
|
|
9538
|
+
An <img> keeps its own colors at the watermark opacity; --mono turns it into a flat gray stamp. An inline <svg>
|
|
9539
|
+
takes the watermark color, like the text. Size: --oc-watermark-mark (default 40% of the box width). */
|
|
9540
|
+
.oc-watermark > :is(img, svg) {
|
|
9541
|
+
inline-size: var(--oc-watermark-mark, 40cqi);
|
|
9542
|
+
max-block-size: 70cqb;
|
|
9543
|
+
block-size: auto;
|
|
9544
|
+
rotate: var(--oc-watermark-angle);
|
|
9545
|
+
}
|
|
9546
|
+
.oc-watermark > img { opacity: calc(var(--oc-watermark-opacity) * 1.5); }
|
|
9547
|
+
.oc-watermark > svg { color: oklch(from var(--oc-watermark-color) l c h / var(--oc-watermark-opacity)); }
|
|
9548
|
+
.oc-watermark--mono > img { filter: grayscale(1) contrast(0.6); }
|
|
9549
|
+
/* Logo or icon above a word: wrap both in one <span class="oc-watermark__stack">. */
|
|
9550
|
+
.oc-watermark__stack { display: grid; justify-items: center; gap: 0.3em; }
|
|
9551
|
+
.oc-watermark__stack > :is(img, svg) { inline-size: 0.9em; block-size: auto; }
|
|
9552
|
+
.oc-watermark__stack > img { opacity: calc(var(--oc-watermark-opacity) * 1.5); }
|
|
9553
|
+
|
|
9554
|
+
/* Horizontal text instead of slanted. */
|
|
9555
|
+
.oc-watermark--straight { --oc-watermark-angle: 0deg; }
|
|
9556
|
+
|
|
9557
|
+
/* Tiled: repeat the text in several spans; they fill the box in a slanted grid (for proofs and previews). */
|
|
9558
|
+
.oc-watermark--tile {
|
|
9559
|
+
--oc-watermark-size: clamp(0.9rem, 4.5cqi, 2.25rem);
|
|
9560
|
+
/* Columns in rem: container units here would measure the parent of the box, not the box. */
|
|
9561
|
+
grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
|
|
9562
|
+
align-content: space-evenly;
|
|
9563
|
+
inset: -25%;
|
|
9564
|
+
rotate: var(--oc-watermark-angle);
|
|
9565
|
+
}
|
|
9566
|
+
.oc-watermark--tile > :is(span, img, svg) { rotate: none; justify-self: center; }
|
|
9567
|
+
.oc-watermark--tile > span { letter-spacing: 0.15em; }
|
|
9568
|
+
.oc-watermark--tile > :is(img, svg) { inline-size: 2.5rem; }
|
|
9569
|
+
/* Logos and icons are narrower than words: narrower columns, so the whole box fills up. */
|
|
9570
|
+
.oc-watermark--tile:has(> :is(img, svg)) { grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr)); }
|
|
9571
|
+
|
|
9572
|
+
/* A small stamp in a corner instead of across the middle: --corner (bottom right) or --corner-top (top right).
|
|
9573
|
+
Two classes, so a tone (--primary …) changes its color but not its readable opacity. */
|
|
9574
|
+
.oc-watermark:is(.oc-watermark--corner, .oc-watermark--corner-top) {
|
|
9575
|
+
--oc-watermark-angle: 0deg;
|
|
9576
|
+
--oc-watermark-size: 0.75rem;
|
|
9577
|
+
--oc-watermark-opacity: 0.75;
|
|
9578
|
+
place-items: end;
|
|
9579
|
+
padding: 0.75rem;
|
|
9580
|
+
}
|
|
9581
|
+
.oc-watermark--corner-top { place-items: start end; }
|
|
9582
|
+
.oc-watermark:is(.oc-watermark--corner, .oc-watermark--corner-top) > span {
|
|
9583
|
+
padding: 0.25rem 0.6rem;
|
|
9584
|
+
border: 1px solid oklch(from var(--oc-watermark-color) l c h / 0.35);
|
|
9585
|
+
border-radius: var(--oc-radius, 0.375rem);
|
|
9586
|
+
background: oklch(from var(--oc-background) l c h / 0.7);
|
|
9587
|
+
letter-spacing: 0.12em;
|
|
9588
|
+
}
|
|
9589
|
+
|
|
9590
|
+
/* Tones: light text for dark images, the brand color, or red for "not for use". */
|
|
9591
|
+
.oc-watermark--light { --oc-watermark-color: var(--color-white-100); --oc-watermark-opacity: 0.22; }
|
|
9592
|
+
.oc-watermark--primary { --oc-watermark-color: var(--oc-primary); --oc-watermark-opacity: 0.16; }
|
|
9593
|
+
.oc-watermark--destructive { --oc-watermark-color: var(--oc-destructive); --oc-watermark-opacity: 0.2; }
|
|
9594
|
+
|
|
9595
|
+
/* Printed proofs keep the watermark, a little stronger so it survives the printer. */
|
|
9596
|
+
@media print {
|
|
9597
|
+
.oc-watermark { --oc-watermark-opacity: 0.2; print-color-adjust: exact; }
|
|
9598
|
+
}
|
|
9599
|
+
|
|
9462
9600
|
/* parts/site-fact-list.css */
|
|
9463
9601
|
/* File: packages/ui/src/parts/site-fact-list.css
|
|
9464
9602
|
Map: plain -> compact -> stacked -> accent values -> narrow screens
|
|
@@ -9522,6 +9660,62 @@ a.oc-message__quote:focus-visible { outline: 2px solid var(--oc-ring); outline-o
|
|
|
9522
9660
|
.oc-link-arrow::before { transition: none; }
|
|
9523
9661
|
}
|
|
9524
9662
|
|
|
9663
|
+
/* parts/site-link-row.css */
|
|
9664
|
+
/* File: packages/ui/src/parts/site-link-row.css
|
|
9665
|
+
Map: row (wraps) -> link -> external icon (http links) -> GitHub mark (github.com links) -> tones -> sizes
|
|
9666
|
+
Link row: a row of links under a feature or product card ("Marketplace", "Source", "Docs"). Links to another site get
|
|
9667
|
+
an "opens elsewhere" arrow by themselves, links to github.com the GitHub mark instead; links on your own site get
|
|
9668
|
+
no icon. The icons are CSS masks in the text color, so they follow the tone and light/dark mode. */
|
|
9669
|
+
|
|
9670
|
+
.oc-link-row {
|
|
9671
|
+
display: flex;
|
|
9672
|
+
flex-wrap: wrap;
|
|
9673
|
+
gap: 0.4rem 1rem;
|
|
9674
|
+
margin: 0.9rem 0 0;
|
|
9675
|
+
padding: 0;
|
|
9676
|
+
list-style: none;
|
|
9677
|
+
font-size: 0.9rem;
|
|
9678
|
+
}
|
|
9679
|
+
.oc-link-row a {
|
|
9680
|
+
display: inline-flex;
|
|
9681
|
+
align-items: center;
|
|
9682
|
+
gap: 0.35rem;
|
|
9683
|
+
border-radius: 4px;
|
|
9684
|
+
color: var(--oc-primary);
|
|
9685
|
+
font-weight: 600;
|
|
9686
|
+
text-decoration: none;
|
|
9687
|
+
}
|
|
9688
|
+
.oc-link-row a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
|
|
9689
|
+
.oc-link-row a:focus-visible { outline: 2px solid var(--oc-ring); outline-offset: 3px; }
|
|
9690
|
+
|
|
9691
|
+
/* Icons: one mask per kind, filled with the text color. */
|
|
9692
|
+
.oc-link-row a:is([href^="http://"], [href^="https://"])::after,
|
|
9693
|
+
.oc-link-row a[href*="github.com"]::before {
|
|
9694
|
+
content: "";
|
|
9695
|
+
flex: none;
|
|
9696
|
+
inline-size: 0.9em;
|
|
9697
|
+
aspect-ratio: 1;
|
|
9698
|
+
background: currentColor;
|
|
9699
|
+
mask: var(--oc-link-row-icon) center / contain no-repeat;
|
|
9700
|
+
}
|
|
9701
|
+
.oc-link-row a:is([href^="http://"], [href^="https://"])::after {
|
|
9702
|
+
--oc-link-row-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M9 7h8v8'/%3E%3C/svg%3E");
|
|
9703
|
+
}
|
|
9704
|
+
.oc-link-row a[href*="github.com"]::before {
|
|
9705
|
+
--oc-link-row-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 .5a11.5 11.5 0 0 0-3.64 22.41c.58.1.79-.25.79-.56v-2c-3.2.7-3.88-1.37-3.88-1.37-.52-1.33-1.28-1.69-1.28-1.69-1.05-.71.08-.7.08-.7 1.16.08 1.77 1.19 1.77 1.19 1.03 1.77 2.7 1.26 3.36.96.1-.75.4-1.26.73-1.55-2.55-.29-5.24-1.28-5.24-5.69 0-1.26.45-2.28 1.19-3.09-.12-.29-.52-1.46.11-3.05 0 0 .97-.31 3.17 1.18a11 11 0 0 1 5.77 0c2.2-1.49 3.17-1.18 3.17-1.18.63 1.59.23 2.76.11 3.05.74.81 1.19 1.83 1.19 3.09 0 4.42-2.7 5.39-5.26 5.68.41.36.78 1.06.78 2.14v3.17c0 .31.21.67.8.56A11.5 11.5 0 0 0 12 .5Z'/%3E%3C/svg%3E");
|
|
9706
|
+
}
|
|
9707
|
+
/* A GitHub link shows the GitHub mark instead of the arrow. */
|
|
9708
|
+
.oc-link-row a[href*="github.com"]::after { content: none; }
|
|
9709
|
+
|
|
9710
|
+
/* Tones: the element's accent (with an .oc-accent--* class), or muted text that brightens on hover. */
|
|
9711
|
+
.oc-link-row--accent a { color: light-dark(var(--oc-accent-from, var(--oc-primary)), oklch(from var(--oc-accent-from, var(--oc-primary)) max(l, 0.72) c h)); }
|
|
9712
|
+
.oc-link-row--muted a { color: var(--oc-muted-foreground); font-weight: 500; }
|
|
9713
|
+
.oc-link-row--muted a:hover { color: var(--oc-foreground); }
|
|
9714
|
+
|
|
9715
|
+
/* Sizes */
|
|
9716
|
+
.oc-link-row--sm { font-size: 0.8rem; gap: 0.3rem 0.8rem; }
|
|
9717
|
+
.oc-link-row--lg { font-size: 1rem; }
|
|
9718
|
+
|
|
9525
9719
|
/* parts/site-marquee.css */
|
|
9526
9720
|
/* File: packages/ui/src/parts/site-marquee.css
|
|
9527
9721
|
Map: pause on focus -> direction / speed modifiers -> plain items -> no fade -> reduced motion
|