@nova-ui/bits 20.0.11 → 20.0.12
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/fesm2022/nova-ui-bits.mjs +250 -38
- package/fesm2022/nova-ui-bits.mjs.map +1 -1
- package/index.d.ts +50 -13
- package/package.json +1 -1
- package/sdk/atoms-playwright/components/chips/chips.atom.js +10 -5
- package/sdk/atoms-playwright/components/chips/chips.atom.js.map +1 -1
- package/sdk/atoms-playwright/components/convenience/time-frame-bar/time-frame-bar.atom.d.ts +21 -0
- package/sdk/atoms-playwright/components/convenience/time-frame-bar/time-frame-bar.atom.js +68 -0
- package/sdk/atoms-playwright/components/convenience/time-frame-bar/time-frame-bar.atom.js.map +1 -0
- package/sdk/atoms-playwright/components/progress/progress.atom.d.ts +6 -0
- package/sdk/atoms-playwright/components/progress/progress.atom.js +17 -0
- package/sdk/atoms-playwright/components/progress/progress.atom.js.map +1 -1
- package/sdk/atoms-playwright/components/public_api.d.ts +1 -0
- package/sdk/atoms-playwright/components/public_api.js +1 -0
- package/sdk/atoms-playwright/components/public_api.js.map +1 -1
- package/sdk/atoms-playwright/components/spinner/spinner.atom.d.ts +1 -0
- package/sdk/atoms-playwright/components/spinner/spinner.atom.js +17 -0
- package/sdk/atoms-playwright/components/spinner/spinner.atom.js.map +1 -1
- package/sdk/atoms-playwright/components/time-frame-picker/quick-picker.atom.d.ts +8 -0
- package/sdk/atoms-playwright/components/time-frame-picker/quick-picker.atom.js +45 -0
- package/sdk/atoms-playwright/components/time-frame-picker/quick-picker.atom.js.map +1 -0
- package/sdk/atoms-playwright/components/time-frame-picker/time-frame-picker.atom.d.ts +9 -0
- package/sdk/atoms-playwright/components/time-frame-picker/time-frame-picker.atom.js +34 -0
- package/sdk/atoms-playwright/components/time-frame-picker/time-frame-picker.atom.js.map +1 -0
- package/sdk/atoms-playwright/setup.d.ts +1 -1
- package/sdk/atoms-playwright/setup.js +5 -2
- package/sdk/atoms-playwright/setup.js.map +1 -1
- package/sdk/atoms-playwright/virtual-camera/Camera.d.ts +1 -0
- package/sdk/atoms-playwright/virtual-camera/Camera.js +28 -0
- package/sdk/atoms-playwright/virtual-camera/Camera.js.map +1 -1
- package/sdk/atoms-playwright/virtual-camera/camera-engine.js +1 -0
- package/sdk/atoms-playwright/virtual-camera/camera-engine.js.map +1 -1
- package/sdk/atoms-playwright/virtual-camera/eyes-lens.js +11 -2
- package/sdk/atoms-playwright/virtual-camera/eyes-lens.js.map +1 -1
|
@@ -862,6 +862,20 @@ const icons = [
|
|
|
862
862
|
category: IconCategory.Tab,
|
|
863
863
|
code: "<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'>\n <path fill='#767676'\n d='M12.59,3H11V1h8V9H17V7.41l-.29.29L15.29,6.29,17,4.59V3H15.41L13.71,4.71,12.29,3.29ZM4.29,17.29a1.13,1.13,0,0,1-1.59,0,1.12,1.12,0,0,1,0-1.59l2-2L3.29,12.29l-2,2a3.12,3.12,0,0,0,4.41,4.41l2-2L6.29,15.29Zm15.06-3.94-6,6a.5.5,0,0,1-.71,0l-12-12a.5.5,0,0,1,0-.71l6-6a.5.5,0,0,1,.71,0l12,12A.5.5,0,0,1,19.35,13.35ZM4,9.29,9.29,4,7,1.71,1.71,7Zm6,6L15.29,10,10,4.71,4.71,10ZM18.29,13,16,10.71,10.71,16,13,18.29ZM7.45,9.07a.81.81,0,1,0,.81.81A.81.81,0,0,0,7.45,9.07ZM9.88,6.64a.81.81,0,1,0,.81.81A.81.81,0,0,0,9.88,6.64Zm0,4.85a.81.81,0,1,0,.81.81A.81.81,0,0,0,9.88,11.49ZM12.3,9.07a.81.81,0,1,0,.81.81A.81.81,0,0,0,12.3,9.07Z'/>\n</svg>\n",
|
|
864
864
|
},
|
|
865
|
+
{
|
|
866
|
+
svgFile: "platformbar-collapse.svg",
|
|
867
|
+
name: "panel-collapse",
|
|
868
|
+
cat_namespace: IconCategoryNamespace.Command,
|
|
869
|
+
category: IconCategory.Command,
|
|
870
|
+
code: "<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'>\n <path fill-rule='evenodd' clip-rule='evenodd' d='M19 19H1V1H19V19ZM11 18H18V2H11V18ZM2 18H10V2H2V18Z' fill='#297994'/>\n <path d='M3 3.57143H9V4.85714H3V3.57143Z' fill='#297994'/>\n <path d='M3 6.14286H9V7.42857H3V6.14286Z' fill='#297994'/>\n <path d='M3 8.71429H9V10H3V8.71429Z' fill='#297994'/>\n <path d='M3 11.2857H9V12.5714H3V11.2857Z' fill='#297994'/>\n <path d='M3 13.8571H9V15.1429H3V13.8571Z' fill='#297994'/>\n <path d='M12.5714 3.57143H16.4286V4.85714H12.5714V3.57143Z' fill='#297994'/>\n <path d='M15.1429 6.14286H16.4286V15.1429H15.1429V6.14286Z' fill='#297994'/>\n <path d='M12.5714 6.14286H13.8571V15.1429H12.5714V6.14286Z' fill='#297994'/>\n</svg>\n",
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
svgFile: "platformbar-expand.svg",
|
|
874
|
+
name: "panel-expand",
|
|
875
|
+
cat_namespace: IconCategoryNamespace.Command,
|
|
876
|
+
category: IconCategory.Command,
|
|
877
|
+
code: "<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'>\n <path fill-rule='evenodd' clip-rule='evenodd' d='M18 19H2V1H18V19ZM3 18H17V2H3V18Z' fill='#297994'/>\n <path d='M5.69231 4.85714H6.92308V6.14286H5.69231V4.85714Z' fill='#297994'/>\n <path d='M8.15385 4.85714H9.38462V6.14286H8.15385V4.85714Z' fill='#297994'/>\n <path d='M10.6154 4.85714H11.8462V6.14286H10.6154V4.85714Z' fill='#297994'/>\n <path d='M13.0769 4.85714H14.3077V6.14286H13.0769V4.85714Z' fill='#297994'/>\n <path d='M5.69231 7.42857H6.92308V15.1429H5.69231V7.42857Z' fill='#297994'/>\n <path d='M8.15385 7.42857H9.38462V15.1429H8.15385V7.42857Z' fill='#297994'/>\n <path d='M10.6154 7.42857H11.8462V15.1429H10.6154V7.42857Z' fill='#297994'/>\n <path d='M13.0769 7.42857H14.3077V15.1429H13.0769V7.42857Z' fill='#297994'/>\n</svg>\n",
|
|
878
|
+
},
|
|
865
879
|
{
|
|
866
880
|
svgFile: "plus.svg",
|
|
867
881
|
name: "plus",
|
|
@@ -9542,8 +9556,16 @@ class SwitchComponent {
|
|
|
9542
9556
|
* Label element id used to dynamically compute accessible name.
|
|
9543
9557
|
*/
|
|
9544
9558
|
this.labelId = `nui-switch-label-${switchLabelCounter++}`;
|
|
9559
|
+
this.defaultAriaLabel = $localize `:Accessible name for a switch without a label:Switch`;
|
|
9545
9560
|
this.valueChange = new EventEmitter();
|
|
9546
9561
|
}
|
|
9562
|
+
get accessibleLabel() {
|
|
9563
|
+
return (this.ariaLabel ||
|
|
9564
|
+
(!this.hasProjectedLabel ? this.defaultAriaLabel : null));
|
|
9565
|
+
}
|
|
9566
|
+
get labelIdIfProjected() {
|
|
9567
|
+
return this.ariaLabel || !this.hasProjectedLabel ? null : this.labelId;
|
|
9568
|
+
}
|
|
9547
9569
|
toggle() {
|
|
9548
9570
|
if (this.disabled) {
|
|
9549
9571
|
return;
|
|
@@ -9576,6 +9598,9 @@ class SwitchComponent {
|
|
|
9576
9598
|
ngOnInit() {
|
|
9577
9599
|
this.value = !!this.value;
|
|
9578
9600
|
}
|
|
9601
|
+
get hasProjectedLabel() {
|
|
9602
|
+
return !!this.switchLabel?.nativeElement.textContent?.trim();
|
|
9603
|
+
}
|
|
9579
9604
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: SwitchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9580
9605
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: SwitchComponent, isStandalone: false, selector: "nui-switch", inputs: { value: "value", disabled: "disabled", ariaLabel: "ariaLabel", id: "id" }, outputs: { valueChange: "valueChange" }, providers: [
|
|
9581
9606
|
{
|
|
@@ -9588,7 +9613,7 @@ class SwitchComponent {
|
|
|
9588
9613
|
useExisting: forwardRef(() => SwitchComponent),
|
|
9589
9614
|
multi: true,
|
|
9590
9615
|
},
|
|
9591
|
-
], ngImport: i0, template: "<div\n class=\"nui-switch\"\n [class.nui-switched]=\"value\"\n [class.nui-disabled]=\"disabled\"\n [attr.disabled]=\"disabled\">\n <div class=\"nui-switch__container\">\n <div\n class=\"nui-switch__bar\"\n
|
|
9616
|
+
], viewQueries: [{ propertyName: "switchLabel", first: true, predicate: ["switchLabel"], descendants: true, static: true }], ngImport: i0, template: "<div\n class=\"nui-switch\"\n [class.nui-switched]=\"value\"\n [class.nui-disabled]=\"disabled\"\n [attr.disabled]=\"disabled\">\n <div class=\"nui-switch__container\">\n <div\n class=\"nui-switch__bar\"\n (click)=\"toggle()\"\n (keydown.enter)=\"$event.preventDefault(); toggle()\"\n (keydown.space)=\"$event.preventDefault(); toggle()\"\n tabindex=\"{{ disabled ? -1 : 0 }}\"\n role=\"checkbox\"\n [attr.aria-checked]=\"value\"\n [attr.aria-disabled]=\"disabled || null\"\n [attr.aria-label]=\"accessibleLabel\"\n [attr.aria-labelledby]=\"labelIdIfProjected\">\n <div class=\"nui-switch__on\">\n <svg\n aria-hidden=\"true\"\n class=\"nui-switch__svg\"\n viewBox=\"0 0 7.1 6.7\">\n <polyline\n class=\"nui-switch__icon-on\"\n points=\"0.6,2.9 3.2,4.8 7.2,1.0 \" />\n </svg>\n </div>\n <div class=\"nui-switch__thumb\">\n <svg\n aria-hidden=\"true\"\n class=\"nui-switch__svg\"\n viewBox=\"0 0 7.1 6.7\"></svg>\n </div>\n </div>\n <label #switchLabel class=\"nui-switch__label\" [attr.id]=\"labelId\">\n <ng-content></ng-content>\n </label>\n </div>\n</div>\n", styles: [":host .nui-switch{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}:host .nui-switch[disabled=true]{cursor:default;pointer-events:none;opacity:.4;filter:alpha(opacity=40)}:host .nui-switch:focus{outline:none}:host .nui-switch.nui-switched .nui-switch__bar{background-color:var(--nui-color-on,#00a753)}:host .nui-switch.nui-switched .nui-switch__thumb{transform:translate(20px)}:host .nui-switch__container{display:inline-block}:host .nui-switch__label{margin:0 0 0 10px}:host .nui-switch__bar{cursor:pointer;height:20px;width:40px;border-radius:10px;background-color:var(--nui-color-off,#4d4d4d);position:relative;float:left;transition:background-color ease .3s}:host .nui-switch__bar:focus-visible{outline:none;box-shadow:0 0 0 2px #00c4d280}:host .nui-switch__on,:host .nui-switch__off,:host .nui-switch__thumb{width:14px;height:14px;text-align:center;position:relative;top:3px}:host .nui-switch__thumb{width:14px;height:14px;border-radius:10px;background-color:var(--nui-color-bg-light,#fff);position:absolute;left:3px;top:3px;transition:transform ease .3s}:host .nui-switch__svg{width:10px;height:10px;display:block;margin:1px 6px}:host .nui-switch__icon-on{fill:none;stroke:var(--nui-color-line-inverse,#fff);stroke-width:1;stroke-miterlimit:10}:host .nui-switch__icon-off{fill:none;stroke:var(--nui-color-line-inverse,#fff);stroke-width:1;stroke-miterlimit:10}:host .nui-switch__icon-thumb{fill:none;stroke:var(--nui-color-line-default,#d9d9d9);stroke-miterlimit:10}:host .nui-switch__label:focus{outline:none}\n"] }); }
|
|
9592
9617
|
}
|
|
9593
9618
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: SwitchComponent, decorators: [{
|
|
9594
9619
|
type: Component,
|
|
@@ -9603,7 +9628,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
9603
9628
|
useExisting: forwardRef(() => SwitchComponent),
|
|
9604
9629
|
multi: true,
|
|
9605
9630
|
},
|
|
9606
|
-
], encapsulation: ViewEncapsulation.Emulated, standalone: false, template: "<div\n class=\"nui-switch\"\n [class.nui-switched]=\"value\"\n [class.nui-disabled]=\"disabled\"\n [attr.disabled]=\"disabled\">\n <div class=\"nui-switch__container\">\n <div\n class=\"nui-switch__bar\"\n
|
|
9631
|
+
], encapsulation: ViewEncapsulation.Emulated, standalone: false, template: "<div\n class=\"nui-switch\"\n [class.nui-switched]=\"value\"\n [class.nui-disabled]=\"disabled\"\n [attr.disabled]=\"disabled\">\n <div class=\"nui-switch__container\">\n <div\n class=\"nui-switch__bar\"\n (click)=\"toggle()\"\n (keydown.enter)=\"$event.preventDefault(); toggle()\"\n (keydown.space)=\"$event.preventDefault(); toggle()\"\n tabindex=\"{{ disabled ? -1 : 0 }}\"\n role=\"checkbox\"\n [attr.aria-checked]=\"value\"\n [attr.aria-disabled]=\"disabled || null\"\n [attr.aria-label]=\"accessibleLabel\"\n [attr.aria-labelledby]=\"labelIdIfProjected\">\n <div class=\"nui-switch__on\">\n <svg\n aria-hidden=\"true\"\n class=\"nui-switch__svg\"\n viewBox=\"0 0 7.1 6.7\">\n <polyline\n class=\"nui-switch__icon-on\"\n points=\"0.6,2.9 3.2,4.8 7.2,1.0 \" />\n </svg>\n </div>\n <div class=\"nui-switch__thumb\">\n <svg\n aria-hidden=\"true\"\n class=\"nui-switch__svg\"\n viewBox=\"0 0 7.1 6.7\"></svg>\n </div>\n </div>\n <label #switchLabel class=\"nui-switch__label\" [attr.id]=\"labelId\">\n <ng-content></ng-content>\n </label>\n </div>\n</div>\n", styles: [":host .nui-switch{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}:host .nui-switch[disabled=true]{cursor:default;pointer-events:none;opacity:.4;filter:alpha(opacity=40)}:host .nui-switch:focus{outline:none}:host .nui-switch.nui-switched .nui-switch__bar{background-color:var(--nui-color-on,#00a753)}:host .nui-switch.nui-switched .nui-switch__thumb{transform:translate(20px)}:host .nui-switch__container{display:inline-block}:host .nui-switch__label{margin:0 0 0 10px}:host .nui-switch__bar{cursor:pointer;height:20px;width:40px;border-radius:10px;background-color:var(--nui-color-off,#4d4d4d);position:relative;float:left;transition:background-color ease .3s}:host .nui-switch__bar:focus-visible{outline:none;box-shadow:0 0 0 2px #00c4d280}:host .nui-switch__on,:host .nui-switch__off,:host .nui-switch__thumb{width:14px;height:14px;text-align:center;position:relative;top:3px}:host .nui-switch__thumb{width:14px;height:14px;border-radius:10px;background-color:var(--nui-color-bg-light,#fff);position:absolute;left:3px;top:3px;transition:transform ease .3s}:host .nui-switch__svg{width:10px;height:10px;display:block;margin:1px 6px}:host .nui-switch__icon-on{fill:none;stroke:var(--nui-color-line-inverse,#fff);stroke-width:1;stroke-miterlimit:10}:host .nui-switch__icon-off{fill:none;stroke:var(--nui-color-line-inverse,#fff);stroke-width:1;stroke-miterlimit:10}:host .nui-switch__icon-thumb{fill:none;stroke:var(--nui-color-line-default,#d9d9d9);stroke-miterlimit:10}:host .nui-switch__label:focus{outline:none}\n"] }]
|
|
9607
9632
|
}], propDecorators: { value: [{
|
|
9608
9633
|
type: Input
|
|
9609
9634
|
}], disabled: [{
|
|
@@ -9612,6 +9637,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
9612
9637
|
type: Input
|
|
9613
9638
|
}], id: [{
|
|
9614
9639
|
type: Input
|
|
9640
|
+
}], switchLabel: [{
|
|
9641
|
+
type: ViewChild,
|
|
9642
|
+
args: ["switchLabel", { static: true }]
|
|
9615
9643
|
}], valueChange: [{
|
|
9616
9644
|
type: Output
|
|
9617
9645
|
}] } });
|
|
@@ -19684,6 +19712,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
19684
19712
|
type: Input
|
|
19685
19713
|
}] } });
|
|
19686
19714
|
|
|
19715
|
+
// © 2026 SolarWinds Worldwide, LLC. All rights reserved.
|
|
19716
|
+
//
|
|
19717
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
19718
|
+
// of this software and associated documentation files (the "Software"), to
|
|
19719
|
+
// deal in the Software without restriction, including without limitation the
|
|
19720
|
+
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
19721
|
+
// sell copies of the Software, and to permit persons to whom the Software is
|
|
19722
|
+
// furnished to do so, subject to the following conditions:
|
|
19723
|
+
//
|
|
19724
|
+
// The above copyright notice and this permission notice shall be included in
|
|
19725
|
+
// all copies or substantial portions of the Software.
|
|
19726
|
+
//
|
|
19727
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19728
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19729
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19730
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19731
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19732
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
19733
|
+
// THE SOFTWARE.
|
|
19734
|
+
const TAB_ID_PREFIX = "tab-";
|
|
19735
|
+
const TAB_PANEL_ID_PREFIX = "panel-";
|
|
19736
|
+
|
|
19687
19737
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
19688
19738
|
//
|
|
19689
19739
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
@@ -19726,6 +19776,24 @@ class TabGroupComponent {
|
|
|
19726
19776
|
ngAfterViewInit() {
|
|
19727
19777
|
this.checkTraverse();
|
|
19728
19778
|
}
|
|
19779
|
+
ngAfterContentInit() {
|
|
19780
|
+
this.setInitialActiveTab();
|
|
19781
|
+
}
|
|
19782
|
+
setInitialActiveTab() {
|
|
19783
|
+
const activeTab = this.tabs.find(tab => tab.active);
|
|
19784
|
+
const firstEnabledTab = this.tabs.find(tab => !tab.disabled);
|
|
19785
|
+
if (activeTab && !activeTab.disabled) {
|
|
19786
|
+
return;
|
|
19787
|
+
}
|
|
19788
|
+
this.tabs.forEach(tab => {
|
|
19789
|
+
if (tab.active && tab !== firstEnabledTab) {
|
|
19790
|
+
tab.active = false;
|
|
19791
|
+
}
|
|
19792
|
+
});
|
|
19793
|
+
if (firstEnabledTab) {
|
|
19794
|
+
this.selectTab(firstEnabledTab);
|
|
19795
|
+
}
|
|
19796
|
+
}
|
|
19729
19797
|
checkTraverse() {
|
|
19730
19798
|
this.hasTraverse = this.allowTraverse();
|
|
19731
19799
|
this.changeDetectorRef.detectChanges();
|
|
@@ -19748,6 +19816,35 @@ class TabGroupComponent {
|
|
|
19748
19816
|
});
|
|
19749
19817
|
}
|
|
19750
19818
|
}
|
|
19819
|
+
onKeyDown(event) {
|
|
19820
|
+
const tabElement = event.target?.closest?.("[role='tab']");
|
|
19821
|
+
const tabElements = Array.from(this.el.nativeElement.querySelectorAll("[role='tab']"));
|
|
19822
|
+
const currentIndex = tabElements.indexOf(tabElement);
|
|
19823
|
+
if (currentIndex < 0) {
|
|
19824
|
+
return;
|
|
19825
|
+
}
|
|
19826
|
+
const isForwardKey = (!this.vertical && event.code === KEYBOARD_CODE.ARROW_RIGHT) ||
|
|
19827
|
+
(this.vertical && event.code === KEYBOARD_CODE.ARROW_DOWN);
|
|
19828
|
+
const isBackwardKey = (!this.vertical && event.code === KEYBOARD_CODE.ARROW_LEFT) ||
|
|
19829
|
+
(this.vertical && event.code === KEYBOARD_CODE.ARROW_UP);
|
|
19830
|
+
let nextIndex = -1;
|
|
19831
|
+
if (isForwardKey) {
|
|
19832
|
+
nextIndex = this.findEnabledTabIndex(currentIndex, 1);
|
|
19833
|
+
}
|
|
19834
|
+
else if (isBackwardKey) {
|
|
19835
|
+
nextIndex = this.findEnabledTabIndex(currentIndex, -1);
|
|
19836
|
+
}
|
|
19837
|
+
else if (event.code === KEYBOARD_CODE.HOME) {
|
|
19838
|
+
nextIndex = this.findEnabledTabIndex(-1, 1);
|
|
19839
|
+
}
|
|
19840
|
+
else if (event.code === KEYBOARD_CODE.END) {
|
|
19841
|
+
nextIndex = this.findEnabledTabIndex(tabElements.length, -1);
|
|
19842
|
+
}
|
|
19843
|
+
if (nextIndex >= 0) {
|
|
19844
|
+
event.preventDefault();
|
|
19845
|
+
tabElements[nextIndex].focus();
|
|
19846
|
+
}
|
|
19847
|
+
}
|
|
19751
19848
|
allowTraverse() {
|
|
19752
19849
|
const holderSize = this.getElementSize("nui-tabs__holder");
|
|
19753
19850
|
const contentSize = this.getElementSize("nui-tabs__container");
|
|
@@ -19788,6 +19885,17 @@ class TabGroupComponent {
|
|
|
19788
19885
|
const margin = Math.abs(this.getNumberFromPixels(leftMargin));
|
|
19789
19886
|
return margin < maxAllowedMargin;
|
|
19790
19887
|
}
|
|
19888
|
+
findEnabledTabIndex(startIndex, direction) {
|
|
19889
|
+
const tabCount = this.tabs.length;
|
|
19890
|
+
let index = startIndex;
|
|
19891
|
+
for (let offset = 0; offset < tabCount; offset++) {
|
|
19892
|
+
index = (index + direction + tabCount) % tabCount;
|
|
19893
|
+
if (!this.tabs[index].disabled) {
|
|
19894
|
+
return index;
|
|
19895
|
+
}
|
|
19896
|
+
}
|
|
19897
|
+
return -1;
|
|
19898
|
+
}
|
|
19791
19899
|
isTraverseRightAllowed(margin) {
|
|
19792
19900
|
return this.getNumberFromPixels(margin) < 0;
|
|
19793
19901
|
}
|
|
@@ -19815,13 +19923,13 @@ class TabGroupComponent {
|
|
|
19815
19923
|
this.isDestroyed = true;
|
|
19816
19924
|
}
|
|
19817
19925
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: TabGroupComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
19818
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: TabGroupComponent, isStandalone: false, selector: "nui-tab-group", inputs: { vertical: "vertical" }, host: { listeners: { "window:resize": "checkTraverse()" } }, ngImport: i0, template: "<div class=\"nui-tabgroup\" [class.flex-column]=\"!vertical\">\n <div\n class=\"nui-tabs__holder\"\n [class.vertical]=\"vertical\"\n (click)=\"$event.preventDefault()\">\n <div\n class=\"btn-caret-left\"\n [class.disabled]=\"!rightTraverseEnabled\"\n *ngIf=\"hasTraverse\"\n (click)=\"traverseRight()\">\n <nui-icon\n [icon]=\"'caret-left'\"\n [iconColor]=\"!rightTraverseEnabled ? 'gray' : 'default'\"></nui-icon>\n </div>\n <div class=\"nui-tabs\">\n <div\n class=\"nui-tabs__container\"\n role=\"tablist\"\n [class.flex-column]=\"vertical\">\n @for (tab of tabs; track tab) {\n <div\n class=\"nui-tab\"\n [class.active]=\"tab.active && !vertical\"\n [class.horizontal]=\"tab.active && !vertical\"\n [class.disabled]=\"tab.disabled\"\n [class.active__vertical]=\"tab.active && vertical\">\n <span\n class=\"tab-link\"\n role=\"tab\"\n [id]=\"tab.
|
|
19926
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: TabGroupComponent, isStandalone: false, selector: "nui-tab-group", inputs: { vertical: "vertical" }, host: { listeners: { "window:resize": "checkTraverse()" } }, ngImport: i0, template: "<div class=\"nui-tabgroup\" [class.flex-column]=\"!vertical\">\n <div\n class=\"nui-tabs__holder\"\n [class.vertical]=\"vertical\"\n (click)=\"$event.preventDefault()\">\n <div\n class=\"btn-caret-left\"\n [class.disabled]=\"!rightTraverseEnabled\"\n *ngIf=\"hasTraverse\"\n (click)=\"traverseRight()\">\n <nui-icon\n [icon]=\"'caret-left'\"\n [iconColor]=\"!rightTraverseEnabled ? 'gray' : 'default'\"></nui-icon>\n </div>\n <div class=\"nui-tabs\">\n <div\n class=\"nui-tabs__container\"\n role=\"tablist\"\n [class.flex-column]=\"vertical\"\n [attr.aria-orientation]=\"vertical ? 'vertical' : null\"\n (keydown)=\"onKeyDown($event)\">\n @for (tab of tabs; track tab) {\n <div\n class=\"nui-tab\"\n [class.active]=\"tab.active && !vertical\"\n [class.horizontal]=\"tab.active && !vertical\"\n [class.disabled]=\"tab.disabled\"\n [class.active__vertical]=\"tab.active && vertical\">\n <span\n class=\"tab-link\"\n role=\"tab\"\n [id]=\"tab.tabControlId\"\n [attr.aria-controls]=\"tab.panelId\"\n [attr.tabindex]=\"\n tab.disabled || !tab.active ? -1 : 0\n \"\n [attr.aria-selected]=\"tab.active\"\n [attr.aria-disabled]=\"tab.disabled || null\"\n (click)=\"selectTab(tab)\"\n (keydown.enter)=\"selectTab(tab)\"\n (keydown.space)=\"\n $event.preventDefault(); selectTab(tab)\n \">\n <span\n [nuiTabHeadingCustomTemplateRef]=\"tab.headingRef\"\n >{{ tab.heading }}</span\n >\n </span>\n </div>\n }\n </div>\n </div>\n <div\n class=\"btn-caret-right\"\n [class.disabled]=\"!leftTraverseEnabled\"\n *ngIf=\"hasTraverse\"\n (click)=\"traverseLeft()\">\n <nui-icon\n [icon]=\"'caret-right'\"\n [iconColor]=\"!leftTraverseEnabled ? 'gray' : 'default'\"></nui-icon>\n </div>\n </div>\n <div class=\"nui-tabgroup__content\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".nui-tabgroup{display:flex;height:100%}.nui-tabgroup .nui-tabs{display:flex;justify-content:flex-start;margin-bottom:0;overflow:hidden}.nui-tabgroup .nui-tabs__holder{display:flex;border-bottom:1px solid #d9d9d9;border-bottom:1px solid var(--nui-color-line-default, #d9d9d9);flex-direction:row;background-color:var(--nui-color-bg-content,#fff)}.nui-tabgroup .nui-tabs__holder.vertical{border-right:1px solid #d9d9d9;border-right:1px solid var(--nui-color-line-default, #d9d9d9);border-bottom:0!important;margin-right:5px;margin-bottom:5px}.nui-tabgroup .nui-tabs__holder .btn-caret-right{align-items:center;justify-content:center;display:flex;flex:1;background:#fff;min-width:30px;max-width:30px;min-height:20px;z-index:2;border-bottom:none;cursor:pointer;border-left:1px solid #d9d9d9;border-left:1px solid var(--nui-color-line-default, #d9d9d9);box-shadow:-2px 0 2px #d9d9d9;box-shadow:-2px 0 2px var(--nui-color-line-default, #d9d9d9)}.nui-tabgroup .nui-tabs__holder .btn-caret-right:focus-visible{outline:none;box-shadow:0 0 0 2px #00c4d280}.nui-tabgroup .nui-tabs__holder .btn-caret-right.disabled{cursor:auto}.nui-tabgroup .nui-tabs__holder .btn-caret-left{align-items:center;justify-content:center;display:flex;flex:1;background:#fff;min-width:30px;max-width:30px;min-height:20px;z-index:2;border-bottom:none;cursor:pointer;border-right:1px solid #d9d9d9;border-right:1px solid var(--nui-color-line-default, #d9d9d9);box-shadow:2px 0 2px #d9d9d9;box-shadow:2px 0 2px var(--nui-color-line-default, #d9d9d9)}.nui-tabgroup .nui-tabs__holder .btn-caret-left:focus-visible{outline:none;box-shadow:0 0 0 2px #00c4d280}.nui-tabgroup .nui-tabs__holder .btn-caret-left.disabled{cursor:auto}.nui-tabgroup .nui-tabs__container{display:flex}.nui-tabgroup .nui-tabs__container .nui-tab{margin-bottom:-1px;white-space:nowrap}.nui-tabgroup .nui-tabs__container .nui-tab.horizontal{border-left:none}.nui-tabgroup .nui-tabs__container .nui-tab.active{border-bottom:3px solid #00c4d2;border-bottom:3px solid var(--nui-color-selected-contrast, #00c4d2)}.nui-tabgroup .nui-tabs__container .nui-tab.active>.tab-link{color:var(--nui-color-text-default,#111);background-color:var(--nui-color-bg-transparent,transparent)}.nui-tabgroup .nui-tabs__container .nui-tab.active__vertical{border-left:3px solid #00c4d2;border-left:3px solid var(--nui-color-selected-contrast, #00c4d2)}.nui-tabgroup .nui-tabs__container .nui-tab.disabled>.tab-link{cursor:not-allowed;color:var(--nui-color-text-disabled,rgba(17, 17, 17, .3))}.nui-tabgroup .nui-tabs__container .nui-tab.disabled>.tab-link:hover{background:transparent}.nui-tabgroup .nui-tabs__container .nui-tab:hover{background:var(--nui-color-bg-light-hover,#f2f2f2)}.nui-tabgroup .nui-tabs__container .nui-tab .tab-link{display:block;padding:5px 10px;cursor:pointer;text-transform:uppercase;font-size:13px;font-weight:600;line-height:18px;color:var(--nui-color-text-secondary,rgba(17, 17, 17, .6))}.nui-tabgroup .nui-tabs__container .nui-tab .tab-link:hover{background:var(--nui-color-bg-light-hover,#f2f2f2)}.nui-tabgroup .nui-tabs__container .nui-tab .tab-link:focus-visible{outline:none;box-shadow:0 0 0 2px #00c4d280}.nui-tabgroup__content,.full-width{width:100%}.flex-column{flex-direction:column}.caret-button{align-items:center;justify-content:center;display:flex;flex:1;background:#fff;min-width:30px;max-width:30px;min-height:20px;z-index:2;border-bottom:none;cursor:pointer}.caret-button:focus-visible{outline:none;box-shadow:0 0 0 2px #00c4d280}.caret-button.disabled{cursor:auto}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "nui-icon", inputs: ["iconColor", "brushType", "iconHoverColor", "iconSize", "cssClass", "fillContainer", "status", "childStatus", "icon", "counter", "decorative", "ariaLabel", "explicitRole"] }, { kind: "directive", type: TabHeadingCustomTemplateRefDirective, selector: "[nuiTabHeadingCustomTemplateRef]", inputs: ["nuiTabHeadingCustomTemplateRef"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
19819
19927
|
}
|
|
19820
19928
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: TabGroupComponent, decorators: [{
|
|
19821
19929
|
type: Component,
|
|
19822
19930
|
args: [{ selector: "nui-tab-group", host: {
|
|
19823
19931
|
"(window:resize)": "checkTraverse()",
|
|
19824
|
-
}, encapsulation: ViewEncapsulation.None, standalone: false, template: "<div class=\"nui-tabgroup\" [class.flex-column]=\"!vertical\">\n <div\n class=\"nui-tabs__holder\"\n [class.vertical]=\"vertical\"\n (click)=\"$event.preventDefault()\">\n <div\n class=\"btn-caret-left\"\n [class.disabled]=\"!rightTraverseEnabled\"\n *ngIf=\"hasTraverse\"\n (click)=\"traverseRight()\">\n <nui-icon\n [icon]=\"'caret-left'\"\n [iconColor]=\"!rightTraverseEnabled ? 'gray' : 'default'\"></nui-icon>\n </div>\n <div class=\"nui-tabs\">\n <div\n class=\"nui-tabs__container\"\n role=\"tablist\"\n [class.flex-column]=\"vertical\">\n @for (tab of tabs; track tab) {\n <div\n class=\"nui-tab\"\n [class.active]=\"tab.active && !vertical\"\n [class.horizontal]=\"tab.active && !vertical\"\n [class.disabled]=\"tab.disabled\"\n [class.active__vertical]=\"tab.active && vertical\">\n <span\n class=\"tab-link\"\n role=\"tab\"\n [id]=\"tab.
|
|
19932
|
+
}, encapsulation: ViewEncapsulation.None, standalone: false, template: "<div class=\"nui-tabgroup\" [class.flex-column]=\"!vertical\">\n <div\n class=\"nui-tabs__holder\"\n [class.vertical]=\"vertical\"\n (click)=\"$event.preventDefault()\">\n <div\n class=\"btn-caret-left\"\n [class.disabled]=\"!rightTraverseEnabled\"\n *ngIf=\"hasTraverse\"\n (click)=\"traverseRight()\">\n <nui-icon\n [icon]=\"'caret-left'\"\n [iconColor]=\"!rightTraverseEnabled ? 'gray' : 'default'\"></nui-icon>\n </div>\n <div class=\"nui-tabs\">\n <div\n class=\"nui-tabs__container\"\n role=\"tablist\"\n [class.flex-column]=\"vertical\"\n [attr.aria-orientation]=\"vertical ? 'vertical' : null\"\n (keydown)=\"onKeyDown($event)\">\n @for (tab of tabs; track tab) {\n <div\n class=\"nui-tab\"\n [class.active]=\"tab.active && !vertical\"\n [class.horizontal]=\"tab.active && !vertical\"\n [class.disabled]=\"tab.disabled\"\n [class.active__vertical]=\"tab.active && vertical\">\n <span\n class=\"tab-link\"\n role=\"tab\"\n [id]=\"tab.tabControlId\"\n [attr.aria-controls]=\"tab.panelId\"\n [attr.tabindex]=\"\n tab.disabled || !tab.active ? -1 : 0\n \"\n [attr.aria-selected]=\"tab.active\"\n [attr.aria-disabled]=\"tab.disabled || null\"\n (click)=\"selectTab(tab)\"\n (keydown.enter)=\"selectTab(tab)\"\n (keydown.space)=\"\n $event.preventDefault(); selectTab(tab)\n \">\n <span\n [nuiTabHeadingCustomTemplateRef]=\"tab.headingRef\"\n >{{ tab.heading }}</span\n >\n </span>\n </div>\n }\n </div>\n </div>\n <div\n class=\"btn-caret-right\"\n [class.disabled]=\"!leftTraverseEnabled\"\n *ngIf=\"hasTraverse\"\n (click)=\"traverseLeft()\">\n <nui-icon\n [icon]=\"'caret-right'\"\n [iconColor]=\"!leftTraverseEnabled ? 'gray' : 'default'\"></nui-icon>\n </div>\n </div>\n <div class=\"nui-tabgroup__content\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".nui-tabgroup{display:flex;height:100%}.nui-tabgroup .nui-tabs{display:flex;justify-content:flex-start;margin-bottom:0;overflow:hidden}.nui-tabgroup .nui-tabs__holder{display:flex;border-bottom:1px solid #d9d9d9;border-bottom:1px solid var(--nui-color-line-default, #d9d9d9);flex-direction:row;background-color:var(--nui-color-bg-content,#fff)}.nui-tabgroup .nui-tabs__holder.vertical{border-right:1px solid #d9d9d9;border-right:1px solid var(--nui-color-line-default, #d9d9d9);border-bottom:0!important;margin-right:5px;margin-bottom:5px}.nui-tabgroup .nui-tabs__holder .btn-caret-right{align-items:center;justify-content:center;display:flex;flex:1;background:#fff;min-width:30px;max-width:30px;min-height:20px;z-index:2;border-bottom:none;cursor:pointer;border-left:1px solid #d9d9d9;border-left:1px solid var(--nui-color-line-default, #d9d9d9);box-shadow:-2px 0 2px #d9d9d9;box-shadow:-2px 0 2px var(--nui-color-line-default, #d9d9d9)}.nui-tabgroup .nui-tabs__holder .btn-caret-right:focus-visible{outline:none;box-shadow:0 0 0 2px #00c4d280}.nui-tabgroup .nui-tabs__holder .btn-caret-right.disabled{cursor:auto}.nui-tabgroup .nui-tabs__holder .btn-caret-left{align-items:center;justify-content:center;display:flex;flex:1;background:#fff;min-width:30px;max-width:30px;min-height:20px;z-index:2;border-bottom:none;cursor:pointer;border-right:1px solid #d9d9d9;border-right:1px solid var(--nui-color-line-default, #d9d9d9);box-shadow:2px 0 2px #d9d9d9;box-shadow:2px 0 2px var(--nui-color-line-default, #d9d9d9)}.nui-tabgroup .nui-tabs__holder .btn-caret-left:focus-visible{outline:none;box-shadow:0 0 0 2px #00c4d280}.nui-tabgroup .nui-tabs__holder .btn-caret-left.disabled{cursor:auto}.nui-tabgroup .nui-tabs__container{display:flex}.nui-tabgroup .nui-tabs__container .nui-tab{margin-bottom:-1px;white-space:nowrap}.nui-tabgroup .nui-tabs__container .nui-tab.horizontal{border-left:none}.nui-tabgroup .nui-tabs__container .nui-tab.active{border-bottom:3px solid #00c4d2;border-bottom:3px solid var(--nui-color-selected-contrast, #00c4d2)}.nui-tabgroup .nui-tabs__container .nui-tab.active>.tab-link{color:var(--nui-color-text-default,#111);background-color:var(--nui-color-bg-transparent,transparent)}.nui-tabgroup .nui-tabs__container .nui-tab.active__vertical{border-left:3px solid #00c4d2;border-left:3px solid var(--nui-color-selected-contrast, #00c4d2)}.nui-tabgroup .nui-tabs__container .nui-tab.disabled>.tab-link{cursor:not-allowed;color:var(--nui-color-text-disabled,rgba(17, 17, 17, .3))}.nui-tabgroup .nui-tabs__container .nui-tab.disabled>.tab-link:hover{background:transparent}.nui-tabgroup .nui-tabs__container .nui-tab:hover{background:var(--nui-color-bg-light-hover,#f2f2f2)}.nui-tabgroup .nui-tabs__container .nui-tab .tab-link{display:block;padding:5px 10px;cursor:pointer;text-transform:uppercase;font-size:13px;font-weight:600;line-height:18px;color:var(--nui-color-text-secondary,rgba(17, 17, 17, .6))}.nui-tabgroup .nui-tabs__container .nui-tab .tab-link:hover{background:var(--nui-color-bg-light-hover,#f2f2f2)}.nui-tabgroup .nui-tabs__container .nui-tab .tab-link:focus-visible{outline:none;box-shadow:0 0 0 2px #00c4d280}.nui-tabgroup__content,.full-width{width:100%}.flex-column{flex-direction:column}.caret-button{align-items:center;justify-content:center;display:flex;flex:1;background:#fff;min-width:30px;max-width:30px;min-height:20px;z-index:2;border-bottom:none;cursor:pointer}.caret-button:focus-visible{outline:none;box-shadow:0 0 0 2px #00c4d280}.caret-button.disabled{cursor:auto}\n"] }]
|
|
19825
19933
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }], propDecorators: { vertical: [{
|
|
19826
19934
|
type: Input
|
|
19827
19935
|
}] } });
|
|
@@ -19847,7 +19955,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
19847
19955
|
// THE SOFTWARE.
|
|
19848
19956
|
/** @ignore */
|
|
19849
19957
|
class TabComponent {
|
|
19850
|
-
|
|
19958
|
+
get tabControlId() {
|
|
19959
|
+
return TAB_ID_PREFIX + this.tabId;
|
|
19960
|
+
}
|
|
19961
|
+
get panelId() {
|
|
19962
|
+
return TAB_PANEL_ID_PREFIX + this.tabId;
|
|
19963
|
+
}
|
|
19851
19964
|
/** Tab active state toggle */
|
|
19852
19965
|
get active() {
|
|
19853
19966
|
return this._active;
|
|
@@ -19866,17 +19979,19 @@ class TabComponent {
|
|
|
19866
19979
|
this._active = active;
|
|
19867
19980
|
this.selected.emit(this);
|
|
19868
19981
|
}
|
|
19982
|
+
get tabIndex() {
|
|
19983
|
+
return this.active ? 0 : -1;
|
|
19984
|
+
}
|
|
19869
19985
|
get idAttr() {
|
|
19870
19986
|
return this.panelId;
|
|
19871
19987
|
}
|
|
19872
19988
|
get ariaLabelledbyAttr() {
|
|
19873
|
-
return this.
|
|
19989
|
+
return this.tabControlId;
|
|
19874
19990
|
}
|
|
19875
19991
|
constructor(tabGroup) {
|
|
19876
19992
|
this.tabGroup = tabGroup;
|
|
19877
|
-
/** Unique
|
|
19878
|
-
this.tabId =
|
|
19879
|
-
this.panelId = `${this.tabId}-panel`;
|
|
19993
|
+
/** Unique identifier for the tab and its panel. Can be supplied by a consumer or generated automatically. */
|
|
19994
|
+
this.tabId = _uniqueId("nui-tab-");
|
|
19880
19995
|
/** Event is fired when tab became active, $event:Tab equals to selected instance of Tab component */
|
|
19881
19996
|
this.selected = new EventEmitter();
|
|
19882
19997
|
/** Event is fired when tab became inactive, $event:Tab equals to deselected instance of Tab component */
|
|
@@ -19886,7 +20001,7 @@ class TabComponent {
|
|
|
19886
20001
|
this.tabGroup.addTab(this);
|
|
19887
20002
|
}
|
|
19888
20003
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: TabComponent, deps: [{ token: TabGroupComponent }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
19889
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: TabComponent, isStandalone: false, selector: "nui-tab", inputs: { heading: "heading", disabled: "disabled", templateRef: "templateRef", active: "active" }, outputs: { selected: "selected", deselected: "deselected" }, host: { properties: { "class.tab-pane": "this.addClass", "attr.role": "this.role", "attr.id": "this.idAttr", "attr.aria-labelledby": "this.ariaLabelledbyAttr" } }, ngImport: i0, template: `
|
|
20004
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: TabComponent, isStandalone: false, selector: "nui-tab", inputs: { tabId: "tabId", heading: "heading", disabled: "disabled", templateRef: "templateRef", active: "active" }, outputs: { selected: "selected", deselected: "deselected" }, host: { properties: { "class.tab-pane": "this.addClass", "attr.role": "this.role", "attr.tabindex": "this.tabIndex", "attr.id": "this.idAttr", "attr.aria-labelledby": "this.ariaLabelledbyAttr" } }, ngImport: i0, template: `
|
|
19890
20005
|
<div [hidden]="!active"><ng-content></ng-content></div>
|
|
19891
20006
|
<ng-template *ngIf="active" [ngTemplateOutlet]="templateRef">
|
|
19892
20007
|
</ng-template>
|
|
@@ -19904,7 +20019,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
19904
20019
|
encapsulation: ViewEncapsulation.None,
|
|
19905
20020
|
standalone: false,
|
|
19906
20021
|
}]
|
|
19907
|
-
}], ctorParameters: () => [{ type: TabGroupComponent }], propDecorators: {
|
|
20022
|
+
}], ctorParameters: () => [{ type: TabGroupComponent }], propDecorators: { tabId: [{
|
|
20023
|
+
type: Input
|
|
20024
|
+
}], heading: [{
|
|
19908
20025
|
type: Input
|
|
19909
20026
|
}], disabled: [{
|
|
19910
20027
|
type: Input
|
|
@@ -19922,6 +20039,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
19922
20039
|
}], role: [{
|
|
19923
20040
|
type: HostBinding,
|
|
19924
20041
|
args: ["attr.role"]
|
|
20042
|
+
}], tabIndex: [{
|
|
20043
|
+
type: HostBinding,
|
|
20044
|
+
args: ["attr.tabindex"]
|
|
19925
20045
|
}], idAttr: [{
|
|
19926
20046
|
type: HostBinding,
|
|
19927
20047
|
args: ["attr.id"]
|
|
@@ -19999,11 +20119,28 @@ class TabHeadingComponent {
|
|
|
19999
20119
|
get active() {
|
|
20000
20120
|
return this._active;
|
|
20001
20121
|
}
|
|
20122
|
+
/**
|
|
20123
|
+
* Identifier used to associate this tab with its consumer-owned panel.
|
|
20124
|
+
* Can be supplied by a consumer or generated automatically.
|
|
20125
|
+
*/
|
|
20126
|
+
set tabId(tabId) {
|
|
20127
|
+
this._tabId = tabId || _uniqueId("nui-tab-heading-");
|
|
20128
|
+
}
|
|
20129
|
+
get tabId() {
|
|
20130
|
+
return this._tabId;
|
|
20131
|
+
}
|
|
20132
|
+
get tabControlId() {
|
|
20133
|
+
return TAB_ID_PREFIX + this.tabId;
|
|
20134
|
+
}
|
|
20135
|
+
get panelId() {
|
|
20136
|
+
return TAB_PANEL_ID_PREFIX + this.tabId;
|
|
20137
|
+
}
|
|
20002
20138
|
constructor(changeDetector, elementRef) {
|
|
20003
20139
|
this.changeDetector = changeDetector;
|
|
20004
20140
|
this.elementRef = elementRef;
|
|
20005
20141
|
/** Event is fired when tab became active, $event:Tab equals to selected instance of Tab component */
|
|
20006
20142
|
this.selected = new EventEmitter();
|
|
20143
|
+
this._tabId = _uniqueId("nui-tab-heading-");
|
|
20007
20144
|
}
|
|
20008
20145
|
selectTab() {
|
|
20009
20146
|
if (!this.disabled) {
|
|
@@ -20014,15 +20151,20 @@ class TabHeadingComponent {
|
|
|
20014
20151
|
if (event.code === KEYBOARD_CODE.ENTER ||
|
|
20015
20152
|
event.code === KEYBOARD_CODE.SPACE) {
|
|
20016
20153
|
event.preventDefault();
|
|
20017
|
-
this.
|
|
20154
|
+
this.selectTab();
|
|
20155
|
+
// Forwards activation to host-level directives such as routerLink,
|
|
20156
|
+
// which only react to clicks.
|
|
20157
|
+
if (!this.disabled) {
|
|
20158
|
+
this.elementRef.nativeElement.click();
|
|
20159
|
+
}
|
|
20018
20160
|
}
|
|
20019
20161
|
}
|
|
20020
20162
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: TabHeadingComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
20021
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: TabHeadingComponent, isStandalone: false, selector: "nui-tab-heading", inputs: { disabled: "disabled", active: "active", tabId: "tabId" }, outputs: { selected: "selected" }, host: { properties: { "class.disabled": "this.isDisabled" } }, ngImport: i0, template: "
|
|
20163
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: TabHeadingComponent, isStandalone: false, selector: "nui-tab-heading", inputs: { disabled: "disabled", active: "active", tabId: "tabId", ariaControls: "ariaControls", ariaLabel: "ariaLabel" }, outputs: { selected: "selected" }, host: { properties: { "class.disabled": "this.isDisabled" } }, ngImport: i0, template: "<div\n class=\"nui-tab-heading\"\n [class.active]=\"active\"\n [tabindex]=\"disabled || !active ? -1 : 0\"\n [attr.aria-selected]=\"active ? 'true' : 'false'\"\n [attr.aria-disabled]=\"disabled ? 'true' : null\"\n [attr.id]=\"tabControlId\"\n [attr.aria-controls]=\"ariaControls\"\n [attr.aria-label]=\"ariaLabel\"\n role=\"tab\"\n (click)=\"selectTab()\"\n (keydown)=\"onKeyDown($event)\">\n <span class=\"tab-link\">\n <ng-content></ng-content>\n </span>\n</div>\n", styles: [":host{max-width:250px;min-height:37px;background-color:var(--nui-color-bg-transparent,transparent)}:host .nui-tab-heading{white-space:nowrap}:host .nui-tab-heading.active{border-left:none;border-bottom:3px solid;border-bottom-color:var(--nui-color-selected-contrast,#00c4d2)}:host .nui-tab-heading.active>.tab-link{color:var(--nui-color-text-default,#111);background-color:var(--nui-color-bg-content,#fff)}:host .nui-tab-heading:focus{outline:none;background:var(--nui-color-bg-transparent-hover,rgba(17, 17, 17, .05))}:host .nui-tab-heading:focus-visible{outline:none;box-shadow:0 0 0 2px #00c4d280}:host .nui-tab-heading .tab-link{background:var(--nui-color-bg-transparent,transparent);color:var(--nui-color-text-secondary,rgba(17, 17, 17, .6));line-height:var(--nui-line-height-default,18px);font-weight:var(--nui-font-weight-semibold,600);font-size:var(--nui-font-size-default,13px);display:block;padding:10px 15px;text-transform:uppercase;min-height:37px;cursor:pointer}:host .nui-tab-heading .tab-link:hover{background:var(--transparent,transparent)}:host.disabled>.nui-tab-heading .tab-link{cursor:not-allowed;color:var(--nui-color-text-disabled,rgba(17, 17, 17, .3))}:host.disabled>.nui-tab-heading .tab-link:hover{background:transparent}:host.disabled:hover{background:transparent}:host:hover{background:var(--nui-color-bg-transparent-hover,rgba(17, 17, 17, .05))}:host-context(nui-tab-heading-group.vertical) .nui-tab-heading{max-width:250px;min-height:40px;border-left:3px solid transparent}:host-context(nui-tab-heading-group.vertical) .nui-tab-heading.active{border-bottom:none;border-left:3px solid;border-left-color:var(--nui-color-selected-contrast,#00c4d2)}:host-context(nui-tab-heading-group.vertical) .nui-tab-heading .tab-link{min-height:40px}\n"] }); }
|
|
20022
20164
|
}
|
|
20023
20165
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: TabHeadingComponent, decorators: [{
|
|
20024
20166
|
type: Component,
|
|
20025
|
-
args: [{ selector: "nui-tab-heading", standalone: false, template: "
|
|
20167
|
+
args: [{ selector: "nui-tab-heading", standalone: false, template: "<div\n class=\"nui-tab-heading\"\n [class.active]=\"active\"\n [tabindex]=\"disabled || !active ? -1 : 0\"\n [attr.aria-selected]=\"active ? 'true' : 'false'\"\n [attr.aria-disabled]=\"disabled ? 'true' : null\"\n [attr.id]=\"tabControlId\"\n [attr.aria-controls]=\"ariaControls\"\n [attr.aria-label]=\"ariaLabel\"\n role=\"tab\"\n (click)=\"selectTab()\"\n (keydown)=\"onKeyDown($event)\">\n <span class=\"tab-link\">\n <ng-content></ng-content>\n </span>\n</div>\n", styles: [":host{max-width:250px;min-height:37px;background-color:var(--nui-color-bg-transparent,transparent)}:host .nui-tab-heading{white-space:nowrap}:host .nui-tab-heading.active{border-left:none;border-bottom:3px solid;border-bottom-color:var(--nui-color-selected-contrast,#00c4d2)}:host .nui-tab-heading.active>.tab-link{color:var(--nui-color-text-default,#111);background-color:var(--nui-color-bg-content,#fff)}:host .nui-tab-heading:focus{outline:none;background:var(--nui-color-bg-transparent-hover,rgba(17, 17, 17, .05))}:host .nui-tab-heading:focus-visible{outline:none;box-shadow:0 0 0 2px #00c4d280}:host .nui-tab-heading .tab-link{background:var(--nui-color-bg-transparent,transparent);color:var(--nui-color-text-secondary,rgba(17, 17, 17, .6));line-height:var(--nui-line-height-default,18px);font-weight:var(--nui-font-weight-semibold,600);font-size:var(--nui-font-size-default,13px);display:block;padding:10px 15px;text-transform:uppercase;min-height:37px;cursor:pointer}:host .nui-tab-heading .tab-link:hover{background:var(--transparent,transparent)}:host.disabled>.nui-tab-heading .tab-link{cursor:not-allowed;color:var(--nui-color-text-disabled,rgba(17, 17, 17, .3))}:host.disabled>.nui-tab-heading .tab-link:hover{background:transparent}:host.disabled:hover{background:transparent}:host:hover{background:var(--nui-color-bg-transparent-hover,rgba(17, 17, 17, .05))}:host-context(nui-tab-heading-group.vertical) .nui-tab-heading{max-width:250px;min-height:40px;border-left:3px solid transparent}:host-context(nui-tab-heading-group.vertical) .nui-tab-heading.active{border-bottom:none;border-left:3px solid;border-left-color:var(--nui-color-selected-contrast,#00c4d2)}:host-context(nui-tab-heading-group.vertical) .nui-tab-heading .tab-link{min-height:40px}\n"] }]
|
|
20026
20168
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }], propDecorators: { isDisabled: [{
|
|
20027
20169
|
type: HostBinding,
|
|
20028
20170
|
args: ["class.disabled"]
|
|
@@ -20032,6 +20174,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
20032
20174
|
type: Input
|
|
20033
20175
|
}], tabId: [{
|
|
20034
20176
|
type: Input
|
|
20177
|
+
}], ariaControls: [{
|
|
20178
|
+
type: Input
|
|
20179
|
+
}], ariaLabel: [{
|
|
20180
|
+
type: Input
|
|
20035
20181
|
}], selected: [{
|
|
20036
20182
|
type: Output
|
|
20037
20183
|
}] } });
|
|
@@ -20082,8 +20228,6 @@ class TabHeadingGroupComponent {
|
|
|
20082
20228
|
this._ro.observe(this.resizableArea.nativeElement);
|
|
20083
20229
|
this._ro.observe(this.el.nativeElement);
|
|
20084
20230
|
});
|
|
20085
|
-
// Making the first tab in group active by default
|
|
20086
|
-
this.setActiveTab();
|
|
20087
20231
|
this.subscribeToSelection();
|
|
20088
20232
|
this._changesSubscription = this._tabs.changes.subscribe((changedTabs) => {
|
|
20089
20233
|
this.setActiveTab();
|
|
@@ -20092,15 +20236,55 @@ class TabHeadingGroupComponent {
|
|
|
20092
20236
|
this.subscribeToSelection();
|
|
20093
20237
|
});
|
|
20094
20238
|
}
|
|
20239
|
+
ngAfterContentInit() {
|
|
20240
|
+
this.setActiveTab();
|
|
20241
|
+
}
|
|
20095
20242
|
setActiveTab() {
|
|
20096
|
-
|
|
20097
|
-
|
|
20098
|
-
|
|
20243
|
+
const activeTab = this.getActiveTab();
|
|
20244
|
+
const firstEnabledTab = this._tabs.find(tab => !tab.disabled);
|
|
20245
|
+
if (activeTab && !activeTab.disabled) {
|
|
20246
|
+
return;
|
|
20247
|
+
}
|
|
20248
|
+
if (activeTab) {
|
|
20249
|
+
activeTab.active = false;
|
|
20250
|
+
}
|
|
20251
|
+
if (firstEnabledTab) {
|
|
20252
|
+
firstEnabledTab.active = true;
|
|
20253
|
+
this.selected.emit(firstEnabledTab.tabId);
|
|
20099
20254
|
}
|
|
20100
20255
|
}
|
|
20101
20256
|
getActiveTab() {
|
|
20102
20257
|
return this._tabs.filter((tab) => tab.active)[0];
|
|
20103
20258
|
}
|
|
20259
|
+
onKeyDown(event) {
|
|
20260
|
+
const tabElement = event.target?.closest?.("[role='tab']");
|
|
20261
|
+
const tabElements = Array.from(this.el.nativeElement.querySelectorAll("[role='tab']"));
|
|
20262
|
+
const currentIndex = tabElements.indexOf(tabElement);
|
|
20263
|
+
if (currentIndex < 0) {
|
|
20264
|
+
return;
|
|
20265
|
+
}
|
|
20266
|
+
const isForwardKey = (!this.vertical && event.code === KEYBOARD_CODE.ARROW_RIGHT) ||
|
|
20267
|
+
(this.vertical && event.code === KEYBOARD_CODE.ARROW_DOWN);
|
|
20268
|
+
const isBackwardKey = (!this.vertical && event.code === KEYBOARD_CODE.ARROW_LEFT) ||
|
|
20269
|
+
(this.vertical && event.code === KEYBOARD_CODE.ARROW_UP);
|
|
20270
|
+
let nextIndex = -1;
|
|
20271
|
+
if (isForwardKey) {
|
|
20272
|
+
nextIndex = this.findEnabledTabIndex(currentIndex, 1);
|
|
20273
|
+
}
|
|
20274
|
+
else if (isBackwardKey) {
|
|
20275
|
+
nextIndex = this.findEnabledTabIndex(currentIndex, -1);
|
|
20276
|
+
}
|
|
20277
|
+
else if (event.code === KEYBOARD_CODE.HOME) {
|
|
20278
|
+
nextIndex = this.findEnabledTabIndex(-1, 1);
|
|
20279
|
+
}
|
|
20280
|
+
else if (event.code === KEYBOARD_CODE.END) {
|
|
20281
|
+
nextIndex = this.findEnabledTabIndex(tabElements.length, -1);
|
|
20282
|
+
}
|
|
20283
|
+
if (nextIndex >= 0) {
|
|
20284
|
+
event.preventDefault();
|
|
20285
|
+
tabElements[nextIndex].focus();
|
|
20286
|
+
}
|
|
20287
|
+
}
|
|
20104
20288
|
checkTraverse() {
|
|
20105
20289
|
this.hasTraverse = this.allowTraverse();
|
|
20106
20290
|
this.changeDetectorRef.detectChanges();
|
|
@@ -20165,6 +20349,18 @@ class TabHeadingGroupComponent {
|
|
|
20165
20349
|
const margin = Math.abs(this.getNumberFromPixels(leftMargin));
|
|
20166
20350
|
return margin < maxAllowedMargin;
|
|
20167
20351
|
}
|
|
20352
|
+
findEnabledTabIndex(startIndex, direction) {
|
|
20353
|
+
const tabs = this._tabs.toArray();
|
|
20354
|
+
const tabCount = tabs.length;
|
|
20355
|
+
let index = startIndex;
|
|
20356
|
+
for (let offset = 0; offset < tabCount; offset++) {
|
|
20357
|
+
index = (index + direction + tabCount) % tabCount;
|
|
20358
|
+
if (!tabs[index].disabled) {
|
|
20359
|
+
return index;
|
|
20360
|
+
}
|
|
20361
|
+
}
|
|
20362
|
+
return -1;
|
|
20363
|
+
}
|
|
20168
20364
|
isTraverseRightAllowed(margin) {
|
|
20169
20365
|
return this.getNumberFromPixels(margin) < 0;
|
|
20170
20366
|
}
|
|
@@ -20188,16 +20384,19 @@ class TabHeadingGroupComponent {
|
|
|
20188
20384
|
return value + increment + "px";
|
|
20189
20385
|
}
|
|
20190
20386
|
ngOnDestroy() {
|
|
20191
|
-
this._changesSubscription
|
|
20387
|
+
this._changesSubscription?.unsubscribe();
|
|
20192
20388
|
this._tabSelectedSubscriptions.forEach(sub => sub.unsubscribe());
|
|
20193
|
-
this._ro
|
|
20389
|
+
this._ro?.disconnect();
|
|
20194
20390
|
}
|
|
20195
20391
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: TabHeadingGroupComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
20196
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: TabHeadingGroupComponent, isStandalone: false, selector: "nui-tab-heading-group", inputs: { vertical: "vertical" }, outputs: { selected: "selected" }, host: { attributes: { "role": "tablist" }, properties: { "class.vertical": "this.isVertical" } }, queries: [{ propertyName: "_tabs", predicate: TabHeadingComponent }], viewQueries: [{ propertyName: "resizableArea", first: true, predicate: ["resizableArea"], descendants: true }], ngImport: i0, template: "<div
|
|
20392
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: TabHeadingGroupComponent, isStandalone: false, selector: "nui-tab-heading-group", inputs: { vertical: "vertical" }, outputs: { selected: "selected" }, host: { attributes: { "role": "tablist" }, properties: { "attr.aria-orientation": "vertical ? 'vertical' : null", "class.vertical": "this.isVertical" } }, queries: [{ propertyName: "_tabs", predicate: TabHeadingComponent }], viewQueries: [{ propertyName: "resizableArea", first: true, predicate: ["resizableArea"], descendants: true }], ngImport: i0, template: "<div\n class=\"nui-tab-headings__holder\"\n (click)=\"$event.preventDefault()\"\n (keydown)=\"onKeyDown($event)\">\n @if (hasTraverse) {\n <!-- a11y: WCAG 2.5.8 Target Size - TODO: NUI-6279 -->\n <div\n class=\"btn-caret-left\"\n [class.disabled]=\"!rightTraverseEnabled\"\n (click)=\"traverseRight()\">\n <nui-icon\n iconSize=\"default\"\n icon=\"caret-left\"\n [iconColor]=\"!rightTraverseEnabled ? 'disabled-gray' : 'gray'\"></nui-icon>\n </div>\n }\n <div class=\"nui-tab-headings\">\n <div\n class=\"nui-tab-headings__container\"\n #resizableArea\n [class.flex-column]=\"vertical\">\n <ng-content></ng-content>\n </div>\n </div>\n @if (hasTraverse) {\n <!-- a11y: WCAG 2.5.8 Target Size - TODO: NUI-6279 -->\n <div\n class=\"btn-caret-right\"\n [class.disabled]=\"!leftTraverseEnabled\"\n (click)=\"traverseLeft()\">\n <nui-icon\n iconSize=\"default\"\n icon=\"caret-right\"\n [iconColor]=\"!leftTraverseEnabled ? 'disabled-gray' : 'gray'\"></nui-icon>\n </div>\n }\n</div>\n", styles: [":host{display:flex;height:100%}:host .nui-tab-headings{display:flex;justify-content:flex-start;margin-bottom:0;overflow:hidden}:host .nui-tab-headings__holder{display:flex;border-bottom:1px solid #d9d9d9;border-bottom:1px solid var(--nui-color-line-default, #d9d9d9);width:100%}:host .nui-tab-headings__holder .btn-caret-right{align-items:center;justify-content:center;display:flex;flex:1;background:var(--nui-color-bg-content,#fff);min-width:40px;max-width:40px;min-height:40px;z-index:0;border-bottom:none;cursor:pointer;border-left:1px solid;border-left-color:var(--nui-color-line-default,#d9d9d9);box-shadow:-6px 0 5px -5px var(--nui-shadow-color, rgba(17, 17, 17, .3))}:host .nui-tab-headings__holder .btn-caret-right:focus-visible{outline:none;box-shadow:0 0 0 2px #00c4d280}:host .nui-tab-headings__holder .btn-caret-right.disabled{cursor:auto}:host .nui-tab-headings__holder .btn-caret-left{border-right:1px solid;border-right-color:var(--nui-color-line-default,#d9d9d9);box-shadow:6px 0 5px -5px var(--nui-shadow-color, rgba(17, 17, 17, .3));align-items:center;justify-content:center;display:flex;flex:1;background:var(--nui-color-bg-content,#fff);min-width:40px;max-width:40px;min-height:40px;z-index:0;border-bottom:none;cursor:pointer}:host .nui-tab-headings__holder .btn-caret-left:focus-visible{outline:none;box-shadow:0 0 0 2px #00c4d280}:host .nui-tab-headings__holder .btn-caret-left.disabled{cursor:auto}:host .nui-tab-headings__container{display:flex}.caret-button{align-items:center;justify-content:center;display:flex;flex:1;background:var(--nui-color-bg-content,#fff);min-width:40px;max-width:40px;min-height:40px;z-index:0;border-bottom:none;cursor:pointer}.caret-button:focus-visible{outline:none;box-shadow:0 0 0 2px #00c4d280}.caret-button.disabled{cursor:auto}:host-context(nui-tab-heading-group.vertical) .nui-tab-headings__holder{flex-direction:column;border-right:1px solid;border-right-color:var(--nui-color-line-default,#d9d9d9);border-bottom:0;background:var(--nui-color-bg-secondary,#fafafa)}:host-context(nui-tab-heading-group.vertical) .nui-tab-headings__container{width:100%}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "nui-icon", inputs: ["iconColor", "brushType", "iconHoverColor", "iconSize", "cssClass", "fillContainer", "status", "childStatus", "icon", "counter", "decorative", "ariaLabel", "explicitRole"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
20197
20393
|
}
|
|
20198
20394
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: TabHeadingGroupComponent, decorators: [{
|
|
20199
20395
|
type: Component,
|
|
20200
|
-
args: [{ selector: "nui-tab-heading-group", changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
20396
|
+
args: [{ selector: "nui-tab-heading-group", changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
20397
|
+
"role": "tablist",
|
|
20398
|
+
"[attr.aria-orientation]": "vertical ? 'vertical' : null",
|
|
20399
|
+
}, standalone: false, template: "<div\n class=\"nui-tab-headings__holder\"\n (click)=\"$event.preventDefault()\"\n (keydown)=\"onKeyDown($event)\">\n @if (hasTraverse) {\n <!-- a11y: WCAG 2.5.8 Target Size - TODO: NUI-6279 -->\n <div\n class=\"btn-caret-left\"\n [class.disabled]=\"!rightTraverseEnabled\"\n (click)=\"traverseRight()\">\n <nui-icon\n iconSize=\"default\"\n icon=\"caret-left\"\n [iconColor]=\"!rightTraverseEnabled ? 'disabled-gray' : 'gray'\"></nui-icon>\n </div>\n }\n <div class=\"nui-tab-headings\">\n <div\n class=\"nui-tab-headings__container\"\n #resizableArea\n [class.flex-column]=\"vertical\">\n <ng-content></ng-content>\n </div>\n </div>\n @if (hasTraverse) {\n <!-- a11y: WCAG 2.5.8 Target Size - TODO: NUI-6279 -->\n <div\n class=\"btn-caret-right\"\n [class.disabled]=\"!leftTraverseEnabled\"\n (click)=\"traverseLeft()\">\n <nui-icon\n iconSize=\"default\"\n icon=\"caret-right\"\n [iconColor]=\"!leftTraverseEnabled ? 'disabled-gray' : 'gray'\"></nui-icon>\n </div>\n }\n</div>\n", styles: [":host{display:flex;height:100%}:host .nui-tab-headings{display:flex;justify-content:flex-start;margin-bottom:0;overflow:hidden}:host .nui-tab-headings__holder{display:flex;border-bottom:1px solid #d9d9d9;border-bottom:1px solid var(--nui-color-line-default, #d9d9d9);width:100%}:host .nui-tab-headings__holder .btn-caret-right{align-items:center;justify-content:center;display:flex;flex:1;background:var(--nui-color-bg-content,#fff);min-width:40px;max-width:40px;min-height:40px;z-index:0;border-bottom:none;cursor:pointer;border-left:1px solid;border-left-color:var(--nui-color-line-default,#d9d9d9);box-shadow:-6px 0 5px -5px var(--nui-shadow-color, rgba(17, 17, 17, .3))}:host .nui-tab-headings__holder .btn-caret-right:focus-visible{outline:none;box-shadow:0 0 0 2px #00c4d280}:host .nui-tab-headings__holder .btn-caret-right.disabled{cursor:auto}:host .nui-tab-headings__holder .btn-caret-left{border-right:1px solid;border-right-color:var(--nui-color-line-default,#d9d9d9);box-shadow:6px 0 5px -5px var(--nui-shadow-color, rgba(17, 17, 17, .3));align-items:center;justify-content:center;display:flex;flex:1;background:var(--nui-color-bg-content,#fff);min-width:40px;max-width:40px;min-height:40px;z-index:0;border-bottom:none;cursor:pointer}:host .nui-tab-headings__holder .btn-caret-left:focus-visible{outline:none;box-shadow:0 0 0 2px #00c4d280}:host .nui-tab-headings__holder .btn-caret-left.disabled{cursor:auto}:host .nui-tab-headings__container{display:flex}.caret-button{align-items:center;justify-content:center;display:flex;flex:1;background:var(--nui-color-bg-content,#fff);min-width:40px;max-width:40px;min-height:40px;z-index:0;border-bottom:none;cursor:pointer}.caret-button:focus-visible{outline:none;box-shadow:0 0 0 2px #00c4d280}.caret-button.disabled{cursor:auto}:host-context(nui-tab-heading-group.vertical) .nui-tab-headings__holder{flex-direction:column;border-right:1px solid;border-right-color:var(--nui-color-line-default,#d9d9d9);border-bottom:0;background:var(--nui-color-bg-secondary,#fafafa)}:host-context(nui-tab-heading-group.vertical) .nui-tab-headings__container{width:100%}\n"] }]
|
|
20201
20400
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }], propDecorators: { _tabs: [{
|
|
20202
20401
|
type: ContentChildren,
|
|
20203
20402
|
args: [TabHeadingComponent]
|
|
@@ -21016,18 +21215,11 @@ class ProgressComponent {
|
|
|
21016
21215
|
this.cancel.emit();
|
|
21017
21216
|
}
|
|
21018
21217
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
21019
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: ProgressComponent, isStandalone: false, selector: "nui-progress", inputs: { show: "show", showProgress: "showProgress", message: "message", showNumber: "showNumber", percent: "percent", allowCancel: "allowCancel", cancelText: "cancelText", helpText: "helpText", stacked: "stacked", compactMode: "compactMode", ariaLabel: "ariaLabel", helpTemplateRef: "helpTemplateRef" }, outputs: { cancel: "cancel" },
|
|
21218
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: ProgressComponent, isStandalone: false, selector: "nui-progress", inputs: { show: "show", showProgress: "showProgress", message: "message", showNumber: "showNumber", percent: "percent", allowCancel: "allowCancel", cancelText: "cancelText", helpText: "helpText", stacked: "stacked", compactMode: "compactMode", ariaLabel: "ariaLabel", helpTemplateRef: "helpTemplateRef" }, outputs: { cancel: "cancel" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"nui-progress\" [class.nui-progress--shown]=\"show\">\n <div\n class=\"nui-progress__header\"\n *ngIf=\"message && !compactMode\"\n [ngClass]=\"{ 'nui-progress__header--stacked': stacked }\">\n <span\n class=\"nui-progress__message nui-text-label nui-progress__header-item\"\n [id]=\"messageId\"\n >{{ message }}</span\n >\n </div>\n\n <div *ngIf=\"show && showProgress\" class=\"nui-progress__container\">\n <div\n class=\"nui-progress__bar\"\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-valuenow]=\"isIndeterminate ? null : percent\"\n [attr.aria-describedby]=\"\n compactMode\n ? null\n : message\n ? messageId\n : helpText || helpTemplateRef\n ? helpId\n : null\n \"\n [ngClass]=\"{\n 'nui-progress--indeterminate': isIndeterminate,\n 'nui-progress__bar--compact': compactMode\n }\">\n <div\n class=\"nui-progress__bar-value\"\n [ngStyle]=\"{ 'width.%': percent }\"\n aria-hidden=\"true\"></div>\n </div>\n\n <div\n *ngIf=\"showNumber && !compactMode\"\n class=\"nui-progress__number nui-progress__header-item nui-text-small\">\n {{ percent }}%\n </div>\n\n <button\n nui-button\n type=\"button\"\n class=\"nui-progress__cancel\"\n icon=\"close\"\n ariaLabel=\"Cancel\"\n i18n-ariaLabel\n *ngIf=\"allowCancel && !compactMode\"\n (click)=\"cancelProgress()\"\n displayStyle=\"action\"\n [nuiTooltip]=\"'Cancel'\"></button>\n </div>\n\n <div\n *ngIf=\"!compactMode\"\n class=\"nui-progress__hint\"\n [class.nui-progress__hint--stacked]=\"stacked\"\n [id]=\"helpId\">\n <ng-container\n [ngTemplateOutlet]=\"\n helpTemplateRef ? helpTemplateRef : defaultHelpTemplateRef\n \"></ng-container>\n </div>\n</div>\n\n<ng-template #defaultHelpTemplateRef>\n <span class=\"nui-text-small-secondary\">{{ helpText }}</span>\n</ng-template>\n", styles: [".nui-progress{display:none}.nui-progress--shown{display:block}.nui-progress__header{text-align:center}.nui-progress__header--stacked{text-align:left}.nui-progress__bar{width:100%;background-color:var(--nui-color-bg-workspace,#f0f0f0);height:5px;margin:5px 0}.nui-progress__bar-value{width:0;height:100%;background-color:var(--nui-color-progress,#00c4d2);transition:1s linear;position:relative;overflow:hidden}.nui-progress__bar--compact{margin:0}.nui-progress__bar:not(.nui-progress--indeterminate) .nui-progress__bar-value:before,.nui-progress__bar:not(.nui-progress--indeterminate) .nui-progress__bar-value:after{content:\"\";position:absolute;width:5px;height:5px;background-color:var(--nui-progress-ripple-color,rgba(255, 255, 255, .4));opacity:0;transform:scale(1);border-radius:100%;transform-origin:0 50%;transition:all .5s ease-in-out}.nui-progress__bar:not(.nui-progress--indeterminate) .nui-progress__bar-value:before{animation:progress-bar-ripple 1.2s ease-in-out .2s infinite}.nui-progress__bar:not(.nui-progress--indeterminate) .nui-progress__bar-value:after{animation:progress-bar-ripple 1.2s ease-in-out .4s infinite}@keyframes progress-bar-ripple{0%{transform:scaleX(0);opacity:.8}30%{opacity:.3}50%{transform:scaleX(200);opacity:0}to{transform:scaleX(200);opacity:0}}.nui-progress__message{display:block}.nui-progress__hint{text-align:center}.nui-progress__hint--stacked{text-align:left}.nui-progress__hint .nui-text-small-secondary{display:block}.nui-progress__number{position:relative;top:-1px;margin-left:5px}.nui-progress__container{max-height:15px;display:flex;align-items:center}.nui-progress--indeterminate .nui-progress__bar-value{animation-name:indeterminate-progress;animation-duration:1.6s;animation-iteration-count:infinite;animation-timing-function:cubic-bezier(.3,.5,.3,.9)}@keyframes indeterminate-progress{50%{margin-left:25%;width:50%}to{margin-left:100%}}.nui-progress__cancel.nui-button{position:relative;top:-1px;margin-left:5px}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: ButtonComponent, selector: "[nui-button]", inputs: ["displayStyle", "icon", "iconColor", "iconRight", "isBusy", "isEmpty", "ariaLabel", "isRepeat", "size"] }, { kind: "directive", type: TooltipDirective, selector: "[nuiTooltip]", inputs: ["tooltipPlacement", "nuiTooltipDisabled", "nuiTooltipEllipsis", "nuiTooltip"], exportAs: ["nuiTooltip"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
21020
21219
|
}
|
|
21021
21220
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ProgressComponent, decorators: [{
|
|
21022
21221
|
type: Component,
|
|
21023
|
-
args: [{ selector: "nui-progress", encapsulation: ViewEncapsulation.None,
|
|
21024
|
-
"role": "progressbar",
|
|
21025
|
-
"aria-valuemin": "0",
|
|
21026
|
-
"aria-valuemax": "100",
|
|
21027
|
-
"[attr.aria-label]": "ariaLabel",
|
|
21028
|
-
"[attr.aria-valuenow]": "percent",
|
|
21029
|
-
"[attr.aria-describedby]": "message ? messageId : (helpText ? helpId : null)",
|
|
21030
|
-
}, standalone: false, template: "<div class=\"nui-progress\" [class.nui-progress--shown]=\"show\">\n <div\n class=\"nui-progress__header\"\n *ngIf=\"message && !compactMode\"\n [ngClass]=\"{ 'nui-progress__header--stacked': stacked }\">\n <span\n class=\"nui-progress__message nui-text-label nui-progress__header-item\"\n [id]=\"messageId\"\n >{{ message }}</span\n >\n </div>\n\n <div\n *ngIf=\"show && showProgress\"\n class=\"nui-progress__container\"\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-valuenow]=\"percent || null\"\n [attr.aria-describedby]=\"message ? messageId : helpText ? helpId : null\">\n <div\n class=\"nui-progress__bar\"\n [ngClass]=\"{\n 'nui-progress--indeterminate': isIndeterminate,\n 'nui-progress__bar--compact': compactMode\n }\">\n <div\n class=\"nui-progress__bar-value\"\n [ngStyle]=\"{ 'width.%': percent }\"\n aria-hidden=\"true\"></div>\n </div>\n\n <div\n *ngIf=\"showNumber && !compactMode\"\n class=\"nui-progress__number nui-progress__header-item nui-text-small\">\n {{ percent }}%\n </div>\n\n <button\n nui-button\n type=\"button\"\n class=\"nui-progress__cancel\"\n icon=\"close\"\n *ngIf=\"allowCancel && !compactMode\"\n (click)=\"cancelProgress()\"\n displayStyle=\"action\"\n [nuiTooltip]=\"'Cancel'\"></button>\n </div>\n\n <div\n *ngIf=\"!compactMode\"\n class=\"nui-progress__hint\"\n [class.nui-progress__hint--stacked]=\"stacked\"\n [id]=\"helpId\">\n <ng-container\n [ngTemplateOutlet]=\"\n helpTemplateRef ? helpTemplateRef : defaultHelpTemplateRef\n \"></ng-container>\n </div>\n</div>\n\n<ng-template #defaultHelpTemplateRef>\n <span class=\"nui-text-small-secondary\" [id]=\"helpId\">{{ helpText }}</span>\n</ng-template>\n", styles: [".nui-progress{display:none}.nui-progress--shown{display:block}.nui-progress__header{text-align:center}.nui-progress__header--stacked{text-align:left}.nui-progress__bar{width:100%;background-color:var(--nui-color-bg-workspace,#f0f0f0);height:5px;margin:5px 0}.nui-progress__bar-value{width:0;height:100%;background-color:var(--nui-color-progress,#00c4d2);transition:1s linear;position:relative;overflow:hidden}.nui-progress__bar--compact{margin:0}.nui-progress__bar:not(.nui-progress--indeterminate) .nui-progress__bar-value:before,.nui-progress__bar:not(.nui-progress--indeterminate) .nui-progress__bar-value:after{content:\"\";position:absolute;width:5px;height:5px;background-color:var(--nui-progress-ripple-color,rgba(255, 255, 255, .4));opacity:0;transform:scale(1);border-radius:100%;transform-origin:0 50%;transition:all .5s ease-in-out}.nui-progress__bar:not(.nui-progress--indeterminate) .nui-progress__bar-value:before{animation:progress-bar-ripple 1.2s ease-in-out .2s infinite}.nui-progress__bar:not(.nui-progress--indeterminate) .nui-progress__bar-value:after{animation:progress-bar-ripple 1.2s ease-in-out .4s infinite}@keyframes progress-bar-ripple{0%{transform:scaleX(0);opacity:.8}30%{opacity:.3}50%{transform:scaleX(200);opacity:0}to{transform:scaleX(200);opacity:0}}.nui-progress__message{display:block}.nui-progress__hint{text-align:center}.nui-progress__hint--stacked{text-align:left}.nui-progress__hint .nui-text-small-secondary{display:block}.nui-progress__number{position:relative;top:-1px;margin-left:5px}.nui-progress__container{max-height:15px;display:flex;align-items:center}.nui-progress--indeterminate .nui-progress__bar-value{animation-name:indeterminate-progress;animation-duration:1.6s;animation-iteration-count:infinite;animation-timing-function:cubic-bezier(.3,.5,.3,.9)}@keyframes indeterminate-progress{50%{margin-left:25%;width:50%}to{margin-left:100%}}.nui-progress__cancel.nui-button{position:relative;top:-1px;margin-left:5px}\n"] }]
|
|
21222
|
+
args: [{ selector: "nui-progress", encapsulation: ViewEncapsulation.None, standalone: false, template: "<div class=\"nui-progress\" [class.nui-progress--shown]=\"show\">\n <div\n class=\"nui-progress__header\"\n *ngIf=\"message && !compactMode\"\n [ngClass]=\"{ 'nui-progress__header--stacked': stacked }\">\n <span\n class=\"nui-progress__message nui-text-label nui-progress__header-item\"\n [id]=\"messageId\"\n >{{ message }}</span\n >\n </div>\n\n <div *ngIf=\"show && showProgress\" class=\"nui-progress__container\">\n <div\n class=\"nui-progress__bar\"\n role=\"progressbar\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-valuenow]=\"isIndeterminate ? null : percent\"\n [attr.aria-describedby]=\"\n compactMode\n ? null\n : message\n ? messageId\n : helpText || helpTemplateRef\n ? helpId\n : null\n \"\n [ngClass]=\"{\n 'nui-progress--indeterminate': isIndeterminate,\n 'nui-progress__bar--compact': compactMode\n }\">\n <div\n class=\"nui-progress__bar-value\"\n [ngStyle]=\"{ 'width.%': percent }\"\n aria-hidden=\"true\"></div>\n </div>\n\n <div\n *ngIf=\"showNumber && !compactMode\"\n class=\"nui-progress__number nui-progress__header-item nui-text-small\">\n {{ percent }}%\n </div>\n\n <button\n nui-button\n type=\"button\"\n class=\"nui-progress__cancel\"\n icon=\"close\"\n ariaLabel=\"Cancel\"\n i18n-ariaLabel\n *ngIf=\"allowCancel && !compactMode\"\n (click)=\"cancelProgress()\"\n displayStyle=\"action\"\n [nuiTooltip]=\"'Cancel'\"></button>\n </div>\n\n <div\n *ngIf=\"!compactMode\"\n class=\"nui-progress__hint\"\n [class.nui-progress__hint--stacked]=\"stacked\"\n [id]=\"helpId\">\n <ng-container\n [ngTemplateOutlet]=\"\n helpTemplateRef ? helpTemplateRef : defaultHelpTemplateRef\n \"></ng-container>\n </div>\n</div>\n\n<ng-template #defaultHelpTemplateRef>\n <span class=\"nui-text-small-secondary\">{{ helpText }}</span>\n</ng-template>\n", styles: [".nui-progress{display:none}.nui-progress--shown{display:block}.nui-progress__header{text-align:center}.nui-progress__header--stacked{text-align:left}.nui-progress__bar{width:100%;background-color:var(--nui-color-bg-workspace,#f0f0f0);height:5px;margin:5px 0}.nui-progress__bar-value{width:0;height:100%;background-color:var(--nui-color-progress,#00c4d2);transition:1s linear;position:relative;overflow:hidden}.nui-progress__bar--compact{margin:0}.nui-progress__bar:not(.nui-progress--indeterminate) .nui-progress__bar-value:before,.nui-progress__bar:not(.nui-progress--indeterminate) .nui-progress__bar-value:after{content:\"\";position:absolute;width:5px;height:5px;background-color:var(--nui-progress-ripple-color,rgba(255, 255, 255, .4));opacity:0;transform:scale(1);border-radius:100%;transform-origin:0 50%;transition:all .5s ease-in-out}.nui-progress__bar:not(.nui-progress--indeterminate) .nui-progress__bar-value:before{animation:progress-bar-ripple 1.2s ease-in-out .2s infinite}.nui-progress__bar:not(.nui-progress--indeterminate) .nui-progress__bar-value:after{animation:progress-bar-ripple 1.2s ease-in-out .4s infinite}@keyframes progress-bar-ripple{0%{transform:scaleX(0);opacity:.8}30%{opacity:.3}50%{transform:scaleX(200);opacity:0}to{transform:scaleX(200);opacity:0}}.nui-progress__message{display:block}.nui-progress__hint{text-align:center}.nui-progress__hint--stacked{text-align:left}.nui-progress__hint .nui-text-small-secondary{display:block}.nui-progress__number{position:relative;top:-1px;margin-left:5px}.nui-progress__container{max-height:15px;display:flex;align-items:center}.nui-progress--indeterminate .nui-progress__bar-value{animation-name:indeterminate-progress;animation-duration:1.6s;animation-iteration-count:infinite;animation-timing-function:cubic-bezier(.3,.5,.3,.9)}@keyframes indeterminate-progress{50%{margin-left:25%;width:50%}to{margin-left:100%}}.nui-progress__cancel.nui-button{position:relative;top:-1px;margin-left:5px}\n"] }]
|
|
21031
21223
|
}], propDecorators: { show: [{
|
|
21032
21224
|
type: Input
|
|
21033
21225
|
}], showProgress: [{
|
|
@@ -24536,8 +24728,15 @@ class ExpanderComponent {
|
|
|
24536
24728
|
get open() {
|
|
24537
24729
|
return this.state === "expanded";
|
|
24538
24730
|
}
|
|
24731
|
+
get expanderToggleAriaLabel() {
|
|
24732
|
+
if (this.header || !this.isCustomHeaderContentEmpty) {
|
|
24733
|
+
return null;
|
|
24734
|
+
}
|
|
24735
|
+
return this.ariaLabel || this.defaultAriaLabel;
|
|
24736
|
+
}
|
|
24539
24737
|
constructor(cdRef) {
|
|
24540
24738
|
this.cdRef = cdRef;
|
|
24739
|
+
this.instanceId = ExpanderComponent.nextUniqueId++;
|
|
24541
24740
|
/**
|
|
24542
24741
|
* Adds "disabled" attribute to expander
|
|
24543
24742
|
*/
|
|
@@ -24555,19 +24754,30 @@ class ExpanderComponent {
|
|
|
24555
24754
|
*/
|
|
24556
24755
|
this.hideLeftBorder = false;
|
|
24557
24756
|
/**
|
|
24558
|
-
* Accessible name
|
|
24559
|
-
*
|
|
24757
|
+
* Accessible name of the toggle for a header without visible text, i.e. when neither
|
|
24758
|
+
* `header` nor projected header content exist. Visible header text always names the
|
|
24759
|
+
* toggle itself (WCAG 2.5.3 Label in Name). A localized default is used when empty.
|
|
24560
24760
|
*/
|
|
24561
24761
|
this.ariaLabel = "";
|
|
24562
24762
|
this.defaultAriaLabel = $localize `Expander`;
|
|
24763
|
+
/**
|
|
24764
|
+
* Exposes the expander body as a `region` landmark, labelled by the header,
|
|
24765
|
+
* only while the expander is open.
|
|
24766
|
+
* Opt-in, because several expanders on one page would otherwise flood
|
|
24767
|
+
* screen reader landmark navigation with near-identical regions.
|
|
24768
|
+
* @see https://www.w3.org/WAI/ARIA/apg/patterns/accordion/
|
|
24769
|
+
*/
|
|
24770
|
+
this.useRegionLandmark = false;
|
|
24563
24771
|
/**
|
|
24564
24772
|
* Is emitted when expander is expanded/collapsed
|
|
24565
24773
|
*/
|
|
24566
24774
|
this.openChange = new EventEmitter();
|
|
24567
24775
|
this.state = "collapsed";
|
|
24568
24776
|
this.isCustomHeaderContentEmpty = false;
|
|
24777
|
+
/** Unique id for the expander header. */
|
|
24778
|
+
this.headerId = `nui-expander-header-${this.instanceId}`;
|
|
24569
24779
|
/** Unique id for the expander body. */
|
|
24570
|
-
this.bodyId = `nui-expander-body-${
|
|
24780
|
+
this.bodyId = `nui-expander-body-${this.instanceId}`;
|
|
24571
24781
|
this.actionKeys = [KEYBOARD_CODE.SPACE, KEYBOARD_CODE.ENTER].map(String);
|
|
24572
24782
|
this.uniqueId = String(++nextExpanderId);
|
|
24573
24783
|
}
|
|
@@ -24594,11 +24804,11 @@ class ExpanderComponent {
|
|
|
24594
24804
|
}
|
|
24595
24805
|
}
|
|
24596
24806
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ExpanderComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
24597
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: ExpanderComponent, isStandalone: false, selector: "nui-expander", inputs: { disabled: "disabled", icon: "icon", header: "header", hideLeftBorder: "hideLeftBorder", ariaLabel: "ariaLabel", open: "open" }, outputs: { openChange: "openChange" }, viewQueries: [{ propertyName: "customHeaderContent", first: true, predicate: ["customHeaderContent"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"nui-expander\" [class.nui-expander--expanded]=\"state === 'expanded'\">\n <div\n class=\"nui-expander__header\"\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-
|
|
24807
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: ExpanderComponent, isStandalone: false, selector: "nui-expander", inputs: { disabled: "disabled", icon: "icon", header: "header", hideLeftBorder: "hideLeftBorder", ariaLabel: "ariaLabel", useRegionLandmark: "useRegionLandmark", open: "open" }, outputs: { openChange: "openChange" }, viewQueries: [{ propertyName: "customHeaderContent", first: true, predicate: ["customHeaderContent"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"nui-expander\" [class.nui-expander--expanded]=\"state === 'expanded'\">\n <div\n class=\"nui-expander__header\"\n tabindex=\"0\"\n role=\"button\"\n [id]=\"headerId\"\n [attr.aria-label]=\"expanderToggleAriaLabel\"\n [attr.aria-expanded]=\"state === 'expanded'\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-controls]=\"bodyId\"\n [class.nui-expander__header--empty]=\"\n !header && isCustomHeaderContentEmpty\n \"\n (keydown)=\"onKeyDown($event)\"\n (click)=\"toggle()\">\n <nui-icon\n class=\"nui-expander__header-icon\"\n [iconColor]=\"getIconColor()\"\n aria-hidden=\"true\"\n icon=\"{{ open ? 'triangle-down' : 'triangle-right' }}\"></nui-icon>\n <div\n class=\"nui-expander__header-content-wrapper\"\n [class.nui-expander__custom-header--empty]=\"\n isCustomHeaderContentEmpty\n \">\n <div\n #customHeaderContent\n class=\"nui-expander__custom-header\"\n [class.nui-expander__custom-header--empty]=\"\n isCustomHeaderContentEmpty\n \">\n <ng-content select=\"[nuiExpanderHeader]\"></ng-content>\n </div>\n <div\n class=\"nui-expander__header-content\"\n *ngIf=\"isCustomHeaderContentEmpty\"\n [class.nui-expander__header-content--with-icon]=\"!!icon\">\n <nui-icon\n class=\"nui-expander__header-content-icon\"\n [icon]=\"icon\"\n *ngIf=\"!!icon\"></nui-icon>\n <span class=\"nui-expander__header-title\">{{ header }}</span>\n </div>\n </div>\n </div>\n <div\n class=\"nui-expander__body-wrapper\"\n [id]=\"bodyId\"\n [attr.role]=\"useRegionLandmark && open ? 'region' : null\"\n [attr.aria-labelledby]=\"useRegionLandmark && open ? headerId : null\">\n <div\n class=\"nui-expander__body\"\n [class.hide-left-border]=\"hideLeftBorder\"\n *ngIf=\"open\"\n @expandContent>\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: [".nui-expander--expanded{padding-bottom:5px}.nui-expander__icon{align-items:center;align-self:flex-start;display:flex;flex-shrink:0;height:30px;justify-content:center;width:30px;margin-left:-7px}.nui-expander__header{align-items:center;border-radius:3px;cursor:pointer;display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.nui-expander__header:hover{background-color:var(--nui-color-bg-transparent-hover,rgba(17, 17, 17, .05))}.nui-expander__header-title{white-space:nowrap;overflow:hidden;-ms-text-overflow:ellipsis;-o-text-overflow:ellipsis;text-overflow:ellipsis;line-height:18px;font-size:13px;font-weight:600;color:#111;color:var(--nui-color-text-default,#111)}.nui-expander__header-icon{align-items:center;align-self:flex-start;display:flex;flex-shrink:0;height:30px;justify-content:center;width:30px}.nui-expander__header-content{align-items:center;display:flex;flex-grow:2;justify-content:flex-start;padding-left:5px;min-width:0;padding-right:5px}.nui-expander__header-content-icon{align-items:center;align-self:flex-start;flex-shrink:0;height:30px;justify-content:center;width:30px}.nui-expander__header-content--with-icon{padding-left:0}.nui-expander__header-content-wrapper{display:flex;flex-grow:2;min-width:0;width:100%}.nui-expander__header.nui-expander__header--empty.nui-expander__header{display:inline-flex}.nui-expander__header.nui-expander__header--empty .nui-expander__header-content{padding-left:0;padding-right:0}.nui-expander__custom-header{width:100%}.nui-expander__custom-header--empty{display:flex;width:auto}.nui-expander__body{border:none;border-left:dotted 2px #d9d9d9;border-left:dotted 2px var(--nui-color-line-default, #d9d9d9);color:#111;color:var(--nui-color-text-default, #111);margin-left:14px;padding-left:14px}.nui-expander__body.hide-left-border{border-left:0}.nui-expander__body.ng-animating{overflow:hidden}.nui-expander__header:focus-visible{outline:none;box-shadow:0 0 0 2px #00c4d280}.nui-expander p{margin:0}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconComponent, selector: "nui-icon", inputs: ["iconColor", "brushType", "iconHoverColor", "iconSize", "cssClass", "fillContainer", "status", "childStatus", "icon", "counter", "decorative", "ariaLabel", "explicitRole"] }], animations: [expandV2], encapsulation: i0.ViewEncapsulation.None }); }
|
|
24598
24808
|
}
|
|
24599
24809
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ExpanderComponent, decorators: [{
|
|
24600
24810
|
type: Component,
|
|
24601
|
-
args: [{ selector: "nui-expander", animations: [expandV2], encapsulation: ViewEncapsulation.None, standalone: false, template: "<div class=\"nui-expander\" [class.nui-expander--expanded]=\"state === 'expanded'\">\n <div\n class=\"nui-expander__header\"\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-
|
|
24811
|
+
args: [{ selector: "nui-expander", animations: [expandV2], encapsulation: ViewEncapsulation.None, standalone: false, template: "<div class=\"nui-expander\" [class.nui-expander--expanded]=\"state === 'expanded'\">\n <div\n class=\"nui-expander__header\"\n tabindex=\"0\"\n role=\"button\"\n [id]=\"headerId\"\n [attr.aria-label]=\"expanderToggleAriaLabel\"\n [attr.aria-expanded]=\"state === 'expanded'\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-controls]=\"bodyId\"\n [class.nui-expander__header--empty]=\"\n !header && isCustomHeaderContentEmpty\n \"\n (keydown)=\"onKeyDown($event)\"\n (click)=\"toggle()\">\n <nui-icon\n class=\"nui-expander__header-icon\"\n [iconColor]=\"getIconColor()\"\n aria-hidden=\"true\"\n icon=\"{{ open ? 'triangle-down' : 'triangle-right' }}\"></nui-icon>\n <div\n class=\"nui-expander__header-content-wrapper\"\n [class.nui-expander__custom-header--empty]=\"\n isCustomHeaderContentEmpty\n \">\n <div\n #customHeaderContent\n class=\"nui-expander__custom-header\"\n [class.nui-expander__custom-header--empty]=\"\n isCustomHeaderContentEmpty\n \">\n <ng-content select=\"[nuiExpanderHeader]\"></ng-content>\n </div>\n <div\n class=\"nui-expander__header-content\"\n *ngIf=\"isCustomHeaderContentEmpty\"\n [class.nui-expander__header-content--with-icon]=\"!!icon\">\n <nui-icon\n class=\"nui-expander__header-content-icon\"\n [icon]=\"icon\"\n *ngIf=\"!!icon\"></nui-icon>\n <span class=\"nui-expander__header-title\">{{ header }}</span>\n </div>\n </div>\n </div>\n <div\n class=\"nui-expander__body-wrapper\"\n [id]=\"bodyId\"\n [attr.role]=\"useRegionLandmark && open ? 'region' : null\"\n [attr.aria-labelledby]=\"useRegionLandmark && open ? headerId : null\">\n <div\n class=\"nui-expander__body\"\n [class.hide-left-border]=\"hideLeftBorder\"\n *ngIf=\"open\"\n @expandContent>\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: [".nui-expander--expanded{padding-bottom:5px}.nui-expander__icon{align-items:center;align-self:flex-start;display:flex;flex-shrink:0;height:30px;justify-content:center;width:30px;margin-left:-7px}.nui-expander__header{align-items:center;border-radius:3px;cursor:pointer;display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.nui-expander__header:hover{background-color:var(--nui-color-bg-transparent-hover,rgba(17, 17, 17, .05))}.nui-expander__header-title{white-space:nowrap;overflow:hidden;-ms-text-overflow:ellipsis;-o-text-overflow:ellipsis;text-overflow:ellipsis;line-height:18px;font-size:13px;font-weight:600;color:#111;color:var(--nui-color-text-default,#111)}.nui-expander__header-icon{align-items:center;align-self:flex-start;display:flex;flex-shrink:0;height:30px;justify-content:center;width:30px}.nui-expander__header-content{align-items:center;display:flex;flex-grow:2;justify-content:flex-start;padding-left:5px;min-width:0;padding-right:5px}.nui-expander__header-content-icon{align-items:center;align-self:flex-start;flex-shrink:0;height:30px;justify-content:center;width:30px}.nui-expander__header-content--with-icon{padding-left:0}.nui-expander__header-content-wrapper{display:flex;flex-grow:2;min-width:0;width:100%}.nui-expander__header.nui-expander__header--empty.nui-expander__header{display:inline-flex}.nui-expander__header.nui-expander__header--empty .nui-expander__header-content{padding-left:0;padding-right:0}.nui-expander__custom-header{width:100%}.nui-expander__custom-header--empty{display:flex;width:auto}.nui-expander__body{border:none;border-left:dotted 2px #d9d9d9;border-left:dotted 2px var(--nui-color-line-default, #d9d9d9);color:#111;color:var(--nui-color-text-default, #111);margin-left:14px;padding-left:14px}.nui-expander__body.hide-left-border{border-left:0}.nui-expander__body.ng-animating{overflow:hidden}.nui-expander__header:focus-visible{outline:none;box-shadow:0 0 0 2px #00c4d280}.nui-expander p{margin:0}\n"] }]
|
|
24602
24812
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { disabled: [{
|
|
24603
24813
|
type: Input
|
|
24604
24814
|
}], icon: [{
|
|
@@ -24609,6 +24819,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
24609
24819
|
type: Input
|
|
24610
24820
|
}], ariaLabel: [{
|
|
24611
24821
|
type: Input
|
|
24822
|
+
}], useRegionLandmark: [{
|
|
24823
|
+
type: Input
|
|
24612
24824
|
}], open: [{
|
|
24613
24825
|
type: Input
|
|
24614
24826
|
}], openChange: [{
|
|
@@ -32744,7 +32956,7 @@ class ExampleWrapperComponent {
|
|
|
32744
32956
|
component.fileType === fileType)?.fileContent ?? "");
|
|
32745
32957
|
}
|
|
32746
32958
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ExampleWrapperComponent, deps: [{ token: SourcesService }, { token: CodeSandboxService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
32747
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: ExampleWrapperComponent, isStandalone: false, selector: "nui-example-wrapper", inputs: { filenamePrefix: "filenamePrefix", exampleTitle: "exampleTitle", showSource: "showSource" }, ngImport: i0, template: "<div class=\"nui-example-wrapper__container\">\n <div class=\"nui-example-wrapper__header\">\n <h4 class=\"nui-example-wrapper__title\">{{ exampleTitle }}</h4>\n <div>\n <button\n nui-button\n type=\"button\"\n displayStyle=\"action\"\n icon=\"{{\n showSource ? 'double-caret-up' : 'double-caret-down'\n }}\"\n ariaLabel=\"Toggle source code\"\n i18n-ariaLabel\n [nuiTooltip]=\"getTooltip()\"\n tooltipPlacement=\"bottom\"\n (click)=\"showSource = !showSource\"></button>\n <button\n nui-button\n type=\"button\"\n displayStyle=\"action\"\n icon=\"external-link\"\n ariaLabel=\"Open in CodeSandbox\"\n i18n-ariaLabel\n nuiTooltip=\"Open in Code Sandbox (only self-contained examples are opened properly)\"\n tooltipPlacement=\"bottom\"\n (click)=\"openCodeSandboxExample()\"></button>\n </div>\n </div>\n <div *ngIf=\"showSource\" class=\"nui-example-wrapper__source\">\n <nui-tab-group>\n <nui-tab *ngIf=\"!!getExampleComponents('html')\" heading=\"HTML\">\n <div class=\"media-body\">\n <nui-copy-text\n fileContent=\"{{ getExampleComponents('html') }}\"></nui-copy-text>\n <nui-example-code\n language=\"html\"\n [code]=\"getExampleComponents('html')\" />\n </div>\n </nui-tab>\n <nui-tab *ngIf=\"!!getExampleComponents('ts')\" heading=\"Typescript\">\n <nui-copy-text\n fileContent=\"{{ getExampleComponents('ts') }}\"></nui-copy-text>\n <div class=\"media-body\">\n <nui-example-code\n language=\"typescript\"\n [code]=\"getExampleComponents('ts')\" />\n </div>\n </nui-tab>\n <nui-tab *ngIf=\"!!getExampleComponents('less')\" heading=\"Less\">\n <nui-copy-text\n fileContent=\"{{ getExampleComponents('less') }}\"></nui-copy-text>\n <div class=\"media-body\">\n <nui-example-code\n *ngIf=\"!!getExampleComponents('less'); else noLess\"\n [code]=\"getExampleComponents('less')\" />\n <ng-template #noLess>\n <nui-image image=\"no-data-to-show\"></nui-image>\n </ng-template>\n </div>\n </nui-tab>\n </nui-tab-group>\n </div>\n <div class=\"nui-example-wrapper__content\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".nui-example-wrapper__theme{display:inline-block}.nui-example-wrapper__content{background-color:var(--nui-color-bg-light,#fff)}.nui-example-wrapper__container{display:flex;flex-direction:column;border:1px solid;border-color:var(--nui-color-line-default,#d9d9d9);box-shadow:0 2px 2px #1111114d;margin-bottom:20px}.nui-example-wrapper__header{display:flex;flex-direction:row;background-color:var(--page-header-border-color,#d9d9d9);color:var(--nui-color-line-default,#d9d9d9);padding:5px 10px}.nui-example-wrapper__header button{outline:none}.nui-example-wrapper__title{flex-grow:1}.nui-example-wrapper__content{padding:20px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TabComponent, selector: "nui-tab", inputs: ["heading", "disabled", "templateRef", "active"], outputs: ["selected", "deselected"] }, { kind: "component", type: TabGroupComponent, selector: "nui-tab-group", inputs: ["vertical"] }, { kind: "directive", type: TooltipDirective, selector: "[nuiTooltip]", inputs: ["tooltipPlacement", "nuiTooltipDisabled", "nuiTooltipEllipsis", "nuiTooltip"], exportAs: ["nuiTooltip"] }, { kind: "component", type: ButtonComponent, selector: "[nui-button]", inputs: ["displayStyle", "icon", "iconColor", "iconRight", "isBusy", "isEmpty", "ariaLabel", "isRepeat", "size"] }, { kind: "component", type: ImageComponent, selector: "nui-image", inputs: ["image", "description", "float", "margin", "isWatermark", "width", "height", "autoFill", "role"] }, { kind: "component", type: CopyTextComponent, selector: "nui-copy-text", inputs: ["fileContent"] }, { kind: "component", type: ExampleCodeComponent, selector: "nui-example-code", inputs: ["language", "code"] }] }); }
|
|
32959
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.21", type: ExampleWrapperComponent, isStandalone: false, selector: "nui-example-wrapper", inputs: { filenamePrefix: "filenamePrefix", exampleTitle: "exampleTitle", showSource: "showSource" }, ngImport: i0, template: "<div class=\"nui-example-wrapper__container\">\n <div class=\"nui-example-wrapper__header\">\n <h4 class=\"nui-example-wrapper__title\">{{ exampleTitle }}</h4>\n <div>\n <button\n nui-button\n type=\"button\"\n displayStyle=\"action\"\n icon=\"{{\n showSource ? 'double-caret-up' : 'double-caret-down'\n }}\"\n ariaLabel=\"Toggle source code\"\n i18n-ariaLabel\n [nuiTooltip]=\"getTooltip()\"\n tooltipPlacement=\"bottom\"\n (click)=\"showSource = !showSource\"></button>\n <button\n nui-button\n type=\"button\"\n displayStyle=\"action\"\n icon=\"external-link\"\n ariaLabel=\"Open in CodeSandbox\"\n i18n-ariaLabel\n nuiTooltip=\"Open in Code Sandbox (only self-contained examples are opened properly)\"\n tooltipPlacement=\"bottom\"\n (click)=\"openCodeSandboxExample()\"></button>\n </div>\n </div>\n <div *ngIf=\"showSource\" class=\"nui-example-wrapper__source\">\n <nui-tab-group>\n <nui-tab *ngIf=\"!!getExampleComponents('html')\" heading=\"HTML\">\n <div class=\"media-body\">\n <nui-copy-text\n fileContent=\"{{ getExampleComponents('html') }}\"></nui-copy-text>\n <nui-example-code\n language=\"html\"\n [code]=\"getExampleComponents('html')\" />\n </div>\n </nui-tab>\n <nui-tab *ngIf=\"!!getExampleComponents('ts')\" heading=\"Typescript\">\n <nui-copy-text\n fileContent=\"{{ getExampleComponents('ts') }}\"></nui-copy-text>\n <div class=\"media-body\">\n <nui-example-code\n language=\"typescript\"\n [code]=\"getExampleComponents('ts')\" />\n </div>\n </nui-tab>\n <nui-tab *ngIf=\"!!getExampleComponents('less')\" heading=\"Less\">\n <nui-copy-text\n fileContent=\"{{ getExampleComponents('less') }}\"></nui-copy-text>\n <div class=\"media-body\">\n <nui-example-code\n *ngIf=\"!!getExampleComponents('less'); else noLess\"\n [code]=\"getExampleComponents('less')\" />\n <ng-template #noLess>\n <nui-image image=\"no-data-to-show\"></nui-image>\n </ng-template>\n </div>\n </nui-tab>\n </nui-tab-group>\n </div>\n <div class=\"nui-example-wrapper__content\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".nui-example-wrapper__theme{display:inline-block}.nui-example-wrapper__content{background-color:var(--nui-color-bg-light,#fff)}.nui-example-wrapper__container{display:flex;flex-direction:column;border:1px solid;border-color:var(--nui-color-line-default,#d9d9d9);box-shadow:0 2px 2px #1111114d;margin-bottom:20px}.nui-example-wrapper__header{display:flex;flex-direction:row;background-color:var(--page-header-border-color,#d9d9d9);color:var(--nui-color-line-default,#d9d9d9);padding:5px 10px}.nui-example-wrapper__header button{outline:none}.nui-example-wrapper__title{flex-grow:1}.nui-example-wrapper__content{padding:20px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TabComponent, selector: "nui-tab", inputs: ["tabId", "heading", "disabled", "templateRef", "active"], outputs: ["selected", "deselected"] }, { kind: "component", type: TabGroupComponent, selector: "nui-tab-group", inputs: ["vertical"] }, { kind: "directive", type: TooltipDirective, selector: "[nuiTooltip]", inputs: ["tooltipPlacement", "nuiTooltipDisabled", "nuiTooltipEllipsis", "nuiTooltip"], exportAs: ["nuiTooltip"] }, { kind: "component", type: ButtonComponent, selector: "[nui-button]", inputs: ["displayStyle", "icon", "iconColor", "iconRight", "isBusy", "isEmpty", "ariaLabel", "isRepeat", "size"] }, { kind: "component", type: ImageComponent, selector: "nui-image", inputs: ["image", "description", "float", "margin", "isWatermark", "width", "height", "autoFill", "role"] }, { kind: "component", type: CopyTextComponent, selector: "nui-copy-text", inputs: ["fileContent"] }, { kind: "component", type: ExampleCodeComponent, selector: "nui-example-code", inputs: ["language", "code"] }] }); }
|
|
32748
32960
|
}
|
|
32749
32961
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: ExampleWrapperComponent, decorators: [{
|
|
32750
32962
|
type: Component,
|