@bravura/ui 9.0.4 → 9.0.6

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,8 +1,16 @@
1
1
  # Change history
2
2
 
3
+ ## <small>9.0.6 (2026-07-15)</small>
4
+
5
+ * fix(form-field): export as standalone ([a058e55](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/a058e55))
6
+
7
+ ## <small>9.0.5 (2026-07-15)</small>
8
+
9
+ - fix(form-field): export styles ([d00217b](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/d00217b))
10
+
3
11
  ## <small>9.0.4 (2026-07-15)</small>
4
12
 
5
- * fix(decimal-input): allow decimal input used as attribute ([0fc85fe](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/0fc85fe))
13
+ - fix(decimal-input): allow decimal input used as attribute ([0fc85fe](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/0fc85fe))
6
14
 
7
15
  ## <small>9.0.3 (2026-07-14)</small>
8
16
 
package/_index.scss CHANGED
@@ -1,5 +1,6 @@
1
- @forward './theme/ui-theme' show theme, all-component-colors;
2
- @forward './stepper/stepper-theme' as stepper-* show stepper-color, stepper-theme;
3
- @forward './radio-panel/radio-panel-theme' as radio-panel-* show radio-panel-color, radio-panel-theme;
4
- @forward './selection-panel/selection-panel-theme' as selection-panel-* show selection-panel-color,
5
- selection-panel-theme;
1
+ @forward './theme/ui-theme' show theme, all-component-colors;
2
+ @forward './stepper/stepper-theme' as stepper-* show stepper-color, stepper-theme;
3
+ @forward './radio-panel/radio-panel-theme' as radio-panel-* show radio-panel-color, radio-panel-theme;
4
+ @forward './selection-panel/selection-panel-theme' as selection-panel-* show selection-panel-color,
5
+ selection-panel-theme;
6
+ @forward './form-field/form-field-theme';
@@ -1,35 +1,22 @@
1
1
  import { ObserversModule } from '@angular/cdk/observers';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { InjectionToken, ChangeDetectionStrategy, ViewEncapsulation, Component, Input, Host, Inject, Directive, NgModule } from '@angular/core';
4
+ import { InjectionToken, Input, Host, Inject, Directive, NgModule } from '@angular/core';
5
5
  import * as i1 from '@angular/material/form-field';
6
- import { MatFormField, MatFormFieldModule } from '@angular/material/form-field';
6
+ import { MatFormField } from '@angular/material/form-field';
7
7
 
8
8
  const BUI_FORM_FIELD_CONFIG = new InjectionToken('@bravura/ui/buiFormFieldConfig', {
9
9
  factory: () => ({ appearance: 'fill' }),
10
10
  providedIn: 'root'
11
11
  });
