ngx-com 0.0.1 → 0.0.3

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.
Files changed (58) hide show
  1. package/fesm2022/ngx-com-components-badge.mjs +138 -0
  2. package/fesm2022/ngx-com-components-badge.mjs.map +1 -0
  3. package/fesm2022/ngx-com-components-button.mjs +146 -0
  4. package/fesm2022/ngx-com-components-button.mjs.map +1 -0
  5. package/fesm2022/ngx-com-components-calendar.mjs +5046 -0
  6. package/fesm2022/ngx-com-components-calendar.mjs.map +1 -0
  7. package/fesm2022/ngx-com-components-card.mjs +590 -0
  8. package/fesm2022/ngx-com-components-card.mjs.map +1 -0
  9. package/fesm2022/ngx-com-components-checkbox.mjs +344 -0
  10. package/fesm2022/ngx-com-components-checkbox.mjs.map +1 -0
  11. package/fesm2022/ngx-com-components-collapsible.mjs +612 -0
  12. package/fesm2022/ngx-com-components-collapsible.mjs.map +1 -0
  13. package/fesm2022/ngx-com-components-dropdown-testing.mjs +255 -0
  14. package/fesm2022/ngx-com-components-dropdown-testing.mjs.map +1 -0
  15. package/fesm2022/ngx-com-components-dropdown.mjs +2598 -0
  16. package/fesm2022/ngx-com-components-dropdown.mjs.map +1 -0
  17. package/fesm2022/ngx-com-components-form-field.mjs +923 -0
  18. package/fesm2022/ngx-com-components-form-field.mjs.map +1 -0
  19. package/fesm2022/ngx-com-components-icon.mjs +183 -0
  20. package/fesm2022/ngx-com-components-icon.mjs.map +1 -0
  21. package/fesm2022/ngx-com-components-menu.mjs +1200 -0
  22. package/fesm2022/ngx-com-components-menu.mjs.map +1 -0
  23. package/fesm2022/ngx-com-components-popover.mjs +901 -0
  24. package/fesm2022/ngx-com-components-popover.mjs.map +1 -0
  25. package/fesm2022/ngx-com-components-radio.mjs +621 -0
  26. package/fesm2022/ngx-com-components-radio.mjs.map +1 -0
  27. package/fesm2022/ngx-com-components-sort.mjs +368 -0
  28. package/fesm2022/ngx-com-components-sort.mjs.map +1 -0
  29. package/fesm2022/ngx-com-components-tabs.mjs +1522 -0
  30. package/fesm2022/ngx-com-components-tabs.mjs.map +1 -0
  31. package/fesm2022/ngx-com-components.mjs +17 -0
  32. package/fesm2022/ngx-com-components.mjs.map +1 -0
  33. package/fesm2022/ngx-com-tokens.mjs +12 -0
  34. package/fesm2022/ngx-com-tokens.mjs.map +1 -0
  35. package/fesm2022/ngx-com-utils.mjs +601 -0
  36. package/fesm2022/ngx-com-utils.mjs.map +1 -0
  37. package/fesm2022/ngx-com.mjs +9 -23
  38. package/fesm2022/ngx-com.mjs.map +1 -1
  39. package/package.json +73 -1
  40. package/types/ngx-com-components-badge.d.ts +97 -0
  41. package/types/ngx-com-components-button.d.ts +69 -0
  42. package/types/ngx-com-components-calendar.d.ts +1665 -0
  43. package/types/ngx-com-components-card.d.ts +373 -0
  44. package/types/ngx-com-components-checkbox.d.ts +116 -0
  45. package/types/ngx-com-components-collapsible.d.ts +379 -0
  46. package/types/ngx-com-components-dropdown-testing.d.ts +116 -0
  47. package/types/ngx-com-components-dropdown.d.ts +914 -0
  48. package/types/ngx-com-components-form-field.d.ts +531 -0
  49. package/types/ngx-com-components-icon.d.ts +94 -0
  50. package/types/ngx-com-components-menu.d.ts +479 -0
  51. package/types/ngx-com-components-popover.d.ts +309 -0
  52. package/types/ngx-com-components-radio.d.ts +258 -0
  53. package/types/ngx-com-components-sort.d.ts +133 -0
  54. package/types/ngx-com-components-tabs.d.ts +396 -0
  55. package/types/ngx-com-components.d.ts +12 -0
  56. package/types/ngx-com-tokens.d.ts +7 -0
  57. package/types/ngx-com-utils.d.ts +424 -0
  58. package/types/ngx-com.d.ts +10 -7
