@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
@@ -39,7 +39,8 @@
39
39
  }
40
40
 
41
41
  /* The icon of the chosen value inside the field, at the same start as the option icons in the list (list border 1px +
42
- padding 4px + option padding 0.625rem), and the text of the field at the start of the option labels. */
42
+ padding 4px + option padding 0.625rem), and the text of the field at the start of the option labels. An icon slot that is
43
+ still empty (nothing chosen yet, or a value without an icon) takes no room, so the placeholder starts at the edge. */
43
44
  .oc-combobox-icon {
44
45
  position: absolute;
45
46
  inset-block: 0;
@@ -47,7 +48,7 @@
47
48
  block-size: auto;
48
49
  pointer-events: none;
49
50
  }
50
- .oc-combobox:has(> .oc-combobox-icon) > .oc-combobox-input {
51
+ .oc-combobox:has(> .oc-combobox-icon:not(:empty)) > .oc-combobox-input {
51
52
  padding-inline-start: calc(4px + 0.625rem + var(--oc-combobox-icon) + 0.5rem);
52
53
  }
53
54
 
@@ -71,6 +72,43 @@
71
72
  padding-inline-start: calc(10px + 1rem + 8px);
72
73
  }
73
74
 
75
+ /* Two-line item (0.17.0): the label with a muted description under it (.oc-dropdown-text > .oc-dropdown-desc), for a
76
+ menu that explains each choice ("New stop": the kind and what it does). The description may wrap. */
77
+ .oc-dropdown-text {
78
+ display: grid;
79
+ flex: 1 1 auto;
80
+ gap: 1px;
81
+ min-inline-size: 0;
82
+ text-align: start;
83
+ }
84
+ .oc-dropdown-desc {
85
+ font-size: 0.75rem;
86
+ line-height: 1.35;
87
+ color: var(--oc-muted-foreground);
88
+ white-space: normal;
89
+ }
90
+ .oc-dropdown-menu:has(.oc-dropdown-desc) { max-inline-size: min(22rem, calc(100vw - 2rem)); }
91
+ .oc-dropdown-item:has(> .oc-dropdown-text > .oc-dropdown-desc) { padding-block: 7px; }
92
+ /* Icon in a soft tinted square (iconTone): one quiet color per kind of item, no gradient and no glow. */
93
+ .oc-dropdown-icon:is(.oc-dropdown-icon--primary, .oc-dropdown-icon--success, .oc-dropdown-icon--warning, .oc-dropdown-icon--destructive, .oc-dropdown-icon--muted) {
94
+ inline-size: 1.75rem;
95
+ block-size: 1.75rem;
96
+ padding: 0.375rem;
97
+ border-radius: calc(var(--oc-radius) - 2px);
98
+ background: color-mix(in oklch, var(--oc-dropdown-tone, var(--oc-muted-foreground)) 14%, transparent);
99
+ color: var(--oc-dropdown-tone, var(--oc-muted-foreground));
100
+ }
101
+ .oc-dropdown-icon--primary { --oc-dropdown-tone: var(--oc-primary); }
102
+ .oc-dropdown-icon--success { --oc-dropdown-tone: var(--oc-success); }
103
+ .oc-dropdown-icon--warning { --oc-dropdown-tone: var(--oc-warning); }
104
+ .oc-dropdown-icon--destructive { --oc-dropdown-tone: var(--oc-destructive); }
105
+ .oc-dropdown-item:is(:hover, :focus-visible) > .oc-dropdown-icon:is(.oc-dropdown-icon--primary, .oc-dropdown-icon--success, .oc-dropdown-icon--warning, .oc-dropdown-icon--destructive, .oc-dropdown-icon--muted) { color: var(--oc-dropdown-tone, var(--oc-muted-foreground)); }
106
+ /* Plain items in a menu with tinted icons: the label starts where the other labels start. */
107
+ .oc-dropdown-menu:has(> .oc-dropdown-item > [class*="oc-dropdown-icon--"])
108
+ > .oc-dropdown-item:not(:has(> .oc-dropdown-icon), :has(> .oc-dropdown-check), [role="menuitemcheckbox"], [role="menuitemradio"]) {
109
+ padding-inline-start: calc(10px + 1.75rem + 8px);
110
+ }
111
+
74
112
  @media (forced-colors: active) {
75
113
  .oc-combobox-option-icon,
76
114
  .oc-combobox-icon,
@@ -0,0 +1,47 @@
1
+ /* File: packages/ui/src/parts/forms-copy-field-extras.css
2
+ Map: copy button with icon + label -> icon swap on .is-copied -> show/hide toggle (masked secret) -> --wrap
3
+ Copy field additions (0.17.0). The base .oc-copy-field lives in components.css.
4
+ - .oc-copy-field-button holds an icon (mdi:content-copy, mdi:check once copied) and .oc-copy-field-button-label;
5
+ the label shows the copied feedback, .oc-copy-field-status (visually hidden, role="status") announces it.
6
+ - .oc-copy-field-toggle: show/hide for a secret in input[type=password]; aria-pressed="true" = shown. The markup can
7
+ carry both icons (.oc-copy-field-icon-show / -hide); the one that does not fit the state is hidden.
8
+ - .oc-copy-field--wrap: long values (a token, a URL) break over lines instead of ending in an ellipsis; the value is
9
+ an <output> (an <input> cannot wrap). */
10
+
11
+ .oc-copy-field-button,
12
+ .oc-copy-field-toggle {
13
+ display: inline-flex;
14
+ align-items: center;
15
+ justify-content: center;
16
+ gap: 0.375rem;
17
+ white-space: nowrap;
18
+ }
19
+ .oc-copy-field-button > svg,
20
+ .oc-copy-field-toggle > svg { flex: none; inline-size: 1.125em; block-size: 1.125em; }
21
+ .oc-copy-field-button:not(.is-copied) > .oc-copy-field-icon-copied,
22
+ .oc-copy-field-button.is-copied > .oc-copy-field-icon-copy { display: none; }
23
+
24
+ .oc-copy-field-toggle {
25
+ padding: 0 0.625rem;
26
+ font: inherit;
27
+ font-size: 0.875rem;
28
+ color: var(--oc-muted-foreground);
29
+ background: transparent;
30
+ border: 0;
31
+ border-inline-start: 1px solid var(--oc-border);
32
+ cursor: pointer;
33
+ }
34
+ .oc-copy-field-toggle:hover { color: var(--oc-foreground); background: var(--oc-accent); }
35
+ .oc-copy-field-toggle:focus-visible { outline: 2px solid var(--oc-ring); outline-offset: -2px; }
36
+ .oc-copy-field-toggle[aria-pressed="true"] { color: var(--oc-foreground); }
37
+ .oc-copy-field-toggle[aria-pressed="true"] > .oc-copy-field-icon-show,
38
+ .oc-copy-field-toggle:not([aria-pressed="true"]) > .oc-copy-field-icon-hide { display: none; }
39
+
40
+ .oc-copy-field--wrap .oc-copy-field-value {
41
+ display: block;
42
+ align-self: center;
43
+ white-space: pre-wrap;
44
+ overflow-wrap: anywhere;
45
+ text-overflow: clip;
46
+ line-height: 1.45;
47
+ }
@@ -0,0 +1,55 @@
1
+ /* File: packages/ui/src/parts/forms-field-extras.css
2
+ Map: label row (label + info icon + trailing content) -> required mark -> info icon button -> validation message
3
+ -> forced colors
4
+ Extras of .oc-field (0.17.0): a label row with a tooltip icon and content at its end (a link, a counter), a mark for a
5
+ required field, and the message the input-mask script writes on blur. Theme tokens only; flat. */
6
+
7
+ .oc-field-label-row {
8
+ display: flex;
9
+ align-items: center;
10
+ gap: 0.375rem;
11
+ min-inline-size: 0;
12
+ }
13
+ .oc-field-label-row > .oc-field-label { min-inline-size: 0; }
14
+ .oc-field-label-trailing {
15
+ margin-inline-start: auto;
16
+ font-size: 0.8rem;
17
+ color: var(--oc-muted-foreground);
18
+ }
19
+ .oc-field-label-trailing a { color: var(--oc-primary); }
20
+ .oc-field--horizontal > .oc-field-label-row { min-inline-size: 120px; }
21
+
22
+ /* Required: a small mark after the label text (aria-hidden; the control has required + aria-required). */
23
+ .oc-field-required {
24
+ margin-inline-start: 0.2em;
25
+ color: light-dark(oklch(from var(--oc-destructive) min(l, 0.55) c h), oklch(from var(--oc-destructive) max(l, 0.78) c h));
26
+ font-weight: 600;
27
+ }
28
+
29
+ /* Info icon: a small round button in the muted colour; the tooltip is the existing .oc-tooltip. */
30
+ .oc-field-tooltip-wrap { display: inline-flex; }
31
+ .oc-field-tooltip {
32
+ display: inline-flex;
33
+ align-items: center;
34
+ justify-content: center;
35
+ inline-size: 1.125rem;
36
+ block-size: 1.125rem;
37
+ padding: 0;
38
+ border: 0;
39
+ border-radius: 50%;
40
+ background: transparent;
41
+ color: var(--oc-muted-foreground);
42
+ cursor: help;
43
+ }
44
+ .oc-field-tooltip > :is(svg, iconify-icon) { inline-size: 1rem; block-size: 1rem; font-size: 1rem; }
45
+ .oc-field-tooltip:hover { color: var(--oc-foreground); }
46
+ .oc-field-tooltip:focus-visible { outline: 2px solid var(--oc-ring); outline-offset: 1px; }
47
+
48
+ /* Ledger field: a smaller info icon. */
49
+ .oc-field--ledger .oc-field-tooltip { inline-size: 1rem; block-size: 1rem; }
50
+ .oc-field--ledger .oc-field-tooltip > :is(svg, iconify-icon) { inline-size: 0.875rem; block-size: 0.875rem; font-size: 0.875rem; }
51
+
52
+ @media (forced-colors: active) {
53
+ .oc-field-tooltip { color: ButtonText; }
54
+ .oc-field-required { color: CanvasText; }
55
+ }
@@ -1,4 +1,4 @@
1
- /* File: packages/ui/src/parts/forms-form-section.css | Map: section (details) -> summary (icon, title, hint, status, chevron) -> body grid -> invalid state */
1
+ /* File: packages/ui/src/parts/forms-form-section.css | Map: section (details) -> summary (icon, title, hint, status, chevron) -> body grid -> invalid state -> dense */
2
2
  /* Collapsible form section: a long form in named parts that open and close.
3
3
  Native <details>; sections with the same name="" keep one open at a time. */
4
4
 
@@ -59,6 +59,44 @@
59
59
  background: oklch(from var(--oc-destructive) l c h / 0.1);
60
60
  }
