@gipisistemas/ngx-core 1.0.22 → 1.0.24

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.
@@ -8,6 +8,7 @@
8
8
  $white-100: utils.get-color($theme, white, 100);
9
9
  $secondary-50: utils.get-color($theme, secondary, 50);
10
10
  $secondary-100: utils.get-color($theme, secondary, 100);
11
+ $secondary-600: utils.get-color($theme, secondary, 600);
11
12
  $black-300: utils.get-color($theme, black, 300);
12
13
 
13
14
  .g-expansion-panel {
@@ -74,6 +75,16 @@
74
75
  font-weight: 700 !important;
75
76
  line-height: 2rem !important;
76
77
  letter-spacing: normal !important;
78
+
79
+ .g-expansion-panel-required {
80
+ margin-left: 0.8rem !important;
81
+ padding: 0.2rem 0.8rem !important;
82
+ font-size: 1.2rem !important;
83
+ line-height: 1.6rem !important;
84
+ color: $secondary-600 !important;
85
+ background: $secondary-100 !important;
86
+ border-radius: 9999px !important;
87
+ }
77
88
  }
78
89
 
79
90
  .g-expansion-panel-icon {
@@ -0,0 +1,95 @@
1
+ @use '../../theming/utils' as utils;
2
+
3
+ @mixin toggle-group-theme($theme: ()) {
4
+ $font-family: utils.get-font-family($theme);
5
+ $font-size: utils.get-font-size($theme);
6
+ $font-color: utils.get-font-color($theme);
7
+
8
+ $white-100: utils.get-color($theme, white, 100);
9
+ $secondary-50: utils.get-color($theme, secondary, 50);
10
+ $secondary-100: utils.get-color($theme, secondary, 100);
11
+ $primary-500: utils.get-color($theme, primary, 500);
12
+ $primary-600: utils.get-color($theme, primary, 500);
13
+
14
+ .g-toggle-group {
15
+ display: flex;
16
+ flex-direction: column;
17
+ gap: 4px;
18
+ font-family: $font-family;
19
+ color: $font-color;
20
+ width: 100%;
21
+ flex: 1;
22
+ }
23
+
24
+ .g-toggle-group-control {
25
+ --toggle-group-gap: 0.4rem;
26
+
27
+ display: flex;
28
+ align-items: stretch;
29
+ width: 100%;
30
+ border-radius: 0.8rem;
31
+ padding: var(--toggle-group-gap);
32
+ background: $secondary-50;
33
+ overflow: hidden;
34
+ position: relative;
35
+
36
+ &.is-empty {
37
+ min-height: 4rem;
38
+ }
39
+
40
+ &.is-disabled {
41
+ opacity: 0.7;
42
+ }
43
+
44
+ .g-toggle-group-control-input {
45
+ display: none;
46
+ }
47
+
48
+ .g-toggle-group-control-label {
49
+ position: relative;
50
+ z-index: 2;
51
+ flex: 1;
52
+ text-align: center;
53
+ padding: 0.4rem 1.2rem;
54
+ font-size: $font-size;
55
+ color: $font-color;
56
+ font-weight: 500;
57
+ cursor: pointer;
58
+ user-select: none;
59
+ white-space: nowrap;
60
+ transition:
61
+ color 0.3s ease,
62
+ opacity 0.2s ease;
63
+
64
+ &.is-selected {
65
+ color: $white-100;
66
+ }
67
+
68
+ &.is-disabled {
69
+ cursor: not-allowed;
70
+ text-decoration: line-through;
71
+ color: $secondary-100;
72
+ }
73
+ }
74
+
75
+ .g-toggle-group-control-slider {
76
+ position: absolute;
77
+ z-index: 1;
78
+ top: var(--toggle-group-gap);
79
+ left: var(--toggle-group-gap);
80
+ height: calc(100% - (var(--toggle-group-gap) * 2));
81
+ border-radius: 0.6rem;
82
+ background-color: $primary-500;
83
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
84
+ transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
85
+
86
+ &.is-disabled {
87
+ background-color: $secondary-100;
88
+ }
89
+
90
+ &:not(.is-disabled):hover {
91
+ background-color: $primary-600;
92
+ }
93
+ }
94
+ }
95
+ }
@@ -13707,6 +13707,7 @@ class ExpansionPanel {
13707
13707
  this.name = input(this._uniqueId, ...(ngDevMode ? [{ debugName: "name" }] : []));
13708
13708
  this.label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
13709
13709
  this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
13710
+ this.required = input(false, ...(ngDevMode ? [{ debugName: "required", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
13710
13711
  this.initState = input('collapsed', ...(ngDevMode ? [{ debugName: "initState" }] : []));
13711
13712
  this.icon = input('', ...(ngDevMode ? [{ debugName: "icon" }] : []));
13712
13713
  this.svgIcon = input('', ...(ngDevMode ? [{ debugName: "svgIcon" }] : []));
@@ -13745,7 +13746,7 @@ class ExpansionPanel {
13745
13746
  this.expansionPanel()?.close();
13746
13747
  }
13747
13748
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ExpansionPanel, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
13748
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ExpansionPanel, isStandalone: true, selector: "gipi-expansion-panel", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, initState: { classPropertyName: "initState", publicName: "initState", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, svgIcon: { classPropertyName: "svgIcon", publicName: "svgIcon", isSignal: true, isRequired: false, transformFunction: null }, iconFontSet: { classPropertyName: "iconFontSet", publicName: "iconFontSet", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, iconVariation: { classPropertyName: "iconVariation", publicName: "iconVariation", isSignal: true, isRequired: false, transformFunction: null }, iconWeight: { classPropertyName: "iconWeight", publicName: "weight", isSignal: true, isRequired: false, transformFunction: null }, iconGrade: { classPropertyName: "iconGrade", publicName: "grade", isSignal: true, isRequired: false, transformFunction: null }, iconOptical: { classPropertyName: "iconOptical", publicName: "optical", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClickEvent: "click", onFocusEvent: "focus", onBlurEvent: "blur", onOpenedEvent: "opened", onClosedEvent: "closed" }, host: { properties: { "attr.id": "id()", "attr.name": "name()" }, classAttribute: "g-expansion-panel" }, viewQueries: [{ propertyName: "expansionPanel", first: true, predicate: ["expansionPanel"], descendants: true, isSignal: true }], exportAs: ["gExpansionPanel"], ngImport: i0, template: `
13749
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ExpansionPanel, isStandalone: true, selector: "gipi-expansion-panel", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, initState: { classPropertyName: "initState", publicName: "initState", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, svgIcon: { classPropertyName: "svgIcon", publicName: "svgIcon", isSignal: true, isRequired: false, transformFunction: null }, iconFontSet: { classPropertyName: "iconFontSet", publicName: "iconFontSet", isSignal: true, isRequired: false, transformFunction: null }, iconSize: { classPropertyName: "iconSize", publicName: "iconSize", isSignal: true, isRequired: false, transformFunction: null }, iconVariation: { classPropertyName: "iconVariation", publicName: "iconVariation", isSignal: true, isRequired: false, transformFunction: null }, iconWeight: { classPropertyName: "iconWeight", publicName: "weight", isSignal: true, isRequired: false, transformFunction: null }, iconGrade: { classPropertyName: "iconGrade", publicName: "grade", isSignal: true, isRequired: false, transformFunction: null }, iconOptical: { classPropertyName: "iconOptical", publicName: "optical", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClickEvent: "click", onFocusEvent: "focus", onBlurEvent: "blur", onOpenedEvent: "opened", onClosedEvent: "closed" }, host: { properties: { "attr.id": "id()", "attr.name": "name()" }, classAttribute: "g-expansion-panel" }, viewQueries: [{ propertyName: "expansionPanel", first: true, predicate: ["expansionPanel"], descendants: true, isSignal: true }], exportAs: ["gExpansionPanel"], ngImport: i0, template: `
13749
13750
  <mat-accordion
13750
13751
  displayMode="default"
13751
13752
  [multi]="true"
@@ -13762,7 +13763,12 @@ class ExpansionPanel {
13762
13763
  (blur)="onBlurEvent.emit($event)"
13763
13764
  >
13764
13765
  <mat-expansion-panel-header>
13765
- <mat-panel-title>{{ label() }}</mat-panel-title>
13766
+ <mat-panel-title>
13767
+ {{ label() }}
13768
+ @if (required()) {
13769
+ <span class="g-expansion-panel-required">Obrigatório</span>
13770
+ }
13771
+ </mat-panel-title>
13766
13772
 
13767
13773
  @if (icon() || svgIcon()) {
13768
13774
  <gipi-icon
@@ -13803,7 +13809,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
13803
13809
  (blur)="onBlurEvent.emit($event)"
13804
13810
  >
13805
13811
  <mat-expansion-panel-header>
13806
- <mat-panel-title>{{ label() }}</mat-panel-title>
13812
+ <mat-panel-title>
13813
+ {{ label() }}
13814
+ @if (required()) {
13815
+ <span class="g-expansion-panel-required">Obrigatório</span>
13816
+ }
13817
+ </mat-panel-title>
13807
13818
 
13808
13819
  @if (icon() || svgIcon()) {
13809
13820
  <gipi-icon
@@ -13828,7 +13839,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
13828
13839
  '[attr.name]': 'name()',
13829
13840
  class: 'g-expansion-panel',
13830
13841
  }, standalone: true, imports: [MatExpansionModule, IconModule] }]
13831
- }], ctorParameters: () => [], propDecorators: { expansionPanel: [{ type: i0.ViewChild, args: ['expansionPanel', { isSignal: true }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], initState: [{ type: i0.Input, args: [{ isSignal: true, alias: "initState", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], svgIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "svgIcon", required: false }] }], iconFontSet: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconFontSet", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }], iconVariation: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconVariation", required: false }] }], iconWeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "weight", required: false }] }], iconGrade: [{ type: i0.Input, args: [{ isSignal: true, alias: "grade", required: false }] }], iconOptical: [{ type: i0.Input, args: [{ isSignal: true, alias: "optical", required: false }] }], onClickEvent: [{ type: i0.Output, args: ["click"] }], onFocusEvent: [{ type: i0.Output, args: ["focus"] }], onBlurEvent: [{ type: i0.Output, args: ["blur"] }], onOpenedEvent: [{ type: i0.Output, args: ["opened"] }], onClosedEvent: [{ type: i0.Output, args: ["closed"] }] } });
13842
+ }], ctorParameters: () => [], propDecorators: { expansionPanel: [{ type: i0.ViewChild, args: ['expansionPanel', { isSignal: true }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], initState: [{ type: i0.Input, args: [{ isSignal: true, alias: "initState", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], svgIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "svgIcon", required: false }] }], iconFontSet: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconFontSet", required: false }] }], iconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconSize", required: false }] }], iconVariation: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconVariation", required: false }] }], iconWeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "weight", required: false }] }], iconGrade: [{ type: i0.Input, args: [{ isSignal: true, alias: "grade", required: false }] }], iconOptical: [{ type: i0.Input, args: [{ isSignal: true, alias: "optical", required: false }] }], onClickEvent: [{ type: i0.Output, args: ["click"] }], onFocusEvent: [{ type: i0.Output, args: ["focus"] }], onBlurEvent: [{ type: i0.Output, args: ["blur"] }], onOpenedEvent: [{ type: i0.Output, args: ["opened"] }], onClosedEvent: [{ type: i0.Output, args: ["closed"] }] } });
13832
13843
 
