@citrusworx/juiceui 0.6.0 → 0.7.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.
@@ -6,3 +6,9 @@ export { createTabs, initTabs, startTabsRuntime, stopTabsRuntime } from "./src/t
6
6
  export type { TabsController, TabsOptions } from "./src/tabs/tabs-runtime.js";
7
7
  export { createModal, initModal, startModalRuntime, stopModalRuntime } from "./src/modal/modal-runtime.js";
8
8
  export type { ModalController, ModalOptions } from "./src/modal/modal-runtime.js";
9
+ export { createDrawer, initDrawer, startDrawerRuntime, stopDrawerRuntime } from "./src/drawer/drawer-runtime.js";
10
+ export type { DrawerController, DrawerOptions } from "./src/drawer/drawer-runtime.js";
11
+ export { createToast, initToast, startToastRuntime, stopToastRuntime } from "./src/toast/toast-runtime.js";
12
+ export type { ToastController, ToastOptions } from "./src/toast/toast-runtime.js";
13
+ export { createPopover, initPopover, startPopoverRuntime, stopPopoverRuntime } from "./src/popover/popover-runtime.js";
14
+ export type { PopoverController, PopoverOptions, PopoverPlacement } from "./src/popover/popover-runtime.js";
@@ -0,0 +1,30 @@
1
+ /**
2
+ * DOM-first dialog runtime for Juice drawer chrome.
3
+ *
4
+ * Markup contract:
5
+ * [drawer-overlay][hidden] > [drawer role="dialog"] + [drawer-close]
6
+ * Closed vs open is the native `hidden` attribute on the overlay.
7
+ *
8
+ * Openers: any element whose `aria-controls` token list includes a
9
+ * `[drawer-overlay]` id. `[drawer-close]` closes the containing overlay.
10
+ * Backdrop click closes unless `drawer-overlay="static"` or
11
+ * `closeOnBackdrop` is false.
12
+ */
13
+ export type DrawerOptions = {
14
+ root?: ParentNode;
15
+ overlaySelector?: string;
16
+ dialogSelector?: string;
17
+ closeSelector?: string;
18
+ closeOnBackdrop?: boolean;
19
+ };
20
+ export type DrawerController = {
21
+ destroy: () => void;
22
+ sync: () => void;
23
+ open: (target?: HTMLElement | null) => void;
24
+ close: (target?: HTMLElement | null) => void;
25
+ toggle: (target?: HTMLElement | null) => void;
26
+ };
27
+ export declare const createDrawer: (options?: DrawerOptions) => DrawerController;
28
+ export declare const initDrawer: (options?: DrawerOptions) => DrawerController;
29
+ export declare const startDrawerRuntime: () => DrawerController | null;
30
+ export declare const stopDrawerRuntime: () => void;
@@ -0,0 +1,56 @@
1
+ /**
2
+ * DOM-first popover runtime for Juice popover chrome.
3
+ *
4
+ * Markup contract (Slice A — do not rename attrs):
5
+ * [popover-root][hidden] > [popover-panel] + [popover-header]? +
6
+ * [popover-body]? + [popover-close]?
7
+ * Closed vs open is the native `hidden` attribute on [popover-root].
8
+ *
9
+ * Never use a bare `popover` attribute. HTML `popover=""` / `popover="manual"`
10
+ * activates the platform Popover API. The floating surface is [popover-panel].
11
+ *
12
+ * Accessibility (honest v1): treat the panel as a **non-modal dialog**.
13
+ * APG allows `role="dialog"` without `aria-modal` when the background stays
14
+ * interactive (not inert). Escape and outside-click still dismiss. This is
15
+ * not `role="menu"` (no arrow-key roving / typeahead in this cut) and not
16
+ * a modal (`aria-modal="true"` would lie — there is no scrim).
17
+ *
18
+ * Openers: any element whose `aria-controls` token list includes a
19
+ * `[popover-root]` id. The runtime sets `aria-expanded` / `aria-haspopup`.
20
+ * `[popover-close]` dismisses the containing root.
21
+ *
22
+ * Placement (honest v1, no Floating UI): read `popover-root` (`top` /
23
+ * `bottom` / `left` / `right`, default `bottom`), position `fixed` near the
24
+ * opener from getBoundingClientRect (viewport coords; `fixed` needs no
25
+ * scroll offset), with a small gap. If a transformed / filtered ancestor
26
+ * is the fixed containing block, subtract that origin so Juice cards
27
+ * (`[card="interactive"]:focus-within`) do not offset the panel. If the
28
+ * preferred side overflows the viewport, flip once to the opposite side.
29
+ * No shift / size middleware. Repositions on open, window resize, and
30
+ * capture scroll (rAF-throttled).
31
+ *
32
+ * Escape closes the open popover on bubble (after modal/drawer capture),
33
+ * and also yields when an open [modal-overlay] or [drawer-overlay] exists
34
+ * or the event is already defaultPrevented (same courtesy as toast).
35
+ * Opening one managed popover closes the others. Modal / drawer are not
36
+ * auto-closed.
37
+ */
38
+ export type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right';
39
+ export type PopoverOptions = {
40
+ root?: ParentNode;
41
+ rootSelector?: string;
42
+ panelSelector?: string;
43
+ closeSelector?: string;
44
+ gap?: number;
45
+ };
46
+ export type PopoverController = {
47
+ destroy: () => void;
48
+ sync: () => void;
49
+ open: (target?: HTMLElement | null) => void;
50
+ close: (target?: HTMLElement | null) => void;
51
+ toggle: (target?: HTMLElement | null) => void;
52
+ };
53
+ export declare const createPopover: (options?: PopoverOptions) => PopoverController;
54
+ export declare const initPopover: (options?: PopoverOptions) => PopoverController;
55
+ export declare const startPopoverRuntime: () => PopoverController | null;
56
+ export declare const stopPopoverRuntime: () => void;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * DOM-first toast / snackbar runtime for Juice toast chrome.
3
+ *
4
+ * Markup contract (authors place the region — this is not a portal):
5
+ * [toast-region] > [toast] + [toast-title]? + [toast-body]? + [toast-close]?
6
+ * Individual toasts use native `hidden` when dismissed. The region stays in the DOM.
7
+ *
8
+ * Toast is NOT a dialog:
9
+ * - no focus trap, no aria-modal, no exclusive "one toast only"
10
+ * - stacking is the point; show() never hides siblings
11
+ * - do not move focus into the toast on show (disruptive)
12
+ *
13
+ * Duration:
14
+ * - createToast({ defaultDuration: 5000 }) — ms before auto-dismiss
15
+ * - Per-toast override: toast-duration="3000"
16
+ * - Sticky: toast-duration="0", toast-duration="Infinity", or a negative number
17
+ * - defaultDuration of 0 / Infinity / negative also means no auto-dismiss
18
+ *
19
+ * Auto-dismiss pauses while pointer or focus is inside the toast, then resumes.
20
+ *
21
+ * Escape dismisses the most recently shown visible toast, but only when no
22
+ * open [modal-overlay] or [drawer-overlay] exists (those dialogs own Escape).
23
+ *
24
+ * Live region: sync fills missing aria-live="polite" and
25
+ * aria-relevant="additions" on [toast-region]. Opt into assertive with
26
+ * aria-live="assertive" or toast-live="assertive" on the region or toast.
27
+ * role="status" for polite; role="alert" for toast="error" or assertive.
28
+ */
29
+ export type ToastOptions = {
30
+ root?: ParentNode;
31
+ regionSelector?: string;
32
+ toastSelector?: string;
33
+ closeSelector?: string;
34
+ defaultDuration?: number;
35
+ };
36
+ export type ToastController = {
37
+ destroy: () => void;
38
+ sync: () => void;
39
+ show: (target?: HTMLElement | null) => void;
40
+ dismiss: (target?: HTMLElement | null) => void;
41
+ };
42
+ export declare const createToast: (options?: ToastOptions) => ToastController;
43
+ export declare const initToast: (options?: ToastOptions) => ToastController;
44
+ export declare const startToastRuntime: () => ToastController | null;
45
+ export declare const stopToastRuntime: () => void;
@@ -140,6 +140,79 @@
140
140
  --juice-modal-close-color: var(--aqua-modal-close-color);
