ngx-com 0.0.1 → 0.0.4
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-avatar.mjs +772 -0
- package/fesm2022/ngx-com-components-avatar.mjs.map +1 -0
- package/fesm2022/ngx-com-components-badge.mjs +138 -0
- package/fesm2022/ngx-com-components-badge.mjs.map +1 -0
- package/fesm2022/ngx-com-components-button.mjs +146 -0
- package/fesm2022/ngx-com-components-button.mjs.map +1 -0
- package/fesm2022/ngx-com-components-calendar.mjs +5046 -0
- package/fesm2022/ngx-com-components-calendar.mjs.map +1 -0
- package/fesm2022/ngx-com-components-card.mjs +590 -0
- package/fesm2022/ngx-com-components-card.mjs.map +1 -0
- package/fesm2022/ngx-com-components-checkbox.mjs +344 -0
- package/fesm2022/ngx-com-components-checkbox.mjs.map +1 -0
- package/fesm2022/ngx-com-components-collapsible.mjs +612 -0
- package/fesm2022/ngx-com-components-collapsible.mjs.map +1 -0
- package/fesm2022/ngx-com-components-confirm.mjs +562 -0
- package/fesm2022/ngx-com-components-confirm.mjs.map +1 -0
- package/fesm2022/ngx-com-components-dropdown-testing.mjs +255 -0
- package/fesm2022/ngx-com-components-dropdown-testing.mjs.map +1 -0
- package/fesm2022/ngx-com-components-dropdown.mjs +2692 -0
- package/fesm2022/ngx-com-components-dropdown.mjs.map +1 -0
- package/fesm2022/ngx-com-components-empty-state.mjs +382 -0
- package/fesm2022/ngx-com-components-empty-state.mjs.map +1 -0
- package/fesm2022/ngx-com-components-form-field.mjs +924 -0
- package/fesm2022/ngx-com-components-form-field.mjs.map +1 -0
- package/fesm2022/ngx-com-components-icon.mjs +183 -0
- package/fesm2022/ngx-com-components-icon.mjs.map +1 -0
- package/fesm2022/ngx-com-components-item.mjs +578 -0
- package/fesm2022/ngx-com-components-item.mjs.map +1 -0
- package/fesm2022/ngx-com-components-menu.mjs +1200 -0
- package/fesm2022/ngx-com-components-menu.mjs.map +1 -0
- package/fesm2022/ngx-com-components-paginator.mjs +823 -0
- package/fesm2022/ngx-com-components-paginator.mjs.map +1 -0
- package/fesm2022/ngx-com-components-popover.mjs +901 -0
- package/fesm2022/ngx-com-components-popover.mjs.map +1 -0
- package/fesm2022/ngx-com-components-radio.mjs +621 -0
- package/fesm2022/ngx-com-components-radio.mjs.map +1 -0
- package/fesm2022/ngx-com-components-segmented-control.mjs +538 -0
- package/fesm2022/ngx-com-components-segmented-control.mjs.map +1 -0
- package/fesm2022/ngx-com-components-sort.mjs +368 -0
- package/fesm2022/ngx-com-components-sort.mjs.map +1 -0
- package/fesm2022/ngx-com-components-spinner.mjs +189 -0
- package/fesm2022/ngx-com-components-spinner.mjs.map +1 -0
- package/fesm2022/ngx-com-components-tabs.mjs +1522 -0
- package/fesm2022/ngx-com-components-tabs.mjs.map +1 -0
- package/fesm2022/ngx-com-components-tooltip.mjs +625 -0
- package/fesm2022/ngx-com-components-tooltip.mjs.map +1 -0
- package/fesm2022/ngx-com-components.mjs +17 -0
- package/fesm2022/ngx-com-components.mjs.map +1 -0
- package/fesm2022/ngx-com-tokens.mjs +12 -0
- package/fesm2022/ngx-com-tokens.mjs.map +1 -0
- package/fesm2022/ngx-com-utils.mjs +601 -0
- package/fesm2022/ngx-com-utils.mjs.map +1 -0
- package/fesm2022/ngx-com.mjs +9 -23
- package/fesm2022/ngx-com.mjs.map +1 -1
- package/package.json +105 -1
- package/types/ngx-com-components-avatar.d.ts +409 -0
- package/types/ngx-com-components-badge.d.ts +97 -0
- package/types/ngx-com-components-button.d.ts +69 -0
- package/types/ngx-com-components-calendar.d.ts +1665 -0
- package/types/ngx-com-components-card.d.ts +373 -0
- package/types/ngx-com-components-checkbox.d.ts +116 -0
- package/types/ngx-com-components-collapsible.d.ts +379 -0
- package/types/ngx-com-components-confirm.d.ts +160 -0
- package/types/ngx-com-components-dropdown-testing.d.ts +116 -0
- package/types/ngx-com-components-dropdown.d.ts +938 -0
- package/types/ngx-com-components-empty-state.d.ts +269 -0
- package/types/ngx-com-components-form-field.d.ts +531 -0
- package/types/ngx-com-components-icon.d.ts +94 -0
- package/types/ngx-com-components-item.d.ts +336 -0
- package/types/ngx-com-components-menu.d.ts +479 -0
- package/types/ngx-com-components-paginator.d.ts +265 -0
- package/types/ngx-com-components-popover.d.ts +309 -0
- package/types/ngx-com-components-radio.d.ts +258 -0
- package/types/ngx-com-components-segmented-control.d.ts +274 -0
- package/types/ngx-com-components-sort.d.ts +133 -0
- package/types/ngx-com-components-spinner.d.ts +120 -0
- package/types/ngx-com-components-tabs.d.ts +396 -0
- package/types/ngx-com-components-tooltip.d.ts +200 -0
- package/types/ngx-com-components.d.ts +12 -0
- package/types/ngx-com-tokens.d.ts +7 -0
- package/types/ngx-com-utils.d.ts +424 -0
- package/types/ngx-com.d.ts +10 -7
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InputSignal, InputSignalWithTransform, Signal } from '@angular/core';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
type ButtonVariant = 'solid' | 'outline' | 'ghost' | 'link';
|
|
6
|
+
type ButtonColor = 'primary' | 'accent' | 'warn' | 'muted';
|
|
7
|
+
type ButtonSize = 'sm' | 'md' | 'lg' | 'icon';
|
|
8
|
+
declare const buttonVariants: (props?: {
|
|
9
|
+
variant?: ButtonVariant;
|
|
10
|
+
color?: ButtonColor;
|
|
11
|
+
size?: ButtonSize;
|
|
12
|
+
fullWidth?: boolean;
|
|
13
|
+
}) => string;
|
|
14
|
+
type ButtonVariants = VariantProps<typeof buttonVariants>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Button directive — applies styled button classes to native `<button>` and `<a>` elements.
|
|
18
|
+
*
|
|
19
|
+
* Using a directive on native elements preserves:
|
|
20
|
+
* - Full control over native attributes (`type="submit"`, `routerLink`, `download`, etc.)
|
|
21
|
+
* - Native accessibility (keyboard handling, focus, ARIA)
|
|
22
|
+
* - No wrapper elements in the DOM
|
|
23
|
+
*
|
|
24
|
+
* @tokens `--color-primary`, `--color-primary-foreground`, `--color-primary-hover`, `--color-primary-subtle`,
|
|
25
|
+
* `--color-accent`, `--color-accent-foreground`, `--color-accent-hover`, `--color-accent-subtle`,
|
|
26
|
+
* `--color-warn`, `--color-warn-foreground`, `--color-warn-hover`, `--color-warn-subtle`,
|
|
27
|
+
* `--color-muted`, `--color-muted-foreground`, `--color-muted-hover`,
|
|
28
|
+
* `--color-disabled`, `--color-disabled-foreground`,
|
|
29
|
+
* `--color-border`, `--color-ring`
|
|
30
|
+
*
|
|
31
|
+
* @example Basic usage
|
|
32
|
+
* ```html
|
|
33
|
+
* <button comButton>Save</button>
|
|
34
|
+
* <button comButton variant="outline" color="accent">Cancel</button>
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @example Link button
|
|
38
|
+
* ```html
|
|
39
|
+
* <a comButton variant="link" href="/docs">Documentation</a>
|
|
40
|
+
* <a comButton variant="outline" routerLink="/dashboard">Dashboard</a>
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @example Icon button
|
|
44
|
+
* ```html
|
|
45
|
+
* <button comButton variant="ghost" size="icon" aria-label="Settings">
|
|
46
|
+
* <svg>...</svg>
|
|
47
|
+
* </button>
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* @example Full width
|
|
51
|
+
* ```html
|
|
52
|
+
* <button comButton fullWidth>Submit Application</button>
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
declare class ComButton {
|
|
56
|
+
readonly variant: InputSignal<ButtonVariant>;
|
|
57
|
+
readonly color: InputSignal<ButtonColor>;
|
|
58
|
+
readonly size: InputSignal<ButtonSize>;
|
|
59
|
+
readonly fullWidth: InputSignalWithTransform<boolean, unknown>;
|
|
60
|
+
readonly disabled: InputSignalWithTransform<boolean, unknown>;
|
|
61
|
+
readonly userClass: InputSignal<string>;
|
|
62
|
+
protected readonly ariaDisabled: Signal<'true' | null>;
|
|
63
|
+
protected readonly computedClass: Signal<string>;
|
|
64
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComButton, never>;
|
|
65
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComButton, "button[comButton], a[comButton]", ["comButton"], { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export { ComButton, buttonVariants };
|
|
69
|
+
export type { ButtonColor, ButtonSize, ButtonVariant, ButtonVariants };
|