@daffodil/design 0.39.8 → 0.39.9
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/bundles/daffodil-design-card-examples.umd.js +152 -14
- package/bundles/daffodil-design-card-examples.umd.js.map +1 -1
- package/bundles/daffodil-design-card-examples.umd.min.js +1 -1
- package/bundles/daffodil-design-card-examples.umd.min.js.map +1 -1
- package/bundles/daffodil-design-container-examples.umd.js +65 -0
- package/bundles/daffodil-design-container-examples.umd.js.map +1 -0
- package/bundles/daffodil-design-container-examples.umd.min.js +2 -0
- package/bundles/daffodil-design-container-examples.umd.min.js.map +1 -0
- package/bundles/daffodil-design.umd.js +171 -22
- package/bundles/daffodil-design.umd.js.map +1 -1
- package/bundles/daffodil-design.umd.min.js +2 -2
- package/bundles/daffodil-design.umd.min.js.map +1 -1
- package/card/examples/basic-card/basic-card.component.d.ts +1 -0
- package/card/examples/card-orientation/card-orientation.component.d.ts +9 -0
- package/card/examples/card-orientation/card-orientation.module.d.ts +2 -0
- package/card/examples/card-theming/card-theming.component.d.ts +4 -2
- package/card/examples/daffodil-design-card-examples.d.ts +2 -0
- package/card/examples/daffodil-design-card-examples.metadata.json +1 -1
- package/card/examples/linkable-card/linkable-card.component.d.ts +8 -0
- package/card/examples/public_api.d.ts +5 -1
- package/card/examples/raised-card/raised-card.component.d.ts +6 -0
- package/card/examples/stroked-card/stroked-card.component.d.ts +8 -0
- package/card/examples/stroked-card/stroked-card.module.d.ts +2 -0
- package/container/examples/container-sizes/container-sizes.component.d.ts +8 -0
- package/container/examples/container-sizes/container-sizes.module.d.ts +2 -0
- package/container/examples/daffodil-design-container-examples.d.ts +4 -0
- package/container/examples/daffodil-design-container-examples.metadata.json +1 -0
- package/container/examples/examples.d.ts +2 -0
- package/container/examples/index.d.ts +1 -0
- package/container/examples/package.json +11 -0
- package/container/examples/public_api.d.ts +3 -0
- package/core/manage-container-layout/manage-container-layout-mixin.d.ts +17 -0
- package/core/manage-container-layout/public_api.d.ts +1 -0
- package/core/public_api.d.ts +1 -0
- package/daff-theme.scss +165 -18
- package/daffodil-design.metadata.json +1 -1
- package/esm2015/atoms/container/container.component.js +1 -1
- package/esm2015/atoms/image/image.component.js +2 -2
- package/esm2015/card/examples/basic-card/basic-card.component.js +7 -3
- package/esm2015/card/examples/basic-card/basic-card.module.js +3 -1
- package/esm2015/card/examples/card-orientation/card-orientation.component.js +24 -0
- package/esm2015/card/examples/card-orientation/card-orientation.module.js +27 -0
- package/esm2015/card/examples/card-theming/card-theming.component.js +13 -4
- package/esm2015/card/examples/daffodil-design-card-examples.js +3 -1
- package/esm2015/card/examples/linkable-card/linkable-card.component.js +19 -3
- package/esm2015/card/examples/linkable-card/linkable-card.module.js +3 -1
- package/esm2015/card/examples/public_api.js +7 -1
- package/esm2015/card/examples/raised-card/raised-card.component.js +17 -3
- package/esm2015/card/examples/raised-card/raised-card.module.js +3 -3
- package/esm2015/card/examples/stroked-card/stroked-card.component.js +27 -0
- package/esm2015/card/examples/stroked-card/stroked-card.module.js +27 -0
- package/esm2015/container/examples/container-sizes/container-sizes.component.js +23 -0
- package/esm2015/container/examples/container-sizes/container-sizes.module.js +23 -0
- package/esm2015/container/examples/daffodil-design-container-examples.js +5 -0
- package/esm2015/container/examples/examples.js +5 -0
- package/esm2015/container/examples/index.js +2 -0
- package/esm2015/container/examples/public_api.js +4 -0
- package/esm2015/core/manage-container-layout/manage-container-layout-mixin.js +14 -0
- package/esm2015/core/manage-container-layout/public_api.js +2 -0
- package/esm2015/core/public_api.js +2 -1
- package/esm2015/molecules/callout/callout/callout.component.js +4 -3
- package/esm2015/molecules/card/card/card.component.js +76 -14
- package/esm2015/molecules/card/card-content/card-content.directive.js +18 -0
- package/esm2015/molecules/card/card-icon/card-icon.directive.js +18 -0
- package/esm2015/molecules/card/card.module.js +9 -3
- package/esm2015/molecules/card/public_api.js +4 -2
- package/esm2015/molecules/hero/hero/hero.component.js +4 -3
- package/esm2015/molecules/navbar/navbar.component.js +3 -2
- package/fesm2015/daffodil-design-card-examples.js +145 -11
- package/fesm2015/daffodil-design-card-examples.js.map +1 -1
- package/fesm2015/daffodil-design-container-examples.js +54 -0
- package/fesm2015/daffodil-design-container-examples.js.map +1 -0
- package/fesm2015/daffodil-design.js +137 -23
- package/fesm2015/daffodil-design.js.map +1 -1
- package/molecules/callout/callout/callout.component.d.ts +5 -0
- package/molecules/card/card/card.component.d.ts +37 -11
- package/molecules/card/card-content/card-content.directive.d.ts +6 -0
- package/molecules/card/card-icon/card-icon.directive.d.ts +6 -0
- package/molecules/card/public_api.d.ts +3 -1
- package/molecules/hero/hero/hero.component.d.ts +5 -0
- package/molecules/navbar/navbar.component.d.ts +5 -0
- package/package.json +1 -1
@@ -1384,7 +1384,7 @@
|
|
1384
1384
|
DaffImageComponent.decorators = [
|
1385
1385
|
{ type: i0.Component, args: [{
|
1386
1386
|
selector: 'daff-image',
|
1387
|
-
template: "<div class=\"daff-image__wrapper\" [style.paddingTop]=\"_paddingTop\">\n\t<img [src]=\"src\" [alt]=\"alt\" (load)=\"load.emit\" />\n</div>",
|
1387
|
+
template: "<div class=\"daff-image__wrapper\" [style.paddingTop]=\"_paddingTop\">\n\t<img [src]=\"src\" [alt]=\"alt\" (load)=\"load.emit\" loading=\"lazy\"/>\n</div>",
|
1388
1388
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
1389
1389
|
providers: [
|
1390
1390
|
{
|
@@ -2260,7 +2260,7 @@
|
|
2260
2260
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
2261
2261
|
inputs: ['size'],
|
2262
2262
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
2263
|
-
styles: [":host{display:block;margin:0 auto;padding:0;width:100%}:host.daff-xs{max-width:640px}:host.daff-sm{max-width:800px}:host.daff-md{max-width:1040px}:host.daff-lg{max-width:1340px}:host.daff-xl{max-width:1920px}"]
|
2263
|
+
styles: [":host-context(.daff-manage-container-layout){display:inherit;flex:inherit;flex-direction:inherit;flex-flow:inherit;flex-wrap:inherit;justify-content:inherit;justify-items:inherit;align-items:inherit;align-content:inherit;gap:inherit;grid-template-columns:inherit;grid-template-rows:inherit;grid-template-areas:inherit;grid-template:inherit;grid-auto-columns:inherit;grid-auto-rows:inherit;grid-auto-flow:inherit;grid:inherit;-moz-column-gap:inherit;column-gap:inherit;row-gap:inherit;grid-gap:inherit;grid-column-gap:inherit;grid-row-gap:inherit;place-items:inherit;place-content:inherit}:host{display:block;margin:0 auto;padding:0;width:100%}:host.daff-xs{max-width:640px}:host.daff-sm{max-width:800px}:host.daff-md{max-width:1040px}:host.daff-lg{max-width:1340px}:host.daff-xl{max-width:1920px}"]
|
2264
2264
|
},] }
|
2265
2265
|
];
|
2266
2266
|
/** @nocollapse */
|
@@ -3937,6 +3937,27 @@
|
|
3937
3937
|
{ type: i1.Overlay }
|
3938
3938
|
]; };
|
3939
3939
|
|
3940
|
+
/**
|
3941
|
+
* A mixin for giving a component the ability to manage a DaffContainerComponent's layout.
|
3942
|
+
* It passes predetermined layout styles down to the container. In order for a component to
|
3943
|
+
* do this, it must implement this mixin.
|
3944
|
+
*/
|
3945
|
+
function daffManageContainerLayoutMixin(Base) {
|
3946
|
+
return /** @class */ (function (_super) {
|
3947
|
+
__extends(class_1, _super);
|
3948
|
+
function class_1() {
|
3949
|
+
var args = [];
|
3950
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
3951
|
+
args[_i] = arguments[_i];
|
3952
|
+
}
|
3953
|
+
var _this = _super.apply(this, __spread(args)) || this;
|
3954
|
+
_this._renderer.addClass(_this._elementRef.nativeElement, "daff-manage-container-layout");
|
3955
|
+
return _this;
|
3956
|
+
}
|
3957
|
+
return class_1;
|
3958
|
+
}(Base));
|
3959
|
+
}
|
3960
|
+
|
3940
3961
|
/**
|
3941
3962
|
* An _elementRef is needed for the Colorable mixin
|
3942
3963
|
*/
|
@@ -3947,7 +3968,7 @@
|
|
3947
3968
|
}
|
3948
3969
|
return DaffNavbarBase;
|
3949
3970
|
}());
|
3950
|
-
var _daffNavbarBase = daffColorMixin(DaffNavbarBase);
|
3971
|
+
var _daffNavbarBase = daffManageContainerLayoutMixin(daffColorMixin(DaffNavbarBase));
|
3951
3972
|
/**
|
3952
3973
|
* @inheritdoc
|
3953
3974
|
*/
|
@@ -4773,7 +4794,7 @@
|
|
4773
4794
|
}
|
4774
4795
|
return DaffHeroBase;
|
4775
4796
|
}());
|
4776
|
-
var _daffHeroBase = daffColorMixin(daffCompactableMixin(daffTextAlignmentMixin(DaffHeroBase, 'left')));
|
4797
|
+
var _daffHeroBase = daffManageContainerLayoutMixin(daffColorMixin(daffCompactableMixin(daffTextAlignmentMixin(DaffHeroBase, 'left'))));
|
4777
4798
|
/**
|
4778
4799
|
* @inheritdoc
|
4779
4800
|
*/
|
@@ -4820,7 +4841,7 @@
|
|
4820
4841
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
4821
4842
|
inputs: ['color', 'compact', 'textAlignment'],
|
4822
4843
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
4823
|
-
styles: [".daff-hero{display:block;padding:64px 24px}@media (min-width:480px){.daff-hero{padding:96px 48px}}.daff-hero__icon{margin:0 0 16px}.daff-hero__tagline{text-transform:uppercase;font-size:.875rem;font-weight:600;letter-spacing:.03125rem;line-height:1rem;margin:0 0 8px;padding:0}.daff-hero__title{font-weight:700;font-size:2.5rem;line-height:2.
|
4844
|
+
styles: [".daff-hero{display:block;padding:64px 24px}@media (min-width:480px){.daff-hero{padding:96px 48px}}.daff-hero__icon{margin:0 0 16px}.daff-hero__tagline{text-transform:uppercase;font-size:.875rem;font-weight:600;letter-spacing:.03125rem;line-height:1rem;margin:0 0 8px;padding:0}.daff-hero__title{font-weight:700;font-size:2.5rem;line-height:2.5rem;margin:0;max-width:1040px;width:100%}@media (min-width:768px){.daff-hero__title{font-size:4.5rem;line-height:4.5rem}}.daff-hero__subtitle{font-size:1.25rem;font-weight:400;line-height:1.75rem;margin:16px 0 0;max-width:672px;width:100%}@media (min-width:768px){.daff-hero__subtitle{font-size:1.5rem;font-weight:400;line-height:2rem}}.daff-hero__subtitle p:first-of-type{margin-top:0}.daff-hero__subtitle p:last-of-type{margin-bottom:0}.daff-hero__body:not(:last-child){margin-bottom:48px}.daff-hero__body:not(:first-child){margin-top:48px}.daff-hero--centered .daff-hero__title{margin:0 auto;text-align:center}.daff-hero--centered .daff-hero__subtitle{margin:24px auto 0;text-align:center}.daff-hero--compact,.daff-hero--small{padding:50px 25px}@media (min-width:480px){.daff-hero--compact,.daff-hero--small{padding:50px}}.daff-hero.daff-compact{padding:48px 24px}@media (min-width:480px){.daff-hero.daff-compact{padding:48px}}.daff-hero.daff-left .daff-hero__icon,.daff-hero.daff-left .daff-hero__subtitle,.daff-hero.daff-left .daff-hero__tagline,.daff-hero.daff-left .daff-hero__title{text-align:left}.daff-hero.daff-center .daff-hero__icon,.daff-hero.daff-center .daff-hero__subtitle,.daff-hero.daff-center .daff-hero__tagline,.daff-hero.daff-center .daff-hero__title{margin-left:auto;margin-right:auto;text-align:center}.daff-hero.daff-right .daff-hero__icon,.daff-hero.daff-right .daff-hero__subtitle,.daff-hero.daff-right .daff-hero__tagline,.daff-hero.daff-right .daff-hero__title{margin-left:auto;text-align:right}"]
|
4824
4845
|
},] }
|
4825
4846
|
];
|
4826
4847
|
/** @nocollapse */
|
@@ -4971,7 +4992,7 @@
|
|
4971
4992
|
}
|
4972
4993
|
return DaffCalloutBase;
|
4973
4994
|
}());
|
4974
|
-
var _daffCalloutBase = daffColorMixin(daffCompactableMixin(daffTextAlignmentMixin(DaffCalloutBase, 'left')));
|
4995
|
+
var _daffCalloutBase = daffManageContainerLayoutMixin(daffColorMixin(daffCompactableMixin(daffTextAlignmentMixin(DaffCalloutBase, 'left'))));
|
4975
4996
|
/**
|
4976
4997
|
* @inheritdoc
|
4977
4998
|
*/
|
@@ -5018,7 +5039,7 @@
|
|
5018
5039
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
5019
5040
|
inputs: ['color', 'compact', 'textAlignment'],
|
5020
5041
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
5021
|
-
styles: [".daff-callout{display:block;padding:64px 24px}@media (min-width:480px){.daff-callout{padding:96px 48px}}.daff-callout__icon{margin:0 0 16px}.daff-callout__tagline{text-transform:uppercase;font-size:.875rem;font-weight:600;letter-spacing:.03125rem;line-height:1rem;margin:0 0 8px;padding:0}.daff-callout__title{font-weight:700;font-size:1.75rem;line-height:2rem;margin:0;max-width:1040px;overflow-wrap:break-word;padding:0;width:100%}@media (min-width:480px){.daff-callout__title{font-weight:700;font-size:2rem;line-height:2.25rem}}@media (min-width:480px) and (min-width:768px){.daff-callout__title{font-size:3rem;line-height:3.5rem}}.daff-callout__subtitle{font-size:1.25rem;margin:16px 0 0;max-width:592px;padding:0;width:100%}.daff-callout__body:not(:last-child){margin-bottom:48px}.daff-callout__body:not(:first-child){margin-top:48px}.daff-callout--centered .daff-callout__title{margin:0 auto;text-align:center}.daff-callout--centered .daff-callout__subtitle{margin:10px auto 0;text-align:center}@media (min-width:480px){.daff-callout--centered .daff-callout__subtitle{margin:25px auto 0}}.daff-callout--compact{padding:25px}@media (min-width:480px){.daff-callout--compact{padding:25px 50px}}.daff-callout.daff-compact{padding:48px 24px}@media (min-width:480px){.daff-callout.daff-compact{padding:48px}}.daff-callout.daff-left .daff-callout__icon,.daff-callout.daff-left .daff-callout__subtitle,.daff-callout.daff-left .daff-callout__tagline,.daff-callout.daff-left .daff-callout__title{text-align:left}.daff-callout.daff-center .daff-callout__icon,.daff-callout.daff-center .daff-callout__subtitle,.daff-callout.daff-center .daff-callout__tagline,.daff-callout.daff-center .daff-callout__title{margin-left:auto;margin-right:auto;text-align:center}.daff-callout.daff-right .daff-callout__icon,.daff-callout.daff-right .daff-callout__subtitle,.daff-callout.daff-right .daff-callout__tagline,.daff-callout.daff-right .daff-callout__title{margin-left:auto;text-align:right}"]
|
5042
|
+
styles: [".daff-callout{display:block;padding:64px 24px}@media (min-width:480px){.daff-callout{padding:96px 48px}}.daff-callout__icon{margin:0 0 16px}.daff-callout__tagline{text-transform:uppercase;font-size:.875rem;font-weight:600;letter-spacing:.03125rem;line-height:1rem;margin:0 0 8px;padding:0}.daff-callout__title{font-weight:700;font-size:1.75rem;line-height:2rem;margin:0;max-width:1040px;overflow-wrap:break-word;padding:0;width:100%}@media (min-width:480px){.daff-callout__title{font-weight:700;font-size:2rem;line-height:2.25rem}}@media (min-width:480px) and (min-width:768px){.daff-callout__title{font-size:3rem;line-height:3.5rem}}.daff-callout__subtitle{font-size:1.25rem;margin:16px 0 0;max-width:592px;padding:0;width:100%}.daff-callout__body:not(:last-child){margin-bottom:48px}.daff-callout__body:not(:first-child){margin-top:48px}.daff-callout__body p:first-of-type{margin-top:0}.daff-callout__body p:last-of-type{margin-bottom:0}.daff-callout--centered .daff-callout__title{margin:0 auto;text-align:center}.daff-callout--centered .daff-callout__subtitle{margin:10px auto 0;text-align:center}@media (min-width:480px){.daff-callout--centered .daff-callout__subtitle{margin:25px auto 0}}.daff-callout--compact{padding:25px}@media (min-width:480px){.daff-callout--compact{padding:25px 50px}}.daff-callout.daff-compact{padding:48px 24px}@media (min-width:480px){.daff-callout.daff-compact{padding:48px}}.daff-callout.daff-left .daff-callout__icon,.daff-callout.daff-left .daff-callout__subtitle,.daff-callout.daff-left .daff-callout__tagline,.daff-callout.daff-left .daff-callout__title{text-align:left}.daff-callout.daff-center .daff-callout__icon,.daff-callout.daff-center .daff-callout__subtitle,.daff-callout.daff-center .daff-callout__tagline,.daff-callout.daff-center .daff-callout__title{margin-left:auto;margin-right:auto;text-align:center}.daff-callout.daff-right .daff-callout__icon,.daff-callout.daff-right .daff-callout__subtitle,.daff-callout.daff-right .daff-callout__tagline,.daff-callout.daff-right .daff-callout__title{margin-left:auto;text-align:right}"]
|
5022
5043
|
},] }
|
5023
5044
|
];
|
5024
5045
|
/** @nocollapse */
|
@@ -5230,6 +5251,42 @@
|
|
5230
5251
|
class: [{ type: i0.HostBinding, args: ['class.daff-card__actions',] }]
|
5231
5252
|
};
|
5232
5253
|
|
5254
|
+
var DaffCardContentDirective = /** @class */ (function () {
|
5255
|
+
function DaffCardContentDirective() {
|
5256
|
+
/**
|
5257
|
+
* @docs-private
|
5258
|
+
*/
|
5259
|
+
this.class = true;
|
5260
|
+
}
|
5261
|
+
return DaffCardContentDirective;
|
5262
|
+
}());
|
5263
|
+
DaffCardContentDirective.decorators = [
|
5264
|
+
{ type: i0.Directive, args: [{
|
5265
|
+
selector: '[daffCardContent]',
|
5266
|
+
},] }
|
5267
|
+
];
|
5268
|
+
DaffCardContentDirective.propDecorators = {
|
5269
|
+
class: [{ type: i0.HostBinding, args: ['class.daff-card__content',] }]
|
5270
|
+
};
|
5271
|
+
|
5272
|
+
var DaffCardIconDirective = /** @class */ (function () {
|
5273
|
+
function DaffCardIconDirective() {
|
5274
|
+
/**
|
5275
|
+
* @docs-private
|
5276
|
+
*/
|
5277
|
+
this.class = true;
|
5278
|
+
}
|
5279
|
+
return DaffCardIconDirective;
|
5280
|
+
}());
|
5281
|
+
DaffCardIconDirective.decorators = [
|
5282
|
+
{ type: i0.Directive, args: [{
|
5283
|
+
selector: '[daffCardIcon]',
|
5284
|
+
},] }
|
5285
|
+
];
|
5286
|
+
DaffCardIconDirective.propDecorators = {
|
5287
|
+
class: [{ type: i0.HostBinding, args: ['class.daff-card__icon',] }]
|
5288
|
+
};
|
5289
|
+
|
5233
5290
|
var DaffCardImageDirective = /** @class */ (function () {
|
5234
5291
|
function DaffCardImageDirective() {
|
5235
5292
|
/**
|
@@ -5284,6 +5341,15 @@
|
|
5284
5341
|
class: [{ type: i0.HostBinding, args: ['class.daff-card__title',] }]
|
5285
5342
|
};
|
5286
5343
|
|
5344
|
+
var DaffCardTypeEnum;
|
5345
|
+
(function (DaffCardTypeEnum) {
|
5346
|
+
DaffCardTypeEnum["Raised"] = "daff-raised-card";
|
5347
|
+
DaffCardTypeEnum["Stroked"] = "daff-stroked-card";
|
5348
|
+
})(DaffCardTypeEnum || (DaffCardTypeEnum = {}));
|
5349
|
+
(function (DaffCardOrientationEnum) {
|
5350
|
+
DaffCardOrientationEnum["Vertical"] = "vertical";
|
5351
|
+
DaffCardOrientationEnum["Horizontal"] = "horizontal";
|
5352
|
+
})(exports.DaffCardOrientationEnum || (exports.DaffCardOrientationEnum = {}));
|
5287
5353
|
/**
|
5288
5354
|
* An _elementRef and an instance of renderer2 are needed for the Colorable mixin
|
5289
5355
|
*/
|
@@ -5304,34 +5370,109 @@
|
|
5304
5370
|
var _this = _super.call(this, elementRef, renderer) || this;
|
5305
5371
|
_this.elementRef = elementRef;
|
5306
5372
|
_this.renderer = renderer;
|
5307
|
-
_this.
|
5308
|
-
/**
|
5309
|
-
* @docs-private
|
5310
|
-
*/
|
5373
|
+
_this._orientation = exports.DaffCardOrientationEnum.Vertical;
|
5311
5374
|
_this.class = true;
|
5375
|
+
_this.cardType = _this.initCardType();
|
5312
5376
|
return _this;
|
5313
5377
|
}
|
5314
|
-
Object.defineProperty(DaffCardComponent.prototype, "
|
5378
|
+
Object.defineProperty(DaffCardComponent.prototype, "orientation", {
|
5379
|
+
get: function () {
|
5380
|
+
return this._orientation;
|
5381
|
+
},
|
5382
|
+
set: function (value) {
|
5383
|
+
if (value === null || value === undefined || value === '') {
|
5384
|
+
this._orientation = exports.DaffCardOrientationEnum.Vertical;
|
5385
|
+
}
|
5386
|
+
else {
|
5387
|
+
this._orientation = value;
|
5388
|
+
}
|
5389
|
+
},
|
5390
|
+
enumerable: false,
|
5391
|
+
configurable: true
|
5392
|
+
});
|
5393
|
+
;
|
5394
|
+
DaffCardComponent.prototype.initCardType = function () {
|
5395
|
+
var e_1, _a;
|
5396
|
+
var values = Object.keys(DaffCardTypeEnum).map(function (k) { return DaffCardTypeEnum[k]; });
|
5397
|
+
if (values.indexOf(this._getHostElement().localName) >= 0) {
|
5398
|
+
return this._getHostElement().localName;
|
5399
|
+
}
|
5400
|
+
try {
|
5401
|
+
for (var values_1 = __values(values), values_1_1 = values_1.next(); !values_1_1.done; values_1_1 = values_1.next()) {
|
5402
|
+
var attr = values_1_1.value;
|
5403
|
+
if (this._hasHostAttributes(attr)) {
|
5404
|
+
return attr;
|
5405
|
+
}
|
5406
|
+
}
|
5407
|
+
}
|
5408
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
5409
|
+
finally {
|
5410
|
+
try {
|
5411
|
+
if (values_1_1 && !values_1_1.done && (_a = values_1.return)) _a.call(values_1);
|
5412
|
+
}
|
5413
|
+
finally { if (e_1) throw e_1.error; }
|
5414
|
+
}
|
5415
|
+
return null;
|
5416
|
+
};
|
5417
|
+
/**
|
5418
|
+
* @docs-private
|
5419
|
+
*/
|
5420
|
+
DaffCardComponent.prototype.ngOnInit = function () {
|
5421
|
+
if (this.cardType) {
|
5422
|
+
this.elementRef.nativeElement.classList.add(this.cardType);
|
5423
|
+
}
|
5424
|
+
};
|
5425
|
+
Object.defineProperty(DaffCardComponent.prototype, "verticalClass", {
|
5426
|
+
/**
|
5427
|
+
* @docs-private
|
5428
|
+
*/
|
5315
5429
|
get: function () {
|
5316
|
-
return this.
|
5430
|
+
return this.orientation === exports.DaffCardOrientationEnum.Vertical;
|
5317
5431
|
},
|
5318
5432
|
enumerable: false,
|
5319
5433
|
configurable: true
|
5320
5434
|
});
|
5435
|
+
Object.defineProperty(DaffCardComponent.prototype, "horizontalClass", {
|
5436
|
+
/**
|
5437
|
+
* @docs-private
|
5438
|
+
*/
|
5439
|
+
get: function () {
|
5440
|
+
return this.orientation === exports.DaffCardOrientationEnum.Horizontal;
|
5441
|
+
},
|
5442
|
+
enumerable: false,
|
5443
|
+
configurable: true
|
5444
|
+
});
|
5445
|
+
DaffCardComponent.prototype._getHostElement = function () {
|
5446
|
+
return this.elementRef.nativeElement;
|
5447
|
+
};
|
5448
|
+
/**
|
5449
|
+
* Gets whether the button has one of the given attributes.
|
5450
|
+
* */
|
5451
|
+
DaffCardComponent.prototype._hasHostAttributes = function () {
|
5452
|
+
var _this = this;
|
5453
|
+
var attributes = [];
|
5454
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
5455
|
+
attributes[_i] = arguments[_i];
|
5456
|
+
}
|
5457
|
+
return attributes.some(function (attribute) { return _this._getHostElement().hasAttribute(attribute); });
|
5458
|
+
};
|
5321
5459
|
return DaffCardComponent;
|
5322
5460
|
}(_daffCardBase));
|
5323
5461
|
DaffCardComponent.decorators = [
|
5324
5462
|
{ type: i0.Component, args: [{
|
5325
|
-
selector: '' +
|
5326
|
-
'daff-card' + ',' +
|
5327
|
-
'
|
5328
|
-
|
5463
|
+
selector: 'daff-card' + ',' +
|
5464
|
+
'daff-raised-card' + ',' +
|
5465
|
+
'daff-stroked-card' + ',' +
|
5466
|
+
'a[daff-card]' + ',' +
|
5467
|
+
'a[daff-raised-card]' + ',' +
|
5468
|
+
'a[daff-stroked-card]',
|
5469
|
+
template: "<ng-content select=\"[daffCardImage]\"></ng-content>\n<div class=\"daff-card__wrapper\">\n\t<div class=\"daff-card__body\">\n\t\t<ng-content select=\"[daffCardIcon]\"></ng-content>\n\t\t<ng-content select=\"[daffCardTagline]\"></ng-content>\n\t\t<ng-content select=\"[daffCardTitle]\"></ng-content>\n\t\t<ng-content select=\"[daffCardContent]\"></ng-content>\n\t</div>\n\t<ng-content select=\"[daffCardActions]\"></ng-content>\n</div>",
|
5329
5470
|
encapsulation: i0.ViewEncapsulation.None,
|
5330
5471
|
//todo(damienwebdev): remove once decorators hit stage 3 - https://github.com/microsoft/TypeScript/issues/7342
|
5331
5472
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
5332
5473
|
inputs: ['color'],
|
5333
5474
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
5334
|
-
styles: [".daff-card{display:flex;
|
5475
|
+
styles: [".daff-card{display:flex;border-radius:8px}.daff-card__image{display:inline-block;width:100%}.daff-card--vertical{flex-direction:column}.daff-card--vertical .daff-card__image,.daff-card--vertical .daff-card__image img{border-top-left-radius:calc(8px - 1px);border-top-right-radius:calc(8px - 1px)}.daff-card--horizontal{flex-wrap:wrap}@media (min-width:480px){.daff-card--horizontal{flex-direction:row;flex-wrap:nowrap}}.daff-card--horizontal .daff-card__image,.daff-card--horizontal .daff-card__image img{border-top-left-radius:calc(8px - 1px);border-bottom-left-radius:calc(8px - 1px)}.daff-card--horizontal .daff-card__image img{-o-object-fit:cover;object-fit:cover;-o-object-position:center center;object-position:center center;height:100%!important;width:100%}.daff-card__icon{display:block;margin:0 0 .5rem}.daff-card__tagline{text-transform:uppercase;font-size:.875rem;font-weight:600;letter-spacing:.03125rem;line-height:1rem;padding:0;margin:0 0 .25rem}.daff-card__title{font-weight:700;font-size:1.5rem;line-height:1.75rem;margin:0 0 1rem}.daff-card__body{padding:1.5rem}.daff-card__content p:first-of-type{margin-top:0}.daff-card__content p:last-of-type{margin-bottom:0}.daff-card__actions{padding:0 1.5rem 1.5rem}a.daff-card,a.daff-raised-card,a.daff-stroked-card{text-decoration:none;transition:background-color .3s,box-shadow .3s}"]
|
5335
5476
|
},] }
|
5336
5477
|
];
|
5337
5478
|
/** @nocollapse */
|
@@ -5340,9 +5481,10 @@
|
|
5340
5481
|
{ type: i0.Renderer2 }
|
5341
5482
|
]; };
|
5342
5483
|
DaffCardComponent.propDecorators = {
|
5343
|
-
|
5484
|
+
orientation: [{ type: i0.Input }],
|
5344
5485
|
class: [{ type: i0.HostBinding, args: ['class.daff-card',] }],
|
5345
|
-
|
5486
|
+
verticalClass: [{ type: i0.HostBinding, args: ['class.daff-card--vertical',] }],
|
5487
|
+
horizontalClass: [{ type: i0.HostBinding, args: ['class.daff-card--horizontal',] }]
|
5346
5488
|
};
|
5347
5489
|
|
5348
5490
|
var DaffCardModule = /** @class */ (function () {
|
@@ -5357,16 +5499,20 @@
|
|
5357
5499
|
],
|
5358
5500
|
declarations: [
|
5359
5501
|
DaffCardComponent,
|
5502
|
+
DaffCardIconDirective,
|
5503
|
+
DaffCardImageDirective,
|
5360
5504
|
DaffCardTaglineDirective,
|
5361
5505
|
DaffCardTitleDirective,
|
5362
|
-
|
5506
|
+
DaffCardContentDirective,
|
5363
5507
|
DaffCardActionsDirective,
|
5364
5508
|
],
|
5365
5509
|
exports: [
|
5366
5510
|
DaffCardComponent,
|
5511
|
+
DaffCardIconDirective,
|
5512
|
+
DaffCardImageDirective,
|
5367
5513
|
DaffCardTaglineDirective,
|
5368
5514
|
DaffCardTitleDirective,
|
5369
|
-
|
5515
|
+
DaffCardContentDirective,
|
5370
5516
|
DaffCardActionsDirective,
|
5371
5517
|
],
|
5372
5518
|
},] }
|
@@ -5428,6 +5574,8 @@
|
|
5428
5574
|
exports.DaffCalloutTitleDirective = DaffCalloutTitleDirective;
|
5429
5575
|
exports.DaffCardActionsDirective = DaffCardActionsDirective;
|
5430
5576
|
exports.DaffCardComponent = DaffCardComponent;
|
5577
|
+
exports.DaffCardContentDirective = DaffCardContentDirective;
|
5578
|
+
exports.DaffCardIconDirective = DaffCardIconDirective;
|
5431
5579
|
exports.DaffCardImageDirective = DaffCardImageDirective;
|
5432
5580
|
exports.DaffCardModule = DaffCardModule;
|
5433
5581
|
exports.DaffCardTaglineDirective = DaffCardTaglineDirective;
|
@@ -5512,6 +5660,7 @@
|
|
5512
5660
|
exports.DaffSuffixDirective = DaffSuffixDirective;
|
5513
5661
|
exports.DaffThumbnailDirective = DaffThumbnailDirective;
|
5514
5662
|
exports.daffCompactableMixin = daffCompactableMixin;
|
5663
|
+
exports.daffManageContainerLayoutMixin = daffManageContainerLayoutMixin;
|
5515
5664
|
exports.daffPrefixableMixin = daffPrefixableMixin;
|
5516
5665
|
exports.daffSuffixableMixin = daffSuffixableMixin;
|
5517
5666
|
exports.daffThumbnailCompatToken = daffThumbnailCompatToken;
|