@birdycom/omniaui 0.16.0 → 0.16.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/oc-theme.css CHANGED
@@ -1,4 +1,4 @@
1
- /* File: oc-theme.css — generated from tokens/semantic.json by @birdycom/omniacss 0.16.0. Do not edit. */
1
+ /* File: oc-theme.css — generated from tokens/semantic.json by @birdycom/omniacss 0.16.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 {
@@ -48,6 +48,7 @@
48
48
  .oc-card.oc-card--accent {
49
49
  --oc-card-tone: var(--oc-primary);
50
50
  overflow: clip;
51
+ padding: 0; /* the band runs to the border; the content keeps its own padding (.oc-card-content) */
51
52
  border: 2px solid var(--oc-card-tone);
52
53
  box-shadow: none;
53
54
  }
@@ -58,11 +59,15 @@
58
59
  .oc-card--accent[data-tone="destructive"] { --oc-card-tone: var(--oc-destructive); }
59
60
  .oc-card--accent[data-tone="test"] { --oc-card-tone: var(--oc-mode-test); }
60
61
  .oc-card--accent[data-tone="live"] { --oc-card-tone: var(--oc-mode-live); }
62
+ /* A fixed minimum height (--oc-card-band-min-h), so the band of two cards side by side is equally high with or without a
63
+ status, and does not jump when the status comes or goes. */
61
64
  .oc-card-band {
62
65
  display: flex;
63
66
  flex-wrap: wrap;
64
67
  align-items: center;
68
+ align-content: center;
65
69
  gap: 0.5rem 0.75rem;
70
+ min-block-size: var(--oc-card-band-min-h, 4.25rem);
66
71
  padding: 0.75rem 1rem;
67
72
  background: color-mix(in oklab, var(--oc-card-tone, var(--oc-primary)) 14%, var(--oc-card));
68
73
  border-block-end: 1px solid color-mix(in oklab, var(--oc-card-tone, var(--oc-primary)) 50%, transparent);
@@ -17,6 +17,9 @@
17
17
  padding: 0;
18
18
  border: 0;
19
19
  appearance: none;
20
+ /* Firefox clips a progress element (overflow: clip in its own style sheet): the glow at the end of the bar would be
21
+ cut off there. */
22
+ overflow: visible;
20
23
  color: var(--oc-top-progress-color);
21
24
  background: transparent;
22
25
  pointer-events: none;
@@ -40,10 +40,11 @@
40
40
  (a preview; give the box an aria-label or a caption so the preview still has a name). */
41
41
  .oc-live-frame > [inert] { pointer-events: none; user-select: none; }
42
42
 
43
- /* Device: the page in a phone or a television: a dark bezel with rounded corners around the scaled page. The bezel is
44
- the border of a content-box frame, so the page keeps its exact ratio, and overflow: hidden gives the screen its
45
- inner corners. Phone: 390 x 844 by default in the wrappers, at most --oc-live-phone-max wide. Color: --oc-live-bezel. */
46
- .oc-live-frame:is(.oc-live-frame--phone, .oc-live-frame--tv) {
43
+ /* Device: the page in a phone, a television or a laptop: a dark bezel with rounded corners around the scaled page. The
44
+ bezel is the border of a content-box frame, so the page keeps its exact ratio, and overflow: hidden gives the screen
45
+ its inner corners. Phone: 390 x 844 by default in the wrappers, at most --oc-live-phone-max wide. Laptop: 1440 x 900
46
+ by default, see below. Color: --oc-live-bezel. */
47
+ .oc-live-frame:is(.oc-live-frame--phone, .oc-live-frame--tv, .oc-live-frame--laptop) {
47
48
  --oc-live-bezel: var(--color-duskblue-90);
48
49
  box-sizing: content-box;
49
50
  border: var(--oc-live-bezel-size) solid var(--oc-live-bezel);
@@ -61,6 +62,35 @@
61
62
  inline-size: calc(100% - 2 * var(--oc-live-bezel-size));
62
63
  border-radius: 0.625rem;
63
64
  }
65
+ /* Laptop: a thin bezel, square inner corners, and a base under the screen that is a little wider than it (with the notch
66
+ to open the lid). The base is the ::after of the frame, drawn below it, so this frame does not clip (overflow:
67
+ visible); the page clips itself. The frame leaves room at both sides and under it for the base, so it never overflows
68
+ its column. Tokens: --oc-live-base (color), --oc-live-base-h (height), --oc-live-base-over (how far it sticks out). */
69
+ .oc-live-frame--laptop {
70
+ --oc-live-bezel-size: 0.375rem;
71
+ --oc-live-base: var(--color-gray-30);
72
+ --oc-live-base-h: 0.75rem;
73
+ --oc-live-base-over: 4%;
74
+ inline-size: calc(100% - 2 * var(--oc-live-bezel-size) - 2 * var(--oc-live-base-over));
75
+ margin-inline: auto;
76
+ margin-block-end: var(--oc-live-base-h);
77
+ overflow: visible;
78
+ border-radius: var(--oc-live-bezel-size) var(--oc-live-bezel-size) 0 0;
79
+ }
80
+ .oc-live-frame--laptop > :is(iframe, video, img, object, .oc-live-frame__content) { overflow: hidden; }
81
+ .oc-live-frame--laptop::after {
82
+ content: "";
83
+ position: absolute;
84
+ inset-inline: calc(-1 * (var(--oc-live-bezel-size) + var(--oc-live-base-over)));
85
+ inset-block-start: calc(100% + var(--oc-live-bezel-size));
86
+ block-size: var(--oc-live-base-h);
87
+ border-radius: 0 0 50% 50% / 0 0 100% 100%;
88
+ background:
89
+ linear-gradient(to right, transparent 42%, oklch(from var(--oc-live-base) calc(l - 0.14) c h) 42% 58%, transparent 58%) top / 100% 40% no-repeat,
90
+ linear-gradient(oklch(from var(--oc-live-base) calc(l + 0.08) c h), oklch(from var(--oc-live-base) calc(l - 0.12) c h));
91
+ box-shadow: 0 6px 14px -4px oklch(from var(--color-black-60) l c h / 0.3);
92
+ }
64
93
  @media (forced-colors: active) {
65
- .oc-live-frame:is(.oc-live-frame--phone, .oc-live-frame--tv) { border-color: CanvasText; }
94
+ .oc-live-frame:is(.oc-live-frame--phone, .oc-live-frame--tv, .oc-live-frame--laptop) { border-color: CanvasText; }
95
+ .oc-live-frame--laptop::after { background: CanvasText; }
66
96
  }
@@ -21,13 +21,20 @@
21
21
  }
22
22
  .oc-skip-link:focus { translate: none; }
23
23
 
24
- /* Inline icon: 1.25em (1.1em in a button), never squeezed in a flex row. */
24
+ /* Inline icon: 1.25em (1.1em in a button), never squeezed in a flex row. Sizes --xs … --xl are fixed (0.875, 1, 1.25,
25
+ 1.5, 2rem). --oc-icon-ratio (width / height, set by Webicon for a 4:3 flag) keeps a wide icon in its own ratio. */
25
26
  .oc-icon {
26
- inline-size: 1.25em;
27
- block-size: 1.25em;
27
+ --oc-icon-size: 1.25em;
28
+ inline-size: calc(var(--oc-icon-size) * var(--oc-icon-ratio, 1));
29
+ block-size: var(--oc-icon-size);
28
30
  flex-shrink: 0;
29
31
  }
30
- .oc-btn > .oc-icon {
31
- inline-size: 1.1em;
32
- block-size: 1.1em;
33
- }
32
+ :where(.oc-btn) > .oc-icon { --oc-icon-size: 1.1em; }
33
+ .oc-icon--xs { --oc-icon-size: 0.875rem; }
34
+ .oc-icon--sm { --oc-icon-size: 1rem; }
35
+ .oc-icon--md { --oc-icon-size: 1.25rem; }
36
+ .oc-icon--lg { --oc-icon-size: 1.5rem; }
37
+ .oc-icon--xl { --oc-icon-size: 2rem; }
38
+ /* A webicon drawn as inline SVG (Webicon / OcWebicon / <x-oc::webicon>: svg[data-webicon]) sits in a line of text like
39
+ the Iconify element did, also where a reset makes every svg a block. Any component rule still wins (no specificity). */
40
+ :where(svg[data-webicon]) { display: inline-block; vertical-align: -0.125em; }
package/manifest.json CHANGED
@@ -1463,6 +1463,14 @@
1463
1463
  "requires": [
1464
1464
  "@birdycom/omniaui"
1465
1465
  ]
1466
+ },
1467
+ {
1468
+ "name": "webicon",
1469
+ "file": "snippets/webicon.html",
1470
+ "description": "An icon by name from the six webicon sets as inline SVG in currentColor, from icon data the app bundles (no network)",
1471
+ "requires": [
1472
+ "@birdycom/omniaui"
1473
+ ]
1466
1474
  }