141
141
  --juice-modal-close-hover: var(--aqua-modal-close-hover);
142
142
  --juice-modal-focus-ring: var(--aqua-modal-focus-ring);
143
+ /* Drawer chrome — same identity tokens as modal. Close is a surface
144
+ control, not the CTA gradient. Distinct from overlay="frost|tint". */
145
+ --aqua-drawer-overlay: color-mix(in srgb, var(--aqua-page-deep) 62%, transparent);
146
+ --aqua-drawer-panel: var(--aqua-surface-strong);
147
+ --aqua-drawer-panel-border: var(--aqua-border);
148
+ --aqua-drawer-panel-shadow: 0 24px 56px -24px var(--aqua-shadow);
149
+ --aqua-drawer-close: var(--aqua-surface-strong);
150
+ --aqua-drawer-close-color: var(--aqua-heading);
151
+ --aqua-drawer-close-hover: var(--aqua-surface-muted);
152
+ --aqua-drawer-focus-ring: var(--aqua-accent);
153
+ --juice-drawer-overlay: var(--aqua-drawer-overlay);
154
+ --juice-drawer-panel: var(--aqua-drawer-panel);
155
+ --juice-drawer-panel-border: var(--aqua-drawer-panel-border);
156
+ --juice-drawer-panel-shadow: var(--aqua-drawer-panel-shadow);
157
+ --juice-drawer-close: var(--aqua-drawer-close);
158
+ --juice-drawer-close-color: var(--aqua-drawer-close-color);
159
+ --juice-drawer-close-hover: var(--aqua-drawer-close-hover);
160
+ --juice-drawer-focus-ring: var(--aqua-drawer-focus-ring);
161
+ /* Toast chrome — non-modal stack + panel from existing tokens.
162
+ Close is a surface control, not the CTA gradient. Status accents
163
+ remap Aquaflux identity (no new red/green family): accent /
164
+ page-deep / accent-soft / accent-strong. */
165
+ --aqua-toast-panel: var(--aqua-surface-strong);
166
+ --aqua-toast-panel-border: var(--aqua-border);
167
+ --aqua-toast-panel-shadow: 0 18px 40px -24px var(--aqua-shadow);
168
+ --aqua-toast-ink: var(--aqua-text);
169
+ --aqua-toast-close: var(--aqua-surface-strong);
170
+ --aqua-toast-close-color: var(--aqua-heading);
171
+ --aqua-toast-close-hover: var(--aqua-surface-muted);
172
+ --aqua-toast-focus-ring: var(--aqua-accent);
173
+ --aqua-toast-success: var(--aqua-accent);
174
+ --aqua-toast-success-soft: color-mix(in srgb, var(--aqua-accent) 14%, var(--aqua-surface-strong));
175
+ --aqua-toast-error: var(--aqua-page-deep);
176
+ --aqua-toast-error-soft: color-mix(in srgb, var(--aqua-page-deep) 12%, var(--aqua-surface-strong));
177
+ --aqua-toast-info: var(--aqua-accent-soft);
178
+ --aqua-toast-info-soft: color-mix(in srgb, var(--aqua-accent-soft) 18%, var(--aqua-surface-strong));
179
+ --aqua-toast-warning: var(--aqua-accent-strong);
180
+ --aqua-toast-warning-soft: color-mix(in srgb, var(--aqua-accent-strong) 12%, var(--aqua-surface-strong));
181
+ --juice-toast-panel: var(--aqua-toast-panel);
182
+ --juice-toast-panel-border: var(--aqua-toast-panel-border);
183
+ --juice-toast-panel-shadow: var(--aqua-toast-panel-shadow);
184
+ --juice-toast-ink: var(--aqua-toast-ink);
185
+ --juice-toast-close: var(--aqua-toast-close);
186
+ --juice-toast-close-color: var(--aqua-toast-close-color);
187
+ --juice-toast-close-hover: var(--aqua-toast-close-hover);
188
+ --juice-toast-focus-ring: var(--aqua-toast-focus-ring);
189
+ --juice-toast-success: var(--aqua-toast-success);
190
+ --juice-toast-success-soft: var(--aqua-toast-success-soft);
191
+ --juice-toast-error: var(--aqua-toast-error);
192
+ --juice-toast-error-soft: var(--aqua-toast-error-soft);
193
+ --juice-toast-info: var(--aqua-toast-info);
194
+ --juice-toast-info-soft: var(--aqua-toast-info-soft);
195
+ --juice-toast-warning: var(--aqua-toast-warning);
196
+ --juice-toast-warning-soft: var(--aqua-toast-warning-soft);
197
+ /* Popover chrome — anchored floating panel from existing tokens.
198
+ Close is a surface control, not the CTA gradient. Distinct from
199
+ modal/drawer/toast and overlay="frost|tint". */
200
+ --aqua-popover-panel: var(--aqua-surface-strong);
201
+ --aqua-popover-panel-border: var(--aqua-border);
202
+ --aqua-popover-panel-shadow: 0 18px 40px -24px var(--aqua-shadow);
203
+ --aqua-popover-ink: var(--aqua-text);
204
+ --aqua-popover-close: var(--aqua-surface-strong);
205
+ --aqua-popover-close-color: var(--aqua-heading);
206
+ --aqua-popover-close-hover: var(--aqua-surface-muted);
207
+ --aqua-popover-focus-ring: var(--aqua-accent);
208
+ --juice-popover-panel: var(--aqua-popover-panel);
209
+ --juice-popover-panel-border: var(--aqua-popover-panel-border);
210
+ --juice-popover-panel-shadow: var(--aqua-popover-panel-shadow);
211
+ --juice-popover-ink: var(--aqua-popover-ink);
212
+ --juice-popover-close: var(--aqua-popover-close);
213
+ --juice-popover-close-color: var(--aqua-popover-close-color);
214
+ --juice-popover-close-hover: var(--aqua-popover-close-hover);
215
+ --juice-popover-focus-ring: var(--aqua-popover-focus-ring);
143
216
  background-color: var(--aqua-page);