61
61
 
62
+ /* Set by the app (0.17.0): data-issue="error" | "warning" marks the section (also while closed) when your own checks
63
+ found something, not only the browser's validity. .oc-form-section__count is the number in the header. The same
64
+ data-issue edge works on .oc-card. */
65
+ .oc-form-section[data-issue="error"],
66
+ .oc-card[data-issue="error"] { border-color: var(--oc-destructive); }
67
+ .oc-form-section[data-issue="warning"],
68
+ .oc-card[data-issue="warning"] { border-color: var(--oc-warning); }
69
+ .oc-form-section[data-issue] .oc-form-section__icon {
70
+ color: var(--oc-form-section-issue);
71
+ background: oklch(from var(--oc-form-section-issue) l c h / 0.1);
72
+ }
73
+ .oc-form-section[data-issue="error"] { --oc-form-section-issue: var(--oc-destructive); }
74
+ .oc-form-section[data-issue="warning"] { --oc-form-section-issue: var(--oc-warning); }
75
+ .oc-form-section__status:has(> .oc-form-section__count) { display: inline-flex; align-items: center; gap: 0.5rem; }
76
+ .oc-form-section__count {
77
+ display: inline-grid;
78
+ place-items: center;
79
+ min-inline-size: 1.25rem;
80
+ block-size: 1.25rem;
81
+ padding-inline: 0.375rem;
82
+ font-size: 0.6875rem;
83
+ font-weight: 700;
84
+ font-variant-numeric: tabular-nums;
85
+ line-height: 1;
86
+ color: var(--oc-destructive-foreground);
87
+ background: var(--oc-form-section-issue, var(--oc-destructive));
88
+ border-radius: 999px;
89
+ }
90
+ .oc-form-section[data-issue="warning"] .oc-form-section__count { color: var(--oc-warning-foreground); }
91
+
92
+ /* Dense (0.17.0): a smaller header, icon and body for long forms in a panel or a side sheet. */
93
+ .oc-form-section--dense + .oc-form-section--dense { margin-block-start: 0.5rem; }
94
+ .oc-form-section--dense > .oc-form-section__summary { gap: 0.125rem 0.625rem; padding: 0.5rem 0.75rem; }
95
+ .oc-form-section--dense .oc-form-section__icon { inline-size: 1.75rem; block-size: 1.75rem; font-size: 1rem; }
96
+ .oc-form-section--dense .oc-form-section__title { font-size: 0.875rem; }
97
+ .oc-form-section--dense .oc-form-section__hint { font-size: 0.75rem; }
98
+ .oc-form-section--dense > .oc-form-section__body { gap: 0.75rem; padding: 0.75rem; }
99
+
62
100
  @media (prefers-reduced-motion: reduce) {
63
101
  .oc-form-section__summary::after { transition: none; }
64
102
  }
