@koalarx/ui 20.3.3 → 20.4.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.
@@ -1 +1 @@
1
- {"version":3,"file":"koalarx-ui-shared-components-input-field.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-field.base.ts","../../projects/koala-ui/shared/components/input-field/input-field.ts","../../projects/koala-ui/shared/components/input-field/input-field.html","../../projects/koala-ui/shared/components/input-field/koalarx-ui-shared-components-input-field.ts"],"sourcesContent":["import {\n booleanAttribute,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n linkedSignal,\n signal,\n} from '@angular/core';\nimport { FormControl, Validators } from '@angular/forms';\nimport { CURRENT_THEME } from '@koalarx/ui/core/config';\nimport { randomString } from '@koalarx/utils/KlString';\n\n@Directive()\nexport abstract class InputFieldBase {\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly required = signal(false);\n protected readonly isDisabled = linkedSignal(() => this.disabled());\n protected readonly isRequired = this.required.asReadonly();\n protected readonly fieldId = randomString(10, {\n lowercase: true,\n uppercase: true,\n });\n\n control = input.required<FormControl>();\n label = input<string>();\n placeholder = input<string>('');\n hint = input<string>();\n disabled = input(false, { transform: booleanAttribute });\n\n constructor() {\n effect(() => this.checkIsRequired(this.control()));\n\n effect(() => {\n CURRENT_THEME();\n\n if (\n this.elementRef.nativeElement?.tagName.toLowerCase() !==\n 'kl-input-field'\n ) {\n const container = this.elementRef.nativeElement.parentElement;\n\n if (container) {\n const containerBgColor = this.getBgColorParent(container);\n\n this.elementRef.nativeElement.style = `--bg-input: ${containerBgColor}`;\n }\n }\n });\n }\n\n private getBgColorParent(element: HTMLElement): string {\n const containerBgColor = window.getComputedStyle(element).backgroundColor;\n\n if (!containerBgColor || containerBgColor === 'rgba(0, 0, 0, 0)') {\n if (!element.parentElement) {\n return 'var(--color-base-100)';\n }\n\n return this.getBgColorParent(element.parentElement!);\n }\n\n return containerBgColor;\n }\n\n private checkIsRequired(control: FormControl) {\n this.required.set(control.hasValidator(Validators.required));\n }\n}\n","import { Component, input } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FieldErrors } from '@koalarx/ui/shared/components/field-errors';\nimport { InputMask } from '@koalarx/ui/shared/directives';\nimport { InputFieldBase } from './input-field.base';\n\ntype InputTypeField =\n | 'text'\n | 'email'\n | 'password'\n | 'number'\n | 'tel'\n | 'url'\n | 'date'\n | 'datetime-local'\n | 'month'\n | 'time'\n | 'search';\n\n@Component({\n selector: 'kl-input-field',\n templateUrl: './input-field.html',\n imports: [ReactiveFormsModule, InputMask, FieldErrors],\n})\nexport class InputField extends InputFieldBase {\n type = input<InputTypeField>('text');\n mask = input<string>('');\n min = input<string>();\n max = input<string>();\n}\n","<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"label()\n ? label() + (isRequired() ? '*' : '')\n : placeholder()\"\n [required]=\"isRequired()\"\n [mask]=\"mask()\"\n [type]=\"type()\"\n [min]=\"min()\"\n [max]=\"max()\"\n />\n\n <ng-content select=\"[suffix]\" />\n</label>\n\n@if (hint()) {\n <span class=\"hint-content\">\n <i class=\"fa-regular fa-circle-question\"></i> {{hint()}}\n </span>\n}\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAesB,cAAc,CAAA;AACjB,IAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;AACxD,IAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,oDAAC;IACtB,UAAU,GAAG,YAAY,CAAC,MAAM,IAAI,CAAC,QAAQ,EAA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A,wIAAA,EAAA,MAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,aAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,SAAS,0EAAE,WAAW,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAE1C,UAAU,EAAA,UAAA,EAAA,CAAA;kBALtB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gBAAgB,WAEjB,CAAC,mBAAmB,EAAE,SAAS,EAAE,WAAW,CAAC,EAAA,QAAA,EAAA,41BAAA,EAAA;;;AEtBxD;;AAEG;;;;"}
1
+ {"version":3,"file":"koalarx-ui-shared-components-input-field.mjs","sources":["../../projects/koala-ui/shared/components/input-field/input-field.base.ts","../../projects/koala-ui/shared/components/input-field/input-field.ts","../../projects/koala-ui/shared/components/input-field/input-field.html","../../projects/koala-ui/shared/components/input-field/koalarx-ui-shared-components-input-field.ts"],"sourcesContent":["import {\n booleanAttribute,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n linkedSignal,\n signal,\n} from '@angular/core';\nimport { FormControl, Validators } from '@angular/forms';\nimport { CURRENT_THEME } from '@koalarx/ui/core/config';\nimport { randomString } from '@koalarx/utils/KlString';\n\n@Directive()\nexport abstract class InputFieldBase {\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly required = signal(false);\n\n readonly isDisabled = linkedSignal(() => this.disabled());\n readonly isRequired = this.required.asReadonly();\n readonly fieldId = randomString(10, {\n lowercase: true,\n uppercase: true,\n });\n\n control = input.required<FormControl>();\n label = input<string>();\n placeholder = input<string>('');\n hint = input<string>();\n disabled = input(false, { transform: booleanAttribute });\n\n constructor() {\n effect(() => this.checkIsRequired(this.control()));\n\n effect(() => {\n CURRENT_THEME();\n\n if (\n this.elementRef.nativeElement?.tagName.toLowerCase() !==\n 'kl-input-field'\n ) {\n const container = this.elementRef.nativeElement.parentElement;\n\n if (container) {\n const containerBgColor = this.getBgColorParent(container);\n\n this.elementRef.nativeElement.style = `--bg-input: ${containerBgColor}`;\n }\n }\n });\n }\n\n private getBgColorParent(element: HTMLElement): string {\n const containerBgColor = window.getComputedStyle(element).backgroundColor;\n\n if (!containerBgColor || containerBgColor === 'rgba(0, 0, 0, 0)') {\n if (!element.parentElement) {\n return 'var(--color-base-100)';\n }\n\n return this.getBgColorParent(element.parentElement!);\n }\n\n return containerBgColor;\n }\n\n private checkIsRequired(control: FormControl) {\n this.required.set(control.hasValidator(Validators.required));\n }\n}\n","import { Component, input } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FieldErrors } from '@koalarx/ui/shared/components/field-errors';\nimport { InputMask } from '@koalarx/ui/shared/directives';\nimport { InputFieldBase } from './input-field.base';\n\ntype InputTypeField =\n | 'text'\n | 'email'\n | 'password'\n | 'number'\n | 'tel'\n | 'url'\n | 'date'\n | 'datetime-local'\n | 'month'\n | 'time'\n | 'search';\n\n@Component({\n selector: 'kl-input-field',\n templateUrl: './input-field.html',\n imports: [ReactiveFormsModule, InputMask, FieldErrors],\n})\nexport class InputField extends InputFieldBase {\n type = input<InputTypeField>('text');\n mask = input<string>('');\n min = input<string>();\n max = input<string>();\n}\n","<label [attr.for]=\"fieldId\" class=\"floating-label input validator w-full rounded-sm\">\n @if (label(); as label) {\n <span>\n <ng-content select=\"[icon]\" />\n {{ label }} {{ isRequired() ? '*' : '' }}\n </span>\n }\n\n <input\n [id]=\"fieldId\"\n [formControl]=\"control()\"\n [placeholder]=\"label()\n ? label() + (isRequired() ? '*' : '')\n : placeholder()\"\n [required]=\"isRequired()\"\n [mask]=\"mask()\"\n [type]=\"type()\"\n [min]=\"min()\"\n [max]=\"max()\"\n />\n\n <ng-content select=\"[suffix]\" />\n</label>\n\n@if (hint()) {\n <span class=\"hint-content\">\n <i class=\"fa-regular fa-circle-question\"></i> {{hint()}}\n </span>\n}\n\n<kl-field-errors [field]=\"control()\">\n <ng-container errors>\n <ng-content select=\"[errors]\" />\n </ng-container>\n</kl-field-errors>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAesB,cAAc,CAAA;AACjB,IAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;AACxD,IAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,oDAAC;IAEhC,UAAU,GAAG,YAAY,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;AAChD,IAAA,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE;AACvC,IAAA,OAAO,GAAG,YAAY,CAAC,EAAE,EAAE;AAClC,QAAA,SAAS,EAAE,IAAI;AACf,QAAA,SAAS,EAAE,IAAI;AAChB,KAAA,CAAC;AAEF,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,kDAAe;IACvC,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AACvB,IAAA,WAAW,GAAG,KAAK,CAAS,EAAE,uDAAC;IAC/B,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AACtB,IAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,4CAAI,SAAS,EAAE,gBAAgB,EAAA,CAAA,GAAA,CAA7B,EAAE,SAAS,EAAE,gBAAgB,EAAE,GAAC;AAExD,IAAA,WAAA,GAAA;A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ui",
3
- "version": "20.3.3",
3
+ "version": "20.4.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0"
@@ -15,8 +15,8 @@
15
15
  "@koalarx/utils": "^4.2.1",
16
16
  "@ngx-loading-bar/core": "^7.0.0",
17
17
  "@ngx-loading-bar/router": "^7.0.0",
18
- "@tailwindcss/postcss": "^4.1.11",
19
- "daisyui": "^5.0.43",
18
+ "@tailwindcss/postcss": "^4.1.18",
19
+ "daisyui": "^5.5.14",
20
20
  "date-fns": "^4.1.0",
21
21
  "jwt-decode": "^4.0.0",
22
22
  "marked": "^15.0.0",
@@ -26,7 +26,7 @@
26
26
  "prism-themes": "^1.9.0",
27
27
  "prismjs": "^1.30.0",
28
28
  "rxjs": "~7.8.0",
29
- "tailwindcss": "^4.1.11",
29
+ "tailwindcss": "^4.1.18",
30
30
  "tslib": "^2.3.0"
31
31
  },
32
32
  "sideEffects": false,
@@ -62,6 +62,22 @@
62
62
  "types": "./theme/index.d.ts",
63
63
  "default": "./fesm2022/koalarx-ui-theme.mjs"
64
64
  },
