@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,5 +1,6 @@
1
1
  /* File: packages/ui/src/parts/app-sidebar-meta.css
2
2
  Map: meta line (brand, version, copyright) -> collapsed sidebar (only the version, the full line as a tooltip)
3
+ -> --wrap (copyright on its own line) -> --collapsed (the collapsed look outside .oc-sidebar)
3
4
  Sidebar meta: a ready-made small line at the foot of an app sidebar: "App 1 2.4.0 · (c) 2026 Company 1". The brand
4
5
  never shortens, the copyright part ends in an ellipsis when the sidebar is narrow. In a collapsed sidebar
5
6
  (.oc-sidebar--collapsed) only the version stays, and the whole line shows as a tooltip (data-tooltip) on hover and on
@@ -26,11 +27,14 @@
26
27
  .oc-sidebar-meta__copy::before { content: "\00b7"; margin-inline-end: 0.35rem; }
27
28
  .oc-sidebar-meta:focus-visible { outline: 2px solid var(--oc-ring); outline-offset: 2px; }
28
29
  /* Open sidebar: the whole line is visible, so no tooltip. */
29
- .oc-sidebar:not(.oc-sidebar--collapsed) .oc-sidebar-meta.oc-tooltip::after { content: none; }
30
+ .oc-sidebar:not(.oc-sidebar--collapsed) .oc-sidebar-meta.oc-tooltip:not(.oc-sidebar-meta--collapsed)::after { content: none; }
30
31
 
31
32
  /* Collapsed: only the version, centred. */
