@radix-ng/primitives 0.51.0 → 1.0.0-beta.1

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 (186) hide show
  1. package/fesm2022/radix-ng-primitives-accordion.mjs +105 -38
  2. package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
  3. package/fesm2022/radix-ng-primitives-alert-dialog.mjs +221 -129
  4. package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +1 -1
  5. package/fesm2022/radix-ng-primitives-arrow.mjs +20 -4
  6. package/fesm2022/radix-ng-primitives-arrow.mjs.map +1 -1
  7. package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
  8. package/fesm2022/radix-ng-primitives-avatar.mjs +54 -61
  9. package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
  10. package/fesm2022/radix-ng-primitives-button.mjs +123 -0
  11. package/fesm2022/radix-ng-primitives-button.mjs.map +1 -0
  12. package/fesm2022/radix-ng-primitives-calendar.mjs +95 -83
  13. package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -1
  14. package/fesm2022/radix-ng-primitives-checkbox.mjs +378 -54
  15. package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
  16. package/fesm2022/radix-ng-primitives-collapsible.mjs +182 -81
  17. package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
  18. package/fesm2022/radix-ng-primitives-collection.mjs +40 -57
  19. package/fesm2022/radix-ng-primitives-collection.mjs.map +1 -1
  20. package/fesm2022/radix-ng-primitives-config.mjs.map +1 -1
  21. package/fesm2022/radix-ng-primitives-context-menu.mjs +140 -424
  22. package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
  23. package/fesm2022/radix-ng-primitives-core.mjs +845 -744
  24. package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
  25. package/fesm2022/radix-ng-primitives-cropper.mjs +288 -308
  26. package/fesm2022/radix-ng-primitives-cropper.mjs.map +1 -1
  27. package/fesm2022/radix-ng-primitives-date-field.mjs +104 -58
  28. package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
  29. package/fesm2022/radix-ng-primitives-dialog.mjs +655 -327
  30. package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
  31. package/fesm2022/radix-ng-primitives-dismissable-layer.mjs +70 -46
  32. package/fesm2022/radix-ng-primitives-dismissable-layer.mjs.map +1 -1
  33. package/fesm2022/radix-ng-primitives-drawer.mjs +960 -0
  34. package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -0
  35. package/fesm2022/radix-ng-primitives-editable.mjs +304 -23
  36. package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
  37. package/fesm2022/radix-ng-primitives-field.mjs +363 -0
  38. package/fesm2022/radix-ng-primitives-field.mjs.map +1 -0
  39. package/fesm2022/radix-ng-primitives-fieldset.mjs +79 -0
  40. package/fesm2022/radix-ng-primitives-fieldset.mjs.map +1 -0
  41. package/fesm2022/radix-ng-primitives-focus-scope.mjs +23 -8
  42. package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
  43. package/fesm2022/radix-ng-primitives-input.mjs +172 -0
  44. package/fesm2022/radix-ng-primitives-input.mjs.map +1 -0
  45. package/fesm2022/radix-ng-primitives-label.mjs +6 -6
  46. package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
  47. package/fesm2022/radix-ng-primitives-menu.mjs +1907 -363
  48. package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
  49. package/fesm2022/radix-ng-primitives-menubar.mjs +290 -162
  50. package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
  51. package/fesm2022/radix-ng-primitives-meter.mjs +271 -0
  52. package/fesm2022/radix-ng-primitives-meter.mjs.map +1 -0
  53. package/fesm2022/radix-ng-primitives-navigation-menu.mjs +1052 -1553
  54. package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
  55. package/fesm2022/radix-ng-primitives-number-field.mjs +1102 -367
  56. package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
  57. package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -1
  58. package/fesm2022/radix-ng-primitives-popover.mjs +978 -989
  59. package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
  60. package/fesm2022/radix-ng-primitives-popper.mjs +111 -44
  61. package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
  62. package/fesm2022/radix-ng-primitives-portal.mjs +34 -10
  63. package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
  64. package/fesm2022/radix-ng-primitives-presence.mjs +134 -246
  65. package/fesm2022/radix-ng-primitives-presence.mjs.map +1 -1
  66. package/fesm2022/radix-ng-primitives-preview-card.mjs +997 -0
  67. package/fesm2022/radix-ng-primitives-preview-card.mjs.map +1 -0
  68. package/fesm2022/radix-ng-primitives-progress.mjs +223 -84
  69. package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
  70. package/fesm2022/radix-ng-primitives-radio.mjs +191 -51
  71. package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
  72. package/fesm2022/radix-ng-primitives-roving-focus.mjs +96 -50
  73. package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
  74. package/fesm2022/radix-ng-primitives-scroll-area.mjs +923 -0
  75. package/fesm2022/radix-ng-primitives-scroll-area.mjs.map +1 -0
  76. package/fesm2022/radix-ng-primitives-select.mjs +791 -509
  77. package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
  78. package/fesm2022/radix-ng-primitives-separator.mjs +12 -35
  79. package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
  80. package/fesm2022/radix-ng-primitives-slider.mjs +969 -717
  81. package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
  82. package/fesm2022/radix-ng-primitives-stepper.mjs +15 -19
  83. package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
  84. package/fesm2022/radix-ng-primitives-switch.mjs +125 -113
  85. package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
  86. package/fesm2022/radix-ng-primitives-tabs.mjs +390 -108
  87. package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
  88. package/fesm2022/radix-ng-primitives-time-field.mjs +55 -46
  89. package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
  90. package/fesm2022/radix-ng-primitives-toast.mjs +839 -0
  91. package/fesm2022/radix-ng-primitives-toast.mjs.map +1 -0
  92. package/fesm2022/radix-ng-primitives-toggle-group.mjs +121 -247
  93. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
  94. package/fesm2022/radix-ng-primitives-toggle.mjs +98 -61
  95. package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
  96. package/fesm2022/radix-ng-primitives-toolbar.mjs +303 -92
  97. package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
  98. package/fesm2022/radix-ng-primitives-tooltip.mjs +699 -1072
  99. package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
  100. package/fesm2022/radix-ng-primitives-visually-hidden.mjs +25 -66
  101. package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
  102. package/meter/README.md +3 -0
  103. package/navigation-menu/README.md +2 -1
  104. package/package.json +39 -18
  105. package/portal/README.md +2 -0
  106. package/preview-card/README.md +3 -0
  107. package/schematics/collection.json +1 -0
  108. package/schematics/ng-add/index.d.ts +3 -2
  109. package/schematics/ng-add/index.js +62 -31
  110. package/schematics/ng-add/index.js.map +1 -1
  111. package/schematics/ng-add/package-config.d.ts +4 -2
  112. package/schematics/ng-add/package-config.js +10 -2
  113. package/schematics/ng-add/package-config.js.map +1 -1
  114. package/schematics/ng-add/schema.d.ts +3 -0
  115. package/schematics/ng-add/schema.js +3 -0
  116. package/schematics/ng-add/schema.js.map +1 -0
  117. package/schematics/ng-add/schema.json +14 -0
  118. package/select/README.md +2 -0
  119. package/types/radix-ng-primitives-accordion.d.ts +51 -16
  120. package/types/radix-ng-primitives-alert-dialog.d.ts +95 -38
  121. package/types/radix-ng-primitives-arrow.d.ts +1 -1
  122. package/types/radix-ng-primitives-aspect-ratio.d.ts +1 -1
  123. package/types/radix-ng-primitives-avatar.d.ts +7 -11
  124. package/types/radix-ng-primitives-button.d.ts +73 -0
  125. package/types/radix-ng-primitives-calendar.d.ts +39 -20
  126. package/types/radix-ng-primitives-checkbox.d.ts +204 -35
  127. package/types/radix-ng-primitives-collapsible.d.ts +114 -40
  128. package/types/radix-ng-primitives-collection.d.ts +38 -34
  129. package/types/radix-ng-primitives-config.d.ts +1 -1
  130. package/types/radix-ng-primitives-context-menu.d.ts +61 -116
  131. package/types/radix-ng-primitives-core.d.ts +345 -235
  132. package/types/radix-ng-primitives-cropper.d.ts +89 -56
  133. package/types/radix-ng-primitives-date-field.d.ts +49 -28
  134. package/types/radix-ng-primitives-dialog.d.ts +283 -165
  135. package/types/radix-ng-primitives-dismissable-layer.d.ts +15 -7
  136. package/types/radix-ng-primitives-drawer.d.ts +426 -0
  137. package/types/radix-ng-primitives-editable.d.ts +91 -14
  138. package/types/radix-ng-primitives-field.d.ts +374 -0
  139. package/types/radix-ng-primitives-fieldset.d.ts +49 -0
  140. package/types/radix-ng-primitives-focus-scope.d.ts +15 -6
  141. package/types/radix-ng-primitives-input.d.ts +87 -0
  142. package/types/radix-ng-primitives-label.d.ts +0 -1
  143. package/types/radix-ng-primitives-menu.d.ts +584 -99
  144. package/types/radix-ng-primitives-menubar.d.ts +61 -50
  145. package/types/radix-ng-primitives-meter.d.ts +194 -0
  146. package/types/radix-ng-primitives-navigation-menu.d.ts +422 -340
  147. package/types/radix-ng-primitives-number-field.d.ts +405 -145
  148. package/types/radix-ng-primitives-pagination.d.ts +2 -2
  149. package/types/radix-ng-primitives-popover.d.ts +366 -351
  150. package/types/radix-ng-primitives-popper.d.ts +68 -11
  151. package/types/radix-ng-primitives-portal.d.ts +14 -6
  152. package/types/radix-ng-primitives-presence.d.ts +28 -76
  153. package/types/radix-ng-primitives-preview-card.d.ts +359 -0
  154. package/types/radix-ng-primitives-progress.d.ts +175 -48
  155. package/types/radix-ng-primitives-radio.d.ts +55 -25
  156. package/types/radix-ng-primitives-roving-focus.d.ts +33 -23
  157. package/types/radix-ng-primitives-scroll-area.d.ts +253 -0
  158. package/types/radix-ng-primitives-select.d.ts +475 -177
  159. package/types/radix-ng-primitives-separator.d.ts +7 -32
  160. package/types/radix-ng-primitives-slider.d.ts +315 -201
  161. package/types/radix-ng-primitives-stepper.d.ts +5 -7
  162. package/types/radix-ng-primitives-switch.d.ts +86 -71
  163. package/types/radix-ng-primitives-tabs.d.ts +213 -79
  164. package/types/radix-ng-primitives-time-field.d.ts +42 -27
  165. package/types/radix-ng-primitives-toast.d.ts +378 -0
  166. package/types/radix-ng-primitives-toggle-group.d.ts +86 -164
  167. package/types/radix-ng-primitives-toggle.d.ts +43 -53
  168. package/types/radix-ng-primitives-toolbar.d.ts +164 -38
  169. package/types/radix-ng-primitives-tooltip.d.ts +348 -384
  170. package/types/radix-ng-primitives-visually-hidden.d.ts +19 -19
  171. package/dropdown-menu/README.md +0 -1
  172. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +0 -581
  173. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs.map +0 -1
  174. package/fesm2022/radix-ng-primitives-hover-card.mjs +0 -1238
  175. package/fesm2022/radix-ng-primitives-hover-card.mjs.map +0 -1
  176. package/fesm2022/radix-ng-primitives-select2.mjs +0 -897
  177. package/fesm2022/radix-ng-primitives-select2.mjs.map +0 -1
  178. package/fesm2022/radix-ng-primitives-tooltip2.mjs +0 -735
  179. package/fesm2022/radix-ng-primitives-tooltip2.mjs.map +0 -1
  180. package/hover-card/README.md +0 -3
  181. package/select2/README.md +0 -3
  182. package/tooltip2/README.md +0 -3
  183. package/types/radix-ng-primitives-dropdown-menu.d.ts +0 -171
  184. package/types/radix-ng-primitives-hover-card.d.ts +0 -471
  185. package/types/radix-ng-primitives-select2.d.ts +0 -511
  186. package/types/radix-ng-primitives-tooltip2.d.ts +0 -325
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-progress.mjs","sources":["../../../packages/primitives/progress/src/progress-root.directive.ts","../../../packages/primitives/progress/src/progress-indicator.directive.ts","../../../packages/primitives/progress/index.ts","../../../packages/primitives/progress/radix-ng-primitives-progress.ts"],"sourcesContent":["import { computed, Directive, effect, inject, InjectionToken, input, model } from '@angular/core';\nimport { isNullish, isNumber, provideToken } from '@radix-ng/primitives/core';\n\nexport const RdxProgressToken = new InjectionToken<RdxProgressRootDirective>('RdxProgressDirective');\n\n/**\n * Injects the current instance of RdxProgressRootDirective.\n * @returns The instance of RdxProgressRootDirective.\n */\nexport function injectProgress(): RdxProgressRootDirective {\n return inject(RdxProgressToken);\n}\n\nexport type ProgressState = 'indeterminate' | 'complete' | 'loading';\n\nexport interface ProgressProps {\n value?: number | null;\n max?: number;\n /**\n * A function to get the accessible label text representing the current value in a human-readable format.\n *\n * If not provided, the value label will be read as the numeric value as a percentage of the max value.\n */\n getValueLabel?: (value: number, max: number) => string;\n}\n\nconst MIN_PERCENT = 0;\nconst DEFAULT_MAX = 100;\n\n/**\n * Directive to manage progress bar state and attributes.\n *\n * This directive provides a way to create a progress bar with customizable value and max attributes.\n * It handles aria attributes for accessibility and provides different states like 'indeterminate', 'complete', and 'loading'.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxProgressRoot]',\n exportAs: 'rdxProgressRoot',\n providers: [provideToken(RdxProgressToken, RdxProgressRootDirective)],\n host: {\n role: 'progressbar',\n '[attr.aria-valuemax]': 'max()',\n '[attr.aria-valuemin]': '0',\n '[attr.aria-valuenow]': 'value()',\n '[attr.aria-valuetext]': 'label()',\n '[attr.aria-label]': 'label()',\n '[attr.data-state]': 'progressState()',\n '[attr.data-value]': 'value() ?? undefined',\n '[attr.data-max]': 'max()',\n // set tab index to -1 so screen readers will read the aria-label\n // Note: there is a known issue with JAWS that does not read progressbar aria labels on FireFox\n tabindex: '-1'\n }\n})\nexport class RdxProgressRootDirective {\n /**\n * The current value of the progress bar.\n * @group Props\n * @defaultValue 0\n */\n readonly value = model<number>(MIN_PERCENT);\n\n /**\n * The maximum value of the progress bar.\n * @defaultValue 100\n * @group Props\n */\n readonly max = model<number>(DEFAULT_MAX);\n\n /**\n * Function to generate the value label.\n * @group Props\n */\n readonly valueLabel = input<(value: number, max: number) => string>((value, max) =>\n this.defaultGetValueLabel(value, max)\n );\n\n protected readonly label = computed(() => this.valueLabel()(this.value(), this.max()));\n\n readonly progressState = computed<ProgressState>(() => {\n if (isNullish(this.value())) {\n return 'indeterminate';\n }\n if (this.value() === this.max()) {\n return 'complete';\n }\n return 'loading';\n });\n\n constructor() {\n effect(() => {\n const correctedValue = this.validateValue(this.value(), this.max());\n if (correctedValue != null && correctedValue !== this.value()) {\n this.value.set(correctedValue);\n }\n });\n\n effect(() => {\n const correctedMax = this.validateMax(this.max());\n if (correctedMax !== this.max()) {\n this.max.set(correctedMax);\n }\n });\n }\n\n private validateValue(value: any, max: number): number | null {\n const isValidValueError =\n isNullish(value) || (isNumber(value) && !Number.isNaN(value) && value <= max && value >= 0);\n\n if (isValidValueError) return value as null;\n\n console.error(`Invalid prop \\`value\\` of value \\`${value}\\` supplied to \\`ProgressRoot\\`. The \\`value\\` prop must be:\n - a positive number\n - less than the value passed to \\`max\\` (or ${DEFAULT_MAX} if no \\`max\\` prop is set)\n - \\`null\\` or \\`undefined\\` if the progress is indeterminate.\n\nDefaulting to \\`null\\`.`);\n return null;\n }\n\n private validateMax(max: number): number {\n const isValidMaxError = isNumber(max) && !Number.isNaN(max) && max > 0;\n\n if (isValidMaxError) return max;\n\n console.error(\n `Invalid prop \\`max\\` of value \\`${max}\\` supplied to \\`ProgressRoot\\`. Only numbers greater than 0 are valid max values. Defaulting to \\`${DEFAULT_MAX}\\`.`\n );\n return DEFAULT_MAX;\n }\n\n private defaultGetValueLabel(value: number, max: number) {\n return `${Math.round((value / max) * 100)}%`;\n }\n}\n","import { Directive } from '@angular/core';\nimport { injectProgress } from './progress-root.directive';\n\n/**\n * Directive to manage progress indicator state and attributes.\n *\n * This directive is used to display the progress indicator inside the progress bar.\n * It inherits the state and value from the `RdxProgressRootDirective`.\n */\n@Directive({\n selector: '[rdxProgressIndicator]',\n exportAs: 'rdxProgressIndicator',\n host: {\n '[attr.data-state]': 'progress.progressState()',\n '[attr.data-value]': 'progress.value()',\n '[attr.data-max]': 'progress.max()'\n }\n})\nexport class RdxProgressIndicatorDirective {\n /**\n * This allows the directive to access the progress bar state and values.\n */\n protected readonly progress = injectProgress();\n}\n","import { NgModule } from '@angular/core';\nimport { RdxProgressIndicatorDirective } from './src/progress-indicator.directive';\nimport { RdxProgressRootDirective } from './src/progress-root.directive';\n\nexport * from './src/progress-indicator.directive';\nexport * from './src/progress-root.directive';\n\nexport type { ProgressProps } from './src/progress-root.directive';\n\nconst _imports = [RdxProgressRootDirective, RdxProgressIndicatorDirective];\n\n@NgModule({\n imports: [..._imports],\n exports: [..._imports]\n})\nexport class RdxProgressModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAGa,gBAAgB,GAAG,IAAI,cAAc,CAA2B,sBAAsB;AAEnG;;;AAGG;SACa,cAAc,GAAA;AAC1B,IAAA,OAAO,MAAM,CAAC,gBAAgB,CAAC;AACnC;AAeA,MAAM,WAAW,GAAG,CAAC;AACrB,MAAM,WAAW,GAAG,GAAG;AAEvB;;;;;;;AAOG;MAoBU,wBAAwB,CAAA;AAmCjC,IAAA,WAAA,GAAA;AAlCA;;;;AAIG;AACM,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,WAAW,4EAAC;AAE3C;;;;AAIG;AACM,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK,CAAS,WAAW,0EAAC;AAEzC;;;AAGG;AACM,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAyC,CAAC,KAAK,EAAE,GAAG,KAC3E,IAAI,CAAC,oBAAoB,CAAC,KAAK,EAAE,GA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A,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YANZ,wBAAwB,EAAE,6BAA6B,CAAA,EAAA,OAAA,EAAA,CAAvD,wBAAwB,EAAE,6BAA6B,CAAA,EAAA,CAAA,CAAA;+GAM5D,iBAAiB,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ,CAAC;AACtB,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ;AACxB,iBAAA;;;ACdD;;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-progress.mjs","sources":["../../../packages/primitives/progress/src/progress-root.directive.ts","../../../packages/primitives/progress/src/progress-indicator.directive.ts","../../../packages/primitives/progress/src/progress-label.directive.ts","../../../packages/primitives/progress/src/progress-track.directive.ts","../../../packages/primitives/progress/src/progress-value.directive.ts","../../../packages/primitives/progress/index.ts","../../../packages/primitives/progress/radix-ng-primitives-progress.ts"],"sourcesContent":["import { computed, Directive, inject, input, numberAttribute } from '@angular/core';\nimport { createContext } from '@radix-ng/primitives/core';\n\nlet progressId = 0;\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\nexport type ProgressState = 'indeterminate' | 'complete' | 'progressing';\n\nexport type ProgressValueFormatter = (value: number, min: number, max: number) => string;\n\nexport interface ProgressProps {\n value?: number | null;\n min?: number;\n max?: number;\n valueLabel?: ProgressValueFormatter;\n}\n\nconst DEFAULT_MIN = 0;\nconst DEFAULT_MAX = 100;\n\nconst isValidNumber = (value: unknown): value is number => typeof value === 'number' && !Number.isNaN(value);\n\nconst clamp = (value: number, min: number, max: number) => Math.min(Math.max(value, min), max);\n\nconst progressRootContext = () => {\n const root = injectProgressRoot();\n\n return {\n labelId: root.labelId,\n valueId: root.valueId,\n minState: root.minState,\n maxState: root.maxState,\n valueState: root.valueState,\n percentageState: root.percentageState,\n valueLabelState: root.valueLabelState,\n progressState: root.progressState,\n completeState: root.completeState,\n progressingState: root.progressingState,\n indeterminateState: root.indeterminateState\n };\n};\n\nexport type RdxProgressRootContext = ReturnType<typeof progressRootContext>;\n\nexport const [injectProgressRootContext, provideProgressRootContext] =\n createContext<RdxProgressRootContext>('RdxProgressRoot');\n\n/**\n * Provides progress state and accessibility attributes.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxProgressRoot]',\n exportAs: 'rdxProgressRoot',\n providers: [provideProgressRootContext(progressRootContext)],\n host: {\n role: 'progressbar',\n '[attr.aria-labelledby]': 'labelId()',\n '[attr.aria-describedby]': 'valueId()',\n '[attr.aria-valuemin]': 'indeterminateState() ? undefined : minState()',\n '[attr.aria-valuemax]': 'indeterminateState() ? undefined : maxState()',\n '[attr.aria-valuenow]': 'valueState() ?? undefined',\n '[attr.aria-valuetext]': 'valueLabelState()',\n '[attr.data-state]': 'progressState()',\n '[attr.data-value]': 'valueState() ?? undefined',\n '[attr.data-min]': 'minState()',\n '[attr.data-max]': 'maxState()',\n '[attr.data-complete]': 'dataAttr(completeState())',\n '[attr.data-progressing]': 'dataAttr(progressingState())',\n '[attr.data-indeterminate]': 'dataAttr(indeterminateState())'\n }\n})\nexport class RdxProgressRootDirective {\n /**\n * Current progress value. Set to `null` for indeterminate progress.\n *\n * @group Props\n * @defaultValue null\n */\n readonly value = input<number | null, number | null>(null, { transform: (value) => this.valueTransform(value) });\n\n /**\n * Minimum progress value.\n *\n * @group Props\n * @defaultValue 0\n */\n readonly min = input(DEFAULT_MIN, { transform: numberAttribute });\n\n /**\n * Maximum progress value.\n *\n * @group Props\n * @defaultValue 100\n */\n readonly max = input(DEFAULT_MAX, { transform: numberAttribute });\n\n /**\n * Formats the current value for assistive technologies and `rdxProgressValue`.\n *\n * @group Props\n */\n readonly valueLabel = input<ProgressValueFormatter>((value, min, max) => this.defaultValueLabel(value, min, max));\n\n readonly labelId = input(`rdx-progress-label-${progressId++}`);\n readonly valueId = input(`rdx-progress-value-${progressId++}`);\n\n readonly minState = computed(() => (isValidNumber(this.min()) ? this.min() : DEFAULT_MIN));\n readonly maxState = computed(() => {\n const min = this.minState();\n const max = this.max();\n\n return isValidNumber(max) && max > min ? max : min + DEFAULT_MAX;\n });\n\n readonly valueState = computed(() => {\n const value = this.value();\n\n if (value === null || !isValidNumber(value)) {\n return null;\n }\n\n return clamp(value, this.minState(), this.maxState());\n });\n\n readonly percentageState = computed(() => {\n const value = this.valueState();\n\n if (value === null) {\n return null;\n }\n\n const min = this.minState();\n const max = this.maxState();\n\n return ((value - min) / (max - min)) * 100;\n });\n\n readonly valueLabelState = computed(() => {\n const value = this.valueState();\n\n return value === null ? undefined : this.valueLabel()(value, this.minState(), this.maxState());\n });\n\n readonly progressState = computed<ProgressState>(() => {\n const value = this.valueState();\n\n if (value === null) {\n return 'indeterminate';\n }\n\n if (value === this.maxState()) {\n return 'complete';\n }\n\n return 'progressing';\n });\n\n readonly completeState = computed(() => this.progressState() === 'complete');\n readonly progressingState = computed(() => this.progressState() === 'progressing');\n readonly indeterminateState = computed(() => this.progressState() === 'indeterminate');\n\n protected readonly dataAttr = attr;\n\n private valueTransform(value: number | null): number | null {\n return value === null ? null : numberAttribute(value);\n }\n\n private defaultValueLabel(value: number, min: number, max: number) {\n return `${Math.round(((value - min) / (max - min)) * 100)}%`;\n }\n}\n\nfunction injectProgressRoot(): RdxProgressRootDirective {\n return inject(RdxProgressRootDirective);\n}\n","import { Directive } from '@angular/core';\nimport { injectProgressRootContext } from './progress-root.directive';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\n/**\n * Displays the visual progress fill.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxProgressIndicator]',\n exportAs: 'rdxProgressIndicator',\n host: {\n '[attr.data-state]': 'progress.progressState()',\n '[attr.data-value]': 'progress.valueState() ?? undefined',\n '[attr.data-min]': 'progress.minState()',\n '[attr.data-max]': 'progress.maxState()',\n '[attr.data-percent]': 'progress.percentageState() ?? undefined',\n '[attr.data-complete]': 'dataAttr(progress.completeState())',\n '[attr.data-progressing]': 'dataAttr(progress.progressingState())',\n '[attr.data-indeterminate]': 'dataAttr(progress.indeterminateState())'\n }\n})\nexport class RdxProgressIndicatorDirective {\n protected readonly progress = injectProgressRootContext();\n protected readonly dataAttr = attr;\n}\n","import { Directive } from '@angular/core';\nimport { injectProgressRootContext } from './progress-root.directive';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\n/**\n * Labels the progress task.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxProgressLabel]',\n exportAs: 'rdxProgressLabel',\n host: {\n '[attr.id]': 'progress.labelId()',\n '[attr.data-state]': 'progress.progressState()',\n '[attr.data-complete]': 'dataAttr(progress.completeState())',\n '[attr.data-progressing]': 'dataAttr(progress.progressingState())',\n '[attr.data-indeterminate]': 'dataAttr(progress.indeterminateState())'\n }\n})\nexport class RdxProgressLabelDirective {\n protected readonly progress = injectProgressRootContext();\n protected readonly dataAttr = attr;\n}\n","import { Directive } from '@angular/core';\nimport { injectProgressRootContext } from './progress-root.directive';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\n/**\n * Contains the visual progress indicator.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxProgressTrack]',\n exportAs: 'rdxProgressTrack',\n host: {\n '[attr.data-state]': 'progress.progressState()',\n '[attr.data-value]': 'progress.valueState() ?? undefined',\n '[attr.data-min]': 'progress.minState()',\n '[attr.data-max]': 'progress.maxState()',\n '[attr.data-complete]': 'dataAttr(progress.completeState())',\n '[attr.data-progressing]': 'dataAttr(progress.progressingState())',\n '[attr.data-indeterminate]': 'dataAttr(progress.indeterminateState())'\n }\n})\nexport class RdxProgressTrackDirective {\n protected readonly progress = injectProgressRootContext();\n protected readonly dataAttr = attr;\n}\n","import { Directive } from '@angular/core';\nimport { injectProgressRootContext } from './progress-root.directive';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\n/**\n * Displays the formatted progress value.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxProgressValue]',\n exportAs: 'rdxProgressValue',\n host: {\n '[attr.id]': 'progress.valueId()',\n '[textContent]': 'progress.valueLabelState() ?? \"\"',\n '[attr.data-state]': 'progress.progressState()',\n '[attr.data-value]': 'progress.valueState() ?? undefined',\n '[attr.data-min]': 'progress.minState()',\n '[attr.data-max]': 'progress.maxState()',\n '[attr.data-complete]': 'dataAttr(progress.completeState())',\n '[attr.data-progressing]': 'dataAttr(progress.progressingState())',\n '[attr.data-indeterminate]': 'dataAttr(progress.indeterminateState())'\n }\n})\nexport class RdxProgressValueDirective {\n protected readonly progress = injectProgressRootContext();\n protected readonly dataAttr = attr;\n}\n","import { NgModule } from '@angular/core';\nimport { RdxProgressIndicatorDirective } from './src/progress-indicator.directive';\nimport { RdxProgressLabelDirective } from './src/progress-label.directive';\nimport { RdxProgressRootDirective } from './src/progress-root.directive';\nimport { RdxProgressTrackDirective } from './src/progress-track.directive';\nimport { RdxProgressValueDirective } from './src/progress-value.directive';\n\nexport * from './src/progress-indicator.directive';\nexport * from './src/progress-label.directive';\nexport * from './src/progress-root.directive';\nexport * from './src/progress-track.directive';\nexport * from './src/progress-value.directive';\n\nexport type { ProgressProps, ProgressState, ProgressValueFormatter } from './src/progress-root.directive';\n\nconst _imports = [\n RdxProgressRootDirective,\n RdxProgressLabelDirective,\n RdxProgressValueDirective,\n RdxProgressTrackDirective,\n RdxProgressIndicatorDirective\n];\n\n@NgModule({\n imports: [..._imports],\n exports: [..._imports]\n})\nexport class RdxProgressModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["attr"],"mappings":";;;;AAGA,IAAI,UAAU,GAAG,CAAC;AAElB,MAAMA,MAAI,GAAG,CAAC,KAAc,MAAM,KAAK,GAAG,EAAE,GAAG,SAAS,CAAC;AAazD,MAAM,WAAW,GAAG,CAAC;AACrB,MAAM,WAAW,GAAG,GAAG;AAEvB,MAAM,a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,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ;AACxB,iBAAA;;;AC1BD;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, model, input, booleanAttribute, output, signal, computed, Input, Directive, inject, ElementRef } from '@angular/core';
2
+ import { InjectionToken, model, input, booleanAttribute, output, signal, computed, effect, Directive, inject, ElementRef, Renderer2, DestroyRef } from '@angular/core';
3
3
  import { provideValueAccessor, provideToken } from '@radix-ng/primitives/core';
4
4
  import * as i1 from '@radix-ng/primitives/roving-focus';
5
5
  import { RdxRovingFocusGroupDirective, RdxRovingFocusItemDirective } from '@radix-ng/primitives/roving-focus';
@@ -11,7 +11,11 @@ const RDX_RADIO_GROUP = new InjectionToken('RdxRadioGroup');
11
11
  class RdxRadioGroupDirective {
12
12
  constructor() {
13
13
  this.value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
14
+ this.defaultValue = input(...(ngDevMode ? [undefined, { debugName: "defaultValue" }] : /* istanbul ignore next */ []));
15
+ this.name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
16
+ this.form = input(...(ngDevMode ? [undefined, { debugName: "form" }] : /* istanbul ignore next */ []));
14
17
  this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
