@birdycom/omniaui 0.16.1 → 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.
- package/bin/lib/copy-js.mjs +8 -0
- package/bin/lib/webicons-builtin.json +1 -0
- package/bin/lib/webicons.mjs +4 -0
- package/dist/back-link.d.ts +6 -0
- package/dist/back-link.js +54 -0
- package/dist/barcode.d.ts +5 -1
- package/dist/barcode.js +29 -8
- package/dist/calendar.d.ts +17 -0
- package/dist/calendar.js +190 -0
- package/dist/code-block.css +3 -0
- package/dist/combobox.d.ts +27 -4
- package/dist/combobox.js +231 -33
- package/dist/components-extra.css +33 -2
- package/dist/components.css +2112 -166
- package/dist/components.min.css +1 -1
- package/dist/countdown.d.ts +11 -0
- package/dist/countdown.js +76 -0
- package/dist/data-table.d.ts +28 -0
- package/dist/data-table.js +186 -18
- package/dist/docs-ui.css +11 -1
- package/dist/glass-lens.d.ts +41 -0
- package/dist/glass-lens.js +307 -0
- package/dist/input-mask.d.ts +31 -0
- package/dist/input-mask.js +228 -0
- package/dist/nav-overflow.d.ts +11 -0
- package/dist/nav-overflow.js +151 -0
- package/dist/oc-theme.css +1 -1
- package/dist/parts/app-0160-apps.css +6 -0
- package/dist/parts/app-compound-overlays.css +68 -0
- package/dist/parts/app-countdown.css +66 -0
- package/dist/parts/app-data-table-footer.css +6 -3
- package/dist/parts/app-data-table-server.css +47 -0
- package/dist/parts/app-data-table.css +27 -1
- package/dist/parts/app-header-settings.css +9 -0
- package/dist/parts/app-mode-badge.css +12 -0
- package/dist/parts/app-module-color.css +152 -0
- package/dist/parts/app-name-card.css +5 -0
- package/dist/parts/app-page-header.css +1 -1
- package/dist/parts/app-recovery-codes-extras.css +13 -0
- package/dist/parts/app-sidebar-meta.css +14 -3
- package/dist/parts/app-sidebar-provider.css +98 -0
- package/dist/parts/app-table-actions.css +16 -0
- package/dist/parts/app-top-progress.css +3 -0
- package/dist/parts/app-tree.css +6 -0
- package/dist/parts/app-type-picker.css +272 -0
- package/dist/parts/data-dl-numbered.css +17 -0
- package/dist/parts/data-graph.css +12 -4
- package/dist/parts/forms-combobox-catalog.css +142 -0
- package/dist/parts/forms-combobox-icons.css +40 -2
- package/dist/parts/forms-copy-field-extras.css +47 -0
- package/dist/parts/forms-field-extras.css +55 -0
- package/dist/parts/forms-form-section.css +39 -1
- package/dist/parts/forms-ledger.css +98 -0
- package/dist/parts/media-aspect-flush.css +6 -0
- package/dist/parts/media-barcode.css +25 -4
- package/dist/parts/media-doc-viewer.css +2 -0
- package/dist/parts/media-entity-card.css +5 -0
- package/dist/parts/media-glass-liquid.css +10 -5
- package/dist/parts/media-glass-options.css +37 -5
- package/dist/parts/media-glass.css +85 -35
- package/dist/parts/media-scrim.css +51 -0
- package/dist/parts/nav-topbar-variants.css +12 -4
- package/dist/parts/site-header-variants.css +40 -4
- package/dist/parts/site-hero-media.css +88 -0
- package/dist/parts/site-price-card.css +3 -1
- package/dist/parts/site-split-reverse.css +11 -0
- package/dist/parts/site-tint-card.css +5 -4
- package/dist/parts/utility-hover.css +6 -3
- package/dist/showcase.css +73 -31
- package/dist/sidebar.d.ts +22 -0
- package/dist/sidebar.js +161 -0
- package/dist/tabs.d.ts +9 -0
- package/dist/tabs.js +104 -0
- package/dist/theme.js +20 -4
- package/manifest.json +24 -0
- package/package.json +10 -2
- package/snippets/accordion-accent.html +1 -1
- package/snippets/copy-field.html +44 -6
- package/snippets/countdown.html +12 -0
- package/snippets/dropdown-menu.html +2 -0
- package/snippets/glass.html +3 -3
- package/snippets/hero-media.html +20 -0
- package/snippets/page-header.html +1 -1
- package/snippets/recovery-codes.html +55 -6
- package/snippets/scrim.html +19 -0
package/dist/showcase.css
CHANGED
|
@@ -153,7 +153,10 @@
|
|
|
153
153
|
Your own ratio: set --oc-split-cols in a class (and to 1fr in a media query for small screens). */
|
|
154
154
|
.oc-split--lead { --oc-split-cols: 1.25fr 1fr; }
|
|
155
155
|
.oc-split--media { --oc-split-cols: 1fr 1.15fr; }
|
|
156
|
-
.oc-split__media { display: grid; place-items: center; }
|
|
156
|
+
.oc-split__media { display: grid; place-items: center; container-type: inline-size; }
|
|
157
|
+
/* A large product mark never grows wider than its column: in a narrow box (a card, a docs preview) the text keeps its
|
|
158
|
+
share of the split instead of being squeezed to a few words per line. */
|
|
159
|
+
.oc-split__media .oc-icon-tile--xl { --oc-tile-size: min(clamp(7rem, 22vw, 15rem), 100cqi); }
|
|
157
160
|
/* Columns aligned at the top (a fact list next to a long text). */
|
|
158
161
|
.oc-split--top { align-items: start; }
|
|
159
162
|
/* --oc-split-cols-wide: your own ratio that only applies above 960px, so the split still stacks on a phone. */
|
|
@@ -226,7 +229,10 @@
|
|
|
226
229
|
.oc-browser-frame__bar > i { inline-size: 0.6rem; aspect-ratio: 1; border-radius: 50%; background: var(--oc-border-strong); }
|
|
227
230
|
.oc-browser-frame__bar > i:first-child { background: var(--oc-accent-from); }
|
|
228
231
|
.oc-browser-frame > img,
|
|
229
|
-
.oc-browser-frame__body { display: block; inline-size: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
|
|
232
|
+
.oc-browser-frame__body { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
|
|
233
|
+
/* block-size: auto above: an <img> with width/height attributes keeps the 16 / 10 box instead of its attribute height
|
|
234
|
+
(which cropped the sides). An <img> inside the body (the React, Vue and Blade showcase render it so) fills that box too. */
|
|
235
|
+
.oc-browser-frame__body > img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; object-position: top; }
|
|
230
236
|
|
|
231
237
|
/* Icon tile: rounded square with an accent gradient (product logo, feature icon) */
|
|
232
238
|
.oc-icon-tile {
|
|
@@ -252,7 +258,7 @@
|
|
|
252
258
|
.oc-icon-tile--float { animation: oc-float 6s ease-in-out infinite; }
|
|
253
259
|
@keyframes oc-float { 50% { translate: 0 -12px; } }
|
|
254
260
|
|
|
255
|
-
/* Product / feature card with hover lift and accent glow */
|
|
261
|
+
/* Product / feature card with a soft hover lift and an accent border (no glow) */
|
|
256
262
|
.oc-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--oc-card-min, 17rem)), 1fr)); gap: var(--oc-card-gap, 1.25rem); }
|
|
257
263
|
/* Wide cards (projects, case studies): from 32rem, three in a row on a wide screen. */
|
|
258
264
|
.oc-card-grid--wide { --oc-card-min: 32rem; --oc-card-gap: 1.5rem; }
|
|
@@ -267,30 +273,24 @@
|
|
|
267
273
|
padding: 1.6rem;
|
|
268
274
|
border: 1px solid var(--oc-border);
|
|
269
275
|
border-radius: var(--oc-radius-lg);
|
|
270
|
-
background:
|
|
271
|
-
radial-gradient(22rem circle at 50% 0%, oklch(from var(--oc-accent-from) l c h / var(--oc-glow, 0)), transparent 60%),
|
|
272
|
-
var(--oc-surface);
|
|
276
|
+
background: var(--oc-surface);
|
|
273
277
|
color: var(--oc-foreground);
|
|
274
278
|
text-decoration: none;
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
@property --oc-glow {
|
|
278
|
-
syntax: "<number>";
|
|
279
|
-
inherits: false;
|
|
280
|
-
initial-value: 0;
|
|
279
|
+
/* Timing lives in parts/utility-hover.css: 0.3s ease after a 0.08s delay, so the lift eases in instead of jumping. */
|
|
280
|
+
transition: translate 0.3s ease 0.08s, border-color 0.3s ease 0.08s;
|
|
281
281
|
}
|
|
282
282
|
.oc-product-card:hover {
|
|
283
|
-
--oc-glow: 0.22;
|
|
284
283
|
/* The lift uses translate; a fly-in (.oc-reveal--fly) animates the transform, so both keep working. */
|
|
285
284
|
translate: 0 calc(-1 * var(--oc-hover-lift, 6px));
|
|
286
|
-
border-color: oklch(from var(--oc-accent-from) l c h / 0.
|
|
285
|
+
border-color: oklch(from var(--oc-accent-from) l c h / 0.45);
|
|
287
286
|
}
|
|
288
287
|
.oc-product-card__top { display: flex; justify-content: space-between; align-items: flex-start; margin-block-end: 0.75rem; }
|
|
289
288
|
.oc-product-card__name { margin: 0; font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em; }
|
|
290
289
|
.oc-product-card__tagline { margin: 0; color: light-dark(oklch(from var(--oc-accent-from) min(l, 0.52) c h), oklch(from var(--oc-accent-from) max(l, 0.72) c h)); font-weight: 600; font-size: 0.95rem; }
|
|
291
290
|
.oc-product-card__summary { margin: 0; color: var(--oc-muted-foreground); font-size: 0.95rem; flex-grow: 1; }
|
|
292
291
|
.oc-product-card__more { display: inline-flex; align-items: center; gap: 0.4rem; margin-block-start: 0.75rem; font-weight: 600; font-size: 0.92rem; }
|
|
293
|
-
.oc-product-card__more::after { content: "\002192"; transition: translate 0.
|
|
292
|
+
.oc-product-card__more::after { content: "\002192"; transition: translate 0.3s ease 0.08s; }
|
|
293
|
+
@media (prefers-reduced-motion: reduce) { .oc-product-card__more::after { transition: none; } .oc-product-card:hover .oc-product-card__more::after { translate: none; } }
|
|
294
294
|
.oc-product-card:hover .oc-product-card__more::after { translate: 5px 0; }
|
|
295
295
|
|
|
296
296
|
/* Pill badge (neutral) and accent pill + pulsing status dot */
|
|
@@ -348,11 +348,13 @@
|
|
|
348
348
|
.oc-stat-strip {
|
|
349
349
|
display: grid;
|
|
350
350
|
grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
|
|
351
|
+
overflow: hidden;
|
|
351
352
|
border-block: 1px solid var(--oc-border);
|
|
352
353
|
background: var(--oc-surface);
|
|
353
354
|
}
|
|
354
|
-
|
|
355
|
-
|
|
355
|
+
/* Cell lines as a 1px shadow on the start and top side of every figure; the strip clips the ones on its outer edge.
|
|
356
|
+
So the lines stay even for any number of columns (4, 2 + 2, 1 per row) and container width. */
|
|
357
|
+
.oc-stat-strip__item { padding: 2rem 1.5rem; box-shadow: -1px 0 0 var(--oc-border), 0 -1px 0 var(--oc-border); }
|
|
356
358
|
.oc-stat-strip__value { font-family: var(--oc-font-display, inherit); font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 700; line-height: 1.1; }
|
|
357
359
|
.oc-stat-strip__suffix { color: var(--oc-brand-1); }
|
|
358
360
|
.oc-stat-strip__label { display: block; color: var(--oc-muted-foreground); font-size: 0.92rem; }
|
|
@@ -361,8 +363,6 @@
|
|
|
361
363
|
/* Four figures on a narrower screen: two rows of two instead of three and one. */
|
|
362
364
|
@media (max-width: 960px) {
|
|
363
365
|
.oc-stat-strip:has(> .oc-stat-strip__item:nth-child(4):last-child) { grid-template-columns: 1fr 1fr; }
|
|
364
|
-
.oc-stat-strip:has(> .oc-stat-strip__item:nth-child(4):last-child) > .oc-stat-strip__item:nth-child(3) { border-inline-start: 0; }
|
|
365
|
-
.oc-stat-strip:has(> .oc-stat-strip__item:nth-child(4):last-child) > .oc-stat-strip__item:nth-child(n + 3) { border-block-start: 1px solid var(--oc-border); }
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
/* Spotlight: large highlighted panel with copy + module list */
|
|
@@ -395,7 +395,7 @@
|
|
|
395
395
|
.oc-steps > li { position: relative; padding: 1.75rem 1.5rem; border-block-start: 2px solid var(--oc-border-strong); counter-increment: oc-step; }
|
|
396
396
|
.oc-steps > li::before { content: ""; position: absolute; inset-block-start: -2px; inset-inline-start: 0; inline-size: 3rem; block-size: 2px; background: var(--oc-gradient-brand); }
|
|
397
397
|
.oc-steps > li::after { content: counter(oc-step, decimal-leading-zero); position: absolute; inset-block-start: 1.75rem; inset-inline-end: 1.5rem; color: var(--oc-brand-1); font-family: var(--oc-font-mono); font-size: 0.85rem; }
|
|
398
|
-
.oc-steps h3 { margin: 0 0 0.5rem; font-size: 1.3rem; }
|
|
398
|
+
.oc-steps h3 { margin: 0 0 0.5rem; font-size: 1.3rem; color: var(--oc-foreground); }
|
|
399
399
|
.oc-steps p { margin: 0; color: var(--oc-muted-foreground); font-size: 0.95rem; }
|
|
400
400
|
|
|
401
401
|
/* Marquee: endless scrolling row (repeat the items once; pauses on hover) */
|
|
@@ -473,15 +473,17 @@
|
|
|
473
473
|
.oc-site-header__toggle { display: none; padding: 0.5rem 0.7rem; border: 1px solid var(--oc-border); border-radius: var(--oc-radius-md); background: var(--oc-surface); color: var(--oc-foreground); cursor: pointer; }
|
|
474
474
|
/* The icon in the menu button is a block, so the button is as tall as a line of text (no inline gap under it). */
|
|
475
475
|
.oc-site-header__toggle :is(svg, img, iconify-icon, .oc-icon) { display: block; }
|
|
476
|
+
/* The media queries below follow the window. A header with .oc-site-header--container follows its own width instead
|
|
477
|
+
(container queries further down); :where() keeps it out of these rules without adding specificity. */
|
|
476
478
|
@media (min-width: 861px) {
|
|
477
479
|
/* Desktop: the popover nav is always visible in the header bar. */
|
|
478
|
-
.oc-site-header__nav[popover] { display: flex; }
|
|
480
|
+
.oc-site-header__nav[popover]:where(:not(.oc-site-header--container *)) { display: flex; }
|
|
479
481
|
}
|
|
480
482
|
@media (max-width: 860px) {
|
|
481
|
-
.oc-site-header__toggle { display: block; }
|
|
483
|
+
.oc-site-header__toggle:where(:not(.oc-site-header--container *)) { display: block; }
|
|
482
484
|
/* The author rule display:flex above beats the UA rule that hides a closed popover. */
|
|
483
|
-
.oc-site-header__nav[popover]:not(:popover-open) { display: none; }
|
|
484
|
-
.oc-site-header__nav[popover]:popover-open {
|
|
485
|
+
.oc-site-header__nav[popover]:not(:popover-open):where(:not(.oc-site-header--container *)) { display: none; }
|
|
486
|
+
.oc-site-header__nav[popover]:popover-open:where(:not(.oc-site-header--container *)) {
|
|
485
487
|
position: fixed;
|
|
486
488
|
inset: 4.5rem 0 auto;
|
|
487
489
|
/* The UA popover style sizes to fit-content; let inset span the full width. */
|
|
@@ -497,16 +499,49 @@
|
|
|
497
499
|
backdrop-filter: blur(16px);
|
|
498
500
|
}
|
|
499
501
|
/* Not the items of a dropdown in the menu (language select): they keep their own size. */
|
|
500
|
-
.oc-site-header__nav[popover] a:not(.oc-btn, .oc-dropdown-item) { padding: 0.75rem 0; font-size: 1.1rem; }
|
|
502
|
+
.oc-site-header__nav[popover] a:not(.oc-btn, .oc-dropdown-item):where(:not(.oc-site-header--container *)) { padding: 0.75rem 0; font-size: 1.1rem; }
|
|
501
503
|
/* The call to action (.oc-site-header__cta, a button) gets room above it in the open menu. */
|
|
502
|
-
.oc-site-header__cta { margin-block-start: 0.75rem; }
|
|
504
|
+
.oc-site-header__cta:where(:not(.oc-site-header--container *)) { margin-block-start: 0.75rem; }
|
|
503
505
|
}
|
|
504
506
|
/* --collapse-lg: the menu becomes a popover below 1180px instead of 860px, for a bar with many or long items
|
|
505
507
|
(theme switch, language select, long words). A media query cannot read a variable, so it is a modifier. */
|
|
506
508
|
@media (min-width: 861px) and (max-width: 1180px) {
|
|
507
|
-
.oc-site-header--collapse-lg .oc-site-header__toggle { display: block; }
|
|
508
|
-
.oc-site-header--collapse-lg .oc-site-header__nav[popover]:not(:popover-open) { display: none; }
|
|
509
|
-
.oc-site-header--collapse-lg .oc-site-header__nav[popover]:popover-open {
|
|
509
|
+
.oc-site-header--collapse-lg:where(:not(.oc-site-header--container)) .oc-site-header__toggle { display: block; }
|
|
510
|
+
.oc-site-header--collapse-lg:where(:not(.oc-site-header--container)) .oc-site-header__nav[popover]:not(:popover-open) { display: none; }
|
|
511
|
+
.oc-site-header--collapse-lg:where(:not(.oc-site-header--container)) .oc-site-header__nav[popover]:popover-open {
|
|
512
|
+
position: fixed;
|
|
513
|
+
inset: 4.5rem 0 auto;
|
|
514
|
+
inline-size: auto;
|
|
515
|
+
block-size: auto;
|
|
516
|
+
display: flex;
|
|
517
|
+
flex-direction: column;
|
|
518
|
+
align-items: stretch;
|
|
519
|
+
gap: 0.25rem;
|
|
520
|
+
padding: 1rem 1.25rem 1.5rem;
|
|
521
|
+
border-block-end: 1px solid var(--oc-border);
|
|
522
|
+
background: oklch(from var(--oc-background) l c h / 0.96);
|
|
523
|
+
backdrop-filter: blur(16px);
|
|
524
|
+
}
|
|
525
|
+
.oc-site-header--collapse-lg:where(:not(.oc-site-header--container)) .oc-site-header__nav[popover] a:not(.oc-btn, .oc-dropdown-item) { padding: 0.75rem 0; font-size: 1.1rem; }
|
|
526
|
+
.oc-site-header--collapse-lg:where(:not(.oc-site-header--container)) .oc-site-header__cta { margin-block-start: 0.75rem; }
|
|
527
|
+
}
|
|
528
|
+
/* --container (0.17.0): the menu folds into the menu button at the width of the header itself, not of the window.
|
|
529
|
+
For a header in a narrow column, a card, a preview or a side panel. The open menu is anchored under the header and
|
|
530
|
+
as wide as the header (anchor positioning); without anchor positioning it opens under the top of the window. */
|
|
531
|
+
.oc-site-header--container { container: oc-site-header / inline-size; }
|
|
532
|
+
/* Every header has its own anchor: the menu of one header never opens under another one. The Pro mega menu names the
|
|
533
|
+
header --oc-mega-header; both names are kept (the doubled class wins over that single name). */
|
|
534
|
+
.oc-site-header.oc-site-header--container {
|
|
535
|
+
anchor-name: --oc-site-header, --oc-mega-header;
|
|
536
|
+
anchor-scope: --oc-site-header, --oc-mega-header;
|
|
537
|
+
}
|
|
538
|
+
@container oc-site-header (min-width: 53.8125rem) {
|
|
539
|
+
.oc-site-header--container .oc-site-header__nav[popover] { display: flex; }
|
|
540
|
+
}
|
|
541
|
+
@container oc-site-header (max-width: 53.75rem) {
|
|
542
|
+
.oc-site-header--container .oc-site-header__toggle { display: block; }
|
|
543
|
+
.oc-site-header--container .oc-site-header__nav[popover]:not(:popover-open) { display: none; }
|
|
544
|
+
.oc-site-header--container .oc-site-header__nav[popover]:popover-open {
|
|
510
545
|
position: fixed;
|
|
511
546
|
inset: 4.5rem 0 auto;
|
|
512
547
|
inline-size: auto;
|
|
@@ -520,8 +555,15 @@
|
|
|
520
555
|
background: oklch(from var(--oc-background) l c h / 0.96);
|
|
521
556
|
backdrop-filter: blur(16px);
|
|
522
557
|
}
|
|
523
|
-
|
|
524
|
-
|
|
558
|
+
@supports (anchor-name: --a) {
|
|
559
|
+
.oc-site-header--container .oc-site-header__nav[popover]:popover-open {
|
|
560
|
+
position-anchor: --oc-site-header;
|
|
561
|
+
inset: anchor(bottom) anchor(right) auto anchor(left);
|
|
562
|
+
border-inline: 1px solid var(--oc-border);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
.oc-site-header--container .oc-site-header__nav[popover] a:not(.oc-btn, .oc-dropdown-item) { padding: 0.75rem 0; font-size: 1.1rem; }
|
|
566
|
+
.oc-site-header--container .oc-site-header__cta { margin-block-start: 0.75rem; }
|
|
525
567
|
}
|
|
526
568
|
|
|
527
569
|
/* Site footer: brand column + link columns + bottom bar */
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// File: packages/ui/src/sidebar.d.ts
|
|
2
|
+
// Types for the sidebar provider script (persist, mobile overlay, trigger, rail, shortcut).
|
|
3
|
+
|
|
4
|
+
export interface SidebarProviderController {
|
|
5
|
+
/** The sidebar shows icons only (desktop) or is closed (mobile). */
|
|
6
|
+
collapsed: boolean;
|
|
7
|
+
/** Below the mobile breakpoint. */
|
|
8
|
+
isMobile: boolean;
|
|
9
|
+
setCollapsed(collapsed: boolean): void;
|
|
10
|
+
toggle(): void;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** Detail of the oc-sidebar-change event on the provider. */
|
|
14
|
+
export interface SidebarChangeDetail {
|
|
15
|
+
collapsed: boolean;
|
|
16
|
+
mobile: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function sidebarStorageKey(key: string | boolean | null | undefined, storage?: "local" | "cookie"): string | null;
|
|
20
|
+
export function bindSidebarProvider(root: HTMLElement): SidebarProviderController | null;
|
|
21
|
+
export function getSidebarProvider(root: HTMLElement): SidebarProviderController | null;
|
|
22
|
+
export function initSidebarProviders(scope?: ParentNode): void;
|
package/dist/sidebar.js
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
// File: packages/ui/src/sidebar.js
|
|
2
|
+
// Map: storage key -> read / write the remembered state -> bind one provider (sidebars, triggers, rails, mobile overlay,
|
|
3
|
+
// shortcut, oc-sidebar-change) -> init all -> boot
|
|
4
|
+
// Sidebar provider for plain HTML, Blade and Livewire (0.17.0). Markup:
|
|
5
|
+
// <div class="oc-sidebar-provider" data-oc-sidebar-provider data-oc-persist="app">
|
|
6
|
+
// <aside class="oc-sidebar">…</aside>
|
|
7
|
+
// <button class="oc-sidebar-rail" type="button" data-oc-sidebar-rail aria-label="Toggle sidebar"></button>
|
|
8
|
+
// <main class="oc-sidebar-inset"><button data-oc-sidebar-trigger aria-label="Toggle sidebar">…</button> …</main>
|
|
9
|
+
// </div>
|
|
10
|
+
// Options on the provider: data-oc-persist (key; remembers the desktop state), data-oc-storage ("local" default or
|
|
11
|
+
// "cookie": oc-sidebar-<key>, readable by the server), data-oc-mobile-breakpoint (px, default 768, 0 = never),
|
|
12
|
+
// data-oc-shortcut (Ctrl/Cmd + key, default "b", "" = none), data-state="collapsed" (start collapsed).
|
|
13
|
+
// Below the breakpoint the sidebar opens over the page (.oc-sidebar--overlay) and starts closed; Escape or a click outside
|
|
14
|
+
// closes it. Every change fires oc-sidebar-change { collapsed, mobile } on the provider.
|
|
15
|
+
|
|
16
|
+
const controllers = new WeakMap();
|
|
17
|
+
|
|
18
|
+
/** localStorage key `oc-sidebar:<key>` or cookie name `oc-sidebar-<key>`; null without a key. */
|
|
19
|
+
export function sidebarStorageKey(key, storage = "local") {
|
|
20
|
+
if (key == null || key === false || key === "") return null;
|
|
21
|
+
const name = key === true ? "default" : String(key);
|
|
22
|
+
return storage === "cookie" ? `oc-sidebar-${name}` : `oc-sidebar:${name}`;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function readState(name, storage) {
|
|
26
|
+
if (!name) return undefined;
|
|
27
|
+
try {
|
|
28
|
+
const raw = storage === "cookie"
|
|
29
|
+
? document.cookie.split("; ").find((c) => c.startsWith(`${name}=`))?.slice(name.length + 1)
|
|
30
|
+
: window.localStorage.getItem(name);
|
|
31
|
+
return raw === "1" ? true : raw === "0" ? false : undefined;
|
|
32
|
+
} catch {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function writeState(name, storage, collapsed) {
|
|
38
|
+
if (!name) return;
|
|
39
|
+
try {
|
|
40
|
+
if (storage === "cookie") document.cookie = `${name}=${collapsed ? "1" : "0"}; path=/; max-age=31536000; samesite=lax`;
|
|
41
|
+
else window.localStorage.setItem(name, collapsed ? "1" : "0");
|
|
42
|
+
} catch {
|
|
43
|
+
// Private mode can block storage: the sidebar still works for this visit.
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** Wire one provider. Returns { collapsed, isMobile, setCollapsed(bool), toggle() }; calling it again returns the same. */
|
|
48
|
+
export function bindSidebarProvider(root) {
|
|
49
|
+
if (!root) return null;
|
|
50
|
+
const known = controllers.get(root);
|
|
51
|
+
if (known) return known;
|
|
52
|
+
|
|
53
|
+
const storage = root.dataset.ocStorage === "cookie" ? "cookie" : "local";
|
|
54
|
+
const storeName = sidebarStorageKey(root.dataset.ocPersist, storage);
|
|
55
|
+
const breakpoint = root.dataset.ocMobileBreakpoint == null ? 768 : Number(root.dataset.ocMobileBreakpoint) || 0;
|
|
56
|
+
const shortcut = root.dataset.ocShortcut == null ? "b" : root.dataset.ocShortcut;
|
|
57
|
+
const own = (el) => el.closest("[data-oc-sidebar-provider]") === root;
|
|
58
|
+
const sidebars = () => [...root.querySelectorAll(".oc-sidebar")].filter(own);
|
|
59
|
+
const overlayAlways = new WeakSet(sidebars().filter((s) => s.classList.contains("oc-sidebar--overlay")));
|
|
60
|
+
|
|
61
|
+
let desktop = root.dataset.state === "collapsed" || sidebars().some((s) => s.classList.contains("oc-sidebar--collapsed"));
|
|
62
|
+
const saved = readState(storeName, storage);
|
|
63
|
+
if (saved !== undefined) desktop = saved;
|
|
64
|
+
let openMobile = false;
|
|
65
|
+
const mq = breakpoint && typeof window.matchMedia === "function" ? window.matchMedia(`(max-width: ${breakpoint - 0.02}px)`) : null;
|
|
66
|
+
let mobile = !!mq?.matches;
|
|
67
|
+
|
|
68
|
+
const state = () => (mobile ? !openMobile : desktop);
|
|
69
|
+
|
|
70
|
+
function paint() {
|
|
71
|
+
const collapsed = state();
|
|
72
|
+
root.dataset.state = collapsed ? "collapsed" : "expanded";
|
|
73
|
+
if (mobile) root.dataset.mobile = "";
|
|
74
|
+
else delete root.dataset.mobile;
|
|
75
|
+
for (const sidebar of sidebars()) {
|
|
76
|
+
sidebar.classList.toggle("oc-sidebar--collapsed", collapsed);
|
|
77
|
+
sidebar.classList.toggle("oc-sidebar--overlay", mobile || overlayAlways.has(sidebar));
|
|
78
|
+
}
|
|
79
|
+
root.querySelectorAll("[data-oc-sidebar-trigger]").forEach((btn) => {
|
|
80
|
+
if (own(btn)) btn.setAttribute("aria-expanded", collapsed ? "false" : "true");
|
|
81
|
+
});
|
|
82
|
+
controller.collapsed = collapsed;
|
|
83
|
+
controller.isMobile = mobile;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function setCollapsed(next) {
|
|
87
|
+
const before = state();
|
|
88
|
+
if (mobile) openMobile = !next;
|
|
89
|
+
else {
|
|
90
|
+
desktop = !!next;
|
|
91
|
+
writeState(storeName, storage, desktop);
|
|
92
|
+
}
|
|
93
|
+
paint();
|
|
94
|
+
if (before !== state()) root.dispatchEvent(new CustomEvent("oc-sidebar-change", { bubbles: true, detail: { collapsed: state(), mobile } }));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const controller = { collapsed: false, isMobile: false, setCollapsed, toggle: () => setCollapsed(!state()) };
|
|
98
|
+
|
|
99
|
+
root.addEventListener("click", (event) => {
|
|
100
|
+
const hit = event.target.closest?.("[data-oc-sidebar-trigger], [data-oc-sidebar-rail]");
|
|
101
|
+
if (!hit || !own(hit)) return;
|
|
102
|
+
event.preventDefault();
|
|
103
|
+
controller.toggle();
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
// Mobile overlay: Escape and a click outside the sidebar close it.
|
|
107
|
+
document.addEventListener("keydown", (event) => {
|
|
108
|
+
if (!root.isConnected) return;
|
|
109
|
+
if (event.key === "Escape" && mobile && openMobile) {
|
|
110
|
+
setCollapsed(true);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
if (!shortcut || !(event.ctrlKey || event.metaKey) || event.altKey || event.key.toLowerCase() !== shortcut.toLowerCase()) return;
|
|
114
|
+
if (event.target?.isContentEditable) return;
|
|
115
|
+
event.preventDefault();
|
|
116
|
+
controller.toggle();
|
|
117
|
+
});
|
|
118
|
+
document.addEventListener("pointerdown", (event) => {
|
|
119
|
+
if (!mobile || !openMobile || !root.isConnected) return;
|
|
120
|
+
const t = event.target;
|
|
121
|
+
if (t?.closest?.(".oc-sidebar") || t?.closest?.("[data-oc-sidebar-trigger], [data-oc-sidebar-rail]")) return;
|
|
122
|
+
setCollapsed(true);
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
mq?.addEventListener?.("change", () => {
|
|
126
|
+
mobile = mq.matches;
|
|
127
|
+
openMobile = false;
|
|
128
|
+
paint();
|
|
129
|
+
root.dispatchEvent(new CustomEvent("oc-sidebar-change", { bubbles: true, detail: { collapsed: state(), mobile } }));
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
controllers.set(root, controller);
|
|
133
|
+
paint();
|
|
134
|
+
return controller;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** The controller of a wired provider (or null). */
|
|
138
|
+
export function getSidebarProvider(root) {
|
|
139
|
+
return controllers.get(root) ?? null;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/** Wire every [data-oc-sidebar-provider] under scope. */
|
|
143
|
+
export function initSidebarProviders(scope = document) {
|
|
144
|
+
scope.querySelectorAll("[data-oc-sidebar-provider]").forEach((root) => bindSidebarProvider(root));
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Starts on its own when loaded straight from a <script type="module"> tag: as /js/oc-sidebar.js (`npx omniaui copy-js`),
|
|
148
|
+
// with ?auto in the URL, or with data-oc-auto on the tag. An import from a bundler does not scan the page: call
|
|
149
|
+
// initSidebarProviders() yourself there.
|
|
150
|
+
function autoStart() {
|
|
151
|
+
if (typeof document === "undefined") return false;
|
|
152
|
+
const url = String(import.meta.url);
|
|
153
|
+
if (url.includes("oc-sidebar") || /[?&]auto(=|&|$)/.test(url)) return true;
|
|
154
|
+
const file = url.split(/[?#]/)[0];
|
|
155
|
+
return [...document.querySelectorAll("script[data-oc-auto][src]")].some((s) => s.src.split(/[?#]/)[0] === file);
|
|
156
|
+
}
|
|
157
|
+
if (autoStart()) {
|
|
158
|
+
const boot = () => initSidebarProviders(document);
|
|
159
|
+
if (document.readyState === "loading") document.addEventListener("DOMContentLoaded", boot);
|
|
160
|
+
else boot();
|
|
161
|
+
}
|
package/dist/tabs.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// File: packages/ui/src/tabs.d.ts
|
|
2
|
+
// Types for the class-toggle tabs behaviour ([data-oc-tabs] with button[role=tab]).
|
|
3
|
+
|
|
4
|
+
/** Index of the tab a key moves to (arrows, Home, End), skipping disabled tabs and wrapping; -1 for another key. */
|
|
5
|
+
export function nextTab(index: number, disabled: boolean[], key: string, vertical?: boolean): number;
|
|
6
|
+
/** Starts one [data-oc-tabs] tab list; returns a function that stops it. Event: oc-tabs-change ({ index, tab, panel }). */
|
|
7
|
+
export function bindTabs(list: HTMLElement): () => void;
|
|
8
|
+
/** Starts every [data-oc-tabs] tab list in scope. */
|
|
9
|
+
export function initTabs(scope?: ParentNode): Array<() => void>;
|
package/dist/tabs.js
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// File: packages/ui/src/tabs.js
|
|
2
|
+
// Map: next enabled tab for a key -> select (aria-selected, tabindex, .is-active panel, event) -> bind one
|
|
3
|
+
// [data-oc-tabs] tab list (click, arrow keys) -> init every one -> boot
|
|
4
|
+
// Behaviour for class-toggle tabs (the CSS tabs with buttons, <x-oc::tabs mode="buttons">): a tab list with
|
|
5
|
+
// data-oc-tabs holds button[role=tab] elements whose aria-controls names their panel (.oc-tab-panel). A click or
|
|
6
|
+
// Enter selects a tab: aria-selected="true" on it, .is-active on its panel, the others off. Arrow keys move between
|
|
7
|
+
// the enabled tabs (Left/Right, Up/Down in a .oc-tab-list--vertical list), Home and End go to the first and last.
|
|
8
|
+
// Event on the tab list: oc-tabs-change, detail { index, tab, panel }.
|
|
9
|
+
|
|
10
|
+
const TAB = '[role="tab"]';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The index of the tab a key moves to, skipping disabled tabs and wrapping at both ends; -1 for another key.
|
|
14
|
+
* `disabled` holds one boolean per tab.
|
|
15
|
+
*/
|
|
16
|
+
export function nextTab(index, disabled, key, vertical = false) {
|
|
17
|
+
const n = disabled.length;
|
|
18
|
+
const prev = vertical ? "ArrowUp" : "ArrowLeft";
|
|
19
|
+
const next = vertical ? "ArrowDown" : "ArrowRight";
|
|
20
|
+
let step;
|
|
21
|
+
let from = index;
|
|
22
|
+
if (key === next) step = 1;
|
|
23
|
+
else if (key === prev) step = -1;
|
|
24
|
+
else if (key === "Home") { step = 1; from = -1; }
|
|
25
|
+
else if (key === "End") { step = -1; from = n; }
|
|
26
|
+
else return -1;
|
|
27
|
+
for (let i = 1; i <= n; i++) {
|
|
28
|
+
const at = (((from + step * i) % n) + n) % n;
|
|
29
|
+
if (!disabled[at]) return at;
|
|
30
|
+
}
|
|
31
|
+
return -1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** Starts one [data-oc-tabs] tab list. Returns a function that stops it. */
|
|
35
|
+
export function bindTabs(list) {
|
|
36
|
+
if (list.dataset.ocBound) return () => {};
|
|
37
|
+
list.dataset.ocBound = "1";
|
|
38
|
+
const doc = list.ownerDocument;
|
|
39
|
+
const tabs = () => [...list.querySelectorAll(TAB)].filter((t) => t.closest("[data-oc-tabs]") === list);
|
|
40
|
+
const panelOf = (tab) => doc.getElementById(tab.getAttribute("aria-controls") ?? "");
|
|
41
|
+
|
|
42
|
+
const select = (tab, focus = false) => {
|
|
43
|
+
const all = tabs();
|
|
44
|
+
for (const other of all) {
|
|
45
|
+
const on = other === tab;
|
|
46
|
+
other.setAttribute("aria-selected", String(on));
|
|
47
|
+
other.tabIndex = on ? 0 : -1;
|
|
48
|
+
panelOf(other)?.classList.toggle("is-active", on);
|
|
49
|
+
}
|
|
50
|
+
if (focus) tab.focus();
|
|
51
|
+
list.dispatchEvent(new CustomEvent("oc-tabs-change", { bubbles: true, detail: { index: all.indexOf(tab), tab, panel: panelOf(tab) } }));
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const onClick = (e) => {
|
|
55
|
+
const tab = e.target.closest(TAB);
|
|
56
|
+
if (!tab || !tabs().includes(tab) || tab.disabled) return;
|
|
57
|
+
select(tab);
|
|
58
|
+
};
|
|
59
|
+
const onKey = (e) => {
|
|
60
|
+
const tab = e.target.closest(TAB);
|
|
61
|
+
const all = tabs();
|
|
62
|
+
if (!tab || !all.includes(tab)) return;
|
|
63
|
+
const vertical = list.classList.contains("oc-tab-list--vertical") || list.getAttribute("aria-orientation") === "vertical";
|
|
64
|
+
const at = nextTab(all.indexOf(tab), all.map((t) => t.disabled), e.key, vertical);
|
|
65
|
+
if (at < 0) return;
|
|
66
|
+
e.preventDefault();
|
|
67
|
+
select(all[at], true);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
// One tab in the tab order: the selected one (else the first enabled one); its panel shown.
|
|
71
|
+
const all = tabs();
|
|
72
|
+
const current = all.find((t) => t.getAttribute("aria-selected") === "true" && !t.disabled) ?? all.find((t) => !t.disabled);
|
|
73
|
+
for (const t of all) t.tabIndex = t === current ? 0 : -1;
|
|
74
|
+
if (current && !panelOf(current)?.classList.contains("is-active")) {
|
|
75
|
+
for (const t of all) panelOf(t)?.classList.toggle("is-active", t === current);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
list.addEventListener("click", onClick);
|
|
79
|
+
list.addEventListener("keydown", onKey);
|
|
80
|
+
return () => {
|
|
81
|
+
list.removeEventListener("click", onClick);
|
|
82
|
+
list.removeEventListener("keydown", onKey);
|
|
83
|
+
delete list.dataset.ocBound;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** Starts every [data-oc-tabs] tab list under `scope`. */
|
|
88
|
+
export function initTabs(scope = document) {
|
|
89
|
+
return [...scope.querySelectorAll("[data-oc-tabs]")].map(bindTabs);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Starts on its own as /js/oc-tabs.js (`npx omniaui copy-js tabs`), with ?auto in the URL or data-oc-auto on the tag.
|
|
93
|
+
function autoStart() {
|
|
94
|
+
if (typeof document === "undefined") return false;
|
|
95
|
+
const url = String(import.meta.url);
|
|
96
|
+
if (url.includes("oc-tabs") || /[?&]auto(=|&|$)/.test(url)) return true;
|
|
97
|
+
const file = url.split(/[?#]/)[0];
|
|
98
|
+
return [...document.querySelectorAll("script[data-oc-auto][src]")].some((s) => s.src.split(/[?#]/)[0] === file);
|
|
99
|
+
}
|
|
100
|
+
if (autoStart()) {
|
|
101
|
+
const boot = () => initTabs(document);
|
|
102
|
+
if (document.readyState === "loading") document.addEventListener("DOMContentLoaded", boot);
|
|
103
|
+
else boot();
|
|
104
|
+
}
|
package/dist/theme.js
CHANGED
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
// <fieldset class="oc-theme-switch"> … radios name="oc-theme" value="system | light | dark"
|
|
8
8
|
// <button data-oc-theme-toggle> one button: light <-> dark (aria-pressed = dark)
|
|
9
9
|
// <button data-oc-theme-set="dark"> a button for one value (cards on a settings page; aria-pressed)
|
|
10
|
-
// Switches inside .oc-theme-scope theme only their own element and are left alone.
|
|
10
|
+
// Switches inside .oc-theme-scope theme only their own element and are left alone. A toggle or set button inside a
|
|
11
|
+
// .oc-theme-scope sets data-theme on that scope only (no <html>, no storage); the scope gets an "oc-theme-change" event.
|
|
11
12
|
// Against a flash of the wrong theme on load: put THEME_HEAD_SCRIPT inline in <head>, before the stylesheets.
|
|
12
13
|
|
|
13
14
|
const VALUES = ["system", "light", "dark"];
|
|
@@ -71,11 +72,12 @@ export function initTheme(doc = document, { storageKey = "oc-theme", darkClass =
|
|
|
71
72
|
|
|
72
73
|
const radios = () => [...doc.querySelectorAll(".oc-theme-switch input[type=radio]")]
|
|
73
74
|
.filter((input) => !input.closest(".oc-theme-scope") && (!name || input.name === name));
|
|
75
|
+
const unscoped = (selector) => [...doc.querySelectorAll(selector)].filter((el) => !el.closest(".oc-theme-scope"));
|
|
74
76
|
const sync = () => {
|
|
75
77
|
const shown = applyTheme(root, choice, { darkClass, prefersDark: !!media?.matches });
|
|
76
78
|
for (const input of radios()) input.checked = input.value === choice;
|
|
77
|
-
for (const button of
|
|
78
|
-
for (const button of
|
|
79
|
+
for (const button of unscoped("[data-oc-theme-toggle]")) button.setAttribute("aria-pressed", shown === "dark" ? "true" : "false");
|
|
80
|
+
for (const button of unscoped("[data-oc-theme-set]")) button.setAttribute("aria-pressed", button.getAttribute("data-oc-theme-set") === choice ? "true" : "false");
|
|
79
81
|
root.dispatchEvent(new win.CustomEvent("oc-theme-change", { detail: { choice, theme: shown } }));
|
|
80
82
|
};
|
|
81
83
|
const set = (value) => {
|
|
@@ -90,10 +92,24 @@ export function initTheme(doc = document, { storageKey = "oc-theme", darkClass =
|
|
|
90
92
|
};
|
|
91
93
|
const onClick = (event) => {
|
|
92
94
|
const toggle = event.target.closest?.("[data-oc-theme-toggle]");
|
|
95
|
+
const one = toggle ? null : event.target.closest?.("[data-oc-theme-set]");
|
|
96
|
+
const scope = (toggle || one)?.closest?.(".oc-theme-scope");
|
|
97
|
+
if (scope) return setScope(scope, toggle ? null : one.getAttribute("data-oc-theme-set"));
|
|
93
98
|
if (toggle) return set(effectiveTheme(choice, !!media?.matches) === "dark" ? "light" : "dark");
|
|
94
|
-
const one = event.target.closest?.("[data-oc-theme-set]");
|
|
95
99
|
if (one) set(one.getAttribute("data-oc-theme-set"));
|
|
96
100
|
};
|
|
101
|
+
// A button inside a .oc-theme-scope (a demo box, a preview) themes only that scope.
|
|
102
|
+
const setScope = (scope, value) => {
|
|
103
|
+
const current = scope.dataset.theme || (/^\s*dark/.test(win?.getComputedStyle?.(scope)?.colorScheme ?? "") ? "dark" : "light");
|
|
104
|
+
const pick = value == null ? (current === "dark" ? "light" : "dark") : normalizeTheme(value);
|
|
105
|
+
const shown = effectiveTheme(pick, !!media?.matches);
|
|
106
|
+
if (pick === "system") delete scope.dataset.theme;
|
|
107
|
+
else scope.dataset.theme = pick;
|
|
108
|
+
const own = (el) => el.closest(".oc-theme-scope") === scope;
|
|
109
|
+
for (const button of scope.querySelectorAll("[data-oc-theme-toggle]")) if (own(button)) button.setAttribute("aria-pressed", shown === "dark" ? "true" : "false");
|
|
110
|
+
for (const button of scope.querySelectorAll("[data-oc-theme-set]")) if (own(button)) button.setAttribute("aria-pressed", button.getAttribute("data-oc-theme-set") === pick ? "true" : "false");
|
|
111
|
+
scope.dispatchEvent(new win.CustomEvent("oc-theme-change", { detail: { choice: pick, theme: shown, scope: true } }));
|
|
112
|
+
};
|
|
97
113
|
// Another tab changed the choice, or the operating system switched while the choice is "system".
|
|
98
114
|
const onStorage = (event) => { if (event.key === storageKey) { choice = readTheme(storage, storageKey); sync(); } };
|
|
99
115
|
const onSystem = () => { if (choice === "system") sync(); };
|
package/manifest.json
CHANGED
|
@@ -1471,6 +1471,30 @@
|
|
|
1471
1471
|
"requires": [
|
|
1472
1472
|
"@birdycom/omniaui"
|
|
1473
1473
|
]
|
|
1474
|
+
},
|
|
1475
|
+
{
|
|
1476
|
+
"name": "countdown",
|
|
1477
|
+
"file": "snippets/countdown.html",
|
|
1478
|
+
"description": "Time left for a task, a round or a reservation: inline, a pill or large digits, with an optional shrinking bar; orange when little time is left",
|
|
1479
|
+
"requires": [
|
|
1480
|
+
"@birdycom/omniaui"
|
|
1481
|
+
]
|
|
1482
|
+
},
|
|
1483
|
+
{
|
|
1484
|
+
"name": "hero-media",
|
|
1485
|
+
"file": "snippets/hero-media.html",
|
|
1486
|
+
"description": "Full-width hero with a video or photo behind the text, a dark scrim on the text side and a poster under reduced motion",
|
|
1487
|
+
"requires": [
|
|
1488
|
+
"@birdycom/omniaui"
|
|
1489
|
+
]
|
|
1490
|
+
},
|
|
1491
|
+
{
|
|
1492
|
+
"name": "scrim",
|
|
1493
|
+
"file": "snippets/scrim.html",
|
|
1494
|
+
"description": "A calm fade over a picture (from a color at one edge to transparent) so text on top of it stays readable",
|
|
1495
|
+
"requires": [
|
|
1496
|
+
"@birdycom/omniaui"
|
|
1497
|
+
]
|
|
1474
1498
|
}
|
|
1475
1499
|
]
|
|
1476
1500
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@birdycom/omniaui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
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",
|
|
@@ -33,14 +33,22 @@
|
|
|
33
33
|
"./barcode.js": "./dist/barcode.js",
|
|
34
34
|
"./form-extras.js": "./dist/form-extras.js",
|
|
35
35
|
"./lazy.js": "./dist/lazy.js",
|
|
36
|
+
"./back-link.js": "./dist/back-link.js",
|
|
36
37
|
"./contact-form.js": "./dist/contact-form.js",
|
|
37
38
|
"./fly.js": "./dist/fly.js",
|
|
38
39
|
"./particles.js": "./dist/particles.js",
|
|
39
40
|
"./toc.js": "./dist/toc.js",
|
|
40
41
|
"./theme.js": "./dist/theme.js",
|
|
41
42
|
"./language-select.js": "./dist/language-select.js",
|
|
43
|
+
"./calendar.js": "./dist/calendar.js",
|
|
42
44
|
"./combobox.js": "./dist/combobox.js",
|
|
45
|
+
"./countdown.js": "./dist/countdown.js",
|
|
46
|
+
"./glass-lens.js": "./dist/glass-lens.js",
|
|
43
47
|
"./logo.js": "./dist/logo.js",
|
|
48
|
+
"./tabs.js": "./dist/tabs.js",
|
|
49
|
+
"./input-mask.js": "./dist/input-mask.js",
|
|
50
|
+
"./nav-overflow.js": "./dist/nav-overflow.js",
|
|
51
|
+
"./sidebar.js": "./dist/sidebar.js",
|
|
44
52
|
"./manifest.json": "./manifest.json",
|
|
45
53
|
"./package.json": "./package.json"
|
|
46
54
|
},
|
|
@@ -68,7 +76,7 @@
|
|
|
68
76
|
"omniaui": "./bin/omniaui.mjs"
|
|
69
77
|
},
|
|
70
78
|
"peerDependencies": {
|
|
71
|
-
"@birdycom/omniacss": "^0.
|
|
79
|
+
"@birdycom/omniacss": "^0.17.0"
|
|
72
80
|
},
|
|
73
81
|
"peerDependenciesMeta": {
|
|
74
82
|
"@birdycom/omniacss": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<div class="oc-accordion oc-accordion--accent">
|
|
12
12
|
<details class="oc-accordion-item" name="oc-accent-demo" open>
|
|
13
13
|
<summary class="oc-accordion-trigger">Customer details <span class="oc-accordion-accent-meta">Complete</span></summary>
|
|
14
|
-
<div class="oc-accordion-content">Contact 1,
|
|
14
|
+
<div class="oc-accordion-content">Contact 1, Street 1, City 1.</div>
|
|
15
15
|
</details>
|
|
16
16
|
<details class="oc-accordion-item oc-accent--violet" name="oc-accent-demo">
|
|
17
17
|
<summary class="oc-accordion-trigger">Materials <span class="oc-accordion-accent-meta">4 items</span></summary>
|