@pumpkin-tech/pumpkin-tech-ng 0.1.1 → 0.1.3

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.
@@ -0,0 +1,16 @@
1
+ import * as i0 from "@angular/core";
2
+ type Dir = 'row' | 'column';
3
+ export declare class BadgeStackComponent {
4
+ direction: Dir;
5
+ gap: number;
6
+ wrap: boolean;
7
+ align: 'start' | 'center' | 'end';
8
+ disp: string;
9
+ get fwrap(): "wrap" | "nowrap";
10
+ get dir(): Dir;
11
+ get g(): string;
12
+ get ai(): "center" | "flex-end" | "flex-start";
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<BadgeStackComponent, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<BadgeStackComponent, "ptech-badge-stack", never, { "direction": { "alias": "direction"; "required": false; }; "gap": { "alias": "gap"; "required": false; }; "wrap": { "alias": "wrap"; "required": false; }; "align": { "alias": "align"; "required": false; }; }, {}, never, ["*"], true, never>;
15
+ }
16
+ export {};
@@ -0,0 +1,43 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ type BadgeVariant = 'filled' | 'outline' | 'soft';
4
+ type BadgeSize = 'sm' | 'md' | 'lg';
5
+ type Preset = 'success' | 'warning' | 'error' | 'info' | 'neutral' | 'purple' | 'primary' | 'accent' | 'warn';
6
+ export declare class BadgeComponent {
7
+ /** Texto do badge (ou use <ng-content>) */
8
+ label: string;
9
+ /** mat-icon opcional */
10
+ icon?: string;
11
+ /** Tooltip opcional */
12
+ tooltip?: string;
13
+ /** Acessibilidade */
14
+ ariaLabel?: string;
15
+ /** Clique habilitado */
16
+ clickable: boolean;
17
+ disabled: boolean;
18
+ /** Forma/estilo */
19
+ pill: boolean;
20
+ uppercase: boolean;
21
+ size: BadgeSize;
22
+ variant: BadgeVariant;
23
+ /** Cor: preset (success, warning, …) ou qualquer CSS color (#hex, rgb, etc.) */
24
+ color: Preset | string;
25
+ badgeClick: EventEmitter<MouseEvent>;
26
+ badgeKey: EventEmitter<KeyboardEvent>;
27
+ /** papel ARIA: se clicável, vira “button” */
28
+ get role(): "button" | "status";
29
+ get tab(): 0 | -1;
30
+ onClick(ev: MouseEvent): void;
31
+ onKey(ev: KeyboardEvent): void;
32
+ get cssVars(): {
33
+ bg: string;
34
+ fg: string;
35
+ bd: string;
36
+ };
37
+ private resolveBaseColor;
38
+ private toRgb;
39
+ private contrastOn;
40
+ static ɵfac: i0.ɵɵFactoryDeclaration<BadgeComponent, never>;
41
+ static ɵcmp: i0.ɵɵComponentDeclaration<BadgeComponent, "ptech-badge", never, { "label": { "alias": "label"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "clickable": { "alias": "clickable"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "pill": { "alias": "pill"; "required": false; }; "uppercase": { "alias": "uppercase"; "required": false; }; "size": { "alias": "size"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, { "badgeClick": "badgeClick"; "badgeKey": "badgeKey"; }, never, ["*"], true, never>;
42
+ }
43
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './badge.component';
2
+ export * from './badge-stack.component';
@@ -0,0 +1,21 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class FlagComponent {
4
+ /** ISO 3166-1 alpha-2 (ex.: 'BR', 'ES', 'US'). */
5
+ code: string | null | undefined;
6
+ /** Tamanho em px (controla a altura; largura acompanha 4:3). */
7
+ size: number;
8
+ /** Usa ícone quadrado do flag-icons. */
9
+ squared: boolean;
10
+ /** Tooltip (fallback para o próprio code). */
11
+ tooltip?: string;
12
+ /** Texto opcional ao lado da bandeira. */
13
+ label?: string;
14
+ /** Emite click opcionalmente e muda o cursor. */
15
+ clickable: boolean;
16
+ flagClick: EventEmitter<string>;
17
+ get classCode(): string;
18
+ handleClick(): void;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<FlagComponent, never>;
20
+ static ɵcmp: i0.ɵɵComponentDeclaration<FlagComponent, "ptech-flag", never, { "code": { "alias": "code"; "required": false; }; "size": { "alias": "size"; "required": false; }; "squared": { "alias": "squared"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": false; }; "label": { "alias": "label"; "required": false; }; "clickable": { "alias": "clickable"; "required": false; }; }, { "flagClick": "flagClick"; }, never, never, true, never>;
21
+ }
@@ -0,0 +1 @@
1
+ export * from './flag.component';
@@ -9,8 +9,10 @@ import * as i7 from "../pipes/memory-format.pipe";
9
9
  import * as i8 from "../pipes/phone-brazil.pipe";
10
10
  import * as i9 from "../pipes/phone-spain.pipe";
11
11
  import * as i10 from "../pipes/uptime-format.pipe";
12
+ import * as i11 from "../pipes/time.durantion.pipe";
13
+ import * as i12 from "../pipes/is-longer-than.pipe";
12
14
  export declare class PipesModule {
13
15
  static ɵfac: i0.ɵɵFactoryDeclaration<PipesModule, never>;
14
- static ɵmod: i0.ɵɵNgModuleDeclaration<PipesModule, never, [typeof i1.CommonModule, typeof i2.CurrencyBrlPipe, typeof i3.DateAgoPipe, typeof i4.GetFirstStringBeforeSpacePipe, typeof i5.LineBreakAfterPeriodPipe, typeof i6.LineBreakAfterPipe, typeof i7.MemoryFormatPipe, typeof i8.PhoneBrazilPipe, typeof i9.PhoneSpainPipe, typeof i10.UptimeFormatPipe], [typeof i2.CurrencyBrlPipe, typeof i3.DateAgoPipe, typeof i4.GetFirstStringBeforeSpacePipe, typeof i5.LineBreakAfterPeriodPipe, typeof i6.LineBreakAfterPipe, typeof i7.MemoryFormatPipe, typeof i8.PhoneBrazilPipe, typeof i9.PhoneSpainPipe, typeof i10.UptimeFormatPipe]>;
16
+ static ɵmod: i0.ɵɵNgModuleDeclaration<PipesModule, never, [typeof i1.CommonModule, typeof i2.CurrencyBrlPipe, typeof i3.DateAgoPipe, typeof i4.GetFirstStringBeforeSpacePipe, typeof i5.LineBreakAfterPeriodPipe, typeof i6.LineBreakAfterPipe, typeof i7.MemoryFormatPipe, typeof i8.PhoneBrazilPipe, typeof i9.PhoneSpainPipe, typeof i10.UptimeFormatPipe, typeof i11.TimeDurationPipe, typeof i12.IsLongerThanPipe], [typeof i2.CurrencyBrlPipe, typeof i3.DateAgoPipe, typeof i4.GetFirstStringBeforeSpacePipe, typeof i5.LineBreakAfterPeriodPipe, typeof i6.LineBreakAfterPipe, typeof i7.MemoryFormatPipe, typeof i8.PhoneBrazilPipe, typeof i9.PhoneSpainPipe, typeof i10.UptimeFormatPipe, typeof i11.TimeDurationPipe, typeof i12.IsLongerThanPipe]>;
15
17
  static ɵinj: i0.ɵɵInjectorDeclaration<PipesModule>;
16
18
  }
@@ -12,26 +12,29 @@ import * as i10 from "../components/info-detail/info-detail-dialog.component";
12
12
  import * as i11 from "../components/action-dialog/action-dialog.component";
13
13
  import * as i12 from "../components/action-result-dialog/action-result-dialog.component";
14
14
  import * as i13 from "../components/button/button.component";
15
- import * as i14 from "../components/breadcrumb/breadcrumb.component";
16
- import * as i15 from "../components/title/title.component";
17
- import * as i16 from "../components/action-row/action-row.component";
18
- import * as i17 from "../components/header/header.component";
19
- import * as i18 from "../components/nav/nav.component";
20
- import * as i19 from "../components/footer/footer.component";
21
- import * as i20 from "../components/icon/icon.component";
22
- import * as i21 from "../components/select-entity/select-entity.component";
23
- import * as i22 from "../components/select-enum/select-enum.component";
24
- import * as i23 from "../components/radio-group-enum/radio-group-enum.component";
25
- import * as i24 from "../components/radio-group-entity/radio-group-entity.component";
26
- import * as i25 from "../components/slide-toggle/slide-toggle.component";
27
- import * as i26 from "../components/quantity-items/quantity-items.component";
28
- import * as i27 from "../components/loading-overlay/loading-overlay.component";
29
- import * as i28 from "../components/profile-menu/profile-menu.component";
30
- import * as i29 from "../components/check-box/check-box.component";
31
- import * as i30 from "../components/progress-bar/progress-bar.component";
32
- import * as i31 from "../components/progress-bar-multiple/progress-bar-multiple.component";
15
+ import * as i14 from "../components/badge/badge.component";
16
+ import * as i15 from "../components/badge/badge-stack.component";
17
+ import * as i16 from "../components/breadcrumb/breadcrumb.component";
18
+ import * as i17 from "../components/title/title.component";
19
+ import * as i18 from "../components/action-row/action-row.component";
20
+ import * as i19 from "../components/header/header.component";
21
+ import * as i20 from "../components/nav/nav.component";
22
+ import * as i21 from "../components/footer/footer.component";
23
+ import * as i22 from "../components/icon/icon.component";
24
+ import * as i23 from "../components/select-entity/select-entity.component";
25
+ import * as i24 from "../components/select-enum/select-enum.component";
26
+ import * as i25 from "../components/radio-group-enum/radio-group-enum.component";
27
+ import * as i26 from "../components/radio-group-entity/radio-group-entity.component";
28
+ import * as i27 from "../components/slide-toggle/slide-toggle.component";
29
+ import * as i28 from "../components/quantity-items/quantity-items.component";
30
+ import * as i29 from "../components/loading-overlay/loading-overlay.component";
31
+ import * as i30 from "../components/profile-menu/profile-menu.component";
32
+ import * as i31 from "../components/check-box/check-box.component";
33
+ import * as i32 from "../components/progress-bar/progress-bar.component";
34
+ import * as i33 from "../components/progress-bar-multiple/progress-bar-multiple.component";
35
+ import * as i34 from "../components/flag/flag.component";
33
36
  export declare class PumpkinTechModule {
34
37
  static ɵfac: i0.ɵɵFactoryDeclaration<PumpkinTechModule, never>;
35
- static ɵmod: i0.ɵɵNgModuleDeclaration<PumpkinTechModule, never, [typeof i1.CommonModule, typeof i2.CoreMaterialModule, typeof i3.InputComponent, typeof i4.TextareaComponent, typeof i5.InputDateComponent, typeof i6.InputDateRangeComponent, typeof i7.InputTimeComponent, typeof i8.InputCurrencyComponent, typeof i9.InfoDetailComponent, typeof i10.InfoDetailDialogComponent, typeof i11.ActionDialogComponent, typeof i12.ActionResultDialogComponent, typeof i13.ButtonComponent, typeof i14.BreadcrumbComponent, typeof i15.TitleComponent, typeof i16.ActionRowComponent, typeof i17.HeaderComponent, typeof i18.NavComponent, typeof i19.FooterComponent, typeof i20.IconComponent, typeof i21.SelectEntityComponent, typeof i22.SelectEnumComponent, typeof i23.RadioGroupEnumComponent, typeof i24.RadioGroupEntityComponent, typeof i25.SlideToggleComponent, typeof i26.QuantityItemsComponent, typeof i27.LoadingOverlayComponent, typeof i28.ProfileMenuComponent, typeof i29.CheckBoxComponent, typeof i30.ProgressBarComponent, typeof i31.ProgressBarMultipleComponent], [typeof i3.InputComponent, typeof i4.TextareaComponent, typeof i5.InputDateComponent, typeof i6.InputDateRangeComponent, typeof i7.InputTimeComponent, typeof i8.InputCurrencyComponent, typeof i9.InfoDetailComponent, typeof i10.InfoDetailDialogComponent, typeof i11.ActionDialogComponent, typeof i12.ActionResultDialogComponent, typeof i13.ButtonComponent, typeof i14.BreadcrumbComponent, typeof i15.TitleComponent, typeof i16.ActionRowComponent, typeof i17.HeaderComponent, typeof i18.NavComponent, typeof i19.FooterComponent, typeof i20.IconComponent, typeof i21.SelectEntityComponent, typeof i22.SelectEnumComponent, typeof i23.RadioGroupEnumComponent, typeof i24.RadioGroupEntityComponent, typeof i25.SlideToggleComponent, typeof i26.QuantityItemsComponent, typeof i27.LoadingOverlayComponent, typeof i28.ProfileMenuComponent, typeof i29.CheckBoxComponent, typeof i30.ProgressBarComponent, typeof i31.ProgressBarMultipleComponent, typeof i2.CoreMaterialModule]>;
38
+ static ɵmod: i0.ɵɵNgModuleDeclaration<PumpkinTechModule, never, [typeof i1.CommonModule, typeof i2.CoreMaterialModule, typeof i3.InputComponent, typeof i4.TextareaComponent, typeof i5.InputDateComponent, typeof i6.InputDateRangeComponent, typeof i7.InputTimeComponent, typeof i8.InputCurrencyComponent, typeof i9.InfoDetailComponent, typeof i10.InfoDetailDialogComponent, typeof i11.ActionDialogComponent, typeof i12.ActionResultDialogComponent, typeof i13.ButtonComponent, typeof i14.BadgeComponent, typeof i15.BadgeStackComponent, typeof i16.BreadcrumbComponent, typeof i17.TitleComponent, typeof i18.ActionRowComponent, typeof i19.HeaderComponent, typeof i20.NavComponent, typeof i21.FooterComponent, typeof i22.IconComponent, typeof i23.SelectEntityComponent, typeof i24.SelectEnumComponent, typeof i25.RadioGroupEnumComponent, typeof i26.RadioGroupEntityComponent, typeof i27.SlideToggleComponent, typeof i28.QuantityItemsComponent, typeof i29.LoadingOverlayComponent, typeof i30.ProfileMenuComponent, typeof i31.CheckBoxComponent, typeof i32.ProgressBarComponent, typeof i33.ProgressBarMultipleComponent, typeof i34.FlagComponent], [typeof i3.InputComponent, typeof i4.TextareaComponent, typeof i5.InputDateComponent, typeof i6.InputDateRangeComponent, typeof i7.InputTimeComponent, typeof i8.InputCurrencyComponent, typeof i9.InfoDetailComponent, typeof i10.InfoDetailDialogComponent, typeof i11.ActionDialogComponent, typeof i12.ActionResultDialogComponent, typeof i13.ButtonComponent, typeof i14.BadgeComponent, typeof i15.BadgeStackComponent, typeof i16.BreadcrumbComponent, typeof i17.TitleComponent, typeof i18.ActionRowComponent, typeof i19.HeaderComponent, typeof i20.NavComponent, typeof i21.FooterComponent, typeof i22.IconComponent, typeof i23.SelectEntityComponent, typeof i24.SelectEnumComponent, typeof i25.RadioGroupEnumComponent, typeof i26.RadioGroupEntityComponent, typeof i27.SlideToggleComponent, typeof i28.QuantityItemsComponent, typeof i29.LoadingOverlayComponent, typeof i30.ProfileMenuComponent, typeof i31.CheckBoxComponent, typeof i32.ProgressBarComponent, typeof i33.ProgressBarMultipleComponent, typeof i34.FlagComponent, typeof i2.CoreMaterialModule]>;
36
39
  static ɵinj: i0.ɵɵInjectorDeclaration<PumpkinTechModule>;
37
40
  }
@@ -8,3 +8,4 @@ export * from './phone-brazil.pipe';
8
8
  export * from './phone-spain.pipe';
9
9
  export * from './uptime-format.pipe';
10
10
  export * from './time.durantion.pipe';
11
+ export * from './is-longer-than.pipe';
@@ -0,0 +1,9 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class IsLongerThanPipe implements PipeTransform {
4
+ transform(input: Date | string | number | null | undefined, threshold: number | string, // horas (número) OU string: "00:30", "30m", "2h", "90s", "1:30:00"
5
+ now?: Date | null): boolean;
6
+ private parseThresholdToMs;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<IsLongerThanPipe, never>;
8
+ static ɵpipe: i0.ɵɵPipeDeclaration<IsLongerThanPipe, "isLongerThan", true>;
9
+ }
@@ -1,7 +1,7 @@
1
1
  import { PipeTransform } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class TimeDurationPipe implements PipeTransform {
4
- transform(input: Date | string | number | null | undefined): string;
4
+ transform(input: Date | string | number | null | undefined, now?: Date | null): string;
5
5
  static ɵfac: i0.ɵɵFactoryDeclaration<TimeDurationPipe, never>;
6
- static ɵpipe: i0.ɵɵPipeDeclaration<TimeDurationPipe, "timeDuration", false>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<TimeDurationPipe, "timeDuration", true>;
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pumpkin-tech/pumpkin-tech-ng",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Biblioteca Angular com utilitários e componentes Pumpkin Tech",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -19,14 +19,16 @@
19
19
  "@angular/animations": "18.2.13",
20
20
  "@angular/common": "18.2.13",
21
21
  "@angular/core": "18.2.13",
22
+ "@angular/forms": "18.2.13",
22
23
  "@angular/material": "18.2.13",
23
24
  "@angular/cdk": "18.2.13",
24
25
  "@angular/material-moment-adapter": "18.2.13",
25
26
  "moment": "^2.29.4",
26
27
  "@faker-js/faker": "^9.0.3",
27
- "@ngx-translate/core": "^16.0.4",
28
- "ngx-currency": "^18.0.0 || ^19.0.0",
29
- "ngx-material-timepicker": "^13.1.1"
28
+ "@ngx-translate/core": "^17.0.0",
29
+ "ngx-currency": "^18.0.0",
30
+ "ngx-material-timepicker": "^13.1.1",
31
+ "flag-icons": "^7.5.0"
30
32
  },
31
33
  "dependencies": {
32
34
  "tslib": "^2.5.0"
package/public-api.d.ts CHANGED
@@ -3,6 +3,8 @@ export * from './lib/layout/ptech-col.directive';
3
3
  export * from './lib/components/input';
4
4
  export * from './lib/components/textarea';
5
5
  export * from './lib/components/button';
6
+ export * from './lib/components/badge';
7
+ export * from './lib/components/button';
6
8
  export * from './lib/components/icon';
7
9
  export * from './lib/components/action-row';
8
10
  export * from './lib/components/quantity-items';
@@ -32,6 +34,7 @@ export * from './lib/components/input-date';
32
34
  export * from './lib/components/input-time';
33
35
  export * from './lib/components/input-currency';
34
36
  export * from './lib/components/title';
37
+ export * from './lib/components/flag';
35
38
  export * from './lib/modules/pumpkin-tech.module';
36
39
  export * from './lib/modules/directives.module';
37
40
  export * from './lib/modules/pipes.module';