12
- /**
13
- * Container for form controls that applies Material Design styling and behavior.
14
- *
15
- * This component extends Angular Material's [mat-form-field](https://material.angular.io/components/form-field) and provides two additional appearances
16
- * `bound` and `detach`. `bound` renders the label outside the outlined area of the field, while `detach` remove the borders all together. `detach`
17
- * is generally used with form controls that render their own borders.
18
- *
19
- * ** IMPORTANT NOTICE **
20
- *
21
- * From version 3.0 onward, the selector `bui-form-field` is deprecated and will be removed in later releases. You no longer need to use this tag name
22
- * for the new appearances. As long as you import the `NgModule` from this package, the new appearances will be supported by Material's `mat-form-field`
23
- * component.
24
- */
25
- class FormFieldComponent extends MatFormField {
26
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FormFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
27
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: FormFieldComponent, isStandalone: false, selector: "bui-dummy-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, styles: [".bui-form-field-bound,.bui-form-field-detach{padding-top:24px;--mat-mdc-form-field-floating-label-scale: 1 !important;--mat-mdc-form-field-floating-label-translate-y: -3.3rem}.bui-form-field-bound .mdc-floating-label,.bui-form-field-detach .mdc-floating-label{--mat-mdc-form-field-label-transform: translateY(var(--mat-mdc-form-field-floating-label-translate-y)) translateX(-4px) scale(var(--mat-mdc-form-field-floating-label-scale, .75)) !important}[dir=rtl] .bui-form-field-bound .mdc-floating-label,[dir=rtl] .bui-form-field-detach .mdc-floating-label{--mat-mdc-form-field-label-transform: translateY(var(--mat-mdc-form-field-floating-label-translate-y)) translateX(4px) scale(var(--mat-mdc-form-field-floating-label-scale, .75)) !important}.bui-form-field-bound .mdc-floating-label,.bui-form-field-detach .mdc-floating-label{transition:none!important}.bui-form-field-bound .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix,.bui-form-field-detach .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{display:flex;flex-direction:column;justify-content:center;align-self:stretch}.bui-form-field-bound.mat-focused{--mat-mdc-form-field-floating-label-translate-y: calc(-3.3rem - 1px) }.bui-form-field-bound .mat-mdc-form-field-hint-wrapper,.bui-form-field-bound .mat-mdc-form-field-error-wrapper{padding-left:initial;padding-inline-start:4px}.bui-form-field-bound .mat-mdc-form-field-infix{min-height:48px}.bui-form-field-bound .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:8px;padding-bottom:8px}.bui-form-field-bound .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:4px}.bui-form-field-bound .mdc-notched-outline--notched .mdc-notched-outline__notch{border-top-width:1px;border-top-style:solid}.bui-form-field-bound .mdc-text-field--focused .mdc-notched-outline--notched .mdc-notched-outline__notch{border-top-width:2px}.bui-form-field-bound .mat-mdc-form-field-icon-prefix>.mat-icon{padding:0 6px 0 12px}.bui-form-field-bound .mat-mdc-form-field-icon-prefix>span,.bui-form-field-bound .mat-mdc-form-field-icon-prefix>div{padding-inline-start:6px}.bui-form-field-bound .mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px 0 6px}.bui-form-field-bound .mat-mdc-form-field-icon-suffix>span,.bui-form-field-bound .mat-mdc-form-field-icon-suffix>div{padding-inline-end:6px}.bui-form-field-detach .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:0;padding-bottom:0}.bui-form-field-detach .mat-mdc-form-field-hint-wrapper,.bui-form-field-detach .mat-mdc-form-field-error-wrapper{padding-inline-start:0}.bui-form-field-detach .mat-mdc-form-field-infix{min-height:40px}.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{border:none!important}.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:0}.bui-form-field-detach .mat-mdc-text-field-wrapper.mdc-text-field--outlined{padding-inline-start:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
12
+ function provideFormFieldConfig(config) {
13
+ const conf = { ...config };
14
+ conf.appearance = conf.appearance || 'fill';
15
+ return {
16
+ provide: BUI_FORM_FIELD_CONFIG,
17
+ useValue: conf
18
+ };
28
19
  }
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FormFieldComponent, decorators: [{
30
- type: Component,
31
- args: [{ selector: 'bui-dummy-component', template: ``, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, styles: [".bui-form-field-bound,.bui-form-field-detach{padding-top:24px;--mat-mdc-form-field-floating-label-scale: 1 !important;--mat-mdc-form-field-floating-label-translate-y: -3.3rem}.bui-form-field-bound .mdc-floating-label,.bui-form-field-detach .mdc-floating-label{--mat-mdc-form-field-label-transform: translateY(var(--mat-mdc-form-field-floating-label-translate-y)) translateX(-4px) scale(var(--mat-mdc-form-field-floating-label-scale, .75)) !important}[dir=rtl] .bui-form-field-bound .mdc-floating-label,[dir=rtl] .bui-form-field-detach .mdc-floating-label{--mat-mdc-form-field-label-transform: translateY(var(--mat-mdc-form-field-floating-label-translate-y)) translateX(4px) scale(var(--mat-mdc-form-field-floating-label-scale, .75)) !important}.bui-form-field-bound .mdc-floating-label,.bui-form-field-detach .mdc-floating-label{transition:none!important}.bui-form-field-bound .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix,.bui-form-field-detach .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{display:flex;flex-direction:column;justify-content:center;align-self:stretch}.bui-form-field-bound.mat-focused{--mat-mdc-form-field-floating-label-translate-y: calc(-3.3rem - 1px) }.bui-form-field-bound .mat-mdc-form-field-hint-wrapper,.bui-form-field-bound .mat-mdc-form-field-error-wrapper{padding-left:initial;padding-inline-start:4px}.bui-form-field-bound .mat-mdc-form-field-infix{min-height:48px}.bui-form-field-bound .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:8px;padding-bottom:8px}.bui-form-field-bound .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:4px}.bui-form-field-bound .mdc-notched-outline--notched .mdc-notched-outline__notch{border-top-width:1px;border-top-style:solid}.bui-form-field-bound .mdc-text-field--focused .mdc-notched-outline--notched .mdc-notched-outline__notch{border-top-width:2px}.bui-form-field-bound .mat-mdc-form-field-icon-prefix>.mat-icon{padding:0 6px 0 12px}.bui-form-field-bound .mat-mdc-form-field-icon-prefix>span,.bui-form-field-bound .mat-mdc-form-field-icon-prefix>div{padding-inline-start:6px}.bui-form-field-bound .mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px 0 6px}.bui-form-field-bound .mat-mdc-form-field-icon-suffix>span,.bui-form-field-bound .mat-mdc-form-field-icon-suffix>div{padding-inline-end:6px}.bui-form-field-detach .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:0;padding-bottom:0}.bui-form-field-detach .mat-mdc-form-field-hint-wrapper,.bui-form-field-detach .mat-mdc-form-field-error-wrapper{padding-inline-start:0}.bui-form-field-detach .mat-mdc-form-field-infix{min-height:40px}.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{border:none!important}.bui-form-field-detach .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:0}.bui-form-field-detach .mat-mdc-text-field-wrapper.mdc-text-field--outlined{padding-inline-start:0}\n"] }]
32
- }] });
33
20
  /**
34
21
  * @ignore
35
22
  */
