@shineuix/angular 0.0.0-stage → 1.0.1

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,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ShineUI contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,70 @@
1
- # Temporary Holding Version
1
+ # @shineuix/angular
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Angular standalone directives for ShineUI, one per element.
4
+
5
+ ```bash
6
+ npm i @shineuix/core @shineuix/angular
7
+ ```
8
+
9
+ ```ts
10
+ import { Component } from '@angular/core';
11
+ import { FormsModule } from '@angular/forms';
12
+ import { SuiButton, SuiInputText, TextValueAccessor } from '@shineuix/angular';
13
+
14
+ @Component({
15
+ standalone: true,
16
+ imports: [FormsModule, SuiButton, SuiInputText, TextValueAccessor],
17
+ template: `
18
+ <sui-button variant="accent" label="Record payment" (click)="recordPayment()"></sui-button>
19
+ <sui-input-text label="Customer email" required [(ngModel)]="email"></sui-input-text>
20
+ `,
21
+ })
22
+ export class PaymentBar {
23
+ email = '';
24
+ recordPayment() {}
25
+ }
26
+ ```
27
+
28
+ Import `@shineuix/core/shineui.css` once in `styles.css` or `angular.json`. Each directive is
29
+ exported by name, so an app that imports two of them ships two. No `CUSTOM_ELEMENTS_SCHEMA` is
30
+ needed.
31
+
32
+ `[(ngModel)]` and reactive forms bind through a `ControlValueAccessor` directive, and a standalone
33
+ component applies only the directives in its own `imports`, so import the accessor beside the
34
+ element. There are seven: `TextValueAccessor` for the text fields (input text, textarea, mask,
35
+ password, icon field, float label, IFTA label, autocomplete, inplace), `NumericValueAccessor` for
36
+ input number, slider, rating and knob, `BooleanValueAccessor` for checkbox, toggle switch, toggle
37
+ button and radio button, `SelectValueAccessor` for the select family, the choice groups, the
38
+ pickers, OTP, tags and the filter builder, `SuiHtmlValueAccessor` for the rich text editor and the
39
+ edit box, `SuiFilterPanelValueAccessor` for the filter panel's `values` and
40
+ `SuiSchedulerBuilderValueAccessor` for the scheduler builder's `config`. `VALUE_ACCESSORS` is the
41
+ seven in one array for an `imports` list that binds many kinds of control. Leave the accessor out
42
+ and every binding throws `NG01203`. A cleared number field gives the model `null`, so
43
+ `Validators.required` fails it; a null model gives a list-valued field an empty list.
44
+
45
+ Inputs and outputs are typed end to end under `strictTemplates`: `[variant]="'bogus'"`,
46
+ `[size]="'xl'"`, `[columns]="42"` and `[disabled]="'yes'"` are compile errors, and so is a static
47
+ `disabled="false"`, because that lands on the host as an attribute and a form-associated element is
48
+ disabled while it carries the attribute, whatever its value, as a native input is. Write the
49
+ boolean attribute bare (`<sui-button disabled>`) or bind it (`[disabled]="flag"`).
50
+
51
+ Every element that changes its own state has an output named for the prop, so `[(open)]`,
52
+ `[(expanded)]`, `[(selection)]` and the rest bind both ways. `<prop>Change` emits the new value; on
53
+ an element that opens and closes, `openChange` (or `collapsedChange` on a panel) emits once
54
+ `suiOpen` or an unrefused `suiClose` has run, so a close a `(suiClose)` handler vetoes leaves the
55
+ model alone. The `sui<Prop>Change` outputs stay.
56
+
57
+ The peer range is Angular 20, 21 and 22, each tested with zone.js, zoneless and server-rendered
58
+ then hydrated. Install `@shineuix/core` and this package at the same version: the bindings pin the
59
+ core exactly. Works with the default esbuild builder and with Vite through AnalogJS.
60
+
61
+ Angular hydration stays on. The elements draw into their own light DOM as soon as they are
62
+ defined, before Angular hydrates them, so a template that holds them fails to hydrate (NG0500 or
63
+ NG0502 on Angular 22). Give each of your components that holds ShineUI elements
64
+ `host: { ngSkipHydration: 'true' }`: Angular renders those afresh on the client and hydrates the
65
+ rest of the page, incremental hydration included. Not on a `sui-` element itself: Angular keeps that
66
+ node and empties it under an element that has already drawn.
67
+
68
+ Documentation, live demos and the API of every element: [shineui.dev](https://shineui.dev).
69
+
70
+ MIT. Copyright 2026 ShineUI contributors.