18
+ this.readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
15
19
  this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
16
20
  this.orientation = input(...(ngDevMode ? [undefined, { debugName: "orientation" }] : /* istanbul ignore next */ []));
17
21
  /**
@@ -19,7 +23,8 @@ class RdxRadioGroupDirective {
19
23
  */
20
24
  this.onValueChange = output();
21
25
  this.disable = signal(this.disabled(), ...(ngDevMode ? [{ debugName: "disable" }] : /* istanbul ignore next */ []));
22
- this.disableState = computed(() => this.disable() || this.disabled(), ...(ngDevMode ? [{ debugName: "disableState" }] : /* istanbul ignore next */ []));
26
+ this.disabledState = computed(() => this.disable() || this.disabled(), ...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
27
+ this.arrowNavigation = signal(false, ...(ngDevMode ? [{ debugName: "arrowNavigation" }] : /* istanbul ignore next */ []));
23
28
  /**
24
29
  * The callback function to call when the value of the radio group changes.
25
30
  */
@@ -33,6 +38,11 @@ class RdxRadioGroupDirective {
33
38
  this.onTouched = () => {
34
39
  /* Empty */
35
40
  };
41
+ effect(() => {
42
+ if (this.value() === null && this.defaultValue() !== undefined) {
43
+ this.value.set(this.defaultValue());
44
+ }
45
+ });
36
46
  }
37
47
  /**
38
48
  * Select a radio item.
@@ -40,8 +50,13 @@ class RdxRadioGroupDirective {
40
50
  * @ignore
41
51
  */
42
52
  select(value) {
53
+ if (this.disabledState() || this.readonly() || this.value() === value) {
54
+ return;
55
+ }
43
56
  this.value.set(value);
44
- this.onValueChange.emit(value);
57
+ if (value !== null) {
58
+ this.onValueChange.emit(value);
59
+ }
45
60
  this.onChange?.(value);
46
61
  this.onTouched();
47
62
  }
@@ -73,12 +88,18 @@ class RdxRadioGroupDirective {
73
88
  setDisabledState(isDisabled) {
74
89
  this.disable.set(isDisabled);
75
90
  }
91
+ setArrowNavigation(value) {
92
+ this.arrowNavigation.set(value);
93
+ }
94
+ isArrowNavigation() {
95
+ return this.arrowNavigation();
96
+ }
76
97
  onKeydown() {
77
- if (this.disableState())
98
+ if (this.disabledState())
78
99
  return;
79
100
  }
80
101
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxRadioGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
81
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxRadioGroupDirective, isStandalone: true, selector: "[rdxRadioRoot]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: false, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", onValueChange: "onValueChange" }, host: { attributes: { "role": "radiogroup" }, listeners: { "keydown": "onKeydown()" }, properties: { "attr.aria-orientation": "orientation()", "attr.aria-required": "required()", "attr.data-disabled": "disableState() ? \"\" : null" } }, providers: [
102
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxRadioGroupDirective, isStandalone: true, selector: "[rdxRadioRoot]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", 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 }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", onValueChange: "onValueChange" }, host: { attributes: { "role": "radiogroup" }, listeners: { "keydown": "onKeydown()" }, properties: { "attr.aria-orientation": "orientation()", "attr.aria-required": "required() ? \"true\" : undefined", "attr.data-disabled": "disabledState() ? \"\" : undefined", "attr.data-readonly": "readonly() ? \"\" : undefined", "attr.data-required": "required() ? \"\" : undefined" } }, providers: [
82
103
  provideValueAccessor(RdxRadioGroupDirective),
83
104
  { provide: RDX_RADIO_GROUP, useExisting: RdxRadioGroupDirective }
84
105
  ], exportAs: ["rdxRadioRoot"], hostDirectives: [{ directive: i1.RdxRovingFocusGroupDirective, inputs: ["dir", "dir", "orientation", "orientation", "loop", "loop"] }], ngImport: i0 }); }