@@ -0,0 +1,98 @@
1
+ /* File: packages/ui/src/parts/forms-ledger.css
2
+ Map: ledger tokens on the controls -> input / select / textarea / combobox / input group -> ledger field (label + control)
3
+ -> focus in the module colour -> forced colors
4
+ Ledger look (variant="ledger"): compact, flat bookkeeping fields for dense forms and line items. About 2rem high,
5
+ 0.8125rem tabular figures, a lightly tinted background, a 1px border and a small radius; the focus border and ring use
6
+ the module colour (--oc-module, set by the app or by [data-module]) and fall back to the theme ring. It only sets the
7
+ existing field tokens (--oc-input-*), so the base .oc-input / .oc-select rules keep doing the drawing. No gradient, no glow. */
8
+
9
+ .oc-input--ledger,
10
+ .oc-select--ledger,
11
+ .oc-textarea--ledger,
12
+ .oc-combobox--ledger,
13
+ .oc-input-group--ledger,
14
+ .oc-field--ledger {
15
+ --oc-input-size: 0.8125rem;
16
+ --oc-input-padding: 0 0.5rem;
17
+ --oc-input-radius: calc(var(--oc-radius) - 2px);
18
+ --oc-input-border: var(--oc-border);
19
+ --oc-input-bg: color-mix(in oklab, var(--oc-muted) 45%, transparent);
20
+ --oc-ring-width: 2px;
21
+ --oc-ring-alpha: 20%;
22
+ --oc-ledger-height: 2rem;
23
+ --oc-ledger-focus: var(--oc-module, var(--oc-ring));
24
+ }
25
+
26
+ /* Controls: fixed height, tabular figures. */
27
+ .oc-input.oc-input--ledger,
28
+ .oc-select.oc-select--ledger,
29
+ .oc-field--ledger :is(.oc-input:not(textarea), .oc-select) {
30
+ block-size: var(--oc-ledger-height);
31
+ font-variant-numeric: tabular-nums;
32
+ line-height: 1.25;
33
+ }
34
+ .oc-select.oc-select--ledger,
35
+ .oc-field--ledger .oc-select {
36
+ padding-inline-end: 1.75rem;
37
+ background-position: right 8px center;
38
+ background-size: 12px 12px;
39
+ }
40
+ textarea.oc-textarea--ledger,
41
+ .oc-field--ledger textarea.oc-input {
42
+ --oc-input-padding: 0.375rem 0.5rem;
43
+ --oc-textarea-min: 4rem;
44
+ font-variant-numeric: tabular-nums;
45
+ line-height: 1.4;
46
+ }
47
+
48
+ /* Combobox: the field is a ledger input; the chevron sits a little closer to the end. */
49
+ .oc-combobox--ledger .oc-combobox-input { padding-inline-end: 1.75rem; }
50
+ .oc-combobox--ledger::after {
51
+ /* Whole pixels and a slightly thinner stroke: a small chevron that stays sharp and symmetric. */
52
+ inset-block-start: calc(var(--oc-ledger-height) / 2 - 6px);
53
+ inset-inline-end: 0.7rem;
54
+ inline-size: 6px;
55
+ block-size: 6px;
56
+ border-inline-end-width: 1.5px;
57
+ border-block-end-width: 1.5px;
58
+ }
59
+ .oc-combobox--ledger .oc-combobox-list { font-size: 0.8125rem; }
60
+
61
+ /* Input group: addons at the same height and size. */
62
+ .oc-input-group--ledger .oc-input-addon,
63
+ .oc-field--ledger .oc-input-addon {
64
+ padding-inline: 0.5rem;
65
+ font-size: 0.75rem;
66
+ font-variant-numeric: tabular-nums;
67
+ border-color: var(--oc-border);
68
+ }
69
+ .oc-input-group--ledger .oc-input:first-child,
70
+ .oc-input-group--ledger .oc-input-addon:first-child { border-start-start-radius: var(--oc-input-radius); border-end-start-radius: var(--oc-input-radius); }
71
+ .oc-input-group--ledger .oc-input:last-child,
72
+ .oc-input-group--ledger .oc-input-addon:last-child { border-start-end-radius: var(--oc-input-radius); border-end-end-radius: var(--oc-input-radius); }
73
+
74
+ /* Field: small muted label, tight gap. */
75
+ .oc-field--ledger { gap: 4px; margin-bottom: 10px; }
76
+ .oc-field--ledger .oc-field-label {
77
+ font-size: 0.75rem;
78
+ font-weight: 500;
79
+ color: var(--oc-muted-foreground);
80
+ }
81
+ .oc-field--ledger :is(.oc-field-description, .oc-field-error) { font-size: 0.75rem; }
82
+
83
+ /* Focus: module colour with the theme ring as fallback. */
84
+ :is(.oc-input--ledger, .oc-select--ledger, .oc-textarea--ledger):focus,
85
+ :is(.oc-combobox--ledger, .oc-input-group--ledger, .oc-field--ledger) :is(.oc-input, .oc-select):focus {
86
+ border-color: var(--oc-ledger-focus);
87
+ box-shadow: 0 0 0 var(--oc-ring-width) color-mix(in srgb, var(--oc-ledger-focus) var(--oc-ring-alpha), transparent);
88
+ }
89
+ /* An error keeps its own colour. */
90
+ :is(.oc-input--ledger, .oc-textarea--ledger, .oc-field--ledger .oc-input):is([aria-invalid="true"], .oc-input--error) {
91
+ border-color: var(--oc-destructive);
92
+ }
93
+
94
+ @media (forced-colors: active) {
95
+ :is(.oc-input--ledger, .oc-select--ledger, .oc-textarea--ledger, .oc-field--ledger .oc-input, .oc-field--ledger .oc-select) {
96
+ border-color: CanvasText;
97
+ }
98
+ }
@@ -0,0 +1,6 @@
1
+ /* File: packages/ui/src/parts/media-aspect-flush.css */
2
+ /* Map: aspect flush -> no radius, no background */
3
+ /* .oc-aspect--flush: the aspect box without its rounded corners and muted background, for a picture over the full
4
+ width of the page (edge to edge) or inside a card that already clips its corners. */
5
+
6
+ .oc-aspect--flush { border-radius: 0; background: none; }
@@ -1,6 +1,8 @@
1
- /* File: packages/ui/src/parts/media-barcode.css | Map: barcode figure -> svg bars -> digits -> sizes (hero, compact) -> error */
1
+ /* File: packages/ui/src/parts/media-barcode.css | Map: barcode figure -> svg bars -> digits (groups) -> sizes (hero, compact) -> bare -> error */
2
2
  /* Barcode display: EAN-13, EAN-8, UPC-A or Code 128, drawn as SVG by
3
- packages/ui/src/barcode.js from data-value. Always black bars on white, in both themes, so scanners read it. */
3
+ packages/ui/src/barcode.js from data-value. Black bars on a white plate, in both themes, so scanners read it.
4
+ --bare (0.17.0): no plate, no border (inside a card); the bars take currentColor. The figure never gets wider than
5
+ its container: the SVG then scales down in width. */
4
6
 
