@dereekb/dbx-form 13.10.0 → 13.10.2

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.
Files changed (25) hide show
  1. package/fesm2022/dereekb-dbx-form-calendar.mjs +60 -60
  2. package/fesm2022/dereekb-dbx-form-calendar.mjs.map +1 -1
  3. package/fesm2022/{dereekb-dbx-form-expand.field.component-Bp5_uO1A.mjs → dereekb-dbx-form-expand.field.component-C-U67kCE.mjs} +4 -4
  4. package/fesm2022/{dereekb-dbx-form-expand.field.component-Bp5_uO1A.mjs.map → dereekb-dbx-form-expand.field.component-C-U67kCE.mjs.map} +1 -1
  5. package/fesm2022/{dereekb-dbx-form-flex.wrapper.component-CpOHCk87.mjs → dereekb-dbx-form-flex.wrapper.component-DIDKGVO5.mjs} +4 -4
  6. package/fesm2022/{dereekb-dbx-form-flex.wrapper.component-CpOHCk87.mjs.map → dereekb-dbx-form-flex.wrapper.component-DIDKGVO5.mjs.map} +1 -1
  7. package/fesm2022/{dereekb-dbx-form-info.field.component-B0cFprvc.mjs → dereekb-dbx-form-info.field.component-CfUse-zd.mjs} +4 -4
  8. package/fesm2022/{dereekb-dbx-form-info.field.component-B0cFprvc.mjs.map → dereekb-dbx-form-info.field.component-CfUse-zd.mjs.map} +1 -1
  9. package/fesm2022/{dereekb-dbx-form-info.wrapper.component-18n632L-.mjs → dereekb-dbx-form-info.wrapper.component-BdtiodXl.mjs} +4 -4
  10. package/fesm2022/{dereekb-dbx-form-info.wrapper.component-18n632L-.mjs.map → dereekb-dbx-form-info.wrapper.component-BdtiodXl.mjs.map} +1 -1
  11. package/fesm2022/dereekb-dbx-form-mapbox.mjs +30 -30
  12. package/fesm2022/dereekb-dbx-form-mapbox.mjs.map +1 -1
  13. package/fesm2022/dereekb-dbx-form-quiz.mjs +28 -28
  14. package/fesm2022/dereekb-dbx-form-quiz.mjs.map +1 -1
  15. package/fesm2022/{dereekb-dbx-form-section.wrapper.component-vq21oG6v.mjs → dereekb-dbx-form-section.wrapper.component-6BCFOu3o.mjs} +4 -4
  16. package/fesm2022/{dereekb-dbx-form-section.wrapper.component-vq21oG6v.mjs.map → dereekb-dbx-form-section.wrapper.component-6BCFOu3o.mjs.map} +1 -1
  17. package/fesm2022/{dereekb-dbx-form-style.wrapper.component-BbKj-IHD.mjs → dereekb-dbx-form-style.wrapper.component-BJs4BnH0.mjs} +4 -4
  18. package/fesm2022/{dereekb-dbx-form-style.wrapper.component-BbKj-IHD.mjs.map → dereekb-dbx-form-style.wrapper.component-BJs4BnH0.mjs.map} +1 -1
  19. package/fesm2022/dereekb-dbx-form.mjs +745 -536
  20. package/fesm2022/dereekb-dbx-form.mjs.map +1 -1
  21. package/lib/forge/field/wrapper/_wrapper.scss +51 -4
  22. package/lib/forge/preset/_preset.scss +66 -10
  23. package/lib/form/_form.scss +1 -57
  24. package/package.json +26 -25
  25. package/types/dereekb-dbx-form.d.ts +228 -145
@@ -46,16 +46,63 @@ $dbx-forge-form-field-slider-thumb-margin: 22px;
46
46
  letter-spacing: normal;
47
47
  }
48
48
 
