@dereekb/dbx-form 13.21.0 → 13.23.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,27 @@
42
71
  }
43
72
  }
44
73
 
74
+ .dbx-form-repeat-array-field > dbx-chip {
75
+ position: absolute;
76
+ z-index: 1;
77
+ }
78
+
45
79
  .dbx-form-repeat-array-footer {
46
- margin-top: var(--dbx-padding-2);
80
+ padding: var(--dbx-form-repeat-array-padding-vertical, var(--dbx-padding-3));
81
+ padding-bottom: 0;
47
82
  }
48
83
  }
49
84
 
50
85
  .dbx-form-repeat-array-field {
51
- background: var(--mat-sys-surface);
52
- border: 4px solid var(--mat-sys-surface);
86
+ // Elevated card surface (M3 color-first elevation): a low-opacity tonal wash of the active
87
+ // dbxColor (--dbx-bg-color-current, primary by default, driven by an ancestor/host [dbxColor])
88
+ // over surface-bright, so the card reads as raised by color and not a flat grey. The 4px frame
89
+ // uses the same surface so the card stays one continuous tone. Override
90
+ // --dbx-form-repeat-array-field-elevate-bg to replace the surface outright, or
91
+ // --dbx-form-repeat-array-field-elevate-tone (percentage) to tune the wash strength.
92
+ position: relative; // containing block for the absolutely-positioned index chip
93
+ 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)));
94
+ 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
95
  }
54
96
 
55
97
  .dbx-form-repeat-array-drag-button.mdc-button > .mat-icon {
@@ -48,14 +48,18 @@ $dbx-forge-form-field-slider-thumb-margin: 22px;
48
48
  width: calc(100% - #{$dbx-forge-form-field-slider-thumb-margin * 2}) !important;
49
49
  }
50
50
 
51
- // List selection field inside the form-field wrapper: reduce padding so the list
52
- // items render at full width within the outlined border. Uses !important to
53
- // override the component's scoped inline styles (ViewEncapsulation.Emulated
54
- // adds attribute selectors that raise specificity above global rules).
51
+ // List selection field inside the form-field wrapper: inset the list from the
52
+ // outlined border on the sides so the card-styled items (12px corner radius)
53
+ // don't clip the rounded outline. The bottom keeps a 1px inset so the scrolled
54
+ // list background doesn't bleed over the lower border, and the top keeps the
55
+ // wrapper's default 16px gap below the notch label. Tune the side inset via
56
+ // --dbx-forge-list-item-field-inline-padding. Uses !important to override the
57
+ // component's scoped inline styles (ViewEncapsulation.Emulated adds attribute
58
+ // selectors that raise specificity above global rules).
55
59
  dbx-forge-form-field-wrapper .dbx-forge-form-field-content:has(dbx-forge-list-selection-field) {
56
- padding-left: 0 !important;
57
- padding-right: 0 !important;
58
- padding-bottom: 0 !important;
60
+ padding-left: var(--dbx-forge-list-item-field-inline-padding, var(--dbx-padding-3)) !important;
61
+ padding-right: var(--dbx-forge-list-item-field-inline-padding, var(--dbx-padding-3)) !important;
62
+ padding-bottom: 1px !important;
59
63
  }
60
64
 
61
65
  // Boolean fields (mat-checkbox / mat-slide-toggle): make the whole content
@@ -121,8 +125,17 @@ $dbx-forge-form-field-slider-thumb-margin: 22px;
121
125
  }
122
126
 
123
127
  .dbx-form-repeat-array-field {
124
- .dbx-form-repeat-array-bar .dbx-chip {
125
- margin-right: 3px;
128
+ // Per-item index number: render it as a compact, centered badge — a circle for a single digit,
129
+ // a pill once it spills to double digits. The chip is a direct child of the field div (placed
130
+ // before the bar so it overlays the top-left corner via `position: absolute`). Size via
131
+ // --dbx-form-repeat-array-index-size.
132
+ > .dbx-chip {
133
+ box-sizing: border-box;
134
+ min-width: var(--dbx-form-repeat-array-index-size, 22px);
135
+ min-height: var(--dbx-form-repeat-array-index-size, 22px);
136
+ padding: 0 6px;
137
+ justify-content: center;
138
+ border-radius: var(--mat-sys-corner-full, 999px);
126
139
  }
127
140
  }
128
141
  }
@@ -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.21.0",
3
+ "version": "13.23.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.21.0",
18
- "@dereekb/dbx-core": "13.21.0",
19
- "@dereekb/dbx-web": "13.21.0",
20
- "@dereekb/model": "13.21.0",
21
- "@dereekb/rxjs": "13.21.0",
22
- "@dereekb/util": "13.21.0",
23
- "@dereekb/vitest": "13.21.0",
17
+ "@dereekb/date": "13.23.0",
18
+ "@dereekb/dbx-core": "13.23.0",
19
+ "@dereekb/dbx-web": "13.23.0",
20
+ "@dereekb/model": "13.23.0",
21
+ "@dereekb/rxjs": "13.23.0",
22
+ "@dereekb/util": "13.23.0",
23
+ "@dereekb/vitest": "13.23.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",