@xui/form-field 2.0.0-alpha.7 → 2.0.0-alpha.8
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/README.md +33 -23
- package/fesm2022/xui-form-field.mjs +24 -22
- package/fesm2022/xui-form-field.mjs.map +1 -1
- package/index.d.ts +27 -13
- package/package.json +4 -4
- package/lib/error.component.d.ts +0 -5
- package/lib/form-field.component.d.ts +0 -11
- package/lib/hint.component.d.ts +0 -5
package/README.md
CHANGED
|
@@ -4,17 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-

|
|
8
8
|
[](https://xuijs.org/)
|
|
9
|
-
[](https://www.npmjs.com/org/xui)
|
|
11
|
-
[](https://www.npmjs.com/org/xui)
|
|
12
|
-
[](https://bundlephobia.com/result?p=xui)
|
|
9
|
+
[](https://www.npmjs.com/org/xui)
|
|
13
10
|
[](/LICENSE)
|
|
14
|
-
[](https://discord.gg/aPkZsFcu)
|
|
15
11
|
[](https://app.netlify.com/sites/xui/deploys)
|
|
16
12
|
|
|
17
|
-
xUI is a customizable Angular
|
|
13
|
+
xUI is a customizable Angular 20 UI Library with full support of TailwindCSS styling based on popular React library ShardCN and its Angular alternative SpartanUI.
|
|
18
14
|
|
|
19
15
|
## Features
|
|
20
16
|
|
|
@@ -31,9 +27,31 @@ xUI is a customizable Angular 19 UI Library with full support of TailwindCSS sty
|
|
|
31
27
|
- [StackBlitz Demo](https://stackblitz.com/fork/xui)
|
|
32
28
|
- [Documentation](https://xuijs.org)
|
|
33
29
|
- [Live Demo](https://cord.dj/r)
|
|
30
|
+
- [Packages](#packages)
|
|
34
31
|
- [Installation](#installation)
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
- [Browser Support](#browser-support)
|
|
33
|
+
- [Development](#development)
|
|
34
|
+
- [Issues](#issues)
|
|
35
|
+
- [Roadmap](#roadmap)
|
|
36
|
+
|
|
37
|
+
## Packages
|
|
38
|
+
|
|
39
|
+
| Package | Usage | Description |
|
|
40
|
+
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
|
|
41
|
+
| Core | [](https://www.npmjs.com/package/%40xui/core)<br />[](https://www.npmjs.com/package/%40xui/core)<br />[](https://bundlephobia.com/result?p=%40xui/core) | Core package required by all other packages |
|
|
42
|
+
| Badge | [](https://www.npmjs.com/package/%40xui/badge)<br />[](https://www.npmjs.com/package/%40xui/badge)<br />[](https://bundlephobia.com/result?p=%40xui/badge) | Badge component |
|
|
43
|
+
| Breadcrumb | [](https://www.npmjs.com/package/%40xui/breadcrumb)<br />[](https://www.npmjs.com/package/%40xui/breadcrumb)<br />[](https://bundlephobia.com/result?p=%40xui/breadcrumb) | Breadcrumb component |
|
|
44
|
+
| Button | [](https://www.npmjs.com/package/%40xui/button)<br />[](https://www.npmjs.com/package/%40xui/button)<br />[](https://bundlephobia.com/result?p=%40xui/button) | Button component |
|
|
45
|
+
| Button Group | [](https://www.npmjs.com/package/%40xui/button-group)<br />[](https://www.npmjs.com/package/%40xui/button-group)<br />[](https://bundlephobia.com/result?p=%40xui/button-group) | Button Group component |
|
|
46
|
+
| Checkbox | [](https://www.npmjs.com/package/%40xui/checkbox)<br />[](https://www.npmjs.com/package/%40xui/checkbox)<br />[](https://bundlephobia.com/result?p=%40xui/checkbox) | Checkbox component |
|
|
47
|
+
| Form Field | [](https://www.npmjs.com/package/%40xui/form-field)<br />[](https://www.npmjs.com/package/%40xui/form-field)<br />[](https://bundlephobia.com/result?p=%40xui/form-field) | Form Field component |
|
|
48
|
+
| Icon | [](https://www.npmjs.com/package/%40xui/icon)<br />[](https://www.npmjs.com/package/%40xui/icon)<br />[](https://bundlephobia.com/result?p=%40xui/icon) | Icon component |
|
|
49
|
+
| Input | [](https://www.npmjs.com/package/%40xui/input)<br />[](https://www.npmjs.com/package/%40xui/input)<br />[](https://bundlephobia.com/result?p=%40xui/input) | Input component |
|
|
50
|
+
| Label | [](https://www.npmjs.com/package/%40xui/label)<br />[](https://www.npmjs.com/package/%40xui/label)<br />[](https://bundlephobia.com/result?p=%40xui/label) | Label component |
|
|
51
|
+
| Skeleton | [](https://www.npmjs.com/package/%40xui/skeleton)<br />[](https://www.npmjs.com/package/%40xui/skeleton)<br />[](https://bundlephobia.com/result?p=%40xui/skeleton) | Skeleton component |
|
|
52
|
+
| Sonner | [](https://www.npmjs.com/package/%40xui/sonner)<br />[](https://www.npmjs.com/package/%40xui/sonner)<br />[](https://bundlephobia.com/result?p=%40xui/sonner) | Sonner component |
|
|
53
|
+
| Status | [](https://www.npmjs.com/package/%40xui/status)<br />[](https://www.npmjs.com/package/%40xui/status)<br />[](https://bundlephobia.com/result?p=%40xui/status) | Status component |
|
|
54
|
+
| Table | [](https://www.npmjs.com/package/%40xui/table)<br />[](https://www.npmjs.com/package/%40xui/table)<br />[](https://bundlephobia.com/result?p=%40xui/table) | Table component |
|
|
37
55
|
|
|
38
56
|
## Installation
|
|
39
57
|
|
|
@@ -67,31 +85,22 @@ pnpm storybook
|
|
|
67
85
|
|
|
68
86
|
If you find any issues in the library or have and idea for an improvement feel free to open an [issue](https://github.com/Rikarin/xui/issues).
|
|
69
87
|
|
|
70
|
-
## Roadmap
|
|
88
|
+
## Roadmap
|
|
71
89
|
|
|
72
90
|
- [ ] Accordion
|
|
73
91
|
- [ ] Alert
|
|
74
92
|
- [ ] Alert Dialog
|
|
75
93
|
- [ ] Avatar
|
|
76
|
-
- [x] Badge
|
|
77
|
-
- [x] Breadcrumb
|
|
78
|
-
- [x] Button
|
|
79
|
-
- [x] Button Group
|
|
80
94
|
- [ ] Calendar
|
|
81
95
|
- [ ] Card
|
|
82
96
|
- [ ] Carousel
|
|
83
|
-
- [x] Checkbox
|
|
84
97
|
- [ ] Collapsible
|
|
85
98
|
- [ ] Combobox
|
|
86
99
|
- [ ] Command
|
|
87
100
|
- [ ] Date Picker
|
|
88
101
|
- [ ] Date Range Picker
|
|
89
102
|
- [ ] Dialog
|
|
90
|
-
- [x] Form Field
|
|
91
103
|
- [ ] Hover Card
|
|
92
|
-
- [x] Icon
|
|
93
|
-
- [x] Input
|
|
94
|
-
- [x] Label
|
|
95
104
|
- [ ] Menu
|
|
96
105
|
- [ ] Pagination
|
|
97
106
|
- [ ] Popover
|
|
@@ -101,17 +110,15 @@ If you find any issues in the library or have and idea for an improvement feel f
|
|
|
101
110
|
- [ ] Select
|
|
102
111
|
- [ ] Separator
|
|
103
112
|
- [ ] Sheet
|
|
104
|
-
- [x] Skeleton
|
|
105
113
|
- [ ] Slider
|
|
106
|
-
- [x] Sonner
|
|
107
114
|
- [ ] Spinner
|
|
108
|
-
- [x] Status
|
|
109
115
|
- [ ] Switch
|
|
110
|
-
- [ ] Table
|
|
111
116
|
- [ ] Tabs
|
|
112
117
|
- [ ] Toggle
|
|
113
118
|
- [ ] Tooltip
|
|
114
119
|
- [ ] Typography
|
|
120
|
+
- [ ] Input OTP
|
|
121
|
+
- [ ] Toggle Group
|
|
115
122
|
|
|
116
123
|
### Additional
|
|
117
124
|
|
|
@@ -149,4 +156,7 @@ Make cli to install the components
|
|
|
149
156
|
- data driven component
|
|
150
157
|
|
|
151
158
|
- Sonner
|
|
159
|
+
|
|
152
160
|
- Colors
|
|
161
|
+
|
|
162
|
+
- adjust generator to generate stories into the apps/storybook
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, contentChild, contentChildren, computed, effect, NgModule } from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, contentChild, contentChildren, computed, effect, NgModule } from '@angular/core';
|
|
3
3
|
import { XFormFieldControl } from '@xui/core/form-field';
|
|
4
4
|
|
|
5
5
|
class XuiErrorComponent {
|
|
6
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
7
|
-
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
6
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: XuiErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7
|
+
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.3", type: XuiErrorComponent, isStandalone: true, selector: "xui-error", host: { classAttribute: "block text-error text-sm font-medium" }, ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
8
8
|
}
|
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: XuiErrorComponent, decorators: [{
|
|
10
10
|
type: Component,
|
|
11
11
|
args: [{
|
|
12
12
|
selector: 'xui-error',
|
|
13
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
13
14
|
template: '<ng-content />',
|
|
14
15
|
host: {
|
|
15
16
|
class: 'block text-error text-sm font-medium'
|
|
@@ -28,34 +29,34 @@ class XuiFormFieldComponent {
|
|
|
28
29
|
}
|
|
29
30
|
});
|
|
30
31
|
}
|
|
31
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
32
|
-
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
33
|
-
<ng-content
|
|
32
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: XuiFormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
33
|
+
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.3", type: XuiFormFieldComponent, isStandalone: true, selector: "xui-form-field", host: { classAttribute: "block space-y-2" }, queries: [{ propertyName: "control", first: true, predicate: XFormFieldControl, descendants: true, isSignal: true }, { propertyName: "errorChildren", predicate: XuiErrorComponent, isSignal: true }], ngImport: i0, template: `
|
|
34
|
+
<ng-content />
|
|
34
35
|
|
|
35
36
|
@switch (hasDisplayedMessage()) {
|
|
36
37
|
@case ('error') {
|
|
37
|
-
<ng-content select="xui-error"
|
|
38
|
+
<ng-content select="xui-error" />
|
|
38
39
|
}
|
|
39
40
|
@default {
|
|
40
|
-
<ng-content select="xui-hint"
|
|
41
|
+
<ng-content select="xui-hint" />
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
|
-
`, isInline: true });
|
|
44
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
44
45
|
}
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: XuiFormFieldComponent, decorators: [{
|
|
46
47
|
type: Component,
|
|
47
48
|
args: [{
|
|
48
49
|
selector: 'xui-form-field',
|
|
49
|
-
|
|
50
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
50
51
|
template: `
|
|
51
|
-
<ng-content
|
|
52
|
+
<ng-content />
|
|
52
53
|
|
|
53
54
|
@switch (hasDisplayedMessage()) {
|
|
54
55
|
@case ('error') {
|
|
55
|
-
<ng-content select="xui-error"
|
|
56
|
+
<ng-content select="xui-error" />
|
|
56
57
|
}
|
|
57
58
|
@default {
|
|
58
|
-
<ng-content select="xui-hint"
|
|
59
|
+
<ng-content select="xui-hint" />
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
`,
|
|
@@ -66,13 +67,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
66
67
|
}], ctorParameters: () => [] });
|
|
67
68
|
|
|
68
69
|
class XuiHintComponent {
|
|
69
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
70
|
-
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
70
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: XuiHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
71
|
+
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.3", type: XuiHintComponent, isStandalone: true, selector: "xui-hint", host: { classAttribute: "block text-sm text-foreground/50" }, ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
71
72
|
}
|
|
72
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
73
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: XuiHintComponent, decorators: [{
|
|
73
74
|
type: Component,
|
|
74
75
|
args: [{
|
|
75
76
|
selector: 'xui-hint',
|
|
77
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
76
78
|
template: '<ng-content />',
|
|
77
79
|
host: {
|
|
78
80
|
class: 'block text-sm text-foreground/50'
|
|
@@ -82,11 +84,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
82
84
|
|
|
83
85
|
const XuiFormFieldImports = [XuiFormFieldComponent, XuiErrorComponent, XuiHintComponent];
|
|
84
86
|
class XuiFormFieldModule {
|
|
85
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
86
|
-
/** @nocollapse */ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
87
|
-
/** @nocollapse */ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
87
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: XuiFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
88
|
+
/** @nocollapse */ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.3", ngImport: i0, type: XuiFormFieldModule, imports: [XuiFormFieldComponent, XuiErrorComponent, XuiHintComponent], exports: [XuiFormFieldComponent, XuiErrorComponent, XuiHintComponent] });
|
|
89
|
+
/** @nocollapse */ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: XuiFormFieldModule });
|
|
88
90
|
}
|
|
89
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
91
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.3", ngImport: i0, type: XuiFormFieldModule, decorators: [{
|
|
90
92
|
type: NgModule,
|
|
91
93
|
args: [{
|
|
92
94
|
imports: [...XuiFormFieldImports],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xui-form-field.mjs","sources":["../../../../../../libs/ui/form-field/xui/src/lib/error.component.ts","../../../../../../libs/ui/form-field/xui/src/lib/form-field.component.ts","../../../../../../libs/ui/form-field/xui/src/lib/hint.component.ts","../../../../../../libs/ui/form-field/xui/src/index.ts","../../../../../../libs/ui/form-field/xui/src/xui-form-field.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'xui-error',\n template: '<ng-content />',\n host: {\n class: 'block text-error text-sm font-medium'\n }\n})\nexport class XuiErrorComponent {}\n","import { Component, computed, contentChild, contentChildren, effect } from '@angular/core';\nimport { XFormFieldControl } from '@xui/core/form-field';\nimport { XuiErrorComponent } from './error.component';\n\n@Component({\n selector: 'xui-form-field',\n imports: [],\n template: `\n <ng-content></ng-content>\n\n @switch (hasDisplayedMessage()) {\n @case ('error') {\n <ng-content select=\"xui-error\"></ng-content>\n }\n @default {\n <ng-content select=\"xui-hint\"></ng-content>\n }\n }\n `,\n host: {\n class: 'block space-y-2'\n }\n})\nexport class XuiFormFieldComponent {\n readonly control = contentChild(XFormFieldControl);\n readonly errorChildren = contentChildren(XuiErrorComponent);\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}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'xui-hint',\n template: '<ng-content />',\n host: {\n class: 'block text-sm text-foreground/50'\n }\n})\nexport class XuiHintComponent {}\n","import { NgModule } from '@angular/core';\nimport { XuiErrorComponent } from './lib/error.component';\nimport { XuiFormFieldComponent } from './lib/form-field.component';\nimport { XuiHintComponent } from './lib/hint.component';\nexport * from './lib/error.component';\nexport * from './lib/form-field.component';\nexport * from './lib/hint.component';\n\nexport const XuiFormFieldImports = [XuiFormFieldComponent, XuiErrorComponent, XuiHintComponent] as const;\n\n@NgModule({\n imports: [...XuiFormFieldImports],\n exports: [...XuiFormFieldImports]\n})\nexport class XuiFormFieldModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MASa,iBAAiB,CAAA;0HAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAjB,uBAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,uIALlB,gBAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAKf,iBAAiB,EAAA,UAAA,EAAA,CA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CAA1D,qBAAqB,EAAE,iBAAiB,EAAE,gBAAgB,CAAA,EAAA,CAAA;2HAMjF,kBAAkB,EAAA,CAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,mBAAmB,CAAC;AACjC,oBAAA,OAAO,EAAE,CAAC,GAAG,mBAAmB;AACjC,iBAAA;;;ACbD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"xui-form-field.mjs","sources":["../tmp-esm2022/lib/error.component.js","../tmp-esm2022/lib/form-field.component.js","../tmp-esm2022/lib/hint.component.js","../tmp-esm2022/index.js","../tmp-esm2022/xui-form-field.js"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport * as i0 from \"@angular/core\";\nexport class XuiErrorComponent {\n /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.0.3\", ngImport: i0, type: XuiErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\n /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"20.0.3\", type: XuiErrorComponent, isStandalone: true, selector: \"xui-error\", host: { classAttribute: \"block text-error text-sm font-medium\" }, ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.0.3\", ngImport: i0, type: XuiErrorComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'xui-error',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: '<ng-content />',\n host: {\n class: 'block text-error text-sm font-medium'\n }\n }]\n }] });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXJyb3IuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy91aS9mb3JtLWZpZWxkL3h1aS9zcmMvbGliL2Vycm9yLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQVVuRSxNQUFNLE9BQU8saUJBQWlCOzBIQUFqQixpQkFBaUI7OEdBQWpCLGlCQUFpQix1SUFMbEIsZ0JBQWdCOzsyRkFLZixpQkFBaUI7a0JBUjdCLFNBQVM7bUJBQUM7b0JBQ1QsUUFBUSxFQUFFLFdBQVc7b0JBQ3JCLGVBQWUsRUFBRSx1QkFBdUIsQ0FBQyxNQUFNO29CQUMvQyxRQUFRLEVBQUUsZ0JBQWdCO29CQUMxQixJQUFJLEVBQUU7d0JBQ0osS0FBSyxFQUFFLHNDQUFzQztxQkFDOUM7aUJBQ0YiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneSwgQ29tcG9uZW50IH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbkBDb21wb25lbnQoe1xuICBzZWxlY3RvcjogJ3h1aS1lcnJvcicsXG4gIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoLFxuICB0ZW1wbGF0ZTogJzxuZy1jb250ZW50IC8+JyxcbiAgaG9zdDoge1xuICAgIGNsYXNzOiAnYmxvY2sgdGV4dC1lcnJvciB0ZXh0LXNtIGZvbnQtbWVkaXVtJ1xuICB9XG59KVxuZXhwb3J0IGNsYXNzIFh1aUVycm9yQ29tcG9uZW50IHt9XG4iXX0=","import { ChangeDetectionStrategy, Component, computed, contentChild, contentChildren, effect } from '@angular/core';\nimport { XFormFieldControl } from '@xui/core/form-field';\nimport { XuiErrorComponent } from './error.component';\nimport * as i0 from \"@angular/core\";\nexport class XuiFormFieldComponent {\n control = contentChild(XFormFieldControl);\n errorChildren = contentChildren(XuiErrorComponent);\n hasDisplayedMessage = computed(() => this.errorChildren() && this.errorChildren().length > 0 && this.control()?.errorState() ? 'error' : 'hint');\n constructor() {\n effect(() => {\n if (!this.control()) {\n throw new Error('xui-form-field must contain an XFormFieldControl.');\n }\n });\n }\n /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.0.3\", ngImport: i0, type: XuiFormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\n /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"20.0.3\", type: XuiFormFieldComponent, isStandalone: true, selector: \"xui-form-field\", host: { classAttribute: \"block space-y-2\" }, queries: [{ propertyName: \"control\", first: true, predicate: XFormFieldControl, descendants: true, isSignal: true }, { propertyName: \"errorChildren\", predicate: XuiErrorComponent, isSignal: true }], ngImport: i0, template: `\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 }\n }\n `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.0.3\", ngImport: i0, type: XuiFormFieldComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'xui-form-field',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\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 }\n }\n `,\n host: {\n class: 'block space-y-2'\n }\n }]\n }], ctorParameters: () => [] });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS1maWVsZC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8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HtcbiAgICBjbGFzczogJ2Jsb2NrIHNwYWNlLXktMidcbiAgfVxufSlcbmV4cG9ydCBjbGFzcyBYdWlGb3JtRmllbGRDb21wb25lbnQge1xuICByZWFkb25seSBjb250cm9sID0gY29udGVudENoaWxkKFhGb3JtRmllbGRDb250cm9sKTtcbiAgcmVhZG9ubHkgZXJyb3JDaGlsZHJlbiA9IGNvbnRlbnRDaGlsZHJlbihYdWlFcnJvckNvbXBvbmVudCk7XG5cbiAgcHJvdGVjdGVkIHJlYWRvbmx5IGhhc0Rpc3BsYXllZE1lc3NhZ2UgPSBjb21wdXRlZDwnZXJyb3InIHwgJ2hpbnQnPigoKSA9PlxuICAgIHRoaXMuZXJyb3JDaGlsZHJlbigpICYmIHRoaXMuZXJyb3JDaGlsZHJlbigpLmxlbmd0aCA+IDAgJiYgdGhpcy5jb250cm9sKCk/LmVycm9yU3RhdGUoKSA/ICdlcnJvcicgOiAnaGludCdcbiAgKTtcblxuICBjb25zdHJ1Y3RvcigpIHtcbiAgICBlZmZlY3QoKCkgPT4ge1xuICAgICAgaWYgKCF0aGlzLmNvbnRyb2woKSkge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ3h1aS1mb3JtLWZpZWxkIG11c3QgY29udGFpbiBhbiBYRm9ybUZpZWxkQ29udHJvbC4nKTtcbiAgICAgIH1cbiAgICB9KTtcbiAgfVxufVxuIl19","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport * as i0 from \"@angular/core\";\nexport class XuiHintComponent {\n /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.0.3\", ngImport: i0, type: XuiHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\n /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"14.0.0\", version: \"20.0.3\", type: XuiHintComponent, isStandalone: true, selector: \"xui-hint\", host: { classAttribute: \"block text-sm text-foreground/50\" }, ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.0.3\", ngImport: i0, type: XuiHintComponent, decorators: [{\n type: Component,\n args: [{\n selector: 'xui-hint',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: '<ng-content />',\n host: {\n class: 'block text-sm text-foreground/50'\n }\n }]\n }] });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGludC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3VpL2Zvcm0tZmllbGQveHVpL3NyYy9saWIvaGludC5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFVbkUsTUFBTSxPQUFPLGdCQUFnQjswSEFBaEIsZ0JBQWdCOzhHQUFoQixnQkFBZ0Isa0lBTGpCLGdCQUFnQjs7MkZBS2YsZ0JBQWdCO2tCQVI1QixTQUFTO21CQUFDO29CQUNULFFBQVEsRUFBRSxVQUFVO29CQUNwQixlQUFlLEVBQUUsdUJBQXVCLENBQUMsTUFBTTtvQkFDL0MsUUFBUSxFQUFFLGdCQUFnQjtvQkFDMUIsSUFBSSxFQUFFO3dCQUNKLEtBQUssRUFBRSxrQ0FBa0M7cUJBQzFDO2lCQUNGIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3ksIENvbXBvbmVudCB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5AQ29tcG9uZW50KHtcbiAgc2VsZWN0b3I6ICd4dWktaGludCcsXG4gIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoLFxuICB0ZW1wbGF0ZTogJzxuZy1jb250ZW50IC8+JyxcbiAgaG9zdDoge1xuICAgIGNsYXNzOiAnYmxvY2sgdGV4dC1zbSB0ZXh0LWZvcmVncm91bmQvNTAnXG4gIH1cbn0pXG5leHBvcnQgY2xhc3MgWHVpSGludENvbXBvbmVudCB7fVxuIl19","import { NgModule } from '@angular/core';\nimport { XuiErrorComponent } from './lib/error.component';\nimport { XuiFormFieldComponent } from './lib/form-field.component';\nimport { XuiHintComponent } from './lib/hint.component';\nimport * as i0 from \"@angular/core\";\nexport * from './lib/error.component';\nexport * from './lib/form-field.component';\nexport * from './lib/hint.component';\nexport const XuiFormFieldImports = [XuiFormFieldComponent, XuiErrorComponent, XuiHintComponent];\nexport class XuiFormFieldModule {\n /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.0.3\", ngImport: i0, type: XuiFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n /** @nocollapse */ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"20.0.3\", ngImport: i0, type: XuiFormFieldModule, imports: [XuiFormFieldComponent, XuiErrorComponent, XuiHintComponent], exports: [XuiFormFieldComponent, XuiErrorComponent, XuiHintComponent] });\n /** @nocollapse */ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"20.0.3\", ngImport: i0, type: XuiFormFieldModule });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.0.3\", ngImport: i0, type: XuiFormFieldModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [...XuiFormFieldImports],\n exports: [...XuiFormFieldImports]\n }]\n }] });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL3VpL2Zvcm0tZmllb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WIvZm9ybS1maWVsZC5jb21wb25lbnQnO1xuaW1wb3J0IHsgWHVpSGludENvbXBvbmVudCB9IGZyb20gJy4vbGliL2hpbnQuY29tcG9uZW50JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2Vycm9yLmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9mb3JtLWZpZWxkLmNvbXBvbmVudCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9oaW50LmNvbXBvbmVudCc7XG5cbmV4cG9ydCBjb25zdCBYdWlGb3JtRmllbGRJbXBvcnRzID0gW1h1aUZvcm1GaWVsZENvbXBvbmVudCwgWHVpRXJyb3JDb21wb25lbnQsIFh1aUhpbnRDb21wb25lbnRdIGFzIGNvbnN0O1xuXG5ATmdNb2R1bGUoe1xuICBpbXBvcnRzOiBbLi4uWHVpRm9ybUZpZWxkSW1wb3J0c10sXG4gIGV4cG9ydHM6IFsuLi5YdWlGb3JtRmllbGRJbXBvcnRzXVxufSlcbmV4cG9ydCBjbGFzcyBYdWlGb3JtRmllbGRNb2R1bGUge31cbiJdfQ==","/**\n * Generated bundle index. Do not edit.\n */\nexport * from './index';\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoieHVpLWZvcm0tZmllbGQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL3VpL2Zvcm0tZmllbGQveHVpL3NyYy94dWktZm9ybS1maWVsZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ=="],"names":[],"mappings":";;;;AAEO,MAAM,iBAAiB,CAAC;AAC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E,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;AAChJ;AACA,EAAE,CAAC,wBAAwB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,UAAU,EAAE,CAAC;AAC5H,YAAY,IAAI,EAAE,QAAQ;AAC1B,YAAY,IAAI,EAAE,CAAC;AACnB,oBAAoB,OAAO,EAAE,CAAC,GAAG,mBAAmB,CAAC;AACrD,oBAAoB,OAAO,EAAE,CAAC,GAAG,mBAAmB;AACpD,iBAAiB;AACjB,SAAS,CAAC,EAAE,CAAC;;ACpBb;AACA;AACA;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -1,16 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { XFormFieldControl } from '@xui/core/form-field';
|
|
3
|
+
|
|
4
|
+
declare class XuiErrorComponent {
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<XuiErrorComponent, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<XuiErrorComponent, "xui-error", never, {}, {}, never, ["*"], true, never>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare class XuiFormFieldComponent {
|
|
10
|
+
readonly control: i0.Signal<XFormFieldControl | undefined>;
|
|
11
|
+
readonly errorChildren: i0.Signal<readonly XuiErrorComponent[]>;
|
|
12
|
+
protected readonly hasDisplayedMessage: i0.Signal<"error" | "hint">;
|
|
13
|
+
constructor();
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<XuiFormFieldComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<XuiFormFieldComponent, "xui-form-field", never, {}, {}, ["control", "errorChildren"], ["*", "xui-error", "xui-hint"], true, never>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare class XuiHintComponent {
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<XuiHintComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<XuiHintComponent, "xui-hint", never, {}, {}, never, ["*"], true, never>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare const XuiFormFieldImports: readonly [typeof XuiFormFieldComponent, typeof XuiErrorComponent, typeof XuiHintComponent];
|
|
24
|
+
declare class XuiFormFieldModule {
|
|
13
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<XuiFormFieldModule, never>;
|
|
14
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<XuiFormFieldModule, never, [typeof
|
|
26
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<XuiFormFieldModule, never, [typeof XuiFormFieldComponent, typeof XuiErrorComponent, typeof XuiHintComponent], [typeof XuiFormFieldComponent, typeof XuiErrorComponent, typeof XuiHintComponent]>;
|
|
15
27
|
static ɵinj: i0.ɵɵInjectorDeclaration<XuiFormFieldModule>;
|
|
16
28
|
}
|
|
29
|
+
|
|
30
|
+
export { XuiErrorComponent, XuiFormFieldComponent, XuiFormFieldImports, XuiFormFieldModule, XuiHintComponent };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xui/form-field",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
4
|
-
"description": "Modern Angular
|
|
3
|
+
"version": "2.0.0-alpha.8",
|
|
4
|
+
"description": "Modern Angular 20 UI Library based on TailwindCSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
7
7
|
"ui",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
],
|
|
21
21
|
"sideEffects": false,
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@angular/core": "
|
|
24
|
-
"@xui/core": "2"
|
|
23
|
+
"@angular/core": "20",
|
|
24
|
+
"@xui/core": "2.0.0-alpha.8"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|
package/lib/error.component.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { XFormFieldControl } from '@xui/core/form-field';
|
|
2
|
-
import { XuiErrorComponent } from './error.component';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class XuiFormFieldComponent {
|
|
5
|
-
readonly control: import("@angular/core").Signal<XFormFieldControl | undefined>;
|
|
6
|
-
readonly errorChildren: import("@angular/core").Signal<readonly XuiErrorComponent[]>;
|
|
7
|
-
protected readonly hasDisplayedMessage: import("@angular/core").Signal<"error" | "hint">;
|
|
8
|
-
constructor();
|
|
9
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<XuiFormFieldComponent, never>;
|
|
10
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<XuiFormFieldComponent, "xui-form-field", never, {}, {}, ["control", "errorChildren"], ["*", "xui-error", "xui-hint"], true, never>;
|
|
11
|
-
}
|
package/lib/hint.component.d.ts
DELETED