@egose/shadcn-theme-ng-tw 0.0.14

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 (123) hide show
  1. package/README.md +2 -0
  2. package/accordion/README.md +64 -0
  3. package/accordion/fesm2022/accordion.mjs +155 -0
  4. package/accordion/fesm2022/accordion.mjs.map +1 -0
  5. package/accordion/index.d.ts +49 -0
  6. package/alert/README.md +64 -0
  7. package/alert/fesm2022/alert.mjs +189 -0
  8. package/alert/fesm2022/alert.mjs.map +1 -0
  9. package/alert/index.d.ts +49 -0
  10. package/autocomplete/README.md +64 -0
  11. package/autocomplete/fesm2022/autocomplete.mjs +543 -0
  12. package/autocomplete/fesm2022/autocomplete.mjs.map +1 -0
  13. package/autocomplete/index.d.ts +162 -0
  14. package/badge/README.md +64 -0
  15. package/badge/fesm2022/badge.mjs +137 -0
  16. package/badge/fesm2022/badge.mjs.map +1 -0
  17. package/badge/index.d.ts +33 -0
  18. package/basic-alert/README.md +64 -0
  19. package/basic-alert/fesm2022/basic-alert.mjs +103 -0
  20. package/basic-alert/fesm2022/basic-alert.mjs.map +1 -0
  21. package/basic-alert/index.d.ts +14 -0
  22. package/button/README.md +64 -0
  23. package/button/fesm2022/button.mjs +282 -0
  24. package/button/fesm2022/button.mjs.map +1 -0
  25. package/button/index.d.ts +52 -0
  26. package/calendar/README.md +64 -0
  27. package/calendar/fesm2022/calendar.mjs +637 -0
  28. package/calendar/fesm2022/calendar.mjs.map +1 -0
  29. package/calendar/index.d.ts +111 -0
  30. package/confirmation-dialog/README.md +64 -0
  31. package/confirmation-dialog/fesm2022/confirmation-dialog.mjs +93 -0
  32. package/confirmation-dialog/fesm2022/confirmation-dialog.mjs.map +1 -0
  33. package/confirmation-dialog/index.d.ts +24 -0
  34. package/date-picker/README.md +64 -0
  35. package/date-picker/fesm2022/date-picker.mjs +599 -0
  36. package/date-picker/fesm2022/date-picker.mjs.map +1 -0
  37. package/date-picker/index.d.ts +227 -0
  38. package/dialog/README.md +64 -0
  39. package/dialog/fesm2022/dialog.mjs +278 -0
  40. package/dialog/fesm2022/dialog.mjs.map +1 -0
  41. package/dialog/index.d.ts +89 -0
  42. package/exports.json +1 -0
  43. package/form-date-picker/README.md +64 -0
  44. package/form-date-picker/fesm2022/form-date-picker.mjs +146 -0
  45. package/form-date-picker/fesm2022/form-date-picker.mjs.map +1 -0
  46. package/form-date-picker/index.d.ts +32 -0
  47. package/form-field/README.md +64 -0
  48. package/form-field/fesm2022/form-field.mjs +112 -0
  49. package/form-field/fesm2022/form-field.mjs.map +1 -0
  50. package/form-field/index.d.ts +37 -0
  51. package/form-searchable-multiselect/README.md +64 -0
  52. package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +124 -0
  53. package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs.map +1 -0
  54. package/form-searchable-multiselect/index.d.ts +28 -0
  55. package/form-select/README.md +64 -0
  56. package/form-select/fesm2022/form-select.mjs +165 -0
  57. package/form-select/fesm2022/form-select.mjs.map +1 -0
  58. package/form-select/index.d.ts +33 -0
  59. package/form-text-input/README.md +64 -0
  60. package/form-text-input/fesm2022/form-text-input.mjs +197 -0
  61. package/form-text-input/fesm2022/form-text-input.mjs.map +1 -0
  62. package/form-text-input/index.d.ts +47 -0
  63. package/form-textarea/README.md +64 -0
  64. package/form-textarea/fesm2022/form-textarea.mjs +156 -0
  65. package/form-textarea/fesm2022/form-textarea.mjs.map +1 -0
  66. package/form-textarea/index.d.ts +33 -0
  67. package/icon/README.md +64 -0
  68. package/icon/fesm2022/icon.mjs +71 -0
  69. package/icon/fesm2022/icon.mjs.map +1 -0
  70. package/icon/index.d.ts +27 -0
  71. package/input/README.md +64 -0
  72. package/input/fesm2022/input.mjs +97 -0
  73. package/input/fesm2022/input.mjs.map +1 -0
  74. package/input/index.d.ts +41 -0
  75. package/label/README.md +64 -0
  76. package/label/fesm2022/label.mjs +51 -0
  77. package/label/fesm2022/label.mjs.map +1 -0
  78. package/label/index.d.ts +19 -0
  79. package/package.json +139 -0
  80. package/popover/README.md +64 -0
  81. package/popover/fesm2022/popover.mjs +69 -0
  82. package/popover/fesm2022/popover.mjs.map +1 -0
  83. package/popover/index.d.ts +30 -0
  84. package/radio-group/README.md +64 -0
  85. package/radio-group/fesm2022/radio-group.mjs +170 -0
  86. package/radio-group/fesm2022/radio-group.mjs.map +1 -0
  87. package/radio-group/index.d.ts +63 -0
  88. package/searchable-multiselect/README.md +64 -0
  89. package/searchable-multiselect/fesm2022/searchable-multiselect.mjs +221 -0
  90. package/searchable-multiselect/fesm2022/searchable-multiselect.mjs.map +1 -0
  91. package/searchable-multiselect/index.d.ts +50 -0
  92. package/select/README.md +64 -0
  93. package/select/fesm2022/select.mjs +281 -0
  94. package/select/fesm2022/select.mjs.map +1 -0
  95. package/select/index.d.ts +92 -0
  96. package/separator/README.md +64 -0
  97. package/separator/fesm2022/separator.mjs +46 -0
  98. package/separator/fesm2022/separator.mjs.map +1 -0
  99. package/separator/index.d.ts +19 -0
  100. package/sonner/README.md +64 -0
  101. package/sonner/fesm2022/sonner.mjs +110 -0
  102. package/sonner/fesm2022/sonner.mjs.map +1 -0
  103. package/sonner/index.d.ts +32 -0
  104. package/spinner/README.md +64 -0
  105. package/spinner/fesm2022/spinner.mjs +67 -0
  106. package/spinner/fesm2022/spinner.mjs.map +1 -0
  107. package/spinner/index.d.ts +25 -0
  108. package/switch/README.md +64 -0
  109. package/switch/fesm2022/switch.mjs +139 -0
  110. package/switch/fesm2022/switch.mjs.map +1 -0
  111. package/switch/index.d.ts +56 -0
  112. package/tabs/README.md +64 -0
  113. package/tabs/fesm2022/tabs.mjs +258 -0
  114. package/tabs/fesm2022/tabs.mjs.map +1 -0
  115. package/tabs/index.d.ts +71 -0
  116. package/tooltip/README.md +64 -0
  117. package/tooltip/fesm2022/tooltip.mjs +93 -0
  118. package/tooltip/fesm2022/tooltip.mjs.map +1 -0
  119. package/tooltip/index.d.ts +21 -0
  120. package/utils/README.md +64 -0
  121. package/utils/fesm2022/utils.mjs +17 -0
  122. package/utils/fesm2022/utils.mjs.map +1 -0
  123. package/utils/index.d.ts +5 -0
