@xui/label 2.0.0-alpha.1 → 2.0.0-alpha.12
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/LICENSE +201 -0
- package/README.md +176 -125
- package/fesm2022/xui-label.mjs +28 -20
- package/fesm2022/xui-label.mjs.map +1 -1
- package/package.json +22 -21
- package/types/xui-label.d.ts +29 -0
- package/index.d.ts +0 -1
- package/lib/label.directive.d.ts +0 -23
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Rikarin
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,152 +1,203 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
1
|
+
<h1 align="center">xUI</h1>
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<strong>90 Angular components, one npm package each, themed from a single token layer.</strong>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://xuijs.org">Documentation</a> ·
|
|
9
|
+
<a href="https://develop--67d2b4c756077a325913e5d9.chromatic.com/?globals=theme:dark">Storybook</a> ·
|
|
10
|
+
<a href="https://stackblitz.com/fork/xui">StackBlitz</a> ·
|
|
11
|
+
<a href="#components">Components</a>
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
<p align="center">
|
|
15
|
+
<a href="https://github.com/rikarin/xui/actions/workflows/release.yml"><img src="https://github.com/rikarin/xui/actions/workflows/release.yml/badge.svg?branch=master" alt="Build status" /></a>
|
|
16
|
+
<a href="https://www.npmjs.com/package/@xui/core"><img src="https://img.shields.io/npm/v/%40xui/core.svg" alt="npm version" /></a>
|
|
17
|
+
<a href="https://www.npmjs.com/org/xui"><img src="https://img.shields.io/npm/dm/%40xui/core.svg" alt="Downloads" /></a>
|
|
18
|
+
<a href="https://app.netlify.com/sites/xui/deploys"><img src="https://api.netlify.com/api/v1/badges/fa0cfd14-97df-47fa-8a7c-152e6d4cfda2/deploy-status" alt="Netlify status" /></a>
|
|
3
19
|
</p>
|
|
4
20
|
|
|
5
21
|
---
|
|
6
22
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
[](https://discord.gg/aPkZsFcu)
|
|
15
|
-
[](https://app.netlify.com/sites/xui/deploys)
|
|
23
|
+
xUI is an Angular 22 component library styled with Tailwind CSS 4. You compose it from directives and
|
|
24
|
+
standalone components rather than configuring one monolith, and the set goes well past the
|
|
25
|
+
primitives: data tables, dock managers, omnibars, node graphs and date ranges are packages here, not
|
|
26
|
+
things you are left to build.
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import { XuiButtonImports } from '@xui/button';
|
|
16
30
|
|
|
17
|
-
|
|
31
|
+
@Component({
|
|
32
|
+
imports: [XuiButtonImports],
|
|
33
|
+
template: `<button xuiButton color="primary">Save changes</button>`
|
|
34
|
+
})
|
|
35
|
+
export class Example {}
|
|
36
|
+
```
|
|
18
37
|
|
|
19
38
|
## Features
|
|
20
39
|
|
|
21
|
-
- **
|
|
22
|
-
|
|
23
|
-
- **
|
|
24
|
-
|
|
25
|
-
- **
|
|
26
|
-
-
|
|
40
|
+
- **One package per component.** Install `@xui/button` and you ship a button, not a library. Each
|
|
41
|
+
package exports an imports barrel for standalone components.
|
|
42
|
+
- **Signals throughout.** Signal inputs, `OnPush` and zoneless change detection; no `zone.js`
|
|
43
|
+
required.
|
|
44
|
+
- **Themed by tokens, not overrides.** Components style themselves with `bg-surface`,
|
|
45
|
+
`text-foreground-muted`, `border-error-muted`. Light and dark both work without a single `dark:`
|
|
46
|
+
class, and re-colouring an intent is one CSS variable.
|
|
47
|
+
- **Typed variants.** Every visual axis is a typed input backed by
|
|
48
|
+
[CVA](https://cva.style), and the `class` input merges through `tailwind-merge` — your utility
|
|
49
|
+
wins instead of fighting the component's.
|
|
50
|
+
- **Angular CDK underneath.** Overlays, focus traps, roving tabindex, typeahead, drag and drop and
|
|
51
|
+
bidi come from `@angular/cdk`, so keyboard behaviour and RTL are not reimplemented per component.
|
|
52
|
+
- **Built for coding agents.** An MCP server and an agent skill expose the real API of every
|
|
53
|
+
package — see [AI coding agents](#ai-coding-agents).
|
|
54
|
+
|
|
55
|
+
## Requirements
|
|
56
|
+
|
|
57
|
+
| | |
|
|
58
|
+
| ----------------------- | --- |
|
|
59
|
+
| Angular | 22 |
|
|
60
|
+
| Tailwind CSS | 4 |
|
|
61
|
+
| Node (development only) | 24 |
|
|
62
|
+
|
|
63
|
+
## Getting started
|
|
27
64
|
|
|
28
|
-
|
|
65
|
+
```bash
|
|
66
|
+
ng add @xui/core
|
|
67
|
+
```
|
|
29
68
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
- [Installation](#installation)
|
|
69
|
+
That installs the core package and wires your global stylesheet: the theme import, the CDK overlay
|
|
70
|
+
stylesheet, and a `@source` glob pointing at the published packages. It is idempotent, so running it
|
|
71
|
+
again only adds what is missing. Use `nx add @xui/core` in an Nx workspace, and `--skip-overlay` if
|
|
72
|
+
you will not use dialogs, drawers, popovers, tooltips, menus or toasts.
|
|
35
73
|
|
|
36
|
-
|
|
74
|
+
Then add the components you need:
|
|
37
75
|
|
|
38
|
-
|
|
76
|
+
```bash
|
|
77
|
+
pnpm add @xui/button @xui/dialog @xui/icon
|
|
78
|
+
```
|
|
39
79
|
|
|
40
|
-
|
|
80
|
+
## Theming
|
|
41
81
|
|
|
42
|
-
|
|
43
|
-
|
|
82
|
+
To wire the styles by hand, import the token layer once after Tailwind:
|
|
83
|
+
|
|
84
|
+
```css
|
|
85
|
+
@import 'tailwindcss';
|
|
86
|
+
@import '@xui/core/styles/theme.css';
|
|
87
|
+
|
|
88
|
+
/* Only needed for an overlay surface — popover, tooltip, menu, dialog, drawer
|
|
89
|
+
or toast. Without it, overlays render in the document flow. */
|
|
90
|
+
@import '@angular/cdk/overlay-prebuilt.css';
|
|
91
|
+
|
|
92
|
+
/* Tailwind only emits utilities it can see, and it cannot see node_modules by default. */
|
|
93
|
+
@source '../node_modules/@xui';
|
|
44
94
|
```
|
|
45
95
|
|
|
46
|
-
|
|
96
|
+
Put `.dark` (or `[data-theme='dark']`) on `<html>` to switch themes; with neither present the theme
|
|
97
|
+
follows `prefers-color-scheme`. Both selectors work on any element, so a subtree can render in the
|
|
98
|
+
opposite theme.
|
|
47
99
|
|
|
48
|
-
|
|
100
|
+
Re-theme by overriding tokens after the import. The `darker` / `lighter` / `subtle` / `muted` /
|
|
101
|
+
`emphasis` steps of each intent are derived, so one declaration re-colours the whole ramp:
|
|
49
102
|
|
|
50
|
-
|
|
103
|
+
```css
|
|
104
|
+
:root {
|
|
105
|
+
--primary: var(--color-violet-600);
|
|
106
|
+
--surface-inset: var(--color-zinc-50);
|
|
107
|
+
}
|
|
108
|
+
```
|
|
51
109
|
|
|
52
|
-
|
|
110
|
+
Controls share one density scale — 24 / 30 / 40px for `sm` / default / `lg` — so a button, an input
|
|
111
|
+
and a date field on the same row line up. Override `--control-height-md` to re-tune the library.
|
|
53
112
|
|
|
54
|
-
|
|
113
|
+
The full token reference, rendered in both themes, is the **Design tokens** page in Storybook.
|
|
55
114
|
|
|
56
|
-
|
|
57
|
-
|
|
115
|
+
## Components
|
|
116
|
+
|
|
117
|
+
<details>
|
|
118
|
+
<summary><strong>All 90 packages</strong>, grouped as they appear in Storybook</summary>
|
|
119
|
+
|
|
120
|
+
<br />
|
|
121
|
+
|
|
122
|
+
**Foundations** — [`@xui/icon`](https://www.npmjs.com/package/@xui/icon) · [`@xui/link`](https://www.npmjs.com/package/@xui/link) · [`@xui/text`](https://www.npmjs.com/package/@xui/text)
|
|
123
|
+
|
|
124
|
+
**Actions** — [`@xui/button`](https://www.npmjs.com/package/@xui/button) · [`@xui/button-group`](https://www.npmjs.com/package/@xui/button-group) · [`@xui/hotkeys`](https://www.npmjs.com/package/@xui/hotkeys)
|
|
125
|
+
|
|
126
|
+
**Forms** — [`@xui/cascader`](https://www.npmjs.com/package/@xui/cascader) · [`@xui/checkbox`](https://www.npmjs.com/package/@xui/checkbox) · [`@xui/color-picker`](https://www.npmjs.com/package/@xui/color-picker) · [`@xui/control-card`](https://www.npmjs.com/package/@xui/control-card) · [`@xui/control-group`](https://www.npmjs.com/package/@xui/control-group) · [`@xui/editable-text`](https://www.npmjs.com/package/@xui/editable-text) · [`@xui/file-input`](https://www.npmjs.com/package/@xui/file-input) · [`@xui/form-field`](https://www.npmjs.com/package/@xui/form-field) · [`@xui/html-select`](https://www.npmjs.com/package/@xui/html-select) · [`@xui/input`](https://www.npmjs.com/package/@xui/input) · [`@xui/input-otp`](https://www.npmjs.com/package/@xui/input-otp) · [`@xui/label`](https://www.npmjs.com/package/@xui/label) · [`@xui/multi-select`](https://www.npmjs.com/package/@xui/multi-select) · [`@xui/numeric-input`](https://www.npmjs.com/package/@xui/numeric-input) · [`@xui/radio`](https://www.npmjs.com/package/@xui/radio) · [`@xui/rate`](https://www.npmjs.com/package/@xui/rate) · [`@xui/rich-text-editor`](https://www.npmjs.com/package/@xui/rich-text-editor) · [`@xui/segmented-control`](https://www.npmjs.com/package/@xui/segmented-control) · [`@xui/select`](https://www.npmjs.com/package/@xui/select) · [`@xui/slider`](https://www.npmjs.com/package/@xui/slider) · [`@xui/suggest`](https://www.npmjs.com/package/@xui/suggest) · [`@xui/switch`](https://www.npmjs.com/package/@xui/switch) · [`@xui/tag-input`](https://www.npmjs.com/package/@xui/tag-input) · [`@xui/textarea`](https://www.npmjs.com/package/@xui/textarea) · [`@xui/transfer`](https://www.npmjs.com/package/@xui/transfer) · [`@xui/tree-select`](https://www.npmjs.com/package/@xui/tree-select) · [`@xui/upload`](https://www.npmjs.com/package/@xui/upload)
|
|
127
|
+
|
|
128
|
+
**Date & time** — [`@xui/date-input`](https://www.npmjs.com/package/@xui/date-input) · [`@xui/date-picker`](https://www.npmjs.com/package/@xui/date-picker) · [`@xui/date-range-input`](https://www.npmjs.com/package/@xui/date-range-input) · [`@xui/date-range-picker`](https://www.npmjs.com/package/@xui/date-range-picker) · [`@xui/time-picker`](https://www.npmjs.com/package/@xui/time-picker) · [`@xui/timezone-select`](https://www.npmjs.com/package/@xui/timezone-select)
|
|
129
|
+
|
|
130
|
+
**Data display** — [`@xui/avatar`](https://www.npmjs.com/package/@xui/avatar) · [`@xui/badge`](https://www.npmjs.com/package/@xui/badge) · [`@xui/card`](https://www.npmjs.com/package/@xui/card) · [`@xui/card-list`](https://www.npmjs.com/package/@xui/card-list) · [`@xui/carousel`](https://www.npmjs.com/package/@xui/carousel) · [`@xui/data-table`](https://www.npmjs.com/package/@xui/data-table) · [`@xui/descriptions`](https://www.npmjs.com/package/@xui/descriptions) · [`@xui/entity-title`](https://www.npmjs.com/package/@xui/entity-title) · [`@xui/kbd`](https://www.npmjs.com/package/@xui/kbd) · [`@xui/statistic`](https://www.npmjs.com/package/@xui/statistic) · [`@xui/status`](https://www.npmjs.com/package/@xui/status) · [`@xui/table`](https://www.npmjs.com/package/@xui/table) · [`@xui/tag`](https://www.npmjs.com/package/@xui/tag) · [`@xui/timeline`](https://www.npmjs.com/package/@xui/timeline) · [`@xui/tree`](https://www.npmjs.com/package/@xui/tree)
|
|
131
|
+
|
|
132
|
+
**Navigation** — [`@xui/breadcrumb`](https://www.npmjs.com/package/@xui/breadcrumb) · [`@xui/menubar`](https://www.npmjs.com/package/@xui/menubar) · [`@xui/navbar`](https://www.npmjs.com/package/@xui/navbar) · [`@xui/navigation-menu`](https://www.npmjs.com/package/@xui/navigation-menu) · [`@xui/pagination`](https://www.npmjs.com/package/@xui/pagination) · [`@xui/panel-stack`](https://www.npmjs.com/package/@xui/panel-stack) · [`@xui/steps`](https://www.npmjs.com/package/@xui/steps) · [`@xui/tabs`](https://www.npmjs.com/package/@xui/tabs)
|
|
133
|
+
|
|
134
|
+
**Overlays** — [`@xui/alert`](https://www.npmjs.com/package/@xui/alert) · [`@xui/alert-dialog`](https://www.npmjs.com/package/@xui/alert-dialog) · [`@xui/context-menu`](https://www.npmjs.com/package/@xui/context-menu) · [`@xui/dialog`](https://www.npmjs.com/package/@xui/dialog) · [`@xui/drawer`](https://www.npmjs.com/package/@xui/drawer) · [`@xui/menu`](https://www.npmjs.com/package/@xui/menu) · [`@xui/omnibar`](https://www.npmjs.com/package/@xui/omnibar) · [`@xui/popover`](https://www.npmjs.com/package/@xui/popover) · [`@xui/toast`](https://www.npmjs.com/package/@xui/toast) · [`@xui/tooltip`](https://www.npmjs.com/package/@xui/tooltip)
|
|
135
|
+
|
|
136
|
+
**Feedback** — [`@xui/callout`](https://www.npmjs.com/package/@xui/callout) · [`@xui/non-ideal-state`](https://www.npmjs.com/package/@xui/non-ideal-state) · [`@xui/progress-bar`](https://www.npmjs.com/package/@xui/progress-bar) · [`@xui/result`](https://www.npmjs.com/package/@xui/result) · [`@xui/skeleton`](https://www.npmjs.com/package/@xui/skeleton) · [`@xui/spinner`](https://www.npmjs.com/package/@xui/spinner)
|
|
137
|
+
|
|
138
|
+
**Layout** — [`@xui/accordion`](https://www.npmjs.com/package/@xui/accordion) · [`@xui/aspect-ratio`](https://www.npmjs.com/package/@xui/aspect-ratio) · [`@xui/collapse`](https://www.npmjs.com/package/@xui/collapse) · [`@xui/divider`](https://www.npmjs.com/package/@xui/divider) · [`@xui/dock-manager`](https://www.npmjs.com/package/@xui/dock-manager) · [`@xui/overflow-list`](https://www.npmjs.com/package/@xui/overflow-list) · [`@xui/scroll-area`](https://www.npmjs.com/package/@xui/scroll-area) · [`@xui/section`](https://www.npmjs.com/package/@xui/section) · [`@xui/splitter`](https://www.npmjs.com/package/@xui/splitter)
|
|
139
|
+
|
|
140
|
+
**Visualisation** — [`@xui/echarts`](https://www.npmjs.com/package/@xui/echarts) · [`@xui/konva`](https://www.npmjs.com/package/@xui/konva) · [`@xui/node-graph`](https://www.npmjs.com/package/@xui/node-graph)
|
|
141
|
+
|
|
142
|
+
</details>
|
|
143
|
+
|
|
144
|
+
## AI coding agents
|
|
145
|
+
|
|
146
|
+
Two pieces of tooling teach coding agents how to build with xUI.
|
|
147
|
+
|
|
148
|
+
**MCP server** — [`@xui/mcp`](libs/mcp/README.md) exposes every package's real API (selectors, signal
|
|
149
|
+
inputs, variant axes, outputs), the design tokens, the docs and the Storybook examples as MCP tools.
|
|
150
|
+
It extracts them from the library sources, so every package is covered and the answers match the
|
|
151
|
+
installed version.
|
|
152
|
+
|
|
153
|
+
```json
|
|
154
|
+
{
|
|
155
|
+
"mcpServers": {
|
|
156
|
+
"xui": { "command": "npx", "args": ["-y", "@xui/mcp"] }
|
|
157
|
+
}
|
|
158
|
+
}
|
|
58
159
|
```
|
|
59
160
|
|
|
60
|
-
|
|
161
|
+
In this repository `.mcp.json` already points at `dist/libs/mcp/src/server.js` — run
|
|
162
|
+
`pnpm nx build mcp` once so it exists.
|
|
163
|
+
|
|
164
|
+
**Skill** — [`skills/xui`](skills/xui/SKILL.md) is the procedural knowledge: the three-layer
|
|
165
|
+
architecture, discovery through the MCP server, composition and styling rules, theming, the
|
|
166
|
+
generators, and the conventions for authoring a package inside the monorepo. `.claude/skills/xui`
|
|
167
|
+
links to it for agents working in this repository.
|
|
168
|
+
|
|
169
|
+
## Browser support
|
|
170
|
+
|
|
171
|
+
The browsers Angular itself supports — see the
|
|
172
|
+
[Angular browser support policy](https://angular.dev/reference/versions#browser-support).
|
|
173
|
+
|
|
174
|
+
## Development
|
|
175
|
+
|
|
176
|
+
The workspace is [Nx](https://nx.dev) + pnpm.
|
|
61
177
|
|
|
62
178
|
```bash
|
|
63
|
-
pnpm
|
|
179
|
+
pnpm install
|
|
180
|
+
pnpm start # documentation site on :4200
|
|
181
|
+
pnpm storybook # component gallery on :4400
|
|
182
|
+
pnpm nx serve admin # the example admin application
|
|
183
|
+
pnpm test # unit tests
|
|
184
|
+
pnpm nx test-storybook ui-storybook # render every story in headless Chromium
|
|
185
|
+
pnpm build # build every package
|
|
64
186
|
```
|
|
65
187
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
- [ ] Carousel
|
|
83
|
-
- [x] Checkbox
|
|
84
|
-
- [ ] Collapsible
|
|
85
|
-
- [ ] Combobox
|
|
86
|
-
- [ ] Command
|
|
87
|
-
- [ ] Date Picker
|
|
88
|
-
- [ ] Date Range Picker
|
|
89
|
-
- [ ] Dialog
|
|
90
|
-
- [x] Form Field
|
|
91
|
-
- [ ] Hover Card
|
|
92
|
-
- [x] Icon
|
|
93
|
-
- [x] Input
|
|
94
|
-
- [x] Label
|
|
95
|
-
- [ ] Menu
|
|
96
|
-
- [ ] Pagination
|
|
97
|
-
- [ ] Popover
|
|
98
|
-
- [ ] Progress
|
|
99
|
-
- [ ] Radio Group
|
|
100
|
-
- [ ] Scroll Area
|
|
101
|
-
- [ ] Select
|
|
102
|
-
- [ ] Separator
|
|
103
|
-
- [ ] Sheet
|
|
104
|
-
- [x] Skeleton
|
|
105
|
-
- [ ] Slider
|
|
106
|
-
- [x] Sonner
|
|
107
|
-
- [ ] Spinner
|
|
108
|
-
- [x] Status
|
|
109
|
-
- [ ] Switch
|
|
110
|
-
- [ ] Table
|
|
111
|
-
- [ ] Tabs
|
|
112
|
-
- [ ] Toggle
|
|
113
|
-
- [ ] Tooltip
|
|
114
|
-
- [ ] Typography
|
|
115
|
-
|
|
116
|
-
### Additional
|
|
117
|
-
|
|
118
|
-
- [ ] Decagram
|
|
119
|
-
- [ ] Settings
|
|
120
|
-
- [ ] Drawer
|
|
121
|
-
- [ ] Panel Bar
|
|
122
|
-
- [ ] Textarea
|
|
123
|
-
- [ ] Time Picker
|
|
124
|
-
- [ ] Image Upload
|
|
125
|
-
- [ ] Banner
|
|
126
|
-
- [ ] Snack bar
|
|
127
|
-
|
|
128
|
-
## Opinionated "components"
|
|
129
|
-
|
|
130
|
-
- [ ] Graph View (Nodes)
|
|
131
|
-
- [ ] Analysis
|
|
132
|
-
- [ ] Charts (NG Charts?)
|
|
133
|
-
|
|
134
|
-
## CLI
|
|
135
|
-
|
|
136
|
-
Make cli to install the components
|
|
137
|
-
|
|
138
|
-
## TODO
|
|
139
|
-
|
|
140
|
-
- Button
|
|
141
|
-
|
|
142
|
-
- Icon
|
|
143
|
-
- Shine
|
|
144
|
-
|
|
145
|
-
- Breadcrumb
|
|
146
|
-
|
|
147
|
-
- fix styling issues
|
|
148
|
-
- on hover stuff
|
|
149
|
-
- data driven component
|
|
150
|
-
|
|
151
|
-
- Sonner
|
|
152
|
-
- Colors
|
|
188
|
+
Commits follow [Conventional Commits](https://www.conventionalcommits.org) and are linted — the
|
|
189
|
+
release is cut from them. See [docs/releasing.md](docs/releasing.md) for how a version is published,
|
|
190
|
+
[apps/ui-storybook/README.md](apps/ui-storybook/README.md) before writing stories, and
|
|
191
|
+
[apps/app/README.md](apps/app/README.md) for the documentation site, whose component pages are
|
|
192
|
+
generated from those same stories, and [apps/admin/README.md](apps/admin/README.md) for the example
|
|
193
|
+
admin application — a full app built from these packages, which is the fastest way to see how they
|
|
194
|
+
fit together.
|
|
195
|
+
|
|
196
|
+
## Contributing
|
|
197
|
+
|
|
198
|
+
Bugs and ideas are welcome in [issues](https://github.com/Rikarin/xui/issues). For a change of any
|
|
199
|
+
size, open an issue first so the API can be agreed before the code exists.
|
|
200
|
+
|
|
201
|
+
## License
|
|
202
|
+
|
|
203
|
+
See [LICENSE](LICENSE).
|
package/fesm2022/xui-label.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, input,
|
|
2
|
+
import { inject, input, linkedSignal, computed, Directive } from '@angular/core';
|
|
3
3
|
import { xui } from '@xui/core';
|
|
4
4
|
import * as i1 from '@xui/core/label';
|
|
5
|
-
import {
|
|
5
|
+
import { XLabel } from '@xui/core/label';
|
|
6
6
|
import { cva } from 'class-variance-authority';
|
|
7
7
|
|
|
8
8
|
// TODO: theme - disabled, etc.
|
|
@@ -30,32 +30,38 @@ const labelVariants = cva([
|
|
|
30
30
|
error: 'auto'
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
|
-
class
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
class XuiLabel {
|
|
34
|
+
// TODO: check the implementation of this component
|
|
35
|
+
xLabel = inject(XLabel, { host: true });
|
|
36
|
+
class = input('', /* @ts-ignore */
|
|
37
|
+
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
38
|
+
variant = input('default', /* @ts-ignore */
|
|
39
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
40
|
+
error = input('auto', /* @ts-ignore */
|
|
41
|
+
...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
|
|
42
|
+
/** Follows the `error` input until `setError` overrides it. */
|
|
43
|
+
errorState = linkedSignal(this.error, /* @ts-ignore */
|
|
44
|
+
...(ngDevMode ? [{ debugName: "errorState" }] : /* istanbul ignore next */ []));
|
|
41
45
|
computedClass = computed(() => xui(labelVariants({
|
|
42
46
|
variant: this.variant(),
|
|
43
|
-
error: this.
|
|
44
|
-
disabled: this.
|
|
45
|
-
}), this.class())
|
|
47
|
+
error: this.errorState(),
|
|
48
|
+
disabled: this.xLabel?.dataDisabled() ?? 'auto'
|
|
49
|
+
}), this.class()), /* @ts-ignore */
|
|
50
|
+
...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
|
|
46
51
|
setError(error) {
|
|
47
|
-
this.
|
|
52
|
+
this.errorState.set(error);
|
|
48
53
|
}
|
|
49
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
50
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
54
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: XuiLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
55
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: XuiLabel, isStandalone: true, selector: "[xuiLabel]", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "computedClass()" } }, exportAs: ["xuiLabel"], hostDirectives: [{ directive: i1.XLabel, inputs: ["id", "id"] }], ngImport: i0 });
|
|
51
56
|
}
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: XuiLabel, decorators: [{
|
|
53
58
|
type: Directive,
|
|
54
59
|
args: [{
|
|
55
60
|
selector: '[xuiLabel]',
|
|
61
|
+
exportAs: 'xuiLabel',
|
|
56
62
|
hostDirectives: [
|
|
57
63
|
{
|
|
58
|
-
directive:
|
|
64
|
+
directive: XLabel,
|
|
59
65
|
inputs: ['id']
|
|
60
66
|
}
|
|
61
67
|
],
|
|
@@ -63,11 +69,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
63
69
|
'[class]': 'computedClass()'
|
|
64
70
|
}
|
|
65
71
|
}]
|
|
66
|
-
}] });
|
|
72
|
+
}], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }] } });
|
|
73
|
+
|
|
74
|
+
const XuiLabelImports = [XuiLabel];
|
|
67
75
|
|
|
68
76
|
/**
|
|
69
77
|
* Generated bundle index. Do not edit.
|
|
70
78
|
*/
|
|
71
79
|
|
|
72
|
-
export {
|
|
80
|
+
export { XuiLabel, XuiLabelImports, labelVariants };
|
|
73
81
|
//# sourceMappingURL=xui-label.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xui-label.mjs","sources":["../../../../../../libs/ui/label/xui/src/lib/label.
|
|
1
|
+
{"version":3,"file":"xui-label.mjs","sources":["../../../../../../libs/ui/label/xui/src/lib/label.ts","../../../../../../libs/ui/label/xui/src/index.ts","../../../../../../libs/ui/label/xui/src/xui-label.ts"],"sourcesContent":["import { Directive, computed, inject, input, linkedSignal } from '@angular/core';\nimport { xui } from '@xui/core';\nimport { XLabel } from '@xui/core/label';\nimport { type VariantProps, cva } from 'class-variance-authority';\nimport type { ClassValue } from 'clsx';\n\n// TODO: theme - disabled, etc.\nexport const labelVariants = cva(\n [\n 'text-sm font-medium leading-none',\n '[&.ng-invalid.ng-touched]:text-error',\n '[&>[xuiInput]]:my-1 [&:has([xuiInput]:disabled)]:cursor-not-allowed [&:has([xuiInput]:disabled)]:opacity-70'\n ],\n {\n variants: {\n variant: {\n default: ''\n },\n error: {\n auto: '[&:has([xuiInput].ng-invalid.ng-touched)]:text-error',\n true: 'text-error'\n },\n disabled: {\n auto: '[&:has([xuiInput]:disabled)]:opacity-70',\n true: 'opacity-70',\n false: ''\n }\n },\n defaultVariants: {\n variant: 'default',\n error: 'auto'\n }\n }\n);\nexport type XuiLabelVariants = VariantProps<typeof labelVariants>;\n\n@Directive({\n selector: '[xuiLabel]',\n exportAs: 'xuiLabel',\n hostDirectives: [\n {\n directive: XLabel,\n inputs: ['id']\n }\n ],\n host: {\n '[class]': 'computedClass()'\n }\n})\nexport class XuiLabel {\n // TODO: check the implementation of this component\n\n private readonly xLabel = inject(XLabel, { host: true });\n\n readonly class = input<ClassValue>('');\n readonly variant = input<XuiLabelVariants['variant']>('default');\n readonly error = input<XuiLabelVariants['error']>('auto');\n\n /** Follows the `error` input until `setError` overrides it. */\n private readonly errorState = linkedSignal(this.error);\n\n protected readonly computedClass = computed(() =>\n xui(\n labelVariants({\n variant: this.variant(),\n error: this.errorState(),\n disabled: this.xLabel?.dataDisabled() ?? 'auto'\n }),\n this.class()\n )\n );\n\n setError(error: XuiLabelVariants['error']): void {\n this.errorState.set(error);\n }\n}\n","import { XuiLabel } from './lib/label';\n\nexport * from './lib/label';\n\nexport const XuiLabelImports = [XuiLabel] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,46 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xui/label",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
4
|
-
"description": "Angular UI Library",
|
|
3
|
+
"version": "2.0.0-alpha.12",
|
|
4
|
+
"description": "Modern Angular 22 UI Library based on TailwindCSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
7
|
-
"ui"
|
|
7
|
+
"ui",
|
|
8
|
+
"components",
|
|
9
|
+
"tailwindcss"
|
|
8
10
|
],
|
|
9
11
|
"homepage": "https://xuijs.org",
|
|
10
12
|
"bugs": {
|
|
11
13
|
"url": "https://github.com/rikarin/xui/issues"
|
|
12
14
|
},
|
|
13
|
-
"repository":
|
|
14
|
-
"type": "git",
|
|
15
|
-
"url": "https://github.com/rikarin/xui.git"
|
|
16
|
-
},
|
|
15
|
+
"repository": "https://github.com/Rikarin/xui",
|
|
17
16
|
"license": "MIT",
|
|
18
|
-
"author": "
|
|
17
|
+
"author": "Jiu",
|
|
19
18
|
"maintainers": [
|
|
20
|
-
"
|
|
19
|
+
"Jiu",
|
|
20
|
+
"Rikarin"
|
|
21
21
|
],
|
|
22
22
|
"sideEffects": false,
|
|
23
|
-
"
|
|
24
|
-
"@angular/core": "19",
|
|
25
|
-
"@xui/core": "2",
|
|
26
|
-
"class-variance-authority": "^0.7.1",
|
|
27
|
-
"clsx": "^2.1.1"
|
|
28
|
-
},
|
|
29
|
-
"publishConfig": {
|
|
30
|
-
"access": "public"
|
|
31
|
-
},
|
|
32
|
-
"module": "fesm2022/xui-label.mjs",
|
|
33
|
-
"typings": "index.d.ts",
|
|
23
|
+
"type": "module",
|
|
34
24
|
"exports": {
|
|
35
25
|
"./package.json": {
|
|
36
26
|
"default": "./package.json"
|
|
37
27
|
},
|
|
38
28
|
".": {
|
|
39
|
-
"types": "./
|
|
29
|
+
"types": "./types/xui-label.d.ts",
|
|
40
30
|
"default": "./fesm2022/xui-label.mjs"
|
|
41
31
|
}
|
|
42
32
|
},
|
|
33
|
+
"module": "fesm2022/xui-label.mjs",
|
|
34
|
+
"typings": "types/xui-label.d.ts",
|
|
43
35
|
"dependencies": {
|
|
44
36
|
"tslib": "^2.3.0"
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"@angular/core": "22",
|
|
40
|
+
"@xui/core": "2.0.0-alpha.12",
|
|
41
|
+
"class-variance-authority": "^0.7.1",
|
|
42
|
+
"clsx": "^2.1.1"
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
45
46
|
}
|
|
46
47
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { ClassValue } from 'clsx';
|
|
5
|
+
import * as i1 from '@xui/core/label';
|
|
6
|
+
|
|
7
|
+
declare const labelVariants: (props?: ({
|
|
8
|
+
variant?: "default" | null | undefined;
|
|
9
|
+
error?: boolean | "auto" | null | undefined;
|
|
10
|
+
disabled?: boolean | "auto" | null | undefined;
|
|
11
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
12
|
+
type XuiLabelVariants = VariantProps<typeof labelVariants>;
|
|
13
|
+
declare class XuiLabel {
|
|
14
|
+
private readonly xLabel;
|
|
15
|
+
readonly class: _angular_core.InputSignal<ClassValue>;
|
|
16
|
+
readonly variant: _angular_core.InputSignal<"default" | null | undefined>;
|
|
17
|
+
readonly error: _angular_core.InputSignal<boolean | "auto" | null | undefined>;
|
|
18
|
+
/** Follows the `error` input until `setError` overrides it. */
|
|
19
|
+
private readonly errorState;
|
|
20
|
+
protected readonly computedClass: _angular_core.Signal<string>;
|
|
21
|
+
setError(error: XuiLabelVariants['error']): void;
|
|
22
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<XuiLabel, never>;
|
|
23
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<XuiLabel, "[xuiLabel]", ["xuiLabel"], { "class": { "alias": "class"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.XLabel; inputs: { "id": "id"; }; outputs: {}; }]>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
declare const XuiLabelImports: readonly [typeof XuiLabel];
|
|
27
|
+
|
|
28
|
+
export { XuiLabel, XuiLabelImports, labelVariants };
|
|
29
|
+
export type { XuiLabelVariants };
|
package/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib/label.directive';
|
package/lib/label.directive.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
-
import type { ClassValue } from 'clsx';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@xui/core/label";
|
|
5
|
-
export declare const labelVariants: (props?: ({
|
|
6
|
-
variant?: "default" | null | undefined;
|
|
7
|
-
error?: boolean | "auto" | null | undefined;
|
|
8
|
-
disabled?: boolean | "auto" | null | undefined;
|
|
9
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
10
|
-
export type LabelVariants = VariantProps<typeof labelVariants>;
|
|
11
|
-
export declare class XuiLabelDirective {
|
|
12
|
-
private readonly xCore;
|
|
13
|
-
readonly class: import("@angular/core").InputSignal<ClassValue>;
|
|
14
|
-
readonly variant: import("@angular/core").InputSignal<"default" | null | undefined>;
|
|
15
|
-
readonly error: import("@angular/core").InputSignal<boolean | "auto" | null | undefined>;
|
|
16
|
-
protected readonly state: import("@angular/core").Signal<{
|
|
17
|
-
error: import("@angular/core").WritableSignal<boolean | "auto" | null | undefined>;
|
|
18
|
-
}>;
|
|
19
|
-
protected readonly computedClass: import("@angular/core").Signal<string>;
|
|
20
|
-
setError(error: LabelVariants['error']): void;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<XuiLabelDirective, never>;
|
|
22
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<XuiLabelDirective, "[xuiLabel]", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.XCoreLabelDirective; inputs: { "id": "id"; }; outputs: {}; }]>;
|
|
23
|
-
}
|