@ng-zen/cli 20.3.0-next.2 → 20.3.0-next.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.
- package/CHANGELOG.md +13 -0
- package/package.json +1 -1
- package/schematics/components/files/avatar/avatar.scss +12 -9
- package/schematics/components/files/button/button.scss +15 -10
- package/schematics/components/files/checkbox/checkbox.scss +33 -33
- package/schematics/components/files/checkbox/checkbox.ts +2 -3
- package/schematics/components/files/divider/divider.scss +17 -14
- package/schematics/components/files/divider/divider.ts +1 -12
- package/schematics/components/files/input/input.scss +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## [20.3.0-next.3](https://github.com/kstepien3/ng-zen/compare/v20.3.0-next.2...v20.3.0-next.3) (2025-09-15)
|
|
2
|
+
|
|
3
|
+
### 🐛 Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **avatar:** improve css variables ([#323](https://github.com/kstepien3/ng-zen/issues/323)) ([eef614a](https://github.com/kstepien3/ng-zen/commit/eef614a0e2060fe32f72e00809b66009ae24832f))
|
|
6
|
+
* **input:** resolve problem with wrong variables ([#322](https://github.com/kstepien3/ng-zen/issues/322)) ([30f5d10](https://github.com/kstepien3/ng-zen/commit/30f5d10c4c559f01ed3445b77e174340b4f2fb6f))
|
|
7
|
+
|
|
8
|
+
### 🛠️ Code Refactor
|
|
9
|
+
|
|
10
|
+
* **button:** improve css variables ([#321](https://github.com/kstepien3/ng-zen/issues/321)) ([4ed1310](https://github.com/kstepien3/ng-zen/commit/4ed1310450dde749164c419ec6b5da0a4fbb98bc))
|
|
11
|
+
* **checkbox:** improve css variables ([#317](https://github.com/kstepien3/ng-zen/issues/317)) ([bbe1437](https://github.com/kstepien3/ng-zen/commit/bbe143704163394a9c9ce446aa9d749a57f9c62c))
|
|
12
|
+
* **divider:** improve css variables ([#316](https://github.com/kstepien3/ng-zen/issues/316)) ([7a19ce7](https://github.com/kstepien3/ng-zen/commit/7a19ce72db58e8d23a4786aae2787db6bcfdbf6d))
|
|
13
|
+
|
|
1
14
|
## [20.3.0-next.2](https://github.com/kstepien3/ng-zen/compare/v20.3.0-next.1...v20.3.0-next.2) (2025-09-11)
|
|
2
15
|
|
|
3
16
|
### 🛠️ Code Refactor
|
package/package.json
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
:host {
|
|
2
|
+
--zen-avatar-size: 2rem;
|
|
3
|
+
--zen-avatar-bg-color: hsl(0deg 0% 80%);
|
|
4
|
+
--zen-avatar-color: hsl(0deg 0% 20%);
|
|
5
|
+
--zen-avatar-font-size: small;
|
|
6
|
+
}
|
|
5
7
|
|
|
8
|
+
/* stylelint-disable-next-line no-duplicate-selectors -- separate variables and styles */
|
|
6
9
|
:host {
|
|
10
|
+
height: var(--zen-avatar-size);
|
|
11
|
+
width: var(--zen-avatar-size);
|
|
7
12
|
display: flex;
|
|
8
|
-
height: $size;
|
|
9
|
-
width: $size;
|
|
10
13
|
border-radius: 50%;
|
|
11
14
|
overflow: hidden;
|
|
12
15
|
position: relative;
|
|
13
16
|
|
|
14
17
|
// Content styles
|
|
15
|
-
background-color:
|
|
16
|
-
color:
|
|
17
|
-
font-size:
|
|
18
|
+
background-color: var(--zen-avatar-bg-color);
|
|
19
|
+
color: var(--zen-avatar-color);
|
|
20
|
+
font-size: var(--zen-avatar-font-size);
|
|
18
21
|
justify-content: center;
|
|
19
22
|
align-items: center;
|
|
20
23
|
font-weight: bold;
|
|
@@ -1,26 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
$bg-color: var(--zen-button-bg-color, hsl(0deg 0% 0%));
|
|
3
|
-
$color: var(--zen-button-color, hsl(0deg 0% 100%));
|
|
4
|
-
$padding: var(--zen-button-padding, 0.5rem 1rem);
|
|
5
|
-
$shadow: var(--zen-button-shadow, 0 2px 4px hsl(0deg 0% 0% / 10%));
|
|
1
|
+
// Globals
|
|
6
2
|
$transition-duration: var(--zen-transition-duration, 0.4s);
|
|
7
3
|
$outline: var(--zen-outline, 2px solid hsl(200deg 100% 50% / 50%));
|
|
8
4
|
|
|
9
5
|
:host {
|
|
6
|
+
--zen-button-padding: 0.5rem 1rem;
|
|
7
|
+
--zen-button-bg-color: hsl(0deg 0% 0%);
|
|
8
|
+
--zen-button-bg-color-hover: hsl(0deg 0% 20%);
|
|
9
|
+
--zen-button-color: hsl(0deg 0% 100%);
|
|
10
|
+
--zen-button-shadow: 0 2px 4px hsl(0deg 0% 0% / 10%);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* stylelint-disable-next-line no-duplicate-selectors -- separate variables and styles */
|
|
14
|
+
:host {
|
|
15
|
+
padding: var(--zen-button-padding);
|
|
16
|
+
background-color: var(--zen-button-bg-color);
|
|
17
|
+
color: var(--zen-button-color);
|
|
18
|
+
box-shadow: var(--zen-button-shadow);
|
|
10
19
|
display: inline-block;
|
|
11
20
|
font-size: 14px;
|
|
12
21
|
font-weight: bold;
|
|
13
22
|
text-align: center;
|
|
14
23
|
cursor: pointer;
|
|
15
24
|
border: none;
|
|
16
|
-
padding: $padding;
|
|
17
25
|
border-radius: 99999px;
|
|
18
26
|
transition-property: background-color, opacity;
|
|
19
27
|
transition-duration: $transition-duration;
|
|
20
28
|
transition-timing-function: ease;
|
|
21
|
-
background-color: $bg-color;
|
|
22
|
-
color: $color;
|
|
23
|
-
box-shadow: $shadow;
|
|
24
29
|
text-decoration: none;
|
|
25
30
|
overflow: hidden;
|
|
26
31
|
position: relative;
|
|
@@ -28,7 +33,7 @@ $outline: var(--zen-outline, 2px solid hsl(200deg 100% 50% / 50%));
|
|
|
28
33
|
|
|
29
34
|
/* Hover state */
|
|
30
35
|
:host:hover {
|
|
31
|
-
background-color:
|
|
36
|
+
background-color: var(--zen-button-bg-color-hover);
|
|
32
37
|
}
|
|
33
38
|
|
|
34
39
|
/* Focus state */
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
//
|
|
2
|
-
$size: var(--zen-checkbox-size, 16px);
|
|
3
|
-
$border-radius: var(--zen-checkbox-border-radius, 6px);
|
|
4
|
-
$focus-shadow: var(--zen-checkbox-focus-shadow, 0 1px 4px hsl(0deg 0% 60% / 20%) inset);
|
|
5
|
-
|
|
6
|
-
// Color Palette
|
|
7
|
-
$appearance: var(--zen-checkbox-appearance, hsl(0deg 0% 10%));
|
|
8
|
-
$disabled-opacity: var(--zen-checkbox-disabled-opacity, 0.6);
|
|
9
|
-
$border: var(--zen-checkbox-border, 1px solid hsl(0deg 0% 80%));
|
|
1
|
+
// Globals
|
|
10
2
|
$error: var(--zen-error, hsl(0deg 70% 50%));
|
|
3
|
+
$focus-shadow: var(--zen-focus-shadow, 0 1px 4px hsl(0deg 0% 60% / 20%) inset);
|
|
11
4
|
$outline: var(--zen-outline, 2px solid hsl(200deg 100% 50% / 50%));
|
|
12
|
-
|
|
13
|
-
// Animations
|
|
14
5
|
$transition-duration: var(--zen-transition-duration, 0.2s);
|
|
15
6
|
|
|
7
|
+
:host {
|
|
8
|
+
--zen-checkbox-size: 1rem;
|
|
9
|
+
--zen-checkbox-border-radius: 0.375rem; // 6px
|
|
10
|
+
--zen-checkbox-appearance: hsl(0deg 0% 10%);
|
|
11
|
+
--zen-checkbox-disabled-opacity: 0.6;
|
|
12
|
+
--zen-checkbox-border: 1px solid hsl(0deg 0% 80%);
|
|
13
|
+
}
|
|
14
|
+
|
|
16
15
|
input {
|
|
17
16
|
position: absolute;
|
|
18
17
|
cursor: pointer;
|
|
@@ -25,13 +24,14 @@ input {
|
|
|
25
24
|
left: 0;
|
|
26
25
|
}
|
|
27
26
|
|
|
27
|
+
/* stylelint-disable-next-line no-duplicate-selectors -- separate variables and styles */
|
|
28
28
|
:host {
|
|
29
|
+
border: var(--zen-checkbox-border);
|
|
30
|
+
border-radius: var(--zen-checkbox-border-radius);
|
|
31
|
+
height: var(--zen-checkbox-size);
|
|
32
|
+
width: var(--zen-checkbox-size);
|
|
29
33
|
background-color: white;
|
|
30
34
|
cursor: pointer;
|
|
31
|
-
border: $border;
|
|
32
|
-
border-radius: $border-radius;
|
|
33
|
-
height: $size;
|
|
34
|
-
width: $size;
|
|
35
35
|
position: relative;
|
|
36
36
|
transition:
|
|
37
37
|
background-color ease,
|
|
@@ -42,28 +42,28 @@ input {
|
|
|
42
42
|
display: grid;
|
|
43
43
|
place-items: center;
|
|
44
44
|
font-size: small;
|
|
45
|
-
}
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
46
|
+
&:has(input:checked) {
|
|
47
|
+
color: white;
|
|
48
|
+
background-color: var(--zen-checkbox-appearance);
|
|
49
|
+
border-color: var(--zen-checkbox-appearance);
|
|
50
|
+
}
|
|
52
51
|
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
&:has(input[type='checkbox']:disabled) {
|
|
53
|
+
opacity: var(--zen-checkbox-disabled-opacity);
|
|
55
54
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
&,
|
|
56
|
+
input {
|
|
57
|
+
cursor: not-allowed;
|
|
58
|
+
}
|
|
59
59
|
}
|
|
60
|
-
}
|
|
61
60
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
61
|
+
&:has(input:focus-visible) {
|
|
62
|
+
outline: $outline;
|
|
63
|
+
box-shadow: $focus-shadow;
|
|
64
|
+
}
|
|
66
65
|
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
&:has(input:user-invalid) {
|
|
67
|
+
border-color: $error;
|
|
68
|
+
}
|
|
69
69
|
}
|
|
@@ -20,9 +20,8 @@ import { ZenFormControl, ZenFormControlProvider } from '../form-control';
|
|
|
20
20
|
*
|
|
21
21
|
* ```css
|
|
22
22
|
* :root {
|
|
23
|
-
* --zen-checkbox-size:
|
|
24
|
-
* --zen-checkbox-border-radius:
|
|
25
|
-
* --zen-checkbox-focus-shadow: 0 1px 4px hsl(0deg 0% 60% / 20%) inset;
|
|
23
|
+
* --zen-checkbox-size: 1rem;
|
|
24
|
+
* --zen-checkbox-border-radius: 0.375rem;
|
|
26
25
|
* --zen-checkbox-appearance: hsl(0deg 0% 10%);
|
|
27
26
|
* --zen-checkbox-disabled-opacity: 0.6;
|
|
28
27
|
* --zen-checkbox-border: 1px solid hsl(0deg 0% 80%);
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
:host {
|
|
2
|
+
--zen-divider-appearance: hsl(0deg 0% 60%);
|
|
3
|
+
--zen-divider-type: solid;
|
|
4
|
+
--zen-divider-align-offset: 25%;
|
|
5
|
+
--zen-divider-gap: 0.25rem;
|
|
6
|
+
--zen-divider-thickness: 1px;
|
|
7
|
+
}
|
|
6
8
|
|
|
9
|
+
/* stylelint-disable-next-line no-duplicate-selectors -- separate variables and styles */
|
|
7
10
|
:host {
|
|
11
|
+
color: var(--zen-divider-appearance);
|
|
12
|
+
gap: var(--zen-divider-gap);
|
|
8
13
|
width: 100%;
|
|
9
14
|
display: flex;
|
|
10
15
|
align-items: center;
|
|
11
|
-
gap: $gap;
|
|
12
|
-
color: $appearance;
|
|
13
16
|
|
|
14
17
|
&::before,
|
|
15
18
|
&::after {
|
|
@@ -17,12 +20,12 @@ $thickness: var(--zen-divider-thickness, 1px);
|
|
|
17
20
|
display: block;
|
|
18
21
|
width: 100%;
|
|
19
22
|
height: 0;
|
|
20
|
-
border-color:
|
|
21
|
-
border-style:
|
|
22
|
-
border-width:
|
|
23
|
+
border-color: var(--zen-divider-appearance);
|
|
24
|
+
border-style: var(--zen-divider-type);
|
|
25
|
+
border-width: var(--zen-divider-thickness) 0 0;
|
|
23
26
|
}
|
|
24
27
|
|
|
25
|
-
&:
|
|
28
|
+
&:empty {
|
|
26
29
|
gap: 0;
|
|
27
30
|
|
|
28
31
|
&::after {
|
|
@@ -32,7 +35,7 @@ $thickness: var(--zen-divider-thickness, 1px);
|
|
|
32
35
|
|
|
33
36
|
&.zen-align-start::before,
|
|
34
37
|
&.zen-align-end::after {
|
|
35
|
-
width:
|
|
38
|
+
width: var(--zen-divider-align-offset);
|
|
36
39
|
}
|
|
37
40
|
}
|
|
38
41
|
|
|
@@ -47,11 +50,11 @@ $thickness: var(--zen-divider-thickness, 1px);
|
|
|
47
50
|
display: block;
|
|
48
51
|
width: unset;
|
|
49
52
|
height: 100%;
|
|
50
|
-
border-width: 0
|
|
53
|
+
border-width: 0 var(--zen-divider-thickness) 0 0;
|
|
51
54
|
}
|
|
52
55
|
|
|
53
56
|
&.zen-align-start::before,
|
|
54
57
|
&.zen-align-end::after {
|
|
55
|
-
height:
|
|
58
|
+
height: var(--zen-divider-align-offset);
|
|
56
59
|
}
|
|
57
60
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component,
|
|
1
|
+
import { ChangeDetectionStrategy, Component, input } from '@angular/core';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* ZenDivider is a reusable divider component that provides a simple way to
|
|
@@ -38,21 +38,10 @@ import { ChangeDetectionStrategy, Component, computed, ElementRef, inject, input
|
|
|
38
38
|
styleUrl: './divider.scss',
|
|
39
39
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
40
40
|
host: {
|
|
41
|
-
'[class.has-content]': 'hasContent()',
|
|
42
41
|
'[class]': '"zen-align-"+align()',
|
|
43
42
|
},
|
|
44
43
|
})
|
|
45
44
|
export class ZenDivider {
|
|
46
45
|
/** Controls the alignment of content within the divider. */
|
|
47
46
|
readonly align = input<'start' | 'end' | 'center'>('center');
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Computed property that determines if the divider contains any content.
|
|
51
|
-
* Used to apply appropriate styling when content is present.
|
|
52
|
-
*/
|
|
53
|
-
protected readonly hasContent = computed(() => {
|
|
54
|
-
return this.elementRef.nativeElement.childNodes.length > 0;
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
private readonly elementRef = inject(ElementRef);
|
|
58
47
|
}
|
|
@@ -20,12 +20,12 @@ input {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
&:focus-visible {
|
|
23
|
-
outline:
|
|
23
|
+
outline: $outline;
|
|
24
24
|
box-shadow: var(--zen-input-focus-shadow);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
&:user-invalid {
|
|
28
|
-
border-color:
|
|
28
|
+
border-color: $error;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
&::placeholder {
|