@latitude-ui/widgets 0.0.22 → 0.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.
Files changed (68) hide show
  1. package/button/README.md +3 -3
  2. package/checkbox/README.md +3 -0
  3. package/core/README.md +3 -3
  4. package/fesm2022/latitude-ui-widgets-button.mjs +63 -28
  5. package/fesm2022/latitude-ui-widgets-button.mjs.map +1 -1
  6. package/fesm2022/latitude-ui-widgets-checkbox.mjs +9 -9
  7. package/fesm2022/latitude-ui-widgets-checkbox.mjs.map +1 -1
  8. package/fesm2022/latitude-ui-widgets-core.mjs +9 -103
  9. package/fesm2022/latitude-ui-widgets-core.mjs.map +1 -1
  10. package/fesm2022/latitude-ui-widgets-icons.mjs +18 -96
  11. package/fesm2022/latitude-ui-widgets-icons.mjs.map +1 -1
  12. package/fesm2022/latitude-ui-widgets-input.mjs +113 -118
  13. package/fesm2022/latitude-ui-widgets-input.mjs.map +1 -1
  14. package/fesm2022/latitude-ui-widgets-listbox.mjs +28 -36
  15. package/fesm2022/latitude-ui-widgets-listbox.mjs.map +1 -1
  16. package/fesm2022/latitude-ui-widgets-scrollable.mjs +102 -0
  17. package/fesm2022/latitude-ui-widgets-scrollable.mjs.map +1 -0
  18. package/fesm2022/latitude-ui-widgets-select.mjs +79 -90
  19. package/fesm2022/latitude-ui-widgets-select.mjs.map +1 -1
  20. package/fesm2022/latitude-ui-widgets-switch.mjs +9 -9
  21. package/fesm2022/latitude-ui-widgets-switch.mjs.map +1 -1
  22. package/fesm2022/latitude-ui-widgets-tabs.mjs +83 -0
  23. package/fesm2022/latitude-ui-widgets-tabs.mjs.map +1 -0
  24. package/fesm2022/latitude-ui-widgets-textbox.mjs +309 -23
  25. package/fesm2022/latitude-ui-widgets-textbox.mjs.map +1 -1
  26. package/fesm2022/latitude-ui-widgets-toolbar.mjs +55 -9
  27. package/fesm2022/latitude-ui-widgets-toolbar.mjs.map +1 -1
  28. package/fesm2022/latitude-ui-widgets.mjs.map +1 -1
  29. package/icons/README.md +3 -0
  30. package/input/README.md +3 -3
  31. package/listbox/README.md +3 -0
  32. package/package.json +29 -40
  33. package/scrollable/README.md +3 -0
  34. package/select/README.md +3 -0
  35. package/switch/README.md +3 -0
  36. package/tabs/README.md +3 -0
  37. package/textbox/README.md +3 -0
  38. package/toolbar/README.md +3 -0
  39. package/types/latitude-ui-widgets-button.d.ts +30 -0
  40. package/{checkbox/index.d.ts → types/latitude-ui-widgets-checkbox.d.ts} +2 -2
  41. package/types/latitude-ui-widgets-core.d.ts +12 -0
  42. package/{icons/index.d.ts → types/latitude-ui-widgets-icons.d.ts} +4 -8
  43. package/{input/index.d.ts → types/latitude-ui-widgets-input.d.ts} +43 -41
  44. package/types/latitude-ui-widgets-listbox.d.ts +20 -0
  45. package/types/latitude-ui-widgets-scrollable.d.ts +24 -0
  46. package/{select/index.d.ts → types/latitude-ui-widgets-select.d.ts} +3 -5
  47. package/{switch/index.d.ts → types/latitude-ui-widgets-switch.d.ts} +2 -2
  48. package/types/latitude-ui-widgets-tabs.d.ts +46 -0
  49. package/types/latitude-ui-widgets-textbox.d.ts +107 -0
  50. package/types/latitude-ui-widgets-toolbar.d.ts +24 -0
  51. package/button/index.d.ts +0 -19
  52. package/core/index.d.ts +0 -39
  53. package/fesm2022/latitude-ui-widgets-textbox-number.mjs +0 -168
  54. package/fesm2022/latitude-ui-widgets-textbox-number.mjs.map +0 -1
  55. package/listbox/index.d.ts +0 -23
  56. package/styles/_colors.scss +0 -99
  57. package/styles/_defaults.scss +0 -135
  58. package/styles/_index.scss +0 -11
  59. package/styles/_typography.scss +0 -37
  60. package/styles/button/_index.scss +0 -199
  61. package/styles/forms/_index.scss +0 -888
  62. package/styles/icons/_index.scss +0 -34
  63. package/styles/list/_index.scss +0 -0
  64. package/styles/listbox/_index.scss +0 -30
  65. package/textbox/index.d.ts +0 -26
  66. package/textbox-number/index.d.ts +0 -44
  67. package/toolbar/index.d.ts +0 -8
  68. /package/{index.d.ts → types/latitude-ui-widgets.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"latitude-ui-widgets-icons.mjs","sources":["../tmp-esm2022/icons/src/icon.tokens.js","../tmp-esm2022/icons/src/icon.service.js","../tmp-esm2022/icons/src/icon.component.js","../tmp-esm2022/icons/latitude-ui-widgets-icons.js"],"sourcesContent":["import { computed, inject, InjectionToken } from '@angular/core';\nexport const ICONS_ASSETS = new InjectionToken('ICONS_ASSETS', {\n providedIn: 'root',\n factory: () => 'assets/latitude-ui/icons',\n});\nexport const ICONS_RESOLVER = new InjectionToken('ICONS_RESOLVER', {\n providedIn: 'root',\n factory: () => {\n const assets = inject(ICONS_ASSETS);\n return (icon) => `${assets}/${icon.split('.').join('/')}.svg`;\n },\n});\nexport const ICONS_POLYFILL = new InjectionToken('ICONS_POLYFILL', {\n providedIn: 'root',\n factory: () => {\n return computed(() => !CSS.supports('mask', 'var(--lat-icon-url) no-repeat center / contain'));\n },\n});\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWNvbi50b2tlbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy93aWRnZXRzL2ljb25zL3NyYy9pY29uLnRva2Vucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sRUFBRSxjQUFjLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFakUsTUFBTSxDQUFDLE1BQU0sWUFBWSxHQUFHLElBQUksY0FBYyxDQUFTLGNBQWMsRUFBRTtJQUNyRSxVQUFVLEVBQUUsTUFBTTtJQUNsQixPQUFPLEVBQUUsR0FBRyxFQUFFLENBQUMsMEJBQTBCO0NBQzFDLENBQUMsQ0FBQztBQUVILE1BQU0sQ0FBQyxNQUFNLGNBQWMsR0FBRyxJQUFJLGNBQWMsQ0FBQyxnQkFBZ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biAgZmFjdG9yeTogKCkgPT4ge1xuICAgIGNvbnN0IGFzc2V0cyA9IGluamVjdChJQ09OU19BU1NFVFMpO1xuXG4gICAgcmV0dXJuIChpY29uOiBzdHJpbmcpOiBzdHJpbmcgPT4gYCR7YXNzZXRzfS8ke2ljb24uc3BsaXQoJy4nKS5qb2luKCcvJyl9LnN2Z2A7XG4gIH0sXG59KTtcblxuZXhwb3J0IGNvbnN0IElDT05TX1BPTFlGSUxMID0gbmV3IEluamVjdGlvblRva2VuKCdJQ09OU19QT0xZRklMTCcsIHtcbiAgcHJvdmlkZWRJbjogJ3Jvb3QnLFxuICBmYWN0b3J5OiAoKSA9PiB7XG4gICAgcmV0dXJuIGNvbXB1dGVkKCgpID0+ICFDU1Muc3VwcG9ydHMoJ21hc2snLCAndmFyKC0tbGF0LWljb24tdXJsKSBuby1yZXBlYXQgY2VudGVyIC8gY29udGFpbicpKTtcbiAgfSxcbn0pO1xuIl19","import { filter, finalize, map, of, share, switchMap, tap } from 'rxjs';\nimport { ElementRef, inject, Injectable, Renderer2, RendererFactory2 } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\nimport * as i0 from \"@angular/core\";\nexport class IconService {\n http = inject(HttpClient);\n renderer = inject(RendererFactory2).createRenderer(null, null);\n icons = new Map();\n tasks = new Map();\n get(url) {\n if (this.icons.has(url)) {\n return of(this.icons.get(url));\n }\n if (this.tasks.has(url)) {\n return this.tasks.get(url);\n }\n const task = this.http.get(url, { responseType: 'text' }).pipe(map((text) => this.normalize(text)), tap((html) => this.icons.set(url, html)), finalize(() => this.tasks.delete(url)), share());\n this.tasks.set(url, task);\n return task;\n }\n normalize(text) {\n text = text.replace(/style\\s*=/g, 'data-style=');\n text = text.replace(/class\\s*=/g, 'data-class=');\n const nativeElement = this.renderer.createElement('template');\n this.renderer.setProperty(nativeElement, 'innerHTML', text);\n const glyph = nativeElement.content.firstElementChild;\n if (glyph.tagName.toLowerCase() !== 'svg') {\n throw new Error(`<svg>...</svg> not found for <${glyph.tagName.toLowerCase()}>`);\n }\n const nodes = Array.from(glyph.querySelectorAll('[data-style]'));\n for (const node of nodes) {\n const styles = node.getAttribute('data-style');\n if (styles) {\n styles.split(';').forEach((style) => {\n const [property, value] = style.split(':');\n this.renderer.setStyle(node, property.trim(), value.trim());\n });\n this.renderer.removeAttribute(node, 'data-style');\n }\n }\n this.renderer.setAttribute(glyph, 'width', '1em');\n this.renderer.setAttribute(glyph, 'height', '1em');\n return glyph;\n }\n toObservable(url) {\n const renderer = inject(Renderer2);\n const nativeElement = inject((ElementRef)).nativeElement;\n toObservable(url).pipe(takeUntilDestroyed(), tap(() => {\n nativeElement.childNodes.forEach((node) => {\n renderer.removeChild(nativeElement, node);\n });\n }), filter((url) => url !== undefined), switchMap((url) => this.get(url)), tap((icon) => renderer.appendChild(nativeElement, icon.cloneNode(true)))).subscribe();\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.0.6\", ngImport: i0, type: IconService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"20.0.6\", ngImport: i0, type: IconService, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.0.6\", ngImport: i0, type: IconService, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWNvbi5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvd2lkZ2V0cy9pY29ucy9zcmMvaWNvbi5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsUUFBUSxFQUFFLE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HwgdW5kZWZpbmVkPikge1xuICAgIGNvbnN0IHJlbmRlcmVyID0gaW5qZWN0KFJlbmRlcmVyMik7XG4gICAgY29uc3QgbmF0aXZlRWxlbWVudCA9IGluamVjdChFbGVtZW50UmVmPEhUTUxFbGVtZW50PikubmF0aXZlRWxlbWVudDtcblxuICAgIHRvT2JzZXJ2YWJsZSh1cmwpLnBpcGUoXG4gICAgICB0YWtlVW50aWxEZXN0cm95ZWQoKSxcbiAgICAgIHRhcCgoKSA9PiB7XG4gICAgICAgIG5hdGl2ZUVsZW1lbnQuY2hpbGROb2Rlcy5mb3JFYWNoKChub2RlOiBDaGlsZE5vZGUpID0+IHtcbiAgICAgICAgICByZW5kZXJlci5yZW1vdmVDaGlsZChuYXRpdmVFbGVtZW50LCBub2RlKTtcbiAgICAgICAgfSk7XG4gICAgICB9KSxcbiAgICAgIGZpbHRlcigodXJsKSA9PiB1cmwgIT09IHVuZGVmaW5lZCksXG4gICAgICBzd2l0Y2hNYXAoKHVybCkgPT4gdGhpcy5nZXQodXJsKSksXG4gICAgICB0YXAoKGljb24pID0+IHJlbmRlcmVyLmFwcGVuZENoaWxkKG5hdGl2ZUVsZW1lbnQsIGljb24uY2xvbmVOb2RlKHRydWUpKSksXG4gICAgKS5zdWJzY3JpYmUoKTtcbiAgfVxufVxuIl19","import { ChangeDetectionStrategy, Component, computed, inject, input, ViewEncapsulation } from '@angular/core';\nimport { ICONS_POLYFILL, ICONS_RESOLVER } from './icon.tokens';\nimport { IconService } from './icon.service';\nimport * as i0 from \"@angular/core\";\nexport class IconComponent {\n resolve = inject(ICONS_RESOLVER);\n polyfill = inject(ICONS_POLYFILL);\n url = input();\n name = input();\n icon = computed(() => {\n const url = this.url();\n if (url) {\n return url;\n }\n const name = this.name();\n return name ? this.resolve(name) : '';\n });\n constructor() {\n if (this.polyfill()) {\n inject(IconService).toObservable(this.icon);\n }\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.0.6\", ngImport: i0, type: IconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.1.0\", version: \"20.0.6\", type: IconComponent, isStandalone: true, selector: \"lat-icon\", inputs: { url: { classPropertyName: \"url\", publicName: \"url\", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: \"name\", publicName: \"name\", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { \"role\": \"img\" }, properties: { \"attr.aria-label\": \"name()\", \"attr.data-polyfill\": \"polyfill() || undefined\", \"style.--lat-icon-url\": \"`url(${icon()})`\" } }, exportAs: [\"latIcon\"], ngImport: i0, template: \"\", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.0.6\", ngImport: i0, type: IconComponent, decorators: [{\n type: Component,\n args: [{ exportAs: 'latIcon', selector: 'lat-icon', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {\n role: 'img',\n '[attr.aria-label]': 'name()',\n '[attr.data-polyfill]': 'polyfill() || undefined',\n '[style.--lat-icon-url]': '`url(${icon()})`',\n }, template: \"\" }]\n }], ctorParameters: () => [] });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWNvbi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy93aWRnZXRzL2ljb25zL3NyYy9pY29uLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3dpZGdldHMvaWNvbnMvc3JjL2ljb24uY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxRQUFRLEVBQUUsTU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4gIH0sXG59KVxuZXhwb3J0IGNsYXNzIEljb25Db21wb25lbnQge1xuICBwdWJsaWMgcmVhZG9ubHkgcmVzb2x2ZSA9IGluamVjdChJQ09OU19SRVNPTFZFUik7XG4gIHB1YmxpYyByZWFkb25seSBwb2x5ZmlsbCA9IGluamVjdChJQ09OU19QT0xZRklMTCk7XG5cbiAgcHVibGljIHJlYWRvbmx5IHVybCA9IGlucHV0PHN0cmluZz4oKTtcbiAgcHVibGljIHJlYWRvbmx5IG5hbWUgPSBpbnB1dDxzdHJpbmc+KCk7XG5cbiAgcHVibGljIHJlYWRvbmx5IGljb24gPSBjb21wdXRlZCgoKSA9PiB7XG4gICAgY29uc3QgdXJsID0gdGhpcy51cmwoKTtcblxuICAgIGlmICh1cmwpIHtcbiAgICAgIHJldHVybiB1cmw7XG4gICAgfVxuXG4gICAgY29uc3QgbmFtZSA9IHRoaXMubmFtZSgpO1xuXG4gICAgcmV0dXJuIG5hbWUgPyB0aGlzLnJlc29sdmUobmFtZSkgOiAnJztcbiAgfSk7XG5cbiAgY29uc3RydWN0b3IoKSB7XG4gICAgaWYgKHRoaXMucG9seWZpbGwoKSkge1xuICAgICAgaW5qZWN0KEljb25TZXJ2aWNlKS50b09ic2VydmFibGUodGhpcy5pY29uKTtcbiAgICB9XG4gIH1cbn1cbiIsIiJdfQ==","/**\n * Generated bundle index. Do not edit.\n */\nexport * from './public-api';\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF0aXR1ZGUtdWktd2lkZ2V0cy1pY29ucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3dpZGdldHMvaWNvbnMvbGF0aXR1ZGUtdWktd2lkZ2V0cy1pY29ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsY0FBYyxDQUFDIiwic291cmNlc0NvbnRlbnQ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js","sources":["../../../../packages/widgets/icons/lib/icon.resolver.ts","../../../../packages/widgets/icons/lib/icon.component.ts","../../../../packages/widgets/icons/lib/icon.component.html","../../../../packages/widgets/icons/latitude-ui-widgets-icons.ts"],"sourcesContent":["import { inject, InjectionToken } from '@angular/core';\r\n\r\nimport { LAT_ASSETS_PATH } from '@latitude-ui/widgets/core';\r\n\r\nexport const LAT_ICON_RESOLVER = new InjectionToken(\r\n ngDevMode ? 'LAT_ICON_RESOLVER' : '',\r\n {\r\n factory: () => {\r\n const assets = inject(LAT_ASSETS_PATH);\r\n\r\n return (name: string) => `${assets}/icons/${name}.svg`;\r\n },\r\n },\r\n);\r\n","import { ChangeDetectionStrategy, Component, computed, inject, input, ViewEncapsulation } from '@angular/core';\r\nimport { LAT_ICON_RESOLVER } from './icon.resolver';\r\n\r\n\r\n@Component({\r\n exportAs: 'latIcon',\r\n selector: 'lat-icon',\r\n templateUrl: './icon.component.html',\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n host: {\r\n role: 'img',\r\n '[style.--lat-iconmask]': 'iconmask()'\r\n }\r\n})\r\nexport class IconComponent {\r\n readonly iconFn = inject(LAT_ICON_RESOLVER);\r\n\r\n readonly url = input<string>();\r\n readonly name = input<string>();\r\n\r\n readonly iconmask = computed(() => {\r\n const url = this.url();\r\n\r\n if (url) {\r\n return `url(${url})`;\r\n }\r\n\r\n const name = this.name();\r\n\r\n return name ? `url(${this.iconFn(name)})` : '';\r\n });\r\n}\r\n","","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAIO,MAAM,iBAAiB,GAAG,IAAI,cAAc,CACjD,SAAS,GAAG,mBAAmB,GAAG,EAAE,EACpC;IACE,OAAO,EAAE,MAAK;AACZ,QAAA,MAAM,MAAM,GAAG,MAAM,CAAC,eAAe,CAAC;QAEtC,OAAO,CAAC,IAAY,KAAK,GAAG,MAAM,CAAA,OAAA,EAAU,I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,EACpB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACJ,wBAAA,IAAI,EAAE,KAAK;AACX,wBAAA,wBAAwB,EAAE;AAC3B,qBAAA,EAAA,QAAA,EAAA,EAAA,EAAA;;;AEbH;;AAEG;;;;"}
@@ -1,45 +1,56 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, input, numberAttribute, booleanAttribute, computed, linkedSignal, signal, Directive, contentChild, ChangeDetectionStrategy, ViewEncapsulation, Component, InjectionToken } from '@angular/core';
3
- import { NgTemplateOutlet } from '@angular/common';
4
- import { emptyFn, uid, get, isString, template, isObjectLike, isFunction } from '@latitude-ui/stdlib';
2
+ import { InjectionToken, inject, input, numberAttribute, booleanAttribute, computed, linkedSignal, signal, Directive, contentChild, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
+ import { noop, uid } from '@latitude-ui/widgets/core';
5
4
  import { NgControl } from '@angular/forms';
6
5
 
7
- class BuildInInputValueAccessor {
6
+ const INPUT_OPTIONS = new InjectionToken(ngDevMode ? 'INPUT_OPTIONS' : '', {
7
+ factory: () => {
8
+ return {
9
+ size: 'md',
10
+ variant: 'default',
11
+ };
12
+ }
13
+ });
14
+
15
+ class HTMLInputDirective {
16
+ options = inject(INPUT_OPTIONS);
8
17
  dir = inject(NgControl, { self: true });
9
18
  input = inject((InputComponent), { host: true, optional: true });
10
- id = input();
11
- size = input('md');
12
- tabindex = input(0, { transform: numberAttribute });
13
- readonly = input(false, { transform: booleanAttribute });
14
- required = input(false, { transform: booleanAttribute });
15
- placeholder = input();
16
- value = computed(() => this._value());
17
- control = computed(() => this._control());
18
- valueAsString = linkedSignal({
19
- source: () => this._value(),
20
- computation: (value) => this._valueStringify(value),
21
- });
22
- status = computed(() => this._control()?.['statusReactive']());
23
- touched = computed(() => this._control()?.['touchedReactive']());
24
- pristine = computed(() => this._control()?.['pristineReactive']());
25
- valid = computed(() => this.status() === 'VALID');
26
- invalid = computed(() => this.status() === 'INVALID');
27
- pending = computed(() => this.status() === 'PENDING');
28
- disabled = computed(() => this.status() === 'DISABLED');
29
- dirty = computed(() => !this.pristine());
19
+ id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : []));
20
+ size = input(this.options.size, ...(ngDevMode ? [{ debugName: "size" }] : []));
21
+ variant = input(this.options.variant, ...(ngDevMode ? [{ debugName: "variant" }] : []));
22
+ tabindex = input(0, { ...(ngDevMode ? { debugName: "tabindex" } : {}), transform: numberAttribute });
23
+ readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : {}), transform: booleanAttribute });
24
+ required = input(false, { ...(ngDevMode ? { debugName: "required" } : {}), transform: booleanAttribute });
25
+ autofocus = input(undefined, { ...(ngDevMode ? { debugName: "autofocus" } : {}), transform: booleanAttribute });
26
+ placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : []));
27
+ value = computed(() => this._value(), ...(ngDevMode ? [{ debugName: "value" }] : []));
28
+ control = computed(() => this._control(), ...(ngDevMode ? [{ debugName: "control" }] : []));
29
+ valueAsString = linkedSignal({ ...(ngDevMode ? { debugName: "valueAsString" } : {}), source: () => this._value(),
30
+ computation: (value) => this.valueStringify(value) });
31
+ status = computed(() => this._control()?.['statusReactive'](), ...(ngDevMode ? [{ debugName: "status" }] : []));
32
+ touched = computed(() => this._control()?.['touchedReactive'](), ...(ngDevMode ? [{ debugName: "touched" }] : []));
33
+ pristine = computed(() => this._control()?.['pristineReactive'](), ...(ngDevMode ? [{ debugName: "pristine" }] : []));
34
+ valid = computed(() => this.status() === 'VALID', ...(ngDevMode ? [{ debugName: "valid" }] : []));
35
+ invalid = computed(() => this.status() === 'INVALID', ...(ngDevMode ? [{ debugName: "invalid" }] : []));
36
+ pending = computed(() => this.status() === 'PENDING', ...(ngDevMode ? [{ debugName: "pending" }] : []));
37
+ disabled = computed(() => this.status() === 'DISABLED', ...(ngDevMode ? [{ debugName: "disabled" }] : []));
38
+ dirty = computed(() => !this.pristine(), ...(ngDevMode ? [{ debugName: "dirty" }] : []));
30
39
  errors = computed(() => {
31
40
  this.value();
32
41
  this.status();
33
42
  const control = this.control();
34
43
  return control ? control.errors : null;
35
- });
36
- inputId = computed(() => (this.input ? this.input.inputId() : this.id()));
37
- labelId = computed(() => (this.input ? this.input.labelId() : undefined));
38
- inputSize = computed(() => (this.input ? this.input.size() : this.size()));
44
+ }, ...(ngDevMode ? [{ debugName: "errors" }] : []));
45
+ labelId = computed(() => this.input ? this.input.labelId() : undefined, ...(ngDevMode ? [{ debugName: "labelId" }] : []));
46
+ inputId = computed(() => this.input ? this.input.inputId() : this.id(), ...(ngDevMode ? [{ debugName: "inputId" }] : []));
47
+ inputSize = computed(() => this.input ? this.input.size() : this.size(), ...(ngDevMode ? [{ debugName: "inputSize" }] : []));
48
+ inputVariant = computed(() => this.input ? this.input.variant() : this.variant(), ...(ngDevMode ? [{ debugName: "inputVariant" }] : []));
49
+ outputId = computed(() => this.input ? this.input.outputId() : undefined, ...(ngDevMode ? [{ debugName: "outputId" }] : []));
39
50
  /** @internal */
