ng-zorro-antd-flex.mjs 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. import * as i0 from '@angular/core';
  2. import { booleanAttribute, Input, Directive, NgModule } from '@angular/core';
  3. /**
  4. * Use of this source code is governed by an MIT-style license that can be
  5. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  6. */
  7. class NzFlexDirective {
  8. nzVertical = false;
  9. nzJustify = 'normal';
  10. nzAlign = 'normal';
  11. nzGap = 0;
  12. nzWrap = 'nowrap';
  13. nzFlex = 'unset';
  14. get gap() {
  15. switch (this.nzGap) {
  16. case 'small':
  17. return '8px';
  18. case 'middle':
  19. return '16px';
  20. case 'large':
  21. return '24px';
  22. default:
  23. if (typeof this.nzGap === 'number') {
  24. return `${this.nzGap}px`;
  25. }
  26. return this.nzGap;
  27. }
  28. }
  29. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzFlexDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
  30. static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.2.2", type: NzFlexDirective, isStandalone: true, selector: "[nz-flex],nz-flex", inputs: { nzVertical: ["nzVertical", "nzVertical", booleanAttribute], nzJustify: "nzJustify", nzAlign: "nzAlign", nzGap: "nzGap", nzWrap: "nzWrap", nzFlex: "nzFlex" }, host: { properties: { "class.ant-flex-vertical": "nzVertical", "class.ant-flex-justify-flex-start": "nzJustify === 'flex-start'", "class.ant-flex-justify-center": "nzJustify === 'center'", "class.ant-flex-justify-flex-end": "nzJustify === 'flex-end'", "class.ant-flex-justify-space-between": "nzJustify === 'space-between'", "class.ant-flex-justify-space-around": "nzJustify === 'space-around'", "class.ant-flex-justify-space-evenly": "nzJustify === 'space-evenly'", "class.ant-flex-justify-start": "nzJustify === 'start'", "class.ant-flex-justify-end": "nzJustify === 'end'", "class.ant-flex-justify-right": "nzJustify === 'right'", "class.ant-flex-justify-left": "nzJustify === 'left'", "class.ant-flex-justify-stretch": "nzJustify === 'stretch'", "class.ant-flex-justify-normal": "nzJustify === 'normal'", "class.ant-flex-align-flex-start": "nzAlign === 'flex-start'", "class.ant-flex-align-center": "nzAlign === 'center'", "class.ant-flex-align-flex-end": "nzAlign === 'flex-end'", "class.ant-flex-align-space-between": "nzAlign === 'space-between'", "class.ant-flex-align-space-around": "nzAlign === 'space-around'", "class.ant-flex-align-space-evenly": "nzAlign === 'space-evenly'", "class.ant-flex-align-start": "nzAlign === 'start'", "class.ant-flex-align-end": "nzAlign === 'end'", "class.ant-flex-align-right": "nzAlign === 'right'", "class.ant-flex-align-left": "nzAlign === 'left'", "class.ant-flex-align-stretch": "nzAlign === 'stretch'", "class.ant-flex-align-normal": "nzAlign === 'normal'", "class.ant-flex-wrap-wrap": "nzWrap === 'wrap'", "class.ant-flex-wrap-wrap-reverse": "nzWrap === 'wrap-reverse'", "class.ant-flex-wrap-nowrap": "nzWrap === 'nowrap'", "style.gap": "gap", "style.flex": "nzFlex" }, classAttribute: "ant-flex" }, exportAs: ["nzFlex"], ngImport: i0 });
  31. }
  32. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzFlexDirective, decorators: [{
  33. type: Directive,
  34. args: [{
  35. selector: '[nz-flex],nz-flex',
  36. exportAs: 'nzFlex',
  37. host: {
  38. class: 'ant-flex',
  39. '[class.ant-flex-vertical]': `nzVertical`,
  40. '[class.ant-flex-justify-flex-start]': `nzJustify === 'flex-start'`,
  41. '[class.ant-flex-justify-center]': `nzJustify === 'center'`,
  42. '[class.ant-flex-justify-flex-end]': `nzJustify === 'flex-end'`,
  43. '[class.ant-flex-justify-space-between]': `nzJustify === 'space-between'`,
  44. '[class.ant-flex-justify-space-around]': `nzJustify === 'space-around'`,
  45. '[class.ant-flex-justify-space-evenly]': `nzJustify === 'space-evenly'`,
  46. '[class.ant-flex-justify-start]': `nzJustify === 'start'`,
  47. '[class.ant-flex-justify-end]': `nzJustify === 'end'`,
  48. '[class.ant-flex-justify-right]': `nzJustify === 'right'`,
  49. '[class.ant-flex-justify-left]': `nzJustify === 'left'`,
  50. '[class.ant-flex-justify-stretch]': `nzJustify === 'stretch'`,
  51. '[class.ant-flex-justify-normal]': `nzJustify === 'normal'`,
  52. '[class.ant-flex-align-flex-start]': `nzAlign === 'flex-start'`,
  53. '[class.ant-flex-align-center]': `nzAlign === 'center'`,
  54. '[class.ant-flex-align-flex-end]': `nzAlign === 'flex-end'`,
  55. '[class.ant-flex-align-space-between]': `nzAlign === 'space-between'`,
  56. '[class.ant-flex-align-space-around]': `nzAlign === 'space-around'`,
  57. '[class.ant-flex-align-space-evenly]': `nzAlign === 'space-evenly'`,
  58. '[class.ant-flex-align-start]': `nzAlign === 'start'`,
  59. '[class.ant-flex-align-end]': `nzAlign === 'end'`,
  60. '[class.ant-flex-align-right]': `nzAlign === 'right'`,
  61. '[class.ant-flex-align-left]': `nzAlign === 'left'`,
  62. '[class.ant-flex-align-stretch]': `nzAlign === 'stretch'`,
  63. '[class.ant-flex-align-normal]': `nzAlign === 'normal'`,
  64. '[class.ant-flex-wrap-wrap]': `nzWrap === 'wrap'`,
  65. '[class.ant-flex-wrap-wrap-reverse]': `nzWrap === 'wrap-reverse'`,
  66. '[class.ant-flex-wrap-nowrap]': `nzWrap === 'nowrap'`,
  67. '[style.gap]': `gap`,
  68. '[style.flex]': `nzFlex`
  69. }
  70. }]
  71. }], propDecorators: { nzVertical: [{
  72. type: Input,
  73. args: [{ transform: booleanAttribute }]
  74. }], nzJustify: [{
  75. type: Input
  76. }], nzAlign: [{
  77. type: Input
  78. }], nzGap: [{
  79. type: Input
  80. }], nzWrap: [{
  81. type: Input
  82. }], nzFlex: [{
  83. type: Input
  84. }] } });
  85. /**
  86. * Use of this source code is governed by an MIT-style license that can be
  87. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  88. */
  89. /**
  90. * Use of this source code is governed by an MIT-style license that can be
  91. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  92. */
  93. class NzFlexModule {
  94. static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzFlexModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
  95. static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.2", ngImport: i0, type: NzFlexModule, imports: [NzFlexDirective], exports: [NzFlexDirective] });
  96. static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzFlexModule });
  97. }
  98. i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: NzFlexModule, decorators: [{
  99. type: NgModule,
  100. args: [{
  101. imports: [NzFlexDirective],
  102. exports: [NzFlexDirective]
  103. }]
  104. }] });
  105. /**
  106. * Use of this source code is governed by an MIT-style license that can be
  107. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  108. */
  109. /**
  110. * Generated bundle index. Do not edit.
  111. */
  112. export { NzFlexDirective, NzFlexModule };
  113. //# sourceMappingURL=ng-zorro-antd-flex.mjs.map