@@ -58,7 +45,7 @@ class FormFieldStyleDirective {
58
45
  this.appearance = config.appearance;
59
46
  }
60
47
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FormFieldStyleDirective, deps: [{ token: i1.MatFormField, host: true }, { token: i0.ElementRef }, { token: BUI_FORM_FIELD_CONFIG }], target: i0.ɵɵFactoryTarget.Directive }); }
61
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: FormFieldStyleDirective, isStandalone: false, selector: "bui-form-field, mat-form-field", inputs: { appearance: "appearance" }, host: { classAttribute: "bui-host" }, ngImport: i0 }); }
48
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: FormFieldStyleDirective, isStandalone: true, selector: "bui-form-field, mat-form-field", inputs: { appearance: "appearance" }, host: { classAttribute: "bui-host" }, ngImport: i0 }); }
62
49
  }
63
50
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FormFieldStyleDirective, decorators: [{
64
51
  type: Directive,
@@ -66,8 +53,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
66
53
  selector: 'bui-form-field, mat-form-field',
67
54
  host: {
68
55
  class: 'bui-host'
69
- },
70
- standalone: false
56
+ }
71
57
  }]
72
58
  }], ctorParameters: () => [{ type: i1.MatFormField, decorators: [{
73
59
  type: Host
@@ -78,8 +64,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
78
64
  type: Input
79
65
  }] } });
80
66
  const matFormFieldRef = MatFormField.ɵcmp;
81
- const formFieldRef = FormFieldComponent.ɵcmp;
82
- matFormFieldRef.styles.push(...formFieldRef.styles);
83
67
  matFormFieldRef.selectors.push(['bui-form-field']);
84
68
  delete matFormFieldRef.inputs.appearance;
85
69
  delete matFormFieldRef.declaredInputs.appearance;
@@ -99,15 +83,14 @@ class FormFieldModule {
99
83
  };
100
84
  }
101
85
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
102
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.6", ngImport: i0, type: FormFieldModule, declarations: [FormFieldComponent, FormFieldStyleDirective], imports: [CommonModule, MatFormFieldModule, ObserversModule], exports: [FormFieldComponent, FormFieldStyleDirective, MatFormFieldModule] }); }
103
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FormFieldModule, imports: [CommonModule, MatFormFieldModule, ObserversModule, MatFormFieldModule] }); }
86
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.6", ngImport: i0, type: FormFieldModule, imports: [CommonModule, ObserversModule, FormFieldStyleDirective], exports: [FormFieldStyleDirective] }); }
87
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FormFieldModule, imports: [CommonModule, ObserversModule] }); }
104
88
  }
105
89
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FormFieldModule, decorators: [{
106
90
  type: NgModule,
107
91
  args: [{
108
- declarations: [FormFieldComponent, FormFieldStyleDirective],
109
- imports: [CommonModule, MatFormFieldModule, ObserversModule],
110
- exports: [FormFieldComponent, FormFieldStyleDirective, MatFormFieldModule]
92
+ imports: [CommonModule, ObserversModule, FormFieldStyleDirective],
93
+ exports: [FormFieldStyleDirective]
111
94
  }]
112
95
  }] });
113
96
 
@@ -115,5 +98,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
115
98
  * Generated bundle index. Do not edit.
116
99
  */
117
100
 
