carbon-components-angular 5.11.1 → 5.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/docs/documentation/components/ContentSwitcher.html +1 -1
  2. package/docs/documentation/components/Toggle.html +188 -197
  3. package/docs/documentation/coverage.html +1 -1
  4. package/docs/documentation/js/search/search_index.js +2 -2
  5. package/docs/documentation/modules/CodeSnippetModule/dependencies.svg +4 -4
  6. package/docs/documentation/modules/CodeSnippetModule.html +4 -4
  7. package/docs/documentation/modules/DatePickerInputModule/dependencies.svg +38 -42
  8. package/docs/documentation/modules/DatePickerInputModule.html +38 -42
  9. package/docs/documentation/modules/FileUploaderModule/dependencies.svg +4 -4
  10. package/docs/documentation/modules/FileUploaderModule.html +4 -4
  11. package/docs/documentation/modules/NumberModule/dependencies.svg +4 -4
  12. package/docs/documentation/modules/NumberModule.html +4 -4
  13. package/docs/documentation/modules/PanelModule/dependencies.svg +36 -36
  14. package/docs/documentation/modules/PanelModule.html +36 -36
  15. package/docs/documentation/modules/RadioModule/dependencies.svg +49 -49
  16. package/docs/documentation/modules/RadioModule.html +49 -49
  17. package/docs/documentation/modules/SelectModule/dependencies.svg +43 -43
  18. package/docs/documentation/modules/SelectModule.html +43 -43
  19. package/docs/documentation/modules/SliderModule/dependencies.svg +4 -4
  20. package/docs/documentation/modules/SliderModule.html +4 -4
  21. package/docs/documentation/modules/TableModule/dependencies.svg +216 -216
  22. package/docs/documentation/modules/TableModule.html +216 -216
  23. package/docs/documentation/modules/TabsModule/dependencies.svg +4 -4
  24. package/docs/documentation/modules/TabsModule.html +4 -4
  25. package/docs/documentation/modules/TagModule/dependencies.svg +29 -29
  26. package/docs/documentation/modules/TagModule.html +29 -29
  27. package/docs/documentation/modules/ThemeModule/dependencies.svg +14 -14
  28. package/docs/documentation/modules/ThemeModule.html +14 -14
  29. package/docs/documentation/modules/TilesModule/dependencies.svg +8 -8
  30. package/docs/documentation/modules/TilesModule.html +8 -8
  31. package/docs/documentation/modules/TimePickerModule/dependencies.svg +26 -26
  32. package/docs/documentation/modules/TimePickerModule.html +26 -26
  33. package/docs/documentation/modules/ToggletipModule/dependencies.svg +37 -37
  34. package/docs/documentation/modules/ToggletipModule.html +37 -37
  35. package/docs/documentation.json +57 -70
  36. package/docs/storybook/{1895.69e2c275.iframe.bundle.js → 1895.f908bfb8.iframe.bundle.js} +1 -1
  37. package/docs/storybook/content-switcher-content-switcher-stories.d8a420bd.iframe.bundle.js +1 -0
  38. package/docs/storybook/iframe.html +2 -2
  39. package/docs/storybook/main.css +173 -75
  40. package/docs/storybook/main.fe6c3f7d.iframe.bundle.js +1 -0
  41. package/docs/storybook/project.json +1 -1
  42. package/docs/storybook/{runtime~main.902da3f3.iframe.bundle.js → runtime~main.73b5bfb0.iframe.bundle.js} +1 -1
  43. package/docs/storybook/toggle-toggle-stories.3f40e3b9.iframe.bundle.js +1 -0
  44. package/esm2020/content-switcher/content-switcher.component.mjs +2 -2
  45. package/esm2020/toggle/toggle.component.mjs +103 -83
  46. package/fesm2015/carbon-components-angular-content-switcher.mjs +1 -1
  47. package/fesm2015/carbon-components-angular-content-switcher.mjs.map +1 -1
  48. package/fesm2015/carbon-components-angular-toggle.mjs +102 -82
  49. package/fesm2015/carbon-components-angular-toggle.mjs.map +1 -1
  50. package/fesm2020/carbon-components-angular-content-switcher.mjs +1 -1
  51. package/fesm2020/carbon-components-angular-content-switcher.mjs.map +1 -1
  52. package/fesm2020/carbon-components-angular-toggle.mjs +102 -82
  53. package/fesm2020/carbon-components-angular-toggle.mjs.map +1 -1
  54. package/package.json +1 -1
  55. package/toggle/toggle.component.d.ts +3 -2
  56. package/docs/storybook/content-switcher-content-switcher-stories.0e556d81.iframe.bundle.js +0 -1
  57. package/docs/storybook/main.3dbeb194.iframe.bundle.js +0 -1
  58. package/docs/storybook/toggle-toggle-stories.3af803a8.iframe.bundle.js +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"carbon-components-angular-toggle.mjs","sources":["../../src/toggle/toggle.component.ts","../../src/toggle/toggle.module.ts","../../src/toggle/carbon-components-angular-toggle.ts"],"sourcesContent":["import { Checkbox } from \"carbon-components-angular/checkbox\";\nimport {\n\tChangeDetectorRef,\n\tComponent,\n\tInput,\n\tHostBinding,\n\tTemplateRef\n} from \"@angular/core\";\nimport { NG_VALUE_ACCESSOR } from \"@angular/forms\";\n\nimport { I18n } from \"carbon-components-angular/i18n\";\nimport { Observable } from \"rxjs\";\n\n/**\n * Defines the set of states for a toggle component.\n */\nexport enum ToggleState {\n\tInit,\n\tChecked,\n\tUnchecked\n}\n\n/**\n * [See demo](../../?path=/story/components-toggle--basic)\n *\n * ```html\n * <cds-toggle [(ngModel)]=\"toggleState\">Toggle</cds-toggle>\n * ```\n */\n@Component({\n\tselector: \"cds-toggle, ibm-toggle\",\n\ttemplate: `\n\t\t<button\n\t\t\tclass=\"cds--toggle__button\"\n\t\t\t[disabled]=\"disabled\"\n\t\t\t[id]=\"id\"\n\t\t\trole=\"switch\"\n\t\t\ttype=\"button\"\n\t\t\t[attr.aria-checked]=\"checked\"\n\t\t\t(click)=\"onClick($event)\">\n\t\t</button>\n\t\t<label\n\t\t\tclass=\"cds--toggle__label\"\n\t\t\t[for]=\"id\">\n\t\t\t<span\n\t\t\t\tclass=\"cds--toggle__label-text\"\n\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t'cds--visually-hidden': hideLabel\n\t\t\t\t}\">\n\t\t\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t\t\t<ng-template *ngIf=\"isTemplate(label)\" [ngTemplateOutlet]=\"label\"></ng-template>\n\t\t\t</span>\n\t\t\t<div\n\t\t\t\tclass=\"cds--toggle__appearance\"\n\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t'cds--toggle__appearance--sm': size === 'sm'\n\t\t\t\t}\">\n\t\t\t\t<div\n\t\t\t\t\tclass=\"cds--toggle__switch\"\n\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t'cds--toggle__switch--checked': checked\n\t\t\t\t\t}\">\n\t\t\t\t\t<svg\n\t\t\t\t\t\t*ngIf=\"size === 'sm'\"\n\t\t\t\t\t\tclass='cds--toggle__check'\n\t\t\t\t\t\twidth=\"6px\"\n\t\t\t\t\t\theight=\"5px\"\n\t\t\t\t\t\tviewBox=\"0 0 6 5\">\n\t\t\t\t\t\t<path d=\"M2.2 2.7L5 0 6 1 2.2 5 0 2.7 1 1.5z\" />\n\t\t\t\t\t</svg>\n\t\t\t\t</div>\n\t\t\t\t<span class=\"cds--toggle__text\">\n\t\t\t\t\t{{(hideLabel ? label : (getCheckedText() | async))}}\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t</label>\n\t`,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: Toggle,\n\t\t\tmulti: true\n\t\t}\n\t]\n})\nexport class Toggle extends Checkbox {\n\t/**\n\t * Variable used for creating unique ids for toggle components.\n\t */\n\tstatic toggleCount = 0;\n\n\t/**\n\t * Text that is set on the left side of the toggle.\n\t */\n\t@Input()\n\tset offText(value: string | Observable<string>) {\n\t\tthis._offValues.override(value);\n\t}\n\n\tget offText() {\n\t\treturn this._offValues.value;\n\t}\n\n\t/**\n\t * Text that is set on the right side of the toggle.\n\t */\n\t@Input()\n\tset onText(value: string | Observable<string>) {\n\t\tthis._onValues.override(value);\n\t}\n\n\tget onText() {\n\t\treturn this._onValues.value;\n\t}\n\t/**\n\t * Text that is set as the label of the toggle.\n\t */\n\t@Input() label: string | TemplateRef<any>;\n\t/**\n\t * Size of the toggle component.\n\t */\n\t@Input() size: \"sm\" | \"md\" = \"md\";\n\t/**\n\t * Set to `true` to hide the toggle label & set toggle on/off text to label.\n\t */\n\t@Input() hideLabel = false;\n\n\t@HostBinding(\"class.cds--toggle\") toggleClass = true;\n\t@HostBinding(\"class.cds--toggle--disabled\") get disabledClass () {\n\t\treturn this.disabled;\n\t}\n\n\t@HostBinding(\"class.cds--form-item\") formItem = true;\n\n\t/**\n\t * The unique id allocated to the `Toggle`.\n\t */\n\tid = \"toggle-\" + Toggle.toggleCount;\n\n\tprotected _offValues = this.i18n.getOverridable(\"TOGGLE.OFF\");\n\tprotected _onValues = this.i18n.getOverridable(\"TOGGLE.ON\");\n\t/**\n\t * Creates an instance of Toggle.\n\t */\n\tconstructor(protected changeDetectorRef: ChangeDetectorRef, protected i18n: I18n) {\n\t\tsuper(changeDetectorRef);\n\t\tToggle.toggleCount++;\n\t}\n\n\t/**\n\t * `ControlValueAccessor` method to programmatically disable the toggle input.\n\t *\n\t * ex: `this.formGroup.get(\"myToggle\").disable();`\n\t *\n\t * @param isDisabled `true` to disable the input\n\t */\n\tsetDisabledState(isDisabled: boolean) {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\tgetOffText(): Observable<string> {\n\t\treturn this._offValues.subject;\n\t}\n\n\tgetOnText(): Observable<string> {\n\t\treturn this._onValues.subject;\n\t}\n\n\tgetCheckedText(): Observable<string> {\n\t\tif (this.checked) {\n\t\t\treturn this._onValues.subject;\n\t\t}\n\t\treturn this._offValues.subject;\n\t}\n\n\t/**\n\t * Creates instance of `ToggleChange` used to propagate the change event.\n\t */\n\temitChangeEvent() {\n\t\tthis.checkedChange.emit(this.checked);\n\t\tthis.propagateChange(this.checked);\n\t}\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n}\n","// modules\nimport { NgModule } from \"@angular/core\";\nimport { FormsModule } from \"@angular/forms\";\nimport { CommonModule } from \"@angular/common\";\n\n// imports\nimport { I18nModule } from \"carbon-components-angular/i18n\";\nimport { Toggle } from \"./toggle.component\";\n\n@NgModule({\n\tdeclarations: [\n\t\tToggle\n\t],\n\texports: [\n\t\tToggle\n\t],\n\timports: [\n\t\tCommonModule,\n\t\tFormsModule,\n\t\tI18nModule\n\t]\n})\nexport class ToggleModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';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AAW;AACX,QAAA,UAAU,aALV,MAAM,CAAA,EAAA,CAAA,CAAA;AAQK,YAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,YALvB,YAAY;QACZ,WAAW;QACX,UAAU,CAAA,EAAA,CAAA,CAAA;2FAGC,YAAY,EAAA,UAAA,EAAA,CAAA;kBAbxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,YAAY,EAAE;wBACb,MAAM;AACN,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACR,MAAM;AACN,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACR,YAAY;wBACZ,WAAW;wBACX,UAAU;AACV,qBAAA;AACD,iBAAA,CAAA;;;ACrBD;;AAEG;;;;"}