40
- _value = signal(this.dir.value);
51
+ _value = signal(this.dir.value, ...(ngDevMode ? [{ debugName: "_value" }] : []));
41
52
  /** @internal */
42
- _control = signal(null);
53
+ _control = signal(null, ...(ngDevMode ? [{ debugName: "_control" }] : []));
43
54
  constructor() {
44
55
  this.dir.valueAccessor = {
45
56
  writeValue: (value) => {
@@ -47,14 +58,14 @@ class BuildInInputValueAccessor {
47
58
  },
48
59
  registerOnChange: (callback) => {
49
60
  this._markAsChanged = () => callback(this._value());
50
- // FIX: while FromControlNameDirective not register, underline control is undefined
61
+ // FIXME: while FromControlNameDirective not register, underline control is undefined
51
62
  Promise.resolve().then(() => {
52
63
  this._control.update(() => this.dir.control);
53
64
  });
54
65
  },
55
66
  registerOnTouched: (callback) => {
56
67
  this._markAsTouched = () => callback();
57
- },
68
+ }
58
69
  };
59
70
  }
60
71
  /**
@@ -78,145 +89,129 @@ class BuildInInputValueAccessor {
78
89
  this._markAsTouched();
79
90
  }
80
91
  /** @internal */
81
- _valueEquality(value0, value1) {
92
+ valueEquality(value0, value1) {
82
93
  return Object.is(value0, value1);
83
94
  }
84
95
  /** @internal */
85
- _valueStringify(value) {
96
+ valueStringify(value) {
86
97
  return value !== null && value !== undefined ? value.toString() : '';
87
98
  }
88
99
  /** @internal */
89
100
  _writeValue(input) {
90
101
  const value = this._value();
91
- if (this._valueEquality(value, input)) {
102
+ if (this.valueEquality(value, input)) {
92
103
  return false;
93
104
  }
94
105
  this._value.set(input);
95
106
  return true;
96
107
  }
97
108
  /** @internal */
98
- _markAsTouched = emptyFn;
109
+ _markAsTouched = noop;
99
110
  /** @internal */
100
- _markAsChanged = emptyFn;
101
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: BuildInInputValueAccessor, deps: [], target: i0.ɵɵFactoryTarget.Directive });
102
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: BuildInInputValueAccessor, isStandalone: true, inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "presentation" }, properties: { "attr.data-size": "inputSize() || undefined", "attr.data-dirty": "dirty() || undefined", "attr.data-invalid": "invalid() || undefined", "attr.data-pristine": "pristine() || undefined", "attr.data-disabled": "disabled() || undefined", "attr.data-readonly": "readonly() || undefined", "attr.data-required": "required() || undefined" } }, ngImport: i0 });
111
+ _markAsChanged = noop;
112
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: HTMLInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
113
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.3", type: HTMLInputDirective, isStandalone: true, inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "presentation" }, properties: { "attr.size": "inputSize() || undefined", "attr.variant": "inputVariant() || undefined", "attr.data-id": "inputId() || undefined", "attr.data-label": "labelId() || undefined", "attr.data-output": "outputId() || undefined", "attr.data-dirty": "dirty() || undefined", "attr.data-invalid": "invalid() || undefined", "attr.data-pristine": "pristine() || undefined", "attr.data-disabled": "disabled() || undefined", "attr.data-readonly": "readonly() || undefined", "attr.data-required": "required() || undefined" } }, ngImport: i0 });
103
114
  }
