@dev-tcloud/tcloud-ui 5.3.6-beta.3 → 5.3.6

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.
@@ -8534,6 +8534,104 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
8534
8534
  args: [{ selector: 'tc-rev-toast', imports: [CommonModule], template: "<div class=\"tc-rev-toast c-neutral-700\">\n <div\n class=\"{{'tc-rev-toast__icon--' + this.type() + ' tc-rev-toast__icon f-size-24'}}\">\n <ng-content select=\"[icon]\"/>\n </div>\n\n <div class=\"{{'tc-rev-toast__content--' + this.type() + ' tc-rev-toast__content f-md'}}\" [class.full-width]=\"fullWidth()\">\n <ng-content />\n </div>\n</div>\n", styles: [":host{display:block}.tc-rev-toast{display:flex}.tc-rev-toast__icon{align-items:center;border-radius:var(--bor-radius-8) 0 0 var(--bor-radius-8);display:flex;justify-content:center;padding:var(--size-16)}.tc-rev-toast__icon--info{background-color:var(--c-primary-500)}.tc-rev-toast__icon--success{background-color:var(--c-success-500)}.tc-rev-toast__icon--alert{background-color:var(--c-alert-500)}.tc-rev-toast__icon--danger{background-color:var(--c-danger-500)}.tc-rev-toast__content{align-items:center;border-radius:0 var(--bor-radius-8) var(--bor-radius-8) 0;display:flex;font-family:var(--f-family);padding:var(--size-16)}.tc-rev-toast__content--info{background-color:var(--c-primary-300)}.tc-rev-toast__content--success{background-color:var(--c-success-300)}.tc-rev-toast__content--alert{background-color:var(--c-alert-300)}.tc-rev-toast__content--danger{background-color:var(--c-danger-300)}.tc-rev-toast__content.full-width{flex-grow:1}\n"] }]
8535
8535
  }] });
8536
8536
 
