@juice-js/ui 0.0.0-stage → 2.5.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.
@@ -0,0 +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-color-focus-ring);\n outline-offset: 2px;\n }\n [juiceButton][data-variant='primary'] { background: var(--juice-color-accent); color: var(--juice-color-text-on-accent); }\n [juiceButton][data-variant='primary']:hover { background: var(--juice-color-accent-hover); }\n [juiceButton][data-variant='primary']:active { background: var(--juice-color-accent-active); }\n [juiceButton][data-variant='secondary'] { background: var(--juice-color-surface); border-color: var(--juice-color-border-strong); }\n [juiceButton][data-variant='secondary']:hover { background: var(--juice-color-accent-subtle); }\n [juiceButton][data-variant='ghost']:hover, [juiceIconButton]:hover { background: var(--juice-color-accent-subtle); }\n [juiceButton][data-variant='danger'] { background: var(--juice-color-bad); color: var(--juice-color-text-on-accent); }\n [juiceButton][data-variant='danger']:hover { background: var(--juice-color-bad); filter: brightness(0.92); }\n [juiceButton]:disabled, [juiceIconButton]:disabled, [juiceButton][aria-disabled='true'] {\n background: var(--juice-color-disabled-bg);\n border-color: transparent;\n color: var(--juice-color-disabled-text);\n cursor: not-allowed;\n filter: none;\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 ViewEncapsulation,\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\nconst FIELD_STYLES = `\n juice-field { display: flex; flex-direction: column; gap: var(--juice-space-1); font-family: var(--juice-font-sans); }\n .juice-field__label { color: var(--juice-color-text); font-size: var(--juice-text-sm); font-weight: var(--juice-weight-medium); }\n .juice-field__hint { color: var(--juice-color-text-muted); font-size: var(--juice-text-xs); }\n .juice-field__error { color: var(--juice-color-bad); font-size: var(--juice-text-xs); }\n input[juiceInput], textarea[juiceInput] {\n box-sizing: border-box;\n width: 100%;\n min-height: var(--juice-control-height-md);\n padding: 0 var(--juice-space-3);\n border: 1px solid var(--juice-color-border-strong);\n border-radius: var(--juice-radius-md);\n background: var(--juice-color-surface);\n color: var(--juice-color-text);\n font-family: var(--juice-font-sans);\n font-size: var(--juice-text-sm);\n transition: border-color var(--juice-duration-fast) var(--juice-ease-standard);\n }\n textarea[juiceInput] { padding-top: var(--juice-space-2); padding-bottom: var(--juice-space-2); line-height: 1.5; resize: vertical; }\n input[juiceInput]::placeholder, textarea[juiceInput]::placeholder { color: var(--juice-color-text-subtle); }\n input[juiceInput]:hover, textarea[juiceInput]:hover { border-color: var(--juice-color-text-muted); }\n input[juiceInput]:focus-visible, textarea[juiceInput]:focus-visible {\n outline: 2px solid var(--juice-color-focus-ring);\n outline-offset: 1px;\n }\n input[juiceInput][aria-invalid='true'], textarea[juiceInput][aria-invalid='true'] { border-color: var(--juice-color-bad); }\n input[juiceInput]:disabled, textarea[juiceInput]:disabled {\n background: var(--juice-color-disabled-bg);\n color: var(--juice-color-disabled-text);\n cursor: not-allowed;\n }\n`;\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 and error wrapper for one form control. The projected `[juiceInput]` (or `<juice-select>`) gets the id the\n * label points at, `aria-describedby` for hint and error, and `aria-invalid`.\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 (hint()) {\n <div class=\"juice-field__hint\" [id]=\"hintId\">{{ hint() }}</div>\n }\n @if (error()) {\n <div class=\"juice-field__error\" [id]=\"errorId\">{{ error() }}</div>\n }\n `,\n styles: FIELD_STYLES,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class JuiceField {\n readonly label = input.required<string>();\n readonly hint = input<string>('');\n readonly error = input<string>('');\n\n readonly controlId = nextId('juice-field');\n readonly hintId = `${this.controlId}-hint`;\n readonly errorId = `${this.controlId}-error`;\n readonly labelId = `${this.controlId}-label`;\n readonly invalid = () => !!this.error();\n\n readonly describedBy = computed(() => {\n const ids = [this.hint() ? this.hintId : '', this.error() ? this.errorId : ''].filter(Boolean);\n return ids.length ? ids.join(' ') : null;\n });\n}\n\n/** Styles for the text input, 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 '(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 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\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 }\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\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-control-height-md);\n padding: 0 var(--juice-space-3);\n border: 1px solid var(--juice-color-border-strong);\n border-radius: var(--juice-radius-md);\n background: var(--juice-color-surface);\n color: var(--juice-color-text);\n font: inherit;\n font-size: var(--juice-text-sm);\n text-align: start;\n cursor: pointer;\n }\n .juice-select__trigger:hover { border-color: var(--juice-color-text-muted); }\n .juice-select__trigger:focus-visible { outline: 2px solid var(--juice-color-focus-ring); outline-offset: 1px; }\n .juice-select__trigger[aria-invalid='true'] { border-color: var(--juice-color-bad); }\n .juice-select__trigger:disabled { background: var(--juice-color-disabled-bg); color: var(--juice-color-disabled-text); cursor: not-allowed; }\n .juice-select__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n .juice-select__placeholder { color: var(--juice-color-text-muted); }\n .juice-select__chevron { flex: none; width: 1em; height: 1em; }\n .juice-select-panel {\n box-sizing: border-box;\n max-height: 18rem;\n margin: 0;\n padding: var(--juice-space-1);\n overflow-y: auto;\n border: 1px solid var(--juice-color-border);\n border-radius: var(--juice-radius-md);\n background: var(--juice-color-surface-raised);\n color: var(--juice-color-text);\n box-shadow: var(--juice-shadow-overlay);\n font-family: var(--juice-font-sans);\n font-size: var(--juice-text-sm);\n }\n juice-option {\n display: block;\n padding: var(--juice-space-2) var(--juice-space-3);\n border-radius: var(--juice-radius-sm);\n cursor: pointer;\n }\n juice-option.juice-option--active { background: var(--juice-color-accent-subtle); }\n juice-option[aria-selected='true'] { font-weight: var(--juice-weight-semibold); }\n juice-option[aria-disabled='true'] { color: var(--juice-color-disabled-text); cursor: not-allowed; }\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: '<ng-content />',\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 [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=\"2\" 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 (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 keys = new ActiveDescendantKeyManager<JuiceOption>(this.options, inject(Injector))\n .withTypeAhead(200)\n .withHomeAndEnd()\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 this.triggerWidth.set(this.trigger().nativeElement.offsetWidth);\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 input[type='checkbox'][juiceCheckbox] {\n appearance: none;\n box-sizing: border-box;\n position: relative;\n flex: none;\n width: 1rem;\n height: 1rem;\n margin: 0;\n border: 1px solid var(--juice-color-border-strong);\n border-radius: var(--juice-radius-sm);\n background: var(--juice-color-surface);\n vertical-align: middle;\n cursor: pointer;\n }\n input[type='checkbox'][juiceCheckbox]:checked,\n input[type='checkbox'][juiceCheckbox]:indeterminate {\n border-color: var(--juice-color-accent);\n background: var(--juice-color-accent);\n }\n input[type='checkbox'][juiceCheckbox]:checked::after {\n content: '';\n position: absolute;\n left: 4px;\n top: 1px;\n width: 4px;\n height: 8px;\n border: solid var(--juice-color-text-on-accent);\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n }\n input[type='checkbox'][juiceCheckbox]:indeterminate::after {\n content: '';\n position: absolute;\n left: 3px;\n top: 6px;\n width: 8px;\n height: 2px;\n background: var(--juice-color-text-on-accent);\n }\n input[type='checkbox'][juiceCheckbox]:focus-visible { outline: 2px solid var(--juice-color-focus-ring); outline-offset: 2px; }\n input[type='checkbox'][juiceCheckbox]:disabled {\n border-color: transparent;\n background: var(--juice-color-disabled-bg);\n cursor: not-allowed;\n }\n`;\n\n@Component({ selector: 'juice-checkbox-styles', template: '', styles: CHECKBOX_STYLES, encapsulation: ViewEncapsulation.None })\nclass JuiceCheckboxStyles {}\n\n/** Styled native checkbox. `indeterminate` sets the DOM property (it has no attribute). Label it with a `<label>` or `aria-label`. */\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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgErB;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,K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AA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,KAAA,EAAA,OAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,MAAA,EAAA,OAAA,EAAA,EAAA,cAAA,EAAA,gCAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAVhB;;;;;;AAMT,EAAA,CAAA,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;;;;"}
package/package.json CHANGED
@@ -1,6 +1,51 @@
1
1
  {
2
2
  "name": "@juice-js/ui",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "2.5.0-alpha.4",
4
+ "description": "Juice UI primitives and theme service, Material-free",
5
+ "author": {
6
+ "name": "jack@creatorflow.io"
7
+ },
8
+ "license": "MIT",
9
+ "bugs": {
10
+ "url": "https://github.com/PavellisLabs/juice-layout/issues"
11
+ },
12
+ "homepage": "https://github.com/PavellisLabs/juice-layout#readme",
13
+ "publishConfig": {
14
+ "access": "public",
15
+ "provenance": true
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/PavellisLabs/juice-layout.git"
20
+ },
21
+ "peerDependencies": {
22
+ "@angular/cdk": "^22.0.0",
23
+ "@angular/common": "^22.0.0",
24
+ "@angular/core": "^22.0.0",
25
+ "@angular/forms": "^22.0.0",
26
+ "@juice-js/design-tokens": "2.5.0-alpha.4",
27
+ "@juice-js/icons": "2.5.0-alpha.4"
28
+ },
29
+ "dependencies": {
30
+ "tslib": "^2.3.0"
31
+ },
32
+ "sideEffects": false,
33
+ "module": "fesm2022/juice-js-ui.mjs",
34
+ "typings": "types/juice-js-ui.d.ts",
35
+ "exports": {
36
+ "./package.json": {
37
+ "default": "./package.json"
38
+ },
39
+ ".": {
40
+ "types": "./types/juice-js-ui.d.ts",
41
+ "default": "./fesm2022/juice-js-ui.mjs"
42
+ },
43
+ "./theme": {
44
+ "types": "./types/juice-js-ui-theme.d.ts",
45
+ "default": "./fesm2022/juice-js-ui-theme.mjs"
46
+ }
47
+ },
48
+ "type": "module",
49
+ "readme": "ERROR: No README data found!",
50
+ "_id": "@juice-js/ui@2.5.0-alpha.4"
51
+ }
@@ -0,0 +1,75 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, Signal, EnvironmentProviders } from '@angular/core';
3
+
4
+ type JuiceThemeMode = 'light' | 'dark' | 'system';
5
+ type JuiceDensity = 'compact' | 'default' | 'comfortable';
6
+ interface JuiceAccent {
7
+ id: string;
8
+ name: string;
9
+ /** The brand swatch (also the dark-mode accent); the stylesheet picks the AA-safe light-mode step. */
10
+ color: string;
11
+ }
12
+ interface JuiceThemeOptions {
13
+ defaultMode?: JuiceThemeMode;
14
+ defaultAccent?: string;
15
+ defaultDensity?: JuiceDensity;
16
+ accents?: JuiceAccent[];
17
+ /** Storage key of the persisted state. Default `juice.theme`. */
18
+ storageKey?: string;
19
+ /** Mirror `body.dark` and `data-juice-palette`, and read and write `IS_DARK_MODE` and `JUICE_PALETTE`. Default true. */
20
+ legacy?: boolean;
21
+ }
22
+ declare const JUICE_ACCENTS: readonly JuiceAccent[];
23
+ declare const JUICE_THEME_MODES: readonly JuiceThemeMode[];
24
+ declare const JUICE_DENSITIES: readonly JuiceDensity[];
25
+ declare const JUICE_THEME_OPTIONS: InjectionToken<JuiceThemeOptions>;
26
+
27
+ declare class ThemeService {
28
+ private readonly doc;
29
+ private readonly browser;
30
+ private readonly destroyRef;
31
+ private readonly options;
32
+ private readonly accents;
33
+ private readonly key;
34
+ private readonly legacy;
35
+ private readonly defaults;
36
+ private readonly _mode;
37
+ private readonly _accent;
38
+ private readonly _density;
39
+ private readonly systemDark;
40
+ readonly mode: Signal<JuiceThemeMode>;
41
+ readonly accent: Signal<string>;
42
+ readonly density: Signal<JuiceDensity>;
43
+ readonly resolved: Signal<'light' | 'dark'>;
44
+ constructor();
45
+ setMode(m: JuiceThemeMode): void;
46
+ setAccent(id: string): void;
47
+ setDensity(d: JuiceDensity): void;
48
+ /** Flips the resolved scheme; the result is an explicit mode. */
49
+ toggle(): void;
50
+ private resolveDefaults;
51
+ private knownAccent;
52
+ /** Parses a stored record. A bad envelope falls back whole; a field off its allow-list falls back alone. */
53
+ private parse;
54
+ private parseLegacyMode;
55
+ private legacyAccent;
56
+ private store;
57
+ private read;
58
+ private write;
59
+ private load;
60
+ private set;
61
+ private commit;
62
+ private persist;
63
+ /** Another tab wrote: adopt its state without writing back, so tabs never ping-pong. */
64
+ private onStorage;
65
+ private win;
66
+ private apply;
67
+ static ɵfac: i0.ɵɵFactoryDeclaration<ThemeService, never>;
68
+ static ɵprov: i0.ɵɵInjectableDeclaration<ThemeService>;
69
+ }
70
+
71
+ /** Configures the theme and applies the stored state before the first render. */
72
+ declare function provideJuiceTheme(options?: JuiceThemeOptions): EnvironmentProviders;
73
+
74
+ export { JUICE_ACCENTS, JUICE_DENSITIES, JUICE_THEME_MODES, JUICE_THEME_OPTIONS, ThemeService, provideJuiceTheme };
75
+ export type { JuiceAccent, JuiceDensity, JuiceThemeMode, JuiceThemeOptions };
@@ -0,0 +1,192 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { DoCheck, Signal, AfterContentChecked } from '@angular/core';
3
+ import { Highlightable } from '@angular/cdk/a11y';
4
+ import { ConnectedPosition, ScrollStrategy } from '@angular/cdk/overlay';
5
+ import { ControlValueAccessor } from '@angular/forms';
6
+
7
+ type JuiceButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger';
8
+ type JuiceButtonSize = 'sm' | 'md' | 'lg';
9
+ /**
10
+ * Button or link styled as a button. `loading` sets `aria-busy` and swallows activation (the element stays focusable
11
+ * and does not use `disabled`, so focus is not lost while busy).
12
+ */
13
+ declare class JuiceButton {
14
+ readonly variant: _angular_core.InputSignal<JuiceButtonVariant>;
15
+ readonly size: _angular_core.InputSignal<JuiceButtonSize>;
16
+ readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
17
+ constructor();
18
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<JuiceButton, never>;
19
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<JuiceButton, "button[juiceButton], a[juiceButton]", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
20
+ }
21
+ /** Square icon-only button. It has no visible text, so an `aria-label` (or `aria-labelledby`) is required. */
22
+ declare class JuiceIconButton {
23
+ constructor();
24
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<JuiceIconButton, never>;
25
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<JuiceIconButton, "button[juiceIconButton]", never, {}, {}, never, ["*"], true, never>;
26
+ }
27
+
28
+ /** What a control inside `<juice-field>` needs from it. */
29
+ interface JuiceFieldControl {
30
+ readonly controlId: string;
31
+ readonly labelId: string;
32
+ readonly describedBy: () => string | null;
33
+ readonly invalid: () => boolean;
34
+ }
35
+ /**
36
+ * Label, hint and error wrapper for one form control. The projected `[juiceInput]` (or `<juice-select>`) gets the id the
37
+ * label points at, `aria-describedby` for hint and error, and `aria-invalid`.
38
+ */
39
+ declare class JuiceField {
40
+ readonly label: _angular_core.InputSignal<string>;
41
+ readonly hint: _angular_core.InputSignal<string>;
42
+ readonly error: _angular_core.InputSignal<string>;
43
+ readonly controlId: string;
44
+ readonly hintId: string;
45
+ readonly errorId: string;
46
+ readonly labelId: string;
47
+ readonly invalid: () => boolean;
48
+ readonly describedBy: _angular_core.Signal<string | null>;
49
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<JuiceField, never>;
50
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<JuiceField, "juice-field", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
51
+ }
52
+ /** Styles for the text input, wired to a surrounding `<juice-field>` when there is one. */
53
+ declare class JuiceInput implements DoCheck {
54
+ protected readonly field: JuiceField | null;
55
+ private readonly control;
56
+ private readonly state;
57
+ /** Invalid is shown only once the user has touched the control (or the field was given an error without a form control). */
58
+ protected readonly invalid: _angular_core.Signal<boolean>;
59
+ constructor();
60
+ ngDoCheck(): void;
61
+ protected sync(): void;
62
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<JuiceInput, never>;
63
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<JuiceInput, "input[juiceInput], textarea[juiceInput]", never, {}, {}, never, never, true, never>;
64
+ }
65
+
66
+ /** What an option needs from its select. */
67
+ interface JuiceSelectHost {
68
+ readonly value: Signal<unknown>;
69
+ choose(option: JuiceOption): void;
70
+ activate(option: JuiceOption): void;
71
+ }
72
+ /** One choice in a `<juice-select>`. Its text is the label shown in the trigger and matched by typeahead. */
73
+ declare class JuiceOption implements Highlightable {
74
+ readonly value: _angular_core.InputSignal<unknown>;
75
+ readonly isDisabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
76
+ readonly id: string;
77
+ protected readonly select: JuiceSelectHost;
78
+ private readonly el;
79
+ protected readonly active: _angular_core.WritableSignal<boolean>;
80
+ protected readonly selected: Signal<boolean>;
81
+ /** Read by `ListKeyManager` through `skipPredicate`. */
82
+ get disabled(): boolean;
83
+ getLabel(): string;
84
+ setActiveStyles(): void;
85
+ setInactiveStyles(): void;
86
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<JuiceOption, never>;
87
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<JuiceOption, "juice-option", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "isDisabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
88
+ }
89
+ /**
90
+ * Single-select dropdown. Focus stays on the trigger (combobox pattern); the options are exposed through
91
+ * `aria-activedescendant`. The list opens in a CDK overlay, so it is not clipped by scrolling or `overflow` ancestors.
92
+ */
93
+ declare class JuiceSelect implements ControlValueAccessor, AfterContentChecked, JuiceSelectHost {
94
+ readonly placeholder: _angular_core.InputSignal<string>;
95
+ /** Accessible name when the select is not inside a `<juice-field>`. */
96
+ readonly label: _angular_core.InputSignal<string>;
97
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
98
+ readonly value: _angular_core.ModelSignal<unknown>;
99
+ protected readonly field: JuiceField | null;
100
+ protected readonly triggerId: string;
101
+ protected readonly listboxId: string;
102
+ protected readonly positions: ConnectedPosition[];
103
+ protected readonly scrollStrategy: ScrollStrategy;
104
+ protected readonly open: _angular_core.WritableSignal<boolean>;
105
+ protected readonly triggerWidth: _angular_core.WritableSignal<number>;
106
+ protected readonly activeId: _angular_core.WritableSignal<string | null>;
107
+ protected readonly displayLabel: _angular_core.WritableSignal<string>;
108
+ protected readonly hasValue: _angular_core.WritableSignal<boolean>;
109
+ private readonly cvaDisabled;
110
+ protected readonly isDisabled: Signal<boolean>;
111
+ private readonly options;
112
+ private readonly trigger;
113
+ private readonly keys;
114
+ private onChange;
115
+ protected onTouched: () => void;
116
+ constructor();
117
+ ngAfterContentChecked(): void;
118
+ writeValue(v: unknown): void;
119
+ registerOnChange(fn: (v: unknown) => void): void;
120
+ registerOnTouched(fn: () => void): void;
121
+ setDisabledState(d: boolean): void;
122
+ choose(option: JuiceOption): void;
123
+ activate(option: JuiceOption): void;
124
+ protected toggle(): void;
125
+ private show;
126
+ protected close(): void;
127
+ protected onOutsideClick(e: MouseEvent): void;
128
+ protected onKeydown(e: KeyboardEvent): void;
129
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<JuiceSelect, never>;
130
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<JuiceSelect, "juice-select", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, ["options"], ["*"], true, never>;
131
+ }
132
+
133
+ /** Styled native checkbox. `indeterminate` sets the DOM property (it has no attribute). Label it with a `<label>` or `aria-label`. */
134
+ declare class JuiceCheckbox {
135
+ readonly indeterminate: _angular_core.InputSignalWithTransform<boolean, unknown>;
136
+ constructor();
137
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<JuiceCheckbox, never>;
138
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<JuiceCheckbox, "input[type=checkbox][juiceCheckbox]", never, { "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
139
+ }
140
+
141
+ type JuiceBadgeTone = 'neutral' | 'accent' | 'ok' | 'warn' | 'bad' | 'info';
142
+ type JuiceSpinnerSize = 'sm' | 'md' | 'lg';
143
+ /** Small status pill. The tone is conveyed by the text, so do not rely on colour alone. */
144
+ declare class JuiceBadge {
145
+ readonly tone: _angular_core.InputSignal<JuiceBadgeTone>;
146
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<JuiceBadge, never>;
147
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<JuiceBadge, "juice-badge", never, { "tone": { "alias": "tone"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
148
+ }
149
+ /** Progress bar. With a `value` (0..max) it reports `aria-valuenow`; without one it is indeterminate. */
150
+ declare class JuiceProgress {
151
+ readonly value: _angular_core.InputSignalWithTransform<number | null | undefined, unknown>;
152
+ readonly max: _angular_core.InputSignalWithTransform<number, unknown>;
153
+ readonly label: _angular_core.InputSignal<string>;
154
+ protected readonly clamped: _angular_core.Signal<number | null>;
155
+ protected readonly percent: _angular_core.Signal<number | null>;
156
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<JuiceProgress, never>;
157
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<JuiceProgress, "juice-progress", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
158
+ }
159
+ /** Indeterminate activity indicator. The label is read by assistive tech through `role=status`. */
160
+ declare class JuiceSpinner {
161
+ readonly size: _angular_core.InputSignal<JuiceSpinnerSize>;
162
+ readonly label: _angular_core.InputSignal<string>;
163
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<JuiceSpinner, never>;
164
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<JuiceSpinner, "juice-spinner", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
165
+ }
166
+ /** Nothing-here state with an optional icon, description and a projected action. */
167
+ declare class JuiceEmptyState {
168
+ readonly icon: _angular_core.InputSignal<string>;
169
+ readonly title: _angular_core.InputSignal<string>;
170
+ readonly description: _angular_core.InputSignal<string>;
171
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<JuiceEmptyState, never>;
172
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<JuiceEmptyState, "juice-empty-state", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": true; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
173
+ }
174
+ /** Loading placeholder for a region: spinner plus visible label. */
175
+ declare class JuiceLoadingState {
176
+ readonly label: _angular_core.InputSignal<string>;
177
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<JuiceLoadingState, never>;
178
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<JuiceLoadingState, "juice-loading-state", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
179
+ }
180
+ /** Failure state with a retry action. `error` may be an `Error`, a string or anything else (shown generically). */
181
+ declare class JuiceErrorState {
182
+ readonly title: _angular_core.InputSignal<string>;
183
+ readonly error: _angular_core.InputSignal<unknown>;
184
+ readonly retryLabel: _angular_core.InputSignal<string>;
185
+ readonly retry: _angular_core.OutputEmitterRef<void>;
186
+ protected readonly message: _angular_core.Signal<string>;
187
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<JuiceErrorState, never>;
188
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<JuiceErrorState, "juice-error-state", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "retryLabel": { "alias": "retryLabel"; "required": false; "isSignal": true; }; }, { "retry": "retry"; }, never, never, true, never>;
189
+ }
190
+
191
+ export { JuiceBadge, JuiceButton, JuiceCheckbox, JuiceEmptyState, JuiceErrorState, JuiceField, JuiceIconButton, JuiceInput, JuiceLoadingState, JuiceOption, JuiceProgress, JuiceSelect, JuiceSpinner };
192
+ export type { JuiceBadgeTone, JuiceButtonSize, JuiceButtonVariant, JuiceFieldControl, JuiceSpinnerSize };