ngx-com 0.0.20 → 0.0.21
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/fesm2022/ngx-com-components-checkbox.mjs +16 -7
- package/fesm2022/ngx-com-components-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-com-components-dropdown.mjs +18 -10
- package/fesm2022/ngx-com-components-dropdown.mjs.map +1 -1
- package/fesm2022/ngx-com-components-form-field.mjs +48 -8
- package/fesm2022/ngx-com-components-form-field.mjs.map +1 -1
- package/fesm2022/ngx-com-components-radio.mjs +15 -8
- package/fesm2022/ngx-com-components-radio.mjs.map +1 -1
- package/fesm2022/ngx-com-components-separator.mjs +102 -0
- package/fesm2022/ngx-com-components-separator.mjs.map +1 -0
- package/package.json +5 -1
- package/types/ngx-com-components-checkbox.d.ts +7 -2
- package/types/ngx-com-components-dropdown.d.ts +8 -5
- package/types/ngx-com-components-form-field.d.ts +19 -3
- package/types/ngx-com-components-radio.d.ts +5 -3
- package/types/ngx-com-components-separator.d.ts +75 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InputSignal, InputSignalWithTransform, Signal } from '@angular/core';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Orientation type for separator direction.
|
|
7
|
+
*/
|
|
8
|
+
type SeparatorOrientation = 'horizontal' | 'vertical';
|
|
9
|
+
/**
|
|
10
|
+
* Variant type for separator appearance.
|
|
11
|
+
*/
|
|
12
|
+
type SeparatorVariant = 'default' | 'subtle';
|
|
13
|
+
/**
|
|
14
|
+
* CVA variants for the separator directive.
|
|
15
|
+
*
|
|
16
|
+
* @tokens `--color-border`, `--color-border-subtle`
|
|
17
|
+
*/
|
|
18
|
+
declare const separatorVariants: (props?: {
|
|
19
|
+
orientation?: SeparatorOrientation;
|
|
20
|
+
variant?: SeparatorVariant;
|
|
21
|
+
}) => string;
|
|
22
|
+
type SeparatorVariants = VariantProps<typeof separatorVariants>;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Separator directive — applies a visual divider to any host element.
|
|
26
|
+
*
|
|
27
|
+
* Works on `<hr>`, `<div>`, or any other element. Supports horizontal and
|
|
28
|
+
* vertical orientations, a subtle color variant, and a decorative mode that
|
|
29
|
+
* hides the separator from assistive technology.
|
|
30
|
+
*
|
|
31
|
+
* @tokens `--color-border`, `--color-border-subtle`
|
|
32
|
+
*
|
|
33
|
+
* @example Horizontal divider
|
|
34
|
+
* ```html
|
|
35
|
+
* <hr comSeparator />
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @example Vertical divider
|
|
39
|
+
* ```html
|
|
40
|
+
* <div comSeparator orientation="vertical" class="h-6"></div>
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @example Subtle variant
|
|
44
|
+
* ```html
|
|
45
|
+
* <hr comSeparator variant="subtle" />
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @example Decorative (hidden from screen readers)
|
|
49
|
+
* ```html
|
|
50
|
+
* <hr comSeparator decorative />
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
declare class ComSeparator {
|
|
54
|
+
/** Direction of the separator line */
|
|
55
|
+
readonly orientation: InputSignal<SeparatorOrientation>;
|
|
56
|
+
/** Color intensity — `default` uses border-border, `subtle` uses border-border-subtle */
|
|
57
|
+
readonly variant: InputSignal<SeparatorVariant>;
|
|
58
|
+
/** When true, hides the separator from assistive technology */
|
|
59
|
+
readonly decorative: InputSignalWithTransform<boolean, unknown>;
|
|
60
|
+
/** Consumer CSS classes — merged with variant classes via mergeClasses() */
|
|
61
|
+
readonly userClass: InputSignal<string>;
|
|
62
|
+
/** @internal Computed host class from CVA + consumer overrides */
|
|
63
|
+
protected readonly computedClass: Signal<string>;
|
|
64
|
+
/** @internal Role attribute — separator when semantic, none when decorative */
|
|
65
|
+
protected readonly computedRole: Signal<string>;
|
|
66
|
+
/** @internal Aria-orientation — set only when not decorative */
|
|
67
|
+
protected readonly computedAriaOrientation: Signal<string | null>;
|
|
68
|
+
/** @internal Aria-hidden — true only when decorative */
|
|
69
|
+
protected readonly computedAriaHidden: Signal<'true' | null>;
|
|
70
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComSeparator, never>;
|
|
71
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComSeparator, "[comSeparator]", ["comSeparator"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "decorative": { "alias": "decorative"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { ComSeparator, separatorVariants };
|
|
75
|
+
export type { SeparatorOrientation, SeparatorVariant, SeparatorVariants };
|