@cdevhub/ngx-tw 0.6.0 → 0.6.2
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/cdevhub-ngx-tw-badge.mjs +7 -7
- package/fesm2022/cdevhub-ngx-tw-badge.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-button.mjs +7 -7
- package/fesm2022/cdevhub-ngx-tw-button.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-card.mjs +7 -7
- package/fesm2022/cdevhub-ngx-tw-card.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-collapsible.mjs +7 -7
- package/fesm2022/cdevhub-ngx-tw-collapsible.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-combobox.mjs +8 -8
- package/fesm2022/cdevhub-ngx-tw-combobox.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-date-picker.mjs +8 -8
- package/fesm2022/cdevhub-ngx-tw-date-picker.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs +8 -8
- package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-form-field.mjs +16 -16
- package/fesm2022/cdevhub-ngx-tw-form-field.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-input.mjs +1 -1
- package/fesm2022/cdevhub-ngx-tw-input.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-item.mjs +10 -1
- package/fesm2022/cdevhub-ngx-tw-item.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs +7 -7
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-select.mjs +7 -7
- package/fesm2022/cdevhub-ngx-tw-select.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-separator.mjs +7 -7
- package/fesm2022/cdevhub-ngx-tw-separator.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-slider.mjs +21 -21
- package/fesm2022/cdevhub-ngx-tw-slider.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-switch.mjs +1 -1
- package/fesm2022/cdevhub-ngx-tw-switch.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tags-input.mjs +8 -8
- package/fesm2022/cdevhub-ngx-tw-tags-input.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-time-picker.mjs +8 -8
- package/fesm2022/cdevhub-ngx-tw-time-picker.mjs.map +1 -1
- package/index.json +1 -1
- package/package.json +1 -1
- package/theme/_dark.css +7 -6
- package/theme/_light.css +70 -14
- package/theme/_semantic.css +29 -30
|
@@ -193,23 +193,23 @@ const formFieldVariants = tv({
|
|
|
193
193
|
{ size: 'xl', labelFloated: false, class: { label: 'text-base' } },
|
|
194
194
|
{ size: 'xl', labelFloated: true, class: { label: 'text-sm' } },
|
|
195
195
|
// ── Outline + focused → colored border ──
|
|
196
|
-
{ appearance: 'outline', focused: true, color: 'primary', class: { controlWrapper: 'border-primary-
|
|
197
|
-
{ appearance: 'outline', focused: true, color: 'secondary', class: { controlWrapper: 'border-secondary-
|
|
198
|
-
{ appearance: 'outline', focused: true, color: 'accent', class: { controlWrapper: 'border-accent-
|
|
196
|
+
{ appearance: 'outline', focused: true, color: 'primary', class: { controlWrapper: 'border-primary-border' } },
|
|
197
|
+
{ appearance: 'outline', focused: true, color: 'secondary', class: { controlWrapper: 'border-secondary-border' } },
|
|
198
|
+
{ appearance: 'outline', focused: true, color: 'accent', class: { controlWrapper: 'border-accent-border' } },
|
|
199
199
|
{ appearance: 'outline', focused: true, color: 'neutral', class: { controlWrapper: 'border-border-strong' } },
|
|
200
|
-
{ appearance: 'outline', focused: true, color: 'info', class: { controlWrapper: 'border-info-
|
|
201
|
-
{ appearance: 'outline', focused: true, color: 'success', class: { controlWrapper: 'border-success-
|
|
202
|
-
{ appearance: 'outline', focused: true, color: 'warning', class: { controlWrapper: 'border-warning-
|
|
203
|
-
{ appearance: 'outline', focused: true, color: 'error', class: { controlWrapper: 'border-error-
|
|
200
|
+
{ appearance: 'outline', focused: true, color: 'info', class: { controlWrapper: 'border-info-border' } },
|
|
201
|
+
{ appearance: 'outline', focused: true, color: 'success', class: { controlWrapper: 'border-success-border' } },
|
|
202
|
+
{ appearance: 'outline', focused: true, color: 'warning', class: { controlWrapper: 'border-warning-border' } },
|
|
203
|
+
{ appearance: 'outline', focused: true, color: 'error', class: { controlWrapper: 'border-error-border' } },
|
|
204
204
|
// ── Filled + focused → colored bottom border ──
|
|
205
|
-
{ appearance: 'filled', focused: true, color: 'primary', class: { controlWrapper: 'border-b-2 border-primary-
|
|
206
|
-
{ appearance: 'filled', focused: true, color: 'secondary', class: { controlWrapper: 'border-b-2 border-secondary-
|
|
207
|
-
{ appearance: 'filled', focused: true, color: 'accent', class: { controlWrapper: 'border-b-2 border-accent-
|
|
205
|
+
{ appearance: 'filled', focused: true, color: 'primary', class: { controlWrapper: 'border-b-2 border-primary-border' } },
|
|
206
|
+
{ appearance: 'filled', focused: true, color: 'secondary', class: { controlWrapper: 'border-b-2 border-secondary-border' } },
|
|
207
|
+
{ appearance: 'filled', focused: true, color: 'accent', class: { controlWrapper: 'border-b-2 border-accent-border' } },
|
|
208
208
|
{ appearance: 'filled', focused: true, color: 'neutral', class: { controlWrapper: 'border-b-2 border-border-strong' } },
|
|
209
|
-
{ appearance: 'filled', focused: true, color: 'info', class: { controlWrapper: 'border-b-2 border-info-
|
|
210
|
-
{ appearance: 'filled', focused: true, color: 'success', class: { controlWrapper: 'border-b-2 border-success-
|
|
211
|
-
{ appearance: 'filled', focused: true, color: 'warning', class: { controlWrapper: 'border-b-2 border-warning-
|
|
212
|
-
{ appearance: 'filled', focused: true, color: 'error', class: { controlWrapper: 'border-b-2 border-error-
|
|
209
|
+
{ appearance: 'filled', focused: true, color: 'info', class: { controlWrapper: 'border-b-2 border-info-border' } },
|
|
210
|
+
{ appearance: 'filled', focused: true, color: 'success', class: { controlWrapper: 'border-b-2 border-success-border' } },
|
|
211
|
+
{ appearance: 'filled', focused: true, color: 'warning', class: { controlWrapper: 'border-b-2 border-warning-border' } },
|
|
212
|
+
{ appearance: 'filled', focused: true, color: 'error', class: { controlWrapper: 'border-b-2 border-error-border' } },
|
|
213
213
|
// ── Floated label + focused → colored label ──
|
|
214
214
|
{ labelFloated: true, focused: true, color: 'primary', class: { label: 'text-primary-600' } },
|
|
215
215
|
{ labelFloated: true, focused: true, color: 'secondary', class: { label: 'text-secondary-600' } },
|
|
@@ -224,8 +224,8 @@ const formFieldVariants = tv({
|
|
|
224
224
|
// ── Filled + resting label → align vertically with the input baseline (input is items-end inside an asymmetric pt/pb container) ──
|
|
225
225
|
{ appearance: 'filled', labelFloated: false, class: { labelWrapper: 'top-[calc(50%+0.5rem)]' } },
|
|
226
226
|
// ── Invalid overrides (declared last so twMerge lets them win) ──
|
|
227
|
-
{ invalid: true, appearance: 'outline', class: { controlWrapper: 'border-error-
|
|
228
|
-
{ invalid: true, appearance: 'filled', class: { controlWrapper: 'border-b-2 border-error-
|
|
227
|
+
{ invalid: true, appearance: 'outline', class: { controlWrapper: 'border-error-border' } },
|
|
228
|
+
{ invalid: true, appearance: 'filled', class: { controlWrapper: 'border-b-2 border-error-border' } },
|
|
229
229
|
{ invalid: true, labelFloated: true, class: { label: 'text-error-600' } },
|
|
230
230
|
],
|
|
231
231
|
defaultVariants: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdevhub-ngx-tw-form-field.mjs","sources":["../../../projects/ngx-tw/form-field/form-field.ts","../../../projects/ngx-tw/form-field/form-field.html","../../../projects/ngx-tw/form-field/cdevhub-ngx-tw-form-field.ts"],"sourcesContent":["import {\n type AfterContentInit,\n afterRenderEffect,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n Directive,\n effect,\n ElementRef,\n forwardRef,\n inject,\n InjectionToken,\n input,\n isDevMode,\n signal,\n type Signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { tv } from 'tailwind-variants';\nimport type { TwColor, TwSize } from '@cdevhub/ngx-tw/core';\n\n/** Visual appearance of the form-field container. */\nexport type FormFieldAppearance = 'outline' | 'filled';\n\n/** Floating label behavior. `'never'` disables floating entirely; the label wrapper is not rendered and the wrapped control's placeholder is always visible. */\nexport type FloatLabel = 'auto' | 'always' | 'never';\n\n/** Subscript (hint/error row) sizing strategy. `'fixed'` always reserves vertical space; `'dynamic'` collapses the row when no hint/error is projected. */\nexport type SubscriptSizing = 'fixed' | 'dynamic';\n\n/**\n * Contract every ngx-tw form-field-compatible control must implement. A\n * concrete control provides itself under {@link TW_FORM_FIELD_CONTROL} so the\n * surrounding `FormFieldComponent` can mirror its state and wire ARIA.\n */\nexport abstract class FormFieldControl<T = unknown> {\n /** Unique id on the control's host element. Used by the form-field label `for` attribute and `aria-describedby` wiring. */\n abstract readonly id: Signal<string>;\n /** Current value of the control. */\n abstract readonly value: Signal<T | null>;\n /** Whether the control currently has focus. Typically driven by CDK `FocusMonitor`. */\n abstract readonly focused: Signal<boolean>;\n /** Whether the control's value is considered empty. Drives the floating-label state. */\n abstract readonly empty: Signal<boolean>;\n /** Whether the control is disabled. */\n abstract readonly disabled: Signal<boolean>;\n /** Whether the control is marked required. */\n abstract readonly required: Signal<boolean>;\n /** Whether the control should be rendered as invalid. Usually derived from `NgControl.invalid` combined with `touched`/`submitted`. */\n abstract readonly errorState: Signal<boolean>;\n /**\n * Active validation errors map keyed by validator name (e.g. `{ required: true, email: true }`).\n * Returns `null` when the control has no validation errors.\n *\n * This is the *only* source the form-field consults for `[twError match=\"…\"]` filtering: it\n * feeds `FormFieldComponent.activeErrorKeys`, and an error with a `match` renders only while\n * that key is present. A control that leaves this undefined therefore reports an empty key set,\n * and **every `match`-targeted message under it is permanently hidden** — in all three form\n * strategies, with no warning. Unmatched `[twError]` messages are unaffected; they follow\n * `errorState` alone.\n *\n * Optional only so the member can be added to existing controls without a breaking change. Any\n * control that resolves an `NgControl` should implement it — typically as\n * `computed(() => ngControl?.control?.errors ?? null)`, reading whatever revision signal the\n * control already uses to invalidate `errorState`, so the map tracks validator transitions that\n * do not flip `VALID`/`INVALID`. Omit it only for a control that genuinely has no validation\n * errors to report.\n */\n readonly errors?: Signal<Record<string, unknown> | null>;\n /** Optional control-type identifier (e.g. `'input'`, `'select'`). When set, the form-field appends `tw-form-field-type-{controlType}` to its host for styling hooks. */\n abstract readonly controlType?: string;\n /** Optional consumer-supplied `aria-describedby` ids the form-field preserves when merging in hint/error ids. */\n abstract readonly userAriaDescribedBy?: Signal<string | undefined>;\n /** Optional consumer-supplied `aria-labelledby` ids the form-field preserves when merging in the projected label id. Controls that consume label pushdown (non-native triggers) override this. */\n readonly userAriaLabelledby?: Signal<string | undefined>;\n\n /** Called by the form-field to push the merged `aria-describedby` ids back onto the control's host element. */\n abstract setDescribedByIds(ids: string[]): void;\n /** Called when the form-field container is clicked. Concrete controls typically focus their underlying native element or open a panel. */\n abstract onContainerClick(event: MouseEvent): void;\n /**\n * Called by the form-field to push the merged `aria-labelledby` ids onto the control's host element.\n * Default is a no-op — native `<input>` controls rely on the label's `for=` attribute for the canonical association.\n * Non-native controls (combobox triggers, date-pickers, etc.) override this to set the attribute explicitly.\n */\n setLabelledByIds(_ids: string[]): void {\n // Default no-op. Controls override when label pushdown is required for accessibility.\n }\n}\n\n/**\n * Injection token matching {@link FormFieldControl}. Controls register via\n * `providers: [{ provide: TW_FORM_FIELD_CONTROL, useExisting: MyControl }]`.\n */\nexport const TW_FORM_FIELD_CONTROL = new InjectionToken<FormFieldControl<unknown>>(\n 'TW_FORM_FIELD_CONTROL',\n);\n\n/**\n * Minimal surface a wrapped control reads from its surrounding form-field —\n * presence (via optional injection) plus whether a label is projected — without\n * depending on the concrete {@link FormFieldComponent}. Controls inject\n * {@link TW_FORM_FIELD} typed as this interface so detecting a parent form-field\n * never pins the heavier component class into the control's own bundle.\n */\nexport interface TwFormFieldParent {\n /** Whether a `twLabel` element is projected into the form-field. */\n readonly hasLabel: Signal<boolean>;\n}\n\n/**\n * Injection token exposing the wrapping {@link TwFormFieldParent}. The\n * {@link FormFieldComponent} provides itself under this token; controls inject\n * it with `{ optional: true }` to detect (and read label state from) a parent\n * `tw-form-field` without referencing the concrete component class — keeping the\n * form-field component out of each control's bundle.\n */\nexport const TW_FORM_FIELD = new InjectionToken<TwFormFieldParent>('TW_FORM_FIELD');\n\n// Resting-label left offset used when the field has no prefix: matches the control row's own\n// horizontal padding so the label lines up with the control's text.\nconst DEFAULT_RESTING_LABEL_OFFSET_PX = 12;\n\n// ── Unique ID counters ──\nlet nextLabelId = 0;\nlet nextHintId = 0;\nlet nextErrorId = 0;\n\n// ── tv() config ──\n\nconst formFieldVariants = tv({\n slots: {\n root: 'block text-fg',\n controlWrapper:\n 'relative flex items-stretch gap-2 rounded-md bg-transparent transition-colors duration-normal motion-reduce:transition-none',\n infix: 'relative flex-1 flex items-center min-w-0 [&_input::placeholder]:transition-opacity [&_input::placeholder]:duration-normal [&_textarea::placeholder]:transition-opacity [&_textarea::placeholder]:duration-normal',\n labelWrapper:\n 'absolute pointer-events-none flex items-center max-w-[calc(100%-1.5rem)] transition-[top,left,color,transform] duration-normal motion-reduce:transition-none origin-[top_left]',\n label:\n 'text-fg-muted truncate transition-[font-size,color] duration-normal motion-reduce:transition-none',\n requiredMarker: 'text-error-600 ml-0.5',\n prefix: 'flex items-center shrink-0 text-fg-muted',\n suffix: 'flex items-center shrink-0 text-fg-muted',\n subscriptWrapper: 'mt-1 text-xs flex gap-2',\n hint: 'text-fg-muted',\n error: 'text-error-600 font-medium',\n },\n variants: {\n appearance: {\n outline: {\n controlWrapper: 'border border-border hover:border-border-strong',\n },\n filled: {\n controlWrapper:\n 'bg-surface-muted border-b border-border hover:bg-surface-sunken',\n infix: 'items-end',\n },\n },\n // Density of the control row. Two things ride this axis:\n //\n // 1. The font scale, on `controlWrapper` rather than `infix`. A nested\n // control strips its own `text-*` (see `inputVariants`' `inFormField`\n // branch), so without this the row inherited the ambient 16px/24px line\n // box at every size and the size axis did nothing vertically. It sits on\n // `controlWrapper` so the prefix and suffix adornments scale with the\n // control instead of driving the row taller than the control it wraps;\n // the `label` slot sets its own `text-*` per (size, labelFloated) and so\n // is unaffected.\n // 2. The `min-h-*` floor from the control-height scale\n // (`docs/vertical-rhythm.md`). A floor rather than a pinned height\n // because a form-field wraps arbitrary consumer controls — a textarea,\n // a wrapping tag list — and must be free to grow. The vertical padding\n // is deliberately retained for the same reason: it is the only vertical\n // breathing room a nested `p-0` control has.\n size: {\n xs: { controlWrapper: 'min-h-6 text-xs' },\n sm: { controlWrapper: 'min-h-8 text-sm' },\n md: { controlWrapper: 'min-h-9 text-sm' },\n lg: { controlWrapper: 'min-h-11 text-base' },\n xl: { controlWrapper: 'min-h-12 text-base' },\n },\n color: {\n primary: {},\n secondary: {},\n accent: {},\n neutral: {},\n info: {},\n success: {},\n warning: {},\n error: {},\n },\n focused: {\n true: {},\n false: {},\n },\n invalid: {\n true: {},\n false: {},\n },\n labelFloated: {\n true: {\n labelWrapper: 'top-1 left-2',\n },\n false: {\n labelWrapper: 'top-1/2 -translate-y-1/2 left-3',\n },\n },\n subscriptReserve: {\n true: { subscriptWrapper: 'min-h-5' },\n false: {},\n },\n // The disabled treatment splits across two slots on purpose.\n //\n // `opacity-50` moved OFF `root`. `root` wraps both the control row and the\n // subscript (hint/error) row, so dimming it composited every hint down to\n // 50% alpha over the page surface. At that alpha no foreground token can\n // reach AA: pure black at 50% over white is #808080 = 3.95:1, and\n // `text-fg-muted` (gray-600, 7.56:1 at rest) measured 2.34:1 light /\n // 3.92:1 dark. That is a real SC 1.4.3 failure — a hint is a description OF\n // the control, not part OF the inactive control, so it does not inherit\n // 1.4.3's inactive-component exemption — and it is the text most worth\n // reading on a disabled field (\"Disabled — slugs can no longer be edited\").\n // The label wrapper is nested inside `controlWrapper` (see\n // `form-field.html`), so the label keeps exactly the dimming it had, and\n // axe already exempts it anyway via its `<label for>` → disabled control.\n //\n // `pointer-events-none` deliberately STAYS on `root`. Moving it would make\n // the subscript row live again, and the host's `(click)` forwards to\n // `control.onContainerClick()` — which not every wrapped control guards on\n // its disabled state. Keeping it on the host preserves the interaction\n // semantics exactly; only the composited alpha changes.\n disabled: {\n true: { root: 'pointer-events-none', controlWrapper: 'opacity-50' },\n false: {},\n },\n },\n compoundVariants: [\n // ── Padding × (appearance, size) ──\n // Vertical padding sits one half-step below the inline-padding scale so the\n // `min-h-*` floor on the control row actually BINDS at rest. With the\n // nominal padding the natural height (padding + line box + 2px border)\n // lands 2px above the floor at every size, leaving the floor inert and a\n // wrapped control 2px taller than the same control standalone. The padding\n // still governs the multi-line case (textarea), where the row grows past\n // the floor. `filled` is deliberately NOT shifted — its asymmetric\n // `pt-*`/`pb-*` reserves room for the floating label and is taller by design.\n { appearance: 'outline', size: 'xs', class: { controlWrapper: 'px-2 py-0.5' } },\n { appearance: 'outline', size: 'sm', class: { controlWrapper: 'px-3 py-1' } },\n { appearance: 'outline', size: 'md', class: { controlWrapper: 'px-3 py-1.5' } },\n { appearance: 'outline', size: 'lg', class: { controlWrapper: 'px-4 py-2' } },\n { appearance: 'outline', size: 'xl', class: { controlWrapper: 'px-5 py-2.5' } },\n { appearance: 'filled', size: 'xs', class: { controlWrapper: 'px-2 pt-5 pb-1' } },\n { appearance: 'filled', size: 'sm', class: { controlWrapper: 'px-3 pt-5 pb-1.5' } },\n { appearance: 'filled', size: 'md', class: { controlWrapper: 'px-3 pt-6 pb-2' } },\n { appearance: 'filled', size: 'lg', class: { controlWrapper: 'px-4 pt-7 pb-2.5' } },\n { appearance: 'filled', size: 'xl', class: { controlWrapper: 'px-5 pt-8 pb-3' } },\n\n // ── Label font-size × (size, labelFloated) ──\n { size: 'xs', labelFloated: false, class: { label: 'text-xs' } },\n { size: 'xs', labelFloated: true, class: { label: 'text-2xs' } },\n { size: 'sm', labelFloated: false, class: { label: 'text-sm' } },\n { size: 'sm', labelFloated: true, class: { label: 'text-xs' } },\n { size: 'md', labelFloated: false, class: { label: 'text-sm' } },\n { size: 'md', labelFloated: true, class: { label: 'text-xs' } },\n { size: 'lg', labelFloated: false, class: { label: 'text-base' } },\n { size: 'lg', labelFloated: true, class: { label: 'text-sm' } },\n { size: 'xl', labelFloated: false, class: { label: 'text-base' } },\n { size: 'xl', labelFloated: true, class: { label: 'text-sm' } },\n\n // ── Outline + focused → colored border ──\n { appearance: 'outline', focused: true, color: 'primary', class: { controlWrapper: 'border-primary-500' } },\n { appearance: 'outline', focused: true, color: 'secondary', class: { controlWrapper: 'border-secondary-500' } },\n { appearance: 'outline', focused: true, color: 'accent', class: { controlWrapper: 'border-accent-500' } },\n { appearance: 'outline', focused: true, color: 'neutral', class: { controlWrapper: 'border-border-strong' } },\n { appearance: 'outline', focused: true, color: 'info', class: { controlWrapper: 'border-info-500' } },\n { appearance: 'outline', focused: true, color: 'success', class: { controlWrapper: 'border-success-500' } },\n { appearance: 'outline', focused: true, color: 'warning', class: { controlWrapper: 'border-warning-500' } },\n { appearance: 'outline', focused: true, color: 'error', class: { controlWrapper: 'border-error-500' } },\n\n // ── Filled + focused → colored bottom border ──\n { appearance: 'filled', focused: true, color: 'primary', class: { controlWrapper: 'border-b-2 border-primary-500' } },\n { appearance: 'filled', focused: true, color: 'secondary', class: { controlWrapper: 'border-b-2 border-secondary-500' } },\n { appearance: 'filled', focused: true, color: 'accent', class: { controlWrapper: 'border-b-2 border-accent-500' } },\n { appearance: 'filled', focused: true, color: 'neutral', class: { controlWrapper: 'border-b-2 border-border-strong' } },\n { appearance: 'filled', focused: true, color: 'info', class: { controlWrapper: 'border-b-2 border-info-500' } },\n { appearance: 'filled', focused: true, color: 'success', class: { controlWrapper: 'border-b-2 border-success-500' } },\n { appearance: 'filled', focused: true, color: 'warning', class: { controlWrapper: 'border-b-2 border-warning-500' } },\n { appearance: 'filled', focused: true, color: 'error', class: { controlWrapper: 'border-b-2 border-error-500' } },\n\n // ── Floated label + focused → colored label ──\n { labelFloated: true, focused: true, color: 'primary', class: { label: 'text-primary-600' } },\n { labelFloated: true, focused: true, color: 'secondary', class: { label: 'text-secondary-600' } },\n { labelFloated: true, focused: true, color: 'accent', class: { label: 'text-accent-600' } },\n { labelFloated: true, focused: true, color: 'neutral', class: { label: 'text-fg' } },\n { labelFloated: true, focused: true, color: 'info', class: { label: 'text-info-600' } },\n { labelFloated: true, focused: true, color: 'success', class: { label: 'text-success-600' } },\n { labelFloated: true, focused: true, color: 'warning', class: { label: 'text-warning-600' } },\n { labelFloated: true, focused: true, color: 'error', class: { label: 'text-error-600' } },\n\n // ── Outline + floated label → sit centered on the top border with a surface notch ──\n { appearance: 'outline', labelFloated: true, class: { labelWrapper: 'bg-surface px-1 top-0 -translate-y-1/2' } },\n\n // ── Filled + resting label → align vertically with the input baseline (input is items-end inside an asymmetric pt/pb container) ──\n { appearance: 'filled', labelFloated: false, class: { labelWrapper: 'top-[calc(50%+0.5rem)]' } },\n\n // ── Invalid overrides (declared last so twMerge lets them win) ──\n { invalid: true, appearance: 'outline', class: { controlWrapper: 'border-error-500' } },\n { invalid: true, appearance: 'filled', class: { controlWrapper: 'border-b-2 border-error-500' } },\n { invalid: true, labelFloated: true, class: { label: 'text-error-600' } },\n ],\n defaultVariants: {\n appearance: 'outline',\n size: 'md',\n color: 'primary',\n focused: false,\n invalid: false,\n labelFloated: false,\n subscriptReserve: true,\n disabled: false,\n },\n}, {\n twMerge: true,\n});\n\n// ── LabelDirective ──\n\n@Directive({\n selector: '[twLabel]',\n host: {\n '[attr.id]': 'id',\n '[attr.for]': 'controlId()',\n '[class]': 'classes()',\n },\n})\nexport class LabelDirective {\n private readonly formField = inject(FormFieldComponent);\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n\n /** @internal */\n readonly id = `tw-form-field-label-${nextLabelId++}`;\n\n /** @internal */\n readonly controlId = computed(() => this.formField.control()?.id() ?? null);\n\n /** @internal */\n readonly classes = computed(() => this.formField.labelClasses());\n\n constructor() {\n if (isDevMode()) {\n const tag = this.elementRef.nativeElement.tagName;\n if (tag !== 'LABEL') {\n console.warn(\n `[tw-form-field] twLabel should be applied to a <label> element for the native \\`for\\`/\\`id\\` association to work; got <${tag.toLowerCase()}>. Non-native controls (e.g. tw-select) still receive label pushdown via aria-labelledby.`,\n );\n }\n }\n }\n}\n\n// ── HintDirective ──\n\n@Directive({\n selector: '[twHint]',\n host: {\n '[attr.id]': 'id',\n '[class]': 'classes()',\n },\n})\nexport class HintDirective {\n private readonly formField = inject(FormFieldComponent);\n\n /** @internal */\n readonly id = `tw-form-field-hint-${nextHintId++}`;\n\n /** Alignment within the subscript row. `'end'` pushes the hint to the right. When unset, the form-field's `hintAlign` input supplies the default. */\n readonly align = input<'start' | 'end' | undefined>(undefined);\n\n /** @internal */\n readonly effectiveAlign = computed(\n () => this.align() ?? this.formField.hintAlign(),\n );\n\n /** @internal */\n readonly classes = computed(() => {\n const base = this.formField.hintClasses();\n return this.effectiveAlign() === 'end' ? `${base} ml-auto` : base;\n });\n}\n\n// ── ErrorDirective ──\n\n@Directive({\n selector: '[twError]',\n host: {\n 'role': 'alert',\n 'aria-live': 'polite',\n '[attr.id]': 'id',\n '[class]': 'classes()',\n '[class.hidden]': '!shouldShow()',\n },\n})\nexport class ErrorDirective {\n private readonly formField = inject(FormFieldComponent);\n\n /** @internal */\n readonly id = `tw-form-field-error-${nextErrorId++}`;\n\n /** Validation error key this message is bound to (e.g. `'required'`, `'email'`, `'minlength'`). When set, the error renders only while the surrounding control reports that key in its active validation errors. When omitted, the error displays whenever the form-field is in an error state — useful as a generic fallback. */\n readonly match = input<string | undefined>(undefined);\n\n /** @internal Whether this error should display given the control's active error keys. */\n readonly shouldShow = computed(() => {\n const key = this.match();\n if (!key) return true;\n return this.formField.activeErrorKeys().has(key);\n });\n\n /** @internal */\n readonly classes = computed(() => this.formField.errorClasses());\n}\n\n// ── PrefixDirective ──\n\n@Directive({\n selector: '[twPrefix]',\n host: {\n '[class]': 'prefixClasses()',\n },\n})\nexport class PrefixDirective {\n protected readonly formField = inject(FormFieldComponent);\n\n /** @internal Used by the form-field to measure the prefix area and align the resting label after it. */\n readonly elementRef = inject(ElementRef<HTMLElement>);\n\n /** @internal */\n readonly prefixClasses = computed(() => this.formField.prefixClasses());\n}\n\n// ── SuffixDirective ──\n\n@Directive({\n selector: '[twSuffix]',\n host: {\n '[class]': 'suffixClasses()',\n },\n})\nexport class SuffixDirective {\n protected readonly formField = inject(FormFieldComponent);\n\n /** @internal */\n readonly suffixClasses = computed(() => this.formField.suffixClasses());\n}\n\n// ── PrefixIconDirective / SuffixIconDirective ──\n// Opt-in directives that apply a glyph-sized adornment (`size-5 text-fg-muted shrink-0`) so consumers\n// don't pick `size-4` vs `size-5` ad-hoc. Use these for SVG icons; use [twPrefix]/[twSuffix]\n// when the adornment is text (currency, units, kbd hints).\n// They extend Prefix/SuffixDirective so the form-field's content query picks them up as a prefix/suffix\n// when computing the resting-label offset.\n\n@Directive({\n selector: '[twPrefixIcon]',\n host: {\n '[class]': 'prefixClasses()',\n },\n providers: [{ provide: PrefixDirective, useExisting: PrefixIconDirective }],\n})\nexport class PrefixIconDirective extends PrefixDirective {\n /** @internal */\n override readonly prefixClasses = computed(\n () => `${this.formField.prefixClasses()} size-5`,\n );\n}\n\n@Directive({\n selector: '[twSuffixIcon]',\n host: {\n '[class]': 'suffixClasses()',\n },\n providers: [{ provide: SuffixDirective, useExisting: SuffixIconDirective }],\n})\nexport class SuffixIconDirective extends SuffixDirective {\n /** @internal */\n override readonly suffixClasses = computed(\n () => `${this.formField.suffixClasses()} size-5`,\n );\n}\n\n// ── FormFieldComponent ──\n\n@Component({\n selector: 'tw-form-field',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './form-field.html',\n host: {\n '[class]': 'rootClasses()',\n '(click)': '_onContainerClick($event)',\n },\n providers: [\n { provide: TW_FORM_FIELD, useExisting: forwardRef(() => FormFieldComponent) },\n ],\n})\nexport class FormFieldComponent implements AfterContentInit, TwFormFieldParent {\n /** Visual appearance of the field container. `'outline'` draws a full border around the control; `'filled'` uses a filled surface with a bottom border. Defaults to `'outline'`. */\n readonly appearance = input<FormFieldAppearance>('outline');\n\n /** Density of the field container. Maps to the inline-padding scale (`px-2 py-1` xs … `px-5 py-3` xl), the control-row font scale (`text-xs` xs, `text-sm` sm/md, `text-base` lg/xl — inherited by the nested control and by prefix/suffix adornments), the label font scale, and a `min-h-*` floor on the control row from the control-height scale (24/32/36/44/48px). The floor is a minimum, not a fixed height: the row grows for a textarea or any other multi-line control. Defaults to `'md'`. */\n readonly size = input<TwSize>('md');\n\n /** Floating label behavior. `'auto'` floats when focused or non-empty; `'always'` stays floated; `'never'` disables floating entirely (the label wrapper is not rendered and the wrapped control's placeholder is always visible). Defaults to `'auto'`. */\n readonly floatLabel = input<FloatLabel>('auto');\n\n /** Subscript sizing strategy. `'fixed'` always reserves a 20px row for hints/errors so adjacent fields align; `'dynamic'` collapses the row when no hint/error is projected. Defaults to `'fixed'`. */\n readonly subscriptSizing = input<SubscriptSizing>('fixed');\n\n /** Hides the visual required marker (`*`) even when the wrapped control is required. `aria-required` on the control is unaffected. Defaults to `false`. */\n readonly hideRequiredMarker = input(false);\n\n /** Semantic color for focused/active accents (focused border, floated label). Defaults to `'primary'`. */\n readonly color = input<TwColor>('primary');\n\n /** Default alignment for a `twHint` element that does not specify its own `align`. Defaults to `'start'`. */\n readonly hintAlign = input<'start' | 'end'>('start');\n\n /** @internal */\n readonly control = contentChild(TW_FORM_FIELD_CONTROL, { descendants: true });\n /** @internal */\n readonly labelChild = contentChild(LabelDirective, { descendants: true });\n /** @internal */\n readonly hintChildren = contentChildren(HintDirective, { descendants: true });\n /** @internal */\n readonly errorChildren = contentChildren(ErrorDirective, { descendants: true });\n /** @internal */\n readonly prefixChildren = contentChildren(PrefixDirective, { descendants: true });\n /** @internal */\n readonly infixRef = viewChild<ElementRef<HTMLElement>>('infix');\n\n /** @internal */\n readonly hasLabel = computed(() => !!this.labelChild());\n /** @internal */\n readonly hasPrefix = computed(() => this.prefixChildren().length > 0);\n\n /** @internal Resting-label left offset in pixels, mirroring the infix's `offsetLeft` so the label sits right after any prefix. */\n private readonly restingLabelOffset = signal(DEFAULT_RESTING_LABEL_OFFSET_PX);\n\n /** @internal */\n readonly isFocused = computed(() => !!this.control()?.focused());\n /** @internal */\n readonly isInvalid = computed(() => !!this.control()?.errorState());\n /** @internal */\n readonly isDisabled = computed(() => !!this.control()?.disabled());\n /** @internal */\n readonly isRequired = computed(() => !!this.control()?.required());\n\n /** @internal Whether the floating label wrapper should render at all. `'never'` opts out entirely. */\n readonly shouldRenderLabelWrapper = computed(\n () => this.hasLabel() && this.floatLabel() !== 'never',\n );\n\n /** @internal */\n readonly shouldLabelFloat = computed(() => {\n const mode = this.floatLabel();\n if (mode === 'never') return false;\n if (mode === 'always') return true;\n const ctrl = this.control();\n if (!ctrl) return false;\n return ctrl.focused() || !ctrl.empty();\n });\n\n /** @internal Inline `left` value for the label wrapper. Floated labels pin to the container edge; resting labels align with the infix's left (after any prefix). */\n readonly labelLeft = computed(() =>\n this.shouldLabelFloat() ? '0.5rem' : `${this.restingLabelOffset()}px`,\n );\n\n /** @internal */\n readonly subscriptMode = computed<'error' | 'hint'>(() =>\n this.isInvalid() && this.errorChildren().length > 0 ? 'error' : 'hint',\n );\n\n /** @internal Set of validation error keys currently active on the bound control (e.g. `Set('required', 'email')`). Empty when the control has no `errors` signal or no active errors. Read by `[twError match=\"…\"]` to decide whether to display. */\n readonly activeErrorKeys = computed<ReadonlySet<string>>(() => {\n const errs = this.control()?.errors?.();\n return new Set(errs ? Object.keys(errs) : []);\n });\n\n /** @internal Whether the subscript row has anything to render right now. */\n readonly hasSubscriptContent = computed(() => {\n if (this.subscriptMode() === 'error') return this.errorChildren().length > 0;\n return this.hintChildren().length > 0;\n });\n\n /** @internal Whether the subscript wrapper renders. In `'fixed'` mode it always renders to reserve vertical space; in `'dynamic'` mode it collapses when empty. */\n readonly shouldRenderSubscript = computed(() => {\n if (this.subscriptSizing() === 'fixed') return true;\n return this.hasSubscriptContent();\n });\n\n private readonly controlTypeClass = computed(() => {\n const type = this.control()?.controlType;\n return type ? `tw-form-field-type-${type}` : '';\n });\n\n private readonly variantResult = computed(() =>\n formFieldVariants({\n appearance: this.appearance(),\n size: this.size(),\n color: this.color(),\n focused: this.isFocused(),\n invalid: this.isInvalid(),\n labelFloated: this.shouldLabelFloat(),\n subscriptReserve: this.subscriptSizing() === 'fixed',\n disabled: this.isDisabled(),\n }),\n );\n\n /** @internal */\n readonly rootClasses = computed(() => {\n const base = this.variantResult().root();\n const type = this.controlTypeClass();\n return type ? `${base} ${type}` : base;\n });\n /** @internal */\n readonly controlWrapperClasses = computed(() => this.variantResult().controlWrapper());\n /** @internal */\n readonly infixClasses = computed(() => {\n const base = this.variantResult().infix();\n // Hide the placeholder while the resting label is occupying the same space.\n // `floatLabel='never'` keeps the placeholder visible regardless of label projection.\n const hidePlaceholder =\n this.shouldRenderLabelWrapper() && !this.shouldLabelFloat();\n return hidePlaceholder\n ? `${base} [&_input::placeholder]:opacity-0 [&_textarea::placeholder]:opacity-0`\n : base;\n });\n /** @internal */\n readonly labelWrapperClasses = computed(() => this.variantResult().labelWrapper());\n /** @internal */\n readonly labelClasses = computed(() => this.variantResult().label());\n /** @internal */\n readonly requiredMarkerClasses = computed(() => this.variantResult().requiredMarker());\n /** @internal */\n readonly prefixClasses = computed(() => this.variantResult().prefix());\n /** @internal */\n readonly suffixClasses = computed(() => this.variantResult().suffix());\n /** @internal */\n readonly subscriptWrapperClasses = computed(() => this.variantResult().subscriptWrapper());\n /** @internal */\n readonly hintClasses = computed(() => this.variantResult().hint());\n /** @internal */\n readonly errorClasses = computed(() => this.variantResult().error());\n\n constructor() {\n // Push merged aria-describedby ids to the control whenever hint/error lists, the subscript mode, or per-error `match` visibility change.\n effect(() => {\n const ctrl = this.control();\n if (!ctrl) return;\n const ids: string[] = [];\n if (this.subscriptMode() === 'error') {\n for (const e of this.errorChildren()) {\n // Filter by `shouldShow()` so `[twError match=\"…\"]` entries that\n // don't match the active validation keys are not announced.\n if (e.shouldShow()) ids.push(e.id);\n }\n } else {\n for (const h of this.hintChildren()) ids.push(h.id);\n }\n const userIds = ctrl.userAriaDescribedBy?.();\n if (userIds) {\n for (const id of userIds.split(/\\s+/)) {\n if (id) ids.push(id);\n }\n }\n untracked(() => ctrl.setDescribedByIds(ids));\n });\n\n // Push merged aria-labelledby ids (projected label id + user-supplied) to the control.\n // Native inputs ignore this in practice (the `for=`/`id` association wins) but non-native\n // triggers (combobox, date-picker) need the explicit attribute for screen readers.\n effect(() => {\n const ctrl = this.control();\n if (!ctrl) return;\n const ids: string[] = [];\n const labelId = this.labelChild()?.id;\n if (labelId && this.shouldRenderLabelWrapper()) ids.push(labelId);\n const userIds = ctrl.userAriaLabelledby?.();\n if (userIds) {\n for (const id of userIds.split(/\\s+/)) {\n if (id) ids.push(id);\n }\n }\n untracked(() => ctrl.setLabelledByIds(ids));\n });\n\n // Dev-mode validation: at most one hint per alignment.\n // Reports via `console.error` instead of `throw` so an authoring mistake\n // surfaces during development without crashing the surrounding effect graph\n // (which would otherwise leave Angular in an unrecoverable error state).\n effect(() => {\n if (!isDevMode()) return;\n const hints = this.hintChildren();\n const startCount = hints.filter((h) => h.effectiveAlign() === 'start').length;\n const endCount = hints.filter((h) => h.effectiveAlign() === 'end').length;\n if (startCount > 1 || endCount > 1) {\n console.error(\n 'tw-form-field: only one twHint per alignment (\"start\" / \"end\") is allowed.',\n );\n }\n });\n\n // Track the infix's left offset so the resting label can sit right after any prefix.\n //\n // The measurement lives in `afterRenderEffect`'s `earlyRead` phase, NOT in a plain\n // `effect()`. `effect()` runs inside `refreshView` *after* this component's own template but\n // *before* its embedded views, content queries, host bindings and child components are\n // refreshed, so `offsetLeft` read there samples geometry that predates the very change that\n // triggered the run — a prefix appearing inside an `@if`, for instance. `earlyRead` runs\n // after the whole render has committed, which is what it exists for.\n //\n // `afterRenderEffect` is a *reactive* effect scheduled into a render phase, not an\n // every-render hook: it re-runs only when a tracked producer changes. The tracked producers\n // here are `prefixChildren()` and `infixRef()` — exactly the set the previous `effect()`\n // tracked, so this is a timing fix, not a coverage fix. A prefix that changes width without\n // changing the prefix set is invisible to the signal graph either way, which is why the\n // ResizeObserver below stays.\n afterRenderEffect({\n earlyRead: () => {\n if (this.prefixChildren().length === 0) return DEFAULT_RESTING_LABEL_OFFSET_PX;\n const infix = this.infixRef()?.nativeElement;\n // `null` means \"nothing measurable this run\" — leave the previous offset in place.\n return infix ? infix.offsetLeft : null;\n },\n write: (offset) => {\n const px = offset();\n if (px !== null) this.restingLabelOffset.set(px);\n },\n });\n\n // Keep the offset fresh when an already-mounted prefix changes size. Creating the observer\n // is a subscription, not a layout read, so a plain `effect()` is the right hook; the\n // callback itself is delivered after layout, so its `offsetLeft` read is safe. Note this\n // repairs *size* changes only — an infix that shifts position with no observed box resizing\n // is not covered here and not covered by the render effect above either.\n effect((onCleanup) => {\n const prefixes = this.prefixChildren();\n if (prefixes.length === 0) return;\n const infix = this.infixRef()?.nativeElement;\n if (!infix) return;\n if (typeof ResizeObserver === 'undefined') return;\n const ro = new ResizeObserver(() =>\n this.restingLabelOffset.set(infix.offsetLeft),\n );\n for (const p of prefixes) {\n ro.observe(p.elementRef.nativeElement);\n }\n ro.observe(infix);\n onCleanup(() => ro.disconnect());\n });\n }\n\n ngAfterContentInit(): void {\n if (isDevMode() && !this.control()) {\n throw new Error(\n 'tw-form-field requires a child control providing TW_FORM_FIELD_CONTROL. ' +\n 'Place a control (e.g. <input twInput />) inside the <tw-form-field>.',\n );\n }\n }\n\n /** @internal */\n _onContainerClick(event: MouseEvent): void {\n this.control()?.onContainerClick(event);\n }\n}\n","<div [class]=\"controlWrapperClasses()\">\n <ng-content select=\"[twPrefix]\" />\n <ng-content select=\"[twPrefixIcon]\" />\n <div #infix [class]=\"infixClasses()\">\n <ng-content />\n </div>\n <ng-content select=\"[twSuffix]\" />\n <ng-content select=\"[twSuffixIcon]\" />\n @if (shouldRenderLabelWrapper()) {\n <div [class]=\"labelWrapperClasses()\" [style.left]=\"labelLeft()\">\n <ng-content select=\"[twLabel]\" />\n @if (!hideRequiredMarker() && isRequired()) {\n <span [class]=\"requiredMarkerClasses()\" aria-hidden=\"true\">*</span>\n }\n </div>\n }\n</div>\n\n@if (shouldRenderSubscript()) {\n <div [class]=\"subscriptWrapperClasses()\">\n @if (subscriptMode() === 'error') {\n <ng-content select=\"[twError]\" />\n } @else {\n <ng-content select=\"[twHint]\" />\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAiCA;;;;AAIG;MACmB,gBAAgB,CAAA;AAepC;;;;;;;;;;;;;;;;;AAiBG;AACM,IAAA,MAAM;;AAMN,IAAA,kBAAkB;AAM3B;;;;AAIG;AACH,IAAA,gBAAgB,CAAC,IAAc,EAAA;;IAE/B;AACD;AAED;;;AAGG;MACU,qBAAqB,GAAG,IAAI,cAAc,CACrD,uBAAuB;AAezB;;;;;;AAMG;MACU,aAAa,GAAG,IAAI,cAAc,CAAoB,eAAe;AAElF;AACA;AACA,MAAM,+BAA+B,GAAG,EAAE;AAE1C;AACA,IAAI,WAAW,GAAG,CAAC;AACnB,IAAI,UAAU,GAAG,CAAC;AAClB,IAAI,WAAW,GAAG,CAAC;AAEnB;AAEA,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC3B,IAAA,KAAK,EAAE;AACL,QAAA,IAAI,EAAE,eAAe;AACrB,QAAA,cAAc,EACZ,6HAA6H;AAC/H,QAAA,KAAK,EAAE,mNAAmN;AAC1N,QAAA,YAAY,EACV,gLAAgL;AAClL,QAAA,KAAK,EACH,mGAAmG;AACrG,QAAA,cAAc,EAAE,uBAAuB;AACvC,QAAA,MAAM,EAAE,0CAA0C;AAClD,QAAA,MAAM,EAAE,0CAA0C;AAClD,QAAA,gBAAgB,EAAE,yBAAyB;AAC3C,QAAA,IAAI,EAAE,eAAe;AACrB,QAAA,KAAK,EA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,EAAE,WAAW,EAAE,IAAI,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAEnC,cAAc,QAAE,EAAE,WAAW,EAAE,IAAI,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAEpC,eAAe,QAAE,EAAE,WAAW,EAAE,IAAI,EAAE,gEAEzB,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE3hBhE;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cdevhub-ngx-tw-form-field.mjs","sources":["../../../projects/ngx-tw/form-field/form-field.ts","../../../projects/ngx-tw/form-field/form-field.html","../../../projects/ngx-tw/form-field/cdevhub-ngx-tw-form-field.ts"],"sourcesContent":["import {\n type AfterContentInit,\n afterRenderEffect,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n Directive,\n effect,\n ElementRef,\n forwardRef,\n inject,\n InjectionToken,\n input,\n isDevMode,\n signal,\n type Signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { tv } from 'tailwind-variants';\nimport type { TwColor, TwSize } from '@cdevhub/ngx-tw/core';\n\n/** Visual appearance of the form-field container. */\nexport type FormFieldAppearance = 'outline' | 'filled';\n\n/** Floating label behavior. `'never'` disables floating entirely; the label wrapper is not rendered and the wrapped control's placeholder is always visible. */\nexport type FloatLabel = 'auto' | 'always' | 'never';\n\n/** Subscript (hint/error row) sizing strategy. `'fixed'` always reserves vertical space; `'dynamic'` collapses the row when no hint/error is projected. */\nexport type SubscriptSizing = 'fixed' | 'dynamic';\n\n/**\n * Contract every ngx-tw form-field-compatible control must implement. A\n * concrete control provides itself under {@link TW_FORM_FIELD_CONTROL} so the\n * surrounding `FormFieldComponent` can mirror its state and wire ARIA.\n */\nexport abstract class FormFieldControl<T = unknown> {\n /** Unique id on the control's host element. Used by the form-field label `for` attribute and `aria-describedby` wiring. */\n abstract readonly id: Signal<string>;\n /** Current value of the control. */\n abstract readonly value: Signal<T | null>;\n /** Whether the control currently has focus. Typically driven by CDK `FocusMonitor`. */\n abstract readonly focused: Signal<boolean>;\n /** Whether the control's value is considered empty. Drives the floating-label state. */\n abstract readonly empty: Signal<boolean>;\n /** Whether the control is disabled. */\n abstract readonly disabled: Signal<boolean>;\n /** Whether the control is marked required. */\n abstract readonly required: Signal<boolean>;\n /** Whether the control should be rendered as invalid. Usually derived from `NgControl.invalid` combined with `touched`/`submitted`. */\n abstract readonly errorState: Signal<boolean>;\n /**\n * Active validation errors map keyed by validator name (e.g. `{ required: true, email: true }`).\n * Returns `null` when the control has no validation errors.\n *\n * This is the *only* source the form-field consults for `[twError match=\"…\"]` filtering: it\n * feeds `FormFieldComponent.activeErrorKeys`, and an error with a `match` renders only while\n * that key is present. A control that leaves this undefined therefore reports an empty key set,\n * and **every `match`-targeted message under it is permanently hidden** — in all three form\n * strategies, with no warning. Unmatched `[twError]` messages are unaffected; they follow\n * `errorState` alone.\n *\n * Optional only so the member can be added to existing controls without a breaking change. Any\n * control that resolves an `NgControl` should implement it — typically as\n * `computed(() => ngControl?.control?.errors ?? null)`, reading whatever revision signal the\n * control already uses to invalidate `errorState`, so the map tracks validator transitions that\n * do not flip `VALID`/`INVALID`. Omit it only for a control that genuinely has no validation\n * errors to report.\n */\n readonly errors?: Signal<Record<string, unknown> | null>;\n /** Optional control-type identifier (e.g. `'input'`, `'select'`). When set, the form-field appends `tw-form-field-type-{controlType}` to its host for styling hooks. */\n abstract readonly controlType?: string;\n /** Optional consumer-supplied `aria-describedby` ids the form-field preserves when merging in hint/error ids. */\n abstract readonly userAriaDescribedBy?: Signal<string | undefined>;\n /** Optional consumer-supplied `aria-labelledby` ids the form-field preserves when merging in the projected label id. Controls that consume label pushdown (non-native triggers) override this. */\n readonly userAriaLabelledby?: Signal<string | undefined>;\n\n /** Called by the form-field to push the merged `aria-describedby` ids back onto the control's host element. */\n abstract setDescribedByIds(ids: string[]): void;\n /** Called when the form-field container is clicked. Concrete controls typically focus their underlying native element or open a panel. */\n abstract onContainerClick(event: MouseEvent): void;\n /**\n * Called by the form-field to push the merged `aria-labelledby` ids onto the control's host element.\n * Default is a no-op — native `<input>` controls rely on the label's `for=` attribute for the canonical association.\n * Non-native controls (combobox triggers, date-pickers, etc.) override this to set the attribute explicitly.\n */\n setLabelledByIds(_ids: string[]): void {\n // Default no-op. Controls override when label pushdown is required for accessibility.\n }\n}\n\n/**\n * Injection token matching {@link FormFieldControl}. Controls register via\n * `providers: [{ provide: TW_FORM_FIELD_CONTROL, useExisting: MyControl }]`.\n */\nexport const TW_FORM_FIELD_CONTROL = new InjectionToken<FormFieldControl<unknown>>(\n 'TW_FORM_FIELD_CONTROL',\n);\n\n/**\n * Minimal surface a wrapped control reads from its surrounding form-field —\n * presence (via optional injection) plus whether a label is projected — without\n * depending on the concrete {@link FormFieldComponent}. Controls inject\n * {@link TW_FORM_FIELD} typed as this interface so detecting a parent form-field\n * never pins the heavier component class into the control's own bundle.\n */\nexport interface TwFormFieldParent {\n /** Whether a `twLabel` element is projected into the form-field. */\n readonly hasLabel: Signal<boolean>;\n}\n\n/**\n * Injection token exposing the wrapping {@link TwFormFieldParent}. The\n * {@link FormFieldComponent} provides itself under this token; controls inject\n * it with `{ optional: true }` to detect (and read label state from) a parent\n * `tw-form-field` without referencing the concrete component class — keeping the\n * form-field component out of each control's bundle.\n */\nexport const TW_FORM_FIELD = new InjectionToken<TwFormFieldParent>('TW_FORM_FIELD');\n\n// Resting-label left offset used when the field has no prefix: matches the control row's own\n// horizontal padding so the label lines up with the control's text.\nconst DEFAULT_RESTING_LABEL_OFFSET_PX = 12;\n\n// ── Unique ID counters ──\nlet nextLabelId = 0;\nlet nextHintId = 0;\nlet nextErrorId = 0;\n\n// ── tv() config ──\n\nconst formFieldVariants = tv({\n slots: {\n root: 'block text-fg',\n controlWrapper:\n 'relative flex items-stretch gap-2 rounded-md bg-transparent transition-colors duration-normal motion-reduce:transition-none',\n infix: 'relative flex-1 flex items-center min-w-0 [&_input::placeholder]:transition-opacity [&_input::placeholder]:duration-normal [&_textarea::placeholder]:transition-opacity [&_textarea::placeholder]:duration-normal',\n labelWrapper:\n 'absolute pointer-events-none flex items-center max-w-[calc(100%-1.5rem)] transition-[top,left,color,transform] duration-normal motion-reduce:transition-none origin-[top_left]',\n label:\n 'text-fg-muted truncate transition-[font-size,color] duration-normal motion-reduce:transition-none',\n requiredMarker: 'text-error-600 ml-0.5',\n prefix: 'flex items-center shrink-0 text-fg-muted',\n suffix: 'flex items-center shrink-0 text-fg-muted',\n subscriptWrapper: 'mt-1 text-xs flex gap-2',\n hint: 'text-fg-muted',\n error: 'text-error-600 font-medium',\n },\n variants: {\n appearance: {\n outline: {\n controlWrapper: 'border border-border hover:border-border-strong',\n },\n filled: {\n controlWrapper:\n 'bg-surface-muted border-b border-border hover:bg-surface-sunken',\n infix: 'items-end',\n },\n },\n // Density of the control row. Two things ride this axis:\n //\n // 1. The font scale, on `controlWrapper` rather than `infix`. A nested\n // control strips its own `text-*` (see `inputVariants`' `inFormField`\n // branch), so without this the row inherited the ambient 16px/24px line\n // box at every size and the size axis did nothing vertically. It sits on\n // `controlWrapper` so the prefix and suffix adornments scale with the\n // control instead of driving the row taller than the control it wraps;\n // the `label` slot sets its own `text-*` per (size, labelFloated) and so\n // is unaffected.\n // 2. The `min-h-*` floor from the control-height scale\n // (`docs/vertical-rhythm.md`). A floor rather than a pinned height\n // because a form-field wraps arbitrary consumer controls — a textarea,\n // a wrapping tag list — and must be free to grow. The vertical padding\n // is deliberately retained for the same reason: it is the only vertical\n // breathing room a nested `p-0` control has.\n size: {\n xs: { controlWrapper: 'min-h-6 text-xs' },\n sm: { controlWrapper: 'min-h-8 text-sm' },\n md: { controlWrapper: 'min-h-9 text-sm' },\n lg: { controlWrapper: 'min-h-11 text-base' },\n xl: { controlWrapper: 'min-h-12 text-base' },\n },\n color: {\n primary: {},\n secondary: {},\n accent: {},\n neutral: {},\n info: {},\n success: {},\n warning: {},\n error: {},\n },\n focused: {\n true: {},\n false: {},\n },\n invalid: {\n true: {},\n false: {},\n },\n labelFloated: {\n true: {\n labelWrapper: 'top-1 left-2',\n },\n false: {\n labelWrapper: 'top-1/2 -translate-y-1/2 left-3',\n },\n },\n subscriptReserve: {\n true: { subscriptWrapper: 'min-h-5' },\n false: {},\n },\n // The disabled treatment splits across two slots on purpose.\n //\n // `opacity-50` moved OFF `root`. `root` wraps both the control row and the\n // subscript (hint/error) row, so dimming it composited every hint down to\n // 50% alpha over the page surface. At that alpha no foreground token can\n // reach AA: pure black at 50% over white is #808080 = 3.95:1, and\n // `text-fg-muted` (gray-600, 7.56:1 at rest) measured 2.34:1 light /\n // 3.92:1 dark. That is a real SC 1.4.3 failure — a hint is a description OF\n // the control, not part OF the inactive control, so it does not inherit\n // 1.4.3's inactive-component exemption — and it is the text most worth\n // reading on a disabled field (\"Disabled — slugs can no longer be edited\").\n // The label wrapper is nested inside `controlWrapper` (see\n // `form-field.html`), so the label keeps exactly the dimming it had, and\n // axe already exempts it anyway via its `<label for>` → disabled control.\n //\n // `pointer-events-none` deliberately STAYS on `root`. Moving it would make\n // the subscript row live again, and the host's `(click)` forwards to\n // `control.onContainerClick()` — which not every wrapped control guards on\n // its disabled state. Keeping it on the host preserves the interaction\n // semantics exactly; only the composited alpha changes.\n disabled: {\n true: { root: 'pointer-events-none', controlWrapper: 'opacity-50' },\n false: {},\n },\n },\n compoundVariants: [\n // ── Padding × (appearance, size) ──\n // Vertical padding sits one half-step below the inline-padding scale so the\n // `min-h-*` floor on the control row actually BINDS at rest. With the\n // nominal padding the natural height (padding + line box + 2px border)\n // lands 2px above the floor at every size, leaving the floor inert and a\n // wrapped control 2px taller than the same control standalone. The padding\n // still governs the multi-line case (textarea), where the row grows past\n // the floor. `filled` is deliberately NOT shifted — its asymmetric\n // `pt-*`/`pb-*` reserves room for the floating label and is taller by design.\n { appearance: 'outline', size: 'xs', class: { controlWrapper: 'px-2 py-0.5' } },\n { appearance: 'outline', size: 'sm', class: { controlWrapper: 'px-3 py-1' } },\n { appearance: 'outline', size: 'md', class: { controlWrapper: 'px-3 py-1.5' } },\n { appearance: 'outline', size: 'lg', class: { controlWrapper: 'px-4 py-2' } },\n { appearance: 'outline', size: 'xl', class: { controlWrapper: 'px-5 py-2.5' } },\n { appearance: 'filled', size: 'xs', class: { controlWrapper: 'px-2 pt-5 pb-1' } },\n { appearance: 'filled', size: 'sm', class: { controlWrapper: 'px-3 pt-5 pb-1.5' } },\n { appearance: 'filled', size: 'md', class: { controlWrapper: 'px-3 pt-6 pb-2' } },\n { appearance: 'filled', size: 'lg', class: { controlWrapper: 'px-4 pt-7 pb-2.5' } },\n { appearance: 'filled', size: 'xl', class: { controlWrapper: 'px-5 pt-8 pb-3' } },\n\n // ── Label font-size × (size, labelFloated) ──\n { size: 'xs', labelFloated: false, class: { label: 'text-xs' } },\n { size: 'xs', labelFloated: true, class: { label: 'text-2xs' } },\n { size: 'sm', labelFloated: false, class: { label: 'text-sm' } },\n { size: 'sm', labelFloated: true, class: { label: 'text-xs' } },\n { size: 'md', labelFloated: false, class: { label: 'text-sm' } },\n { size: 'md', labelFloated: true, class: { label: 'text-xs' } },\n { size: 'lg', labelFloated: false, class: { label: 'text-base' } },\n { size: 'lg', labelFloated: true, class: { label: 'text-sm' } },\n { size: 'xl', labelFloated: false, class: { label: 'text-base' } },\n { size: 'xl', labelFloated: true, class: { label: 'text-sm' } },\n\n // ── Outline + focused → colored border ──\n { appearance: 'outline', focused: true, color: 'primary', class: { controlWrapper: 'border-primary-border' } },\n { appearance: 'outline', focused: true, color: 'secondary', class: { controlWrapper: 'border-secondary-border' } },\n { appearance: 'outline', focused: true, color: 'accent', class: { controlWrapper: 'border-accent-border' } },\n { appearance: 'outline', focused: true, color: 'neutral', class: { controlWrapper: 'border-border-strong' } },\n { appearance: 'outline', focused: true, color: 'info', class: { controlWrapper: 'border-info-border' } },\n { appearance: 'outline', focused: true, color: 'success', class: { controlWrapper: 'border-success-border' } },\n { appearance: 'outline', focused: true, color: 'warning', class: { controlWrapper: 'border-warning-border' } },\n { appearance: 'outline', focused: true, color: 'error', class: { controlWrapper: 'border-error-border' } },\n\n // ── Filled + focused → colored bottom border ──\n { appearance: 'filled', focused: true, color: 'primary', class: { controlWrapper: 'border-b-2 border-primary-border' } },\n { appearance: 'filled', focused: true, color: 'secondary', class: { controlWrapper: 'border-b-2 border-secondary-border' } },\n { appearance: 'filled', focused: true, color: 'accent', class: { controlWrapper: 'border-b-2 border-accent-border' } },\n { appearance: 'filled', focused: true, color: 'neutral', class: { controlWrapper: 'border-b-2 border-border-strong' } },\n { appearance: 'filled', focused: true, color: 'info', class: { controlWrapper: 'border-b-2 border-info-border' } },\n { appearance: 'filled', focused: true, color: 'success', class: { controlWrapper: 'border-b-2 border-success-border' } },\n { appearance: 'filled', focused: true, color: 'warning', class: { controlWrapper: 'border-b-2 border-warning-border' } },\n { appearance: 'filled', focused: true, color: 'error', class: { controlWrapper: 'border-b-2 border-error-border' } },\n\n // ── Floated label + focused → colored label ──\n { labelFloated: true, focused: true, color: 'primary', class: { label: 'text-primary-600' } },\n { labelFloated: true, focused: true, color: 'secondary', class: { label: 'text-secondary-600' } },\n { labelFloated: true, focused: true, color: 'accent', class: { label: 'text-accent-600' } },\n { labelFloated: true, focused: true, color: 'neutral', class: { label: 'text-fg' } },\n { labelFloated: true, focused: true, color: 'info', class: { label: 'text-info-600' } },\n { labelFloated: true, focused: true, color: 'success', class: { label: 'text-success-600' } },\n { labelFloated: true, focused: true, color: 'warning', class: { label: 'text-warning-600' } },\n { labelFloated: true, focused: true, color: 'error', class: { label: 'text-error-600' } },\n\n // ── Outline + floated label → sit centered on the top border with a surface notch ──\n { appearance: 'outline', labelFloated: true, class: { labelWrapper: 'bg-surface px-1 top-0 -translate-y-1/2' } },\n\n // ── Filled + resting label → align vertically with the input baseline (input is items-end inside an asymmetric pt/pb container) ──\n { appearance: 'filled', labelFloated: false, class: { labelWrapper: 'top-[calc(50%+0.5rem)]' } },\n\n // ── Invalid overrides (declared last so twMerge lets them win) ──\n { invalid: true, appearance: 'outline', class: { controlWrapper: 'border-error-border' } },\n { invalid: true, appearance: 'filled', class: { controlWrapper: 'border-b-2 border-error-border' } },\n { invalid: true, labelFloated: true, class: { label: 'text-error-600' } },\n ],\n defaultVariants: {\n appearance: 'outline',\n size: 'md',\n color: 'primary',\n focused: false,\n invalid: false,\n labelFloated: false,\n subscriptReserve: true,\n disabled: false,\n },\n}, {\n twMerge: true,\n});\n\n// ── LabelDirective ──\n\n@Directive({\n selector: '[twLabel]',\n host: {\n '[attr.id]': 'id',\n '[attr.for]': 'controlId()',\n '[class]': 'classes()',\n },\n})\nexport class LabelDirective {\n private readonly formField = inject(FormFieldComponent);\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n\n /** @internal */\n readonly id = `tw-form-field-label-${nextLabelId++}`;\n\n /** @internal */\n readonly controlId = computed(() => this.formField.control()?.id() ?? null);\n\n /** @internal */\n readonly classes = computed(() => this.formField.labelClasses());\n\n constructor() {\n if (isDevMode()) {\n const tag = this.elementRef.nativeElement.tagName;\n if (tag !== 'LABEL') {\n console.warn(\n `[tw-form-field] twLabel should be applied to a <label> element for the native \\`for\\`/\\`id\\` association to work; got <${tag.toLowerCase()}>. Non-native controls (e.g. tw-select) still receive label pushdown via aria-labelledby.`,\n );\n }\n }\n }\n}\n\n// ── HintDirective ──\n\n@Directive({\n selector: '[twHint]',\n host: {\n '[attr.id]': 'id',\n '[class]': 'classes()',\n },\n})\nexport class HintDirective {\n private readonly formField = inject(FormFieldComponent);\n\n /** @internal */\n readonly id = `tw-form-field-hint-${nextHintId++}`;\n\n /** Alignment within the subscript row. `'end'` pushes the hint to the right. When unset, the form-field's `hintAlign` input supplies the default. */\n readonly align = input<'start' | 'end' | undefined>(undefined);\n\n /** @internal */\n readonly effectiveAlign = computed(\n () => this.align() ?? this.formField.hintAlign(),\n );\n\n /** @internal */\n readonly classes = computed(() => {\n const base = this.formField.hintClasses();\n return this.effectiveAlign() === 'end' ? `${base} ml-auto` : base;\n });\n}\n\n// ── ErrorDirective ──\n\n@Directive({\n selector: '[twError]',\n host: {\n 'role': 'alert',\n 'aria-live': 'polite',\n '[attr.id]': 'id',\n '[class]': 'classes()',\n '[class.hidden]': '!shouldShow()',\n },\n})\nexport class ErrorDirective {\n private readonly formField = inject(FormFieldComponent);\n\n /** @internal */\n readonly id = `tw-form-field-error-${nextErrorId++}`;\n\n /** Validation error key this message is bound to (e.g. `'required'`, `'email'`, `'minlength'`). When set, the error renders only while the surrounding control reports that key in its active validation errors. When omitted, the error displays whenever the form-field is in an error state — useful as a generic fallback. */\n readonly match = input<string | undefined>(undefined);\n\n /** @internal Whether this error should display given the control's active error keys. */\n readonly shouldShow = computed(() => {\n const key = this.match();\n if (!key) return true;\n return this.formField.activeErrorKeys().has(key);\n });\n\n /** @internal */\n readonly classes = computed(() => this.formField.errorClasses());\n}\n\n// ── PrefixDirective ──\n\n@Directive({\n selector: '[twPrefix]',\n host: {\n '[class]': 'prefixClasses()',\n },\n})\nexport class PrefixDirective {\n protected readonly formField = inject(FormFieldComponent);\n\n /** @internal Used by the form-field to measure the prefix area and align the resting label after it. */\n readonly elementRef = inject(ElementRef<HTMLElement>);\n\n /** @internal */\n readonly prefixClasses = computed(() => this.formField.prefixClasses());\n}\n\n// ── SuffixDirective ──\n\n@Directive({\n selector: '[twSuffix]',\n host: {\n '[class]': 'suffixClasses()',\n },\n})\nexport class SuffixDirective {\n protected readonly formField = inject(FormFieldComponent);\n\n /** @internal */\n readonly suffixClasses = computed(() => this.formField.suffixClasses());\n}\n\n// ── PrefixIconDirective / SuffixIconDirective ──\n// Opt-in directives that apply a glyph-sized adornment (`size-5 text-fg-muted shrink-0`) so consumers\n// don't pick `size-4` vs `size-5` ad-hoc. Use these for SVG icons; use [twPrefix]/[twSuffix]\n// when the adornment is text (currency, units, kbd hints).\n// They extend Prefix/SuffixDirective so the form-field's content query picks them up as a prefix/suffix\n// when computing the resting-label offset.\n\n@Directive({\n selector: '[twPrefixIcon]',\n host: {\n '[class]': 'prefixClasses()',\n },\n providers: [{ provide: PrefixDirective, useExisting: PrefixIconDirective }],\n})\nexport class PrefixIconDirective extends PrefixDirective {\n /** @internal */\n override readonly prefixClasses = computed(\n () => `${this.formField.prefixClasses()} size-5`,\n );\n}\n\n@Directive({\n selector: '[twSuffixIcon]',\n host: {\n '[class]': 'suffixClasses()',\n },\n providers: [{ provide: SuffixDirective, useExisting: SuffixIconDirective }],\n})\nexport class SuffixIconDirective extends SuffixDirective {\n /** @internal */\n override readonly suffixClasses = computed(\n () => `${this.formField.suffixClasses()} size-5`,\n );\n}\n\n// ── FormFieldComponent ──\n\n@Component({\n selector: 'tw-form-field',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './form-field.html',\n host: {\n '[class]': 'rootClasses()',\n '(click)': '_onContainerClick($event)',\n },\n providers: [\n { provide: TW_FORM_FIELD, useExisting: forwardRef(() => FormFieldComponent) },\n ],\n})\nexport class FormFieldComponent implements AfterContentInit, TwFormFieldParent {\n /** Visual appearance of the field container. `'outline'` draws a full border around the control; `'filled'` uses a filled surface with a bottom border. Defaults to `'outline'`. */\n readonly appearance = input<FormFieldAppearance>('outline');\n\n /** Density of the field container. Maps to the inline-padding scale (`px-2 py-1` xs … `px-5 py-3` xl), the control-row font scale (`text-xs` xs, `text-sm` sm/md, `text-base` lg/xl — inherited by the nested control and by prefix/suffix adornments), the label font scale, and a `min-h-*` floor on the control row from the control-height scale (24/32/36/44/48px). The floor is a minimum, not a fixed height: the row grows for a textarea or any other multi-line control. Defaults to `'md'`. */\n readonly size = input<TwSize>('md');\n\n /** Floating label behavior. `'auto'` floats when focused or non-empty; `'always'` stays floated; `'never'` disables floating entirely (the label wrapper is not rendered and the wrapped control's placeholder is always visible). Defaults to `'auto'`. */\n readonly floatLabel = input<FloatLabel>('auto');\n\n /** Subscript sizing strategy. `'fixed'` always reserves a 20px row for hints/errors so adjacent fields align; `'dynamic'` collapses the row when no hint/error is projected. Defaults to `'fixed'`. */\n readonly subscriptSizing = input<SubscriptSizing>('fixed');\n\n /** Hides the visual required marker (`*`) even when the wrapped control is required. `aria-required` on the control is unaffected. Defaults to `false`. */\n readonly hideRequiredMarker = input(false);\n\n /** Semantic color for focused/active accents (focused border, floated label). Defaults to `'primary'`. */\n readonly color = input<TwColor>('primary');\n\n /** Default alignment for a `twHint` element that does not specify its own `align`. Defaults to `'start'`. */\n readonly hintAlign = input<'start' | 'end'>('start');\n\n /** @internal */\n readonly control = contentChild(TW_FORM_FIELD_CONTROL, { descendants: true });\n /** @internal */\n readonly labelChild = contentChild(LabelDirective, { descendants: true });\n /** @internal */\n readonly hintChildren = contentChildren(HintDirective, { descendants: true });\n /** @internal */\n readonly errorChildren = contentChildren(ErrorDirective, { descendants: true });\n /** @internal */\n readonly prefixChildren = contentChildren(PrefixDirective, { descendants: true });\n /** @internal */\n readonly infixRef = viewChild<ElementRef<HTMLElement>>('infix');\n\n /** @internal */\n readonly hasLabel = computed(() => !!this.labelChild());\n /** @internal */\n readonly hasPrefix = computed(() => this.prefixChildren().length > 0);\n\n /** @internal Resting-label left offset in pixels, mirroring the infix's `offsetLeft` so the label sits right after any prefix. */\n private readonly restingLabelOffset = signal(DEFAULT_RESTING_LABEL_OFFSET_PX);\n\n /** @internal */\n readonly isFocused = computed(() => !!this.control()?.focused());\n /** @internal */\n readonly isInvalid = computed(() => !!this.control()?.errorState());\n /** @internal */\n readonly isDisabled = computed(() => !!this.control()?.disabled());\n /** @internal */\n readonly isRequired = computed(() => !!this.control()?.required());\n\n /** @internal Whether the floating label wrapper should render at all. `'never'` opts out entirely. */\n readonly shouldRenderLabelWrapper = computed(\n () => this.hasLabel() && this.floatLabel() !== 'never',\n );\n\n /** @internal */\n readonly shouldLabelFloat = computed(() => {\n const mode = this.floatLabel();\n if (mode === 'never') return false;\n if (mode === 'always') return true;\n const ctrl = this.control();\n if (!ctrl) return false;\n return ctrl.focused() || !ctrl.empty();\n });\n\n /** @internal Inline `left` value for the label wrapper. Floated labels pin to the container edge; resting labels align with the infix's left (after any prefix). */\n readonly labelLeft = computed(() =>\n this.shouldLabelFloat() ? '0.5rem' : `${this.restingLabelOffset()}px`,\n );\n\n /** @internal */\n readonly subscriptMode = computed<'error' | 'hint'>(() =>\n this.isInvalid() && this.errorChildren().length > 0 ? 'error' : 'hint',\n );\n\n /** @internal Set of validation error keys currently active on the bound control (e.g. `Set('required', 'email')`). Empty when the control has no `errors` signal or no active errors. Read by `[twError match=\"…\"]` to decide whether to display. */\n readonly activeErrorKeys = computed<ReadonlySet<string>>(() => {\n const errs = this.control()?.errors?.();\n return new Set(errs ? Object.keys(errs) : []);\n });\n\n /** @internal Whether the subscript row has anything to render right now. */\n readonly hasSubscriptContent = computed(() => {\n if (this.subscriptMode() === 'error') return this.errorChildren().length > 0;\n return this.hintChildren().length > 0;\n });\n\n /** @internal Whether the subscript wrapper renders. In `'fixed'` mode it always renders to reserve vertical space; in `'dynamic'` mode it collapses when empty. */\n readonly shouldRenderSubscript = computed(() => {\n if (this.subscriptSizing() === 'fixed') return true;\n return this.hasSubscriptContent();\n });\n\n private readonly controlTypeClass = computed(() => {\n const type = this.control()?.controlType;\n return type ? `tw-form-field-type-${type}` : '';\n });\n\n private readonly variantResult = computed(() =>\n formFieldVariants({\n appearance: this.appearance(),\n size: this.size(),\n color: this.color(),\n focused: this.isFocused(),\n invalid: this.isInvalid(),\n labelFloated: this.shouldLabelFloat(),\n subscriptReserve: this.subscriptSizing() === 'fixed',\n disabled: this.isDisabled(),\n }),\n );\n\n /** @internal */\n readonly rootClasses = computed(() => {\n const base = this.variantResult().root();\n const type = this.controlTypeClass();\n return type ? `${base} ${type}` : base;\n });\n /** @internal */\n readonly controlWrapperClasses = computed(() => this.variantResult().controlWrapper());\n /** @internal */\n readonly infixClasses = computed(() => {\n const base = this.variantResult().infix();\n // Hide the placeholder while the resting label is occupying the same space.\n // `floatLabel='never'` keeps the placeholder visible regardless of label projection.\n const hidePlaceholder =\n this.shouldRenderLabelWrapper() && !this.shouldLabelFloat();\n return hidePlaceholder\n ? `${base} [&_input::placeholder]:opacity-0 [&_textarea::placeholder]:opacity-0`\n : base;\n });\n /** @internal */\n readonly labelWrapperClasses = computed(() => this.variantResult().labelWrapper());\n /** @internal */\n readonly labelClasses = computed(() => this.variantResult().label());\n /** @internal */\n readonly requiredMarkerClasses = computed(() => this.variantResult().requiredMarker());\n /** @internal */\n readonly prefixClasses = computed(() => this.variantResult().prefix());\n /** @internal */\n readonly suffixClasses = computed(() => this.variantResult().suffix());\n /** @internal */\n readonly subscriptWrapperClasses = computed(() => this.variantResult().subscriptWrapper());\n /** @internal */\n readonly hintClasses = computed(() => this.variantResult().hint());\n /** @internal */\n readonly errorClasses = computed(() => this.variantResult().error());\n\n constructor() {\n // Push merged aria-describedby ids to the control whenever hint/error lists, the subscript mode, or per-error `match` visibility change.\n effect(() => {\n const ctrl = this.control();\n if (!ctrl) return;\n const ids: string[] = [];\n if (this.subscriptMode() === 'error') {\n for (const e of this.errorChildren()) {\n // Filter by `shouldShow()` so `[twError match=\"…\"]` entries that\n // don't match the active validation keys are not announced.\n if (e.shouldShow()) ids.push(e.id);\n }\n } else {\n for (const h of this.hintChildren()) ids.push(h.id);\n }\n const userIds = ctrl.userAriaDescribedBy?.();\n if (userIds) {\n for (const id of userIds.split(/\\s+/)) {\n if (id) ids.push(id);\n }\n }\n untracked(() => ctrl.setDescribedByIds(ids));\n });\n\n // Push merged aria-labelledby ids (projected label id + user-supplied) to the control.\n // Native inputs ignore this in practice (the `for=`/`id` association wins) but non-native\n // triggers (combobox, date-picker) need the explicit attribute for screen readers.\n effect(() => {\n const ctrl = this.control();\n if (!ctrl) return;\n const ids: string[] = [];\n const labelId = this.labelChild()?.id;\n if (labelId && this.shouldRenderLabelWrapper()) ids.push(labelId);\n const userIds = ctrl.userAriaLabelledby?.();\n if (userIds) {\n for (const id of userIds.split(/\\s+/)) {\n if (id) ids.push(id);\n }\n }\n untracked(() => ctrl.setLabelledByIds(ids));\n });\n\n // Dev-mode validation: at most one hint per alignment.\n // Reports via `console.error` instead of `throw` so an authoring mistake\n // surfaces during development without crashing the surrounding effect graph\n // (which would otherwise leave Angular in an unrecoverable error state).\n effect(() => {\n if (!isDevMode()) return;\n const hints = this.hintChildren();\n const startCount = hints.filter((h) => h.effectiveAlign() === 'start').length;\n const endCount = hints.filter((h) => h.effectiveAlign() === 'end').length;\n if (startCount > 1 || endCount > 1) {\n console.error(\n 'tw-form-field: only one twHint per alignment (\"start\" / \"end\") is allowed.',\n );\n }\n });\n\n // Track the infix's left offset so the resting label can sit right after any prefix.\n //\n // The measurement lives in `afterRenderEffect`'s `earlyRead` phase, NOT in a plain\n // `effect()`. `effect()` runs inside `refreshView` *after* this component's own template but\n // *before* its embedded views, content queries, host bindings and child components are\n // refreshed, so `offsetLeft` read there samples geometry that predates the very change that\n // triggered the run — a prefix appearing inside an `@if`, for instance. `earlyRead` runs\n // after the whole render has committed, which is what it exists for.\n //\n // `afterRenderEffect` is a *reactive* effect scheduled into a render phase, not an\n // every-render hook: it re-runs only when a tracked producer changes. The tracked producers\n // here are `prefixChildren()` and `infixRef()` — exactly the set the previous `effect()`\n // tracked, so this is a timing fix, not a coverage fix. A prefix that changes width without\n // changing the prefix set is invisible to the signal graph either way, which is why the\n // ResizeObserver below stays.\n afterRenderEffect({\n earlyRead: () => {\n if (this.prefixChildren().length === 0) return DEFAULT_RESTING_LABEL_OFFSET_PX;\n const infix = this.infixRef()?.nativeElement;\n // `null` means \"nothing measurable this run\" — leave the previous offset in place.\n return infix ? infix.offsetLeft : null;\n },\n write: (offset) => {\n const px = offset();\n if (px !== null) this.restingLabelOffset.set(px);\n },\n });\n\n // Keep the offset fresh when an already-mounted prefix changes size. Creating the observer\n // is a subscription, not a layout read, so a plain `effect()` is the right hook; the\n // callback itself is delivered after layout, so its `offsetLeft` read is safe. Note this\n // repairs *size* changes only — an infix that shifts position with no observed box resizing\n // is not covered here and not covered by the render effect above either.\n effect((onCleanup) => {\n const prefixes = this.prefixChildren();\n if (prefixes.length === 0) return;\n const infix = this.infixRef()?.nativeElement;\n if (!infix) return;\n if (typeof ResizeObserver === 'undefined') return;\n const ro = new ResizeObserver(() =>\n this.restingLabelOffset.set(infix.offsetLeft),\n );\n for (const p of prefixes) {\n ro.observe(p.elementRef.nativeElement);\n }\n ro.observe(infix);\n onCleanup(() => ro.disconnect());\n });\n }\n\n ngAfterContentInit(): void {\n if (isDevMode() && !this.control()) {\n throw new Error(\n 'tw-form-field requires a child control providing TW_FORM_FIELD_CONTROL. ' +\n 'Place a control (e.g. <input twInput />) inside the <tw-form-field>.',\n );\n }\n }\n\n /** @internal */\n _onContainerClick(event: MouseEvent): void {\n this.control()?.onContainerClick(event);\n }\n}\n","<div [class]=\"controlWrapperClasses()\">\n <ng-content select=\"[twPrefix]\" />\n <ng-content select=\"[twPrefixIcon]\" />\n <div #infix [class]=\"infixClasses()\">\n <ng-content />\n </div>\n <ng-content select=\"[twSuffix]\" />\n <ng-content select=\"[twSuffixIcon]\" />\n @if (shouldRenderLabelWrapper()) {\n <div [class]=\"labelWrapperClasses()\" [style.left]=\"labelLeft()\">\n <ng-content select=\"[twLabel]\" />\n @if (!hideRequiredMarker() && isRequired()) {\n <span [class]=\"requiredMarkerClasses()\" aria-hidden=\"true\">*</span>\n }\n </div>\n }\n</div>\n\n@if (shouldRenderSubscript()) {\n <div [class]=\"subscriptWrapperClasses()\">\n @if (subscriptMode() === 'error') {\n <ng-content select=\"[twError]\" />\n } @else {\n <ng-content select=\"[twHint]\" />\n }\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\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,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAEpC,eAAe,QAAE,EAAE,WAAW,EAAE,IAAI,EAAE,gEAEzB,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE3hBhE;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdevhub-ngx-tw-input.mjs","sources":["../../../projects/ngx-tw/input/input.ts","../../../projects/ngx-tw/input/cdevhub-ngx-tw-input.ts"],"sourcesContent":["import {\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n InjectionToken,\n input,\n isDevMode,\n isSignal,\n type OnInit,\n signal,\n type Signal,\n untracked,\n type WritableSignal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NgControl } from '@angular/forms';\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { AutofillMonitor } from '@angular/cdk/text-field';\nimport { Platform } from '@angular/cdk/platform';\nimport { tv } from 'tailwind-variants';\nimport {\n type ErrorStateMatcher,\n type TwSize,\n wireErrorState,\n} from '@cdevhub/ngx-tw/core';\nimport {\n FormFieldControl,\n TW_FORM_FIELD,\n TW_FORM_FIELD_CONTROL,\n} from '@cdevhub/ngx-tw/form-field';\n\n/**\n * Extension point for directives that wrap an `<input twInput>` and need to\n * own how its value is read and written. The directive's `value` property can\n * be a plain object slot (`{ value: T }`) or a `WritableSignal<T>`. Mirrors\n * Angular Material's `MAT_INPUT_VALUE_ACCESSOR`.\n */\nexport const TW_INPUT_VALUE_ACCESSOR = new InjectionToken<{\n value: unknown | WritableSignal<unknown>;\n}>('TW_INPUT_VALUE_ACCESSOR');\n\nconst INVALID_INPUT_TYPES = new Set([\n 'button',\n 'checkbox',\n 'file',\n 'hidden',\n 'image',\n 'radio',\n 'range',\n 'reset',\n 'submit',\n]);\n\nconst NEVER_EMPTY_TYPES = new Set([\n 'date',\n 'datetime-local',\n 'month',\n 'time',\n 'week',\n 'color',\n]);\n\nconst inputVariants = tv(\n {\n base: 'block w-full bg-transparent text-fg placeholder:text-fg-subtle outline-none',\n variants: {\n inFormField: {\n true: 'border-0 p-0 shadow-none focus:outline-none focus-visible:outline-none',\n false:\n 'rounded-md border border-border transition-[color,border-color,box-shadow] duration-normal motion-reduce:transition-none hover:border-border-strong focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500',\n },\n // Height strategy for the standalone (`inFormField: false`) size scale —\n // see `docs/vertical-rhythm.md`. Driven by the host tag, not an input.\n //\n // `false` (a single-line `<input>`) pins the border-box height\n // (`h-6` … `h-12`) and deletes the vertical padding, so padding and\n // height cannot fight. Browsers centre an `<input>`'s text natively, so\n // no flex box is needed.\n //\n // `true` (a `<textarea>`) is multi-line by definition: the vertical\n // padding is retained and no height utility is emitted here. The\n // control-scale `min-h-*` floor is applied by `TextareaDirective`\n // instead, because it has to be droppable while CDK autosize owns the\n // height — see the `heightFloor` variant in `textarea.ts`.\n multiline: {\n true: '',\n false: '',\n },\n size: {\n xs: '',\n sm: '',\n md: '',\n lg: '',\n xl: '',\n },\n errorState: {\n true: '',\n false: '',\n },\n disabled: {\n true: 'opacity-50 cursor-not-allowed',\n false: '',\n },\n },\n compoundVariants: [\n // Standalone density × size — single-line: horizontal padding, font\n // scale, and the pinned control height (no vertical padding).\n { inFormField: false, multiline: false, size: 'xs', class: 'px-2 text-xs h-6' },\n { inFormField: false, multiline: false, size: 'sm', class: 'px-3 text-sm h-8' },\n { inFormField: false, multiline: false, size: 'md', class: 'px-4 text-sm h-9' },\n { inFormField: false, multiline: false, size: 'lg', class: 'px-5 text-base h-11' },\n { inFormField: false, multiline: false, size: 'xl', class: 'px-6 text-base h-12' },\n // Standalone density × size — multi-line: vertical padding is kept so the\n // box can grow; the height floor is applied by `TextareaDirective`.\n { inFormField: false, multiline: true, size: 'xs', class: 'px-2 py-1 text-xs' },\n { inFormField: false, multiline: true, size: 'sm', class: 'px-3 py-1.5 text-sm' },\n { inFormField: false, multiline: true, size: 'md', class: 'px-4 py-2 text-sm' },\n { inFormField: false, multiline: true, size: 'lg', class: 'px-5 py-2.5 text-base' },\n { inFormField: false, multiline: true, size: 'xl', class: 'px-6 py-3 text-base' },\n // Standalone error state — colored border and focus ring.\n {\n inFormField: false,\n errorState: true,\n class: 'border-error-500 focus-visible:outline-error-500',\n },\n ],\n defaultVariants: {\n inFormField: false,\n multiline: false,\n size: 'md',\n errorState: false,\n disabled: false,\n },\n },\n { twMerge: true },\n);\n\nlet nextInputId = 0;\n\n/**\n * Adapts a native `<input>` or `<textarea>` into an ngx-tw form-field-compatible\n * control. Works standalone (applies its own border and focus styling) or\n * inside a `<tw-form-field>` (strips its chrome and provides signals the\n * form-field uses to float the label and wire `aria-describedby`).\n *\n * Extension points:\n * - Implement a completely custom control → extend {@link FormFieldControl}\n * and provide under `TW_FORM_FIELD_CONTROL`.\n * - Swap value storage for an existing `<input twInput>` (masked input,\n * date parser, etc.) → provide {@link TW_INPUT_VALUE_ACCESSOR}.\n * - Change when errors show → override `TW_ERROR_STATE_MATCHER` at any\n * injector level, or pass `errorStateMatcher` per instance.\n *\n * Forms integration is inherited: Angular's native value accessors attach to\n * the underlying element, so the directive works with template-driven,\n * reactive, and signal-based forms without additional glue.\n */\n@Directive({\n selector: 'input[twInput], textarea[twInput]',\n exportAs: 'twInput',\n providers: [\n { provide: TW_FORM_FIELD_CONTROL, useExisting: InputDirective },\n ],\n host: {\n '[class]': 'classes()',\n '[attr.id]': 'id()',\n '[attr.type]': '_isTextarea ? null : type()',\n '[disabled]': 'disabled()',\n '[attr.aria-invalid]': 'errorState() || null',\n '[attr.aria-required]': 'required() || null',\n '(input)': '_onInput()',\n },\n})\nexport class InputDirective\n extends FormFieldControl<string>\n implements OnInit\n{\n private readonly elementRef = inject<\n ElementRef<HTMLInputElement | HTMLTextAreaElement>\n >(ElementRef);\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly autofillMonitor = inject(AutofillMonitor);\n private readonly platform = inject(Platform);\n private readonly destroyRef = inject(DestroyRef);\n private readonly formField = inject(TW_FORM_FIELD, { optional: true });\n private readonly ngControl = inject(NgControl, {\n optional: true,\n self: true,\n });\n private readonly valueAccessor = inject(TW_INPUT_VALUE_ACCESSOR, {\n optional: true,\n self: true,\n });\n\n /** @internal */\n readonly _isTextarea =\n this.elementRef.nativeElement.tagName.toLowerCase() === 'textarea';\n\n /** Contract value — `'input'` for `<input>` and `'textarea'` for `<textarea>`. Form-field appends it as `tw-form-field-type-*` for styling hooks. */\n readonly controlType: string = this._isTextarea ? 'textarea' : 'input';\n\n private readonly uid = `tw-input-${nextInputId++}`;\n\n /** Id on the underlying element. Auto-generated as `tw-input-N` when not provided. Used by the form-field's `<label for>` attribute. */\n readonly idInput = input<string | undefined>(undefined, { alias: 'id' });\n\n /** Native HTML input `type`. Defaults to `'text'`. Dev-mode throws on unsupported values (`checkbox`, `radio`, `submit`, etc.) — use the dedicated component instead. Ignored on `<textarea>`. */\n readonly type = input<string>('text');\n\n /** Density of a standalone field. Maps to the pinned control-height scale (24/32/36/44/48px, `h-6` xs … `h-12` xl), the horizontal-padding scale (`px-2` xs … `px-6` xl), and the font scale (`text-xs` xs, `text-sm` sm/md, `text-base` lg/xl). On a `<textarea>` the height becomes a `min-h-*` floor and the vertical padding is retained. Ignored inside a `<tw-form-field>` — the wrapper's `size` carries density. Defaults to `'md'`. */\n readonly size = input<TwSize>('md');\n\n /** Disables the control. Also reflects `ngControl.disabled` when the element is bound to a reactive form. Defaults to `false`. */\n readonly disabledInput = input<boolean, unknown>(false, {\n alias: 'disabled',\n transform: booleanAttribute,\n });\n\n /** Marks the control as required. Also inferred from `Validators.required` on a bound `NgControl`. Defaults to `false`. */\n readonly requiredInput = input<boolean, unknown>(false, {\n alias: 'required',\n transform: booleanAttribute,\n });\n\n /** Makes the control read-only (native `readonly` attribute). Defaults to `false`. */\n readonly readonlyInput = input<boolean, unknown>(false, {\n alias: 'readonly',\n transform: booleanAttribute,\n });\n\n /** Per-instance override of the {@link ErrorStateMatcher}. When omitted, the directive uses the `TW_ERROR_STATE_MATCHER` token's value. */\n readonly errorStateMatcher = input<ErrorStateMatcher | undefined>(undefined);\n\n /** Consumer-supplied `aria-describedby` ids. The form-field preserves these when merging hint and error ids. Alias: `aria-describedby`. */\n override readonly userAriaDescribedBy = input<string | undefined>(undefined, {\n alias: 'aria-describedby',\n });\n\n /** Consumer-supplied `aria-labelledby` ids. The form-field preserves these when merging in the projected label id. Alias: `aria-labelledby`. */\n override readonly userAriaLabelledby = input<string | undefined>(undefined, {\n alias: 'aria-labelledby',\n });\n\n // ── Internal state signals ──\n\n private readonly _value = signal<string>(this._readInitialValue());\n private readonly _focused = signal(false);\n private readonly _autofilled = signal(false);\n\n /** @internal Shared `errorState` / `required` / `errors` derivation — see `wireErrorState`. */\n private readonly errorWiring = wireErrorState({\n ngControl: () => this.ngControl,\n matcher: () => this.errorStateMatcher(),\n required: () => this.requiredInput(),\n track: [() => this._focused()],\n });\n\n // ── FormFieldControl signals ──\n\n /** @internal */\n readonly id = computed(() => this.idInput() ?? this.uid);\n\n /** @internal */\n readonly value = computed<string | null>(() => this._value() || null);\n\n /** @internal */\n readonly focused = this._focused.asReadonly();\n\n /** @internal */\n readonly empty = computed(() => {\n if (!this._isTextarea && NEVER_EMPTY_TYPES.has(this.type())) {\n return false;\n }\n return !this._value() && !this._autofilled();\n });\n\n /** @internal */\n readonly disabled = computed(() => {\n this.errorWiring.rev();\n return this.disabledInput() || !!this.ngControl?.disabled;\n });\n\n /** @internal */\n readonly required = this.errorWiring.required;\n\n /** @internal */\n readonly errorState = this.errorWiring.errorState;\n\n /** @internal Active validation errors map from the bound `NgControl`, for `[twError match=\"…\"]` filtering. */\n override readonly errors = this.errorWiring.errors;\n\n /** @internal */\n readonly classes = computed(() =>\n inputVariants({\n inFormField: !!this.formField,\n multiline: this._isTextarea,\n size: this.size(),\n errorState: this.errorState(),\n disabled: this.disabled(),\n }),\n );\n\n constructor() {\n super();\n\n this.focusMonitor\n .monitor(this.elementRef)\n .pipe(takeUntilDestroyed())\n .subscribe((origin) => {\n const wasFocused = this._focused();\n this._focused.set(!!origin);\n if (wasFocused && !origin) {\n // Blur often flips `touched` on the bound `NgControl`; bump the\n // revision signal so `errorState` recomputes.\n this.errorWiring.bump();\n }\n });\n this.destroyRef.onDestroy(() =>\n this.focusMonitor.stopMonitoring(this.elementRef),\n );\n\n // Keep `_value` in sync when the accessor's value is itself a signal.\n if (this.valueAccessor && isSignal(this.valueAccessor.value)) {\n effect(() => {\n const v = (this.valueAccessor!.value as Signal<unknown>)();\n untracked(() => this._value.set(this._stringify(v)));\n });\n }\n\n // Sync the `readonly` input to the native attribute.\n effect(() => {\n const el = this.elementRef.nativeElement;\n if (this.readonlyInput()) {\n el.setAttribute('readonly', 'true');\n } else {\n el.removeAttribute('readonly');\n }\n });\n\n // Validate the input type in dev mode.\n effect(() => {\n const t = this.type();\n if (\n isDevMode() &&\n !this._isTextarea &&\n INVALID_INPUT_TYPES.has(t)\n ) {\n throw new Error(\n `tw-input: unsupported input type \"${t}\". Use a dedicated ngx-tw component for that control.`,\n );\n }\n });\n }\n\n ngOnInit(): void {\n if (this.platform.isBrowser) {\n this.autofillMonitor\n .monitor(this.elementRef.nativeElement)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((event) => this._autofilled.set(event.isAutofilled));\n this.destroyRef.onDestroy(() =>\n this.autofillMonitor.stopMonitoring(this.elementRef.nativeElement),\n );\n }\n\n // NgControl's `control` is set by the parent `FormControl*` directive's\n // own `ngOnChanges`, which runs before children's `ngOnInit`. Connect\n // here so `statusChanges`/`valueChanges` are actually available.\n this.errorWiring.connect();\n }\n\n /** Moves focus to the underlying element. */\n focus(options?: FocusOptions): void {\n this.elementRef.nativeElement.focus(options);\n }\n\n /** @internal Called when `<tw-form-field>` has computed the merged describedby ids. */\n setDescribedByIds(ids: string[]): void {\n const el = this.elementRef.nativeElement;\n if (ids.length) {\n el.setAttribute('aria-describedby', ids.join(' '));\n } else {\n el.removeAttribute('aria-describedby');\n }\n }\n\n /** @internal Called when `<tw-form-field>` has computed the merged labelledby ids. The native `<label for>` association covers most cases; this attribute is mainly useful when a consumer also supplies `aria-labelledby` for an external label. */\n override setLabelledByIds(ids: string[]): void {\n const el = this.elementRef.nativeElement;\n // Skip applying the projected label id by itself — native `<label for=>` already wires it\n // and a redundant `aria-labelledby` can cause double-announcements in some screen readers.\n // Only apply when the consumer supplied additional ids via `aria-labelledby`.\n const userIds = this.userAriaLabelledby();\n if (userIds || (ids.length > 1)) {\n el.setAttribute('aria-labelledby', ids.join(' '));\n } else {\n el.removeAttribute('aria-labelledby');\n }\n }\n\n /** @internal Called when the form-field container is clicked. */\n onContainerClick(_event: MouseEvent): void {\n if (!this._focused()) {\n this.focus();\n }\n }\n\n /** @internal */\n _onInput(): void {\n this._value.set(this._currentValue());\n }\n\n private _currentValue(): string {\n if (this.valueAccessor) {\n const v = this.valueAccessor.value;\n if (isSignal(v)) return this._stringify((v as Signal<unknown>)());\n return this._stringify(v);\n }\n return this.elementRef.nativeElement.value;\n }\n\n private _readInitialValue(): string {\n const el = this.elementRef.nativeElement;\n return el.value ?? '';\n }\n\n private _stringify(v: unknown): string {\n return v === null || v === undefined ? '' : String(v);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAmCA;;;;;AAKG;MACU,uBAAuB,GAAG,IAAI,cAAc,CAEtD,yBAAyB;AAE5B,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IAClC,QAAQ;IACR,UAAU;IACV,MAAM;IACN,QAAQ;IACR,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,QAAQ;AACT,CAAA,CAAC;AAEF,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IAChC,MAAM;IACN,gBAAgB;IAChB,OAAO;IACP,MAAM;IACN,MAAM;IACN,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EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,YAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,WAAA,EAAA,SAAA,EAAA,MAAA,EAAA,WAAA,EAAA,6BAAA,EAAA,UAAA,EAAA,YAAA,EAAA,mBAAA,EAAA,sBAAA,EAAA,oBAAA,EAAA,oBAAA,EAAA,EAAA,EAAA,SAAA,EAbd;AACT,YAAA,EAAE,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAE,cAAc,EAAE;AAChE,SAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAWU,cAAc,EAAA,UAAA,EAAA,CAAA;kBAhB1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mCAAmC;AAC7C,oBAAA,QAAQ,EAAE,SAAS;AACnB,oBAAA,SAAS,EAAE;AACT,wBAAA,EAAE,OAAO,EAAE,qBAAqB,EAAE,WAAW,gBAAgB,EAAE;AAChE,qBAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,WAAW,EAAE,MAAM;AACnB,wBAAA,aAAa,EAAE,6BAA6B;AAC5C,wBAAA,YAAY,EAAE,YAAY;AAC1B,wBAAA,qBAAqB,EAAE,sBAAsB;AAC7C,wBAAA,sBAAsB,EAAE,oBAAoB;AAC5C,wBAAA,SAAS,EAAE,YAAY;AACxB,qBAAA;AACF,iBAAA;;;AChLD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cdevhub-ngx-tw-input.mjs","sources":["../../../projects/ngx-tw/input/input.ts","../../../projects/ngx-tw/input/cdevhub-ngx-tw-input.ts"],"sourcesContent":["import {\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n InjectionToken,\n input,\n isDevMode,\n isSignal,\n type OnInit,\n signal,\n type Signal,\n untracked,\n type WritableSignal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NgControl } from '@angular/forms';\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { AutofillMonitor } from '@angular/cdk/text-field';\nimport { Platform } from '@angular/cdk/platform';\nimport { tv } from 'tailwind-variants';\nimport {\n type ErrorStateMatcher,\n type TwSize,\n wireErrorState,\n} from '@cdevhub/ngx-tw/core';\nimport {\n FormFieldControl,\n TW_FORM_FIELD,\n TW_FORM_FIELD_CONTROL,\n} from '@cdevhub/ngx-tw/form-field';\n\n/**\n * Extension point for directives that wrap an `<input twInput>` and need to\n * own how its value is read and written. The directive's `value` property can\n * be a plain object slot (`{ value: T }`) or a `WritableSignal<T>`. Mirrors\n * Angular Material's `MAT_INPUT_VALUE_ACCESSOR`.\n */\nexport const TW_INPUT_VALUE_ACCESSOR = new InjectionToken<{\n value: unknown | WritableSignal<unknown>;\n}>('TW_INPUT_VALUE_ACCESSOR');\n\nconst INVALID_INPUT_TYPES = new Set([\n 'button',\n 'checkbox',\n 'file',\n 'hidden',\n 'image',\n 'radio',\n 'range',\n 'reset',\n 'submit',\n]);\n\nconst NEVER_EMPTY_TYPES = new Set([\n 'date',\n 'datetime-local',\n 'month',\n 'time',\n 'week',\n 'color',\n]);\n\nconst inputVariants = tv(\n {\n base: 'block w-full bg-transparent text-fg placeholder:text-fg-subtle outline-none',\n variants: {\n inFormField: {\n true: 'border-0 p-0 shadow-none focus:outline-none focus-visible:outline-none',\n false:\n 'rounded-md border border-border transition-[color,border-color,box-shadow] duration-normal motion-reduce:transition-none hover:border-border-strong focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500',\n },\n // Height strategy for the standalone (`inFormField: false`) size scale —\n // see `docs/vertical-rhythm.md`. Driven by the host tag, not an input.\n //\n // `false` (a single-line `<input>`) pins the border-box height\n // (`h-6` … `h-12`) and deletes the vertical padding, so padding and\n // height cannot fight. Browsers centre an `<input>`'s text natively, so\n // no flex box is needed.\n //\n // `true` (a `<textarea>`) is multi-line by definition: the vertical\n // padding is retained and no height utility is emitted here. The\n // control-scale `min-h-*` floor is applied by `TextareaDirective`\n // instead, because it has to be droppable while CDK autosize owns the\n // height — see the `heightFloor` variant in `textarea.ts`.\n multiline: {\n true: '',\n false: '',\n },\n size: {\n xs: '',\n sm: '',\n md: '',\n lg: '',\n xl: '',\n },\n errorState: {\n true: '',\n false: '',\n },\n disabled: {\n true: 'opacity-50 cursor-not-allowed',\n false: '',\n },\n },\n compoundVariants: [\n // Standalone density × size — single-line: horizontal padding, font\n // scale, and the pinned control height (no vertical padding).\n { inFormField: false, multiline: false, size: 'xs', class: 'px-2 text-xs h-6' },\n { inFormField: false, multiline: false, size: 'sm', class: 'px-3 text-sm h-8' },\n { inFormField: false, multiline: false, size: 'md', class: 'px-4 text-sm h-9' },\n { inFormField: false, multiline: false, size: 'lg', class: 'px-5 text-base h-11' },\n { inFormField: false, multiline: false, size: 'xl', class: 'px-6 text-base h-12' },\n // Standalone density × size — multi-line: vertical padding is kept so the\n // box can grow; the height floor is applied by `TextareaDirective`.\n { inFormField: false, multiline: true, size: 'xs', class: 'px-2 py-1 text-xs' },\n { inFormField: false, multiline: true, size: 'sm', class: 'px-3 py-1.5 text-sm' },\n { inFormField: false, multiline: true, size: 'md', class: 'px-4 py-2 text-sm' },\n { inFormField: false, multiline: true, size: 'lg', class: 'px-5 py-2.5 text-base' },\n { inFormField: false, multiline: true, size: 'xl', class: 'px-6 py-3 text-base' },\n // Standalone error state — colored border and focus ring.\n {\n inFormField: false,\n errorState: true,\n class: 'border-error-border focus-visible:outline-error-border',\n },\n ],\n defaultVariants: {\n inFormField: false,\n multiline: false,\n size: 'md',\n errorState: false,\n disabled: false,\n },\n },\n { twMerge: true },\n);\n\nlet nextInputId = 0;\n\n/**\n * Adapts a native `<input>` or `<textarea>` into an ngx-tw form-field-compatible\n * control. Works standalone (applies its own border and focus styling) or\n * inside a `<tw-form-field>` (strips its chrome and provides signals the\n * form-field uses to float the label and wire `aria-describedby`).\n *\n * Extension points:\n * - Implement a completely custom control → extend {@link FormFieldControl}\n * and provide under `TW_FORM_FIELD_CONTROL`.\n * - Swap value storage for an existing `<input twInput>` (masked input,\n * date parser, etc.) → provide {@link TW_INPUT_VALUE_ACCESSOR}.\n * - Change when errors show → override `TW_ERROR_STATE_MATCHER` at any\n * injector level, or pass `errorStateMatcher` per instance.\n *\n * Forms integration is inherited: Angular's native value accessors attach to\n * the underlying element, so the directive works with template-driven,\n * reactive, and signal-based forms without additional glue.\n */\n@Directive({\n selector: 'input[twInput], textarea[twInput]',\n exportAs: 'twInput',\n providers: [\n { provide: TW_FORM_FIELD_CONTROL, useExisting: InputDirective },\n ],\n host: {\n '[class]': 'classes()',\n '[attr.id]': 'id()',\n '[attr.type]': '_isTextarea ? null : type()',\n '[disabled]': 'disabled()',\n '[attr.aria-invalid]': 'errorState() || null',\n '[attr.aria-required]': 'required() || null',\n '(input)': '_onInput()',\n },\n})\nexport class InputDirective\n extends FormFieldControl<string>\n implements OnInit\n{\n private readonly elementRef = inject<\n ElementRef<HTMLInputElement | HTMLTextAreaElement>\n >(ElementRef);\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly autofillMonitor = inject(AutofillMonitor);\n private readonly platform = inject(Platform);\n private readonly destroyRef = inject(DestroyRef);\n private readonly formField = inject(TW_FORM_FIELD, { optional: true });\n private readonly ngControl = inject(NgControl, {\n optional: true,\n self: true,\n });\n private readonly valueAccessor = inject(TW_INPUT_VALUE_ACCESSOR, {\n optional: true,\n self: true,\n });\n\n /** @internal */\n readonly _isTextarea =\n this.elementRef.nativeElement.tagName.toLowerCase() === 'textarea';\n\n /** Contract value — `'input'` for `<input>` and `'textarea'` for `<textarea>`. Form-field appends it as `tw-form-field-type-*` for styling hooks. */\n readonly controlType: string = this._isTextarea ? 'textarea' : 'input';\n\n private readonly uid = `tw-input-${nextInputId++}`;\n\n /** Id on the underlying element. Auto-generated as `tw-input-N` when not provided. Used by the form-field's `<label for>` attribute. */\n readonly idInput = input<string | undefined>(undefined, { alias: 'id' });\n\n /** Native HTML input `type`. Defaults to `'text'`. Dev-mode throws on unsupported values (`checkbox`, `radio`, `submit`, etc.) — use the dedicated component instead. Ignored on `<textarea>`. */\n readonly type = input<string>('text');\n\n /** Density of a standalone field. Maps to the pinned control-height scale (24/32/36/44/48px, `h-6` xs … `h-12` xl), the horizontal-padding scale (`px-2` xs … `px-6` xl), and the font scale (`text-xs` xs, `text-sm` sm/md, `text-base` lg/xl). On a `<textarea>` the height becomes a `min-h-*` floor and the vertical padding is retained. Ignored inside a `<tw-form-field>` — the wrapper's `size` carries density. Defaults to `'md'`. */\n readonly size = input<TwSize>('md');\n\n /** Disables the control. Also reflects `ngControl.disabled` when the element is bound to a reactive form. Defaults to `false`. */\n readonly disabledInput = input<boolean, unknown>(false, {\n alias: 'disabled',\n transform: booleanAttribute,\n });\n\n /** Marks the control as required. Also inferred from `Validators.required` on a bound `NgControl`. Defaults to `false`. */\n readonly requiredInput = input<boolean, unknown>(false, {\n alias: 'required',\n transform: booleanAttribute,\n });\n\n /** Makes the control read-only (native `readonly` attribute). Defaults to `false`. */\n readonly readonlyInput = input<boolean, unknown>(false, {\n alias: 'readonly',\n transform: booleanAttribute,\n });\n\n /** Per-instance override of the {@link ErrorStateMatcher}. When omitted, the directive uses the `TW_ERROR_STATE_MATCHER` token's value. */\n readonly errorStateMatcher = input<ErrorStateMatcher | undefined>(undefined);\n\n /** Consumer-supplied `aria-describedby` ids. The form-field preserves these when merging hint and error ids. Alias: `aria-describedby`. */\n override readonly userAriaDescribedBy = input<string | undefined>(undefined, {\n alias: 'aria-describedby',\n });\n\n /** Consumer-supplied `aria-labelledby` ids. The form-field preserves these when merging in the projected label id. Alias: `aria-labelledby`. */\n override readonly userAriaLabelledby = input<string | undefined>(undefined, {\n alias: 'aria-labelledby',\n });\n\n // ── Internal state signals ──\n\n private readonly _value = signal<string>(this._readInitialValue());\n private readonly _focused = signal(false);\n private readonly _autofilled = signal(false);\n\n /** @internal Shared `errorState` / `required` / `errors` derivation — see `wireErrorState`. */\n private readonly errorWiring = wireErrorState({\n ngControl: () => this.ngControl,\n matcher: () => this.errorStateMatcher(),\n required: () => this.requiredInput(),\n track: [() => this._focused()],\n });\n\n // ── FormFieldControl signals ──\n\n /** @internal */\n readonly id = computed(() => this.idInput() ?? this.uid);\n\n /** @internal */\n readonly value = computed<string | null>(() => this._value() || null);\n\n /** @internal */\n readonly focused = this._focused.asReadonly();\n\n /** @internal */\n readonly empty = computed(() => {\n if (!this._isTextarea && NEVER_EMPTY_TYPES.has(this.type())) {\n return false;\n }\n return !this._value() && !this._autofilled();\n });\n\n /** @internal */\n readonly disabled = computed(() => {\n this.errorWiring.rev();\n return this.disabledInput() || !!this.ngControl?.disabled;\n });\n\n /** @internal */\n readonly required = this.errorWiring.required;\n\n /** @internal */\n readonly errorState = this.errorWiring.errorState;\n\n /** @internal Active validation errors map from the bound `NgControl`, for `[twError match=\"…\"]` filtering. */\n override readonly errors = this.errorWiring.errors;\n\n /** @internal */\n readonly classes = computed(() =>\n inputVariants({\n inFormField: !!this.formField,\n multiline: this._isTextarea,\n size: this.size(),\n errorState: this.errorState(),\n disabled: this.disabled(),\n }),\n );\n\n constructor() {\n super();\n\n this.focusMonitor\n .monitor(this.elementRef)\n .pipe(takeUntilDestroyed())\n .subscribe((origin) => {\n const wasFocused = this._focused();\n this._focused.set(!!origin);\n if (wasFocused && !origin) {\n // Blur often flips `touched` on the bound `NgControl`; bump the\n // revision signal so `errorState` recomputes.\n this.errorWiring.bump();\n }\n });\n this.destroyRef.onDestroy(() =>\n this.focusMonitor.stopMonitoring(this.elementRef),\n );\n\n // Keep `_value` in sync when the accessor's value is itself a signal.\n if (this.valueAccessor && isSignal(this.valueAccessor.value)) {\n effect(() => {\n const v = (this.valueAccessor!.value as Signal<unknown>)();\n untracked(() => this._value.set(this._stringify(v)));\n });\n }\n\n // Sync the `readonly` input to the native attribute.\n effect(() => {\n const el = this.elementRef.nativeElement;\n if (this.readonlyInput()) {\n el.setAttribute('readonly', 'true');\n } else {\n el.removeAttribute('readonly');\n }\n });\n\n // Validate the input type in dev mode.\n effect(() => {\n const t = this.type();\n if (\n isDevMode() &&\n !this._isTextarea &&\n INVALID_INPUT_TYPES.has(t)\n ) {\n throw new Error(\n `tw-input: unsupported input type \"${t}\". Use a dedicated ngx-tw component for that control.`,\n );\n }\n });\n }\n\n ngOnInit(): void {\n if (this.platform.isBrowser) {\n this.autofillMonitor\n .monitor(this.elementRef.nativeElement)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((event) => this._autofilled.set(event.isAutofilled));\n this.destroyRef.onDestroy(() =>\n this.autofillMonitor.stopMonitoring(this.elementRef.nativeElement),\n );\n }\n\n // NgControl's `control` is set by the parent `FormControl*` directive's\n // own `ngOnChanges`, which runs before children's `ngOnInit`. Connect\n // here so `statusChanges`/`valueChanges` are actually available.\n this.errorWiring.connect();\n }\n\n /** Moves focus to the underlying element. */\n focus(options?: FocusOptions): void {\n this.elementRef.nativeElement.focus(options);\n }\n\n /** @internal Called when `<tw-form-field>` has computed the merged describedby ids. */\n setDescribedByIds(ids: string[]): void {\n const el = this.elementRef.nativeElement;\n if (ids.length) {\n el.setAttribute('aria-describedby', ids.join(' '));\n } else {\n el.removeAttribute('aria-describedby');\n }\n }\n\n /** @internal Called when `<tw-form-field>` has computed the merged labelledby ids. The native `<label for>` association covers most cases; this attribute is mainly useful when a consumer also supplies `aria-labelledby` for an external label. */\n override setLabelledByIds(ids: string[]): void {\n const el = this.elementRef.nativeElement;\n // Skip applying the projected label id by itself — native `<label for=>` already wires it\n // and a redundant `aria-labelledby` can cause double-announcements in some screen readers.\n // Only apply when the consumer supplied additional ids via `aria-labelledby`.\n const userIds = this.userAriaLabelledby();\n if (userIds || (ids.length > 1)) {\n el.setAttribute('aria-labelledby', ids.join(' '));\n } else {\n el.removeAttribute('aria-labelledby');\n }\n }\n\n /** @internal Called when the form-field container is clicked. */\n onContainerClick(_event: MouseEvent): void {\n if (!this._focused()) {\n this.focus();\n }\n }\n\n /** @internal */\n _onInput(): void {\n this._value.set(this._currentValue());\n }\n\n private _currentValue(): string {\n if (this.valueAccessor) {\n const v = this.valueAccessor.value;\n if (isSignal(v)) return this._stringify((v as Signal<unknown>)());\n return this._stringify(v);\n }\n return this.elementRef.nativeElement.value;\n }\n\n private _readInitialValue(): string {\n const el = this.elementRef.nativeElement;\n return el.value ?? '';\n }\n\n private _stringify(v: unknown): string {\n return v === null || v === undefined ? '' : String(v);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAmCA;;;;;AAKG;MACU,uBAAuB,GAAG,IAAI,cAAc,CAEtD,yBAAyB;AAE5B,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IAClC,QAAQ;IACR,UAAU;IACV,MAAM;IACN,QAAQ;IACR,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,QAAQ;AACT,CAAA,CAAC;AAEF,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IAChC,MAAM;IACN,gBAAgB;IAChB,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;AACR,CAAA,CAAC;AAEF,MAAM,aAAa,GAAG,EAAE,CACtB;AACE,IAAA,IAAI,EAAE,6EAA6E;AACnF,IAAA,QAAQ,EAAE;AACR,QAAA,WAAW,EAAE;AACX,YAAA,IAAI,EAAE,wEAAwE;AAC9E,YAAA,KAAK,EACH,8OAA8O;AACjP,SAAA;;;;;;;;;;;;;;AAcD,QAAA,SAAS,EAAE;AACT,YAAA,IAAI,EAAE,EAAE;AACR,YAAA,KAAK,EAAE,EAAE;AACV,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE,EAAE;AACN,YAAA,EAAE,EAAE,EAAE;AACN,YAAA,EAAE,EAAE,EAAE;AACN,YAAA,EAAE,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WU,cAAc,EAAA,UAAA,EAAA,CAAA;kBAhB1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mCAAmC;AAC7C,oBAAA,QAAQ,EAAE,SAAS;AACnB,oBAAA,SAAS,EAAE;AACT,wBAAA,EAAE,OAAO,EAAE,qBAAqB,EAAE,WAAW,gBAAgB,EAAE;AAChE,qBAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,WAAW,EAAE,MAAM;AACnB,wBAAA,aAAa,EAAE,6BAA6B;AAC5C,wBAAA,YAAY,EAAE,YAAY;AAC1B,wBAAA,qBAAqB,EAAE,sBAAsB;AAC7C,wBAAA,sBAAsB,EAAE,oBAAoB;AAC5C,wBAAA,SAAS,EAAE,YAAY;AACxB,qBAAA;AACF,iBAAA;;;AChLD;;AAEG;;;;"}
|
|
@@ -79,7 +79,16 @@ const itemVariants = tv({
|
|
|
79
79
|
},
|
|
80
80
|
current: {
|
|
81
81
|
true: {
|
|
82
|
-
|
|
82
|
+
// `-border-strong`, not `-border`. This ring IS the selection
|
|
83
|
+
// indicator, so WCAG 2.2 SC 1.4.11 applies to it against the
|
|
84
|
+
// `bg-primary-soft` fill it sits on — and the subtle tier does not
|
|
85
|
+
// clear 3:1 there in every scheme (measured 2026-09-04: 7 of 8 roles
|
|
86
|
+
// failed in `light`, 4 of 8 in `dark`). The theme layer cannot fix
|
|
87
|
+
// that: raising `-border` far enough collapses it onto
|
|
88
|
+
// `-border-strong`, which is the tier already sized for rings.
|
|
89
|
+
// `theme-contrast.spec.ts` asserts the `-border-strong`-on-`-soft`
|
|
90
|
+
// pairing for every role in every scheme.
|
|
91
|
+
root: 'bg-primary-soft ring-2 ring-inset ring-primary-border-strong',
|
|
83
92
|
},
|
|
84
93
|
false: {},
|
|
85
94
|
},
|