@xui/form-field 2.2.2 → 2.2.3
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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, contentChild, ElementRef, contentChildren, booleanAttribute, effect } from '@angular/core';
|
|
3
3
|
import { xui, createXConfigToken } from '@xui/core';
|
|
4
|
+
import { injectUniqueId } from '@xui/core/a11y';
|
|
4
5
|
import { XFormFieldControl } from '@xui/core/form-field';
|
|
5
6
|
import { cva } from 'class-variance-authority';
|
|
6
7
|
|
|
@@ -41,7 +42,6 @@ const [injectXuiFormFieldConfig, provideXuiFormFieldConfig] = createXConfigToken
|
|
|
41
42
|
inline: false
|
|
42
43
|
});
|
|
43
44
|
|
|
44
|
-
let nextId = 0;
|
|
45
45
|
const formFieldRootVariants = cva('', {
|
|
46
46
|
variants: {
|
|
47
47
|
inline: {
|
|
@@ -109,7 +109,7 @@ class XuiFormField {
|
|
|
109
109
|
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
110
110
|
/** Lay the label beside the control rather than above it. */
|
|
111
111
|
inline = input(this.config.inline, { ...(ngDevMode ? { debugName: "inline" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
112
|
-
generatedId =
|
|
112
|
+
generatedId = injectUniqueId('xui-form-field');
|
|
113
113
|
computedClass = computed(() => xui(formFieldRootVariants({ inline: this.inline() }), this.class()), /* @ts-ignore */
|
|
114
114
|
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
115
115
|
labelClass = computed(() => xui('text-foreground block text-sm font-medium', formFieldColorText({ color: this.color() })), /* @ts-ignore */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xui-form-field.mjs","sources":["../../../../../../libs/ui/form-field/xui/src/lib/error.ts","../../../../../../libs/ui/form-field/xui/src/lib/form-field.token.ts","../../../../../../libs/ui/form-field/xui/src/lib/form-field.ts","../../../../../../libs/ui/form-field/xui/src/lib/hint.ts","../../../../../../libs/ui/form-field/xui/src/index.ts","../../../../../../libs/ui/form-field/xui/src/xui-form-field.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from '@angular/core';\nimport { xui } from '@xui/core';\nimport type { ClassValue } from 'clsx';\n\n/**\n * A validation message for the control in a `xui-form-field`.\n *\n * ```html\n * <xui-error>Enter a valid address.</xui-error>\n * ```\n *\n * Project it into the field and it replaces the hint and helper text — but only while the control's\n * error state is actually set, so it can be written unconditionally and needs no `@if`.\n */\n@Component({\n selector: 'xui-error',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: '<ng-content />',\n host: {\n '[class]': 'computedClass()'\n }\n})\nexport class XuiError {\n /** Extra classes, merged into the component's own rather than replacing them. */\n readonly class = input<ClassValue>('');\n\n protected computedClass = computed(() => xui('block text-error text-sm font-medium', this.class()));\n}\n","import { createXConfigToken } from '@xui/core';\nimport { XuiFormFieldColor } from './form-field';\n\nexport interface XuiFormFieldConfig {\n color: XuiFormFieldColor;\n inline: boolean;\n}\n\nexport const [injectXuiFormFieldConfig, provideXuiFormFieldConfig] = createXConfigToken<XuiFormFieldConfig>(\n 'XuiFormFieldConfig',\n {\n color: 'none',\n inline: false\n }\n);\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n effect,\n ElementRef,\n input,\n ViewEncapsulation\n} from '@angular/core';\nimport { xui } from '@xui/core';\nimport { XFormFieldControl } from '@xui/core/form-field';\nimport { cva, VariantProps } from 'class-variance-authority';\nimport type { ClassValue } from 'clsx';\nimport { XuiError } from './error';\nimport { injectXuiFormFieldConfig } from './form-field.token';\n\nlet nextId = 0;\n\nexport const formFieldRootVariants = cva('', {\n variants: {\n inline: {\n false: 'block space-y-2',\n true: 'flex items-baseline gap-3'\n }\n },\n defaultVariants: { inline: false }\n});\n\n/** `color` tints the label and helper text with a deliberate accent. */\nexport const formFieldColorText = cva('', {\n variants: {\n color: {\n none: '',\n primary: 'text-primary',\n success: 'text-success',\n warning: 'text-warning',\n error: 'text-error'\n }\n },\n defaultVariants: { color: 'none' }\n});\n\nexport type XuiFormFieldColor = NonNullable<VariantProps<typeof formFieldColorText>['color']>;\n\n/**\n * Wraps a control with its label, helper text and validation message, and wires the three together.\n *\n * ```html\n * <xui-form-field label=\"Email\" labelInfo=\"(required)\" helperText=\"We never share it.\">\n * <input xuiInput [formControl]=\"email\" />\n * <xui-error>Enter a valid address.</xui-error>\n * </xui-form-field>\n * ```\n *\n * It finds the projected control through `XFormFieldControl`, so any xUI control registered under that\n * token works — input, textarea, select, numeric-input, file-input, html-select. The `<label for>` is\n * pointed at the real focusable element (the control's `controlId` when it wraps an inner input, else\n * its host, which the field gives an id if it has none), and the projected `xui-error` replaces the\n * hint only while the control actually reports an error. Throws if it contains no control.\n */\n@Component({\n selector: 'xui-form-field',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n @if (label() || subLabel()) {\n <div [class]=\"inline() ? 'shrink-0' : ''\">\n @if (label()) {\n <label [attr.for]=\"labelFor()\" [class]=\"labelClass()\">\n {{ label() }}\n @if (labelInfo()) {\n <span class=\"text-foreground-subtle font-normal\">{{ labelInfo() }}</span>\n }\n </label>\n }\n @if (subLabel()) {\n <span class=\"text-foreground-muted block text-xs\">{{ subLabel() }}</span>\n }\n </div>\n }\n\n <div [class]=\"inline() ? 'flex-1 space-y-1.5' : 'space-y-1.5'\">\n <ng-content />\n\n @switch (hasDisplayedMessage()) {\n @case ('error') {\n <ng-content select=\"xui-error\" />\n }\n @default {\n <ng-content select=\"xui-hint\" />\n @if (helperText()) {\n <span [class]=\"helperClass()\">{{ helperText() }}</span>\n }\n }\n }\n </div>\n `,\n host: {\n '[class]': 'computedClass()'\n }\n})\nexport class XuiFormField {\n private readonly config = injectXuiFormFieldConfig();\n\n /** The projected control, found through `XFormFieldControl`. Read-only; the field throws if there is none. */\n readonly control = contentChild(XFormFieldControl);\n private readonly controlEl = contentChild(XFormFieldControl, { read: ElementRef });\n /** The projected `xui-error` messages. Shown in place of the hint while the control reports an error. */\n readonly errorChildren = contentChildren(XuiError);\n\n /** Extra classes, merged into the component's own rather than replacing them. */\n readonly class = input<ClassValue>('');\n\n /** The primary label rendered above (or beside, when `inline`) the control. */\n readonly label = input<string>('');\n\n /** Secondary text shown next to the label, e.g. \"(optional)\". */\n readonly labelInfo = input<string>('');\n\n /** A smaller description under the label. */\n readonly subLabel = input<string>('');\n\n /** Muted helper text under the control, hidden while an error is shown. */\n readonly helperText = input<string>('');\n\n /** A deliberate accent for the label and helper text. */\n readonly color = input<XuiFormFieldColor>(this.config.color);\n\n /** Lay the label beside the control rather than above it. */\n readonly inline = input<boolean, BooleanInput>(this.config.inline, { transform: booleanAttribute });\n\n private readonly generatedId = `xui-form-field-${nextId++}`;\n\n protected readonly computedClass = computed(() =>\n xui(formFieldRootVariants({ inline: this.inline() }), this.class())\n );\n\n protected readonly labelClass = computed(() =>\n xui('text-foreground block text-sm font-medium', formFieldColorText({ color: this.color() }))\n );\n\n protected readonly helperClass = computed(() =>\n xui('block text-sm text-foreground-subtle', formFieldColorText({ color: this.color() }))\n );\n\n /**\n * The id the `<label>` points at — the control's declared `controlId` when it\n * has one (the focusable element inside a wrapping component), else the host\n * element's own id, else the id we assign below. The fallback branches agree\n * with the effect's assignment.\n */\n protected readonly labelFor = computed(() => {\n if (!this.label()) {\n return null;\n }\n\n const providedId = this.control()?.controlId?.();\n\n if (providedId) {\n return providedId;\n }\n\n const el = this.controlEl()?.nativeElement as HTMLElement | undefined;\n return el?.id || this.generatedId;\n });\n\n protected readonly hasDisplayedMessage = computed<'error' | 'hint'>(() =>\n this.errorChildren() && this.errorChildren().length > 0 && this.control()?.errorState() ? 'error' : 'hint'\n );\n\n constructor() {\n effect(() => {\n if (!this.control()) {\n throw new Error('xui-form-field must contain an XFormFieldControl.');\n }\n });\n\n // Give the projected control our generated id (unless it already has one, or\n // it points the label at an inner element via `controlId`) so the rendered\n // <label for> genuinely points at it.\n effect(() => {\n const el = this.controlEl()?.nativeElement as HTMLElement | undefined;\n if (this.label() && el && !el.id && !this.control()?.controlId?.()) {\n el.id = this.generatedId;\n }\n });\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from '@angular/core';\nimport { xui } from '@xui/core';\nimport type { ClassValue } from 'clsx';\n\n/**\n * Supporting text under the control in a `xui-form-field`.\n *\n * ```html\n * <xui-hint>Use the address you signed up with.</xui-hint>\n * ```\n *\n * The projected form of the field's `helperText` input, for hints that need markup rather than a plain\n * string. Hidden while a `xui-error` is showing.\n */\n@Component({\n selector: 'xui-hint',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: '<ng-content />',\n host: {\n '[class]': 'computedClass()'\n }\n})\nexport class XuiHint {\n /** Extra classes, merged into the component's own rather than replacing them. */\n readonly class = input<ClassValue>('');\n\n protected computedClass = computed(() => xui('block text-sm text-foreground-subtle', this.class()));\n}\n","import { XuiError } from './lib/error';\nimport { XuiFormField } from './lib/form-field';\nimport { XuiHint } from './lib/hint';\nexport * from './lib/error';\nexport * from './lib/form-field';\nexport * from './lib/form-field.token';\nexport * from './lib/hint';\n\nexport const XuiFormFieldImports = [XuiFormField, XuiError, XuiHint] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAIA;;;;;;;;;AASG;MAUU,QAAQ,CAAA;;IAEV,KAAK,GAAG,KAAK,CAAa,EAAE;8EAAC;AAE5B,IAAA,aAAa,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,sCAAsC,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;sFAAC;0HAJxF,QAAQ,E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A;;;ACdM,MAAM,mBAAmB,GAAG,CAAC,YAAY,EAAE,QAAQ,EAAE,OAAO;;ACRnE;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"xui-form-field.mjs","sources":["../../../../../../libs/ui/form-field/xui/src/lib/error.ts","../../../../../../libs/ui/form-field/xui/src/lib/form-field.token.ts","../../../../../../libs/ui/form-field/xui/src/lib/form-field.ts","../../../../../../libs/ui/form-field/xui/src/lib/hint.ts","../../../../../../libs/ui/form-field/xui/src/index.ts","../../../../../../libs/ui/form-field/xui/src/xui-form-field.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from '@angular/core';\nimport { xui } from '@xui/core';\nimport type { ClassValue } from 'clsx';\n\n/**\n * A validation message for the control in a `xui-form-field`.\n *\n * ```html\n * <xui-error>Enter a valid address.</xui-error>\n * ```\n *\n * Project it into the field and it replaces the hint and helper text — but only while the control's\n * error state is actually set, so it can be written unconditionally and needs no `@if`.\n */\n@Component({\n selector: 'xui-error',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: '<ng-content />',\n host: {\n '[class]': 'computedClass()'\n }\n})\nexport class XuiError {\n /** Extra classes, merged into the component's own rather than replacing them. */\n readonly class = input<ClassValue>('');\n\n protected computedClass = computed(() => xui('block text-error text-sm font-medium', this.class()));\n}\n","import { createXConfigToken } from '@xui/core';\nimport { XuiFormFieldColor } from './form-field';\n\nexport interface XuiFormFieldConfig {\n color: XuiFormFieldColor;\n inline: boolean;\n}\n\nexport const [injectXuiFormFieldConfig, provideXuiFormFieldConfig] = createXConfigToken<XuiFormFieldConfig>(\n 'XuiFormFieldConfig',\n {\n color: 'none',\n inline: false\n }\n);\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n effect,\n ElementRef,\n input,\n ViewEncapsulation\n} from '@angular/core';\nimport { xui } from '@xui/core';\nimport { injectUniqueId } from '@xui/core/a11y';\nimport { XFormFieldControl } from '@xui/core/form-field';\nimport { cva, VariantProps } from 'class-variance-authority';\nimport type { ClassValue } from 'clsx';\nimport { XuiError } from './error';\nimport { injectXuiFormFieldConfig } from './form-field.token';\n\nexport const formFieldRootVariants = cva('', {\n variants: {\n inline: {\n false: 'block space-y-2',\n true: 'flex items-baseline gap-3'\n }\n },\n defaultVariants: { inline: false }\n});\n\n/** `color` tints the label and helper text with a deliberate accent. */\nexport const formFieldColorText = cva('', {\n variants: {\n color: {\n none: '',\n primary: 'text-primary',\n success: 'text-success',\n warning: 'text-warning',\n error: 'text-error'\n }\n },\n defaultVariants: { color: 'none' }\n});\n\nexport type XuiFormFieldColor = NonNullable<VariantProps<typeof formFieldColorText>['color']>;\n\n/**\n * Wraps a control with its label, helper text and validation message, and wires the three together.\n *\n * ```html\n * <xui-form-field label=\"Email\" labelInfo=\"(required)\" helperText=\"We never share it.\">\n * <input xuiInput [formControl]=\"email\" />\n * <xui-error>Enter a valid address.</xui-error>\n * </xui-form-field>\n * ```\n *\n * It finds the projected control through `XFormFieldControl`, so any xUI control registered under that\n * token works — input, textarea, select, numeric-input, file-input, html-select. The `<label for>` is\n * pointed at the real focusable element (the control's `controlId` when it wraps an inner input, else\n * its host, which the field gives an id if it has none), and the projected `xui-error` replaces the\n * hint only while the control actually reports an error. Throws if it contains no control.\n */\n@Component({\n selector: 'xui-form-field',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: `\n @if (label() || subLabel()) {\n <div [class]=\"inline() ? 'shrink-0' : ''\">\n @if (label()) {\n <label [attr.for]=\"labelFor()\" [class]=\"labelClass()\">\n {{ label() }}\n @if (labelInfo()) {\n <span class=\"text-foreground-subtle font-normal\">{{ labelInfo() }}</span>\n }\n </label>\n }\n @if (subLabel()) {\n <span class=\"text-foreground-muted block text-xs\">{{ subLabel() }}</span>\n }\n </div>\n }\n\n <div [class]=\"inline() ? 'flex-1 space-y-1.5' : 'space-y-1.5'\">\n <ng-content />\n\n @switch (hasDisplayedMessage()) {\n @case ('error') {\n <ng-content select=\"xui-error\" />\n }\n @default {\n <ng-content select=\"xui-hint\" />\n @if (helperText()) {\n <span [class]=\"helperClass()\">{{ helperText() }}</span>\n }\n }\n }\n </div>\n `,\n host: {\n '[class]': 'computedClass()'\n }\n})\nexport class XuiFormField {\n private readonly config = injectXuiFormFieldConfig();\n\n /** The projected control, found through `XFormFieldControl`. Read-only; the field throws if there is none. */\n readonly control = contentChild(XFormFieldControl);\n private readonly controlEl = contentChild(XFormFieldControl, { read: ElementRef });\n /** The projected `xui-error` messages. Shown in place of the hint while the control reports an error. */\n readonly errorChildren = contentChildren(XuiError);\n\n /** Extra classes, merged into the component's own rather than replacing them. */\n readonly class = input<ClassValue>('');\n\n /** The primary label rendered above (or beside, when `inline`) the control. */\n readonly label = input<string>('');\n\n /** Secondary text shown next to the label, e.g. \"(optional)\". */\n readonly labelInfo = input<string>('');\n\n /** A smaller description under the label. */\n readonly subLabel = input<string>('');\n\n /** Muted helper text under the control, hidden while an error is shown. */\n readonly helperText = input<string>('');\n\n /** A deliberate accent for the label and helper text. */\n readonly color = input<XuiFormFieldColor>(this.config.color);\n\n /** Lay the label beside the control rather than above it. */\n readonly inline = input<boolean, BooleanInput>(this.config.inline, { transform: booleanAttribute });\n\n private readonly generatedId = injectUniqueId('xui-form-field');\n\n protected readonly computedClass = computed(() =>\n xui(formFieldRootVariants({ inline: this.inline() }), this.class())\n );\n\n protected readonly labelClass = computed(() =>\n xui('text-foreground block text-sm font-medium', formFieldColorText({ color: this.color() }))\n );\n\n protected readonly helperClass = computed(() =>\n xui('block text-sm text-foreground-subtle', formFieldColorText({ color: this.color() }))\n );\n\n /**\n * The id the `<label>` points at — the control's declared `controlId` when it\n * has one (the focusable element inside a wrapping component), else the host\n * element's own id, else the id we assign below. The fallback branches agree\n * with the effect's assignment.\n */\n protected readonly labelFor = computed(() => {\n if (!this.label()) {\n return null;\n }\n\n const providedId = this.control()?.controlId?.();\n\n if (providedId) {\n return providedId;\n }\n\n const el = this.controlEl()?.nativeElement as HTMLElement | undefined;\n return el?.id || this.generatedId;\n });\n\n protected readonly hasDisplayedMessage = computed<'error' | 'hint'>(() =>\n this.errorChildren() && this.errorChildren().length > 0 && this.control()?.errorState() ? 'error' : 'hint'\n );\n\n constructor() {\n effect(() => {\n if (!this.control()) {\n throw new Error('xui-form-field must contain an XFormFieldControl.');\n }\n });\n\n // Give the projected control our generated id (unless it already has one, or\n // it points the label at an inner element via `controlId`) so the rendered\n // <label for> genuinely points at it.\n effect(() => {\n const el = this.controlEl()?.nativeElement as HTMLElement | undefined;\n if (this.label() && el && !el.id && !this.control()?.controlId?.()) {\n el.id = this.generatedId;\n }\n });\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from '@angular/core';\nimport { xui } from '@xui/core';\nimport type { ClassValue } from 'clsx';\n\n/**\n * Supporting text under the control in a `xui-form-field`.\n *\n * ```html\n * <xui-hint>Use the address you signed up with.</xui-hint>\n * ```\n *\n * The projected form of the field's `helperText` input, for hints that need markup rather than a plain\n * string. Hidden while a `xui-error` is showing.\n */\n@Component({\n selector: 'xui-hint',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n template: '<ng-content />',\n host: {\n '[class]': 'computedClass()'\n }\n})\nexport class XuiHint {\n /** Extra classes, merged into the component's own rather than replacing them. */\n readonly class = input<ClassValue>('');\n\n protected computedClass = computed(() => xui('block text-sm text-foreground-subtle', this.class()));\n}\n","import { XuiError } from './lib/error';\nimport { XuiFormField } from './lib/form-field';\nimport { XuiHint } from './lib/hint';\nexport * from './lib/error';\nexport * from './lib/form-field';\nexport * from './lib/form-field.token';\nexport * from './lib/hint';\n\nexport const XuiFormFieldImports = [XuiFormField, XuiError, XuiHint] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAIA;;;;;;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B,CAAC,MAAM;oBAC/C,aAAa,EAAE,iBAAiB,CAAC,IAAI;AACrC,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE;AACZ;AACF,iBAAA;;;ACdM,MAAM,mBAAmB,GAAG,CAAC,YAAY,EAAE,QAAQ,EAAE,OAAO;;ACRnE;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xui/form-field",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3",
|
|
4
4
|
"description": "Modern Angular 22 UI Library based on TailwindCSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@angular/cdk": "22",
|
|
40
40
|
"@angular/core": "22",
|
|
41
|
-
"@xui/core": "2.2.
|
|
41
|
+
"@xui/core": "2.2.3",
|
|
42
42
|
"class-variance-authority": "^0.7.1",
|
|
43
43
|
"clsx": "^2.1.1"
|
|
44
44
|
},
|