@@ -96,14 +117,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
96
117
  host: {
97
118
  role: 'radiogroup',
98
119
  '[attr.aria-orientation]': 'orientation()',
99
- '[attr.aria-required]': 'required()',
100
- '[attr.data-disabled]': 'disableState() ? "" : null',
120
+ '[attr.aria-required]': 'required() ? "true" : undefined',
121
+ '[attr.data-disabled]': 'disabledState() ? "" : undefined',
122
+ '[attr.data-readonly]': 'readonly() ? "" : undefined',
123
+ '[attr.data-required]': 'required() ? "" : undefined',
101
124
  '(keydown)': 'onKeydown()'
102
125
  }
103
126
  }]
104
- }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], defaultValue: [{
105
- type: Input
106
- }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], onValueChange: [{ type: i0.Output, args: ["onValueChange"] }] } });
127
+ }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], onValueChange: [{ type: i0.Output, args: ["onValueChange"] }] } });
107
128
 
108
129
  const RdxRadioItemToken = new InjectionToken('RadioItemToken');
109
130
  function injectRadioItem() {
@@ -113,54 +134,134 @@ class RdxRadioItemDirective {
113
134
  constructor() {
114
135
  this.radioGroup = inject(RDX_RADIO_GROUP);
115
136
  this.elementRef = inject(ElementRef);
137
+ this.renderer = inject(Renderer2);
138
+ this.rovingFocusItem = inject(RdxRovingFocusItemDirective);
139
+ this.destroyRef = inject(DestroyRef);
140
+ this.inputElement = this.renderer.createElement('input');
116
141
  this.value = input.required(...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
117
142
  this.id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
118
- this.required = input(...(ngDevMode ? [undefined, { debugName: "required" }] : /* istanbul ignore next */ []));
143
+ this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
119
144
  this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
120
- this.disabledState = computed(() => this.radioGroup.disableState() || this.disabled(), ...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
145
+ this.readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
146
+ this.nativeButton = input(false, { ...(ngDevMode ? { debugName: "nativeButton" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
147
+ this.nativeButtonState = computed(() => this.nativeButton() || this.elementRef.nativeElement.tagName === 'BUTTON', ...(ngDevMode ? [{ debugName: "nativeButtonState" }] : /* istanbul ignore next */ []));
148
+ this.disabledState = computed(() => this.radioGroup.disabledState() || this.disabled(), ...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
149
+ this.readonlyState = computed(() => this.radioGroup.readonly() || this.readonly(), ...(ngDevMode ? [{ debugName: "readonlyState" }] : /* istanbul ignore next */ []));
150
+ this.requiredState = computed(() => this.radioGroup.required() || this.required(), ...(ngDevMode ? [{ debugName: "requiredState" }] : /* istanbul ignore next */ []));
121
151
  this.checkedState = computed(() => this.radioGroup.value() === this.value(), ...(ngDevMode ? [{ debugName: "checkedState" }] : /* istanbul ignore next */ []));
122
152
  this.ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'];
123
- this.isArrowKeyPressedSignal = signal(false, ...(ngDevMode ? [{ debugName: "isArrowKeyPressedSignal" }] : /* istanbul ignore next */ []));
124
- }
125
- /** @ignore */
126
- ngOnInit() {
127
- if (this.radioGroup.defaultValue === this.value()) {
128
- this.radioGroup.select(this.value());
129
- }
153
+ this.createHiddenInput();
154
+ const unlistenInputChange = this.renderer.listen(this.inputElement, 'change', () => {
155
+ if (this.inputElement.checked) {
156
+ this.radioGroup.select(this.value());
157
+ }
158
+ });
159
+ this.destroyRef.onDestroy(() => {
160
+ unlistenInputChange();
161
+ const parent = this.inputElement.parentNode;
162
+ if (parent) {
163
+ this.renderer.removeChild(parent, this.inputElement);
164
+ }
165
+ });
166
+ effect(() => {
167
+ this.rovingFocusItem.setActive(this.checkedState());
168
+ this.rovingFocusItem.setFocusable(!this.disabledState());
169
+ this.syncHiddenInput();
170
+ });
130
171
  }
131
172
  /** @ignore */
132
173
  onClick() {
133
- if (!this.disabledState()) {
174
+ if (!this.disabledState() && !this.readonlyState()) {
134
175
  this.radioGroup.select(this.value());
135
- this.isArrowKeyPressedSignal.set(true);
136
176
  }
137
177
  }
138
178
  /** @ignore */
139
179
  onKeyDown(event) {
140
180
  const keyEvent = event;
141
- if (this.ARROW_KEYS.includes(keyEvent.key)) {
142
- this.isArrowKeyPressedSignal.set(true);
181
+ if (keyEvent.key === ' ' || keyEvent.key === 'Enter') {
182
+ this.onClick();
183
+ return;
184
+ }
185
+ if (this.isAllowedArrowKey(keyEvent.key)) {
186
+ this.radioGroup.setArrowNavigation(true);
143
187
  }
144
188
  }
145
189
  /** @ignore */
146
190
  onKeyUp() {
147
- this.isArrowKeyPressedSignal.set(false);
191
+ this.radioGroup.setArrowNavigation(false);
148
192
  }
149
193
  /** @ignore */
150
194
  onFocus() {
151
- this.radioGroup.select(this.value());
152
- setTimeout(() => {
153
- /**
154
- * When navigating with arrow keys, focus triggers on the radio item.
155
- * To "check" the radio, we programmatically trigger a click event.
156
- */
157
- if (this.isArrowKeyPressedSignal()) {
158
- this.elementRef.nativeElement.click();
195
+ queueMicrotask(() => {
196
+ if (this.radioGroup.isArrowNavigation()) {
197
+ this.radioGroup.select(this.value());
198
+ this.radioGroup.setArrowNavigation(false);
159
199
  }
160
- }, 0);
200
+ });
201
+ }
202
+ isAllowedArrowKey(key) {
203
+ if (!this.ARROW_KEYS.includes(key)) {
204
+ return false;
205
+ }
206
+ const orientation = this.radioGroup.orientation() ?? 'horizontal';
207
+ if (orientation === 'vertical') {
208
+ return key === 'ArrowUp' || key === 'ArrowDown';
209
+ }
210
+ return key === 'ArrowLeft' || key === 'ArrowRight';
211
+ }
212
+ createHiddenInput() {
213
+ const host = this.elementRef.nativeElement;
214
+ const parent = host.parentNode;
215
+ this.renderer.setAttribute(this.inputElement, 'type', 'radio');
216
+ this.renderer.setAttribute(this.inputElement, 'tabindex', '-1');
217
+ this.renderer.setAttribute(this.inputElement, 'aria-hidden', 'true');
218
+ this.renderer.setStyle(this.inputElement, 'position', 'absolute');
219
+ this.renderer.setStyle(this.inputElement, 'pointer-events', 'none');
220
+ this.renderer.setStyle(this.inputElement, 'opacity', '0');
221
+ this.renderer.setStyle(this.inputElement, 'margin', '0');
222
+ this.renderer.setStyle(this.inputElement, 'inset', '0');
223
+ this.renderer.setStyle(this.inputElement, 'transform', 'translateX(-100%)');
224
+ if (parent) {
225
+ this.renderer.insertBefore(parent, this.inputElement, host.nextSibling);
226
+ }
227
+ }
228
+ syncHiddenInput() {
229
+ const checked = this.checkedState();
230
+ this.inputElement.name = this.radioGroup.name() ?? '';
231
+ this.inputElement.value = this.value();
232
+ this.inputElement.checked = checked;
233
+ this.inputElement.required = this.requiredState();
234
+ this.inputElement.disabled = this.disabledState();
235
+ this.setOptionalAttribute('name', this.radioGroup.name());
236
+ this.setOptionalAttribute('form', this.radioGroup.form());
237
+ this.setBooleanAttribute('checked', checked);
238
+ this.setBooleanAttribute('required', this.requiredState());
239
+ this.setBooleanAttribute('disabled', this.disabledState());
240
+ this.renderer.setAttribute(this.inputElement, 'value', this.value());
241
+ if (this.previousCheckedState === false && checked) {
242
+ this.inputElement.dispatchEvent(new Event('input', { bubbles: true }));
243
+ this.inputElement.dispatchEvent(new Event('change', { bubbles: true }));
244
+ }
245
+ this.previousCheckedState = checked;
246
+ }
247
+ setOptionalAttribute(name, value) {
248
+ if (value) {
249
+ this.renderer.setAttribute(this.inputElement, name, value);
250
+ }
251
+ else {
252
+ this.renderer.removeAttribute(this.inputElement, name);
253
+ }
254
+ }
255
+ setBooleanAttribute(name, value) {
256
+ if (value) {
257
+ this.renderer.setAttribute(this.inputElement, name, '');
258
+ }
259
+ else {
260
+ this.renderer.removeAttribute(this.inputElement, name);
261
+ }
161
262
  }
162
263
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxRadioItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
163
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxRadioItemDirective, isStandalone: true, selector: "[rdxRadioItem]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button", "role": "radio" }, listeners: { "click": "onClick()", "keydown": "onKeyDown($event)", "keyup": "onKeyUp()", "focus": "onFocus()" }, properties: { "attr.aria-checked": "checkedState()", "attr.data-disabled": "disabledState() ? \"\" : null", "attr.data-state": "checkedState() ? \"checked\" : \"unchecked\"", "attr.disabled": "disabledState() ? \"\" : undefined" } }, providers: [provideToken(RdxRadioItemToken, RdxRadioItemDirective)], exportAs: ["rdxRadioItem"], hostDirectives: [{ directive: i1.RdxRovingFocusItemDirective, inputs: ["tabStopId", "id", "focusable", "focusable", "active", "active", "allowShiftKey", "allowShiftKey"] }], ngImport: i0 }); }
264
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxRadioItemDirective, isStandalone: true, selector: "[rdxRadioItem]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, nativeButton: { classPropertyName: "nativeButton", publicName: "nativeButton", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "radio" }, listeners: { "click": "onClick()", "keydown": "onKeyDown($event)", "keyup": "onKeyUp()", "focus": "onFocus()" }, properties: { "attr.type": "nativeButtonState() ? \"button\" : undefined", "attr.aria-checked": "checkedState()", "attr.aria-readonly": "readonlyState() ? \"true\" : undefined", "attr.aria-required": "requiredState() ? \"true\" : undefined", "attr.data-checked": "checkedState() ? \"\" : undefined", "attr.data-unchecked": "!checkedState() ? \"\" : undefined", "attr.data-disabled": "disabledState() ? \"\" : undefined", "attr.data-readonly": "readonlyState() ? \"\" : undefined", "attr.data-required": "requiredState() ? \"\" : undefined", "attr.data-state": "checkedState() ? \"checked\" : \"unchecked\"", "attr.disabled": "nativeButtonState() && disabledState() ? \"\" : undefined" } }, providers: [provideToken(RdxRadioItemToken, RdxRadioItemDirective)], exportAs: ["rdxRadioItem"], hostDirectives: [{ directive: i1.RdxRovingFocusItemDirective, inputs: ["tabStopId", "id", "focusable", "focusable", "active", "active", "allowShiftKey", "allowShiftKey"] }], ngImport: i0 }); }
164
265
  }
165
266
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxRadioItemDirective, decorators: [{
166
267
  type: Directive,
@@ -172,19 +273,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
172
273
  { directive: RdxRovingFocusItemDirective, inputs: ['tabStopId: id', 'focusable', 'active', 'allowShiftKey'] }
173
274
  ],
174
275
  host: {
175
- type: 'button',
276
+ '[attr.type]': 'nativeButtonState() ? "button" : undefined',
176
277
  role: 'radio',
177
278
  '[attr.aria-checked]': 'checkedState()',
178
- '[attr.data-disabled]': 'disabledState() ? "" : null',
279
+ '[attr.aria-readonly]': 'readonlyState() ? "true" : undefined',
280
+ '[attr.aria-required]': 'requiredState() ? "true" : undefined',
281
+ '[attr.data-checked]': 'checkedState() ? "" : undefined',
282
+ '[attr.data-unchecked]': '!checkedState() ? "" : undefined',
283
+ '[attr.data-disabled]': 'disabledState() ? "" : undefined',
284
+ '[attr.data-readonly]': 'readonlyState() ? "" : undefined',
285
+ '[attr.data-required]': 'requiredState() ? "" : undefined',
179
286
  '[attr.data-state]': 'checkedState() ? "checked" : "unchecked"',
180
- '[attr.disabled]': 'disabledState() ? "" : undefined',
287
+ '[attr.disabled]': 'nativeButtonState() && disabledState() ? "" : undefined',
181
288
  '(click)': 'onClick()',
182
289
  '(keydown)': 'onKeyDown($event)',
183
290
  '(keyup)': 'onKeyUp()',
184
291
  '(focus)': 'onFocus()'
185
292
  }
186
293
  }]