118
- export { FormFieldComponent, FormFieldModule, FormFieldStyleDirective };
101
+ export { FormFieldModule, FormFieldStyleDirective, provideFormFieldConfig };
119
102
  //# sourceMappingURL=bravura-ui-form-field.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"bravura-ui-form-field.mjs","sources":["../../../projects/ui/form-field/form-field.component.ts","../../../projects/ui/form-field/form-field.module.ts","../../../projects/ui/form-field/bravura-ui-form-field.ts"],"sourcesContent":["import {\r\n\tChangeDetectionStrategy,\r\n\tComponent,\r\n\tDirective,\r\n\tElementRef,\r\n\tHost,\r\n\tInject,\r\n\tInjectionToken,\r\n\tInput,\r\n\tViewEncapsulation\r\n} from '@angular/core';\r\nimport { MatFormField } from '@angular/material/form-field';\r\n\r\nexport interface BuiFormFieldConfig {\r\n\tappearance?: 'fill' | 'outline' | 'bound';\r\n}\r\n\r\nexport const BUI_FORM_FIELD_CONFIG = new InjectionToken<BuiFormFieldConfig>('@bravura/ui/buiFormFieldConfig', {\r\n\tfactory: () => ({ appearance: 'fill' }),\r\n\tprovidedIn: 'root'\r\n});\r\n/**\r\n * Container for form controls that applies Material Design styling and behavior.\r\n *\r\n * This component extends Angular Material's [mat-form-field](https://material.angular.io/components/form-field) and provides two additional appearances\r\n * `bound` and `detach`. `bound` renders the label outside the outlined area of the field, while `detach` remove the borders all together. `detach`\r\n * is generally used with form controls that render their own borders.\r\n *\r\n * ** IMPORTANT NOTICE **\r\n *\r\n * From version 3.0 onward, the selector `bui-form-field` is deprecated and will be removed in later releases. You no longer need to use this tag name\r\n * for the new appearances. As long as you import the `NgModule` from this package, the new appearances will be supported by Material's `mat-form-field`\r\n * component.\r\n */\r\n@Component({\r\n\tselector: 'bui-dummy-component',\r\n\ttemplate: ``,\r\n\tstyleUrls: ['./form-field.component.scss'],\r\n\tencapsulation: ViewEncapsulation.None,\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\r\n\tstandalone: false\r\n})\r\nexport class FormFieldComponent extends MatFormField {}\r\n\r\n/**\r\n * @ignore\r\n */\r\n@Directive({\r\n\tselector: 'bui-form-field, mat-form-field',\r\n\thost: {\r\n\t\tclass: 'bui-host'\r\n\t},\r\n\tstandalone: false\r\n})\r\nexport class FormFieldStyleDirective {\r\n\tprivate _appearance: any;\r\n\tprivate _flowDetection: any;\r\n\r\n\t/** The form field appearance style. */\r\n\t@Input()\r\n\tget appearance(): any {\r\n\t\treturn this._appearance;\r\n\t}\r\n\tset appearance(value: any) {\r\n\t\tthis._appearance = value;\r\n\t\tthis.elemRef.nativeElement.classList.remove('bui-form-field-bound', 'bui-form-field-detach');\r\n\t\tif (['bound', 'detach'].includes(this._appearance)) {\r\n\t\t\tthis.matFormField.appearance = 'outline';\r\n\t\t\tthis.elemRef.nativeElement.classList.add(`bui-form-field-${value}`);\r\n\t\t\tthis.matFormField._shouldAlwaysFloat = () => true;\r\n\t\t} else {\r\n\t\t\tthis.matFormField.appearance = ['outline', 'fill'].includes(this._appearance) ? this._appearance : undefined;\r\n\t\t\tthis.matFormField._shouldAlwaysFloat = this._flowDetection;\r\n\t\t}\r\n\t}\r\n\r\n\tconstructor(\r\n\t\t@Host() private matFormField: MatFormField,\r\n\t\tprivate elemRef: ElementRef<HTMLElement>,\r\n\t\t@Inject(BUI_FORM_FIELD_CONFIG) config: BuiFormFieldConfig\r\n\t) {\r\n\t\tthis._flowDetection = matFormField._shouldAlwaysFloat;\r\n\t\tthis.appearance = config.appearance;\r\n\t}\r\n}\r\n\r\nconst matFormFieldRef: any = MatFormField.ɵcmp;\r\nconst formFieldRef: any = FormFieldComponent.ɵcmp;\r\n\r\nmatFormFieldRef.styles.push(...formFieldRef.styles);\r\nmatFormFieldRef.selectors.push(['bui-form-field']);\r\ndelete matFormFieldRef.inputs.appearance;\r\ndelete matFormFieldRef.declaredInputs.appearance;\r\n","import { ObserversModule } from '@angular/cdk/observers';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ModuleWithProviders, NgModule } from '@angular/core';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport {\r\n\tBuiFormFieldConfig,\r\n\tBUI_FORM_FIELD_CONFIG,\r\n\tFormFieldComponent,\r\n\tFormFieldStyleDirective\r\n} from './form-field.component';\r\n\r\n@NgModule({\r\n\tdeclarations: [FormFieldComponent, FormFieldStyleDirective],\r\n\timports: [CommonModule, MatFormFieldModule, ObserversModule],\r\n\texports: [FormFieldComponent, FormFieldStyleDirective, MatFormFieldModule]\r\n})\r\nexport class FormFieldModule {\r\n\tstatic forConfig(config: BuiFormFieldConfig): ModuleWithProviders<FormFieldModule> {\r\n\t\tconst cfg = { ...config };\r\n\t\tcfg.appearance = cfg.appearance || 'fill';\r\n\t\treturn {\r\n\t\t\tngModule: FormFieldModule,\r\n\t\t\tproviders: [\r\n\t\t\t\t{\r\n\t\t\t\t\tprovide: BUI_FORM_FIELD_CONFIG,\r\n\t\t\t\t\tuseValue: cfg\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t};\r\n\t}\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAiBO,MAAM,qBAAqB,GAAG,IAAI,cAAc,CAAqB,gCAAgC,EAAE;IAC7G,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;AACvC,IAAA,UAAU,EAAE;AACZ,CAAA,CAAC;AACF;;;;;;;;;;;;AAYG;AASG,MAAO,kBAAmB,SAAQ,Y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BAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAHjB,YAAY,EAAE,kBAAkB,EAAE,eAAe,EACJ,kBAAkB,CAAA,EAAA,CAAA,CAAA;;2FAE7D,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,YAAY,EAAE,CAAC,kBAAkB,EAAE,uBAAuB,CAAC;AAC3D,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,eAAe,CAAC;AAC5D,oBAAA,OAAO,EAAE,CAAC,kBAAkB,EAAE,uBAAuB,EAAE,kBAAkB;AACzE,iBAAA;;;ACfD;;AAEG;;;;"}
