cerxos-ui 0.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/README.md +63 -0
- package/fesm2022/cerxos-ui.mjs +477 -0
- package/fesm2022/cerxos-ui.mjs.map +1 -0
- package/index.d.ts +128 -0
- package/package.json +23 -0
- package/src/lib/styles/tailwind.css +2 -0
- package/src/lib/tokens/theme-default.css +15 -0
package/README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# CerxosUi
|
|
2
|
+
|
|
3
|
+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.3.0.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ng generate component component-name
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
ng generate --help
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Building
|
|
20
|
+
|
|
21
|
+
To build the library, run:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
ng build cerxos-ui
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
|
|
28
|
+
|
|
29
|
+
### Publishing the Library
|
|
30
|
+
|
|
31
|
+
Once the project is built, you can publish your library by following these steps:
|
|
32
|
+
|
|
33
|
+
1. Navigate to the `dist` directory:
|
|
34
|
+
```bash
|
|
35
|
+
cd dist/cerxos-ui
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
39
|
+
```bash
|
|
40
|
+
npm publish
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Running unit tests
|
|
44
|
+
|
|
45
|
+
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
ng test
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Running end-to-end tests
|
|
52
|
+
|
|
53
|
+
For end-to-end (e2e) testing, run:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
ng e2e
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
|
|
60
|
+
|
|
61
|
+
## Additional Resources
|
|
62
|
+
|
|
63
|
+
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, Input, ChangeDetectionStrategy, EventEmitter, forwardRef, Output } from '@angular/core';
|
|
3
|
+
import { NgIf } from '@angular/common';
|
|
4
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
|
+
|
|
6
|
+
class CerxosUi {
|
|
7
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CerxosUi, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: CerxosUi, isStandalone: true, selector: "cxs-cerxos-ui", ngImport: i0, template: `
|
|
9
|
+
<p>
|
|
10
|
+
cerxos-ui works!
|
|
11
|
+
</p>
|
|
12
|
+
`, isInline: true, styles: [""] });
|
|
13
|
+
}
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CerxosUi, decorators: [{
|
|
15
|
+
type: Component,
|
|
16
|
+
args: [{ selector: 'cxs-cerxos-ui', imports: [], template: `
|
|
17
|
+
<p>
|
|
18
|
+
cerxos-ui works!
|
|
19
|
+
</p>
|
|
20
|
+
` }]
|
|
21
|
+
}] });
|
|
22
|
+
|
|
23
|
+
const BASE_CLASSES$2 = 'relative inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors ' +
|
|
24
|
+
'focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 ' +
|
|
25
|
+
'focus-visible:outline-[var(--cxs-color-focus)] disabled:pointer-events-none disabled:opacity-50';
|
|
26
|
+
const VARIANT_CLASSES$2 = {
|
|
27
|
+
primary: 'bg-[var(--cxs-color-primary)] text-[var(--cxs-color-on-primary)] ' +
|
|
28
|
+
'hover:bg-[var(--cxs-color-primary-hover)] shadow-[var(--cxs-shadow-sm)]',
|
|
29
|
+
secondary: 'bg-[var(--cxs-color-surface)] text-[var(--cxs-color-on-surface)] ' +
|
|
30
|
+
'border border-[var(--cxs-color-border)] hover:bg-[var(--cxs-color-surface-hover)]',
|
|
31
|
+
ghost: 'bg-transparent text-[var(--cxs-color-primary)] hover:bg-[var(--cxs-color-primary-ghost)]'
|
|
32
|
+
};
|
|
33
|
+
const SIZE_CLASSES$2 = {
|
|
34
|
+
sm: 'h-8 px-3 text-sm rounded-[var(--cxs-radius-md)]',
|
|
35
|
+
md: 'h-10 px-4 text-sm rounded-[var(--cxs-radius-md)]',
|
|
36
|
+
lg: 'h-12 px-5 text-base rounded-[var(--cxs-radius-md)]'
|
|
37
|
+
};
|
|
38
|
+
class CxsButtonComponent {
|
|
39
|
+
variant = 'primary';
|
|
40
|
+
size = 'md';
|
|
41
|
+
disabled = false;
|
|
42
|
+
loading = false;
|
|
43
|
+
type = 'button';
|
|
44
|
+
get isDisabled() {
|
|
45
|
+
return this.disabled || this.loading;
|
|
46
|
+
}
|
|
47
|
+
get buttonClass() {
|
|
48
|
+
return [BASE_CLASSES$2, SIZE_CLASSES$2[this.size], VARIANT_CLASSES$2[this.variant]].join(' ');
|
|
49
|
+
}
|
|
50
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CxsButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
51
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: CxsButtonComponent, isStandalone: true, selector: "cxs-button", inputs: { variant: "variant", size: "size", disabled: "disabled", loading: "loading", type: "type" }, ngImport: i0, template: "<button\n [class]=\"buttonClass\"\n [attr.type]=\"type\"\n [disabled]=\"isDisabled\"\n [attr.aria-busy]=\"loading ? 'true' : null\"\n>\n <span\n *ngIf=\"loading\"\n class=\"h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent\"\n aria-hidden=\"true\"\n ></span>\n <span class=\"truncate\">\n <ng-content></ng-content>\n </span>\n</button>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
52
|
+
}
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CxsButtonComponent, decorators: [{
|
|
54
|
+
type: Component,
|
|
55
|
+
args: [{ selector: 'cxs-button', standalone: true, imports: [NgIf], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n [class]=\"buttonClass\"\n [attr.type]=\"type\"\n [disabled]=\"isDisabled\"\n [attr.aria-busy]=\"loading ? 'true' : null\"\n>\n <span\n *ngIf=\"loading\"\n class=\"h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent\"\n aria-hidden=\"true\"\n ></span>\n <span class=\"truncate\">\n <ng-content></ng-content>\n </span>\n</button>\n" }]
|
|
56
|
+
}], propDecorators: { variant: [{
|
|
57
|
+
type: Input
|
|
58
|
+
}], size: [{
|
|
59
|
+
type: Input
|
|
60
|
+
}], disabled: [{
|
|
61
|
+
type: Input
|
|
62
|
+
}], loading: [{
|
|
63
|
+
type: Input
|
|
64
|
+
}], type: [{
|
|
65
|
+
type: Input
|
|
66
|
+
}] } });
|
|
67
|
+
|
|
68
|
+
const BASE_CLASSES$1 = 'w-full rounded-[var(--cxs-radius-md)] border border-[var(--cxs-color-border)] ' +
|
|
69
|
+
'bg-[var(--cxs-color-surface)] text-[var(--cxs-color-on-surface)] ' +
|
|
70
|
+
'placeholder:text-[var(--cxs-color-on-surface-muted)] transition-colors ' +
|
|
71
|
+
'focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 ' +
|
|
72
|
+
'focus-visible:outline-[var(--cxs-color-focus)] focus-visible:border-[var(--cxs-color-focus)] ' +
|
|
73
|
+
'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-60';
|
|
74
|
+
const VARIANT_CLASSES$1 = {
|
|
75
|
+
outline: 'bg-[var(--cxs-color-surface)]',
|
|
76
|
+
filled: 'bg-[var(--cxs-color-surface-hover)]'
|
|
77
|
+
};
|
|
78
|
+
const SIZE_CLASSES$1 = {
|
|
79
|
+
sm: 'h-8 px-3 text-sm',
|
|
80
|
+
md: 'h-10 px-3 text-sm',
|
|
81
|
+
lg: 'h-12 px-4 text-base'
|
|
82
|
+
};
|
|
83
|
+
const INVALID_CLASSES$2 = 'border-[var(--cxs-color-danger)] focus-visible:border-[var(--cxs-color-danger)] ' +
|
|
84
|
+
'focus-visible:outline-[var(--cxs-color-danger)]';
|
|
85
|
+
class CxsInputComponent {
|
|
86
|
+
value = '';
|
|
87
|
+
type = 'text';
|
|
88
|
+
variant = 'outline';
|
|
89
|
+
size = 'md';
|
|
90
|
+
disabled = false;
|
|
91
|
+
readonly = false;
|
|
92
|
+
required = false;
|
|
93
|
+
invalid = false;
|
|
94
|
+
autofocus = false;
|
|
95
|
+
id;
|
|
96
|
+
name;
|
|
97
|
+
placeholder;
|
|
98
|
+
autocomplete;
|
|
99
|
+
inputmode;
|
|
100
|
+
spellcheck = null;
|
|
101
|
+
ariaLabel;
|
|
102
|
+
ariaDescribedby;
|
|
103
|
+
valueChange = new EventEmitter();
|
|
104
|
+
disabledFromControl = false;
|
|
105
|
+
onChange = () => { };
|
|
106
|
+
onTouched = () => { };
|
|
107
|
+
get isDisabled() {
|
|
108
|
+
return this.disabled || this.disabledFromControl;
|
|
109
|
+
}
|
|
110
|
+
get inputClass() {
|
|
111
|
+
return [
|
|
112
|
+
BASE_CLASSES$1,
|
|
113
|
+
SIZE_CLASSES$1[this.size],
|
|
114
|
+
VARIANT_CLASSES$1[this.variant],
|
|
115
|
+
this.invalid ? INVALID_CLASSES$2 : ''
|
|
116
|
+
]
|
|
117
|
+
.filter(Boolean)
|
|
118
|
+
.join(' ');
|
|
119
|
+
}
|
|
120
|
+
writeValue(value) {
|
|
121
|
+
this.value = value ?? '';
|
|
122
|
+
}
|
|
123
|
+
registerOnChange(fn) {
|
|
124
|
+
this.onChange = fn;
|
|
125
|
+
}
|
|
126
|
+
registerOnTouched(fn) {
|
|
127
|
+
this.onTouched = fn;
|
|
128
|
+
}
|
|
129
|
+
setDisabledState(isDisabled) {
|
|
130
|
+
this.disabledFromControl = isDisabled;
|
|
131
|
+
}
|
|
132
|
+
onInput(event) {
|
|
133
|
+
const target = event.target;
|
|
134
|
+
const nextValue = target.value;
|
|
135
|
+
this.value = nextValue;
|
|
136
|
+
this.onChange(nextValue);
|
|
137
|
+
this.valueChange.emit(nextValue);
|
|
138
|
+
}
|
|
139
|
+
onBlur() {
|
|
140
|
+
this.onTouched();
|
|
141
|
+
}
|
|
142
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CxsInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
143
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: CxsInputComponent, isStandalone: true, selector: "cxs-input", inputs: { value: "value", type: "type", variant: "variant", size: "size", disabled: "disabled", readonly: "readonly", required: "required", invalid: "invalid", autofocus: "autofocus", id: "id", name: "name", placeholder: "placeholder", autocomplete: "autocomplete", inputmode: "inputmode", spellcheck: "spellcheck", ariaLabel: "ariaLabel", ariaDescribedby: "ariaDescribedby" }, outputs: { valueChange: "valueChange" }, providers: [
|
|
144
|
+
{
|
|
145
|
+
provide: NG_VALUE_ACCESSOR,
|
|
146
|
+
useExisting: forwardRef(() => CxsInputComponent),
|
|
147
|
+
multi: true
|
|
148
|
+
}
|
|
149
|
+
], ngImport: i0, template: "<input\n [class]=\"inputClass\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [attr.type]=\"type\"\n [attr.placeholder]=\"placeholder\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.inputmode]=\"inputmode\"\n [attr.spellcheck]=\"spellcheck === null ? null : spellcheck\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n [attr.aria-invalid]=\"invalid ? 'true' : null\"\n [attr.autofocus]=\"autofocus ? true : null\"\n [disabled]=\"isDisabled\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [value]=\"value\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n/>\r\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
150
|
+
}
|
|
151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CxsInputComponent, decorators: [{
|
|
152
|
+
type: Component,
|
|
153
|
+
args: [{ selector: 'cxs-input', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
154
|
+
{
|
|
155
|
+
provide: NG_VALUE_ACCESSOR,
|
|
156
|
+
useExisting: forwardRef(() => CxsInputComponent),
|
|
157
|
+
multi: true
|
|
158
|
+
}
|
|
159
|
+
], template: "<input\n [class]=\"inputClass\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [attr.type]=\"type\"\n [attr.placeholder]=\"placeholder\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.inputmode]=\"inputmode\"\n [attr.spellcheck]=\"spellcheck === null ? null : spellcheck\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n [attr.aria-invalid]=\"invalid ? 'true' : null\"\n [attr.autofocus]=\"autofocus ? true : null\"\n [disabled]=\"isDisabled\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [value]=\"value\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n/>\r\n" }]
|
|
160
|
+
}], propDecorators: { value: [{
|
|
161
|
+
type: Input
|
|
162
|
+
}], type: [{
|
|
163
|
+
type: Input
|
|
164
|
+
}], variant: [{
|
|
165
|
+
type: Input
|
|
166
|
+
}], size: [{
|
|
167
|
+
type: Input
|
|
168
|
+
}], disabled: [{
|
|
169
|
+
type: Input
|
|
170
|
+
}], readonly: [{
|
|
171
|
+
type: Input
|
|
172
|
+
}], required: [{
|
|
173
|
+
type: Input
|
|
174
|
+
}], invalid: [{
|
|
175
|
+
type: Input
|
|
176
|
+
}], autofocus: [{
|
|
177
|
+
type: Input
|
|
178
|
+
}], id: [{
|
|
179
|
+
type: Input
|
|
180
|
+
}], name: [{
|
|
181
|
+
type: Input
|
|
182
|
+
}], placeholder: [{
|
|
183
|
+
type: Input
|
|
184
|
+
}], autocomplete: [{
|
|
185
|
+
type: Input
|
|
186
|
+
}], inputmode: [{
|
|
187
|
+
type: Input
|
|
188
|
+
}], spellcheck: [{
|
|
189
|
+
type: Input
|
|
190
|
+
}], ariaLabel: [{
|
|
191
|
+
type: Input
|
|
192
|
+
}], ariaDescribedby: [{
|
|
193
|
+
type: Input
|
|
194
|
+
}], valueChange: [{
|
|
195
|
+
type: Output
|
|
196
|
+
}] } });
|
|
197
|
+
|
|
198
|
+
const WRAPPER_BASE = 'inline-flex items-center gap-2 select-none';
|
|
199
|
+
const WRAPPER_ENABLED = 'cursor-pointer';
|
|
200
|
+
const WRAPPER_DISABLED = 'cursor-not-allowed opacity-60';
|
|
201
|
+
const LABEL_BASE = 'text-[var(--cxs-color-on-surface)]';
|
|
202
|
+
const LABEL_DISABLED = 'text-[var(--cxs-color-on-surface-muted)]';
|
|
203
|
+
const LABEL_SIZE_CLASSES = {
|
|
204
|
+
sm: 'text-sm',
|
|
205
|
+
md: 'text-sm',
|
|
206
|
+
lg: 'text-base'
|
|
207
|
+
};
|
|
208
|
+
const CONTROL_BASE = "relative flex shrink-0 items-center justify-center rounded-full border " +
|
|
209
|
+
"bg-[var(--cxs-color-surface)] transition-colors " +
|
|
210
|
+
"after:absolute after:inset-0 after:m-auto after:rounded-full after:content-[''] " +
|
|
211
|
+
'after:transition-transform after:scale-0 peer-checked:after:scale-100 ' +
|
|
212
|
+
'peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 ' +
|
|
213
|
+
'peer-focus-visible:outline-[var(--cxs-color-focus)]';
|
|
214
|
+
const CONTROL_SIZE_CLASSES = {
|
|
215
|
+
sm: 'h-4 w-4',
|
|
216
|
+
md: 'h-5 w-5',
|
|
217
|
+
lg: 'h-6 w-6'
|
|
218
|
+
};
|
|
219
|
+
const CONTROL_VARIANT_CLASSES = {
|
|
220
|
+
primary: 'peer-checked:border-[var(--cxs-color-primary)] after:bg-[var(--cxs-color-primary)]',
|
|
221
|
+
secondary: 'peer-checked:border-[var(--cxs-color-on-surface)] after:bg-[var(--cxs-color-on-surface)]'
|
|
222
|
+
};
|
|
223
|
+
const DOT_SIZE_CLASSES = {
|
|
224
|
+
sm: 'after:h-2 after:w-2',
|
|
225
|
+
md: 'after:h-2.5 after:w-2.5',
|
|
226
|
+
lg: 'after:h-3 after:w-3'
|
|
227
|
+
};
|
|
228
|
+
const INVALID_CLASSES$1 = 'border-[var(--cxs-color-danger)] peer-checked:border-[var(--cxs-color-danger)] ' +
|
|
229
|
+
'after:bg-[var(--cxs-color-danger)]';
|
|
230
|
+
class CxsRadioComponent {
|
|
231
|
+
value = '';
|
|
232
|
+
name;
|
|
233
|
+
variant = 'primary';
|
|
234
|
+
size = 'md';
|
|
235
|
+
disabled = false;
|
|
236
|
+
required = false;
|
|
237
|
+
invalid = false;
|
|
238
|
+
autofocus = false;
|
|
239
|
+
id;
|
|
240
|
+
ariaLabel;
|
|
241
|
+
ariaDescribedby;
|
|
242
|
+
valueChange = new EventEmitter();
|
|
243
|
+
selectedValue = null;
|
|
244
|
+
disabledFromControl = false;
|
|
245
|
+
onChange = () => { };
|
|
246
|
+
onTouched = () => { };
|
|
247
|
+
get isDisabled() {
|
|
248
|
+
return this.disabled || this.disabledFromControl;
|
|
249
|
+
}
|
|
250
|
+
get isChecked() {
|
|
251
|
+
return this.selectedValue !== null && this.selectedValue === this.value;
|
|
252
|
+
}
|
|
253
|
+
get wrapperClass() {
|
|
254
|
+
return [
|
|
255
|
+
WRAPPER_BASE,
|
|
256
|
+
this.isDisabled ? WRAPPER_DISABLED : WRAPPER_ENABLED
|
|
257
|
+
].join(' ');
|
|
258
|
+
}
|
|
259
|
+
get labelClass() {
|
|
260
|
+
return [
|
|
261
|
+
LABEL_BASE,
|
|
262
|
+
LABEL_SIZE_CLASSES[this.size],
|
|
263
|
+
this.isDisabled ? LABEL_DISABLED : ''
|
|
264
|
+
]
|
|
265
|
+
.filter(Boolean)
|
|
266
|
+
.join(' ');
|
|
267
|
+
}
|
|
268
|
+
get controlClass() {
|
|
269
|
+
return [
|
|
270
|
+
CONTROL_BASE,
|
|
271
|
+
CONTROL_SIZE_CLASSES[this.size],
|
|
272
|
+
DOT_SIZE_CLASSES[this.size],
|
|
273
|
+
CONTROL_VARIANT_CLASSES[this.variant],
|
|
274
|
+
this.invalid ? INVALID_CLASSES$1 : ''
|
|
275
|
+
]
|
|
276
|
+
.filter(Boolean)
|
|
277
|
+
.join(' ');
|
|
278
|
+
}
|
|
279
|
+
writeValue(value) {
|
|
280
|
+
this.selectedValue = value ?? null;
|
|
281
|
+
}
|
|
282
|
+
registerOnChange(fn) {
|
|
283
|
+
this.onChange = fn;
|
|
284
|
+
}
|
|
285
|
+
registerOnTouched(fn) {
|
|
286
|
+
this.onTouched = fn;
|
|
287
|
+
}
|
|
288
|
+
setDisabledState(isDisabled) {
|
|
289
|
+
this.disabledFromControl = isDisabled;
|
|
290
|
+
}
|
|
291
|
+
onRadioChange(event) {
|
|
292
|
+
const target = event.target;
|
|
293
|
+
if (!target.checked) {
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
this.selectedValue = this.value;
|
|
297
|
+
this.onChange(this.value);
|
|
298
|
+
this.valueChange.emit(this.value);
|
|
299
|
+
}
|
|
300
|
+
onBlur() {
|
|
301
|
+
this.onTouched();
|
|
302
|
+
}
|
|
303
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CxsRadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
304
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: CxsRadioComponent, isStandalone: true, selector: "cxs-radio", inputs: { value: "value", name: "name", variant: "variant", size: "size", disabled: "disabled", required: "required", invalid: "invalid", autofocus: "autofocus", id: "id", ariaLabel: "ariaLabel", ariaDescribedby: "ariaDescribedby" }, outputs: { valueChange: "valueChange" }, providers: [
|
|
305
|
+
{
|
|
306
|
+
provide: NG_VALUE_ACCESSOR,
|
|
307
|
+
useExisting: forwardRef(() => CxsRadioComponent),
|
|
308
|
+
multi: true
|
|
309
|
+
}
|
|
310
|
+
], ngImport: i0, template: "<label [class]=\"wrapperClass\">\n <input\n class=\"peer sr-only\"\n type=\"radio\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [attr.value]=\"value\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n [attr.aria-invalid]=\"invalid ? 'true' : null\"\n [attr.autofocus]=\"autofocus ? true : null\"\n [checked]=\"isChecked\"\n [disabled]=\"isDisabled\"\n [required]=\"required\"\n (change)=\"onRadioChange($event)\"\n (blur)=\"onBlur()\"\n />\n <span [class]=\"controlClass\" aria-hidden=\"true\"></span>\n <span [class]=\"labelClass\">\n <ng-content></ng-content>\n </span>\n</label>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
311
|
+
}
|
|
312
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CxsRadioComponent, decorators: [{
|
|
313
|
+
type: Component,
|
|
314
|
+
args: [{ selector: 'cxs-radio', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
315
|
+
{
|
|
316
|
+
provide: NG_VALUE_ACCESSOR,
|
|
317
|
+
useExisting: forwardRef(() => CxsRadioComponent),
|
|
318
|
+
multi: true
|
|
319
|
+
}
|
|
320
|
+
], template: "<label [class]=\"wrapperClass\">\n <input\n class=\"peer sr-only\"\n type=\"radio\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [attr.value]=\"value\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n [attr.aria-invalid]=\"invalid ? 'true' : null\"\n [attr.autofocus]=\"autofocus ? true : null\"\n [checked]=\"isChecked\"\n [disabled]=\"isDisabled\"\n [required]=\"required\"\n (change)=\"onRadioChange($event)\"\n (blur)=\"onBlur()\"\n />\n <span [class]=\"controlClass\" aria-hidden=\"true\"></span>\n <span [class]=\"labelClass\">\n <ng-content></ng-content>\n </span>\n</label>\n" }]
|
|
321
|
+
}], propDecorators: { value: [{
|
|
322
|
+
type: Input
|
|
323
|
+
}], name: [{
|
|
324
|
+
type: Input
|
|
325
|
+
}], variant: [{
|
|
326
|
+
type: Input
|
|
327
|
+
}], size: [{
|
|
328
|
+
type: Input
|
|
329
|
+
}], disabled: [{
|
|
330
|
+
type: Input
|
|
331
|
+
}], required: [{
|
|
332
|
+
type: Input
|
|
333
|
+
}], invalid: [{
|
|
334
|
+
type: Input
|
|
335
|
+
}], autofocus: [{
|
|
336
|
+
type: Input
|
|
337
|
+
}], id: [{
|
|
338
|
+
type: Input
|
|
339
|
+
}], ariaLabel: [{
|
|
340
|
+
type: Input
|
|
341
|
+
}], ariaDescribedby: [{
|
|
342
|
+
type: Input
|
|
343
|
+
}], valueChange: [{
|
|
344
|
+
type: Output
|
|
345
|
+
}] } });
|
|
346
|
+
|
|
347
|
+
const BASE_CLASSES = 'w-full appearance-none rounded-[var(--cxs-radius-md)] border border-[var(--cxs-color-border)] ' +
|
|
348
|
+
'bg-[var(--cxs-color-surface)] text-[var(--cxs-color-on-surface)] ' +
|
|
349
|
+
'placeholder:text-[var(--cxs-color-on-surface-muted)] transition-colors ' +
|
|
350
|
+
'focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 ' +
|
|
351
|
+
'focus-visible:outline-[var(--cxs-color-focus)] focus-visible:border-[var(--cxs-color-focus)] ' +
|
|
352
|
+
'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-60';
|
|
353
|
+
const VARIANT_CLASSES = {
|
|
354
|
+
outline: 'bg-[var(--cxs-color-surface)]',
|
|
355
|
+
filled: 'bg-[var(--cxs-color-surface-hover)]'
|
|
356
|
+
};
|
|
357
|
+
const SIZE_CLASSES = {
|
|
358
|
+
sm: 'h-8 pl-3 pr-9 text-sm',
|
|
359
|
+
md: 'h-10 pl-3 pr-9 text-sm',
|
|
360
|
+
lg: 'h-12 pl-4 pr-10 text-base'
|
|
361
|
+
};
|
|
362
|
+
const INVALID_CLASSES = 'border-[var(--cxs-color-danger)] focus-visible:border-[var(--cxs-color-danger)] ' +
|
|
363
|
+
'focus-visible:outline-[var(--cxs-color-danger)]';
|
|
364
|
+
class CxsSelectComponent {
|
|
365
|
+
value = '';
|
|
366
|
+
variant = 'outline';
|
|
367
|
+
size = 'md';
|
|
368
|
+
disabled = false;
|
|
369
|
+
required = false;
|
|
370
|
+
invalid = false;
|
|
371
|
+
placeholder;
|
|
372
|
+
placeholderValue = '';
|
|
373
|
+
id;
|
|
374
|
+
name;
|
|
375
|
+
ariaLabel;
|
|
376
|
+
ariaDescribedby;
|
|
377
|
+
valueChange = new EventEmitter();
|
|
378
|
+
disabledFromControl = false;
|
|
379
|
+
onChange = () => { };
|
|
380
|
+
onTouched = () => { };
|
|
381
|
+
get isDisabled() {
|
|
382
|
+
return this.disabled || this.disabledFromControl;
|
|
383
|
+
}
|
|
384
|
+
get selectClass() {
|
|
385
|
+
return [
|
|
386
|
+
BASE_CLASSES,
|
|
387
|
+
SIZE_CLASSES[this.size],
|
|
388
|
+
VARIANT_CLASSES[this.variant],
|
|
389
|
+
this.invalid ? INVALID_CLASSES : ''
|
|
390
|
+
]
|
|
391
|
+
.filter(Boolean)
|
|
392
|
+
.join(' ');
|
|
393
|
+
}
|
|
394
|
+
get selectValue() {
|
|
395
|
+
if (this.placeholder && this.value === '') {
|
|
396
|
+
return this.placeholderValue;
|
|
397
|
+
}
|
|
398
|
+
return this.value;
|
|
399
|
+
}
|
|
400
|
+
writeValue(value) {
|
|
401
|
+
this.value = value ?? '';
|
|
402
|
+
}
|
|
403
|
+
registerOnChange(fn) {
|
|
404
|
+
this.onChange = fn;
|
|
405
|
+
}
|
|
406
|
+
registerOnTouched(fn) {
|
|
407
|
+
this.onTouched = fn;
|
|
408
|
+
}
|
|
409
|
+
setDisabledState(isDisabled) {
|
|
410
|
+
this.disabledFromControl = isDisabled;
|
|
411
|
+
}
|
|
412
|
+
onSelectChange(event) {
|
|
413
|
+
const target = event.target;
|
|
414
|
+
const nextValue = target.value;
|
|
415
|
+
this.value = nextValue;
|
|
416
|
+
this.onChange(nextValue);
|
|
417
|
+
this.valueChange.emit(nextValue);
|
|
418
|
+
}
|
|
419
|
+
onBlur() {
|
|
420
|
+
this.onTouched();
|
|
421
|
+
}
|
|
422
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CxsSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
423
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: CxsSelectComponent, isStandalone: true, selector: "cxs-select", inputs: { value: "value", variant: "variant", size: "size", disabled: "disabled", required: "required", invalid: "invalid", placeholder: "placeholder", placeholderValue: "placeholderValue", id: "id", name: "name", ariaLabel: "ariaLabel", ariaDescribedby: "ariaDescribedby" }, outputs: { valueChange: "valueChange" }, providers: [
|
|
424
|
+
{
|
|
425
|
+
provide: NG_VALUE_ACCESSOR,
|
|
426
|
+
useExisting: forwardRef(() => CxsSelectComponent),
|
|
427
|
+
multi: true
|
|
428
|
+
}
|
|
429
|
+
], ngImport: i0, template: "<div class=\"relative\">\n <select\n [class]=\"selectClass\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n [attr.aria-invalid]=\"invalid ? 'true' : null\"\n [disabled]=\"isDisabled\"\n [required]=\"required\"\n [value]=\"selectValue\"\n (change)=\"onSelectChange($event)\"\n (blur)=\"onBlur()\"\n >\n <option *ngIf=\"placeholder\" [value]=\"placeholderValue\" disabled>\n {{ placeholder }}\n </option>\n <ng-content></ng-content>\n </select>\n <span\n class=\"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-[var(--cxs-color-on-surface-muted)]\"\n aria-hidden=\"true\"\n >\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" class=\"h-4 w-4\">\n <path\n fill-rule=\"evenodd\"\n d=\"M5.23 7.21a.75.75 0 0 1 1.06.02L10 10.94l3.71-3.71a.75.75 0 1 1 1.06 1.06l-4.24 4.25a.75.75 0 0 1-1.06 0L5.21 8.29a.75.75 0 0 1 .02-1.08Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </span>\n</div>\r\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
430
|
+
}
|
|
431
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CxsSelectComponent, decorators: [{
|
|
432
|
+
type: Component,
|
|
433
|
+
args: [{ selector: 'cxs-select', standalone: true, imports: [NgIf], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
434
|
+
{
|
|
435
|
+
provide: NG_VALUE_ACCESSOR,
|
|
436
|
+
useExisting: forwardRef(() => CxsSelectComponent),
|
|
437
|
+
multi: true
|
|
438
|
+
}
|
|
439
|
+
], template: "<div class=\"relative\">\n <select\n [class]=\"selectClass\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n [attr.aria-invalid]=\"invalid ? 'true' : null\"\n [disabled]=\"isDisabled\"\n [required]=\"required\"\n [value]=\"selectValue\"\n (change)=\"onSelectChange($event)\"\n (blur)=\"onBlur()\"\n >\n <option *ngIf=\"placeholder\" [value]=\"placeholderValue\" disabled>\n {{ placeholder }}\n </option>\n <ng-content></ng-content>\n </select>\n <span\n class=\"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-[var(--cxs-color-on-surface-muted)]\"\n aria-hidden=\"true\"\n >\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" class=\"h-4 w-4\">\n <path\n fill-rule=\"evenodd\"\n d=\"M5.23 7.21a.75.75 0 0 1 1.06.02L10 10.94l3.71-3.71a.75.75 0 1 1 1.06 1.06l-4.24 4.25a.75.75 0 0 1-1.06 0L5.21 8.29a.75.75 0 0 1 .02-1.08Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </span>\n</div>\r\n" }]
|
|
440
|
+
}], propDecorators: { value: [{
|
|
441
|
+
type: Input
|
|
442
|
+
}], variant: [{
|
|
443
|
+
type: Input
|
|
444
|
+
}], size: [{
|
|
445
|
+
type: Input
|
|
446
|
+
}], disabled: [{
|
|
447
|
+
type: Input
|
|
448
|
+
}], required: [{
|
|
449
|
+
type: Input
|
|
450
|
+
}], invalid: [{
|
|
451
|
+
type: Input
|
|
452
|
+
}], placeholder: [{
|
|
453
|
+
type: Input
|
|
454
|
+
}], placeholderValue: [{
|
|
455
|
+
type: Input
|
|
456
|
+
}], id: [{
|
|
457
|
+
type: Input
|
|
458
|
+
}], name: [{
|
|
459
|
+
type: Input
|
|
460
|
+
}], ariaLabel: [{
|
|
461
|
+
type: Input
|
|
462
|
+
}], ariaDescribedby: [{
|
|
463
|
+
type: Input
|
|
464
|
+
}], valueChange: [{
|
|
465
|
+
type: Output
|
|
466
|
+
}] } });
|
|
467
|
+
|
|
468
|
+
/*
|
|
469
|
+
* Public API Surface of cerxos-ui
|
|
470
|
+
*/
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Generated bundle index. Do not edit.
|
|
474
|
+
*/
|
|
475
|
+
|
|
476
|
+
export { CerxosUi, CxsButtonComponent, CxsInputComponent, CxsRadioComponent, CxsSelectComponent };
|
|
477
|
+
//# sourceMappingURL=cerxos-ui.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cerxos-ui.mjs","sources":["../../../projects/cerxos-ui/src/lib/cerxos-ui.ts","../../../projects/cerxos-ui/src/lib/components/button/button.component.ts","../../../projects/cerxos-ui/src/lib/components/button/button.component.html","../../../projects/cerxos-ui/src/lib/components/input/input.component.ts","../../../projects/cerxos-ui/src/lib/components/input/input.component.html","../../../projects/cerxos-ui/src/lib/components/radio/radio.component.ts","../../../projects/cerxos-ui/src/lib/components/radio/radio.component.html","../../../projects/cerxos-ui/src/lib/components/select/select.component.ts","../../../projects/cerxos-ui/src/lib/components/select/select.component.html","../../../projects/cerxos-ui/src/public-api.ts","../../../projects/cerxos-ui/src/cerxos-ui.ts"],"sourcesContent":["import { Component } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'cxs-cerxos-ui',\r\n imports: [],\r\n template: `\r\n <p>\r\n cerxos-ui works!\r\n </p>\r\n `,\r\n styles: ``,\r\n})\r\nexport class CerxosUi {\r\n\r\n}\r\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { NgIf } from '@angular/common';\n\nexport type CxsButtonVariant = 'primary' | 'secondary' | 'ghost';\nexport type CxsButtonSize = 'sm' | 'md' | 'lg';\n\nconst BASE_CLASSES =\n 'relative inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors ' +\n 'focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 ' +\n 'focus-visible:outline-[var(--cxs-color-focus)] disabled:pointer-events-none disabled:opacity-50';\n\nconst VARIANT_CLASSES: Record<CxsButtonVariant, string> = {\n primary:\n 'bg-[var(--cxs-color-primary)] text-[var(--cxs-color-on-primary)] ' +\n 'hover:bg-[var(--cxs-color-primary-hover)] shadow-[var(--cxs-shadow-sm)]',\n secondary:\n 'bg-[var(--cxs-color-surface)] text-[var(--cxs-color-on-surface)] ' +\n 'border border-[var(--cxs-color-border)] hover:bg-[var(--cxs-color-surface-hover)]',\n ghost:\n 'bg-transparent text-[var(--cxs-color-primary)] hover:bg-[var(--cxs-color-primary-ghost)]'\n};\n\nconst SIZE_CLASSES: Record<CxsButtonSize, string> = {\n sm: 'h-8 px-3 text-sm rounded-[var(--cxs-radius-md)]',\n md: 'h-10 px-4 text-sm rounded-[var(--cxs-radius-md)]',\n lg: 'h-12 px-5 text-base rounded-[var(--cxs-radius-md)]'\n};\n\n@Component({\n selector: 'cxs-button',\n standalone: true,\n imports: [NgIf],\n templateUrl: './button.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class CxsButtonComponent {\n @Input() variant: CxsButtonVariant = 'primary';\n @Input() size: CxsButtonSize = 'md';\n @Input() disabled = false;\n @Input() loading = false;\n @Input() type: 'button' | 'submit' | 'reset' = 'button';\n\n get isDisabled(): boolean {\n return this.disabled || this.loading;\n }\n\n get buttonClass(): string {\n return [BASE_CLASSES, SIZE_CLASSES[this.size], VARIANT_CLASSES[this.variant]].join(' ');\n }\n}\n","<button\n [class]=\"buttonClass\"\n [attr.type]=\"type\"\n [disabled]=\"isDisabled\"\n [attr.aria-busy]=\"loading ? 'true' : null\"\n>\n <span\n *ngIf=\"loading\"\n class=\"h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent\"\n aria-hidden=\"true\"\n ></span>\n <span class=\"truncate\">\n <ng-content></ng-content>\n </span>\n</button>\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n forwardRef,\n Input,\n Output\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nexport type CxsInputVariant = 'outline' | 'filled';\nexport type CxsInputSize = 'sm' | 'md' | 'lg';\nexport type CxsInputType =\n | 'text'\n | 'email'\n | 'password'\n | 'search'\n | 'tel'\n | 'url'\n | 'number';\n\nconst BASE_CLASSES =\n 'w-full rounded-[var(--cxs-radius-md)] border border-[var(--cxs-color-border)] ' +\n 'bg-[var(--cxs-color-surface)] text-[var(--cxs-color-on-surface)] ' +\n 'placeholder:text-[var(--cxs-color-on-surface-muted)] transition-colors ' +\n 'focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 ' +\n 'focus-visible:outline-[var(--cxs-color-focus)] focus-visible:border-[var(--cxs-color-focus)] ' +\n 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-60';\n\nconst VARIANT_CLASSES: Record<CxsInputVariant, string> = {\n outline: 'bg-[var(--cxs-color-surface)]',\n filled: 'bg-[var(--cxs-color-surface-hover)]'\n};\n\nconst SIZE_CLASSES: Record<CxsInputSize, string> = {\n sm: 'h-8 px-3 text-sm',\n md: 'h-10 px-3 text-sm',\n lg: 'h-12 px-4 text-base'\n};\n\nconst INVALID_CLASSES =\n 'border-[var(--cxs-color-danger)] focus-visible:border-[var(--cxs-color-danger)] ' +\n 'focus-visible:outline-[var(--cxs-color-danger)]';\n\n@Component({\n selector: 'cxs-input',\n standalone: true,\n templateUrl: './input.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CxsInputComponent),\n multi: true\n }\n ]\n})\nexport class CxsInputComponent implements ControlValueAccessor {\n @Input() value = '';\n @Input() type: CxsInputType = 'text';\n @Input() variant: CxsInputVariant = 'outline';\n @Input() size: CxsInputSize = 'md';\n @Input() disabled = false;\n @Input() readonly = false;\n @Input() required = false;\n @Input() invalid = false;\n @Input() autofocus = false;\n\n @Input() id?: string;\n @Input() name?: string;\n @Input() placeholder?: string;\n @Input() autocomplete?: string;\n @Input() inputmode?: string;\n @Input() spellcheck: boolean | null = null;\n @Input() ariaLabel?: string;\n @Input() ariaDescribedby?: string;\n\n @Output() valueChange = new EventEmitter<string>();\n\n private disabledFromControl = false;\n private onChange: (value: string) => void = () => {};\n private onTouched: () => void = () => {};\n\n get isDisabled(): boolean {\n return this.disabled || this.disabledFromControl;\n }\n\n get inputClass(): string {\n return [\n BASE_CLASSES,\n SIZE_CLASSES[this.size],\n VARIANT_CLASSES[this.variant],\n this.invalid ? INVALID_CLASSES : ''\n ]\n .filter(Boolean)\n .join(' ');\n }\n\n writeValue(value: string | null): void {\n this.value = value ?? '';\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabledFromControl = isDisabled;\n }\n\n onInput(event: Event): void {\n const target = event.target as HTMLInputElement;\n const nextValue = target.value;\n\n this.value = nextValue;\n this.onChange(nextValue);\n this.valueChange.emit(nextValue);\n }\n\n onBlur(): void {\n this.onTouched();\n }\n}\r\n","<input\n [class]=\"inputClass\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [attr.type]=\"type\"\n [attr.placeholder]=\"placeholder\"\n [attr.autocomplete]=\"autocomplete\"\n [attr.inputmode]=\"inputmode\"\n [attr.spellcheck]=\"spellcheck === null ? null : spellcheck\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n [attr.aria-invalid]=\"invalid ? 'true' : null\"\n [attr.autofocus]=\"autofocus ? true : null\"\n [disabled]=\"isDisabled\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [value]=\"value\"\n (input)=\"onInput($event)\"\n (blur)=\"onBlur()\"\n/>\r\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n forwardRef,\n Input,\n Output\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nexport type CxsRadioSize = 'sm' | 'md' | 'lg';\nexport type CxsRadioVariant = 'primary' | 'secondary';\n\nconst WRAPPER_BASE = 'inline-flex items-center gap-2 select-none';\nconst WRAPPER_ENABLED = 'cursor-pointer';\nconst WRAPPER_DISABLED = 'cursor-not-allowed opacity-60';\n\nconst LABEL_BASE = 'text-[var(--cxs-color-on-surface)]';\nconst LABEL_DISABLED = 'text-[var(--cxs-color-on-surface-muted)]';\nconst LABEL_SIZE_CLASSES: Record<CxsRadioSize, string> = {\n sm: 'text-sm',\n md: 'text-sm',\n lg: 'text-base'\n};\n\nconst CONTROL_BASE =\n \"relative flex shrink-0 items-center justify-center rounded-full border \" +\n \"bg-[var(--cxs-color-surface)] transition-colors \" +\n \"after:absolute after:inset-0 after:m-auto after:rounded-full after:content-[''] \" +\n 'after:transition-transform after:scale-0 peer-checked:after:scale-100 ' +\n 'peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 ' +\n 'peer-focus-visible:outline-[var(--cxs-color-focus)]';\n\nconst CONTROL_SIZE_CLASSES: Record<CxsRadioSize, string> = {\n sm: 'h-4 w-4',\n md: 'h-5 w-5',\n lg: 'h-6 w-6'\n};\n\nconst CONTROL_VARIANT_CLASSES: Record<CxsRadioVariant, string> = {\n primary:\n 'peer-checked:border-[var(--cxs-color-primary)] after:bg-[var(--cxs-color-primary)]',\n secondary:\n 'peer-checked:border-[var(--cxs-color-on-surface)] after:bg-[var(--cxs-color-on-surface)]'\n};\n\nconst DOT_SIZE_CLASSES: Record<CxsRadioSize, string> = {\n sm: 'after:h-2 after:w-2',\n md: 'after:h-2.5 after:w-2.5',\n lg: 'after:h-3 after:w-3'\n};\n\nconst INVALID_CLASSES =\n 'border-[var(--cxs-color-danger)] peer-checked:border-[var(--cxs-color-danger)] ' +\n 'after:bg-[var(--cxs-color-danger)]';\n\n@Component({\n selector: 'cxs-radio',\n standalone: true,\n templateUrl: './radio.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CxsRadioComponent),\n multi: true\n }\n ]\n})\nexport class CxsRadioComponent implements ControlValueAccessor {\n @Input() value = '';\n @Input() name?: string;\n @Input() variant: CxsRadioVariant = 'primary';\n @Input() size: CxsRadioSize = 'md';\n @Input() disabled = false;\n @Input() required = false;\n @Input() invalid = false;\n @Input() autofocus = false;\n\n @Input() id?: string;\n @Input() ariaLabel?: string;\n @Input() ariaDescribedby?: string;\n\n @Output() valueChange = new EventEmitter<string>();\n\n private selectedValue: string | null = null;\n private disabledFromControl = false;\n private onChange: (value: string) => void = () => {};\n private onTouched: () => void = () => {};\n\n get isDisabled(): boolean {\n return this.disabled || this.disabledFromControl;\n }\n\n get isChecked(): boolean {\n return this.selectedValue !== null && this.selectedValue === this.value;\n }\n\n get wrapperClass(): string {\n return [\n WRAPPER_BASE,\n this.isDisabled ? WRAPPER_DISABLED : WRAPPER_ENABLED\n ].join(' ');\n }\n\n get labelClass(): string {\n return [\n LABEL_BASE,\n LABEL_SIZE_CLASSES[this.size],\n this.isDisabled ? LABEL_DISABLED : ''\n ]\n .filter(Boolean)\n .join(' ');\n }\n\n get controlClass(): string {\n return [\n CONTROL_BASE,\n CONTROL_SIZE_CLASSES[this.size],\n DOT_SIZE_CLASSES[this.size],\n CONTROL_VARIANT_CLASSES[this.variant],\n this.invalid ? INVALID_CLASSES : ''\n ]\n .filter(Boolean)\n .join(' ');\n }\n\n writeValue(value: string | null): void {\n this.selectedValue = value ?? null;\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabledFromControl = isDisabled;\n }\n\n onRadioChange(event: Event): void {\n const target = event.target as HTMLInputElement;\n if (!target.checked) {\n return;\n }\n\n this.selectedValue = this.value;\n this.onChange(this.value);\n this.valueChange.emit(this.value);\n }\n\n onBlur(): void {\n this.onTouched();\n }\n}\n","<label [class]=\"wrapperClass\">\n <input\n class=\"peer sr-only\"\n type=\"radio\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [attr.value]=\"value\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n [attr.aria-invalid]=\"invalid ? 'true' : null\"\n [attr.autofocus]=\"autofocus ? true : null\"\n [checked]=\"isChecked\"\n [disabled]=\"isDisabled\"\n [required]=\"required\"\n (change)=\"onRadioChange($event)\"\n (blur)=\"onBlur()\"\n />\n <span [class]=\"controlClass\" aria-hidden=\"true\"></span>\n <span [class]=\"labelClass\">\n <ng-content></ng-content>\n </span>\n</label>\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n forwardRef,\n Input,\n Output\n} from '@angular/core';\nimport { NgIf } from '@angular/common';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nexport type CxsSelectVariant = 'outline' | 'filled';\nexport type CxsSelectSize = 'sm' | 'md' | 'lg';\n\nconst BASE_CLASSES =\n 'w-full appearance-none rounded-[var(--cxs-radius-md)] border border-[var(--cxs-color-border)] ' +\n 'bg-[var(--cxs-color-surface)] text-[var(--cxs-color-on-surface)] ' +\n 'placeholder:text-[var(--cxs-color-on-surface-muted)] transition-colors ' +\n 'focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 ' +\n 'focus-visible:outline-[var(--cxs-color-focus)] focus-visible:border-[var(--cxs-color-focus)] ' +\n 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-60';\n\nconst VARIANT_CLASSES: Record<CxsSelectVariant, string> = {\n outline: 'bg-[var(--cxs-color-surface)]',\n filled: 'bg-[var(--cxs-color-surface-hover)]'\n};\n\nconst SIZE_CLASSES: Record<CxsSelectSize, string> = {\n sm: 'h-8 pl-3 pr-9 text-sm',\n md: 'h-10 pl-3 pr-9 text-sm',\n lg: 'h-12 pl-4 pr-10 text-base'\n};\n\nconst INVALID_CLASSES =\n 'border-[var(--cxs-color-danger)] focus-visible:border-[var(--cxs-color-danger)] ' +\n 'focus-visible:outline-[var(--cxs-color-danger)]';\n\n@Component({\n selector: 'cxs-select',\n standalone: true,\n imports: [NgIf],\n templateUrl: './select.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CxsSelectComponent),\n multi: true\n }\n ]\n})\nexport class CxsSelectComponent implements ControlValueAccessor {\n @Input() value = '';\n @Input() variant: CxsSelectVariant = 'outline';\n @Input() size: CxsSelectSize = 'md';\n @Input() disabled = false;\n @Input() required = false;\n @Input() invalid = false;\n @Input() placeholder?: string;\n @Input() placeholderValue = '';\n\n @Input() id?: string;\n @Input() name?: string;\n @Input() ariaLabel?: string;\n @Input() ariaDescribedby?: string;\n\n @Output() valueChange = new EventEmitter<string>();\n\n private disabledFromControl = false;\n private onChange: (value: string) => void = () => {};\n private onTouched: () => void = () => {};\n\n get isDisabled(): boolean {\n return this.disabled || this.disabledFromControl;\n }\n\n get selectClass(): string {\n return [\n BASE_CLASSES,\n SIZE_CLASSES[this.size],\n VARIANT_CLASSES[this.variant],\n this.invalid ? INVALID_CLASSES : ''\n ]\n .filter(Boolean)\n .join(' ');\n }\n\n get selectValue(): string {\n if (this.placeholder && this.value === '') {\n return this.placeholderValue;\n }\n\n return this.value;\n }\n\n writeValue(value: string | null): void {\n this.value = value ?? '';\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabledFromControl = isDisabled;\n }\n\n onSelectChange(event: Event): void {\n const target = event.target as HTMLSelectElement;\n const nextValue = target.value;\n\n this.value = nextValue;\n this.onChange(nextValue);\n this.valueChange.emit(nextValue);\n }\n\n onBlur(): void {\n this.onTouched();\n }\n}\r\n","<div class=\"relative\">\n <select\n [class]=\"selectClass\"\n [attr.id]=\"id\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n [attr.aria-invalid]=\"invalid ? 'true' : null\"\n [disabled]=\"isDisabled\"\n [required]=\"required\"\n [value]=\"selectValue\"\n (change)=\"onSelectChange($event)\"\n (blur)=\"onBlur()\"\n >\n <option *ngIf=\"placeholder\" [value]=\"placeholderValue\" disabled>\n {{ placeholder }}\n </option>\n <ng-content></ng-content>\n </select>\n <span\n class=\"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-[var(--cxs-color-on-surface-muted)]\"\n aria-hidden=\"true\"\n >\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" class=\"h-4 w-4\">\n <path\n fill-rule=\"evenodd\"\n d=\"M5.23 7.21a.75.75 0 0 1 1.06.02L10 10.94l3.71-3.71a.75.75 0 1 1 1.06 1.06l-4.24 4.25a.75.75 0 0 1-1.06 0L5.21 8.29a.75.75 0 0 1 .02-1.08Z\"\n clip-rule=\"evenodd\"\n />\n </svg>\n </span>\n</div>\r\n","/*\r\n * Public API Surface of cerxos-ui\r\n */\r\n\r\nexport * from './lib/cerxos-ui';\nexport * from './lib/components/button/button.component';\nexport * from './lib/components/input/input.component';\nexport * from './lib/components/radio/radio.component';\nexport * from './lib/components/select/select.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["BASE_CLASSES","VARIANT_CLASSES","SIZE_CLASSES","INVALID_CLASSES"],"mappings":";;;;;MAYa,QAAQ,CAAA;wGAAR,QAAQ,EAAA,IAAA,EAAA,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A,UAAA,EAAA,OAAA,EAAA,SAAA,EAAA,WAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,kBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,SAAA,EAAA,WAAA,EAAA,eAAA,EAAA,iBAAA,EAAA,EAAA,OAAA,EAAA,EAAA,WAAA,EAAA,aAAA,EAAA,EAAA,SAAA,EARlB;AACT,YAAA;AACE,gBAAA,OAAO,EAAE,iBAAiB;AAC1B,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,kBAAkB,CAAC;AACjD,gBAAA,KAAK,EAAE;AACR;SACF,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECjDH,mjCAgCA,4CDQY,IAAI,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAWH,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAd9B,SAAS;+BACE,YAAY,EAAA,UAAA,EACV,IAAI,EAAA,OAAA,EACP,CAAC,IAAI,CAAC,EAAA,eAAA,EAEE,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,wBAAwB,CAAC;AACjD,4BAAA,KAAK,EAAE;AACR;AACF,qBAAA,EAAA,QAAA,EAAA,mjCAAA,EAAA;;sBAGA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBAEA;;sBACA;;sBACA;;sBACA;;sBAEA;;;AElEH;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter } from '@angular/core';
|
|
3
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
4
|
+
|
|
5
|
+
declare class CerxosUi {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CerxosUi, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CerxosUi, "cxs-cerxos-ui", never, {}, {}, never, never, true, never>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
type CxsButtonVariant = 'primary' | 'secondary' | 'ghost';
|
|
11
|
+
type CxsButtonSize = 'sm' | 'md' | 'lg';
|
|
12
|
+
declare class CxsButtonComponent {
|
|
13
|
+
variant: CxsButtonVariant;
|
|
14
|
+
size: CxsButtonSize;
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
loading: boolean;
|
|
17
|
+
type: 'button' | 'submit' | 'reset';
|
|
18
|
+
get isDisabled(): boolean;
|
|
19
|
+
get buttonClass(): string;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CxsButtonComponent, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CxsButtonComponent, "cxs-button", never, { "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "type": { "alias": "type"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type CxsInputVariant = 'outline' | 'filled';
|
|
25
|
+
type CxsInputSize = 'sm' | 'md' | 'lg';
|
|
26
|
+
type CxsInputType = 'text' | 'email' | 'password' | 'search' | 'tel' | 'url' | 'number';
|
|
27
|
+
declare class CxsInputComponent implements ControlValueAccessor {
|
|
28
|
+
value: string;
|
|
29
|
+
type: CxsInputType;
|
|
30
|
+
variant: CxsInputVariant;
|
|
31
|
+
size: CxsInputSize;
|
|
32
|
+
disabled: boolean;
|
|
33
|
+
readonly: boolean;
|
|
34
|
+
required: boolean;
|
|
35
|
+
invalid: boolean;
|
|
36
|
+
autofocus: boolean;
|
|
37
|
+
id?: string;
|
|
38
|
+
name?: string;
|
|
39
|
+
placeholder?: string;
|
|
40
|
+
autocomplete?: string;
|
|
41
|
+
inputmode?: string;
|
|
42
|
+
spellcheck: boolean | null;
|
|
43
|
+
ariaLabel?: string;
|
|
44
|
+
ariaDescribedby?: string;
|
|
45
|
+
valueChange: EventEmitter<string>;
|
|
46
|
+
private disabledFromControl;
|
|
47
|
+
private onChange;
|
|
48
|
+
private onTouched;
|
|
49
|
+
get isDisabled(): boolean;
|
|
50
|
+
get inputClass(): string;
|
|
51
|
+
writeValue(value: string | null): void;
|
|
52
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
53
|
+
registerOnTouched(fn: () => void): void;
|
|
54
|
+
setDisabledState(isDisabled: boolean): void;
|
|
55
|
+
onInput(event: Event): void;
|
|
56
|
+
onBlur(): void;
|
|
57
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CxsInputComponent, never>;
|
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CxsInputComponent, "cxs-input", never, { "value": { "alias": "value"; "required": false; }; "type": { "alias": "type"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "required": { "alias": "required"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "id": { "alias": "id"; "required": false; }; "name": { "alias": "name"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "inputmode": { "alias": "inputmode"; "required": false; }; "spellcheck": { "alias": "spellcheck"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaDescribedby": { "alias": "ariaDescribedby"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
type CxsRadioSize = 'sm' | 'md' | 'lg';
|
|
62
|
+
type CxsRadioVariant = 'primary' | 'secondary';
|
|
63
|
+
declare class CxsRadioComponent implements ControlValueAccessor {
|
|
64
|
+
value: string;
|
|
65
|
+
name?: string;
|
|
66
|
+
variant: CxsRadioVariant;
|
|
67
|
+
size: CxsRadioSize;
|
|
68
|
+
disabled: boolean;
|
|
69
|
+
required: boolean;
|
|
70
|
+
invalid: boolean;
|
|
71
|
+
autofocus: boolean;
|
|
72
|
+
id?: string;
|
|
73
|
+
ariaLabel?: string;
|
|
74
|
+
ariaDescribedby?: string;
|
|
75
|
+
valueChange: EventEmitter<string>;
|
|
76
|
+
private selectedValue;
|
|
77
|
+
private disabledFromControl;
|
|
78
|
+
private onChange;
|
|
79
|
+
private onTouched;
|
|
80
|
+
get isDisabled(): boolean;
|
|
81
|
+
get isChecked(): boolean;
|
|
82
|
+
get wrapperClass(): string;
|
|
83
|
+
get labelClass(): string;
|
|
84
|
+
get controlClass(): string;
|
|
85
|
+
writeValue(value: string | null): void;
|
|
86
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
87
|
+
registerOnTouched(fn: () => void): void;
|
|
88
|
+
setDisabledState(isDisabled: boolean): void;
|
|
89
|
+
onRadioChange(event: Event): void;
|
|
90
|
+
onBlur(): void;
|
|
91
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CxsRadioComponent, never>;
|
|
92
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CxsRadioComponent, "cxs-radio", never, { "value": { "alias": "value"; "required": false; }; "name": { "alias": "name"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "id": { "alias": "id"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaDescribedby": { "alias": "ariaDescribedby"; "required": false; }; }, { "valueChange": "valueChange"; }, never, ["*"], true, never>;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
type CxsSelectVariant = 'outline' | 'filled';
|
|
96
|
+
type CxsSelectSize = 'sm' | 'md' | 'lg';
|
|
97
|
+
declare class CxsSelectComponent implements ControlValueAccessor {
|
|
98
|
+
value: string;
|
|
99
|
+
variant: CxsSelectVariant;
|
|
100
|
+
size: CxsSelectSize;
|
|
101
|
+
disabled: boolean;
|
|
102
|
+
required: boolean;
|
|
103
|
+
invalid: boolean;
|
|
104
|
+
placeholder?: string;
|
|
105
|
+
placeholderValue: string;
|
|
106
|
+
id?: string;
|
|
107
|
+
name?: string;
|
|
108
|
+
ariaLabel?: string;
|
|
109
|
+
ariaDescribedby?: string;
|
|
110
|
+
valueChange: EventEmitter<string>;
|
|
111
|
+
private disabledFromControl;
|
|
112
|
+
private onChange;
|
|
113
|
+
private onTouched;
|
|
114
|
+
get isDisabled(): boolean;
|
|
115
|
+
get selectClass(): string;
|
|
116
|
+
get selectValue(): string;
|
|
117
|
+
writeValue(value: string | null): void;
|
|
118
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
119
|
+
registerOnTouched(fn: () => void): void;
|
|
120
|
+
setDisabledState(isDisabled: boolean): void;
|
|
121
|
+
onSelectChange(event: Event): void;
|
|
122
|
+
onBlur(): void;
|
|
123
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CxsSelectComponent, never>;
|
|
124
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CxsSelectComponent, "cxs-select", never, { "value": { "alias": "value"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "placeholderValue": { "alias": "placeholderValue"; "required": false; }; "id": { "alias": "id"; "required": false; }; "name": { "alias": "name"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaDescribedby": { "alias": "ariaDescribedby"; "required": false; }; }, { "valueChange": "valueChange"; }, never, ["*"], true, never>;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export { CerxosUi, CxsButtonComponent, CxsInputComponent, CxsRadioComponent, CxsSelectComponent };
|
|
128
|
+
export type { CxsButtonSize, CxsButtonVariant, CxsInputSize, CxsInputType, CxsInputVariant, CxsRadioSize, CxsRadioVariant, CxsSelectSize, CxsSelectVariant };
|
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cerxos-ui",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^20.3.0",
|
|
6
|
+
"@angular/core": "^20.3.0"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"tslib": "^2.3.0"
|
|
10
|
+
},
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"module": "fesm2022/cerxos-ui.mjs",
|
|
13
|
+
"typings": "index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": {
|
|
16
|
+
"default": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./index.d.ts",
|
|
20
|
+
"default": "./fesm2022/cerxos-ui.mjs"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--cxs-color-primary: #1f7a4a;
|
|
3
|
+
--cxs-color-primary-hover: #17613a;
|
|
4
|
+
--cxs-color-primary-ghost: rgba(31, 122, 74, 0.12);
|
|
5
|
+
--cxs-color-on-primary: #ffffff;
|
|
6
|
+
--cxs-color-surface: #ffffff;
|
|
7
|
+
--cxs-color-surface-hover: #f6f8fa;
|
|
8
|
+
--cxs-color-on-surface: #0f172a;
|
|
9
|
+
--cxs-color-on-surface-muted: #64748b;
|
|
10
|
+
--cxs-color-border: #d0d7de;
|
|
11
|
+
--cxs-color-danger: #dc2626;
|
|
12
|
+
--cxs-color-focus: #f59e0b;
|
|
13
|
+
--cxs-radius-md: 8px;
|
|
14
|
+
--cxs-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.16);
|
|
15
|
+
}
|