1467
1475
  ]
1468
1476
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@birdycom/omniaui",
3
- "version": "0.16.0",
3
+ "version": "0.16.2",
4
4
  "description": "OmniaUI components: CSS-first UI built on native HTML (dialog, popover, details) with light-dark() theming — no JavaScript required. Includes the omniaui CLI (add/list).",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -68,7 +68,7 @@
68
68
  "omniaui": "./bin/omniaui.mjs"
69
69
  },
70
70
  "peerDependencies": {
71
- "@birdycom/omniacss": "^0.16.0"
71
+ "@birdycom/omniacss": "^0.16.2"
72
72
  },
73
73
  "peerDependenciesMeta": {
74
74
  "@birdycom/omniacss": {
@@ -0,0 +1,11 @@
1
+ <!-- OmniaUI component: webicon - An icon by name from the six webicon sets as inline SVG in currentColor, from icon data the app bundles (no network). Needs @birdycom/omniaui CSS.
2
+ Class API: .oc-icon (1.25em; 1.1em in a button) + .oc-icon--xs | --sm | --md | --lg | --xl (0.875, 1, 1.25, 1.5, 2rem).
3
+ --oc-icon-ratio: width / height of a wide icon (a 4:3 flag). svg[data-webicon]: inline-block on the text line.
4
+ Decorative: aria-hidden="true". With meaning: role="img" aria-label="…" and a <title>.
5
+ React <Webicon name size label>, Vue <OcWebicon>, Blade <x-oc::webicon> write this SVG from the name; register the
6
+ icons with addWebicons / registerWebicons, or make a small file with: npx omniaui webicons --scan src --out src/webicons.json
7
+ -->
8
+ <svg class="oc-icon" viewBox="0 0 24 24" width="1em" height="1em" fill="currentColor" data-webicon="mdi:home-outline" aria-hidden="true"><path fill="currentColor" d="m12 5.69l5 4.5V18h-2v-6H9v6H7v-7.81zM12 3L2 12h3v8h6v-6h2v6h6v-8h3"/></svg>
9
+ <svg class="oc-icon oc-icon--lg" viewBox="0 0 24 24" width="1em" height="1em" fill="currentColor" data-webicon="mdi:bell-outline" aria-hidden="true"><path fill="currentColor" d="M10 21h4c0 1.1-.9 2-2 2s-2-.9-2-2m11-2v1H3v-1l2-2v-6c0-3.1 2-5.8 5-6.7V4c0-1.1.9-2 2-2s2 .9 2 2v.3c3 .9 5 3.6 5 6.7v6zm-4-8c0-2.8-2.2-5-5-5s-5 2.2-5 5v7h10z"/></svg>
10
+ <svg class="oc-icon oc-icon--md" viewBox="0 0 24 24" width="1em" height="1em" fill="currentColor" style="color: var(--oc-success)" data-webicon="mdi:check-circle" role="img" aria-label="Paid"><title>Paid</title><path fill="currentColor" d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10s10-4.5 10-10S17.5 2 12 2m-2 15l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8z"/></svg>
11
+ <svg class="oc-icon oc-icon--md" viewBox="0 0 640 480" width="1.3333em" height="1em" fill="currentColor" style="--oc-icon-ratio: 1.3333" data-webicon="flag:be-4x3" aria-hidden="true"><g fill-rule="evenodd" stroke-width="1pt"><path fill="#000001" d="M0 0h213.3v480H0z"/><path fill="#ffd90c" d="M213.3 0h213.4v480H213.3z"/><path fill="#f31830" d="M426.7 0H640v480H426.7z"/></g></svg>