1
+ {"version":3,"file":"bravura-ui-form-field.mjs","sources":["../../../projects/ui/form-field/form-field.component.ts","../../../projects/ui/form-field/form-field.module.ts","../../../projects/ui/form-field/bravura-ui-form-field.ts"],"sourcesContent":["import { Directive, ElementRef, Host, Inject, InjectionToken, Input, Provider } from '@angular/core';\nimport { MatFormField } from '@angular/material/form-field';\n\nexport interface BuiFormFieldConfig {\n\tappearance?: 'fill' | 'outline' | 'bound';\n}\n\nexport const BUI_FORM_FIELD_CONFIG = new InjectionToken<BuiFormFieldConfig>('@bravura/ui/buiFormFieldConfig', {\n\tfactory: () => ({ appearance: 'fill' }),\n\tprovidedIn: 'root'\n});\n\nexport function provideFormFieldConfig(config: BuiFormFieldConfig): Provider {\n\tconst conf = { ...config };\n\tconf.appearance = conf.appearance || 'fill';\n\n\treturn {\n\t\tprovide: BUI_FORM_FIELD_CONFIG,\n\t\tuseValue: conf\n\t};\n}\n\n/**\n * @ignore\n */\n@Directive({\n\tselector: 'bui-form-field, mat-form-field',\n\thost: {\n\t\tclass: 'bui-host'\n\t}\n})\nexport class FormFieldStyleDirective {\n\tprivate _appearance: any;\n\tprivate _flowDetection: any;\n\n\t/** The form field appearance style. */\n\t@Input()\n\tget appearance(): any {\n\t\treturn this._appearance;\n\t}\n\tset appearance(value: any) {\n\t\tthis._appearance = value;\n\t\tthis.elemRef.nativeElement.classList.remove('bui-form-field-bound', 'bui-form-field-detach');\n\t\tif (['bound', 'detach'].includes(this._appearance)) {\n\t\t\tthis.matFormField.appearance = 'outline';\n\t\t\tthis.elemRef.nativeElement.classList.add(`bui-form-field-${value}`);\n\t\t\tthis.matFormField._shouldAlwaysFloat = () => true;\n\t\t} else {\n\t\t\tthis.matFormField.appearance = ['outline', 'fill'].includes(this._appearance) ? this._appearance : undefined;\n\t\t\tthis.matFormField._shouldAlwaysFloat = this._flowDetection;\n\t\t}\n\t}\n\n\tconstructor(\n\t\t@Host() private matFormField: MatFormField,\n\t\tprivate elemRef: ElementRef<HTMLElement>,\n\t\t@Inject(BUI_FORM_FIELD_CONFIG) config: BuiFormFieldConfig\n\t) {\n\t\tthis._flowDetection = matFormField._shouldAlwaysFloat;\n\t\tthis.appearance = config.appearance;\n\t}\n}\n\nconst matFormFieldRef: any = MatFormField.ɵcmp;\nmatFormFieldRef.selectors.push(['bui-form-field']);\ndelete matFormFieldRef.inputs.appearance;\ndelete matFormFieldRef.declaredInputs.appearance;\n","import { ObserversModule } from '@angular/cdk/observers';\nimport { CommonModule } from '@angular/common';\nimport { ModuleWithProviders, NgModule } from '@angular/core';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { BuiFormFieldConfig, BUI_FORM_FIELD_CONFIG, FormFieldStyleDirective } from './form-field.component';\n\n@NgModule({\n\timports: [CommonModule, ObserversModule, FormFieldStyleDirective],\n\texports: [FormFieldStyleDirective]\n})\nexport class FormFieldModule {\n\tstatic forConfig(config: BuiFormFieldConfig): ModuleWithProviders<FormFieldModule> {\n\t\tconst cfg = { ...config };\n\t\tcfg.appearance = cfg.appearance || 'fill';\n\t\treturn {\n\t\t\tngModule: FormFieldModule,\n\t\t\tproviders: [\n\t\t\t\t{\n\t\t\t\t\tprovide: BUI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form-field-floating-label-translate-y: #{$offset};
9
+
10
+ .mdc-floating-label {
11
+ --mat-mdc-form-field-label-transform: translateY(var(--mat-mdc-form-field-floating-label-translate-y))
12
+ translateX(-4px) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75)) !important;
13
+ [dir='rtl'] & {
14
+ --mat-mdc-form-field-label-transform: translateY(var(--mat-mdc-form-field-floating-label-translate-y))
15
+ translateX(4px) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75)) !important;
16
+ }
17
+ transition: none !important;
18
+ }
19
+
20
+ .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix {
21
+ display: flex;
22
+ flex-direction: column;
23
+ justify-content: center;
24
+ align-self: stretch;
25
+ }
26
+ }
27
+
28
+ .bui-form-field-bound {
29
+ &.mat-focused {
30
+ --mat-mdc-form-field-floating-label-translate-y: calc(#{$offset} - 1px);
31
+ }
32
+
33
+ .mat-mdc-form-field-hint-wrapper,
34
+ .mat-mdc-form-field-error-wrapper {
35
+ padding-left: initial;
36
+ padding-inline-start: 4px;
37
+ }
38
+
39
+ .mat-mdc-form-field-infix {
40
+ min-height: 48px;
41
+ }
42
+
43
+ .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix {
44
+ padding-top: 8px;
45
+ padding-bottom: 8px;
46
+ }
47
+
48
+ .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading {
49
+ width: 4px;
50
+ }
51
+
52
+ .mdc-notched-outline--notched .mdc-notched-outline__notch {
53
+ border-top-width: 1px;
54
+ border-top-style: solid;
55
+ }
56
+
57
+ .mdc-text-field--focused .mdc-notched-outline--notched .mdc-notched-outline__notch {
58
+ border-top-width: 2px;
59
+ }
60
+
61
+ .mat-mdc-form-field-icon-prefix {
62
+ & > .mat-icon {
63
+ padding: 0 6px 0 12px;
64
+ }
65
+ & > span,
66
+ & > div {
67
+ padding-inline-start: 6px;
68
+ }
69
+ }
70
+
71
+ .mat-mdc-form-field-icon-suffix {
72
+ & > .mat-icon {
73
+ padding: 0 12px 0 6px;
74
+ }
75
+ & > span,
76
+ & > div {
77
+ padding-inline-end: 6px;
78
+ }
79
+ }
80
+ }
81
+
82
+ .bui-form-field-detach {
83
+ .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix {
84
+ padding-top: 0px;
85
+ padding-bottom: 0px;
86
+ }
87
+
88
+ .mat-mdc-form-field-hint-wrapper,
89
+ .mat-mdc-form-field-error-wrapper {
90
+ padding-inline-start: 0;
91
+ }
92
+
93
+ .mat-mdc-form-field-infix {
94
+ min-height: 40px;
95
+ }
96
+
97
+ .mdc-text-field--outlined .mdc-notched-outline {
98
+ .mdc-notched-outline__leading,
99
+ .mdc-notched-outline__trailing,
100
+ .mdc-notched-outline__notch {
101
+ border: none !important;
102
+ }
103
+
104
+ .mdc-notched-outline__leading {
105
+ width: 0;
106
+ }
107
+ }
108
+
109
+ .mat-mdc-text-field-wrapper.mdc-text-field--outlined {
110
+ padding-inline-start: 0;
111
+ }
112
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bravura/ui",
3
3
  "description": "Bravura UI Components for Angular applications",
4
- "version": "9.0.4",
4
+ "version": "9.0.6",
5
5
  "keywords": [
6
6
  "Angular",
7
7
  "Angular Material",
@@ -1,101 +1,102 @@
1
- @use 'sass:map';
2
- @use '@angular/material' as mat;
3
- @use './scrollbar.scss' as scrollbar;
4
- @use './bui-card' as card;
5
- @use './ui-theme-legacy' as legacy;
6
- @use '../stepper/stepper-theme' as stepper;
7
- @use '../radio-panel/radio-panel-theme' as radio;
8
- @use '../selection-panel/selection-panel-theme' as selection;
9
-
10
- $default-border-color-transition: border-color 100ms cubic-bezier(0.55, 0, 0.55, 0.2);
11
- $mat-foreground-extract: (
12
- 'secondary-text': 'light',
13
- 'hint-text': 'muted',
14
- 'divider': 'divider',
15
- 'base': 'base',
16
- 'inactive': 'inactive'
17
- );
18
-
19
- $mat-background-extract: (
20
- 'card': 'card',
21
- 'background': 'body'
22
- );
23
-
24
- @mixin all-component-colors($theme, $border-color-transition: $default-border-color-transition) {
25
- @if (mat.get-theme-version($theme) == 1) {
26
- @include stepper.color($theme);
27
- @include radio.color($theme);
28
- @include selection.color($theme);
29
-
30
- .bui-border-emphasis:hover {
31
- border-color: currentColor !important;
32
- transition: $border-color-transition;
33
- }
34
-
35
- // @include card.bui-card($color-config);
36
- @each $p in (primary, tertiary, secondary, error) {
37
- $c: mat.get-theme-color($theme, $p);
38
- @include apply-color($p, $c, $border-color-transition);
39
- }
40
-
41
- .bui-host {
42
- @each $p in (primary, tertiary, secondary, error) {
43
- $c: mat.get-theme-color($theme, $p);
44
- --bui-color-#{$p}: #{$c};
45
- }
46
-
47
- @if mat.get-theme-type($theme) != dark {
48
- --bui-color-success: #519602;
49
- --bui-color-info: #0dcaf0;
50
- --bui-color-warning: #ffc107;
51
- --bui-color-error: #dc3545;
52
- }
53
- }
54
- } @else {
55
- @include legacy.apply-colors($theme);
56
- }
57
- }
58
-
59
- @mixin apply-color($name, $color, $border-color-transition: $default-border-color-transition) {
60
- .bui-border-#{$name} {
61
- border-color: $color !important;
62
- transition: $border-color-transition;
63
- }
64
- .bui-bg-#{$name} {
65
- background-color: $color !important;
66
- }
67
- .bui-color-#{$name} {
68
- color: $color !important;
69
- }
70
- .bui-outline-#{$name} {
71
- outline-color: $color !important;
72
- }
73
- }
74
-
75
- @mixin apply-colors($theme, $border-color-transition: $default-border-color-transition) {
76
- @include all-component-colors($theme, $border-color-transition);
77
- }
78
-
79
- @mixin theme($theme, $border-color-transition: $default-border-color-transition) {
80
- @if (mat.get-theme-version($theme) == 1) {
81
- @include apply-colors($theme, $border-color-transition);
82
- @include stepper.theme($theme);
83
- @include radio.theme($theme);
84
- @include selection.theme($theme);
85
- @include scrollbar.bui-scrollbar;
86
-
87
- .mat-icon {
88
- &.fas,
89
- &.far,
90
- &.fab,
91
- &.fa {
92
- display: inline-flex;
93
- justify-content: center;
94
- align-items: center;
95
- font-size: 20px;
96
- }
97
- }
98
- } @else {
99
- @include legacy.theme($theme);
100
- }
101
- }
1
+ @use 'sass:map';
2
+ @use '@angular/material' as mat;
3
+ @use './scrollbar.scss' as scrollbar;
4
+ @use './bui-card' as card;
5
+ @use './ui-theme-legacy' as legacy;
6
+ @use '../stepper/stepper-theme' as stepper;
7
+ @use '../radio-panel/radio-panel-theme' as radio;
8
+ @use '../selection-panel/selection-panel-theme' as selection;
9
+ @use '../form-field/form-field-theme';
10
+
11
+ $default-border-color-transition: border-color 100ms cubic-bezier(0.55, 0, 0.55, 0.2);
12
+ $mat-foreground-extract: (
13
+ 'secondary-text': 'light',
14
+ 'hint-text': 'muted',
15
+ 'divider': 'divider',
16
+ 'base': 'base',
17
+ 'inactive': 'inactive'
18
+ );
19
+
20
+ $mat-background-extract: (
21
+ 'card': 'card',
22
+ 'background': 'body'
23
+ );
24
+
25
+ @mixin all-component-colors($theme, $border-color-transition: $default-border-color-transition) {
26
+ @if (mat.get-theme-version($theme) == 1) {
27
+ @include stepper.color($theme);
28
+ @include radio.color($theme);
29
+ @include selection.color($theme);
30
+
31
+ .bui-border-emphasis:hover {
32
+ border-color: currentColor !important;
33
+ transition: $border-color-transition;
34
+ }
35
+
36
+ // @include card.bui-card($color-config);
37
+ @each $p in (primary, tertiary, secondary, error) {
38
+ $c: mat.get-theme-color($theme, $p);
39
+ @include apply-color($p, $c, $border-color-transition);
40
+ }
41
+
42
+ .bui-host {
43
+ @each $p in (primary, tertiary, secondary, error) {
44
+ $c: mat.get-theme-color($theme, $p);
45
+ --bui-color-#{$p}: #{$c};
46
+ }
47
+
48
+ @if mat.get-theme-type($theme) != dark {
49
+ --bui-color-success: #519602;
50
+ --bui-color-info: #0dcaf0;
51
+ --bui-color-warning: #ffc107;
52
+ --bui-color-error: #dc3545;
53
+ }
54
+ }
55
+ } @else {
56
+ @include legacy.apply-colors($theme);
57
+ }
58
+ }
59
+
60
+ @mixin apply-color($name, $color, $border-color-transition: $default-border-color-transition) {
61
+ .bui-border-#{$name} {
62
+ border-color: $color !important;
63
+ transition: $border-color-transition;
64
+ }
65
+ .bui-bg-#{$name} {
66
+ background-color: $color !important;
67
+ }
68
+ .bui-color-#{$name} {
69
+ color: $color !important;
70
+ }
71
+ .bui-outline-#{$name} {
72
+ outline-color: $color !important;
73
+ }
74
+ }
75
+
76
+ @mixin apply-colors($theme, $border-color-transition: $default-border-color-transition) {
77
+ @include all-component-colors($theme, $border-color-transition);
78
+ }
79
+
80
+ @mixin theme($theme, $border-color-transition: $default-border-color-transition) {
81
+ @if (mat.get-theme-version($theme) == 1) {
82
+ @include apply-colors($theme, $border-color-transition);
83
+ @include stepper.theme($theme);
84
+ @include radio.theme($theme);
85
+ @include selection.theme($theme);
86
+ @include scrollbar.bui-scrollbar;
87
+
88
+ .mat-icon {
89
+ &.fas,
90
+ &.far,
91
+ &.fab,
92
+ &.fa {
93
+ display: inline-flex;
94
+ justify-content: center;
95
+ align-items: center;
96
+ font-size: 20px;
97
+ }
98
+ }
99
+ } @else {
100
+ @include legacy.theme($theme);
101
+ }
102
+ }
@@ -1,30 +1,13 @@
1
1
  import * as i0 from '@angular/core';
