@dereekb/dbx-form 13.20.0 → 13.22.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.
@@ -19,15 +19,32 @@
19
19
 
20
20
  .dbx-texteditor-field {
21
21
  .NgxEditor {
22
- background: transparent;
22
+ // Drive ngx-editor's own background token to the M3 system background so the editing "paper"
23
+ // tracks the theme (and dark mode) instead of ngx-editor's default white.
24
+ --ngx-editor-background-color: var(--mat-sys-background);
25
+ padding-top: var(--dbx-texteditor-field-padding-top, var(--dbx-padding-3));
23
26
  color: var(--mat-sys-on-surface);
24
- border-color: var(--mat-sys-outline);
27
+ border-color: var(--dbx-texteditor-field-bg, color-mix(in srgb, var(--dbx-bg-color-current, var(--mat-sys-primary)) var(--dbx-texteditor-field-tone, 8%), color-mix(in srgb, var(--mat-sys-surface-dim) var(--dbx-texteditor-field-dim, 45%), var(--mat-sys-surface))));
28
+ border-radius: var(--dbx-texteditor-field-container-shape, var(--dbx-corners-border-radius, var(--mat-sys-corner-large)));
29
+ border-bottom-left-radius: 0;
30
+ border-bottom-right-radius: 0;
25
31
  }
26
32
 
27
33
  .NgxEditor__MenuBar {
28
- background: var(--mat-sys-background);
34
+ // The formatting toolbar is the filled footer of the sunken field "card": it carries the same
35
+ // dim tonal --dbx-texteditor-field surface as the editor body above (a wash of the active
36
+ // dbxColor over a lightened surface-dim), rounded only on its bottom corners so the two join
37
+ // into one container, plus a soft --mat-sys-level1 lift shadow (replacing the former Material
38
+ // elevation(2) shadow). Tuned via the shared --dbx-texteditor-field-* tokens.
39
+
29
40
  color: var(--mat-sys-on-surface);
30
- @include theming.elevation(2);
41
+
42
+ padding: var(--dbx-texteditor-field-padding, var(--dbx-padding-2));
43
+ border-radius: var(--dbx-texteditor-field-container-shape, var(--dbx-corners-border-radius, var(--mat-sys-corner-large)));
44
+ border-top-left-radius: 0;
45
+ border-top-right-radius: 0;
46
+ background: var(--dbx-texteditor-field-bg, color-mix(in srgb, var(--dbx-bg-color-current, var(--mat-sys-primary)) var(--dbx-texteditor-field-tone, 8%), color-mix(in srgb, var(--mat-sys-surface-dim) var(--dbx-texteditor-field-dim, 45%), var(--mat-sys-surface))));
47
+ box-shadow: var(--dbx-texteditor-field-shadow, var(--mat-sys-level1));
31
48
 
32
49
  svg {
33
50
  fill: var(--mat-sys-on-surface);
@@ -18,10 +18,34 @@
18
18
  }
19
19
 
20
20
  .dbx-form-repeat-array {
21
+ // Encapsulating "tray" that groups the whole repeat-array (items + footer) into one surface —
22
+ // the second, outer elevation. M3 nested elevation, the dim/bright counterpart to the bright
23
+ // item cards: the tray sits on a tonal wash of the active dbxColor (--dbx-bg-color-current,
24
+ // primary by default, driven by an ancestor/host [dbxColor]) over a lightened `surface-dim`
25
+ // base. `surface-dim` is the dimmest M3 surface — the opposite end of the dim/bright pair from
26
+ // the items' `surface-bright`, the one M3 pairing with stable light/dark luminance ordering — but
27
+ // pure surface-dim reads too heavy as a large tray, so the base is blended toward the normal
28
+ // `surface` (--dbx-form-repeat-array-dim, the surface-dim share; lower = lighter). It stays ≤
29
+ // `surface` < the items' `surface-bright`, so the bright item cards reliably pop within the tray
30
+ // in both themes. A soft lift shadow raises the whole group off the page. Override
31
+ // --dbx-form-repeat-array-bg to replace the tray surface, --dbx-form-repeat-array-tone (percentage)
32
+ // to tune the color wash, --dbx-form-repeat-array-dim (percentage) to tune the base darkness,
33
+ // --dbx-form-repeat-array-shadow to retune/remove (`none`) the lift,
34
+ // --dbx-form-repeat-array-container-shape for the corner radius, or
35
+ // --dbx-form-repeat-array-padding-vertical / --dbx-form-repeat-array-padding-horizontal for the
36
+ // inset around the items.
21
37
  margin-bottom: 8px;
38
+ padding: var(--dbx-form-repeat-array-padding-vertical, var(--dbx-padding-3)) var(--dbx-form-repeat-array-padding-horizontal, var(--dbx-padding-2));
39
+ border-radius: var(--dbx-form-repeat-array-container-shape, var(--dbx-corners-border-radius, var(--mat-sys-corner-large)));
40
+ background: var(--dbx-form-repeat-array-bg, color-mix(in srgb, var(--dbx-bg-color-current, var(--mat-sys-primary)) var(--dbx-form-repeat-array-tone, 8%), color-mix(in srgb, var(--mat-sys-surface-dim) var(--dbx-form-repeat-array-dim, 45%), var(--mat-sys-surface))));
41
+ box-shadow: var(--dbx-form-repeat-array-shadow, var(--mat-sys-level1));
22
42
 
23
43
  .dbx-form-repeat-array-field {
24
- @include theming.elevation(1);
44
+ // M3 elevation: each repeated array item reads as a raised card — a brighter tonal surface
45
+ // (set in the base rule below) plus this soft lift shadow for protection against the
46
+ // background — replacing the former Material elevation(1) shadow. Override
47
+ // --dbx-form-repeat-array-field-elevate-shadow to retune/remove (`none`) the shadow.
48
+ box-shadow: var(--dbx-form-repeat-array-field-elevate-shadow, var(--mat-sys-level1));
25
49
 
26
50
  h4 {
27
51
  margin: 0;
@@ -34,7 +58,12 @@
34
58
 
35
59
  padding: 0;
36
60
  margin-bottom: 4px;
37
- border-radius: var(--dbx-form-repeat-array-field-container-shape, var(--mat-sys-corner-medium));
61
+ border-radius: var(--dbx-form-repeat-array-field-container-shape, var(--dbx-corners-border-radius, var(--mat-sys-corner-medium)));
62
+
63
+ .dbx-form-repeat-array-bar {
64
+ padding-top: 6px;
65
+ padding-left: 6px;
66
+ }
38
67
 
39
68
  .dbx-form-repeat-array-field-content {
40
69
  display: block;
@@ -42,14 +71,25 @@
42
71
  }
43
72
  }
44
73
 
74
+ .dbx-form-repeat-array-field > dbx-chip {
75
+ position: absolute;
76
+ }
77
+
45
78
  .dbx-form-repeat-array-footer {
46
- margin-top: var(--dbx-padding-2);
79
+ padding: var(--dbx-form-repeat-array-padding-vertical, var(--dbx-padding-3));
80
+ padding-bottom: 0;
47
81
  }
48
82
  }
49
83
 
50
84
  .dbx-form-repeat-array-field {
51
- background: var(--mat-sys-surface);
52
- border: 4px solid var(--mat-sys-surface);
85
+ // Elevated card surface (M3 color-first elevation): a low-opacity tonal wash of the active
86
+ // dbxColor (--dbx-bg-color-current, primary by default, driven by an ancestor/host [dbxColor])
87
+ // over surface-bright, so the card reads as raised by color and not a flat grey. The 4px frame
88
+ // uses the same surface so the card stays one continuous tone. Override
89
+ // --dbx-form-repeat-array-field-elevate-bg to replace the surface outright, or
90
+ // --dbx-form-repeat-array-field-elevate-tone (percentage) to tune the wash strength.
91
+ background: var(--dbx-form-repeat-array-field-elevate-bg, color-mix(in srgb, var(--dbx-bg-color-current, var(--mat-sys-primary)) var(--dbx-form-repeat-array-field-elevate-tone, 8%), var(--mat-sys-surface-bright)));
92
+ border: 4px solid var(--dbx-form-repeat-array-field-elevate-bg, color-mix(in srgb, var(--dbx-bg-color-current, var(--mat-sys-primary)) var(--dbx-form-repeat-array-field-elevate-tone, 8%), var(--mat-sys-surface-bright)));
53
93
  }
54
94
 
55
95
  .dbx-form-repeat-array-drag-button.mdc-button > .mat-icon {
@@ -121,8 +121,18 @@ $dbx-forge-form-field-slider-thumb-margin: 22px;
121
121
  }
122
122
 
123
123
  .dbx-form-repeat-array-field {
124
+ // Per-item index number: render it as a compact, centered badge that lines up with the item
125
+ // label — a circle for a single digit, a pill once it spills to double digits — instead of the
126
+ // default lopsided small-chip rounded rectangle. Square it off (min-width == min-height) and
127
+ // center the digit so it reads as a tidy step badge. Size via --dbx-form-repeat-array-index-size.
124
128
  .dbx-form-repeat-array-bar .dbx-chip {
125
- margin-right: 3px;
129
+ box-sizing: border-box;
130
+ margin-right: 6px;
131
+ min-width: var(--dbx-form-repeat-array-index-size, 22px);
132
+ min-height: var(--dbx-form-repeat-array-index-size, 22px);
133
+ padding: 0 6px;
134
+ justify-content: center;
135
+ border-radius: var(--mat-sys-corner-full, 999px);
126
136
  }
127
137
  }
128
138
  }
@@ -1,5 +1,3 @@
1
- @forward '@angular/material' show elevation;
2
-
3
1
  @forward './config';
4
2
  @forward './variables';
5
3
  @forward './mixin';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-form",
3
- "version": "13.20.0",
3
+ "version": "13.22.0",
4
4
  "sideEffects": [
5
5
  "*.scss",
6
6
  "*.css"
@@ -14,13 +14,13 @@
14
14
  "@angular/material-date-fns-adapter": "21.2.9",
15
15
  "@angular/platform-browser": "21.2.11",
16
16
  "@bobbyquantum/ngx-editor": "21.0.0",
17
- "@dereekb/date": "13.20.0",
18
- "@dereekb/dbx-core": "13.20.0",
19
- "@dereekb/dbx-web": "13.20.0",
20
- "@dereekb/model": "13.20.0",
21
- "@dereekb/rxjs": "13.20.0",
22
- "@dereekb/util": "13.20.0",
23
- "@dereekb/vitest": "13.20.0",
17
+ "@dereekb/date": "13.22.0",
18
+ "@dereekb/dbx-core": "13.22.0",
19
+ "@dereekb/dbx-web": "13.22.0",
20
+ "@dereekb/model": "13.22.0",
21
+ "@dereekb/rxjs": "13.22.0",
22
+ "@dereekb/util": "13.22.0",
23
+ "@dereekb/vitest": "13.22.0",
24
24
  "@ng-forge/dynamic-forms": "0.10.0-next.4",
25
25
  "@ng-forge/dynamic-forms-material": "0.10.0-next.4",
26
26
  "@ng-web-apis/geolocation": "^5.2.0",