144
217
  background-image: var(--aqua-page-background);
145
218
  color: var(--aqua-text);
@@ -545,4 +618,161 @@
545
618
  [theme=aquaflux] [modal-close]:focus-visible {
546
619
  outline: 2px solid var(--juice-modal-focus-ring);
547
620
  outline-offset: 2px;
621
+ }
622
+
623
+ /* Drawer chrome. Generic Aquaflux buttons use the CTA gradient;
624
+ [drawer-close] stays a surface control. Runtime is later. */
625
+ [theme=aquaflux] [drawer-overlay] {
626
+ background-color: var(--juice-drawer-overlay);
627
+ }
628
+
629
+ [theme=aquaflux] [drawer]:not([surfaceTone]) {
630
+ background-color: var(--juice-drawer-panel);
631
+ border: 1px solid var(--juice-drawer-panel-border);
632
+ box-shadow: var(--juice-drawer-panel-shadow);
633
+ }
634
+
635
+ [theme=aquaflux] button[drawer-close],
636
+ [theme=aquaflux] [drawer-close] {
637
+ background-image: none;
638
+ background-color: var(--juice-drawer-close);
639
+ color: var(--juice-drawer-close-color);
640
+ box-shadow: none;
641
+ transform: none;
642
+ }
643
+
644
+ [theme=aquaflux] button[drawer-close]:hover,
645
+ [theme=aquaflux] [drawer-close]:hover {
646
+ background-image: none;
647
+ background-color: var(--juice-drawer-close-hover);
648
+ color: var(--juice-drawer-close-color);
649
+ transform: none;
650
+ }
651
+
652
+ [theme=aquaflux] button[drawer-close]:focus-visible,
653
+ [theme=aquaflux] [drawer-close]:focus-visible {
654
+ outline: 2px solid var(--juice-drawer-focus-ring);
655
+ outline-offset: 2px;
656
+ }
657
+
658
+ /* Toast chrome. Generic Aquaflux buttons use the CTA gradient;
659
+ [toast-close] stays a surface control. Runtime is later. */
660
+ [theme=aquaflux] [toast]:not([surfaceTone]) {
661
+ background-color: var(--juice-toast-panel);
662
+ border: 1px solid var(--juice-toast-panel-border);
663
+ box-shadow: var(--juice-toast-panel-shadow);
664
+ color: var(--juice-toast-ink);
665
+ }
666
+
667
+ [theme=aquaflux] [toast-title],
668
+ [theme=aquaflux] [toast-body] {
669
+ color: var(--juice-toast-ink);
670
+ }
671
+
672
+ [theme=aquaflux] [toast=success]:not([surfaceTone]) {
673
+ background-color: var(--juice-toast-success-soft);
674
+ }
675
+
676
+ [theme=aquaflux] [toast=success] {
677
+ border-left-color: var(--juice-toast-success);
678
+ }
679
+
680
+ [theme=aquaflux] [toast=success] [toast-title] {
681
+ color: var(--juice-toast-success);
682
+ }
683
+
684
+ [theme=aquaflux] [toast=error]:not([surfaceTone]) {
685
+ background-color: var(--juice-toast-error-soft);
686
+ }
687
+
688
+ [theme=aquaflux] [toast=error] {
689
+ border-left-color: var(--juice-toast-error);
690
+ }
691
+
692
+ [theme=aquaflux] [toast=error] [toast-title] {
693
+ color: var(--juice-toast-error);
694
+ }
695
+
696
+ [theme=aquaflux] [toast=info]:not([surfaceTone]) {
697
+ background-color: var(--juice-toast-info-soft);
698
+ }
699
+
700
+ [theme=aquaflux] [toast=info] {
701
+ border-left-color: var(--juice-toast-info);
702
+ }
703
+
704
+ [theme=aquaflux] [toast=info] [toast-title] {
705
+ color: var(--juice-toast-info);
706
+ }
707
+
708
+ [theme=aquaflux] [toast=warning]:not([surfaceTone]) {
709
+ background-color: var(--juice-toast-warning-soft);
710
+ }
711
+
712
+ [theme=aquaflux] [toast=warning] {
713
+ border-left-color: var(--juice-toast-warning);
714
+ }
715
+
716
+ [theme=aquaflux] [toast=warning] [toast-title] {
717
+ color: var(--juice-toast-warning);
718
+ }
719
+
720
+ [theme=aquaflux] button[toast-close],
721
+ [theme=aquaflux] [toast-close] {
722
+ background-image: none;
723
+ background-color: var(--juice-toast-close);
724
+ color: var(--juice-toast-close-color);
725
+ box-shadow: none;
726
+ transform: none;
727
+ }
728
+
729
+ [theme=aquaflux] button[toast-close]:hover,
730
+ [theme=aquaflux] [toast-close]:hover {
731
+ background-image: none;
732
+ background-color: var(--juice-toast-close-hover);
733
+ color: var(--juice-toast-close-color);
734
+ transform: none;
735
+ }
736
+
737
+ [theme=aquaflux] button[toast-close]:focus-visible,
738
+ [theme=aquaflux] [toast-close]:focus-visible {
739
+ outline: 2px solid var(--juice-toast-focus-ring);
740
+ outline-offset: 2px;
741
+ }
742
+
743
+ /* Popover chrome. Generic Aquaflux buttons use the CTA gradient;
744
+ [popover-close] stays a surface control. Runtime is later. */
745
+ [theme=aquaflux] [popover-panel]:not([surfaceTone]) {
746
+ background-color: var(--juice-popover-panel);
747
+ border: 1px solid var(--juice-popover-panel-border);
748
+ box-shadow: var(--juice-popover-panel-shadow);
749
+ color: var(--juice-popover-ink);
750
+ }
751
+
752
+ [theme=aquaflux] [popover-header],
753
+ [theme=aquaflux] [popover-body] {
754
+ color: var(--juice-popover-ink);
755
+ }
756
+
757
+ [theme=aquaflux] button[popover-close],
758
+ [theme=aquaflux] [popover-close] {
759
+ background-image: none;
760
+ background-color: var(--juice-popover-close);
761
+ color: var(--juice-popover-close-color);
762
+ box-shadow: none;
763
+ transform: none;
764
+ }
765
+
766
+ [theme=aquaflux] button[popover-close]:hover,
767
+ [theme=aquaflux] [popover-close]:hover {
768
+ background-image: none;
769
+ background-color: var(--juice-popover-close-hover);
770
+ color: var(--juice-popover-close-color);
771
+ transform: none;
772
+ }
773
+
774
+ [theme=aquaflux] button[popover-close]:focus-visible,
775
+ [theme=aquaflux] [popover-close]:focus-visible {
776
+ outline: 2px solid var(--juice-popover-focus-ring);
777
+ outline-offset: 2px;
548
778
  }