2
- import { ElementRef, ModuleWithProviders } from '@angular/core';
3
- import * as i3 from '@angular/material/form-field';
2
+ import { ElementRef, Provider, ModuleWithProviders } from '@angular/core';
4
3
  import { MatFormField } from '@angular/material/form-field';
5
- import * as i2 from '@angular/common';
6
- import * as i4 from '@angular/cdk/observers';
4
+ import * as i1 from '@angular/common';
5
+ import * as i2 from '@angular/cdk/observers';
7
6
 
8
7
  interface BuiFormFieldConfig {
9
8
  appearance?: 'fill' | 'outline' | 'bound';
10
9
  }
11
- /**
12
- * Container for form controls that applies Material Design styling and behavior.
13
- *
14
- * This component extends Angular Material's [mat-form-field](https://material.angular.io/components/form-field) and provides two additional appearances
15
- * `bound` and `detach`. `bound` renders the label outside the outlined area of the field, while `detach` remove the borders all together. `detach`
16
- * is generally used with form controls that render their own borders.
17
- *
18
- * ** IMPORTANT NOTICE **
19
- *
20
- * From version 3.0 onward, the selector `bui-form-field` is deprecated and will be removed in later releases. You no longer need to use this tag name
21
- * for the new appearances. As long as you import the `NgModule` from this package, the new appearances will be supported by Material's `mat-form-field`
22
- * component.
23
- */
24
- declare class FormFieldComponent extends MatFormField {
25
- static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldComponent, never>;
26
- static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldComponent, "bui-dummy-component", never, {}, {}, never, never, false, never>;
27
- }
10
+ declare function provideFormFieldConfig(config: BuiFormFieldConfig): Provider;
28
11
  /**
29
12
  * @ignore
30
13
  */
