@gerege-systems/ui 0.13.1 → 0.14.1
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-lib/component-styles.css +14 -0
- package/dist-lib/components/ui/Accordion.js +1 -1
- package/dist-lib/components/ui/Accordion.js.map +1 -1
- package/dist-lib/components/ui/Alert.js +1 -1
- package/dist-lib/components/ui/Alert.js.map +1 -1
- package/dist-lib/components/ui/Breadcrumbs.js +6 -6
- package/dist-lib/components/ui/Breadcrumbs.js.map +1 -1
- package/dist-lib/components/ui/Button.js +20 -18
- package/dist-lib/components/ui/Button.js.map +1 -1
- package/dist-lib/components/ui/Calendar.js +3 -3
- package/dist-lib/components/ui/Calendar.js.map +1 -1
- package/dist-lib/components/ui/Card.js +7 -7
- package/dist-lib/components/ui/Card.js.map +1 -1
- package/dist-lib/components/ui/Carousel.js +1 -1
- package/dist-lib/components/ui/Carousel.js.map +1 -1
- package/dist-lib/components/ui/Chart.js +1 -1
- package/dist-lib/components/ui/Chart.js.map +1 -1
- package/dist-lib/components/ui/Checkbox.js +1 -1
- package/dist-lib/components/ui/Checkbox.js.map +1 -1
- package/dist-lib/components/ui/Combobox.js +12 -12
- package/dist-lib/components/ui/Combobox.js.map +1 -1
- package/dist-lib/components/ui/CommandPalette.js +8 -8
- package/dist-lib/components/ui/CommandPalette.js.map +1 -1
- package/dist-lib/components/ui/ContextMenu.js +1 -1
- package/dist-lib/components/ui/ContextMenu.js.map +1 -1
- package/dist-lib/components/ui/DatePicker.js +2 -2
- package/dist-lib/components/ui/DatePicker.js.map +1 -1
- package/dist-lib/components/ui/Dialog.js +1 -1
- package/dist-lib/components/ui/Dialog.js.map +1 -1
- package/dist-lib/components/ui/Drawer.js +18 -18
- package/dist-lib/components/ui/Drawer.js.map +1 -1
- package/dist-lib/components/ui/DropdownMenu.js +1 -1
- package/dist-lib/components/ui/DropdownMenu.js.map +1 -1
- package/dist-lib/components/ui/FileUpload.js +1 -1
- package/dist-lib/components/ui/FileUpload.js.map +1 -1
- package/dist-lib/components/ui/IconButton.js +13 -13
- package/dist-lib/components/ui/IconButton.js.map +1 -1
- package/dist-lib/components/ui/Input.js +7 -7
- package/dist-lib/components/ui/Input.js.map +1 -1
- package/dist-lib/components/ui/MultiSelect.js +24 -24
- package/dist-lib/components/ui/MultiSelect.js.map +1 -1
- package/dist-lib/components/ui/Pagination.js +21 -21
- package/dist-lib/components/ui/Pagination.js.map +1 -1
- package/dist-lib/components/ui/Popover.js +4 -4
- package/dist-lib/components/ui/Popover.js.map +1 -1
- package/dist-lib/components/ui/RadioGroup.js +9 -9
- package/dist-lib/components/ui/RadioGroup.js.map +1 -1
- package/dist-lib/components/ui/ScrollArea.js +11 -11
- package/dist-lib/components/ui/ScrollArea.js.map +1 -1
- package/dist-lib/components/ui/Select.js +29 -29
- package/dist-lib/components/ui/Select.js.map +1 -1
- package/dist-lib/components/ui/Sheet.js +1 -1
- package/dist-lib/components/ui/Sheet.js.map +1 -1
- package/dist-lib/components/ui/Sidebar.js +64 -60
- package/dist-lib/components/ui/Sidebar.js.map +1 -1
- package/dist-lib/components/ui/Slider.js +1 -1
- package/dist-lib/components/ui/Slider.js.map +1 -1
- package/dist-lib/components/ui/Snackbar.js +28 -19
- package/dist-lib/components/ui/Snackbar.js.map +1 -1
- package/dist-lib/components/ui/Switch.js +7 -7
- package/dist-lib/components/ui/Switch.js.map +1 -1
- package/dist-lib/components/ui/Table.js +6 -6
- package/dist-lib/components/ui/Table.js.map +1 -1
- package/dist-lib/components/ui/Tabs.js +6 -6
- package/dist-lib/components/ui/Tabs.js.map +1 -1
- package/dist-lib/components/ui/TagInput.js +3 -3
- package/dist-lib/components/ui/TagInput.js.map +1 -1
- package/dist-lib/components/ui/Textarea.js +1 -1
- package/dist-lib/components/ui/Textarea.js.map +1 -1
- package/dist-lib/components/ui/Toast.js +8 -8
- package/dist-lib/components/ui/Toast.js.map +1 -1
- package/dist-lib/components/ui/TopNav.js +9 -9
- package/dist-lib/components/ui/TopNav.js.map +1 -1
- package/dist-lib/components/ui/Tree.js +2 -2
- package/dist-lib/components/ui/Tree.js.map +1 -1
- package/dist-lib/styles.css +1 -1
- package/dist-lib/theme.css +70 -28
- package/package.json +1 -1
package/dist-lib/theme.css
CHANGED
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
* success-solid bg + white text → 5.2:1
|
|
26
26
|
* warning-solid bg + white text → 4.6:1
|
|
27
27
|
* danger-solid bg + white text → 4.8:1
|
|
28
|
+
* secondary fill (neutral-200) + foreground text → 14.5:1 (text)
|
|
28
29
|
* border-input (hsl 215 16% 55%) on background (white) → 3.55:1 (UI)
|
|
29
30
|
* border-input on background-muted → 3.24:1 (UI)
|
|
30
31
|
* switch-track-off (hsl 215 16% 55%) on background / muted → 3.55 / 3.24:1 (UI)
|
|
@@ -36,10 +37,15 @@
|
|
|
36
37
|
* accent-400 text on background (neutral-950) → 5.4:1
|
|
37
38
|
* accent-400 bg + neutral-950 text → 5.4:1
|
|
38
39
|
* success/warning/danger-solid + neutral-950 text → 9.0 / 9.3 / 5.2:1
|
|
40
|
+
* secondary fill (neutral-800) + foreground text → 13.8:1 (text)
|
|
39
41
|
* border-input (hsl 215 16% 45%) on background (neutral-950) → 3.88:1 (UI)
|
|
40
42
|
* border-input on background-muted → 3.28:1 (UI)
|
|
41
43
|
* switch-track-off (hsl 215 16% 45%) on background / muted → 3.88 / 3.28:1 (UI)
|
|
42
44
|
* background-muted on popover (menu highlight) is decorative: 1.10 (light) / 1.08 (dark) — not a 3:1 target.
|
|
45
|
+
* secondary fill against the page is 1.24 (light) / 1.36 (dark) — also not a 3:1 target: a filled
|
|
46
|
+
* button is identified by its label, and 1.4.11 asks 3:1 of a boundary only where the boundary is
|
|
47
|
+
* the sole identifier. Where a stroke is required (a control with no text of its own), use
|
|
48
|
+
* `outline`, whose border stays on `border-input` at 3.55 / 3.88:1.
|
|
43
49
|
* ============================================================================= */
|
|
44
50
|
|
|
45
51
|
/* Geist + Geist Mono are loaded via a <link> in index.html (Google Fonts). */
|
|
@@ -301,6 +307,15 @@
|
|
|
301
307
|
--accent-hover: color-mix(in oklab, var(--accent) 88%, black);
|
|
302
308
|
--accent-active: color-mix(in oklab, var(--accent) 78%, black);
|
|
303
309
|
|
|
310
|
+
/* Secondary control fill ---------------------------------------------- */
|
|
311
|
+
/* A filled button is its own shape, so `secondary` carries no border: the
|
|
312
|
+
* stroke belongs to `outline`, and having both made the two variants read as
|
|
313
|
+
* one. The fill is a step darker than `background-muted` so the shape is
|
|
314
|
+
* legible without it. */
|
|
315
|
+
--secondary: hsl(214 32% 91%); /* neutral-200 */
|
|
316
|
+
--secondary-hover: hsl(213 27% 84%); /* neutral-300 */
|
|
317
|
+
--secondary-active: hsl(215 20% 76%);
|
|
318
|
+
|
|
304
319
|
/* Interaction surfaces ------------------------------------------------ */
|
|
305
320
|
--surface-hover: hsl(214 32% 91%); /* neutral-200 */
|
|
306
321
|
--surface-active: hsl(213 27% 84%); /* neutral-300 */
|
|
@@ -378,6 +393,10 @@
|
|
|
378
393
|
--accent-hover: color-mix(in oklab, var(--accent) 88%, white);
|
|
379
394
|
--accent-active: color-mix(in oklab, var(--accent) 78%, white);
|
|
380
395
|
|
|
396
|
+
--secondary: hsl(217 33% 17%); /* neutral-800 */
|
|
397
|
+
--secondary-hover: hsl(215 25% 27%); /* neutral-700 */
|
|
398
|
+
--secondary-active: hsl(215 20% 33%);
|
|
399
|
+
|
|
381
400
|
--surface-hover: hsl(217 33% 17%); /* neutral-800 */
|
|
382
401
|
--surface-active: hsl(215 25% 27%); /* neutral-700 */
|
|
383
402
|
--overlay: hsl(229 50% 6% / 0.7);
|
|
@@ -515,6 +534,44 @@
|
|
|
515
534
|
* Raw scale (`bg-accent-500`, `bg-success-100`, …) is still available
|
|
516
535
|
* for the rare case a designer needs a specific step.
|
|
517
536
|
* --------------------------------------------------------------------------- */
|
|
537
|
+
/* -----------------------------------------------------------------------------
|
|
538
|
+
* Preference overrides — forced colours and prefers-contrast.
|
|
539
|
+
*
|
|
540
|
+
* These must stay OUTSIDE `@layer base`: the `:root` / `.dark` token blocks
|
|
541
|
+
* above are unlayered, and an unlayered declaration beats any layered one
|
|
542
|
+
* regardless of order or specificity. Inside the layer these overrides were
|
|
543
|
+
* silently dead. The `[data-accent]` presets set `--ring` at (0,2,0), so the
|
|
544
|
+
* forced-colours selector matches that specificity and wins by source order.
|
|
545
|
+
* --------------------------------------------------------------------------- */
|
|
546
|
+
@media (forced-colors: active) {
|
|
547
|
+
:root,
|
|
548
|
+
:root[data-accent],
|
|
549
|
+
.dark,
|
|
550
|
+
.dark[data-accent] {
|
|
551
|
+
--border: CanvasText;
|
|
552
|
+
--border-strong: CanvasText;
|
|
553
|
+
--border-input: CanvasText;
|
|
554
|
+
--ring: Highlight;
|
|
555
|
+
--ring-offset: Canvas;
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
/* prefers-contrast: more — darker hairlines and secondary text. */
|
|
560
|
+
@media (prefers-contrast: more) {
|
|
561
|
+
:root {
|
|
562
|
+
--border: hsl(213 27% 78%);
|
|
563
|
+
--border-strong: hsl(215 16% 55%);
|
|
564
|
+
--foreground-muted: hsl(222 47% 20%);
|
|
565
|
+
--foreground-subtle: hsl(215 19% 35%);
|
|
566
|
+
}
|
|
567
|
+
.dark {
|
|
568
|
+
--border: hsl(215 25% 30%);
|
|
569
|
+
--border-strong: hsl(215 16% 45%);
|
|
570
|
+
--foreground-muted: hsl(210 40% 92%);
|
|
571
|
+
--foreground-subtle: hsl(213 27% 80%);
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
|
|
518
575
|
@theme inline {
|
|
519
576
|
--color-chart-1: var(--chart-1);
|
|
520
577
|
--color-chart-2: var(--chart-2);
|
|
@@ -541,11 +598,20 @@
|
|
|
541
598
|
|
|
542
599
|
--color-accent: var(--accent);
|
|
543
600
|
--color-on-accent: var(--accent-foreground);
|
|
601
|
+
/* Alias: the custom property is `--accent-foreground`, so `text-accent-foreground`
|
|
602
|
+
* is the class people reach for first. Without this it silently generates
|
|
603
|
+
* nothing and the label keeps the inherited colour — dark text on the accent.
|
|
604
|
+
* `text-on-accent` remains the name the components use. */
|
|
605
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
544
606
|
--color-accent-soft: var(--accent-subtle);
|
|
545
607
|
--color-on-accent-soft: var(--accent-subtle-foreground);
|
|
608
|
+
--color-accent-subtle-foreground: var(--accent-subtle-foreground);
|
|
546
609
|
--color-accent-hover: var(--accent-hover);
|
|
547
610
|
--color-accent-active: var(--accent-active);
|
|
548
611
|
|
|
612
|
+
--color-secondary: var(--secondary);
|
|
613
|
+
--color-secondary-hover: var(--secondary-hover);
|
|
614
|
+
--color-secondary-active: var(--secondary-active);
|
|
549
615
|
--color-surface-hover: var(--surface-hover);
|
|
550
616
|
--color-surface-active: var(--surface-active);
|
|
551
617
|
--color-overlay: var(--overlay);
|
|
@@ -649,7 +715,7 @@
|
|
|
649
715
|
}
|
|
650
716
|
|
|
651
717
|
/* Visible default focus indicator. Components that draw their own
|
|
652
|
-
`focus-visible:ring-*` set `outline-
|
|
718
|
+
`focus-visible:ring-*` set `outline-hidden` locally to avoid doubling. */
|
|
653
719
|
:focus-visible {
|
|
654
720
|
outline: 2px solid var(--ring);
|
|
655
721
|
outline-offset: 2px;
|
|
@@ -716,17 +782,9 @@
|
|
|
716
782
|
}
|
|
717
783
|
}
|
|
718
784
|
|
|
719
|
-
/* Forced colors (Windows High Contrast):
|
|
720
|
-
|
|
785
|
+
/* Forced colors (Windows High Contrast): keep focus visible. The token
|
|
786
|
+
overrides live outside this layer — see "Preference overrides" above. */
|
|
721
787
|
@media (forced-colors: active) {
|
|
722
|
-
:root,
|
|
723
|
-
.dark {
|
|
724
|
-
--border: CanvasText;
|
|
725
|
-
--border-strong: CanvasText;
|
|
726
|
-
--border-input: CanvasText;
|
|
727
|
-
--ring: Highlight;
|
|
728
|
-
--ring-offset: Canvas;
|
|
729
|
-
}
|
|
730
788
|
:focus-visible {
|
|
731
789
|
outline: 2px solid Highlight;
|
|
732
790
|
outline-offset: 2px;
|
|
@@ -738,22 +796,6 @@
|
|
|
738
796
|
}
|
|
739
797
|
}
|
|
740
798
|
|
|
741
|
-
/* prefers-contrast: more — darker hairlines and secondary text. */
|
|
742
|
-
@media (prefers-contrast: more) {
|
|
743
|
-
:root {
|
|
744
|
-
--border: hsl(213 27% 78%);
|
|
745
|
-
--border-strong: hsl(215 16% 55%);
|
|
746
|
-
--foreground-muted: hsl(222 47% 20%);
|
|
747
|
-
--foreground-subtle: hsl(215 19% 35%);
|
|
748
|
-
}
|
|
749
|
-
.dark {
|
|
750
|
-
--border: hsl(215 25% 30%);
|
|
751
|
-
--border-strong: hsl(215 16% 45%);
|
|
752
|
-
--foreground-muted: hsl(210 40% 92%);
|
|
753
|
-
--foreground-subtle: hsl(213 27% 80%);
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
|
|
757
799
|
/* prefers-reduced-transparency — components must not rely on backdrop
|
|
758
800
|
blur; anything still using `backdrop-blur*` falls back to an opaque
|
|
759
801
|
surface here. */
|
|
@@ -832,7 +874,7 @@
|
|
|
832
874
|
|
|
833
875
|
/* Standard focus ring as a utility. */
|
|
834
876
|
.ring-focus {
|
|
835
|
-
@apply outline-
|
|
877
|
+
@apply outline-hidden;
|
|
836
878
|
box-shadow:
|
|
837
879
|
0 0 0 2px var(--ring-offset),
|
|
838
880
|
0 0 0 4px var(--ring);
|
package/package.json
CHANGED