@@ -0,0 +1,46 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, computed, Directive, NgModule } from '@angular/core';
3
+ import * as i1 from '@spartan-ng/brain/separator';
4
+ import { BrnSeparator } from '@spartan-ng/brain/separator';
5
+ import { hlm } from '@egose/shadcn-theme-ng/utils';
6
+
7
+ class HlmSeparator {
8
+ userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
9
+ _computedClass = computed(() => hlm('tw:bg-border tw:inline-flex tw:shrink-0 tw:data-[orientation=horizontal]:h-px tw:data-[orientation=vertical]:h-full tw:data-[orientation=horizontal]:w-full tw:data-[orientation=vertical]:w-px', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
10
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSeparator, deps: [], target: i0.ɵɵFactoryTarget.Directive });
11
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.1", type: HlmSeparator, isStandalone: true, selector: "[hlmSeparator],hlm-separator", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "_computedClass()" } }, hostDirectives: [{ directive: i1.BrnSeparator, inputs: ["orientation", "orientation", "decorative", "decorative"] }], ngImport: i0 });
12
+ }
13
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSeparator, decorators: [{
14
+ type: Directive,
15
+ args: [{
16
+ selector: '[hlmSeparator],hlm-separator',
17
+ hostDirectives: [{ directive: BrnSeparator, inputs: ['orientation', 'decorative'] }],
18
+ host: {
19
+ '[class]': '_computedClass()',
20
+ },
21
+ }]
22
+ }] });
23
+
24
+ /*
25
+ * Public API Surface of separator
26
+ */
27
+ const HlmSeparatorImports = [HlmSeparator];
28
+ class HlmSeparatorModule {
29
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSeparatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
30
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: HlmSeparatorModule, imports: [HlmSeparator], exports: [HlmSeparator] });
31
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSeparatorModule });
32
+ }
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSeparatorModule, decorators: [{
34
+ type: NgModule,
35
+ args: [{
36
+ imports: [...HlmSeparatorImports],
37
+ exports: [...HlmSeparatorImports],
38
+ }]
39
+ }] });
40
+
41
+ /**
42
+ * Generated bundle index. Do not edit.
43
+ */
44
+
45
+ export { HlmSeparator, HlmSeparatorImports, HlmSeparatorModule };
46
+ //# sourceMappingURL=separator.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"separator.mjs","sources":["../../../projects/separator/src/lib/separator.ts","../../../projects/separator/src/public-api.ts","../../../projects/separator/src/separator.ts"],"sourcesContent":["import { computed, Directive, input } from '@angular/core';\nimport { BrnSeparator } from '@spartan-ng/brain/separator';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\n\n@Directive({\n selector: '[hlmSeparator],hlm-separator',\n hostDirectives: [{ directive: BrnSeparator, inputs: ['orientation', 'decorative'] }],\n host: {\n '[class]': '_computedClass()',\n },\n})\nexport class HlmSeparator {\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n protected _computedClass = computed(() =>\n hlm(\n 'tw:bg-border tw:inline-flex tw:shrink-0 tw:data-[orientation=horizontal]:h-px tw:data-[orientation=vertical]:h-full tw:data-[orientation=horizontal]:w-full tw:data-[orientation=vertical]:w-px',\n this.userClass(),\n ),\n );\n}\n","/*\n * Public API Surface of separator\n */\n\nimport { NgModule } from '@angular/core';\nimport { HlmSeparator } from './lib/separator';\n\nexport * from './lib/separator';\n\nexport const HlmSeparatorImports = [HlmSeparator] as const;\n\n@NgModule({\n imports: [...HlmSeparatorImports],\n exports: [...HlmSeparatorImports],\n})\nexport class HlmSeparatorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAYa,YAAY,CAAA;AACP,IAAA,SAAS,GAAG,KAAK,CAAa,EAAE,6CAAI,KAAK,EAAE,OAAO,EAAA,CAAA,GAAA,CAAhB,EAAE,KAAK,EAAE,OAAO,EAAE,GAAC;AAC3D,IAAA,cAAc,GAAG,QAAQ,CAAC,MAClC,GAAG,CACD,iMAAiM,EACjM,IAAI,CAAC,SAAS,EAAE,CACjB,0DACF;uGAPU,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,8BAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,kBAAA,EAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,YAAA,EAAA,MAAA,EAAA,CAAA,aAAA,EAAA,aAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAPxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,8BAA8B;AACxC,oBAAA,cAAc,EAAE,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,aAAa,EAAE,YAAY,CAAC,EAAE,CAAC;AACpF,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,kBAAkB;AAC9B,qBAAA;AACF,iBAAA;;;ACXD;;AAEG;AAOI,MAAM,mBAAmB,GAAG,CAAC,YAAY;MAMnC,kBAAkB,CAAA;uGAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAlB,kBAAkB,EAAA,OAAA,EAAA,CANK,YAAY,CAAA,EAAA,OAAA,EAAA,CAAZ,YAAY,CAAA,EAAA,CAAA;wGAMnC,kBAAkB,EAAA,CAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,mBAAmB,CAAC;AACjC,oBAAA,OAAO,EAAE,CAAC,GAAG,mBAAmB,CAAC;AAClC,iBAAA;;;ACdD;;AAEG;;;;"}
@@ -0,0 +1,19 @@
1
+ import * as i0 from '@angular/core';
2
+ import { ClassValue } from 'clsx';
3
+ import * as i1 from '@spartan-ng/brain/separator';
4
+
5
+ declare class HlmSeparator {
6
+ readonly userClass: i0.InputSignal<ClassValue>;
7
+ protected _computedClass: i0.Signal<string>;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmSeparator, never>;
9
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HlmSeparator, "[hlmSeparator],hlm-separator", never, { "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.BrnSeparator; inputs: { "orientation": "orientation"; "decorative": "decorative"; }; outputs: {}; }]>;
10
+ }
11
+
12
+ declare const HlmSeparatorImports: readonly [typeof HlmSeparator];
13
+ declare class HlmSeparatorModule {
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<HlmSeparatorModule, never>;
15
+ static ɵmod: i0.ɵɵNgModuleDeclaration<HlmSeparatorModule, never, [typeof HlmSeparator], [typeof HlmSeparator]>;
16
+ static ɵinj: i0.ɵɵInjectorDeclaration<HlmSeparatorModule>;
17
+ }
18
+
19
+ export { HlmSeparator, HlmSeparatorImports, HlmSeparatorModule };
@@ -0,0 +1,64 @@
1
+ # Sonner
2
+
3
+ This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.2.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 sonner
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
+
35
+ ```bash
36
+ cd dist/sonner
37
+ ```
38
+
39
+ 2. Run the `npm publish` command to publish your library to the npm registry:
40
+ ```bash
41
+ npm publish
42
+ ```
43
+
44
+ ## Running unit tests
45
+
46
+ To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
47
+
48
+ ```bash
49
+ ng test
50
+ ```
51
+
52
+ ## Running end-to-end tests
53
+
54
+ For end-to-end (e2e) testing, run:
55
+
56
+ ```bash
57
+ ng e2e
58
+ ```
59
+
60
+ Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
61
+
62
+ ## Additional Resources
63
+
64
+ 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,110 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, booleanAttribute, numberAttribute, computed, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
3
+ import { hlm } from '@egose/shadcn-theme-ng/utils';
4
+ import { NgxSonnerToaster } from 'ngx-sonner';
5
+
6
+ class HlmToaster {
7
+ invert = input(false, ...(ngDevMode ? [{ debugName: "invert", transform: booleanAttribute }] : [{
8
+ transform: booleanAttribute,
9
+ }]));
10
+ theme = input('light', ...(ngDevMode ? [{ debugName: "theme" }] : []));
11
+ position = input('bottom-right', ...(ngDevMode ? [{ debugName: "position" }] : []));
12
+ hotKey = input(['altKey', 'KeyT'], ...(ngDevMode ? [{ debugName: "hotKey" }] : []));
13
+ richColors = input(false, ...(ngDevMode ? [{ debugName: "richColors", transform: booleanAttribute }] : [{
14
+ transform: booleanAttribute,
15
+ }]));
16
+ expand = input(false, ...(ngDevMode ? [{ debugName: "expand", transform: booleanAttribute }] : [{
17
+ transform: booleanAttribute,
18
+ }]));
19
+ duration = input(4000, ...(ngDevMode ? [{ debugName: "duration", transform: numberAttribute }] : [{
20
+ transform: numberAttribute,
21
+ }]));
22
+ visibleToasts = input(3, ...(ngDevMode ? [{ debugName: "visibleToasts", transform: numberAttribute }] : [{
23
+ transform: numberAttribute,
24
+ }]));
25
+ closeButton = input(false, ...(ngDevMode ? [{ debugName: "closeButton", transform: booleanAttribute }] : [{
26
+ transform: booleanAttribute,
27
+ }]));
28
+ toastOptions = input({
29
+ classes: {
30
+ toast: 'tw:group tw:toast tw:group-[.toaster]:bg-background tw:group-[.toaster]:text-foreground tw:group-[.toaster]:border-border tw:group-[.toaster]:shadow-lg',
31
+ description: 'tw:group-[.toast]:text-muted-foreground',
32
+ actionButton: 'tw:group-[.toast]:bg-primary tw:group-[.toast]:text-primary-foreground',
33
+ cancelButton: 'tw:group-[.toast]:bg-muted tw:group-[.toast]:text-muted-foreground',
34
+ },
35
+ }, ...(ngDevMode ? [{ debugName: "toastOptions" }] : []));
36
+ offset = input(null, ...(ngDevMode ? [{ debugName: "offset" }] : []));
37
+ dir = input('auto', ...(ngDevMode ? [{ debugName: "dir" }] : []));
38
+ userClass = input('', ...(ngDevMode ? [{ debugName: "userClass", alias: 'class' }] : [{ alias: 'class' }]));
39
+ userStyle = input({}, ...(ngDevMode ? [{ debugName: "userStyle", alias: 'style' }] : [{ alias: 'style' }]));
40
+ _computedClass = computed(() => hlm('toaster group', this.userClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : []));
41
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmToaster, deps: [], target: i0.ɵɵFactoryTarget.Component });
42
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmToaster, isStandalone: true, selector: "hlm-toaster", inputs: { invert: { classPropertyName: "invert", publicName: "invert", isSignal: true, isRequired: false, transformFunction: null }, theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, hotKey: { classPropertyName: "hotKey", publicName: "hotKey", isSignal: true, isRequired: false, transformFunction: null }, richColors: { classPropertyName: "richColors", publicName: "richColors", isSignal: true, isRequired: false, transformFunction: null }, expand: { classPropertyName: "expand", publicName: "expand", isSignal: true, isRequired: false, transformFunction: null }, duration: { classPropertyName: "duration", publicName: "duration", isSignal: true, isRequired: false, transformFunction: null }, visibleToasts: { classPropertyName: "visibleToasts", publicName: "visibleToasts", isSignal: true, isRequired: false, transformFunction: null }, closeButton: { classPropertyName: "closeButton", publicName: "closeButton", isSignal: true, isRequired: false, transformFunction: null }, toastOptions: { classPropertyName: "toastOptions", publicName: "toastOptions", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null }, dir: { classPropertyName: "dir", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, userStyle: { classPropertyName: "userStyle", publicName: "style", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
43
+ <ngx-sonner-toaster
44
+ [class]="_computedClass()"
45
+ [invert]="invert()"
46
+ [theme]="theme()"
47
+ [position]="position()"
48
+ [hotKey]="hotKey()"
49
+ [richColors]="richColors()"
50
+ [expand]="expand()"
51
+ [duration]="duration()"
52
+ [visibleToasts]="visibleToasts()"
53
+ [closeButton]="closeButton()"
54
+ [toastOptions]="toastOptions()"
55
+ [offset]="offset()"
56
+ [dir]="dir()"
57
+ [style]="userStyle()"
58
+ />
59
+ `, isInline: true, dependencies: [{ kind: "component", type: NgxSonnerToaster, selector: "ngx-sonner-toaster", inputs: ["invert", "theme", "position", "hotKey", "richColors", "expand", "duration", "visibleToasts", "closeButton", "toastOptions", "offset", "dir", "class", "style"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
60
+ }
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmToaster, decorators: [{
62
+ type: Component,
63
+ args: [{
64
+ selector: 'hlm-toaster',
65
+ imports: [NgxSonnerToaster],
66
+ template: `
67
+ <ngx-sonner-toaster
68
+ [class]="_computedClass()"
69
+ [invert]="invert()"
70
+ [theme]="theme()"
71
+ [position]="position()"
72
+ [hotKey]="hotKey()"
73
+ [richColors]="richColors()"
74
+ [expand]="expand()"
75
+ [duration]="duration()"
76
+ [visibleToasts]="visibleToasts()"
77
+ [closeButton]="closeButton()"
78
+ [toastOptions]="toastOptions()"
79
+ [offset]="offset()"
80
+ [dir]="dir()"
81
+ [style]="userStyle()"
82
+ />
83
+ `,
84
+ changeDetection: ChangeDetectionStrategy.OnPush,
85
+ }]
86
+ }] });
87
+
88
+ /*
89
+ * Public API Surface of sonner
90
+ */
91
+ const HlmToasterImports = [HlmToaster];
92
+ class HlmToasterModule {
93
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmToasterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
94
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: HlmToasterModule, imports: [HlmToaster], exports: [HlmToaster] });
95
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmToasterModule, imports: [HlmToasterImports] });
96
+ }
97
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmToasterModule, decorators: [{
98
+ type: NgModule,
99
+ args: [{
100
+ imports: [...HlmToasterImports],
101
+ exports: [...HlmToasterImports],
102
+ }]
103
+ }] });
104
+
105
+ /**
106
+ * Generated bundle index. Do not edit.
107
+ */
108
+
109
+ export { HlmToaster, HlmToasterImports, HlmToasterModule };
110
+ //# sourceMappingURL=sonner.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sonner.mjs","sources":["../../../projects/sonner/src/lib/toaster.ts","../../../projects/sonner/src/public-api.ts","../../../projects/sonner/src/sonner.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, booleanAttribute, computed, input, numberAttribute } from '@angular/core';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\nimport type { ClassValue } from 'clsx';\nimport { NgxSonnerToaster, type ToasterProps } from 'ngx-sonner';\n\n@Component({\n selector: 'hlm-toaster',\n imports: [NgxSonnerToaster],\n template: `\n <ngx-sonner-toaster\n [class]=\"_computedClass()\"\n [invert]=\"invert()\"\n [theme]=\"theme()\"\n [position]=\"position()\"\n [hotKey]=\"hotKey()\"\n [richColors]=\"richColors()\"\n [expand]=\"expand()\"\n [duration]=\"duration()\"\n [visibleToasts]=\"visibleToasts()\"\n [closeButton]=\"closeButton()\"\n [toastOptions]=\"toastOptions()\"\n [offset]=\"offset()\"\n [dir]=\"dir()\"\n [style]=\"userStyle()\"\n />\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HlmToaster {\n public readonly invert = input<ToasterProps['invert'], boolean | string>(false, {\n transform: booleanAttribute,\n });\n public readonly theme = input<ToasterProps['theme']>('light');\n public readonly position = input<ToasterProps['position']>('bottom-right');\n public readonly hotKey = input<ToasterProps['hotkey']>(['altKey', 'KeyT']);\n public readonly richColors = input<ToasterProps['richColors'], boolean | string>(false, {\n transform: booleanAttribute,\n });\n public readonly expand = input<ToasterProps['expand'], boolean | string>(false, {\n transform: booleanAttribute,\n });\n public readonly duration = input<ToasterProps['duration'], number | string>(4000, {\n transform: numberAttribute,\n });\n public readonly visibleToasts = input<ToasterProps['visibleToasts'], number | string>(3, {\n transform: numberAttribute,\n });\n public readonly closeButton = input<ToasterProps['closeButton'], boolean | string>(false, {\n transform: booleanAttribute,\n });\n public readonly toastOptions = input<ToasterProps['toastOptions']>({\n classes: {\n toast:\n 'tw:group tw:toast tw:group-[.toaster]:bg-background tw:group-[.toaster]:text-foreground tw:group-[.toaster]:border-border tw:group-[.toaster]:shadow-lg',\n description: 'tw:group-[.toast]:text-muted-foreground',\n actionButton: 'tw:group-[.toast]:bg-primary tw:group-[.toast]:text-primary-foreground',\n cancelButton: 'tw:group-[.toast]:bg-muted tw:group-[.toast]:text-muted-foreground',\n },\n });\n public readonly offset = input<ToasterProps['offset']>(null);\n public readonly dir = input<ToasterProps['dir']>('auto');\n public readonly userClass = input<ClassValue>('', { alias: 'class' });\n public readonly userStyle = input<Record<string, string>>({}, { alias: 'style' });\n\n protected readonly _computedClass = computed(() => hlm('toaster group', this.userClass()));\n}\n","/*\n * Public API Surface of sonner\n */\n\nimport { NgModule } from '@angular/core';\n\nimport { HlmToaster } from './lib/toaster';\n\nexport * from './lib/toaster';\n\nexport const HlmToasterImports = [HlmToaster] as const;\n\n@NgModule({\n imports: [...HlmToasterImports],\n exports: [...HlmToasterImports],\n})\nexport class HlmToasterModule {}\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A;AACT,oBAAA,QAAQ,EAAE,aAAa;oBACvB,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC3B,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;AAiBT,EAAA,CAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAChD,iBAAA;;;AC3BD;;AAEG;AAQI,MAAM,iBAAiB,GAAG,CAAC,UAAU;MAM/B,gBAAgB,CAAA;uGAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAhB,gBAAgB,EAAA,OAAA,EAAA,CANK,UAAU,CAAA,EAAA,OAAA,EAAA,CAAV,UAAU,CAAA,EAAA,CAAA;AAM/B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAHd,iBAAiB,CAAA,EAAA,CAAA;;2FAGnB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,iBAAiB,CAAC;AAC/B,oBAAA,OAAO,EAAE,CAAC,GAAG,iBAAiB,CAAC;AAChC,iBAAA;;;ACfD;;AAEG;;;;"}
@@ -0,0 +1,32 @@
1
+ import * as ngx_sonner from 'ngx-sonner';
2
+ import * as _angular_core from '@angular/core';
3
+ import { ClassValue } from 'clsx';
4
+
5
+ declare class HlmToaster {
6
+ readonly invert: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
7
+ readonly theme: _angular_core.InputSignal<"light" | "dark" | "system">;
8
+ readonly position: _angular_core.InputSignal<ngx_sonner.Position>;
9
+ readonly hotKey: _angular_core.InputSignal<string[]>;
10
+ readonly richColors: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
11
+ readonly expand: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
12
+ readonly duration: _angular_core.InputSignalWithTransform<number, string | number>;
13
+ readonly visibleToasts: _angular_core.InputSignalWithTransform<number, string | number>;
14
+ readonly closeButton: _angular_core.InputSignalWithTransform<boolean, string | boolean>;
15
+ readonly toastOptions: _angular_core.InputSignal<ngx_sonner.ToastOptions>;
16
+ readonly offset: _angular_core.InputSignal<string | number | null>;
17
+ readonly dir: _angular_core.InputSignal<"ltr" | "rtl" | "auto">;
18
+ readonly userClass: _angular_core.InputSignal<ClassValue>;
19
+ readonly userStyle: _angular_core.InputSignal<Record<string, string>>;
20
+ protected readonly _computedClass: _angular_core.Signal<string>;
21
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<HlmToaster, never>;
22
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<HlmToaster, "hlm-toaster", never, { "invert": { "alias": "invert"; "required": false; "isSignal": true; }; "theme": { "alias": "theme"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "hotKey": { "alias": "hotKey"; "required": false; "isSignal": true; }; "richColors": { "alias": "richColors"; "required": false; "isSignal": true; }; "expand": { "alias": "expand"; "required": false; "isSignal": true; }; "duration": { "alias": "duration"; "required": false; "isSignal": true; }; "visibleToasts": { "alias": "visibleToasts"; "required": false; "isSignal": true; }; "closeButton": { "alias": "closeButton"; "required": false; "isSignal": true; }; "toastOptions": { "alias": "toastOptions"; "required": false; "isSignal": true; }; "offset": { "alias": "offset"; "required": false; "isSignal": true; }; "dir": { "alias": "dir"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "userStyle": { "alias": "style"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
23
+ }
24
+
25
+ declare const HlmToasterImports: readonly [typeof HlmToaster];
26
+ declare class HlmToasterModule {
27
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<HlmToasterModule, never>;
28
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<HlmToasterModule, never, [typeof HlmToaster], [typeof HlmToaster]>;
29
+ static ɵinj: _angular_core.ɵɵInjectorDeclaration<HlmToasterModule>;
30
+ }
31
+
32
+ export { HlmToaster, HlmToasterImports, HlmToasterModule };
@@ -0,0 +1,64 @@
1
+ # Spinner
2
+
3
+ This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.2.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 spinner
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
+
35
+ ```bash
36
+ cd dist/spinner
37
+ ```
38
+
39
+ 2. Run the `npm publish` command to publish your library to the npm registry:
40
+ ```bash
41
+ npm publish
42
+ ```
43
+
44
+ ## Running unit tests
45
+
46
+ To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
47
+
48
+ ```bash
49
+ ng test
50
+ ```
51
+
52
+ ## Running end-to-end tests
53
+
54
+ For end-to-end (e2e) testing, run:
55
+
56
+ ```bash
57
+ ng e2e
58
+ ```
59
+
60
+ Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
61
+
62
+ ## Additional Resources
63
+
64
+ 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,67 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, computed, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
3
+ import { NgIcon } from '@ng-icons/core';
4
+ import { tablerLoader2 } from '@ng-icons/tabler-icons';
5
+ import { hlm } from '@egose/shadcn-theme-ng/utils';
6
+
7
+ class HlmSpinner {
8
+ icon = tablerLoader2;
9
+ // Variants
10
+ size = input('medium', ...(ngDevMode ? [{ debugName: "size" }] : []));
11
+ show = input(true, ...(ngDevMode ? [{ debugName: "show" }] : []));
12
+ // Optional extra classes from user
13
+ wrapperClass = input('', ...(ngDevMode ? [{ debugName: "wrapperClass", alias: 'class' }] : [{ alias: 'class' }]));
14
+ spinnerClass = input('', ...(ngDevMode ? [{ debugName: "spinnerClass", alias: 'spinnerClass' }] : [{ alias: 'spinnerClass' }]));
15
+ // Map sizes to Tailwind classes
16
+ sizeClasses = {
17
+ small: 'tw:size-6!',
18
+ medium: 'tw:size-8!',
19
+ large: 'tw:size-12!',
20
+ };
21
+ // Outer container class (visibility + layout)
22
+ _containerClass = computed(() => hlm('tw:flex-col tw:items-center tw:justify-center', // base container styles
23
+ this.show() ? 'tw:flex' : 'tw:hidden', this.wrapperClass()), ...(ngDevMode ? [{ debugName: "_containerClass" }] : []));
24
+ // SVG spinner class (size + animation + color)
25
+ _iconClass = computed(() => hlm('tw:[&>svg]:animate-spin tw:[&>svg]:text-primary', // base svg styles
26
+ this.sizeClasses[this.size()], this.spinnerClass()), ...(ngDevMode ? [{ debugName: "_iconClass" }] : []));
27
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSpinner, deps: [], target: i0.ɵɵFactoryTarget.Component });
28
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.1", type: HlmSpinner, isStandalone: true, selector: "hlm-spinner", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, show: { classPropertyName: "show", publicName: "show", isSignal: true, isRequired: false, transformFunction: null }, wrapperClass: { classPropertyName: "wrapperClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, spinnerClass: { classPropertyName: "spinnerClass", publicName: "spinnerClass", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "status" }, properties: { "class": "_containerClass()" } }, ngImport: i0, template: `<ng-icon [svg]="icon" [class]="_iconClass()" />`, isInline: true, dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
29
+ }
30
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSpinner, decorators: [{
31
+ type: Component,
32
+ args: [{
33
+ selector: 'hlm-spinner',
34
+ imports: [NgIcon],
35
+ host: {
36
+ '[class]': '_containerClass()',
37
+ role: 'status',
38
+ },
39
+ template: `<ng-icon [svg]="icon" [class]="_iconClass()" />`,
40
+ changeDetection: ChangeDetectionStrategy.OnPush,
41
+ standalone: true,
42
+ }]
43
+ }] });
44
+
45
+ /*
46
+ * Public API Surface of spinner
47
+ */
48
+ const HlmSpinnerImports = [HlmSpinner];
49
+ class HlmSpinnerModule {
50
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSpinnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
51
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: HlmSpinnerModule, imports: [HlmSpinner], exports: [HlmSpinner] });
52
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSpinnerModule, imports: [HlmSpinnerImports] });
53
+ }
54
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmSpinnerModule, decorators: [{
55
+ type: NgModule,
56
+ args: [{
57
+ imports: [...HlmSpinnerImports],
58
+ exports: [...HlmSpinnerImports],
59
+ }]
60
+ }] });
61
+
62
+ /**
63
+ * Generated bundle index. Do not edit.
64
+ */
65
+
66
+ export { HlmSpinner, HlmSpinnerImports, HlmSpinnerModule };
67
+ //# sourceMappingURL=spinner.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spinner.mjs","sources":["../../../projects/spinner/src/lib/spinner.ts","../../../projects/spinner/src/public-api.ts","../../../projects/spinner/src/spinner.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { type ClassValue } from 'clsx';\nimport { NgIcon } from '@ng-icons/core';\nimport { tablerLoader2 } from '@ng-icons/tabler-icons';\nimport { hlm } from '@egose/shadcn-theme-ng/utils';\n\ntype SpinnerSize = 'small' | 'medium' | 'large';\n\n@Component({\n selector: 'hlm-spinner',\n imports: [NgIcon],\n host: {\n '[class]': '_containerClass()',\n role: 'status',\n },\n template: `<ng-icon [svg]=\"icon\" [class]=\"_iconClass()\" />`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class HlmSpinner {\n icon = tablerLoader2;\n\n // Variants\n public readonly size = input<SpinnerSize>('medium');\n public readonly show = input<boolean>(true);\n\n // Optional extra classes from user\n public readonly wrapperClass = input<ClassValue>('', { alias: 'class' });\n public readonly spinnerClass = input<ClassValue>('', { alias: 'spinnerClass' });\n\n // Map sizes to Tailwind classes\n private readonly sizeClasses: Record<SpinnerSize, string> = {\n small: 'tw:size-6!',\n medium: 'tw:size-8!',\n large: 'tw:size-12!',\n };\n\n // Outer container class (visibility + layout)\n protected readonly _containerClass = computed(() =>\n hlm(\n 'tw:flex-col tw:items-center tw:justify-center', // base container styles\n this.show() ? 'tw:flex' : 'tw:hidden',\n this.wrapperClass(),\n ),\n );\n\n // SVG spinner class (size + animation + color)\n protected readonly _iconClass = computed(() =>\n hlm(\n 'tw:[&>svg]:animate-spin tw:[&>svg]:text-primary', // base svg styles\n this.sizeClasses[this.size()],\n this.spinnerClass(),\n ),\n );\n}\n","/*\n * Public API Surface of spinner\n */\n\nimport { NgModule } from '@angular/core';\nimport { HlmSpinner } from './lib/spinner';\n\nexport * from './lib/spinner';\n\nexport const HlmSpinnerImports = [HlmSpinner] as const;\n\n@NgModule({\n imports: [...HlmSpinnerImports],\n exports: [...HlmSpinnerImports],\n})\nexport class HlmSpinnerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAmBa,UAAU,CAAA;IACrB,IAAI,GAAG,aAAa;;AAGJ,IAAA,IAAI,GAAG,KAAK,CAAc,QAAQ,gDAAC;AACnC,IAAA,IAAI,GAAG,KAAK,CAAU,IAAI,gDAAC;;AAG3B,IAAA,YAAY,GAAG,KAAK,CAAa,EAAE,gDAAI,KAAK,EAAE,OAAO,EAAA,CAAA,GAAA,CAAhB,EAAE,KAAK,EAAE,OAAO,EAAE,GAAC;AACxD,IAAA,YAAY,GAAG,KAAK,CAAa,EAAE,gDAAI,KAAK,EAAE,cAAc,EAAA,CAAA,GAAA,CAAvB,EAAE,KAAK,EAAE,cAAc,EAAE,GAAC;;AAG9D,IAAA,WAAW,GAAgC;AAC1D,QAAA,KAAK,EAAE,YAAY;AACnB,QAAA,MAAM,EAAE,YAAY;AACpB,QAAA,KAAK,EAAE,aAAa;KACrB;;IAGkB,eAAe,GAAG,QAAQ,CAAC,MAC5C,GAAG,CACD,+CAA+C;AAC/C,IAAA,IAAI,CAAC,IAAI,EAAE,GAAG,SAAS,GAAG,WAAW,EACrC,IAAI,CAAC,YAAY,EAAE,CACpB,2DACF;;IAGkB,UAAU,GAAG,QAAQ,CAAC,MACvC,GAAG,CACD,iDAAiD;AACjD,IAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAC7B,IAAI,CAAC,YAAY,EAAE,CACpB,sDACF;uGAlCU,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAV,UAAU,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,aAAA,EA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A,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,mBAAmB;AAC9B,wBAAA,IAAI,EAAE,QAAQ;AACf,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA,+CAAA,CAAiD;oBAC3D,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;AClBD;;AAEG;AAOI,MAAM,iBAAiB,GAAG,CAAC,UAAU;MAM/B,gBAAgB,CAAA;uGAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAAhB,gBAAgB,EAAA,OAAA,EAAA,CANK,UAAU,CAAA,EAAA,OAAA,EAAA,CAAV,UAAU,CAAA,EAAA,CAAA;AAM/B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAHd,iBAAiB,CAAA,EAAA,CAAA;;2FAGnB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,GAAG,iBAAiB,CAAC;AAC/B,oBAAA,OAAO,EAAE,CAAC,GAAG,iBAAiB,CAAC;AAChC,iBAAA;;;ACdD;;AAEG;;;;"}
@@ -0,0 +1,25 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { ClassValue } from 'clsx';
3
+
4
+ type SpinnerSize = 'small' | 'medium' | 'large';
5
+ declare class HlmSpinner {
6
+ icon: string;
7
+ readonly size: _angular_core.InputSignal<SpinnerSize>;
8
+ readonly show: _angular_core.InputSignal<boolean>;
9
+ readonly wrapperClass: _angular_core.InputSignal<ClassValue>;
10
+ readonly spinnerClass: _angular_core.InputSignal<ClassValue>;
11
+ private readonly sizeClasses;
12
+ protected readonly _containerClass: _angular_core.Signal<string>;
13
+ protected readonly _iconClass: _angular_core.Signal<string>;
14
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<HlmSpinner, never>;
15
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<HlmSpinner, "hlm-spinner", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "show": { "alias": "show"; "required": false; "isSignal": true; }; "wrapperClass": { "alias": "class"; "required": false; "isSignal": true; }; "spinnerClass": { "alias": "spinnerClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
16
+ }
17
+
18
+ declare const HlmSpinnerImports: readonly [typeof HlmSpinner];
19
+ declare class HlmSpinnerModule {
20
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<HlmSpinnerModule, never>;
21
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<HlmSpinnerModule, never, [typeof HlmSpinner], [typeof HlmSpinner]>;
22
+ static ɵinj: _angular_core.ɵɵInjectorDeclaration<HlmSpinnerModule>;
23
+ }
24
+
25
+ export { HlmSpinner, HlmSpinnerImports, HlmSpinnerModule };
@@ -0,0 +1,64 @@
1
+ # Switch
2
+
3
+ This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.2.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 switch
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
+
35
+ ```bash
36
+ cd dist/switch
37
+ ```
38
+
39
+ 2. Run the `npm publish` command to publish your library to the npm registry:
40
+ ```bash
41
+ npm publish
42
+ ```
43
+
44
+ ## Running unit tests
45
+
46
+ To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
47
+
48
+ ```bash
49
+ ng test
50
+ ```
51
+
52
+ ## Running end-to-end tests
53
+
54
+ For end-to-end (e2e) testing, run:
55
+
56
+ ```bash
57
+ ng e2e
58
+ ```
59
+
60
+ Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
61
+
62
+ ## Additional Resources
63
+
64
+ 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.