@norwegian/core-components 5.8.1 → 5.9.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.
@@ -3363,7 +3363,10 @@
3363
3363
  };
3364
3364
  DropdownComponent.prototype.getMainClass = function () {
3365
3365
  var classes = [
3366
- this.getClass('', [this.exists(this.inline) && 'inline'])
3366
+ this.getClass('', [
3367
+ this.exists(this.inline) && 'inline',
3368
+ this.exists(this.stretched) && 'stretched'
3369
+ ])
3367
3370
  ];
3368
3371
  if (this.cssClass) {
3369
3372
  classes.push(this.cssClass);
@@ -3425,7 +3428,7 @@
3425
3428
  { type: i0.Component, args: [{
3426
3429
  selector: 'nas-dropdown',
3427
3430
  template: "<div [nasClass]=\"getMainClass()\"\n [id]=\"getId()\">\n <button type=\"button\"\n #toggleElement\n [nasClass]=\"getClass('toggle', [open && 'active', !open && 'blured'])\"\n (mousedown)=\"toggle()\"\n (focus)=\"toggleOnFocus($event)\">\n <div [nasClass]=\"getClass('label')\"\n [ngStyle]=\"labelStyle\">{{label}}</div>\n <nas-icon [nasClass]=\"getClass('dropdown-icon', open && 'rotate')\"\n [icon]=\"'arrow-right'\"\n [type]=\"'chevron-down'\"\n [isIndicator]=\"true\"></nas-icon>\n </button>\n <div [nasClass]=\"getClass('body')\">\n <div [nasClass]=\"getClass('content')\"\n [ngStyle]=\"position\"\n *ngIf=\"open\"\n tabindex=\"-1\">\n <span [nasClass]=\"getClass('arrow')\"\n [ngStyle]=\"arrowPosition\"></span>\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </div>\n <div *ngIf=\"!open\" #contentElement\n [nasClass]=\"getClass('content', 'hidden')\" [style.maxWidth]=\"maxWidth - 24 + 'px'\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </div>\n </div>\n <button type=\"button\"\n tabindex=\"0\"\n *ngIf=\"open\"\n [attr.aria-label]=\"ariaLabelBackdrop\"\n [nasClass]=\"getClass('backdrop')\"\n (click)=\"toggle()\"></button>\n</div>\n\n<ng-template #content>\n <ng-content></ng-content>\n</ng-template>",
3428
- styles: ["@-webkit-keyframes fade-in{0%{opacity:0}}@keyframes fade-in{0%{opacity:0}}@-webkit-keyframes fade-in-down{0%{opacity:0;transform:translateY(-30px)}}@keyframes fade-in-down{0%{opacity:0;transform:translateY(-30px)}}@-webkit-keyframes fade-in-left{0%{opacity:0;transform:translate(-30px)}}@keyframes fade-in-left{0%{opacity:0;transform:translate(-30px)}}@-webkit-keyframes fade-in-right{0%{opacity:0;transform:translate(30px)}}@keyframes fade-in-right{0%{opacity:0;transform:translate(30px)}}@-webkit-keyframes fade-out{to{opacity:0}}@keyframes fade-out{to{opacity:0}}@-webkit-keyframes flip-in{0%{opacity:0;transform:rotateX(-90deg)}40%{opacity:1;transform:rotateX(10deg)}}@keyframes flip-in{0%{opacity:0;transform:rotateX(-90deg)}40%{opacity:1;transform:rotateX(10deg)}}@-webkit-keyframes flip-out{to{opacity:0;transform:rotateX(-90deg)}}@keyframes flip-out{to{opacity:0;transform:rotateX(-90deg)}}@-webkit-keyframes pop-in-from-top{0%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-100,1,1);opacity:0}6.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-30.227,1,1)}13.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,1.76,1,1)}20%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,7.08,1,1)}26.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,3.838,1,1)}33.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.902,1,1);opacity:1}40%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.237,1,1)}46.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.312,1,1)}53.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.141,1,1)}60%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.021,1,1)}66.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.015,1,1)}73.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.013,1,1)}80%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.005,1,1)}86.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,1,1)}93.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}to{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}}@keyframes pop-in-from-top{0%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-100,1,1);opacity:0}6.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-30.227,1,1)}13.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,1.76,1,1)}20%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,7.08,1,1)}26.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,3.838,1,1)}33.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.902,1,1);opacity:1}40%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.237,1,1)}46.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.312,1,1)}53.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.141,1,1)}60%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.021,1,1)}66.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.015,1,1)}73.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.013,1,1)}80%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.005,1,1)}86.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,1,1)}93.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}to{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}}:host{display:flex}:host(.inline){display:inline-block}.nas-dropdown{position:relative;display:inline-block;height:100%}.nas-dropdown__toggle{position:relative;z-index:3;padding:9px 16px;background-color:#fff;outline:0;text-align:left;white-space:nowrap;align-items:center}.nas-dropdown__toggle:after{content:\"\";position:absolute;width:100%;left:0;bottom:-6px;height:3px;background-color:#c3c3c3;display:none;-webkit-animation:fade-in .1s linear both;animation:fade-in .1s linear both;-webkit-animation-delay:.13s;animation-delay:.13s}.nas-dropdown__toggle:focus{outline:none}.nas-dropdown__toggle:focus:after{background-color:transparent}.nas-dropdown__toggle--blured:focus{transition:box-shadow .9s;outline:none;box-shadow:inset 0 0 2px #c3c3c3,inset 0 0 2px 3px #3b99fc}.nas-dropdown__toggle--active{background-color:#f1f1f1}.nas-dropdown__toggle--active:focus{box-shadow:none}.nas-dropdown__indicator{margin-left:9px}.nas-dropdown__body{position:relative;z-index:4;perspective:1000px}.nas-dropdown__arrow{position:absolute;width:16px;height:16px;top:-10px;left:calc(50% - 8px);background-color:inherit;transform:rotate(45deg);border-top:3px solid #003251;border-left:3px solid #003251}.nas-dropdown__content{transform-origin:center top;transform-style:preserve-3d;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-animation:flip-in .55s ease both;animation:flip-in .55s ease both;outline:0;position:absolute;padding:16px;margin-top:16px;background-color:#fff;left:calc(50% - 150px);min-width:300px;max-width:calc(100vw - 24px);box-shadow:0 2px 12px #0000000d;border:3px solid #003251}.nas-dropdown__content--tight{left:calc(50% - 100px);width:200px}.nas-dropdown__content--wide{left:calc(50% - 180px);width:360px}.nas-dropdown__content--form{padding:16px 16px 24px;background-color:#f1f1f1}.nas-dropdown__content--hidden{visibility:hidden;overflow:hidden;height:0;padding:0;margin:0;border:0}.nas-dropdown__backdrop{display:block;position:fixed;z-index:2;top:0;left:0;width:100%;height:100%;color:transparent;background-color:#0019292b;-webkit-animation:fade-in .5s ease-out both;animation:fade-in .5s ease-out both}.nas-dropdown--inline .nas-dropdown__toggle{padding:0;background-color:transparent}.nas-dropdown--inline .nas-dropdown__toggle:after{display:block}.nas-dropdown__label{display:inline-block}::ng-deep .nas-dropdown__dropdown-icon--rotate .nas-icon-chevron-down{transform:rotate(180deg)}::ng-deep .nas-dropdown__dropdown-icon .nas-icon-chevron-down{transition:transform .2s cubic-bezier(0,0,.1,1);transform-origin:45% 55%}\n"]
3431
+ styles: ["@-webkit-keyframes fade-in{0%{opacity:0}}@keyframes fade-in{0%{opacity:0}}@-webkit-keyframes fade-in-down{0%{opacity:0;transform:translateY(-30px)}}@keyframes fade-in-down{0%{opacity:0;transform:translateY(-30px)}}@-webkit-keyframes fade-in-left{0%{opacity:0;transform:translate(-30px)}}@keyframes fade-in-left{0%{opacity:0;transform:translate(-30px)}}@-webkit-keyframes fade-in-right{0%{opacity:0;transform:translate(30px)}}@keyframes fade-in-right{0%{opacity:0;transform:translate(30px)}}@-webkit-keyframes fade-out{to{opacity:0}}@keyframes fade-out{to{opacity:0}}@-webkit-keyframes flip-in{0%{opacity:0;transform:rotateX(-90deg)}40%{opacity:1;transform:rotateX(10deg)}}@keyframes flip-in{0%{opacity:0;transform:rotateX(-90deg)}40%{opacity:1;transform:rotateX(10deg)}}@-webkit-keyframes flip-out{to{opacity:0;transform:rotateX(-90deg)}}@keyframes flip-out{to{opacity:0;transform:rotateX(-90deg)}}@-webkit-keyframes pop-in-from-top{0%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-100,1,1);opacity:0}6.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-30.227,1,1)}13.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,1.76,1,1)}20%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,7.08,1,1)}26.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,3.838,1,1)}33.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.902,1,1);opacity:1}40%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.237,1,1)}46.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.312,1,1)}53.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.141,1,1)}60%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.021,1,1)}66.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.015,1,1)}73.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.013,1,1)}80%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.005,1,1)}86.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,1,1)}93.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}to{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}}@keyframes pop-in-from-top{0%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-100,1,1);opacity:0}6.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-30.227,1,1)}13.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,1.76,1,1)}20%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,7.08,1,1)}26.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,3.838,1,1)}33.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.902,1,1);opacity:1}40%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.237,1,1)}46.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.312,1,1)}53.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.141,1,1)}60%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.021,1,1)}66.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.015,1,1)}73.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.013,1,1)}80%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,.005,1,1)}86.67%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,1,1)}93.33%{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}to{transform:matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,-.001,1,1);-webkit-transform:translate3d(0,0,0)}}:host(.inline){display:inline-block}.nas-dropdown{position:relative;display:inline-block;height:100%}.nas-dropdown__toggle{position:relative;z-index:3;padding:9px 16px;background-color:#fff;outline:0;text-align:left;white-space:nowrap;align-items:center}.nas-dropdown__toggle:after{content:\"\";position:absolute;width:100%;left:0;bottom:-6px;height:3px;background-color:#c3c3c3;display:none;-webkit-animation:fade-in .1s linear both;animation:fade-in .1s linear both;-webkit-animation-delay:.13s;animation-delay:.13s}.nas-dropdown__toggle:focus{outline:none}.nas-dropdown__toggle:focus:after{background-color:transparent}.nas-dropdown__toggle--blured:focus{transition:box-shadow .9s;outline:none;box-shadow:inset 0 0 2px #c3c3c3,inset 0 0 2px 3px #3b99fc}.nas-dropdown__toggle--active{background-color:#f1f1f1}.nas-dropdown__toggle--active:focus{box-shadow:none}.nas-dropdown__indicator{margin-left:9px}.nas-dropdown__body{position:relative;z-index:4;perspective:1000px}.nas-dropdown__arrow{position:absolute;width:16px;height:16px;top:-10px;left:calc(50% - 8px);background-color:inherit;transform:rotate(45deg);border-top:3px solid #003251;border-left:3px solid #003251}.nas-dropdown__content{transform-origin:center top;transform-style:preserve-3d;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-animation:flip-in .55s ease both;animation:flip-in .55s ease both;outline:0;position:absolute;padding:16px;margin-top:16px;background-color:#fff;left:calc(50% - 150px);min-width:300px;max-width:calc(100vw - 24px);box-shadow:0 2px 12px #0000000d;border:3px solid #003251}.nas-dropdown__content--tight{left:calc(50% - 100px);width:200px}.nas-dropdown__content--wide{left:calc(50% - 180px);width:360px}.nas-dropdown__content--form{padding:16px 16px 24px;background-color:#f1f1f1}.nas-dropdown__content--hidden{visibility:hidden;overflow:hidden;height:0;padding:0;margin:0;border:0}.nas-dropdown__backdrop{display:block;position:fixed;z-index:2;top:0;left:0;width:100%;height:100%;color:transparent;background-color:#0019292b;-webkit-animation:fade-in .5s ease-out both;animation:fade-in .5s ease-out both}.nas-dropdown--inline .nas-dropdown__toggle{padding:0;background-color:transparent}.nas-dropdown--inline .nas-dropdown__toggle:after{display:block}.nas-dropdown--stretched{display:block}.nas-dropdown--stretched button{width:100%!important}.nas-dropdown--stretched .nas-dropdown__content{width:300px;margin:16px auto 0}.nas-dropdown__label{display:inline-block}::ng-deep .nas-dropdown__dropdown-icon{float:right}::ng-deep .nas-dropdown__dropdown-icon--rotate .nas-icon-chevron-down{transform:rotate(180deg)}::ng-deep .nas-dropdown__dropdown-icon .nas-icon-chevron-down{transition:transform .2s cubic-bezier(0,0,.1,1);transform-origin:45% 55%}\n"]
3429
3432
  },] }
3430
3433
  ];
3431
3434
  DropdownComponent.ctorParameters = function () { return []; };
@@ -3441,6 +3444,7 @@
3441
3444
  cssClass: [{ type: i0.Input }],
3442
3445
  inline: [{ type: i0.Input }],
3443
3446
  label: [{ type: i0.Input }],
3447
+ stretched: [{ type: i0.Input }],
3444
3448
  labelStyle: [{ type: i0.Input }],
3445
3449
  openChange: [{ type: i0.Output }]
3446
3450
  };