65
+ "./shared/directives": {
66
+ "types": "./shared/directives/index.d.ts",
67
+ "default": "./fesm2022/koalarx-ui-shared-directives.mjs"
68
+ },
69
+ "./shared/services": {
70
+ "types": "./shared/services/index.d.ts",
71
+ "default": "./fesm2022/koalarx-ui-shared-services.mjs"
72
+ },
73
+ "./shared/utils": {
74
+ "types": "./shared/utils/index.d.ts",
75
+ "default": "./fesm2022/koalarx-ui-shared-utils.mjs"
76
+ },
77
+ "./shared/validators": {
78
+ "types": "./shared/validators/index.d.ts",
79
+ "default": "./fesm2022/koalarx-ui-shared-validators.mjs"
80
+ },
65
81
  "./core/base": {
66
82
  "types": "./core/base/index.d.ts",
67
83
  "default": "./fesm2022/koalarx-ui-core-base.mjs"
@@ -86,46 +102,6 @@
86
102
  "types": "./core/translations/index.d.ts",
87
103
  "default": "./fesm2022/koalarx-ui-core-translations.mjs"
88
104
  },
89
- "./shared/directives": {
90
- "types": "./shared/directives/index.d.ts",
91
- "default": "./fesm2022/koalarx-ui-shared-directives.mjs"
92
- },
93
- "./shared/services": {
94
- "types": "./shared/services/index.d.ts",
95
- "default": "./fesm2022/koalarx-ui-shared-services.mjs"
96
- },
97
- "./shared/utils": {
98
- "types": "./shared/utils/index.d.ts",
99
- "default": "./fesm2022/koalarx-ui-shared-utils.mjs"
100
- },
101
- "./shared/validators": {
102
- "types": "./shared/validators/index.d.ts",
103
- "default": "./fesm2022/koalarx-ui-shared-validators.mjs"
104
- },
105
- "./core/components/dialog": {
106
- "types": "./core/components/dialog/index.d.ts",
107
- "default": "./fesm2022/koalarx-ui-core-components-dialog.mjs"
108
- },
109
- "./core/components/kl-root": {
110
- "types": "./core/components/kl-root/index.d.ts",
111
- "default": "./fesm2022/koalarx-ui-core-components-kl-root.mjs"
112
- },
113
- "./core/components/loader": {
114
- "types": "./core/components/loader/index.d.ts",
115
- "default": "./fesm2022/koalarx-ui-core-components-loader.mjs"
116
- },
117
- "./core/components/loader-page": {
118
- "types": "./core/components/loader-page/index.d.ts",
119
- "default": "./fesm2022/koalarx-ui-core-components-loader-page.mjs"
120
- },
121
- "./core/components/side-window": {
122
- "types": "./core/components/side-window/index.d.ts",
123
- "default": "./fesm2022/koalarx-ui-core-components-side-window.mjs"
124
- },
125
- "./core/components/snackbar": {
126
- "types": "./core/components/snackbar/index.d.ts",
127
- "default": "./fesm2022/koalarx-ui-core-components-snackbar.mjs"
128
- },
129
105
  "./shared/components/accordion": {
130
106
  "types": "./shared/components/accordion/index.d.ts",
131
107
  "default": "./fesm2022/koalarx-ui-shared-components-accordion.mjs"
@@ -190,9 +166,29 @@
190
166
  "types": "./shared/components/vertical-menu/index.d.ts",
191
167
  "default": "./fesm2022/koalarx-ui-shared-components-vertical-menu.mjs"
192
168
  },
