@ng-zen/cli 19.3.0-next.1 → 19.3.0

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](https://github.com/kstepien3/ng-zen/compare/v19.2.0...v19.3.0) (2025-06-12)
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
+ ### 🐛 Bug Fixes
8
+
9
+ * **storybook/components:** format and documentation ([#211](https://github.com/kstepien3/ng-zen/issues/211)) ([a0fb6f5](https://github.com/kstepien3/ng-zen/commit/a0fb6f576e1c47509ba2aed4cd4314dace894366))
10
+ * **styles:** improve format of hls colors ([#207](https://github.com/kstepien3/ng-zen/issues/207)) ([354d698](https://github.com/kstepien3/ng-zen/commit/354d6989507ba86397268012f6a53002c2e02297))
11
+
12
+ ## [19.3.0-next.2](https://github.com/kstepien3/ng-zen/compare/v19.3.0-next.1...v19.3.0-next.2) (2025-06-11)
13
+
14
+ ### 🐛 Bug Fixes
15
+
16
+ * **storybook/components:** format and documentation ([#211](https://github.com/kstepien3/ng-zen/issues/211)) ([a0fb6f5](https://github.com/kstepien3/ng-zen/commit/a0fb6f576e1c47509ba2aed4cd4314dace894366))
17
+ * **styles:** improve format of hls colors ([#207](https://github.com/kstepien3/ng-zen/issues/207)) ([354d698](https://github.com/kstepien3/ng-zen/commit/354d6989507ba86397268012f6a53002c2e02297))
18
+
19
+ ### 📚 Documentation
20
+
21
+ * **DEVELOPMENT:** add release information ([#209](https://github.com/kstepien3/ng-zen/issues/209)) ([f9aad1b](https://github.com/kstepien3/ng-zen/commit/f9aad1b8be3d7d633c41ad9cff4bf3c6b93ad0f4))
22
+ * resolve a problem with missing documentation ([#208](https://github.com/kstepien3/ng-zen/issues/208)) ([85e7969](https://github.com/kstepien3/ng-zen/commit/85e7969c23b6b7bd2039e9cfdc336dc8da6edcc1))
23
+
1
24
  ## [19.3.0-next.1](https://github.com/kstepien3/ng-zen/compare/v19.2.0...v19.3.0-next.1) (2025-06-10)
2
25
 
3
26
  ### 🚀 New Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-zen/cli",
3
- "version": "19.3.0-next.1",
3
+ "version": "19.3.0",
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,6 +1,6 @@
1
- $size: var(--zen-avatar-size, 32px);
2
- $bg-color: var(--zen-avatar-bg-color, #d3d3d3);
3
- $color: var(--zen-avatar-color, #0f172a);
1
+ $size: var(--zen-avatar-size, 2rem);
2
+ $bg-color: var(--zen-avatar-bg-color, hsl(0deg 0% 80%));
3
+ $color: var(--zen-avatar-color, hsl(0deg 0% 20%));
4
4
  $font-size: var(--zen-avatar-font-size, small);
5
5
 
6
6
  :host {
@@ -8,9 +8,7 @@ import { ChangeDetectionStrategy, Component, input } from '@angular/core';
8
8
  *
9
9
  * This component utilizes Angular's optimized image directives for enhanced performance.
10
10
  *
11
- * ### Usage
12
- *
13
- * To use the component, you can provide an image source or project content:
11
+ * @example
14
12
  *
15
13
  * ```html
16
14
  * <!-- If an image source is provided, it will display the image -->
@@ -22,20 +20,17 @@ import { ChangeDetectionStrategy, Component, input } from '@angular/core';
22
20
  *
23
21
  * ### CSS Custom Properties
24
22
  *
25
- * You can customize the avatar using CSS custom properties:
23
+ * You can customize the component using CSS custom properties:
26
24
  *
27
25
  * ```css
28
26
  * :root {
29
- * --zen-avatar-size: 16px;
30
- * --zen-avatar-bg-color: black;
31
- * --zen-avatar-color: white;
27
+ * --zen-avatar-size: 2rem;
28
+ * --zen-avatar-bg-color: hsl(0deg 0% 80%);
29
+ * --zen-avatar-color: hsl(0deg 0% 20%);
32
30
  * --zen-avatar-font-size: small;
33
31
  * }
34
32
  * ```
35
33
  *
36
- * @example
37
- * <zen-avatar src="https://picsum.photos/32" />
38
- *
39
34
  * @author Konrad Stępień
40
35
  * @license {@link https://github.com/kstepien3/ng-zen/blob/master/LICENSE|BSD-2-Clause}
41
36
  * @see [GitHub](https://github.com/kstepien3/ng-zen)
@@ -4,7 +4,7 @@ $color: var(--zen-button-color, hsl(0deg 0% 100%));
4
4
  $padding: var(--zen-button-padding, 0.5rem 1rem);
5
5
  $shadow: var(--zen-button-shadow, 0 2px 4px hsl(0deg 0% 0% / 10%));
6
6
  $transition-duration: var(--zen-transition-duration, 0.4s);
7
- $outline: var(--zen-outline, 2px solid hsl(200deg 100 50 / 50%));
7
+ $outline: var(--zen-outline, 2px solid hsl(200deg 100% 50% / 50%));
8
8
 
9
9
  :host {
10
10
  display: inline-block;
@@ -9,6 +9,20 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';
9
9
  * @example
10
10
  * <button zen-btn> ... </button>
11
11
  *
12
+ * ### CSS Custom Properties
13
+ *
14
+ * You can customize the component using CSS custom properties:
15
+ *
16
+ * ```css
17
+ * :root {
18
+ * --zen-button-bg-color-hover: lightgrey;
19
+ * --zen-button-bg-color: grey;
20
+ * --zen-button-color: white;
21
+ * --zen-button-padding: 0.5rem 2rem;
22
+ * --zen-button-shadow: 0 2px 4px hsl(0deg 0% 0% / 10%);
23
+ * }
24
+ * ```
25
+ *
12
26
  * @author Konrad Stępień
13
27
  * @license {@link https://github.com/kstepien3/ng-zen/blob/master/LICENSE|BSD-2-Clause}
14
28
  * @see [GitHub](https://github.com/kstepien3/ng-zen)
@@ -1,14 +1,14 @@
1
1
  // Component Variables
2
2
  $size: var(--zen-checkbox-size, 16px);
3
3
  $border-radius: var(--zen-checkbox-border-radius, 6px);
4
- $focus-shadow: var(--zen-checkbox-focus-shadow, 0 1px 4px hsla(0% 0% 60% / 20%) inset);
4
+ $focus-shadow: var(--zen-checkbox-focus-shadow, 0 1px 4px hsl(0deg 0% 60% / 20%) inset);
5
5
 
6
6
  // Color Palette
7
- $appearance: var(--zen-checkbox-appearance, hsl(0% 0% 10%));
7
+ $appearance: var(--zen-checkbox-appearance, hsl(0deg 0% 10%));
8
8
  $disabled-opacity: var(--zen-checkbox-disabled-opacity, 0.6);
9
- $border: var(--zen-checkbox-border, 1px solid hsl(0% 0% 80%));
10
- $error: var(--zen-error, hsl(0% 70% 50%));
11
- $outline: var(--zen-outline, 2px solid hsl(200deg 100 50 / 50%));
9
+ $border: var(--zen-checkbox-border, 1px solid hsl(0deg 0% 80%));
10
+ $error: var(--zen-error, hsl(0deg 70% 50%));
11
+ $outline: var(--zen-outline, 2px solid hsl(200deg 100% 50% / 50%));
12
12
 
13
13
  // Animations
14
14
  $transition-duration: var(--zen-transition-duration, 0.2s);
@@ -51,12 +51,12 @@ input {
51
51
  }
52
52
 
53
53
  :host:has(input[type='checkbox']:disabled) {
54
+ opacity: $disabled-opacity;
55
+
54
56
  &,
55
57
  input {
56
58
  cursor: not-allowed;
57
59
  }
58
-
59
- opacity: $disabled-opacity;
60
60
  }
61
61
 
62
62
  :host:has(input:focus-visible) {
@@ -10,6 +10,21 @@ import { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/f
10
10
  * @example
11
11
  * <zen-checkbox value="false" />
12
12
  *
13
+ * ### CSS Custom Properties
14
+ *
15
+ * You can customize the component using CSS custom properties:
16
+ *
17
+ * ```css
18
+ * :root {
19
+ * --zen-checkbox-size: 16px;
20
+ * --zen-checkbox-border-radius: 6px;
21
+ * --zen-checkbox-focus-shadow: 0 1px 4px hsl(0deg 0% 60% / 20%) inset;
22
+ * --zen-checkbox-appearance: hsl(0deg 0% 10%);
23
+ * --zen-checkbox-disabled-opacity: 0.6;
24
+ * --zen-checkbox-border: 1px solid hsl(0deg 0% 80%);
25
+ * }
26
+ * ```
27
+ *
13
28
  * @implements {ControlValueAccessor}
14
29
  *
15
30
  * @author Konrad Stępień
@@ -1,4 +1,4 @@
1
- $appearance: var(--zen-divider-appearance, hsl(0% 0% 10%));
1
+ $appearance: var(--zen-divider-appearance, hsl(0deg 0% 60%));
2
2
  $type: var(--zen-divider-type, solid);
3
3
  $align-offset: var(--zen-divider-align-offset, 25%);
4
4
  $gap: var(--zen-divider-gap, 0.25rem);
@@ -9,6 +9,7 @@ $thickness: var(--zen-divider-thickness, 1px);
9
9
  display: flex;
10
10
  align-items: center;
11
11
  gap: $gap;
12
+ color: $appearance;
12
13
 
13
14
  &::before,
14
15
  &::after {
@@ -21,8 +22,12 @@ $thickness: var(--zen-divider-thickness, 1px);
21
22
  border-width: #{$thickness} 0 0;
22
23
  }
23
24
 
24
- &:not(.has-content)::after {
25
- content: none;
25
+ &:not(.has-content) {
26
+ gap: 0;
27
+
28
+ &::after {
29
+ content: none;
30
+ }
26
31
  }
27
32
 
28
33
  &.zen-align-start::before,
@@ -19,9 +19,11 @@ import { ChangeDetectionStrategy, Component, computed, ElementRef, inject, input
19
19
  *
20
20
  * ```css
21
21
  * :root {
22
- * --zen-divider-appearance: red;
23
- * --zen-divider-type: dotted;
24
- * --zen-divider-align-offset: 10%;
22
+ * --zen-divider-appearance: hsl(0deg 0% 10%);
23
+ * --zen-divider-type: solid;
24
+ * --zen-divider-align-offset: 25%;
25
+ * --zen-divider-gap: 0.25rem;
26
+ * --zen-divider-thickness: 1px;
25
27
  * }
26
28
  * ```
27
29
  *
@@ -1,13 +1,13 @@
1
1
  // Component Variables
2
- $border: var(--zen-input-border, 1px solid hsl(0% 0% 80%));
2
+ $border: var(--zen-input-border, 1px solid hsl(0deg 0% 80%));
3
3
  $border-radius: var(--zen-input-border-radius, 8px);
4
4
  $padding: var(--zen-input-padding, 0.5rem 1rem);
5
- $focus-shadow: var(--zen-input-focus-shadow, 0 1px 4px hsla(0% 0% 60% / 20%) inset);
6
- $placeholder-color: var(--zen-input-placeholder-color, hsl(0% 0% 60%));
5
+ $focus-shadow: var(--zen-input-focus-shadow, 0 1px 4px hsl(0deg 0% 60% / 20%) inset);
6
+ $placeholder-color: var(--zen-input-placeholder-color, hsl(0deg 0% 60%));
7
7
 
8
8
  // Color Palette
9
- $outline: var(--zen-outline, 2px solid hsl(200deg 100 50 / 50%));
10
- $error: var(--zen-error, hsl(0% 70% 50%));
9
+ $outline: var(--zen-outline, 2px solid hsl(200deg 100% 50% / 50%));
10
+ $error: var(--zen-error, hsl(0deg 70% 50%));
11
11
 
12
12
  input {
13
13
  border: $border;
@@ -9,6 +9,19 @@ import { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/f
9
9
  * @example
10
10
  * <zen-input value="string" />
11
11
  *
12
+ * ### CSS Custom Properties
13
+ * You can customize the component using CSS custom properties:
14
+ *
15
+ * ```css
16
+ * :root {
17
+ * --zen-input-border: 1px solid hsl(0deg 0% 80%);
18
+ * --zen-input-border-radius: 8px;
19
+ * --zen-input-padding: 0.5rem 1rem;
20
+ * --zen-input-focus-shadow: 0 1px 4px hsl(0deg 0% 60% / 20%) inset;
21
+ * --zen-input-placeholder-color: hsl(0deg 0% 60%);
22
+ * }
23
+ * ```
24
+ *
12
25
  * @implements {ControlValueAccessor}
13
26
  *
14
27
  * @author Konrad Stępień
@@ -4,24 +4,29 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';
4
4
  * ZenInputComponent loader component that displays loading states.
5
5
  *
6
6
  * @example
7
- * ```HTML
8
- * <zen-skeleton rounded/>
7
+ *
8
+ * ```html
9
+ * <zen-skeleton rounded />
9
10
  * ```
11
+ *
10
12
  * ### Properties:
11
13
  * - `rounded` - Whether to display rounded corners
12
14
  *
13
15
  * ### CSS Custom Properties
14
16
  * You can customize the component using CSS custom properties:
15
17
  *
16
- * ```CSS
18
+ * ```css
17
19
  * :root {
18
- * --zen-skeleton-background: red;
19
- * --zen-skeleton-border-radius: 1rem;
20
- * --zen-skeleton-animation-duration: 1s;
20
+ * --zen-skeleton-background: hsl(0deg 0% 80%);
21
+ * --zen-skeleton-border-radius: 0.5rem;
22
+ * --zen-skeleton-animation-duration: 1.6s;
21
23
  * }
22
24
  * ```
25
+ *
26
+ * @author Konrad Stępień
27
+ * @license {@link https://github.com/kstepien3/ng-zen/blob/master/LICENSE|BSD-2-Clause}
28
+ * @see [GitHub](https://github.com/kstepien3/ng-zen)
23
29
  */
24
-
25
30
  @Component({
26
31
  selector: 'zen-skeleton, zen-skeleton[rounded]',
27
32
  template: ``,
@@ -1,6 +1,6 @@
1
- $outline: var(--zen-outline, 2px solid hsl(200deg 100 50 / 50%));
1
+ $outline: var(--zen-outline, 2px solid hsl(200deg 100% 50% / 50%));
2
2
  $transition-duration: 0.15s;
3
- $placeholder-color: var(--zen-input-placeholder-color, hsl(0% 0% 60%));
3
+ $placeholder-color: var(--zen-input-placeholder-color, hsl(0deg 0% 60%));
4
4
  $size: var(--zen-switch-size, 16px);
5
5
  $margin: var(--zen-switch-margin, 2px);
6
6
  $width: var(--zen-switch-width, 30px);
@@ -9,7 +9,7 @@ $height: calc(#{$size} + #{$margin} * 2);
9
9
 
10
10
  :host {
11
11
  cursor: pointer;
12
- background: hsl(0% 0% 80%);
12
+ background: hsl(0deg 0% 80%);
13
13
  border-radius: 9999px;
14
14
  width: $width;
15
15
  height: $height;
@@ -48,10 +48,10 @@ $height: calc(#{$size} + #{$margin} * 2);
48
48
  }
49
49
 
50
50
  &[data-checked='true'] {
51
- background-color: hsl(0% 0% 10%);
51
+ background-color: hsl(0deg 0% 10%);
52
52
 
53
53
  .switch-handle {
54
- color: hsl(0% 0% 10%);
54
+ color: hsl(0deg 0% 10%);
55
55
  right: 0;
56
56
  }
57
57
  }
@@ -1,6 +1,36 @@
1
1
  import { ChangeDetectionStrategy, Component, forwardRef, model } from '@angular/core';
2
2
  import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
3
3
 
4
+ /**
5
+ * ZenInputComponent is a reusable text input component designed to provide
6
+ * a consistent and customizable input style across the application.
7
+ * It supports Angular forms integration and provides two-way data binding.
8
+ *
9
+ * @example
10
+ *
11
+ * ```html
12
+ * <zen-switch [disabled]="false" [value]="true" />
13
+ *```
14
+ *
15
+ * ### CSS Custom Properties
16
+ * You can customize the component using CSS custom properties:
17
+ *
18
+ * ```css
19
+ * :root {
20
+ * --zen-input-border: 1px solid hsl(0deg 0% 80%);
21
+ * --zen-input-border-radius: 8px;
22
+ * --zen-input-padding: 0.5rem 1rem;
23
+ * --zen-input-focus-shadow: 0 1px 4px hsl(0deg 0% 60% / 20%) inset;
24
+ * --zen-input-placeholder-color: hsl(0deg 0% 60%);
25
+ * }
26
+ * ```
27
+ *
28
+ * @implements {ControlValueAccessor}
29
+ *
30
+ * @author Konrad Stępień
31
+ * @license {@link https://github.com/kstepien3/ng-zen/blob/master/LICENSE|BSD-2-Clause}
32
+ * @see [GitHub](https://github.com/kstepien3/ng-zen)
33
+ */
4
34
  @Component({
5
35
  selector: 'zen-switch',
6
36
  template: `
@@ -1,13 +1,13 @@
1
1
  // Component Variables
2
- $border: var(--zen-input-border, 1px solid hsl(0% 0% 80%));
2
+ $border: var(--zen-input-border, 1px solid hsl(0deg 0% 80%));
3
3
  $border-radius: var(--zen-input-border-radius, 8px);
4
4
  $padding: var(--zen-input-padding, 0.5rem 1rem);
5
- $focus-shadow: var(--zen-input-focus-shadow, 0 1px 4px hsla(0% 0% 60% / 20%) inset);
6
- $placeholder-color: var(--zen-input-placeholder-color, hsl(0% 0% 60%));
5
+ $focus-shadow: var(--zen-input-focus-shadow, 0 1px 4px hsl(0deg 0% 60% / 20%) inset);
6
+ $placeholder-color: var(--zen-input-placeholder-color, hsl(0deg 0% 60%));
7
7
 
8
8
  // Color Palette
9
- $outline: var(--zen-outline, 2px solid hsl(200deg 100 50 / 50%));
10
- $error: var(--zen-error, hsl(0% 70% 50%));
9
+ $outline: var(--zen-outline, 2px solid hsl(200deg 100% 50% / 50%));
10
+ $error: var(--zen-error, hsl(0deg 70% 50%));
11
11
 
12
12
  :host {
13
13
  border: $border;
@@ -8,6 +8,19 @@ import { ChangeDetectionStrategy, Component } from '@angular/core';
8
8
  * @example
9
9
  * <textarea zen-textarea></textarea>
10
10
  *
11
+ * ### CSS Custom Properties
12
+ * You can customize the component using CSS custom properties:
13
+ *
14
+ * ```css
15
+ * :root {
16
+ * --zen-input-border: 1px solid hsl(0deg 0% 80%);
17
+ * --zen-input-border-radius: 8px;
18
+ * --zen-input-padding: 0.5rem 1rem;
19
+ * --zen-input-focus-shadow: 0 1px 4px hsl(0deg 0% 60% / 20%) inset;
20
+ * --zen-input-placeholder-color: hsl(0deg 0% 60%);
21
+ * }
22
+ * ```
23
+ *
11
24
  * @author Konrad Stępień
12
25
  * @license {@link https://github.com/kstepien3/ng-zen/blob/master/LICENSE|BSD-2-Clause}
13
26
  * @see [GitHub](https://github.com/kstepien3/ng-zen)