104
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: BuildInInputValueAccessor, decorators: [{
115
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: HTMLInputDirective, decorators: [{
105
116
  type: Directive,
106
117
  args: [{
107
118
  host: {
108
119
  role: 'presentation',
109
- '[attr.data-size]': 'inputSize() || undefined',
120
+ '[attr.size]': 'inputSize() || undefined',
121
+ '[attr.variant]': 'inputVariant() || undefined',
122
+ '[attr.data-id]': 'inputId() || undefined',
123
+ '[attr.data-label]': 'labelId() || undefined',
124
+ '[attr.data-output]': 'outputId() || undefined',
110
125
  '[attr.data-dirty]': 'dirty() || undefined',
111
126
  '[attr.data-invalid]': 'invalid() || undefined',
112
127
  '[attr.data-pristine]': 'pristine() || undefined',
113
128
  '[attr.data-disabled]': 'disabled() || undefined',
114
129
  '[attr.data-readonly]': 'readonly() || undefined',
115
- '[attr.data-required]': 'required() || undefined',
116
- },
130
+ '[attr.data-required]': 'required() || undefined'
131
+ }
117
132
  }]
118
- }], ctorParameters: () => [] });
133
+ }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }] } });
119
134
 
120
135
  class InputComponent {
121
- id = input();
122
- size = input('md');
123
- input = contentChild.required((BuildInInputValueAccessor));
124
- htmlId = computed(() => this.id() ?? uid());
125
- labelId = computed(() => `${this.htmlId()}-label`);
126
- inputId = computed(() => `${this.htmlId()}-input`);
127
- value = computed(() => this.input().value());
128
- valueAsString = computed(() => this.input().valueAsString());
129
- status = computed(() => this.input().status());
130
- touched = computed(() => this.input().touched());
131
- dirty = computed(() => this.input().dirty());
132
- valid = computed(() => this.input().valid());
133
- errors = computed(() => this.input().errors());
134
- invalid = computed(() => this.input().invalid());
135
- pending = computed(() => this.input().pending());
136
- pristine = computed(() => this.input().pristine());
137
- disabled = computed(() => this.input().disabled());
138
- readonly = computed(() => this.input().readonly());
139
- required = computed(() => this.input().required());
140
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
141
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: InputComponent, isStandalone: true, selector: "lat-input", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "presentation" }, properties: { "attr.id": "htmlId()", "attr.data-size": "size()", "attr.data-input": "inputId()", "attr.data-dirty": "dirty() || undefined", "attr.data-invalid": "invalid() || undefined", "attr.data-pristine": "pristine() || undefined", "attr.data-disabled": "disabled() || undefined", "attr.data-readonly": "readonly() || undefined", "attr.data-required": "required() || undefined" } }, queries: [{ propertyName: "input", first: true, predicate: (BuildInInputValueAccessor), descendants: true, isSignal: true }], exportAs: ["latInput"], ngImport: i0, template: "<ng-content select=\"lat-input-label\"/>\r\n\r\n<ng-content/>\r\n\r\n@if (dirty() && errors()) {\r\n <ng-template [ngTemplateOutlet]=\"assertive\"/>\r\n}\r\n\r\n<ng-template #assertive>\r\n <ng-content select=\"lat-input-error\"/>\r\n</ng-template>\r\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
136
+ options = inject(INPUT_OPTIONS);
137
+ id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : []));
138
+ size = input(this.options.size, ...(ngDevMode ? [{ debugName: "size" }] : []));
139
+ variant = input(this.options.variant, ...(ngDevMode ? [{ debugName: "variant" }] : []));
140
+ input = contentChild.required((HTMLInputDirective));
141
+ htmlId = computed(() => this.id() ?? uid(), ...(ngDevMode ? [{ debugName: "htmlId" }] : []));
142
+ labelId = computed(() => `lat-label-${this.htmlId()}`, ...(ngDevMode ? [{ debugName: "labelId" }] : []));
143
+ inputId = computed(() => `lat-input-${this.htmlId()}`, ...(ngDevMode ? [{ debugName: "inputId" }] : []));
144
+ outputId = computed(() => `lat-output-${this.htmlId()}`, ...(ngDevMode ? [{ debugName: "outputId" }] : []));
145
+ value = computed(() => this.input().value(), ...(ngDevMode ? [{ debugName: "value" }] : []));
146
+ valueAsString = computed(() => this.input().valueAsString(), ...(ngDevMode ? [{ debugName: "valueAsString" }] : []));
147
+ status = computed(() => this.input().status(), ...(ngDevMode ? [{ debugName: "status" }] : []));
148
+ touched = computed(() => this.input().touched(), ...(ngDevMode ? [{ debugName: "touched" }] : []));
149
+ dirty = computed(() => this.input().dirty(), ...(ngDevMode ? [{ debugName: "dirty" }] : []));
150
+ valid = computed(() => this.input().valid(), ...(ngDevMode ? [{ debugName: "valid" }] : []));
151
+ errors = computed(() => this.input().errors(), ...(ngDevMode ? [{ debugName: "errors" }] : []));
152
+ invalid = computed(() => this.input().invalid(), ...(ngDevMode ? [{ debugName: "invalid" }] : []));
153
+ pending = computed(() => this.input().pending(), ...(ngDevMode ? [{ debugName: "pending" }] : []));
154
+ pristine = computed(() => this.input().pristine(), ...(ngDevMode ? [{ debugName: "pristine" }] : []));
155
+ disabled = computed(() => this.input().disabled(), ...(ngDevMode ? [{ debugName: "disabled" }] : []));
156
+ readonly = computed(() => this.input().readonly(), ...(ngDevMode ? [{ debugName: "readonly" }] : []));
157
+ required = computed(() => this.input().required(), ...(ngDevMode ? [{ debugName: "required" }] : []));
158
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
159
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: InputComponent, isStandalone: true, selector: "lat-input", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "presentation" }, properties: { "attr.id": "htmlId()", "attr.data-size": "size()", "attr.data-variant": "variant()", "attr.data-label": "labelId()", "attr.data-input": "inputId()", "attr.data-output": "outputId()", "attr.data-dirty": "dirty() || undefined", "attr.data-invalid": "invalid() || undefined", "attr.data-pristine": "pristine() || undefined", "attr.data-disabled": "disabled() || undefined", "attr.data-readonly": "readonly() || undefined", "attr.data-required": "required() || undefined" } }, queries: [{ propertyName: "input", first: true, predicate: (HTMLInputDirective), descendants: true, isSignal: true }], exportAs: ["latInput"], ngImport: i0, template: "<ng-content select=\"lat-label\" />\r\n\r\n<ng-content />\r\n\r\n@if (dirty() && errors()) {\r\n <ng-content select=\"lat-output\" />\r\n}\r\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
142
160
  }