@@ -38,14 +21,14 @@ declare class FormFieldStyleDirective {
38
21
  set appearance(value: any);
39
22
  constructor(matFormField: MatFormField, elemRef: ElementRef<HTMLElement>, config: BuiFormFieldConfig);
40
23
  static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldStyleDirective, [{ host: true; }, null, null]>;
41
- static ɵdir: i0.ɵɵDirectiveDeclaration<FormFieldStyleDirective, "bui-form-field, mat-form-field", never, { "appearance": { "alias": "appearance"; "required": false; }; }, {}, never, never, false, never>;
24
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FormFieldStyleDirective, "bui-form-field, mat-form-field", never, { "appearance": { "alias": "appearance"; "required": false; }; }, {}, never, never, true, never>;
42
25
  }
43
26
 
44
27
  declare class FormFieldModule {
45
28
  static forConfig(config: BuiFormFieldConfig): ModuleWithProviders<FormFieldModule>;
46
29
  static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldModule, never>;
47
- static ɵmod: i0.ɵɵNgModuleDeclaration<FormFieldModule, [typeof FormFieldComponent, typeof FormFieldStyleDirective], [typeof i2.CommonModule, typeof i3.MatFormFieldModule, typeof i4.ObserversModule], [typeof FormFieldComponent, typeof FormFieldStyleDirective, typeof i3.MatFormFieldModule]>;
30
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FormFieldModule, never, [typeof i1.CommonModule, typeof i2.ObserversModule, typeof FormFieldStyleDirective], [typeof FormFieldStyleDirective]>;
48
31
  static ɵinj: i0.ɵɵInjectorDeclaration<FormFieldModule>;
49
32
  }
50
33
 
51
- export { FormFieldComponent, FormFieldModule, FormFieldStyleDirective };
34
+ export { FormFieldModule, FormFieldStyleDirective, provideFormFieldConfig };