@birdycom/omniaui 0.16.2 → 0.17.0

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 (83) hide show
  1. package/bin/lib/copy-js.mjs +8 -0
  2. package/bin/lib/webicons-builtin.json +1 -1
  3. package/dist/back-link.d.ts +6 -0
  4. package/dist/back-link.js +54 -0
  5. package/dist/barcode.d.ts +5 -1
  6. package/dist/barcode.js +29 -8
  7. package/dist/calendar.d.ts +17 -0
  8. package/dist/calendar.js +190 -0
  9. package/dist/code-block.css +3 -0
  10. package/dist/combobox.d.ts +27 -4
  11. package/dist/combobox.js +231 -33
  12. package/dist/components-extra.css +33 -2
  13. package/dist/components.css +2096 -163
  14. package/dist/components.min.css +1 -1
  15. package/dist/countdown.d.ts +11 -0
  16. package/dist/countdown.js +76 -0
  17. package/dist/data-table.d.ts +28 -0
  18. package/dist/data-table.js +186 -18
  19. package/dist/docs-ui.css +11 -1
  20. package/dist/glass-lens.d.ts +41 -0
  21. package/dist/glass-lens.js +307 -0
  22. package/dist/input-mask.d.ts +31 -0
  23. package/dist/input-mask.js +228 -0
  24. package/dist/nav-overflow.d.ts +11 -0
  25. package/dist/nav-overflow.js +151 -0
  26. package/dist/oc-theme.css +1 -1
  27. package/dist/parts/app-0160-apps.css +6 -0
  28. package/dist/parts/app-compound-overlays.css +68 -0
  29. package/dist/parts/app-countdown.css +66 -0
  30. package/dist/parts/app-data-table-footer.css +6 -3
  31. package/dist/parts/app-data-table-server.css +47 -0
  32. package/dist/parts/app-data-table.css +27 -1
  33. package/dist/parts/app-header-settings.css +9 -0
  34. package/dist/parts/app-mode-badge.css +12 -0
  35. package/dist/parts/app-module-color.css +152 -0
  36. package/dist/parts/app-name-card.css +5 -0
  37. package/dist/parts/app-page-header.css +1 -1
  38. package/dist/parts/app-recovery-codes-extras.css +13 -0
  39. package/dist/parts/app-sidebar-meta.css +14 -3
  40. package/dist/parts/app-sidebar-provider.css +98 -0
  41. package/dist/parts/app-table-actions.css +16 -0
  42. package/dist/parts/app-tree.css +6 -0
  43. package/dist/parts/app-type-picker.css +272 -0
  44. package/dist/parts/data-dl-numbered.css +17 -0
  45. package/dist/parts/data-graph.css +12 -4
  46. package/dist/parts/forms-combobox-catalog.css +142 -0
  47. package/dist/parts/forms-combobox-icons.css +40 -2
  48. package/dist/parts/forms-copy-field-extras.css +47 -0
  49. package/dist/parts/forms-field-extras.css +55 -0
  50. package/dist/parts/forms-form-section.css +39 -1
  51. package/dist/parts/forms-ledger.css +98 -0
  52. package/dist/parts/media-aspect-flush.css +6 -0
  53. package/dist/parts/media-barcode.css +25 -4
  54. package/dist/parts/media-doc-viewer.css +2 -0
  55. package/dist/parts/media-entity-card.css +5 -0
  56. package/dist/parts/media-glass-liquid.css +10 -5
  57. package/dist/parts/media-glass-options.css +37 -5
  58. package/dist/parts/media-glass.css +85 -35
  59. package/dist/parts/media-scrim.css +51 -0
  60. package/dist/parts/nav-topbar-variants.css +12 -4
  61. package/dist/parts/site-header-variants.css +40 -4
  62. package/dist/parts/site-hero-media.css +88 -0
  63. package/dist/parts/site-price-card.css +3 -1
  64. package/dist/parts/site-split-reverse.css +11 -0
  65. package/dist/parts/site-tint-card.css +5 -4
  66. package/dist/parts/utility-hover.css +6 -3
  67. package/dist/showcase.css +73 -31
  68. package/dist/sidebar.d.ts +22 -0
  69. package/dist/sidebar.js +161 -0
  70. package/dist/tabs.d.ts +9 -0
  71. package/dist/tabs.js +104 -0
  72. package/dist/theme.js +20 -4
  73. package/manifest.json +24 -0
  74. package/package.json +10 -2
  75. package/snippets/accordion-accent.html +1 -1
  76. package/snippets/copy-field.html +44 -6
  77. package/snippets/countdown.html +12 -0
  78. package/snippets/dropdown-menu.html +2 -0
  79. package/snippets/glass.html +3 -3
  80. package/snippets/hero-media.html +20 -0
  81. package/snippets/page-header.html +1 -1
  82. package/snippets/recovery-codes.html +55 -6
  83. package/snippets/scrim.html +19 -0