49
+ // Boolean fields (mat-checkbox / mat-slide-toggle): make the whole content
50
+ // box clickable. Stretches the Material `<label for="...">` to fill the
51
+ // rectangle so native HTML label-click delegation toggles the control on
52
+ // any click in the box. No overlay and no positioning resets, so MDC
53
+ // ripple and focus indicator stay anchored where Material expects.
54
+ //
55
+ // Disabled state already applies `pointer-events: none` on
56
+ // `.dbx-forge-form-field-content` (see formfield.wrapper.component.ts),
57
+ // so disabled clicks remain blocked.
58
+ dbx-forge-form-field-wrapper .dbx-forge-form-field-content:has(mat-checkbox),
59
+ dbx-forge-form-field-wrapper .dbx-forge-form-field-content:has(mat-slide-toggle) {
60
+ cursor: pointer;
61
+
62
+ mat-checkbox,
63
+ mat-slide-toggle {
64
+ display: block;
65
+ width: 100%;
66
+ }
67
+
68
+ .mdc-form-field {
69
+ display: flex;
70
+ width: 100%;
71
+ align-items: center;
72
+ }
73
+
74
+ // Negative margins cancel the wrapper's 16/16/8 padding so the label's
75
+ // hit-area reaches the outlined edges; matching padding restores visual
76
+ // spacing for the label text itself. Padding-left/inline-start is left
77
+ // alone so Material's gap between the control and the label text is
78
+ // preserved.
79
+ .mdc-form-field > label {
80
+ flex: 1 1 auto;
81
+ align-self: stretch;
82
+ display: flex;
83
+ align-items: center;
84
+ margin: -16px -16px -8px 0;
85
+ padding-top: 16px;
86
+ padding-right: 16px;
87
+ padding-bottom: 8px;
88
+ cursor: pointer;
89
+ min-height: 0;
90
+ }
91
+ }
92
+
49
93
  // Shared working bar spacing used by both the working field and working wrapper field.
50
94
  .dbx-forge-working-bar {
51
95
  margin-top: 4px;
52
96
  }
53
97
 
54
98
  // Flex layout wrapper: ng-forge's GroupFieldComponent applies `display: grid`
55
- // and `gap: var(--df-grid-row-gap)` via :host styling (scoped attribute selector).
56
- // Override both when our `dbx-flex-group` class is present so the flex sizing
57
- // classes work. The dbx-flex-N children use padding for spacing instead of gap.
58
- .df-group.dbx-flex-group {
99
+ // and `gap: var(--df-grid-row-gap)` via :host styling, and ContainerFieldComponent
100
+ // applies `display: block`. Both are scoped via attribute selectors and tie
101
+ // class-selector specificity, so override with `!important` whenever our
102
+ // `dbx-flex-group` class is present so the flex sizing classes work.
103
+ // The dbx-flex-N children use padding for spacing instead of gap.
104
+ .df-group.dbx-flex-group,
105
+ .df-container.dbx-flex-group {
59
106
  display: flex !important;
60
107
  flex-wrap: wrap;
61
108
  gap: 0 !important;
@@ -21,6 +21,7 @@
21
21
  width: 100%;
22
22
  }
23
23
 
24
+ // df-mat-input / mat-form-field rendering (e.g. dbx-form-search-form's text input)
24
25
  .mat-mdc-form-field > .mat-mdc-text-field-wrapper {
25
26
  padding: 0;
26
27
 
@@ -36,23 +37,78 @@
36
37
  @include theming.hide-mdc-notched-outline-border;
37
38
  }
38
39
  }
39
- }
40
40
 