8537
+ class TcRevTooltipDirective {
8538
+ constructor(_el, _renderer, _vcr) {
8539
+ this._el = _el;
8540
+ this._renderer = _renderer;
8541
+ this._vcr = _vcr;
8542
+ this.tcRevTooltip = input('');
8543
+ this.position = input('top');
8544
+ this.tooltipElement = null;
8545
+ }
8546
+ onMouseEnter() {
8547
+ const tooltipText = this.tcRevTooltip();
8548
+ if (this.isValidTooltipText(tooltipText)) {
8549
+ this.showTooltip(tooltipText);
8550
+ }
8551
+ }
8552
+ onMouseLeave() {
8553
+ this.hideTooltip();
8554
+ }
8555
+ isValidTooltipText(text) {
8556
+ return text && text.trim().length > 0;
8557
+ }
8558
+ showTooltip(text) {
8559
+ if (this.tooltipElement) {
8560
+ this.hideTooltip();
8561
+ }
8562
+ // Create tooltip element
8563
+ this.tooltipElement = this._renderer.createElement('div');
8564
+ // Add text content
8565
+ const textNode = this._renderer.createText(text);
8566
+ this._renderer.appendChild(this.tooltipElement, textNode);
8567
+ // Add CSS classes
8568
+ this._renderer.addClass(this.tooltipElement, 'tc-rev-tooltip');
8569
+ this._renderer.addClass(this.tooltipElement, `tc-rev-tooltip--${this.position()}`);
8570
+ // Set initial styles
8571
+ this._renderer.setStyle(this.tooltipElement, 'position', 'absolute');
8572
+ this._renderer.setStyle(this.tooltipElement, 'z-index', '9999');
8573
+ this._renderer.setStyle(this.tooltipElement, 'visibility', 'hidden');
8574
+ // this._renderer.setStyle(this.tooltipElement, 'opacity', '0');
8575
+ // Append to body
8576
+ this._renderer.appendChild(document.body, this.tooltipElement);
8577
+ // Position tooltip
8578
+ this.positionTooltip();
8579
+ // Show tooltip with animation
8580
+ this._renderer.setStyle(this.tooltipElement, 'visibility', 'visible');
8581
+ this._renderer.addClass(this.tooltipElement, 'tc-rev-tooltip--visible');
8582
+ }
8583
+ hideTooltip() {
8584
+ if (this.tooltipElement) {
8585
+ this._renderer.removeChild(document.body, this.tooltipElement);
8586
+ this.tooltipElement = null;
8587
+ }
8588
+ }
8589
+ positionTooltip() {
8590
+ if (!this.tooltipElement)
8591
+ return;
8592
+ const hostRect = this._el.nativeElement.getBoundingClientRect();
8593
+ const tooltipRect = this.tooltipElement.getBoundingClientRect();
8594
+ const position = this.position();
8595
+ let top = 0;
8596
+ let left = 0;
8597
+ switch (position) {
8598
+ case 'top':
8599
+ top = hostRect.top + window.scrollY - tooltipRect.height - 8;
8600
+ left = hostRect.left + window.scrollX + (hostRect.width - tooltipRect.width) / 2;
8601
+ break;
8602
+ case 'bottom':
8603
+ top = hostRect.bottom + window.scrollY + 8;
8604
+ left = hostRect.left + window.scrollX + (hostRect.width - tooltipRect.width) / 2;
8605
+ break;
8606
+ case 'left':
8607
+ top = hostRect.top + window.scrollY + (hostRect.height - tooltipRect.height) / 2;
8608
+ left = hostRect.left + window.scrollX - tooltipRect.width - 8;
8609
+ break;
8610
+ case 'right':
8611
+ top = hostRect.top + window.scrollY + (hostRect.height - tooltipRect.height) / 2;
8612
+ left = hostRect.right + window.scrollX + 8;
8613
+ break;
8614
+ }
8615
+ this._renderer.setStyle(this.tooltipElement, 'top', `${top}px`);
8616
+ this._renderer.setStyle(this.tooltipElement, 'left', `${left}px`);
8617
+ }
8618
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TcRevTooltipDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
8619
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TcRevTooltipDirective, isStandalone: true, selector: "[tcRevTooltip]", inputs: { tcRevTooltip: { classPropertyName: "tcRevTooltip", publicName: "tcRevTooltip", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()" } }, ngImport: i0 }); }
8620
+ }
8621
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TcRevTooltipDirective, decorators: [{
8622
+ type: Directive,
8623
+ args: [{
8624
+ selector: '[tcRevTooltip]',
8625
+ standalone: true
8626
+ }]
8627
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }], propDecorators: { onMouseEnter: [{
8628
+ type: HostListener,
8629
+ args: ['mouseenter']
8630
+ }], onMouseLeave: [{
8631
+ type: HostListener,
8632
+ args: ['mouseleave']
8633
+ }] } });
8634
+
8537
8635
  class TcRevSubNavbarItemComponent {
8538
8636
  constructor() {
8539
8637
  this.label = input.required();
@@ -8723,6 +8821,7 @@ class TcRevComponentsLibModule {
8723
8821
  TcRevTabItemComponent,
8724
8822
  TcRevTagComponent,
8725
8823
  TcRevToastComponent,
8824
+ TcRevTooltipDirective,
8726
8825
  TcRevSubNavbarComponent,
8727
8826
  TcRevSubNavbarItemComponent,
8728
8827
  TcRevWizardStepsComponent], exports: [
@@ -8756,6 +8855,7 @@ class TcRevComponentsLibModule {
8756
8855
  TcRevTabItemComponent,
8757
8856
  TcRevTagComponent,
8758
8857
  TcRevToastComponent,
8858
+ TcRevTooltipDirective,
8759
8859
  TcRevSubNavbarComponent,
8760
8860
  TcRevSubNavbarItemComponent,
8761
8861
  TcRevWizardStepsComponent] }); }
@@ -8817,6 +8917,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
8817
8917
  TcRevTabItemComponent,
8818
8918
  TcRevTagComponent,
8819
8919
  TcRevToastComponent,
8920
+ TcRevTooltipDirective,
8820
8921
  TcRevSubNavbarComponent,
8821
8922
  TcRevSubNavbarItemComponent,
8822
8923
  TcRevWizardStepsComponent,
@@ -8852,6 +8953,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
8852
8953
  TcRevTabItemComponent,
8853
8954
  TcRevTagComponent,
8854
8955
  TcRevToastComponent,
8956
+ TcRevTooltipDirective,
8855
8957
  TcRevSubNavbarComponent,
8856
8958
  TcRevSubNavbarItemComponent,
8857
8959
  TcRevWizardStepsComponent,
@@ -8869,5 +8971,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
8869
8971
  * Generated bundle index. Do not edit.
8870
8972
  */
8871
8973
 