5
7
  .oc-barcode {
6
8
  display: inline-flex;
@@ -13,11 +15,30 @@
13
15
  background: var(--color-white-50);
14
16
  border: 1px solid var(--oc-border);
15
17
  border-radius: var(--oc-radius);
18
+ box-sizing: border-box;
19
+ max-inline-size: 100%;
20
+ min-inline-size: 0;
16
21
  }
17
- .oc-barcode svg { display: block; inline-size: auto; block-size: var(--oc-barcode-height, 4rem); max-inline-size: 100%; }
18
- .oc-barcode__digits { font-family: var(--oc-font-mono); font-size: 0.8125rem; letter-spacing: 0.18em; color: inherit; }
22
+ .oc-barcode svg { display: block; inline-size: auto; block-size: var(--oc-barcode-height, 4rem); max-inline-size: 100%; min-inline-size: 0; }
23
+ .oc-barcode__digits {
24
+ display: flex;
25
+ flex-wrap: wrap;
26
+ justify-content: center;
27
+ column-gap: 0.6em;
28
+ max-inline-size: 100%;
29
+ font-family: var(--oc-font-mono);
30
+ font-size: 0.8125rem;
31
+ letter-spacing: 0.18em;
32
+ color: inherit;
33
+ }
34
+ /* each group drops the trailing letter-spacing so the gaps between groups look equal */
35
+ .oc-barcode__group { margin-inline-end: -0.18em; }
19
36
  .oc-barcode--hero { padding: 1.25rem 1.5rem; --oc-barcode-height: 6rem; }
