yukit-web 0.10.6 → 0.10.7

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 (190) hide show
  1. package/fesm2022/yukit-web-chart.mjs +807 -552
  2. package/fesm2022/yukit-web-chart.mjs.map +1 -1
  3. package/fesm2022/yukit-web-helm-accordion.mjs +271 -100
  4. package/fesm2022/yukit-web-helm-accordion.mjs.map +1 -1
  5. package/fesm2022/yukit-web-helm-alert-dialog.mjs +675 -243
  6. package/fesm2022/yukit-web-helm-alert-dialog.mjs.map +1 -1
  7. package/fesm2022/yukit-web-helm-alert.mjs +199 -91
  8. package/fesm2022/yukit-web-helm-alert.mjs.map +1 -1
  9. package/fesm2022/yukit-web-helm-aspect-ratio.mjs +77 -43
  10. package/fesm2022/yukit-web-helm-aspect-ratio.mjs.map +1 -1
  11. package/fesm2022/yukit-web-helm-attachment.mjs +552 -205
  12. package/fesm2022/yukit-web-helm-attachment.mjs.map +1 -1
  13. package/fesm2022/yukit-web-helm-autocomplete.mjs +913 -288
  14. package/fesm2022/yukit-web-helm-autocomplete.mjs.map +1 -1
  15. package/fesm2022/yukit-web-helm-avatar.mjs +298 -137
  16. package/fesm2022/yukit-web-helm-avatar.mjs.map +1 -1
  17. package/fesm2022/yukit-web-helm-badge.mjs +78 -44
  18. package/fesm2022/yukit-web-helm-badge.mjs.map +1 -1
  19. package/fesm2022/yukit-web-helm-breadcrumb.mjs +466 -183
  20. package/fesm2022/yukit-web-helm-breadcrumb.mjs.map +1 -1
  21. package/fesm2022/yukit-web-helm-bubble.mjs +297 -118
  22. package/fesm2022/yukit-web-helm-bubble.mjs.map +1 -1
  23. package/fesm2022/yukit-web-helm-button-group.mjs +179 -83
  24. package/fesm2022/yukit-web-helm-button-group.mjs.map +1 -1
  25. package/fesm2022/yukit-web-helm-button.mjs +137 -67
  26. package/fesm2022/yukit-web-helm-button.mjs.map +1 -1
  27. package/fesm2022/yukit-web-helm-calendar.mjs +957 -230
  28. package/fesm2022/yukit-web-helm-calendar.mjs.map +1 -1
  29. package/fesm2022/yukit-web-helm-card.mjs +318 -136
  30. package/fesm2022/yukit-web-helm-card.mjs.map +1 -1
  31. package/fesm2022/yukit-web-helm-carousel.mjs +563 -233
  32. package/fesm2022/yukit-web-helm-carousel.mjs.map +1 -1
  33. package/fesm2022/yukit-web-helm-checkbox.mjs +367 -101
  34. package/fesm2022/yukit-web-helm-checkbox.mjs.map +1 -1
  35. package/fesm2022/yukit-web-helm-collapsible.mjs +155 -61
  36. package/fesm2022/yukit-web-helm-collapsible.mjs.map +1 -1
  37. package/fesm2022/yukit-web-helm-combobox.mjs +1572 -481
  38. package/fesm2022/yukit-web-helm-combobox.mjs.map +1 -1
  39. package/fesm2022/yukit-web-helm-command.mjs +752 -260
  40. package/fesm2022/yukit-web-helm-command.mjs.map +1 -1
  41. package/fesm2022/yukit-web-helm-context-menu.mjs +161 -63
  42. package/fesm2022/yukit-web-helm-context-menu.mjs.map +1 -1
  43. package/fesm2022/yukit-web-helm-date-picker.mjs +2322 -932
  44. package/fesm2022/yukit-web-helm-date-picker.mjs.map +1 -1
  45. package/fesm2022/yukit-web-helm-dialog.mjs +625 -240
  46. package/fesm2022/yukit-web-helm-dialog.mjs.map +1 -1
  47. package/fesm2022/yukit-web-helm-drawer.mjs +539 -222
  48. package/fesm2022/yukit-web-helm-drawer.mjs.map +1 -1
  49. package/fesm2022/yukit-web-helm-dropdown-menu.mjs +1295 -493
  50. package/fesm2022/yukit-web-helm-dropdown-menu.mjs.map +1 -1
  51. package/fesm2022/yukit-web-helm-empty.mjs +280 -121
  52. package/fesm2022/yukit-web-helm-empty.mjs.map +1 -1
  53. package/fesm2022/yukit-web-helm-field.mjs +670 -301
  54. package/fesm2022/yukit-web-helm-field.mjs.map +1 -1
  55. package/fesm2022/yukit-web-helm-hover-card.mjs +198 -99
  56. package/fesm2022/yukit-web-helm-hover-card.mjs.map +1 -1
  57. package/fesm2022/yukit-web-helm-input-group.mjs +357 -165
  58. package/fesm2022/yukit-web-helm-input-group.mjs.map +1 -1
  59. package/fesm2022/yukit-web-helm-input-otp.mjs +306 -114
  60. package/fesm2022/yukit-web-helm-input-otp.mjs.map +1 -1
  61. package/fesm2022/yukit-web-helm-input.mjs +62 -30
  62. package/fesm2022/yukit-web-helm-input.mjs.map +1 -1
  63. package/fesm2022/yukit-web-helm-item.mjs +545 -227
  64. package/fesm2022/yukit-web-helm-item.mjs.map +1 -1
  65. package/fesm2022/yukit-web-helm-kbd.mjs +85 -44
  66. package/fesm2022/yukit-web-helm-kbd.mjs.map +1 -1
  67. package/fesm2022/yukit-web-helm-label.mjs +60 -28
  68. package/fesm2022/yukit-web-helm-label.mjs.map +1 -1
  69. package/fesm2022/yukit-web-helm-marker.mjs +165 -74
  70. package/fesm2022/yukit-web-helm-marker.mjs.map +1 -1
  71. package/fesm2022/yukit-web-helm-menubar.mjs +207 -82
  72. package/fesm2022/yukit-web-helm-menubar.mjs.map +1 -1
  73. package/fesm2022/yukit-web-helm-message.mjs +277 -112
  74. package/fesm2022/yukit-web-helm-message.mjs.map +1 -1
  75. package/fesm2022/yukit-web-helm-native-select.mjs +363 -129
  76. package/fesm2022/yukit-web-helm-native-select.mjs.map +1 -1
  77. package/fesm2022/yukit-web-helm-navigation-menu.mjs +398 -166
  78. package/fesm2022/yukit-web-helm-navigation-menu.mjs.map +1 -1
  79. package/fesm2022/yukit-web-helm-pagination.mjs +1444 -460
  80. package/fesm2022/yukit-web-helm-pagination.mjs.map +1 -1
  81. package/fesm2022/yukit-web-helm-popover.mjs +358 -133
  82. package/fesm2022/yukit-web-helm-popover.mjs.map +1 -1
  83. package/fesm2022/yukit-web-helm-progress.mjs +126 -58
  84. package/fesm2022/yukit-web-helm-progress.mjs.map +1 -1
  85. package/fesm2022/yukit-web-helm-radio-group.mjs +420 -144
  86. package/fesm2022/yukit-web-helm-radio-group.mjs.map +1 -1
  87. package/fesm2022/yukit-web-helm-resizable.mjs +210 -91
  88. package/fesm2022/yukit-web-helm-resizable.mjs.map +1 -1
  89. package/fesm2022/yukit-web-helm-scroll-area.mjs +64 -34
  90. package/fesm2022/yukit-web-helm-scroll-area.mjs.map +1 -1
  91. package/fesm2022/yukit-web-helm-select.mjs +1059 -351
  92. package/fesm2022/yukit-web-helm-select.mjs.map +1 -1
  93. package/fesm2022/yukit-web-helm-separator.mjs +61 -31
  94. package/fesm2022/yukit-web-helm-separator.mjs.map +1 -1
  95. package/fesm2022/yukit-web-helm-sheet.mjs +590 -231
  96. package/fesm2022/yukit-web-helm-sheet.mjs.map +1 -1
  97. package/fesm2022/yukit-web-helm-sidebar.mjs +1781 -757
  98. package/fesm2022/yukit-web-helm-sidebar.mjs.map +1 -1
  99. package/fesm2022/yukit-web-helm-skeleton.mjs +45 -27
  100. package/fesm2022/yukit-web-helm-skeleton.mjs.map +1 -1
  101. package/fesm2022/yukit-web-helm-slider.mjs +139 -59
  102. package/fesm2022/yukit-web-helm-slider.mjs.map +1 -1
  103. package/fesm2022/yukit-web-helm-sonner.mjs +350 -62
  104. package/fesm2022/yukit-web-helm-sonner.mjs.map +1 -1
  105. package/fesm2022/yukit-web-helm-spinner.mjs +118 -44
  106. package/fesm2022/yukit-web-helm-spinner.mjs.map +1 -1
  107. package/fesm2022/yukit-web-helm-switch.mjs +326 -94
  108. package/fesm2022/yukit-web-helm-switch.mjs.map +1 -1
  109. package/fesm2022/yukit-web-helm-table.mjs +374 -177
  110. package/fesm2022/yukit-web-helm-table.mjs.map +1 -1
  111. package/fesm2022/yukit-web-helm-tabs.mjs +549 -173
  112. package/fesm2022/yukit-web-helm-tabs.mjs.map +1 -1
  113. package/fesm2022/yukit-web-helm-textarea.mjs +62 -30
  114. package/fesm2022/yukit-web-helm-textarea.mjs.map +1 -1
  115. package/fesm2022/yukit-web-helm-toggle-group.mjs +291 -89
  116. package/fesm2022/yukit-web-helm-toggle-group.mjs.map +1 -1
  117. package/fesm2022/yukit-web-helm-toggle.mjs +132 -57
  118. package/fesm2022/yukit-web-helm-toggle.mjs.map +1 -1
  119. package/fesm2022/yukit-web-helm-tooltip.mjs +84 -54
  120. package/fesm2022/yukit-web-helm-tooltip.mjs.map +1 -1
  121. package/fesm2022/yukit-web-helm-typography.mjs +461 -202
  122. package/fesm2022/yukit-web-helm-typography.mjs.map +1 -1
  123. package/fesm2022/yukit-web-helm-utils.mjs +131 -253
  124. package/fesm2022/yukit-web-helm-utils.mjs.map +1 -1
  125. package/fesm2022/yukit-web.mjs +24457 -9670
  126. package/fesm2022/yukit-web.mjs.map +1 -1
  127. package/package.json +9 -9
  128. package/types/yukit-web-chart.d.ts +184 -125
  129. package/types/yukit-web-helm-accordion.d.ts +49 -28
  130. package/types/yukit-web-helm-alert-dialog.d.ts +127 -73
  131. package/types/yukit-web-helm-alert.d.ts +30 -32
  132. package/types/yukit-web-helm-aspect-ratio.d.ts +17 -15
  133. package/types/yukit-web-helm-attachment.d.ts +97 -69
  134. package/types/yukit-web-helm-autocomplete.d.ts +205 -79
  135. package/types/yukit-web-helm-avatar.d.ts +44 -39
  136. package/types/yukit-web-helm-badge.d.ts +18 -17
  137. package/types/yukit-web-helm-breadcrumb.d.ts +69 -45
  138. package/types/yukit-web-helm-bubble.d.ts +54 -40
  139. package/types/yukit-web-helm-button-group.d.ts +29 -22
  140. package/types/yukit-web-helm-button.d.ts +41 -31
  141. package/types/yukit-web-helm-calendar.d.ts +157 -85
  142. package/types/yukit-web-helm-card.d.ts +38 -42
  143. package/types/yukit-web-helm-carousel.d.ts +105 -73
  144. package/types/yukit-web-helm-checkbox.d.ts +117 -58
  145. package/types/yukit-web-helm-collapsible.d.ts +34 -19
  146. package/types/yukit-web-helm-combobox.d.ts +355 -150
  147. package/types/yukit-web-helm-command.d.ts +140 -73
  148. package/types/yukit-web-helm-context-menu.d.ts +48 -27
  149. package/types/yukit-web-helm-date-picker.d.ts +852 -556
  150. package/types/yukit-web-helm-dialog.d.ts +106 -78
  151. package/types/yukit-web-helm-drawer.d.ts +90 -61
  152. package/types/yukit-web-helm-dropdown-menu.d.ts +278 -158
  153. package/types/yukit-web-helm-empty.d.ts +38 -42
  154. package/types/yukit-web-helm-field.d.ts +122 -91
  155. package/types/yukit-web-helm-hover-card.d.ts +39 -27
  156. package/types/yukit-web-helm-input-group.d.ts +63 -41
  157. package/types/yukit-web-helm-input-otp.d.ts +38 -35
  158. package/types/yukit-web-helm-input.d.ts +19 -12
  159. package/types/yukit-web-helm-item.d.ts +90 -82
  160. package/types/yukit-web-helm-kbd.d.ts +10 -15
  161. package/types/yukit-web-helm-label.d.ts +14 -11
  162. package/types/yukit-web-helm-marker.d.ts +26 -27
  163. package/types/yukit-web-helm-menubar.d.ts +61 -32
  164. package/types/yukit-web-helm-message.d.ts +34 -38
  165. package/types/yukit-web-helm-native-select.d.ts +102 -61
  166. package/types/yukit-web-helm-navigation-menu.d.ts +76 -42
  167. package/types/yukit-web-helm-pagination.d.ts +344 -166
  168. package/types/yukit-web-helm-popover.d.ts +62 -42
  169. package/types/yukit-web-helm-progress.d.ts +27 -20
  170. package/types/yukit-web-helm-radio-group.d.ts +121 -63
  171. package/types/yukit-web-helm-resizable.d.ts +46 -24
  172. package/types/yukit-web-helm-scroll-area.d.ts +6 -10
  173. package/types/yukit-web-helm-select.d.ts +231 -114
  174. package/types/yukit-web-helm-separator.d.ts +15 -12
  175. package/types/yukit-web-helm-sheet.d.ts +94 -65
  176. package/types/yukit-web-helm-sidebar.d.ts +322 -232
  177. package/types/yukit-web-helm-skeleton.d.ts +6 -10
  178. package/types/yukit-web-helm-slider.d.ts +33 -13
  179. package/types/yukit-web-helm-sonner.d.ts +112 -51
  180. package/types/yukit-web-helm-spinner.d.ts +24 -17
  181. package/types/yukit-web-helm-switch.d.ts +89 -51
  182. package/types/yukit-web-helm-table.d.ts +38 -42
  183. package/types/yukit-web-helm-tabs.d.ts +116 -60
  184. package/types/yukit-web-helm-textarea.d.ts +19 -12
  185. package/types/yukit-web-helm-toggle-group.d.ts +81 -32
  186. package/types/yukit-web-helm-toggle.d.ts +39 -21
  187. package/types/yukit-web-helm-tooltip.d.ts +21 -16
  188. package/types/yukit-web-helm-typography.d.ts +62 -77
  189. package/types/yukit-web-helm-utils.d.ts +8 -11
  190. package/types/yukit-web.d.ts +5092 -2351
