@xui/label 2.0.0-alpha.1 → 2.0.0-alpha.11

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 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
@@ -4,17 +4,13 @@
4
4
 
5
5
  ---
6
6
 
7
- ![Build Status](https://github.com/rikarin/xui/actions/workflows/continuous-delivery.yaml/badge.svg?branch=master)
7
+ ![Build Status](https://github.com/rikarin/xui/actions/workflows/publish.yaml/badge.svg?branch=develop)
8
8
  [![Demo](https://img.shields.io/badge/demo-online-ed1c46)](https://xuijs.org/)
9
- [![npm](https://img.shields.io/npm/v/%40xui/components.svg?maxAge=2592000?style=plastic)](https://www.npmjs.com/org/xui)
10
- [![Downloads](https://img.shields.io/npm/dt/%40xui/components.svg)](https://www.npmjs.com/org/xui)
11
- [![Monthly Downloads](https://img.shields.io/npm/dm/%40xui/components.svg)](https://www.npmjs.com/org/xui)
12
- [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/%40xui/components)](https://bundlephobia.com/result?p=xui)
9
+ [![npm](https://img.shields.io/npm/v/%40xui/core.svg?maxAge=2592000?style=plastic)](https://www.npmjs.com/org/xui)
13
10
  [![License](https://img.shields.io/npm/l/express.svg?maxAge=2592000)](/LICENSE)
14
- [![Discord](https://img.shields.io/discord/776258487307075594.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/aPkZsFcu)
15
11
  [![Netlify Status](https://api.netlify.com/api/v1/badges/fa0cfd14-97df-47fa-8a7c-152e6d4cfda2/deploy-status)](https://app.netlify.com/sites/xui/deploys)
16
12
 
17
- xUI is a customizable Angular 19 UI Library with full support of TailwindCSS styling based on popular React library ShardCN and its Angular alternative SpartanUI.
13
+ xUI is a customizable Angular 22 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
- <a name="installation"></a>
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 | [![Downloads](https://img.shields.io/npm/dt/%40xui/core.svg)](https://www.npmjs.com/package/%40xui/core)<br />[![Monthly Downloads](https://img.shields.io/npm/dm/%40xui/core.svg)](https://www.npmjs.com/package/%40xui/core)<br />[![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/%40xui/core)](https://bundlephobia.com/result?p=%40xui/core) | Core package required by all other packages |
42
+ | Badge | [![Downloads](https://img.shields.io/npm/dt/%40xui/badge.svg)](https://www.npmjs.com/package/%40xui/badge)<br />[![Monthly Downloads](https://img.shields.io/npm/dm/%40xui/badge.svg)](https://www.npmjs.com/package/%40xui/badge)<br />[![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/%40xui/badge)](https://bundlephobia.com/result?p=%40xui/badge) | Badge component |
43
+ | Breadcrumb | [![Downloads](https://img.shields.io/npm/dt/%40xui/breadcrumb.svg)](https://www.npmjs.com/package/%40xui/breadcrumb)<br />[![Monthly Downloads](https://img.shields.io/npm/dm/%40xui/breadcrumb.svg)](https://www.npmjs.com/package/%40xui/breadcrumb)<br />[![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/%40xui/breadcrumb)](https://bundlephobia.com/result?p=%40xui/breadcrumb) | Breadcrumb component |
44
+ | Button | [![Downloads](https://img.shields.io/npm/dt/%40xui/button.svg)](https://www.npmjs.com/package/%40xui/button)<br />[![Monthly Downloads](https://img.shields.io/npm/dm/%40xui/button.svg)](https://www.npmjs.com/package/%40xui/button)<br />[![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/%40xui/button)](https://bundlephobia.com/result?p=%40xui/button) | Button component |
45
+ | Button Group | [![Downloads](https://img.shields.io/npm/dt/%40xui/button-group.svg)](https://www.npmjs.com/package/%40xui/button-group)<br />[![Monthly Downloads](https://img.shields.io/npm/dm/%40xui/button-group.svg)](https://www.npmjs.com/package/%40xui/button-group)<br />[![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/%40xui/button-group)](https://bundlephobia.com/result?p=%40xui/button-group) | Button Group component |
46
+ | Checkbox | [![Downloads](https://img.shields.io/npm/dt/%40xui/checkbox.svg)](https://www.npmjs.com/package/%40xui/checkbox)<br />[![Monthly Downloads](https://img.shields.io/npm/dm/%40xui/checkbox.svg)](https://www.npmjs.com/package/%40xui/checkbox)<br />[![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/%40xui/checkbox)](https://bundlephobia.com/result?p=%40xui/checkbox) | Checkbox component |
47
+ | Form Field | [![Downloads](https://img.shields.io/npm/dt/%40xui/form-field.svg)](https://www.npmjs.com/package/%40xui/form-field)<br />[![Monthly Downloads](https://img.shields.io/npm/dm/%40xui/form-field.svg)](https://www.npmjs.com/package/%40xui/form-field)<br />[![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/%40xui/form-field)](https://bundlephobia.com/result?p=%40xui/form-field) | Form Field component |
48
+ | Icon | [![Downloads](https://img.shields.io/npm/dt/%40xui/icon.svg)](https://www.npmjs.com/package/%40xui/icon)<br />[![Monthly Downloads](https://img.shields.io/npm/dm/%40xui/icon.svg)](https://www.npmjs.com/package/%40xui/icon)<br />[![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/%40xui/icon)](https://bundlephobia.com/result?p=%40xui/icon) | Icon component |
49
+ | Input | [![Downloads](https://img.shields.io/npm/dt/%40xui/input.svg)](https://www.npmjs.com/package/%40xui/input)<br />[![Monthly Downloads](https://img.shields.io/npm/dm/%40xui/input.svg)](https://www.npmjs.com/package/%40xui/input)<br />[![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/%40xui/input)](https://bundlephobia.com/result?p=%40xui/input) | Input component |
50
+ | Label | [![Downloads](https://img.shields.io/npm/dt/%40xui/label.svg)](https://www.npmjs.com/package/%40xui/label)<br />[![Monthly Downloads](https://img.shields.io/npm/dm/%40xui/label.svg)](https://www.npmjs.com/package/%40xui/label)<br />[![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/%40xui/label)](https://bundlephobia.com/result?p=%40xui/label) | Label component |
51
+ | Skeleton | [![Downloads](https://img.shields.io/npm/dt/%40xui/skeleton.svg)](https://www.npmjs.com/package/%40xui/skeleton)<br />[![Monthly Downloads](https://img.shields.io/npm/dm/%40xui/skeleton.svg)](https://www.npmjs.com/package/%40xui/skeleton)<br />[![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/%40xui/skeleton)](https://bundlephobia.com/result?p=%40xui/skeleton) | Skeleton component |
52
+ | Spinner | [![Downloads](https://img.shields.io/npm/dt/%40xui/spinner.svg)](https://www.npmjs.com/package/%40xui/spinner)<br />[![Monthly Downloads](https://img.shields.io/npm/dm/%40xui/spinner.svg)](https://www.npmjs.com/package/%40xui/spinner)<br />[![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/%40xui/spinner)](https://bundlephobia.com/result?p=%40xui/spinner) | Spinner component |
53
+ | Status | [![Downloads](https://img.shields.io/npm/dt/%40xui/status.svg)](https://www.npmjs.com/package/%40xui/status)<br />[![Monthly Downloads](https://img.shields.io/npm/dm/%40xui/status.svg)](https://www.npmjs.com/package/%40xui/status)<br />[![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/%40xui/status)](https://bundlephobia.com/result?p=%40xui/status) | Status component |
54
+ | Table | [![Downloads](https://img.shields.io/npm/dt/%40xui/table.svg)](https://www.npmjs.com/package/%40xui/table)<br />[![Monthly Downloads](https://img.shields.io/npm/dm/%40xui/table.svg)](https://www.npmjs.com/package/%40xui/table)<br />[![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/%40xui/table)](https://bundlephobia.com/result?p=%40xui/table) | Table component |
37
55
 
38
56
  ## Installation
39
57
 
@@ -43,6 +61,41 @@ Install package with **PNPM**
43
61
  pnpm i @xui/core ....
44
62
  ```
45
63
 
64
+ ## Theming
65
+
66
+ Every `@xui/*` component styles itself with semantic Tailwind utilities — `bg-surface`,
67
+ `text-foreground-muted`, `border-error-muted` — that resolve through the token layer shipped with
68
+ `@xui/core`. Import it once, after Tailwind:
69
+
70
+ ```css
71
+ @import 'tailwindcss';
72
+ @import '@xui/core/styles/theme.css';
73
+
74
+ /* Only needed if you use an overlay surface — popover, tooltip, menu, dialog,
75
+ drawer or toast. Without it overlays render in the document flow. */
76
+ @import '@angular/cdk/overlay-prebuilt.css';
77
+
78
+ /* Tell Tailwind to scan the component sources for utility classes. */
79
+ @source '../node_modules/@xui';
80
+ ```
81
+
82
+ Switch themes by putting `.dark` (or `[data-theme='dark']`) on `<html>`; with neither class
83
+ present the theme follows `prefers-color-scheme`. Both selectors also work on any element, so a
84
+ subtree can render in the opposite theme.
85
+
86
+ Re-theme by overriding tokens after the import — the `darker` / `lighter` / `subtle` / `muted` /
87
+ `emphasis` steps of each intent are derived, so one declaration re-colours the whole ramp:
88
+
89
+ ```css
90
+ :root {
91
+ --primary: var(--color-violet-600);
92
+ --surface-inset: var(--color-zinc-50);
93
+ }
94
+ ```
95
+
96
+ The full token reference, rendered in both themes, is the **Design Tokens** page in
97
+ [Storybook](https://develop--67d2b4c756077a325913e5d9.chromatic.com/?globals=theme:dark).
98
+
46
99
  ## Browser Support
47
100
 
48
101
  xUI Supports most recent browsers according to Angular [support](https://angular.io/guide/browser-support).
@@ -63,35 +116,51 @@ To start storybook use
63
116
  pnpm storybook
64
117
  ```
65
118
 
119
+ ## AI coding agents
120
+
121
+ Two pieces of tooling teach coding agents how to build with xUI.
122
+
123
+ **MCP server** — [`@xui/mcp`](https://github.com/Rikarin/xui/blob/HEAD/libs/mcp/README.md) exposes every package's real API (selectors,
124
+ signal inputs, variant axes, outputs), the design tokens, the docs and the Storybook examples as
125
+ MCP tools. It extracts them from the library sources, so all ~90 packages are covered and the
126
+ answers match the installed version.
127
+
128
+ ```json
129
+ {
130
+ "mcpServers": {
131
+ "xui": { "command": "npx", "args": ["-y", "@xui/mcp"] }
132
+ }
133
+ }
134
+ ```
135
+
136
+ In this repo, `.mcp.json` already points at `dist/libs/mcp/src/server.js` — run `pnpm nx build mcp`
137
+ once so it exists.
138
+
139
+ **Skill** — [`skills/xui`](https://github.com/Rikarin/xui/blob/HEAD/skills/xui/SKILL.md) is the procedural knowledge: the three-layer
140
+ architecture, discovery through the MCP server, composition and styling rules, theming, the
141
+ generators, and the conventions for authoring a package inside the monorepo. `.claude/skills/xui`
142
+ links to it for agents working in this repository.
143
+
66
144
  ## Issues
67
145
 
68
146
  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
147
 
70
- ## Roadmap (12/42)
148
+ ## Roadmap
71
149
 
72
150
  - [ ] Accordion
73
151
  - [ ] Alert
74
152
  - [ ] Alert Dialog
75
153
  - [ ] Avatar
76
- - [x] Badge
77
- - [x] Breadcrumb
78
- - [x] Button
79
- - [x] Button Group
80
154
  - [ ] Calendar
81
155
  - [ ] Card
82
156
  - [ ] Carousel
83
- - [x] Checkbox
84
157
  - [ ] Collapsible
85
158
  - [ ] Combobox
86
159
  - [ ] Command
87
160
  - [ ] Date Picker
88
161
  - [ ] Date Range Picker
89
162
  - [ ] Dialog
90
- - [x] Form Field
91
163
  - [ ] Hover Card
92
- - [x] Icon
93
- - [x] Input
94
- - [x] Label
95
164
  - [ ] Menu
96
165
  - [ ] Pagination
97
166
  - [ ] Popover
@@ -101,17 +170,14 @@ If you find any issues in the library or have and idea for an improvement feel f
101
170
  - [ ] Select
102
171
  - [ ] Separator
103
172
  - [ ] Sheet
104
- - [x] Skeleton
105
173
  - [ ] Slider
106
- - [x] Sonner
107
- - [ ] Spinner
108
- - [x] Status
109
174
  - [ ] Switch
110
- - [ ] Table
111
175
  - [ ] Tabs
112
176
  - [ ] Toggle
113
177
  - [ ] Tooltip
114
178
  - [ ] Typography
179
+ - [ ] Input OTP
180
+ - [ ] Toggle Group
115
181
 
116
182
  ### Additional
117
183
 
@@ -148,5 +214,4 @@ Make cli to install the components
148
214
  - on hover stuff
149
215
  - data driven component
150
216
 
151
- - Sonner
152
- - Colors
217
+ - adjust generator to generate stories into the apps/storybook
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { inject, input, computed, signal, Directive } from '@angular/core';
3
3
  import { xui } from '@xui/core';
4
4
  import * as i1 from '@xui/core/label';
5
- import { XCoreLabelDirective } from '@xui/core/label';
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 XuiLabelDirective {
34
- xCore = inject(XCoreLabelDirective, { host: true });
35
- class = input('');
36
- variant = input('default');
37
- error = input('auto');
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 */ []));
38
42
  state = computed(() => ({
39
43
  error: signal(this.error())
40
- }));
44
+ }), /* @ts-ignore */
45
+ ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
41
46
  computedClass = computed(() => xui(labelVariants({
42
47
  variant: this.variant(),
43
48
  error: this.state().error(),
44
- disabled: this.xCore?.dataDisabled() ?? 'auto'
45
- }), this.class()));
49
+ disabled: this.xLabel?.dataDisabled() ?? 'auto'
50
+ }), this.class()), /* @ts-ignore */
51
+ ...(ngDevMode ? [{ debugName: "computedClass" }] : /* istanbul ignore next */ []));
46
52
  setError(error) {
47
53
  this.state().error.set(error);
48
54
  }
49
- /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: XuiLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
50
- /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.3", type: XuiLabelDirective, 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()" } }, hostDirectives: [{ directive: i1.XCoreLabelDirective, inputs: ["id", "id"] }], ngImport: i0 });
55
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: XuiLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive });
56
+ /** @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()" } }, hostDirectives: [{ directive: i1.XLabel, inputs: ["id", "id"] }], ngImport: i0 });
51
57
  }
52
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: XuiLabelDirective, decorators: [{
58
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: XuiLabel, decorators: [{
53
59
  type: Directive,
54
60
  args: [{
55
61
  selector: '[xuiLabel]',
56
62
  hostDirectives: [
57
63
  {
58
- directive: XCoreLabelDirective,
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 { XuiLabelDirective, labelVariants };
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.directive.ts","../../../../../../libs/ui/label/xui/src/xui-label.ts"],"sourcesContent":["import { Directive, computed, inject, input, signal } from '@angular/core';\nimport { xui } from '@xui/core';\nimport { XCoreLabelDirective } 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 LabelVariants = VariantProps<typeof labelVariants>;\n\n@Directive({\n selector: '[xuiLabel]',\n hostDirectives: [\n {\n directive: XCoreLabelDirective,\n inputs: ['id']\n }\n ],\n host: {\n '[class]': 'computedClass()'\n }\n})\nexport class XuiLabelDirective {\n private readonly xCore = inject(XCoreLabelDirective, { host: true });\n\n readonly class = input<ClassValue>('');\n readonly variant = input<LabelVariants['variant']>('default');\n readonly error = input<LabelVariants['error']>('auto');\n\n protected readonly state = computed(() => ({\n error: signal(this.error())\n }));\n\n protected readonly computedClass = computed(() =>\n xui(\n labelVariants({\n variant: this.variant(),\n error: this.state().error(),\n disabled: this.xCore?.dataDisabled() ?? 'auto'\n }),\n this.class()\n )\n );\n\n setError(error: LabelVariants['error']): void {\n this.state().error.set(error);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"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"}
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, signal } 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 LabelVariants = VariantProps<typeof labelVariants>;\n\n@Directive({\n selector: '[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<LabelVariants['variant']>('default');\n readonly error = input<LabelVariants['error']>('auto');\n\n protected readonly state = computed(() => ({\n error: signal(this.error())\n }));\n\n protected readonly computedClass = computed(() =>\n xui(\n labelVariants({\n variant: this.variant(),\n error: this.state().error(),\n disabled: this.xLabel?.dataDisabled() ?? 'auto'\n }),\n this.class()\n )\n );\n\n setError(error: LabelVariants['error']): void {\n this.state().error.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.1",
4
- "description": "Angular UI Library",
3
+ "version": "2.0.0-alpha.11",
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": "Rene Cincura",
17
+ "author": "Jiu",
19
18
  "maintainers": [
20
- "Rene Cincura"
19
+ "Jiu",
20
+ "Rikarin"
21
21
  ],
22
22
  "sideEffects": false,
23
- "peerDependencies": {
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": "./index.d.ts",
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.11",
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,30 @@
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 LabelVariants = 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
+ protected readonly state: _angular_core.Signal<{
19
+ error: _angular_core.WritableSignal<boolean | "auto" | null | undefined>;
20
+ }>;
21
+ protected readonly computedClass: _angular_core.Signal<string>;
22
+ setError(error: LabelVariants['error']): void;
23
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<XuiLabel, never>;
24
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<XuiLabel, "[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.XLabel; inputs: { "id": "id"; }; outputs: {}; }]>;
25
+ }
26
+
27
+ declare const XuiLabelImports: readonly [typeof XuiLabel];
28
+
29
+ export { XuiLabel, XuiLabelImports, labelVariants };
30
+ export type { LabelVariants };
package/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './lib/label.directive';
@@ -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
- }