@@ -1,39 +1,62 @@
1
1
  /* File: packages/ui/src/parts/media-glass.css
2
- Map: tokens (light-dark) -> sheet (.oc-glass: see-through, blurred, light top edge, soft shadow) -> panel (.oc-glass-panel:
3
- a lighter layer inside) -> cards inside a sheet -> --flat (desktop window, the OS draws the blur) -> --strong -> reduced
4
- transparency
5
- Glass: see-through surfaces in the "liquid glass" style, over a photo, a gradient or the desktop (an Electron or Tauri
6
- window with Windows acrylic or macOS vibrancy behind a transparent page). Re-tint with the --oc-glass-* tokens. */
2
+ Map: tokens (light-dark) -> sheet (.oc-glass: see-through fill, thickness from inset light only, soft shadow) ->
3
+ lens (glass-lens.js in Chromium: the edge bends the backdrop) -> panel (.oc-glass-panel: a layer inside, never denser
4
+ than the sheet) -> cards inside a sheet -> --strong -> --flat (desktop window, the OS draws the blur) -> reduced
5
+ transparency -> no backdrop-filter -> Firefox
6
+ Glass: see-through surfaces over a photo, a gradient or the desktop (an Electron or Tauri window with Windows acrylic
7
+ or macOS vibrancy behind a transparent page). Re-tint with the --oc-glass-* tokens. The recipe: a see-through fill,
8
+ light along the inside of the edge (inset shadows only, that is the thickness), a displacement map the size of the
9
+ sheet, one SVG filter, and a fallback. Without glass-lens.js, or outside Chromium, the sheet is frosted glass
10
+ (blur 12px, saturate 160%); with the script in Chrome or Edge the backdrop stays sharp and bends at the edge. */
7
11
 
8
12
  :root {
9
- --oc-glass-sheet: light-dark(oklch(from var(--oc-background) l c h / 0.72), oklch(from var(--oc-background) l c h / 0.62));
10
- --oc-glass-panel: light-dark(oklch(100% 0 0deg / 0.5), oklch(100% 0 0deg / 0.055));
11
- --oc-glass-panel-strong: light-dark(oklch(100% 0 0deg / 0.72), oklch(100% 0 0deg / 0.09));
12
- --oc-glass-edge: light-dark(oklch(100% 0 0deg / 0.85), oklch(100% 0 0deg / 0.11));
13
- --oc-glass-edge-hi: light-dark(oklch(100% 0 0deg / 1), oklch(100% 0 0deg / 0.16));
13
+ --oc-glass-sheet: light-dark(oklch(100% 0 0deg / 0.12), oklch(from var(--oc-background) l c h / 0.2));
14
+ /* Light falloff from top to bottom (only the frosted variant uses it). */
15
+ --oc-glass-sheen: light-dark(oklch(100% 0 0deg / 0.12), oklch(100% 0 0deg / 0.04));
16
+ /* Light caught inside the edge all round, as in a thick clear lens. */
17
+ --oc-glass-glow: light-dark(oklch(100% 0 0deg / 0.18), oklch(100% 0 0deg / 0.08));
18
+ --oc-glass-panel: light-dark(oklch(100% 0 0deg / 0.12), oklch(100% 0 0deg / 0.05));
19
+ --oc-glass-panel-strong: light-dark(oklch(100% 0 0deg / 0.4), oklch(100% 0 0deg / 0.1));
20
+ --oc-glass-edge: light-dark(oklch(100% 0 0deg / 0.35), oklch(100% 0 0deg / 0.2));
21
+ /* The bright line just inside the top edge, and its weaker return along the bottom. */
22
+ --oc-glass-edge-hi: light-dark(oklch(100% 0 0deg / 0.65), oklch(100% 0 0deg / 0.35));
23
+ --oc-glass-edge-low: light-dark(oklch(100% 0 0deg / 0.2), oklch(100% 0 0deg / 0.1));
14
24
  --oc-glass-hairline: light-dark(oklch(from var(--oc-foreground) l c h / 0.1), oklch(100% 0 0deg / 0.08));
15
- --oc-glass-shadow: 0 24px 60px -20px light-dark(oklch(25% 0.06 255deg / 0.35), oklch(0% 0 0deg / 0.7));
16
- --oc-glass-panel-shadow: 0 8px 24px -16px light-dark(oklch(25% 0.06 255deg / 0.25), oklch(0% 0 0deg / 0.6));
17
- --oc-glass-blur: 28px;
18
- --oc-glass-radius: 18px;
19
- --oc-glass-panel-radius: 14px;
25
+ --oc-glass-shadow: 0 10px 30px -10px light-dark(oklch(20% 0.04 260deg / 0.35), oklch(0% 0 0deg / 0.55));
26
+ --oc-glass-panel-shadow: 0 6px 14px -8px light-dark(oklch(20% 0.04 260deg / 0.3), oklch(0% 0 0deg / 0.5));
27
+ /* Frosted glass (no lens): the blur. With the lens the backdrop only gets --oc-glass-lens-blur. */
28
+ --oc-glass-blur: 12px;
29
+ --oc-glass-lens-blur: 2px;
30
+ --oc-glass-radius: 28px;
31
+ --oc-glass-panel-radius: 16px;
32
+ /* Text on glass. The backdrop shows through, so the page's muted grey is too light there: muted text on a sheet is
33
+ closer to the foreground (4.5:1 over the light landscape and the photo in the demos, light and dark). */
34
+ --oc-glass-fg: var(--oc-foreground);
35
+ --oc-glass-fg-muted: light-dark(color-mix(in oklch, var(--oc-foreground) 70%, var(--oc-muted-foreground)), color-mix(in oklch, var(--oc-foreground) 55%, var(--oc-muted-foreground)));
20
36
  }
21
37
 
22
38
  /* Sheet: the outer glass surface (a widget, a floating panel, a dialog over a photo).
23
- The blur and tint sit on a ::after layer behind the content, not on the sheet itself: an element with
24
- backdrop-filter becomes the containing block of position: fixed children, so a tooltip inside would be trapped
25
- on the sheet instead of next to its anchor. */
39
+ The fill, the light and the filter sit on a ::after layer behind the content, not on the sheet itself: an element
40
+ with backdrop-filter becomes the containing block of position: fixed children, so a tooltip inside would be trapped
41
+ on the sheet. It also keeps the drop shadow off the filtered layer: in Chrome an outer shadow on the element with
42
+ the lens shifts the displacement map and breaks the glass. So the sheet carries the shadow, the ::after the lens. */
26
43
  .oc-glass {
27
44
  position: relative;
28
45
  isolation: isolate;
29
- color: var(--oc-foreground);
46
+ color: var(--oc-glass-fg);
30
47
  border: 1px solid var(--oc-glass-edge);
31
48
  border-radius: var(--oc-glass-radius);
32
49
  box-shadow: var(--oc-glass-shadow);
33
50
  /* OmniaUI cards inside become glass panels too. */
34
51
  --oc-card-background: var(--oc-glass-panel);
35
52
  --oc-card-border: var(--oc-glass-edge);
53
+ /* Muted text inside (meta, hints, a status line) takes the glass muted colour; --text-soft is the soft paragraph
54
+ colour of the OmniaCSS docs shell. */
55
+ --oc-muted-foreground: var(--oc-glass-fg-muted);
56
+ --text-soft: var(--oc-glass-fg-muted);
36
57
  }