@@ -1,30 +1,16 @@
1
- import * as i0 from '@angular/core';
2
- import { Component } from '@angular/core';
3
-
4
- class Com {
5
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: Com, deps: [], target: i0.ɵɵFactoryTarget.Component });
6
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.0", type: Com, isStandalone: true, selector: "com-com", ngImport: i0, template: `
7
- <p>
8
- com works!
9
- </p>
10
- `, isInline: true, styles: [""] });
11
- }
12
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: Com, decorators: [{
13
- type: Component,
14
- args: [{ selector: 'com-com', imports: [], template: `
15
- <p>
16
- com works!
17
- </p>
18
- ` }]
19
- }] });
20
-
21
- /*
22
- * Public API Surface of com
1
+ /**
2
+ * Public API Surface of ngx-com
3
+ *
4
+ * For specific imports, use subpaths:
5
+ * - ngx-com/components
6
+ * - ngx-com/utils
7
+ * - ngx-com/tokens
23
8
  */
9
+ const VERSION = '0.0.1';
24
10
 
25
11
  /**
26
12
  * Generated bundle index. Do not edit.
27
13
  */
28
14
 
29
- export { Com };
15
+ export { VERSION };
30
16
  //# sourceMappingURL=ngx-com.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-com.mjs","sources":["../../../projects/com/src/lib/com.ts","../../../projects/com/src/public-api.ts","../../../projects/com/src/ngx-com.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'com-com',\n imports: [],\n template: `\n <p>\n com works!\n </p>\n `,\n styles: ``,\n})\nexport class Com {\n\n}\n","/*\n * Public API Surface of com\n */\n\nexport * from './lib/com';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAYa,GAAG,CAAA;uGAAH,GAAG,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAH,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,GAAG,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAPJ;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAGU,GAAG,EAAA,UAAA,EAAA,CAAA;kBAVf,SAAS;+BACE,SAAS,EAAA,OAAA,EACV,EAAE,EAAA,QAAA,EACD;;;;AAIT,EAAA,CAAA,EAAA;;;ACTH;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-com.mjs","sources":["../../../projects/com/src/public-api.ts","../../../projects/com/src/ngx-com.ts"],"sourcesContent":["/**\n * Public API Surface of ngx-com\n *\n * For specific imports, use subpaths:\n * - ngx-com/components\n * - ngx-com/utils\n * - ngx-com/tokens\n */\n\nexport const VERSION = '0.0.1';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;;;;;;AAOG;AAEI,MAAM,OAAO,GAAG;;ACTvB;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-com",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/avs2001/ngx-com"
@@ -22,6 +22,78 @@
22
22
  ".": {
23
23
  "types": "./types/ngx-com.d.ts",
24
24
  "default": "./fesm2022/ngx-com.mjs"
25
+ },
26
+ "./components": {
27
+ "types": "./types/ngx-com-components.d.ts",
28
+ "default": "./fesm2022/ngx-com-components.mjs"
29
+ },
30
+ "./components/badge": {
31
+ "types": "./types/ngx-com-components-badge.d.ts",
32
+ "default": "./fesm2022/ngx-com-components-badge.mjs"
33
+ },
34
+ "./components/button": {
35
+ "types": "./types/ngx-com-components-button.d.ts",
36
+ "default": "./fesm2022/ngx-com-components-button.mjs"
37
+ },
38
+ "./components/calendar": {
39
+ "types": "./types/ngx-com-components-calendar.d.ts",
40
+ "default": "./fesm2022/ngx-com-components-calendar.mjs"
41
+ },
42
+ "./components/card": {
43
+ "types": "./types/ngx-com-components-card.d.ts",
44
+ "default": "./fesm2022/ngx-com-components-card.mjs"
45
+ },
46
+ "./components/checkbox": {
47
+ "types": "./types/ngx-com-components-checkbox.d.ts",
48
+ "default": "./fesm2022/ngx-com-components-checkbox.mjs"
49
+ },
50
+ "./components/collapsible": {
51
+ "types": "./types/ngx-com-components-collapsible.d.ts",
52
+ "default": "./fesm2022/ngx-com-components-collapsible.mjs"
53
+ },
54
+ "./components/dropdown": {
55
+ "types": "./types/ngx-com-components-dropdown.d.ts",
56
+ "default": "./fesm2022/ngx-com-components-dropdown.mjs"
57
+ },
58
+ "./components/dropdown/testing": {
59
+ "types": "./types/ngx-com-components-dropdown-testing.d.ts",
60
+ "default": "./fesm2022/ngx-com-components-dropdown-testing.mjs"
61
+ },
62
+ "./components/form-field": {
63
+ "types": "./types/ngx-com-components-form-field.d.ts",
64
+ "default": "./fesm2022/ngx-com-components-form-field.mjs"
65
+ },
66
+ "./components/icon": {
67
+ "types": "./types/ngx-com-components-icon.d.ts",
68
+ "default": "./fesm2022/ngx-com-components-icon.mjs"
69
+ },
70
+ "./components/menu": {
71
+ "types": "./types/ngx-com-components-menu.d.ts",
72
+ "default": "./fesm2022/ngx-com-components-menu.mjs"
73
+ },
74
+ "./components/popover": {
75
+ "types": "./types/ngx-com-components-popover.d.ts",
76
+ "default": "./fesm2022/ngx-com-components-popover.mjs"
77
+ },
78
+ "./components/radio": {
79
+ "types": "./types/ngx-com-components-radio.d.ts",
80
+ "default": "./fesm2022/ngx-com-components-radio.mjs"
81
+ },
82
+ "./components/sort": {
83
+ "types": "./types/ngx-com-components-sort.d.ts",
84
+ "default": "./fesm2022/ngx-com-components-sort.mjs"
85
+ },
86
+ "./components/tabs": {
87
+ "types": "./types/ngx-com-components-tabs.d.ts",
88
+ "default": "./fesm2022/ngx-com-components-tabs.mjs"
89
+ },
90
+ "./tokens": {
91
+ "types": "./types/ngx-com-tokens.d.ts",
92
+ "default": "./fesm2022/ngx-com-tokens.mjs"
93
+ },
94
+ "./utils": {
95
+ "types": "./types/ngx-com-utils.d.ts",
96
+ "default": "./fesm2022/ngx-com-utils.mjs"
25
97
  }
26
98
  }
27
99
  }
@@ -0,0 +1,97 @@
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
+ * Variant type for badge appearance.
7
+ */
8
+ type BadgeVariant = 'primary' | 'accent' | 'warn' | 'success' | 'muted' | 'outline';
9
+ /**
10
+ * Size type for badge.
11
+ */
12
+ type BadgeSize = 'sm' | 'default' | 'lg';
13
+ /**
14
+ * CVA variants for the badge directive.
15
+ *
16
+ * @tokens `--color-primary`, `--color-primary-foreground`, `--color-primary-hover`,
17
+ * `--color-accent`, `--color-accent-foreground`, `--color-accent-hover`,
18
+ * `--color-warn`, `--color-warn-foreground`, `--color-warn-hover`,
19
+ * `--color-success`, `--color-success-foreground`, `--color-success-hover`,
20
+ * `--color-muted`, `--color-muted-foreground`, `--color-muted-hover`,
21
+ * `--color-border`, `--color-foreground`, `--radius-badge`, `--radius-badge-sm`, `--radius-pill`
22
+ */
23
+ declare const badgeVariants: (props?: {
24
+ variant?: BadgeVariant;
25
+ size?: BadgeSize;
26
+ pill?: boolean;
27
+ }) => string;
28
+ type BadgeVariants = VariantProps<typeof badgeVariants>;
29
+
30
+ /**
31
+ * Badge directive — applies styled badge classes to any host element.
32
+ *
33
+ * Works on `<span>`, `<a>`, `<button>`, or any other element.
34
+ * Hover styles are automatically applied only on `<a>` elements via `[a&]:hover:`.
35
+ *
36
+ * @tokens `--color-primary`, `--color-primary-foreground`, `--color-primary-hover`,
37
+ * `--color-accent`, `--color-accent-foreground`, `--color-accent-hover`,
38
+ * `--color-warn`, `--color-warn-foreground`, `--color-warn-hover`,
39
+ * `--color-success`, `--color-success-foreground`, `--color-success-hover`,
40
+ * `--color-muted`, `--color-muted-foreground`, `--color-muted-hover`,
41
+ * `--color-border`, `--color-foreground`, `--radius-badge`, `--radius-badge-sm`, `--radius-pill`
42
+ *
43
+ * @example Basic usage
44
+ * ```html
45
+ * <span comBadge>Primary</span>
46
+ * <span comBadge variant="accent">Accent</span>
47
+ * <span comBadge variant="warn">Warning</span>
48
+ * ```
49
+ *
50
+ * @example Pill shape
51
+ * ```html
52
+ * <span comBadge pill>New</span>
53
+ * <span comBadge variant="success" pill>Online</span>
54
+ * ```
55
+ *
56
+ * @example Sizes
57
+ * ```html
58
+ * <span comBadge size="sm">SM</span>
59
+ * <span comBadge>Default</span>
60
+ * <span comBadge size="lg">Large</span>
61
+ * ```
62
+ *
63
+ * @example As a link (hover activates automatically)
64
+ * ```html
65
+ * <a href="/alerts" comBadge variant="warn">3 alerts</a>
66
+ * ```
67
+ *
68
+ * @example With an icon (SVG auto-sized)
69
+ * ```html
70
+ * <span comBadge variant="success">
71
+ * <svg><!-- check icon --></svg>
72
+ * Online
73
+ * </span>
74
+ * ```
75
+ *
76
+ * @example Dynamic variant
77
+ * ```html
78
+ * <span comBadge [variant]="statusVariant()">{{ statusLabel() }}</span>
79
+ * ```
80
+ */
81
+ declare class ComBadge {
82
+ /** Visual variant — maps to semantic token pairings */
83
+ readonly variant: InputSignal<BadgeVariant>;
84
+ /** Badge size */
85
+ readonly size: InputSignal<BadgeSize>;
86
+ /** Fully rounded pill shape */
87
+ readonly pill: InputSignalWithTransform<boolean, unknown>;
88
+ /** Consumer CSS classes — merged with variant classes via mergeClasses() */
89
+ readonly userClass: InputSignal<string>;
90
+ /** @internal Computed host class from CVA + consumer overrides */
91
+ protected readonly computedClass: Signal<string>;
92
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComBadge, never>;
93
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ComBadge, "[comBadge]", ["comBadge"], { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "pill": { "alias": "pill"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
94
+ }
95
+
96
+ export { ComBadge, badgeVariants };
97
+ export type { BadgeSize, BadgeVariant, BadgeVariants };
@@ -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 };