@@ -94,6 +94,76 @@
94
94
  --juice-modal-close-color: var(--cm-modal-close-color);
95
95
  --juice-modal-close-hover: var(--cm-modal-close-hover);
96
96
  --juice-modal-focus-ring: var(--cm-modal-focus-ring);
97
+ /* Drawer chrome — thinner --cm-* set; heading stands in for accent.
98
+ Close is a surface control, not heading-fill CTA. */
99
+ --cm-drawer-overlay: color-mix(in srgb, var(--cm-heading) 55%, transparent);
100
+ --cm-drawer-panel: var(--cm-surface);
101
+ --cm-drawer-panel-border: var(--cm-border);
102
+ --cm-drawer-panel-shadow: 0 22px 48px -22px color-mix(in srgb, var(--cm-heading) 22%, transparent);
103
+ --cm-drawer-close: var(--cm-surface);
104
+ --cm-drawer-close-color: var(--cm-heading);
105
+ --cm-drawer-close-hover: var(--cm-surface-muted);
106
+ --cm-drawer-focus-ring: var(--cm-heading);
107
+ --juice-drawer-overlay: var(--cm-drawer-overlay);
108
+ --juice-drawer-panel: var(--cm-drawer-panel);
109
+ --juice-drawer-panel-border: var(--cm-drawer-panel-border);
110
+ --juice-drawer-panel-shadow: var(--cm-drawer-panel-shadow);
111
+ --juice-drawer-close: var(--cm-drawer-close);
112
+ --juice-drawer-close-color: var(--cm-drawer-close-color);
113
+ --juice-drawer-close-hover: var(--cm-drawer-close-hover);
114
+ --juice-drawer-focus-ring: var(--cm-drawer-focus-ring);
115
+ /* Toast chrome — thinner --cm-* set plus wintergreen/lime already
116
+ used for shadow tone. Close is a surface control, not heading-fill. */
117
+ --cm-toast-panel: var(--cm-surface);
118
+ --cm-toast-panel-border: var(--cm-border);
119
+ --cm-toast-panel-shadow: 0 18px 40px -24px color-mix(in srgb, var(--cm-heading) 22%, transparent);
120
+ --cm-toast-ink: var(--cm-text);
121
+ --cm-toast-close: var(--cm-surface);
122
+ --cm-toast-close-color: var(--cm-heading);
123
+ --cm-toast-close-hover: var(--cm-surface-muted);
124
+ --cm-toast-focus-ring: var(--cm-heading);
125
+ --cm-toast-success: var(--cm-heading);
126
+ --cm-toast-success-soft: var(--cm-surface-muted);
127
+ --cm-toast-error: hsl(152, 99%, 15%);
128
+ --cm-toast-error-soft: color-mix(in srgb, hsl(152, 99%, 15%) 10%, var(--cm-surface));
129
+ --cm-toast-info: var(--cm-text-muted);
130
+ --cm-toast-info-soft: color-mix(in srgb, var(--cm-text-muted) 12%, var(--cm-surface));
131
+ --cm-toast-warning: hsl(99, 70%, 20%);
132
+ --cm-toast-warning-soft: color-mix(in srgb, hsl(99, 70%, 20%) 10%, var(--cm-surface));
133
+ --juice-toast-panel: var(--cm-toast-panel);
134
+ --juice-toast-panel-border: var(--cm-toast-panel-border);
135
+ --juice-toast-panel-shadow: var(--cm-toast-panel-shadow);
136
+ --juice-toast-ink: var(--cm-toast-ink);
137
+ --juice-toast-close: var(--cm-toast-close);
138
+ --juice-toast-close-color: var(--cm-toast-close-color);
139
+ --juice-toast-close-hover: var(--cm-toast-close-hover);
140
+ --juice-toast-focus-ring: var(--cm-toast-focus-ring);
141
+ --juice-toast-success: var(--cm-toast-success);
142
+ --juice-toast-success-soft: var(--cm-toast-success-soft);
143
+ --juice-toast-error: var(--cm-toast-error);
144
+ --juice-toast-error-soft: var(--cm-toast-error-soft);
145
+ --juice-toast-info: var(--cm-toast-info);
146
+ --juice-toast-info-soft: var(--cm-toast-info-soft);
147
+ --juice-toast-warning: var(--cm-toast-warning);
148
+ --juice-toast-warning-soft: var(--cm-toast-warning-soft);
149
+ /* Popover chrome — thinner --cm-* set. Close is a surface control,
150
+ not heading-fill. Distinct from modal/drawer/toast. */
151
+ --cm-popover-panel: var(--cm-surface);
152
+ --cm-popover-panel-border: var(--cm-border);
153
+ --cm-popover-panel-shadow: 0 18px 40px -24px color-mix(in srgb, var(--cm-heading) 22%, transparent);
154
+ --cm-popover-ink: var(--cm-text);
155
+ --cm-popover-close: var(--cm-surface);
156
+ --cm-popover-close-color: var(--cm-heading);
157
+ --cm-popover-close-hover: var(--cm-surface-muted);
158
+ --cm-popover-focus-ring: var(--cm-heading);
159
+ --juice-popover-panel: var(--cm-popover-panel);
160
+ --juice-popover-panel-border: var(--cm-popover-panel-border);
161
+ --juice-popover-panel-shadow: var(--cm-popover-panel-shadow);
162
+ --juice-popover-ink: var(--cm-popover-ink);
163
+ --juice-popover-close: var(--cm-popover-close);
164
+ --juice-popover-close-color: var(--cm-popover-close-color);
165
+ --juice-popover-close-hover: var(--cm-popover-close-hover);
166
+ --juice-popover-focus-ring: var(--cm-popover-focus-ring);
97
167
  background-color: var(--cm-page);