187
- }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
294
+ }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], nativeButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "nativeButton", required: false }] }] } });
188
295
 
189
296
  class RdxRadioIndicatorDirective {
190
297
  constructor() {
@@ -192,7 +299,7 @@ class RdxRadioIndicatorDirective {
192
299
  this.radioItem = inject(RdxRadioItemDirective);
193
300
  }
194
301
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxRadioIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
195
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxRadioIndicatorDirective, isStandalone: true, selector: "[rdxRadioIndicator]", host: { properties: { "attr.data-state": "radioItem.checkedState() ? \"checked\" : \"unchecked\"", "attr.data-disabled": "radioItem.disabled() ? \"\" : undefined" } }, exportAs: ["rdxRadioIndicator"], ngImport: i0 }); }
302
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxRadioIndicatorDirective, isStandalone: true, selector: "[rdxRadioIndicator]", host: { properties: { "attr.data-checked": "radioItem.checkedState() ? \"\" : undefined", "attr.data-unchecked": "!radioItem.checkedState() ? \"\" : undefined", "attr.data-state": "radioItem.checkedState() ? \"checked\" : \"unchecked\"", "attr.data-disabled": "radioItem.disabledState() ? \"\" : undefined", "attr.data-readonly": "radioItem.readonlyState() ? \"\" : undefined", "attr.data-required": "radioItem.requiredState() ? \"\" : undefined", "hidden": "!radioItem.checkedState()", "style.pointer-events": "\"none\"" } }, exportAs: ["rdxRadioIndicator"], ngImport: i0 }); }
196
303
  }