32
- .oc-sidebar--collapsed .oc-sidebar-meta { justify-content: center; padding-inline: 0; }
33
- .oc-sidebar--collapsed .oc-sidebar-meta :is(.oc-sidebar-meta__brand, .oc-sidebar-meta__copy) {
33
+ /* --collapsed (0.17.0): the same look for a rail that is not an .oc-sidebar (set it from your own state). */
34
+ .oc-sidebar--collapsed .oc-sidebar-meta,
35
+ .oc-sidebar-meta.oc-sidebar-meta--collapsed { justify-content: center; padding-inline: 0; }
36
+ .oc-sidebar--collapsed .oc-sidebar-meta :is(.oc-sidebar-meta__brand, .oc-sidebar-meta__copy),
37
+ .oc-sidebar-meta--collapsed :is(.oc-sidebar-meta__brand, .oc-sidebar-meta__copy) {
34
38
  position: absolute;
35
39
  inline-size: 1px;
36
40
  block-size: 1px;
@@ -38,3 +42,10 @@
38
42
  clip-path: inset(50%);
39
43
  white-space: nowrap;
40
44
  }
45
+
46
+ /* --wrap (0.17.0): for a narrow rail. Brand and version on the first line, the copyright on its own second line, whole
47
+ (no dot, no ellipsis). Everything is visible, so no tooltip unless the line is collapsed. */
48
+ .oc-sidebar-meta--wrap { flex-wrap: wrap; row-gap: 0; }
49
+ .oc-sidebar-meta--wrap .oc-sidebar-meta__copy { flex-basis: 100%; overflow: visible; white-space: normal; }
50
+ .oc-sidebar-meta--wrap .oc-sidebar-meta__copy::before { content: none; }
51
+ .oc-sidebar-meta--wrap.oc-tooltip:not(.oc-sidebar-meta--collapsed, .oc-sidebar--collapsed *)::after { content: none; }
@@ -0,0 +1,98 @@
1
+ /* File: packages/ui/src/parts/app-sidebar-provider.css | Map: provider layout -> inset -> trigger -> rail -> menu action -> module tint */
2
+ /* Sidebar provider (0.17.0): div.oc-sidebar-provider holds the sidebar state (data-state="expanded|collapsed") for the
3
+ sidebar, a trigger in the page header (button.oc-sidebar-trigger), a thin rail on the sidebar edge (button.oc-sidebar-rail)
4
+ and the page next to it (main.oc-sidebar-inset). The components and sidebar.js set the classes; this is the layout. */
5
+
6
+ .oc-sidebar-provider {
7
+ display: flex;
8
+ align-items: stretch;
9
+ inline-size: 100%;
10
+ min-block-size: 0;
11
+ block-size: 100%;
12
+ }
13
+ .oc-sidebar-provider > .oc-sidebar { flex-shrink: 0; }
14
+
15
+ /* The page: takes the remaining width and may shrink below its content (tables scroll inside it). */
16
+ .oc-sidebar-inset {
17
+ display: flex;
18
+ flex: 1;
19
+ flex-direction: column;
20
+ min-inline-size: 0;
21
+ min-block-size: 0;
22
+ background: var(--oc-background);
23
+ }
24
+
25
+ .oc-sidebar-trigger > svg { inline-size: 1.25rem; block-size: 1.25rem; }
26
+
27
+ /* Rail: an 8px hit area centred on the sidebar edge; a thin line shows on hover. It takes no width in the layout. */
28
+ .oc-sidebar-rail {
29
+ position: relative;
30
+ z-index: 2;
31
+ flex: none;
32
+ align-self: stretch;
33
+ inline-size: 8px;
34
+ margin-inline: -4px;
35
+ padding: 0;
36
+ border: 0;
37
+ background: transparent;
38
+ cursor: w-resize;
39
+ }
40
+ .oc-sidebar-rail::after {
41
+ content: "";
42
+ position: absolute;
43
+ inset-block: 0;
44
+ inset-inline-start: 3px;
45
+ inline-size: 2px;
46
+ background: transparent;
47
+ transition: background var(--oc-transition-fast);
48
+ }
49
+ .oc-sidebar-rail:hover::after,
50
+ .oc-sidebar-rail:focus-visible::after { background: var(--oc-border); }
51
+ .oc-sidebar-rail:focus-visible { outline: none; }
52
+ [data-state="collapsed"] > .oc-sidebar-rail { cursor: e-resize; }
53
+ .oc-sidebar--right + .oc-sidebar-rail,
54
+ .oc-sidebar-rail:has(+ .oc-sidebar--right) { cursor: e-resize; }
55
+
56
+ /* Menu action: a small button on the right of a menu item (more, add). */
57
+ .oc-sidebar-menu > li:has(> .oc-sidebar-menu-action),
58
+ .oc-sidebar-menu-sub > li:has(> .oc-sidebar-menu-action) { position: relative; }
59
+ li:has(> .oc-sidebar-menu-action) > .oc-sidebar-menu-button { padding-inline-end: 2.25rem; }
60
+ .oc-sidebar-menu-action {
61
+ position: absolute;
62
+ inset-block-start: 50%;
63
+ inset-inline-end: 0.25rem;
64
+ display: inline-grid;
65
+ place-items: center;
66
+ inline-size: 1.5rem;
67
+ block-size: 1.5rem;
68
+ padding: 0;
69
+ font: inherit;
70
+ color: var(--oc-muted-foreground);
71
+ background: none;
72
+ border: 0;
73
+ border-radius: calc(var(--oc-radius) - 4px);
74
+ cursor: pointer;
75
+ translate: 0 -50%;
76
+ transition: background var(--oc-transition-fast), color var(--oc-transition-fast), opacity var(--oc-transition-fast);
77
+ }
78
+ .oc-sidebar-menu-action > svg { inline-size: 1rem; block-size: 1rem; }
79
+ .oc-sidebar-menu-action:hover { background: var(--oc-muted); color: var(--oc-foreground); }
80
+ .oc-sidebar-menu-action:focus-visible { outline: 2px solid var(--oc-ring); outline-offset: -2px; }
81
+ @media (hover: hover) {
82
+ .oc-sidebar-menu-action--hover { opacity: 0; }
83
+ li:hover > .oc-sidebar-menu-action--hover,
84
+ li:focus-within > .oc-sidebar-menu-action--hover,
85
+ .oc-sidebar-menu-action--hover[aria-expanded="true"] { opacity: 1; }
86
+ }
87
+ .oc-sidebar--collapsed .oc-sidebar-menu-action { display: none; }
88
+ .oc-sidebar--collapsed li:has(> .oc-sidebar-menu-action) > .oc-sidebar-menu-button { padding-inline-end: 0; }
89
+
90
+ /* Module tint: a sidebar with data-module (or inside one) marks the active row with the module colour (soft fill, coloured
91
+ icon); without a module colour it falls back to the primary colour. */
92
+ .oc-sidebar[data-module] .oc-sidebar-menu-button[aria-current="page"],
93
+ .oc-sidebar[data-module] .oc-sidebar-menu-button.is-active {
94
+ background: var(--oc-module-soft, color-mix(in oklab, var(--oc-module, var(--oc-primary)) 12%, transparent));
95
+ color: var(--oc-foreground);
96
+ }
97
+ .oc-sidebar[data-module] .oc-sidebar-menu-button[aria-current="page"] .oc-sidebar-menu-icon,
98
+ .oc-sidebar[data-module] .oc-sidebar-menu-button.is-active .oc-sidebar-menu-icon { color: var(--oc-module, var(--oc-primary)); }
@@ -29,6 +29,22 @@
29
29
  .oc-table-actions-icon:disabled,
30
30
  .oc-table-actions-icon[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
31
31
 
32
+
33
+ /* An icon action with its text (0.17.0, showLabel): wide tables show both, narrow ones (or --compact) only the icon. */
34
+ .oc-table-actions-icon:has(> .oc-table-action-label) {
35
+ grid-auto-flow: column;
36
+ gap: 0.35rem;
37
+ inline-size: auto;
38
+ padding-inline: 0.5rem;
39
+ }
40
+ .oc-table-action-label { font-size: 0.8125rem; }
41
+ .oc-table-actions--compact .oc-table-action-label { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
42
+ .oc-table-actions--compact .oc-table-actions-icon:has(> .oc-table-action-label) { inline-size: 1.75rem; padding-inline: 0; }
43
+ @container oc-table (max-width: 32rem) {
44
+ .oc-table-action-label { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
45
+ .oc-table-actions-icon:has(> .oc-table-action-label) { inline-size: 1.75rem; padding-inline: 0; }
46
+ }
47
+
32
48
  /* Tone modifiers: the hover tint shows what the action does. */
33
49
  .oc-table-actions-icon--primary:hover { color: var(--oc-primary); background: oklch(from var(--oc-primary) l c h / 0.1); }
34
50
  .oc-table-actions-icon--success:hover { color: var(--oc-success); background: oklch(from var(--oc-success) l c h / 0.1); }
@@ -88,6 +88,12 @@ a.oc-tree-label:focus-visible { outline: 2px solid var(--oc-ring); outline-offse
88
88
  /* Hide actions until hover or focus (optional): .oc-tree--quiet */
89
89
  .oc-tree--quiet .oc-tree-actions { opacity: 0; }
90
90
  .oc-tree--quiet .oc-tree-row:is(:hover, :focus-within) > .oc-tree-actions { opacity: 1; }
91
+ /* Long names end in an ellipsis instead of scrolling sideways (optional): .oc-tree--ellipsis. Put the full name in a
92
+ title on the label (the components do this for you). */
93
+ .oc-tree--ellipsis { overflow-x: hidden; }
94
+ .oc-tree--ellipsis .oc-tree-list { min-inline-size: 0; }
95
+ .oc-tree--ellipsis .oc-tree-label { flex: 1 1 auto; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; }
96
+ .oc-tree--ellipsis .oc-tree-actions { box-shadow: none; }
91
97
 
92
98
  /* Selected row: tinted with the primary token. */
93
99
  .oc-tree-row:is([aria-current="true"], .is-selected, :has(> .oc-tree-label[aria-current="true"])) { color: var(--oc-primary); font-weight: 500; background: oklch(from var(--oc-primary) l c h / 0.1); }
@@ -0,0 +1,272 @@
1
+ /* File: packages/ui/src/parts/app-type-picker.css (in the components CSS since 0.17.0, so an editor that does not load
2
+ the blocks CSS can use it too)
3
+ Map: frame -> head -> tools (search + category chips) -> grid of type cards (radio, preview, name, hint)
4
+ -> action mode (buttons: a click adds, cards can be dragged, a reason on a card that is not available)
5
+ -> mini previews (text, image, question, callout, link, countdown, tip, video, code) -> foot -> container sizes
6
+ Type picker: a gallery of the content types a user can add (to a page, a step, a lesson, a form). Each card is a
7
+ label around a radio, so picking works with a click, a tap or the arrow keys, without JavaScript. The small preview
8
+ in each card is real markup at a small size, not a grey skeleton. Search and category chips filter with a few
9
+ optional lines of script (or your framework's state). */
10
+
11
+ .oc-block-type-picker {
12
+ container: oc-block-type-picker / inline-size;
13
+ display: grid;
14
+ grid-template-columns: minmax(0, 1fr);
15
+ gap: 1rem;
16
+ padding: 1.25rem;
17
+ border: 1px solid var(--oc-border);
18
+ border-radius: calc(var(--oc-radius) + 4px);
19
+ background: var(--oc-card);
20
+ color: var(--oc-foreground);
21
+ }
22
+
23
+ .oc-block-type-picker-head { display: grid; gap: 0.25rem; }
24
+ .oc-block-type-picker-title { margin: 0; font-size: 1.125rem; font-weight: 650; line-height: 1.3; }
25
+ .oc-block-type-picker-text { margin: 0; color: var(--oc-muted-foreground); font-size: 0.875rem; line-height: 1.5; }
26
+
27
+ /* Search left, category chips right; stacked in a narrow container. */
28
+ .oc-block-type-picker-tools { display: grid; gap: 0.6rem; grid-template-columns: minmax(0, 1fr); align-items: center; }
29
+ .oc-block-type-picker-tools > .oc-input-group { min-inline-size: 0; }
30
+ .oc-block-type-picker-tools .oc-chip-filter { margin: 0; }
31
+
32
+ /* The cards: equal width and equal height in every row (golden rule). */
33
+ .oc-block-type-picker-grid {
34
+ display: grid;
35
+ grid-template-columns: repeat(auto-fill, minmax(min(100%, 8.25rem), 1fr));
36
+ grid-auto-rows: 1fr;
37
+ gap: 0.75rem;
38
+ margin: 0;
39
+ padding: 0;
40
+ border: 0;
41
+ }
42
+ .oc-block-type-picker-group { display: contents; }
43
+ .oc-block-type-picker-group-title {
44
+ grid-column: 1 / -1;
45
+ margin: 0.25rem 0 -0.25rem;
46
+ color: var(--oc-muted-foreground);
47
+ font-size: 0.75rem;
48
+ font-weight: 600;
49
+ letter-spacing: 0.04em;
50
+ text-transform: uppercase;
51
+ }
52
+ .oc-block-type-picker-group-title:first-child { margin-block-start: 0; }
53
+
54
+ .oc-block-type-picker-item {
55
+ position: relative;
56
+ display: grid;
57
+ grid-template-rows: auto auto 1fr;
58
+ gap: 0.35rem;
59
+ padding: 0.5rem 0.5rem 0.65rem;
60
+ border: 1px solid var(--oc-border);
61
+ border-radius: var(--oc-radius);
62
+ background: var(--oc-card);
63
+ cursor: pointer;
64
+ transition: border-color var(--oc-transition-fast), background-color var(--oc-transition-fast);
65
+ }
66
+ .oc-block-type-picker-item[hidden] { display: none; }
67
+ .oc-block-type-picker-item:hover { border-color: var(--oc-border-strong); background: var(--oc-hover, var(--oc-muted)); }
68
+ /* The radio stays in the accessibility tree and takes the keyboard focus; the card shows the state. */
69
+ .oc-block-type-picker-input {
70
+ position: absolute;
71
+ inset: 0;
72
+ inline-size: 100%;
73
+ block-size: 100%;
74
+ margin: 0;
75
+ opacity: 0;
76
+ cursor: inherit;
77
+ }
78
+ .oc-block-type-picker-item:has(.oc-block-type-picker-input:checked) {
79
+ border-color: var(--oc-primary);
80
+ background: oklch(from var(--oc-primary) l c h / 0.07);
81
+ box-shadow: inset 0 0 0 1px var(--oc-primary);
82
+ }
83
+ .oc-block-type-picker-item:has(.oc-block-type-picker-input:focus-visible) {
84
+ outline: var(--oc-focus-width, 2px) solid var(--oc-ring);
85
+ outline-offset: 2px;
86
+ }
87
+ /* Disabled: the preview fades and the name turns muted; the hint stays readable, it says why. */
88
+ .oc-block-type-picker-item:has(.oc-block-type-picker-input:disabled) { cursor: not-allowed; border-style: dashed; }
89
+ .oc-block-type-picker-item:has(.oc-block-type-picker-input:disabled) .oc-block-type-picker-preview { opacity: 0.45; }
90
+ .oc-block-type-picker-item:has(.oc-block-type-picker-input:disabled) .oc-block-type-picker-name { color: var(--oc-muted-foreground); }
91
+ .oc-block-type-picker-item:has(.oc-block-type-picker-input:disabled):hover { border-color: var(--oc-border); background: var(--oc-card); }
92
+
93
+ /* Check mark in the corner of the picked card (drawn in CSS). */
94
+ .oc-block-type-picker-item::after {
95
+ content: "";
96
+ position: absolute;
97
+ inset-block-start: 0.85rem;
98
+ inset-inline-end: 0.85rem;
99
+ inline-size: 1.15rem;
100
+ block-size: 1.15rem;
101
+ border-radius: 50%;
102
+ background: var(--oc-primary) no-repeat center / 0.7rem;
103
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke=%27white%27 stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2 5 8.5l4.5-5'/%3E%3C/svg%3E");
104
+ scale: 0;
105
+ transition: scale var(--oc-transition-fast);
106
+ pointer-events: none;
107
+ }
108
+ .oc-block-type-picker-item:has(.oc-block-type-picker-input:checked)::after { scale: 1; }
109
+
110
+ .oc-block-type-picker-name { font-size: 0.875rem; font-weight: 600; line-height: 1.3; padding-inline: 0.15rem; }
111
+ .oc-block-type-picker-hint { color: var(--oc-muted-foreground); font-size: 0.75rem; line-height: 1.4; padding-inline: 0.15rem; }
112
+
113
+ /* ---- Mini previews: real markup at a small size, never focusable (aria-hidden + inert in the markup). ---- */
114
+ .oc-block-type-picker-preview {
115
+ display: grid;
116
+ align-content: center;
117
+ gap: 0.3rem;
118
+ aspect-ratio: 16 / 10;
119
+ padding: 0.55rem 0.65rem;
120
+ overflow: hidden;
121
+ border: 1px solid var(--oc-border);
122
+ border-radius: calc(var(--oc-radius) - 2px);
123
+ background: var(--oc-background);
124
+ color: var(--oc-foreground);
125
+ font-size: 0.625rem;
126
+ line-height: 1.35;
127
+ pointer-events: none;
128
+ user-select: none;
129
+ }
130
+ .oc-block-type-picker-preview > * { min-inline-size: 0; }
131
+ .oc-block-type-picker-preview b { font-size: 0.75rem; font-weight: 650; }
132
+ .oc-block-type-picker-preview p { margin: 0; color: var(--oc-muted-foreground); }
133
+ .oc-block-type-picker-preview :is(iconify-icon, svg[data-icon]) { font-size: 0.9rem; }
134
+ .oc-block-type-picker-art-video :is(iconify-icon, svg[data-icon]) { font-size: 2rem; }
135
+
136
+ /* Image: a small landscape in flat palette colors. */
137
+ .oc-block-type-picker-art-img { display: block; inline-size: 100%; block-size: 100%; border-radius: 0.3rem; }
138
+ .oc-block-type-picker-preview:has(.oc-block-type-picker-art-img) { padding: 0.35rem; }
139
+
140
+ /* Question: a line of text and three answer rows, one picked. */
141
+ .oc-block-type-picker-art-option {
142
+ display: flex;
143
+ align-items: center;
144
+ gap: 0.3rem;
145
+ padding: 0.1rem 0.3rem;
146
+ border: 1px solid var(--oc-border);
147
+ border-radius: 0.25rem;
148
+ }
149
+ .oc-block-type-picker-art-option::before {
150
+ content: "";
151
+ inline-size: 0.45rem;
152
+ block-size: 0.45rem;
153
+ border: 1px solid var(--oc-border-strong);
154
+ border-radius: 50%;
155
+ flex: none;
156
+ }
157
+ .oc-block-type-picker-art-option--on { border-color: var(--oc-primary); }
158
+ .oc-block-type-picker-art-option--on::before { border-color: var(--oc-primary); background: var(--oc-primary); box-shadow: inset 0 0 0 1.5px var(--oc-background); }
159
+
160
+ /* Callout: a tinted note with a bar on the left. */
161
+ .oc-block-type-picker-art-note {
162
+ padding: 0.3rem 0.45rem;
163
+ border-inline-start: 3px solid var(--oc-warning);
164
+ border-radius: 0.25rem;
165
+ background: oklch(from var(--oc-warning) l c h / 0.14);
166
+ }
167
+
168
+ /* Link: a small outline button. */
169
+ .oc-block-type-picker-art-btn {
170
+ justify-self: start;
171
+ display: inline-flex;
172
+ align-items: center;
173
+ gap: 0.25rem;
174
+ padding: 0.15rem 0.5rem;
175
+ border: 1px solid var(--oc-border-strong);
176
+ border-radius: 0.3rem;
177
+ font-weight: 600;
178
+ }
179
+
180
+ /* Countdown: the time and a bar that shrinks. */
181
+ .oc-block-type-picker-art-time { font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
182
+ .oc-block-type-picker-art-bar { block-size: 0.25rem; border-radius: 1rem; background: var(--oc-muted); overflow: hidden; }
183
+ .oc-block-type-picker-art-bar::before { content: ""; display: block; inline-size: 60%; block-size: 100%; background: var(--oc-primary); }
184
+
185
+ /* Tip: a closed row with a chevron. */
186
+ .oc-block-type-picker-art-row { display: flex; align-items: center; justify-content: space-between; padding: 0.15rem 0.35rem; border: 1px solid var(--oc-border); border-radius: 0.25rem; font-weight: 600; }
187
+
188
+ /* Video: a dark frame with a play button. */
189
+ .oc-block-type-picker-art-video {
190
+ display: grid;
191
+ place-items: center;
192
+ block-size: 100%;
193
+ border-radius: 0.3rem;
194
+ background: oklch(from var(--oc-primary) 0.26 0.05 h);
195
+ color: var(--color-white-50);
196
+ }
197
+ .oc-block-type-picker-preview:has(.oc-block-type-picker-art-video) { padding: 0.35rem; align-content: stretch; }
198
+
199
+ /* Code to scan: a QR-like pattern on a white plate (always dark on white, like a real code). */
200
+ .oc-block-type-picker-art-code { justify-self: center; block-size: 100%; aspect-ratio: 1; padding: 0.2rem; border-radius: 0.2rem; background: var(--color-white-50); color: var(--color-black-50); }
201
+ .oc-block-type-picker-preview:has(.oc-block-type-picker-art-code) { padding: 0.35rem; align-content: stretch; }
202
+ .oc-block-type-picker-preview:has(.oc-block-type-picker-art-code) > svg { block-size: 100%; min-block-size: 0; }
203
+
204
+ .oc-block-type-picker-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; padding-block-start: 0.25rem; border-block-start: 1px solid var(--oc-border); padding-block-start: 1rem; }
205
+
206
+ .oc-block-type-picker-empty { grid-column: 1 / -1; margin: 0; padding: 1.5rem; color: var(--oc-muted-foreground); font-size: 0.875rem; text-align: center; }
207
+ .oc-block-type-picker-empty[hidden] { display: none; }
208
+
209
+ @container oc-block-type-picker (min-width: 40rem) {
210
+ .oc-block-type-picker { padding: 1.5rem; }
211
+ .oc-block-type-picker-tools { grid-template-columns: minmax(12rem, 18rem) minmax(0, 1fr); }
212
+ .oc-block-type-picker-tools .oc-chip-filter { justify-content: flex-end; }
213
+ .oc-block-type-picker-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr)); }
214
+ }
215
+
216
+ /* Action mode (0.17.0): .oc-block-type-picker--action, every card a <button>: a click or Enter adds that type at once,
217
+ nothing is "selected", the arrow keys only move the focus. A card that cannot be used now keeps the focus
218
+ (aria-disabled="true", not disabled) and says why in .oc-block-type-picker-reason. [draggable="true"] shows a grab
219
+ cursor. */
220
+ button.oc-block-type-picker-item {
221
+ inline-size: 100%;
222
+ font: inherit;
223
+ text-align: start;
224
+ color: inherit;
225
+ align-content: start;
226
+ }
227
+ .oc-block-type-picker--action .oc-block-type-picker-item::after { content: none; }
228
+ .oc-block-type-picker--action .oc-block-type-picker-item:focus-visible {
229
+ outline: var(--oc-focus-width, 2px) solid var(--oc-ring);
230
+ outline-offset: 2px;
231
+ }
232
+ .oc-block-type-picker--action .oc-block-type-picker-item:active:not([aria-disabled="true"]) {
233
+ border-color: var(--oc-primary);
234
+ background: oklch(from var(--oc-primary) l c h / 0.07);
235
+ }
236
+ .oc-block-type-picker-item[draggable="true"]:not([aria-disabled="true"]) { cursor: grab; }
237
+ .oc-block-type-picker-item[draggable="true"]:active { cursor: grabbing; }
238
+ .oc-block-type-picker-item[aria-disabled="true"] { cursor: not-allowed; border-style: dashed; }
239
+ .oc-block-type-picker-item[aria-disabled="true"] .oc-block-type-picker-preview { opacity: 0.45; }
240
+ .oc-block-type-picker-item[aria-disabled="true"] .oc-block-type-picker-name { color: var(--oc-muted-foreground); }
241
+ .oc-block-type-picker-item[aria-disabled="true"]:hover { border-color: var(--oc-border); background: var(--oc-card); }
242
+ .oc-block-type-picker-reason {
243
+ display: flex;
244
+ align-items: flex-start;
245
+ gap: 0.25rem;
246
+ padding-inline: 0.15rem;
247
+ font-size: 0.75rem;
248
+ line-height: 1.4;
249
+ color: var(--oc-foreground);
250
+ }
251
+ .oc-block-type-picker-reason::before {
252
+ content: "";
253
+ flex: none;
254
+ inline-size: 0.8rem;
255
+ block-size: 0.8rem;
256
+ margin-block-start: 0.1rem;
257
+ background: var(--oc-warning);
258
+ -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20a10 10 0 0 0 0-20m1 15h-2v-2h2zm0-4h-2V7h2z'/%3E%3C/svg%3E") center / contain no-repeat;
259
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20a10 10 0 0 0 0-20m1 15h-2v-2h2zm0-4h-2V7h2z'/%3E%3C/svg%3E") center / contain no-repeat;
260
+ }
261
+
262
+ @media (prefers-reduced-motion: reduce) {
263
+ .oc-block-type-picker-item, .oc-block-type-picker-item::after { transition: none; }
264
+ }
265
+
266
+ /* Sample picture colors, shared by the picker, route-steps and step-view demos (theme based, so light and dark both
267
+ work). Use them on the shapes of an inline SVG placeholder; a real photo needs none of this. */
268
+ .oc-block-art-sky { fill: light-dark(oklch(from var(--oc-primary) 0.88 0.06 h), oklch(from var(--oc-primary) 0.36 0.07 h)); }
269
+ .oc-block-art-sun { fill: var(--oc-warning); }
270
+ .oc-block-art-land { fill: light-dark(oklch(from var(--oc-success) 0.56 0.12 h), oklch(from var(--oc-success) 0.46 0.1 h)); }
271
+ .oc-block-art-wall { fill: light-dark(oklch(from var(--oc-warning) 0.74 0.09 60), oklch(from var(--oc-warning) 0.56 0.08 60)); }
272
+ .oc-block-art-roof { fill: light-dark(oklch(from var(--oc-destructive) 0.5 0.12 35), oklch(from var(--oc-destructive) 0.42 0.1 35)); }
@@ -0,0 +1,17 @@
1
+ /* File: packages/ui/src/parts/data-dl-numbered.css */
2
+ /* Map: dl numbered -> counter per row (01, 02, ...) above the term */
3
+ /* .oc-dl--numbered puts a counter (01, 02, ... decimal-leading-zero) above each term, in the muted color with
4
+ tabular figures. Works with --glossary and --flush. Start at another number: style="counter-reset: oc-dl 4". */
5
+
6
+ .oc-dl--numbered { counter-reset: oc-dl; }
7
+ .oc-dl--numbered > .oc-dl-row { counter-increment: oc-dl; }
8
+ .oc-dl--numbered .oc-dl-term::before {
9
+ content: counter(oc-dl, decimal-leading-zero);
10
+ display: block;
11
+ margin-block-end: 0.25rem;
12
+ color: var(--oc-muted-foreground);
13
+ font-size: 0.875em;
14
+ font-weight: 500;
15
+ font-variant-numeric: tabular-nums;
16
+ letter-spacing: 0.04em;
17
+ }
@@ -60,11 +60,18 @@
60
60
  dominant-baseline: central;
61
61
  pointer-events: none;
62
62
  }
63
+ /* Labels in the foreground color, large enough to read at the usual size, with a halo in the background color
64
+ (--oc-graph-bg) so a line passing under a label never cuts through its letters. */
63
65
  .oc-graph__label {
64
- fill: var(--oc-muted-foreground);
66
+ fill: var(--oc-foreground);
65
67
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
66
- font-size: 8.5px;
68
+ font-size: 10.5px;
69
+ font-weight: 500;
67
70
  text-anchor: middle;
71
+ paint-order: stroke;
72
+ stroke: var(--oc-graph-bg, var(--oc-background));
73
+ stroke-width: 3.5px;
74
+ stroke-linejoin: round;
68
75
  pointer-events: none;
69
76
  }
70
77
  .oc-graph__node:focus-visible .oc-graph__dot { stroke: var(--oc-ring); stroke-width: 2.5; }
@@ -98,8 +105,9 @@
98
105
  }