58
+ /* The glass: a see-through fill and only inset light for the thickness (a bright line inside the top edge, a weaker
59
+ one along the bottom, a soft glow all round). Frosted by default; the lens below replaces the blur in Chromium. */
37
60
  .oc-glass::after {
38
61
  content: "";
39
62
  position: absolute;
@@ -41,49 +64,76 @@
41
64
  z-index: -1;
42
65
  border-radius: inherit;
43
66
  background: var(--oc-glass-sheet);
44
- box-shadow: inset 0 1px 0 var(--oc-glass-edge-hi);
45
- backdrop-filter: blur(var(--oc-glass-blur)) saturate(1.5);
67
+ box-shadow:
68
+ inset 0 1.5px 0 var(--oc-glass-edge-hi),
69
+ inset 0 -1px 0 var(--oc-glass-edge-low),
70
+ inset 0 0 22px var(--oc-glass-glow);
71
+ backdrop-filter: blur(var(--oc-glass-blur)) saturate(160%);
46
72
  pointer-events: none;
47
73
  }
74
+ /* Lens (glass-lens.js, Chromium only): the script builds an SVG filter with a displacement map the exact size of the
75
+ sheet and sets --oc-glass-lens: url(#oc-lens-WxH) and data-oc-lens. The middle of the map is neutral, so only the
76
+ edge bends what is behind it; the backdrop stays almost sharp. Other browsers (html.oc-no-lens) keep frosted glass. */
77
+ :is(.oc-glass, .oc-glass-bar)[data-oc-lens]::after {
78
+ backdrop-filter: var(--oc-glass-lens) blur(var(--oc-glass-lens-blur)) saturate(160%);
79
+ }
80
+ .oc-no-lens :is(.oc-glass, .oc-glass-bar)[data-oc-lens]::after { backdrop-filter: blur(var(--oc-glass-blur)) saturate(160%); }
81
+ .oc-lens-defs { position: absolute; inline-size: 0; block-size: 0; overflow: hidden; pointer-events: none; }
48
82
 
49
- /* Panel: a lighter layer inside a sheet (a group of settings, a meter, a list). */
83
+ /* Panel: a layer inside a sheet (a group of settings, a meter, a list): a second, lighter pane of glass with its own
84
+ light on the edge. Lighter than the sheet, never denser. */
50
85
  .oc-glass-panel {
51
86
  position: relative;
52
87
  background: var(--oc-glass-panel);
53
88
  border: 1px solid var(--oc-glass-edge);
54
89
  border-radius: var(--oc-glass-panel-radius);
55
- box-shadow: var(--oc-glass-panel-shadow), inset 0 1px 0 var(--oc-glass-edge-hi);
90
+ box-shadow: var(--oc-glass-panel-shadow), inset 0 1px 0 var(--oc-glass-edge-hi), inset 0 0 8px var(--oc-glass-glow);
56
91
  }
57
92
  .oc-glass .oc-card {
58
93
  border-radius: var(--oc-glass-panel-radius);
59
- box-shadow: var(--oc-glass-panel-shadow), inset 0 1px 0 var(--oc-glass-edge-hi);
94
+ box-shadow: var(--oc-glass-panel-shadow), inset 0 1px 0 var(--oc-glass-edge-hi), inset 0 0 8px var(--oc-glass-glow);
60
95
  }
61
96
 
62
- /* Strong: more opaque, for text-heavy panels or a hovered row. */
63
- .oc-glass--strong::after,
97
+ /* Strong: more opaque, for text-heavy sheets and panels or a hovered row. */
98
+ .oc-glass.oc-glass--strong { --oc-glass-sheet: light-dark(oklch(100% 0 0deg / 0.62), oklch(from var(--oc-background) l c h / 0.66)); }
64
99
  .oc-glass-panel--strong { background: var(--oc-glass-panel-strong); }
65
100
 
66
- /* Flat: a frameless desktop window where the OS draws the blur (acrylic, vibrancy): no own blur, no drop shadow. */
101
+ /* Flat: a frameless desktop window where the OS draws the blur (acrylic, vibrancy): no own blur, no lens, no drop shadow. */
67
102
  .oc-glass--flat { border-radius: 8px; box-shadow: none; }
68
- .oc-glass--flat::after { backdrop-filter: none; }
103
+ .oc-glass.oc-glass--flat::after { backdrop-filter: none; }
69
104
 
70
105
  /* Hairline divider in glass (sections, header). */
71
106
  .oc-glass-divider { block-size: 1px; margin: 0; border: 0; background: var(--oc-glass-hairline); }
72
107
 
