@ng-zen/cli 19.2.0-next.3 → 19.3.0-next.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/CHANGELOG.md CHANGED
@@ -1,3 +1,26 @@
1
+ ## [19.3.0-next.1](https://github.com/kstepien3/ng-zen/compare/v19.2.0...v19.3.0-next.1) (2025-06-10)
2
+
3
+ ### 🚀 New Features
4
+
5
+ * **skeleton:** add component ([#205](https://github.com/kstepien3/ng-zen/issues/205)) ([fa21c9a](https://github.com/kstepien3/ng-zen/commit/fa21c9a440ce918d521c12cd9e9eec17cade60cd))
6
+
7
+ ## [19.2.0](https://github.com/kstepien3/ng-zen/compare/v19.1.0...v19.2.0) (2025-05-25)
8
+
9
+ ### 🚀 New Features
10
+
11
+ * **button:** add css variables for styling ([#191](https://github.com/kstepien3/ng-zen/issues/191)) ([7278585](https://github.com/kstepien3/ng-zen/commit/7278585c642a01468c2ef85dc39f3e767287ccf7))
12
+ * **button:** update selector to support is() pseudo-class ([#195](https://github.com/kstepien3/ng-zen/issues/195)) ([e85135e](https://github.com/kstepien3/ng-zen/commit/e85135ef45c7a38b5597624254c7b0adae6e4db4))
13
+ * **divider:** add zen-divider component ([#186](https://github.com/kstepien3/ng-zen/issues/186)) ([c021773](https://github.com/kstepien3/ng-zen/commit/c0217732a99efd1a68d23ed5e44d8da9e5344fdb))
14
+
15
+ ### 🐛 Bug Fixes
16
+
17
+ * **schematics/ng-add:** run other schematics after installation ([#177](https://github.com/kstepien3/ng-zen/issues/177)) ([5cb1be4](https://github.com/kstepien3/ng-zen/commit/5cb1be4ce4cbeb7e5341baf937db135c16caad18))
18
+
19
+ ### 📚 Documentation
20
+
21
+ * **readme:** remove the "next" build npm badges ([#194](https://github.com/kstepien3/ng-zen/issues/194)) ([48740d3](https://github.com/kstepien3/ng-zen/commit/48740d3c9ff3f3619e6f56baba8b933ba31498b3))
22
+ * **releaserc:** update release note generator config ([#196](https://github.com/kstepien3/ng-zen/issues/196)) ([ca37df3](https://github.com/kstepien3/ng-zen/commit/ca37df375bf566476ec16c4cf10121f0d59c5c70))
23
+
1
24
  # [19.2.0-next.3](https://github.com/kstepien3/ng-zen/compare/v19.2.0-next.2...v19.2.0-next.3) (2025-05-24)
2
25
 
3
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-zen/cli",
3
- "version": "19.2.0-next.3",
3
+ "version": "19.3.0-next.1",
4
4
  "description": "A CLI tool for generating customizable, modern Angular UI components using schematics.",
5
5
  "license": "BSD-2-Clause",
6
6
  "private": false,
@@ -1 +1 @@
1
- {"version":3,"file":"components-generator.js","sourceRoot":"","sources":["../../../../../src/schematics/components/components-generator.ts"],"names":[],"mappings":"","sourcesContent":["import { GeneratorSchemaBase } from '../../types';\n\nexport type ComponentType = 'avatar' | 'button' | 'checkbox' | 'divider' | 'input' | 'switch' | 'textarea';\n\nexport interface ComponentGeneratorSchema extends GeneratorSchemaBase {\n components: ComponentType[];\n}\n"]}
1
+ {"version":3,"file":"components-generator.js","sourceRoot":"","sources":["../../../../../src/schematics/components/components-generator.ts"],"names":[],"mappings":"","sourcesContent":["import { GeneratorSchemaBase } from '../../types';\n\nexport type ComponentType = 'avatar' | 'button' | 'checkbox' | 'divider' | 'input' | 'skeleton' | 'switch' | 'textarea';\n\nexport interface ComponentGeneratorSchema extends GeneratorSchemaBase {\n components: ComponentType[];\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import { GeneratorSchemaBase } from '../../types';
2
2
 
3
- export type ComponentType = 'avatar' | 'button' | 'checkbox' | 'divider' | 'input' | 'switch' | 'textarea';
3
+ export type ComponentType = 'avatar' | 'button' | 'checkbox' | 'divider' | 'input' | 'skeleton' | 'switch' | 'textarea';
4
4
 
5
5
  export interface ComponentGeneratorSchema extends GeneratorSchemaBase {
6
6
  components: ComponentType[];
@@ -0,0 +1 @@
1
+ export * from './skeleton.component';
@@ -0,0 +1,72 @@
1
+ $background: var(--zen-skeleton-background, hsl(0deg 0% 80%));
2
+ $radius: var(--zen-skeleton-border-radius, 0.5rem);
3
+ $animation-duration: var(--zen-skeleton-animation-duration, 1.6s);
4
+
5
+ :host {
6
+ background: $background;
7
+ display: inline-block;
8
+ min-height: 1rem;
9
+ min-width: 1rem;
10
+ border-radius: $radius;
11
+ position: relative;
12
+ overflow: hidden;
13
+
14
+ // GPU acceleration hint
15
+ will-change: auto;
16
+
17
+ &::before {
18
+ content: '';
19
+ position: absolute;
20
+ top: 0;
21
+ left: 0;
22
+ width: 100%;
23
+ height: 100%;
24
+ background: linear-gradient(
25
+ 90deg,
26
+ transparent 0%,
27
+ hsl(0deg 0% 100% / 60%) 40%,
28
+ hsl(0deg 0% 100% / 60%) 60%,
29
+ transparent 100%
30
+ );
31
+ transform: translateX(-100%);
32
+ animation: shimmer $animation-duration ease-in-out infinite;
33
+ }
34
+
35
+ &[rounded] {
36
+ border-radius: 9999px;
37
+ }
38
+ }
39
+
40
+ // Accessibility: Motion sensitivity support
41
+ @media (prefers-reduced-motion: reduce) {
42
+ :host {
43
+ &::before {
44
+ animation: none;
45
+ content: unset;
46
+ }
47
+
48
+ // Subtle pulse animation as fallback
49
+ animation: pulse $animation-duration ease-in-out infinite alternate;
50
+ }
51
+ }
52
+
53
+ @keyframes pulse {
54
+ 0% {
55
+ opacity: 0.6;
56
+ }
57
+
58
+ 100% {
59
+ opacity: 1;
60
+ }
61
+ }
62
+
63
+ // GPU-optimized keyframes
64
+ @keyframes shimmer {
65
+ 0% {
66
+ transform: translateX(-100%);
67
+ }
68
+
69
+ 100% {
70
+ transform: translateX(100%);
71
+ }
72
+ }
@@ -0,0 +1,22 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { ZenSkeletonComponent } from './skeleton.component';
4
+
5
+ describe('ZenSkeletonComponent', () => {
6
+ let component: ZenSkeletonComponent;
7
+ let fixture: ComponentFixture<ZenSkeletonComponent>;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ imports: [ZenSkeletonComponent],
12
+ }).compileComponents();
13
+
14
+ fixture = TestBed.createComponent(ZenSkeletonComponent);
15
+ component = fixture.componentInstance;
16
+ fixture.detectChanges();
17
+ });
18
+
19
+ it('should create', () => {
20
+ expect(component).toBeTruthy();
21
+ });
22
+ });
@@ -0,0 +1,31 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+
3
+ /**
4
+ * ZenInputComponent loader component that displays loading states.
5
+ *
6
+ * @example
7
+ * ```HTML
8
+ * <zen-skeleton rounded/>
9
+ * ```
10
+ * ### Properties:
11
+ * - `rounded` - Whether to display rounded corners
12
+ *
13
+ * ### CSS Custom Properties
14
+ * You can customize the component using CSS custom properties:
15
+ *
16
+ * ```CSS
17
+ * :root {
18
+ * --zen-skeleton-background: red;
19
+ * --zen-skeleton-border-radius: 1rem;
20
+ * --zen-skeleton-animation-duration: 1s;
21
+ * }
22
+ * ```
23
+ */
24
+
25
+ @Component({
26
+ selector: 'zen-skeleton, zen-skeleton[rounded]',
27
+ template: ``,
28
+ styleUrl: './skeleton.component.scss',
29
+ changeDetection: ChangeDetectionStrategy.OnPush,
30
+ })
31
+ export class ZenSkeletonComponent {}
@@ -0,0 +1,37 @@
1
+ import { Meta, StoryObj } from '@storybook/angular';
2
+
3
+ import { ZenSkeletonComponent } from './skeleton.component';
4
+
5
+ interface StoryParams {
6
+ rounded: boolean;
7
+ height: number;
8
+ width: number;
9
+ }
10
+
11
+ type StoryType = ZenSkeletonComponent & StoryParams;
12
+
13
+ export default {
14
+ title: 'Components/Skeleton',
15
+ component: ZenSkeletonComponent,
16
+ tags: ['autodocs'],
17
+ argTypes: {
18
+ rounded: { control: { type: 'boolean' } },
19
+ height: { control: { type: 'range', min: 1, max: 20, step: 0.25 }, description: 'Height managed by css' },
20
+ width: { control: { type: 'range', min: 1, max: 20, step: 0.25 }, description: 'Width managed by css' },
21
+ },
22
+ args: {
23
+ rounded: false,
24
+ height: 3,
25
+ width: 3,
26
+ },
27
+ } satisfies Meta<StoryType>;
28
+
29
+ type Story = StoryObj<StoryType>;
30
+
31
+ export const Default: Story = {
32
+ render: args => ({
33
+ props: { ...args },
34
+ template: `
35
+ <zen-skeleton ${args.rounded ? 'rounded' : ''} style="width: ${args.width}rem; height: ${args.height}rem"/>`,
36
+ }),
37
+ };
@@ -10,7 +10,7 @@
10
10
  "type": "array",
11
11
  "items": {
12
12
  "type": "string",
13
- "enum": ["avatar", "button", "checkbox", "divider", "input", "switch", "textarea"]
13
+ "enum": ["avatar", "button", "checkbox", "divider", "input", "skeleton", "switch", "textarea"]
14
14
  },
15
15
  "multiselect": true,
16
16
  "x-prompt": "Which component should be generated?"