99
106
 
100
107
  /* Focus: .is-focused on the graph and .is-active on one node light that node and its edge; the rest dims. */
101
- .oc-graph.is-focused .oc-graph__node:not(.is-active, .oc-graph__node--center) { opacity: 0.15; }
102
- .oc-graph.is-focused .oc-graph__edge { stroke-opacity: 0.08; stroke-width: 1; }
108
+ /* Dimmed, not gone: the other nodes stay readable as context (also on the dark background). --oc-graph-dim tunes it. */
109
+ .oc-graph.is-focused .oc-graph__node:not(.is-active, .oc-graph__node--center) { opacity: var(--oc-graph-dim, 0.4); }
110
+ .oc-graph.is-focused .oc-graph__edge { stroke-opacity: 0.22; stroke-width: 1; }
103
111
  .oc-graph.is-focused .oc-graph__edge.is-active { stroke-opacity: 0.8; stroke-width: 3; }
104
112
  .oc-graph__node.is-active .oc-graph__dot { fill-opacity: 1; scale: 1.55; }
105
113
  .oc-graph__node.is-active .oc-graph__halo { stroke-opacity: 0.6; stroke-width: 14; }
@@ -0,0 +1,142 @@
1
+ /* File: packages/ui/src/parts/forms-combobox-catalog.css
2
+ Map: panel (list + footer) -> option text with a description -> image and emoji -> clear and custom rows -> loading row
3
+ -> manage footer -> list in document.body (portal) -> forced colors
4
+ Catalog mode of the combobox (0.17.0): long server-searched lists of customers, products or codes. A two-line option
5
+ (label + muted description), an image or emoji in the icon column, a first row that clears the choice, a row that takes
6
+ what was typed, a loading row, a footer with a manage link, and a list moved to document.body so a scrolling or clipping
7
+ parent does not cut it off. Theme tokens only; flat, no gradient, no glow. */
8
+
9
+ /* Panel: with a footer the popup is a div (.oc-combobox-list--panel) around the listbox and the footer. */
10
+ .oc-combobox-list.oc-combobox-list--panel {
11
+ display: flex;
12
+ flex-direction: column;
13
+ padding: 0;
14
+ overflow: hidden;
15
+ }
16
+ .oc-combobox-options {
17
+ flex: 1 1 auto;
18
+ min-block-size: 0;
19
+ margin: 0;
20
+ padding: 4px;
21
+ overflow-y: auto;
22
+ list-style: none;
23
+ }
24
+ /* Options without an icon in a list that has icons: same start as in .oc-combobox-list (forms-combobox-icons.css). */
25
+ .oc-combobox-options:has(.oc-combobox-option-icon, .oc-combobox-option-image, .oc-combobox-option-emoji) > .oc-combobox-option:not(:has(> :is(.oc-combobox-option-icon, .oc-combobox-option-image, .oc-combobox-option-emoji)), .oc-combobox-clear, .oc-combobox-custom),
26
+ .oc-combobox-list:has(.oc-combobox-option-image, .oc-combobox-option-emoji) > .oc-combobox-option:not(:has(> :is(.oc-combobox-option-icon, .oc-combobox-option-image, .oc-combobox-option-emoji)), .oc-combobox-clear, .oc-combobox-custom) {
27
+ padding-inline-start: calc(0.625rem + var(--oc-combobox-icon) + 0.5rem);
28
+ }
29
+
30
+ /* Two lines: label + muted description. */
31
+ .oc-combobox-option-text {
32
+ display: grid;
33
+ flex: 1 1 auto;
34
+ gap: 1px;
35
+ min-inline-size: 0;
36
+ }
37
+ .oc-combobox-option-label {
38
+ overflow: hidden;
39
+ text-overflow: ellipsis;
40
+ white-space: nowrap;
41
+ }
42
+ .oc-combobox-option-description {
43
+ overflow: hidden;
44
+ font-size: 0.75rem;
45
+ line-height: 1.35;
46
+ text-overflow: ellipsis;
47
+ white-space: nowrap;
48
+ color: var(--oc-muted-foreground);
49
+ }
50
+ .oc-combobox-option:is(:hover, :focus-visible, [data-active]) .oc-combobox-option-description { color: inherit; opacity: 0.8; }
51
+ .oc-combobox-option:has(> .oc-combobox-option-text) { justify-content: flex-start; }
52
+ .oc-combobox-option:has(> .oc-combobox-option-text)[aria-selected="true"]::after { flex: none; margin-inline-start: auto; }
53
+
54
+ /* Image and emoji take the icon column. */
55
+ .oc-combobox-option-image,
56
+ .oc-combobox-option-emoji {
57
+ display: inline-flex;
58
+ flex: none;
59
+ align-items: center;
60
+ justify-content: center;
61
+ inline-size: var(--oc-combobox-icon, 1.125rem);
62
+ block-size: var(--oc-combobox-icon, 1.125rem);
63
+ line-height: 1;
64
+ }
65
+ img.oc-combobox-option-image {
66
+ border-radius: calc(var(--oc-radius) - 4px);
67
+ object-fit: cover;
68
+ /* A wide logo (mark + name) shows its mark on the left instead of a cropped middle. */
69
+ object-position: left center;
70
+ }
71
+ .oc-combobox-option-emoji { font-size: 1rem; }
72
+ .oc-combobox-option:has(> :is(.oc-combobox-option-image, .oc-combobox-option-emoji)) { justify-content: flex-start; }
73
+ .oc-combobox-option:has(> :is(.oc-combobox-option-image, .oc-combobox-option-emoji))[aria-selected="true"]::after { margin-inline-start: auto; }
74
+ .oc-combobox-icon > .oc-combobox-option-image,
75
+ .oc-combobox-icon > .oc-combobox-option-emoji { inline-size: 100%; block-size: 100%; }
76
+ /* The selected logo in the field: the icon square, cropped from the left like in the list (not a tiny contained wordmark). */
77
+ .oc-combobox-icon > img.oc-combobox-option-image { inline-size: var(--oc-combobox-icon, 1.125rem); block-size: var(--oc-combobox-icon, 1.125rem); object-fit: cover; object-position: left center; }
78
+ .oc-combobox-icon > .oc-combobox-option-emoji { inline-size: auto; block-size: auto; }
79
+ .oc-combobox-icon:has(> .oc-combobox-option-emoji) { color: inherit; }
80
+
81
+ /* Clear row: muted, separated from the options under it. */
82
+ .oc-combobox-clear {
83
+ color: var(--oc-muted-foreground);
84
+ font-style: italic;
85
+ border-block-end: 1px solid var(--oc-border);
86
+ border-end-start-radius: 0;
87
+ border-end-end-radius: 0;
88
+ margin-block-end: 2px;
89
+ }
90
+ /* Custom row: "Use ..." at the end, in the primary colour. */
91
+ .oc-combobox-custom {
92
+ color: var(--oc-primary);
93
+ font-weight: 500;
94
+ }
95
+ .oc-combobox-custom:is(:hover, :focus-visible, [data-active]) { color: var(--oc-accent-foreground); }
96
+ .oc-combobox-custom[hidden],
97
+ .oc-combobox-clear[hidden],
98
+ .oc-combobox-loading[hidden] { display: none; }
99
+
100
+ /* Loading row (aria-busy on the listbox). */
101
+ .oc-combobox-loading {
102
+ padding: 0.75rem 1rem;
103
+ text-align: center;
104
+ color: var(--oc-muted-foreground);
105
+ }
106
+
107
+ /* Footer with the manage link: outside the listbox, stays at the bottom while the options scroll. */
108
+ .oc-combobox-footer {
109
+ flex: none;
110
+ padding: 4px;
111
+ border-block-start: 1px solid var(--oc-border);
112
+ background: var(--oc-popover);
113
+ }
114
+ .oc-combobox-footer > a {
115
+ display: flex;
116
+ align-items: center;
117
+ gap: 0.5rem;
118
+ padding: 0.4rem 0.625rem;
119
+ border-radius: calc(var(--oc-radius) - 2px);
120
+ color: var(--oc-primary);
121
+ font-weight: 500;
122
+ text-decoration: none;
123
+ }
124
+ .oc-combobox-footer > a:is(:hover, :focus-visible) { background: var(--oc-accent); color: var(--oc-accent-foreground); outline: none; }
125
+
126
+ /* Portal: the list lives in document.body, fixed under the field (top/left/width set by the script or wrapper). It is
127
+ no longer inside .oc-combobox, so [data-open] on the list itself shows it. */
128
+ .oc-combobox-list.oc-combobox-list--portal {
129
+ position: fixed;
130
+ inset: auto;
131
+ z-index: 1000;
132
+ max-inline-size: calc(100vw - 16px);
133
+ }
134
+ .oc-combobox-list--portal[data-open=""] { visibility: visible; opacity: 1; translate: 0 0; transition-delay: 0s; }
135
+ .oc-combobox-list--portal[data-open="false"] { visibility: hidden; opacity: 0; }
136
+
137
+ @media (forced-colors: active) {
138
+ .oc-combobox-clear,
139
+ .oc-combobox-footer { border-color: CanvasText; }
140
+ .oc-combobox-custom,
141
+ .oc-combobox-footer > a { color: LinkText; }
142
+ }