73
- /* People who ask for less transparency get solid surfaces. */
108
+ /* People who ask for less transparency get solid surfaces (also with --clear or --frost, and with the lens). */
74
109
  @media (prefers-reduced-transparency: reduce) {
75
- :root {
110
+ :root,
111
+ .oc-glass.oc-glass--clear,
112
+ .oc-glass.oc-glass--frost,
113
+ .oc-glass.oc-glass--strong {
76
114
  --oc-glass-sheet: var(--oc-background);
77
115
  --oc-glass-panel: var(--oc-card);
78
116
  --oc-glass-panel-strong: var(--oc-muted);
79
117
  }
80
- .oc-glass::after { backdrop-filter: none; }
118
+ .oc-glass::after,
119
+ :is(.oc-glass, .oc-glass-bar)[data-oc-lens]::after { backdrop-filter: none; background-image: none; }
120
+ }
121
+ /* No backdrop-filter (older browsers, some embedded web views): an unblurred see-through sheet is unreadable, so the
122
+ tint turns nearly solid. */
123
+ @supports not (backdrop-filter: blur(1px)) {
124
+ :root,
125
+ .oc-glass.oc-glass--clear,
126
+ .oc-glass.oc-glass--frost,
127
+ .oc-glass.oc-glass--strong {
128
+ --oc-glass-sheet: light-dark(oklch(from var(--oc-background) l c h / 0.85), oklch(from var(--oc-background) l c h / 0.9));
129
+ }
81
130
  }
82
- /* Firefox has no "backdrop root" yet: the filter on the ::after lens only sees the inside of the isolated sheet, so
83
- nothing would be blurred. There the filter sits on the sheet itself (a position: fixed child is then placed
84
- relative to the sheet; popovers, dialogs and anchored tooltips in the top layer are not affected). */
131
+ /* Firefox has no "backdrop root" yet: the filter on the ::after only sees the inside of the isolated sheet, so nothing
132
+ would be blurred. There the (frosted) filter sits on the sheet itself (a position: fixed child is then placed
133
+ relative to the sheet; popovers, dialogs and anchored tooltips in the top layer are not affected). No lens there. */
85
134
  @supports (-moz-appearance: none) {
86
- .oc-glass { backdrop-filter: blur(var(--oc-glass-blur)) saturate(1.5); }
135
+ .oc-glass { backdrop-filter: blur(var(--oc-glass-blur)) saturate(160%); }
87
136
  .oc-glass::after { backdrop-filter: none; }
137
+ .oc-glass--flat { backdrop-filter: none; }
88
138
  @media (prefers-reduced-transparency: reduce) { .oc-glass { backdrop-filter: none; } }
89
139
  }
@@ -0,0 +1,51 @@
1
+ /* File: packages/ui/src/parts/media-scrim.css | Map: child layer (.oc-scrim) and host pseudo (.oc-has-scrim::after)
2
+ -> sides (bottom default, top, start, end, full) -> dark -> content above the scrim -> rtl */
3
+ /* Scrim (0.17.0): a calm fade over a picture, so text on top of it stays readable. From the scrim color at one edge to
4
+ transparent. Two ways, same modifiers:
5
+ - a child element: <span class="oc-scrim oc-scrim--bottom" aria-hidden="true"></span> inside a positioned element
6
+ with an image (the element needs position: relative);
7
+ - no extra element: .oc-has-scrim on that element draws the scrim as ::after.
8
+ Text that sits on the scrim gets .oc-scrim-content (position: relative; z-index 2).
9
+ Tokens (set them on the element, a parent or :root): --oc-scrim-color (default the page background,
10
+ .oc-scrim--dark = near black), --oc-scrim-strength (opacity at the edge, 0 to 1, default 0.85), --oc-scrim-size (how
11
+ far the fade reaches, default 60%). Hero media uses the same tokens for its own scrim. No glow, no color blend. */
12
+
13
+ .oc-scrim,
14
+ .oc-has-scrim::after {
15
+ --_oc-scrim-c: var(--oc-scrim-color, var(--oc-background));
16
+ --_oc-scrim-s: var(--oc-scrim-strength, 0.85);
17
+ --_oc-scrim-l: var(--oc-scrim-size, 60%);
18
+ position: absolute;
19
+ inset: 0;
20
+ z-index: 1;
21
+ pointer-events: none;
22
+ border-radius: inherit;
23
+ background: linear-gradient(
24
+ var(--_oc-scrim-dir, to top),
25
+ color-mix(in oklab, var(--_oc-scrim-c) calc(var(--_oc-scrim-s) * 100%), transparent) 0%,
26
+ color-mix(in oklab, var(--_oc-scrim-c) calc(var(--_oc-scrim-s) * 55%), transparent) calc(var(--_oc-scrim-l) * 0.55),
27
+ transparent var(--_oc-scrim-l)
28
+ );
29
+ }
30
+ .oc-has-scrim { position: relative; isolation: isolate; }
31
+ .oc-has-scrim::after { content: ""; }
32
+
33
+ /* Dark: a near-black scrim for light text, in light and dark mode. */
34
+ .oc-scrim--dark { --oc-scrim-color: oklch(14% 0.01 260deg); }
35
+
36
+ /* Sides: where the scrim is strongest. Bottom is the default. */
37
+ .oc-scrim--top { --_oc-scrim-dir: to bottom; }
38
+ .oc-scrim--start { --_oc-scrim-dir: to right; }
39
+ .oc-scrim--end { --_oc-scrim-dir: to left; }
40
+ .oc-scrim--start:dir(rtl) { --_oc-scrim-dir: to left; }
41
+ .oc-scrim--end:dir(rtl) { --_oc-scrim-dir: to right; }
42
+
43
+ /* Full: one even layer over the whole picture. */
44
+ .oc-scrim.oc-scrim--full,
45
+ .oc-has-scrim.oc-scrim--full::after {
46
+ background: color-mix(in oklab, var(--_oc-scrim-c) calc(var(--_oc-scrim-s) * 75%), transparent);
47
+ }
48
+
49
+ /* Text on top of the scrim. Position relative by default; a position utility (absolute) on the same element wins. */
50
+ :where(.oc-scrim-content) { position: relative; }
51
+ .oc-scrim-content { z-index: 2; }
@@ -20,11 +20,17 @@
20
20
  .oc-topbar-nav { min-inline-size: 0; }
21
21
  .oc-topbar-actions .oc-btn { white-space: nowrap; }
22
22
 
23
- /* Centred menu: brand left, menu in the middle, actions right (from 761px; smaller screens keep the burger). */
23
+ /* Centred menu: brand left, menu in the middle, actions right (from 761px; smaller screens keep the burger).
24
+ Brand and actions share the free room equally (flex: 1 1 0), so the menu sits in the true middle. A --collapsible bar
25
+ follows its own width (container oc-topbar, docs-ui.css) instead of the screen: in a narrow card or preview it folds
26
+ into the burger like any other bar, with the button at the end. */
24
27
  @media (min-width: 761px) {
25
- .oc-topbar--center { display: grid; grid-template-columns: 1fr auto 1fr; }
26
- .oc-topbar--center .oc-topbar-brand { justify-self: start; }
27
- .oc-topbar--center .oc-topbar-actions { justify-self: end; }
28
+ .oc-topbar--center:not(.oc-topbar--collapsible) > :is(.oc-topbar-brand, .oc-topbar-actions) { flex: 1 1 0; }
29
+ .oc-topbar--center:not(.oc-topbar--collapsible) > .oc-topbar-actions { justify-content: flex-end; }
30
+ }
31
+ @container oc-topbar (min-width: 47.5625rem) {
32
+ .oc-topbar--center > :is(.oc-topbar-brand, .oc-topbar-actions) { flex: 1 1 0; }
33
+ .oc-topbar--center > .oc-topbar-actions { justify-content: flex-end; }
28
34
  }
29
35
 
30
36
  /* Plain links: no pill frames, the current page underlined. */
@@ -92,5 +98,7 @@
92
98
  .oc-footerbar-links a { color: var(--oc-muted-foreground); text-decoration: none; }
93
99
  .oc-footerbar-links a:hover { color: var(--oc-foreground); }
94
100
  .oc-footerbar.oc-footerbar--dark { color: oklch(from var(--color-white-50) l c h / 0.7); background: var(--oc-dark-band, var(--color-duskblue-95)); border-block-start-color: transparent; }
101
+ /* On a dark page the dark band is about as dark as the page: a light hairline on top marks where the footer starts. */
102
+ .oc-footerbar.oc-footerbar--dark { border-block-start-color: light-dark(transparent, oklch(from var(--color-white-50) l c h / 0.16)); }
95
103
  .oc-footerbar--dark :is(a, .oc-footerbar-links a) { color: oklch(from var(--color-white-50) l c h / 0.85); }
96
104
  .oc-footerbar--dark .oc-footerbar-links a:hover { color: var(--color-white-50); }
@@ -7,23 +7,58 @@
7
7
  .oc-site-header__brand { white-space: nowrap; flex: none; }
8
8
  .oc-site-header__nav > :is(a, button):not(.oc-btn) { white-space: nowrap; }
9
9
 
10
+ /* Folded menu with an actions slot: the actions sit right, next to the menu button (button last), instead of the button
11
+ in the middle and the actions pushed out of a pill. On a phone the bar gets tighter and the brand drops its tile,
12
+ so a call to action such as "Get started" stays visible. */
13
+ @media (max-width: 860px) {
14
+ .oc-site-header:where(:not(.oc-site-header--container)) .oc-site-header__inner:has(> .oc-site-header__actions) > .oc-site-header__actions { margin-inline-start: auto; }
15
+ .oc-site-header:where(:not(.oc-site-header--container)) .oc-site-header__inner:has(> .oc-site-header__actions) > .oc-site-header__toggle { order: 2; }
16
+ }
17
+ @container oc-site-header (max-width: 53.75rem) {
18
+ .oc-site-header--container .oc-site-header__inner:has(> .oc-site-header__actions) > .oc-site-header__actions { margin-inline-start: auto; }
19
+ .oc-site-header--container .oc-site-header__inner:has(> .oc-site-header__actions) > .oc-site-header__toggle { order: 2; }
20
+ }
21
+ @media (max-width: 28rem) {
22
+ .oc-site-header:where(:not(.oc-site-header--container)) .oc-site-header__inner:has(> .oc-site-header__actions) { gap: 0.3rem; }
23
+ .oc-site-header:where(:not(.oc-site-header--container)) .oc-site-header__inner:has(> .oc-site-header__actions) > .oc-site-header__brand { gap: 0.45rem; font-size: 1.05rem; }
24
+ .oc-site-header:where(:not(.oc-site-header--container)) .oc-site-header__inner:has(> .oc-site-header__actions) > .oc-site-header__brand > .oc-icon-tile { display: none; }
25
+ .oc-site-header:where(:not(.oc-site-header--container)) .oc-site-header__inner:has(> .oc-site-header__actions) > .oc-site-header__toggle { padding: 0.4rem 0.55rem; }
26
+ .oc-site-header--glass:not(.oc-site-header--container) .oc-site-header__inner { padding-inline: 0.9rem 0.45rem; }
27
+ }
28
+ @container oc-site-header (max-width: 26rem) {
29
+ .oc-site-header--container .oc-site-header__inner:has(> .oc-site-header__actions) { gap: 0.3rem; }
30
+ .oc-site-header--container .oc-site-header__inner:has(> .oc-site-header__actions) > .oc-site-header__brand { gap: 0.45rem; font-size: 1.05rem; }
31
+ .oc-site-header--container .oc-site-header__inner:has(> .oc-site-header__actions) > .oc-site-header__brand > .oc-icon-tile { display: none; }
32
+ .oc-site-header--container .oc-site-header__inner:has(> .oc-site-header__actions) > .oc-site-header__toggle { padding: 0.4rem 0.55rem; }
33
+ .oc-site-header--glass.oc-site-header--container .oc-site-header__inner { padding-inline: 0.9rem 0.45rem; }
34
+ }
35
+
10
36
  /* Centred menu: brand left, menu in the middle, actions right. */
11
37
  @media (min-width: 861px) {
12
- .oc-site-header--center .oc-site-header__inner { display: grid; grid-template-columns: 1fr auto 1fr; }
13
- .oc-site-header--center .oc-site-header__brand { justify-self: start; }
14
- .oc-site-header--center .oc-site-header__actions { justify-self: end; }
38
+ .oc-site-header--center:where(:not(.oc-site-header--container)) .oc-site-header__inner { display: grid; grid-template-columns: 1fr auto 1fr; }
39
+ .oc-site-header--center:where(:not(.oc-site-header--container)) .oc-site-header__brand { justify-self: start; }
40
+ .oc-site-header--center:where(:not(.oc-site-header--container)) .oc-site-header__actions { justify-self: end; }
41
+ }
42
+ /* With .oc-site-header--container: at the width of the header itself (container query in showcase.css). */
43
+ @container oc-site-header (min-width: 53.8125rem) {
44
+ .oc-site-header--center.oc-site-header--container .oc-site-header__inner { display: grid; grid-template-columns: 1fr auto 1fr; }
45
+ .oc-site-header--center.oc-site-header--container .oc-site-header__brand { justify-self: start; }
46
+ .oc-site-header--center.oc-site-header--container .oc-site-header__actions { justify-self: end; }
15
47
  }
16
48
 
17
- /* Dark: a solid dark bar with light text. */
49
+ /* Dark: a solid dark bar with light text. The faint edge keeps the bar visible on a dark page. */
18
50
  .oc-site-header--dark {
19
51
  --oc-header-glass: 0;
20
52
  animation: none;
21
53
  backdrop-filter: none;
22
54
  color: var(--color-white-50);
23
55
  background: var(--oc-dark-band, var(--color-duskblue-95));
56
+ border: 1px solid oklch(from var(--color-white-50) l c h / 0.12);
24
57
  }
25
58
  .oc-site-header--dark :is(.oc-site-header__brand, .oc-site-header__nav a[aria-current="page"], .oc-site-header__nav a:not(.oc-btn):hover) { color: var(--color-white-50); }
26
59
  .oc-site-header--dark .oc-site-header__nav a:not(.oc-btn) { color: oklch(from var(--color-white-50) l c h / 0.72); }
60
+ /* The menu button is light on the dark bar (also in the light theme). */
61
+ .oc-site-header--dark .oc-site-header__toggle { color: var(--color-white-50); background: oklch(from var(--color-white-50) l c h / 0.08); border-color: oklch(from var(--color-white-50) l c h / 0.24); }
27
62
 
28
63
  /* Floating: the bar as a rounded card with room around it. */
29
64
  /* No backdrop-filter on the bar itself: it would cut the backdrop of the glass inside it. */
@@ -73,3 +108,4 @@
73
108
  .oc-site-footer__signup { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-block-start: 1.25rem; max-inline-size: 24rem; }
74
109
  .oc-site-footer__signup .oc-input { flex: 1 1 12rem; min-inline-size: 0; }
75
110
  .oc-site-footer--dark .oc-site-footer__signup .oc-input { color: var(--color-white-50); background: oklch(from var(--color-white-50) l c h / 0.08); border-color: oklch(from var(--color-white-50) l c h / 0.2); }
111
+ .oc-site-footer--dark .oc-site-footer__signup .oc-input::placeholder { color: oklch(from var(--color-white-50) l c h / 0.62); opacity: 1; }
@@ -0,0 +1,88 @@
1
+ /* File: packages/ui/src/parts/site-hero-media.css */
2
+ /* Map: hero with background media -> media layer (video / img, object-fit cover) -> scrim (start / end / full, phone =
3
+ full) -> content in the container (start / center / end) -> reduced motion */
4
+ /* A hero over the full width with a video or a photo behind the text. The media fills the section (object-fit: cover)
5
+ and the text sits in the page container on top of it. The section is dark (color-scheme: dark), so the text, the
6
+ lead and the buttons take their dark-mode colors. A scrim keeps the text readable (WCAG AA): --scrim-start darkens
7
+ the side where the text starts, --scrim-end the other side, --scrim the whole picture. Below 48rem the text covers
8
+ the full width, so a start/end scrim becomes a full one. Tune: --oc-hero-media-scrim (the dark color),
9
+ --oc-hero-media-min (height), --oc-hero-media-bg (color while the media loads), --oc-hero-media-measure (text width).
10
+ Reduced motion: put the video source in <source media="(prefers-reduced-motion: no-preference)">; no source matches
11
+ then and only the poster shows. The components do this for you. */
12
+
13
+ .oc-hero-media {
14
+ /* Same strength and fade tokens as the scrim component (media-scrim.css): --oc-scrim-strength and --oc-scrim-size tune
15
+ this scrim too. The color stays dark (the text on it is light): --oc-hero-media-scrim-color. */
16
+ --oc-hero-media-scrim: color-mix(in oklab, var(--oc-hero-media-scrim-color, oklch(14% 0.01 260deg)) calc(var(--oc-scrim-strength, 0.82) * 100%), transparent);
17
+ --oc-hero-media-scrim-soft: color-mix(in oklab, var(--oc-hero-media-scrim-color, oklch(14% 0.01 260deg)) calc(var(--oc-scrim-strength, 0.82) * 62%), transparent);
18
+ /* Where the text column starts and how wide it is, measured on the gradient line (100% = the width of the hero).
19
+ The start / end scrim stays solid under the text and only then fades out, also when the hero is narrow. */
20
+ --_oc-hero-media-x: max(var(--oc-container-gutter, 1.25rem), (100% - var(--oc-container, 1200px)) / 2);
21
+ --_oc-hero-media-w: min(var(--oc-hero-media-measure, 40rem), 100% - 2 * var(--oc-container-gutter, 1.25rem));
22
+ position: relative;
23
+ isolation: isolate;
24
+ overflow: hidden;
25
+ display: grid;
26
+ align-items: center;
27
+ min-block-size: var(--oc-hero-media-min, clamp(26rem, 72vh, 46rem));
28
+ color-scheme: dark;
29
+ background: var(--oc-hero-media-bg, oklch(22% 0.02 260deg));
30
+ /* Secondary text (the lead) sits on a photo, not on a dark surface: the dark-mode muted tone (a soft lavender) drops
31
+ under AA on a warm, mid-dark picture. A near-white grey keeps it at AA or better over the scrim. */
32
+ --oc-muted-foreground: var(--oc-hero-media-muted, oklch(90% 0.01 260deg));
33
+ color: var(--oc-foreground);
34
+ }
35
+ .oc-hero-media__media {
36
+ position: absolute;
37
+ inset: 0;
38
+ z-index: 0;
39
+ display: block;
40
+ inline-size: 100%;
41
+ block-size: 100%;
42
+ object-fit: cover;
43
+ object-position: var(--oc-hero-media-position, center);
44
+ border: 0;
45
+ }
46
+ .oc-hero-media::before {
47
+ content: "";
48
+ position: absolute;
49
+ inset: 0;
50
+ z-index: 1;
51
+ pointer-events: none;
52
+ }
53
+ .oc-hero-media--scrim::before { background: var(--oc-hero-media-scrim-full, color-mix(in oklab, var(--oc-hero-media-scrim-color, oklch(14% 0.01 260deg)) calc(var(--oc-scrim-strength, 0.82) * 78%), transparent)); }
54
+ .oc-hero-media--scrim-start::before {
55
+ background: linear-gradient(to right, var(--oc-hero-media-scrim) 0%, var(--oc-hero-media-scrim) calc(var(--_oc-hero-media-x) + var(--_oc-hero-media-w) * 0.85), var(--oc-hero-media-scrim-soft) calc(var(--_oc-hero-media-x) + var(--_oc-hero-media-w) + 4rem), transparent calc(var(--_oc-hero-media-x) + var(--_oc-hero-media-w) + var(--oc-scrim-size, 14rem)));
56
+ }
57
+ .oc-hero-media--scrim-end::before {
58
+ background: linear-gradient(to left, var(--oc-hero-media-scrim) 0%, var(--oc-hero-media-scrim) calc(var(--_oc-hero-media-x) + var(--_oc-hero-media-w) * 0.85), var(--oc-hero-media-scrim-soft) calc(var(--_oc-hero-media-x) + var(--_oc-hero-media-w) + 4rem), transparent calc(var(--_oc-hero-media-x) + var(--_oc-hero-media-w) + var(--oc-scrim-size, 14rem)));
59
+ }
60
+ .oc-hero-media--scrim-start:dir(rtl)::before {
61
+ background: linear-gradient(to left, var(--oc-hero-media-scrim) 0%, var(--oc-hero-media-scrim) calc(var(--_oc-hero-media-x) + var(--_oc-hero-media-w) * 0.85), var(--oc-hero-media-scrim-soft) calc(var(--_oc-hero-media-x) + var(--_oc-hero-media-w) + 4rem), transparent calc(var(--_oc-hero-media-x) + var(--_oc-hero-media-w) + var(--oc-scrim-size, 14rem)));
62
+ }
63
+ .oc-hero-media--scrim-end:dir(rtl)::before {
64
+ background: linear-gradient(to right, var(--oc-hero-media-scrim) 0%, var(--oc-hero-media-scrim) calc(var(--_oc-hero-media-x) + var(--_oc-hero-media-w) * 0.85), var(--oc-hero-media-scrim-soft) calc(var(--_oc-hero-media-x) + var(--_oc-hero-media-w) + 4rem), transparent calc(var(--_oc-hero-media-x) + var(--_oc-hero-media-w) + var(--oc-scrim-size, 14rem)));
65
+ }
66
+ .oc-hero-media__content {
67
+ position: relative;
68
+ z-index: 2;
69
+ display: grid;
70
+ justify-items: start;
71
+ align-content: center;
72
+ inline-size: min(100% - 2 * var(--oc-container-gutter, 1.25rem), var(--oc-container, 1200px));
73
+ margin-inline: auto;
74
+ padding-block: var(--oc-hero-media-pad, clamp(4rem, 10vw, 7rem));
75
+ }
76
+ .oc-hero-media__content > * { max-inline-size: var(--oc-hero-media-measure, 40rem); }
77
+ .oc-hero-media--center .oc-hero-media__content { justify-items: center; text-align: center; }
78
+ .oc-hero-media--center .oc-actions { justify-content: center; }
79
+ .oc-hero-media--end .oc-hero-media__content { justify-items: end; }
80
+
81
+ /* Phone: the text spans the width, so the whole picture gets the scrim. */
82
+ @media (max-width: 48rem) {
83
+ .oc-hero-media:is(.oc-hero-media--scrim-start, .oc-hero-media--scrim-end)::before {
84
+ background: var(--oc-hero-media-scrim-full, color-mix(in oklab, var(--oc-hero-media-scrim-color, oklch(14% 0.01 260deg)) calc(var(--oc-scrim-strength, 0.82) * 78%), transparent));
85
+ }
86
+ .oc-hero-media--end .oc-hero-media__content { justify-items: start; }
87
+ }
88
+
@@ -52,7 +52,9 @@
52
52
  .oc-price-card:has(.oc-price-card__toggle input:is([value="yearly"], [value="lifetime"]):checked) .oc-price-card__price--monthly,
53
53
  .oc-price-card:has(.oc-price-card__toggle input[value="lifetime"]:checked) .oc-price-card__price--yearly { display: none; }
54
54
 
55
- .oc-price-card__amount { font-size: 2.5rem; font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
55
+ /* The amount always in the foreground color: it is the main fact of the card (a muted paragraph color around it, from
56
+ a docs or prose style, would make it the weakest text on the card). */
57
+ .oc-price-card__amount { color: var(--oc-foreground); font-size: 2.5rem; font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
56
58
  .oc-price-card__period { color: var(--oc-muted-foreground); font-size: 0.9rem; }
57
59
  /* Old price, struck through. */
58
60
  .oc-price-card__was { color: var(--oc-muted-foreground); font-size: 0.95rem; }
@@ -0,0 +1,11 @@
1
+ /* File: packages/ui/src/parts/site-split-reverse.css */
2
+ /* Map: split reverse -> columns swapped (rtl grid, ltr content) -> right-to-left pages */
3
+ /* .oc-split--reverse swaps the columns of a split (the media on the other side) without changing the order in the
4
+ HTML, so screen readers and keyboard users still meet the text first. The column ratio of --lead / --media follows
5
+ its content. On one column (a phone) nothing changes. */
6
+
7
+ .oc-split--reverse { direction: rtl; }
8
+ .oc-split--reverse > * { direction: ltr; }
9
+ /* On a right-to-left page the reverse is the left-to-right grid. */
10
+ .oc-split--reverse:dir(rtl) { direction: ltr; }
11
+ .oc-split--reverse:dir(rtl) > * { direction: rtl; }
@@ -115,12 +115,13 @@
115
115
  100% { translate: 0 0; opacity: 1; }
116
116
  }
117
117
 
118
- /* Corner art: a large outline webicon (mdi-light or material-symbols ...-outline), half outside the bottom corner.
118
+ /* Corner art: a large outline webicon (mdi-light or material-symbols ...-outline) in the bottom corner, only its edge
119
+ tucked under the card border (most of the shape stays readable).
119
120
  It drifts slowly (transform); hover tilts and grows it (rotate, scale), so the two never fight. */
120
121
  .oc-tint-card__art {
121
122
  position: absolute;
122
- inset-block-end: -1rem;
123
- inset-inline-end: -0.75rem;
123
+ inset-block-end: -0.35rem;
124
+ inset-inline-end: -0.25rem;
124
125
  z-index: -1;
125
126
  display: block;
126
127
  color: var(--oc-tint);
@@ -174,7 +175,7 @@
174
175
 
175
176
  /* On a phone the cards are low and wide: the icon stays small there and only grows from 40rem (in a card of 16rem+). */
176
177
  @media (min-width: 40rem) {
177
- .oc-tint-card__art { inset-block-end: -1.5rem; inset-inline-end: -1.5rem; font-size: 7rem; }
178
+ .oc-tint-card__art { inset-block-end: -0.75rem; inset-inline-end: -0.75rem; font-size: 7rem; }
178
179
  @container (min-width: 16rem) {
179
180
  .oc-tint-card__art { font-size: 9rem; }
180
181
  }
@@ -5,7 +5,9 @@
5
5
  .oc-hover-grow grows a little in place (--oc-hover-scale, 1.02)
6
6
  .oc-hover-glow stays in place, with a glow in the accent color
7
7
  .oc-hover-none no movement (also turns off the default lift of a product or price card)
8
- They share one smooth curve: --oc-hover-duration (0.45s) and --oc-hover-ease. This file loads after the cards, so the class wins. */
8
+ They share one smooth curve: --oc-hover-duration (0.45s), --oc-hover-ease and --oc-hover-delay (0s). A product card
9
+ starts its lift a moment later and more gently (0.3s ease after 0.08s), so it never jumps up the instant the mouse
10
+ passes. This file loads after the cards, so the class wins. */
9
11
 
10
12
  :is(.oc-hover-lift, .oc-hover-grow, .oc-hover-glow, .oc-product-card) {
11
13
  transition:
@@ -14,9 +16,10 @@
14
16
  box-shadow var(--oc-hover-duration, 0.45s) var(--oc-hover-ease, cubic-bezier(0.22, 1, 0.36, 1)),
15
17
  /* The colors follow the same curve as the lift, so the glow and the border do not lag behind the movement. */
16
18
  border-color var(--oc-hover-duration, 0.45s) var(--oc-hover-ease, cubic-bezier(0.22, 1, 0.36, 1)),
17
- background-color var(--oc-hover-duration, 0.45s) var(--oc-hover-ease, cubic-bezier(0.22, 1, 0.36, 1)),
18
- --oc-glow var(--oc-hover-duration, 0.45s) var(--oc-hover-ease, cubic-bezier(0.22, 1, 0.36, 1));
19
+ background-color var(--oc-hover-duration, 0.45s) var(--oc-hover-ease, cubic-bezier(0.22, 1, 0.36, 1));
20
+ transition-delay: var(--oc-hover-delay, 0s);
19
21
  }
22
+ :where(.oc-product-card) { --oc-hover-duration: 0.3s; --oc-hover-ease: ease; --oc-hover-delay: 0.08s; }
20
23
  .oc-product-card:hover { translate: 0 calc(-1 * var(--oc-hover-lift, 6px)); }
21
24
  .oc-hover-lift:hover {
22
25
  translate: 0 calc(-1 * var(--oc-hover-lift, 6px));