@synergy-design-system/angular
Version:
Angular wrappers for the Synergy Design System
1 lines • 11.2 kB
Source Map (JSON)
{"version":3,"file":"synergy-design-system-angular-components-tooltip.mjs","sources":["../../components/tooltip/tooltip.component.ts","../../components/tooltip/synergy-design-system-angular-components-tooltip.ts"],"sourcesContent":["// ---------------------------------------------------------------------\n// 🔒 AUTOGENERATED @synergy-design-system/angular wrappers for @synergy-design-system/components\n// Please do not edit this file directly!\n// It will get recreated when running pnpm build.\n// ---------------------------------------------------------------------\nimport {\n Component,\n ElementRef,\n NgZone,\n Input,\n Output,\n EventEmitter,\n AfterContentInit,\n} from '@angular/core';\nimport type { SynTooltip } from '@synergy-design-system/components';\nimport type { SynShowEvent } from '@synergy-design-system/components';\nimport type { SynAfterShowEvent } from '@synergy-design-system/components';\nimport type { SynHideEvent } from '@synergy-design-system/components';\nimport type { SynAfterHideEvent } from '@synergy-design-system/components';\nimport '@synergy-design-system/components/components/tooltip/tooltip.js';\n\n/**\n * @summary Tooltips display additional information based on a specific action.\n * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-tooltip--docs\n * @status stable\n * @since 2.0\n *\n * @dependency syn-popup\n *\n * @slot - The tooltip's target element. Avoid slotting in more than one element, as subsequent ones will be ignored.\n * @slot content - The content to render in the tooltip. Alternatively, you can use the `content` attribute.\n *\n * @event syn-show - Emitted when the tooltip begins to show.\n * @event syn-after-show - Emitted after the tooltip has shown and all animations are complete.\n * @event syn-hide - Emitted when the tooltip begins to hide.\n * @event syn-after-hide - Emitted after the tooltip has hidden and all animations are complete.\n *\n * @csspart base - The component's base wrapper, an `<syn-popup>` element.\n * @csspart base__popup - The popup's exported `popup` part. Use this to target the tooltip's popup container.\n * @csspart base__arrow - The popup's exported `arrow` part. Use this to target the tooltip's arrow.\n * @csspart body - The tooltip's body where its content is rendered.\n *\n * @cssproperty --max-width - The maximum width of the tooltip before its content will wrap.\n * @cssproperty --hide-delay - The amount of time to wait before hiding the tooltip when hovering.\n * @cssproperty --show-delay - The amount of time to wait before showing the tooltip when hovering.\n *\n * @animation tooltip.show - The animation to use when showing the tooltip.\n * @animation tooltip.hide - The animation to use when hiding the tooltip.\n */\n@Component({\n selector: 'syn-tooltip',\n standalone: true,\n template: '<ng-content></ng-content>',\n})\nexport class SynTooltipComponent {\n public nativeElement: SynTooltip;\n private _ngZone: NgZone;\n\n constructor(e: ElementRef, ngZone: NgZone) {\n this.nativeElement = e.nativeElement;\n this._ngZone = ngZone;\n this.nativeElement.addEventListener('syn-show', (e: SynShowEvent) => {\n this.synShowEvent.emit(e);\n });\n this.nativeElement.addEventListener(\n 'syn-after-show',\n (e: SynAfterShowEvent) => {\n this.synAfterShowEvent.emit(e);\n },\n );\n this.nativeElement.addEventListener('syn-hide', (e: SynHideEvent) => {\n this.synHideEvent.emit(e);\n });\n this.nativeElement.addEventListener(\n 'syn-after-hide',\n (e: SynAfterHideEvent) => {\n this.synAfterHideEvent.emit(e);\n },\n );\n }\n\n /**\n * The tooltip's content.\n * If you need to display HTML, use the `content` slot instead.\n */\n @Input()\n set content(v: SynTooltip['content']) {\n this._ngZone.runOutsideAngular(() => (this.nativeElement.content = v));\n }\n get content(): SynTooltip['content'] {\n return this.nativeElement.content;\n }\n\n /**\n* The preferred placement of the tooltip.\n* Note that the actual placement may vary as needed to keep the tooltip\ninside of the viewport.\n */\n @Input()\n set placement(v: SynTooltip['placement']) {\n this._ngZone.runOutsideAngular(() => (this.nativeElement.placement = v));\n }\n get placement(): SynTooltip['placement'] {\n return this.nativeElement.placement;\n }\n\n /**\n * Disables the tooltip so it won't show when triggered.\n */\n @Input()\n set disabled(v: '' | SynTooltip['disabled']) {\n this._ngZone.runOutsideAngular(\n () => (this.nativeElement.disabled = v === '' || v),\n );\n }\n get disabled(): SynTooltip['disabled'] {\n return this.nativeElement.disabled;\n }\n\n /**\n * The distance in pixels from which to offset the tooltip away from its target.\n */\n @Input()\n set distance(v: SynTooltip['distance']) {\n this._ngZone.runOutsideAngular(() => (this.nativeElement.distance = v));\n }\n get distance(): SynTooltip['distance'] {\n return this.nativeElement.distance;\n }\n\n /**\n * Indicates whether or not the tooltip is open.\n * You can use this in lieu of the show/hide methods.\n */\n @Input()\n set open(v: '' | SynTooltip['open']) {\n this._ngZone.runOutsideAngular(\n () => (this.nativeElement.open = v === '' || v),\n );\n }\n get open(): SynTooltip['open'] {\n return this.nativeElement.open;\n }\n\n /**\n * The distance in pixels from which to offset the tooltip along its target.\n */\n @Input()\n set skidding(v: SynTooltip['skidding']) {\n this._ngZone.runOutsideAngular(() => (this.nativeElement.skidding = v));\n }\n get skidding(): SynTooltip['skidding'] {\n return this.nativeElement.skidding;\n }\n\n /**\n* Controls how the tooltip is activated.\n* Possible options include `click`, `hover`, `focus`, and `manual`.\n* Multiple\noptions can be passed by separating them with a space.\n* When manual is used, the tooltip must be activated\nprogrammatically.\n */\n @Input()\n set trigger(v: SynTooltip['trigger']) {\n this._ngZone.runOutsideAngular(() => (this.nativeElement.trigger = v));\n }\n get trigger(): SynTooltip['trigger'] {\n return this.nativeElement.trigger;\n }\n\n /**\n* Enable this option to prevent the tooltip from being clipped when the component is placed inside a container with\n`overflow: auto|hidden|scroll`.\n* Hoisting uses a fixed positioning strategy that works in many, but not all,\nscenarios.\n */\n @Input()\n set hoist(v: '' | SynTooltip['hoist']) {\n this._ngZone.runOutsideAngular(\n () => (this.nativeElement.hoist = v === '' || v),\n );\n }\n get hoist(): SynTooltip['hoist'] {\n return this.nativeElement.hoist;\n }\n\n /**\n * Emitted when the tooltip begins to show.\n */\n @Output() synShowEvent = new EventEmitter<SynShowEvent>();\n\n /**\n * Emitted after the tooltip has shown and all animations are complete.\n */\n @Output() synAfterShowEvent = new EventEmitter<SynAfterShowEvent>();\n\n /**\n * Emitted when the tooltip begins to hide.\n */\n @Output() synHideEvent = new EventEmitter<SynHideEvent>();\n\n /**\n * Emitted after the tooltip has hidden and all animations are complete.\n */\n @Output() synAfterHideEvent = new EventEmitter<SynAfterHideEvent>();\n}\n\nexport type { SynShowEvent } from '@synergy-design-system/components';\nexport type { SynAfterShowEvent } from '@synergy-design-system/components';\nexport type { SynHideEvent } from '@synergy-design-system/components';\nexport type { SynAfterHideEvent } from '@synergy-design-system/components';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './tooltip.component';\n"],"names":[],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AAiBA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BG;MAMU,mBAAmB,CAAA;AACvB,IAAA,aAAa;AACZ,IAAA,OAAO;IAEf,WAAY,CAAA,CAAa,EAAE,MAAc,EAAA;AACvC,QAAA,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,aAAa;AACpC,QAAA,IAAI,CAAC,OAAO,GAAG,MAAM;QACrB,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAe,KAAI;AAClE,YAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;AAC3B,SAAC,CAAC;QACF,IAAI,CAAC,aAAa,CAAC,gBAAgB,CACjC,gBAAgB,EAChB,CAAC,CAAoB,KAAI;AACvB,YAAA,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;AAChC,SAAC,CACF;QACD,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAe,KAAI;AAClE,YAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;AAC3B,SAAC,CAAC;QACF,IAAI,CAAC,aAAa,CAAC,gBAAgB,CACjC,gBAAgB,EAChB,CAAC,CAAoB,KAAI;AACvB,YAAA,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;AAChC,SAAC,CACF;;AAGH;;;AAGG;IACH,IACI,OAAO,CAAC,CAAwB,EAAA;AAClC,QAAA,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,GAAG,CAAC,CAAC,CAA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