@ifsworld/granite-components 3.0.0-beta.5 → 3.0.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.
Files changed (139) hide show
  1. package/README.md +3 -23
  2. package/bundles/ifsworld-granite-components.umd.js +9 -229
  3. package/bundles/ifsworld-granite-components.umd.js.map +1 -1
  4. package/bundles/ifsworld-granite-components.umd.min.js +3 -3
  5. package/bundles/ifsworld-granite-components.umd.min.js.map +1 -1
  6. package/esm2015/ifsworld-granite-components.js +2 -2
  7. package/esm2015/ifsworld-granite-components.js.map +1 -0
  8. package/esm2015/ifsworld-granite-components.metadata.json +1 -0
  9. package/{public-api.d.ts → esm2015/index.js} +5 -4
  10. package/esm2015/index.js.map +1 -0
  11. package/esm2015/index.metadata.json +1 -0
  12. package/esm2015/lib/arrange-grid/arrange-grid-item.component.js +1 -1
  13. package/esm2015/lib/arrange-grid/arrange-grid-item.component.js.map +1 -0
  14. package/esm2015/lib/arrange-grid/arrange-grid-item.component.metadata.json +1 -0
  15. package/esm2015/lib/arrange-grid/arrange-grid.component.js +2 -2
  16. package/esm2015/lib/arrange-grid/arrange-grid.component.js.map +1 -0
  17. package/esm2015/lib/arrange-grid/arrange-grid.component.metadata.json +1 -0
  18. package/esm2015/lib/arrange-grid/arrange-grid.module.js +1 -1
  19. package/esm2015/lib/arrange-grid/arrange-grid.module.js.map +1 -0
  20. package/esm2015/lib/arrange-grid/arrange-grid.module.metadata.json +1 -0
  21. package/esm2015/lib/badge/badge.component.js +1 -1
  22. package/esm2015/lib/badge/badge.component.js.map +1 -0
  23. package/esm2015/lib/badge/badge.component.metadata.json +1 -0
  24. package/esm2015/lib/badge/badge.module.js +1 -1
  25. package/esm2015/lib/badge/badge.module.js.map +1 -0
  26. package/esm2015/lib/badge/badge.module.metadata.json +1 -0
  27. package/esm2015/lib/badge/testing/badge.harness.js +1 -1
  28. package/esm2015/lib/badge/testing/badge.harness.js.map +1 -0
  29. package/esm2015/lib/badge/testing/badge.harness.metadata.json +1 -0
  30. package/esm2015/lib/button/button.component.js +1 -1
  31. package/esm2015/lib/button/button.component.js.map +1 -0
  32. package/esm2015/lib/button/button.component.metadata.json +1 -0
  33. package/esm2015/lib/button/button.module.js +1 -1
  34. package/esm2015/lib/button/button.module.js.map +1 -0
  35. package/esm2015/lib/button/button.module.metadata.json +1 -0
  36. package/esm2015/lib/core/animation.js +1 -1
  37. package/esm2015/lib/core/animation.js.map +1 -0
  38. package/esm2015/lib/core/animation.metadata.json +1 -0
  39. package/esm2015/lib/core/client-environment.js +1 -1
  40. package/esm2015/lib/core/client-environment.js.map +1 -0
  41. package/esm2015/lib/core/client-environment.metadata.json +1 -0
  42. package/esm2015/lib/core/common-behaviors/disabled.js +1 -1
  43. package/esm2015/lib/core/common-behaviors/disabled.js.map +1 -0
  44. package/esm2015/lib/core/common-behaviors/disabled.metadata.json +1 -0
  45. package/esm2015/lib/core/core.module.js +1 -1
  46. package/esm2015/lib/core/core.module.js.map +1 -0
  47. package/esm2015/lib/core/core.module.metadata.json +1 -0
  48. package/esm2015/lib/core/devices/client-input-desktop.directive.js +1 -1
  49. package/esm2015/lib/core/devices/client-input-desktop.directive.js.map +1 -0
  50. package/esm2015/lib/core/devices/client-input-desktop.directive.metadata.json +1 -0
  51. package/esm2015/lib/core/devices/client-input-touch.directive.js +1 -1
  52. package/esm2015/lib/core/devices/client-input-touch.directive.js.map +1 -0
  53. package/esm2015/lib/core/devices/client-input-touch.directive.metadata.json +1 -0
  54. package/esm2015/lib/core/devices/client-output-desktop.directive.js +1 -1
  55. package/esm2015/lib/core/devices/client-output-desktop.directive.js.map +1 -0
  56. package/esm2015/lib/core/devices/client-output-desktop.directive.metadata.json +1 -0
  57. package/esm2015/lib/core/devices/client-output-touch.directive.js +1 -1
  58. package/esm2015/lib/core/devices/client-output-touch.directive.js.map +1 -0
  59. package/esm2015/lib/core/devices/client-output-touch.directive.metadata.json +1 -0
  60. package/esm2015/lib/core/theme.library.js +1 -1
  61. package/esm2015/lib/core/theme.library.js.map +1 -0
  62. package/esm2015/lib/core/theme.library.metadata.json +1 -0
  63. package/esm2015/lib/grid/grid.component.js +1 -1
  64. package/esm2015/lib/grid/grid.component.js.map +1 -0
  65. package/esm2015/lib/grid/grid.component.metadata.json +1 -0
  66. package/esm2015/lib/grid/grid.module.js +1 -1
  67. package/esm2015/lib/grid/grid.module.js.map +1 -0
  68. package/esm2015/lib/grid/grid.module.metadata.json +1 -0
  69. package/esm2015/lib/icon/icon.component.js +1 -1
  70. package/esm2015/lib/icon/icon.component.js.map +1 -0
  71. package/esm2015/lib/icon/icon.component.metadata.json +1 -0
  72. package/esm2015/lib/icon/icon.module.js +1 -1
  73. package/esm2015/lib/icon/icon.module.js.map +1 -0
  74. package/esm2015/lib/icon/icon.module.metadata.json +1 -0
  75. package/esm2015/lib/menu/divider.directive.js +1 -1
  76. package/esm2015/lib/menu/divider.directive.js.map +1 -0
  77. package/esm2015/lib/menu/divider.directive.metadata.json +1 -0
  78. package/esm2015/lib/menu/menu-desktop-animations.js +1 -1
  79. package/esm2015/lib/menu/menu-desktop-animations.js.map +1 -0
  80. package/esm2015/lib/menu/menu-desktop-animations.metadata.json +1 -0
  81. package/esm2015/lib/menu/menu-errors.js +1 -1
  82. package/esm2015/lib/menu/menu-errors.js.map +1 -0
  83. package/esm2015/lib/menu/menu-errors.metadata.json +1 -0
  84. package/esm2015/lib/menu/menu-item.component.js +1 -1
  85. package/esm2015/lib/menu/menu-item.component.js.map +1 -0
  86. package/esm2015/lib/menu/menu-item.component.metadata.json +1 -0
  87. package/esm2015/lib/menu/menu-panel.js +1 -1
  88. package/esm2015/lib/menu/menu-panel.js.map +1 -0
  89. package/esm2015/lib/menu/menu-panel.metadata.json +1 -0
  90. package/esm2015/lib/menu/menu-positions.js +1 -1
  91. package/esm2015/lib/menu/menu-positions.js.map +1 -0
  92. package/esm2015/lib/menu/menu-positions.metadata.json +1 -0
  93. package/esm2015/lib/menu/menu-touch-animations.js +1 -1
  94. package/esm2015/lib/menu/menu-touch-animations.js.map +1 -0
  95. package/esm2015/lib/menu/menu-touch-animations.metadata.json +1 -0
  96. package/esm2015/lib/menu/menu-touch-close.component.js +1 -1
  97. package/esm2015/lib/menu/menu-touch-close.component.js.map +1 -0
  98. package/esm2015/lib/menu/menu-touch-close.component.metadata.json +1 -0
  99. package/esm2015/lib/menu/menu-touch-title.component.js +1 -1
  100. package/esm2015/lib/menu/menu-touch-title.component.js.map +1 -0
  101. package/esm2015/lib/menu/menu-touch-title.component.metadata.json +1 -0
  102. package/esm2015/lib/menu/menu-trigger-for.directive.js +1 -1
  103. package/esm2015/lib/menu/menu-trigger-for.directive.js.map +1 -0
  104. package/esm2015/lib/menu/menu-trigger-for.directive.metadata.json +1 -0
  105. package/esm2015/lib/menu/menu.component.js +3 -2
  106. package/esm2015/lib/menu/menu.component.js.map +1 -0
  107. package/esm2015/lib/menu/menu.component.metadata.json +1 -0
  108. package/esm2015/lib/menu/menu.module.js +1 -1
  109. package/esm2015/lib/menu/menu.module.js.map +1 -0
  110. package/esm2015/lib/menu/menu.module.metadata.json +1 -0
  111. package/esm2015/lib/menu/testing/menu.harness.js +1 -1
  112. package/esm2015/lib/menu/testing/menu.harness.js.map +1 -0
  113. package/esm2015/lib/menu/testing/menu.harness.metadata.json +1 -0
  114. package/esm2015/lib/toggle-switch/toggle-switch.component.js +5 -6
  115. package/esm2015/lib/toggle-switch/toggle-switch.component.js.map +1 -0
  116. package/esm2015/lib/toggle-switch/toggle-switch.component.metadata.json +1 -0
  117. package/esm2015/lib/toggle-switch/toggle-switch.module.js +1 -1
  118. package/esm2015/lib/toggle-switch/toggle-switch.module.js.map +1 -0
  119. package/esm2015/lib/toggle-switch/toggle-switch.module.metadata.json +1 -0
  120. package/fesm2015/ifsworld-granite-components.js +6 -212
  121. package/fesm2015/ifsworld-granite-components.js.map +1 -1
  122. package/ifsworld-granite-components.d.ts +1 -1
  123. package/ifsworld-granite-components.metadata.json +1 -1
  124. package/index.d.ts +31 -0
  125. package/lib/toggle-switch/toggle-switch.component.d.ts +2 -2
  126. package/package.json +8 -11
  127. package/src/lib/core/style/_mixins.scss +6 -17
  128. package/src/lib/core/style/_overlay.scss +2 -3
  129. package/esm2015/lib/checkbox/checkbox.component.js +0 -93
  130. package/esm2015/lib/checkbox/checkbox.module.js +0 -11
  131. package/esm2015/lib/core/types.js +0 -2
  132. package/esm2015/lib/radio-button/radio-button.component.js +0 -100
  133. package/esm2015/lib/radio-button/radio-button.module.js +0 -13
  134. package/esm2015/public-api.js +0 -40
  135. package/lib/checkbox/checkbox.component.d.ts +0 -27
  136. package/lib/checkbox/checkbox.module.d.ts +0 -2
  137. package/lib/core/types.d.ts +0 -1
  138. package/lib/radio-button/radio-button.component.d.ts +0 -28
  139. package/lib/radio-button/radio-button.module.d.ts +0 -2