98
168
  color: var(--cm-text);
99
169
  font-family: var(--cm-body-font);
@@ -256,4 +326,152 @@
256
326
  [theme=citrusmint] [modal-close]:focus-visible {
257
327
  outline: 2px solid var(--juice-modal-focus-ring);
258
328
  outline-offset: 2px;
329
+ }
330
+
331
+ /* Drawer chrome. Generic Citrusmint buttons use heading fill;
332
+ [drawer-close] stays a surface control. Runtime is later. */
333
+ [theme=citrusmint] [drawer-overlay] {
334
+ background-color: var(--juice-drawer-overlay);
335
+ }
336
+
337
+ [theme=citrusmint] [drawer]:not([surfaceTone]) {
338
+ background-color: var(--juice-drawer-panel);
339
+ border: 1px solid var(--juice-drawer-panel-border);
340
+ box-shadow: var(--juice-drawer-panel-shadow);
341
+ }
342
+
343
+ [theme=citrusmint] button[drawer-close],
344
+ [theme=citrusmint] [drawer-close] {
345
+ background-color: var(--juice-drawer-close);
346
+ color: var(--juice-drawer-close-color);
347
+ box-shadow: none;
348
+ transform: none;
349
+ }
350
+
351
+ [theme=citrusmint] button[drawer-close]:hover,
352
+ [theme=citrusmint] [drawer-close]:hover {
353
+ background-color: var(--juice-drawer-close-hover);
354
+ color: var(--juice-drawer-close-color);
355
+ }
356
+
357
+ [theme=citrusmint] button[drawer-close]:focus-visible,
358
+ [theme=citrusmint] [drawer-close]:focus-visible {
359
+ outline: 2px solid var(--juice-drawer-focus-ring);
360
+ outline-offset: 2px;
361
+ }
362
+
363
+ /* Toast chrome. Generic Citrusmint buttons use heading fill;
364
+ [toast-close] stays a surface control. Runtime is later. */
365
+ [theme=citrusmint] [toast]:not([surfaceTone]) {
366
+ background-color: var(--juice-toast-panel);
367
+ border: 1px solid var(--juice-toast-panel-border);
368
+ box-shadow: var(--juice-toast-panel-shadow);
369
+ color: var(--juice-toast-ink);
370
+ }
371
+
372
+ [theme=citrusmint] [toast-title],
373
+ [theme=citrusmint] [toast-body] {
374
+ color: var(--juice-toast-ink);
375
+ }
376
+
377
+ [theme=citrusmint] [toast=success]:not([surfaceTone]) {
378
+ background-color: var(--juice-toast-success-soft);
379
+ }
380
+
381
+ [theme=citrusmint] [toast=success] {
382
+ border-left-color: var(--juice-toast-success);
383
+ }
384
+
385
+ [theme=citrusmint] [toast=success] [toast-title] {
386
+ color: var(--juice-toast-success);
387
+ }
388
+
389
+ [theme=citrusmint] [toast=error]:not([surfaceTone]) {
390
+ background-color: var(--juice-toast-error-soft);
391
+ }
392
+
393
+ [theme=citrusmint] [toast=error] {
394
+ border-left-color: var(--juice-toast-error);
395
+ }
396
+
397
+ [theme=citrusmint] [toast=error] [toast-title] {
398
+ color: var(--juice-toast-error);
399
+ }
400
+
401
+ [theme=citrusmint] [toast=info]:not([surfaceTone]) {
402
+ background-color: var(--juice-toast-info-soft);
403
+ }
404
+
405
+ [theme=citrusmint] [toast=info] {
406
+ border-left-color: var(--juice-toast-info);
407
+ }
408
+
409
+ [theme=citrusmint] [toast=info] [toast-title] {
410
+ color: var(--juice-toast-info);
411
+ }
412
+
413
+ [theme=citrusmint] [toast=warning]:not([surfaceTone]) {
414
+ background-color: var(--juice-toast-warning-soft);
415
+ }
416
+
417
+ [theme=citrusmint] [toast=warning] {
418
+ border-left-color: var(--juice-toast-warning);
419
+ }
420
+
421
+ [theme=citrusmint] [toast=warning] [toast-title] {
422
+ color: var(--juice-toast-warning);
423
+ }
424
+
425
+ [theme=citrusmint] button[toast-close],
426
+ [theme=citrusmint] [toast-close] {
427
+ background-color: var(--juice-toast-close);
428
+ color: var(--juice-toast-close-color);
429
+ box-shadow: none;
430
+ transform: none;
431
+ }
432
+
433
+ [theme=citrusmint] button[toast-close]:hover,
434
+ [theme=citrusmint] [toast-close]:hover {
435
+ background-color: var(--juice-toast-close-hover);
436
+ color: var(--juice-toast-close-color);
437
+ }
438
+
439
+ [theme=citrusmint] button[toast-close]:focus-visible,
440
+ [theme=citrusmint] [toast-close]:focus-visible {
441
+ outline: 2px solid var(--juice-toast-focus-ring);
442
+ outline-offset: 2px;
443
+ }
444
+
445
+ /* Popover chrome. Generic Citrusmint buttons use heading fill;
446
+ [popover-close] stays a surface control. Runtime is later. */
447
+ [theme=citrusmint] [popover-panel]:not([surfaceTone]) {
448
+ background-color: var(--juice-popover-panel);
449
+ border: 1px solid var(--juice-popover-panel-border);
450
+ box-shadow: var(--juice-popover-panel-shadow);
451
+ color: var(--juice-popover-ink);
452
+ }
453
+
454
+ [theme=citrusmint] [popover-header],
455
+ [theme=citrusmint] [popover-body] {
456
+ color: var(--juice-popover-ink);
457
+ }
458
+
459
+ [theme=citrusmint] button[popover-close],
460
+ [theme=citrusmint] [popover-close] {
461
+ background-color: var(--juice-popover-close);
462
+ color: var(--juice-popover-close-color);
463
+ box-shadow: none;
464
+ transform: none;
465
+ }
466
+
467
+ [theme=citrusmint] button[popover-close]:hover,
468
+ [theme=citrusmint] [popover-close]:hover {
469
+ background-color: var(--juice-popover-close-hover);
470
+ color: var(--juice-popover-close-color);
471
+ }
472
+
473
+ [theme=citrusmint] button[popover-close]:focus-visible,
474
+ [theme=citrusmint] [popover-close]:focus-visible {
475
+ outline: 2px solid var(--juice-popover-focus-ring);
476
+ outline-offset: 2px;
259
477
  }