193
- "./shared/components/input-field/autocomplete": {
194
- "types": "./shared/components/input-field/autocomplete/index.d.ts",
195
- "default": "./fesm2022/koalarx-ui-shared-components-input-field-autocomplete.mjs"
169
+ "./core/components/dialog": {
170
+ "types": "./core/components/dialog/index.d.ts",
171
+ "default": "./fesm2022/koalarx-ui-core-components-dialog.mjs"
172
+ },
173
+ "./core/components/kl-root": {
174
+ "types": "./core/components/kl-root/index.d.ts",
175
+ "default": "./fesm2022/koalarx-ui-core-components-kl-root.mjs"
176
+ },
177
+ "./core/components/loader": {
178
+ "types": "./core/components/loader/index.d.ts",
179
+ "default": "./fesm2022/koalarx-ui-core-components-loader.mjs"
180
+ },
181
+ "./core/components/loader-page": {
182
+ "types": "./core/components/loader-page/index.d.ts",
183
+ "default": "./fesm2022/koalarx-ui-core-components-loader-page.mjs"
184
+ },
185
+ "./core/components/side-window": {
186
+ "types": "./core/components/side-window/index.d.ts",
187
+ "default": "./fesm2022/koalarx-ui-core-components-side-window.mjs"
188
+ },
189
+ "./core/components/snackbar": {
190
+ "types": "./core/components/snackbar/index.d.ts",
191
+ "default": "./fesm2022/koalarx-ui-core-components-snackbar.mjs"
196
192
  },
197
193
  "./shared/components/input-field/field-group": {
198
194
  "types": "./shared/components/input-field/field-group/index.d.ts",
@@ -206,6 +202,10 @@
206
202
  "types": "./shared/components/input-field/input-checkbox/index.d.ts",
207
203
  "default": "./fesm2022/koalarx-ui-shared-components-input-field-input-checkbox.mjs"
208
204
  },
205
+ "./shared/components/input-field/input-cnpj": {
206
+ "types": "./shared/components/input-field/input-cnpj/index.d.ts",
207
+ "default": "./fesm2022/koalarx-ui-shared-components-input-field-input-cnpj.mjs"
208
+ },
209
209
  "./shared/components/input-field/input-cpf": {
210
210
  "types": "./shared/components/input-field/input-cpf/index.d.ts",
211
211
  "default": "./fesm2022/koalarx-ui-shared-components-input-field-input-cpf.mjs"
@@ -214,10 +214,6 @@
214
214
  "types": "./shared/components/input-field/input-currency/index.d.ts",
215
215
  "default": "./fesm2022/koalarx-ui-shared-components-input-field-input-currency.mjs"
216
216
  },
217
- "./shared/components/input-field/input-cnpj": {
218
- "types": "./shared/components/input-field/input-cnpj/index.d.ts",
219
- "default": "./fesm2022/koalarx-ui-shared-components-input-field-input-cnpj.mjs"
220
- },
221
217
  "./shared/components/input-field/input-date": {
222
218
  "types": "./shared/components/input-field/input-date/index.d.ts",
223
219
  "default": "./fesm2022/koalarx-ui-shared-components-input-field-input-date.mjs"
@@ -234,14 +230,14 @@
234
230
  "types": "./shared/components/input-field/input-month/index.d.ts",
235
231
  "default": "./fesm2022/koalarx-ui-shared-components-input-field-input-month.mjs"
236
232
  },
237
- "./shared/components/input-field/input-radio": {
238
- "types": "./shared/components/input-field/input-radio/index.d.ts",
239
- "default": "./fesm2022/koalarx-ui-shared-components-input-field-input-radio.mjs"
240
- },
241
233
  "./shared/components/input-field/input-password": {
242
234
  "types": "./shared/components/input-field/input-password/index.d.ts",
243
235
  "default": "./fesm2022/koalarx-ui-shared-components-input-field-input-password.mjs"
244
236
  },
237
+ "./shared/components/input-field/input-radio": {
238
+ "types": "./shared/components/input-field/input-radio/index.d.ts",
239
+ "default": "./fesm2022/koalarx-ui-shared-components-input-field-input-radio.mjs"
240
+ },
245
241
  "./shared/components/input-field/input-text": {
246
242
  "types": "./shared/components/input-field/input-text/index.d.ts",
247
243
  "default": "./fesm2022/koalarx-ui-shared-components-input-field-input-text.mjs"
@@ -254,14 +250,14 @@
254
250
  "types": "./shared/components/input-field/input-url/index.d.ts",
255
251
  "default": "./fesm2022/koalarx-ui-shared-components-input-field-input-url.mjs"
256
252
  },
257
- "./shared/components/input-field/switcher": {
258
- "types": "./shared/components/input-field/switcher/index.d.ts",
259
- "default": "./fesm2022/koalarx-ui-shared-components-input-field-switcher.mjs"
260
- },
261
253
  "./shared/components/input-field/select": {
262
254
  "types": "./shared/components/input-field/select/index.d.ts",
263
255
  "default": "./fesm2022/koalarx-ui-shared-components-input-field-select.mjs"
264
256
  },
257
+ "./shared/components/input-field/switcher": {
258
+ "types": "./shared/components/input-field/switcher/index.d.ts",
259
+ "default": "./fesm2022/koalarx-ui-shared-components-input-field-switcher.mjs"
260
+ },
265
261
  "./shared/components/input-field/textarea": {
266
262
  "types": "./shared/components/input-field/textarea/index.d.ts",
267
263
  "default": "./fesm2022/koalarx-ui-shared-components-input-field-textarea.mjs"
@@ -14,6 +14,7 @@ declare class FieldErrors {
14
14
  invalidPasswordHasUppercase: string;
15
15
  invalidPasswordHasNumber: string;
16
16
  invalidConfirmPassword: string;
17
+ selectTypeSearch: string;
17
18
  };
18
19
  field: i0.InputSignal<FormControl<any>>;
19
20
  static ɵfac: i0.ɵɵFactoryDeclaration<FieldErrors, never>;
@@ -4,9 +4,9 @@ import { FormControl } from '@angular/forms';
4
4
  declare abstract class InputFieldBase {
5
5
  private readonly elementRef;
6
6
  private readonly required;
7
- protected readonly isDisabled: _angular_core.WritableSignal<boolean>;
8
- protected readonly isRequired: _angular_core.Signal<boolean>;
9
- protected readonly fieldId: string;
7
+ readonly isDisabled: _angular_core.WritableSignal<boolean>;
8
+ readonly isRequired: _angular_core.Signal<boolean>;
9
+ readonly fieldId: string;
10
10
  control: _angular_core.InputSignal<FormControl<any>>;
11
11
  label: _angular_core.InputSignal<string | undefined>;
12
12
  placeholder: _angular_core.InputSignal<string>;
@@ -19,6 +19,7 @@ declare class InputCnpj extends InputFieldBase {
19
19
  invalidPasswordHasUppercase: string;
20
20
  invalidPasswordHasNumber: string;
21
21
  invalidConfirmPassword: string;
22
+ selectTypeSearch: string;
22
23
  };
23
24
  constructor();
24
25
  static ɵfac: i0.ɵɵFactoryDeclaration<InputCnpj, never>;
@@ -19,6 +19,7 @@ declare class InputCpf extends InputFieldBase {
19
19
  invalidPasswordHasUppercase: string;
20
20
  invalidPasswordHasNumber: string;
21
21
  invalidConfirmPassword: string;
22
+ selectTypeSearch: string;
22
23
  };
23
24
  constructor();
24
25
  static ɵfac: i0.ɵɵFactoryDeclaration<InputCpf, never>;
@@ -33,6 +33,7 @@ declare class InputPassword extends InputFieldBase implements OnInit {
33
33
  invalidPasswordHasUppercase: string;
34
34
  invalidPasswordHasNumber: string;
35
35
  invalidConfirmPassword: string;
36
+ selectTypeSearch: string;
36
37
  };
37
38
  type: _angular_core.WritableSignal<InputPasswordType>;
38
39
  enableStrongPasswordCheck: _angular_core.InputSignalWithTransform<boolean, unknown>;
@@ -14,6 +14,7 @@ declare class InputUrl extends InputFieldBase {
14
14
  invalidPasswordHasUppercase: string;
15
15
  invalidPasswordHasNumber: string;
16
16
  invalidConfirmPassword: string;
17
+ selectTypeSearch: string;
17
18
  };
18
19
  constructor();
19
20
  static ɵfac: i0.ɵɵFactoryDeclaration<InputUrl, never>;
@@ -1,7 +1,13 @@
1
- import * as i0 from '@angular/core';
2
- import { ResourceRef } from '@angular/core';
1
+ import * as _koalarx_ui_shared_components_input_field_select from '@koalarx/ui/shared/components/input-field/select';
2
+ import * as _angular_core from '@angular/core';
3
+ import { ResourceRef, Signal, OnInit, ApplicationRef, DestroyRef, Injector, ElementRef } from '@angular/core';
3
4
  import { InputFieldBase } from '@koalarx/ui/shared/components/input-field';
4
5
 
6
+ interface SelectDataOptionsFnParams {
7
+ filter?: string | null;
8
+ currentValue?: any | null;
9
+ internalFilter?: string | null;
10
+ }
5
11
  type SelectValue = string | number | boolean | null;
6
12
  interface SelectOption<TData = any> {
7
13
  label: string;
@@ -9,12 +15,67 @@ interface SelectOption<TData = any> {
9
15
  data?: TData;
10
16
  }
11
17
  type SelectList<TData = any> = SelectOption<TData>[];
12
- declare class Select extends InputFieldBase {
13
- options: i0.InputSignal<ResourceRef<SelectList<any>>>;
14
- onSelectChange(event: Event): void;
15
- static ɵfac: i0.ɵɵFactoryDeclaration<Select, never>;
16
- static ɵcmp: i0.ɵɵComponentDeclaration<Select, "kl-select", never, { "options": { "alias": "options"; "required": true; "isSignal": true; }; }, {}, never, ["[errors]"], true, never>;
18
+ type SelectDataOptionsFn = (data: Signal<SelectDataOptionsFnParams>) => ResourceRef<SelectList>;
19
+ type SelectDataOptions = SelectDataOptionsFn | ResourceRef<SelectList> | Signal<SelectList> | SelectList;
20
+ interface OptionsResource {
21
+ onDemand?: ResourceRef<SelectList>;
22
+ onServer?: ResourceRef<SelectList>;
23
+ inMemory?: SelectList;
24
+ inMemoryWithLoading?: Signal<SelectList>;
25
+ }
26
+
27
+ declare class Select extends InputFieldBase implements OnInit {
28
+ readonly appRef: ApplicationRef;
29
+ readonly destroyRef: DestroyRef;
30
+ readonly injector: Injector;
31
+ readonly selectField: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
32
+ readonly optionsResource: _angular_core.WritableSignal<OptionsResource | null>;
33
+ readonly optionList: _angular_core.WritableSignal<SelectList>;
34
+ readonly selectedOptions: _angular_core.WritableSignal<SelectList>;
35
+ readonly isLoading: _angular_core.WritableSignal<boolean>;
36
+ readonly requestOptionsParams: _angular_core.WritableSignal<SelectDataOptionsFnParams>;
37
+ readonly translations: {
38
+ required: string;
39
+ invalidEmail: string;
40
+ invalidMinLength: (requiredLength: number) => string;
41
+ invalidCPF: string;
42
+ invalidCNPJ: string;
43
+ invalidURL: string;
44
+ invalidPasswordHasSpecialCharacters: string;
45
+ invalidPasswordHasLowercase: string;
46
+ invalidPasswordHasUppercase: string;
47
+ invalidPasswordHasNumber: string;
48
+ invalidConfirmPassword: string;
49
+ selectTypeSearch: string;
50
+ };
51
+ readonly supportsExperimentalSelect: boolean;
52
+ readonly hasValue: _angular_core.WritableSignal<boolean>;
53
+ filter: _angular_core.ModelSignal<string | undefined>;
54
+ filteredValue: _angular_core.WritableSignal<string | null>;
55
+ options: _angular_core.InputSignal<SelectDataOptions>;
56
+ internalFilter: _angular_core.InputSignal<string | null>;
57
+ withoutFilter: _angular_core.InputSignalWithTransform<boolean, unknown>;
58
+ multiple: _angular_core.InputSignalWithTransform<boolean, unknown>;
59
+ selectedItem: _angular_core.OutputEmitterRef<any>;
60
+ get selectElement(): HTMLDivElement;
61
+ constructor();
62
+ ngOnInit(): void;
63
+ applyFilter(options: SelectList): _koalarx_ui_shared_components_input_field_select.SelectOption<any>[];
64
+ setValue(event: Event): void;
65
+ clear(event: MouseEvent): void;
66
+ removeOption(event: MouseEvent): void;
67
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Select, never>;
68
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<Select, "kl-select", never, { "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": true; "isSignal": true; }; "internalFilter": { "alias": "internalFilter"; "required": false; "isSignal": true; }; "withoutFilter": { "alias": "withoutFilter"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; }, { "filter": "filterChange"; "selectedItem": "selectedItem"; }, never, ["[errors]"], true, never>;
69
+ }
70
+
71
+ declare class SelectBuilder {
72
+ onDemand(config: SelectDataOptionsFn): SelectDataOptionsFn;
73
+ onServer(config: ResourceRef<SelectList>): ResourceRef<SelectList>;
74
+ inMemory(config: SelectList): SelectList;
75
+ inMemoryWithLoading(config: Signal<SelectList>): Signal<SelectList>;
76
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SelectBuilder, never>;
77
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<SelectBuilder>;
17
78
  }
18
79
 
19
- export { Select };
20
- export type { SelectList, SelectOption };
80
+ export { Select, SelectBuilder };
81
+ export type { OptionsResource, SelectDataOptions, SelectDataOptionsFn, SelectDataOptionsFnParams, SelectList, SelectOption, SelectValue };
@@ -19,4 +19,16 @@
19
19
  transform: translateX(100%);
20
20
  }
21
21
  }
22
+
23
+ @keyframes bounce {
24
+ 0% {
25
+ top: 10px;
26
+ }
27
+ 60% {
28
+ top: -5px;
29
+ }
30
+ 100% {
31
+ top: 0;
32
+ }
33
+ }
22
34
  }
package/theme/form.css CHANGED
@@ -4,13 +4,17 @@
4
4
  display: block;
5
5
  }
6
6
 
7
- kl-autocomplete-field .autocomplete-label {
7
+ kl-select-multiple .select-multiple-button {
8
+ overflow: unset;
9
+ }
10
+
11
+ kl-select-multiple .select-multiple-label {
8
12
  top: 0;
9
13
  left: 0.75rem;
10
14
  transition: top 0.2s, font-size 0.2s;
11
15
  }
12
16
 
13
- kl-autocomplete-field .has-value .autocomplete-label {
17
+ kl-select-multiple .has-value .select-multiple-label {
14
18
  position: absolute;
15
19
  display: block;
16
20
  font-size: 0.75rem;
@@ -19,12 +23,12 @@ kl-autocomplete-field .has-value .autocomplete-label {
19
23
  padding: 0 0.3rem;
20
24
  }
21
25
 
22
- kl-autocomplete-field .has-value .autocomplete-label span {
26
+ kl-select-multiple .has-value .select-multiple-label span {
23
27
  position: relative;
24
28
  z-index: 2;
25
29
  }
26
30
 
27
- kl-autocomplete-field .has-value .autocomplete-label:after {
31
+ kl-select-multiple .has-value .select-multiple-label:after {
28
32
  content: "";
29
33
  position: absolute;
30
34
  width: 100%;
@@ -34,21 +38,21 @@ kl-autocomplete-field .has-value .autocomplete-label:after {
34
38
  left: 0;
35
39
  }
36
40
 
37
- kl-autocomplete-field .has-value:focus .autocomplete-label:after {
41
+ kl-select-multiple .has-value:focus .select-multiple-label:after {
38
42
  height: 4px;
39
43
  }
40
44
 
41
- .kl-autocomplete-options-container input {
45
+ .kl-select-multiple-options-container input {
42
46
  -webkit-appearance: none;
43
47
  appearance: none;
44
48
  }
45
49
 
46
- .kl-autocomplete-options-container label.active {
50
+ .kl-select-multiple-options-container label.active {
47
51
  background-color: rgba(63, 63, 63, 0.7);
48
52
  transition: background-color 0.1s;
49
53
  }
50
54
 
51
- .kl-autocomplete-options-container label:has(input:checked):after {
55
+ .kl-select-multiple-options-container label:has(input:checked):after {
52
56
  content: "\f00c";
53
57
  color: var(--color-neutral-500);
54
58
  font-family: "Font Awesome 6 Free";
@@ -96,3 +100,191 @@ button:focus {
96
100
  font-size: 0.65rem;
97
101
  text-transform: uppercase;
98
102
  }
103
+
104
+ label.floating-label:not(:has(option:checked)) > span {
105
+ top: calc(var(--size-field, 0.25rem) * 10 / 2);
106
+ translate: 0 -50%;
107
+ pointer-events: none;
108
+ scale: 1;
109
+ }
110
+
111
+ kl-select .kl-select-container {
112
+ position: relative;
113
+ overflow: unset;
114
+ }
115
+
116
+ kl-select .kl-select-label {
117
+ position: absolute;
118
+ display: block;
119
+ top: 0.5rem;
120
+ left: 1rem;
121
+ font-size: 1rem;
122
+ transition: all 0.1s ease;
123
+ pointer-events: none;
124
+ z-index: 1;
125
+ }
126
+
127
+ kl-select .has-value:has(selectedcontent > *) .kl-select-label,
128
+ kl-select
129
+ .has-value:has(.kl-select-content .selectcontent > *)
130
+ .kl-select-label {
131
+ font-size: 0.75rem;
132
+ top: -0.6rem;
133
+ left: 0.6rem;
134
+ padding: 0 0.3rem;
135
+ }
136
+
137
+ kl-select .has-value .kl-select-label > span {
138
+ position: relative;
139
+ z-index: 2;
140
+ }
141
+
142
+ kl-select .has-value .kl-select-label:after {
143
+ content: "";
144
+ position: absolute;
145
+ width: 100%;
146
+ height: 3px;
147
+ background-color: var(--bg-input);
148
+ bottom: 0.4rem;
149
+ left: 0;
150
+ z-index: 1;
151
+ }
152
+
153
+ kl-select .has-value:focus .kl-select-label:after {
154
+ height: 4px;
155
+ }
156
+
157
+ select,
158
+ ::picker(select) {
159
+ appearance: base-select;
160
+ }
161
+
162
+ select,
163
+ .kl-select-button {
164
+ position: relative;
165
+ justify-content: space-between;
166
+ align-items: center;
167
+ width: 100%;
168
+ box-sizing: border-box;
169
+ min-height: calc(var(--spacing) * 10);
170
+ background-color: var(--color-base-100);
171
+ padding-inline: 0.75rem;
172
+ border-radius: var(--radius-sm);
173
+ border: 1px solid var(--color-neutral-600);
174
+ transition: opacity 0.3s;
175
+ }
176
+
177
+ select::picker-icon {
178
+ display: none;
179
+ }
180
+
181
+ kl-select .picker {
182
+ display: flex;
183
+ justify-content: space-between;
184
+ align-items: center;
185
+ gap: 1rem;
186
+ font-size: 0.8rem;
187
+ transition: rotate 0.3s ease;
188
+ color: var(--color-neutral-400);
189
+ }
190
+
191
+ select:open .picker,
192
+ kl-select .kl-select-button:popover-open .picker {
193
+ rotate: 180deg;
194
+ }
195
+
196
+ .kl-select-options-container[popover] {
197
+ display: none;
198
+ }
199
+
200
+ ::picker(select),
201
+ .kl-select-options-container[popover] {
202
+ position: relative;
203
+ width: var(--select-width);
204
+ box-sizing: border-box;
205
+ margin-block-start: 0.5rem;
206
+ margin-block-end: 0.5rem;
207
+ padding: 0;
208
+ background-color: var(--color-base-300);
209
+ border-radius: var(--radius-lg);
210
+ border: 1px solid var(--color-neutral-600);
211
+ transform: translateY(-1rem);
212
+ opacity: 0;
213
+ overflow: hidden;
214
+ transition: transform 0.3s ease allow-discrete,
215
+ opacity 0.3s ease allow-discrete, display 0.3s allow-discrete,
216
+ overlay 0.3s allow-discrete, height 0.3s allow-discrete;
217
+ position-area: var(--select-position-area, bottom);
218
+ }
219
+
220
+ ::picker(select):popover-open,
221
+ .kl-select-options-container.with-popover:popover-open {
222
+ transform: translateY(0);
223
+ opacity: 1;
224
+ display: flex;
225
+ }
226
+
227
+ select {
228
+ anchor-name: --select-content;
229
+ }
230
+
231
+ select selectedcontent span:not(.not-animate) {
232
+ position: relative;
233
+ animation: 0.5s ease bounce;
234
+ }
235
+
236
+ @starting-style {
237
+ ::picker(select):popover-open,
238
+ .kl-select-options-container.with-popover:popover-open {
239
+ transform: translateY(-1rem);
240
+ opacity: 0;
241
+ }
242
+ }
243
+
244
+ select option,
245
+ .kl-select-options-container.with-popover .kl-select-option-content {
246
+ display: flex;
247
+ justify-content: space-between;
248
+ padding: 0.25rem 0.5rem;
249
+ border-radius: var(--radius-md);
250
+ color: var(--color-neutral-300);
251
+ white-space: break-spaces;
252
+ }
253
+
254
+ .kl-select-options-container.with-popover .kl-select-option-content input {
255
+ -webkit-appearance: none;
256
+ appearance: none;
257
+ }
258
+
259
+ select option:focus,
260
+ .kl-select-options-container.with-popover
261
+ .kl-select-option-content
262
+ input:focus {
263
+ background-color: rgba(63, 63, 63, 0.7);
264
+ outline: none;
265
+ transition: background-color 0.1s;
266
+ }
267
+
268
+ select option:checked,
269
+ .kl-select-options-container.with-popover
270
+ .kl-select-option-content:has(input:checked) {
271
+ background-color: rgba(63, 63, 63, 0.7);
272
+ transition: background-color 0.1s;
273
+ }
274
+
275
+ select option::checkmark,
276
+ .kl-select-options-container.with-popover
277
+ .kl-select-option-content:has(input:checked):after {
278
+ content: "\f00c";
279
+ color: var(--color-neutral-500);
280
+ font-family: "Font Awesome 6 Free";
281
+ font-weight: 900;
282
+ font-size: 1rem;
283
+ margin-left: auto;
284
+ order: 1;
285
+ }
286
+
287
+ .kl-select-options-container.with-popover label.active {
288
+ background-color: rgba(63, 63, 63, 0.7);
289
+ transition: background-color 0.1s;
290
+ }