@juice-js/ui 3.0.0-alpha.3 → 3.0.0-alpha.4
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/fesm2022/juice-js-ui.mjs
CHANGED
|
@@ -3,6 +3,7 @@ import { input, booleanAttribute, inject, ElementRef, DestroyRef, ViewEncapsulat
|
|
|
3
3
|
import { NgControl, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
4
|
import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
|
|
5
5
|
import { Overlay, CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';
|
|
6
|
+
import { DOCUMENT } from '@angular/common';
|
|
6
7
|
import { JuiceIcon } from '@juice-js/icons';
|
|
7
8
|
|
|
8
9
|
const BUTTON_STYLES = `
|
|
@@ -573,7 +574,9 @@ const POSITIONS = [
|
|
|
573
574
|
];
|
|
574
575
|
/**
|
|
575
576
|
* Single-select dropdown. Focus stays on the trigger (combobox pattern); the options are exposed through
|
|
576
|
-
* `aria-activedescendant`. The list
|
|
577
|
+
* `aria-activedescendant`. The list is an inline popover: it renders in the top layer (never clipped by `overflow` ancestors
|
|
578
|
+
* or covered by drawers and dialogs) while it sits next to the trigger in the DOM, so it follows the region's theme, accent
|
|
579
|
+
* and colour scheme live. It re-places itself when any ancestor scrolls.
|
|
577
580
|
*/
|
|
578
581
|
class JuiceSelect {
|
|
579
582
|
constructor() {
|
|
@@ -594,10 +597,6 @@ class JuiceSelect {
|
|
|
594
597
|
...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
|
|
595
598
|
this.triggerWidth = signal(0, /* @ts-ignore */
|
|
596
599
|
...(ngDevMode ? [{ debugName: "triggerWidth" }] : /* istanbul ignore next */ []));
|
|
597
|
-
/** The trigger's colour scheme, carried into the overlay (which lives at the end of <body>), so a select inside a
|
|
598
|
-
* dark-themed region opens a dark list. */
|
|
599
|
-
this.scheme = signal('', /* @ts-ignore */
|
|
600
|
-
...(ngDevMode ? [{ debugName: "scheme" }] : /* istanbul ignore next */ []));
|
|
601
600
|
this.activeId = signal(null, /* @ts-ignore */
|
|
602
601
|
...(ngDevMode ? [{ debugName: "activeId" }] : /* istanbul ignore next */ []));
|
|
603
602
|
this.displayLabel = signal('', /* @ts-ignore */
|
|
@@ -611,6 +610,9 @@ class JuiceSelect {
|
|
|
611
610
|
this.options = contentChildren(JuiceOption, { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), descendants: true });
|
|
612
611
|
this.trigger = viewChild.required('trigger', /* @ts-ignore */
|
|
613
612
|
...(ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []));
|
|
613
|
+
this.connected = viewChild(CdkConnectedOverlay, /* @ts-ignore */
|
|
614
|
+
...(ngDevMode ? [{ debugName: "connected" }] : /* istanbul ignore next */ []));
|
|
615
|
+
this.doc = inject(DOCUMENT);
|
|
614
616
|
this.keys = new ActiveDescendantKeyManager(this.options, inject(Injector))
|
|
615
617
|
.withTypeAhead(200)
|
|
616
618
|
.withHomeAndEnd()
|
|
@@ -619,6 +621,7 @@ class JuiceSelect {
|
|
|
619
621
|
this.onChange = () => undefined;
|
|
620
622
|
this.onTouched = () => undefined;
|
|
621
623
|
this.keys.change.subscribe((i) => this.activeId.set(this.options()[i]?.id ?? null));
|
|
624
|
+
inject(DestroyRef).onDestroy(() => this.stopScroll?.());
|
|
622
625
|
}
|
|
623
626
|
ngAfterContentChecked() {
|
|
624
627
|
const match = this.options().find((o) => o.value() === this.value());
|
|
@@ -664,7 +667,10 @@ class JuiceSelect {
|
|
|
664
667
|
return;
|
|
665
668
|
const trigger = this.trigger().nativeElement;
|
|
666
669
|
this.triggerWidth.set(trigger.offsetWidth);
|
|
667
|
-
|
|
670
|
+
// Re-place the list when any ancestor scrolls (a dialog body, a drawer, a scrolled panel), not only the window.
|
|
671
|
+
const onScroll = () => this.connected()?.overlayRef?.updatePosition();
|
|
672
|
+
this.doc.addEventListener('scroll', onScroll, { capture: true, passive: true });
|
|
673
|
+
this.stopScroll = () => this.doc.removeEventListener('scroll', onScroll, { capture: true });
|
|
668
674
|
this.open.set(true);
|
|
669
675
|
const items = this.options();
|
|
670
676
|
const selected = items.findIndex((o) => o.value() === this.value() && !o.disabled);
|
|
@@ -676,6 +682,8 @@ class JuiceSelect {
|
|
|
676
682
|
close() {
|
|
677
683
|
if (!this.open())
|
|
678
684
|
return;
|
|
685
|
+
this.stopScroll?.();
|
|
686
|
+
this.stopScroll = undefined;
|
|
679
687
|
this.open.set(false);
|
|
680
688
|
this.keys.setActiveItem(-1);
|
|
681
689
|
}
|
|
@@ -720,7 +728,7 @@ class JuiceSelect {
|
|
|
720
728
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: JuiceSelect, isStandalone: true, selector: "juice-select", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, providers: [
|
|
721
729
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => JuiceSelect), multi: true },
|
|
722
730
|
{ provide: JUICE_SELECT_HOST, useExisting: forwardRef(() => JuiceSelect) },
|
|
723
|
-
], queries: [{ propertyName: "options", predicate: JuiceOption, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
731
|
+
], queries: [{ propertyName: "options", predicate: JuiceOption, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }, { propertyName: "connected", first: true, predicate: CdkConnectedOverlay, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
724
732
|
<button
|
|
725
733
|
#trigger
|
|
726
734
|
type="button"
|
|
@@ -755,6 +763,7 @@ class JuiceSelect {
|
|
|
755
763
|
[cdkConnectedOverlayMinWidth]="triggerWidth()"
|
|
756
764
|
[cdkConnectedOverlayScrollStrategy]="scrollStrategy"
|
|
757
765
|
[cdkConnectedOverlayViewportMargin]="8"
|
|
766
|
+
cdkConnectedOverlayUsePopover="inline"
|
|
758
767
|
(overlayOutsideClick)="onOutsideClick($event)"
|
|
759
768
|
(detach)="close()"
|
|
760
769
|
>
|
|
@@ -762,7 +771,6 @@ class JuiceSelect {
|
|
|
762
771
|
class="juice-select-panel"
|
|
763
772
|
role="listbox"
|
|
764
773
|
[id]="listboxId"
|
|
765
|
-
[style.color-scheme]="scheme() || null"
|
|
766
774
|
[attr.aria-label]="field ? null : label() || placeholder() || 'Options'"
|
|
767
775
|
[attr.aria-labelledby]="field ? field.labelId : null"
|
|
768
776
|
(mousedown)="$event.preventDefault()"
|
|
@@ -809,6 +817,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
809
817
|
[cdkConnectedOverlayMinWidth]="triggerWidth()"
|
|
810
818
|
[cdkConnectedOverlayScrollStrategy]="scrollStrategy"
|
|
811
819
|
[cdkConnectedOverlayViewportMargin]="8"
|
|
820
|
+
cdkConnectedOverlayUsePopover="inline"
|
|
812
821
|
(overlayOutsideClick)="onOutsideClick($event)"
|
|
813
822
|
(detach)="close()"
|
|
814
823
|
>
|
|
@@ -816,7 +825,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
816
825
|
class="juice-select-panel"
|
|
817
826
|
role="listbox"
|
|
818
827
|
[id]="listboxId"
|
|
819
|
-
[style.color-scheme]="scheme() || null"
|
|
820
828
|
[attr.aria-label]="field ? null : label() || placeholder() || 'Options'"
|
|
821
829
|
[attr.aria-labelledby]="field ? field.labelId : null"
|
|
822
830
|
(mousedown)="$event.preventDefault()"
|
|
@@ -828,7 +836,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
828
836
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => JuiceSelect), multi: true },
|
|
829
837
|
{ provide: JUICE_SELECT_HOST, useExisting: forwardRef(() => JuiceSelect) },
|
|
830
838
|
], styles: ["juice-select{display:block;position:relative;font-family:var(--juice-font-sans)}.juice-select__trigger{box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:var(--juice-space-2);width:100%;min-height:var(--juice-field-height);margin:0;padding:0 var(--juice-field-padding-x);border:1px solid var(--juice-field-border);border-radius:var(--juice-field-radius);background:var(--juice-field-bg);color:var(--juice-field-fg);font-family:inherit;font-size:var(--juice-field-font-size);line-height:var(--juice-field-line-height);text-align:start;cursor:pointer;transition:border-color var(--juice-field-duration) var(--juice-field-ease),box-shadow var(--juice-field-duration) var(--juice-field-ease)}.juice-select__trigger:enabled:hover{border-color:var(--juice-field-border-hover)}.juice-select__trigger:focus-visible,.juice-select__trigger[aria-expanded=true]{outline:none;border-color:var(--juice-field-border-focus);box-shadow:0 0 0 3px var(--juice-field-focus-halo)}.juice-select__trigger[data-status=error]{border-color:var(--juice-field-error)}.juice-select__trigger[data-status=error]:is(:focus-visible,[aria-expanded=true]){box-shadow:0 0 0 3px var(--juice-field-error-halo)}.juice-select__trigger[data-status=warning]{border-color:var(--juice-field-warning)}.juice-select__trigger[data-status=warning]:is(:focus-visible,[aria-expanded=true]){box-shadow:0 0 0 3px var(--juice-field-warning-halo)}.juice-select__trigger[data-status=success]{border-color:var(--juice-field-success)}.juice-select__trigger[data-status=success]:is(:focus-visible,[aria-expanded=true]){box-shadow:0 0 0 3px var(--juice-field-success-halo)}.juice-select__trigger:disabled{background:var(--juice-field-disabled-bg);border-color:var(--juice-field-disabled-border);color:var(--juice-field-disabled-fg);cursor:not-allowed}.juice-select__value{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.juice-select__placeholder{color:var(--juice-field-placeholder)}.juice-select__trigger:disabled .juice-select__placeholder{color:inherit}.juice-select__chevron{flex:none;width:1rem;height:1rem;color:var(--juice-listbox-chevron);transition:transform var(--juice-field-duration) var(--juice-field-ease)}.juice-select__trigger[aria-expanded=true] .juice-select__chevron{transform:rotate(180deg)}.juice-select-panel{box-sizing:border-box;flex:1 1 auto;width:100%;max-height:var(--juice-listbox-max-height);margin:0;padding:var(--juice-listbox-padding);overflow-y:auto;border:1px solid var(--juice-listbox-border);border-radius:var(--juice-listbox-radius);background:var(--juice-listbox-bg);color:var(--juice-listbox-fg);box-shadow:var(--juice-listbox-shadow);font-family:var(--juice-font-sans);font-size:var(--juice-field-font-size);line-height:var(--juice-field-line-height);animation:juice-select-in var(--juice-field-duration) var(--juice-field-ease)}@keyframes juice-select-in{0%{opacity:0;transform:translateY(-2px)}}juice-option{display:flex;align-items:center;gap:var(--juice-listbox-option-gap);min-height:var(--juice-listbox-option-height);padding:0 var(--juice-listbox-option-padding-x);border-radius:var(--juice-listbox-option-radius);cursor:pointer}.juice-option__label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.juice-option__check{flex:none;width:1rem;height:1rem;color:var(--juice-listbox-option-check)}juice-option.juice-option--active{background:var(--juice-listbox-option-active-bg)}juice-option[aria-selected=true]{background:var(--juice-listbox-option-selected-bg);color:var(--juice-listbox-option-selected-fg)}juice-option[aria-selected=true].juice-option--active{background:var(--juice-listbox-option-active-bg)}juice-option[aria-disabled=true]{color:var(--juice-listbox-option-disabled-fg);cursor:not-allowed}@media(prefers-reduced-motion:reduce){.juice-select__trigger,.juice-select__chevron{transition:none}.juice-select-panel{animation:none}}@media(forced-colors:active){.juice-select__trigger:is(:focus-visible,[aria-expanded=true]){outline:2px solid CanvasText;outline-offset:1px}juice-option.juice-option--active{outline:1px solid Highlight}}\n"] }]
|
|
831
|
-
}], ctorParameters: () => [], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], options: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => JuiceOption), { ...{ descendants: true }, isSignal: true }] }], trigger: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }] } });
|
|
839
|
+
}], ctorParameters: () => [], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], options: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => JuiceOption), { ...{ descendants: true }, isSignal: true }] }], trigger: [{ type: i0.ViewChild, args: ['trigger', { isSignal: true }] }], connected: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkConnectedOverlay), { isSignal: true }] }] } });
|
|
832
840
|
|
|
833
841
|
const CHECKBOX_STYLES = `
|
|
834
842
|
/* The marks are drawn on the box's own 16-unit grid (viewBox 0 0 16 16 = the border box), so they scale with
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"juice-js-ui.mjs","sources":["../../../../projects/juice-js/ui/src/lib/button/button.ts","../../../../projects/juice-js/ui/src/lib/core/style-loader.ts","../../../../projects/juice-js/ui/src/lib/field/field.ts","../../../../projects/juice-js/ui/src/lib/select/select.ts","../../../../projects/juice-js/ui/src/lib/checkbox/checkbox.ts","../../../../projects/juice-js/ui/src/lib/feedback/feedback.ts","../../../../projects/juice-js/ui/src/juice-js-ui.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n ViewEncapsulation,\n afterNextRender,\n booleanAttribute,\n inject,\n input,\n isDevMode,\n} from '@angular/core';\n\nexport type JuiceButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger';\nexport type JuiceButtonSize = 'sm' | 'md' | 'lg';\n\nconst BUTTON_STYLES = `\n [juiceButton], [juiceIconButton] {\n box-sizing: border-box;\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--juice-space-2);\n min-height: var(--juice-control-height-md);\n padding: 0 var(--juice-space-4);\n border: 1px solid transparent;\n border-radius: var(--juice-radius-md);\n background: transparent;\n color: var(--juice-color-text);\n font-family: var(--juice-font-sans);\n font-size: var(--juice-text-sm);\n font-weight: var(--juice-weight-medium);\n line-height: 1;\n text-decoration: none;\n white-space: nowrap;\n cursor: pointer;\n user-select: none;\n transition: background-color var(--juice-duration-fast) var(--juice-ease-standard),\n border-color var(--juice-duration-fast) var(--juice-ease-standard),\n color var(--juice-duration-fast) var(--juice-ease-standard);\n }\n [juiceButton][data-size='sm'] { min-height: var(--juice-control-height-sm); padding: 0 var(--juice-space-3); font-size: var(--juice-text-xs); }\n [juiceButton][data-size='lg'] { min-height: var(--juice-control-height-lg); padding: 0 var(--juice-space-6); font-size: var(--juice-text-md); }\n [juiceIconButton] {\n width: var(--juice-control-height-md);\n height: var(--juice-control-height-md);\n padding: 0;\n }\n [juiceButton]:focus-visible, [juiceIconButton]:focus-visible {\n outline: 2px solid var(--juice-button-focus-ring);\n outline-offset: 2px;\n }\n /* Interaction (README, Interaction tokens): filled variants lighten slightly on hover and deepen on press in dark, and\n deepen on both in light; outlined and ghost variants step the surface. Hover and press never apply to a disabled\n button: :where() keeps that guard at zero specificity, so the disabled rule below still wins on its own. */\n [juiceButton][data-variant='primary'] { background: var(--juice-button-bg); color: var(--juice-button-fg); }\n [juiceButton][data-variant='primary']:where(:not(:disabled, [aria-disabled='true'])):hover { background: var(--juice-button-hover-bg); }\n [juiceButton][data-variant='primary']:where(:not(:disabled, [aria-disabled='true'])):active { background: var(--juice-button-active-bg); }\n [juiceButton][data-variant='secondary'] {\n background: var(--juice-button-secondary-bg);\n border-color: var(--juice-button-secondary-border);\n color: var(--juice-button-secondary-fg);\n }\n [juiceButton][data-variant='secondary']:where(:not(:disabled, [aria-disabled='true'])):hover {\n background: var(--juice-button-secondary-hover-bg);\n border-color: var(--juice-button-secondary-hover-border);\n }\n [juiceButton][data-variant='secondary']:where(:not(:disabled, [aria-disabled='true'])):active { background: var(--juice-button-secondary-active-bg); }\n [juiceButton][data-variant='ghost'], [juiceIconButton] { color: var(--juice-button-ghost-fg); }\n :is([juiceButton][data-variant='ghost'], [juiceIconButton]):where(:not(:disabled, [aria-disabled='true'])):hover { background: var(--juice-button-ghost-hover-bg); }\n :is([juiceButton][data-variant='ghost'], [juiceIconButton]):where(:not(:disabled, [aria-disabled='true'])):active { background: var(--juice-button-ghost-active-bg); }\n [juiceButton][data-variant='danger'] { background: var(--juice-button-danger-bg); color: var(--juice-button-danger-fg); }\n [juiceButton][data-variant='danger']:where(:not(:disabled, [aria-disabled='true'])):hover { background: var(--juice-button-danger-hover-bg); }\n [juiceButton][data-variant='danger']:where(:not(:disabled, [aria-disabled='true'])):active { background: var(--juice-button-danger-active-bg); }\n [juiceButton]:disabled, [juiceIconButton]:disabled, [juiceButton][aria-disabled='true'] {\n background: var(--juice-button-disabled-bg);\n border-color: transparent;\n color: var(--juice-button-disabled-fg);\n cursor: not-allowed;\n }\n [juiceButton][data-loading] { cursor: progress; }\n .juice-button__spinner {\n box-sizing: border-box;\n width: 1em;\n height: 1em;\n border: 2px solid currentColor;\n border-right-color: transparent;\n border-radius: var(--juice-radius-full);\n animation: juice-button-spin 700ms linear infinite;\n }\n @media (prefers-reduced-motion: reduce) { .juice-button__spinner { animation-duration: 3s; } }\n @keyframes juice-button-spin { to { transform: rotate(360deg); } }\n`;\n\n/**\n * Button or link styled as a button. `loading` sets `aria-busy` and swallows activation (the element stays focusable\n * and does not use `disabled`, so focus is not lost while busy).\n */\n@Component({\n selector: 'button[juiceButton], a[juiceButton]',\n template: `@if (loading()) {<span class=\"juice-button__spinner\" aria-hidden=\"true\"></span>}<span class=\"juice-button__label\"><ng-content /></span>`,\n styles: BUTTON_STYLES,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[attr.data-variant]': 'variant()',\n '[attr.data-size]': 'size()',\n '[attr.data-loading]': 'loading() ? \"\" : null',\n '[attr.aria-busy]': 'loading() ? \"true\" : null',\n },\n})\nexport class JuiceButton {\n readonly variant = input<JuiceButtonVariant>('secondary');\n readonly size = input<JuiceButtonSize>('md');\n readonly loading = input(false, { transform: booleanAttribute });\n\n constructor() {\n const el = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n if (el.tagName === 'BUTTON' && !el.hasAttribute('type')) el.setAttribute('type', 'button');\n // Capture phase on the target itself runs before the consumer's (click) handler, so loading blocks it.\n const block = (e: Event) => {\n if (this.loading()) {\n e.preventDefault();\n e.stopImmediatePropagation();\n }\n };\n el.addEventListener('click', block, true);\n inject(DestroyRef).onDestroy(() => el.removeEventListener('click', block, true));\n }\n}\n\n/** Square icon-only button. It has no visible text, so an `aria-label` (or `aria-labelledby`) is required. */\n@Component({\n selector: 'button[juiceIconButton]',\n template: `<ng-content />`,\n styles: BUTTON_STYLES,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class JuiceIconButton {\n constructor() {\n const el = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n if (!el.hasAttribute('type')) el.setAttribute('type', 'button');\n if (isDevMode()) {\n afterNextRender(() => {\n if (!el.getAttribute('aria-label')?.trim() && !el.getAttribute('aria-labelledby')?.trim()) {\n console.error('[juiceIconButton] An icon button needs an aria-label (or aria-labelledby).', el);\n }\n });\n }\n }\n}\n","import { ApplicationRef, EnvironmentInjector, Type, createComponent, inject } from '@angular/core';\n\nconst loaded = new WeakMap<ApplicationRef, Set<Type<unknown>>>();\n\nlet counter = 0;\n\n/** Next unique DOM id with the given prefix (unique per page, not per component). */\nexport function nextId(prefix: string): string {\n return `${prefix}-${++counter}`;\n}\n\n/**\n * Directives on native elements (`input[juiceInput]`) cannot own styles. This instantiates a hidden component whose\n * `ViewEncapsulation.None` styles Angular adds to the document once per application. Call it from an injection context.\n */\nexport function loadStyles(styleHost: Type<unknown>): void {\n const appRef = inject(ApplicationRef);\n const env = inject(EnvironmentInjector);\n let set = loaded.get(appRef);\n if (!set) loaded.set(appRef, (set = new Set()));\n if (set.has(styleHost)) return;\n set.add(styleHost);\n createComponent(styleHost, { environmentInjector: env });\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n DoCheck,\n ElementRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { loadStyles, nextId } from '../core/style-loader';\n\n// One rulebook for every text control (input, textarea, and the select trigger, which reads the same tokens):\n// content 14/20, label 13/20 medium, assistance 12/16; one edge; focus = accent edge + soft halo, never a second outline.\nconst FIELD_STYLES = `\n juice-field { display: flex; flex-direction: column; font-family: var(--juice-font-sans); }\n .juice-field__label {\n margin-bottom: var(--juice-field-label-gap);\n color: var(--juice-field-label);\n font-size: var(--juice-field-label-font-size);\n font-weight: var(--juice-field-label-font-weight);\n line-height: 1.25rem;\n }\n .juice-field__message {\n display: flex;\n align-items: flex-start;\n gap: 0.375rem;\n margin-top: var(--juice-field-message-gap);\n color: var(--juice-field-hint);\n font-size: var(--juice-field-message-font-size);\n line-height: var(--juice-field-message-line-height);\n }\n .juice-field__message[data-status='error'] { color: var(--juice-field-error); }\n .juice-field__message[data-status='warning'] { color: var(--juice-field-warning); }\n .juice-field__message[data-status='success'] { color: var(--juice-field-success); }\n .juice-field__icon { flex: none; width: 0.875rem; height: 0.875rem; margin-top: 1px; }\n .juice-field__counter { margin-left: auto; padding-left: var(--juice-space-2); color: var(--juice-field-counter-fg); font-variant-numeric: tabular-nums; white-space: nowrap; }\n .juice-field__counter[data-level='near'] { color: var(--juice-field-warning); }\n .juice-field__counter[data-level='limit'] { color: var(--juice-field-error); }\n .juice-field__live { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }\n\n :is(input, textarea)[juiceInput] {\n box-sizing: border-box;\n width: 100%;\n min-height: var(--juice-field-height);\n margin: 0;\n padding: 0 var(--juice-field-padding-x);\n border: 1px solid var(--juice-field-border);\n border-radius: var(--juice-field-radius);\n background: var(--juice-field-bg);\n color: var(--juice-field-fg);\n font-family: var(--juice-font-sans);\n font-size: var(--juice-field-font-size);\n line-height: var(--juice-field-line-height);\n transition:\n border-color var(--juice-field-duration) var(--juice-field-ease),\n box-shadow var(--juice-field-duration) var(--juice-field-ease);\n }\n textarea[juiceInput] {\n display: block;\n min-height: var(--juice-field-textarea-min-height);\n padding-block: var(--juice-field-textarea-padding-y);\n resize: vertical;\n }\n :is(input, textarea)[juiceInput]::placeholder { color: var(--juice-field-placeholder); opacity: 1; }\n :is(input, textarea)[juiceInput]:enabled:not([readonly]):hover { border-color: var(--juice-field-border-hover); }\n :is(input, textarea)[juiceInput]:focus {\n outline: none;\n border-color: var(--juice-field-border-focus);\n box-shadow: 0 0 0 3px var(--juice-field-focus-halo);\n }\n :is(input, textarea)[juiceInput][data-status='error'] { border-color: var(--juice-field-error); }\n :is(input, textarea)[juiceInput][data-status='error']:focus { box-shadow: 0 0 0 3px var(--juice-field-error-halo); }\n :is(input, textarea)[juiceInput][data-status='warning'] { border-color: var(--juice-field-warning); }\n :is(input, textarea)[juiceInput][data-status='warning']:focus { box-shadow: 0 0 0 3px var(--juice-field-warning-halo); }\n :is(input, textarea)[juiceInput][data-status='success'] { border-color: var(--juice-field-success); }\n :is(input, textarea)[juiceInput][data-status='success']:focus { box-shadow: 0 0 0 3px var(--juice-field-success-halo); }\n :is(input, textarea)[juiceInput][readonly] { background: var(--juice-field-readonly-bg); border-color: var(--juice-field-readonly-border); }\n :is(input, textarea)[juiceInput]:disabled {\n background: var(--juice-field-disabled-bg);\n border-color: var(--juice-field-disabled-border);\n color: var(--juice-field-disabled-fg);\n cursor: not-allowed;\n }\n :is(input, textarea)[juiceInput]:disabled::placeholder { color: var(--juice-field-disabled-fg); }\n @media (prefers-reduced-motion: reduce) { :is(input, textarea)[juiceInput] { transition: none; } }\n /* Forced colours drop box-shadow, so focus falls back to a system-coloured outline. */\n @media (forced-colors: active) { :is(input, textarea)[juiceInput]:focus { outline: 2px solid CanvasText; outline-offset: 1px; } }\n`;\n\nexport type JuiceFieldStatus = 'error' | 'warning' | 'success';\n\n/** What a control inside `<juice-field>` needs from it. */\nexport interface JuiceFieldControl {\n readonly controlId: string;\n readonly labelId: string;\n readonly describedBy: () => string | null;\n readonly invalid: () => boolean;\n}\n\n/**\n * Label, hint, status message and optional character counter for one form control. The projected `[juiceInput]` (or\n * `<juice-select>`) gets the id the label points at, `aria-describedby` for the message and counter, `aria-invalid` for\n * an error, and `data-status` for its edge. A status message (error over warning over success) replaces the hint while it\n * shows. `counter` shows `length / maxlength` for a control with a `maxlength`; screen readers hear only the 90% and limit\n * thresholds, not every keystroke.\n */\n@Component({\n selector: 'juice-field',\n template: `\n <label class=\"juice-field__label\" [id]=\"labelId\" [attr.for]=\"controlId\">{{ label() }}</label>\n <ng-content />\n @if (message() || showCounter()) {\n <div class=\"juice-field__message\" [attr.data-status]=\"status()\">\n @if (message()) {\n @switch (status()) {\n @case ('error') {\n <svg class=\"juice-field__icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><circle cx=\"12\" cy=\"12\" r=\"10\" /><path d=\"M12 8v4M12 16h.01\" /></svg>\n }\n @case ('warning') {\n <svg class=\"juice-field__icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\" /><path d=\"M12 9v4M12 17h.01\" /></svg>\n }\n @case ('success') {\n <svg class=\"juice-field__icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><circle cx=\"12\" cy=\"12\" r=\"10\" /><path d=\"m9 12 2 2 4-4\" /></svg>\n }\n }\n <span [id]=\"messageId\">{{ message() }}</span>\n }\n @if (showCounter()) {\n <span class=\"juice-field__counter\" [id]=\"counterId\" [attr.data-level]=\"level()\">{{ length() }} / {{ max() }}</span>\n }\n </div>\n }\n @if (showCounter()) {\n <span class=\"juice-field__live\" aria-live=\"polite\">{{ announcement() }}</span>\n }\n `,\n styles: FIELD_STYLES,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class JuiceField implements JuiceFieldControl {\n readonly label = input.required<string>();\n readonly hint = input<string>('');\n readonly error = input<string>('');\n readonly warning = input<string>('');\n readonly success = input<string>('');\n readonly counter = input(false, { transform: booleanAttribute });\n\n readonly controlId = nextId('juice-field');\n readonly messageId = `${this.controlId}-message`;\n readonly counterId = `${this.controlId}-counter`;\n readonly labelId = `${this.controlId}-label`;\n /** @deprecated since 3.0: the hint and the status message share one element; use `messageId`. */\n readonly hintId = this.messageId;\n /** @deprecated since 3.0: use `messageId`. */\n readonly errorId = this.messageId;\n\n /** Length and `maxlength` of the projected control, reported by `[juiceInput]`. */\n readonly length = signal(0);\n readonly max = signal<number | null>(null);\n\n readonly status = computed<JuiceFieldStatus | null>(() =>\n this.error() ? 'error' : this.warning() ? 'warning' : this.success() ? 'success' : null,\n );\n readonly message = computed(() => {\n const s = this.status();\n return s === 'error' ? this.error() : s === 'warning' ? this.warning() : s === 'success' ? this.success() : this.hint();\n });\n readonly invalid = () => !!this.error();\n\n protected readonly showCounter = computed(() => this.counter() && this.max() !== null);\n protected readonly level = computed<'near' | 'limit' | null>(() => {\n const max = this.max();\n if (!this.counter() || max === null || max <= 0) return null;\n const n = this.length();\n return n >= max ? 'limit' : n >= max * 0.9 ? 'near' : null;\n });\n protected readonly announcement = computed(() =>\n this.level() === 'limit' ? 'Character limit reached' : this.level() === 'near' ? 'Approaching the character limit' : '',\n );\n\n readonly describedBy = computed(() => {\n const ids = [this.message() ? this.messageId : '', this.showCounter() ? this.counterId : ''].filter(Boolean);\n return ids.length ? ids.join(' ') : null;\n });\n}\n\n/** Styles for the text input and textarea, wired to a surrounding `<juice-field>` when there is one. */\n@Directive({\n selector: 'input[juiceInput], textarea[juiceInput]',\n host: {\n '[attr.id]': 'field?.controlId ?? null',\n '[attr.aria-describedby]': 'field?.describedBy() ?? null',\n '[attr.aria-invalid]': 'invalid() ? \"true\" : null',\n '[attr.data-status]': 'status()',\n '(blur)': 'sync()',\n '(input)': 'sync()',\n },\n})\nexport class JuiceInput implements DoCheck {\n protected readonly field = inject(JuiceField, { optional: true });\n private readonly control = inject(NgControl, { optional: true, self: true });\n private readonly el = inject<ElementRef<HTMLInputElement | HTMLTextAreaElement>>(ElementRef).nativeElement;\n private readonly state = signal(false);\n\n /** Invalid is shown only once the user has touched the control (or the field was given an error without a form control). */\n protected readonly invalid = computed(() => this.state() || (!this.control && !!this.field?.error()));\n /** The field's status edge; an error edge waits for `invalid`, like `aria-invalid`. */\n protected readonly status = computed(() => {\n const s = this.field?.status() ?? null;\n return s === 'error' && !this.invalid() && !!this.control ? null : s;\n });\n\n constructor() {\n loadStyles(JuiceFieldStyles);\n }\n\n ngDoCheck(): void {\n this.sync();\n }\n\n protected sync(): void {\n const c = this.control;\n this.state.set(!!c && !!c.invalid && !!c.touched);\n const f = this.field;\n if (f) {\n f.length.set(this.el.value.length);\n f.max.set(this.el.maxLength > 0 ? this.el.maxLength : null);\n }\n }\n}\n\n@Component({ selector: 'juice-field-styles', template: '', styles: FIELD_STYLES, encapsulation: ViewEncapsulation.None })\nclass JuiceFieldStyles {}\n","import { ActiveDescendantKeyManager, Highlightable } from '@angular/cdk/a11y';\nimport { CdkConnectedOverlay, CdkOverlayOrigin, ConnectedPosition, Overlay, ScrollStrategy } from '@angular/cdk/overlay';\nimport {\n AfterContentChecked,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n InjectionToken,\n Injector,\n Signal,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChildren,\n forwardRef,\n inject,\n input,\n model,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { JuiceField } from '../field/field';\nimport { nextId } from '../core/style-loader';\n\n/** What an option needs from its select. */\ninterface JuiceSelectHost {\n readonly value: Signal<unknown>;\n choose(option: JuiceOption): void;\n activate(option: JuiceOption): void;\n}\nconst JUICE_SELECT_HOST = new InjectionToken<JuiceSelectHost>('JUICE_SELECT_HOST');\n\n// The trigger follows the text-field rulebook exactly (it reads the --juice-field-* tokens); the list reads --juice-listbox-*.\nconst SELECT_STYLES = `\n juice-select { display: block; position: relative; font-family: var(--juice-font-sans); }\n .juice-select__trigger {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--juice-space-2);\n width: 100%;\n min-height: var(--juice-field-height);\n margin: 0;\n padding: 0 var(--juice-field-padding-x);\n border: 1px solid var(--juice-field-border);\n border-radius: var(--juice-field-radius);\n background: var(--juice-field-bg);\n color: var(--juice-field-fg);\n font-family: inherit;\n font-size: var(--juice-field-font-size);\n line-height: var(--juice-field-line-height);\n text-align: start;\n cursor: pointer;\n transition:\n border-color var(--juice-field-duration) var(--juice-field-ease),\n box-shadow var(--juice-field-duration) var(--juice-field-ease);\n }\n .juice-select__trigger:enabled:hover { border-color: var(--juice-field-border-hover); }\n .juice-select__trigger:focus-visible,\n .juice-select__trigger[aria-expanded='true'] {\n outline: none;\n border-color: var(--juice-field-border-focus);\n box-shadow: 0 0 0 3px var(--juice-field-focus-halo);\n }\n .juice-select__trigger[data-status='error'] { border-color: var(--juice-field-error); }\n .juice-select__trigger[data-status='error']:is(:focus-visible, [aria-expanded='true']) { box-shadow: 0 0 0 3px var(--juice-field-error-halo); }\n .juice-select__trigger[data-status='warning'] { border-color: var(--juice-field-warning); }\n .juice-select__trigger[data-status='warning']:is(:focus-visible, [aria-expanded='true']) { box-shadow: 0 0 0 3px var(--juice-field-warning-halo); }\n .juice-select__trigger[data-status='success'] { border-color: var(--juice-field-success); }\n .juice-select__trigger[data-status='success']:is(:focus-visible, [aria-expanded='true']) { box-shadow: 0 0 0 3px var(--juice-field-success-halo); }\n .juice-select__trigger:disabled {\n background: var(--juice-field-disabled-bg);\n border-color: var(--juice-field-disabled-border);\n color: var(--juice-field-disabled-fg);\n cursor: not-allowed;\n }\n .juice-select__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .juice-select__placeholder { color: var(--juice-field-placeholder); }\n .juice-select__trigger:disabled .juice-select__placeholder { color: inherit; }\n .juice-select__chevron {\n flex: none;\n width: 1rem;\n height: 1rem;\n color: var(--juice-listbox-chevron);\n transition: transform var(--juice-field-duration) var(--juice-field-ease);\n }\n .juice-select__trigger[aria-expanded='true'] .juice-select__chevron { transform: rotate(180deg); }\n /* The CDK pane is a flex box: the panel must grow to fill it, or it shrinks to its content under a wide trigger. */\n .juice-select-panel {\n box-sizing: border-box;\n flex: 1 1 auto;\n width: 100%;\n max-height: var(--juice-listbox-max-height);\n margin: 0;\n padding: var(--juice-listbox-padding);\n overflow-y: auto;\n border: 1px solid var(--juice-listbox-border);\n border-radius: var(--juice-listbox-radius);\n background: var(--juice-listbox-bg);\n color: var(--juice-listbox-fg);\n box-shadow: var(--juice-listbox-shadow);\n font-family: var(--juice-font-sans);\n font-size: var(--juice-field-font-size);\n line-height: var(--juice-field-line-height);\n animation: juice-select-in var(--juice-field-duration) var(--juice-field-ease);\n }\n @keyframes juice-select-in { from { opacity: 0; transform: translateY(-2px); } }\n juice-option {\n display: flex;\n align-items: center;\n gap: var(--juice-listbox-option-gap);\n min-height: var(--juice-listbox-option-height);\n padding: 0 var(--juice-listbox-option-padding-x);\n border-radius: var(--juice-listbox-option-radius);\n cursor: pointer;\n }\n .juice-option__label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .juice-option__check { flex: none; width: 1rem; height: 1rem; color: var(--juice-listbox-option-check); }\n juice-option.juice-option--active { background: var(--juice-listbox-option-active-bg); }\n juice-option[aria-selected='true'] { background: var(--juice-listbox-option-selected-bg); color: var(--juice-listbox-option-selected-fg); }\n juice-option[aria-selected='true'].juice-option--active { background: var(--juice-listbox-option-active-bg); }\n juice-option[aria-disabled='true'] { color: var(--juice-listbox-option-disabled-fg); cursor: not-allowed; }\n @media (prefers-reduced-motion: reduce) {\n .juice-select__trigger, .juice-select__chevron { transition: none; }\n .juice-select-panel { animation: none; }\n }\n @media (forced-colors: active) {\n .juice-select__trigger:is(:focus-visible, [aria-expanded='true']) { outline: 2px solid CanvasText; outline-offset: 1px; }\n juice-option.juice-option--active { outline: 1px solid Highlight; }\n }\n`;\n\n/** One choice in a `<juice-select>`. Its text is the label shown in the trigger and matched by typeahead. */\n@Component({\n selector: 'juice-option',\n template: `<span class=\"juice-option__label\"><ng-content /></span>\n @if (selected()) {\n <svg class=\"juice-option__check\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M20 6 9 17l-5-5\" /></svg>\n }`,\n styles: SELECT_STYLES,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n role: 'option',\n '[id]': 'id',\n '[attr.aria-selected]': 'selected() ? \"true\" : \"false\"',\n '[attr.aria-disabled]': 'isDisabled() ? \"true\" : null',\n '[class.juice-option--active]': 'active()',\n '(click)': 'select.choose(this)',\n '(mouseenter)': 'select.activate(this)',\n },\n})\nexport class JuiceOption implements Highlightable {\n readonly value = input<unknown>();\n readonly isDisabled = input(false, { alias: 'disabled', transform: booleanAttribute });\n\n readonly id = nextId('juice-option');\n protected readonly select = inject(JUICE_SELECT_HOST);\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n protected readonly active = signal(false);\n protected readonly selected = computed(() => this.select.value() === this.value());\n\n /** Read by `ListKeyManager` through `skipPredicate`. */\n get disabled(): boolean {\n return this.isDisabled();\n }\n\n getLabel(): string {\n return (this.el.textContent ?? '').trim();\n }\n setActiveStyles(): void {\n this.active.set(true);\n this.el.scrollIntoView?.({ block: 'nearest' });\n }\n setInactiveStyles(): void {\n this.active.set(false);\n }\n}\n\nconst POSITIONS: ConnectedPosition[] = [\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 4 },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -4 },\n];\n\n/**\n * Single-select dropdown. Focus stays on the trigger (combobox pattern); the options are exposed through\n * `aria-activedescendant`. The list opens in a CDK overlay, so it is not clipped by scrolling or `overflow` ancestors.\n */\n@Component({\n selector: 'juice-select',\n imports: [CdkConnectedOverlay, CdkOverlayOrigin],\n template: `\n <button\n #trigger\n type=\"button\"\n class=\"juice-select__trigger\"\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [attr.id]=\"field?.controlId ?? triggerId\"\n [attr.aria-expanded]=\"open() ? 'true' : 'false'\"\n [attr.aria-controls]=\"open() ? listboxId : null\"\n [attr.aria-activedescendant]=\"open() ? activeId() : null\"\n [attr.aria-label]=\"field ? null : label() || null\"\n [attr.aria-describedby]=\"field?.describedBy() ?? null\"\n [attr.aria-invalid]=\"field && field.invalid() ? 'true' : null\"\n [attr.data-status]=\"field?.status() ?? null\"\n [disabled]=\"isDisabled()\"\n (click)=\"toggle()\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onTouched()\"\n >\n <span class=\"juice-select__value\" [class.juice-select__placeholder]=\"!hasValue()\">{{ displayLabel() }}</span>\n <svg class=\"juice-select__chevron\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </button>\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"open()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayMinWidth]=\"triggerWidth()\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayViewportMargin]=\"8\"\n (overlayOutsideClick)=\"onOutsideClick($event)\"\n (detach)=\"close()\"\n >\n <div\n class=\"juice-select-panel\"\n role=\"listbox\"\n [id]=\"listboxId\"\n [style.color-scheme]=\"scheme() || null\"\n [attr.aria-label]=\"field ? null : label() || placeholder() || 'Options'\"\n [attr.aria-labelledby]=\"field ? field.labelId : null\"\n (mousedown)=\"$event.preventDefault()\"\n >\n <ng-content />\n </div>\n </ng-template>\n `,\n styles: SELECT_STYLES,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => JuiceSelect), multi: true },\n { provide: JUICE_SELECT_HOST, useExisting: forwardRef(() => JuiceSelect) },\n ],\n})\nexport class JuiceSelect implements ControlValueAccessor, AfterContentChecked, JuiceSelectHost {\n readonly placeholder = input('');\n /** Accessible name when the select is not inside a `<juice-field>`. */\n readonly label = input('');\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly value = model<unknown>(undefined);\n\n protected readonly field = inject(JuiceField, { optional: true });\n protected readonly triggerId = nextId('juice-select');\n protected readonly listboxId = nextId('juice-listbox');\n protected readonly positions = POSITIONS;\n protected readonly scrollStrategy: ScrollStrategy = inject(Overlay).scrollStrategies.reposition();\n\n protected readonly open = signal(false);\n protected readonly triggerWidth = signal(0);\n /** The trigger's colour scheme, carried into the overlay (which lives at the end of <body>), so a select inside a\n * dark-themed region opens a dark list. */\n protected readonly scheme = signal('');\n protected readonly activeId = signal<string | null>(null);\n protected readonly displayLabel = signal('');\n protected readonly hasValue = signal(false);\n private readonly cvaDisabled = signal(false);\n protected readonly isDisabled = computed(() => this.disabled() || this.cvaDisabled());\n\n private readonly options = contentChildren(JuiceOption, { descendants: true });\n private readonly trigger = viewChild.required<ElementRef<HTMLButtonElement>>('trigger');\n private readonly keys = new ActiveDescendantKeyManager<JuiceOption>(this.options, inject(Injector))\n .withTypeAhead(200)\n .withHomeAndEnd()\n .withPageUpDown()\n .skipPredicate((o) => o.disabled);\n\n private onChange: (v: unknown) => void = () => undefined;\n protected onTouched: () => void = () => undefined;\n\n constructor() {\n this.keys.change.subscribe((i) => this.activeId.set(this.options()[i]?.id ?? null));\n }\n\n ngAfterContentChecked(): void {\n const match = this.options().find((o) => o.value() === this.value());\n const text = match ? match.getLabel() : this.placeholder();\n if (this.displayLabel() !== text) this.displayLabel.set(text);\n if (this.hasValue() !== !!match) this.hasValue.set(!!match);\n }\n\n writeValue(v: unknown): void {\n this.value.set(v);\n }\n registerOnChange(fn: (v: unknown) => void): void {\n this.onChange = fn;\n }\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n setDisabledState(d: boolean): void {\n this.cvaDisabled.set(d);\n if (d) this.close();\n }\n\n choose(option: JuiceOption): void {\n if (option.disabled) return;\n this.value.set(option.value());\n this.onChange(option.value());\n this.close();\n }\n activate(option: JuiceOption): void {\n if (!option.disabled) this.keys.setActiveItem(option);\n }\n\n protected toggle(): void {\n if (this.open()) this.close();\n else this.show();\n }\n\n private show(): void {\n if (this.isDisabled() || this.open()) return;\n const trigger = this.trigger().nativeElement;\n this.triggerWidth.set(trigger.offsetWidth);\n this.scheme.set(getComputedStyle(trigger).colorScheme);\n this.open.set(true);\n const items = this.options();\n const selected = items.findIndex((o) => o.value() === this.value() && !o.disabled);\n if (selected >= 0) this.keys.setActiveItem(selected);\n else this.keys.setFirstItemActive();\n }\n\n protected close(): void {\n if (!this.open()) return;\n this.open.set(false);\n this.keys.setActiveItem(-1);\n }\n\n protected onOutsideClick(e: MouseEvent): void {\n if (!this.trigger().nativeElement.contains(e.target as Node)) this.close();\n }\n\n protected onKeydown(e: KeyboardEvent): void {\n if (this.isDisabled() || e.altKey || e.ctrlKey || e.metaKey) return;\n const key = e.key;\n if (!this.open()) {\n if (key === 'ArrowDown' || key === 'ArrowUp' || key === 'Enter' || key === ' ') {\n e.preventDefault();\n this.show();\n } else if (key.length === 1) {\n this.show();\n this.keys.onKeydown(e);\n }\n return;\n }\n if (key === 'Escape') {\n e.preventDefault();\n e.stopPropagation();\n this.close();\n } else if (key === 'Tab') {\n this.close(); // closes without selecting; focus moves on naturally\n } else if (key === 'Enter' || key === ' ') {\n e.preventDefault();\n const active = this.keys.activeItem;\n if (active) this.choose(active);\n } else {\n this.keys.onKeydown(e);\n }\n }\n}\n","import { Component, Directive, ViewEncapsulation, booleanAttribute, effect, ElementRef, inject, input } from '@angular/core';\nimport { loadStyles } from '../core/style-loader';\n\nconst CHECKBOX_STYLES = `\n /* The marks are drawn on the box's own 16-unit grid (viewBox 0 0 16 16 = the border box), so they scale with\n --juice-checkbox-size and stay optically centred: the tick's bounding box is centred on (8, 8) and its 1.75 stroke\n matches the minus. */\n input[type='checkbox'][juiceCheckbox] {\n --_mark-check: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.75 8.25 6.9 10.4 11.25 5.6'/%3E%3C/svg%3E\");\n --_mark-minus: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round'%3E%3Cpath d='M5 8h6'/%3E%3C/svg%3E\");\n appearance: none;\n box-sizing: border-box;\n position: relative;\n flex: none;\n width: var(--juice-checkbox-size);\n height: var(--juice-checkbox-size);\n margin: 0;\n border: 1px solid var(--juice-checkbox-border);\n border-radius: var(--juice-checkbox-radius);\n background: var(--juice-checkbox-bg);\n vertical-align: middle;\n cursor: pointer;\n transition:\n background-color var(--juice-checkbox-duration) var(--juice-checkbox-ease),\n border-color var(--juice-checkbox-duration) var(--juice-checkbox-ease),\n transform var(--juice-checkbox-duration) var(--juice-checkbox-ease);\n }\n input[type='checkbox'][juiceCheckbox]::after {\n content: '';\n position: absolute;\n inset: -1px;\n background: var(--juice-checkbox-checked-fg);\n -webkit-mask: var(--_mark-check) center / 100% 100% no-repeat;\n mask: var(--_mark-check) center / 100% 100% no-repeat;\n opacity: 0;\n transform: scale(0.6);\n transition:\n opacity var(--juice-checkbox-duration) var(--juice-checkbox-ease),\n transform var(--juice-checkbox-duration) var(--juice-checkbox-ease);\n }\n input[type='checkbox'][juiceCheckbox]:indeterminate::after {\n -webkit-mask-image: var(--_mark-minus);\n mask-image: var(--_mark-minus);\n }\n input[type='checkbox'][juiceCheckbox]:is(:checked, :indeterminate)::after { opacity: 1; transform: none; }\n\n /* Filled: checked and indeterminate. */\n input[type='checkbox'][juiceCheckbox]:is(:checked, :indeterminate) {\n border-color: var(--juice-checkbox-checked-bg);\n background: var(--juice-checkbox-checked-bg);\n }\n\n /* Hover: the edge darkens on an empty box, the fill deepens on a filled one; the whole label is the target. */\n input[type='checkbox'][juiceCheckbox]:enabled:hover,\n label:hover > input[type='checkbox'][juiceCheckbox]:enabled {\n border-color: var(--juice-checkbox-hover-border);\n }\n input[type='checkbox'][juiceCheckbox]:enabled:is(:checked, :indeterminate):hover,\n label:hover > input[type='checkbox'][juiceCheckbox]:enabled:is(:checked, :indeterminate) {\n border-color: var(--juice-checkbox-checked-hover-bg);\n background: var(--juice-checkbox-checked-hover-bg);\n }\n\n /* Pressed: a small settle, not a bounce. */\n input[type='checkbox'][juiceCheckbox]:enabled:active,\n label:active > input[type='checkbox'][juiceCheckbox]:enabled {\n background: var(--juice-checkbox-active-bg);\n transform: scale(0.92);\n }\n input[type='checkbox'][juiceCheckbox]:enabled:is(:checked, :indeterminate):active,\n label:active > input[type='checkbox'][juiceCheckbox]:enabled:is(:checked, :indeterminate) {\n border-color: var(--juice-checkbox-checked-active-bg);\n background: var(--juice-checkbox-checked-active-bg);\n }\n\n input[type='checkbox'][juiceCheckbox]:focus-visible {\n outline: 2px solid var(--juice-checkbox-focus-ring);\n outline-offset: 2px;\n }\n\n /* Disabled: an empty box keeps its edge; a value keeps a neutral fill and its mark, so checked and unchecked stay apart. */\n input[type='checkbox'][juiceCheckbox]:disabled {\n border-color: var(--juice-checkbox-disabled-border);\n background: var(--juice-checkbox-disabled-bg);\n cursor: not-allowed;\n }\n input[type='checkbox'][juiceCheckbox]:disabled:is(:checked, :indeterminate) {\n border-color: var(--juice-checkbox-disabled-checked-bg);\n background: var(--juice-checkbox-disabled-checked-bg);\n }\n input[type='checkbox'][juiceCheckbox]:disabled::after { background: var(--juice-checkbox-disabled-checked-fg); }\n\n /* A <label> that wraps the box: 14px Inter, 8px gap, the box centred on the first line (1lh) so long labels wrap under\n the text, not under the box. :where() keeps it at zero specificity, so apps can restyle their labels. */\n :where(label:has(> input[type='checkbox'][juiceCheckbox])) {\n display: inline-flex;\n align-items: flex-start;\n gap: var(--juice-checkbox-label-gap);\n font-family: var(--juice-font-sans);\n font-size: var(--juice-checkbox-label-font-size);\n font-weight: var(--juice-checkbox-label-font-weight);\n line-height: var(--juice-checkbox-label-line-height);\n color: var(--juice-checkbox-label-fg);\n cursor: pointer;\n }\n :where(label:has(> input[type='checkbox'][juiceCheckbox])) > input[type='checkbox'][juiceCheckbox] {\n margin-block-start: calc((1lh - var(--juice-checkbox-size)) / 2);\n }\n :where(label:has(> input[type='checkbox'][juiceCheckbox]:disabled)) {\n color: var(--juice-checkbox-label-disabled-fg);\n cursor: not-allowed;\n }\n\n @media (prefers-reduced-motion: reduce) {\n input[type='checkbox'][juiceCheckbox],\n input[type='checkbox'][juiceCheckbox]::after { transition: none; }\n input[type='checkbox'][juiceCheckbox]:enabled:active,\n label:active > input[type='checkbox'][juiceCheckbox]:enabled { transform: none; }\n }\n /* Forced colours (Windows contrast themes) drop backgrounds and masks: hand the box back to the native checkbox. */\n @media (forced-colors: active) {\n input[type='checkbox'][juiceCheckbox] { appearance: auto; border: 0; background: none; transform: none; }\n input[type='checkbox'][juiceCheckbox]::after { display: none; }\n }\n`;\n\n@Component({ selector: 'juice-checkbox-styles', template: '', styles: CHECKBOX_STYLES, encapsulation: ViewEncapsulation.None })\nclass JuiceCheckboxStyles {}\n\n/**\n * Styled native checkbox: keyboard, form and screen-reader behaviour stay the platform's. `indeterminate` sets the DOM\n * property (it has no attribute). Wrap it in a `<label>` with its text after it (the label then gets the 14px type and 8px\n * gap), or give it `aria-label`.\n */\n@Directive({ selector: 'input[type=checkbox][juiceCheckbox]' })\nexport class JuiceCheckbox {\n readonly indeterminate = input(false, { transform: booleanAttribute });\n\n constructor() {\n loadStyles(JuiceCheckboxStyles);\n const el = inject<ElementRef<HTMLInputElement>>(ElementRef).nativeElement;\n effect(() => {\n el.indeterminate = this.indeterminate();\n });\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n input,\n numberAttribute,\n output,\n} from '@angular/core';\nimport { JuiceIcon } from '@juice-js/icons';\nimport { JuiceButton } from '../button/button';\n\nexport type JuiceBadgeTone = 'neutral' | 'accent' | 'ok' | 'warn' | 'bad' | 'info';\nexport type JuiceSpinnerSize = 'sm' | 'md' | 'lg';\n\nconst STYLES = `\n juice-badge {\n display: inline-flex;\n align-items: center;\n padding: 0 var(--juice-space-2);\n border-radius: var(--juice-radius-full);\n background: var(--juice-color-surface-sunken);\n color: var(--juice-color-text);\n font-family: var(--juice-font-sans);\n font-size: var(--juice-text-xs);\n font-weight: var(--juice-weight-medium);\n line-height: 1.5rem;\n white-space: nowrap;\n }\n juice-badge[data-tone='accent'] { background: var(--juice-color-accent-subtle); color: var(--juice-color-text); }\n juice-badge[data-tone='ok'] { background: var(--juice-color-ok-subtle); color: var(--juice-color-text); }\n juice-badge[data-tone='warn'] { background: var(--juice-color-warn-subtle); color: var(--juice-color-text); }\n juice-badge[data-tone='bad'] { background: var(--juice-color-bad-subtle); color: var(--juice-color-text); }\n juice-badge[data-tone='info'] { background: var(--juice-color-info-subtle); color: var(--juice-color-text); }\n\n juice-progress { display: block; height: 0.5rem; overflow: hidden; border-radius: var(--juice-radius-full); background: var(--juice-color-surface-sunken); }\n .juice-progress__bar { height: 100%; border-radius: inherit; background: var(--juice-color-accent); transition: width var(--juice-duration-normal) var(--juice-ease-standard); }\n juice-progress[data-indeterminate] .juice-progress__bar { width: 40%; animation: juice-progress-slide 1.2s var(--juice-ease-standard) infinite; }\n @keyframes juice-progress-slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }\n\n juice-spinner { display: inline-flex; flex: none; align-items: center; justify-content: center; }\n .juice-spinner__ring {\n box-sizing: border-box;\n width: 1.5rem;\n height: 1.5rem;\n border: 2px solid var(--juice-color-border-strong);\n border-top-color: var(--juice-color-accent);\n border-radius: var(--juice-radius-full);\n animation: juice-spinner-spin 800ms linear infinite;\n }\n juice-spinner[data-size='sm'] .juice-spinner__ring { width: 1rem; height: 1rem; }\n juice-spinner[data-size='lg'] .juice-spinner__ring { width: 2.5rem; height: 2.5rem; border-width: 3px; }\n @media (prefers-reduced-motion: reduce) {\n .juice-spinner__ring { animation-duration: 3s; }\n juice-progress[data-indeterminate] .juice-progress__bar { animation-duration: 4s; }\n }\n @keyframes juice-spinner-spin { to { transform: rotate(360deg); } }\n .juice-visually-hidden {\n position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;\n clip-path: inset(50%); white-space: nowrap; border: 0;\n }\n\n .juice-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--juice-space-3);\n padding: var(--juice-space-8);\n color: var(--juice-color-text);\n font-family: var(--juice-font-sans);\n text-align: center;\n }\n .juice-state__icon { color: var(--juice-color-text-muted); }\n .juice-state__title { margin: 0; font-size: var(--juice-text-lg); font-weight: var(--juice-weight-semibold); }\n .juice-state__text { margin: 0; max-width: 40ch; color: var(--juice-color-text-muted); font-size: var(--juice-text-sm); }\n .juice-state--error .juice-state__title { color: var(--juice-color-bad); }\n`;\n\nconst COMMON = { changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: STYLES } as const;\n\n/** Small status pill. The tone is conveyed by the text, so do not rely on colour alone. */\n@Component({\n selector: 'juice-badge',\n template: '<ng-content />',\n ...COMMON,\n host: { '[attr.data-tone]': 'tone()' },\n})\nexport class JuiceBadge {\n readonly tone = input<JuiceBadgeTone>('neutral');\n}\n\n/** Progress bar. With a `value` (0..max) it reports `aria-valuenow`; without one it is indeterminate. */\n@Component({\n selector: 'juice-progress',\n template: `<div class=\"juice-progress__bar\" [style.width.%]=\"percent()\"></div>`,\n ...COMMON,\n host: {\n role: 'progressbar',\n 'aria-valuemin': '0',\n '[attr.aria-valuemax]': 'max()',\n '[attr.aria-valuenow]': 'clamped()',\n '[attr.aria-label]': 'label()',\n '[attr.data-indeterminate]': 'clamped() === null ? \"\" : null',\n },\n})\nexport class JuiceProgress {\n readonly value = input<number | null | undefined, unknown>(null, {\n transform: (v: unknown) => (v === null || v === undefined || v === '' || Number.isNaN(Number(v)) ? null : Number(v)),\n });\n readonly max = input(100, { transform: numberAttribute });\n readonly label = input('Progress');\n\n protected readonly clamped = computed(() => {\n const v = this.value();\n return v == null ? null : Math.min(Math.max(v, 0), this.max());\n });\n protected readonly percent = computed(() => {\n const v = this.clamped();\n return v == null || this.max() <= 0 ? null : (v / this.max()) * 100;\n });\n}\n\n/** Indeterminate activity indicator. The label is read by assistive tech through `role=status`. */\n@Component({\n selector: 'juice-spinner',\n template: `<span class=\"juice-spinner__ring\" aria-hidden=\"true\"></span><span class=\"juice-visually-hidden\">{{ label() }}</span>`,\n ...COMMON,\n host: { role: 'status', '[attr.data-size]': 'size()' },\n})\nexport class JuiceSpinner {\n readonly size = input<JuiceSpinnerSize>('md');\n readonly label = input('Loading');\n}\n\n/** Nothing-here state with an optional icon, description and a projected action. */\n@Component({\n selector: 'juice-empty-state',\n imports: [JuiceIcon],\n template: `\n @if (icon()) {\n <juice-icon class=\"juice-state__icon\" [name]=\"icon()\" [size]=\"32\" />\n }\n <p class=\"juice-state__title\">{{ title() }}</p>\n @if (description()) {\n <p class=\"juice-state__text\">{{ description() }}</p>\n }\n <ng-content />\n `,\n ...COMMON,\n host: { class: 'juice-state' },\n})\nexport class JuiceEmptyState {\n readonly icon = input('');\n readonly title = input.required<string>();\n readonly description = input('');\n}\n\n/** Loading placeholder for a region: spinner plus visible label. */\n@Component({\n selector: 'juice-loading-state',\n imports: [JuiceSpinner],\n template: `<juice-spinner [label]=\"label()\" /><p class=\"juice-state__text\" aria-hidden=\"true\">{{ label() }}</p>`,\n ...COMMON,\n host: { class: 'juice-state' },\n})\nexport class JuiceLoadingState {\n readonly label = input('Loading');\n}\n\n/** Failure state with a retry action. `error` may be an `Error`, a string or anything else (shown generically). */\n@Component({\n selector: 'juice-error-state',\n imports: [JuiceButton],\n template: `\n <p class=\"juice-state__title\">{{ title() }}</p>\n @if (message()) {\n <p class=\"juice-state__text\">{{ message() }}</p>\n }\n <button juiceButton variant=\"secondary\" (click)=\"retry.emit()\">{{ retryLabel() }}</button>\n `,\n ...COMMON,\n host: { class: 'juice-state juice-state--error', role: 'alert' },\n})\nexport class JuiceErrorState {\n readonly title = input('Something went wrong');\n readonly error = input<unknown>(null);\n readonly retryLabel = input('Try again');\n readonly retry = output<void>();\n\n protected readonly message = computed(() => {\n const e = this.error();\n if (typeof e === 'string') return e;\n if (e instanceof Error) return e.message;\n return '';\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAgBA,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6ErB;AAED;;;AAGG;MAcU,WAAW,CAAA;AAKtB,IAAA,WAAA,GAAA;QAJS,IAAA,CAAA,OAAO,GAAG,KAAK,CAAqB,WAAW;oFAAC;QAChD,IAAA,CAAA,IAAI,GAAG,KAAK,CAAkB,IAAI;iFAAC;QACnC,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,KAAK,+EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;QAG9D,MAAM,EAAE,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC,aAAa;AACpE,QAAA,IAAI,EAAE,CAAC,OAAO,KAAK,QAAQ,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC;AAAE,YAAA,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAE1F,QAAA,MAAM,KAAK,GAAG,CAAC,CAAQ,KAAI;AACzB,YAAA,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE;gBAClB,CAAC,CAAC,cAAc,EAAE;gBAClB,CAAC,CAAC,wBAAwB,EAAE;YAC9B;AACF,QAAA,CAAC;QACD,EAAE,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC;QACzC,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,mBAAmB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAClF;8GAjBW,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EA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,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAPS,WAAW,EAAA,QAAA,EAAA,qCAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,MAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAWV,eAAe,EAAA,UAAA,EAAA,CAAA;kBAb3B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;oBAC7B,OAAO,EAAE,CAAC,WAAW,CAAC;AACtB,oBAAA,QAAQ,EAAE;;;;;;AAMT,EAAA,CAAA;AACD,oBAAA,GAAG,MAAM;oBACT,IAAI,EAAE,EAAE,KAAK,EAAE,gCAAgC,EAAE,IAAI,EAAE,OAAO,EAAE;AACjE,iBAAA;;;ACtLD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"juice-js-ui.mjs","sources":["../../../../projects/juice-js/ui/src/lib/button/button.ts","../../../../projects/juice-js/ui/src/lib/core/style-loader.ts","../../../../projects/juice-js/ui/src/lib/field/field.ts","../../../../projects/juice-js/ui/src/lib/select/select.ts","../../../../projects/juice-js/ui/src/lib/checkbox/checkbox.ts","../../../../projects/juice-js/ui/src/lib/feedback/feedback.ts","../../../../projects/juice-js/ui/src/juice-js-ui.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n ViewEncapsulation,\n afterNextRender,\n booleanAttribute,\n inject,\n input,\n isDevMode,\n} from '@angular/core';\n\nexport type JuiceButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger';\nexport type JuiceButtonSize = 'sm' | 'md' | 'lg';\n\nconst BUTTON_STYLES = `\n [juiceButton], [juiceIconButton] {\n box-sizing: border-box;\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--juice-space-2);\n min-height: var(--juice-control-height-md);\n padding: 0 var(--juice-space-4);\n border: 1px solid transparent;\n border-radius: var(--juice-radius-md);\n background: transparent;\n color: var(--juice-color-text);\n font-family: var(--juice-font-sans);\n font-size: var(--juice-text-sm);\n font-weight: var(--juice-weight-medium);\n line-height: 1;\n text-decoration: none;\n white-space: nowrap;\n cursor: pointer;\n user-select: none;\n transition: background-color var(--juice-duration-fast) var(--juice-ease-standard),\n border-color var(--juice-duration-fast) var(--juice-ease-standard),\n color var(--juice-duration-fast) var(--juice-ease-standard);\n }\n [juiceButton][data-size='sm'] { min-height: var(--juice-control-height-sm); padding: 0 var(--juice-space-3); font-size: var(--juice-text-xs); }\n [juiceButton][data-size='lg'] { min-height: var(--juice-control-height-lg); padding: 0 var(--juice-space-6); font-size: var(--juice-text-md); }\n [juiceIconButton] {\n width: var(--juice-control-height-md);\n height: var(--juice-control-height-md);\n padding: 0;\n }\n [juiceButton]:focus-visible, [juiceIconButton]:focus-visible {\n outline: 2px solid var(--juice-button-focus-ring);\n outline-offset: 2px;\n }\n /* Interaction (README, Interaction tokens): filled variants lighten slightly on hover and deepen on press in dark, and\n deepen on both in light; outlined and ghost variants step the surface. Hover and press never apply to a disabled\n button: :where() keeps that guard at zero specificity, so the disabled rule below still wins on its own. */\n [juiceButton][data-variant='primary'] { background: var(--juice-button-bg); color: var(--juice-button-fg); }\n [juiceButton][data-variant='primary']:where(:not(:disabled, [aria-disabled='true'])):hover { background: var(--juice-button-hover-bg); }\n [juiceButton][data-variant='primary']:where(:not(:disabled, [aria-disabled='true'])):active { background: var(--juice-button-active-bg); }\n [juiceButton][data-variant='secondary'] {\n background: var(--juice-button-secondary-bg);\n border-color: var(--juice-button-secondary-border);\n color: var(--juice-button-secondary-fg);\n }\n [juiceButton][data-variant='secondary']:where(:not(:disabled, [aria-disabled='true'])):hover {\n background: var(--juice-button-secondary-hover-bg);\n border-color: var(--juice-button-secondary-hover-border);\n }\n [juiceButton][data-variant='secondary']:where(:not(:disabled, [aria-disabled='true'])):active { background: var(--juice-button-secondary-active-bg); }\n [juiceButton][data-variant='ghost'], [juiceIconButton] { color: var(--juice-button-ghost-fg); }\n :is([juiceButton][data-variant='ghost'], [juiceIconButton]):where(:not(:disabled, [aria-disabled='true'])):hover { background: var(--juice-button-ghost-hover-bg); }\n :is([juiceButton][data-variant='ghost'], [juiceIconButton]):where(:not(:disabled, [aria-disabled='true'])):active { background: var(--juice-button-ghost-active-bg); }\n [juiceButton][data-variant='danger'] { background: var(--juice-button-danger-bg); color: var(--juice-button-danger-fg); }\n [juiceButton][data-variant='danger']:where(:not(:disabled, [aria-disabled='true'])):hover { background: var(--juice-button-danger-hover-bg); }\n [juiceButton][data-variant='danger']:where(:not(:disabled, [aria-disabled='true'])):active { background: var(--juice-button-danger-active-bg); }\n [juiceButton]:disabled, [juiceIconButton]:disabled, [juiceButton][aria-disabled='true'] {\n background: var(--juice-button-disabled-bg);\n border-color: transparent;\n color: var(--juice-button-disabled-fg);\n cursor: not-allowed;\n }\n [juiceButton][data-loading] { cursor: progress; }\n .juice-button__spinner {\n box-sizing: border-box;\n width: 1em;\n height: 1em;\n border: 2px solid currentColor;\n border-right-color: transparent;\n border-radius: var(--juice-radius-full);\n animation: juice-button-spin 700ms linear infinite;\n }\n @media (prefers-reduced-motion: reduce) { .juice-button__spinner { animation-duration: 3s; } }\n @keyframes juice-button-spin { to { transform: rotate(360deg); } }\n`;\n\n/**\n * Button or link styled as a button. `loading` sets `aria-busy` and swallows activation (the element stays focusable\n * and does not use `disabled`, so focus is not lost while busy).\n */\n@Component({\n selector: 'button[juiceButton], a[juiceButton]',\n template: `@if (loading()) {<span class=\"juice-button__spinner\" aria-hidden=\"true\"></span>}<span class=\"juice-button__label\"><ng-content /></span>`,\n styles: BUTTON_STYLES,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[attr.data-variant]': 'variant()',\n '[attr.data-size]': 'size()',\n '[attr.data-loading]': 'loading() ? \"\" : null',\n '[attr.aria-busy]': 'loading() ? \"true\" : null',\n },\n})\nexport class JuiceButton {\n readonly variant = input<JuiceButtonVariant>('secondary');\n readonly size = input<JuiceButtonSize>('md');\n readonly loading = input(false, { transform: booleanAttribute });\n\n constructor() {\n const el = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n if (el.tagName === 'BUTTON' && !el.hasAttribute('type')) el.setAttribute('type', 'button');\n // Capture phase on the target itself runs before the consumer's (click) handler, so loading blocks it.\n const block = (e: Event) => {\n if (this.loading()) {\n e.preventDefault();\n e.stopImmediatePropagation();\n }\n };\n el.addEventListener('click', block, true);\n inject(DestroyRef).onDestroy(() => el.removeEventListener('click', block, true));\n }\n}\n\n/** Square icon-only button. It has no visible text, so an `aria-label` (or `aria-labelledby`) is required. */\n@Component({\n selector: 'button[juiceIconButton]',\n template: `<ng-content />`,\n styles: BUTTON_STYLES,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class JuiceIconButton {\n constructor() {\n const el = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n if (!el.hasAttribute('type')) el.setAttribute('type', 'button');\n if (isDevMode()) {\n afterNextRender(() => {\n if (!el.getAttribute('aria-label')?.trim() && !el.getAttribute('aria-labelledby')?.trim()) {\n console.error('[juiceIconButton] An icon button needs an aria-label (or aria-labelledby).', el);\n }\n });\n }\n }\n}\n","import { ApplicationRef, EnvironmentInjector, Type, createComponent, inject } from '@angular/core';\n\nconst loaded = new WeakMap<ApplicationRef, Set<Type<unknown>>>();\n\nlet counter = 0;\n\n/** Next unique DOM id with the given prefix (unique per page, not per component). */\nexport function nextId(prefix: string): string {\n return `${prefix}-${++counter}`;\n}\n\n/**\n * Directives on native elements (`input[juiceInput]`) cannot own styles. This instantiates a hidden component whose\n * `ViewEncapsulation.None` styles Angular adds to the document once per application. Call it from an injection context.\n */\nexport function loadStyles(styleHost: Type<unknown>): void {\n const appRef = inject(ApplicationRef);\n const env = inject(EnvironmentInjector);\n let set = loaded.get(appRef);\n if (!set) loaded.set(appRef, (set = new Set()));\n if (set.has(styleHost)) return;\n set.add(styleHost);\n createComponent(styleHost, { environmentInjector: env });\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n DoCheck,\n ElementRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { loadStyles, nextId } from '../core/style-loader';\n\n// One rulebook for every text control (input, textarea, and the select trigger, which reads the same tokens):\n// content 14/20, label 13/20 medium, assistance 12/16; one edge; focus = accent edge + soft halo, never a second outline.\nconst FIELD_STYLES = `\n juice-field { display: flex; flex-direction: column; font-family: var(--juice-font-sans); }\n .juice-field__label {\n margin-bottom: var(--juice-field-label-gap);\n color: var(--juice-field-label);\n font-size: var(--juice-field-label-font-size);\n font-weight: var(--juice-field-label-font-weight);\n line-height: 1.25rem;\n }\n .juice-field__message {\n display: flex;\n align-items: flex-start;\n gap: 0.375rem;\n margin-top: var(--juice-field-message-gap);\n color: var(--juice-field-hint);\n font-size: var(--juice-field-message-font-size);\n line-height: var(--juice-field-message-line-height);\n }\n .juice-field__message[data-status='error'] { color: var(--juice-field-error); }\n .juice-field__message[data-status='warning'] { color: var(--juice-field-warning); }\n .juice-field__message[data-status='success'] { color: var(--juice-field-success); }\n .juice-field__icon { flex: none; width: 0.875rem; height: 0.875rem; margin-top: 1px; }\n .juice-field__counter { margin-left: auto; padding-left: var(--juice-space-2); color: var(--juice-field-counter-fg); font-variant-numeric: tabular-nums; white-space: nowrap; }\n .juice-field__counter[data-level='near'] { color: var(--juice-field-warning); }\n .juice-field__counter[data-level='limit'] { color: var(--juice-field-error); }\n .juice-field__live { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }\n\n :is(input, textarea)[juiceInput] {\n box-sizing: border-box;\n width: 100%;\n min-height: var(--juice-field-height);\n margin: 0;\n padding: 0 var(--juice-field-padding-x);\n border: 1px solid var(--juice-field-border);\n border-radius: var(--juice-field-radius);\n background: var(--juice-field-bg);\n color: var(--juice-field-fg);\n font-family: var(--juice-font-sans);\n font-size: var(--juice-field-font-size);\n line-height: var(--juice-field-line-height);\n transition:\n border-color var(--juice-field-duration) var(--juice-field-ease),\n box-shadow var(--juice-field-duration) var(--juice-field-ease);\n }\n textarea[juiceInput] {\n display: block;\n min-height: var(--juice-field-textarea-min-height);\n padding-block: var(--juice-field-textarea-padding-y);\n resize: vertical;\n }\n :is(input, textarea)[juiceInput]::placeholder { color: var(--juice-field-placeholder); opacity: 1; }\n :is(input, textarea)[juiceInput]:enabled:not([readonly]):hover { border-color: var(--juice-field-border-hover); }\n :is(input, textarea)[juiceInput]:focus {\n outline: none;\n border-color: var(--juice-field-border-focus);\n box-shadow: 0 0 0 3px var(--juice-field-focus-halo);\n }\n :is(input, textarea)[juiceInput][data-status='error'] { border-color: var(--juice-field-error); }\n :is(input, textarea)[juiceInput][data-status='error']:focus { box-shadow: 0 0 0 3px var(--juice-field-error-halo); }\n :is(input, textarea)[juiceInput][data-status='warning'] { border-color: var(--juice-field-warning); }\n :is(input, textarea)[juiceInput][data-status='warning']:focus { box-shadow: 0 0 0 3px var(--juice-field-warning-halo); }\n :is(input, textarea)[juiceInput][data-status='success'] { border-color: var(--juice-field-success); }\n :is(input, textarea)[juiceInput][data-status='success']:focus { box-shadow: 0 0 0 3px var(--juice-field-success-halo); }\n :is(input, textarea)[juiceInput][readonly] { background: var(--juice-field-readonly-bg); border-color: var(--juice-field-readonly-border); }\n :is(input, textarea)[juiceInput]:disabled {\n background: var(--juice-field-disabled-bg);\n border-color: var(--juice-field-disabled-border);\n color: var(--juice-field-disabled-fg);\n cursor: not-allowed;\n }\n :is(input, textarea)[juiceInput]:disabled::placeholder { color: var(--juice-field-disabled-fg); }\n @media (prefers-reduced-motion: reduce) { :is(input, textarea)[juiceInput] { transition: none; } }\n /* Forced colours drop box-shadow, so focus falls back to a system-coloured outline. */\n @media (forced-colors: active) { :is(input, textarea)[juiceInput]:focus { outline: 2px solid CanvasText; outline-offset: 1px; } }\n`;\n\nexport type JuiceFieldStatus = 'error' | 'warning' | 'success';\n\n/** What a control inside `<juice-field>` needs from it. */\nexport interface JuiceFieldControl {\n readonly controlId: string;\n readonly labelId: string;\n readonly describedBy: () => string | null;\n readonly invalid: () => boolean;\n}\n\n/**\n * Label, hint, status message and optional character counter for one form control. The projected `[juiceInput]` (or\n * `<juice-select>`) gets the id the label points at, `aria-describedby` for the message and counter, `aria-invalid` for\n * an error, and `data-status` for its edge. A status message (error over warning over success) replaces the hint while it\n * shows. `counter` shows `length / maxlength` for a control with a `maxlength`; screen readers hear only the 90% and limit\n * thresholds, not every keystroke.\n */\n@Component({\n selector: 'juice-field',\n template: `\n <label class=\"juice-field__label\" [id]=\"labelId\" [attr.for]=\"controlId\">{{ label() }}</label>\n <ng-content />\n @if (message() || showCounter()) {\n <div class=\"juice-field__message\" [attr.data-status]=\"status()\">\n @if (message()) {\n @switch (status()) {\n @case ('error') {\n <svg class=\"juice-field__icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><circle cx=\"12\" cy=\"12\" r=\"10\" /><path d=\"M12 8v4M12 16h.01\" /></svg>\n }\n @case ('warning') {\n <svg class=\"juice-field__icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\" /><path d=\"M12 9v4M12 17h.01\" /></svg>\n }\n @case ('success') {\n <svg class=\"juice-field__icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><circle cx=\"12\" cy=\"12\" r=\"10\" /><path d=\"m9 12 2 2 4-4\" /></svg>\n }\n }\n <span [id]=\"messageId\">{{ message() }}</span>\n }\n @if (showCounter()) {\n <span class=\"juice-field__counter\" [id]=\"counterId\" [attr.data-level]=\"level()\">{{ length() }} / {{ max() }}</span>\n }\n </div>\n }\n @if (showCounter()) {\n <span class=\"juice-field__live\" aria-live=\"polite\">{{ announcement() }}</span>\n }\n `,\n styles: FIELD_STYLES,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class JuiceField implements JuiceFieldControl {\n readonly label = input.required<string>();\n readonly hint = input<string>('');\n readonly error = input<string>('');\n readonly warning = input<string>('');\n readonly success = input<string>('');\n readonly counter = input(false, { transform: booleanAttribute });\n\n readonly controlId = nextId('juice-field');\n readonly messageId = `${this.controlId}-message`;\n readonly counterId = `${this.controlId}-counter`;\n readonly labelId = `${this.controlId}-label`;\n /** @deprecated since 3.0: the hint and the status message share one element; use `messageId`. */\n readonly hintId = this.messageId;\n /** @deprecated since 3.0: use `messageId`. */\n readonly errorId = this.messageId;\n\n /** Length and `maxlength` of the projected control, reported by `[juiceInput]`. */\n readonly length = signal(0);\n readonly max = signal<number | null>(null);\n\n readonly status = computed<JuiceFieldStatus | null>(() =>\n this.error() ? 'error' : this.warning() ? 'warning' : this.success() ? 'success' : null,\n );\n readonly message = computed(() => {\n const s = this.status();\n return s === 'error' ? this.error() : s === 'warning' ? this.warning() : s === 'success' ? this.success() : this.hint();\n });\n readonly invalid = () => !!this.error();\n\n protected readonly showCounter = computed(() => this.counter() && this.max() !== null);\n protected readonly level = computed<'near' | 'limit' | null>(() => {\n const max = this.max();\n if (!this.counter() || max === null || max <= 0) return null;\n const n = this.length();\n return n >= max ? 'limit' : n >= max * 0.9 ? 'near' : null;\n });\n protected readonly announcement = computed(() =>\n this.level() === 'limit' ? 'Character limit reached' : this.level() === 'near' ? 'Approaching the character limit' : '',\n );\n\n readonly describedBy = computed(() => {\n const ids = [this.message() ? this.messageId : '', this.showCounter() ? this.counterId : ''].filter(Boolean);\n return ids.length ? ids.join(' ') : null;\n });\n}\n\n/** Styles for the text input and textarea, wired to a surrounding `<juice-field>` when there is one. */\n@Directive({\n selector: 'input[juiceInput], textarea[juiceInput]',\n host: {\n '[attr.id]': 'field?.controlId ?? null',\n '[attr.aria-describedby]': 'field?.describedBy() ?? null',\n '[attr.aria-invalid]': 'invalid() ? \"true\" : null',\n '[attr.data-status]': 'status()',\n '(blur)': 'sync()',\n '(input)': 'sync()',\n },\n})\nexport class JuiceInput implements DoCheck {\n protected readonly field = inject(JuiceField, { optional: true });\n private readonly control = inject(NgControl, { optional: true, self: true });\n private readonly el = inject<ElementRef<HTMLInputElement | HTMLTextAreaElement>>(ElementRef).nativeElement;\n private readonly state = signal(false);\n\n /** Invalid is shown only once the user has touched the control (or the field was given an error without a form control). */\n protected readonly invalid = computed(() => this.state() || (!this.control && !!this.field?.error()));\n /** The field's status edge; an error edge waits for `invalid`, like `aria-invalid`. */\n protected readonly status = computed(() => {\n const s = this.field?.status() ?? null;\n return s === 'error' && !this.invalid() && !!this.control ? null : s;\n });\n\n constructor() {\n loadStyles(JuiceFieldStyles);\n }\n\n ngDoCheck(): void {\n this.sync();\n }\n\n protected sync(): void {\n const c = this.control;\n this.state.set(!!c && !!c.invalid && !!c.touched);\n const f = this.field;\n if (f) {\n f.length.set(this.el.value.length);\n f.max.set(this.el.maxLength > 0 ? this.el.maxLength : null);\n }\n }\n}\n\n@Component({ selector: 'juice-field-styles', template: '', styles: FIELD_STYLES, encapsulation: ViewEncapsulation.None })\nclass JuiceFieldStyles {}\n","import { ActiveDescendantKeyManager, Highlightable } from '@angular/cdk/a11y';\nimport { CdkConnectedOverlay, CdkOverlayOrigin, ConnectedPosition, Overlay, ScrollStrategy } from '@angular/cdk/overlay';\nimport {\n AfterContentChecked,\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n InjectionToken,\n Injector,\n Signal,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n contentChildren,\n forwardRef,\n inject,\n input,\n model,\n signal,\n viewChild,\n} from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { JuiceField } from '../field/field';\nimport { nextId } from '../core/style-loader';\n\n/** What an option needs from its select. */\ninterface JuiceSelectHost {\n readonly value: Signal<unknown>;\n choose(option: JuiceOption): void;\n activate(option: JuiceOption): void;\n}\nconst JUICE_SELECT_HOST = new InjectionToken<JuiceSelectHost>('JUICE_SELECT_HOST');\n\n// The trigger follows the text-field rulebook exactly (it reads the --juice-field-* tokens); the list reads --juice-listbox-*.\nconst SELECT_STYLES = `\n juice-select { display: block; position: relative; font-family: var(--juice-font-sans); }\n .juice-select__trigger {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--juice-space-2);\n width: 100%;\n min-height: var(--juice-field-height);\n margin: 0;\n padding: 0 var(--juice-field-padding-x);\n border: 1px solid var(--juice-field-border);\n border-radius: var(--juice-field-radius);\n background: var(--juice-field-bg);\n color: var(--juice-field-fg);\n font-family: inherit;\n font-size: var(--juice-field-font-size);\n line-height: var(--juice-field-line-height);\n text-align: start;\n cursor: pointer;\n transition:\n border-color var(--juice-field-duration) var(--juice-field-ease),\n box-shadow var(--juice-field-duration) var(--juice-field-ease);\n }\n .juice-select__trigger:enabled:hover { border-color: var(--juice-field-border-hover); }\n .juice-select__trigger:focus-visible,\n .juice-select__trigger[aria-expanded='true'] {\n outline: none;\n border-color: var(--juice-field-border-focus);\n box-shadow: 0 0 0 3px var(--juice-field-focus-halo);\n }\n .juice-select__trigger[data-status='error'] { border-color: var(--juice-field-error); }\n .juice-select__trigger[data-status='error']:is(:focus-visible, [aria-expanded='true']) { box-shadow: 0 0 0 3px var(--juice-field-error-halo); }\n .juice-select__trigger[data-status='warning'] { border-color: var(--juice-field-warning); }\n .juice-select__trigger[data-status='warning']:is(:focus-visible, [aria-expanded='true']) { box-shadow: 0 0 0 3px var(--juice-field-warning-halo); }\n .juice-select__trigger[data-status='success'] { border-color: var(--juice-field-success); }\n .juice-select__trigger[data-status='success']:is(:focus-visible, [aria-expanded='true']) { box-shadow: 0 0 0 3px var(--juice-field-success-halo); }\n .juice-select__trigger:disabled {\n background: var(--juice-field-disabled-bg);\n border-color: var(--juice-field-disabled-border);\n color: var(--juice-field-disabled-fg);\n cursor: not-allowed;\n }\n .juice-select__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .juice-select__placeholder { color: var(--juice-field-placeholder); }\n .juice-select__trigger:disabled .juice-select__placeholder { color: inherit; }\n .juice-select__chevron {\n flex: none;\n width: 1rem;\n height: 1rem;\n color: var(--juice-listbox-chevron);\n transition: transform var(--juice-field-duration) var(--juice-field-ease);\n }\n .juice-select__trigger[aria-expanded='true'] .juice-select__chevron { transform: rotate(180deg); }\n /* The CDK pane is a flex box: the panel must grow to fill it, or it shrinks to its content under a wide trigger. */\n .juice-select-panel {\n box-sizing: border-box;\n flex: 1 1 auto;\n width: 100%;\n max-height: var(--juice-listbox-max-height);\n margin: 0;\n padding: var(--juice-listbox-padding);\n overflow-y: auto;\n border: 1px solid var(--juice-listbox-border);\n border-radius: var(--juice-listbox-radius);\n background: var(--juice-listbox-bg);\n color: var(--juice-listbox-fg);\n box-shadow: var(--juice-listbox-shadow);\n font-family: var(--juice-font-sans);\n font-size: var(--juice-field-font-size);\n line-height: var(--juice-field-line-height);\n animation: juice-select-in var(--juice-field-duration) var(--juice-field-ease);\n }\n @keyframes juice-select-in { from { opacity: 0; transform: translateY(-2px); } }\n juice-option {\n display: flex;\n align-items: center;\n gap: var(--juice-listbox-option-gap);\n min-height: var(--juice-listbox-option-height);\n padding: 0 var(--juice-listbox-option-padding-x);\n border-radius: var(--juice-listbox-option-radius);\n cursor: pointer;\n }\n .juice-option__label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .juice-option__check { flex: none; width: 1rem; height: 1rem; color: var(--juice-listbox-option-check); }\n juice-option.juice-option--active { background: var(--juice-listbox-option-active-bg); }\n juice-option[aria-selected='true'] { background: var(--juice-listbox-option-selected-bg); color: var(--juice-listbox-option-selected-fg); }\n juice-option[aria-selected='true'].juice-option--active { background: var(--juice-listbox-option-active-bg); }\n juice-option[aria-disabled='true'] { color: var(--juice-listbox-option-disabled-fg); cursor: not-allowed; }\n @media (prefers-reduced-motion: reduce) {\n .juice-select__trigger, .juice-select__chevron { transition: none; }\n .juice-select-panel { animation: none; }\n }\n @media (forced-colors: active) {\n .juice-select__trigger:is(:focus-visible, [aria-expanded='true']) { outline: 2px solid CanvasText; outline-offset: 1px; }\n juice-option.juice-option--active { outline: 1px solid Highlight; }\n }\n`;\n\n/** One choice in a `<juice-select>`. Its text is the label shown in the trigger and matched by typeahead. */\n@Component({\n selector: 'juice-option',\n template: `<span class=\"juice-option__label\"><ng-content /></span>\n @if (selected()) {\n <svg class=\"juice-option__check\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M20 6 9 17l-5-5\" /></svg>\n }`,\n styles: SELECT_STYLES,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n role: 'option',\n '[id]': 'id',\n '[attr.aria-selected]': 'selected() ? \"true\" : \"false\"',\n '[attr.aria-disabled]': 'isDisabled() ? \"true\" : null',\n '[class.juice-option--active]': 'active()',\n '(click)': 'select.choose(this)',\n '(mouseenter)': 'select.activate(this)',\n },\n})\nexport class JuiceOption implements Highlightable {\n readonly value = input<unknown>();\n readonly isDisabled = input(false, { alias: 'disabled', transform: booleanAttribute });\n\n readonly id = nextId('juice-option');\n protected readonly select = inject(JUICE_SELECT_HOST);\n private readonly el = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n protected readonly active = signal(false);\n protected readonly selected = computed(() => this.select.value() === this.value());\n\n /** Read by `ListKeyManager` through `skipPredicate`. */\n get disabled(): boolean {\n return this.isDisabled();\n }\n\n getLabel(): string {\n return (this.el.textContent ?? '').trim();\n }\n setActiveStyles(): void {\n this.active.set(true);\n this.el.scrollIntoView?.({ block: 'nearest' });\n }\n setInactiveStyles(): void {\n this.active.set(false);\n }\n}\n\nconst POSITIONS: ConnectedPosition[] = [\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 4 },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -4 },\n];\n\n/**\n * Single-select dropdown. Focus stays on the trigger (combobox pattern); the options are exposed through\n * `aria-activedescendant`. The list is an inline popover: it renders in the top layer (never clipped by `overflow` ancestors\n * or covered by drawers and dialogs) while it sits next to the trigger in the DOM, so it follows the region's theme, accent\n * and colour scheme live. It re-places itself when any ancestor scrolls.\n */\n@Component({\n selector: 'juice-select',\n imports: [CdkConnectedOverlay, CdkOverlayOrigin],\n template: `\n <button\n #trigger\n type=\"button\"\n class=\"juice-select__trigger\"\n cdkOverlayOrigin\n #origin=\"cdkOverlayOrigin\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [attr.id]=\"field?.controlId ?? triggerId\"\n [attr.aria-expanded]=\"open() ? 'true' : 'false'\"\n [attr.aria-controls]=\"open() ? listboxId : null\"\n [attr.aria-activedescendant]=\"open() ? activeId() : null\"\n [attr.aria-label]=\"field ? null : label() || null\"\n [attr.aria-describedby]=\"field?.describedBy() ?? null\"\n [attr.aria-invalid]=\"field && field.invalid() ? 'true' : null\"\n [attr.data-status]=\"field?.status() ?? null\"\n [disabled]=\"isDisabled()\"\n (click)=\"toggle()\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onTouched()\"\n >\n <span class=\"juice-select__value\" [class.juice-select__placeholder]=\"!hasValue()\">{{ displayLabel() }}</span>\n <svg class=\"juice-select__chevron\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.75\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </button>\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"open()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayMinWidth]=\"triggerWidth()\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayViewportMargin]=\"8\"\n cdkConnectedOverlayUsePopover=\"inline\"\n (overlayOutsideClick)=\"onOutsideClick($event)\"\n (detach)=\"close()\"\n >\n <div\n class=\"juice-select-panel\"\n role=\"listbox\"\n [id]=\"listboxId\"\n [attr.aria-label]=\"field ? null : label() || placeholder() || 'Options'\"\n [attr.aria-labelledby]=\"field ? field.labelId : null\"\n (mousedown)=\"$event.preventDefault()\"\n >\n <ng-content />\n </div>\n </ng-template>\n `,\n styles: SELECT_STYLES,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => JuiceSelect), multi: true },\n { provide: JUICE_SELECT_HOST, useExisting: forwardRef(() => JuiceSelect) },\n ],\n})\nexport class JuiceSelect implements ControlValueAccessor, AfterContentChecked, JuiceSelectHost {\n readonly placeholder = input('');\n /** Accessible name when the select is not inside a `<juice-field>`. */\n readonly label = input('');\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly value = model<unknown>(undefined);\n\n protected readonly field = inject(JuiceField, { optional: true });\n protected readonly triggerId = nextId('juice-select');\n protected readonly listboxId = nextId('juice-listbox');\n protected readonly positions = POSITIONS;\n protected readonly scrollStrategy: ScrollStrategy = inject(Overlay).scrollStrategies.reposition();\n\n protected readonly open = signal(false);\n protected readonly triggerWidth = signal(0);\n protected readonly activeId = signal<string | null>(null);\n protected readonly displayLabel = signal('');\n protected readonly hasValue = signal(false);\n private readonly cvaDisabled = signal(false);\n protected readonly isDisabled = computed(() => this.disabled() || this.cvaDisabled());\n\n private readonly options = contentChildren(JuiceOption, { descendants: true });\n private readonly trigger = viewChild.required<ElementRef<HTMLButtonElement>>('trigger');\n private readonly connected = viewChild(CdkConnectedOverlay);\n private readonly doc = inject(DOCUMENT);\n private stopScroll?: () => void;\n private readonly keys = new ActiveDescendantKeyManager<JuiceOption>(this.options, inject(Injector))\n .withTypeAhead(200)\n .withHomeAndEnd()\n .withPageUpDown()\n .skipPredicate((o) => o.disabled);\n\n private onChange: (v: unknown) => void = () => undefined;\n protected onTouched: () => void = () => undefined;\n\n constructor() {\n this.keys.change.subscribe((i) => this.activeId.set(this.options()[i]?.id ?? null));\n inject(DestroyRef).onDestroy(() => this.stopScroll?.());\n }\n\n ngAfterContentChecked(): void {\n const match = this.options().find((o) => o.value() === this.value());\n const text = match ? match.getLabel() : this.placeholder();\n if (this.displayLabel() !== text) this.displayLabel.set(text);\n if (this.hasValue() !== !!match) this.hasValue.set(!!match);\n }\n\n writeValue(v: unknown): void {\n this.value.set(v);\n }\n registerOnChange(fn: (v: unknown) => void): void {\n this.onChange = fn;\n }\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n setDisabledState(d: boolean): void {\n this.cvaDisabled.set(d);\n if (d) this.close();\n }\n\n choose(option: JuiceOption): void {\n if (option.disabled) return;\n this.value.set(option.value());\n this.onChange(option.value());\n this.close();\n }\n activate(option: JuiceOption): void {\n if (!option.disabled) this.keys.setActiveItem(option);\n }\n\n protected toggle(): void {\n if (this.open()) this.close();\n else this.show();\n }\n\n private show(): void {\n if (this.isDisabled() || this.open()) return;\n const trigger = this.trigger().nativeElement;\n this.triggerWidth.set(trigger.offsetWidth);\n // Re-place the list when any ancestor scrolls (a dialog body, a drawer, a scrolled panel), not only the window.\n const onScroll = () => this.connected()?.overlayRef?.updatePosition();\n this.doc.addEventListener('scroll', onScroll, { capture: true, passive: true });\n this.stopScroll = () => this.doc.removeEventListener('scroll', onScroll, { capture: true });\n this.open.set(true);\n const items = this.options();\n const selected = items.findIndex((o) => o.value() === this.value() && !o.disabled);\n if (selected >= 0) this.keys.setActiveItem(selected);\n else this.keys.setFirstItemActive();\n }\n\n protected close(): void {\n if (!this.open()) return;\n this.stopScroll?.();\n this.stopScroll = undefined;\n this.open.set(false);\n this.keys.setActiveItem(-1);\n }\n\n protected onOutsideClick(e: MouseEvent): void {\n if (!this.trigger().nativeElement.contains(e.target as Node)) this.close();\n }\n\n protected onKeydown(e: KeyboardEvent): void {\n if (this.isDisabled() || e.altKey || e.ctrlKey || e.metaKey) return;\n const key = e.key;\n if (!this.open()) {\n if (key === 'ArrowDown' || key === 'ArrowUp' || key === 'Enter' || key === ' ') {\n e.preventDefault();\n this.show();\n } else if (key.length === 1) {\n this.show();\n this.keys.onKeydown(e);\n }\n return;\n }\n if (key === 'Escape') {\n e.preventDefault();\n e.stopPropagation();\n this.close();\n } else if (key === 'Tab') {\n this.close(); // closes without selecting; focus moves on naturally\n } else if (key === 'Enter' || key === ' ') {\n e.preventDefault();\n const active = this.keys.activeItem;\n if (active) this.choose(active);\n } else {\n this.keys.onKeydown(e);\n }\n }\n}\n","import { Component, Directive, ViewEncapsulation, booleanAttribute, effect, ElementRef, inject, input } from '@angular/core';\nimport { loadStyles } from '../core/style-loader';\n\nconst CHECKBOX_STYLES = `\n /* The marks are drawn on the box's own 16-unit grid (viewBox 0 0 16 16 = the border box), so they scale with\n --juice-checkbox-size and stay optically centred: the tick's bounding box is centred on (8, 8) and its 1.75 stroke\n matches the minus. */\n input[type='checkbox'][juiceCheckbox] {\n --_mark-check: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.75 8.25 6.9 10.4 11.25 5.6'/%3E%3C/svg%3E\");\n --_mark-minus: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round'%3E%3Cpath d='M5 8h6'/%3E%3C/svg%3E\");\n appearance: none;\n box-sizing: border-box;\n position: relative;\n flex: none;\n width: var(--juice-checkbox-size);\n height: var(--juice-checkbox-size);\n margin: 0;\n border: 1px solid var(--juice-checkbox-border);\n border-radius: var(--juice-checkbox-radius);\n background: var(--juice-checkbox-bg);\n vertical-align: middle;\n cursor: pointer;\n transition:\n background-color var(--juice-checkbox-duration) var(--juice-checkbox-ease),\n border-color var(--juice-checkbox-duration) var(--juice-checkbox-ease),\n transform var(--juice-checkbox-duration) var(--juice-checkbox-ease);\n }\n input[type='checkbox'][juiceCheckbox]::after {\n content: '';\n position: absolute;\n inset: -1px;\n background: var(--juice-checkbox-checked-fg);\n -webkit-mask: var(--_mark-check) center / 100% 100% no-repeat;\n mask: var(--_mark-check) center / 100% 100% no-repeat;\n opacity: 0;\n transform: scale(0.6);\n transition:\n opacity var(--juice-checkbox-duration) var(--juice-checkbox-ease),\n transform var(--juice-checkbox-duration) var(--juice-checkbox-ease);\n }\n input[type='checkbox'][juiceCheckbox]:indeterminate::after {\n -webkit-mask-image: var(--_mark-minus);\n mask-image: var(--_mark-minus);\n }\n input[type='checkbox'][juiceCheckbox]:is(:checked, :indeterminate)::after { opacity: 1; transform: none; }\n\n /* Filled: checked and indeterminate. */\n input[type='checkbox'][juiceCheckbox]:is(:checked, :indeterminate) {\n border-color: var(--juice-checkbox-checked-bg);\n background: var(--juice-checkbox-checked-bg);\n }\n\n /* Hover: the edge darkens on an empty box, the fill deepens on a filled one; the whole label is the target. */\n input[type='checkbox'][juiceCheckbox]:enabled:hover,\n label:hover > input[type='checkbox'][juiceCheckbox]:enabled {\n border-color: var(--juice-checkbox-hover-border);\n }\n input[type='checkbox'][juiceCheckbox]:enabled:is(:checked, :indeterminate):hover,\n label:hover > input[type='checkbox'][juiceCheckbox]:enabled:is(:checked, :indeterminate) {\n border-color: var(--juice-checkbox-checked-hover-bg);\n background: var(--juice-checkbox-checked-hover-bg);\n }\n\n /* Pressed: a small settle, not a bounce. */\n input[type='checkbox'][juiceCheckbox]:enabled:active,\n label:active > input[type='checkbox'][juiceCheckbox]:enabled {\n background: var(--juice-checkbox-active-bg);\n transform: scale(0.92);\n }\n input[type='checkbox'][juiceCheckbox]:enabled:is(:checked, :indeterminate):active,\n label:active > input[type='checkbox'][juiceCheckbox]:enabled:is(:checked, :indeterminate) {\n border-color: var(--juice-checkbox-checked-active-bg);\n background: var(--juice-checkbox-checked-active-bg);\n }\n\n input[type='checkbox'][juiceCheckbox]:focus-visible {\n outline: 2px solid var(--juice-checkbox-focus-ring);\n outline-offset: 2px;\n }\n\n /* Disabled: an empty box keeps its edge; a value keeps a neutral fill and its mark, so checked and unchecked stay apart. */\n input[type='checkbox'][juiceCheckbox]:disabled {\n border-color: var(--juice-checkbox-disabled-border);\n background: var(--juice-checkbox-disabled-bg);\n cursor: not-allowed;\n }\n input[type='checkbox'][juiceCheckbox]:disabled:is(:checked, :indeterminate) {\n border-color: var(--juice-checkbox-disabled-checked-bg);\n background: var(--juice-checkbox-disabled-checked-bg);\n }\n input[type='checkbox'][juiceCheckbox]:disabled::after { background: var(--juice-checkbox-disabled-checked-fg); }\n\n /* A <label> that wraps the box: 14px Inter, 8px gap, the box centred on the first line (1lh) so long labels wrap under\n the text, not under the box. :where() keeps it at zero specificity, so apps can restyle their labels. */\n :where(label:has(> input[type='checkbox'][juiceCheckbox])) {\n display: inline-flex;\n align-items: flex-start;\n gap: var(--juice-checkbox-label-gap);\n font-family: var(--juice-font-sans);\n font-size: var(--juice-checkbox-label-font-size);\n font-weight: var(--juice-checkbox-label-font-weight);\n line-height: var(--juice-checkbox-label-line-height);\n color: var(--juice-checkbox-label-fg);\n cursor: pointer;\n }\n :where(label:has(> input[type='checkbox'][juiceCheckbox])) > input[type='checkbox'][juiceCheckbox] {\n margin-block-start: calc((1lh - var(--juice-checkbox-size)) / 2);\n }\n :where(label:has(> input[type='checkbox'][juiceCheckbox]:disabled)) {\n color: var(--juice-checkbox-label-disabled-fg);\n cursor: not-allowed;\n }\n\n @media (prefers-reduced-motion: reduce) {\n input[type='checkbox'][juiceCheckbox],\n input[type='checkbox'][juiceCheckbox]::after { transition: none; }\n input[type='checkbox'][juiceCheckbox]:enabled:active,\n label:active > input[type='checkbox'][juiceCheckbox]:enabled { transform: none; }\n }\n /* Forced colours (Windows contrast themes) drop backgrounds and masks: hand the box back to the native checkbox. */\n @media (forced-colors: active) {\n input[type='checkbox'][juiceCheckbox] { appearance: auto; border: 0; background: none; transform: none; }\n input[type='checkbox'][juiceCheckbox]::after { display: none; }\n }\n`;\n\n@Component({ selector: 'juice-checkbox-styles', template: '', styles: CHECKBOX_STYLES, encapsulation: ViewEncapsulation.None })\nclass JuiceCheckboxStyles {}\n\n/**\n * Styled native checkbox: keyboard, form and screen-reader behaviour stay the platform's. `indeterminate` sets the DOM\n * property (it has no attribute). Wrap it in a `<label>` with its text after it (the label then gets the 14px type and 8px\n * gap), or give it `aria-label`.\n */\n@Directive({ selector: 'input[type=checkbox][juiceCheckbox]' })\nexport class JuiceCheckbox {\n readonly indeterminate = input(false, { transform: booleanAttribute });\n\n constructor() {\n loadStyles(JuiceCheckboxStyles);\n const el = inject<ElementRef<HTMLInputElement>>(ElementRef).nativeElement;\n effect(() => {\n el.indeterminate = this.indeterminate();\n });\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n input,\n numberAttribute,\n output,\n} from '@angular/core';\nimport { JuiceIcon } from '@juice-js/icons';\nimport { JuiceButton } from '../button/button';\n\nexport type JuiceBadgeTone = 'neutral' | 'accent' | 'ok' | 'warn' | 'bad' | 'info';\nexport type JuiceSpinnerSize = 'sm' | 'md' | 'lg';\n\nconst STYLES = `\n juice-badge {\n display: inline-flex;\n align-items: center;\n padding: 0 var(--juice-space-2);\n border-radius: var(--juice-radius-full);\n background: var(--juice-color-surface-sunken);\n color: var(--juice-color-text);\n font-family: var(--juice-font-sans);\n font-size: var(--juice-text-xs);\n font-weight: var(--juice-weight-medium);\n line-height: 1.5rem;\n white-space: nowrap;\n }\n juice-badge[data-tone='accent'] { background: var(--juice-color-accent-subtle); color: var(--juice-color-text); }\n juice-badge[data-tone='ok'] { background: var(--juice-color-ok-subtle); color: var(--juice-color-text); }\n juice-badge[data-tone='warn'] { background: var(--juice-color-warn-subtle); color: var(--juice-color-text); }\n juice-badge[data-tone='bad'] { background: var(--juice-color-bad-subtle); color: var(--juice-color-text); }\n juice-badge[data-tone='info'] { background: var(--juice-color-info-subtle); color: var(--juice-color-text); }\n\n juice-progress { display: block; height: 0.5rem; overflow: hidden; border-radius: var(--juice-radius-full); background: var(--juice-color-surface-sunken); }\n .juice-progress__bar { height: 100%; border-radius: inherit; background: var(--juice-color-accent); transition: width var(--juice-duration-normal) var(--juice-ease-standard); }\n juice-progress[data-indeterminate] .juice-progress__bar { width: 40%; animation: juice-progress-slide 1.2s var(--juice-ease-standard) infinite; }\n @keyframes juice-progress-slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }\n\n juice-spinner { display: inline-flex; flex: none; align-items: center; justify-content: center; }\n .juice-spinner__ring {\n box-sizing: border-box;\n width: 1.5rem;\n height: 1.5rem;\n border: 2px solid var(--juice-color-border-strong);\n border-top-color: var(--juice-color-accent);\n border-radius: var(--juice-radius-full);\n animation: juice-spinner-spin 800ms linear infinite;\n }\n juice-spinner[data-size='sm'] .juice-spinner__ring { width: 1rem; height: 1rem; }\n juice-spinner[data-size='lg'] .juice-spinner__ring { width: 2.5rem; height: 2.5rem; border-width: 3px; }\n @media (prefers-reduced-motion: reduce) {\n .juice-spinner__ring { animation-duration: 3s; }\n juice-progress[data-indeterminate] .juice-progress__bar { animation-duration: 4s; }\n }\n @keyframes juice-spinner-spin { to { transform: rotate(360deg); } }\n .juice-visually-hidden {\n position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;\n clip-path: inset(50%); white-space: nowrap; border: 0;\n }\n\n .juice-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--juice-space-3);\n padding: var(--juice-space-8);\n color: var(--juice-color-text);\n font-family: var(--juice-font-sans);\n text-align: center;\n }\n .juice-state__icon { color: var(--juice-color-text-muted); }\n .juice-state__title { margin: 0; font-size: var(--juice-text-lg); font-weight: var(--juice-weight-semibold); }\n .juice-state__text { margin: 0; max-width: 40ch; color: var(--juice-color-text-muted); font-size: var(--juice-text-sm); }\n .juice-state--error .juice-state__title { color: var(--juice-color-bad); }\n`;\n\nconst COMMON = { changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: STYLES } as const;\n\n/** Small status pill. The tone is conveyed by the text, so do not rely on colour alone. */\n@Component({\n selector: 'juice-badge',\n template: '<ng-content />',\n ...COMMON,\n host: { '[attr.data-tone]': 'tone()' },\n})\nexport class JuiceBadge {\n readonly tone = input<JuiceBadgeTone>('neutral');\n}\n\n/** Progress bar. With a `value` (0..max) it reports `aria-valuenow`; without one it is indeterminate. */\n@Component({\n selector: 'juice-progress',\n template: `<div class=\"juice-progress__bar\" [style.width.%]=\"percent()\"></div>`,\n ...COMMON,\n host: {\n role: 'progressbar',\n 'aria-valuemin': '0',\n '[attr.aria-valuemax]': 'max()',\n '[attr.aria-valuenow]': 'clamped()',\n '[attr.aria-label]': 'label()',\n '[attr.data-indeterminate]': 'clamped() === null ? \"\" : null',\n },\n})\nexport class JuiceProgress {\n readonly value = input<number | null | undefined, unknown>(null, {\n transform: (v: unknown) => (v === null || v === undefined || v === '' || Number.isNaN(Number(v)) ? null : Number(v)),\n });\n readonly max = input(100, { transform: numberAttribute });\n readonly label = input('Progress');\n\n protected readonly clamped = computed(() => {\n const v = this.value();\n return v == null ? null : Math.min(Math.max(v, 0), this.max());\n });\n protected readonly percent = computed(() => {\n const v = this.clamped();\n return v == null || this.max() <= 0 ? null : (v / this.max()) * 100;\n });\n}\n\n/** Indeterminate activity indicator. The label is read by assistive tech through `role=status`. */\n@Component({\n selector: 'juice-spinner',\n template: `<span class=\"juice-spinner__ring\" aria-hidden=\"true\"></span><span class=\"juice-visually-hidden\">{{ label() }}</span>`,\n ...COMMON,\n host: { role: 'status', '[attr.data-size]': 'size()' },\n})\nexport class JuiceSpinner {\n readonly size = input<JuiceSpinnerSize>('md');\n readonly label = input('Loading');\n}\n\n/** Nothing-here state with an optional icon, description and a projected action. */\n@Component({\n selector: 'juice-empty-state',\n imports: [JuiceIcon],\n template: `\n @if (icon()) {\n <juice-icon class=\"juice-state__icon\" [name]=\"icon()\" [size]=\"32\" />\n }\n <p class=\"juice-state__title\">{{ title() }}</p>\n @if (description()) {\n <p class=\"juice-state__text\">{{ description() }}</p>\n }\n <ng-content />\n `,\n ...COMMON,\n host: { class: 'juice-state' },\n})\nexport class JuiceEmptyState {\n readonly icon = input('');\n readonly title = input.required<string>();\n readonly description = input('');\n}\n\n/** Loading placeholder for a region: spinner plus visible label. */\n@Component({\n selector: 'juice-loading-state',\n imports: [JuiceSpinner],\n template: `<juice-spinner [label]=\"label()\" /><p class=\"juice-state__text\" aria-hidden=\"true\">{{ label() }}</p>`,\n ...COMMON,\n host: { class: 'juice-state' },\n})\nexport class JuiceLoadingState {\n readonly label = input('Loading');\n}\n\n/** Failure state with a retry action. `error` may be an `Error`, a string or anything else (shown generically). */\n@Component({\n selector: 'juice-error-state',\n imports: [JuiceButton],\n template: `\n <p class=\"juice-state__title\">{{ title() }}</p>\n @if (message()) {\n <p class=\"juice-state__text\">{{ message() }}</p>\n }\n <button juiceButton variant=\"secondary\" (click)=\"retry.emit()\">{{ retryLabel() }}</button>\n `,\n ...COMMON,\n host: { class: 'juice-state juice-state--error', role: 'alert' },\n})\nexport class JuiceErrorState {\n readonly title = input('Something went wrong');\n readonly error = input<unknown>(null);\n readonly retryLabel = input('Try again');\n readonly retry = output<void>();\n\n protected readonly message = computed(() => {\n const e = this.error();\n if (typeof e === 'string') return e;\n if (e instanceof Error) return e.message;\n return '';\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAgBA,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6ErB;AAED;;;AAGG;MAcU,WAAW,CAAA;AAKtB,IAAA,WAAA,GAAA;QAJS,IAAA,CAAA,OAAO,GAAG,KAAK,CAAqB,WAAW;oFAAC;QAChD,IAAA,CAAA,IAAI,GAAG,KAAK,CAAkB,IAAI;iFAAC;QACnC,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,KAAK,+EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;QAG9D,MAAM,EAAE,GAAG,MAAM,CAA0B,UAAU,CAAC,CAAC,aAAa;AACpE,QAAA,IAAI,EAAE,CAAC,OAAO,KAAK,QAAQ,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC;AAAE,YAAA,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAE1F,QAAA,MAAM,KAAK,GAAG,CAAC,CAAQ,KAAI;AACzB,YAAA,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE;gBAClB,CAAC,CAAC,cAAc,EAAE;gBAClB,CAAC,CAAC,wBAAwB,EAAE;YAC9B;AACF,QAAA,CAAC;QACD,EAAE,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC;QACzC,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,mBAAmB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAClF;8GAjBW,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAX,IAAA,SAAA,I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IAAA,EAAA,WAAA,EAAA,IAAA,EAPS,WAAW,EAAA,QAAA,EAAA,qCAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,MAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAWV,eAAe,EAAA,UAAA,EAAA,CAAA;kBAb3B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;oBAC7B,OAAO,EAAE,CAAC,WAAW,CAAC;AACtB,oBAAA,QAAQ,EAAE;;;;;;AAMT,EAAA,CAAA;AACD,oBAAA,GAAG,MAAM;oBACT,IAAI,EAAE,EAAE,KAAK,EAAE,gCAAgC,EAAE,IAAI,EAAE,OAAO,EAAE;AACjE,iBAAA;;;ACtLD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juice-js/ui",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.4",
|
|
4
4
|
"description": "Juice UI primitives and theme service, Material-free",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Pavellis Labs",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"@angular/common": "^22.0.0",
|
|
25
25
|
"@angular/core": "^22.0.0",
|
|
26
26
|
"@angular/forms": "^22.0.0",
|
|
27
|
-
"@juice-js/design-tokens": "3.0.0-alpha.
|
|
28
|
-
"@juice-js/icons": "3.0.0-alpha.
|
|
27
|
+
"@juice-js/design-tokens": "3.0.0-alpha.4",
|
|
28
|
+
"@juice-js/icons": "3.0.0-alpha.4"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"tslib": "^2.3.0"
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
},
|
|
49
49
|
"type": "module",
|
|
50
50
|
"readme": "ERROR: No README data found!",
|
|
51
|
-
"_id": "@juice-js/ui@3.0.0-alpha.
|
|
51
|
+
"_id": "@juice-js/ui@3.0.0-alpha.4"
|
|
52
52
|
}
|
package/types/juice-js-ui.d.ts
CHANGED
|
@@ -110,7 +110,9 @@ declare class JuiceOption implements Highlightable {
|
|
|
110
110
|
}
|
|
111
111
|
/**
|
|
112
112
|
* Single-select dropdown. Focus stays on the trigger (combobox pattern); the options are exposed through
|
|
113
|
-
* `aria-activedescendant`. The list
|
|
113
|
+
* `aria-activedescendant`. The list is an inline popover: it renders in the top layer (never clipped by `overflow` ancestors
|
|
114
|
+
* or covered by drawers and dialogs) while it sits next to the trigger in the DOM, so it follows the region's theme, accent
|
|
115
|
+
* and colour scheme live. It re-places itself when any ancestor scrolls.
|
|
114
116
|
*/
|
|
115
117
|
declare class JuiceSelect implements ControlValueAccessor, AfterContentChecked, JuiceSelectHost {
|
|
116
118
|
readonly placeholder: _angular_core.InputSignal<string>;
|
|
@@ -125,9 +127,6 @@ declare class JuiceSelect implements ControlValueAccessor, AfterContentChecked,
|
|
|
125
127
|
protected readonly scrollStrategy: ScrollStrategy;
|
|
126
128
|
protected readonly open: _angular_core.WritableSignal<boolean>;
|
|
127
129
|
protected readonly triggerWidth: _angular_core.WritableSignal<number>;
|
|
128
|
-
/** The trigger's colour scheme, carried into the overlay (which lives at the end of <body>), so a select inside a
|
|
129
|
-
* dark-themed region opens a dark list. */
|
|
130
|
-
protected readonly scheme: _angular_core.WritableSignal<string>;
|
|
131
130
|
protected readonly activeId: _angular_core.WritableSignal<string | null>;
|
|
132
131
|
protected readonly displayLabel: _angular_core.WritableSignal<string>;
|
|
133
132
|
protected readonly hasValue: _angular_core.WritableSignal<boolean>;
|
|
@@ -135,6 +134,9 @@ declare class JuiceSelect implements ControlValueAccessor, AfterContentChecked,
|
|
|
135
134
|
protected readonly isDisabled: Signal<boolean>;
|
|
136
135
|
private readonly options;
|
|
137
136
|
private readonly trigger;
|
|
137
|
+
private readonly connected;
|
|
138
|
+
private readonly doc;
|
|
139
|
+
private stopScroll?;
|
|
138
140
|
private readonly keys;
|
|
139
141
|
private onChange;
|
|
140
142
|
protected onTouched: () => void;
|