20
37
  .oc-barcode--hero .oc-barcode__digits { font-size: 1rem; }
21
38
  .oc-barcode--compact { padding: 0.375rem 0.5rem; --oc-barcode-height: 2.25rem; }
22
39
  .oc-barcode--compact .oc-barcode__digits { font-size: 0.6875rem; letter-spacing: 0.1em; }
40
+ .oc-barcode--compact .oc-barcode__group { margin-inline-end: -0.1em; }
23
41
  .oc-barcode[data-error] .oc-barcode__digits { color: var(--color-red-70); letter-spacing: 0; }
42
+ /* --bare (0.17.0): no own white plate and border, so a barcode in a card has no double frame. The bars and digits take
43
+ currentColor (light on dark in dark mode: most phone scanners read that; keep the default plate for print/labels). */
44
+ .oc-barcode.oc-barcode--bare { padding: 0; color: inherit; background: none; border: 0; border-radius: 0; }
@@ -25,6 +25,8 @@
25
25
  justify-content: space-between;
26
26
  gap: 0.5rem;
27
27
  min-inline-size: 0;
28
+ /* As tall as the expand button, with or without one: frames side by side start at the same height. */
29
+ min-block-size: 2rem;
28
30
  }
29
31
  .oc-doc-viewer__label {
30
32
  flex: 1 1 auto;
@@ -50,3 +50,8 @@
50
50
  @container (max-width: 22rem) {
51
51
  .oc-entity-card__grid { grid-template-columns: minmax(0, 1fr); }
52
52
  }
53
+ /* A small card in a very narrow column: a smaller frame, so the title keeps its room. */
54
+ @container (max-width: 16rem) {
55
+ .oc-entity-card--sm .oc-entity-card__grid { grid-template-columns: 3.5rem minmax(0, 1fr); gap: 0.75rem; padding: 0.75rem; }
56
+ .oc-entity-card--sm .oc-entity-card__glyph { font-size: 1.75rem; }
57
+ }
@@ -2,7 +2,8 @@
2
2
  Map: liquid sheet (.oc-glass--liquid: clear tint, strong blur + saturation, inner light, specular rim) -> menu bar
3
3
  (.oc-glass-bar: items with icon and label, the current one in a raised bubble) -> icon-only and round button -> fallbacks
4
4
  Liquid glass in the style of recent desktop and phone systems, in CSS only: the backdrop is blurred and brightened,
5
- the edge catches light. Put it over a photo or colourful content; on a plain page it looks like a soft card. */
5
+ the edge catches light. Put it over a photo or colourful content; on a plain page it looks like a soft card.
6
+ With glass-lens.js in Chromium the liquid sheet and the bar get the lens too (see media-glass.css). */
6
7
 
7
8
  .oc-glass.oc-glass--liquid,
8
9
  .oc-glass--liquid,
@@ -54,8 +55,12 @@
54
55
  pointer-events: none;
55
56
  }