197
304
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxRadioIndicatorDirective, decorators: [{
198
305
  type: Directive,
@@ -200,8 +307,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
200
307
  selector: '[rdxRadioIndicator]',
201
308
  exportAs: 'rdxRadioIndicator',
202
309
  host: {
310
+ '[attr.data-checked]': 'radioItem.checkedState() ? "" : undefined',
311
+ '[attr.data-unchecked]': '!radioItem.checkedState() ? "" : undefined',
203
312
  '[attr.data-state]': 'radioItem.checkedState() ? "checked" : "unchecked"',
204
- '[attr.data-disabled]': 'radioItem.disabled() ? "" : undefined'
313
+ '[attr.data-disabled]': 'radioItem.disabledState() ? "" : undefined',
314
+ '[attr.data-readonly]': 'radioItem.readonlyState() ? "" : undefined',
315
+ '[attr.data-required]': 'radioItem.requiredState() ? "" : undefined',
316
+ '[hidden]': '!radioItem.checkedState()',
317
+ '[style.pointer-events]': '"none"'
205
318
  }
206
319
  }]
207
320
  }] });
@@ -209,31 +322,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
209
322
  class RdxRadioItemInputDirective {
210
323
  constructor() {
211
324
  this.radioItem = injectRadioItem();
212
- this.name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
325
+ this.radioGroup = inject(RDX_RADIO_GROUP);
326
+ this.input = inject(ElementRef).nativeElement;
327
+ this.name = computed(() => this.radioGroup.name(), ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
328
+ this.form = computed(() => this.radioGroup.form(), ...(ngDevMode ? [{ debugName: "form" }] : /* istanbul ignore next */ []));
213
329
  this.value = computed(() => this.radioItem.value() || undefined, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
214
- this.checked = computed(() => this.radioItem.checkedState() || undefined, ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
215
- this.required = input(this.radioItem.required(), ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
216
- this.disabled = input(this.radioItem.disabled(), ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
330
+ this.checked = computed(() => this.radioItem.checkedState(), ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
331
+ this.required = computed(() => this.radioItem.requiredState(), ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
332
+ this.disabled = computed(() => this.radioItem.disabledState(), ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
333
+ let isInitial = true;
334
+ effect(() => {
335
+ const checked = this.checked();
336
+ if (isInitial) {
337
+ isInitial = false;
338
+ return;
339
+ }
340
+ if (checked) {
341
+ this.input.dispatchEvent(new Event('input', { bubbles: true }));
342
+ this.input.dispatchEvent(new Event('change', { bubbles: true }));
343
+ }
344
+ });
217
345
  }
218
346
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxRadioItemInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
219
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxRadioItemInputDirective, isStandalone: true, selector: "[rdxRadioItemInput]", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "radio" }, properties: { "attr.name": "name()", "attr.required": "required()", "attr.disabled": "disabled() ? disabled() : undefined", "attr.checked": "checked()", "attr.value": "value()" } }, exportAs: ["rdxRadioItemInput"], hostDirectives: [{ directive: i1$1.RdxVisuallyHiddenDirective, inputs: ["feature", "feature"] }], ngImport: i0 }); }
347
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxRadioItemInputDirective, isStandalone: true, selector: "input[rdxRadioItemInput]", host: { attributes: { "type": "radio", "tabindex": "-1", "aria-hidden": "true" }, properties: { "attr.name": "name()", "attr.form": "form()", "attr.required": "required() ? \"\" : undefined", "attr.disabled": "disabled() ? \"\" : undefined", "attr.checked": "checked() ? \"\" : undefined", "checked": "checked()", "attr.value": "value()", "style": "{\n position: 'absolute',\n pointerEvents: 'none',\n opacity: 0,\n margin: 0,\n inset: 0,\n transform: 'translateX(-100%)',\n }" } }, exportAs: ["rdxRadioItemInput"], hostDirectives: [{ directive: i1$1.RdxVisuallyHiddenDirective, inputs: ["feature", "feature"] }], ngImport: i0 }); }
220
348
  }