@@ -1,60 +1,146 @@
1
- import { isPlatformBrowser } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { inject, DOCUMENT, Renderer2, ElementRef, PLATFORM_ID, computed, input, booleanAttribute, output, effect, ChangeDetectionStrategy, Component, Directive } from '@angular/core';
4
- import * as i1 from '@spartan-ng/brain/radio-group';
5
- import { BrnRadioGroup, BrnRadio } from '@spartan-ng/brain/radio-group';
6
- import { hlm, classes } from 'yukit-web/helm/utils';
7
- import * as i2 from '@spartan-ng/brain/field';
8
- import { BrnFieldControlDescribedBy } from '@spartan-ng/brain/field';
9
-
10
- class HlmRadio {
11
- constructor() {
12
- this._document = inject(DOCUMENT);
13
- this._renderer = inject(Renderer2);
14
- this._elementRef = inject(ElementRef);
15
- this._isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
16
- this._radioGroup = inject(BrnRadioGroup, { optional: true });
17
- this._ariaInvalid = computed(() => this._radioGroup?.controlState?.()?.invalid, ...(ngDevMode ? [{ debugName: "_ariaInvalid" }] : /* istanbul ignore next */ []));
18
- this._touched = computed(() => this._radioGroup?.controlState?.()?.touched, ...(ngDevMode ? [{ debugName: "_touched" }] : /* istanbul ignore next */ []));
19
- this._dirty = computed(() => this._radioGroup?.controlState?.()?.dirty, ...(ngDevMode ? [{ debugName: "_dirty" }] : /* istanbul ignore next */ []));
20
- this._groupSpartanInvalid = computed(() => this._radioGroup?.controlState?.()?.spartanInvalid, ...(ngDevMode ? [{ debugName: "_groupSpartanInvalid" }] : /* istanbul ignore next */ []));
21
- this._errorStateClass = computed(() => (this._groupSpartanInvalid() ? 'text-destructive' : ''), ...(ngDevMode ? [{ debugName: "_errorStateClass" }] : /* istanbul ignore next */ []));
22
- this.userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
23
- this._computedClass = computed(() => hlm('group relative flex items-center gap-x-3', 'data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50', this.userClass(), this._errorStateClass()), ...(ngDevMode ? [{ debugName: "_computedClass" }] : /* istanbul ignore next */ []));
24
- /** Used to set the id on the underlying brn element. */
25
- this.inputId = input(undefined, ...(ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []));
26
- /** Used to set the aria-label attribute on the underlying brn element. */
27
- this.ariaLabel = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: 'aria-label' });
28
- /** Used to set the aria-labelledby attribute on the underlying brn element. */
29
- this.ariaLabelledby = input(undefined, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {}), alias: 'aria-labelledby' });
30
- /** Used to set the aria-describedby attribute on the underlying brn element. */
31
- this.ariaDescribedby = input(undefined, { ...(ngDevMode ? { debugName: "ariaDescribedby" } : /* istanbul ignore next */ {}), alias: 'aria-describedby' });
32
- /**
33
- * The value this radio button represents.
34
- */
35
- this.value = input.required(...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
36
- /** Whether the checkbox is required. */
37
- this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
38
- /** Whether the checkbox is disabled. */
39
- this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
40
- /**
41
- * Event emitted when the checked state of this radio button changes.
42
- */
43
- // eslint-disable-next-line @angular-eslint/no-output-native
44
- this.change = output();
45
- effect(() => {
46
- const isDisabled = this.disabled();
47
- if (!this._elementRef.nativeElement || !this._isBrowser)
48
- return;
49
- const labelElement = this._elementRef.nativeElement.closest('label') ??
50
- this._document.querySelector(`label[for="${this.inputId()}"]`);
51
- if (!labelElement)
52
- return;
53
- this._renderer.setAttribute(labelElement, 'data-disabled', isDisabled ? 'true' : 'false');
54
- });
55
- }
56
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmRadio, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
57
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: HlmRadio, isStandalone: true, selector: "hlm-radio", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { change: "change" }, host: { attributes: { "data-slot": "radio-group-item" }, properties: { "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.aria-describedby": "null", "attr.data-disabled": "disabled() ? \"\" : null" } }, ngImport: i0, template: `
1
+ import { isPlatformBrowser } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { ChangeDetectionStrategy, Component, DOCUMENT, Directive, ElementRef, PLATFORM_ID, Renderer2, booleanAttribute, computed, effect, inject, input, output } from "@angular/core";
4
+ import * as i1 from "@spartan-ng/brain/radio-group";
5
+ import { BrnRadio, BrnRadioGroup } from "@spartan-ng/brain/radio-group";
6
+ import { classes, hlm } from "yukit-web/helm/utils";
7
+ import * as i2 from "@spartan-ng/brain/field";
8
+ import { BrnFieldControlDescribedBy } from "@spartan-ng/brain/field";
9
+ var HlmRadio = class HlmRadio {
10
+ constructor() {
11
+ this._document = inject(DOCUMENT);
12
+ this._renderer = inject(Renderer2);
13
+ this._elementRef = inject(ElementRef);
14
+ this._isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
15
+ this._radioGroup = inject(BrnRadioGroup, { optional: true });
16
+ this._ariaInvalid = computed(() => this._radioGroup?.controlState?.()?.invalid, ...ngDevMode ? [{ debugName: "_ariaInvalid" }] : /* istanbul ignore next */ []);
17
+ this._touched = computed(() => this._radioGroup?.controlState?.()?.touched, ...ngDevMode ? [{ debugName: "_touched" }] : /* istanbul ignore next */ []);
18
+ this._dirty = computed(() => this._radioGroup?.controlState?.()?.dirty, ...ngDevMode ? [{ debugName: "_dirty" }] : /* istanbul ignore next */ []);
19
+ this._groupSpartanInvalid = computed(() => this._radioGroup?.controlState?.()?.spartanInvalid, ...ngDevMode ? [{ debugName: "_groupSpartanInvalid" }] : /* istanbul ignore next */ []);
20
+ this._errorStateClass = computed(() => this._groupSpartanInvalid() ? "text-destructive" : "", ...ngDevMode ? [{ debugName: "_errorStateClass" }] : /* istanbul ignore next */ []);
21
+ this.userClass = input("", {
22
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
23
+ alias: "class"
24
+ });
25
+ this._computedClass = computed(() => hlm("group relative flex items-center gap-x-3", "data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50", this.userClass(), this._errorStateClass()), ...ngDevMode ? [{ debugName: "_computedClass" }] : /* istanbul ignore next */ []);
26
+ this.inputId = input(void 0, ...ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []);
27
+ this.ariaLabel = input(void 0, {
28
+ ...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
29
+ alias: "aria-label"
30
+ });
31
+ this.ariaLabelledby = input(void 0, {
32
+ ...ngDevMode ? { debugName: "ariaLabelledby" } : /* istanbul ignore next */ {},
33
+ alias: "aria-labelledby"
34
+ });
35
+ this.ariaDescribedby = input(void 0, {
36
+ ...ngDevMode ? { debugName: "ariaDescribedby" } : /* istanbul ignore next */ {},
37
+ alias: "aria-describedby"
38
+ });
39
+ this.value = input.required(...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
40
+ this.required = input(false, {
41
+ ...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
42
+ transform: booleanAttribute
43
+ });
44
+ this.disabled = input(false, {
45
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
46
+ transform: booleanAttribute
47
+ });
48
+ this.change = output();
49
+ effect(() => {
50
+ const isDisabled = this.disabled();
51
+ if (!this._elementRef.nativeElement || !this._isBrowser) return;
52
+ const labelElement = this._elementRef.nativeElement.closest("label") ?? this._document.querySelector(`label[for="${this.inputId()}"]`);
53
+ if (!labelElement) return;
54
+ this._renderer.setAttribute(labelElement, "data-disabled", isDisabled ? "true" : "false");
55
+ });
56
+ }
57
+ static {
58
+ this.ɵfac = i0.ɵɵngDeclareFactory({
59
+ minVersion: "12.0.0",
60
+ version: "22.2.4",
61
+ ngImport: i0,
62
+ type: HlmRadio,
63
+ deps: [],
64
+ target: i0.ɵɵFactoryTarget.Component
65
+ });
66
+ }
67
+ static {
68
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
69
+ minVersion: "17.1.0",
70
+ version: "22.2.4",
71
+ type: HlmRadio,
72
+ isStandalone: true,
73
+ selector: "hlm-radio",
74
+ inputs: {
75
+ userClass: {
76
+ classPropertyName: "userClass",
77
+ publicName: "class",
78
+ isSignal: true,
79
+ isRequired: false,
80
+ transformFunction: null
81
+ },
82
+ inputId: {
83
+ classPropertyName: "inputId",
84
+ publicName: "inputId",
85
+ isSignal: true,
86
+ isRequired: false,
87
+ transformFunction: null
88
+ },
89
+ ariaLabel: {
90
+ classPropertyName: "ariaLabel",
91
+ publicName: "aria-label",
92
+ isSignal: true,
93
+ isRequired: false,
94
+ transformFunction: null
95
+ },
96
+ ariaLabelledby: {
97
+ classPropertyName: "ariaLabelledby",
98
+ publicName: "aria-labelledby",
99
+ isSignal: true,
100
+ isRequired: false,
101
+ transformFunction: null
102
+ },
103
+ ariaDescribedby: {
104
+ classPropertyName: "ariaDescribedby",
105
+ publicName: "aria-describedby",
106
+ isSignal: true,
107
+ isRequired: false,
108
+ transformFunction: null
109
+ },
110
+ value: {
111
+ classPropertyName: "value",
112
+ publicName: "value",
113
+ isSignal: true,
114
+ isRequired: true,
115
+ transformFunction: null
116
+ },
117
+ required: {
118
+ classPropertyName: "required",
119
+ publicName: "required",
120
+ isSignal: true,
121
+ isRequired: false,
122
+ transformFunction: null
123
+ },
124
+ disabled: {
125
+ classPropertyName: "disabled",
126
+ publicName: "disabled",
127
+ isSignal: true,
128
+ isRequired: false,
129
+ transformFunction: null
130
+ }
131
+ },
132
+ outputs: { change: "change" },
133
+ host: {
134
+ attributes: { "data-slot": "radio-group-item" },
135
+ properties: {
136
+ "attr.aria-label": "null",
137
+ "attr.aria-labelledby": "null",
138
+ "attr.aria-describedby": "null",
139
+ "attr.data-disabled": "disabled() ? \"\" : null"
140
+ }
141
+ },
142
+ ngImport: i0,
143
+ template: `
58
144
  <brn-radio