143
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputComponent, decorators: [{
161
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: InputComponent, decorators: [{
144
162
  type: Component,
145
- args: [{ imports: [NgTemplateOutlet], exportAs: 'latInput', selector: 'lat-input', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
163
+ args: [{ exportAs: 'latInput', selector: 'lat-input', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
146
164
  role: 'presentation',
147
165
  '[attr.id]': 'htmlId()',
148
166
  '[attr.data-size]': 'size()',
167
+ '[attr.data-variant]': 'variant()',
168
+ '[attr.data-label]': 'labelId()',
149
169
  '[attr.data-input]': 'inputId()',
170
+ '[attr.data-output]': 'outputId()',
150
171
  '[attr.data-dirty]': 'dirty() || undefined',
151
172
  '[attr.data-invalid]': 'invalid() || undefined',
152
173
  '[attr.data-pristine]': 'pristine() || undefined',
153
174
  '[attr.data-disabled]': 'disabled() || undefined',
154
175
  '[attr.data-readonly]': 'readonly() || undefined',
155
- '[attr.data-required]': 'required() || undefined',
156
- }, template: "<ng-content select=\"lat-input-label\"/>\r\n\r\n<ng-content/>\r\n\r\n@if (dirty() && errors()) {\r\n <ng-template [ngTemplateOutlet]=\"assertive\"/>\r\n}\r\n\r\n<ng-template #assertive>\r\n <ng-content select=\"lat-input-error\"/>\r\n</ng-template>\r\n" }]
157
- }] });
176
+ '[attr.data-required]': 'required() || undefined'
177
+ }, template: "<ng-content select=\"lat-label\" />\r\n\r\n<ng-content />\r\n\r\n@if (dirty() && errors()) {\r\n <ng-content select=\"lat-output\" />\r\n}\r\n" }]
178
+ }], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], input: [{ type: i0.ContentChild, args: [i0.forwardRef(() => HTMLInputDirective), { isSignal: true }] }] } });
158
179
 