package/README.md CHANGED
@@ -1,27 +1,7 @@
1
- # Granite UI Component Library
1
+ # granite-components
2
2
 
3
- A collection of Angular UI components used by the IFS client framework.
4
-
5
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.12.
6
-
7
- ## Code scaffolding
8
-
9
- Run `ng generate component component-name --project ui` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ui`.
10
-
11
- > Note: Don't forget to add `--project ui` or else it will be added to the default project in your `angular.json` file.
12
-
13
- ## Build
14
-
15
- Run `ng build ui` to build the project. The build artifacts will be stored in the `dist/` directory.
16
-
17
- ## Publishing
18
-
19
- After building your library with `ng build ui`, go to the dist folder `cd dist/ui` and run `npm publish`.
3
+ This library was generated with [Nx](https://nx.dev).
20
4
 
21
5
  ## Running unit tests
22
6
 
23
- Run `ng test ui` to execute the unit tests via [Karma](https://karma-runner.github.io).
24
-
25
- ## Further help
26
-
27
- To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
7
+ Run `nx test granite-components` to execute the unit tests.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/cdk/coercion'), require('rxjs'), require('rxjs/operators'), require('@angular/cdk/testing'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/cdk/a11y'), require('@angular/cdk/keycodes'), require('@angular/animations'), require('@angular/cdk/bidi'), require('@angular/cdk/platform'), require('@angular/cdk/collections')) :
3
- typeof define === 'function' && define.amd ? define('@ifsworld/granite-components', ['exports', '@angular/core', '@angular/common', '@angular/cdk/coercion', 'rxjs', 'rxjs/operators', '@angular/cdk/testing', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/cdk/a11y', '@angular/cdk/keycodes', '@angular/animations', '@angular/cdk/bidi', '@angular/cdk/platform', '@angular/cdk/collections'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.ifsworld = global.ifsworld || {}, global.ifsworld['granite-components'] = {}), global.ng.core, global.ng.common, global.ng.cdk.coercion, global.rxjs, global.rxjs.operators, global.ng.cdk.testing, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.cdk.a11y, global.ng.cdk.keycodes, global.ng.animations, global.ng.cdk.bidi, global.ng.cdk.platform, global.ng.cdk.collections));
5
- }(this, (function (exports, core, common, coercion, rxjs, operators, testing, overlay, portal, a11y, keycodes, animations, bidi, platform, collections) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/cdk/coercion'), require('rxjs'), require('rxjs/operators'), require('@angular/cdk/testing'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/cdk/a11y'), require('@angular/cdk/keycodes'), require('@angular/animations'), require('@angular/cdk/bidi'), require('@angular/cdk/platform')) :
3
+ typeof define === 'function' && define.amd ? define('@ifsworld/granite-components', ['exports', '@angular/core', '@angular/common', '@angular/cdk/coercion', 'rxjs', 'rxjs/operators', '@angular/cdk/testing', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/cdk/a11y', '@angular/cdk/keycodes', '@angular/animations', '@angular/cdk/bidi', '@angular/cdk/platform'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.ifsworld = global.ifsworld || {}, global.ifsworld['granite-components'] = {}), global.ng.core, global.ng.common, global.ng.cdk.coercion, global.rxjs, global.rxjs.operators, global.ng.cdk.testing, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.cdk.a11y, global.ng.cdk.keycodes, global.ng.animations, global.ng.cdk.bidi, global.ng.cdk.platform));
5
+ }(this, (function (exports, core, common, coercion, rxjs, operators, testing, overlay, portal, a11y, keycodes, animations, bidi, platform) { 'use strict';
6
6
 
7
7
  var GraniteArrangeGridItemComponent = /** @class */ (function () {
8
8
  function GraniteArrangeGridItemComponent(element) {
@@ -1160,6 +1160,7 @@
1160
1160
  },
1161
1161
  };
1162
1162
  /** Base class with all of the menu functionality. */
1163
+ // eslint-disable-next-line @angular-eslint/directive-class-suffix
1163
1164
  var _MenuBaseComponent = /** @class */ (function () {
1164
1165
  function _MenuBaseComponent(_changeDetectorRef) {
1165
1166
  this._changeDetectorRef = _changeDetectorRef;
@@ -1501,7 +1502,7 @@
1501
1502
  providers: [
1502
1503
  { provide: GRANITE_MENU_PANEL, useExisting: GraniteMenuComponent },
1503
1504
  ],
1504
- styles: [".granite-menu:not(.granite-device-output-touch){background-color:var(--granite-color-background-variant);color:var(--granite-color-text);overflow:auto;-webkit-overflow-scrolling:touch;min-height:var(--granite-spacing-xl);max-height:calc(100vh - var(--granite-spacing-xl));outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;filter:drop-shadow(0 16px 16px rgba(0,0,0,.08)) drop-shadow(0 4px 20px rgba(0,0,0,.1));min-width:calc(var(--granite-spacing-m) * 7)}.granite-menu:not(.granite-device-output-touch).ng-animating{pointer-events:none}.granite-menu.granite-device-output-touch{background-color:var(--granite-color-background-variant);color:var(--granite-color-text);overflow:auto;-webkit-overflow-scrolling:touch;min-height:var(--granite-spacing-xl);max-height:calc(100vh - var(--granite-spacing-xl));outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;filter:drop-shadow(0 16px 16px rgba(0,0,0,.08)) drop-shadow(0 4px 20px rgba(0,0,0,.1));border-radius:calc(var(--granite-radius-m) / 2);-webkit-margin-start:var(--granite-spacing-xs);margin-inline-start:var(--granite-spacing-xs);-webkit-margin-end:var(--granite-spacing-xs);margin-inline-end:var(--granite-spacing-xs);-webkit-margin-after:var(--granite-spacing-xs);margin-block-end:var(--granite-spacing-xs);max-height:calc(100% - var(--granite-spacing-m) * 7)}.granite-menu.granite-device-output-touch.ng-animating{pointer-events:none}.granite-menu.granite-device-output-touch .header-container{position:-webkit-sticky;position:sticky;top:0;background-color:var(--granite-color-background-variant);z-index:1}.granite-menu.granite-device-output-touch .footer-container{position:-webkit-sticky;position:sticky;bottom:0;height:0}.close:not(:empty){background-color:var(--granite-color-background-variant);color:var(--granite-color-text);overflow:auto;-webkit-overflow-scrolling:touch;min-height:var(--granite-spacing-xl);max-height:calc(100vh - var(--granite-spacing-xl));outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;filter:drop-shadow(0 16px 16px rgba(0,0,0,.08)) drop-shadow(0 4px 20px rgba(0,0,0,.1));border-radius:calc(var(--granite-radius-m) / 2);-webkit-margin-start:var(--granite-spacing-xs);margin-inline-start:var(--granite-spacing-xs);-webkit-margin-end:var(--granite-spacing-xs);margin-inline-end:var(--granite-spacing-xs);-webkit-margin-after:var(--granite-spacing-xs);margin-block-end:var(--granite-spacing-xs)}.close:not(:empty).ng-animating{pointer-events:none}"]
1505
+ styles: [".granite-menu:not(.granite-device-output-touch){background-color:var(--granite-color-background-variant);color:var(--granite-color-text);overflow:auto;-webkit-overflow-scrolling:touch;min-height:var(--granite-spacing-xl);max-height:calc(100vh - var(--granite-spacing-xl));outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;filter:drop-shadow(0 16px 16px rgba(0,0,0,.08)) drop-shadow(0 4px 20px rgba(0,0,0,.1));min-width:calc(var(--granite-spacing-m) * 7);overflow-x:hidden;overflow-y:hidden}.granite-menu:not(.granite-device-output-touch).ng-animating{pointer-events:none}.granite-menu:not(.granite-device-output-touch):hover{overflow-y:auto}.granite-menu:not(.granite-device-output-touch)::-webkit-scrollbar{width:var(--granite-spacing-xs)}.granite-menu:not(.granite-device-output-touch)::-webkit-scrollbar-thumb{background-color:var(--granite-color-border-hard);border-radius:calc(var(--granite-spacing-m) * .125)}.granite-menu:not(.granite-device-output-touch)::-webkit-scrollbar-track{background-color:var(--granite-color-background-hover)}.granite-menu.granite-device-output-touch{background-color:var(--granite-color-background-variant);color:var(--granite-color-text);overflow:auto;-webkit-overflow-scrolling:touch;min-height:var(--granite-spacing-xl);max-height:calc(100vh - var(--granite-spacing-xl));outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;filter:drop-shadow(0 16px 16px rgba(0,0,0,.08)) drop-shadow(0 4px 20px rgba(0,0,0,.1));border-radius:calc(var(--granite-radius-m) / 2);-webkit-margin-start:var(--granite-spacing-xs);margin-inline-start:var(--granite-spacing-xs);-webkit-margin-end:var(--granite-spacing-xs);margin-inline-end:var(--granite-spacing-xs);-webkit-margin-after:var(--granite-spacing-xs);margin-block-end:var(--granite-spacing-xs);max-height:calc(100% - var(--granite-spacing-m) * 7)}.granite-menu.granite-device-output-touch.ng-animating{pointer-events:none}.granite-menu.granite-device-output-touch .header-container{position:-webkit-sticky;position:sticky;top:0;background-color:var(--granite-color-background-variant);z-index:1}.granite-menu.granite-device-output-touch .footer-container{position:-webkit-sticky;position:sticky;bottom:0;height:0}.close:not(:empty){background-color:var(--granite-color-background-variant);color:var(--granite-color-text);overflow:auto;-webkit-overflow-scrolling:touch;min-height:var(--granite-spacing-xl);max-height:calc(100vh - var(--granite-spacing-xl));outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;filter:drop-shadow(0 16px 16px rgba(0,0,0,.08)) drop-shadow(0 4px 20px rgba(0,0,0,.1));border-radius:calc(var(--granite-radius-m) / 2);-webkit-margin-start:var(--granite-spacing-xs);margin-inline-start:var(--granite-spacing-xs);-webkit-margin-end:var(--granite-spacing-xs);margin-inline-end:var(--granite-spacing-xs);-webkit-margin-after:var(--granite-spacing-xs);margin-block-end:var(--granite-spacing-xs)}.close:not(:empty).ng-animating{pointer-events:none}"]
1505
1506
  },] }
1506
1507
  ];
1507
1508
 
@@ -2570,8 +2571,7 @@
2570
2571
  this.ariaLabelledby = null;
2571
2572
  this.valueChange = new core.EventEmitter();
2572
2573
  this.toggleChange = new core.EventEmitter();
2573
- // eslint-disable-next-line @angular-eslint/no-output-native
2574
- this.blur = new core.EventEmitter();
2574
+ this.toggleBlur = new core.EventEmitter();
2575
2575
  this._positionBefore = false;
2576
2576
  this._toggleSwitchDisabled = false;
2577
2577
  }
@@ -2600,7 +2600,7 @@
2600
2600
  this._focusMonitor.focusVia(this._getInputElement(), origin, options);
2601
2601
  };
2602
2602
  GraniteToggleSwitchComponent.prototype._onBlur = function () {
2603
- this.blur.emit();
2603
+ this.toggleBlur.emit();
2604
2604
  };
2605
2605
  GraniteToggleSwitchComponent.prototype._toggleSwitchChange = function () {
2606
2606
  this.checked = this._getInputElement().checked;
@@ -2643,7 +2643,7 @@
2643
2643
  ariaLabelledby: [{ type: core.Input, args: ['aria-labelledby',] }],
2644
2644
  valueChange: [{ type: core.Output }],
2645
2645
  toggleChange: [{ type: core.Output }],
2646
- blur: [{ type: core.Output }],
2646
+ toggleBlur: [{ type: core.Output }],
2647
2647
  _inputElement: [{ type: core.ViewChild, args: ['input',] }]
2648
2648
  };
2649
2649
 
@@ -2659,118 +2659,6 @@
2659
2659
  },] }
2660
2660
  ];
2661
2661
 
2662
- var GraniteRadioButtonComponent = /** @class */ (function () {
2663
- function GraniteRadioButtonComponent(_focusMonitor, _radioDispatcher) {
2664
- var _this = this;
2665
- this._focusMonitor = _focusMonitor;
2666
- this._radioDispatcher = _radioDispatcher;
2667
- this.id = null;
2668
- this.checked = false;
2669
- this.required = false;
2670
- this.disabled = false;
2671
- this.readonly = false;
2672
- this.labelPosition = 'after';
2673
- this.radioChanged = new core.EventEmitter();
2674
- this._positionBefore = false;
2675
- this._radioButtonDisabled = false;
2676
- this._removeUniqueSelectionListener = function () {
2677
- // Function used to deregister listener
2678
- };
2679
- this._removeUniqueSelectionListener = _radioDispatcher.listen(function (id, name) {
2680
- if (id !== _this.id && name === _this.name) {
2681
- _this.checked = false;
2682
- }
2683
- });
2684
- }
2685
- GraniteRadioButtonComponent.prototype.ngOnChanges = function (changes) {
2686
- if (changes.checked) {
2687
- this.checked = coercion.coerceBooleanProperty(changes.checked.currentValue);
2688
- }
2689
- if (changes.required) {
2690
- this.required = coercion.coerceBooleanProperty(changes.required.currentValue);
2691
- }
2692
- if (changes.readonly) {
2693
- this.readonly = coercion.coerceBooleanProperty(changes.readonly.currentValue);
2694
- }
2695
- if (changes.disabled) {
2696
- this.disabled = coercion.coerceBooleanProperty(changes.disabled.currentValue);
2697
- }
2698
- if (changes.labelPosition != null) {
2699
- this._positionBefore =
2700
- changes.labelPosition.currentValue != null &&
2701
- changes.labelPosition.currentValue === 'before';
2702
- }
2703
- if ((changes.disabled || changes.readonly) &&
2704
- (this.disabled || this.readonly)) {
2705
- this._radioButtonDisabled = true;
2706
- }
2707
- };
2708
- GraniteRadioButtonComponent.prototype.ngOnDestroy = function () {
2709
- this._removeUniqueSelectionListener();
2710
- };
2711
- // Focuses the radio button.
2712
- GraniteRadioButtonComponent.prototype.focus = function (origin, options) {
2713
- if (origin === void 0) { origin = 'program'; }
2714
- this._focusMonitor.focusVia(this._getInputElement(), origin, options);
2715
- };
2716
- GraniteRadioButtonComponent.prototype._radioButtonClick = function (targetValue) {
2717
- this.radioChanged.emit(targetValue);
2718
- };
2719
- GraniteRadioButtonComponent.prototype._radioButtonChange = function () {
2720
- this.checked = this._getInputElement().checked;
2721
- // Notify all radio buttons with the same name to un-check
2722
- this._radioDispatcher.notify(this.id, this.name);
2723
- };
2724
- GraniteRadioButtonComponent.prototype._getInputElement = function () {
2725
- return this._inputElement.nativeElement;
2726
- };
2727
- return GraniteRadioButtonComponent;
2728
- }());
2729
- GraniteRadioButtonComponent.decorators = [
2730
- { type: core.Component, args: [{
2731
- selector: 'granite-radio-button',
2732
- exportAs: 'graniteRadioButton',
2733
- host: {
2734
- class: 'granite-radio-button',
2735
- '[class.granite-radio-button-disabled]': 'disabled',
2736
- '[class.granite-radio-button-label-before]': '_positionBefore',
2737
- '[class.granite-radio-button-checked]': 'checked',
2738
- '[class.granite-radio-button-readonly]': 'readonly',
2739
- },
2740
- template: "<label class=\"granite-radio-button-label\">\n <div class=\"granite-radio-button-outer-circle\">\n <input\n #input\n [id]=\"id\"\n class=\"cdk-visually-hidden\"\n type=\"radio\"\n [attr.name]=\"name\"\n [disabled]=\"_radioButtonDisabled\"\n [checked]=\"checked\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n [value]=\"value\"\n (click)=\"_radioButtonClick($event.target.value)\"\n (change)=\"_radioButtonChange()\"\n />\n <div class=\"granite-radio-button-inner-circle\"></div>\n </div>\n <span class=\"granite-radio-button-text\">\n <ng-content></ng-content>\n </span>\n</label>\n",
2741
- styles: [".cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-label:hover{cursor:pointer}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-label:hover .granite-radio-button-outer-circle{border-color:var(--granite-color-background-active-hover)}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-label:hover .granite-radio-button-inner-circle{background-color:var(--granite-color-background-active-hover)}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-outer-circle:focus-within{border:1px solid var(--granite-color-focus)}:host(.granite-radio-button-label-before) .granite-radio-button-label{flex-direction:row-reverse}:host(.granite-radio-button-label-before).granite-radio-button-text{-webkit-margin-end:var(--granite-spacing-tiny);margin-inline-end:var(--granite-spacing-tiny)}:host(.granite-radio-button-checked) .granite-radio-button-inner-circle{visibility:visible;-webkit-animation:growAnimation .1s;animation:growAnimation .1s;-webkit-animation-iteration-count:1;animation-iteration-count:1}:host(.granite-radio-button-checked) .granite-radio-button-outer-circle{border-color:var(--granite-color-background-active)}:host(.granite-radio-button-checked).granite-radio-button-disabled .granite-radio-button-inner-circle{background-color:var(--granite-color-text)}:host(.granite-radio-button-checked).granite-radio-button-disabled .granite-radio-button-outer-circle{border:1px solid var(--granite-color-text);background-color:transparent}:host(.granite-radio-button-checked).granite-radio-button-readonly .granite-radio-button-inner-circle{background-color:var(--granite-color-text)}:host(.granite-radio-button-checked).granite-radio-button-readonly .granite-radio-button-outer-circle{border:1px solid var(--granite-color-text)}.granite-radio-button-text{-webkit-margin-start:var(--granite-spacing-tiny);margin-inline-start:var(--granite-spacing-tiny)}.granite-radio-button-label{display:flex;align-items:center;width:-webkit-max-content;width:-moz-max-content;width:max-content;-webkit-margin-end:32px;margin-inline-end:32px}:host(.granite-radio-button-readonly) *{cursor:default}:host(.granite-radio-button-disabled) .granite-radio-button-text{opacity:.6;color:var(--granite-color-text)}:host(.granite-radio-button-disabled) .granite-radio-button-outer-circle{opacity:.3;background-color:var(--granite-color-border-soft)}:host(.granite-radio-button-disabled) *{cursor:default}.granite-radio-button-outer-circle{height:var(--granite-spacing-small);width:var(--granite-spacing-small);border-radius:50%;box-sizing:border-box;border:1px solid var(--granite-color-border-hard);display:flex;justify-content:center;position:relative;align-items:center}.granite-radio-button-inner-circle{width:calc(var(--granite-spacing-tiny) * 1.25);height:calc(var(--granite-spacing-tiny) * 1.25);visibility:hidden;position:absolute;border-radius:50%;background-color:var(--granite-color-background-active);margin:auto}@-webkit-keyframes growAnimation{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes growAnimation{0%{transform:scale(0)}to{transform:scale(1)}}"]
2742
- },] }
2743
- ];
2744
- GraniteRadioButtonComponent.ctorParameters = function () { return [
2745
- { type: a11y.FocusMonitor },
2746
- { type: collections.UniqueSelectionDispatcher }
2747
- ]; };
2748
- GraniteRadioButtonComponent.propDecorators = {
2749
- value: [{ type: core.Input }],
2750
- id: [{ type: core.Input }],
2751
- name: [{ type: core.Input }],
2752
- checked: [{ type: core.Input }],
2753
- required: [{ type: core.Input }],
2754
- disabled: [{ type: core.Input }],
2755
- readonly: [{ type: core.Input }],
2756
- labelPosition: [{ type: core.Input }],
2757
- radioChanged: [{ type: core.Output }],
2758
- _inputElement: [{ type: core.ViewChild, args: ['input',] }]
2759
- };
2760
-
2761
- var GraniteRadioButtonModule = /** @class */ (function () {
2762
- function GraniteRadioButtonModule() {
2763
- }
2764
- return GraniteRadioButtonModule;
2765
- }());
2766
- GraniteRadioButtonModule.decorators = [
2767
- { type: core.NgModule, args: [{
2768
- declarations: [GraniteRadioButtonComponent],
2769
- exports: [GraniteRadioButtonComponent],
2770
- imports: [common.CommonModule],
2771
- },] }
2772
- ];
2773
-
2774
2662
  var disabledMixin = function (Base) {
2775
2663
  if (Base === void 0) { Base = /** @class */ (function () {
2776
2664
  function class_1() {
@@ -2917,110 +2805,6 @@
2917
2805
  },] }
2918
2806
  ];
2919
2807
 
2920
- var GraniteCheckboxComponent = /** @class */ (function () {
2921
- function GraniteCheckboxComponent(_focusMonitor) {
2922
- this._focusMonitor = _focusMonitor;
2923
- this.id = null;
2924
- this.checked = false;
2925
- this.disabled = false;
2926
- this.readonly = false;
2927
- this.labelPosition = 'after';
2928
- this.ariaLabel = null;
2929
- this.ariaLabelledby = null;
2930
- this.valueChange = new core.EventEmitter();
2931
- this.checkboxChange = new core.EventEmitter();
2932
- // eslint-disable-next-line @angular-eslint/no-output-native
2933
- this.blur = new core.EventEmitter();
2934
- this._positionBefore = false;
2935
- this._checkboxDisabled = false;
2936
- this._unchecked = false;
2937
- }
2938
- GraniteCheckboxComponent.prototype.ngOnChanges = function (changes) {
2939
- if (changes.checked) {
2940
- this.checked = coercion.coerceBooleanProperty(changes.checked.currentValue);
2941
- }
2942
- if (changes.disabled) {
2943
- this.disabled = coercion.coerceBooleanProperty(changes.disabled.currentValue);
2944
- }
2945
- if (changes.readonly) {
2946
- this.readonly = coercion.coerceBooleanProperty(changes.readonly.currentValue);
2947
- }
2948
- if (changes.labelPosition != null) {
2949
- this._positionBefore =
2950
- changes.labelPosition.currentValue != null &&
2951
- changes.labelPosition.currentValue === 'before';
2952
- }
2953
- if ((changes.disabled || changes.readonly) &&
2954
- (this.disabled || this.readonly)) {
2955
- this._checkboxDisabled = true;
2956
- }
2957
- };
2958
- GraniteCheckboxComponent.prototype.focus = function (origin, options) {
2959
- if (origin === void 0) { origin = 'program'; }
2960
- this._focusMonitor.focusVia(this._getInputElement(), origin, options);
2961
- };
2962
- GraniteCheckboxComponent.prototype._onBlur = function () {
2963
- this.blur.emit();
2964
- };
2965
- GraniteCheckboxComponent.prototype._checkboxChange = function () {
2966
- this._unchecked = this.checked ? true : false;
2967
- this.checked = this._getInputElement().checked;
2968
- this.valueChange.emit(this.checked);
2969
- };
2970
- GraniteCheckboxComponent.prototype._checkboxClick = function () {
2971
- this.checkboxChange.emit();
2972
- };
2973
- GraniteCheckboxComponent.prototype._getInputElement = function () {
2974
- return this._inputElement.nativeElement;
2975
- };
2976
- return GraniteCheckboxComponent;
2977
- }());
2978
- GraniteCheckboxComponent.decorators = [
2979
- { type: core.Component, args: [{
2980
- selector: 'granite-checkbox',
2981
- exportAs: 'graniteCheckbox',
2982
- host: {
2983
- class: 'granite-checkbox',
2984
- '[class.granite-checkbox-checked]': 'checked',
2985
- '[class.granite-checkbox-disabled]': 'disabled',
2986
- '[class.granite-checkbox-readonly]': 'readonly',
2987
- '[class.granite-checkbox-label-before]': '_positionBefore',
2988
- '[class.granite-checkbox-unchecked]': '_unchecked',
2989
- },
2990
- template: "<label [attr.for]=\"id\" class=\"granite-checkbox-label\">\n <div class=\"granite-checkbox-box\">\n <input\n #input\n [id]=\"id\"\n class=\"granite-checkbox-input cdk-visually-hidden\"\n role=\"switch\"\n type=\"checkbox\"\n [attr.aria-checked]=\"checked.toString()\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [checked]=\"checked\"\n [disabled]=\"_checkboxDisabled\"\n [readonly]=\"readonly\"\n (click)=\"_checkboxClick()\"\n (change)=\"_checkboxChange()\"\n (blur)=\"_onBlur()\"\n />\n <div class=\"granite-checkbox-check\"></div>\n </div>\n <span class=\"granite-checkbox-text\"><ng-content></ng-content></span>\n</label>\n",
2991
- changeDetection: core.ChangeDetectionStrategy.OnPush,
2992
- styles: [".cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none}:host{box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit;cursor:pointer}:host(.granite-checkbox){color:var(--granite-color-text)}:host(.granite-checkbox):not(.granite-checkbox-checked):not(.granite-checkbox-readonly):not(.granite-checkbox-disabled) .granite-checkbox-box:hover{border-color:var(--granite-color-background-active)}:host(.granite-checkbox-checked):not(.granite-checkbox-readonly):not(.granite-checkbox-disabled) .granite-checkbox-box:hover{background-color:var(--granite-color-background-active-hover);border-color:var(--granite-color-background-active-hover)}:host(.granite-checkbox-checked) .granite-checkbox-box{border-color:var(--granite-color-background-active);background-color:var(--granite-color-background-active)}:host(.granite-checkbox-checked) .granite-checkbox-box:focus-within{border-color:var(--granite-color-focus)}:host(.granite-checkbox-checked) .granite-checkbox-check{display:flex}:host(.granite-checkbox-checked):not(.granite-checkbox-readonly):not(.granite-checkbox-disabled) .granite-checkbox-box{-webkit-animation:fadeInAnimation .2s;animation:fadeInAnimation .2s;-webkit-animation-iteration-count:1;animation-iteration-count:1}:host(.granite-checkbox-unchecked) .granite-checkbox-box{-webkit-animation:fadeOutAnimation .2s;animation:fadeOutAnimation .2s;-webkit-animation-iteration-count:1;animation-iteration-count:1}:host(.granite-checkbox-readonly.granite-checkbox-checked) .granite-checkbox-box{background-color:var(--granite-color-text);border-color:var(--granite-color-text)}:host(.granite-checkbox-readonly.granite-checkbox-checked) .granite-checkbox-box .granite-checkbox-check{border-color:var(--granite-color-background)}:host(.granite-checkbox-disabled) .granite-checkbox-box{opacity:.3;background-color:var(--granite-color-border-soft)}:host(.granite-checkbox-disabled) .granite-checkbox-label{opacity:.6}:host(.granite-checkbox-disabled) *,:host(.granite-checkbox-readonly) *{cursor:default}:host(.granite-checkbox-label-before) .granite-checkbox-label{flex-direction:row-reverse}:host(.granite-checkbox-label-before) .granite-checkbox-text{-webkit-padding-start:0;padding-inline-start:0;-webkit-padding-end:var(--granite-spacing-tiny);padding-inline-end:var(--granite-spacing-tiny)}.granite-checkbox-label{display:flex;align-items:center;width:-webkit-max-content;width:-moz-max-content;width:max-content}.granite-checkbox-box{width:var(--granite-spacing-small);height:var(--granite-spacing-small);border:solid var(--granite-color-background-inactive);border-width:calc(var(--granite-spacing-micro) / 4);border-radius:var(--granite-spacing-micro);display:flex;justify-content:center;position:relative}.granite-checkbox-box:focus-within{border:calc(var(--granite-spacing-micro) / 4) solid var(--granite-color-focus)}.granite-checkbox-check{position:relative;display:none;width:calc(var(--granite-spacing-tiny) + (var(--granite-spacing-micro) / 4));height:calc(var(--granite-spacing-micro) + (var(--granite-spacing-micro) / 4));background-color:transparent;border:solid var(--granite-color-text-static-light);transform:rotate(-45deg);margin-top:var(--granite-spacing-micro);border-left-width:calc(var(--granite-spacing-micro) / 2);border-bottom-width:calc(var(--granite-spacing-micro) / 2);border-right-width:0;border-top-width:0}.granite-checkbox-text{-webkit-padding-start:var(--granite-spacing-tiny);padding-inline-start:var(--granite-spacing-tiny)}.granite-checkbox-text:empty{display:none}@-webkit-keyframes fadeInAnimation{0%{opacity:0}to{opacity:1}}@keyframes fadeInAnimation{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fadeOutAnimation{0%{opacity:1}to{opacity:0}}@keyframes fadeOutAnimation{0%{opacity:1}to{opacity:0}}"]
2993
- },] }
2994
- ];
2995
- GraniteCheckboxComponent.ctorParameters = function () { return [
2996
- { type: a11y.FocusMonitor }
2997
- ]; };
2998
- GraniteCheckboxComponent.propDecorators = {
2999
- id: [{ type: core.Input }],
3000
- checked: [{ type: core.Input }],
3001
- disabled: [{ type: core.Input }],
3002
- readonly: [{ type: core.Input }],
3003
- labelPosition: [{ type: core.Input }],
3004
- ariaLabel: [{ type: core.Input, args: ['aria-label',] }],
3005
- ariaLabelledby: [{ type: core.Input, args: ['aria-labelledby',] }],
3006
- valueChange: [{ type: core.Output }],
3007
- checkboxChange: [{ type: core.Output }],
3008
- blur: [{ type: core.Output }],
3009
- _inputElement: [{ type: core.ViewChild, args: ['input',] }]
3010
- };
3011
-
3012
- var GraniteCheckboxModule = /** @class */ (function () {
3013
- function GraniteCheckboxModule() {
3014
- }
3015
- return GraniteCheckboxModule;
3016
- }());
3017
- GraniteCheckboxModule.decorators = [
3018
- { type: core.NgModule, args: [{
3019
- declarations: [GraniteCheckboxComponent],
3020
- exports: [GraniteCheckboxComponent],
3021
- },] }
3022
- ];
3023
-
3024
2808
  var ɵ0 = deviceDesktop.output;
3025
2809
  /**
3026
2810
  * Directive used to tell components and their sub components that client output
@@ -3155,8 +2939,6 @@
3155
2939
  exports.GraniteBadgeModule = GraniteBadgeModule;
3156
2940
  exports.GraniteButtonComponent = GraniteButtonComponent;
3157
2941
  exports.GraniteButtonModule = GraniteButtonModule;
3158
- exports.GraniteCheckboxComponent = GraniteCheckboxComponent;
3159
- exports.GraniteCheckboxModule = GraniteCheckboxModule;
3160
2942
  exports.GraniteCoreModule = GraniteCoreModule;
3161
2943
  exports.GraniteDividerDirective = GraniteDividerDirective;
3162
2944
  exports.GraniteGridComponent = GraniteGridComponent;
@@ -3172,8 +2954,6 @@
3172
2954
  exports.GraniteMenuTouchCloseComponent = GraniteMenuTouchCloseComponent;
3173
2955
  exports.GraniteMenuTouchTitleItemComponent = GraniteMenuTouchTitleItemComponent;
3174
2956
  exports.GraniteMenuTriggerForDirective = GraniteMenuTriggerForDirective;
3175
- exports.GraniteRadioButtonComponent = GraniteRadioButtonComponent;
3176
- exports.GraniteRadioButtonModule = GraniteRadioButtonModule;
3177
2957
  exports.GraniteToggleSwitchComponent = GraniteToggleSwitchComponent;
3178
2958
  exports.GraniteToggleSwitchModule = GraniteToggleSwitchModule;
3179
2959
  exports._MenuBaseComponent = _MenuBaseComponent;