1
+ {"version":3,"file":"carbon-components-angular-toggle.mjs","sources":["../../src/toggle/toggle.component.ts","../../src/toggle/toggle.module.ts","../../src/toggle/carbon-components-angular-toggle.ts"],"sourcesContent":["import { Checkbox } from \"carbon-components-angular/checkbox\";\nimport {\n\tChangeDetectorRef,\n\tComponent,\n\tInput,\n\tHostBinding,\n\tTemplateRef\n} from \"@angular/core\";\nimport { NG_VALUE_ACCESSOR } from \"@angular/forms\";\n\nimport { I18n } from \"carbon-components-angular/i18n\";\nimport { Observable } from \"rxjs\";\n\n/**\n * Defines the set of states for a toggle component.\n */\nexport enum ToggleState {\n\tInit,\n\tChecked,\n\tUnchecked\n}\n\n/**\n * [See demo](../../?path=/story/components-toggle--basic)\n *\n * ```html\n * <cds-toggle [(ngModel)]=\"toggleState\">Toggle</cds-toggle>\n * ```\n */\n@Component({\n\tselector: \"cds-toggle, ibm-toggle\",\n\ttemplate: `\n\t\t<ng-container *ngIf=\"!skeleton; else skeletonTemplate;\">\n\t\t\t<button\n\t\t\t\tclass=\"cds--toggle__button\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t[id]=\"id\"\n\t\t\t\trole=\"switch\"\n\t\t\t\ttype=\"button\"\n\t\t\t\t[attr.aria-checked]=\"checked\"\n\t\t\t\t(click)=\"onClick($event)\">\n\t\t\t</button>\n\t\t\t<label\n\t\t\t\tclass=\"cds--toggle__label\"\n\t\t\t\t[for]=\"id\">\n\t\t\t\t<span\n\t\t\t\t\tclass=\"cds--toggle__label-text\"\n\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t'cds--visually-hidden': hideLabel\n\t\t\t\t\t}\">\n\t\t\t\t\t<ng-container *ngIf=\"!isTemplate(label)\">{{label}}</ng-container>\n\t\t\t\t\t<ng-template *ngIf=\"isTemplate(label)\" [ngTemplateOutlet]=\"label\"></ng-template>\n\t\t\t\t</span>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"cds--toggle__appearance\"\n\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t'cds--toggle__appearance--sm': size === 'sm'\n\t\t\t\t\t}\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass=\"cds--toggle__switch\"\n\t\t\t\t\t\t[ngClass]=\"{\n\t\t\t\t\t\t\t'cds--toggle__switch--checked': checked\n\t\t\t\t\t\t}\">\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t*ngIf=\"size === 'sm'\"\n\t\t\t\t\t\t\tclass='cds--toggle__check'\n\t\t\t\t\t\t\twidth=\"6px\"\n\t\t\t\t\t\t\theight=\"5px\"\n\t\t\t\t\t\t\tviewBox=\"0 0 6 5\">\n\t\t\t\t\t\t\t<path d=\"M2.2 2.7L5 0 6 1 2.2 5 0 2.7 1 1.5z\" />\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</div>\n\t\t\t\t\t<span class=\"cds--toggle__text\">\n\t\t\t\t\t\t{{(hideLabel ? label : (getCheckedText() | async))}}\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t</label>\n\t\t</ng-container>\n\t\t<ng-template #skeletonTemplate>\n\t\t\t<div class=\"cds--toggle__skeleton-circle\"></div>\n\t\t\t<div class=\"cds--toggle__skeleton-rectangle\"></div>\n\t\t</ng-template>\n\t`,\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: Toggle,\n\t\t\tmulti: true\n\t\t}\n\t]\n})\nexport class Toggle extends Checkbox {\n\t/**\n\t * Variable used for creating unique ids for toggle components.\n\t */\n\tstatic toggleCount = 0;\n\n\t/**\n\t * Text that is set on the left side of the toggle.\n\t */\n\t@Input()\n\tset offText(value: string | Observable<string>) {\n\t\tthis._offValues.override(value);\n\t}\n\n\tget offText() {\n\t\treturn this._offValues.value;\n\t}\n\n\t/**\n\t * Text that is set on the right side of the toggle.\n\t */\n\t@Input()\n\tset onText(value: string | Observable<string>) {\n\t\tthis._onValues.override(value);\n\t}\n\n\tget onText() {\n\t\treturn this._onValues.value;\n\t}\n\t/**\n\t * Text that is set as the label of the toggle.\n\t */\n\t@Input() label: string | TemplateRef<any>;\n\t/**\n\t * Size of the toggle component.\n\t */\n\t@Input() size: \"sm\" | \"md\" = \"md\";\n\t/**\n\t * Set to `true` to hide the toggle label & set toggle on/off text to label.\n\t */\n\t@Input() hideLabel = false;\n\n\t@HostBinding(\"class.cds--toggle--skeleton\") @Input() skeleton = false;\n\n\t@HostBinding(\"class.cds--toggle\") toggleClass = true;\n\t@HostBinding(\"class.cds--toggle--disabled\") get disabledClass () {\n\t\treturn this.disabled;\n\t}\n\n\t@HostBinding(\"class.cds--form-item\") get formItem() {\n\t\treturn !this.skeleton;\n\t}\n\n\t/**\n\t * The unique id allocated to the `Toggle`.\n\t */\n\tid = \"toggle-\" + Toggle.toggleCount;\n\n\tprotected _offValues = this.i18n.getOverridable(\"TOGGLE.OFF\");\n\tprotected _onValues = this.i18n.getOverridable(\"TOGGLE.ON\");\n\t/**\n\t * Creates an instance of Toggle.\n\t */\n\tconstructor(protected changeDetectorRef: ChangeDetectorRef, protected i18n: I18n) {\n\t\tsuper(changeDetectorRef);\n\t\tToggle.toggleCount++;\n\t}\n\n\t/**\n\t * `ControlValueAccessor` method to programmatically disable the toggle input.\n\t *\n\t * ex: `this.formGroup.get(\"myToggle\").disable();`\n\t *\n\t * @param isDisabled `true` to disable the input\n\t */\n\tsetDisabledState(isDisabled: boolean) {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\tgetOffText(): Observable<string> {\n\t\treturn this._offValues.subject;\n\t}\n\n\tgetOnText(): Observable<string> {\n\t\treturn this._onValues.subject;\n\t}\n\n\tgetCheckedText(): Observable<string> {\n\t\tif (this.checked) {\n\t\t\treturn this._onValues.subject;\n\t\t}\n\t\treturn this._offValues.subject;\n\t}\n\n\t/**\n\t * Creates instance of `ToggleChange` used to propagate the change event.\n\t */\n\temitChangeEvent() {\n\t\tthis.checkedChange.emit(this.checked);\n\t\tthis.propagateChange(this.checked);\n\t}\n\n\tpublic isTemplate(value) {\n\t\treturn value instanceof TemplateRef;\n\t}\n}\n","// modules\nimport { NgModule } from \"@angular/core\";\nimport { FormsModule } from \"@angular/forms\";\nimport { CommonModule } from \"@angular/common\";\n\n// imports\nimport { I18nModule } from \"carbon-components-angular/i18n\";\nimport { Toggle } from \"./toggle.component\";\n\n@NgModule({\n\tdeclarations: [\n\t\tToggle\n\t],\n\texports: [\n\t\tToggle\n\t],\n\timports: [\n\t\tCommonModule,\n\t\tFormsModule,\n\t\tI18nModule\n\t]\n})\nexport class ToggleModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAaA;;AAEG;IACS,YAIX;AAJD,CAAA,UAAY,WAAW,EAAA;AACtB,IAAA,WAAA,CAAA,WAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI,CAAA;AACJ,IAAA,WAAA,CAAA,WAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAO,CAAA;AACP,IAAA,WAAA,CAAA,WAAA,CAAA,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A;AAQK,YAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,YALvB,YAAY;QACZ,WAAW;QACX,UAAU,CAAA,EAAA,CAAA,CAAA;2FAGC,YAAY,EAAA,UAAA,EAAA,CAAA;kBAbxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,YAAY,EAAE;wBACb,MAAM;AACN,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACR,MAAM;AACN,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACR,YAAY;wBACZ,WAAW;wBACX,UAAU;AACV,qBAAA;AACD,iBAAA,CAAA;;;ACrBD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-components-angular",
3
- "version": "5.11.1",
3
+ "version": "5.12.1",
4
4
  "description": "Next generation components",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -67,9 +67,10 @@ export declare class Toggle extends Checkbox {
67
67
  * Set to `true` to hide the toggle label & set toggle on/off text to label.
68
68
  */
69
69
  hideLabel: boolean;
70
+ skeleton: boolean;
70
71
  toggleClass: boolean;
71
72
  get disabledClass(): boolean;
72
- formItem: boolean;
73
+ get formItem(): boolean;
73
74
  /**
74
75
  * The unique id allocated to the `Toggle`.
75
76
  */
@@ -97,5 +98,5 @@ export declare class Toggle extends Checkbox {
97
98
  emitChangeEvent(): void;
98
99
  isTemplate(value: any): boolean;
99
100
  static ɵfac: i0.ɵɵFactoryDeclaration<Toggle, never>;
100
- static ɵcmp: i0.ɵɵComponentDeclaration<Toggle, "cds-toggle, ibm-toggle", never, { "offText": "offText"; "onText": "onText"; "label": "label"; "size": "size"; "hideLabel": "hideLabel"; }, {}, never, never, false>;
101
+ static ɵcmp: i0.ɵɵComponentDeclaration<Toggle, "cds-toggle, ibm-toggle", never, { "offText": "offText"; "onText": "onText"; "label": "label"; "size": "size"; "hideLabel": "hideLabel"; "skeleton": "skeleton"; }, {}, never, never, false>;
101
102
  }
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkcarbon_components_angular=self.webpackChunkcarbon_components_angular||[]).push([[4391],{"./src/content-switcher/content-switcher.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Basic:()=>Basic,default:()=>content_switcher_stories});var dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.js"),core=__webpack_require__("./node_modules/@angular/core/fesm2020/core.mjs");let ContentSwitcherOption=class ContentSwitcherOption{constructor(renderer,hostElement){this.renderer=renderer,this.hostElement=hostElement,this.name="option",this.selected=new core.EventEmitter,this.onClick=new core.EventEmitter,this.onFocus=new core.EventEmitter,this.switcherClass="cds--content-switcher-btn",this.selectedClass=!1,this.role="tab",this.ariaSelected=!1,this.tabindex="-1",this._active=!1}set active(value){this._active=value,this.selectedClass=value,this.ariaSelected=value,this.tabindex=value?"0":"-1"}get active(){return this._active}hostClick(event){this.onClick.emit(event),this.active||(this.active=!0,this.selected.emit(!0))}doFocus(event){this.onFocus.emit(event),this.active||(this.active=!0,this.selected.emit(!0))}ngOnInit(){const hostNativeElement=this.hostElement.nativeElement,spanWrapper=this.renderer.createElement("span");this.renderer.addClass(spanWrapper,"cds--content-switcher__label");const hostChildren=[];hostNativeElement.childNodes.forEach((node=>hostChildren.push(node))),hostChildren.forEach((node=>{this.renderer.removeChild(hostNativeElement,node),this.renderer.appendChild(spanWrapper,node)})),this.renderer.appendChild(hostNativeElement,spanWrapper)}};ContentSwitcherOption.ctorParameters=()=>[{type:core.Renderer2},{type:core.ElementRef}],ContentSwitcherOption.propDecorators={active:[{type:core.Input}],name:[{type:core.Input}],selected:[{type:core.Output}],onClick:[{type:core.Output}],onFocus:[{type:core.Output}],switcherClass:[{type:core.HostBinding,args:["class"]}],selectedClass:[{type:core.HostBinding,args:["class.cds--content-switcher--selected"]}],role:[{type:core.HostBinding,args:["attr.role"]}],ariaSelected:[{type:core.HostBinding,args:["attr.aria-selected"]}],tabindex:[{type:core.HostBinding,args:["attr.tabIndex"]}],hostClick:[{type:core.HostListener,args:["click",["$event"]]}],doFocus:[{type:core.HostListener,args:["focus",["$event"]]}]},ContentSwitcherOption=(0,tslib_es6.gn)([(0,core.Directive)({selector:"[cdsContentOption], [ibmContentOption]"})],ContentSwitcherOption);var tab_service=__webpack_require__("./src/common/tab.service.ts");let ContentSwitcher=class ContentSwitcher{constructor(elementRef){this.elementRef=elementRef,this.ariaLabel="content switcher",this.size="md",this.selected=new core.EventEmitter}ngAfterViewInit(){this.options.find((option=>option.active))||setTimeout((()=>this.options.first.active=!0)),this.options.forEach((option=>{option.selected.subscribe((_=>{const active=option;this.options.forEach((option=>{option!==active&&(option.active=!1)})),this.selected.emit(active)}))}))}hostkeys(event){const buttonList=Array.from(this.elementRef.nativeElement.querySelectorAll("[cdsContentOption]"));switch(event.key){case"ArrowRight":if(event.preventDefault(),(0,tab_service.jv)(event,buttonList))buttonList[0].focus();else{const index=buttonList.findIndex((item=>item===event.target));buttonList[index+1].focus()}break;case"ArrowLeft":if(event.preventDefault(),(0,tab_service.w3)(event,buttonList))buttonList[buttonList.length-1].focus();else{const index=buttonList.findIndex((item=>item===event.target));buttonList[index-1].focus()}break;case"Home":event.preventDefault(),buttonList[0].focus();break;case"End":event.preventDefault(),buttonList[buttonList.length-1].focus()}}};ContentSwitcher.ctorParameters=()=>[{type:core.ElementRef}],ContentSwitcher.propDecorators={ariaLabel:[{type:core.Input}],size:[{type:core.Input}],selected:[{type:core.Output}],options:[{type:core.ContentChildren,args:[ContentSwitcherOption]}],hostkeys:[{type:core.HostListener,args:["keydown",["$event"]]}]},ContentSwitcher=(0,tslib_es6.gn)([(0,core.Component)({selector:"cds-content-switcher, ibm-content-switcher",template:"\n\t\t<div\n\t\t\t[attr.aria-label]=\"ariaLabel\"\n\t\t\tclass=\"cds--content-switcher\"\n\t\t\t[ngClass]=\"{\n\t\t\t\t'cds--content-switcher--sm': size === 'sm',\n\t\t\t\t'cds--content-switcher--md': size === 'md',\n\t\t\t\t'cds--content-switcher--lg': size === 'lg'\n\t\t\t}\"\n\t\t\trole=\"tablist\">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t"})],ContentSwitcher);var common=__webpack_require__("./node_modules/@angular/common/fesm2020/common.mjs");let ContentSwitcherModule=class ContentSwitcherModule{};ContentSwitcherModule=(0,tslib_es6.gn)([(0,core.NgModule)({declarations:[ContentSwitcher,ContentSwitcherOption],exports:[ContentSwitcher,ContentSwitcherOption],imports:[common.CommonModule]})],ContentSwitcherModule);const content_switcher_stories={title:"Components/Content Switcher",decorators:[(0,dist.moduleMetadata)({imports:[ContentSwitcherModule]})],argTypes:{code:{control:!1}},component:ContentSwitcher,subcomponents:ContentSwitcherOption},Basic=(args=>({props:args,template:'\n\t\t<cds-content-switcher (selected)="selected($event)">\n\t\t\t<button cdsContentOption name="First">First section</button>\n\t\t\t<button cdsContentOption name="Second">Second section</button>\n\t\t\t<button cdsContentOption name="Third">Third section</button>\n\t\t</cds-content-switcher>\n\t'})).bind({})},"./src/common/tab.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{X9:()=>tabbableSelectorIgnoreTabIndex,ZW:()=>getFocusElementList,jv:()=>isFocusInLastItem,nW:()=>cycleTabs,o$:()=>tabbableSelector,w3:()=>isFocusInFirstItem});let tabbableSelector="a[href], area[href], input:not([disabled]):not([tabindex='-1']), button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']), textarea:not([disabled]):not([tabindex='-1']), iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]",tabbableSelectorIgnoreTabIndex="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";function getFocusElementList(element,selector=tabbableSelector){let elements=element.querySelectorAll(selector);return elements?Array.prototype.filter.call(elements,(el=>function isVisible(element){return!!(element.offsetWidth||element.offsetHeight||element.getClientRects().length)}(el))):elements}function isFocusInFirstItem(event,list){return list.length>0&&(event.target||event.srcElement)===list[0]}function isFocusInLastItem(event,list){return list.length>0&&(event.target||event.srcElement)===list[list.length-1]}function cycleTabs(event,element){if("Tab"===event.key){let list=getFocusElementList(element),focusChanged=!1;event.shiftKey?(isFocusInFirstItem(event,list)||function isElementFocused(event,element){return(event.target||event.srcElement)===element}(event,element))&&(focusChanged=function focusLastFocusableElement(list){return list.length>0&&(list[list.length-1].focus(),!0)}(list)):isFocusInLastItem(event,list)&&(focusChanged=function focusFirstFocusableElement(list){return list.length>0&&(list[0].focus(),!0)}(list)),focusChanged&&(event.preventDefault(),event.stopPropagation())}}},"./node_modules/@storybook/angular/dist/client/decorators.js":(__unused_webpack_module,exports,__webpack_require__)=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.componentWrapperDecorator=exports.applicationConfig=exports.moduleMetadata=void 0;const ComputesTemplateFromComponent_1=__webpack_require__("./node_modules/@storybook/angular/dist/client/angular-beta/ComputesTemplateFromComponent.js"),NgComponentAnalyzer_1=__webpack_require__("./node_modules/@storybook/angular/dist/client/angular-beta/utils/NgComponentAnalyzer.js");exports.moduleMetadata=metadata=>storyFn=>{const story=storyFn(),storyMetadata=story.moduleMetadata||{};return metadata=metadata||{},{...story,moduleMetadata:{declarations:[...metadata.declarations||[],...storyMetadata.declarations||[]],entryComponents:[...metadata.entryComponents||[],...storyMetadata.entryComponents||[]],imports:[...metadata.imports||[],...storyMetadata.imports||[]],schemas:[...metadata.schemas||[],...storyMetadata.schemas||[]],providers:[...metadata.providers||[],...storyMetadata.providers||[]]}}},exports.applicationConfig=function applicationConfig(config){return storyFn=>{const story=storyFn(),storyConfig=story.applicationConfig;return{...story,applicationConfig:storyConfig||config?{...config,...storyConfig,providers:[...config?.providers||[],...storyConfig?.providers||[]]}:void 0}}};exports.componentWrapperDecorator=(element,props)=>(storyFn,storyContext)=>{const story=storyFn(),currentProps="function"==typeof props?props(storyContext):props,template=(0,NgComponentAnalyzer_1.isComponent)(element)?(0,ComputesTemplateFromComponent_1.computesTemplateFromComponent)(element,currentProps??{},story.template):element(story.template);return{...story,template,...currentProps||story.props?{props:{...currentProps,...story.props}}:{}}}},"./node_modules/@storybook/angular/dist/client/index.js":function(__unused_webpack_module,exports,__webpack_require__){var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&!("get"in desc?!m.__esModule:desc.writable||desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)"default"===p||Object.prototype.hasOwnProperty.call(exports,p)||__createBinding(exports,m,p)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.applicationConfig=exports.componentWrapperDecorator=exports.moduleMetadata=void 0,__webpack_require__("./node_modules/@storybook/angular/dist/client/globals.js"),__exportStar(__webpack_require__("./node_modules/@storybook/angular/dist/client/public-api.js"),exports),__exportStar(__webpack_require__("./node_modules/@storybook/angular/dist/client/public-types.js"),exports);var decorators_1=__webpack_require__("./node_modules/@storybook/angular/dist/client/decorators.js");Object.defineProperty(exports,"moduleMetadata",{enumerable:!0,get:function(){return decorators_1.moduleMetadata}}),Object.defineProperty(exports,"componentWrapperDecorator",{enumerable:!0,get:function(){return decorators_1.componentWrapperDecorator}}),Object.defineProperty(exports,"applicationConfig",{enumerable:!0,get:function(){return decorators_1.applicationConfig}})},"./node_modules/@storybook/angular/dist/client/public-api.js":function(__unused_webpack_module,exports,__webpack_require__){var __createBinding=this&&this.__createBinding||(Object.create?function(o,m,k,k2){void 0===k2&&(k2=k);var desc=Object.getOwnPropertyDescriptor(m,k);desc&&!("get"in desc?!m.__esModule:desc.writable||desc.configurable)||(desc={enumerable:!0,get:function(){return m[k]}}),Object.defineProperty(o,k2,desc)}:function(o,m,k,k2){void 0===k2&&(k2=k),o[k2]=m[k]}),__exportStar=this&&this.__exportStar||function(m,exports){for(var p in m)"default"===p||Object.prototype.hasOwnProperty.call(exports,p)||__createBinding(exports,m,p)},__importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.raw=exports.forceReRender=exports.configure=exports.storiesOf=void 0;const core_client_1=__webpack_require__("@storybook/core-client"),render_1=__webpack_require__("./node_modules/@storybook/angular/dist/client/render.js"),decorateStory_1=__importDefault(__webpack_require__("./node_modules/@storybook/angular/dist/client/decorateStory.js"));__exportStar(__webpack_require__("./node_modules/@storybook/angular/dist/client/public-types.js"),exports);const api=(0,core_client_1.start)(render_1.renderToCanvas,{decorateStory:decorateStory_1.default,render:render_1.render});exports.storiesOf=(kind,m)=>api.clientApi.storiesOf(kind,m).addParameters({renderer:"angular"});exports.configure=(...args)=>api.configure("angular",...args),exports.forceReRender=api.forceReRender,exports.raw=api.clientApi.raw},"./node_modules/@storybook/angular/dist/client/public-types.js":(__unused_webpack_module,exports)=>{Object.defineProperty(exports,"__esModule",{value:!0})},"./node_modules/@storybook/angular/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{var _client_index__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/angular/dist/client/index.js");__webpack_require__.o(_client_index__WEBPACK_IMPORTED_MODULE_0__,"componentWrapperDecorator")&&__webpack_require__.d(__webpack_exports__,{componentWrapperDecorator:function(){return _client_index__WEBPACK_IMPORTED_MODULE_0__.componentWrapperDecorator}}),__webpack_require__.o(_client_index__WEBPACK_IMPORTED_MODULE_0__,"moduleMetadata")&&__webpack_require__.d(__webpack_exports__,{moduleMetadata:function(){return _client_index__WEBPACK_IMPORTED_MODULE_0__.moduleMetadata}})}}]);