159
- class InputLabelComponent {
180
+ class LabelComponent {
160
181
  input = inject((InputComponent), { host: true });
161
- id = computed(() => this.input.labelId());
162
- htmlFor = computed(() => this.input.inputId());
163
- required = computed(() => this.input.required());
164
- readonly = computed(() => this.input.readonly());
165
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
166
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: InputLabelComponent, isStandalone: true, selector: "lat-input-label", host: { attributes: { "role": "presentation" }, properties: { "attr.id": "null" } }, exportAs: ["latInputLabel"], ngImport: i0, template: "<label [attr.id]=\"id()\" [attr.for]=\"htmlFor()\">\r\n <ng-content></ng-content>\r\n @if (!readonly() && required()) {\r\n <span class=\"lat-label-asterix\" aria-hidden=\"true\" title=\"required\">*</span>\r\n }\r\n</label>\r\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
182
+ id = computed(() => this.input.labelId(), ...(ngDevMode ? [{ debugName: "id" }] : []));
183
+ htmlFor = computed(() => this.input.inputId(), ...(ngDevMode ? [{ debugName: "htmlFor" }] : []));
184
+ required = computed(() => this.input.required(), ...(ngDevMode ? [{ debugName: "required" }] : []));
185
+ readonly = computed(() => this.input.readonly(), ...(ngDevMode ? [{ debugName: "readonly" }] : []));
186
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: LabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
187
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: LabelComponent, isStandalone: true, selector: "lat-label", host: { attributes: { "role": "presentation" }, properties: { "attr.id": "null" } }, exportAs: ["latLabel"], ngImport: i0, template: "<label [attr.id]=\"id()\" [attr.for]=\"htmlFor()\">\r\n <ng-content></ng-content>\r\n @if (!readonly() && required()) {\r\n <span class=\"lat-label-asterix\" aria-hidden=\"true\" title=\"required\">*</span>\r\n }\r\n</label>\r\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
167
188
  }
168
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputLabelComponent, decorators: [{
189
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: LabelComponent, decorators: [{
169
190
  type: Component,
170
- args: [{ exportAs: 'latInputLabel', selector: 'lat-input-label', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
191
+ args: [{ exportAs: 'latLabel', selector: 'lat-label', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
171
192
  role: 'presentation',
172
- '[attr.id]': 'null',
193
+ '[attr.id]': 'null'
173
194
  }, template: "<label [attr.id]=\"id()\" [attr.for]=\"htmlFor()\">\r\n <ng-content></ng-content>\r\n @if (!readonly() && required()) {\r\n <span class=\"lat-label-asterix\" aria-hidden=\"true\" title=\"required\">*</span>\r\n }\r\n</label>\r\n" }]
174
195
  }] });
175
196
 
176
- const INPUT_ERROR_MESSAGES = new InjectionToken('INPUT_ERROR_MESSAGES');
177
- function injectInputErrorMessages() {
178
- const useValues = inject(INPUT_ERROR_MESSAGES, { optional: true });
179
- return useValues ? useValues.reduce((acc, messages) => ({ ...acc, ...messages }), {}) : {};
180
- }
181
-
182
- class InputErrorComponent {
183
- input = inject((InputComponent));
184
- messages = injectInputErrorMessages();
185
- keyvalue = computed(() => {
186
- return Object.entries(this.input.errors() ?? {}).map(([key, value]) => {
187
- const message = get(this.messages, key);
188
- if (isString(message)) {
189
- value = template(message, isObjectLike(value) ? value : {});
190
- }
191
- if (isFunction(message)) {
192
- value = message(value);
193
- }
194
- return {
195
- key: key,
196
- value: value,
197
- };
198
- });
199
- });
200
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
201
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: InputErrorComponent, isStandalone: true, selector: "lat-input-error", host: { attributes: { "role": "alert", "aria-invalid": "assertive" } }, exportAs: ["latInputError"], ngImport: i0, template: "<ng-content>\r\n @for (keyvalue of keyvalue(); track keyvalue) {\r\n <span>{{ keyvalue.value }}</span>\r\n }\r\n</ng-content>\r\n\r\n\r\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
197
+ class OutputComponent {
198
+ input = inject((InputComponent), { host: true });
199
+ id = computed(() => this.input.outputId(), ...(ngDevMode ? [{ debugName: "id" }] : []));
200
+ htmlFor = computed(() => this.input.inputId(), ...(ngDevMode ? [{ debugName: "htmlFor" }] : []));
201
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: OutputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
202
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.3", type: OutputComponent, isStandalone: true, selector: "lat-output", host: { attributes: { "role": "presentation" }, properties: { "attr.id": "null" } }, exportAs: ["latOutput"], ngImport: i0, template: "<output [attr.id]=\"id()\" [attr.for]=\"htmlFor()\">\r\n <ng-content></ng-content>\r\n</output>\r\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
202
203
  }
203
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: InputErrorComponent, decorators: [{
204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: OutputComponent, decorators: [{
204
205
  type: Component,
205
- args: [{ exportAs: 'latInputError', selector: 'lat-input-error', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
206
- role: 'alert',
207
- 'aria-invalid': 'assertive',
208
- }, template: "<ng-content>\r\n @for (keyvalue of keyvalue(); track keyvalue) {\r\n <span>{{ keyvalue.value }}</span>\r\n }\r\n</ng-content>\r\n\r\n\r\n" }]
206
+ args: [{ exportAs: 'latOutput', selector: 'lat-output', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
207
+ role: 'presentation',
208
+ '[attr.id]': 'null'
209
+ }, template: "<output [attr.id]=\"id()\" [attr.for]=\"htmlFor()\">\r\n <ng-content></ng-content>\r\n</output>\r\n" }]
209
210
  }] });
210
211
 
211
- const InputModule = [
212
- InputLabelComponent,
213
- InputErrorComponent,
214
- InputComponent,
215
- ];
216
-
217
212
  /**
218
213
  * Generated bundle index. Do not edit.
219
214
  */
220
215
 
221
- export { BuildInInputValueAccessor, INPUT_ERROR_MESSAGES, InputComponent, InputErrorComponent, InputLabelComponent, InputModule, injectInputErrorMessages };
216
+ export { HTMLInputDirective, INPUT_OPTIONS, InputComponent, LabelComponent, OutputComponent };
222
217
  //# sourceMappingURL=latitude-ui-widgets-input.mjs.map