59
145
  [id]="inputId()"
60
146
  [class]="_computedClass()"
@@ -74,22 +160,48 @@ class HlmRadio {
74
160
  <ng-content select="[target],[indicator],hlm-radio-indicator" indicator />
75
161
  <ng-content />
76
162
  </brn-radio>
77
- `, isInline: true, dependencies: [{ kind: "component", type: BrnRadio, selector: "brn-radio", inputs: ["disabled", "id", "aria-label", "aria-labelledby", "aria-describedby", "value", "inputStyles", "required"], outputs: ["change"], exportAs: ["brnRadio"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
78
- }
79
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmRadio, decorators: [{
80
- type: Component,
81
- args: [{
82
- selector: 'hlm-radio',
83
- imports: [BrnRadio],
84
- changeDetection: ChangeDetectionStrategy.OnPush,
85
- host: {
86
- '[attr.aria-label]': 'null',
87
- '[attr.aria-labelledby]': 'null',
88
- '[attr.aria-describedby]': 'null',
89
- '[attr.data-disabled]': 'disabled() ? "" : null',
90
- 'data-slot': 'radio-group-item',
91
- },
92
- template: `
163
+ `,
164
+ isInline: true,
165
+ dependencies: [{
166
+ kind: "component",
167
+ type: BrnRadio,
168
+ selector: "brn-radio",
169
+ inputs: [
170
+ "disabled",
171
+ "id",
172
+ "aria-label",
173
+ "aria-labelledby",
174
+ "aria-describedby",
175
+ "value",
176
+ "inputStyles",
177
+ "required"
178
+ ],
179
+ outputs: ["change"],
180
+ exportAs: ["brnRadio"]
181
+ }],
182
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
183
+ });
184
+ }
185
+ };
186
+ i0.ɵɵngDeclareClassMetadata({
187
+ minVersion: "12.0.0",
188
+ version: "22.2.4",
189
+ ngImport: i0,
190
+ type: HlmRadio,
191
+ decorators: [{
192
+ type: Component,
193
+ args: [{
194
+ selector: "hlm-radio",
195
+ imports: [BrnRadio],
196
+ changeDetection: ChangeDetectionStrategy.OnPush,
197
+ host: {
198
+ "[attr.aria-label]": "null",
199
+ "[attr.aria-labelledby]": "null",
200
+ "[attr.aria-describedby]": "null",
201
+ "[attr.data-disabled]": "disabled() ? \"\" : null",
202
+ "data-slot": "radio-group-item"
203
+ },
204
+ template: `
93
205
  <brn-radio
94
206
  [id]="inputId()"
95
207
  [class]="_computedClass()"
@@ -109,77 +221,241 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImpo
109
221
  <ng-content select="[target],[indicator],hlm-radio-indicator" indicator />
110
222
  <ng-content />
111
223
  </brn-radio>
112
- `,
113
- }]
114
- }], ctorParameters: () => [], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], change: [{ type: i0.Output, args: ["change"] }] } });
115
-
116
- class HlmRadioGroup {
117
- constructor() {
118
- this.userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
119
- this._brnRadioGroup = inject(BrnRadioGroup);
120
- this._ariaInvalid = computed(() => this._brnRadioGroup.controlState?.()?.invalid, ...(ngDevMode ? [{ debugName: "_ariaInvalid" }] : /* istanbul ignore next */ []));
121
- this._touched = computed(() => this._brnRadioGroup.controlState?.()?.touched, ...(ngDevMode ? [{ debugName: "_touched" }] : /* istanbul ignore next */ []));
122
- this._dirty = computed(() => this._brnRadioGroup.controlState?.()?.dirty, ...(ngDevMode ? [{ debugName: "_dirty" }] : /* istanbul ignore next */ []));
123
- this._errorState = computed(() => this._brnRadioGroup.controlState?.()?.spartanInvalid, ...(ngDevMode ? [{ debugName: "_errorState" }] : /* istanbul ignore next */ []));
124
- classes(() => [
125
- 'grid gap-2',
126
- this.userClass(),
127
- this._errorState() ? 'data-[invalid=true]:text-destructive' : '',
128
- ]);
129
- }
130
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmRadioGroup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
131
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: HlmRadioGroup, isStandalone: true, selector: "[hlmRadioGroup],hlm-radio-group", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "radio-group" }, properties: { "attr.aria-invalid": "_ariaInvalid() ? \"true\" : null", "attr.data-invalid": "_ariaInvalid() ? \"true\" : null", "attr.data-dirty": "_dirty() ? \"true\" : null", "attr.data-touched": "_touched() ? \"true\" : null" } }, hostDirectives: [{ directive: i1.BrnRadioGroup, inputs: ["name", "name", "value", "value", "disabled", "disabled", "required", "required"], outputs: ["valueChange", "valueChange"] }, { directive: i2.BrnFieldControlDescribedBy }], ngImport: i0 }); }
132
- }
133
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmRadioGroup, decorators: [{
134
- type: Directive,
135
- args: [{
136
- selector: '[hlmRadioGroup],hlm-radio-group',
137
- hostDirectives: [
138
- {
139
- directive: BrnRadioGroup,
140
- inputs: ['name', 'value', 'disabled', 'required'],
141
- outputs: ['valueChange'],
142
- },
143
- BrnFieldControlDescribedBy,
144
- ],
145
- host: {
146
- 'data-slot': 'radio-group',
147
- '[attr.aria-invalid]': '_ariaInvalid() ? "true" : null',
148
- '[attr.data-invalid]': '_ariaInvalid() ? "true" : null',
149
- '[attr.data-dirty]': '_dirty() ? "true" : null',
150
- '[attr.data-touched]': '_touched() ? "true" : null',
151
- },
152
- }]
153
- }], ctorParameters: () => [], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
154
-
155
- class HlmRadioIndicator {
156
- constructor() {
157
- classes(() => 'border-input text-primary group-has-[:focus-visible]:border-ring group-has-[:focus-visible]:ring-ring/50 dark:bg-input/30 group-data=[disabled=true]:cursor-not-allowed group-data=[disabled=true]:opacity-50 relative flex aspect-square size-4 shrink-0 items-center justify-center rounded-full border shadow-xs transition-[color,box-shadow] outline-none group-has-[:focus-visible]:ring-[3px]');
158
- }
159
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmRadioIndicator, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
160
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.22", type: HlmRadioIndicator, isStandalone: true, selector: "hlm-radio-indicator", host: { attributes: { "data-slot": "radio-group-indicator" } }, ngImport: i0, template: `
161
- <div class="group-data-[checked=true]:bg-primary size-2 rounded-full bg-transparent"></div>
162
- `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
163
- }
164
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: HlmRadioIndicator, decorators: [{
165
- type: Component,
166
- args: [{
167
- selector: 'hlm-radio-indicator',
168
- changeDetection: ChangeDetectionStrategy.OnPush,
169
- host: {
170
- 'data-slot': 'radio-group-indicator',
171
- },
172
- template: `
224
+ `
225
+ }]
226
+ }],
227
+ ctorParameters: () => [],
228
+ propDecorators: {
229
+ userClass: [{
230
+ type: i0.Input,
231
+ args: [{
232
+ isSignal: true,
233
+ alias: "class",
234
+ required: false
235
+ }]
236
+ }],
237
+ inputId: [{
238
+ type: i0.Input,
239
+ args: [{
240
+ isSignal: true,
241
+ alias: "inputId",
242
+ required: false
243
+ }]
244
+ }],
245
+ ariaLabel: [{
246
+ type: i0.Input,
247
+ args: [{
248
+ isSignal: true,
249
+ alias: "aria-label",
250
+ required: false
251
+ }]
252
+ }],
253
+ ariaLabelledby: [{
254
+ type: i0.Input,
255
+ args: [{
256
+ isSignal: true,
257
+ alias: "aria-labelledby",
258
+ required: false
259
+ }]
260
+ }],
261
+ ariaDescribedby: [{
262
+ type: i0.Input,
263
+ args: [{
264
+ isSignal: true,
265
+ alias: "aria-describedby",
266
+ required: false
267
+ }]
268
+ }],
269
+ value: [{
270
+ type: i0.Input,
271
+ args: [{
272
+ isSignal: true,
273
+ alias: "value",
274
+ required: true
275
+ }]
276
+ }],
277
+ required: [{
278
+ type: i0.Input,
279
+ args: [{
280
+ isSignal: true,
281
+ alias: "required",
282
+ required: false
283
+ }]
284
+ }],
285
+ disabled: [{
286
+ type: i0.Input,
287
+ args: [{
288
+ isSignal: true,
289
+ alias: "disabled",
290
+ required: false
291
+ }]
292
+ }],
293
+ change: [{
294
+ type: i0.Output,
295
+ args: ["change"]
296
+ }]
297
+ }
298
+ });
299
+ var HlmRadioGroup = class HlmRadioGroup {
300
+ constructor() {
301
+ this.userClass = input("", {
302
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
303
+ alias: "class"
304
+ });
305
+ this._brnRadioGroup = inject(BrnRadioGroup);
306
+ this._ariaInvalid = computed(() => this._brnRadioGroup.controlState?.()?.invalid, ...ngDevMode ? [{ debugName: "_ariaInvalid" }] : /* istanbul ignore next */ []);
307
+ this._touched = computed(() => this._brnRadioGroup.controlState?.()?.touched, ...ngDevMode ? [{ debugName: "_touched" }] : /* istanbul ignore next */ []);
308
+ this._dirty = computed(() => this._brnRadioGroup.controlState?.()?.dirty, ...ngDevMode ? [{ debugName: "_dirty" }] : /* istanbul ignore next */ []);
309
+ this._errorState = computed(() => this._brnRadioGroup.controlState?.()?.spartanInvalid, ...ngDevMode ? [{ debugName: "_errorState" }] : /* istanbul ignore next */ []);
310
+ classes(() => [
311
+ "grid gap-2",
312
+ this.userClass(),
313
+ this._errorState() ? "data-[invalid=true]:text-destructive" : ""
314
+ ]);
315
+ }
316
+ static {
317
+ this.ɵfac = i0.ɵɵngDeclareFactory({
318
+ minVersion: "12.0.0",
319
+ version: "22.2.4",
320
+ ngImport: i0,
321
+ type: HlmRadioGroup,
322
+ deps: [],
323
+ target: i0.ɵɵFactoryTarget.Directive
324
+ });
325
+ }
326
+ static {
327
+ this.ɵdir = i0.ɵɵngDeclareDirective({
328
+ minVersion: "17.1.0",
329
+ version: "22.2.4",
330
+ type: HlmRadioGroup,
331
+ isStandalone: true,
332
+ selector: "[hlmRadioGroup],hlm-radio-group",
333
+ inputs: { userClass: {
334
+ classPropertyName: "userClass",
335
+ publicName: "class",
336
+ isSignal: true,
337
+ isRequired: false,
338
+ transformFunction: null
339
+ } },
340
+ host: {
341
+ attributes: { "data-slot": "radio-group" },
342
+ properties: {
343
+ "attr.aria-invalid": "_ariaInvalid() ? \"true\" : null",
344
+ "attr.data-invalid": "_ariaInvalid() ? \"true\" : null",
345
+ "attr.data-dirty": "_dirty() ? \"true\" : null",
346
+ "attr.data-touched": "_touched() ? \"true\" : null"
347
+ }
348
+ },
349
+ hostDirectives: [{
350
+ directive: i1.BrnRadioGroup,
351
+ inputs: [
352
+ "name",
353
+ "name",
354
+ "value",
355
+ "value",
356
+ "disabled",
357
+ "disabled",
358
+ "required",
359
+ "required"
360
+ ],
361
+ outputs: ["valueChange", "valueChange"]
362
+ }, { directive: i2.BrnFieldControlDescribedBy }],
363
+ ngImport: i0
364
+ });
365
+ }
366
+ };
367
+ i0.ɵɵngDeclareClassMetadata({
368
+ minVersion: "12.0.0",
369
+ version: "22.2.4",
370
+ ngImport: i0,
371
+ type: HlmRadioGroup,
372
+ decorators: [{
373
+ type: Directive,
374
+ args: [{
375
+ selector: "[hlmRadioGroup],hlm-radio-group",
376
+ hostDirectives: [{
377
+ directive: BrnRadioGroup,
378
+ inputs: [
379
+ "name",
380
+ "value",
381
+ "disabled",
382
+ "required"
383
+ ],
384
+ outputs: ["valueChange"]
385
+ }, BrnFieldControlDescribedBy],
386
+ host: {
387
+ "data-slot": "radio-group",
388
+ "[attr.aria-invalid]": "_ariaInvalid() ? \"true\" : null",
389
+ "[attr.data-invalid]": "_ariaInvalid() ? \"true\" : null",
390
+ "[attr.data-dirty]": "_dirty() ? \"true\" : null",
391
+ "[attr.data-touched]": "_touched() ? \"true\" : null"
392
+ }
393
+ }]
394
+ }],
395
+ ctorParameters: () => [],
396
+ propDecorators: { userClass: [{
397
+ type: i0.Input,
398
+ args: [{
399
+ isSignal: true,
400
+ alias: "class",
401
+ required: false
402
+ }]
403
+ }] }
404
+ });
405
+ var HlmRadioIndicator = class HlmRadioIndicator {
406
+ constructor() {
407
+ classes(() => "border-input text-primary group-has-[:focus-visible]:border-ring group-has-[:focus-visible]:ring-ring/50 dark:bg-input/30 group-data=[disabled=true]:cursor-not-allowed group-data=[disabled=true]:opacity-50 relative flex aspect-square size-4 shrink-0 items-center justify-center rounded-full border shadow-xs transition-[color,box-shadow] outline-none group-has-[:focus-visible]:ring-[3px]");
408
+ }
409
+ static {
410
+ this.ɵfac = i0.ɵɵngDeclareFactory({
411
+ minVersion: "12.0.0",
412
+ version: "22.2.4",
413
+ ngImport: i0,
414
+ type: HlmRadioIndicator,
415
+ deps: [],
416
+ target: i0.ɵɵFactoryTarget.Component
417
+ });
418
+ }
419
+ static {
420
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
421
+ minVersion: "14.0.0",
422
+ version: "22.2.4",
423
+ type: HlmRadioIndicator,
424
+ isStandalone: true,
425
+ selector: "hlm-radio-indicator",
426
+ host: { attributes: { "data-slot": "radio-group-indicator" } },
427
+ ngImport: i0,
428
+ template: `
173
429
  <div class="group-data-[checked=true]:bg-primary size-2 rounded-full bg-transparent"></div>
174
430
  `,
175
- }]
176
- }], ctorParameters: () => [] });
177
-
178
- const HlmRadioGroupImports = [HlmRadioGroup, HlmRadio, HlmRadioIndicator];
179
-
180
- /**
181
- * Generated bundle index. Do not edit.
182
- */
183
-
431
+ isInline: true,
432
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
433
+ });
434
+ }
435
+ };
436
+ i0.ɵɵngDeclareClassMetadata({
437
+ minVersion: "12.0.0",
438
+ version: "22.2.4",
439
+ ngImport: i0,
440
+ type: HlmRadioIndicator,
441
+ decorators: [{
442
+ type: Component,
443
+ args: [{
444
+ selector: "hlm-radio-indicator",
445
+ changeDetection: ChangeDetectionStrategy.OnPush,
446
+ host: { "data-slot": "radio-group-indicator" },
447
+ template: `
448
+ <div class="group-data-[checked=true]:bg-primary size-2 rounded-full bg-transparent"></div>
449
+ `
450
+ }]
451
+ }],
452
+ ctorParameters: () => []
453
+ });
454
+ const HlmRadioGroupImports = [
455
+ HlmRadioGroup,
456
+ HlmRadio,
457
+ HlmRadioIndicator
458
+ ];
184
459
  export { HlmRadio, HlmRadioGroup, HlmRadioGroupImports, HlmRadioIndicator };
185
- //# sourceMappingURL=yukit-web-helm-radio-group.mjs.map
460
+
461
+ //# sourceMappingURL=yukit-web-helm-radio-group.mjs.map