41
- .dbx-section-page-header-search-bar-with-bottom-bar .mat-mdc-form-field > .mat-mdc-text-field-wrapper {
42
- > .mat-mdc-form-field-flex > .mdc-notched-outline {
43
- .mdc-notched-outline__notch,
44
- .mdc-notched-outline__trailing {
45
- border-bottom: var(--mdc-outlined-text-field-outline-width) solid;
46
- border-radius: 0;
41
+ .mat-mdc-form-field-subscript-wrapper {
42
+ display: none;
43
+ }
44
+
45
+ // dbx-forge-form-field-wrapper rendering (e.g. boolean fields)
46
+ dbx-forge-form-field-wrapper {
47
+ > .dbx-forge-form-field-wrapper {
48
+ margin-top: 0;
49
+
50
+ > .dbx-forge-form-field-outline {
51
+ .dbx-forge-form-field-outline-leading {
52
+ display: none;
53
+ }
54
+
55
+ .dbx-forge-form-field-outline-leading,
56
+ .dbx-forge-form-field-outline-notch,
57
+ .dbx-forge-form-field-outline-trailing {
58
+ border: 0;
59
+ }
60
+ }
61
+
62
+ .dbx-forge-form-field-outline-label {
63
+ margin-left: -4px; // align with the input
64
+ }
65
+
66
+ .dbx-forge-form-field-content {
67
+ padding: 0;
68
+ }
47
69
  }
48
70
  }
71
+ }
49
72
 
50
- &:hover,
51
- &.mdc-text-field--focused {
73
+ .dbx-section-page-header-search-bar-with-bottom-bar {
74
+ // df-mat-input / mat-form-field rendering
75
+ .mat-mdc-form-field > .mat-mdc-text-field-wrapper {
52
76
  > .mat-mdc-form-field-flex > .mdc-notched-outline {
53
77
  .mdc-notched-outline__notch,
54
78
  .mdc-notched-outline__trailing {
55
- border-bottom: var(--mdc-outlined-text-field-focus-outline-width) solid;
79
+ border-bottom: var(--mdc-outlined-text-field-outline-width) solid;
80
+ border-radius: 0;
81
+ }
82
+ }
83
+
84
+ &:hover,
85
+ &.mdc-text-field--focused {
86
+ > .mat-mdc-form-field-flex > .mdc-notched-outline {
87
+ .mdc-notched-outline__notch,
88
+ .mdc-notched-outline__trailing {
89
+ border-bottom-width: var(--mdc-outlined-text-field-focus-outline-width);
90
+ }
91
+ }
92
+ }
93
+ }
94
+
95
+ // dbx-forge-form-field-wrapper rendering
96
+ dbx-forge-form-field-wrapper > .dbx-forge-form-field-wrapper {
97
+ > .dbx-forge-form-field-outline {
98
+ .dbx-forge-form-field-outline-notch,
99
+ .dbx-forge-form-field-outline-trailing {
100
+ border-bottom: var(--mdc-outlined-text-field-outline-width) solid;
101
+ border-radius: 0;
102
+ }
103
+ }
104
+
105
+ &:hover,
106
+ &:focus-within {
107
+ > .dbx-forge-form-field-outline {
108
+ .dbx-forge-form-field-outline-notch,
109
+ .dbx-forge-form-field-outline-trailing {
110
+ border-bottom-width: var(--mdc-outlined-text-field-focus-outline-width);
111
+ }
56
112
  }
57
113
  }
58
114
  }
@@ -4,61 +4,6 @@
4
4
 
5
5
  // MARK: Mixin
6
6
  @mixin core() {
7
- // Forge styled box: outlined box around fields that don't use mat-form-field (checkbox, toggle, slider).
8
- // Mirrors the Material outlined form-field appearance (border-radius, padding, min-height, hint styling).
9
- .dbx-forge-styled-box {
10
- mat-checkbox,
11
- mat-slide-toggle {
12
- border: 1px solid var(--mdc-outlined-text-field-outline-color, var(--mat-sys-outline, rgba(0, 0, 0, 0.38)));
13
- border-radius: var(--mdc-outlined-text-field-container-shape, 8px);
14
- padding: 0 16px;
15
- display: block;
16
-
17
- &:hover {
18
- border-color: var(--mdc-outlined-text-field-hover-outline-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));
19
- }
20
- }
21
-
22
- mat-checkbox,
23
- mat-slide-toggle {
24
- .mdc-form-field {
25
- width: 100%;
26
-
27
- .mdc-label {
28
- user-select: none;
29
- width: 100%;
30
- min-height: 56px;
31
- display: inline-flex;
32
- align-items: center;
33
- padding-top: 6px;
34
- padding-bottom: 6px;
35
- }
36
- }
37
- }
38
-
39
- // Style the hint to match Material's .mat-mdc-form-field-subscript-wrapper / .mat-mdc-form-field-bottom-align / .mat-mdc-form-field-hint-wrapper.
40
- // We can't add those classes directly since ng-forge renders the element, so we mirror their styles.
41
- .mat-hint {
42
- display: block;
43
- padding: 0 16px;
44
- -moz-osx-font-smoothing: grayscale;
45
- -webkit-font-smoothing: antialiased;
46
- font-family: var(--mat-form-field-subscript-text-font, var(--mat-sys-body-small-font));
47
- line-height: var(--mat-form-field-subscript-text-line-height, var(--mat-sys-body-small-line-height));
48
- font-size: var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size));
49
- letter-spacing: var(--mat-form-field-subscript-text-tracking, var(--mat-sys-body-small-tracking));
50
- font-weight: var(--mat-form-field-subscript-text-weight, var(--mat-sys-body-small-weight));
51
- color: var(--mat-form-field-subscript-text-color, var(--mat-sys-on-surface-variant, rgba(0, 0, 0, 0.6)));
52
-
53
- // Matches .mat-mdc-form-field-bottom-align::before spacing
54
- &::before {
55
- content: '';
56
- display: inline-block;
57
- height: 16px;
58
- }
59
- }
60
- }
61
-
62
7
  // Generic forge disabled class for fields that only need CSS-based disabling.
63
8
  .dbx-forge-disabled {
64
9
  opacity: 0.38;
@@ -88,8 +33,7 @@
88
33
  }
89
34
 
90
35
  // Reduce opacity on form fields to indicate disabled state
91
- .mat-mdc-form-field,
92
- .dbx-forge-styled-box {
36
+ .mat-mdc-form-field {
93
37
  opacity: 0.38;
94
38
  }
95
39
 
package/package.json CHANGED
@@ -1,38 +1,38 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-form",
3
- "version": "13.10.0",
3
+ "version": "13.10.2",
4
4
  "peerDependencies": {
5
- "@angular/cdk": "^21.2.3",
6
- "@angular/common": "21.2.4",
7
- "@angular/core": "21.2.4",
8
- "@angular/forms": "21.2.4",
9
- "@angular/material": "^21.2.3",
10
- "@angular/material-date-fns-adapter": "21.2.3",
11
- "@angular/platform-browser": "21.2.4",
5
+ "@angular/cdk": "^21.2.8",
6
+ "@angular/common": "21.2.10",
7
+ "@angular/core": "21.2.10",
8
+ "@angular/forms": "21.2.10",
9
+ "@angular/material": "^21.2.8",
10
+ "@angular/material-date-fns-adapter": "21.2.8",
11
+ "@angular/platform-browser": "21.2.10",
12
12
  "@bobbyquantum/ngx-editor": "21.0.0",
13
- "@dereekb/date": "13.10.0",
14
- "@dereekb/dbx-core": "13.10.0",
15
- "@dereekb/dbx-web": "13.10.0",
16
- "@dereekb/model": "13.10.0",
17
- "@dereekb/rxjs": "13.10.0",
18
- "@dereekb/util": "13.10.0",
19
- "@dereekb/vitest": "13.10.0",
20
- "@ng-forge/dynamic-forms": "0.8.0-next.2",
21
- "@ng-forge/dynamic-forms-material": "0.8.0-next.2",
22
- "@ng-web-apis/geolocation": "^5.1.0",
13
+ "@dereekb/date": "13.10.2",
14
+ "@dereekb/dbx-core": "13.10.2",
15
+ "@dereekb/dbx-web": "13.10.2",
16
+ "@dereekb/model": "13.10.2",
17
+ "@dereekb/rxjs": "13.10.2",
18
+ "@dereekb/util": "13.10.2",
19
+ "@dereekb/vitest": "13.10.2",
20
+ "@ng-forge/dynamic-forms": "git+https://git@github.com/dereekb/ng-forge#e3059f8881fb39b1b1d279cd89486469dbad226d",
21
+ "@ng-forge/dynamic-forms-material": "0.8.0-next.4",
22
+ "@ng-web-apis/geolocation": "^5.2.0",
23
23
  "@ngbracket/ngx-layout": "^21.0.0",
24
- "@ngrx/component-store": "^21.0.0",
24
+ "@ngrx/component-store": "^21.1.0",
25
25
  "@ngx-formly/core": "git+https://git@github.com/dereekb/ngx-formly#996d1041c8d2afbe429985a5ad394e59327bfa1d",
26
26
  "@ngx-formly/material": "git+https://git@github.com/dereekb/ngx-formly#02e615006744374a587b5d35de3b2d137e2e05a8",
27
27
  "@uirouter/core": "^6.1.2",
28
- "angular-calendar": "^0.32.1",
28
+ "angular-calendar": "^0.32.2",
29
29
  "change-case-all": "^2.1.0",
30
- "date-fns": "^4.0.0",
31
- "mapbox-gl": "^3.10.0",
30
+ "date-fns": "^4.1.0",
31
+ "mapbox-gl": "^3.22.0",
32
32
  "ng-overlay-container": "^21.0.1",
33
33
  "ngx-mapbox-gl": "git+https://git@github.com/dereekb/ngx-mapbox-gl#3f1d25b0661bc48abbd415dc79ca7f66568bae2e",
34
- "ngx-mat-input-tel": "^21.0.0",
35
- "rxjs": "^7.8.0"
34
+ "ngx-mat-input-tel": "^21.4.1",
35
+ "rxjs": "^7.8.2"
36
36
  },
37
37
  "dependencies": {
38
38
  "tslib": "^2.3.0"
@@ -61,5 +61,6 @@
61
61
  },
62
62
  "module": "fesm2022/dereekb-dbx-form.mjs",
63
63
  "typings": "types/dereekb-dbx-form.d.ts",
64
- "sideEffects": false
64
+ "sideEffects": false,
65
+ "type": "module"
65
66
  }