13833
13844
  class ExpansionPanelModule {
13834
13845
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ExpansionPanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
@@ -22272,6 +22283,203 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
22272
22283
  }]
22273
22284
  }] });
22274
22285
 
22286
+ class ToggleGroup extends BaseControlValueAccessor {
22287
+ constructor() {
22288
+ super();
22289
+ this._controlId = inject(_IdGenerator).getId('gipi-toggle-group-control-');
22290
+ this._uniqueId = inject(_IdGenerator).getId('gipi-toggle-group-');
22291
+ this.label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
22292
+ this.placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
22293
+ this.help = input('', ...(ngDevMode ? [{ debugName: "help" }] : []));
22294
+ this.hintLabel = input('', ...(ngDevMode ? [{ debugName: "hintLabel" }] : []));
22295
+ this.options = input.required(...(ngDevMode ? [{ debugName: "options" }] : []));
22296
+ this.onFocus = output({ alias: 'focus' });
22297
+ this.onBlur = output({ alias: 'blur' });
22298
+ this.onKeydown = output({ alias: 'keydown' });
22299
+ this.onChange = output({ alias: 'change' });
22300
+ this.selectedIndex = computed(() => {
22301
+ const index = this.options().findIndex((option) => option.value === this.value());
22302
+ return index >= 0 ? index : 0;
22303
+ }, ...(ngDevMode ? [{ debugName: "selectedIndex" }] : []));
22304
+ this.selectedOption = computed(() => this.options().find((option) => option.value === this.value()) ?? null, ...(ngDevMode ? [{ debugName: "selectedOption" }] : []));
22305
+ this.sliderWidth = computed(() => {
22306
+ const options = this.options();
22307
+ if (!options.length) {
22308
+ return '0px';
22309
+ }
22310
+ return `calc((100% - 8px) / ${options.length})`;
22311
+ }, ...(ngDevMode ? [{ debugName: "sliderWidth" }] : []));
22312
+ this.sliderTransform = computed(() => `translateX(${this.selectedIndex() * 100}%)`, ...(ngDevMode ? [{ debugName: "sliderTransform" }] : []));
22313
+ }
22314
+ writeControlValue(value, setModelValue) {
22315
+ const firstValue = this._firstEnabledOptionValue();
22316
+ if (!value) {
22317
+ this.value.set(firstValue);
22318
+ if (setModelValue) {
22319
+ setModelValue(value);
22320
+ }
22321
+ this._changeDetectorRef.markForCheck();
22322
+ return;
22323
+ }
22324
+ const selectedOption = this.options().find((opt) => opt.value === this.value());
22325
+ if (selectedOption?.disabled) {
22326
+ this.value.set(firstValue);
22327
+ if (setModelValue) {
22328
+ setModelValue(value);
22329
+ }
22330
+ this._changeDetectorRef.markForCheck();
22331
+ return;
22332
+ }
22333
+ this.value.set(value);
22334
+ if (setModelValue) {
22335
+ setModelValue(value);
22336
+ }
22337
+ this._changeDetectorRef.markForCheck();
22338
+ }
22339
+ _firstEnabledOptionValue() {
22340
+ const firstEnabledOption = this.options().find((option) => !option.disabled);
22341
+ return firstEnabledOption?.value ?? null;
22342
+ }
22343
+ isOptionDisabled(option) {
22344
+ if (ObjectUtil.isEmpty(option)) {
22345
+ return false;
22346
+ }
22347
+ if (this.$disabled()) {
22348
+ return true;
22349
+ }
22350
+ if (typeof option.disabled === 'function') {
22351
+ return option.disabled(option);
22352
+ }
22353
+ return !!option.disabled;
22354
+ }
22355
+ onHandleOptionClick(option) {
22356
+ if (this.$disabled() || this.isOptionDisabled(option)) {
22357
+ return;
22358
+ }
22359
+ if (this.value() === option.value) {
22360
+ this._onTouched();
22361
+ return;
22362
+ }
22363
+ this.notifyValueChange(option.value);
22364
+ this.markAsTouched();
22365
+ this._changeDetectorRef.markForCheck();
22366
+ }
22367
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ToggleGroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
22368
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ToggleGroup, isStandalone: true, selector: "gipi-toggle-group", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, help: { classPropertyName: "help", publicName: "help", isSignal: true, isRequired: false, transformFunction: null }, hintLabel: { classPropertyName: "hintLabel", publicName: "hintLabel", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onFocus: "focus", onBlur: "blur", onKeydown: "keydown", onChange: "change" }, host: { properties: { "attr.id": "id()", "attr.name": "name()", "class.g-toggle-group-disabled": "$disabled()" }, classAttribute: "g-toggle-group" }, providers: [provideValueAccessor(ToggleGroup)], exportAs: ["gToggleGroup"], usesInheritance: true, ngImport: i0, template: `
22369
+ @if (label()) {
22370
+ <gipi-label
22371
+ [controlId]="_controlId"
22372
+ [label]="label()"
22373
+ [help]="help()"
22374
+ [required]="required()"
22375
+ />
22376
+ }
22377
+
22378
+ <div
22379
+ class="g-toggle-group-control"
22380
+ [class.is-empty]="!options().length"
22381
+ [class.is-disabled]="$disabled()"
22382
+ >
22383
+ @for (option of options(); track option.value) {
22384
+ <input
22385
+ class="g-toggle-group-control-input"
22386
+ type="radio"
22387
+ [id]="name() + '-' + $index"
22388
+ [name]="name()"
22389
+ [checked]="value() === option.value"
22390
+ [disabled]="isOptionDisabled(option)"
22391
+ (change)="onHandleOptionClick(option)"
22392
+ />
22393
+
22394
+ <label
22395
+ class="g-toggle-group-control-label"
22396
+ [for]="name() + '-' + $index"
22397
+ [class.is-selected]="value() === option.value"
22398
+ [class.is-disabled]="isOptionDisabled(option)"
22399
+ >
22400
+ {{ option.label }}
22401
+ </label>
22402
+ }
22403
+
22404
+ @if (!!options().length && selectedOption()) {
22405
+ <div
22406
+ class="g-toggle-group-control-slider"
22407
+ [class.is-disabled]="selectedOption()?.disabled"
22408
+ [style.width]="sliderWidth()"
22409
+ [style.transform]="sliderTransform()"
22410
+ ></div>
22411
+ }
22412
+ </div>
22413
+ `, isInline: true, styles: [""], dependencies: [{ kind: "ngmodule", type: LabelModule }, { kind: "component", type: Label, selector: "gipi-label", inputs: ["id", "name", "controlId", "label", "help", "required"], exportAs: ["gLabel"] }, { kind: "ngmodule", type: HelpfulTipModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
22414
+ }
22415
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ToggleGroup, decorators: [{
22416
+ type: Component,
22417
+ args: [{ selector: 'gipi-toggle-group', exportAs: 'gToggleGroup', template: `
22418
+ @if (label()) {
22419
+ <gipi-label
22420
+ [controlId]="_controlId"
22421
+ [label]="label()"
22422
+ [help]="help()"
22423
+ [required]="required()"
22424
+ />
22425
+ }
22426
+
22427
+ <div
22428
+ class="g-toggle-group-control"
22429
+ [class.is-empty]="!options().length"
22430
+ [class.is-disabled]="$disabled()"
22431
+ >
22432
+ @for (option of options(); track option.value) {
22433
+ <input
22434
+ class="g-toggle-group-control-input"
22435
+ type="radio"
22436
+ [id]="name() + '-' + $index"
22437
+ [name]="name()"
22438
+ [checked]="value() === option.value"
22439
+ [disabled]="isOptionDisabled(option)"
22440
+ (change)="onHandleOptionClick(option)"
22441
+ />
22442
+
22443
+ <label
22444
+ class="g-toggle-group-control-label"
22445
+ [for]="name() + '-' + $index"
22446
+ [class.is-selected]="value() === option.value"
22447
+ [class.is-disabled]="isOptionDisabled(option)"
22448
+ >
22449
+ {{ option.label }}
22450
+ </label>
22451
+ }
22452
+
22453
+ @if (!!options().length && selectedOption()) {
22454
+ <div
22455
+ class="g-toggle-group-control-slider"
22456
+ [class.is-disabled]="selectedOption()?.disabled"
22457
+ [style.width]="sliderWidth()"
22458
+ [style.transform]="sliderTransform()"
22459
+ ></div>
22460
+ }
22461
+ </div>
22462
+ `, changeDetection: ChangeDetectionStrategy.OnPush, host: {
22463
+ '[attr.id]': 'id()',
22464
+ '[attr.name]': 'name()',
22465
+ '[class.g-toggle-group-disabled]': '$disabled()',
22466
+ class: 'g-toggle-group',
22467
+ }, providers: [provideValueAccessor(ToggleGroup)], imports: [LabelModule, HelpfulTipModule] }]
22468
+ }], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], help: [{ type: i0.Input, args: [{ isSignal: true, alias: "help", required: false }] }], hintLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "hintLabel", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }], onFocus: [{ type: i0.Output, args: ["focus"] }], onBlur: [{ type: i0.Output, args: ["blur"] }], onKeydown: [{ type: i0.Output, args: ["keydown"] }], onChange: [{ type: i0.Output, args: ["change"] }] } });
22469
+
22470
+ class ToggleGroupModule {
22471
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ToggleGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
22472
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: ToggleGroupModule, imports: [ToggleGroup], exports: [ToggleGroup] }); }
22473
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ToggleGroupModule, imports: [ToggleGroup] }); }
22474
+ }
22475
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ToggleGroupModule, decorators: [{
22476
+ type: NgModule,
22477
+ args: [{
22478
+ imports: [ToggleGroup],
22479
+ exports: [ToggleGroup],
22480
+ }]
22481
+ }] });
22482
+
22275
22483
  class ToggleSwitch extends BaseControlValueAccessor {
22276
22484
  constructor() {
22277
22485
  super();
@@ -24494,5 +24702,5 @@ function useRouteQueryParamsMap() {
24494
24702
  * Generated bundle index. Do not edit.
24495
24703
  */
24496
24704
 
24497
- export { ActionRow, ActionRowModule, AllowedPublicRoutesToken, AppMessagesToken, ArrayUtil, AutoFocusDirective, AutoFocusModule, Avatar, AvatarModule, BaseAppliedFilter, BaseAuthService, BaseAuthServiceToken, BaseAuthorityModel, BaseComponent, BaseControlValueAccessor, BaseCrudService, BaseFilterModel, BaseFormComponent, BaseFormDialogComponent, BaseFormDialogDataModel, BaseInput, BaseListComponent, BaseListDialogComponent, BaseListDialogDataModel, BaseMenuModel, BaseModel, BasePageModel, BaseQueryParams, BaseReportComponent, BaseService, BaseSortModel, BaseTokenModel, BaseUserModel, Button, ButtonGroup, ButtonGroupModule, ButtonModule, CAPITALIZE_ACRONYMS, CAPITALIZE_PREPOSITIONS, CURRENCY_OPTIONS_DEFAULT, CacheableService, Checkbox, CheckboxGroup, CheckboxModule, Chips, ChipsModule, ConfirmDialog, ConfirmDialogIcon, ConfirmDialogModel, ConfirmDialogModule, ConfirmDialogService, CssUtil, CurrencyDirective, CurrencyModule, CurrencyUtil, DEFAULT_MESSAGES, DatePicker, DatePickerModule, DateUtil, Debounce, DialogConfig, DialogService, DisableAutoFillDirective, DocumentPipe, DocumentUtil, EchartsConfigToken, EchartsDirective, EchartsModule, EmailUtil, Empty, EmptyModule, ExpansionPanel, ExpansionPanelModule, Fieldset, FieldsetModule, FileDragAndDrop, FileDragAndDropModule, FileSaverService, FilterListbox, FilterListboxModule, FilterPersistenceService, FilterService, FilterURLService, FlexLayoutDirective, FlexLayoutModule, FormField, FormFieldErrors, FormFieldInputDirective, FormFieldModule, FormFieldPrefixDirective, FormFieldSuffixDirective, FormWrapper, FormWrapperDialog, FormWrapperModule, HelpfulTip, HelpfulTipModule, Icon, IconModule, Input, InputCurrency, InputCurrencyModule, InputFile, InputFileModule, InputGroup, InputGroupAddon, InputGroupModule, InputModule, InputPhone, InputPhoneModule, Label, LabelModule, Loading, LoadingModule, LocalStorageToken, Lozenge, LozengeModule, MoneyPipe, NomalizeTextPipe, NumberToWordsUtil, NumberUtil, ObjectUtil, PAGINATOR_INTL_PT_BR, PageAdjustService, Paginator, PaginatorIntlToken, PaginatorModule, PaginatorPipe, PasswordRequirements, PasswordRequirementsModule, PasswordValidationUtil, PdfViewer, PdfViewerDialog, PdfViewerDialogModel, PdfViewerDialogModule, PdfViewerService, PhoneUtil, Popover, PopoverModule, PopoverTargetDirective, PopoverTriggerDirective, RadioGroup, RadioGroupModule, STATES_DATA, ScrollFadeDirective, ScrollFadeModule, SelectClientSide, SelectEnum, SelectModule, SelectServerSide, SessionStorageToken, Sidenav, SidenavContainer, SidenavContent, SidenavMenuItem, SidenavModule, Skeleton, SkeletonModule, SplitButton, SplitButtonModule, StateUtil, Step, Stepper, StepperModule, StringUtil, SvgRegisterService, Tab, TabGroup, Table, TableColumn, TableColumnBuilder, TableMenuItemContext, TableMenuItemContextBuilder, TableModule, TabsModule, Tag, TagModule, TextCapitalizeDirective, TextCapitalizeModule, TextEllipsisDirective, TextEllipsisModule, Textarea, TextareaModule, Toast, ToastIcon, ToastModel, ToastModule, ToastService, ToggleSwitch, ToggleSwitchModule, Toolbar, ToolbarModule, TooltipDirective, TooltipModule, TopNav, TopNavModule, TreeTable, TreeTableColumn, TreeTableColumnBuilder, TreeTableMenuItemContext, TreeTableMenuItemContextBuilder, TreeTableModule, UUIDUtil, UserProfile, UserProfileModule, animationFlyInOut, authChildGuard, authGuard, authInterceptor, eConfirmDialogTypes, eCurrencyInputMode, eMenuType, eSortDirection, eToastTypes, eTypeOperationCloseDialogEnum, eTypeOperationDialog, entityFilterSignal, errorInterceptor, filterSignal, provideAllowedPublicRoutes, provideAppMessages, provideBaseAuthService, provideEchartsCore, providePaginatorIntl, provideValueAccessor, publicChildGuard, publicGuard, rotateAnimation, rotateArrowTreeTableExpand, stateNamesMap, transformFilterSignal, useFilterPersistence, useLinkedFilter, useRouteParam, useRouteParamsMap, useRouteQueryParams, useRouteQueryParamsMap, useSearch };
24705
+ export { ActionRow, ActionRowModule, AllowedPublicRoutesToken, AppMessagesToken, ArrayUtil, AutoFocusDirective, AutoFocusModule, Avatar, AvatarModule, BaseAppliedFilter, BaseAuthService, BaseAuthServiceToken, BaseAuthorityModel, BaseComponent, BaseControlValueAccessor, BaseCrudService, BaseFilterModel, BaseFormComponent, BaseFormDialogComponent, BaseFormDialogDataModel, BaseInput, BaseListComponent, BaseListDialogComponent, BaseListDialogDataModel, BaseMenuModel, BaseModel, BasePageModel, BaseQueryParams, BaseReportComponent, BaseService, BaseSortModel, BaseTokenModel, BaseUserModel, Button, ButtonGroup, ButtonGroupModule, ButtonModule, CAPITALIZE_ACRONYMS, CAPITALIZE_PREPOSITIONS, CURRENCY_OPTIONS_DEFAULT, CacheableService, Checkbox, CheckboxGroup, CheckboxModule, Chips, ChipsModule, ConfirmDialog, ConfirmDialogIcon, ConfirmDialogModel, ConfirmDialogModule, ConfirmDialogService, CssUtil, CurrencyDirective, CurrencyModule, CurrencyUtil, DEFAULT_MESSAGES, DatePicker, DatePickerModule, DateUtil, Debounce, DialogConfig, DialogService, DisableAutoFillDirective, DocumentPipe, DocumentUtil, EchartsConfigToken, EchartsDirective, EchartsModule, EmailUtil, Empty, EmptyModule, ExpansionPanel, ExpansionPanelModule, Fieldset, FieldsetModule, FileDragAndDrop, FileDragAndDropModule, FileSaverService, FilterListbox, FilterListboxModule, FilterPersistenceService, FilterService, FilterURLService, FlexLayoutDirective, FlexLayoutModule, FormField, FormFieldErrors, FormFieldInputDirective, FormFieldModule, FormFieldPrefixDirective, FormFieldSuffixDirective, FormWrapper, FormWrapperDialog, FormWrapperModule, HelpfulTip, HelpfulTipModule, Icon, IconModule, Input, InputCurrency, InputCurrencyModule, InputFile, InputFileModule, InputGroup, InputGroupAddon, InputGroupModule, InputModule, InputPhone, InputPhoneModule, Label, LabelModule, Loading, LoadingModule, LocalStorageToken, Lozenge, LozengeModule, MoneyPipe, NomalizeTextPipe, NumberToWordsUtil, NumberUtil, ObjectUtil, PAGINATOR_INTL_PT_BR, PageAdjustService, Paginator, PaginatorIntlToken, PaginatorModule, PaginatorPipe, PasswordRequirements, PasswordRequirementsModule, PasswordValidationUtil, PdfViewer, PdfViewerDialog, PdfViewerDialogModel, PdfViewerDialogModule, PdfViewerService, PhoneUtil, Popover, PopoverModule, PopoverTargetDirective, PopoverTriggerDirective, RadioGroup, RadioGroupModule, STATES_DATA, ScrollFadeDirective, ScrollFadeModule, SelectClientSide, SelectEnum, SelectModule, SelectServerSide, SessionStorageToken, Sidenav, SidenavContainer, SidenavContent, SidenavMenuItem, SidenavModule, Skeleton, SkeletonModule, SplitButton, SplitButtonModule, StateUtil, Step, Stepper, StepperModule, StringUtil, SvgRegisterService, Tab, TabGroup, Table, TableColumn, TableColumnBuilder, TableMenuItemContext, TableMenuItemContextBuilder, TableModule, TabsModule, Tag, TagModule, TextCapitalizeDirective, TextCapitalizeModule, TextEllipsisDirective, TextEllipsisModule, Textarea, TextareaModule, Toast, ToastIcon, ToastModel, ToastModule, ToastService, ToggleGroup, ToggleGroupModule, ToggleSwitch, ToggleSwitchModule, Toolbar, ToolbarModule, TooltipDirective, TooltipModule, TopNav, TopNavModule, TreeTable, TreeTableColumn, TreeTableColumnBuilder, TreeTableMenuItemContext, TreeTableMenuItemContextBuilder, TreeTableModule, UUIDUtil, UserProfile, UserProfileModule, animationFlyInOut, authChildGuard, authGuard, authInterceptor, eConfirmDialogTypes, eCurrencyInputMode, eMenuType, eSortDirection, eToastTypes, eTypeOperationCloseDialogEnum, eTypeOperationDialog, entityFilterSignal, errorInterceptor, filterSignal, provideAllowedPublicRoutes, provideAppMessages, provideBaseAuthService, provideEchartsCore, providePaginatorIntl, provideValueAccessor, publicChildGuard, publicGuard, rotateAnimation, rotateArrowTreeTableExpand, stateNamesMap, transformFilterSignal, useFilterPersistence, useLinkedFilter, useRouteParam, useRouteParamsMap, useRouteQueryParams, useRouteQueryParamsMap, useSearch };
24498
24706
  //# sourceMappingURL=gipisistemas-ngx-core.mjs.map