221
349
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxRadioItemInputDirective, decorators: [{
222
350
  type: Directive,
223
351
  args: [{
224
- selector: '[rdxRadioItemInput]',
352
+ selector: 'input[rdxRadioItemInput]',
225
353
  exportAs: 'rdxRadioItemInput',
226
354
  hostDirectives: [{ directive: RdxVisuallyHiddenDirective, inputs: ['feature'] }],
227
355
  host: {
228
356
  type: 'radio',
357
+ tabindex: '-1',
358
+ 'aria-hidden': 'true',
229
359
  '[attr.name]': 'name()',
230
- '[attr.required]': 'required()',
231
- '[attr.disabled]': 'disabled() ? disabled() : undefined',
232
- '[attr.checked]': 'checked()',
233
- '[attr.value]': 'value()'
360
+ '[attr.form]': 'form()',
361
+ '[attr.required]': 'required() ? "" : undefined',
362
+ '[attr.disabled]': 'disabled() ? "" : undefined',
363
+ '[attr.checked]': 'checked() ? "" : undefined',
364
+ '[checked]': 'checked()',
365
+ '[attr.value]': 'value()',
366
+ '[style]': `{
367
+ position: 'absolute',
368
+ pointerEvents: 'none',
369
+ opacity: 0,
370
+ margin: 0,
371
+ inset: 0,
372
+ transform: 'translateX(-100%)',
373
+ }`
234
374
  }
235
375
  }]
236
- }], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
376
+ }], ctorParameters: () => [] });
237
377
 
238
378
  /**
239
379
  * Generated bundle index. Do not edit.