56
57
 
57
- /* Menu bar: a pill of items, each an icon over a short label. */
58
+ /* Menu bar: a pill of items, each an icon over a short label. Small labels need a calmer backdrop than a sheet with
59
+ large text: in light mode the bar takes a denser white tint and a stronger blur, so icons and labels stay readable
60
+ over a busy photo (the dark tint is unchanged: light text on a darkened photo already reads well). */
58
61
  .oc-glass-bar {
62
+ --oc-liquid-tint: light-dark(oklch(100% 0 0deg / 0.5), oklch(100% 0 0deg / 0.05));
63
+ --oc-liquid-blur: 10px;
59
64
  display: inline-flex;
60
65
  align-items: center;
61
66
  gap: 0.2rem;
@@ -71,7 +76,7 @@
71
76
  padding: 0.45rem 0.85rem;
72
77
  border: 0;
73
78
  border-radius: 999px;
74
- color: light-dark(oklch(22% 0.02 260deg / 0.78), oklch(100% 0 0deg / 0.82));
79
+ color: light-dark(oklch(22% 0.02 260deg / 0.9), oklch(100% 0 0deg / 0.9));
75
80
  background: none;
76
81
  font: inherit;
77
82
  font-size: 0.7rem;
@@ -85,10 +90,10 @@
85
90
  .oc-glass-bar__item:hover { background: light-dark(oklch(100% 0 0deg / 0.28), oklch(100% 0 0deg / 0.08)); }
86
91
  .oc-glass-bar__item:active { scale: 0.94; }
87
92
  .oc-glass-bar__item:focus-visible { outline: 2px solid var(--oc-ring); outline-offset: 1px; }
88
- /* The current item sits in a raised, lighter bubble. */
93
+ /* The current item sits in a raised, lighter bubble (dense enough in light, faint enough in dark, for 4.5:1 text). */
89
94
  .oc-glass-bar__item:is([aria-current="page"], [aria-pressed="true"], :has(> input:checked)) {
90
95
  color: light-dark(var(--oc-primary), var(--color-white-50));
91
- background: light-dark(oklch(100% 0 0deg / 0.62), oklch(100% 0 0deg / 0.24));
96
+ background: light-dark(oklch(100% 0 0deg / 0.75), oklch(100% 0 0deg / 0.1));
92
97
  box-shadow: inset 0 1px 1px oklch(100% 0 0deg / 0.85), 0 6px 14px -8px oklch(0% 0 0deg / 0.4);
93
98
  }
94
99
  .oc-glass-bar__item > input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
@@ -1,23 +1,45 @@
1
1
  /* File: packages/ui/src/parts/media-glass-options.css
2
- Map: amount (--clear: more see-through, --frost: more frosted) -> light content on a colourful backdrop -> stage (moving colour blobs to show it off)
2
+ Map: amount (--clear: more see-through, also with the lens; --frost: more frosted, the lens only bends the edge) -> drag (data-oc-glass-drag) -> light content on a colourful backdrop -> stage (moving colour blobs to show it off; --landscape: sky, sun, hills)
3
3
  Extras for .oc-glass, .oc-glass--liquid and .oc-glass-bar (media-glass.css, media-glass-liquid.css). The selectors
4
4
  carry two classes so they win over the base glass whatever order the parts load in. */
5
5
 
6
6
  /* Amount of glass: --clear lets more of the backdrop through, --frost hides more of it. */
7
7
  :is(.oc-glass, .oc-glass-bar).oc-glass--clear {
8
- --oc-glass-sheet: light-dark(oklch(from var(--oc-background) l c h / 0.32), oklch(from var(--oc-background) l c h / 0.26));
9
- --oc-glass-blur: 10px;
8
+ --oc-glass-sheet: light-dark(oklch(100% 0 0deg / 0.06), oklch(from var(--oc-background) l c h / 0.08));
9
+ --oc-glass-blur: 4px;
10
+ --oc-glass-lens-blur: 0px;
10
11
  --oc-liquid-tint: light-dark(oklch(100% 0 0deg / 0.05), oklch(100% 0 0deg / 0.03));
11
12
  --oc-liquid-blur: 2px;
12
13
  }
13
14
  :is(.oc-glass, .oc-glass-bar).oc-glass--frost {
14
- --oc-glass-sheet: light-dark(oklch(from var(--oc-background) l c h / 0.86), oklch(from var(--oc-background) l c h / 0.8));
15
- --oc-glass-blur: 40px;
15
+ --oc-glass-sheet: light-dark(oklch(100% 0 0deg / 0.42), oklch(from var(--oc-background) l c h / 0.5));
16
+ --oc-glass-blur: 24px;
17
+ --oc-glass-lens-blur: 12px;
16
18
  --oc-liquid-tint: light-dark(oklch(100% 0 0deg / 0.38), oklch(100% 0 0deg / 0.12));
17
19
  --oc-liquid-blur: 18px;
18
20
  }
21
+ /* Frosted glass has a fine grain (5 % grey noise) over the tint; clear glass has none. */
22
+ .oc-glass.oc-glass--frost::after {
23
+ background-image:
24
+ url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 .05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
25
+ linear-gradient(to bottom, var(--oc-glass-sheen), transparent 60%);
26
+ }
27
+ @media (prefers-reduced-transparency: reduce) {
28
+ .oc-glass.oc-glass--frost::after { background-image: none; }
29
+ }
19
30
 
20
31
 
32
+ /* Drag (glass-lens.js): data-oc-glass-drag moves the sheet over its backdrop with the mouse, a finger or the arrow keys.
33
+ No page scroll while a finger drags it; keyboard moves glide unless reduced motion is asked for. */
34
+ [data-oc-glass-drag] { touch-action: none; cursor: grab; transition: translate 0.15s ease-out; }
35
+ [data-oc-glass-drag][data-oc-dragging] { cursor: grabbing; user-select: none; transition: none; }
36
+ [data-oc-glass-drag]:focus-visible { outline: 2px solid var(--oc-ring); outline-offset: 3px; }
37
+ /* Focus from a mouse or finger shows no ring (the script sets data-oc-pointer until a key is pressed). */
38
+ [data-oc-glass-drag][data-oc-pointer]:focus-visible { outline: none; }
39
+ @media (prefers-reduced-motion: reduce) {
40
+ [data-oc-glass-drag] { transition: none; }
41
+ }
42
+
21
43
  /* Light content: white icons and labels for glass over a dark or very colourful backdrop. */
22
44
  .oc-glass-bar.oc-glass-bar--light .oc-glass-bar__item {
23
45
  color: oklch(100% 0 0deg / 0.92);
@@ -48,3 +70,13 @@
48
70
  @media (prefers-reduced-motion: reduce) {
49
71
  .oc-glass-stage { animation: none; }
50
72
  }
73
+ /* Landscape: sky, sun and two hills (night in dark mode), standing still. Clear shapes and edges, so the lens shows: the
74
+ horizon and the sun bend at the edge of the glass. */
75
+ .oc-glass-stage.oc-glass-stage--landscape {
76
+ background:
77
+ radial-gradient(circle at 74% 30%, light-dark(var(--color-gold-50), var(--color-lightyellow-70)) 0 2.75rem, transparent calc(2.75rem + 1px)),
78
+ radial-gradient(70% 52% at 20% 106%, light-dark(var(--color-seagreen-40), var(--color-darkgreen-60)) 0 99%, transparent 100%),
79
+ radial-gradient(80% 58% at 86% 114%, light-dark(var(--color-forestgreen-60), var(--color-darkgreen-80)) 0 99%, transparent 100%),
80
+ linear-gradient(light-dark(var(--color-deepskyblue-60), var(--color-midnightblue-60)), light-dark(var(--color-lightskyblue-20), var(--color-darkslateblue-50)) 75%);
81
+ animation: none;
82
+ }