8872
- export { BytesPipe, CNPJPipe, CPFPipe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1 as CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, DateBRPipe, DropdownGroupedSize, DropdownMultiSize, DropdownSize, MonthNamePipe, MultiLevelDropdownSize, ProgressStatusBarGradientStatus, RespectivePipe, StatusInfoPipe, TCCondition, TCFiltersType, TCloudUiAccordionBodyComponent, TCloudUiAccordionComponent, TCloudUiAccordionModule, TCloudUiAccordionTitleComponent, TCloudUiAlignDirective, TCloudUiCheckAccessDirective, TCloudUiCheckAccessService, TCloudUiChoiceIssuesComponent, TCloudUiChoiceIssuesModule, TCloudUiCubesComponent, TCloudUiCurrencyDirective, TCloudUiDataListComponent, TCloudUiDataListModule, TCloudUiDataListOptionComponent, TCloudUiDatepickerComponent, TCloudUiDatepickerModule, TCloudUiDatepickerTimeComponent, TCloudUiDatepickerTimeModule, TCloudUiDigitOnlyDirective, TCloudUiDirectiveModule, TCloudUiElCopyDirective, TCloudUiFiltersComponent, TCloudUiFiltersModule, TCloudUiHighLightDirective, TCloudUiHoverParentDirective, TCloudUiInputPasswordComponent, TCloudUiInputPasswordModule, TCloudUiInputSearchComponent, TCloudUiInputSearchModule, TCloudUiIpMaskDirective, TCloudUiLabelTokenComponent, TCloudUiLabelTokenModule, TCloudUiLineStepCircleComponent, TCloudUiLineStepCircleModule, TCloudUiLineStepTitleComponent, TCloudUiLineStepTitleModule, TCloudUiLinhaLogoComponent, TCloudUiLinhaLogoModule, TCloudUiLoadingComponent, TCloudUiLoadingModule, TCloudUiLoadingTransitionsService, TCloudUiModalBodyComponent, TCloudUiModalComponent, TCloudUiModalFooterComponent, TCloudUiModalHeaderComponent, TCloudUiModalModule, TCloudUiModule, TCloudUiMultiInputComponent, TCloudUiMultiInputModule, TCloudUiMultiSelectComponent, TCloudUiMultiSelectModule, TCloudUiMultiplesValuesComponent, TCloudUiMultiplesValuesModule, TCloudUiNgCheckAccessDirective, TCloudUiNgFeatureFlagsDirective, TCloudUiNotFoundComponent, TCloudUiNotFoundModule, TCloudUiNumberStepComponent, TCloudUiNumberStepModule, TCloudUiPipesModule, TCloudUiProgressBarComponent, TCloudUiProgressBarModule, TCloudUiRangeDateComponent, TCloudUiReorderItemsComponent, TCloudUiReorderItemsModule, TCloudUiScrollBoxComponent, TCloudUiScrollBoxModule, TCloudUiSearchInObjectService, TCloudUiTabContentComponent, TCloudUiTabHeadComponent, TCloudUiTabMenuComponent, TCloudUiTabMenuModule, TCloudUiTabSubtitleComponent, TCloudUiTabTitleComponent, TCloudUiTableComponent, TCloudUiTableModule, TCloudUiTooltipDirective, TCloudUiWelcomeComponent, TCloudUiWelcomeModule, TagColorsEnum, TcRevButtonDirective, TcRevCalendarComponent, TcRevCardAccordionComponent, TcRevCardComponent, TcRevCardTitleComponent, TcRevCheckboxDirective, TcRevComponentsLibModule, TcRevDropdownComponent, TcRevDropdownGroupedComponent, TcRevDropdownMultiComponent, TcRevDropdownMultiLevelComponent, TcRevEmptyContentComponent, TcRevFaqComponent, TcRevIconButtonDirective, TcRevInputContainerComponent, TcRevInputDirective, TcRevLoadingComponent, TcRevMessageComponent, TcRevMultiInputComponent, TcRevPaginationComponent, TcRevProgressStatusBarComponent, TcRevRadioDirective, TcRevSearchInputComponent, TcRevSideDrawerComponent, TcRevSlideToggleDirective, TcRevSmallLoadingComponent, TcRevSmallLoadingComponentStyle, TcRevSubNavbarComponent, TcRevSubNavbarItemComponent, TcRevTabGroupComponent, TcRevTabItemComponent, TcRevTagComponent, TcRevToastComponent, TcRevWizardStepsComponent, ToTextPipe, echartBarConfig, isTextEllipsed };
8974
+ export { BytesPipe, CNPJPipe, CPFPipe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR$1 as CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, DateBRPipe, DropdownGroupedSize, DropdownMultiSize, DropdownSize, MonthNamePipe, MultiLevelDropdownSize, ProgressStatusBarGradientStatus, RespectivePipe, StatusInfoPipe, TCCondition, TCFiltersType, TCloudUiAccordionBodyComponent, TCloudUiAccordionComponent, TCloudUiAccordionModule, TCloudUiAccordionTitleComponent, TCloudUiAlignDirective, TCloudUiCheckAccessDirective, TCloudUiCheckAccessService, TCloudUiChoiceIssuesComponent, TCloudUiChoiceIssuesModule, TCloudUiCubesComponent, TCloudUiCurrencyDirective, TCloudUiDataListComponent, TCloudUiDataListModule, TCloudUiDataListOptionComponent, TCloudUiDatepickerComponent, TCloudUiDatepickerModule, TCloudUiDatepickerTimeComponent, TCloudUiDatepickerTimeModule, TCloudUiDigitOnlyDirective, TCloudUiDirectiveModule, TCloudUiElCopyDirective, TCloudUiFiltersComponent, TCloudUiFiltersModule, TCloudUiHighLightDirective, TCloudUiHoverParentDirective, TCloudUiInputPasswordComponent, TCloudUiInputPasswordModule, TCloudUiInputSearchComponent, TCloudUiInputSearchModule, TCloudUiIpMaskDirective, TCloudUiLabelTokenComponent, TCloudUiLabelTokenModule, TCloudUiLineStepCircleComponent, TCloudUiLineStepCircleModule, TCloudUiLineStepTitleComponent, TCloudUiLineStepTitleModule, TCloudUiLinhaLogoComponent, TCloudUiLinhaLogoModule, TCloudUiLoadingComponent, TCloudUiLoadingModule, TCloudUiLoadingTransitionsService, TCloudUiModalBodyComponent, TCloudUiModalComponent, TCloudUiModalFooterComponent, TCloudUiModalHeaderComponent, TCloudUiModalModule, TCloudUiModule, TCloudUiMultiInputComponent, TCloudUiMultiInputModule, TCloudUiMultiSelectComponent, TCloudUiMultiSelectModule, TCloudUiMultiplesValuesComponent, TCloudUiMultiplesValuesModule, TCloudUiNgCheckAccessDirective, TCloudUiNgFeatureFlagsDirective, TCloudUiNotFoundComponent, TCloudUiNotFoundModule, TCloudUiNumberStepComponent, TCloudUiNumberStepModule, TCloudUiPipesModule, TCloudUiProgressBarComponent, TCloudUiProgressBarModule, TCloudUiRangeDateComponent, TCloudUiReorderItemsComponent, TCloudUiReorderItemsModule, TCloudUiScrollBoxComponent, TCloudUiScrollBoxModule, TCloudUiSearchInObjectService, TCloudUiTabContentComponent, TCloudUiTabHeadComponent, TCloudUiTabMenuComponent, TCloudUiTabMenuModule, TCloudUiTabSubtitleComponent, TCloudUiTabTitleComponent, TCloudUiTableComponent, TCloudUiTableModule, TCloudUiTooltipDirective, TCloudUiWelcomeComponent, TCloudUiWelcomeModule, TagColorsEnum, TcRevButtonDirective, TcRevCalendarComponent, TcRevCardAccordionComponent, TcRevCardComponent, TcRevCardTitleComponent, TcRevCheckboxDirective, TcRevComponentsLibModule, TcRevDropdownComponent, TcRevDropdownGroupedComponent, TcRevDropdownMultiComponent, TcRevDropdownMultiLevelComponent, TcRevEmptyContentComponent, TcRevFaqComponent, TcRevIconButtonDirective, TcRevInputContainerComponent, TcRevInputDirective, TcRevLoadingComponent, TcRevMessageComponent, TcRevMultiInputComponent, TcRevPaginationComponent, TcRevProgressStatusBarComponent, TcRevRadioDirective, TcRevSearchInputComponent, TcRevSideDrawerComponent, TcRevSlideToggleDirective, TcRevSmallLoadingComponent, TcRevSmallLoadingComponentStyle, TcRevSubNavbarComponent, TcRevSubNavbarItemComponent, TcRevTabGroupComponent, TcRevTabItemComponent, TcRevTagComponent, TcRevToastComponent, TcRevTooltipDirective, TcRevWizardStepsComponent, ToTextPipe, echartBarConfig, isTextEllipsed };
8873
8975
  //# sourceMappingURL=dev-tcloud-tcloud-ui.mjs.map